/* SailorAgent SaaS Dashboard — Design System
 * Dark theme, glassmorphism, Inter font, mobile-first responsive
 * Per saas.md §8: unified responsive PWA */

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

/* ── Design Tokens ── */
:root {
  --bg-primary: #040d21;
  --bg-secondary: #0a1930;
  --bg-card: rgba(10, 25, 48, 0.75);
  --bg-glass: rgba(10, 25, 48, 0.6);
  --bg-hover: rgba(14, 165, 233, 0.15);
  --bg-active: rgba(14, 165, 233, 0.25);

  --text-primary: #f8fafc;
  --text-secondary: #bae6fd;
  --text-muted: #7dd3fc;

  --accent: #f59e0b;
  --accent-hover: #fbbf24;
  --accent-glow: rgba(245, 158, 11, 0.4);

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #0ea5e9;

  --border: rgba(14, 165, 233, 0.3);
  --border-focus: rgba(245, 158, 11, 0.6);

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.1);
  --shadow-glow: 0 0 20px var(--accent-glow);

  --font-body: 'Nunito', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  width: 100%;
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ── App Shell ── */
#app {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

/* ── Login / Auth Screen ── */
.auth-screen {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Night sky — stars as radial-gradient dots */
  background:
    radial-gradient(1px 1px at 8% 6%, rgba(255, 255, 255, 0.90) 0%, transparent 100%),
    radial-gradient(1px 1px at 22% 3%, rgba(255, 255, 255, 0.70) 0%, transparent 100%),
    radial-gradient(2px 2px at 38% 9%, rgba(255, 255, 255, 0.80) 0%, transparent 100%),
    radial-gradient(1px 1px at 54% 4%, rgba(255, 255, 255, 0.60) 0%, transparent 100%),
    radial-gradient(1px 1px at 68% 12%, rgba(255, 255, 255, 0.75) 0%, transparent 100%),
    radial-gradient(2px 2px at 81% 5%, rgba(255, 255, 255, 0.85) 0%, transparent 100%),
    radial-gradient(1px 1px at 92% 8%, rgba(255, 255, 255, 0.65) 0%, transparent 100%),
    radial-gradient(1px 1px at 15% 18%, rgba(255, 255, 255, 0.55) 0%, transparent 100%),
    radial-gradient(1px 1px at 47% 16%, rgba(255, 255, 255, 0.70) 0%, transparent 100%),
    radial-gradient(2px 2px at 73% 22%, rgba(255, 255, 255, 0.60) 0%, transparent 100%),
    radial-gradient(1px 1px at 5% 32%, rgba(255, 255, 255, 0.65) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 28%, rgba(255, 255, 255, 0.50) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 26%, rgba(255, 255, 255, 0.70) 0%, transparent 100%),
    radial-gradient(1px 1px at 88% 30%, rgba(255, 255, 255, 0.80) 0%, transparent 100%),
    radial-gradient(1px 1px at 42% 38%, rgba(255, 255, 255, 0.55) 0%, transparent 100%),
    linear-gradient(180deg, #050a14 0%, #071220 35%, #0a1930 65%, #0d2847 100%);
  position: relative;
  overflow: hidden;
}

/* Moon glow (top-right) */
.auth-screen::before {
  content: '';
  position: absolute;
  top: 5%;
  right: 8%;
  width: 72px;
  height: 72px;
  background: radial-gradient(circle at 38% 38%,
      #fffde7 0%,
      #fef3c7 40%,
      rgba(253, 230, 138, 0.35) 70%,
      transparent 100%);
  border-radius: 50%;
  box-shadow:
    0 0 40px 18px rgba(253, 230, 138, 0.10),
    0 0 90px 40px rgba(213, 185, 106, 0.06);
  z-index: 0;
  animation: auth-moon-glow 6s ease-in-out infinite alternate;
}

@keyframes auth-moon-glow {
  0% {
    box-shadow: 0 0 40px 18px rgba(253, 230, 138, 0.10), 0 0 90px 40px rgba(213, 185, 106, 0.06);
  }

  100% {
    box-shadow: 0 0 60px 28px rgba(253, 230, 138, 0.16), 0 0 130px 60px rgba(213, 185, 106, 0.10);
  }
}

/* Horizon fade */
.auth-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 8%, rgba(213, 185, 106, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Stars layer */
.auth-stars {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.auth-stars::before,
.auth-stars::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: white;
  box-shadow:
    120px 45px 0 rgba(255, 255, 255, 0.7),
    280px 20px 0 rgba(255, 255, 255, 0.8),
    420px 65px 0 rgba(255, 255, 255, 0.5),
    560px 30px 0 rgba(255, 255, 255, 0.9),
    700px 55px 0 rgba(255, 255, 255, 0.6),
    840px 18px 0 rgba(255, 255, 255, 0.75),
    960px 42px 0 rgba(255, 255, 255, 0.8),
    1100px 28px 0 rgba(255, 255, 255, 0.5),
    1240px 60px 0 rgba(255, 255, 255, 0.7),
    190px 90px 0 rgba(255, 255, 255, 0.55),
    350px 95px 0 rgba(255, 255, 255, 0.65),
    490px 80px 0 rgba(255, 255, 255, 0.4),
    630px 100px 0 rgba(255, 255, 255, 0.6),
    780px 88px 0 rgba(255, 255, 255, 0.5),
    920px 75px 0 rgba(255, 255, 255, 0.7);
}

.auth-stars::after {
  width: 1px;
  height: 1px;
  box-shadow:
    60px 35px 0 rgba(255, 255, 255, 0.6),
    200px 55px 0 rgba(255, 255, 255, 0.8),
    330px 15px 0 rgba(255, 255, 255, 0.5),
    470px 48px 0 rgba(255, 255, 255, 0.7),
    610px 22px 0 rgba(255, 255, 255, 0.9),
    750px 70px 0 rgba(255, 255, 255, 0.6),
    890px 38px 0 rgba(255, 255, 255, 0.7),
    1030px 12px 0 rgba(255, 255, 255, 0.5),
    1160px 50px 0 rgba(255, 255, 255, 0.8);
}

/* Ocean — layered dark waves */
.auth-ocean {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36%;
  z-index: 1;
  overflow: hidden;
}

.auth-wave {
  position: absolute;
  left: -100%;
  width: 300%;
  bottom: 0;
  border-radius: 45% 55% 0 0 / 20px 20px 0 0;
}

.auth-wave-1 {
  height: 55%;
  background: linear-gradient(180deg, #0d2847 0%, #071a30 100%);
  animation: auth-wave-move 9s linear infinite;
  opacity: 0.92;
}

.auth-wave-2 {
  height: 48%;
  background: linear-gradient(180deg, #112e52 0%, #0a2240 100%);
  animation: auth-wave-move 12s linear infinite reverse;
  opacity: 0.78;
  bottom: 4px;
}

.auth-wave-3 {
  height: 42%;
  background: linear-gradient(180deg, #163565 0%, #0d2847 100%);
  animation: auth-wave-move 16s linear infinite;
  opacity: 0.65;
  bottom: 8px;
}

@keyframes auth-wave-move {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(33.33%);
  }
}

/* Moonlight shimmer on the water */
.auth-moonlight {
  position: absolute;
  bottom: 28%;
  right: 15%;
  width: 80px;
  height: 160px;
  background: linear-gradient(to bottom, rgba(213, 185, 106, 0.12), transparent);
  filter: blur(10px);
  animation: auth-moonlight-shimmer 4s ease-in-out infinite alternate;
  z-index: 2;
  pointer-events: none;
}

@keyframes auth-moonlight-shimmer {
  0% {
    transform: scaleX(1);
    opacity: 0.7;
  }

  100% {
    transform: scaleX(1.4);
    opacity: 1;
  }
}

/* ── Auth Card — Admiralty Log style ── */
.auth-card {
  position: relative;
  z-index: 10;
  background: rgba(4, 13, 33, 0.82);
  border: 1px solid rgba(213, 185, 106, 0.30);
  border-radius: var(--radius-lg);
  padding: 36px 40px 40px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  backdrop-filter: blur(28px);
  box-shadow:
    0 0 0 1px rgba(213, 185, 106, 0.08),
    0 24px 64px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(213, 185, 106, 0.12);
}

/* Decorative top/bottom rules */
.auth-card::before,
.auth-card::after {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(213, 185, 106, 0.4) 30%,
      rgba(213, 185, 106, 0.6) 50%,
      rgba(213, 185, 106, 0.4) 70%,
      transparent 100%);
  margin: 0 -8px;
}

.auth-card::before {
  margin-bottom: 24px;
}

.auth-card::after {
  margin-top: 20px;
  content: none;
}

/* "THE ADMIRALTY" eyebrow text */
.auth-eyebrow {
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(213, 185, 106, 0.6);
  margin-bottom: 20px;
  font-weight: 600;
}

.auth-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(213, 185, 106, 0.4);
  box-shadow: 0 0 24px rgba(213, 185, 106, 0.15), 0 8px 20px rgba(0, 0, 0, 0.5);
  margin-bottom: 16px;
  animation: float 5s ease-in-out infinite;
}

.auth-card h1 {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 8px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8), 0 0 40px rgba(213, 185, 106, 0.25);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.auth-card p {
  color: rgba(186, 230, 253, 0.7);
  margin-bottom: 28px;
  font-size: 13px;
  font-style: italic;
  letter-spacing: 0.3px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: rgba(7, 18, 32, 0.8);
  border: 1px solid rgba(213, 185, 106, 0.15);
  border-radius: var(--radius-full);
  padding: 4px;
}

.auth-tab {
  flex: 1;
  padding: 9px;
  border: none;
  background: transparent;
  color: rgba(186, 230, 253, 0.6);
  cursor: pointer;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 13px;
  transition: var(--transition);
  letter-spacing: 0.5px;
}

.auth-tab.active {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.4);
}

/* Icon + input wrapper */
.form-field {
  position: relative;
}

.form-field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.5;
  pointer-events: none;
}

