@media (max-width: 480px) {
  .container {
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0));
  }
  .app-footer {
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0));
    padding-top: 0.75rem;
  }

  .container > .glass-card:last-child,
  .content-grid .glass-card:last-child,
  .content-grid.center-main .glass-card:last-child {
    margin-bottom: 0.75rem !important;
  }
}

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  --bg-primary: #0b0f1a;
  --bg-secondary: #131a2a;
  --bg-tertiary: #1a2235;
  --bg-card: #121826;
  --bg-hover: #1b2336;
  --text-primary: #ffffff;
  --text-secondary: #b9c6d3;
  --text-muted: #8b96a8;
  --border-color: #263044;
  --border-hover: #33425e;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 10px 36px rgba(0, 0, 0, 0.65);
  --glass-bg: rgba(18, 24, 38, 0.92);
  --glass-border: rgba(255, 255, 255, 0.09);

  --primary: #6d5ef7;
  --primary-2: #8f7cff;
  --primary-hover: #5a4eea;
  --primary-light: rgba(109, 94, 247, 0.12);
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.1);
  --error: #ef4444;
  --error-light: rgba(239, 68, 68, 0.1);

  --border-radius: 16px;
  --border-radius-large: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Consolas", monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: var(--transition);
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

.login-container {
  overflow: hidden;
}

.bg-gradient:not(.login-container) {
  overflow-y: auto;
  overflow-x: hidden;
}

.bg-gradient {
  min-height: 100vh;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.bg-gradient::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(109, 94, 247, 0.03) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(143, 124, 255, 0.02) 0%,
      transparent 50%
    ),
    linear-gradient(180deg, rgba(109, 94, 247, 0.02) 0%, transparent 100%);
  z-index: -1;
  pointer-events: none;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.login-page .container {
  max-width: none;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
}

.header {
  text-align: center;
  margin-bottom: 3rem;
  margin-top: 90px;
}

.header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  text-shadow: 0 2px 20px rgba(79, 70, 229, 0.3);
}

.header h1::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  margin: 1rem auto;
  border-radius: 2px;
}

.breadcrumb {
  display: none;
}

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  padding: 1rem 2rem;
  min-height: 70px;
  overflow: hidden;
}

.top-nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(109, 94, 247, 0.12),
    rgba(143, 124, 255, 0.2),
    rgba(109, 94, 247, 0.12),
    transparent
  );
  animation: glassReflection 8s ease-in-out infinite;
  z-index: 1;
}

@keyframes glassReflection {
  0% {
    left: -100%;
  }
  50% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  height: 100%;
  padding: 0;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-width: 0;
  flex: 1 1 auto;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.nav-logo:hover,
.nav-logo:focus {
  color: var(--primary);
  outline: none;
}

.nav-breadcrumb {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.nav-breadcrumb a:hover {
  color: var(--primary);
}

.nav-breadcrumb-separator {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.nav-menu {
  position: relative;
  display: flex;
  align-items: center;
  z-index: 1002;
  flex: 0 0 auto;
}

.nav-menu-toggle {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  width: 44px;
  height: 44px;
  position: relative;
  z-index: 1002;
}

.nav-menu-toggle:hover {
  background: var(--bg-hover);
  transform: translateY(-1px);
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: var(--transition);
}

.hamburger span {
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: var(--transition);
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-hover);
  min-width: 200px;
  display: none;
  overflow: hidden;
  z-index: 10003;
  width: max-content;
  max-width: 280px;
  transform-origin: top right;
  opacity: 0;
  transform: scale(0.95) translateY(-10px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 0.5rem;
  max-height: 0;
}

.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  z-index: 999;
  opacity: 1;
  pointer-events: none;
  transition: none;
}

.nav-overlay.active {
  pointer-events: auto;
}

body.no-scroll {
  overflow: hidden;
}

.nav-dropdown.active {
  display: block !important;
  opacity: 1 !important;
  transform: scale(1) translateY(0) !important;
  max-height: 400px !important;
  animation: dropdownSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-dropdown.closing {
  animation: dropdownSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  padding: 1rem 2rem;
  min-height: 70px;
  overflow: visible;
}

@keyframes dropdownSlideIn {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(-10px) rotateX(-15deg);
    max-height: 0;
  }
  50% {
    opacity: 0.8;
    transform: scale(1.02) translateY(-2px) rotateX(-5deg);
    max-height: 200px;
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0) rotateX(0deg);
    max-height: 400px;
  }
}

@keyframes dropdownSlideOut {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0) rotateX(0deg);
    max-height: 400px;
  }
  100% {
    opacity: 0;
    transform: scale(0.95) translateY(-10px) rotateX(-15deg);
    max-height: 0;
  }
}

@keyframes menuItemSlideIn {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes menuItemSlideOut {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(20px);
  }
}

.nav-menu-toggle:hover .hamburger span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav-menu-toggle:hover .hamburger span:nth-child(2) {
  opacity: 0;
}

