/* ============================================================
   DREAMR — Design System v3
   Calm · Hierarchical · Breathable · Animated
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Shrikhand&display=swap');

@font-face {
  font-family: 'Glacial Indifference';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/gh/cyrealtype/Glacial-Indifference@main/fonts/GlacialIndifference-Regular.otf') format('opentype');
}
@font-face {
  font-family: 'Glacial Indifference';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/gh/cyrealtype/Glacial-Indifference@main/fonts/GlacialIndifference-Bold.otf') format('opentype');
}
@font-face {
  font-family: 'Glacial Indifference';
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/gh/cyrealtype/Glacial-Indifference@main/fonts/GlacialIndifference-Italic.otf') format('opentype');
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* ─── THEME TOKENS ─────────────────────────────────────── */
:root,
[data-theme="dark"] {
  --brand: #4ADEDE;
  --brand-2: #7FFFD4;
  --blue: #6366F1;
  --blue-l: #818CF8;

  --bg:       #0A0A14;
  --bg-soft:  #0F0F1E;
  --surface:  #14142A;
  --surface-2:#1A1A35;
  --elev:     #1F1F3D;

  --line:    rgba(255,255,255,0.06);
  --line-2:  rgba(255,255,255,0.10);
  --line-3:  rgba(255,255,255,0.16);

  --ink:     #F5F5FA;
  --ink-2:   #C8C8D8;
  --mute:    #8A8AA8;
  --mute-2:  #5C5C7A;

  --green:  #34D399;
  --amber:  #FBBF24;
  --red:    #F87171;
  --purple: #A78BFA;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow:    0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg: 0 24px 64px rgba(0,0,0,0.5);

  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --sidebar-w: 244px;
  --page-max:  1160px;
  --page-pad:  48px;
  --gap:       24px;
  --gap-lg:    32px;

  --ring: 0 0 0 3px rgba(74, 222, 222, 0.25);
}

[data-theme="light"] {
  --brand: #0F766E;
  --brand-2: #14B8A6;
  --blue: #4F46E5;
  --blue-l: #6366F1;

  --bg:       #F8F8FB;
  --bg-soft:  #FFFFFF;
  --surface:  #FFFFFF;
  --surface-2:#F4F5FA;
  --elev:     #FFFFFF;

  --line:    rgba(10,10,20,0.06);
  --line-2:  rgba(10,10,20,0.10);
  --line-3:  rgba(10,10,20,0.14);

  --ink:     #0F0F1E;
  --ink-2:   #374151;
  --mute:    #6B7280;
  --mute-2:  #9CA3AF;

  --green:  #059669;
  --amber:  #D97706;
  --red:    #DC2626;
  --purple: #7C3AED;

  --shadow-sm: 0 1px 2px rgba(17,24,39,0.04);
  --shadow:    0 4px 24px rgba(17,24,39,0.06);
  --shadow-lg: 0 16px 48px rgba(17,24,39,0.1);

  --ring: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

@media (max-width: 1100px) {
  :root { --page-pad: 32px; --gap: 20px; --gap-lg: 26px; }
}
@media (max-width: 768px) {
  :root { --page-pad: 18px; --gap: 16px; --gap-lg: 22px; --sidebar-w: 260px; }
}

/* ─── BASE ─────────────────────────────────────────────── */
body {
  font-family: 'Glacial Indifference', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-y: auto;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--line-3); }
a { text-decoration: none; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
input, textarea, select, button { font-family: inherit; }
::selection { background: rgba(74,222,222,0.3); color: var(--ink); }

/* ─── STARFIELD BACKGROUND (sitewide) ──────────────────────
   A fixed cosmic layer behind all content, matching the
   landing page. The sidebar/cards have their own opaque
   surfaces, so stars show through the page gutters. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 50% at 50% -10%, var(--focus-glow, rgba(99,102,241,0.20)) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 100% 100%, var(--focus-glow-2, rgba(74,222,222,0.12)) 0%, transparent 55%),
    radial-gradient(1.2px 1.2px at 20px 30px,  rgba(255,255,255,0.85), transparent),
    radial-gradient(1px 1px   at 130px 80px,   rgba(255,255,255,0.55), transparent),
    radial-gradient(1.4px 1.4px at 200px 160px, rgba(180,200,255,0.80), transparent),
    radial-gradient(1px 1px   at 90px 200px,   rgba(255,255,255,0.50), transparent),
    radial-gradient(1.2px 1.2px at 290px 60px,  rgba(255,255,255,0.70), transparent),
    radial-gradient(1px 1px   at 340px 240px,  rgba(200,220,255,0.55), transparent),
    radial-gradient(1.3px 1.3px at 60px 320px,  rgba(255,255,255,0.65), transparent),
    radial-gradient(1px 1px   at 250px 360px,  rgba(255,255,255,0.45), transparent);
  background-repeat: no-repeat, no-repeat, repeat, repeat, repeat, repeat, repeat, repeat, repeat, repeat;
  background-size: 100% 100%, 100% 100%, 400px 400px, 400px 400px, 400px 400px, 400px 400px, 400px 400px, 400px 400px, 400px 400px, 400px 400px;
  animation: star-drift 200s linear infinite;
}
@keyframes star-drift {
  from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
  to   { background-position: 0 0, 0 0, 400px 800px, -400px 600px, 300px -700px, -300px 500px, 500px 400px, -200px -600px, 400px 700px, -500px 300px; }
}
/* Light theme: clean, no starfield */
[data-theme="light"] body::before {
  background-image:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(99,102,241,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(15,118,110,0.05) 0%, transparent 55%);
  background-repeat: no-repeat, no-repeat;
  background-size: 100% 100%, 100% 100%;
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
}

/* ─── TYPOGRAPHY ───────────────────────────────────────── */
.f-brand { font-family: 'Shrikhand', cursive; font-weight: 400; }
.f-head  { font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.04em; font-weight: 700; }
.f-body  { font-family: 'Glacial Indifference', sans-serif; }
h1, h2, h3, h4, h5 {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.03em;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}

/* ─── ICONS ────────────────────────────────────────────── */
.icon { flex-shrink: 0; vertical-align: middle; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }

/* ─── AUTH LAYOUT ──────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: transparent;   /* show the sitewide starfield (body::before) */
}
[data-theme="light"] .auth-wrap {
  background: transparent;
}