.form-field .form-input {
  padding-left: 40px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.form-input {
  width: 100%;
  padding: 13px 16px;
  background: rgba(7, 18, 32, 0.8);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-body);
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: rgba(213, 185, 106, 0.5);
  box-shadow: 0 0 0 3px rgba(213, 185, 106, 0.08), inset 0 1px 0 rgba(213, 185, 106, 0.05);
  background: rgba(10, 25, 48, 0.9);
}

.form-input::placeholder {
  color: rgba(125, 211, 252, 0.4);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 10px;
  color: rgba(125, 211, 252, 0.35);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(213, 185, 106, 0.2), transparent);
}

.auth-error {
  color: #fca5a5;
  font-size: 13px;
  margin-top: 10px;
  min-height: 20px;
  text-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}



/* ── Auth Screen: Daytime variant (hour 6–19 local time) ── */
.auth-screen.day {
  background:
    radial-gradient(1px 1px at 25% 15%, rgba(255, 255, 255, 0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 10%, rgba(255, 255, 255, 0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 20%, rgba(255, 255, 255, 0.2) 0%, transparent 100%),
    linear-gradient(180deg, #7dd3fc 0%, #38bdf8 30%, #0ea5e9 60%, #0284c7 85%, #0369a1 100%);
}

/* Day: Sun */
.auth-screen.day::before {
  top: 8%;
  left: 10%;
  width: 88px;
  height: 88px;
  background: radial-gradient(circle at 50% 50%,
      #fef9c3 0%, #fef08a 35%, rgba(250, 204, 21, 0.25) 65%, transparent 100%);
  border-radius: 50%;
  box-shadow:
    0 0 0 20px rgba(250, 204, 21, 0.08),
    0 0 60px 30px rgba(250, 204, 21, 0.18),
    0 0 120px 60px rgba(250, 204, 21, 0.08);
  animation: auth-sun-pulse 5s ease-in-out infinite alternate;
}

@keyframes auth-sun-pulse {
  0% {
    box-shadow: 0 0 0 20px rgba(250, 204, 21, 0.08), 0 0 60px 30px rgba(250, 204, 21, 0.18), 0 0 120px 60px rgba(250, 204, 21, 0.08);
  }

  100% {
    box-shadow: 0 0 0 28px rgba(250, 204, 21, 0.12), 0 0 90px 45px rgba(250, 204, 21, 0.25), 0 0 160px 80px rgba(250, 204, 21, 0.10);
  }
}

/* Day: horizon warmth */
.auth-screen.day::after {
  background: radial-gradient(ellipse at 12% 10%, rgba(250, 204, 21, 0.10) 0%, transparent 45%);
}

/* Day: hide night elements */
.auth-screen.day .auth-stars {
  opacity: 0;
  pointer-events: none;
}

.auth-screen.day .auth-moonlight {
  opacity: 0;
  pointer-events: none;
}

/* Day: bright ocean */
.auth-screen.day .auth-wave-1 {
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  opacity: 0.88;
}

.auth-screen.day .auth-wave-2 {
  background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 100%);
  opacity: 0.75;
}

.auth-screen.day .auth-wave-3 {
  background: linear-gradient(180deg, #38bdf8 0%, #0ea5e9 100%);
  opacity: 0.62;
}

/* Day: card */
.auth-screen.day .auth-card {
  background: rgba(0, 30, 70, 0.45);
  border-color: rgba(255, 255, 255, 0.30);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 24px 64px rgba(0, 30, 80, 0.40),
    inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

.auth-screen.day .auth-card::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
}

.auth-screen.day .auth-eyebrow {
  color: rgba(255, 255, 255, 0.65);
}

.auth-screen.day .auth-card h1 {
  text-shadow: 0 2px 10px rgba(0, 20, 60, 0.5);
}

.auth-screen.day .auth-card p {
  color: rgba(224, 242, 254, 0.85);
}

.auth-screen.day .auth-logo {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.18), 0 8px 20px rgba(0, 20, 60, 0.3);
}

/* Day: tabs */
.auth-screen.day .auth-tabs {
  background: rgba(0, 40, 100, 0.35);
  border-color: rgba(255, 255, 255, 0.20);
}

.auth-screen.day .auth-tab {
  color: rgba(224, 242, 254, 0.70);
}

/* Day: inputs */
.auth-screen.day .form-input {
  background: rgba(0, 30, 70, 0.40);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.auth-screen.day .form-input::placeholder {
  color: rgba(186, 230, 253, 0.55);
}

.auth-screen.day .form-input:focus {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.10);
  background: rgba(0, 40, 90, 0.50);
}

.auth-screen.day .form-field-icon {
  opacity: 0.60;
}

/* Day: divider */
.auth-screen.day .auth-divider {
  color: rgba(255, 255, 255, 0.45);
}

.auth-screen.day .auth-divider::before,
.auth-screen.day .auth-divider::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.30), transparent);
}