.nav-menu-toggle:hover .hamburger span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.hamburger span {
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.nav-menu-toggle.active .hamburger span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav-menu-toggle.active .hamburger span:nth-child(2) {
  opacity: 0;
}

.nav-menu-toggle.active .hamburger span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(-20px);
  animation: menuItemSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.nav-dropdown.active a:nth-child(1) {
  animation-delay: 0.1s;
}
.nav-dropdown.active a:nth-child(2) {
  animation-delay: 0.15s;
}
.nav-dropdown.active a:nth-child(3) {
  animation-delay: 0.2s;
}
.nav-dropdown.active a:nth-child(4) {
  animation-delay: 0.25s;
}
.nav-dropdown.active a:nth-child(5) {
  animation-delay: 0.3s;
}
.nav-dropdown.active a:nth-child(6) {
  animation-delay: 0.35s;
}
.nav-dropdown.active a:nth-child(7) {
  animation-delay: 0.4s;
}
.nav-dropdown.active a:nth-child(8) {
  animation-delay: 0.45s;
}

.nav-dropdown.closing a {
  animation: menuItemSlideOut 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.nav-dropdown.closing a:nth-child(1) {
  animation-delay: 0s;
}
.nav-dropdown.closing a:nth-child(2) {
  animation-delay: 0.05s;
}
.nav-dropdown.closing a:nth-child(3) {
  animation-delay: 0.1s;
}
.nav-dropdown.closing a:nth-child(4) {
  animation-delay: 0.15s;
}
.nav-dropdown.closing a:nth-child(5) {
  animation-delay: 0.2s;
}
.nav-dropdown.closing a:nth-child(6) {
  animation-delay: 0.25s;
}
.nav-dropdown.closing a:nth-child(7) {
  animation-delay: 0.3s;
}
.nav-dropdown.closing a:nth-child(8) {
  animation-delay: 0.35s;
}

.nav-dropdown a:last-child {
  border-bottom: none;
}

.nav-dropdown a:hover {
  background: var(--bg-hover);
  color: var(--primary);
}

@media (max-width: 768px) {
  .top-nav {
    padding: 1rem 1rem;
    min-height: 64px;
  }

  .nav-dropdown {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 12px);
    right: 12px;
    left: auto;
    height: auto;
    max-height: calc(100dvh - (env(safe-area-inset-top) + 24px));
    width: min(320px, 88vw);
    max-width: none;
    margin: 0;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: none;
    opacity: 0;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: none;
    z-index: 10003;
    pointer-events: none;
  }
  .nav-dropdown.active {
    display: block !important;
    opacity: 1 !important;
    transform: translateX(0);
    box-shadow: var(--shadow-hover);
    pointer-events: auto;
  }
  .nav-dropdown.closing {
    transform: translateX(100%);
  }
  .nav-dropdown a {
    font-size: 1rem;
  }

  .nav-breadcrumb {
    display: none;
  }
  .nav-menu-toggle {
    width: 40px;
    height: 40px;
    padding: 0.5rem;
  }
  .nav-left {
    gap: 0.875rem;
  }
  .nav-logo {
    font-size: 1.05rem;
  }
}

@media (max-width: 480px) {
  .top-nav {
    padding: 0.5rem 0.75rem;
    min-height: 56px;
  }

  .nav-dropdown {
    width: min(300px, 90vw);
    right: 10px;
    top: calc(env(safe-area-inset-top) + 10px);
  }

  .nav-container {
    padding: 0 0.5rem;
  }

  .bg-gradient:not(.login-container) {
    padding-bottom: env(safe-area-inset-bottom, 0) !important;
  }
}

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  height: 100vh;
  width: 100vw;
  padding: 2rem;
  position: relative;
  background: var(--bg-primary);
  overflow: hidden;
  margin: 0;
}

.login-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
      4px 4px at 30px 40px,
      rgba(139, 92, 246, 0.5),
      transparent
    ),
    radial-gradient(3px 3px at 60px 90px, rgba(168, 85, 247, 0.4), transparent),
    radial-gradient(
      3px 3px at 120px 60px,
      rgba(192, 132, 252, 0.5),
      transparent
    ),
    radial-gradient(
      2px 2px at 180px 110px,
      rgba(139, 92, 246, 0.4),
      transparent
    ),
    radial-gradient(4px 4px at 240px 50px, rgba(168, 85, 247, 0.5), transparent),
    radial-gradient(
      2px 2px at 80px 180px,
      rgba(192, 132, 252, 0.4),
      transparent
    ),
    radial-gradient(
      3px 3px at 200px 200px,
      rgba(139, 92, 246, 0.5),
      transparent
    ),
    radial-gradient(
      2px 2px at 300px 150px,
      rgba(168, 85, 247, 0.4),
      transparent
    ),
    radial-gradient(
      3px 3px at 350px 80px,
      rgba(192, 132, 252, 0.5),
      transparent
    );
  background-repeat: repeat;
  background-size: 400px 300px;
  animation: floatingParticles 30s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes floatingParticles {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-30px) rotate(90deg);
  }
  50% {
    transform: translateY(-60px) rotate(180deg);
  }
  75% {
    transform: translateY(-80px) rotate(270deg);
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
  }
}

html,
body.login-page {
  overflow: hidden !important;
  height: 100dvh;
  width: 100vw;
  margin: 0;
  padding: 0;
}
.login-page .container {
  width: 100vw;
  height: 100dvh;
  margin: 0;
  padding: 0;
}
.login-container {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: hidden;
}

.bg-gradient:not(.login-container)::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 15% 15%,
      rgba(109, 94, 247, 0.015) 0%,
      transparent 70%
    ),
    radial-gradient(
      circle at 85% 85%,
      rgba(143, 124, 255, 0.01) 0%,
      transparent 70%
    ),
    linear-gradient(180deg, rgba(109, 94, 247, 0.008) 0%, transparent 100%);
  z-index: -1;
  pointer-events: none;
}

@keyframes textureFloat {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(-5px, -3px) rotate(0.2deg);
  }
  50% {
    transform: translate(3px, -5px) rotate(-0.2deg);
  }
  75% {
    transform: translate(-3px, 3px) rotate(0.1deg);
  }
}

.login-card {
  max-width: 450px;
  width: 100%;
  text-align: center;
  position: relative;
  backdrop-filter: blur(25px);
  background: rgba(30, 35, 50, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  z-index: 1;
  overflow: hidden;
  animation: cardFloat 6s ease-in-out infinite;
}
.login-card-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

@media (max-width: 480px) {
  .bg-gradient.login-page {
    overflow: hidden !important;
  }
  .login-card {
    width: min(480px, 92vw);
    max-height: calc(100dvh - 2rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .login-form {
    padding-bottom: 1rem;
  }
  .login-card-footer {
    margin-top: auto;
    padding-top: 0.75rem;
  }
}

@keyframes cardFloat {
  0%,
  100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.02);
  }
}

.login-card::before {
  content: none;
}

.login-card::after {
  content: none;
}

.login-header {
  padding: 3rem 2rem 2rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-header h1 {
  margin-bottom: 2rem;
  color: #ffffff;
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  position: relative;
  text-align: center;
  text-shadow: none;
  animation: none;
  width: 100%;
}

.watch-text {
  color: #ffffff;
}

.guard-text {
  color: #ef4444;
}

.login-form {
  padding: 0 2rem 3rem;
}

.login-form .form-group {
  margin-bottom: 2rem;
  text-align: left;
  position: relative;
}

.hidden {
  display: none !important;
}

.login-form .form-group label {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
}

.login-form .form-input {
  width: 100%;
  padding: 1.25rem 1.5rem;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.1rem;
  backdrop-filter: blur(15px);
  position: relative;
  font-weight: 500;
}

.password-field {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  z-index: 10;
}

.password-toggle:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-50%) scale(1.1);
}