/* ─── DASH LAYOUT ──────────────────────────────────────── */
.dash-wrap { display: flex; min-height: 100vh; position: relative; }

.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-soft);
  border-right: 1px solid var(--line);
  position: fixed;
  top: 0; left: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s;
}

.sb-logo {
  padding: 26px 20px 18px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--line);
}
.sb-logo img { width: 30px; height: 30px; object-fit: contain; }
.sb-logo .wordmark {
  font-family: 'Shrikhand', cursive;
  font-size: 24px;
  color: var(--brand);
  line-height: 1;
}
[data-theme="light"] .sb-logo .wordmark { color: #0F0F1E; }

.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  margin-left: auto;
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.85); }
}

.sb-nav {
  flex: 1;
  padding: 18px 14px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
}
.sb-sep {
  height: 1px;
  background: var(--line);
  margin: 12px 8px;
}
.sb-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mute-2);
  padding: 8px 14px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.18s ease;
  border: 1px solid transparent;
  position: relative;
}
.nav-item .icon { color: var(--mute); transition: color 0.18s; }
.nav-item:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.nav-item:hover .icon { color: var(--ink); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(99,102,241,0.14), rgba(74,222,222,0.06));
  color: var(--ink);
  border-color: rgba(99,102,241,0.25);
}
[data-theme="light"] .nav-item.active {
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(15,118,110,0.05));
  border-color: rgba(99,102,241,0.2);
}
.nav-item.active .icon { color: var(--brand); }
[data-theme="light"] .nav-item.active .icon { color: var(--brand); }

.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  line-height: 14px;
  min-width: 18px;
  text-align: center;
}

.sb-bottom {
  padding: 14px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}
.sb-user {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 4px;
}
.sb-user:hover { background: var(--surface-2); }
.sb-av {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--brand));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}
.sb-uname {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sb-plan {
  font-size: 11px;
  color: var(--mute);
  margin-top: 2px;
}
.sb-focus {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--brand);
  margin-top: 3px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sb-focus svg { flex-shrink: 0; opacity: 0.9; }
.sb-focus span { overflow: hidden; text-overflow: ellipsis; }

/* Theme toggle */
.theme-toggle {
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 10px;
  width: 100%;
}
.theme-toggle button {
  flex: 1;
  background: none;
  border: none;
  border-radius: 999px;
  padding: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--mute);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}
.theme-toggle button.active {
  background: var(--elev);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.theme-toggle button .icon { width: 14px; height: 14px; }

/* ─── MAIN ─────────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  overflow-y: auto;
  transition: margin 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}
.page {
  padding: var(--page-pad);
  padding-bottom: 80px;
  max-width: var(--page-max);
  animation: page-in 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── PAGE HEADER ──────────────────────────────────────── */
.ph {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: var(--gap-lg);
  flex-wrap: wrap;
}
.ph-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 38px;
  letter-spacing: 0.04em;
  color: var(--ink);
  line-height: 0.95;
}
.ph-sub {
  font-size: 14px;
  color: var(--mute);
  margin-top: 8px;
  font-weight: 500;
}