/* Day: Google button */
.auth-screen.day .btn-google {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.auth-screen.day .btn-google:hover {
  background: rgba(255, 255, 255, 0.20);
}


/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
  transform: translateY(0);
}

.btn:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: 0 0px 0 rgba(0, 0, 0, 0.2);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: translateY(4px);
}

.btn-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  box-shadow: 0 4px 0 #b45309, 0 8px 16px rgba(245, 158, 11, 0.2);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 6px 0 #b45309, 0 12px 20px rgba(245, 158, 11, 0.3);
  transform: translateY(-2px);
}

.btn-primary:active:not(:disabled) {
  box-shadow: 0 0px 0 #b45309;
}

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text-primary);
  border: 2px solid var(--border);
  box-shadow: 0 4px 0 var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(14, 165, 233, 0.25);
  box-shadow: 0 6px 0 var(--border);
  transform: translateY(-2px);
}

.btn-secondary:active:not(:disabled) {
  box-shadow: 0 0px 0 var(--border);
}

.btn-google {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}

.btn-google:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.20);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: white;
  box-shadow: 0 4px 0 #991b1b;
}

.btn-danger:hover:not(:disabled) {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  box-shadow: 0 6px 0 #991b1b;
  transform: translateY(-2px);
}

.btn-danger:active:not(:disabled) {
  box-shadow: 0 0px 0 #991b1b;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 12px 32px;
  font-size: 17px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* ── Main Layout ── */
.main-app {
  display: flex;
  height: 100%;
  background-color: #040d21;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(14, 165, 233, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
    url('data:image/svg+xml;utf8,<svg width="40" height="40" xmlns="http://www.w3.org/2000/svg"><g stroke="rgba(255,255,255,0.03)" stroke-width="1"><path d="M0 40 L40 0 M-10 10 L10 -10 M30 50 L50 30"/></g><circle cx="20" cy="20" r="1" fill="rgba(14,165,233,0.2)"/></svg>');
  background-size: cover, cover, 60px 60px;
  background-position: center;
  background-attachment: fixed;
}

.sidebar {
  width: 240px;
  background: rgba(10, 14, 23, 0.5);
  backdrop-filter: blur(24px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
}

.sidebar-header {
  padding: 20px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  font-size: 28px;
}

.sidebar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

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

.nav-item.active {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.2) 0%, transparent 100%);
  color: var(--text-primary);
  border-left: 4px solid var(--info);
  font-weight: 800;
}

