@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

/* ==================== RESET & BASE ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Gold palette - refined */
  --gold: #f8b64c;
  --gold-dark: #e69130;
  --gold-darker: #c8741d;
  --gold-light: #ffd18a;
  --gold-glow: rgba(248, 182, 76, 0.32);

  --accent: #f97316;
  --accent-strong: #ea580c;
  --accent-soft: #fdba74;
  --accent-alt: #14b8a6;
  --accent-alt-soft: #5eead4;
  
  /* Dark backgrounds - layered depth */
  --bg-primary: #090e17;
  --bg-secondary: #0f1726;
  --bg-tertiary: #162033;
  --bg-elevated: #1b2940;
  --bg-overlay: rgba(8, 14, 24, 0.92);
  
  /* Text hierarchy */
  --text-primary: #f7fafc;
  --text-secondary: #c5d1df;
  --text-muted: #8ea0b6;
  --text-disabled: #61748a;
  
  /* Borders & dividers */
  --border-subtle: rgba(248, 182, 76, 0.14);
  --border-default: rgba(248, 182, 76, 0.28);
  --border-emphasis: rgba(248, 182, 76, 0.44);
  --border-strong: rgba(248, 182, 76, 0.58);
  
  /* Shadows */
  --shadow-sm: 0 2px 6px rgba(3, 8, 18, 0.32);
  --shadow-md: 0 8px 20px rgba(3, 8, 18, 0.4);
  --shadow-lg: 0 16px 36px rgba(3, 8, 18, 0.5);
  --shadow-gold-sm: 0 2px 8px var(--gold-glow);
  --shadow-gold-md: 0 4px 16px var(--gold-glow);
  --shadow-gold-lg: 0 8px 32px var(--gold-glow);
  
  /* Semantic colors */
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.1);
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.1);
  
  /* Spacing rhythm (8px base) */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  
  /* Transitions */
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;
  
  /* Typography scale */
  --font-xs: 0.75rem;    /* 12px */
  --font-sm: 0.875rem;   /* 14px */
  --font-base: 1rem;     /* 16px */
  --font-lg: 1.125rem;   /* 18px */
  --font-xl: 1.25rem;    /* 20px */
  --font-2xl: 1.5rem;    /* 24px */
  --font-3xl: 1.875rem;  /* 30px */
  --font-4xl: 2.25rem;   /* 36px */
}

body {
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  background: linear-gradient(160deg, #090f1d 0%, #0b1428 45%, #111b31 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  font-size: var(--font-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
.nav-brand h1,
.section-header h2 {
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
  letter-spacing: -0.02em;
}

/* ==================== TOP NAVIGATION ==================== */
.top-nav {
  background: rgba(11, 20, 40, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(112, 132, 255, 0.22);
  padding: var(--space-4) var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.top-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-link {
  background: transparent;
  border: 1px solid transparent;
  color: #c9d6ff;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  cursor: pointer;
}

.top-link:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(129, 140, 248, 0.35);
  color: #ffffff;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav-brand h1 {
  font-size: var(--font-2xl);
  color: #f8fafc;
  text-shadow: 0 0 18px rgba(99, 102, 241, 0.28);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-user-menu-wrap {
  position: relative;
}

.nav-user-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(248, 182, 76, 0.24);
  background: rgba(13, 24, 38, 0.72);
  color: #e2e8f0;
  padding: 6px 10px;
  border-radius: 9999px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.nav-user-menu-trigger:hover {
  border-color: rgba(248, 182, 76, 0.44);
  background: rgba(19, 33, 52, 0.86);
}

.nav-user-caret {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.nav-user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  border-radius: 12px;
  border: 1px solid rgba(248, 182, 76, 0.24);
  background: linear-gradient(180deg, rgba(12, 20, 32, 0.96), rgba(10, 17, 28, 0.96));
  box-shadow: 0 12px 28px rgba(3, 8, 18, 0.5);
  overflow: hidden;
  z-index: 1200;
}

.nav-user-dropdown__item {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: #dbe7f5;
  font-size: 0.86rem;
  cursor: pointer;
}

.nav-user-dropdown__item:hover {
  background: rgba(248, 182, 76, 0.12);
}

.nav-user-dropdown__item--danger {
  color: #fecaca;
}

.active-guild-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 215, 0, 0.25);
  background: rgba(255, 215, 0, 0.1);
  color: #ffe9a3;
  font-size: 0.8rem;
  font-weight: 700;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  /* Server badge in top nav is redundant on mobile — sidebar handles server switching */
  #activeGuildBadge {
    display: none !important;
  }
}

/* Server selector layout */
.servers-page--fresh {
  display: grid;
  gap: 18px;
}

/* Superadmin V2 Workspace Hub */
.sa-v2-shell {
  display: grid;
  gap: 14px;
}
.sa-v2-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  padding: 14px;
  background: rgba(8, 16, 34, 0.5);
}
.sa-v2-header h3 {
  margin: 0;
  color: #e0e7ff;
}
.sa-v2-header p {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.sa-v2-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sa-v2-chip {
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: rgba(30, 41, 59, 0.6);
  padding: 5px 10px;
  color: #c9d6ff;
  font-size: 0.78rem;
}
.sa-v2-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sa-v2-tab {
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: rgba(16, 24, 42, 0.8);
  color: #c9d6ff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.85rem;
  cursor: pointer;
}
.sa-v2-tab.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.36), rgba(59, 130, 246, 0.28));
  color: #fff;
}
.sa-v2-tab:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.sa-v2-main {
  display: grid;
  gap: 12px;
  align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
}
.sa-v2-body,
.sa-v2-rail-card,
.sa-v2-panel {
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 12px;
  background: rgba(8, 16, 34, 0.45);
  padding: 12px;
}
.sa-v2-body {
  min-width: 0;
}
.sa-v2-rail {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}
.sa-v2-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.sa-v2-card {
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  padding: 12px;
  background: rgba(12, 21, 38, 0.7);
}
.sa-v2-card h4 {
  margin: 0 0 8px;
  color: #dbe7ff;
}
.sa-v2-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.sa-v2-card--action {
  cursor: pointer;
}
.sa-v2-card--action:hover {
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.18) inset;
}
.sa-v2-card--action .btn-secondary {
  margin-top: 10px;
}
.sa-v2-kpi {
  font-size: 1.9rem;
  font-weight: 700;
  color: #c9d6ff;
  margin-bottom: 4px;
}
.sa-v2-toolbar {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  margin-bottom: 10px;
}
.sa-v2-toolbar input,
.sa-v2-toolbar select {
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  background: rgba(30, 41, 59, 0.8);
  color: #e0e7ff;
}
.sa-v2-panel input[type="text"],
.sa-v2-panel input[type="number"],
.sa-v2-panel input[type="email"],
.sa-v2-panel input[type="password"],
.sa-v2-panel select,
.sa-v2-panel textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 40px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  background: rgba(30, 41, 59, 0.8);
  color: #e0e7ff;
  outline: none;
}
.sa-v2-panel textarea {
  min-height: 88px;
  resize: vertical;
}
.sa-v2-panel input::placeholder,
.sa-v2-panel textarea::placeholder {
  color: rgba(201, 214, 255, 0.62);
}
.sa-v2-panel input:focus,
.sa-v2-panel select:focus,
.sa-v2-panel textarea:focus {
  border-color: rgba(129, 140, 248, 0.72);
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.22);
}
.sa-v2-split {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
}
.sa-v2-list {
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 10px;
  overflow: auto;
  max-height: 620px;
}
.sa-v2-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.sa-v2-detail-header h4 {
  margin: 0;
  color: #e0e7ff;
}
.sa-v2-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.sa-v2-pill {
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(30, 41, 59, 0.6);
  color: #c9d6ff;
  font-size: 0.8rem;
  cursor: pointer;
}
.sa-v2-pill.active {
  background: rgba(99, 102, 241, 0.35);
  color: #fff;
}
.sa-v2-scroll {
  max-height: 580px;
  overflow: auto;
}
.sa-v2-table-wrap {
  overflow: auto;
}
.sa-v2-table {
  width: 100%;
  border-collapse: collapse;
}
.sa-v2-table th,
.sa-v2-table td {
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
  padding: 8px;
  text-align: left;
  vertical-align: top;
  color: #dbe7ff;
  font-size: 0.84rem;
}
.sa-v2-inline-note {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 0.82rem;
}
.sa-v2-quick-actions {
  display: grid;
  gap: 8px;
}
.sa-v2-activity-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}
.sa-v2-activity-item {
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 10px;
  background: rgba(12, 21, 38, 0.65);
  padding: 8px 10px;
}
.sa-v2-activity-main {
  color: #e0e7ff;
  font-size: 0.84rem;
  font-weight: 600;
}
.sa-v2-activity-meta {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 0.74rem;
}
.sa-v2-empty {
  border: 1px dashed rgba(99, 102, 241, 0.22);
  border-radius: 12px;
  background: rgba(12, 21, 38, 0.45);
  padding: 16px;
  color: var(--text-secondary);
}
@media (max-width: 1100px) {
  .sa-v2-main,
  .sa-v2-split {
    grid-template-columns: 1fr;
  }
  .sa-v2-rail {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.servers-header {
  border-bottom-color: rgba(248, 182, 76, 0.2);
}

.servers-header .gpf-kicker {
  margin-bottom: 10px;
}

.servers-panel {
  border-radius: 18px;
  border: 1px solid rgba(248, 182, 76, 0.24);
  background: linear-gradient(170deg, rgba(13, 24, 38, 0.86), rgba(10, 19, 31, 0.8));
  box-shadow: 0 14px 30px rgba(4, 9, 19, 0.35);
}

.servers-panel__hint {
  color: #b8c6d7;
  font-size: 0.84rem;
}

.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.server-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  min-height: 96px;
  cursor: pointer;
  transition: var(--transition-base);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(248, 182, 76, 0.24);
  border-radius: 14px;
}

.server-card:hover {
  border-color: rgba(248, 182, 76, 0.42);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(4, 9, 19, 0.34);
}

.server-card--active {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.16), rgba(255, 255, 255, 0.02));
}

.server-card--context {
  align-items: center;
  cursor: default;
}

.server-card--context:hover {
  transform: none;
  box-shadow: none;
}

.server-card__body {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.server-card__title {
  color: #eef4ff;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.server-card__meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.server-card__meta {
  color: #93a8c0;
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.server-card__meta--context {
  font-size: 0.84rem;
  white-space: normal;
}

.server-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.server-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(248, 182, 76, 0.22);
}

.server-card__initials {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(248, 182, 76, 0.28), rgba(20, 184, 166, 0.32));
  color: #e0e7ff;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.server-alert {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  background: rgba(245, 158, 11, 0.1);
  color: #fcd34d;
}

.server-empty {
  color: var(--text-secondary);
  text-align: center;
  padding: 20px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: rgba(9, 17, 30, 0.45);
}

.server-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 9999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

.server-status-badge.active {
  background: rgba(16, 185, 129, 0.14);
  color: #86efac;
  border: 1px solid rgba(16, 185, 129, 0.22);
}

.server-status-badge.managed {
  background: rgba(99, 102, 241, 0.14);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.22);
}

.server-status-badge.unmanaged {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.22);
}

.nav-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 2px solid var(--gold);
  object-fit: cover;
  box-shadow: var(--shadow-gold-sm);
  transition: var(--transition-base);
}

.nav-avatar:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-gold-md);
}

.nav-username {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: var(--font-sm);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--gold);
  font-size: var(--font-2xl);
  cursor: pointer;
  padding: var(--space-2);
  transition: var(--transition-fast);
  border-radius: var(--radius-sm);
}

.mobile-menu-btn:hover {
  background: rgba(255, 215, 0, 0.1);
}

.mobile-menu-btn:active {
  transform: scale(0.95);
}

@media (max-width: 980px) {
  .top-links {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
}

/* ==================== MOBILE MENU ==================== */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  animation: fadeIn 0.2s ease-in;
}

.mobile-menu-content {
  background: var(--bg-secondary);
  width: 85%;
  max-width: 320px;
  height: 100%;
  padding: var(--space-6) 0;
  box-shadow: var(--shadow-lg), 4px 0 20px var(--gold-glow);
  border-right: 1px solid var(--border-emphasis);
  position: relative;
  animation: slideInLeft 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.mobile-menu-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid var(--border-default);
  color: var(--gold);
  font-size: var(--font-2xl);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-close:hover {
  background: rgba(255, 215, 0, 0.2);
  border-color: var(--border-emphasis);
}

.mobile-menu-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-8);
  padding: 0 var(--space-4);
}

/* ==================== MOBILE MENU ==================== */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  animation: fadeIn 0.2s ease-in;
}

.mobile-menu-content {
  background: var(--bg-secondary);
  width: 85%;
  max-width: 320px;
  height: 100%;
  padding: var(--space-6) 0;
  box-shadow: var(--shadow-lg), 4px 0 20px var(--gold-glow);
  border-right: 1px solid var(--border-emphasis);
  position: relative;
  animation: slideInLeft 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.mobile-menu-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid var(--border-default);
  color: var(--gold);
  font-size: var(--font-2xl);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-close:hover {
  background: rgba(255, 215, 0, 0.2);
  border-color: var(--border-emphasis);
}

.mobile-menu-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-8);
  padding: 0 var(--space-4);
}

.mobile-menu-items .nav-item {
  border-left: 3px solid transparent;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
/* ==================== PORTAL LAYOUT ==================== */
.portal-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 73px);
}

@media (max-width: 980px) {
  .portal-layout {
    grid-template-columns: 1fr;
  }
}

/* ==================== SIDEBAR ==================== */
.sidebar {
  background: rgba(14, 23, 44, 0.82);
  backdrop-filter: blur(10px);
  border-right: 1px solid rgba(99, 102, 241, 0.22);
  padding: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 73px;
  height: calc(100vh - 73px);
  overflow: hidden;
  z-index: 900;
}

@media (max-width: 980px) {
  .sidebar {
    display: none !important;
  }
}

.sidebar-search {
  padding: var(--space-4);
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
  position: relative;
}