.password-toggle:active {
  transform: translateY(-50%) scale(0.95);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  transition: all 0.3s ease;
}

.password-toggle.show svg {
  transform: scale(1.1);
}

.error-message {
  background: rgba(239, 68, 68, 0.1);
  border: 2px solid var(--error);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--error);
  font-weight: 500;
  text-align: center;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
  animation: errorShake 0.5s ease-in-out;
  position: relative;
  overflow: hidden;
}

.error-message::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--error);
  animation: errorPulse 2s ease-in-out infinite;
}

@keyframes errorShake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

@keyframes errorPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.password-field .form-input {
  padding-right: 4rem;
}

.login-form .form-input:focus {
  border-color: #8b5cf6;
  outline: none;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2),
    0 8px 25px rgba(139, 92, 246, 0.15);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px) scale(1.02);
}

.login-form .form-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}

.login-btn {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  background: #8b5cf6;
  border: none;
  color: white;
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  margin: 2rem auto 0;
  display: block;
}

.login-btn:hover {
  background: #7c3aed;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.login-btn:active {
  transform: translateY(0);
}

.glass-button.primary.login-btn {
  text-align: center !important;
  display: block !important;
  margin: 2rem auto 0 !important;
  background: #8b5cf6 !important;
  border: none !important;
  box-shadow: none !important;
  animation: none !important;
  backdrop-filter: none !important;
  font-weight: 600 !important;
  font-size: 1.1rem !important;
  padding: 1rem 2rem !important;
  border-radius: 12px !important;
}

.login-btn span,
.login-btn div,
.login-btn * {
  text-align: center !important;
  display: inline-block !important;
}

@keyframes buttonGlow {
  0%,
  100% {
    box-shadow: none;
    background-position: 0% 50%;
  }
  50% {
    box-shadow: none;
    background-position: 100% 50%;
  }
}

.login-btn::before {
  content: none;
}

.login-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.3) 0%,
    transparent 70%
  );
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.8s ease-out, height 0.8s ease-out;
}

.login-btn:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 20px 50px rgba(76, 29, 149, 0.8),
    0 0 0 3px rgba(255, 255, 255, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.4),
    0 0 60px rgba(139, 92, 246, 0.8);
  background-position: 200% 50% !important;
  animation: none;
  letter-spacing: 3px;
}

.login-btn:hover::before {
  left: 100%;
  animation: none;
}

.login-btn:hover::after {
  width: 400px;
  height: 400px;
}

.login-btn:active {
  transform: translateY(-2px) scale(1.05);
  transition: all 0.1s ease;
}

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  animation: none;
  box-shadow: 0 5px 15px rgba(76, 29, 149, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

.login-btn:disabled::before {
  animation: none;
}

.login-btn.loading {
  pointer-events: none;
  background: linear-gradient(135deg, #4c1d95, #6d28d9) !important;
  animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
  0%,
  100% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
}

.session-warning {
  background: var(--warning);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  text-align: center;
  font-weight: 500;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  margin-bottom: 2rem;
  overflow: hidden;
  background-clip: padding-box;
}

.glass-card::before {
  content: none;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-hover);
}

.card-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.center-header {
  justify-content: center;
  text-align: center;
  align-items: center;
  background: transparent;
}

.center-header h2 {
  margin-bottom: 0.5rem;
  background: transparent;
}

.center-header .header-description {
  margin: 0;
  background: transparent;
}

.card-header h2,
.card-header h3 {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.header-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.glass-button {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.fullscreen-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.fullscreen-btn:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.fullscreen-btn svg {
  width: 18px;
  height: 18px;
  transition: var(--transition);
}

.fullscreen-btn:hover svg {
  transform: scale(1.1);
}

.glass-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: 0.5s;
}

.glass-button:hover {
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  border-color: var(--border-hover);
}

.glass-button:hover::before {
  left: 100%;
}

.glass-button.primary {
  background: var(--primary);
  border: none;
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
}

.glass-button.primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 8px 30px rgba(79, 70, 229, 0.6);
}

.glass-button.secondary {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

.glass-button.small {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

.btn-icon {
  font-size: 1.1em;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.dashboard-grid .card-header {
  align-items: flex-start;
}

.dashboard-grid .header-description {
  margin-top: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.stat-item {
  text-align: center;
  padding: 1rem 0.5rem;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transition: var(--transition);
}

.stat-item:hover {
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-hover);
}

.stat-item:hover::before {
  transform: scaleX(1);
}

.stat-item:hover .stat-label.expired {
  color: var(--error);
}

.stat-item:hover .stat-label.warning {
  color: var(--warning);
}

.stat-item:hover .stat-label.safe {
  color: var(--success);
}

.stat-item:has(.stat-label.expired):hover {
  border-color: var(--error);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

.stat-item:has(.stat-label.warning):hover {
  border-color: var(--warning);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

.stat-item:has(.stat-label.safe):hover {
  border-color: var(--success);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.stat-item:has(.stat-label.expired):hover::before {
  background: var(--error);
}

.stat-item:has(.stat-label.warning):hover::before {
  background: var(--warning);
}

.stat-item:has(.stat-label.safe):hover::before {
  background: var(--success);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  line-height: 1.2;
}

.stat-label.expired {
  color: var(--error);
}
.stat-label.warning {
  color: var(--warning);
}
.stat-label.safe {
  color: var(--success);
}

.card-actions {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.quick-actions-main {
  margin-bottom: 3rem;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.action-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.action-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--success));
  transform: scaleX(0);
  transition: var(--transition);
}

.action-card:hover {
  background: var(--bg-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--border-hover);
}

.action-card:hover::before {
  transform: scaleX(1);
}

.action-card .action-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
  color: var(--primary);
}

.action-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.action-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.content-grid.with-sidebar {
  grid-template-columns: 1fr 280px;
  gap: 1.5rem;
}

.main-content {
  min-width: 0;
}

.content-grid.center-main {
  grid-template-columns: 1fr;
  max-width: 900px;
  margin: 0 auto;
  min-height: calc(100vh - 300px);
  display: flex;
  flex-direction: column;
}

.content-grid.center-main .main-content {
  max-width: none;
}

.content-grid.center-main .sidebar {
  display: none;
}

.controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 1rem;
}

.controls-bar.hidden {
  display: none;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 160px;
  justify-content: space-between;
}

.dropdown-arrow {
  transition: var(--transition);
  font-size: 0.8rem;
}

.dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  width: 100%;
  min-width: 200px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-hover);
  z-index: 1000;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: top center;
}

.dropdown.active .dropdown-content {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: dropdownSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown.closing .dropdown-content {
  animation: dropdownSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-10px);
  animation: dropdownItemSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.dropdown.active .dropdown-item:nth-child(1) {
  animation-delay: 0.1s;
}
.dropdown.active .dropdown-item:nth-child(2) {
  animation-delay: 0.15s;
}
.dropdown.active .dropdown-item:nth-child(3) {
  animation-delay: 0.2s;
}
.dropdown.active .dropdown-item:nth-child(4) {
  animation-delay: 0.25s;
}

.dropdown.closing .dropdown-item {
  animation: dropdownItemSlideOut 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.dropdown.closing .dropdown-item:nth-child(1) {
  animation-delay: 0.05s;
}
.dropdown.closing .dropdown-item:nth-child(2) {
  animation-delay: 0.1s;
}
.dropdown.closing .dropdown-item:nth-child(3) {
  animation-delay: 0.15s;
}
.dropdown.closing .dropdown-item:nth-child(4) {
  animation-delay: 0.2s;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
  transform: scaleY(0);
  transition: var(--transition);
}

.dropdown-item:hover {
  background: var(--bg-hover);
  padding-left: 1.5rem;
}

.dropdown-item:hover::before {
  transform: scaleY(1);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px currentColor;
}

.status-dot.all {
  background: var(--text-secondary);
}
.status-dot.expired {
  background: var(--error);
}
.status-dot.warning {
  background: var(--warning);
}
.status-dot.safe {
  background: var(--success);
}

.list-container {
  min-height: 400px;
}

.domain-list,
.server-list {
  overflow: visible;
  padding-right: 0;
}

.section-header {
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.5rem 0 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  text-align: left;
  position: relative;
  overflow: hidden;
  font-size: 1.1rem;
  border: 1px solid var(--border-color);
}

.section-header:contains("🔴") {
  border-left: 4px solid var(--error);
  background: linear-gradient(
    90deg,
    rgba(239, 68, 68, 0.1),
    var(--bg-secondary)
  );
}

.section-header:contains("🟡") {
  border-left: 4px solid var(--warning);
  background: linear-gradient(
    90deg,
    rgba(245, 158, 11, 0.1),
    var(--bg-secondary)
  );
}

.section-header:contains("🟢") {
  border-left: 4px solid var(--success);
  background: linear-gradient(
    90deg,
    rgba(16, 185, 129, 0.1),
    var(--bg-secondary)
  );
}

.section-header::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100px;
  background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.05));
}

.server-item,
.domain-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 0.75rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.server-item::before,
.domain-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary);
  transform: scaleY(0);
  transition: var(--transition);
}