@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }

  50% {
    transform: translateY(-4px) rotate(5deg);
  }

  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

.nav-icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
  display: inline-block;
  transition: var(--transition);
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  animation: float 2s ease-in-out infinite;
}


.nav-label {
  flex: 1;
}

.nav-badge {
  background: var(--danger);
  color: white;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  font-weight: 600;
  min-width: 18px;
  text-align: center;
}

.sidebar-section {
  padding: 20px 12px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
}

.status-dot.sleeping {
  background: var(--warning);
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

/* ── Page Container ── */
.page {
  padding: 32px;
  max-width: 100%;
  animation: fadeIn 0.2s ease;
  background: radial-gradient(circle at center top, #1e2836 0%, #0a0e17 100%);
  color: #d4b96a;
  min-height: 100%;
  box-sizing: border-box;

  /* Warm nautical overrides for cards inside .page */
  --text-primary: #ebd69b;
  --text-secondary: #a89060;
  --text-muted: #8a7550;
  --bg-card: rgba(20, 30, 45, 0.8);
  --bg-secondary: #131d2e;
  --border: rgba(212, 185, 106, 0.2);
  --bg-hover: rgba(212, 185, 106, 0.06);
}

.page-header {
  margin-bottom: 24px;
}

.page-title {
  font-family: 'Georgia', serif;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
  color: #ebd69b;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}

.page-subtitle {
  color: #a89060;
  font-size: 15px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Cards ── */
.card {
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(10, 25, 48, 0.4) 100%);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  backdrop-filter: blur(16px);
  transition: var(--transition);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.05);
}

.card:hover {
  border-color: var(--border-focus);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(14, 165, 233, 0.2);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.card-value {
  font-size: 32px;
  font-weight: 700;
}

.card-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

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

/* ── Home: VM Status ── */
.vm-status-card {
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(10, 25, 48, 0.4) 100%);
  border: 2px solid var(--border);
  border-radius: 40px;
  padding: 32px;
  text-align: center;
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.05);
}

.vm-status-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.vm-status-label {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.vm-status-sub {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

.vm-power-btn {
  padding: 16px 48px;
  font-size: 18px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  font-weight: 800;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.vm-power-btn.start {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 6px 0 #047857, 0 8px 16px rgba(16, 185, 129, 0.2);
}

.vm-power-btn.start:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  box-shadow: 0 8px 0 #047857, 0 12px 20px rgba(16, 185, 129, 0.3);
  transform: translateY(-2px);
}

.vm-power-btn.start:active {
  box-shadow: 0 0px 0 #047857;
  transform: translateY(6px);
}

.vm-power-btn.stop {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: white;
  box-shadow: 0 6px 0 #991b1b, 0 8px 16px rgba(239, 68, 68, 0.2);
}

.vm-power-btn.stop:hover {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  box-shadow: 0 8px 0 #991b1b, 0 12px 20px rgba(239, 68, 68, 0.3);
  transform: translateY(-2px);
}

.vm-power-btn.stop:active {
  box-shadow: 0 0px 0 #991b1b;
  transform: translateY(6px);
}

/* ── Rooms: Scene Cards ── */
.scene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.scene-card {
  position: relative;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(10, 25, 48, 0.4) 100%);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-slow);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.scene-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.2);
}

.scene-card.selected {
  border-color: var(--accent);
  background: var(--bg-active);
  box-shadow: 0 0 0 2px var(--accent), var(--shadow-glow);
  transform: translateY(-4px) scale(1.05);
}

.scene-emoji {
  font-size: 36px;
  margin-bottom: 8px;
}

.scene-name {
  font-size: 14px;
  font-weight: 600;
}

.scene-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.room-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.room-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-primary);
}

.room-item:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
}

.room-scene-icon {
  font-size: 24px;
}

.room-name {
  font-weight: 500;
  flex: 1;
}

.room-time {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Chat: WeChat-style ── */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-secondary);
}

.chat-room-name {
  font-weight: 600;
  font-size: 16px;
}

.chat-members {
  font-size: 13px;
  color: var(--text-secondary);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.msg {
  display: flex;
  gap: 10px;
  max-width: 80%;
  animation: fadeIn 0.15s ease;
}

.msg.agent {
  align-self: flex-start;
}

.msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--border);
  object-fit: contain;
}

/* ── Chat Avatar Tier Styling ── */
.msg-avatar[data-tier="reef"] {
  border-color: #e65100;
  box-shadow: 0 0 8px rgba(230, 81, 0, 0.4);
}
.msg-avatar[data-tier="voyager"] {
  border-color: #00e5ff;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}
.msg-avatar[data-tier="oracle"] {
  border-color: #d500f9;
  box-shadow: 0 0 8px rgba(213, 0, 249, 0.4);
}

.msg-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msg-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.msg.user .msg-name {
  text-align: right;
}

.msg-bubble {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.msg.agent .msg-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top-left-radius: 4px;
}

.msg.user .msg-bubble {
  background: var(--accent);
  color: white;
  border-top-right-radius: 4px;
}

/* Per-role bubble colors (15.6) */
.msg.agent[data-role="captain"] .msg-bubble {
  border-left: 3px solid #6366f1;
}

.msg.agent[data-role="first_mate"] .msg-bubble {
  border-left: 3px solid #f59e0b;
}

.msg.agent[data-role="yeoman"] .msg-bubble {
  border-left: 3px solid #10b981;
}

.msg.agent[data-role="sailor"] .msg-bubble {
  border-left: 3px solid #3b82f6;
}

.msg-bubble code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
}

.msg-bubble pre {
  background: rgba(0, 0, 0, 0.4);
  padding: 12px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 8px 0;
  font-size: 13px;
}

.msg-bubble pre code {
  background: none;
  padding: 0;
}

.msg-time {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
}

