:root {
  /* AMOLED Pure Black & Minimal Deep Contrast System */
  --bg-page: #000000;
  --bg-surface: #06070a;
  --bg-card: #08090e;
  --bg-card-hover: #0d0f17;
  --bg-card-inner: #040508;
  --bg-input: #040508;
  
  /* Precision Borders */
  --border-subtle: #131622;
  --border-medium: #1b2030;
  --border-hover: #262c42;
  --border-focus: #2563eb;
  
  /* FreezeHost Brand Blue */
  --accent-blue: #2563eb;
  --accent-blue-hover: #1d4ed8;
  --accent-blue-light: #3b82f6;
  --accent-blue-glow: rgba(37, 99, 235, 0.35);
  --accent-blue-tint: rgba(37, 99, 235, 0.12);
  
  /* Semantic Colors */
  --accent-green: #10b981;
  --accent-green-light: #34d399;
  --accent-green-glow: rgba(16, 185, 129, 0.3);
  --accent-green-tint: rgba(16, 185, 129, 0.12);
  
  --accent-orange: #f59e0b;
  --accent-orange-tint: rgba(245, 158, 11, 0.12);
  
  --accent-purple: #8b5cf6;
  --accent-purple-tint: rgba(139, 92, 246, 0.12);
  
  --accent-danger: #ef4444;
  --accent-danger-tint: rgba(239, 68, 68, 0.12);
  
  --accent-discord: #5865f2;
  --accent-discord-hover: #4752c4;
  
  /* Text Hierarchy */
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;
  
  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;
  
  /* Minimal AMOLED Shadows */
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--border-subtle);
  --shadow-card-hover: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 0 1px var(--border-hover);
  --shadow-btn: 0 2px 10px rgba(37, 99, 235, 0.4);
  --shadow-btn-hover: 0 4px 18px rgba(37, 99, 235, 0.6);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ==========================================================================
   Full Screen / Widescreen Container (No Empty Side Margins)
   ========================================================================== */
.app-container {
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: 1.5rem 3rem 6rem;
  animation: pageFadeIn 0.3s ease-out;
}

@media (max-width: 1100px) {
  .app-container {
    padding: 1.25rem 1.75rem 4rem;
  }
}

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

/* ==========================================================================
   Top Navigation Bar
   ========================================================================== */
.topbar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0 2rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 2.25rem;
  gap: 1.5rem;
  animation: slideDownFade 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.brand-link:hover {
  transform: translateY(-1px);
}

.brand-logo-badge {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
  transition: border-color 0.2s ease;
}

.brand-link:hover .brand-logo-badge {
  border-color: var(--accent-blue);
}

.brand-logo-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand-submark {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-blue-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
}

.brand-submark-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-blue-light);
}

.nav-actions-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Nav Pill Group */
.pill-nav {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.25rem;
  gap: 0.25rem;
}

.nav-pill-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.15rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-pill-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.nav-pill-item.active {
  background: var(--accent-blue);
  color: #ffffff;
  box-shadow: 0 2px 10px var(--accent-blue-glow);
}

/* User Status Pill */
.user-status-pill {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.35rem 0.25rem 0.95rem;
  gap: 0.85rem;
  transition: border-color 0.2s ease;
}