.server-item.safe::before,
.domain-item.safe::before {
  background: var(--success);
  transform: scaleY(1);
}

.server-item.warning::before,
.domain-item.warning::before {
  background: var(--warning);
  transform: scaleY(1);
}

.server-item.expired::before,
.domain-item.expired::before {
  background: var(--error);
  transform: scaleY(1);
}

.server-item:hover,
.domain-item:hover {
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-hover);
}

.server-item:hover::before,
.domain-item:hover::before {
  transform: scaleY(1);
  opacity: 0.8;
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.server-info,
.domain-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.server-emoji,
.domain-emoji {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--bg-tertiary);
  border-radius: 50%;
  border: 2px solid var(--border-color);
  transition: var(--transition);
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji",
    "Twemoji Mozilla", sans-serif;
}

.domain-emoji.icon {
  color: var(--text-primary);
}

.domain-emoji .icon-svg {
  width: 60%;
  height: 60%;
}

.server-emoji.icon {
  color: var(--text-primary);
}
.server-emoji .icon-svg {
  width: 62%;
  height: 62%;
}

.server-emoji .twemoji,
.domain-emoji .twemoji {
  width: 1.4em;
  height: 1.4em;
  display: inline-block;
}

.server-item:hover .server-emoji,
.domain-item:hover .domain-emoji {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(79, 70, 229, 0.3);
}

.server-name,
.domain-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.item-actions {
  display: flex;
  gap: 0.5rem;
  opacity: 0.7;
  transition: var(--transition);
}

.server-item:hover .item-actions,
.domain-item:hover .item-actions {
  opacity: 1;
}

.action-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 0.9rem;
}

.action-btn svg {
  width: 18px;
  height: 18px;
  color: var(--text-primary);
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.action-btn.edit:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
}

.action-btn.edit:hover svg,
.action-btn.delete:hover svg {
  color: #ffffff;
}

.action-btn.delete:hover {
  background: var(--error);
  color: white;
  border-color: var(--error);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.server-details,
.domain-details {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.item-detail {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0.5rem 0;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius);
  border-left: 3px solid var(--primary);
  font-family: var(--font-mono);
  transition: var(--transition);
}

.item-detail:hover {
  background: var(--bg-hover);
  border-left-color: var(--success);
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-card);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  margin: 1.5rem auto;
  max-width: 460px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
  color: var(--text-muted);
}

.empty-state h3 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.empty-state p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.empty-state .button-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar .glass-card {
  padding: 1.5rem;
}

.sidebar .glass-card:has(.cost-overview-merged) {
  display: none;
}

.stats-with-cost .card-header {
  margin-bottom: 1rem;
}