.chat-input-bar {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: flex-end;
  background: var(--bg-secondary);
}

.chat-textarea {
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 160px;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  transition: var(--transition);
}

.chat-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
}

.chat-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-send:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

/* ── Admiralty Billing ── */

/* Loading spinner */
.billing-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 80px 0;
  color: var(--text-secondary);
}

.billing-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ── Treasury Vault ── */
.adm-vault {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(10, 25, 48, 0.75) 60%);
  border: 2px solid rgba(245, 158, 11, 0.3);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  margin-bottom: 24px;
}

.adm-coin-img {
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.5));
  animation: coinPulse 3s ease-in-out infinite;
}

@keyframes coinPulse {

  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.5));
  }

  50% {
    transform: scale(1.06);
    filter: drop-shadow(0 0 24px rgba(245, 158, 11, 0.7));
  }
}

.adm-vault-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.adm-vault-gold {
  font-size: 42px;
  font-weight: 900;
  color: #f59e0b;
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(245, 158, 11, 0.3);
}

.adm-vault-unit {
  font-size: 24px;
  font-weight: 700;
  opacity: 0.7;
}

.adm-vault-usd {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Stats Row ── */
.adm-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.adm-stat-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.adm-stat-icon {
  font-size: 28px;
  flex-shrink: 0;
  margin-top: 2px;
}

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

.adm-stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin: 2px 0;
}

.adm-stat-detail {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Admiralty Cards ── */
.adm-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.adm-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.adm-card-icon {
  font-size: 22px;
}

.adm-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.adm-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ── Usage Ledger Table ── */
.adm-ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.adm-ledger th {
  text-align: left;
  padding: 12px 16px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--border);
}

.adm-ledger td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(75, 85, 99, 0.15);
  color: var(--text-primary);
}

.adm-ledger tr:hover td {
  background: var(--bg-hover);
}

.adm-ledger-icon {
  margin-right: 6px;
}

.adm-ledger-total td {
  font-weight: 700;
  color: var(--accent);
  border-bottom: none;
  border-top: 2px solid rgba(245, 158, 11, 0.3);
}

/* ── Top-up Grid ── */
.adm-topup-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.adm-topup-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 12px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.adm-topup-card:hover {
  border-color: var(--accent);
  background: rgba(245, 158, 11, 0.06);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.adm-topup-card.selected {
  border-color: var(--accent);
  background: rgba(245, 158, 11, 0.1);
  box-shadow: var(--shadow-glow), var(--shadow-md);
  transform: translateY(-3px);
}

.adm-topup-tag {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-full);
  background: #f59e0b;
  color: #000;
  white-space: nowrap;
}

.adm-topup-coin {
  font-size: 36px;
  line-height: 1;
}

.adm-topup-gold {
  font-size: 22px;
  font-weight: 800;
  color: #f59e0b;
}

.adm-topup-gold-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-top: -4px;
}

.adm-topup-bonus {
  font-size: 13px;
  font-weight: 700;
  color: var(--success);
  min-height: 20px;
}

.adm-topup-bonus-empty {
  color: transparent;
}

.adm-topup-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
  padding: 4px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
}

/* ── Buy Button ── */
.adm-buy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  color: #000;
  font-size: 17px;
  font-weight: 800;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 0 #92400e, var(--shadow-md);
}

.adm-buy-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  transform: translateY(-1px);
  box-shadow: 0 5px 0 #92400e, var(--shadow-lg);
}

.adm-buy-btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #92400e;
}

.adm-buy-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.adm-buy-btn-icon {
  font-size: 22px;
}

/* ── Status Messages ── */
.adm-topup-msg {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  min-height: 22px;
}

.adm-msg-success {
  color: var(--success);
}

.adm-msg-error {
  color: var(--danger);
}

/* ── Quartermaster Parchment ── */
.adm-parchment {
  padding: 24px 28px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(180, 140, 60, 0.08) 0%, rgba(10, 25, 48, 0.6) 100%);
  border: 1px dashed rgba(180, 140, 60, 0.35);
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.adm-parchment-title {
  font-style: normal;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 8px;
  font-family: var(--font-body);
}

/* ── Responsive: Billing Mobile — see mobile.css for game-styled overrides ── */

/* ── Ledger Summary Card (on Billing page) ── */
.adm-ledger-summary-card {
  cursor: pointer;
  transition: var(--transition);
}

.adm-ledger-summary-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.adm-ledger-summary-card .adm-card-header {
  margin-bottom: 12px;
}

.adm-ledger-chevron {
  margin-left: auto;
  font-size: 22px;
  color: var(--text-muted);
  font-weight: 300;
  transition: var(--transition);
}

.adm-ledger-summary-card:hover .adm-ledger-chevron {
  color: var(--accent);
  transform: translateX(2px);
}

.adm-ledger-mini {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.adm-ledger-mini-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(75, 85, 99, 0.15);
}

.adm-ledger-mini-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.adm-ledger-mini-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.adm-ledger-mini-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.adm-ledger-mini-total {
  display: flex;
  justify-content: space-between;
  padding: 12px 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.adm-ledger-mini-total-val {
  font-size: 16px;
}

.adm-ledger-mini-link {
  text-align: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.3px;
}

/* ── Full Ledger Page ── */
.ldg-back-row {
  margin-bottom: 20px;
}

.ldg-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.ldg-title-icon {
  font-size: 36px;
}

.ldg-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.ldg-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 2px 0 0;
}

/* Period Tabs */
.ldg-period-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 20px;
}

.ldg-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: calc(var(--radius-md) - 2px);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
}

.ldg-tab:hover {
  color: var(--text-primary);
}

.ldg-tab.active {
  background: var(--bg-card);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

/* Summary Strip */
.ldg-summary-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(10, 25, 48, 0.6) 60%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  margin-bottom: 20px;
}