.user-status-pill:hover {
  border-color: var(--border-medium);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.user-discord {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.user-discord svg {
  color: var(--accent-discord);
}

.badge-mini {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.22rem 0.75rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: all 0.2s ease;
}

.badge-mini.gh-on {
  background: var(--accent-blue-tint);
  color: var(--accent-blue-light);
  border: 1px solid rgba(37, 99, 235, 0.35);
}

.badge-mini.gh-on:hover {
  background: rgba(37, 99, 235, 0.25);
  transform: translateY(-1px);
}

.badge-mini.gh-off {
  background: var(--accent-orange-tint);
  color: var(--accent-orange);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-mini.gh-off:hover {
  background: rgba(245, 158, 11, 0.25);
  transform: translateY(-1px);
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  color: var(--accent-danger);
  background: var(--accent-danger-tint);
  transform: scale(1.1);
}

/* ==========================================================================
   Page Header
   ========================================================================== */
.page-header {
  margin-bottom: 2rem;
  animation: fadeInUp 0.4s ease-out 0.05s backwards;
}

.page-title {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.page-title .highlight {
  color: var(--accent-blue-light);
}

.page-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 750px;
}

code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  color: var(--accent-blue-light);
}

/* ==========================================================================
   Clean AMOLED Stat Cards (No Circles or "OK" dials)
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.4s ease-out backwards;
}

.stat-card:nth-child(1) { animation-delay: 0.08s; }
.stat-card:nth-child(2) { animation-delay: 0.14s; }
.stat-card:nth-child(3) { animation-delay: 0.20s; }
.stat-card:nth-child(4) { animation-delay: 0.26s; }

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

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

.stat-label-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.stat-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stat-number {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  line-height: 1.1;
}

.stat-subtext {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Category Mini Badges */
.mini-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stat-card:hover .mini-icon-badge {
  transform: scale(1.1) rotate(4deg);
}

.mini-icon-badge.blue {
  background: var(--accent-blue-tint);
  color: var(--accent-blue-light);
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.mini-icon-badge.green {
  background: var(--accent-green-tint);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.mini-icon-badge.orange {
  background: var(--accent-orange-tint);
  color: var(--accent-orange);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.mini-icon-badge.purple {
  background: var(--accent-purple-tint);
  color: var(--accent-purple);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

/* Solid Clean Status Indicator */
.status-indicator-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot.online {
  background-color: var(--accent-green);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

/* ==========================================================================
   Section Title Lockup (| Your Servers (3))
   ========================================================================== */
.section-title-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
  animation: fadeInUp 0.4s ease-out 0.2s backwards;
}

.section-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-accent-bar {
  width: 4px;
  height: 24px;
  border-radius: 2px;
  background: var(--accent-blue);
  box-shadow: 0 0 8px var(--accent-blue-glow);
}

.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.count-badge {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 1.05rem;
}

.section-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Search Bar */
.search-box-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.search-box-wrap .search-icon {
  position: absolute;
  left: 1.05rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  z-index: 2;
  width: 15px;
  height: 15px;
  transition: color 0.2s ease;
}

.search-box-wrap input.search-filter-input[type="text"] {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.62rem 1.15rem 0.62rem 2.85rem !important; /* Generous clearance for icon */
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-family: inherit;
  transition: all 0.25s ease;
  width: 240px;
  position: relative;
  z-index: 1;
}

.search-box-wrap input.search-filter-input[type="text"]:focus {
  outline: none;
  border-color: var(--accent-blue);
  width: 300px;
  box-shadow: 0 0 0 3px var(--accent-blue-tint);
  background: var(--bg-surface);
}

.search-box-wrap:focus-within .search-icon {
  color: var(--accent-blue-light);
}

/* ==========================================================================
   Server List Row Cards (Full Screen Rows)
   ========================================================================== */
.server-grid {
  display: grid;
  gap: 0.9rem;
  list-style: none;
}

.server-card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.35rem 1.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.2s ease;
  gap: 1.5rem;
  position: relative;
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.server-card-link:nth-child(1) { animation-delay: 0.18s; }
.server-card-link:nth-child(2) { animation-delay: 0.24s; }
.server-card-link:nth-child(3) { animation-delay: 0.30s; }
.server-card-link:nth-child(4) { animation-delay: 0.36s; }

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

.server-main-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.server-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.server-card-link:hover .server-icon-badge {
  border-color: var(--accent-blue);
  color: var(--accent-blue-light);
  transform: scale(1.06);
}

.server-name {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.015em;
  margin-bottom: 0.25rem;
  transition: color 0.15s ease;
}

.server-card-link:hover .server-name {
  color: var(--accent-blue-light);
}

.server-sub-details {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.copy-id-chip {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
}

.copy-id-chip:hover {
  color: var(--accent-blue-light);
}

.server-meta-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.server-card-link .btn.primary {
  transition: all 0.2s ease;
}

.server-card-link:hover .btn.primary {
  background: var(--accent-blue-hover);
  transform: translateX(2px);
}

/* ==========================================================================
   Admin Page Layout (Image 2 Redesign)
   ========================================================================== */
.admin-grid-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 900px) {
  .admin-grid-top {
    grid-template-columns: 1fr;
  }
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
  animation: fadeInUp 0.4s ease-out 0.1s backwards;
}

.admin-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-card-hover);
}

.admin-stats-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.admin-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}

/* ==========================================================================
   Badges & Pills
   ========================================================================== */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.32rem 0.95rem;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
}

.status-pill.success, .status-pill.on {
  background: var(--accent-green-tint);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.status-pill.running {
  background: var(--accent-orange-tint);
  color: var(--accent-orange);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.status-pill.failed {
  background: var(--accent-danger-tint);
  color: var(--accent-danger);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.status-pill.off {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.status-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.68rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1;
}

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

.btn:hover svg {
  transform: translateX(2px);
}

.btn:active {
  transform: scale(0.96);
}

.btn.primary {
  background: var(--accent-blue);
  color: #ffffff;
  box-shadow: var(--shadow-btn);
}

.btn.primary:hover {
  background: var(--accent-blue-hover);
  box-shadow: var(--shadow-btn-hover);
  transform: translateY(-1px);
}

.btn.secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
}

.btn.secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.btn.danger {
  background: var(--accent-danger-tint);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: var(--accent-danger);
}

.btn.danger:hover {
  background: rgba(239, 68, 68, 0.25);
  transform: translateY(-1px);
}

.btn.discord {
  background: var(--accent-discord);
  color: #ffffff;
  font-size: 1.05rem;
  padding: 0.95rem 1.85rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 18px rgba(88, 101, 242, 0.35);
}

.btn.discord:hover {
  background: var(--accent-discord-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(88, 101, 242, 0.45);
}

.btn.small {
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Card Containers & Forms
   ========================================================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.85rem 2.25rem;
  margin-bottom: 1.85rem;
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
  animation: fadeInUp 0.4s ease-out backwards;
}

.card:hover {
  border-color: var(--border-medium);
}

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

.card-title-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"] {
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 0.8rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  font-family: inherit;
  transition: all 0.2s ease;
  width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-blue-tint);
  background: #06070a;
}

input::placeholder {
  color: var(--text-dim);
}

.input-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Radio Group & Fieldsets */
fieldset {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  background: var(--bg-card-inner);
}

legend {
  padding: 0 0.5rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.radio-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.85rem;
}

.custom-radio {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.05rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.custom-radio:hover {
  border-color: var(--border-medium);
  background: var(--bg-card-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.custom-radio input[type="radio"] {
  accent-color: var(--accent-blue);
  cursor: pointer;
  width: 17px;
  height: 17px;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: opacity 0.2s ease;
}

.custom-checkbox:hover {
  opacity: 0.9;
}

.custom-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-blue);
  cursor: pointer;
}

/* ==========================================================================
   Live Sync Progress Bar Component
   ========================================================================== */
.sync-progress-box {
  background: var(--bg-card);
  border: 1px solid var(--accent-blue);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.85rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px var(--accent-blue-glow);
  animation: fadeIn 0.3s ease;
}

.sync-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.sync-progress-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.sync-progress-percent {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-blue-light);
  font-family: 'JetBrains Mono', monospace;
}

.progress-bar-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #3b82f6, #60a5fa);
  border-radius: var(--radius-pill);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
  position: relative;
  background-size: 1.5rem 1.5rem;
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.25) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0.25) 75%,
    transparent 75%,
    transparent
  );
  animation: progress-stripes 0.75s linear infinite;
}