.sidebar-search input {
  width: 100%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  padding: 10px 36px 10px 12px;
  color: var(--text-primary);
  font-size: var(--font-sm);
  transition: var(--transition-base);
}

.sidebar-search input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 0 12px rgba(248, 182, 76, 0.15);
}

.sidebar-search .search-icon {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.9rem;
}

.sidebar-nav-items {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ==================== DASHBOARD & GRID SYSTEM ==================== */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-8);
  gap: var(--space-4);
  flex-wrap: wrap;
}

.dashboard-header-main {
  flex: 1;
  min-width: 280px;
}

.dashboard-view-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(30, 41, 59, 0.45);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.toggle-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Switch Styles */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(148, 163, 184, 0.2);
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--gold);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--gold);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: var(--space-10);
  align-items: stretch;
}

.dashboard-tile {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
}

.dashboard-tile:hover {
  transform: translateY(-4px);
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(248, 182, 76, 0.4);
  box-shadow: 0 12px 24px rgba(3, 8, 22, 0.4);
}

.dashboard-tile::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: var(--transition-base);
}

.dashboard-tile:hover::after {
  opacity: 1;
}

.dashboard-tile__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-tile__icon {
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-md);
  color: var(--gold);
}

.dashboard-tile__title {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dashboard-tile__content {
  flex: 1;
}

.dashboard-tile__value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.dashboard-tile__footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-tile__meta {
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

.dashboard-tile__status {
  font-size: var(--font-xs);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.status-active { background: rgba(16, 185, 129, 0.15); color: #86efac; }
.status-inactive { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
.status-pending { background: rgba(245, 158, 11, 0.15); color: #fcd34d; }

.sidebar-server-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.sidebar-server-card:hover {
  background: rgba(99,102,241,0.12);
}

.sidebar-server-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.sidebar-server-initials {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(99,102,241,0.4);
  color: #e0e7ff;
  font-size: 0.85em;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-server-info {
  overflow: hidden;
}

.sidebar-server-name {
  font-weight: 600;
  font-size: 0.88em;
  color: #e0e7ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-server-switch {
  font-size: 0.75em;
  color: var(--text-secondary);
}

.sidebar-see-all {
  width: 100%;
  padding: 6px 10px;
  margin-top: 6px;
  background: none;
  border: none;
  color: rgba(99,102,241,0.7);
  font-size: 0.8em;
  cursor: pointer;
  text-align: left;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.sidebar-see-all:hover {
  color: #818cf8;
  background: rgba(99,102,241,0.08);
}

/* Sidebar hidden state — used on landing/marketing page */
.portal-layout.sidebar-hidden .sidebar {
  display: none;
}
.portal-layout.sidebar-hidden {
  grid-template-columns: 1fr;
}
.portal-layout.sidebar-hidden .content-area {
  max-width: 1280px;
  padding-left: clamp(20px, 4vw, 48px);
  padding-right: clamp(20px, 4vw, 48px);
}

/* ==================== MARKETING / LANDING PAGE ==================== */
.marketing-hero {
  text-align: center;
  padding: 56px 28px 44px;
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 22px;
  background:
    radial-gradient(80% 120% at 15% 0%, rgba(99, 102, 241, 0.24) 0%, rgba(99, 102, 241, 0) 55%),
    radial-gradient(90% 130% at 85% 10%, rgba(16, 185, 129, 0.14) 0%, rgba(16, 185, 129, 0) 50%),
    rgba(14, 23, 44, 0.52);
  box-shadow: 0 22px 46px rgba(3, 8, 22, 0.55);
  position: relative;
  overflow: hidden;
}
.marketing-hero h1 {
  font-size: 3.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--gold), #fff 60%, var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}
.marketing-hero .hero-sub {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 690px;
  margin: 0 auto 20px;
  line-height: 1.7;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  margin-bottom: 14px;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.45);
  background: rgba(99, 102, 241, 0.14);
  color: #c7d2fe;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.hero-proof-strip {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 auto 18px;
  max-width: 760px;
}
.hero-proof-strip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.13);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #dbeafe;
  font-size: 0.78rem;
  font-weight: 600;
}
.hero-proof-strip span::before {
  content: "•";
  color: #4ade80;
  font-size: 0.9rem;
}
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 auto 22px;
  max-width: 640px;
}
.hero-metric {
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: rgba(30, 41, 59, 0.55);
  padding: 10px 8px;
}
.hero-metric-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: #e0e7ff;
  line-height: 1.1;
}
.hero-metric-label {
  font-size: 0.78rem;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}
.marketing-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}
.marketing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 64px;
}
.marketing-feature-card {
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  transition: var(--transition-base);
  backdrop-filter: blur(6px);
}
.marketing-feature-card:hover {
  border-color: rgba(255, 215, 0, 0.3);
  background: rgba(255, 215, 0, 0.04);
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.42);
}
.marketing-feature-card .feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}
.marketing-feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.marketing-feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.sidebar-section-divider {
  height: 1px;
  background: rgba(99,102,241,0.12);
  margin: 6px 12px;
}

.sidebar-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-4);
  margin-top: var(--space-4);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: var(--font-sm);
  font-weight: 500;
  text-align: left;
  width: 100%;
  position: relative;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(90deg, rgba(129, 140, 248, 0.18), transparent);
  transition: var(--transition-fast);
}

.nav-item:hover::before {
  width: 100%;
}

.nav-item:hover {
  color: #c7d2fe;
  border-left-color: #818cf8;
}

.nav-item.active {
  color: #e0e7ff;
  border-left-color: #6366f1;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.16);
}

.nav-item.active::before {
  width: 100%;
}

.nav-icon {
  font-size: var(--font-xl);
  min-width: 28px;
  text-align: center;
  transition: var(--transition-fast);
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  transform: scale(1.1);
}

.nav-label {
  flex: 1;
}

/* ==================== ADMIN SUBMENU ==================== */
.admin-submenu {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 12px;
  border-left: 1px solid rgba(99, 102, 241, 0.15);
  margin-left: 22px;
  margin-top: 2px;
}

.admin-sub-item {
  font-size: 0.82em !important;
  padding: var(--space-2) var(--space-4) !important;
  opacity: 0.85;
}

.admin-sub-item.active {
  opacity: 1;
}

/* ==================== CONTENT AREA ==================== */
.content-area {
  padding: var(--space-8);
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.content-section {
  display: none;
  animation: fadeInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-section.active {
  display: block;
}

.app-surface {
  position: relative;
}

.app-surface::before {
  content: '';
  position: absolute;
  inset: -8px -10px auto -10px;
  height: 140px;
  border-radius: 18px;
  background:
    radial-gradient(60% 120% at 0% 0%, rgba(248, 182, 76, 0.12), rgba(248, 182, 76, 0)),
    radial-gradient(60% 120% at 100% 0%, rgba(99, 102, 241, 0.16), rgba(99, 102, 241, 0));
  pointer-events: none;
  z-index: 0;
}

.app-surface > * {
  position: relative;
  z-index: 1;
}

.command-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.command-tile-grid--settings {
  margin-top: 10px;
}

.command-tile {
  text-align: left;
  border: 1px solid rgba(248, 182, 76, 0.22);
  border-radius: 14px;
  padding: 12px 14px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    radial-gradient(100% 120% at 0% 0%, rgba(248, 182, 76, 0.1), rgba(248, 182, 76, 0));
  color: #dbe7f5;
  cursor: pointer;
  transition: var(--transition-base);
  display: grid;
  gap: 4px;
}

.command-tile strong {
  color: #fff3da;
  font-size: 0.92rem;
}

.command-tile span {
  color: #9db2c8;
  font-size: 0.78rem;
}

.command-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(248, 182, 76, 0.45);
  box-shadow: 0 10px 18px rgba(4, 9, 19, 0.3);
}

.command-tile.active {
  border-color: rgba(248, 182, 76, 0.52);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    radial-gradient(100% 120% at 0% 0%, rgba(248, 182, 76, 0.16), rgba(248, 182, 76, 0));
}

#section-settings.settings-focused-mode #settingsSetupCard,
#section-settings.settings-focused-mode #settingsTabsStrip,
#section-settings.settings-focused-mode #settingsAccordionNav {
  display: none !important;
}

#section-settings.settings-focused-mode #settingsTabContent {
  margin-top: 10px !important;
  animation: focusPanelIn 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

#section-admin.admin-focused-mode #adminCommandTiles {
  display: none !important;
}

#section-admin.admin-focused-mode .card[style*="display: block"] {
  animation: focusPanelIn 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

#section-settings.settings-focused-mode #settingsCommandTiles,
#section-admin.admin-focused-mode #adminCommandTiles {
  animation: tileRailOut 180ms ease both;
}

.command-tile.is-activating {
  animation: tilePulseIn 220ms ease;
}

.is-focus-entering {
  animation: focusPanelIn 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes focusPanelIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.995);
    filter: blur(1.5px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

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

@keyframes tilePulseIn {
  0% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-1px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}

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

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

.section-header {
  margin-bottom: var(--space-8);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-header h2 {
  font-size: var(--font-3xl);
  color: #e0e7ff;
  font-weight: 700;
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
  text-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: var(--font-base);
  line-height: 1.5;
}

/* ==================== CARDS ==================== */
.card {
  background: rgba(20, 29, 54, 0.65);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  transition: var(--transition-base);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), 0 0 16px rgba(99, 102, 241, 0.15);
  transform: translateY(-2px);
}

.card h3 {
  color: #e0e7ff;
  font-size: var(--font-xl);
  font-weight: 600;
  margin-bottom: var(--space-5);
  letter-spacing: -0.01em;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
  gap: var(--space-4);
  min-height: 44px;
}

.card-header h3 {
  margin-bottom: 0;
  flex: 1;
  min-width: 150px;
}

.login-card {
  text-align: center;
  padding: var(--space-12);
  border: 2px solid rgba(99, 102, 241, 0.4);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.04));
}

.login-card h3 {
  font-size: var(--font-3xl);
  margin-bottom: var(--space-4);
  color: #e0e7ff;
  text-shadow: 0 0 20px var(--gold-glow);
}

.login-card p {
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  font-size: var(--font-lg);
  line-height: 1.6;
}

/* ==================== STATS GRID ==================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

.stat-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(99, 102, 241, 0.04) 100%);
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #6366f1, transparent);
  opacity: 0;
  transition: var(--transition-base);
}

.stat-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.2);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-icon {
  font-size: 3rem;
  margin-bottom: var(--space-3);
  filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.25));
  transition: var(--transition-base);
}

.stat-card:hover .stat-icon {
  transform: scale(1.1);
}

.stat-value {
  font-size: var(--font-3xl);
  color: #818cf8;
  font-weight: 700;
  margin-bottom: var(--space-2);
  text-shadow: 0 0 12px rgba(129, 140, 248, 0.3);
  letter-spacing: -0.02em;
}

.stat-label {
  color: var(--text-muted);
  font-size: var(--font-sm);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* ==================== BUTTONS ==================== */
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-success {
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--font-sm);
  cursor: pointer;
  transition: var(--transition-base);
  border: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px; /* Touch target */
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}

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

.btn-secondary {
  background: rgba(99, 102, 241, 0.08);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.22);
}

.btn-secondary:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.btn-danger {
  background: var(--error);
  color: white;
  border: 1px solid var(--error);
}

.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  transform: translateY(-2px);
}

.btn-success {
  background: var(--success);
  color: white;
  border: 1px solid var(--success);
}

.btn-success:hover {
  background: #059669;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transform: translateY(-2px);
}

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled,
.btn-success:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-sm {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 0.78rem;
  border-radius: 10px;
}

/* ==================== FORM + SETTINGS HELPERS ==================== */
.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 54px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  background: rgba(15, 23, 42, 0.4);
}

.settings-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 42%;
}

.settings-label {
  color: #e6edff;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.settings-desc {
  color: var(--text-secondary);
  font-size: 0.76rem;
  line-height: 1.35;
}

.input-sm {
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.26);
  background: rgba(10, 17, 30, 0.78);
  color: #e0e7ff;
  font-size: 0.82rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.input-sm:hover {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(11, 18, 33, 0.9);
}

.input-sm:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.7);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.input-sm::placeholder {
  color: #8ea0be;
}

.settings-row .input-sm {
  flex: 1 1 58%;
  min-width: 0;
  max-width: 100%;
}

.settings-row select.input-sm {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-row input[type="checkbox"] {
  flex: 0 0 auto;
}

/* Missions admin panel polish */
#heistAdminPanel {
  border-color: rgba(99, 102, 241, 0.32);
  background:
    linear-gradient(145deg, rgba(18, 29, 56, 0.92) 0%, rgba(11, 20, 37, 0.88) 100%);
}

#heistAdminPanel > h3 {
  margin-bottom: 8px;
}

#heistAdminPanel h4 {
  margin: 0 0 10px;
  color: #dbe6ff;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}

#heistAdminPanel [id^="heistTemplateList"],
#heistAdminPanel [id^="heistActiveMissionOps"],
#heistAdminPanel [id^="heistLadderRows"],
#heistAdminPanel [id^="heistTraitBonusList"],
#heistAdminPanel [id^="heistVaultItemList"],
#heistAdminPanel [id^="heistRedemptionList"] {
  background: rgba(8, 13, 25, 0.44);
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 12px;
  padding: 10px;
}

.heist-ladder-header {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 10px;
  background: rgba(31, 41, 61, 0.55);
  color: #c7d4ef;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ==================== TABLES ==================== */
.data-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.data-table {
  width: 100%;
  min-width: 480px; /* prevents collapse on mobile — parent scrolls */
  border-collapse: separate;
  border-spacing: 0;
  margin: var(--space-4) 0;
}

.data-table thead {
  background: rgba(255, 215, 0, 0.08);
  border-radius: var(--radius-md);
}

.data-table th {
  padding: var(--space-4) var(--space-5);
  text-align: left;
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border-emphasis);
}

.data-table th:first-child {
  border-top-left-radius: var(--radius-md);
}

.data-table th:last-child {
  border-top-right-radius: var(--radius-md);
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-fast);
}