.cost-overview-merged {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.cost-overview-merged h4 {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cost-overview-merged .glass-button {
  width: 100%;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

.content-grid {
  display: grid;
  gap: 2rem;
  width: 100%;
  min-height: calc(100vh - 160px);
}

@media (max-width: 768px) {
  .content-grid {
    min-height: 0 !important;
  }
}

.content-grid.with-sidebar {
  grid-template-columns: 1fr 280px;
}

.content-grid.center-main {
  grid-template-columns: 1fr;
  max-width: 900px;
  margin: 0 auto;
}

.content-grid.full-width {
  grid-template-columns: 1fr;
  max-width: 100%;
}

.servers-layout,
.domains-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  width: 100%;

  height: auto;
  min-height: 0;
  align-items: start;
  align-content: start;
}

.servers-main,
.domains-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.servers-main .glass-card,
.domains-main .glass-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.glass-card.list-container {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  contain: content;
}

.server-list,
.domain-list {
  flex: 1;
  overflow-y: auto;
  max-height: none;
  min-height: 0;
  padding-right: 0.5rem;
}

@media (min-width: 1024px) {
  .servers-layout,
  .domains-layout {
    align-items: stretch;
  }
  .servers-main,
  .domains-main {
    align-self: stretch;
    height: auto;
  }
  .servers-main .glass-card.list-container,
  .domains-main .glass-card.list-container {
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: hidden;
  }
  .server-list,
  .domain-list {
    flex: 1 1 auto;
    overflow-y: auto;
    max-height: 100%;
  }
}

@media (min-width: 769px) and (max-width: 1023px) {
  .servers-main .glass-card.list-container,
  .domains-main .glass-card.list-container {
    height: min(820px, calc(100vh - 240px));
    overflow: hidden;
  }
}

.server-list::-webkit-scrollbar,
.domain-list::-webkit-scrollbar {
  width: 6px;
}

.server-list::-webkit-scrollbar-track,
.domain-list::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 3px;
}

.server-list::-webkit-scrollbar-thumb,
.domain-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.server-list::-webkit-scrollbar-thumb:hover,
.domain-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.servers-info,
.domains-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;
}

.stats-card .stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.stats-card .stat-item.clickable {
  cursor: pointer;
  transition: var(--transition);
}

.stats-card .stat-item.clickable:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.cost-card {
  min-height: 150px;
}

.cost-card .cost-overview-merged {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.actions-card {
  min-height: 200px;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.quick-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--text-secondary);
  transition: var(--transition);
  min-height: 80px;
  cursor: pointer;
}

.quick-action-item:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.quick-action-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.quick-action-label {
  font-size: 0.85rem;
  font-weight: 500;
}

.cost-summary-section {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: 2rem;
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
}

.cost-summary-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

.cost-summary-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.cost-summary-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.cost-summary-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.cost-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.cost-grid .cost-item:last-child {
  grid-column: 1 / -1;
  max-width: 400px;
  margin: 0 auto;
  min-height: 140px;
}