@keyframes progress-stripes {
  from { background-position: 1.5rem 0; }
  to { background-position: 0 0; }
}

.progress-bar-fill.success {
  background: linear-gradient(90deg, #059669, #10b981);
  animation: none;
}

.progress-bar-fill.failed {
  background: linear-gradient(90deg, #dc2626, #ef4444);
  animation: none;
}

.sync-stage-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.spinner-icon {
  animation: spin 0.85s linear infinite;
  display: inline-block;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Alerts & Notifications
   ========================================================================== */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.1rem 1.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 1.85rem;
  animation: fadeIn 0.3s ease;
}

.alert.success {
  background: var(--accent-green-tint);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
}

.alert.error {
  background: var(--accent-danger-tint);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.alert.info {
  background: var(--accent-blue-tint);
  border: 1px solid rgba(37, 99, 235, 0.35);
  color: #bfdbfe;
}

/* ==========================================================================
   Tables
   ========================================================================== */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

th {
  padding: 0.9rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
}

td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: background 0.15s ease;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* ==========================================================================
   Login Page
   ========================================================================== */
.login-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 75vh;
  text-align: center;
}

.login-card {
  max-width: 460px;
  width: 100%;
  padding: 3rem 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
  animation: fadeInUp 0.4s ease-out;
}

.login-card:hover {
  border-color: var(--border-medium);
}

.auth-tabs {
  display: flex;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
  gap: 4px;
}

.auth-tab {
  flex: 1;
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.auth-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.auth-tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-medium);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.login-icon-badge {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
}

.login-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.login-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
  margin: 1.75rem 0 2.25rem;
  background: var(--bg-surface);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.login-feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.login-feature-item:hover {
  transform: translateX(4px);
  color: var(--text-primary);
}

.login-feature-item svg {
  color: var(--accent-green);
  flex-shrink: 0;
}

/* Back Link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  transition: all 0.2s ease;
}

.back-link svg {
  transition: transform 0.2s ease;
}

.back-link:hover {
  color: var(--text-primary);
  transform: translateX(-3px);
}

.back-link:hover svg {
  transform: translateX(-3px);
}

/* Utilities & Animations */
.muted { color: var(--text-muted); }
.small { font-size: 0.82rem; }

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

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

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

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

/* Responsive */
@media (max-width: 768px) {
  .topbar-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
  
  .nav-actions-container {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  
  .server-card-link {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .server-meta-right {
    width: 100%;
    justify-content: space-between;
  }
}