.data-table tbody tr:hover {
  background: rgba(255, 215, 0, 0.05);
}

.data-table td {
  padding: var(--space-4) var(--space-5);
  color: var(--text-secondary);
  font-size: var(--font-sm);
}

.data-table td:first-child {
  font-weight: 500;
  color: var(--text-primary);
}

/* ==================== PROPOSAL & GOVERNANCE ==================== */
.proposal-list,
.mission-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.proposal-item,
.mission-item {
  background: rgba(255, 215, 0, 0.04);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.proposal-item::before,
.mission-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gold);
  transform: scaleY(0);
  transition: var(--transition-base);
}

.proposal-item:hover,
.mission-item:hover {
  border-color: var(--border-emphasis);
  background: rgba(255, 215, 0, 0.08);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.proposal-item:hover::before,
.mission-item:hover::before {
  transform: scaleY(1);
}

.proposal-header,
.mission-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.proposal-title,
.mission-title {
  color: var(--gold);
  font-size: var(--font-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
  flex: 1;
  min-width: 200px;
}

.proposal-meta,
.mission-meta {
  color: var(--text-muted);
  font-size: var(--font-sm);
  line-height: 1.6;
}

.proposal-votes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}

.vote-stat {
  text-align: center;
  padding: var(--space-3);
  background: rgba(255, 215, 0, 0.05);
  border-radius: var(--radius-sm);
}

.vote-stat-label {
  font-size: var(--font-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-1);
}

.vote-stat-value {
  font-size: var(--font-xl);
  font-weight: 700;
  color: var(--gold);
}

.vote-stat-secondary {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

.progress-bar {
  height: 8px;
  background: rgba(255, 215, 0, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: var(--space-4) 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  border-radius: var(--radius-full);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px var(--gold-glow);
}

.quorum-indicator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-sm);
  color: var(--text-muted);
  margin-top: var(--space-2);
}

/* ==================== STATUS BADGES ==================== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--font-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

.status-draft {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning);
}

.status-supporting {
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid var(--info);
}

.status-voting {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success);
}

.status-active {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success);
}

.status-passed {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid var(--success);
}

.status-rejected,
.status-failed {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error);
}

.status-closed,
.status-completed {
  background: rgba(107, 107, 107, 0.15);
  color: var(--text-muted);
  border: 1px solid var(--text-muted);
}

.status-recruiting {
  background: rgba(59, 130, 246, 0.15);
  color: var(--info);
  border: 1px solid var(--info);
}

/* ==================== TIMELINE ==================== */
.timeline {
  position: relative;
  padding-left: var(--space-8);
  margin: var(--space-6) 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--gold), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-6);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -37px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--bg-secondary);
  box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.2);
}

.timeline-item.active::before {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.timeline-date {
  font-size: var(--font-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-2);
}

.timeline-content {
  background: rgba(255, 215, 0, 0.05);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

.timeline-title {
  color: var(--gold);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.timeline-description {
  color: var(--text-secondary);
  font-size: var(--font-sm);
  line-height: 1.6;
}

/* ==================== WALLET LIST ==================== */
.wallet-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.wallet-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-5);
  background: rgba(255, 215, 0, 0.04);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
  gap: var(--space-4);
}

.wallet-item:hover {
  border-color: var(--border-emphasis);
  background: rgba(255, 215, 0, 0.08);
  transform: translateX(4px);
}

.wallet-item.favorite {
  border-color: var(--gold);
  background: rgba(255, 215, 0, 0.1);
  box-shadow: var(--shadow-gold-sm);
}

.wallet-info {
  flex: 1;
  min-width: 0;
}

.wallet-address {
  font-family: 'Monaco', 'Courier New', monospace;
  color: var(--gold);
  font-size: var(--font-sm);
  word-break: break-all;
  margin-bottom: var(--space-2);
  font-weight: 500;
}

.wallet-meta {
  color: var(--text-muted);
  font-size: var(--font-xs);
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.wallet-actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

.wallet-actions button {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-xs);
  min-height: 36px;
}

/* ==================== EMPTY STATES ==================== */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: var(--space-4);
  opacity: 0.3;
  filter: grayscale(1);
}

.empty-state-title {
  font-size: var(--font-xl);
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
  font-weight: 600;
}

.empty-state-message {
  font-size: var(--font-base);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto var(--space-6);
}

.empty-state-action {
  margin-top: var(--space-6);
}

/* ==================== LOADING STATES ==================== */
.loading-spinner,
.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 215, 0, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12);
  gap: var(--space-4);
}

.loading-text {
  color: var(--text-muted);
  font-size: var(--font-sm);
}

/* Skeleton loaders */
.skeleton {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.05) 25%, rgba(255, 215, 0, 0.1) 50%, rgba(255, 215, 0, 0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 1em;
  margin-bottom: var(--space-2);
}

.skeleton-title {
  height: 1.5em;
  width: 60%;
  margin-bottom: var(--space-4);
}

/* ==================== ERROR STATES ==================== */
.error-state {
  background: var(--error-bg);
  border: 1px solid var(--error);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin: var(--space-4) 0;
}

.error-title {
  color: var(--error);
  font-weight: 600;
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.error-message {
  color: var(--text-secondary);
  font-size: var(--font-sm);
  line-height: 1.6;
}

/* ==================== FORMS & MODALS ==================== */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
  font-size: var(--font-sm);
  margin-bottom: var(--space-2);
}

.form-label-required::after {
  content: ' *';
  color: var(--error);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--font-sm);
  transition: var(--transition-base);
  font-family: inherit;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
  background: rgba(255, 255, 255, 0.08);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-helper {
  font-size: var(--font-xs);
  color: var(--text-muted);
  margin-top: var(--space-2);
}

.form-error {
  font-size: var(--font-xs);
  color: var(--error);
  margin-top: var(--space-2);
}

.form-success {
  font-size: var(--font-xs);
  color: var(--success);
  margin-top: var(--space-2);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 10, 20, 0.75);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: var(--space-4);
  animation: fadeIn 0.2s ease-in;
}

.modal {
  background: linear-gradient(180deg, rgba(18, 28, 52, 0.98) 0%, rgba(14, 22, 42, 0.98) 100%);
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: var(--radius-xl);
  box-shadow: 0 12px 36px rgba(0,0,0,0.45), 0 0 24px rgba(99, 102, 241, 0.16);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  padding: var(--space-6);
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
  background: rgba(99, 102, 241, 0.05);
}

.modal-title {
  color: #e0e7ff;
  font-size: var(--font-2xl);
  font-weight: 700;
  margin: 0;
}

.modal-body {
  padding: var(--space-6);
  color: #cbd5ff;
}

.modal-body input,
.modal-body select,
.modal-body textarea {
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(99, 102, 241, 0.28) !important;
  color: #e6ecff !important;
}

.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
  outline: none;
  border-color: rgba(129, 140, 248, 0.65) !important;
  box-shadow: 0 0 0 2px rgba(99,102,241,0.18);
}

.modal-footer {
  padding: var(--space-6);
  border-top: 1px solid rgba(99, 102, 241, 0.2);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  background: rgba(99, 102, 241, 0.04);
}

/* Multi Select Picker */
.gp-ms-native {
  display: none !important;
}

.gp-ms-control {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gp-ms-trigger {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.28);
  background: rgba(30, 41, 59, 0.8);
  color: #e0e7ff;
  font-size: 0.9em;
  cursor: pointer;
}

.gp-ms-trigger:hover {
  border-color: rgba(129, 140, 248, 0.55);
}

.gp-ms-trigger.is-empty {
  color: #94a3b8;
}

.gp-ms-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gp-ms-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(129, 140, 248, 0.3);
  color: #c7d2fe;
  font-size: 0.76em;
  max-width: 100%;
}

.gp-ms-chip.muted {
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
}

.gp-ms-overlay {
  position: fixed;
  inset: 0;
  z-index: 4100;
  background: rgba(2, 6, 23, 0.74);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.gp-ms-modal {
  width: min(620px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: linear-gradient(180deg, rgba(18, 28, 52, 0.98) 0%, rgba(14, 22, 42, 0.98) 100%);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.gp-ms-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.gp-ms-title {
  margin: 0;
  font-size: 1.02rem;
  color: #e0e7ff;
  font-weight: 700;
}

.gp-ms-close {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
}

.gp-ms-toolbar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
}

.gp-ms-search {
  flex: 1;
  min-width: 150px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.28);
  background: rgba(15, 23, 42, 0.8);
  color: #e2e8f0;
}

.gp-ms-ghost {
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.28);
  background: rgba(30, 41, 59, 0.6);
  color: #c7d2fe;
  font-size: 0.82em;
  cursor: pointer;
}

.gp-ms-list {
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 120px;
}

.gp-ms-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.16);
  background: rgba(15, 23, 42, 0.42);
  cursor: pointer;
}

.gp-ms-item:hover {
  border-color: rgba(129, 140, 248, 0.45);
  background: rgba(30, 41, 59, 0.58);
}

.gp-ms-item input[type="checkbox"] {
  margin-top: 2px;
}

.gp-ms-item-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.gp-ms-item-label {
  color: #e2e8f0;
  font-size: 0.9em;
  word-break: break-word;
}

.gp-ms-item-group {
  color: #94a3b8;
  font-size: 0.78em;
}

.gp-ms-empty {
  color: #94a3b8;
  font-size: 0.86em;
  padding: 16px 10px;
}

.gp-ms-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid rgba(99, 102, 241, 0.2);
}

.gp-ms-count {
  color: #cbd5e1;
  font-size: 0.84em;
}

.gp-ms-actions {
  display: flex;
  gap: 8px;
}

@media (max-width: 768px) {
  .gp-ms-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .gp-ms-modal {
    width: 100%;
    max-height: 88vh;
    border-radius: 16px 16px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
  }

  .gp-ms-toolbar {
    flex-wrap: wrap;
  }

  .gp-ms-search {
    min-width: 100%;
  }

  .gp-ms-ghost {
    flex: 1;
  }

  .gp-ms-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ==================== HELP CENTER ==================== */
.help-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

.help-card {
  cursor: pointer;
  border: 2px solid var(--border-default);
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.help-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  transform: scaleX(0);
  transition: var(--transition-base);
}

.help-card:hover {
  border-color: var(--gold);
  transform: translateY(-6px);
  box-shadow: var(--shadow-gold-lg);
}

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

.help-card h3 {
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.help-card p {
  color: var(--text-secondary);
  font-size: var(--font-sm);
  line-height: 1.6;
}

.help-content {
  margin-top: var(--space-6);
}

.help-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.help-step {
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
}

.step-number {
  min-width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--font-xl);
  flex-shrink: 0;
  box-shadow: var(--shadow-gold-md);
}

.step-content h4 {
  color: var(--gold);
  margin-bottom: var(--space-2);
  font-weight: 600;
  font-size: var(--font-lg);
}

.step-content p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.help-section {
  margin-bottom: var(--space-8);
}

.help-section h4 {
  color: var(--gold);
  margin-bottom: var(--space-3);
  font-weight: 600;
  font-size: var(--font-lg);
}

.help-section p {
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
  line-height: 1.7;
}

.help-section ul,
.help-section ol {
  color: var(--text-secondary);
  margin-left: var(--space-6);
  margin-bottom: var(--space-4);
}

.help-section li {
  margin-bottom: var(--space-3);
  line-height: 1.6;
}

.help-section code {
  background: rgba(255, 215, 0, 0.1);
  color: var(--gold);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
  border: 1px solid var(--border-default);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
  .portal-layout {
    grid-template-columns: 1fr;
  }

  .content-area {
    padding: var(--space-6);
  }
}

@media (max-width: 1024px) {
  .portal-layout {
    grid-template-columns: 1fr;
  }

  .nav-item {
    padding: var(--space-3) var(--space-4);
    font-size: var(--font-sm);
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 768px) {
  .top-nav {
    padding: var(--space-3) var(--space-4);
  }

  .nav-brand h1 {
    font-size: var(--font-xl);
  }

  .mobile-menu-btn {
    display: block;
  }

  .portal-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .content-area {
    padding: var(--space-5);
  }

  .section-header {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
  }

  .section-header h2 {
    font-size: var(--font-2xl);
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .help-categories {
    grid-template-columns: 1fr;
  }

  .wallet-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .wallet-actions {
    width: 100%;
  }

  .wallet-actions button {
    flex: 1;
  }

  .proposal-header,
  .mission-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-header {
    flex-direction: column;
    align-items: stretch;
  }

  .card-header button {
    width: 100%;
  }

  .help-step {
    gap: var(--space-4);
  }

  .step-number {
    min-width: 48px;
    height: 48px;
    font-size: var(--font-lg);
  }

  .modal {
    margin: var(--space-4);
  }
}

@media (max-width: 480px) {
  .nav-user {
    gap: var(--space-2);
  }

  .nav-username {
    display: none;
  }

  .nav-avatar {
    width: 36px;
    height: 36px;
  }

  .content-area {
    padding: var(--space-4);
  }

  .card {
    padding: var(--space-5);
  }

  .section-header h2 {
    font-size: var(--font-xl);
  }

  .btn-primary,
  .btn-secondary,
  .btn-danger,
  .btn-success {
    padding: var(--space-3) var(--space-5);
    font-size: var(--font-sm);
  }

  .stat-value {
    font-size: var(--font-2xl);
  }

  .stat-icon {
    font-size: 2.5rem;
  }
}

/* ==================== LANDING PAGE MOBILE ==================== */
@media (max-width: 768px) {
  .marketing-hero {
    padding: 40px 20px 32px;
    border-radius: 16px;
  }

  .marketing-hero h1 {
    font-size: 2rem;
  }

  .marketing-hero .hero-sub {
    font-size: 1rem;
    margin-bottom: 24px;
  }

  .marketing-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 40px;
    padding: 0 8px;
  }

  .marketing-cta button {
    width: 100% !important;
    justify-content: center;
  }

  .hero-proof-strip {
    gap: 6px;
    margin-bottom: 14px;
  }

  .hero-proof-strip span {
    font-size: 0.72rem;
    padding: 4px 8px;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
    max-width: 100%;
    gap: 8px;
    margin-bottom: 16px;
  }

  .marketing-features {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 16px 48px;
  }

  .marketing-feature-card {
    padding: 20px 14px;
  }

  .marketing-feature-card .feature-icon {
    font-size: 1.6rem;
  }

  .marketing-feature-card h3 {
    font-size: 0.9rem;
  }

  .marketing-feature-card p {
    font-size: 0.8rem;
    line-height: 1.5;
  }
}

@media (max-width: 380px) {
  .marketing-features {
    grid-template-columns: 1fr;
  }

  .marketing-hero h1 {
    font-size: 1.7rem;
  }
}

/* ==================== RESPONSIVE GRID HELPERS ==================== */
/* Used throughout admin/settings panels to replace inline grid styles */
.admin-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.admin-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-3);
}
.admin-grid-2-sm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 768px) {
  .admin-grid-2,
  .admin-grid-2-sm,
  .admin-grid-3 {
    grid-template-columns: 1fr !important;
  }
}