.ldg-summary-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

.ldg-summary-value {
  font-size: 32px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1.2;
}

.ldg-summary-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.ldg-summary-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.ldg-meta-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.ldg-meta-dot-vm {
  background: #3b82f6;
}

.ldg-meta-dot-llm {
  background: #a855f7;
}

/* Expense Breakdown Cards */
.ldg-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.ldg-expense-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.ldg-expense-card:hover {
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: var(--shadow-sm);
}

.ldg-expense-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.ldg-expense-body {
  flex: 1;
}

.ldg-expense-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.ldg-expense-detail {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ldg-expense-right {
  text-align: right;
}

.ldg-expense-cost {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.ldg-expense-pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Cost Bar */
.ldg-bar-container {
  margin: 8px 0 16px;
}

.ldg-cost-bar {
  display: flex;
  height: 28px;
  border-radius: var(--radius-full);
  overflow: hidden;
  gap: 2px;
}

.ldg-bar-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  transition: width 0.5s ease;
  min-width: 12px;
}

.ldg-bar-vm {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.ldg-bar-llm {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
}

.ldg-bar-empty {
  text-align: center;
  padding: 16px 0;
  color: var(--text-muted);
  font-size: 14px;
  font-style: italic;
}

.ldg-bar-legend {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.ldg-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.ldg-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.ldg-swatch-vm {
  background: #3b82f6;
}

.ldg-swatch-llm {
  background: #a855f7;
}

.ldg-details-card {
  margin-bottom: 20px;
}

.ldg-comparison-card {
  margin-bottom: 20px;
}

/* ── Onboarding ── */
.onboard-screen {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #0f172a 0%, #040d21 100%);
  position: relative;
  overflow: hidden;
}

/* Subtle glowing orbs for the deep sea */
.onboard-screen::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 15% 25%, rgba(14, 165, 233, 0.15) 0%, transparent 40%), radial-gradient(circle at 85% 65%, rgba(245, 158, 11, 0.1) 0%, transparent 40%);
  z-index: 0;
}

.onboard-card {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, rgba(10, 25, 48, 0.8) 0%, rgba(10, 25, 48, 0.6) 100%);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  max-width: 540px;
  width: 100%;
  text-align: center;
  backdrop-filter: blur(24px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), inset 0 2px 0 rgba(255, 255, 255, 0.1);
}

.onboard-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.onboard-subtitle {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 15px;
}

.onboard-step-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-hover);
  transition: var(--transition);
}

.step-dot.active {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  width: 28px;
  border-radius: 5px;
}

.step-dot.done {
  background: var(--success);
}

/* Plan cards */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.plan-card {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(10, 25, 48, 0.4) 100%);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-slow);
  box-shadow: var(--shadow-sm);
}

.plan-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.2);
}

.plan-card.selected {
  border-color: var(--accent);
  background: var(--bg-active);
  box-shadow: 0 0 0 2px var(--accent), var(--shadow-glow);
  transform: translateY(-4px) scale(1.05);
}

/* Removed recommended border to prevent confusion with selected state */

.plan-card .plan-badge {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
  margin-bottom: 8px;
}

.plan-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.plan-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.plan-detail {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Free tier card — full width, green accent */
.plan-card-free {
  border-color: rgba(16, 185, 129, 0.4);
  display: block;
  width: 100%;
  margin-bottom: 4px;
}

.plan-card-free:hover {
  border-color: var(--success);
}

.plan-card-free.selected {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.08);
}

.plan-free-badge {
  display: inline-block;
  background: var(--success);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
  margin-bottom: 8px;
}

/* Loading animation */
.loading-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-hover);
  border-radius: 3px;
  overflow: hidden;
  margin: 24px 0;
}

.loading-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 3px;
  animation: loadProgress 90s ease-in-out forwards;
}

@keyframes loadProgress {
  0% {
    width: 0;
  }

  50% {
    width: 65%;
  }

  100% {
    width: 100%;
  }
}

.crew-intro {
  text-align: left;
  margin: 20px 0;
}

.crew-member {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  animation: fadeIn 0.3s ease both;
}

.crew-member:nth-child(2) {
  animation-delay: 0.5s;
}

.crew-member:nth-child(3) {
  animation-delay: 1s;
}

.crew-member:nth-child(4) {
  animation-delay: 1.5s;
}

.crew-member-icon {
  font-size: 28px;
}

.crew-member-name {
  font-weight: 600;
}

.crew-member-role {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ── Settings (Captain's Quarters) ── */
.set-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.set-header-icon {
  font-size: 48px;
  filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.4));
}

.set-header-title {
  font-size: 28px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
}

.set-header-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.set-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(212, 185, 106, 0.12);
}

.set-row:last-child {
  border-bottom: none;
}

.set-row-icon {
  font-size: 22px;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(212, 185, 106, 0.08);
}

.set-row-body {
  flex: 1;
  min-width: 0;
}

.set-row-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.set-row-value {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.set-row-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.set-row-interactive {
  flex-wrap: wrap;
  gap: 12px;
}

.set-row-interactive .form-select {
  margin-left: auto;
}


.set-danger-zone {
  border-color: rgba(239, 68, 68, 0.25);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.06) 0%, var(--bg-card) 60%);
}

.set-danger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.set-btn-signout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.set-btn-signout:hover {
  border-color: var(--accent);
  background: rgba(245, 158, 11, 0.08);
}

.set-btn-delete {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  border: 2px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0.8;
  transition: var(--transition);
}

.set-btn-delete:hover {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
  opacity: 1;
}

@media (max-width: 600px) {
  .set-header-title {
    font-size: 22px;
  }

  .set-header-icon {
    font-size: 36px;
  }

  .set-row-interactive {
    flex-direction: column;
  }

  .set-row-interactive .form-select {
    margin-left: 0;
    width: 100%;
  }

  .set-danger-actions {
    flex-direction: column;
  }

  .set-btn-signout,
  .set-btn-delete {
    width: 100%;
    justify-content: center;
  }
}