.cost-grid-simple {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.cost-item {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.cost-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transition: var(--transition);
}

.cost-item:hover {
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.cost-item:hover::before {
  transform: scaleX(1);
}

.cost-item h3 {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cost-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.total-cost-item {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cost-value-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.cost-value-line {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  animation: modalFadeIn 0.3s ease;
}

.modal-content {
  background: var(--bg-card);
  margin: 5% auto;
  padding: 2rem;
  border-radius: var(--border-radius-large);
  border: 1px solid var(--border-color);
  width: 90%;
  max-width: 600px;
  box-shadow: var(--shadow-hover);
  animation: modalSlideIn 0.3s ease;
  position: relative;
  transform: translateY(-50px) scale(0.9);
  opacity: 0;
  transition: all 0.3s ease;
}

.modal-open .modal-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  text-align: center;
  flex: 1;
  margin: 0;
}

.modal-title {
  text-align: center;
  flex: 1;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.form-container {
  max-width: 600px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-input,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-family);
  transition: var(--transition);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  transform: translateY(-1px);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input[type="date"] {
  position: relative;
  background: var(--bg-secondary);
  color: var(--text-primary);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b8c5d1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3e%3c/rect%3e%3cline x1='16' y1='2' x2='16' y2='6'%3e%3c/line%3e%3cline x1='8' y1='2' x2='8' y2='6'%3e%3c/line%3e%3cline x1='3' y1='10' x2='21' y2='10'%3e%3c/line%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.2rem;
  padding-right: 3rem;
}

.form-input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  position: absolute;
  right: 1rem;
  width: 1.2rem;
  height: 1.2rem;
  cursor: pointer;
}

.form-input[type="date"]:hover {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3e%3c/rect%3e%3cline x1='16' y1='2' x2='16' y2='6'%3e%3c/line%3e%3cline x1='8' y1='2' x2='8' y2='6'%3e%3c/line%3e%3cline x1='3' y1='10' x2='21' y2='10'%3e%3c/line%3e%3c/svg%3e");
}

.form-input[type="number"] {
  -moz-appearance: textfield;
}

.form-input[type="number"]::-webkit-outer-spin-button,
.form-input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b8c5d1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  padding-right: 3rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.emoji-input-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.emoji-preview {
  width: 48px;
  height: 48px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: var(--transition);
}

.emoji-input {
  flex: 1;
}

.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  color: white;
  font-weight: 500;
  z-index: 1000;
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: slideInRight 0.3s ease;
  max-width: 300px;
  backdrop-filter: blur(20px);
  text-align: center;
  line-height: 1.4;
}
@media (max-width: 768px) {
  .notification {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    top: calc(12px + env(safe-area-inset-top));
    max-width: min(92vw, 360px);
    animation: fadeInDown 0.25s ease;
  }
}

@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translate(-50%, -10px);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.notification.info {
  background: var(--primary);
}
.notification.success {
  background: var(--success);
}
.notification.error {
  background: var(--error);
}

.notification.success {
  background: var(--success);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.notification.error {
  background: var(--error);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.notification.hidden {
  display: none;
}

@keyframes fadeInUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes dropdownSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dropdownSlideOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
}

@keyframes dropdownItemSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dropdownItemSlideOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.app-footer {
  margin-top: 1.5rem;
  padding: 1.5rem 0;
  text-align: center;
  background: transparent;
}

.footer-content {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  background: transparent;
}

.footer-content span {
  opacity: 0.8;
  transition: var(--transition);
  background: transparent;
}

@media (min-width: 1024px) {
  body.settings-page .app-footer {
    padding-top: 0.3rem;
    padding-bottom: 0.45rem;
    margin-top: 0.1rem;
  }
  body.settings-page .footer-content {
    line-height: 1.2;
    padding-bottom: 0.15rem;
  }
  body.settings-page .container {
    padding-bottom: 0.5rem;
  }
}

.filter-dropdown {
  position: relative;
}

.filter-trigger {
  position: relative;
}

.filter-content {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  min-width: 280px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.filter-dropdown.active .filter-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.filter-content {
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-dropdown.active .filter-content {
  pointer-events: auto;
}

.filter-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.filter-section:last-child {
  border-bottom: none;
}

.filter-section h4 {
  margin: 0 0 12px 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  margin: 4px 0;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.filter-item:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  transform: translateX(4px);
}

.filter-item .status-dot {
  margin-right: 8px;
}

.status-icon {
  width: 16px;
  height: 16px;
  margin-right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  line-height: 0;
  vertical-align: middle;
  filter: drop-shadow(0 0 4px currentColor) drop-shadow(0 0 2px currentColor);
}
.status-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.icon-expired {
  color: var(--error);
}
.icon-warning {
  color: var(--warning);
}
.icon-safe {
  color: var(--success);
}
.icon-tag {
  color: var(--primary);
}

.section-header .status-icon {
  width: 20px;
  height: 20px;
  margin-right: 6px;
  position: relative;
  top: -2px;
  vertical-align: middle;
}

.label-management-container {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.label-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.label-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.label-input-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.label-input-row .form-input {
  flex: 1;
}

@media (max-width: 768px) {
  .label-input-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  #newLabel.form-input,
  .label-input-row .form-input {
    min-height: 48px;
    font-size: 1rem;
  }

  .label-input-row .glass-button.primary {
    display: none;
  }
  .label-actions + .mobile-add-label {
    display: block;
    margin-top: 0.75rem;
  }

  .label-management-container {
    padding: 1rem;
    border-radius: 12px;
  }
  .labels-list {
    margin-bottom: 0.75rem;
  }
  .label-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    justify-content: stretch;
  }
  .label-actions .glass-button,
  .mobile-add-label {
    width: 100%;
  }
}

.mobile-add-label {
  display: none;
}

.labels-list {
  margin-bottom: 1.5rem;
}

.label-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.label-item:hover {
  border-color: var(--accent-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.label-text {
  font-weight: 500;
  color: var(--text-primary);
}

.label-remove-btn {
  background: none;
  border: none;
  color: var(--error);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: var(--transition);
}

.label-remove-btn:hover {
  background: var(--error);
  color: white;
}

.no-labels {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  padding: 1rem;
}

.label-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.labels-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
  padding: 0.5rem;
}

.pagination-btn {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  min-width: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(79, 172, 254, 0.3);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--bg-secondary);
}

.page-info {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  min-width: 60px;
  text-align: center;
}

.label-input-container {
  position: relative;
}

.label-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.label-dropdown-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.label-dropdown-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.label-dropdown-btn svg {
  transition: transform 0.2s ease;
}

.label-dropdown-btn.active svg {
  transform: rotate(180deg);
}

.label-dropdown {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.label-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.label-dropdown-content {
  background: rgba(30, 30, 40, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
  max-height: 400px;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
}

.label-dropdown.active .label-dropdown-content {
  transform: scale(1) translateY(0);
}

.filter-overlay-section-title {
  padding: 12px 24px 6px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  padding-left: 28px;
}

.label-dropdown-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
}

.label-dropdown-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.label-dropdown-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.label-dropdown-close:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  transform: translateY(-50%) scale(1.1);
}

.label-dropdown-close svg {
  transition: transform 0.2s ease;
}

.label-dropdown-close:hover svg {
  transform: rotate(90deg);
}

.label-option {
  padding: 16px 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.label-option:last-child {
  border-bottom: none;
}

.label-option:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  transform: translateX(8px);
}

.label-option:active {
  background: var(--accent-color);
  color: var(--text-on-accent);
  transform: translateX(8px);
}

.label-options-container {
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.label-options-container::-webkit-scrollbar {
  display: none;
}

@media (max-width: 1200px) {
  .container {
    max-width: 100%;
    padding: 1.5rem;
  }

  .content-grid.with-sidebar {
    grid-template-columns: 1fr 240px;
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  html,
  body {
    height: auto;
    min-height: 0;
  }

  .bg-gradient:not(.login-container) {
    padding-bottom: env(safe-area-inset-bottom, 0);
    min-height: 0 !important;
    height: auto !important;
  }

  .bg-gradient {
    height: auto;
    min-height: 0 !important;
  }

  .header h1 {
    font-size: 2rem;
  }

  .nav-left {
    gap: 1rem;
  }

  .nav-breadcrumb {
    display: none;
  }

  .content-grid,
  .content-grid.with-sidebar {
    grid-template-columns: 1fr;
  }

  .content-grid {
    min-height: 0 !important;
  }
  .content-grid.center-main {
    min-height: 0 !important;
  }

  .bg-gradient {
    min-height: 0 !important;
  }
  .container {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0)) !important;
  }

  .servers-main .glass-card,
  .domains-main .glass-card {
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .servers-info,
  .domains-info {
    height: auto !important;
  }

  .container > .glass-card:last-child,
  .container > .content-grid:last-child .glass-card:last-child,
  .servers-layout .glass-card:last-child,
  .domains-layout .glass-card:last-child {
    margin-bottom: 0;
  }

  .sidebar {
    order: -1;
  }

  .controls-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    align-items: center;
  }

  .controls-bar .filter-dropdown {
    width: 100%;
  }
  .controls-bar .filter-trigger,
  .controls-bar .glass-button {
    width: 100%;
    justify-content: center;
  }

  .controls-bar > div {
    display: contents !important;
  }
  .controls-bar a.glass-button.primary {
    grid-column: 1 / -1;
    margin-top: 0.25rem;
  }

  .controls-bar .filter-trigger,
  .controls-bar .filter-cost-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .action-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .cost-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .actions-card {
    padding: 0.75rem;
    border-radius: 12px;
  }
  .actions-card .card-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
  }
  .actions-card .header-description {
    display: none;
  }
  .actions-card .quick-actions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .actions-card .quick-action-item {
    min-height: 60px;
    padding: 0.75rem;
    border-radius: 10px;
  }
  .actions-card .quick-action-icon {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
  }
  .actions-card .quick-action-label {
    font-size: 0.9rem;
  }

  .servers-main .glass-card .card-header,
  .domains-main .glass-card .card-header,
  .stats-card .card-header,
  .actions-card .card-header {
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  .servers-main .glass-card .card-header > div,
  .domains-main .glass-card .card-header > div,
  .stats-card .card-header > div,
  .actions-card .card-header > div {
    width: 100%;
    text-align: center;
  }

  .cost-grid .cost-item:last-child {
    grid-column: 1;
    max-width: none;
    min-height: 120px;
  }

  .total-cost-item {
    min-height: 100px;
  }

  .cost-value-line {
    font-size: 1.1rem;
  }

  .app-footer {
    margin-top: 1rem;
    padding: 1rem 0;
    background: transparent;
  }

  .footer-content {
    font-size: 0.85rem;
    background: transparent;
  }

  .cost-grid-simple {
    grid-template-columns: 1fr;
  }

  .servers-layout,
  .domains-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    height: auto;
  }

  .server-list,
  .domain-list {
    overflow-y: auto;
    max-height: 55vh;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .server-list::-webkit-scrollbar,
  .domain-list::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background: transparent;
  }
  .server-list::-webkit-scrollbar-track,
  .domain-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
  }
  .server-list::-webkit-scrollbar-thumb,
  .domain-list::-webkit-scrollbar-thumb {
    background: linear-gradient(
      180deg,
      rgba(79, 70, 229, 0.35),
      rgba(16, 185, 129, 0.35)
    );
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
  }
  .server-list::-webkit-scrollbar-thumb:hover,
  .domain-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
      180deg,
      rgba(79, 70, 229, 0.55),
      rgba(16, 185, 129, 0.55)
    );
  }

  .quick-actions-grid {
    grid-template-columns: 1fr 1fr;
  }

  .modal-content {
    margin: 10% auto;
    width: min(420px, 92vw);
    padding: 1.25rem;
    border-radius: 16px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }

  .nav-container {
    padding: 0 1rem;
  }

  .top-nav {
    padding: 0.75rem;
  }

  .nav-menu-toggle {
    width: 36px;
    height: 36px;
    padding: 0.4rem;
  }
  .nav-left {
    gap: 0.75rem;
  }
  .nav-logo {
    font-size: 1rem;
  }
  .header {
    margin-top: 70px;
  }
  .header h1 {
    font-size: 1.75rem;
  }

  .glass-button {
    white-space: normal;
    width: 100%;
    justify-content: center;
  }
  .controls-bar > div,
  .controls-bar .glass-button,
  .card-actions .glass-button {
    width: 100%;
  }
  .nav-dropdown a {
    font-size: 0.95rem;
    white-space: normal;
  }

  .loading-title {
    font-size: 2.4rem;
  }
  .loading-progress {
    width: 200px;
    height: 3px;
  }
  .loading-content {
    transform: scale(0.9);
  }
}

@media (max-width: 480px) {
  .modal-content {
    margin: 8% auto;
    width: min(380px, 90vw);
    padding: 1rem;
    border-radius: 14px;
  }
  .modal-header {
    justify-content: center;
    position: relative;
  }
  .modal-close {
    position: absolute;
    right: 8px;
    top: 8px;
  }
  .cost-grid-simple {
    gap: 0.75rem;
  }
  .cost-grid-simple .cost-item {
    padding: 0.75rem;
  }
  .container {
    padding: 0.5rem;
  }

  .glass-card {
    padding: 1rem;
  }

  .item-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .server-info,
  .domain-info {
    width: 100%;
  }

  .item-actions {
    align-self: flex-end;
  }

  .actions-card .quick-actions-grid {
    grid-template-columns: 1fr;
  }
  .actions-card .quick-action-item {
    min-height: 56px;
    padding: 0.65rem;
  }
  .actions-card .quick-action-icon {
    font-size: 1.1rem;
  }
  .actions-card .quick-action-label {
    font-size: 0.88rem;
  }

  .glass-card {
    padding: 0.875rem;
  }
  .server-emoji,
  .domain-emoji {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
  .server-name,
  .domain-name {
    font-size: 1rem;
    word-break: break-word;
  }
  .nav-dropdown {
    width: calc(100vw - 1rem);
    right: 0.5rem;
  }

  .loading-title {
    font-size: 1.8rem;
  }
  .loading-progress {
    width: 160px;
    height: 3px;
  }
  .loading-content {
    transform: scale(0.85);
  }

  .login-header {
    padding: 2rem 1rem 1.5rem;
  }
  .login-header h1 {
    font-size: 2.2rem;
    margin: 0 0 1.5rem 0;
    text-align: center;
    width: 100%;
    display: block;
  }
}

@media print {
  .controls-bar,
  .item-actions,
  .header-actions,
  .top-nav {
    display: none;
  }

  .glass-card {
    background: white;
    border: 1px solid #ccc;
    box-shadow: none;
  }

  body {
    background: white;
    color: black;
  }
}

.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0b0f1a 0%, #131a2a 50%, #0b0f1a 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-screen.hidden {
  display: none;
}

.loading-content {
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.loading-title {
  font-size: 4rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
  text-shadow: none;
  animation: none;
}

.loading-progress {
  width: 300px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-top: 1rem;
  overflow: hidden;
  position: relative;
  align-self: center;
}

.loading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  border-radius: 2px;
  width: 0%;
  transition: width 1.1s ease-in-out;
  box-shadow: 0 0 10px rgba(79, 70, 229, 0.5);
}

.loading-screen.active .loading-progress-bar {
  width: 100%;
}

@media (max-width: 768px) {
  .container {
    padding: 0.75rem;
    padding-left: calc(1.25rem + env(safe-area-inset-left));
    padding-right: calc(1.25rem + env(safe-area-inset-right));
  }
  .header {
    margin-top: calc(86px + (env(safe-area-inset-top) / 2));
  }
  .header h1 {
    font-size: 1.6rem;
  }
  .header h1::after {
    width: 60px;
    height: 3px;
  }
  .glass-card {
    padding: 0.875rem;
    border-radius: 12px;
    margin-bottom: 1rem;
  }
  .card-header {
    margin-bottom: 0.875rem;
    padding-bottom: 0.5rem;
  }
  .card-header h2,
  .card-header h3 {
    font-size: 1.05rem;
  }
  .dashboard-grid,
  .action-grid,
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.875rem;
  }

  .action-card {
    padding: 1rem;
    border-radius: 12px;
  }
  .action-card .action-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
  }
  .action-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
  }
  .action-card p {
    font-size: 0.85rem;
  }
  .dashboard-grid {
    margin-bottom: 1.25rem;
  }
  .dashboard-grid .glass-card {
    margin-bottom: 0;
  }

  .empty-state {
    max-width: 420px;
    padding: 1.25rem;
    margin: 1rem auto;
    border-radius: 12px;
  }
  .stat-item {
    min-height: 64px;
    padding: 0.75rem 0.5rem;
  }
  .stat-value {
    font-size: 1.3rem;
  }
  .stat-label {
    font-size: 0.65rem;
  }
  .server-item,
  .domain-item {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 0.6rem;
  }
  .server-emoji,
  .domain-emoji {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
  .server-name,
  .domain-name {
    font-size: 1rem;
  }
  .form-group {
    margin-bottom: 1rem;
  }

  #settingsForm .form-group {
    margin-bottom: 0.875rem;
  }

  .form-container {
    max-width: 600px;
    margin: 0 auto;
  }
  .form-input,
  .form-select {
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
  }
  .glass-button {
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    min-height: 44px;
    width: 100%;
    justify-content: center;
  }
  .section-header {
    padding: 0.75rem 1rem;
    margin: 1rem 0 0.5rem;
  }
  .quick-actions-main {
    margin-bottom: 1.25rem;
  }

  .content-grid.center-main .glass-card {
    margin-bottom: 1rem;
  }

  .cost-summary-section {
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 12px;
  }
  .cost-summary-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
  }
  .cost-summary-header h2 {
    font-size: 1.25rem;
  }
  .cost-summary-header p {
    font-size: 0.85rem;
  }
  .cost-grid {
    gap: 0.875rem;
    margin-bottom: 1rem;
    grid-template-columns: 1fr;
  }
  .cost-item {
    padding: 1rem;
    border-radius: 12px;
  }
  .cost-item h3 {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
  }
  .cost-value {
    font-size: 1.5rem;
  }
  .total-cost-item {
    min-height: 100px;
  }
  .app-footer {
    margin-top: 0.75rem;
    padding: 0.75rem 0;
  }

  .server-item,
  .domain-item {
    padding: 0.85rem;
  }
  .server-emoji,
  .domain-emoji {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  .server-name,
  .domain-name {
    font-size: 0.95rem;
  }
  .item-detail {
    font-size: 0.85rem;
    padding: 0.6rem 0.75rem;
    border-left-width: 2px;
  }
  .item-actions .action-btn {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }
  .section-header {
    font-size: 0.95rem;
    padding: 0.7rem 0.9rem;
  }

  .item-header {
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }
  .item-actions {
    margin-left: auto;
  }
  .server-info,
  .domain-info {
    margin-left: 8px;
    gap: 0.75rem;
  }
  .server-details,
  .domain-details {
    margin-top: 0.25rem;
    padding-top: 0.25rem;
    border-top: none;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0.5rem;
    padding-left: calc(1rem + env(safe-area-inset-left));
    padding-right: calc(1rem + env(safe-area-inset-right));
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0));
  }
  .header {
    margin-top: calc(96px + env(safe-area-inset-top));
  }
  .glass-card {
    padding: 0.75rem;
    border-radius: 10px;
    margin-bottom: 1rem;
  }

  .empty-state {
    max-width: 360px;
    padding: 1rem;
    margin: 0.75rem auto;
  }
  .header h1 {
    font-size: 1.5rem;
  }
  .header h1::after {
    width: 48px;
    height: 3px;
  }
  .stat-item {
    min-height: 56px;
  }
  .stat-value {
    font-size: 1.2rem;
  }
  .action-card {
    padding: 0.75rem;
    border-radius: 10px;
  }
  .action-card .action-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  .action-card h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
  }
  .action-card p {
    font-size: 0.83rem;
  }
  .server-item,
  .domain-item {
    padding: 0.875rem;
  }
  .cost-summary-section {
    margin-top: 1.25rem;
  }

  .cost-summary-section {
    padding: 0.875rem;
    border-radius: 10px;
  }
  .cost-summary-header h2 {
    font-size: 1.2rem;
  }
  .cost-summary-header p {
    font-size: 0.83rem;
  }
  .cost-grid {
    gap: 0.75rem;
    margin-bottom: 0.875rem;
    grid-template-columns: 1fr;
  }
  .cost-item {
    padding: 0.875rem;
    border-radius: 10px;
  }
  .cost-item h3 {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
  }
  .cost-value {
    font-size: 1.35rem;
  }
  .total-cost-item {
    min-height: 90px;
  }

  .container > .glass-card:last-child,
  .content-grid .glass-card:last-child,
  .content-grid.center-main .glass-card:last-child {
    margin-bottom: 1.25rem !important;
  }
  .form-input,
  .form-select {
    padding: 0.6rem 0.85rem;
    font-size: 0.93rem;
    min-height: 42px;
  }
  .glass-button {
    padding: 0.6rem 0.9rem;
    font-size: 0.93rem;
    min-height: 42px;
  }
  .form-container {
    max-width: 560px;
    margin: 0 auto;
  }

  .server-item,
  .domain-item {
    padding: 0.75rem;
  }
  .server-emoji,
  .domain-emoji {
    width: 28px;
    height: 28px;
    font-size: 0.95rem;
  }
  .server-name,
  .domain-name {
    font-size: 0.92rem;
  }
  .item-detail {
    font-size: 0.8rem;
    padding: 0.5rem 0.65rem;
  }
  .item-actions .action-btn {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }
  .section-header {
    font-size: 0.9rem;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
  }

  .item-header {
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.4rem !important;
  }
  .item-actions {
    margin-left: auto;
  }
  .server-info,
  .domain-info {
    margin-left: 10px;
    gap: 0.6rem;
  }
  .server-details,
  .domain-details {
    margin-top: 0.2rem;
    padding-top: 0.2rem;
    border-top: none;
  }
}