/* ==================== ADMIN / SUPERADMIN MOBILE ==================== */
/*
 * Collapse all 2-col and 3-col inline grids inside admin/settings panels.
 * CSS attribute selectors match inline style substrings — covers all the
 * dynamically-rendered form rows without touching portal.js.
 */
@media (max-width: 768px) {
  /* 2-column form grids → single column */
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .input-sm {
    width: 100% !important;
    max-width: 100% !important;
  }

  .card-header-row {
    flex-wrap: wrap;
  }

  .heist-ladder-header {
    display: none;
  }

  #section-admin [style*="grid-template-columns:1fr 1fr"],
  #section-admin [style*="grid-template-columns: 1fr 1fr"],
  .settings-tab-pane [style*="grid-template-columns:1fr 1fr"],
  .settings-tab-pane [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* 3-column form grids → single column */
  #section-admin [style*="grid-template-columns:1fr 1fr 1fr"],
  #section-admin [style*="grid-template-columns: 1fr 1fr 1fr"],
  .settings-tab-pane [style*="grid-template-columns:1fr 1fr 1fr"],
  .settings-tab-pane [style*="grid-template-columns: 1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* govGridRow variant */
  #section-admin [style*="grid-template-columns:1fr 1fr;gap:var(--space-4)"] {
    grid-template-columns: 1fr !important;
  }

  /* Flex rows with space-between that overflow on mobile → wrap */
  #section-admin .card-header,
  #section-admin [style*="justify-content:space-between"],
  .settings-tab-pane [style*="justify-content:space-between"] {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  /* Search inputs — full width */
  #section-admin input[type="text"],
  #section-admin input[type="number"],
  #section-admin input[type="email"],
  #section-admin select,
  .settings-tab-pane input[type="text"],
  .settings-tab-pane input[type="number"],
  .settings-tab-pane select {
    width: 100% !important;
    box-sizing: border-box;
  }

  /* Admin stats grid: 2-col on mobile */
  #adminStatsContent {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Admin users search row: stack */
  #adminUsersCard .card-header {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  #adminUsersCard .card-header input {
    width: 100% !important;
  }

  /* Data tables: scroll horizontally */
  #section-admin .data-table-wrap,
  #section-admin table,
  .settings-tab-pane table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Roles card form rows */
  #adminRolesContent [style*="grid-template-columns"],
  #adminVotingPowerContent [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* NFT tracker form grids */
  #adminNftTrackerContent [style*="grid-template-columns:1fr 1fr"],
  #adminNftTrackerContent [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Battle settings */
  #adminBattleContent [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* Activity feed */
  #adminActivityContent [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* Button rows: full-width stacked in settings tab panes */
  .settings-tab-pane [style*="justify-content:flex-end"] {
    justify-content: stretch !important;
    flex-direction: column !important;
  }
  .settings-tab-pane [style*="justify-content:flex-end"] button {
    width: 100% !important;
  }

  /* Content area padding tighter in admin */
  #section-admin .card {
    padding: var(--space-4) !important;
  }
}

@media (max-width: 480px) {
  /* Stats grid: 1-col on tiny screens */
  #adminStatsContent {
    grid-template-columns: 1fr !important;
  }

  /* Tabs: smaller, scroll horizontally */
  #section-admin .settings-tabs,
  .settings-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  #section-admin .settings-tab,
  .settings-tab {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 7px 10px;
    font-size: 0.78em;
  }
}


@media (max-width: 768px) {
  /* Settings tabs: shrink padding, allow wrapping */
  .settings-tabs {
    gap: 2px;
  }
  .settings-tab {
    padding: 8px 12px;
    font-size: 0.8em;
  }

  /* Card padding tighter in admin panels */
  #adminSuperadminContent .card,
  #adminSuperadminContent [style*="padding:14px"] {
    padding: 12px !important;
  }

  /* Superadmin add-admin input row: stack input + button */
  #superadminSection-superadminsInput {
    grid-template-columns: 1fr !important;
  }

  /* Chain emoji map: 2 columns instead of 4+ */
  #superadminSection-chainEmojis [style*="repeat(auto-fit,minmax(220px"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Micro-verify TTL/poll row: stack vertically */
  #superadminSection-microVerify [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Tenant search row: stack all 3 controls */
  #superadminSection-tenants [style*="minmax(240px,0.45fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* Tenant list header row: hide Plan/Status/Modules columns, show Name only */
  #superadminSection-tenants [style*="minmax(0,1.6fr) repeat(3"] {
    grid-template-columns: 1fr auto !important;
  }
  #superadminSection-tenants [style*="minmax(0,1.6fr) repeat(3"] > *:nth-child(n+3) {
    display: none !important;
  }

  /* Tenant row items */
  #superadminSection-tenants button[style*="grid-template-columns:minmax(0,1.6fr)"] {
    grid-template-columns: 1fr auto !important;
  }
  #superadminSection-tenants button[style*="grid-template-columns:minmax(0,1.6fr)"] > *:nth-child(n+3) {
    display: none !important;
  }

  /* Tenant detail: overview 2-col → 1-col */
  #tenantDetail-overview {
    grid-template-columns: 1fr !important;
  }
  #tenantDetail-controls {
    grid-template-columns: 1fr !important;
  }

  /* Era table: 4-col → compact 2-col */
  #superadminSection-eras [style*="minmax(0,1.2fr) minmax(0,1fr) minmax(0,1fr) auto"] {
    grid-template-columns: 1fr auto !important;
  }
  #superadminSection-eras [style*="minmax(0,1.2fr) minmax(0,1fr) minmax(0,1fr) auto"] > *:nth-child(2),
  #superadminSection-eras [style*="minmax(0,1.2fr) minmax(0,1fr) minmax(0,1fr) auto"] > *:nth-child(3) {
    display: none !important;
  }

  /* Replay TX row: stack */
  #superadminSection-chainEmojis [style*="grid-template-columns:minmax(0,1fr) auto"] {
    grid-template-columns: 1fr !important;
  }
  #superadminSection-chainEmojis [style*="grid-template-columns:minmax(0,1fr) auto"] > button {
    width: 100%;
  }

  /* Action button rows: wrap */
  #adminSuperadminContent [style*="display:flex"][style*="justify-content:space-between"] {
    flex-wrap: wrap;
    gap: 8px !important;
  }

  /* Pagination row */
  #adminSuperadminContent [style*="justify-content:space-between"][style*="align-items:center"] {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  /* Save/Reset button rows: full width on mobile */
  #superadminSection-microVerify [style*="justify-content:flex-end"],
  #superadminSection-chainEmojis [style*="justify-content:flex-end"],
  #superadminSection-tenants [style*="justify-content:flex-end"] {
    justify-content: stretch !important;
    flex-direction: column !important;
  }
  #superadminSection-microVerify [style*="justify-content:flex-end"] button,
  #superadminSection-chainEmojis [style*="justify-content:flex-end"] button,
  #superadminSection-tenants [style*="justify-content:flex-end"] button {
    width: 100% !important;
  }
}

/* ==================== ACCESSIBILITY ==================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

*:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ==================== Quick Actions Grid (General Hub) ==================== */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.quick-action-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 16px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.18);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  color: #e0e7ff;
  font-weight: 500;
  font-family: inherit;
  font-size: inherit;
}

.quick-action-tile:hover {
  background: rgba(99,102,241,0.18);
  border-color: rgba(99,102,241,0.4);
  transform: translateY(-2px);
}

.qa-icon { font-size: 2em; }
.qa-label { font-size: 0.88em; }

/* ==================== Module Hub ==================== */
.breadcrumb-container {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  border: 1px solid rgba(248, 182, 76, 0.22);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  background: linear-gradient(130deg, rgba(248, 182, 76, 0.12), rgba(20, 184, 166, 0.08));
  width: fit-content;
  box-shadow: 0 8px 18px rgba(3, 8, 18, 0.3);
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-sm);
  color: var(--text-secondary);
}

.breadcrumb-item:not(.active) {
  cursor: pointer;
}

.breadcrumb-item:not(.active):hover {
  color: var(--gold-light);
}

.breadcrumb-item:not(.active)::after {
  content: '>';
  color: var(--text-muted);
  margin-left: var(--space-2);
}

.breadcrumb-item.active {
  color: #fff3da;
  font-weight: 700;
}

#section-module-hub {
  position: relative;
  padding: var(--space-2);
}

#section-module-hub::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 20px;
  background:
    radial-gradient(520px 220px at 6% -4%, rgba(248, 182, 76, 0.16), transparent 70%),
    radial-gradient(540px 240px at 100% 0%, rgba(20, 184, 166, 0.15), transparent 72%);
  opacity: 0.95;
}

.module-hub-server__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.module-hub-server {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-radius: 18px;
  border: 1px solid rgba(248, 182, 76, 0.24);
  background: linear-gradient(140deg, rgba(18, 29, 45, 0.78), rgba(13, 24, 38, 0.82));
  box-shadow: 0 16px 34px rgba(4, 9, 19, 0.35);
}

.module-hub-server__icon {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  border: 1px solid rgba(248, 182, 76, 0.28);
  box-shadow: 0 10px 20px rgba(4, 9, 19, 0.45);
}

.module-hub-server__icon--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, rgba(248, 182, 76, 0.3), rgba(20, 184, 166, 0.35));
  color: #e0e7ff;
  font-weight: 900;
  font-size: 1.15rem;
}

.module-hub-server__name {
  font-size: clamp(1.35rem, 1vw + 1rem, 1.7rem);
  font-weight: 800;
  color: #fff3da;
  letter-spacing: -0.02em;
  text-shadow: 0 0 16px rgba(248, 182, 76, 0.2);
}

.module-hub-server__id {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-secondary);
  font-size: var(--font-sm);
}

.module-hub-server__copy {
  background: rgba(248, 182, 76, 0.14);
  border: 1px solid rgba(248, 182, 76, 0.35);
  color: #ffdcae;
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.module-hub-server__copy:hover {
  background: rgba(248, 182, 76, 0.25);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 18px;
  position: relative;
  z-index: 1;
  align-items: stretch;
}

.module-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 16px;
  border-radius: 18px;
  border: 1px solid rgba(248, 182, 76, 0.22);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    radial-gradient(100% 120% at 0% 0%, rgba(248, 182, 76, 0.14), rgba(248, 182, 76, 0));
  box-shadow: 0 14px 30px rgba(4, 9, 19, 0.35);
  backdrop-filter: blur(10px);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  min-height: 228px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.module-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 44%);
  opacity: 0.45;
}

.module-tile:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(248, 182, 76, 0.45);
  box-shadow: 0 18px 36px rgba(4, 9, 19, 0.45), 0 0 0 1px rgba(248, 182, 76, 0.16) inset;
}

.module-tile--disabled {
  opacity: 0.64;
  filter: saturate(0.55);
}

.module-tile--admin {
  border-color: rgba(20, 184, 166, 0.36);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01)),
    radial-gradient(100% 120% at 0% 0%, rgba(20, 184, 166, 0.18), rgba(20, 184, 166, 0));
}

.module-tile__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.module-tile__icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: linear-gradient(150deg, rgba(248, 182, 76, 0.25), rgba(248, 182, 76, 0.08));
  border: 1px solid rgba(248, 182, 76, 0.28);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18);
}