select.form-select {
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  padding-right: 32px;
}

select.form-select:focus {
  outline: none;
  border-color: var(--border-focus);
}

/* ── Modals ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 480px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}

.modal-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* ── Responsive: Mobile ── */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .main-app {
    flex-direction: column;
  }

  .bottom-nav {
    display: flex;
    background: rgba(10, 14, 23, 0.7);
    backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 0;
    justify-content: space-around;
  }

  .bottom-nav .nav-item {
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    padding: 6px 12px;
    text-align: center;
  }

  .bottom-nav .nav-icon {
    font-size: 20px;
  }

  .page {
    padding: 20px 16px;
  }

  .page-title {
    font-size: 20px;
  }

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

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

  .scene-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .chat-messages {
    padding: 12px;
  }

  .msg {
    max-width: 90%;
  }

  .auth-card {
    margin: 16px;
    padding: 32px 24px;
  }

  .onboard-card {
    margin: 16px;
    padding: 32px 24px;
  }
}

/* Desktop: hide bottom nav */
@media (min-width: 769px) {
  .bottom-nav {
    display: none;
  }
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-hover);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ── Utility ── */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-sm {
  gap: 8px;
}

.gap-md {
  gap: 16px;
}

.gap-lg {
  gap: 24px;
}

.mt-sm {
  margin-top: 8px;
}

.mt-md {
  margin-top: 16px;
}

.mt-lg {
  margin-top: 24px;
}

.mb-md {
  margin-bottom: 16px;
}

.text-center {
  text-align: center;
}

.text-sm {
  font-size: 13px;
}

.text-muted {
  color: var(--text-secondary);
}

.text-success {
  color: var(--success);
}

.text-warning {
  color: var(--warning);
}

.text-danger {
  color: var(--danger);
}

.fw-600 {
  font-weight: 600;
}

/* ── Settings — Grouped List (Nautical) ── */

/* Section label above each group */
.set-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #8a7550;
  margin-top: 28px;
  margin-bottom: 10px;
  padding-left: 4px;
}

/* Rounded group container */
.set-group {
  background: rgba(20, 30, 45, 0.85);
  border: 1px solid rgba(212, 185, 106, 0.15);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Hint text below a group */
.set-group-hint {
  font-size: 12px;
  color: #8a7550;
  padding: 8px 4px 0;
  line-height: 1.5;
}

/* ── Profile card (top) ── */
.set-profile-card {
  margin-bottom: 8px;
}

.set-profile-row {
  display: flex;
  align-items: center;
  padding: 16px;
  cursor: pointer;
  transition: background 0.15s;
}

.set-profile-row:active {
  background: rgba(212, 185, 106, 0.08);
}

.set-profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4b96a, #a8945f);
  border: 2px solid rgba(212, 185, 106, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Georgia', serif;
  font-size: 24px;
  font-weight: 700;
  color: #0a1930;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
  margin-right: 16px;
  box-shadow: 0 0 16px rgba(212, 185, 106, 0.25);
  flex-shrink: 0;
}

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

.set-profile-name {
  font-family: 'Georgia', serif;
  font-size: 18px;
  font-weight: 700;
  color: #ebd69b;
  margin-bottom: 2px;
}

.set-profile-sub {
  font-size: 13px;
  color: #8a7550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Individual row inside a group ── */
.set-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 12px 16px;
  position: relative;
  transition: background 0.15s;
}

/* Separator between rows (inset from icon) */
.set-item:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 56px;
  right: 16px;
  height: 1px;
  background: rgba(212, 185, 106, 0.12);
}

.set-item-left {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.set-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Coloured icon square */
.set-item-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 14px;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.set-item-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.set-item-unit {
  font-size: 13px;
  color: #8a7550;
}

/* Chevron for drilldown rows */
.set-chevron {
  font-size: 22px;
  color: rgba(212, 185, 106, 0.4);
  font-weight: 300;
  line-height: 1;
  flex-shrink: 0;
  margin-left: 4px;
}

/* Tappable action rows */
.set-item-tap {
  cursor: pointer;
}

.set-item-tap:active {
  background: rgba(212, 185, 106, 0.08);
}

/* Inline numeric input — transparent, gold text */
.set-inline-input {
  background: rgba(212, 185, 106, 0.08);
  border: 1px solid rgba(212, 185, 106, 0.2);
  border-radius: 8px;
  color: #ebd69b;
  font-size: 15px;
  font-family: var(--font-mono);
  font-weight: 600;
  text-align: center;
  width: 72px;
  padding: 6px 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.set-inline-input:focus {
  outline: none;
  border-color: rgba(212, 185, 106, 0.5);
  box-shadow: 0 0 0 3px rgba(212, 185, 106, 0.1);
}

/* Remove number input spin buttons for cleaner look */
.set-inline-input::-webkit-outer-spin-button,
.set-inline-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
.set-inline-input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ── Mobile tweaks for grouped settings ── */
@media (max-width: 600px) {
  .set-group-label {
    font-size: 10px;
  }
  .set-item-label {
    font-size: 14px;
  }
  .set-inline-input {
    width: 64px;
    font-size: 14px;
  }
}

/* ═══════════════════════════════════════════════════════
   CAPTAIN ID — Registration Wizard & Rank Themes
   ═══════════════════════════════════════════════════════ */

/* Rank theme variables moved to css/themes.css */



/* ── Auth Recovery Link ── */
.auth-recover-link {
  display: block;
  text-align: center;
  color: rgba(186, 230, 253, 0.5);
  font-size: 12px;
  margin-top: 8px;
  text-decoration: none;
  transition: color 0.2s;
}
.auth-recover-link:hover { color: var(--accent); }

/* ── Registration Wizard Container ── */
.auth-register-wizard {
  text-align: left;
  max-height: 70vh;
  overflow-y: auto;
}

/* ── Wizard Progress Dots ── */
.wizard-progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}
.wizard-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: all 0.3s;
}
.wizard-dot.active { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); transform: scale(1.3); }
.wizard-dot.done { background: var(--success); }