/* ─── CARDS ────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: var(--line-2);
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--line-2);
}
.card-lg { padding: 36px; }
.card-sm { padding: 20px; border-radius: var(--radius-sm); }

/* ─── BUTTONS ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-family: 'Glacial Indifference', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn .icon { width: 15px; height: 15px; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #0A0A14;
}
[data-theme="light"] .btn-primary {
  background: linear-gradient(135deg, #0F0F1E, #1F2937);
  color: #FFFFFF;
}
.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(74,222,222,0.25);
}
[data-theme="light"] .btn-primary:hover {
  box-shadow: 0 6px 20px rgba(17,24,39,0.15);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-secondary:hover { background: var(--elev); border-color: var(--line-3); }

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: var(--line-2);
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--line-3);
}

.btn-danger {
  background: rgba(248,113,113,0.1);
  color: var(--red);
  border-color: rgba(248,113,113,0.28);
}
.btn-danger:hover { background: rgba(248,113,113,0.18); }

.btn-success {
  background: rgba(52,211,153,0.12);
  color: var(--green);
  border-color: rgba(52,211,153,0.28);
}
.btn-success:hover { background: rgba(52,211,153,0.2); }

.btn-sm  { padding: 7px 14px; font-size: 12px; border-radius: 8px; }
.btn-sm .icon { width: 13px; height: 13px; }
.btn-lg  { padding: 14px 28px; font-size: 14.5px; border-radius: 12px; }
.btn-xl  { padding: 16px 32px; font-size: 15px; border-radius: 14px; }
.w-full  { width: 100%; }

/* ─── BADGES ───────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}
.badge .icon { width: 11px; height: 11px; }

.bg-blue   { background: rgba(99,102,241,0.14);  color: var(--blue-l);  border-color: rgba(99,102,241,0.28); }
.bg-green  { background: rgba(52,211,153,0.12);  color: var(--green);   border-color: rgba(52,211,153,0.26); }
.bg-amber  { background: rgba(251,191,36,0.12);  color: var(--amber);   border-color: rgba(251,191,36,0.28); }
.bg-red    { background: rgba(248,113,113,0.12); color: var(--red);     border-color: rgba(248,113,113,0.28); }
.bg-purple { background: rgba(167,139,250,0.12); color: var(--purple);  border-color: rgba(167,139,250,0.28); }
.bg-cyan   { background: rgba(74,222,222,0.1);   color: var(--brand);   border-color: rgba(74,222,222,0.26); }
.bg-gray   { background: var(--surface-2);       color: var(--mute);    border-color: var(--line-2); }

.badge-adopter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
  color: #1A1206;
  border: 1px solid rgba(251,191,36,0.5);
  box-shadow: 0 2px 10px rgba(245,158,11,0.3);
}
.badge-adopter::before { content: '★'; font-size: 11px; }

/* ─── FORMS ────────────────────────────────────────────── */
.fg { margin-bottom: 18px; }
.fl {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mute);
  margin-bottom: 8px;
}
.fi {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  color: var(--ink);
  font-family: 'Glacial Indifference', sans-serif;
  font-size: 14px;
  padding: 12px 15px;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background-color 0.18s;
}
[data-theme="light"] .fi { background: var(--bg-soft); }
.fi:focus {
  border-color: var(--brand);
  box-shadow: var(--ring);
}
.fi::placeholder { color: var(--mute-2); }
textarea.fi { resize: vertical; min-height: 84px; line-height: 1.55; }
select.fi { cursor: pointer; }

/* ─── TOGGLE SWITCH ────────────────────────────────────── */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  gap: 18px;
}
.toggle-row:last-child { border-bottom: none; padding-bottom: 0; }
.toggle-row:first-child { padding-top: 0; }
.tr-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.tr-desc {
  font-size: 12.5px;
  color: var(--mute);
  margin-top: 4px;
  line-height: 1.55;
}
.tgl {
  width: 44px; height: 24px;
  border-radius: 999px;
  background: var(--line-3);
  position: relative;
  cursor: pointer;
  border: none;
  flex-shrink: 0;
  transition: background 0.22s;
}
.tgl.on { background: var(--brand); }
.tgl::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.tgl.on::after { transform: translateX(20px); }

/* ─── STAT CARDS ───────────────────────────────────────── */
.stats {
  display: grid;
  gap: var(--gap);
  margin-bottom: var(--gap-lg);
}
.stats-4 { grid-template-columns: repeat(4, 1fr); }
.stats-3 { grid-template-columns: repeat(3, 1fr); }
.stats-2 { grid-template-columns: repeat(2, 1fr); }

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: all 0.2s;
  position: relative;
}
.stat:hover {
  border-color: var(--line-2);
  transform: translateY(-1px);
}
.stat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.stat-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mute);
}
.stat-icon.brand { background: rgba(74,222,222,0.12); color: var(--brand); }
.stat-icon.green { background: rgba(52,211,153,0.12); color: var(--green); }
.stat-icon.amber { background: rgba(251,191,36,0.12); color: var(--amber); }
.stat-icon.blue  { background: rgba(99,102,241,0.12); color: var(--blue-l); }
.stat-lbl {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mute);
}
.stat-val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 34px;
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1;
}
.stat-hint {
  font-size: 12px;
  color: var(--mute);
  margin-top: 8px;
}
/* Legacy icon position (pre-migration pages) */
.stat-old-icon-hidden {
  position: absolute;
  right: 18px;
  top: 18px;
  font-size: 22px;
  opacity: 0.2;
}

/* ─── GRID LAYOUTS ─────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--gap); }
.grid-2-wide { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--gap-lg); }

/* ─── SECTION TITLE ────────────────────────────────────── */
.sec-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--mute);
  margin-bottom: 18px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sec-title .icon { color: var(--brand); }

/* ─── PROGRESS BAR ─────────────────────────────────────── */
.prog-bar {
  background: var(--surface-2);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}
.prog-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.prog-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: prog-shine 2s ease-in-out infinite;
}
@keyframes prog-shine {
  0%, 100% { transform: translateX(-100%); }
  50%      { transform: translateX(100%); }
}