.module-tile__status {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.status-disabled {
  background: rgba(156, 163, 175, 0.16);
  border: 1px solid rgba(156, 163, 175, 0.3);
  color: #c5c9d1;
}

.status-admin {
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #9fe8ff;
}

.module-tile__body {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.module-tile__title {
  color: #fff3da;
  font-size: 1.03rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.module-tile__desc {
  color: #b8c6d7;
  font-size: 0.83rem;
  line-height: 1.55;
}

.module-tile__footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(248, 182, 76, 0.14);
  padding-top: 10px;
  color: #93a8c0;
}

.module-grid .module-tile {
  animation: tileReveal 0.45s ease both;
}

.module-grid .module-tile:nth-child(2) { animation-delay: 0.03s; }
.module-grid .module-tile:nth-child(3) { animation-delay: 0.06s; }
.module-grid .module-tile:nth-child(4) { animation-delay: 0.09s; }
.module-grid .module-tile:nth-child(5) { animation-delay: 0.12s; }
.module-grid .module-tile:nth-child(6) { animation-delay: 0.15s; }
.module-grid .module-tile:nth-child(7) { animation-delay: 0.18s; }
.module-grid .module-tile:nth-child(8) { animation-delay: 0.21s; }

/* ==================== Shared Workspace Primitives ==================== */
.gp-workspace-stack {
  display: grid;
  gap: 16px;
}

.gp-workspace-card {
  padding: 18px 18px 16px;
  border-radius: 18px;
  border: 1px solid rgba(248, 182, 76, 0.22);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    radial-gradient(100% 120% at 0% 0%, rgba(248, 182, 76, 0.12), rgba(248, 182, 76, 0));
  box-shadow: 0 14px 30px rgba(4, 9, 19, 0.35);
  backdrop-filter: blur(10px);
}

.gp-context-card {
  padding: 14px 16px;
  border: 1px solid rgba(248, 182, 76, 0.26);
  border-radius: 14px;
  background: linear-gradient(140deg, rgba(248, 182, 76, 0.12), rgba(13, 24, 38, 0.72));
  box-shadow: 0 14px 30px rgba(4, 9, 19, 0.34);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.gp-subtle-panel {
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 10px;
  overflow: hidden;
}

.gp-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.gp-section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
}

/* ==================== Unified Module Surface ==================== */
.content-section .card {
  border-radius: 18px;
  border: 1px solid rgba(248, 182, 76, 0.22);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    radial-gradient(100% 120% at 0% 0%, rgba(248, 182, 76, 0.12), rgba(248, 182, 76, 0));
  box-shadow: 0 14px 30px rgba(4, 9, 19, 0.35);
  backdrop-filter: blur(10px);
}

.app-surface .card,
.app-surface .module-tile,
.app-surface .dashboard-tile,
.app-surface .sa-card,
.app-surface .gp-workspace-card {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.app-surface .card:hover,
.app-surface .dashboard-tile:hover,
.app-surface .gp-workspace-card:hover,
.app-surface .sa-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(4, 9, 19, 0.42);
}

.content-section .card .card-header {
  border-bottom: 1px solid rgba(248, 182, 76, 0.14);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.content-section .settings-grid {
  display: grid;
  gap: 10px;
}

.content-section .settings-row {
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 10px;
  background: rgba(10, 16, 30, 0.42);
  padding: 10px 12px;
}

.content-section .settings-row input[type="text"],
.content-section .settings-row input[type="number"],
.content-section .settings-row .input-sm,
.content-section .settings-row select,
.content-section .form-input,
.content-section textarea.form-input {
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid rgba(99, 102, 241, 0.24);
  border-radius: 8px;
  color: #e0e7ff;
}

.content-section .settings-row input[type="text"]:focus,
.content-section .settings-row input[type="number"]:focus,
.content-section .settings-row .input-sm:focus,
.content-section .settings-row select:focus,
.content-section .form-input:focus,
.content-section textarea.form-input:focus {
  border-color: rgba(248, 182, 76, 0.45);
  box-shadow: 0 0 0 2px rgba(248, 182, 76, 0.14);
}

.content-section table {
  border-collapse: collapse;
}

.content-section table th {
  color: #c9d6ff;
  border-bottom: 1px solid rgba(99, 102, 241, 0.25);
}

.content-section table td {
  color: #e2e8f0;
  border-bottom: 1px solid rgba(99, 102, 241, 0.12);
}

/* ==================== Superadmin ==================== */
.sa-shell {
  display: grid;
  gap: 16px;
}

.sa-context-card {
  padding: 14px 16px;
  border: 1px solid rgba(248, 182, 76, 0.26);
  border-radius: 14px;
  background: linear-gradient(140deg, rgba(248, 182, 76, 0.12), rgba(13, 24, 38, 0.72));
  box-shadow: 0 14px 30px rgba(4, 9, 19, 0.34);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sa-card {
  padding: 18px 18px 16px;
  border-radius: 18px;
  border: 1px solid rgba(248, 182, 76, 0.22);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    radial-gradient(100% 120% at 0% 0%, rgba(248, 182, 76, 0.12), rgba(248, 182, 76, 0));
  box-shadow: 0 14px 30px rgba(4, 9, 19, 0.35);
  backdrop-filter: blur(10px);
}

.sa-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid rgba(99,102,241,0.15);
  flex-wrap: wrap;
}

.sa-subtabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid rgba(99,102,241,0.15);
  flex-wrap: wrap;
}

.sa-ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.sa-ops-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.sa-ops-tile {
  text-align: left;
  border: 1px solid rgba(248, 182, 76, 0.24);
  border-radius: 14px;
  padding: 12px 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  color: #dbe7f5;
  cursor: pointer;
  transition: var(--transition-base);
  display: grid;
  gap: 4px;
}

.sa-ops-tile strong {
  color: #fff3da;
  font-size: 0.92rem;
}

.sa-ops-tile span {
  color: #9db2c8;
  font-size: 0.78rem;
}

.sa-ops-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(248, 182, 76, 0.45);
  box-shadow: 0 10px 18px rgba(4, 9, 19, 0.3);
}

.sa-ops-tile.active {
  border-color: rgba(248, 182, 76, 0.5);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    radial-gradient(100% 120% at 0% 0%, rgba(248, 182, 76, 0.16), rgba(248, 182, 76, 0));
}

.sa-ops-grid--compact .sa-ops-tile {
  padding: 10px 12px;
}

.sa-ops-grid--compact .sa-ops-tile strong {
  font-size: 0.84rem;
}

.sa-ops-grid--compact .sa-ops-tile span {
  font-size: 0.72rem;
}

.sa-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.sa-menu-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.sa-menu-card {
  min-height: 214px;
  text-align: left;
}

.sa-menu-grid--compact .sa-menu-card {
  min-height: 158px;
}

.sa-menu-card.active {
  border-color: rgba(248, 182, 76, 0.52);
  box-shadow: 0 18px 36px rgba(4, 9, 19, 0.45), 0 0 0 1px rgba(248, 182, 76, 0.16) inset;
}

#adminSuperadminCard.superadmin-workspace-mode {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

#adminSuperadminCard.superadmin-workspace-mode > .card-header {
  display: none;
}

#adminSuperadminCard.superadmin-workspace-mode > #adminSuperadminContent {
  margin-top: 0 !important;
}

@keyframes tileReveal {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.module-detail {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  background: rgba(255, 255, 255, 0.03);
}

.monitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-3);
}

.monitor-stat {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  background: rgba(255, 255, 255, 0.03);
}

.monitor-stat__label {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.monitor-stat__value {
  margin-top: var(--space-2);
  font-size: 1.6rem;
  font-weight: 700;
  color: #e0e7ff;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.55);
  animation: pulse 1.4s ease-in-out infinite;
}

@media (max-width: 768px) {
  .breadcrumb-container {
    width: 100%;
    border-radius: 14px;
  }

  .module-hub-server {
    align-items: flex-start;
    padding: 12px;
  }

  .module-hub-server__id {
    flex-wrap: wrap;
  }

  .module-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .module-tile {
    min-height: 185px;
  }

  .sa-tabs,
  .sa-subtabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .sa-ops-grid {
    grid-template-columns: 1fr;
  }

  .sa-menu-grid,
  .sa-menu-grid--compact {
    grid-template-columns: 1fr;
  }

  .gp-actions-row {
    justify-content: stretch;
    flex-direction: column;
  }

  .gp-actions-row button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .module-grid .module-tile {
    animation: none;
  }
}

/* ==================== Data Tables & Badges ==================== */
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(99,102,241,0.25);
  color: #a5b4fc;
  font-size: 0.75em;
  font-weight: 600;
  margin-left: 6px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88em;
}

.data-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-secondary);
  font-weight: 500;
  border-bottom: 1px solid rgba(99,102,241,0.12);
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table td {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(99,102,241,0.07);
  color: #e0e7ff;
  vertical-align: middle;
}

.data-table tr:hover td {
  background: rgba(99,102,241,0.05);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.78em;
  font-weight: 500;
}

.badge-active { background: rgba(74,222,128,0.15); color: #4ade80; }
.badge-paused { background: rgba(251,191,36,0.15); color: #fbbf24; }
.badge-module { background: rgba(99,102,241,0.15); color: #a5b4fc; }

.addr-cell {
  font-family: monospace;
  font-size: 0.85em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.copy-btn {
  background: none;
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 4px;
  color: var(--text-secondary);
  padding: 1px 5px;
  cursor: pointer;
  font-size: 0.8em;
}
.copy-btn:hover { border-color: rgba(99,102,241,0.5); color: #a5b4fc; }

.treasury-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.treasury-header-actions {
  display: flex;
  gap: 8px;
}

.treasury-empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}

.treasury-empty-state p {
  margin-bottom: 16px;
  font-size: 0.95em;
}

.treasury-wallet-actions button {
  background: none;
  border: 1px solid rgba(99,102,241,0.18);
  border-radius: 6px;
  color: var(--text-secondary);
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.82em;
  transition: border-color 0.15s, color 0.15s;
}
.treasury-wallet-actions button:hover { border-color: rgba(99,102,241,0.5); color: #a5b4fc; }

.tx-type-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* ==================== Settings Tabs ==================== */
.settings-tabs {
  display: flex;
  gap: 6px;
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
  padding: 6px;
  flex-wrap: wrap;
}

.settings-tab {
  padding: 10px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 600;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.settings-tab:hover { color: #e0e7ff; border-color: rgba(99,102,241,0.28); }
.settings-tab.active {
  color: #e0e7ff;
  border-color: rgba(248, 182, 76, 0.45);
  background: linear-gradient(145deg, rgba(248, 182, 76, 0.2), rgba(248, 182, 76, 0.07));
}

/* ==================== Missions Admin Tabs ==================== */
#heistAdminPanel .heist-admin-tabs {
  margin-bottom: 12px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.55);
  padding: 4px;
  gap: 6px;
  border-bottom-width: 1px;
}

#heistAdminPanel .heist-admin-tabs .settings-tab {
  border-bottom: none;
  margin-bottom: 0;
  border-radius: 8px;
  padding: 8px 14px;
}

#heistAdminPanel .heist-admin-tabs .settings-tab.active {
  color: #c7d2fe;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.35), rgba(14, 165, 233, 0.2));
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.45);
  border-bottom-color: transparent;
}

#heistAdminPanel .heist-admin-tab-pane {
  padding-top: 2px;
}

#heistAdminPanel .heist-admin-block {
  margin-top: 14px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.28);
}

#heistAdminPanel .heist-admin-block:first-child {
  margin-top: 0;
}

#heistAdminPanel .heist-admin-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

#heistAdminPanel .heist-admin-block h4 {
  margin-top: 0;
}

@media (max-width: 860px) {
  #heistAdminPanel .heist-admin-tabs .settings-tab {
    flex: 1 1 calc(50% - 6px);
    text-align: center;
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Plans ── */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 960px;
  align-items: start;
}