/* ── Wizard Steps ── */
.wizard-step {
  animation: wizard-fade-in 0.3s ease-out;
}
.wizard-step h3 {
  font-size: 18px; font-weight: 700;
  color: #fff; margin-bottom: 8px;
  text-align: center;
}
.wizard-hint {
  font-size: 12px; color: rgba(186,230,253,0.6);
  text-align: center; margin-bottom: 16px;
  line-height: 1.5;
}
@keyframes wizard-fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── ID Input Row ── */
.id-input-row {
  display: flex; gap: 8px; margin-bottom: 12px;
}
.id-input-row .wiz-input { flex: 1; }
.id-input-row .btn-icon {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  color: #fff; font-size: 20px; cursor: pointer;
  border-radius: var(--radius-sm); transition: var(--transition);
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
}
.id-input-row .btn-icon:hover { background: rgba(255,255,255,0.15); }

/* ── Wizard Feedback ── */
.wizard-feedback {
  font-size: 13px; margin-bottom: 12px; min-height: 24px;
  text-align: center;
}
.wizard-feedback .available { color: var(--success); }
.wizard-feedback .taken { color: var(--danger); }
.wizard-feedback .loading { color: var(--text-muted); }
.wizard-feedback .weak { color: var(--danger); }
.wizard-feedback .fair { color: var(--warning); }
.wizard-feedback .good { color: var(--info); }
.wizard-feedback .strong { color: var(--success); }
.suggestions { margin-top: 6px; font-size: 12px; color: var(--text-muted); }
.suggest-id { color: var(--accent); cursor: pointer; text-decoration: underline; }

/* ── Wizard Input ── */
.wiz-input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(7, 18, 32, 0.8);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  font-family: var(--font-body);
  transition: var(--transition);
}
.wiz-input:focus {
  outline: none;
  border-color: rgba(213, 185, 106, 0.5);
  box-shadow: 0 0 0 3px rgba(213, 185, 106, 0.08);
}
.wiz-input.error { border-color: var(--danger); animation: shake 0.3s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

/* ── Port Cards ── */
.port-cards {
  display: flex; gap: 8px; margin-bottom: 16px;
}
.port-card {
  flex: 1; text-align: center; padding: 16px 8px;
  background: rgba(7, 18, 32, 0.6);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md); cursor: pointer;
  transition: all 0.2s;
}
.port-card:hover { border-color: rgba(255,255,255,0.25); }
.port-card.selected {
  border-color: var(--accent);
  background: rgba(245,158,11,0.08);
  box-shadow: 0 0 12px var(--accent-glow);
}
.port-flag { font-size: 28px; display: block; margin-bottom: 4px; }
.port-name { font-size: 13px; font-weight: 700; color: #fff; display: block; }
.port-desc { font-size: 11px; color: var(--text-muted); }

/* ── TOTP ── */
.totp-qr-container { text-align: center; margin-bottom: 12px; }
.totp-qr-img { border-radius: var(--radius-sm); background: #fff; padding: 8px; }
.totp-secret { font-family: var(--font-mono); font-size: 13px; color: var(--accent); word-break: break-all; }
.totp-manual { margin-bottom: 12px; }

/* ── Recovery Card ── */
.recovery-card {
  background: rgba(7, 18, 32, 0.8); border: 1px solid rgba(213,185,106,0.25);
  border-radius: var(--radius-md); padding: 20px; margin-bottom: 16px;
  text-align: center;
}
.recovery-header {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 16px;
}
.recovery-badge { font-size: 24px; }
.recovery-id { font-size: 18px; font-weight: 800; color: #fff; }
.recovery-rank { font-size: 12px; color: var(--accent); text-transform: uppercase; letter-spacing: 2px; }
.recovery-key-display {
  font-family: var(--font-mono); font-size: 18px; font-weight: 700;
  color: #fff; letter-spacing: 2px; padding: 12px;
  background: rgba(0,0,0,0.4); border-radius: var(--radius-sm);
  word-break: break-all;
}
.recovery-actions { display: flex; gap: 8px; margin-bottom: 16px; }
.recovery-actions .btn-secondary { flex: 1; font-size: 13px; }

/* ── Wizard Checkbox ── */
.wizard-checkbox {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-secondary);
  margin-bottom: 12px; cursor: pointer;
}
.wizard-checkbox input { accent-color: var(--accent); width: 18px; height: 18px; }

/* ── Wizard Buttons ── */
.wizard-step .btn-primary { width: 100%; margin-top: 4px; }
.btn-link {
  background: none; border: none; color: var(--text-muted);
  font-size: 13px; cursor: pointer; text-decoration: underline;
  margin-top: 8px; display: block; text-align: center; width: 100%;
}
.btn-link:hover { color: var(--accent); }
.btn-large { font-size: 18px; padding: 16px 32px; }

/* ── Complete Screen ── */
.wizard-complete {
  text-align: center; padding: 20px 0;
}
.complete-badge { font-size: 56px; margin-bottom: 12px; }
.wizard-complete h2 { font-size: 22px; margin-bottom: 8px; }
.wizard-complete p { margin-bottom: 12px; }

/* ── Form Group (recovery) ── */
.form-group { margin-bottom: 10px; }
.form-group label {
  display: block; font-size: 12px; color: var(--text-muted);
  margin-bottom: 4px; font-weight: 600;
}
.form-group input { width: 100%; }