/* ─── CHECKLIST ────────────────────────────────────────── */
.checklist-card {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: var(--gap-lg);
  position: relative;
  overflow: hidden;
}
.checklist-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--blue));
}
.checklist-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: transform 0.18s;
}
.checklist-item:last-child { border-bottom: none; padding-bottom: 4px; }
.checklist-item:first-child { padding-top: 4px; }
.checklist-item:hover { transform: translateX(4px); }
.cl-check {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--line-3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s;
  color: transparent;
  background: var(--surface-2);
}
.checklist-item.done .cl-check {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.checklist-item.done .cl-title {
  text-decoration: line-through;
  color: var(--mute);
}
.cl-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.cl-desc  { font-size: 12px; color: var(--mute); margin-top: 3px; }
.cl-arrow {
  margin-left: auto;
  color: var(--mute-2);
  transition: transform 0.18s, color 0.18s;
}
.checklist-item:hover .cl-arrow { color: var(--brand); transform: translateX(3px); }

/* ─── ANDY HERO (agent banner) ─────────────────────────── */
.andy-hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  margin-bottom: var(--gap-lg);
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
  overflow: hidden;
}
.andy-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(74,222,222,0.12), transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}
.andy-av {
  width: 62px; height: 62px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--blue), var(--brand));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 8px 24px rgba(99,102,241,0.3);
}
.andy-av::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 22px;
  border: 2px solid var(--brand);
  opacity: 0.4;
  animation: andy-ring 2.4s ease-in-out infinite;
}
@keyframes andy-ring {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50%      { transform: scale(1.08); opacity: 0; }
}
.andy-av .icon { width: 32px; height: 32px; }

.andy-info { flex: 1; min-width: 220px; position: relative; }
.andy-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  letter-spacing: 0.04em;
  color: var(--ink);
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}
.andy-status {
  font-size: 12.5px;
  color: var(--brand);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
[data-theme="light"] .andy-status { color: var(--blue); }
.andy-desc {
  font-size: 14px;
  color: var(--ink-2);
  margin-top: 10px;
  line-height: 1.6;
  max-width: 520px;
}
.andy-pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 8px var(--brand);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

/* ─── DREAMR LINK CARD ──────────────────────────────────── */
.dl-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 34px;
  margin-bottom: var(--gap-lg);
  position: relative;
  overflow: hidden;
}
.dl-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand), var(--blue));
}
.dl-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.dl-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 4px;
}
.dl-sub { font-size: 13.5px; color: var(--mute); }
.dl-link {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 14px 18px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.dl-link-url {
  flex: 1;
  min-width: 180px;
  font-family: 'Glacial Indifference', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--brand);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[data-theme="light"] .dl-link-url { color: var(--blue); }

/* ─── THREAD LIST (Andy conversations) ─────────────────── */
.thread-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.thread-item {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  cursor: pointer;
  transition: background 0.18s;
}
.thread-item:last-child { border-bottom: none; }
.thread-item:hover { background: var(--surface-2); }
.thread-av {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--brand));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}
.thread-body { flex: 1; min-width: 0; }
.thread-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}
.thread-name {
  font-weight: 800;
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thread-time {
  font-size: 11.5px;
  color: var(--mute-2);
  flex-shrink: 0;
  font-weight: 600;
}
.thread-snippet {
  font-size: 13px;
  color: var(--mute);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.thread-tags {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* ─── DRAFT / DECISION CARD ────────────────────────────── */
.decision-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 14px;
  animation: decision-in 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes decision-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.decision-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.decision-to {
  font-weight: 800;
  color: var(--ink);
  font-size: 14px;
}
.decision-reason {
  font-size: 12.5px;
  color: var(--mute);
  margin-bottom: 14px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-radius: 10px;
  border-left: 2px solid var(--amber);
}
.decision-body {
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 18px 20px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.65;
  margin-bottom: 16px;
  white-space: pre-wrap;
}
.decision-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ─── CHAT BUBBLES ─────────────────────────────────────── */
.chat-msg { display: flex; gap: 10px; margin-bottom: 14px; animation: msg-in 0.3s ease both; }
.chat-msg.user { flex-direction: row-reverse; }
@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-bubble {
  max-width: 78%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.55;
}
.chat-msg.assistant .chat-bubble {
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.chat-msg.user .chat-bubble {
  background: linear-gradient(135deg, var(--blue), var(--blue-l));
  color: white;
  border-bottom-right-radius: 4px;
}
.chat-av {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
}
.chat-av.andy { background: linear-gradient(135deg, var(--blue), var(--brand)); }
.chat-av.user { background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink); }

/* ─── MODAL ────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: modal-bg 0.25s ease;
}
@keyframes modal-bg {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal {
  background: var(--bg-soft);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-xl);
  padding: 36px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}
.modal-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.modal-close {
  background: none;
  border: none;
  color: var(--mute);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  transition: all 0.15s;
}
.modal-close:hover { background: var(--surface-2); color: var(--ink); }

/* ─── TOAST ────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  padding: 14px 20px;
  background: var(--elev);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  animation: toast-in 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  max-width: 360px;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.warning { border-left: 3px solid var(--amber); }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ─── TOUR OVERLAY ─────────────────────────────────────── */
.tour-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: modal-bg 0.3s ease;
}
.tour-card {
  background: var(--bg-soft);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.tour-icon {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--blue), var(--brand));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  animation: tour-float 3s ease-in-out infinite;
}
.tour-icon .icon { width: 36px; height: 36px; }
@keyframes tour-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.tour-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 14px;
  line-height: 1.05;
}
.tour-body {
  font-size: 14.5px;
  color: var(--mute);
  line-height: 1.7;
  margin-bottom: 28px;
}
.tour-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}
.tour-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line-3);
  transition: all 0.28s;
}
.tour-dot.active {
  background: var(--brand);
  width: 24px;
  border-radius: 4px;
}