.plan-card {
  border: 1px solid rgba(99,102,241,0.18);
  border-radius: 18px;
  padding: 28px 24px;
  background: rgba(15,23,42,0.7);
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.plan-card:hover {
  border-color: var(--plan-accent, rgba(99,102,241,0.5));
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.plan-card.popular {
  border-color: rgba(99,102,241,0.55);
  background: linear-gradient(160deg, rgba(99,102,241,0.09) 0%, rgba(15,23,42,0.85) 100%);
  box-shadow: 0 0 0 1px rgba(99,102,241,0.3), 0 8px 32px rgba(99,102,241,0.12);
}

.plan-card.popular::before {
  content: "⭐ Most Popular";
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #4f46e5, #6366f1);
  color: #fff;
  font-size: 0.72em;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 10px rgba(99,102,241,0.4);
}

.plan-header { display: flex; flex-direction: column; gap: 6px; }
.plan-name { font-size: 1.25em; font-weight: 800; letter-spacing: -0.01em; }
.plan-tagline { font-size: 0.82em; color: var(--text-secondary); line-height: 1.5; min-height: 2.5em; }
.plan-price { display: flex; align-items: baseline; gap: 4px; margin-top: 8px; }
.plan-price-amount { font-size: 2.8em; font-weight: 900; color: #e0e7ff; letter-spacing: -0.03em; line-height: 1; }
.plan-price-period { font-size: 0.95em; font-weight: 500; color: var(--text-secondary); }
.plan-annual-note { font-size: 0.78em; color: #4ade80; font-weight: 600; margin-top: 2px; }

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  border-top: 1px solid rgba(99,102,241,0.12);
  padding-top: 16px;
}
.plan-features li {
  font-size: 0.875em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
}
.plan-cta { margin-top: 4px; }

@media (max-width: 768px) {
  .plans-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
  .plan-card.popular {
    order: -1; /* show popular first on mobile */
  }
}

.pricing-compare-callout {
  max-width: 960px;
  margin: 40px auto 0;
}
.pricing-compare-inner {
  border: 1px solid rgba(74,222,128,0.2);
  background: rgba(74,222,128,0.05);
  border-radius: 14px;
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pricing-compare-title {
  font-size: 1em;
  font-weight: 700;
  color: #4ade80;
}
.pricing-compare-body {
  font-size: 0.88em;
  color: var(--text-secondary);
  line-height: 1.7;
}
.pricing-compare-body strong {
  color: #e0e7ff;
}
@media (max-width: 768px) {
  .pricing-compare-inner {
    padding: 16px 18px;
  }
}

.toggle-switch { position: relative; display: inline-block; width: 42px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(99,102,241,0.2); border-radius: 24px; transition: 0.2s;
}
.toggle-slider:before {
  position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px;
  background: #6366f1; border-radius: 50%; transition: 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: rgba(99,102,241,0.4); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(18px); }

/* ==================== STAT MINI CARDS ==================== */
.stat-mini {
  padding: 14px 16px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.14);
  border-radius: 10px;
}
.stat-mini-label {
  font-size: 0.75em;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.stat-mini-value {
  font-size: 1.6em;
  font-weight: 700;
  color: #e0e7ff;
  line-height: 1.2;
}

/* ==================== VERIFICATION RULES UNIFIED TABLE ==================== */
.badge-collection { background: rgba(99,102,241,0.2); color: #a5b4fc; padding: 3px 10px; border-radius: 999px; font-size: 0.78em; font-weight: 600; white-space: nowrap; }
.badge-trait { background: rgba(168,85,247,0.2); color: #c084fc; padding: 3px 10px; border-radius: 999px; font-size: 0.78em; font-weight: 600; white-space: nowrap; }

.rule-type-option {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 10px;
  cursor: pointer;
  flex: 1;
  transition: border-color 0.15s, background 0.15s;
}
.rule-type-option:has(input:checked) {
  border-color: rgba(99,102,241,0.6);
  background: rgba(99,102,241,0.1);
}
.rule-type-option input { display: none; }
.rule-type-option span { font-weight: 600; color: #e0e7ff; }
.rule-type-option small { color: var(--text-secondary); font-size: 0.78em; }

.trait-values-container {
  min-height: 44px;
  padding: 6px 8px;
  background: rgba(30,41,59,0.8);
  border: 1px solid rgba(99,102,241,0.22);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  cursor: text;
}
.trait-value-tags { display: contents; }
.trait-value-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(99,102,241,0.2);
  border: 1px solid rgba(99,102,241,0.3);
  color: #a5b4fc;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.82em;
  font-weight: 500;
}
.trait-value-tag button {
  background: none; border: none; color: #a5b4fc; cursor: pointer;
  padding: 0 2px; font-size: 1em; line-height: 1;
}
.trait-value-input {
  border: none; background: none; outline: none;
  color: #e0e7ff; font-size: 0.9em; min-width: 120px; flex: 1;
  padding: 2px 4px;
}

/* === 2026-04 visual refresh overrides start === */
body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(1200px 700px at 90% -8%, rgba(20, 184, 166, 0.12), transparent 58%),
    radial-gradient(1000px 720px at -8% 0%, rgba(249, 115, 22, 0.16), transparent 56%),
    linear-gradient(150deg, #090f18 0%, #101a2a 46%, #162438 100%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(248, 182, 76, 0.05) 0.8px, transparent 0.8px);
  background-size: 26px 26px;
  opacity: 0.12;
  z-index: -1;
}

.top-nav {
  background: linear-gradient(180deg, rgba(12, 20, 33, 0.95) 0%, rgba(11, 19, 31, 0.85) 100%);
  border-bottom: 1px solid rgba(248, 182, 76, 0.3);
  box-shadow: 0 12px 30px rgba(3, 8, 18, 0.45);
}

.nav-brand h1,
.section-header h2,
.card h3 {
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
}

.nav-brand h1 {
  text-shadow: 0 0 22px rgba(248, 182, 76, 0.16);
}

.top-link {
  color: #d8e2ef;
  border-radius: 12px;
}

.top-link:hover {
  background: rgba(248, 182, 76, 0.13);
  border-color: rgba(248, 182, 76, 0.38);
}

.sidebar {
  background: linear-gradient(180deg, rgba(12, 20, 32, 0.92) 0%, rgba(10, 17, 28, 0.9) 100%);
  border-right: 1px solid rgba(248, 182, 76, 0.22);
}

.sidebar-section-divider {
  background: linear-gradient(90deg, rgba(248, 182, 76, 0), rgba(248, 182, 76, 0.24), rgba(248, 182, 76, 0));
}

.nav-item {
  border-radius: 0 12px 12px 0;
}

.nav-item::before {
  background: linear-gradient(90deg, rgba(248, 182, 76, 0.2), transparent 78%);
}

.nav-item:hover {
  color: #ffe7bf;
  border-left-color: var(--gold);
}

.nav-item.active {
  color: #fff3da;
  border-left-color: var(--gold-dark);
  background: rgba(248, 182, 76, 0.16);
}

.sidebar-server-card:hover {
  background: rgba(248, 182, 76, 0.12);
}

.sidebar-see-all {
  color: rgba(248, 182, 76, 0.88);
}

.sidebar-see-all:hover {
  color: #ffd39a;
  background: rgba(248, 182, 76, 0.12);
}

.content-area {
  max-width: 1480px;
}

.section-header {
  border-bottom: 1px solid rgba(248, 182, 76, 0.2);
}

.section-header h2 {
  letter-spacing: -0.03em;
  text-shadow: 0 0 14px rgba(248, 182, 76, 0.2);
}

.section-subtitle {
  color: #9bb0c6;
}

.card {
  background: linear-gradient(165deg, rgba(20, 30, 46, 0.8) 0%, rgba(17, 26, 40, 0.72) 100%);
  border: 1px solid rgba(248, 182, 76, 0.22);
  box-shadow: 0 10px 24px rgba(4, 9, 19, 0.36);
  border-radius: 16px;
}

.card:hover {
  border-color: rgba(248, 182, 76, 0.42);
  box-shadow: 0 16px 30px rgba(4, 9, 19, 0.45), 0 0 0 1px rgba(248, 182, 76, 0.12);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 10px 18px rgba(249, 115, 22, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  box-shadow: 0 12px 20px rgba(249, 115, 22, 0.36);
}

.btn-secondary {
  background: rgba(20, 184, 166, 0.1);
  color: #baf7f0;
  border: 1px solid rgba(20, 184, 166, 0.28);
}

.btn-secondary:hover {
  background: rgba(20, 184, 166, 0.17);
  border-color: rgba(20, 184, 166, 0.45);
  box-shadow: 0 8px 16px rgba(20, 184, 166, 0.18);
}

.marketing-hero {
  max-width: 980px;
  border-radius: 24px;
  border: 1px solid rgba(248, 182, 76, 0.3);
  background:
    radial-gradient(72% 120% at 5% 0%, rgba(249, 115, 22, 0.26) 0%, rgba(249, 115, 22, 0) 52%),
    radial-gradient(88% 125% at 100% 8%, rgba(20, 184, 166, 0.2) 0%, rgba(20, 184, 166, 0) 48%),
    linear-gradient(180deg, rgba(16, 26, 41, 0.94) 0%, rgba(13, 22, 35, 0.92) 100%);
  box-shadow: 0 24px 52px rgba(4, 8, 16, 0.52);
}

.marketing-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(248, 182, 76, 0.06), transparent 35%, rgba(20, 184, 166, 0.06));
}

.marketing-hero h1 {
  background: linear-gradient(128deg, #fff1d4 0%, #ffd18a 40%, #c5fff7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.marketing-hero .hero-sub {
  color: #d0deeb;
}

.hero-kicker {
  border: 1px solid rgba(248, 182, 76, 0.5);
  background: rgba(248, 182, 76, 0.16);
  color: #ffe4b8;
}

.hero-proof-strip span {
  background: rgba(17, 31, 47, 0.74);
  border: 1px solid rgba(20, 184, 166, 0.28);
  color: #c8f9f4;
}

.hero-proof-strip span::before {
  color: var(--accent-soft);
}

.hero-metric {
  border: 1px solid rgba(248, 182, 76, 0.3);
  background: rgba(16, 30, 47, 0.75);
}

.hero-metric-value {
  color: #fff1d4;
}

.hero-metric-label {
  color: #f7bf7a;
}

.marketing-feature-card {
  border: 1px solid rgba(248, 182, 76, 0.2);
  background: linear-gradient(180deg, rgba(17, 30, 45, 0.7), rgba(14, 24, 38, 0.75));
}

.marketing-feature-card:hover {
  border-color: rgba(248, 182, 76, 0.45);
  background: linear-gradient(180deg, rgba(33, 45, 63, 0.74), rgba(24, 34, 50, 0.82));
  box-shadow: 0 16px 32px rgba(4, 9, 19, 0.42);
}

.marketing-feature-card .feature-icon {
  filter: drop-shadow(0 6px 14px rgba(248, 182, 76, 0.28));
}

.form-input,
.form-textarea,
.form-select {
  background: rgba(15, 24, 38, 0.82);
  border: 1px solid rgba(248, 182, 76, 0.28);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: rgba(248, 182, 76, 0.62);
  box-shadow: 0 0 0 3px rgba(248, 182, 76, 0.14);
  background: rgba(18, 29, 45, 0.95);
}

.home-page {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.home-page .marketing-hero {
  height: 100%;
}

.home-page .marketing-cta {
  margin-bottom: 20px;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
  gap: 18px;
  align-items: stretch;
}

.home-value-panel {
  border: 1px solid rgba(248, 182, 76, 0.28);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(17, 30, 46, 0.92), rgba(13, 23, 36, 0.9));
  padding: 24px;
  box-shadow: 0 14px 28px rgba(3, 8, 18, 0.42);
}

.home-value-panel h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: #ffe7bf;
}

.home-value-panel p {
  margin: 0 0 14px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.home-value-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: #d6e3ef;
  font-size: 0.9rem;
}

.home-value-list li::marker {
  color: var(--gold-light);
}

.home-value-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.home-role-grid {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.home-role-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(13, 23, 36, 0.78);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.home-role-card h4 {
  margin: 0;
  color: #f5f9ff;
  font-size: 0.96rem;
}

.home-role-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.84rem;
  line-height: 1.45;
}

.home-role-card .btn-primary,
.home-role-card .btn-secondary {
  width: 100%;
  min-height: 36px;
  font-size: 0.82rem;
  padding: 8px 10px;
}

.home-role-hint {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.home-active-context {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(20, 184, 166, 0.32);
  background: rgba(20, 184, 166, 0.12);
  color: #d6fffa;
  font-size: 0.88rem;
}

.home-section-head {
  margin-top: 4px;
}

.home-section-head h2 {
  margin: 0;
  font-size: 1.35rem;
  color: #f5f9ff;
  letter-spacing: -0.02em;
}

.home-section-head p {
  margin: 5px 0 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.home-feature-grid {
  margin-top: 0;
  padding: 0;
  gap: 14px;
}

.home-feature-grid .marketing-feature-card {
  text-align: left;
  padding: 18px 18px 16px;
}

.home-feature-grid .marketing-feature-card .feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(248, 182, 76, 0.32);
  background: rgba(248, 182, 76, 0.14);
  color: #ffe1b4;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.home-flow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.home-flow-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(16, 26, 40, 0.62);
  padding: 18px;
}

.home-flow-step {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid rgba(20, 184, 166, 0.35);
  background: rgba(20, 184, 166, 0.14);
  color: #baf7f0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
}

.home-flow-card h3 {
  margin: 10px 0 8px;
  font-size: 1rem;
  color: #edf4ff;
}

.home-flow-card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.verify-launchpad {
  display: grid;
  gap: 14px;
}

.verify-launchpad-header h3 {
  margin: 0 0 4px 0;
  color: #f1f5ff;
  font-size: 1.2rem;
}

.verify-launchpad-header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.verify-launch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.verify-launch-card {
  border-radius: 14px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  background: linear-gradient(180deg, rgba(14, 25, 39, 0.84), rgba(9, 17, 30, 0.88));
  padding: 16px;
  display: grid;
  gap: 10px;
}

.verify-launch-card h4 {
  margin: 0;
  color: #eef4ff;
  font-size: 1rem;
}

.verify-launch-card p {
  margin: 0;
  color: #c6d4e4;
  font-size: 0.88rem;
  line-height: 1.5;
}

.verify-launch-card button {
  margin-top: 4px;
}

.verify-launch-icon {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(248, 182, 76, 0.32);
  background: rgba(248, 182, 76, 0.15);
  color: #ffdfae;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.verify-launch-note {
  border-radius: 10px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  background: rgba(20, 184, 166, 0.1);
  color: #cbfaf4;
  padding: 10px 12px;
  font-size: 0.85rem;
}

.verify-help-card h3 {
  margin-bottom: 12px;
}

.verify-help-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.verify-help-step {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 24, 38, 0.7);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.verify-help-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(248, 182, 76, 0.4);
  color: #ffe0b0;
  font-size: 0.78rem;
  font-weight: 700;
}

.verify-help-step p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.5;
}

@media (prefers-reduced-motion: no-preference) {
  .marketing-hero,
  .marketing-feature-card,
  .card,
  .btn-primary,
  .btn-secondary {
    will-change: transform, box-shadow;
  }

  .marketing-hero {
    animation: heroRise 520ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .marketing-feature-card {
    animation: cardFade 420ms ease both;
  }

  .marketing-feature-card:nth-child(2) { animation-delay: 40ms; }
  .marketing-feature-card:nth-child(3) { animation-delay: 80ms; }
  .marketing-feature-card:nth-child(4) { animation-delay: 120ms; }
  .marketing-feature-card:nth-child(5) { animation-delay: 160ms; }
  .marketing-feature-card:nth-child(6) { animation-delay: 200ms; }
}

@media (max-width: 980px) {
  .home-hero-grid {
    grid-template-columns: 1fr;
  }

  .home-flow-grid {
    grid-template-columns: 1fr;
  }

  .verify-launch-grid,
  .verify-help-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== BILLING PANEL ==================== */
.billing-plan-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.billing-plan-header__icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(99, 102, 241, 0.28);
}

.billing-plan-header__meta {
  min-width: 240px;
}

.billing-plan-header__name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #e0e7ff;
}

.billing-plan-header__badges {
  margin-top: 6px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.billing-plan-header__sub {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.billing-plan-header__actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.billing-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.45);
}

.billing-panel__title {
  font-weight: 700;
  color: #e0e7ff;
  margin-bottom: 10px;
  font-size: 1.02rem;
}

.billing-panel__facts {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.billing-panel__facts strong {
  color: #c9d6ff;
}

.billing-panel__warn {
  color: #fca5a5;
}

.billing-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) 120px 140px minmax(0, 1.8fr) 130px auto;
  gap: 10px;
  align-items: end;
}

.billing-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.billing-field--span2 {
  grid-column: span 2;
}

.billing-field > span {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.billing-field input,
.billing-field select {
  width: 100%;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.26);
  background: rgba(30, 41, 59, 0.82);
  color: #e0e7ff;
  padding: 8px 10px;
  box-sizing: border-box;
}

.billing-field input:focus,
.billing-field select:focus {
  outline: none;
  border-color: rgba(129, 140, 248, 0.75);
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.2);
}

.billing-submit-btn {
  min-height: 40px;
}

.billing-panel__hint {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

@media (max-width: 1100px) {
  .billing-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .billing-field--span2 {
    grid-column: span 2;
  }
  .billing-submit-btn {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .home-page {
    gap: 22px;
  }

  .home-value-panel {
    padding: 18px;
    border-radius: 16px;
  }

  .home-feature-grid {
    grid-template-columns: 1fr;
  }

  .home-feature-grid .marketing-feature-card {
    padding: 16px 16px 14px;
  }
}

@keyframes heroRise {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cardFade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
/* === 2026-04 visual refresh overrides end === */

/* === 2026-04 fresh layout v3 start === */
.home-page--fresh {
  gap: 20px;
}

.home-page--fresh .home-active-context {
  margin-top: 16px;
}

.home-quicklinks-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.home-quicklink-card {
  border: 1px solid rgba(248, 182, 76, 0.24);
  background: rgba(11, 21, 34, 0.78);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.home-quicklink-card h4 {
  margin: 0;
  color: #f8fafc;
  font-size: 0.95rem;
}

.home-quicklink-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.45;
}

.profile-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.profile-stat {
  border: 1px solid rgba(248, 182, 76, 0.2);
  border-radius: 10px;
  background: rgba(14, 23, 36, 0.78);
  padding: 12px;
  display: grid;
  gap: 4px;
}

.profile-stat span {
  color: var(--text-secondary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-stat strong {
  color: #f8fafc;
  font-size: 1.05rem;
}

.gpf-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
  gap: 16px;
}

.gpf-hero-main {
  border-radius: 24px;
  border: 1px solid rgba(248, 182, 76, 0.32);
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(249, 115, 22, 0.24), rgba(249, 115, 22, 0)),
    radial-gradient(100% 130% at 100% 0%, rgba(20, 184, 166, 0.2), rgba(20, 184, 166, 0)),
    linear-gradient(180deg, rgba(9, 17, 30, 0.94), rgba(7, 14, 25, 0.9));
  box-shadow: 0 20px 44px rgba(4, 9, 19, 0.5);
  padding: 30px;
}

.gpf-kicker {
  margin: 0;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(248, 182, 76, 0.45);
  background: rgba(248, 182, 76, 0.14);
  color: #ffe4b8;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0 14px;
}

.gpf-hero-main h1 {
  margin: 14px 0 10px;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.14;
  color: #f7fafc;
}

.gpf-subtitle {
  margin: 0;
  color: #c8d5e4;
  font-size: 1rem;
  line-height: 1.7;
  max-width: 70ch;
}

.gpf-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.gpf-proof-row {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gpf-proof-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.28);
  background: rgba(12, 22, 34, 0.76);
  color: #d6e4f2;
  font-size: 0.8rem;
  padding: 0 12px;
}

.gpf-role-panel {
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, rgba(12, 23, 38, 0.96), rgba(9, 17, 30, 0.93));
  padding: 22px;
}

.gpf-role-panel h3 {
  margin: 0 0 10px;
  color: #edf3ff;
  font-size: 1.15rem;
}

.gpf-role-list {
  display: grid;
  gap: 10px;
}

.gpf-role-item {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(9, 17, 30, 0.74);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.gpf-role-item h4 {
  margin: 0;
  font-size: 0.94rem;
  color: #f3f7ff;
}

.gpf-role-item p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.84rem;
  line-height: 1.5;
}

.gpf-role-item .btn-primary,
.gpf-role-item .btn-secondary {
  width: 100%;
  min-height: 36px;
  font-size: 0.82rem;
}

.gpf-role-hint {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.gpf-section {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(9, 17, 30, 0.56);
  padding: 20px;
}

.gpf-section-head h2 {
  margin: 0;
  font-size: 1.45rem;
  color: #edf4ff;
}

.gpf-section-head p {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 0.93rem;
}

.gpf-feature-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.gpf-feature-card {
  border-radius: 14px;
  border: 1px solid rgba(248, 182, 76, 0.22);
  background: linear-gradient(180deg, rgba(16, 28, 44, 0.74), rgba(12, 22, 35, 0.82));
  padding: 16px;
}

.gpf-feature-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(20, 184, 166, 0.34);
  background: rgba(20, 184, 166, 0.12);
  color: #c8f9f4;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0 10px;
}

.gpf-feature-card h3 {
  margin: 10px 0 6px;
  font-size: 1.02rem;
  color: #ecf3ff;
}

.gpf-feature-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.55;
}

.gpf-flow-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.gpf-flow-step {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(12, 23, 37, 0.72);
  padding: 16px;
}

.gpf-flow-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(248, 182, 76, 0.4);
  color: #ffdba4;
  font-size: 0.8rem;
  font-weight: 700;
}

.gpf-flow-step h3 {
  margin: 10px 0 6px;
  color: #edf4ff;
  font-size: 1rem;
}

.gpf-flow-step p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.55;
}

.gpf-verify-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
  gap: 14px;
}