/* ─── HAMBURGER (mobile) ───────────────────────────────── */
#ham {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 100;
  background: var(--elev);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* ─── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 1100px) {
  .stats-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2-wide { grid-template-columns: 1fr; }
  .ph-title { font-size: 34px; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .page { padding: 72px 18px 32px; }
  #ham { display: flex; align-items: center; justify-content: center; }
  .ph { gap: 14px; }
  .ph-title { font-size: 30px; }
  .stats-4, .stats-3, .stats-2 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .card { padding: 22px; }
  .card-lg { padding: 24px; }
  .andy-hero { padding: 22px; gap: 16px; flex-wrap: wrap; }
  .andy-av { width: 54px; height: 54px; }
  .andy-name { font-size: 22px; }
  .stat { padding: 18px 20px; }
  .stat-val { font-size: 28px; }
  .dl-card { padding: 22px 24px; }
  .dl-title { font-size: 20px; }
  .modal { padding: 26px; }
  .tour-card { padding: 32px 26px; }
  .tour-title { font-size: 26px; }
  .toast { left: 14px; right: 14px; bottom: 14px; max-width: none; }
}
@media (max-width: 480px) {
  .stats-4, .stats-3, .stats-2 { grid-template-columns: 1fr; }
  .ph { flex-direction: column; align-items: flex-start; }
  .page { padding: 68px 14px 24px; }
}

/* Notification panel */
#notif-panel {
  position: fixed;
  top: 0; right: 0;
  width: min(400px, 100vw);
  height: 100vh;
  background: var(--bg-soft);
  border-left: 1px solid var(--line-2);
  z-index: 150;
  overflow-y: auto;
  box-shadow: -16px 0 48px rgba(0,0,0,0.25);
  animation: slide-right 0.28s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes slide-right {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

/* ─── NOTIFICATION BELL (always-visible, top-right) ──────── */
.notif-bell-fab {
  position: fixed;
  top: 18px; right: 18px;
  z-index: 140;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.notif-bell-fab:hover { transform: translateY(-1px); border-color: var(--brand); color: var(--brand); }
.notif-bell-fab .notif-badge {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}
.notif-bell-fab.ring { animation: bell-ring 0.6s ease; }
@keyframes bell-ring {
  0%,100% { transform: rotate(0); }
  20% { transform: rotate(-16deg); }
  40% { transform: rotate(12deg); }
  60% { transform: rotate(-8deg); }
  80% { transform: rotate(4deg); }
}
/* Tuck the bell beside the hamburger on phones */
@media (max-width: 768px) {
  .notif-bell-fab { top: 12px; right: 12px; width: 40px; height: 40px; }
}

/* ─── FIRST-RUN TOUR (coach-mark tooltips) ───────────────── */
.tour-overlay {
  position: fixed; inset: 0;
  background: rgba(5, 5, 14, 0.62);
  z-index: 9000;
  animation: fade-in 0.2s ease both;
}
.tour-ring {
  position: fixed;
  z-index: 9001;
  border-radius: 12px;
  box-shadow: 0 0 0 3px var(--brand), 0 0 22px rgba(74,222,222,0.55);
  background: transparent;
  pointer-events: none;
  transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease;
}
.tour-pop {
  position: fixed;
  z-index: 9002;
  width: min(300px, calc(100vw - 24px));
  background: var(--elev);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.55);
  animation: fade-in 0.2s ease both;
}
.tour-step-count {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 11px; letter-spacing: 0.14em;
  color: var(--brand);
  margin-bottom: 8px;
}
.tour-title { font-size: 16px; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.tour-body  { font-size: 13px; color: var(--mute); line-height: 1.55; margin-bottom: 16px; }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-skip {
  background: none; border: none; color: var(--mute);
  font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 6px 4px;
}
.tour-skip:hover { color: var(--ink); }
.tour-next {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #0d0d1a; border: none;
  font-size: 13px; font-weight: 800; cursor: pointer;
  padding: 9px 18px; border-radius: 10px;
  transition: transform 0.12s;
}
.tour-next:hover { transform: translateY(-1px); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Helpers */
.flex { display: flex; }
.items-c { align-items: center; }
.items-s { align-items: flex-start; }
.j-between { justify-content: space-between; }
.j-end { justify-content: flex-end; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.text-xs { font-size: 11px; }
.text-sm { font-size: 13px; }
.text-mute { color: var(--mute); }
.text-ink { color: var(--ink); }
.text-brand { color: var(--brand); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 18px; }
.mb-5 { margin-bottom: 28px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 18px; }
.mt-5 { margin-top: 28px; }

/* Fade-in utility */
.fade-in { animation: page-in 0.45s cubic-bezier(0.4, 0, 0.2, 1) both; }
.stagger-1 { animation-delay: 0.04s; }
.stagger-2 { animation-delay: 0.08s; }
.stagger-3 { animation-delay: 0.12s; }
.stagger-4 { animation-delay: 0.16s; }

/* ============================================================
   Requests page — card styling
   ============================================================ */
#req-list { display: flex; flex-direction: column; gap: 12px; }
.req-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.req-item:hover { border-color: var(--line-3); transform: translateY(-1px); background: var(--surface-2); }
.req-item.sel { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.req-name { font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.req-val  { font-size: 15px; font-weight: 800; color: var(--green); }
.req-msg  {
  font-size: 12.5px; color: var(--ink-2); line-height: 1.55; margin-top: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ============================================================
   Sightings page — card styling
   ============================================================ */
#sightings-list { display: flex; flex-direction: column; gap: 12px; }
.sig-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color .15s ease, transform .15s ease;
}
.sig-item:hover { border-color: var(--line-3); transform: translateY(-1px); }
.sig-dimmed { opacity: .55; }
.sig-plat {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.sig-body { flex: 1; min-width: 0; }
.sig-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sig-user { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.sig-quote {
  font-size: 13px; color: var(--ink-2); line-height: 1.55; margin-top: 6px;
  padding-left: 12px; border-left: 2px solid var(--line-3); font-style: italic;
}
.sig-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ============================================================
   Andy chat (creator's own agent) — agent.html
   ============================================================ */
.andy-chat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
}
.andy-chat-msgs {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px; max-height: 360px; min-height: 160px; overflow-y: auto;
}
.andy-msg {
  max-width: 80%; padding: 10px 13px; border-radius: 14px;
  font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word;
}
.andy-msg-a { align-self: flex-start; background: var(--surface-2); color: var(--ink); border-bottom-left-radius: 4px; }
.andy-msg-u { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.andy-chat-input {
  display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--bg-soft);
}
.andy-chat-input .fi { flex: 1; }

/* ============================================================
   Mobile bottom tab bar + phone refinements
   ============================================================ */
.tabbar { display: none; }

@media (max-width: 768px) {
  /* Hide the floating hamburger; the tab bar's "More" opens the drawer */
  #ham { display: none !important; }

  /* A slim, simple top spacing instead of the big floating button */
  .page { padding: 20px 16px calc(76px + env(safe-area-inset-bottom)) !important; }

  /* Bottom tab bar */
  .tabbar {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: color-mix(in srgb, var(--bg-soft) 92%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line-2);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around;
    align-items: stretch;
  }
  .tabbar-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 7px 2px; border-radius: 12px; text-decoration: none;
    color: var(--mute); font-size: 10.5px; font-weight: 600; position: relative;
    transition: color .15s ease, background .15s ease;
  }
  .tabbar-item svg { width: 21px; height: 21px; }
  .tabbar-item.active { color: var(--brand); }
  .tabbar-item.active svg { stroke: var(--brand); }
  .tabbar-badge {
    position: absolute; top: 2px; right: 22%;
    min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
    background: #ef4444; color: #fff; font-size: 9px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
  }

  /* Calmer, less saturated phone surfaces: softer cards, more breathing room */
  .card, .card-lg { border-radius: 16px; box-shadow: none; }
  .stat { border-radius: 14px; }
  .sec-title { letter-spacing: .04em; }

  /* Single-column everything on phones for easy scanning */
  .stats-4, .stats-3, .stats-2 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .grid-2, .grid-3, .grid-2-wide { grid-template-columns: 1fr !important; }

  /* Tighter hero + headings so the screen isn't crowded */
  .ph-title { font-size: 26px; }
  .andy-hero { padding: 18px; border-radius: 18px; }
  .modal { padding: 22px; border-radius: 18px; }
}

@media (max-width: 420px) {
  .stats-4, .stats-3, .stats-2 { grid-template-columns: 1fr; }
  .tabbar-item span { font-size: 10px; }
  .ph-title { font-size: 23px; }
}

/* ============================================================
   CREATIVE-FOCUS PERSONA LAYER
   Accent vars (--brand/--brand-2) are already swapped per focus by
   applyFocus(); these rules add the elegant, persona-specific
   touches: card accents, a sidebar signature, and a hero gradient.
   Subtle by design — personalization, not noise.
   ============================================================ */

/* Cards lift toward the persona accent on hover (all personas) */
.card { transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.card:hover {
  border-color: var(--accent-line, var(--line-3));
}

/* Active nav item carries a persona-accent rail */
.sidebar .nav-item.active {
  position: relative;
}
.sidebar .nav-item.active::before {
  content: "";
  position: absolute;
  left: 0; top: 18%; bottom: 18%;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--focus-grad, linear-gradient(135deg, var(--brand), var(--brand-2)));
}

/* Sidebar brand gets a faint persona underglow */
.sb-logo .wordmark {
  text-shadow: 0 0 22px var(--accent-soft, transparent);
}

/* A reusable persona hero band (used on dashboard) */
.persona-band {
  position: relative;
  border-radius: 18px;
  padding: 22px 24px;
  margin-bottom: 22px;
  background:
    linear-gradient(135deg, var(--accent-soft, rgba(74,222,222,.10)), transparent 70%),
    var(--surface);
  border: 1px solid var(--accent-line, var(--line-2));
  overflow: hidden;
}
.persona-band::after {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: var(--focus-grad, linear-gradient(135deg, var(--brand), var(--brand-2)));
  opacity: 0.10;
  filter: blur(8px);
  pointer-events: none;
}
.persona-band .pb-glyph {
  width: 46px; height: 46px;
  border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--focus-grad, linear-gradient(135deg, var(--brand), var(--brand-2)));
  color: #0c0c16;
  flex-shrink: 0;
}
.persona-band .pb-kicker {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 12px; letter-spacing: 0.16em;
  color: var(--brand);
  margin-bottom: 3px;
}
.persona-band .pb-title { font-size: 20px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.persona-band .pb-vibe  { font-size: 13px; color: var(--mute); margin-top: 4px; }

/* Persona chip (small badge used in headers / onboarding) */
.persona-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--brand);
  font-size: 12.5px; font-weight: 700;
}

/* ============================================================
   CREATIVE-FOCUS PERSONALIZATION
   - Always-on (every user): accent colour + glow + greeting only.
   - Focus Mode ON ([data-focus-mode="on"]): a bold re-theme —
     card skins, headers, nav, stat tiles and per-craft "families"
     so each creative type genuinely looks like its own product.
   ============================================================ */

.persona-greeting {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.04em; color: var(--brand);
  font-size: 12px; text-transform: uppercase; margin-bottom: 2px;
}
.persona-vibe { font-size: 13px; color: var(--mute); }

/* Sidebar workspace label */
.sb-workspace {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; margin: 6px 10px 8px;
  border-radius: 10px;
  background: var(--focus-glow, transparent);
  border: 1px solid var(--accent-line, transparent);
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--brand);
}
.sb-workspace .icon { color: var(--brand); }
[data-focus-mode="off"] .sb-workspace { display: none; }

/* ─────────── FOCUS MODE: global re-theme ─────────── */

/* Whole-app accent wash so the colour identity is unmistakable */
[data-focus-mode="on"] body::before,
[data-focus-mode="on"].app::before { }
[data-focus-mode="on"] .main {
  background:
    radial-gradient(120% 60% at 50% -10%, var(--focus-glow) 0%, transparent 55%),
    radial-gradient(80% 50% at 100% 110%, var(--focus-glow-2) 0%, transparent 50%);
}

/* Cards: tinted surface, craft radius, accent border + accent top band */
[data-focus-mode="on"] .card {
  border-radius: var(--focus-radius, 16px);
  border: 1px solid var(--accent-line);
  background:
    linear-gradient(180deg, var(--focus-glow) 0%, transparent 40%),
    var(--surface);
  position: relative;
  overflow: hidden;
  transition: box-shadow .18s, transform .18s;
}
[data-focus-mode="on"] .card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0;
  height: 4px; background: var(--focus-grad, var(--brand)); opacity: .95;
}
[data-focus-mode="on"] .card:hover {
  box-shadow: 0 14px 40px var(--focus-glow);
  transform: translateY(-2px);
}

/* Section + page titles take the accent */
[data-focus-mode="on"] .sec-title,
[data-focus-mode="on"] .ph-title,
[data-focus-mode="on"] .pb-title { color: var(--brand); }
[data-focus-mode="on"] .sec-title {
  border-left: 3px solid var(--brand);
  padding-left: 10px;
}

/* Sidebar active item → bold filled accent pill */
[data-focus-mode="on"] .sb-nav .nav-item.active {
  background: var(--focus-grad);
  color: #0a0a14;
  box-shadow: 0 6px 18px var(--focus-glow);
}
[data-focus-mode="on"] .sb-nav .nav-item.active .icon,
[data-focus-mode="on"] .sb-nav .nav-item.active span { color: #0a0a14; }

/* Stat / KPI tiles: accent gradient + accent figures */
[data-focus-mode="on"] .stat-card,
[data-focus-mode="on"] .kpi-card,
[data-focus-mode="on"] .stat {
  background: linear-gradient(165deg, var(--focus-glow) 0%, var(--surface) 70%);
  border-color: var(--accent-line);
}
[data-focus-mode="on"] .stat-num,
[data-focus-mode="on"] .kpi-num,
[data-focus-mode="on"] .stat-value { color: var(--brand); }

/* Buttons, chips, badges, inputs all align to the craft accent */
[data-focus-mode="on"] .btn-primary { box-shadow: 0 8px 24px var(--focus-glow); }
[data-focus-mode="on"] .badge,
[data-focus-mode="on"] .pill { border-color: var(--accent-line); }
[data-focus-mode="on"] .fi:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Persona band (dashboard hero) gets a craft-tinted backdrop */
[data-focus-mode="on"] .persona-band {
  background: linear-gradient(135deg, var(--focus-glow) 0%, transparent 70%), var(--surface);
  border: 1px solid var(--accent-line);
  border-radius: var(--focus-radius, 16px);
}

/* ─── Per-craft "families": each focus its own silhouette ─── */

/* GALLERY — Photographer / Videographer: crisp, image-forward, thin underline header */
[data-focus-mode="on"][data-focus="photographer"] .card,
[data-focus-mode="on"][data-focus="videographer"] .card { border-radius: 6px; }
[data-focus-mode="on"][data-focus="photographer"] .card::before,
[data-focus-mode="on"][data-focus="videographer"] .card::before {
  height: 100%; width: 4px; right: auto; background: var(--focus-grad);
}

/* STUDIO-SOFT — Musician / Influencer / Visual Artist / Illustrator: soft, glowy, rounded */
[data-focus-mode="on"][data-focus="musician"] .card,
[data-focus-mode="on"][data-focus="influencer"] .card,
[data-focus-mode="on"][data-focus="visual-artist"] .card,
[data-focus-mode="on"][data-focus="illustrator"] .card {
  border-radius: 22px;
  box-shadow: 0 2px 18px var(--focus-glow);
}
[data-focus-mode="on"][data-focus="musician"] .card::before,
[data-focus-mode="on"][data-focus="influencer"] .card::before { height: 5px; }

/* EDITORIAL-SHARP — Writer / Graphic Designer: minimal, sharp, strong left rule */
[data-focus-mode="on"][data-focus="writer"] .card,
[data-focus-mode="on"][data-focus="graphic-designer"] .card { border-radius: 4px; }
[data-focus-mode="on"][data-focus="writer"] .card::before,
[data-focus-mode="on"][data-focus="graphic-designer"] .card::before {
  height: 100%; width: 5px; right: auto; background: var(--focus-grad); opacity: 1;
}

/* Compact creative-focus picker (settings) */
.focus-grid-sm {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (max-width: 560px) { .focus-grid-sm { grid-template-columns: repeat(2, 1fr); } }
.focus-chip {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 13px 6px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1.5px solid var(--line-2);
  color: var(--mute);
  cursor: pointer;
  transition: transform .14s, border-color .14s, color .14s, background .14s;
  text-align: center;
}
.focus-chip:hover { transform: translateY(-2px); color: var(--ink); border-color: var(--line-3); }
.focus-chip .focus-chip-ic {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c) 16%, transparent);
  color: var(--c);
}
.focus-chip .focus-chip-lbl { font-size: 10.5px; font-weight: 600; line-height: 1.2; }
.focus-chip.selected {
  border-color: var(--c); color: var(--ink);
  background: color-mix(in srgb, var(--c) 10%, var(--surface-2));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent);
}
.focus-chip.selected .focus-chip-ic { background: var(--c); color: #0d0d1a; }

/* ============================================================
   v5 — PWA + MOBILE POLISH LAYER
   Safe-area (notch) handling, standalone niceties, tap feedback,
   and a few icon/UI refinements. Appended last so it wins.
   ============================================================ */

/* Respect the notch/status bar when installed as a standalone PWA */
@media (max-width: 768px) {
  .sidebar { padding-top: calc(16px + env(safe-area-inset-top)); }
  /* Give page content a little top breathing room under the status bar */
  .main { padding-top: env(safe-area-inset-top); }
  /* Notification bell FAB clears the notch */
  .notif-bell-fab {
    top: calc(12px + env(safe-area-inset-top)) !important;
    right: calc(12px + env(safe-area-inset-right)) !important;
  }
}

/* Standalone (home-screen) app: hide anything browser-chrome-ish, feel native */
@media (display-mode: standalone) {
  body { overscroll-behavior-y: contain; }         /* no rubber-band white flash */
  a, button { -webkit-tap-highlight-color: transparent; }
}

/* Crisp tap feedback on touch devices (buttons + nav + tabbar) */
@media (hover: none) {
  .btn:active, .nav-item:active, .tabbar-item:active,
  .adm-mini-btn:active, .focus-chip:active {
    transform: scale(.97);
    transition: transform .05s ease;
  }
  .tabbar-item:active { background: color-mix(in srgb, var(--brand) 12%, transparent); }
}

/* Smoother active tab pill on mobile */
@media (max-width: 768px) {
  .tabbar-item.active {
    background: color-mix(in srgb, var(--brand) 14%, transparent);
  }
  .tabbar-item.active::before {
    content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 22px; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand);
  }
  /* Larger, comfier touch targets */
  .btn { min-height: 44px; }
  .btn-sm { min-height: 38px; }
  .fi, input.fi, select.fi { min-height: 46px; font-size: 16px; } /* 16px = no iOS zoom */
}

/* Icons: consistent stroke rendering + gentle alignment */
.icon { flex-shrink: 0; vertical-align: middle; }
.nav-item .icon, .tabbar-item .icon { transition: transform .15s ease, stroke .15s ease; }
.nav-item:hover .icon { transform: translateX(1px); }

/* Nicer scrollbars on desktop (webkit) */
@media (hover: hover) {
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
  ::-webkit-scrollbar-thumb:hover { background: var(--line-3); }
}

/* Install banner sits above the tab bar on mobile */
@media (max-width: 768px) {
  #pwa-banner { bottom: calc(84px + env(safe-area-inset-bottom)) !important; }
}