.gpf-verify-main h3 {
  margin: 0;
  font-size: 1.22rem;
  color: #eef4ff;
}

.gpf-verify-main > p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

.gpf-verify-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.gpf-verify-note {
  margin-top: 12px;
  border-radius: 10px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  background: rgba(20, 184, 166, 0.1);
  color: #cbfaf4;
  font-size: 0.84rem;
  line-height: 1.5;
  padding: 10px 12px;
}

.gpf-verify-side {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(12, 22, 35, 0.64);
  padding: 14px;
}

.gpf-verify-side h4 {
  margin: 0 0 8px;
  color: #f0f6ff;
  font-size: 0.96rem;
}

.gpf-verify-side ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  display: grid;
  gap: 8px;
  font-size: 0.85rem;
  line-height: 1.45;
}

.gpf-verify-guide h3 {
  margin: 0 0 12px;
}

.gpf-verify-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.gpf-verify-steps article {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(12, 22, 35, 0.7);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.gpf-verify-steps span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(248, 182, 76, 0.4);
  color: #ffdfae;
  font-size: 0.78rem;
  font-weight: 700;
}

.gpf-verify-steps p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

@media (max-width: 1120px) {
  .gpf-hero,
  .gpf-verify-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .gpf-feature-grid,
  .gpf-flow-grid,
  .gpf-verify-steps {
    grid-template-columns: 1fr;
  }

  .gpf-hero-main,
  .gpf-role-panel,
  .gpf-section {
    padding: 16px;
    border-radius: 16px;
  }

  .gpf-hero-main h1 {
    font-size: 2rem;
  }
}
/* === 2026-04 fresh layout v3 end === */


/* Command Center UI */
.command-server-switcher {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.command-server-switcher > label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.command-server-switcher__row {
  display: flex;
  align-items: center;
  gap: 8px;
}
#serverSwitcherSelect {
  width: 220px;
  height: 36px;
  border: 1px solid rgba(248, 182, 76, 0.32);
  border-radius: 10px;
  background: rgba(11, 20, 34, 0.9);
  color: var(--text-primary);
  padding: 8px 10px;
}
.member-identity-tile {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  border: 1px solid rgba(248, 182, 76, 0.3);
  background: linear-gradient(145deg, rgba(18, 29, 47, 0.9), rgba(10, 19, 32, 0.92));
  padding: 8px 10px;
}
.member-identity-tile__content {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.member-identity-tile__kicker {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
}
.member-identity-tile__actions {
  display: inline-flex;
  gap: 6px;
}
.functional-hub {
  display: grid;
  gap: 20px;
}
.functional-hub__header {
  border: 1px solid rgba(248, 182, 76, 0.24);
  border-radius: 16px;
  padding: 18px;
  background: linear-gradient(150deg, rgba(17, 28, 44, 0.85), rgba(9, 17, 31, 0.85));
}
.functional-hub__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.functional-hub__tile {
  border: 1px solid rgba(248, 182, 76, 0.24);
  border-radius: 14px;
  padding: 16px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  display: grid;
  gap: 10px;
}
.quick-switch-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.72);
  backdrop-filter: blur(8px);
  z-index: 2200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
}
.quick-switch-panel {
  width: min(680px, calc(100vw - 32px));
  border-radius: 16px;
  border: 1px solid rgba(248, 182, 76, 0.3);
  background: linear-gradient(160deg, rgba(13, 23, 38, 0.96), rgba(9, 16, 30, 0.96));
  padding: 14px;
}
.quick-switch-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.quick-switch-input {
  width: 100%;
  height: 42px;
  border: 1px solid rgba(248, 182, 76, 0.32);
  border-radius: 10px;
  background: rgba(12, 21, 35, 0.92);
  color: var(--text-primary);
  padding: 10px 12px;
}
.quick-switch-results {
  margin-top: 10px;
  display: grid;
  gap: 6px;
  max-height: 360px;
  overflow: auto;
}
.quick-switch-item {
  width: 100%;
  border: 1px solid rgba(248, 182, 76, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  padding: 10px;
  text-align: left;
  cursor: pointer;
}
.quick-switch-item:hover {
  border-color: rgba(248, 182, 76, 0.38);
  background: rgba(248, 182, 76, 0.1);
}
.quick-switch-item.is-active {
  border-color: rgba(248, 182, 76, 0.58);
  background: rgba(248, 182, 76, 0.14);
}
.quick-switch-group {
  display: grid;
  gap: 6px;
}
.quick-switch-group__title {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 4px 2px;
}
.quick-switch-empty {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 10px 4px;
}
@media (max-width: 980px) {
  .command-server-switcher {
    display: none !important;
  }
  .member-identity-tile__actions {
    display: none;
  }
  .functional-hub__grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== BENTO BOX DASHBOARD GRID ==================== */
.dashboard-bento {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  grid-template-rows: auto auto auto;
  gap: var(--space-6);
  margin-top: var(--space-6);
  width: 100%;
}
#appHubGreeting {
  font-size: clamp(2rem, 4vw, 3rem);
  background: linear-gradient(135deg, #ffffff 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
  font-weight: 800;
  animation: fadeInDown 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

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

.bento-panel {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border: 1px solid rgba(248, 182, 76, 0.22);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.bento-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(248, 182, 76, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.bento-panel:hover {
  background: rgba(20, 30, 54, 0.7);
  border-color: rgba(248, 182, 76, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 15px rgba(248, 182, 76, 0.1);
}

.bento-panel:hover::before {
  opacity: 1;
}

.bento-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.bento-panel-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.bento-panel-title .bento-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(248, 182, 76, 0.2), rgba(248, 182, 76, 0.05));
  border: 1px solid rgba(248, 182, 76, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Specific Panel Layouts */
.panel-overview {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
}

.overview-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.overview-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.overview-metric-val {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.overview-metric-label {
  font-size: var(--font-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* Wallet Connectivity List */
.panel-wallets {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
}

.wallet-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: var(--space-4);
}

.wallet-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.wallet-list-item:hover {
  background: rgba(248, 182, 76, 0.08);
  border-color: rgba(248, 182, 76, 0.3);
  transform: translateX(4px);
}

.wallet-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wallet-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(248, 182, 76, 0.2);
  object-fit: cover;
}

.wallet-address {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.wallet-balance {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Module Grid */
.panel-modules-grid {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  background: transparent;
  border: none;
  padding: 0;
}

.module-bento-tile {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.module-bento-tile::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(248, 182, 76, 0.08), transparent 70%);
  opacity: 0.5;
  pointer-events: none;
}

.module-bento-tile:hover {
  background: rgba(22, 33, 58, 0.65);
  border-color: var(--gold);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 20px rgba(248, 182, 76, 0.15);
}

.module-bento-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.module-bento-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.module-bento-title {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.05rem;
}

.module-bento-status {
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

.module-bento-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  color: #86efac;
}

.module-bento-badge.inactive {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.module-bento-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--gold);
}

.module-bento-metric {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Governance Progress */
/* Privileged Panel (Superadmin) */
.panel-governance {
  grid-column: 1 / 3;
  border: 1px solid rgba(248, 182, 76, 0.4);
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.7), rgba(12, 18, 33, 0.85));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(248, 182, 76, 0.05);
}

.panel-governance::before {
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.6;
}

.panel-governance .bento-panel-title {
  color: var(--gold);
  text-shadow: 0 0 12px rgba(248, 182, 76, 0.3);
}

.gov-vote-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.gov-vote-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gov-vote-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.gov-vote-row span.yes { color: #86efac; font-weight: 600; }
.gov-vote-row span.no { color: #fca5a5; }

.gov-progress-track {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
}
.gov-progress-yes { background: #86efac; }
.gov-progress-no { background: #fca5a5; }
.gov-progress-abstain { background: rgba(255,255,255,0.3); }

/* Mission Progress */
.panel-mission {
  grid-column: 2 / 3;
  grid-row: 3 / 4;
}

.mission-stages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: var(--space-4);
}

.mission-stage-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

@media (max-width: 1024px) {
  .dashboard-bento {
    grid-template-columns: 1fr;
  }
  .panel-overview, .panel-wallets, .panel-modules-grid, .panel-governance, .panel-mission {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

/* ==================== APP SHELL V2 (Screenshot Match) ==================== */
.top-links {
  display: none;
}

.top-nav {
  background: rgba(5, 10, 22, 0.92);
  border-bottom: 1px solid rgba(129, 140, 248, 0.2);
  padding: 12px 18px;
}

.portal-layout {
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 66px);
  max-width: 1600px;
  margin: 12px auto;
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-radius: 18px;
  overflow: hidden;
  background: radial-gradient(140% 120% at 80% 0%, rgba(76, 29, 149, 0.2), rgba(15, 23, 42, 0.94) 52%);
  box-shadow: 0 28px 80px rgba(2, 8, 23, 0.58);
}

.sidebar {
  top: 0;
  height: auto;
  border-right: 1px solid rgba(129, 140, 248, 0.18);
  background: linear-gradient(180deg, rgba(9, 17, 34, 0.94), rgba(6, 14, 30, 0.96));
}

.sidebar-search {
  padding: 14px;
  border-bottom: 1px solid rgba(129, 140, 248, 0.14);
}

.sidebar-search input {
  border-radius: 10px;
  height: 38px;
  background: rgba(20, 31, 53, 0.92);
  border-color: rgba(129, 140, 248, 0.24);
}

.sidebar .nav-item {
  margin: 0 10px;
  border-radius: 10px;
  border: 1px solid transparent;
}

.sidebar .nav-item.active,
.sidebar .nav-item:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(67, 56, 202, 0.24));
  border-color: rgba(129, 140, 248, 0.34);
}

.content-area {
  max-width: none;
  padding: 18px 18px 24px;
}

.dashboard-header {
  margin-bottom: 16px;
  padding-bottom: 0;
  border-bottom: none;
}

.dashboard-header-main h2 {
  font-size: clamp(1.8rem, 2.3vw, 2.35rem);
  color: #f3f4f6;
}

.dashboard-header-main .section-subtitle {
  color: #94a3b8;
}

.dashboard-bento {
  gap: 14px;
  margin-top: 10px;
}

.bento-panel,
.module-bento-tile {
  border-radius: 16px;
  border: 1px solid rgba(129, 140, 248, 0.28);
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.86), rgba(17, 24, 39, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.bento-panel:hover,
.module-bento-tile:hover {
  border-color: rgba(167, 139, 250, 0.52);
  box-shadow: 0 12px 30px rgba(30, 41, 59, 0.35);
}

.overview-metric-val {
  font-size: 2.15rem;
  letter-spacing: -0.03em;
}

.module-bento-badge {
  background: rgba(16, 185, 129, 0.2);
}

.gov-progress-track {
  background: rgba(99, 102, 241, 0.22);
}

.gov-progress-yes,
.gov-progress-no,
.gov-progress-abstain {
  background-image: linear-gradient(90deg, rgba(139, 92, 246, 0.9), rgba(99, 102, 241, 0.95));
}

.member-identity-tile {
  border-radius: 12px;
  border-color: rgba(129, 140, 248, 0.32);
  background: linear-gradient(145deg, rgba(27, 39, 70, 0.9), rgba(17, 24, 39, 0.92));
}

#serverSwitcherSelect {
  width: 240px;
  background: rgba(23, 33, 57, 0.96);
  border-color: rgba(129, 140, 248, 0.3);
}

@media (max-width: 980px) {
  .portal-layout {
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .content-area {
    padding: 14px;
  }
}

/* ==================== Screenshot Vibe Override ==================== */
:root {
  --bg-primary: #070d1a;
  --bg-secondary: #0b1324;
  --bg-tertiary: #111c34;
  --bg-elevated: #172443;
  --text-primary: #eaf1ff;
  --text-secondary: #b8c5dc;
  --text-muted: #8d9bb5;
  --border-subtle: rgba(123, 139, 255, 0.2);
  --border-default: rgba(123, 139, 255, 0.32);
  --border-emphasis: rgba(123, 139, 255, 0.45);
  --gold: #7c6bff;
  --gold-light: #9f96ff;
  --gold-glow: rgba(124, 107, 255, 0.35);
}

body {
  background:
    radial-gradient(1400px 700px at 12% -15%, rgba(110, 84, 255, 0.2), transparent 55%),
    radial-gradient(1200px 700px at 88% -20%, rgba(59, 130, 246, 0.22), transparent 56%),
    linear-gradient(165deg, #060b17 0%, #0a1325 45%, #0d1a31 100%);
}

.top-nav {
  background: rgba(8, 14, 30, 0.88);
  border-bottom: 1px solid rgba(123, 139, 255, 0.24);
  box-shadow: 0 12px 32px rgba(3, 8, 20, 0.5);
}

.portal-layout {
  background: linear-gradient(130deg, rgba(9, 16, 34, 0.74), rgba(10, 19, 38, 0.52));
}

.sidebar {
  background: linear-gradient(180deg, rgba(8, 14, 30, 0.95), rgba(10, 18, 34, 0.92));
  border-right: 1px solid rgba(123, 139, 255, 0.2);
}

.sidebar .nav-item {
  border: 1px solid transparent;
}

.sidebar .nav-item.active,
.sidebar .nav-item:hover {
  background: linear-gradient(135deg, rgba(124, 107, 255, 0.2), rgba(59, 130, 246, 0.14));
  border-color: rgba(124, 107, 255, 0.36);
  color: #f2f5ff;
}

.content-area {
  max-width: 1360px;
}

.card,
.dashboard-tile,
.module-tile,
.command-tile,
.sa-card,
.gp-workspace-card {
  border: 1px solid rgba(123, 139, 255, 0.28) !important;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(124, 107, 255, 0.16), rgba(124, 107, 255, 0) 52%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)) !important;
  box-shadow: 0 18px 36px rgba(4, 9, 24, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.card:hover,
.dashboard-tile:hover,
.module-tile:hover,
.command-tile:hover,
.sa-card:hover,
.gp-workspace-card:hover {
  border-color: rgba(149, 135, 255, 0.5) !important;
  box-shadow: 0 22px 44px rgba(4, 9, 24, 0.5), 0 0 0 1px rgba(124, 107, 255, 0.16) inset !important;
}

.module-tile__icon,
.dashboard-tile__icon {
  background: linear-gradient(145deg, rgba(124, 107, 255, 0.35), rgba(79, 70, 229, 0.18)) !important;
  border-color: rgba(149, 135, 255, 0.46) !important;
}

.settings-tabs {
  border-color: rgba(123, 139, 255, 0.24) !important;
  background: rgba(12, 21, 40, 0.58) !important;
}

.settings-tab.active,
.command-tile.active {
  border-color: rgba(149, 135, 255, 0.55) !important;
  background: linear-gradient(145deg, rgba(124, 107, 255, 0.3), rgba(124, 107, 255, 0.12)) !important;
}

/* ==================== Sidebar Screenshot Match ==================== */
.portal-layout {
  grid-template-columns: 220px 1fr !important;
}

.sidebar {
  background: linear-gradient(180deg, rgba(7, 12, 24, 0.98), rgba(10, 16, 30, 0.95)) !important;
  border-right: 1px solid rgba(120, 137, 255, 0.22) !important;
  padding: 14px 10px 10px !important;
  gap: 10px;
}

.sidebar-search {
  padding: 0 6px 8px !important;
  border-bottom: none !important;
}

.sidebar-search input {
  border-radius: 10px !important;
  height: 38px;
  padding: 8px 34px 8px 12px !important;
  background: rgba(20, 29, 53, 0.72) !important;
  border: 1px solid rgba(114, 132, 255, 0.28) !important;
}

.sidebar-nav-items {
  padding: 2px 2px 8px !important;
  gap: 8px !important;
}

.sidebar .nav-item,
.sidebar-nav-items .nav-item {
  min-height: 44px;
  border-radius: 12px !important;
  border-left: none !important;
  padding: 10px 12px !important;
  gap: 10px !important;
  background: transparent !important;
  border: 1px solid transparent !important;
}

.sidebar .nav-item .nav-icon,
.sidebar-nav-items .nav-item .nav-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(108, 124, 255, 0.14);
  border: 1px solid rgba(127, 142, 255, 0.26);
  text-align: center;
  opacity: 0.95;
  font-size: 0.82rem !important;
  color: #dce6ff;
}

.sidebar .nav-item .nav-label,
.sidebar-nav-items .nav-item .nav-label {
  font-size: 0.92rem !important;
  font-weight: 600;
  color: #d3def7;
}

.sidebar .nav-item:hover,
.sidebar-nav-items .nav-item:hover {
  background: linear-gradient(135deg, rgba(89, 108, 246, 0.18), rgba(59, 130, 246, 0.12)) !important;
  border-color: rgba(118, 136, 255, 0.34) !important;
}

.sidebar .nav-item.active,
.sidebar-nav-items .nav-item.active {
  background: linear-gradient(135deg, rgba(109, 92, 255, 0.28), rgba(79, 70, 229, 0.2)) !important;
  border-color: rgba(145, 133, 255, 0.5) !important;
  box-shadow: 0 10px 22px rgba(29, 39, 92, 0.32);
}

.sidebar .nav-item.active .nav-icon,
.sidebar-nav-items .nav-item.active .nav-icon {
  background: rgba(145, 133, 255, 0.26);
  border-color: rgba(165, 154, 255, 0.45);
}

.sidebar .nav-item.active .nav-label,
.sidebar-nav-items .nav-item.active .nav-label {
  color: #f2f6ff !important;
}

.sidebar-section-divider {
  height: 1px;
  margin: 2px 8px;
  background: linear-gradient(90deg, transparent, rgba(118, 136, 255, 0.35), transparent) !important;
}

.sidebar-group-label {
  margin: 6px 10px 2px;
  color: rgba(174, 193, 231, 0.72);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.sidebar-server-context {
  margin-top: auto;
  padding: 0 6px 6px;
}

/* ==================== Topbar Screenshot Match ==================== */
.top-nav {
  min-height: 72px !important;
  padding: 10px 16px !important;
  background: rgba(7, 13, 28, 0.9) !important;
  border-bottom: 1px solid rgba(118, 136, 255, 0.2) !important;
  box-shadow: 0 12px 30px rgba(3, 8, 20, 0.42) !important;
}

.nav-brand h1 {
  font-size: 2rem !important;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.top-links {
  gap: 6px !important;
}

.top-link {
  padding: 8px 12px !important;
  border-radius: 10px !important;
  font-size: 0.92rem !important;
  color: #cfdbf3 !important;
}

.top-link:hover {
  background: rgba(96, 116, 255, 0.16) !important;
  border-color: rgba(120, 138, 255, 0.35) !important;
  color: #f4f7ff !important;
}

.nav-user {
  gap: 10px !important;
}

.command-server-switcher {
  padding: 6px 8px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(86, 108, 220, 0.24) !important;
  background: rgba(10, 20, 41, 0.76) !important;
}

.command-server-switcher > label {
  color: #a9b8d6 !important;
  font-size: 0.72rem !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.command-server-switcher__row select {
  height: 34px;
  border-radius: 9px !important;
  background: rgba(24, 35, 62, 0.92) !important;
  border: 1px solid rgba(108, 125, 238, 0.5) !important;
  color: #e3ebff !important;
  box-shadow: none !important;
}

.member-identity-tile {
  border-radius: 14px !important;
  border: 1px solid rgba(86, 108, 220, 0.24) !important;
  background: linear-gradient(145deg, rgba(18, 29, 53, 0.88), rgba(15, 24, 45, 0.78)) !important;
  padding: 6px 8px 6px 6px !important;
  min-height: 44px;
  box-shadow: none !important;
}

#navAvatar {
  width: 30px !important;
  height: 30px !important;
  border-radius: 999px;
  border: 1px solid rgba(155, 168, 255, 0.45);
}

.member-identity-tile__kicker {
  display: none !important;
}

.nav-username {
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  color: #edf3ff !important;
}

.member-identity-tile__actions .btn-secondary {
  min-height: 30px !important;
  padding: 6px 10px !important;
  font-size: 0.78rem !important;
  border-radius: 8px !important;
}

#navAuthBtn {
  min-height: 38px !important;
  border-radius: 10px !important;
  padding: 8px 14px !important;
}

#navAuthBtn.btn-primary {
  background: linear-gradient(135deg, #6d5cff 0%, #4f46e5 100%) !important;
  border: 1px solid rgba(145, 133, 255, 0.55) !important;
  color: #f4f7ff !important;
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.34) !important;
}

#navAuthBtn.btn-primary:hover {
  background: linear-gradient(135deg, #7f72ff 0%, #5a52ef 100%) !important;
}

#appHubBento .btn-primary,
#section-landing .btn-primary[onclick*="login"] {
  background: linear-gradient(135deg, #6d5cff 0%, #4f46e5 100%) !important;
  border: 1px solid rgba(145, 133, 255, 0.55) !important;
  color: #f4f7ff !important;
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.34) !important;
}

#appHubBento .btn-primary:hover,
#section-landing .btn-primary[onclick*="login"]:hover {
  background: linear-gradient(135deg, #7f72ff 0%, #5a52ef 100%) !important;
}

/* ==================== Final Primary Button Override ==================== */
.btn-primary {
  background: linear-gradient(135deg, #6d5cff 0%, #4f46e5 100%) !important;
  border: 1px solid rgba(145, 133, 255, 0.55) !important;
  color: #f4f7ff !important;
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.34) !important;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #7f72ff 0%, #5a52ef 100%) !important;
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.4) !important;
}

/* ==================== Topbar Outline Softening ==================== */
.top-nav {
  border-bottom: 1px solid rgba(99, 102, 241, 0.18) !important;
  box-shadow: inset 0 -1px 0 rgba(79, 70, 229, 0.12) !important;
}

.top-nav::before,
.top-nav::after {
  display: none !important;
}

.command-server-switcher {
  box-shadow: none !important;
}

/* ==================== Full-Width Shell Alignment ==================== */
.portal-layout {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  border-left: none !important;
  border-right: none !important;
  border-radius: 0 !important;
}

.content-area {
  max-width: none !important;
  margin: 0 !important;
}

/* ==================== Sidebar Overflow Guard ==================== */
.sidebar,
.sidebar-nav-items,
.sidebar-server-context {
  overflow-x: hidden !important;
}

.sidebar-server-card,
.sidebar-see-all,
.sidebar-search input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* ==================== Accent Color Cleanup ==================== */
:root {
  --gold-dark: #9fb2ff;
}

.sidebar-see-all {
  color: #a8b9ff !important;
}

.sidebar-see-all:hover {
  color: #c6d2ff !important;
}

footer a[href="/privacy-policy"],
footer a[href="/terms-of-service"] {
  color: #9fb2ff !important;
}

footer a[href="/privacy-policy"]:hover,
footer a[href="/terms-of-service"]:hover {
  color: #c6d2ff !important;
}

/* ==================== Topbar Height Harmonization ==================== */
.top-nav {
  min-height: 76px !important;
  display: grid !important;
  grid-template-columns: minmax(280px, 1fr) auto auto !important;
  align-items: center !important;
  column-gap: 18px !important;
}

.nav-brand {
  min-height: 52px;
  display: flex;
  align-items: center;
}

.nav-brand h1 {
  min-height: 52px;
  display: inline-flex !important;
  align-items: center;
  margin: 0;
  line-height: 1;
}

.nav-brand h1 img {
  width: 34px !important;
  height: 34px !important;
  margin-right: 10px !important;
}

.nav-user {
  min-height: 52px;
  align-items: center !important;
  justify-self: end;
}

.top-nav-center {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
}

.command-server-switcher {
  min-height: 52px !important;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 16px !important;
}

.command-server-switcher > label {
  position: absolute;
  top: 4px;
  left: 10px;
  margin: 0;
  line-height: 1;
}

.command-server-switcher__row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.command-server-switcher__row select,
.command-server-switcher__row .btn-secondary {
  height: 42px !important;
}

.member-identity-tile {
  min-height: 52px !important;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 980px) {
  .top-nav {
    grid-template-columns: 1fr auto !important;
  }
  .top-nav-center {
    display: none !important;
  }
}
