/* ============================================================
   LifeOps — Premium Design System v2
   Slate/ink neutrals · deep ocean-blue primary · teal accent ·
   gold achievement · emerald/amber/rose semantics. No purple.
   Inspired by Stripe / Microsoft / Apple / Notion.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  --bg: #f4f6f9;
  --bg-grad-1: rgba(37, 99, 235, 0.07);
  --bg-grad-2: rgba(13, 148, 136, 0.06);
  --surface: #ffffff;
  --surface-2: #f3f5f8;
  --surface-3: #e9edf2;
  --surface-glass: rgba(255, 255, 255, 0.78);

  --text: #0b1524;
  --text-2: #3a475a;
  --muted: #677488;
  --line: #e6eaf0;
  --line-2: #d4dbe5;

  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --primary-700: #1e40af;
  --primary-soft: rgba(37, 99, 235, 0.09);
  --primary-soft-2: rgba(37, 99, 235, 0.15);
  --violet: #0d9488;            /* accent (teal) — replaces old violet */
  --violet-soft: rgba(13, 148, 136, 0.12);
  --teal: #0d9488;
  --sky: #0ea5e9;

  --gold: #a16207;
  --gold-2: #d4a017;
  --gold-soft: rgba(212, 160, 23, 0.16);

  --good: #0f8a52;
  --good-soft: rgba(15, 138, 82, 0.12);
  --warn: #b4690e;
  --warn-soft: rgba(180, 105, 14, 0.14);
  --danger: #dc2626;
  --danger-2: #b91c1c;
  --danger-soft: rgba(220, 38, 38, 0.10);
  --info: #0a87c9;
  --rose: #e11d6b;
  --rose-2: #be123c;
  --rose-soft: rgba(225, 29, 107, 0.12);

  --ring-track: #e8ecf2;

  --shadow-sm: 0 1px 2px rgba(11, 21, 36, 0.05), 0 1px 3px rgba(11, 21, 36, 0.04);
  --shadow-md: 0 8px 24px -12px rgba(11, 21, 36, 0.16), 0 2px 6px -2px rgba(11, 21, 36, 0.05);
  --shadow-lg: 0 28px 56px -24px rgba(11, 21, 36, 0.26), 0 10px 22px -12px rgba(11, 21, 36, 0.10);
  --shadow-primary: 0 14px 30px -14px rgba(37, 99, 235, 0.45);

  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  --max-w: 1240px;
  --sidebar-w: 264px;
  --font-head: "Plus Jakarta Sans", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg: #090c16;
  --bg-grad-1: rgba(37, 99, 235, 0.18);
  --bg-grad-2: rgba(13, 148, 136, 0.14);
  --surface: #111729;
  --surface-2: #161d33;
  --surface-3: #1c2540;
  --surface-glass: rgba(17, 23, 41, 0.72);

  --text: #eef2fc;
  --text-2: #c2ccdf;
  --muted: #8593ad;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);

  --primary: #5b9bff;
  --primary-600: #3b82f6;
  --primary-700: #2563eb;
  --primary-soft: rgba(91, 155, 255, 0.14);
  --primary-soft-2: rgba(91, 155, 255, 0.22);
  --violet: #2dd4bf;
  --violet-soft: rgba(45, 212, 191, 0.16);
  --teal: #2dd4bf;
  --sky: #38bdf8;

  --gold: #e7b53c;
  --gold-2: #f5c84b;
  --gold-soft: rgba(245, 200, 75, 0.16);

  --good: #34d39e;
  --good-soft: rgba(52, 211, 158, 0.16);
  --warn: #fbbf3a;
  --warn-soft: rgba(251, 191, 58, 0.16);
  --danger: #ff6b81;
  --danger-2: #ff4d68;
  --danger-soft: rgba(255, 107, 129, 0.14);
  --info: #38bdf8;
  --rose: #fb7baf;
  --rose-2: #f43f8e;
  --rose-soft: rgba(251, 123, 175, 0.16);

  --ring-track: rgba(255, 255, 255, 0.10);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 26px -14px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 30px 60px -28px rgba(0, 0, 0, 0.8);
  --shadow-primary: 0 16px 34px -14px rgba(59, 130, 246, 0.5);
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { min-height: 100%; -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background: linear-gradient(
    165deg,
    #9ec8e8 0%,
    #b4d4ec 16%,
    #c8dfee 30%,
    #d8e8ef 44%,
    #e4e0db 58%,
    #ead8cc 72%,
    #eacfbb 84%,
    #e6c8b0 100%
  );
  background-attachment: fixed;
  font-family: var(--font-body);
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[data-theme="dark"] body {
  background:
    radial-gradient(1100px 520px at 12% -8%, var(--bg-grad-1), transparent 60%),
    radial-gradient(900px 480px at 92% 0%, var(--bg-grad-2), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 800; letter-spacing: -0.02em; margin: 0; line-height: 1.18; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary); }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

::selection { background: var(--primary-soft-2); }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 40%, transparent); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--muted) 60%, transparent); background-clip: padding-box; }

/* ============================================================
   Loading splash
   ============================================================ */
.splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background:
    radial-gradient(700px 400px at 50% 30%, rgba(37,99,235,0.18), transparent 70%),
    var(--bg);
  transition: opacity .55s ease, visibility .55s ease;
}
.splash.splash-hide { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-inner { display: grid; justify-items: center; gap: 14px; text-align: center; animation: floatUp .7s ease both; }
.splash-logo {
  width: 92px; height: 92px; border-radius: 26px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #2563eb, #0d9488);
  box-shadow: 0 24px 50px -18px rgba(37,99,235,0.7);
  animation: pulseGlow 2.2s ease-in-out infinite;
}
.splash-word { font-family: var(--font-head); font-weight: 800; font-size: 34px; letter-spacing: -0.03em; }
.splash-tag { color: var(--muted); font-size: 14px; margin-top: -6px; }
.splash-bar { width: 220px; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.splash-bar span { display: block; height: 100%; width: 40%; border-radius: 999px; background: linear-gradient(90deg, #2563eb, #0d9488); animation: loadSlide 1.1s ease-in-out infinite; }
.splash-status { color: var(--muted); font-size: 13px; min-height: 18px; }

@keyframes loadSlide { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }
@keyframes pulseGlow { 0%,100% { transform: translateY(0) scale(1); box-shadow: 0 24px 50px -18px rgba(37,99,235,0.6);} 50% { transform: translateY(-4px) scale(1.03); box-shadow: 0 30px 60px -16px rgba(13,148,136,0.7);} }
@keyframes floatUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   Auth screen — ZettaJoule-inspired Light Editorial Premium
   Sky-blue → warm cream canvas · thin white type · airy, bright
   Inspired by zetta-joule.com / aimees-papercraft-world.com
   ============================================================ */

/* ─── Base canvas: sky-blue top → soft cream bottom (exactly ZJ) ─── */
.auth-screen {
  position: fixed; inset: 0; z-index: 900; overflow: auto;
  background: #b8d4e8;
}
.auth-scene {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 20px;
  background: linear-gradient(
    180deg,
    #9ec8e8 0%,
    #b8d6ea 18%,
    #cce0ec 35%,
    #dce8ee 50%,
    #e8e0d8 68%,
    #e8d8c8 82%,
    #e4ceb8 100%
  );
}
/* Subtle noise texture (barely visible) */
.auth-scene::after {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
}

/* ─── Outer wrap ─── */
.auth-wrap {
  width: min(460px, 100%); position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  animation: floatUp .5s cubic-bezier(.22,.68,0,1.15) both;
}

/* ─── Wordmark — large, thin, white (like ZJ hero text) ─── */
.auth-logo {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  margin-bottom: 32px;
}
.auth-logo-icon {
  width: 52px; height: 52px; border-radius: 14px; flex: none;
  display: grid; place-items: center; color: #fff;
  background: rgba(255,255,255,0.28);
  border: 1.5px solid rgba(255,255,255,0.55);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(100,150,200,0.25), 0 2px 8px rgba(100,150,200,0.15);
}
.auth-logo-icon svg { width: 26px; height: 26px; color: #fff; }
.auth-logo-name {
  font-family: var(--font-head); font-size: 44px; font-weight: 300;
  letter-spacing: -0.03em; line-height: 1; color: #fff;
  text-shadow: 0 2px 24px rgba(80,120,160,0.3);
}
.auth-logo-tag {
  font-size: 10.5px; font-weight: 500; letter-spacing: .22em;
  text-transform: uppercase; color: rgba(255,255,255,0.55);
}

/* ─── White frosted card (clean, light) ─── */
.auth-card {
  width: 100%;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1.5px solid rgba(255,255,255,0.85);
  border-radius: 22px;
  padding: 36px 32px 30px;
  box-shadow:
    0 24px 64px -20px rgba(80,120,180,0.22),
    0 4px 16px rgba(80,120,180,0.08),
    0 1px 0 rgba(255,255,255,0.9) inset;
}

/* ─── Card text ─── */
.auth-card h2 {
  font-size: 24px; font-weight: 700; letter-spacing: -0.025em;
  color: #1a2535; line-height: 1.2;
}
.auth-sub {
  color: #6b7f96; margin-top: 6px;
  font-size: 14px; line-height: 1.55;
}

/* ─── Form ─── */
.auth-form { display: grid; gap: 14px; margin-top: 22px; }
.auth-form label {
  color: #4a5f76 !important; font-size: 12px !important;
  font-weight: 700 !important; letter-spacing: .05em; text-transform: uppercase;
}

/* Inputs — clean white */
.auth-form input {
  height: 48px !important;
  background: rgba(255,255,255,0.80) !important;
  border: 1.5px solid rgba(140,170,200,0.35) !important;
  border-radius: 12px !important;
  color: #1a2535 !important;
  font-size: 15px !important;
  padding: 0 16px !important;
  transition: border-color .15s, box-shadow .15s !important;
  box-shadow: 0 1px 4px rgba(80,120,180,0.06) inset !important;
}
.auth-form input:focus {
  background: #fff !important;
  border-color: rgba(80,140,200,0.55) !important;
  box-shadow: 0 0 0 3px rgba(80,140,200,0.12) !important;
  outline: none !important;
}
.auth-form input::placeholder { color: rgba(100,130,160,0.45) !important; }

/* CTA button — deep navy (ZJ button style) */
.auth-form .btn-primary {
  height: 50px !important;
  background: #1a2840 !important;
  border: none !important;
  border-radius: 12px !important;
  color: #fff !important;
  font-size: 15px !important; font-weight: 600 !important;
  letter-spacing: .02em;
  box-shadow: 0 4px 20px rgba(20,40,70,0.30) !important;
  transition: background .15s, box-shadow .15s, transform .1s !important;
  margin-top: 4px;
}
.auth-form .btn-primary:hover {
  background: #243450 !important;
  box-shadow: 0 8px 28px rgba(20,40,70,0.38) !important;
  transform: translateY(-1px) !important;
}
.auth-form .btn-primary:active { transform: translateY(0) !important; }

/* ─── Error ─── */
.auth-error {
  background: rgba(220,60,60,0.08);
  color: #c0392b;
  border: 1.5px solid rgba(220,60,60,0.22);
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px; font-weight: 600;
}

/* ─── Account chips ─── */
.auth-accounts { display: grid; gap: 8px; margin-top: 4px; }
.auth-account-chip {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border: 1.5px solid rgba(140,170,200,0.30);
  border-radius: 14px;
  background: rgba(255,255,255,0.55);
  text-align: left; cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.auth-account-chip:hover {
  border-color: rgba(80,140,200,0.40);
  background: rgba(255,255,255,0.80);
  box-shadow: 0 4px 16px rgba(80,140,200,0.10);
}
.auth-account-chip strong { color: #1a2535; font-size: 13px; }
.auth-account-chip .muted { color: #7a90a6; font-size: 11.5px; }

/* Admin chip — warm amber tint */
.auth-account-chip.is-admin {
  border-color: rgba(180,120,20,0.28);
  background: rgba(255,248,232,0.75);
}
.auth-account-chip.is-admin:hover {
  border-color: rgba(180,120,20,0.50);
  background: rgba(255,248,232,0.95);
}

/* ─── Divider ─── */
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 4px; }
.auth-divider span { height: 1px; flex: 1; background: rgba(100,140,180,0.18); }
.auth-divider small { color: rgba(90,120,150,0.55); font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; white-space: nowrap; }

/* ─── Switch ─── */
.auth-switch { margin-top: 20px; text-align: center; color: #7a90a6; font-size: 13.5px; }
.auth-switch button { background: none; border: none; font-weight: 700; padding: 0 4px; cursor: pointer; color: #2563a8; }
.auth-switch button:hover { color: #1a4a80; text-decoration: underline; }

/* ─── Footer ─── */
.auth-foot {
  margin-top: 20px; text-align: center;
  color: rgba(255,255,255,0.55); font-size: 11px;
  letter-spacing: .02em; position: relative; z-index: 1;
}

/* ─── Admin badge in sidebar ─── */
.admin-badge {
  display: inline-block; padding: 1px 7px; border-radius: 999px;
  font-size: 10px; font-weight: 800;
  background: linear-gradient(135deg, #92400e, #d97706);
  color: #fff; letter-spacing: .04em;
  text-transform: uppercase; margin-left: 6px; vertical-align: middle;
}

/* ─── Admin access denied ─── */
.admin-denied {
  display: grid; place-items: center; min-height: 60vh; text-align: center; padding: 40px 20px;
}
.admin-denied-icon { font-size: 56px; line-height: 1; margin-bottom: 16px; }
.admin-denied h2 { font-size: 22px; color: var(--text); margin-bottom: 8px; }
.admin-denied p { color: var(--text-2); font-size: 14px; max-width: 320px; margin: 0 auto; }

/* ============================================================
   App shell — sidebar + topbar + bottom nav
   ============================================================ */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky; top: 0; align-self: start;
  height: 100vh;
  padding: 20px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  display: flex; flex-direction: column; gap: 18px;
}
[data-theme="dark"] .sidebar {
  background: color-mix(in srgb, var(--surface) 86%, var(--bg));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, #2563eb, #0d9488);
  box-shadow: var(--shadow-primary);
}
.brand-mark.sm { width: 34px; height: 34px; border-radius: 10px; }
.brand-text strong { font-family: var(--font-head); font-size: 17px; font-weight: 800; display: block; line-height: 1.1; }
.brand-text small { color: var(--muted); font-size: 11.5px; }

.nav-list { display: grid; gap: 4px; margin-top: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid transparent; background: transparent;
  color: var(--text-2); text-align: left;
  padding: 11px 12px; border-radius: 12px; font-weight: 600; font-size: 14.5px;
  transition: background .16s, color .16s, transform .1s;
}
.nav-item:hover { color: var(--text); background: rgba(255,255,255,0.52); }
.nav-item.active {
  color: var(--primary); background: rgba(37,99,235,0.12);
  box-shadow: inset 0 0 0 1px rgba(37,99,235,0.22);
}
[data-theme="dark"] .nav-item:hover { background: var(--surface-2); }
[data-theme="dark"] .nav-item.active { background: var(--primary-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 26%, transparent); }
.nav-item.active .nav-ico { color: var(--primary); }
.nav-ico { width: 20px; height: 20px; flex: none; display: inline-grid; place-items: center; color: var(--muted); }
.nav-ico svg { width: 20px; height: 20px; }

.sidebar-foot { margin-top: auto; display: grid; gap: 10px; }
.user-card, .sync-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border: 1px solid rgba(255,255,255,0.55); border-radius: 14px;
  background: rgba(255,255,255,0.62); text-align: left; transition: .15s;
}
.user-card:hover, .sync-chip:hover { background: rgba(255,255,255,0.80); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .user-card, [data-theme="dark"] .sync-chip {
  background: var(--surface); border-color: var(--line);
}
[data-theme="dark"] .user-card:hover, [data-theme="dark"] .sync-chip:hover { border-color: var(--line-2); }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 15px;
  background: linear-gradient(140deg, #2563eb, #0d9488);
}
.user-avatar.sm { width: 30px; height: 30px; font-size: 13px; }
.user-meta { display: grid; line-height: 1.2; }
.user-meta strong { font-size: 14px; }
.user-meta small { color: var(--muted); font-size: 12px; }
.sync-meta { display: grid; line-height: 1.2; }
.sync-meta strong { font-size: 13px; }
.sync-meta small { color: var(--muted); font-size: 11.5px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--muted) 18%, transparent); }
.status-dot.ok { background: var(--good); box-shadow: 0 0 0 4px var(--good-soft); }
.status-dot.bad { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }

/* main */
.main-shell { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 14px clamp(16px, 3vw, 34px);
  background: rgba(255, 255, 255, 0.50);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
}
[data-theme="dark"] .topbar {
  background: color-mix(in srgb, var(--surface-glass) 100%, transparent);
  border-bottom: 1px solid var(--line);
}
.page-title { margin-right: auto; min-width: 0; }
.eyebrow { color: var(--primary); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.page-title h1 { font-size: clamp(20px, 2.4vw, 27px); margin-top: 2px; }
.top-actions { display: flex; align-items: center; gap: 8px; }

.icon-button {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 12px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.55); background: rgba(255,255,255,0.62);
  color: var(--text-2); font-weight: 600; font-size: 13px;
  transition: .15s;
}
.icon-button:hover { color: var(--text); background: rgba(255,255,255,0.85); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .icon-button { background: var(--surface); border-color: var(--line); }
[data-theme="dark"] .icon-button:hover { border-color: var(--line-2); background: var(--surface); }
.icon-button .ico { width: 18px; height: 18px; display: inline-grid; place-items: center; }
.icon-button .ico svg { width: 18px; height: 18px; }
.menu-only { display: none; }
.install-hidden { display: none; }

main {
  width: 100%; max-width: var(--max-w); margin: 0 auto;
  padding: clamp(18px, 3vw, 30px) clamp(16px, 3vw, 34px) 120px;
}
.view { display: none; animation: viewIn .35s ease both; }
.view.active-view { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* bottom nav (mobile) */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.60);
}
[data-theme="dark"] .bottom-nav {
  background: var(--surface-glass);
  border-top: 1px solid var(--line);
}
.bottom-item {
  flex: 1; display: grid; justify-items: center; gap: 3px;
  background: none; border: none; color: var(--muted);
  font-size: 10.5px; font-weight: 600; padding: 6px 2px; border-radius: 12px;
}
.bottom-item .nav-ico { color: var(--muted); }
.bottom-item.active { color: var(--primary); }
.bottom-item.active .nav-ico { color: var(--primary); }

/* ============================================================
   Typography helpers + generic components
   ============================================================ */
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 34px 0 16px; flex-wrap: wrap; }
.section-title:first-child { margin-top: 0; }
.section-title h2 { font-size: clamp(17px, 2vw, 21px); }
.section-title p { color: var(--muted); font-size: 13.5px; margin-top: 4px; max-width: 60ch; }
.small-text { color: var(--muted); font-size: 13px; line-height: 1.55; }
.muted { color: var(--muted); }
.eyebrow-line { color: var(--primary); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }

.card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.70);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 4px 24px -8px rgba(80,120,180,0.10), 0 1px 4px rgba(80,120,180,0.06);
}
[data-theme="dark"] .card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.card.pad-lg { padding: 24px; }
.card h3 { font-size: 16px; }

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: var(--radius-pill);
  background: var(--surface-2); color: var(--text-2);
  font-size: 12px; font-weight: 600; border: 1px solid var(--line);
}
.pill.good { background: var(--good-soft); color: var(--good); border-color: color-mix(in srgb, var(--good) 24%, transparent); }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 24%, transparent); }
.pill.bad { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 24%, transparent); }
.pill.gold { background: var(--gold-soft); color: var(--gold); border-color: color-mix(in srgb, var(--gold) 26%, transparent); }
.pill.primary { background: var(--primary-soft); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 26%, transparent); }

/* buttons */
.btn, .primary-button, .ghost-button, .danger-button, .gold-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 13px;
  font-weight: 700; font-size: 14px; border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .16s ease, background .16s, border-color .16s, opacity .16s;
}
.btn:active, .primary-button:active, .ghost-button:active, .danger-button:active { transform: translateY(1px); }
.btn-primary, .primary-button {
  color: #fff; background: linear-gradient(135deg, var(--primary-600), var(--violet));
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover, .primary-button:hover { box-shadow: 0 18px 36px -12px color-mix(in srgb, var(--primary) 65%, transparent); filter: brightness(1.04); }
.btn-ghost, .ghost-button {
  color: var(--text-2); background: var(--surface); border-color: var(--line);
}
.btn-ghost:hover, .ghost-button:hover { color: var(--text); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.btn-soft { color: var(--primary); background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 22%, transparent); font-weight: 700; }
.btn-soft:hover { background: var(--primary-soft-2); }
.btn-danger, .danger-button {
  color: #fff; background: linear-gradient(135deg, var(--danger), var(--danger-2));
  box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--danger) 70%, transparent);
}
.btn-gold, .gold-button { color: #3a2a05; background: linear-gradient(135deg, var(--gold-2), #f0c14b); border-color: transparent; box-shadow: 0 12px 26px -12px color-mix(in srgb, var(--gold) 60%, transparent); }
.btn-sm { height: 36px; padding: 0 13px; font-size: 13px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-sm svg { width: 16px; height: 16px; }

/* forms */
label.field, .form-grid label, .auth-form label, form.card label { display: grid; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text-2); }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select, textarea {
  width: 100%; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 13px; color: var(--text); font-size: 14px; font-weight: 500;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input[type="file"] { font-size: 13px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

/* progress bar */
.bar { height: 8px; border-radius: 999px; background: var(--ring-track); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary-600), var(--violet)); width: var(--value, 0%); transition: width .6s cubic-bezier(.2,.7,.2,1); }
.bar.good > span { background: linear-gradient(90deg, var(--good), #36c08a); }
.bar.warn > span { background: linear-gradient(90deg, var(--warn), #e0a93c); }
.bar.danger > span { background: linear-gradient(90deg, var(--danger), var(--danger-2)); }

/* progress ring */
.ring {
  --score: 0%;
  width: 116px; height: 116px; border-radius: 50%; flex: none;
  display: grid; place-items: center; position: relative;
  background: radial-gradient(closest-side, var(--surface) 70%, transparent 71%),
    conic-gradient(var(--primary-600) calc(var(--score) * 0.72), var(--violet) var(--score), var(--ring-track) 0);
}
.ring::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--surface); }
.ring > span, .ring .ring-label { position: relative; z-index: 1; font-family: var(--font-head); font-weight: 800; font-size: 22px; }
.ring.sm { width: 76px; height: 76px; }
.ring.sm > span { font-size: 16px; }
.ring.gold { background: radial-gradient(closest-side, var(--surface) 70%, transparent 71%), conic-gradient(var(--gold-2) var(--score), var(--ring-track) 0); }
.ring.good { background: radial-gradient(closest-side, var(--surface) 70%, transparent 71%), conic-gradient(var(--good) var(--score), var(--ring-track) 0); }

/* ============================================================
   Hero / dashboard
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 34px);
  color: #fff;
  background: linear-gradient(135deg, #0b3a82 0%, #1d4ed8 52%, #0d9488 100%);
  box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: 1fr auto; gap: 22px; align-items: center;
}
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 280px at 85% -20%, rgba(255,255,255,0.25), transparent 60%); pointer-events: none; }
.hero::after { content: ""; position: absolute; right: -60px; bottom: -90px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,0.16), transparent 65%); pointer-events: none; }
.hero .eyebrow { color: rgba(255,255,255,0.85); }
.hero h2 { font-size: clamp(22px, 3vw, 31px); margin: 8px 0 10px; max-width: 22ch; }
.hero p { color: rgba(255,255,255,0.86); max-width: 60ch; font-size: 14.5px; }
.hero .pill-row { margin-top: 16px; }
.hero .pill { background: rgba(255,255,255,0.16); color: #fff; border-color: rgba(255,255,255,0.22); backdrop-filter: blur(4px); }
.hero .pill.good { background: rgba(255,255,255,0.22); }
.hero-ring {
  --score: 0%;
  width: 132px; height: 132px; border-radius: 50%; position: relative; display: grid; place-items: center; flex: none;
  background: conic-gradient(#fff calc(var(--score)), rgba(255,255,255,0.25) 0);
}
.hero-ring::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: linear-gradient(135deg, #1846a8, #0d6f7e); }
.hero-ring span { position: relative; z-index: 1; font-family: var(--font-head); font-weight: 800; font-size: 27px; color: #fff; }

/* bento grid */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.metric {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-sm);
  text-align: left; transition: transform .15s, box-shadow .2s, border-color .2s;
}
button.metric { cursor: pointer; }
button.metric:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.metric-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.metric-ico svg { width: 20px; height: 20px; }
.metric-label { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.metric-value { font-family: var(--font-head); font-weight: 800; font-size: 26px; letter-spacing: -0.02em; margin-top: 2px; }
.metric-sub { color: var(--muted); font-size: 12px; }
.metric .bar { margin-top: auto; }

.metric.tone-study .metric-ico { background: rgba(37,99,235,0.14); color: #2563eb; }
.metric.tone-gym .metric-ico { background: rgba(244,63,94,0.14); color: #f43f5e; }
.metric.tone-medicine .metric-ico { background: rgba(14,165,164,0.16); color: #0d9488; }
.metric.tone-diet .metric-ico { background: rgba(34,197,94,0.16); color: #16a34a; }
.metric.tone-will .metric-ico { background: rgba(13,148,136,0.16); color: #0d9488; }

/* deadline cards */
.deadline-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.deadline {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm);
}
.deadline .dl-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.deadline .dl-num { font-family: var(--font-head); font-weight: 800; font-size: 40px; line-height: 1; letter-spacing: -0.03em; }
.deadline .dl-label { color: var(--muted); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.deadline .dl-target { color: var(--text-2); font-size: 13.5px; margin: 10px 0 14px; }
.deadline.good .dl-num { color: var(--good); }
.deadline.warn .dl-num { color: var(--warn); }
.deadline.bad .dl-num { color: var(--danger); }
.deadline .dl-accent { position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--primary-600), var(--violet)); }
.deadline.good .dl-accent { background: linear-gradient(90deg, var(--good), #36c08a); }
.deadline.warn .dl-accent { background: linear-gradient(90deg, var(--warn), #e0a93c); }
.deadline.bad .dl-accent { background: linear-gradient(90deg, var(--danger), var(--danger-2)); }

/* next actions */
.next-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.next-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; }
.next-card .nc-eyebrow { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.next-card h3 { font-size: 16px; line-height: 1.35; }
.next-card .btn-soft { align-self: flex-start; margin-top: 2px; }

/* Dashboard v2: analytics + insights + activity */
.dash-split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 16px; margin-top: 16px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h3 { font-size: 17px; margin-top: 2px; }
.chart-card { display: flex; flex-direction: column; }
.spark { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; align-items: end; height: 132px; padding: 4px 0 0; }
.spark-col { display: grid; justify-items: center; gap: 8px; align-content: end; height: 100%; }
.spark-bar { width: 100%; max-width: 30px; height: var(--h); min-height: 4px; border-radius: 8px 8px 4px 4px; background: var(--surface-3); position: relative; overflow: hidden; align-self: end; transition: height .6s cubic-bezier(.2,.7,.2,1); }
.spark-bar span { position: absolute; inset: 0; background: linear-gradient(180deg, var(--primary), var(--teal)); opacity: .9; }
.spark-col small { color: var(--muted); font-size: 11px; font-weight: 600; }
.chart-legend { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; font-weight: 600; }

.insights { display: grid; gap: 8px; }
.insight { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); text-align: left; transition: .15s; }
.insight:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); transform: translateX(2px); }
.insight-ico { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.insight-ico svg { width: 19px; height: 19px; }
.insight-text { display: grid; gap: 1px; min-width: 0; flex: 1; }
.insight-text strong { font-size: 13.5px; }
.insight-text small { color: var(--muted); font-size: 12px; }
.insight-go { color: var(--muted); font-weight: 800; font-size: 16px; }
.insight.tone-warn .insight-ico { background: var(--warn-soft); color: var(--warn); }
.insight.tone-bad .insight-ico { background: var(--danger-soft); color: var(--danger); }
.insight.tone-good .insight-ico { background: var(--good-soft); color: var(--good); }
.insight.tone-info .insight-ico { background: rgba(14,165,233,0.14); color: var(--sky); }
.insight.tone-rose .insight-ico { background: var(--rose-soft); color: var(--rose); }
.insight.tone-gold .insight-ico { background: var(--gold-soft); color: var(--gold); }

.activity-feed { display: grid; gap: 2px; }
.activity-row { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.activity-row:last-child { border-bottom: none; }
.activity-ico { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.activity-ico svg { width: 18px; height: 18px; }
.activity-ico.tone-good { background: var(--good-soft); color: var(--good); }
.activity-ico.tone-bad { background: var(--danger-soft); color: var(--danger); }
.activity-ico.tone-gold { background: var(--gold-soft); color: var(--gold); }
.activity-body { display: grid; gap: 1px; flex: 1; min-width: 0; }
.activity-body strong { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-body small { color: var(--muted); font-size: 11.5px; }

/* ============================================================
   Dashboard v2 — Premium editorial theme
   Light: sky-wash canvas + frosted glass cards
   Dark: deep midnight navy + glass cards
   ============================================================ */

/* ── Hero ── */
.dash-hero-v2 {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 46px);
  display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center;
  background: linear-gradient(135deg, #0b1f4d 0%, #1a3a8c 42%, #0d6060 100%);
  box-shadow: 0 32px 64px -20px rgba(11,31,77,0.55), 0 0 0 1px rgba(255,255,255,0.07) inset;
  color: #fff;
}
.dash-hero-v2::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(760px 320px at 84% -18%, rgba(255,255,255,0.13), transparent 60%);
}
.dash-hero-v2::after {
  content: ""; position: absolute; right: -70px; bottom: -80px; pointer-events: none;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(13,188,160,0.26), transparent 65%);
}
.dh-text { position: relative; z-index: 1; }
.dh-eyebrow { color: rgba(255,255,255,0.65) !important; }
.dh-headline {
  font-size: clamp(24px, 3.2vw, 37px); font-weight: 700;
  margin: 10px 0 12px; letter-spacing: -0.025em; line-height: 1.14;
  max-width: 24ch;
}
.dh-sub { color: rgba(255,255,255,0.70); font-size: 14.5px; line-height: 1.62; max-width: 56ch; }
.dh-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.dh-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: rgba(255,255,255,0.13); border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(8px); color: #fff; letter-spacing: .01em;
}
.dh-score-wrap { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; }
.dh-score-ring {
  --s: 0%;
  width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(rgba(255,255,255,0.94) var(--s), rgba(255,255,255,0.14) 0);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.18);
  position: relative;
}
.dh-score-ring::before {
  content: ""; position: absolute; inset: 12px; border-radius: 50%;
  background: linear-gradient(145deg, #162f74, #0a5452);
  box-shadow: inset 0 2px 14px rgba(0,0,0,0.32);
}
.dh-score-hole {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.dh-score-num { font-family: var(--font-head); font-size: 36px; font-weight: 800; color: #fff; line-height: 1; letter-spacing: -0.03em; }
.dh-score-lbl { font-size: 10.5px; font-weight: 700; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: .11em; }

/* ── Deadline v2 ── */
.deadline-grid-v2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.deadline-v2 {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 18px;
  position: relative; overflow: hidden;
  transition: transform .15s, box-shadow .2s;
}
.deadline-v2:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.deadline-v2::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: linear-gradient(90deg, var(--primary-600), var(--violet));
}
.deadline-v2.good::after { background: linear-gradient(90deg, var(--good), #36c08a); }
.deadline-v2.warn::after { background: linear-gradient(90deg, var(--warn), #e0a93c); }
.deadline-v2.bad::after  { background: linear-gradient(90deg, var(--danger), var(--danger-2)); }
.dv2-ring {
  --p: 0%;
  width: 82px; height: 82px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: conic-gradient(var(--primary-600) var(--p), var(--ring-track) 0);
}
.deadline-v2.good .dv2-ring { background: conic-gradient(var(--good) var(--p), var(--ring-track) 0); }
.deadline-v2.warn .dv2-ring { background: conic-gradient(var(--warn) var(--p), var(--ring-track) 0); }
.deadline-v2.bad  .dv2-ring { background: conic-gradient(var(--danger) var(--p), var(--ring-track) 0); }
.dv2-ring-inside {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--surface); display: grid; place-items: center; text-align: center;
}
.dv2-days {
  font-family: var(--font-head); font-size: 20px; font-weight: 800;
  line-height: 1; letter-spacing: -0.025em; display: block;
}
.deadline-v2.good .dv2-days { color: var(--good); }
.deadline-v2.warn .dv2-days { color: var(--warn); }
.deadline-v2.bad  .dv2-days { color: var(--danger); }
.dv2-days-lbl { font-size: 9px; font-weight: 800; color: var(--muted); text-transform: uppercase; display: block; letter-spacing: .04em; }
.dv2-body { flex: 1; min-width: 0; }
.dv2-label { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .09em; display: block; margin-bottom: 5px; }
.dv2-target { font-size: 14px; font-weight: 600; color: var(--text); margin: 0 0 5px; line-height: 1.4; }

/* ── Streak cards v2 ── */
.streak-grid-v2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.streak-card-v2 {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 24px 26px;
  box-shadow: var(--shadow-sm); display: grid; gap: 20px;
  transition: box-shadow .2s; position: relative; overflow: hidden;
}
.streak-card-v2:hover { box-shadow: var(--shadow-md); }
.streak-card-v2::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(540px 320px at 90% 110%, var(--primary-soft), transparent 65%);
}
.streak-card-v2.sc-nojunk::before {
  background: radial-gradient(540px 320px at 90% 110%, var(--good-soft), transparent 65%);
}
.scv2-top { display: flex; gap: 22px; align-items: flex-start; position: relative; z-index: 1; }
.scv2-ring-wrap { flex: none; }
.scv2-ring {
  --p: 0%;
  width: 104px; height: 104px; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(var(--primary-600) var(--p), var(--ring-track) 0);
}
.streak-card-v2.sc-nojunk .scv2-ring { background: conic-gradient(var(--good) var(--p), var(--ring-track) 0); }
.scv2-ring-inner {
  width: 78px; height: 78px; border-radius: 50%;
  background: var(--surface); display: grid; place-items: center; text-align: center;
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.06);
}
.scv2-num { font-family: var(--font-head); font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; color: var(--primary); display: block; }
.streak-card-v2.sc-nojunk .scv2-num { color: var(--good); }
.scv2-unit { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.scv2-body { flex: 1; min-width: 0; }
.scv2-body h3 { font-size: 16px; margin-bottom: 4px; }
.scv2-phase { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 14px; }
.streak-card-v2.sc-nojunk .scv2-phase { color: var(--good); }
.scv2-stats-row {
  display: flex; align-items: stretch;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: var(--surface-2); margin-bottom: 14px;
}
.scv2-stat { flex: 1; display: grid; justify-items: center; padding: 9px 6px; gap: 3px; }
.scv2-stat strong { font-family: var(--font-head); font-size: 19px; font-weight: 800; line-height: 1; }
.scv2-stat span { font-size: 10px; color: var(--muted); font-weight: 600; text-align: center; }
.scv2-stat-div { width: 1px; background: var(--line); }
.scv2-milestone { font-size: 12.5px; }
.scv2-ml-text { font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.scv2-milestone.all-done { color: var(--good); font-weight: 700; padding: 6px 0; }
.scv2-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  padding-top: 18px; border-top: 1px solid var(--line);
  position: relative; z-index: 1;
}
.scv2-actions .btn-primary { flex: 1; font-size: 13.5px; }

/* ── Life Numbers ── */
.life-nums-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.life-num-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 20px 18px;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 5px;
  transition: transform .15s, box-shadow .2s;
}
.life-num-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.lnc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.lnc-emoji { font-size: 22px; line-height: 1; }
.lnc-bar { flex: 1; height: 5px; border-radius: 999px; background: var(--ring-track); overflow: hidden; }
.lnc-bar span { display: block; height: 100%; border-radius: 999px; width: var(--value, 0%); transition: width .7s cubic-bezier(.2,.7,.2,1); }
.lnc-value { font-family: var(--font-head); font-size: 30px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; margin-top: 2px; }
.lnc-label { font-size: 11.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.lnc-sub { font-size: 12px; color: var(--text-2); margin-top: 2px; line-height: 1.4; }
.life-num-card.tone-primary .lnc-value { color: var(--primary); }
.life-num-card.tone-primary .lnc-bar span { background: linear-gradient(90deg, var(--primary-600), var(--violet)); }
.life-num-card.tone-teal .lnc-value { color: var(--teal); }
.life-num-card.tone-teal .lnc-bar span { background: linear-gradient(90deg, var(--teal), #36c09a); }
.life-num-card.tone-gold .lnc-value { color: var(--gold); }
.life-num-card.tone-gold .lnc-bar span { background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.life-num-card.tone-rose .lnc-value { color: var(--rose); }
.life-num-card.tone-rose .lnc-bar span { background: linear-gradient(90deg, var(--rose), var(--rose-2)); }

/* ── Women's Health dash card ── */
.health-dash-v2 {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 22px;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.hdv2-phase { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 170px; }
.hdv2-dot {
  width: 13px; height: 13px; border-radius: 50%; flex: none;
  background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft);
}
.hdv2-phase.tone-rose .hdv2-dot { background: var(--rose); box-shadow: 0 0 0 4px var(--rose-soft); }
.hdv2-phase.tone-good .hdv2-dot { background: var(--good); box-shadow: 0 0 0 4px var(--good-soft); }
.hdv2-phase.tone-warn .hdv2-dot { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.hdv2-phase.tone-muted .hdv2-dot { background: var(--muted); box-shadow: 0 0 0 4px rgba(100,116,136,0.18); }
.hdv2-phase strong { font-size: 15px; font-weight: 700; display: block; }
.hdv2-phase small { font-size: 12px; color: var(--muted); }
.hdv2-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.hdv2-stat { display: flex; flex-direction: column; gap: 2px; }
.hdv2-stat span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.hdv2-stat strong { font-size: 15px; font-weight: 700; }

/* ── Smart Insights standalone ── */
.insights-standalone { padding: 6px; }
.insights-standalone .insights { display: grid; gap: 8px; }

/* ── Dark mode tweaks for new components ── */
[data-theme="dark"] .dash-hero-v2 {
  background: linear-gradient(135deg, #070e24 0%, #112060 42%, #053a38 100%);
  box-shadow: 0 32px 64px -20px rgba(4,8,26,0.8), 0 0 0 1px rgba(255,255,255,0.06) inset;
}
[data-theme="dark"] .dh-score-ring::before {
  background: linear-gradient(145deg, #0c1b52, #043230);
}
[data-theme="dark"] .streak-card-v2::before {
  background: radial-gradient(540px 320px at 90% 110%, rgba(91,155,255,0.08), transparent 65%);
}
[data-theme="dark"] .streak-card-v2.sc-nojunk::before {
  background: radial-gradient(540px 320px at 90% 110%, rgba(52,211,158,0.08), transparent 65%);
}
[data-theme="dark"] .scv2-ring-inner { background: var(--surface-2); }
[data-theme="dark"] .dv2-ring-inside { background: var(--surface-2); }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .life-nums-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .deadline-grid-v2 { grid-template-columns: 1fr; }
  .streak-grid-v2 { grid-template-columns: 1fr; }
  .dh-score-ring { width: 118px; height: 118px; }
  .dh-score-ring::before { inset: 9px; }
  .dh-score-num { font-size: 28px; }
}
@media (max-width: 640px) {
  .dash-hero-v2 { grid-template-columns: 1fr; }
  .dh-score-wrap { display: none; }
  .life-nums-grid { grid-template-columns: repeat(2, 1fr); }
  .health-dash-v2 { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* ============================================================
   Studies — premium timeline
   ============================================================ */
.study-task-grid { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); }
.lesson {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
  padding: 16px 18px; border-bottom: 1px solid var(--line); transition: background .15s;
}
.lesson:last-child { border-bottom: none; }
.lesson:hover { background: var(--surface-2); }
.lesson.done { background: color-mix(in srgb, var(--good) 6%, var(--surface)); }
.lesson-time { display: grid; justify-items: center; gap: 2px; min-width: 78px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.lesson-time b { font-family: var(--font-head); font-weight: 800; font-size: 14px; }
.lesson-time small { color: var(--muted); font-size: 10.5px; }
.lesson.done .lesson-time { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 24%, transparent); }
.lesson-body h3 { font-size: 15.5px; margin-bottom: 4px; }
.lesson-body p { color: var(--muted); font-size: 12.5px; }
.lesson-body .lesson-module { color: var(--primary); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
.lesson.done .lesson-body h3 { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--good) 60%, transparent); color: var(--text-2); }

/* ── Video Roadmap generator — new premium form ── */
.rg-form { padding: 0; overflow: hidden; }
.rg-section { padding: 18px 22px; }
.rg-section-label {
  font-size: 11px; font-weight: 800; color: var(--primary);
  text-transform: uppercase; letter-spacing: .10em; margin-bottom: 12px;
}
.rg-divider { height: 1px; background: var(--line); margin: 0; }
.rg-url-row { display: flex; gap: 10px; align-items: center; }
.rg-url-input {
  flex: 1; height: 46px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 0 14px; font-size: 14px; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.rg-url-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); background: var(--surface); }
.rg-preview-bar {
  margin: 0 22px 18px;
  background: var(--primary-soft); color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 24%, transparent);
  border-radius: 12px; padding: 11px 14px; font-size: 13px; font-weight: 600;
}
/* old class kept for compat */
.roadmap-gen { display: block; }
.rg-row { display: flex; gap: 10px; align-items: flex-end; }
.rg-fetch { height: 44px; white-space: nowrap; }
.rg-meta { display: flex; align-items: center; gap: 12px; margin: 10px 0 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.rg-meta .rg-thumb { width: 96px; height: 56px; border-radius: 8px; object-fit: cover; flex: none; }
.rg-meta strong { display: block; font-size: 13.5px; line-height: 1.3; }

/* ── Roadmap quick-bar (mark today + alarm) ── */
.rm-quick-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 20px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--primary-soft) 60%, var(--surface-2));
}
.rm-today-btn { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-alarm-row { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.rm-alarm-label { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--muted); }
.rm-alarm-label svg { width: 14px; height: 14px; }
.rm-alarm-input {
  height: 34px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); font-size: 13px; font-weight: 600; color: var(--text);
  width: 108px;
}
.rm-alarm-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
[data-theme="dark"] .rm-quick-bar {
  background: color-mix(in srgb, var(--primary-soft) 50%, var(--surface-2));
}

/* ── Modal wide variant ── */
.modal-wide { max-width: min(920px, 96vw) !important; width: min(920px, 96vw) !important; }

/* ── Video + Notes layout ── */
.vm-layout {
  display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start;
  margin-top: 4px;
}
.vm-video-col { min-width: 0; }
.vm-video-wrap {
  position: relative; border-radius: 12px; overflow: hidden;
  background: #000; aspect-ratio: 16/9;
}
.vm-video-wrap .video-loading {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; color: #fff; z-index: 2;
}
/* YT.Player creates an iframe — make it fill the wrapper */
.vm-video-wrap iframe,
.vm-video-wrap > div { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.vm-notes-col { display: flex; flex-direction: column; gap: 8px; min-height: 320px; }
.vm-notes-ta {
  flex: 1; width: 100%; min-height: 210px; resize: vertical;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font-size: 13px; line-height: 1.7;
  background: var(--surface-2); color: var(--text);
  transition: border-color .15s, background .15s;
}
.vm-notes-ta:focus { outline: none; border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px var(--primary-soft); }
.rm-has-notes { font-size: 12px; margin-left: 4px; opacity: .7; }
@media (max-width: 700px) { .vm-layout { grid-template-columns: 1fr; } .vm-notes-col { min-height: auto; } }

/* Roadmap card */
.rm-card { padding: 0; overflow: hidden; }
.rm-top { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.rm-thumb { position: relative; width: 132px; height: 78px; border-radius: 12px; overflow: hidden; flex: none; cursor: pointer; background: var(--surface-3); }
.rm-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rm-thumb-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(8,12,22,0.32); color: #fff; }
.rm-thumb-play svg { width: 34px; height: 34px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.rm-thumb-ph { display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); cursor: default; }
.rm-thumb-ph svg { width: 34px; height: 34px; }
.rm-info { flex: 1; min-width: 0; }
.rm-info h3 { font-size: 17px; }
.rm-progress { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.rm-progress strong { font-family: var(--font-head); font-size: 14px; color: var(--primary); min-width: 38px; text-align: right; }
.rm-del { flex: none; width: 36px; padding: 0; color: var(--muted); }
.rm-del:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 36%, var(--line)); }
.rm-phases { padding: 14px 20px 20px; display: grid; gap: 14px; }
.rm-phase { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.rm-phase.complete { border-color: color-mix(in srgb, var(--good) 32%, var(--line)); }
.rm-phase-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface-2); }
.rm-phase-badge { width: 28px; height: 28px; flex: none; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--primary-soft); color: var(--primary); }
.rm-phase.complete .rm-phase-badge { background: var(--good); color: #fff; }
.rm-phase-title { flex: 1; min-width: 0; }
.rm-phase-title strong { font-size: 14px; display: block; }
.rm-phase-title small { color: var(--muted); font-size: 11.5px; }
.rm-lessons { display: grid; }
.rm-lesson { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--line); transition: background .15s; cursor: pointer; }
.rm-lesson:hover { background: var(--surface-2); }
.rm-lesson.done { background: color-mix(in srgb, var(--good) 5%, var(--surface)); }
.rm-lesson-body { flex: 1; min-width: 0; }
.rm-lesson-body strong { font-size: 13.5px; font-weight: 600; display: block; }
.rm-lesson.done .rm-lesson-body strong { text-decoration: line-through; color: var(--text-2); text-decoration-color: color-mix(in srgb, var(--good) 60%, transparent); }
.rm-lesson-body small { color: var(--muted); font-size: 11.5px; }
.rm-play { width: 34px; height: 34px; flex: none; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--primary); display: grid; place-items: center; }
.rm-play:hover { background: var(--primary-soft); }
.rm-play svg { width: 16px; height: 16px; }

/* Badges */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.badge { display: grid; justify-items: center; gap: 3px; padding: 14px 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); text-align: center; opacity: .55; filter: grayscale(0.6); transition: .2s; }
.badge.earned { opacity: 1; filter: none; border-color: color-mix(in srgb, var(--gold) 34%, var(--line)); background: linear-gradient(150deg, var(--gold-soft), var(--surface)); }
.badge-emoji { font-size: 28px; }
.badge small { font-size: 11px; font-weight: 700; }
.badge em { font-style: normal; font-size: 10px; color: var(--muted); }

.check-pill { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.check-box {
  width: 26px; height: 26px; border-radius: 9px; border: 2px solid var(--line-2);
  display: grid; place-items: center; transition: .15s; background: var(--surface);
}
.check-box svg { width: 15px; height: 15px; opacity: 0; transform: scale(.6); transition: .15s; color: #fff; }
.check-pill input:checked + .check-box { background: linear-gradient(135deg, var(--good), #2bb583); border-color: transparent; }
.check-pill input:checked + .check-box svg { opacity: 1; transform: scale(1); }
.check-pill input:focus-visible + .check-box { box-shadow: 0 0 0 4px var(--primary-soft); }
.check-text { font-size: 12.5px; font-weight: 700; color: var(--muted); min-width: 56px; }

/* roadmap track */
.roadmap { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 0; overflow-x: auto; padding-bottom: 6px; }
.roadmap-item { position: relative; padding: 28px 14px 14px; text-align: center; }
.roadmap-item::before { content: ""; position: absolute; top: 14px; left: 0; right: 0; height: 3px; background: var(--ring-track); }
.roadmap-item:first-child::before { left: 50%; }
.roadmap-item:last-child::before { right: 50%; }
.roadmap-dot { position: absolute; top: 7px; left: 50%; transform: translateX(-50%); width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line-2); z-index: 1; }
.roadmap-item.active .roadmap-dot { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 5px var(--primary-soft); }
.roadmap-item.done .roadmap-dot { border-color: var(--good); background: var(--good); }
.roadmap-item.active::before, .roadmap-item.done::before { background: linear-gradient(90deg, var(--primary-600), var(--violet)); }
.roadmap-item h4 { font-size: 14px; margin-top: 4px; }
.roadmap-item p { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.roadmap-item em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); }
.roadmap-item.active em { color: var(--primary); }
.roadmap-item.done em { color: var(--good); }
.roadmap-item.locked { opacity: .6; }

.timeline { display: grid; gap: 10px; }
.timeline-item { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.timeline-item.done { background: color-mix(in srgb, var(--good) 6%, var(--surface)); }
.timeline-date { display: grid; justify-items: center; min-width: 56px; padding: 6px 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 11px; font-weight: 700; text-align: center; }
.reward-card { background: linear-gradient(140deg, color-mix(in srgb, var(--gold) 16%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--gold) 30%, var(--line)); }
.certificate-preview { width: 100%; border-radius: 12px; margin-top: 12px; border: 1px solid var(--line); }

/* ============================================================
   Gym — premium exercise cards
   ============================================================ */
.day-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.day-tabs button { height: 38px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); font-weight: 700; font-size: 13px; transition: .15s; }
.day-tabs button:hover { border-color: var(--line-2); }
.day-tabs button.active { color: #fff; background: linear-gradient(135deg, var(--primary-600), var(--violet)); border-color: transparent; box-shadow: var(--shadow-primary); }

.exercise-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.exercise {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.exercise:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.exercise.taken { border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.ex-media { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.ex-media img { width: 100%; height: 100%; object-fit: cover; }
.ex-media .ex-illus { width: 100%; height: 100%; }
.ex-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.ex-badge { padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; backdrop-filter: blur(6px); background: rgba(0,0,0,0.42); color: #fff; }
.ex-upload-btn {
  position: absolute; bottom: 10px; right: 10px; height: 34px; padding: 0 12px; border-radius: 10px;
  border: none; background: rgba(0,0,0,0.5); color: #fff; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px; backdrop-filter: blur(6px); cursor: pointer;
}
.ex-upload-btn:hover { background: rgba(0,0,0,0.66); }
.ex-upload-btn input { display: none; }
.ex-taken-flag { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--good); color: #fff; opacity: 0; transform: scale(.5); transition: .2s; }
.exercise.taken .ex-taken-flag { opacity: 1; transform: scale(1); }
.ex-body { padding: 16px; display: grid; gap: 10px; }
.ex-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ex-body h3 { font-size: 15.5px; }
.ex-dose { color: var(--primary); font-weight: 700; font-size: 13px; }
.ex-note { color: var(--muted); font-size: 12.5px; }
.ex-cue { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; color: var(--text-2); }
.ex-cue b { color: var(--text); }
.ex-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ex-demo-btn.has-video { background: var(--good-soft); color: var(--good); border-color: color-mix(in srgb, var(--good) 30%, transparent); }
.ex-illus-bg { width: 100%; height: 100%; display: grid; place-items: center; }

.swap-panel { padding: 14px 16px; border-top: 1px dashed var(--line-2); background: var(--surface-2); }
.swap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 8px; margin-top: 10px; }
.swap-choice { text-align: left; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); transition: .15s; }
.swap-choice:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.swap-choice span { display: block; font-weight: 700; font-size: 13px; }
.swap-choice small { color: var(--muted); font-size: 11.5px; }

.workout-progress-card { display: grid; gap: 8px; }

/* ============================================================
   Medicine
   ============================================================ */
.medicine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; align-items: start; }
.med {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm); display: grid; gap: 12px; transition: .15s;
  border-left: 4px solid var(--primary);
}
.med:hover { box-shadow: var(--shadow-md); }
.med.taken { border-left-color: var(--good); background: color-mix(in srgb, var(--good) 5%, var(--surface)); }
.med.morning { border-left-color: #f59e0b; }
.med.midday { border-left-color: #0ea5e9; }
.med.evening { border-left-color: #1d4ed8; }
.med.taken.morning, .med.taken.midday, .med.taken.evening { border-left-color: var(--good); }
.med-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.med-head h3 { font-size: 15px; }
.med-brand { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.med-time-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-2); }
.time-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: 12.5px; }
.med.expanded { box-shadow: var(--shadow-md); }
.med-rows { display: grid; gap: 0; margin: 2px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.med-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; font-size: 13px; border-bottom: 1px solid var(--line); }
.med-row:last-child { border-bottom: none; }
.med-row-k { color: var(--muted); font-weight: 600; }
.med-row-v { font-weight: 600; text-align: right; }
.med-amount { display: inline-flex; align-items: center; gap: 1px; }
.med-amount input { width: 72px; padding: 5px 8px; text-align: right; font-weight: 700; border-radius: 8px; }
.med-actions { display: flex; gap: 8px; margin-top: 2px; }
.med-actions .btn { flex: 1; }
.med-info { margin-top: 4px; border-top: 1px dashed var(--line-2); padding-top: 12px; display: grid; gap: 10px; animation: viewIn .25s ease both; }
.med-info-block { display: grid; gap: 2px; }
.mi-k { font-size: 11.5px; font-weight: 800; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.med-info-block p { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.med-edit { margin-top: 4px; border-top: 1px dashed var(--line-2); padding-top: 14px; animation: viewIn .25s ease both; }
.med-times { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 4px; }
.med-ai-edit { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); display: grid; gap: 10px; }
.med-ai-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.med-phase { display: grid; gap: 6px; margin-top: 2px; }
.med-phase-head { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; }
.med-phase-head b { font-weight: 700; }
.med-phase-head .muted { color: var(--muted); }

/* Medical reports gallery */
.med-reports-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 6px; }
.med-report-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.med-report-img { width: 100%; height: 110px; object-fit: cover; display: block; }
.med-report-info { padding: 7px 10px; display: flex; align-items: center; gap: 6px; }
.med-report-name { font-size: 11.5px; font-weight: 600; color: var(--text-2); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.med-reports-empty { text-align: center; padding: 28px 20px; display: grid; gap: 6px; place-items: center; }
.med-reports-empty p { color: var(--text-2); font-size: 14px; }
.med-report-card.analyzed { border-color: var(--good); }
.med-report-icon { display: grid; place-items: center; height: 110px; font-size: 44px; background: var(--surface-2); }
.med-report-actions { padding: 8px 8px 10px; }
.med-analysis-banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: color-mix(in srgb, var(--good) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--good) 30%, transparent); border-radius: 14px; margin-bottom: 4px; }
.med-analysis-banner strong { display: block; margin-bottom: 2px; }

/* Report analysis modal */
.analyze-modal { display: grid; gap: 12px; }
.rpt-doc-preview { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 4px; }
.rpt-doc-preview span { font-size: 36px; flex: none; }
.condition-checklist { display: grid; gap: 6px; max-height: 340px; overflow-y: auto; padding-right: 4px; }
.condition-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: background .15s; }
.condition-item:has(input:checked) { background: color-mix(in srgb, var(--primary) 8%, var(--surface)); border-color: var(--primary); }
.condition-item input { width: 18px; height: 18px; flex: none; accent-color: var(--primary); cursor: pointer; }
.cond-icon { font-size: 20px; flex: none; }
.cond-body { display: grid; gap: 1px; }
.cond-body strong { font-size: 13.5px; }
.cond-body small { font-size: 12px; color: var(--muted); }

/* Step 2 prompt banner */
.med-step2-prompt { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); border-radius: 16px; margin-top: 14px; }
.step2-left { display: flex; align-items: center; gap: 14px; }
.step2-num { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; font-size: 16px; display: grid; place-items: center; flex: none; }

/* Medicine photo upload */
.med-photo-upload { display: block; cursor: pointer; border: 2px dashed var(--line); border-radius: 14px; overflow: hidden; transition: border-color .2s, box-shadow .2s; margin-top: 16px; }
.med-photo-upload:hover { border-color: var(--primary); }
.med-photo-upload-hero { border-width: 2px; border-color: color-mix(in srgb, var(--primary) 50%, transparent); background: color-mix(in srgb, var(--primary) 5%, var(--surface)); }
.med-photo-upload-hero:hover { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent); }
.med-photo-placeholder { display: grid; place-items: center; gap: 8px; padding: 36px 20px; text-align: center; color: var(--text-2); }
.med-photo-placeholder strong { font-size: 15px; }
.med-photo-placeholder small { font-size: 12px; color: var(--muted); }
.med-camera-icon { font-size: 52px; display: block; margin-bottom: 4px; }
.med-reading-badge { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; color: var(--text-2); }

/* Add medicine 2-step flow */
.add-med-intro { text-align: center; padding: 6px 0 4px; }
.add-med-intro .add-med-icon { font-size: 38px; display: block; margin-bottom: 10px; }
.add-med-intro h3 { font-size: 17px; margin-bottom: 6px; }
.add-med-review { display: grid; gap: 14px; }
.add-med-review-head { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: color-mix(in srgb, var(--good) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--good) 30%, transparent); border-radius: 14px; }
.med-review-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.med-review-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 10px 14px; background: var(--surface); font-size: 13px; }
.med-review-item .mi-k { flex: none; width: 90px; color: var(--muted); }
.med-review-item span:last-child { text-align: right; font-weight: 600; flex: 1; }
.med-review-adjust { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }

.cost-card { display: grid; gap: 10px; }

.history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.history-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: var(--shadow-sm); display: grid; gap: 8px; }
.history-card.missed { border-color: color-mix(in srgb, var(--warn) 30%, var(--line)); }
.history-card.clear { border-color: color-mix(in srgb, var(--good) 26%, var(--line)); }

.med-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.med-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.med-table th { text-align: left; padding: 12px 14px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.med-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; vertical-align: middle; }
.med-table tr:last-child td { border-bottom: none; }
.med-table input:not([type="checkbox"]), .med-table select { padding: 8px 10px; }

/* Doctor brain */
.doctor {
  background: linear-gradient(140deg, color-mix(in srgb, var(--primary) 12%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-md);
}
.doctor-head { display: flex; align-items: center; gap: 14px; }
.doctor-avatar { width: 52px; height: 52px; border-radius: 16px; flex: none; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, #0d9488, #2563eb); box-shadow: var(--shadow-primary); }
.doctor-avatar svg { width: 28px; height: 28px; }
.doctor-head h3 { font-size: 17px; }
.doctor-head p { color: var(--muted); font-size: 12.5px; }
.doctor-answer { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; font-size: 14px; line-height: 1.6; color: var(--text-2); min-height: 60px; }
.doctor-answer strong { color: var(--text); }
.doctor-answer .doc-tag { display: inline-block; margin-bottom: 8px; }
.doctor-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.doc-chip { padding: 8px 13px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--line)); background: var(--surface); color: var(--primary); font-weight: 600; font-size: 12.5px; transition: .15s; }
.doc-chip:hover { background: var(--primary-soft); }
.doc-disclaimer { color: var(--muted); font-size: 11.5px; margin-top: 12px; font-style: italic; }

/* Body journal */
.journal-list { display: grid; gap: 10px; }
.journal-item { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.journal-item .j-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.journal-item .j-date { font-weight: 700; font-size: 12.5px; }
.j-ratings { display: flex; gap: 6px; flex-wrap: wrap; }

/* ============================================================
   Diet
   ============================================================ */
.phase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.phase {
  display: grid; gap: 12px; padding: 18px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm);
}
.phase.current { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); background: linear-gradient(150deg, var(--primary-soft), var(--surface)); }
.phase.locked-phase { opacity: .65; }
.phase h4 { font-size: 15px; }
.phase p { color: var(--text-2); font-size: 12.5px; }
.phase small { color: var(--muted); font-size: 11.5px; }

.judge-card { display: grid; gap: 8px; }
.food-impact-card { display: grid; grid-template-columns: 1.2fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); }
.food-impact-card > div { padding: 18px 20px; }
.food-impact-card > div:first-child { border-right: 1px solid var(--line); }
.food-log-list { display: grid; gap: 8px; margin-top: 10px; }
.food-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); display: grid; gap: 8px; }
.food-card.healthy { border-left: 3px solid var(--good); }
.food-card.junk { border-left: 3px solid var(--danger); }
.food-card.neutral { border-left: 3px solid var(--warn); }
.food-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.empty { color: var(--muted); font-size: 13px; padding: 16px; text-align: center; border: 1px dashed var(--line-2); border-radius: 12px; }

.water-card { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; padding: 22px; }
.water-ring { --score: 0%; width: 130px; height: 130px; border-radius: 50%; position: relative; display: grid; place-items: center; flex: none; background: conic-gradient(#0ea5e9 var(--score), var(--ring-track) 0); }
.water-ring::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--surface); }
.water-ring span { position: relative; z-index: 1; font-family: var(--font-head); font-weight: 800; font-size: 19px; display: grid; justify-items: center; }
.water-ring span small { font-size: 11px; color: var(--muted); font-weight: 600; }

/* ============================================================
   Streak engine (Discipline / No-Junk shared)
   ============================================================ */
.streak-hero {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: clamp(22px,3vw,32px);
  color: #fff; display: grid; grid-template-columns: 1fr auto; gap: 22px; align-items: center; box-shadow: var(--shadow-lg);
}
.streak-hero.nofap { background: linear-gradient(135deg, #0b3a82 0%, #1d4ed8 50%, #0e7490 100%); }
.streak-hero.nojunk { background: linear-gradient(135deg, #047857 0%, #0d9488 55%, #0284c7 100%); }
.streak-hero::after { content: ""; position: absolute; right: -70px; top: -90px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 65%); }
.streak-hero .eyebrow { color: rgba(255,255,255,0.85); }
.streak-hero h2 { font-size: clamp(28px, 5vw, 46px); margin: 6px 0; }
.streak-hero p { color: rgba(255,255,255,0.88); max-width: 52ch; font-size: 14.5px; }
.streak-bigring { --score: 0%; width: 150px; height: 150px; border-radius: 50%; position: relative; display: grid; place-items: center; flex: none; background: conic-gradient(#fff var(--score), rgba(255,255,255,0.25) 0); }
.streak-bigring::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: rgba(0,0,0,0.18); backdrop-filter: blur(2px); }
.streak-bigring .sb-num { position: relative; z-index: 1; font-family: var(--font-head); font-weight: 800; font-size: 44px; color: #fff; line-height: 1; }
.streak-bigring .sb-label { position: relative; z-index: 1; font-size: 12px; color: rgba(255,255,255,0.85); }

.streak-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.streak-stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; text-align: center; box-shadow: var(--shadow-sm); }
.streak-stat strong { display: block; font-family: var(--font-head); font-weight: 800; font-size: 26px; }
.streak-stat span { color: var(--muted); font-size: 12px; font-weight: 600; }
.streak-stat.s-clean strong { color: var(--good); }
.streak-stat.s-best strong { color: var(--gold); }
.streak-stat.s-relapse strong { color: var(--danger); }
.streak-stat.s-rate strong { color: var(--primary); }

.note-card { border-radius: 18px; padding: 18px 20px; font-size: 15px; line-height: 1.6; font-weight: 600; border: 1px solid var(--line); }
.note-card.good { background: var(--good-soft); color: var(--good); border-color: color-mix(in srgb, var(--good) 26%, transparent); }
.note-card.warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 26%, transparent); }
.note-card.info { background: var(--primary-soft); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 26%, transparent); }

.streak-actions { display: grid; grid-template-columns: 1fr; gap: 14px; }
.strong-btn {
  position: relative; overflow: hidden; width: 100%;
  display: grid; gap: 4px; justify-items: center; text-align: center;
  padding: 22px; border-radius: var(--radius); border: none; color: #fff;
  background: linear-gradient(135deg, var(--good), #16a34a);
  box-shadow: 0 18px 36px -16px color-mix(in srgb, var(--good) 70%, transparent);
  transition: transform .12s, box-shadow .2s, filter .2s;
}
.strong-btn:hover { transform: translateY(-2px); filter: brightness(1.04); }
.strong-btn.selected { outline: 3px solid color-mix(in srgb, var(--good) 50%, transparent); outline-offset: 2px; }
.strong-btn .sb-emoji { font-size: 30px; }
.strong-btn b { font-size: 17px; font-family: var(--font-head); }
.strong-btn small { color: rgba(255,255,255,0.88); font-size: 12.5px; }

.relapse-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px; border-radius: 14px; font-weight: 800; font-size: 13.5px;
  color: var(--danger); background: var(--danger-soft);
  border: 1.5px dashed color-mix(in srgb, var(--danger) 45%, transparent);
  transition: .18s;
}
.relapse-btn:hover { background: color-mix(in srgb, var(--danger) 16%, var(--surface)); border-style: solid; transform: translateY(-1px); }
.relapse-btn.selected { background: var(--danger); color: #fff; border-color: transparent; }

/* phase track (milestones) */
.phase-track { display: grid; gap: 10px; }
.phase-node { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: .15s; }
.phase-node.unlocked { border-color: color-mix(in srgb, var(--gold) 36%, var(--line)); background: linear-gradient(120deg, var(--gold-soft), var(--surface)); }
.phase-node.current { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); background: linear-gradient(120deg, var(--primary-soft), var(--surface)); }
.phase-medal { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--surface-2); border: 1px solid var(--line); }
.phase-node.unlocked .phase-medal { background: linear-gradient(140deg, var(--gold-2), #f0c14b); border-color: transparent; }
.phase-node.current .phase-medal { background: linear-gradient(140deg, var(--primary-600), var(--violet)); color: #fff; }
.phase-node h4 { font-size: 14.5px; }
.phase-node p { color: var(--muted); font-size: 12px; }
.phase-node .pn-days { font-family: var(--font-head); font-weight: 800; font-size: 18px; color: var(--text-2); }
.phase-node.unlocked .pn-days { color: var(--gold); }

/* calendar strip */
.cal-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.cal-cell { display: grid; justify-items: center; gap: 3px; min-width: 44px; padding: 8px 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.cal-cell .cc-name { font-size: 9.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.cal-cell .cc-num { font-size: 12px; font-weight: 700; }
.cal-cell .cc-dot { font-size: 13px; line-height: 1; }
.cal-cell.clean { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 26%, transparent); }
.cal-cell.relapse, .cal-cell.junk { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 26%, transparent); }
.cal-cell.today { outline: 2px solid var(--primary); outline-offset: 1px; }

/* ============================================================
   Celebration + danger overlays
   ============================================================ */
.celebrate { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; background: rgba(8,12,22,0.5); backdrop-filter: blur(6px); animation: fadeIn .25s ease; }
.celebrate-card { position: relative; width: min(420px, 92vw); background: var(--surface); border-radius: var(--radius-lg); padding: 32px 28px; text-align: center; box-shadow: var(--shadow-lg); animation: popIn .45s cubic-bezier(.2,1.2,.3,1) both; overflow: hidden; }
.celebrate-card .cc-medal { width: 92px; height: 92px; border-radius: 28px; margin: 0 auto 14px; display: grid; place-items: center; font-size: 46px; background: linear-gradient(140deg, var(--gold-2), #f0c14b); box-shadow: 0 20px 40px -16px color-mix(in srgb, var(--gold) 60%, transparent); animation: pulseGlow 2s ease-in-out infinite; }
.celebrate-card h2 { font-size: 23px; }
.celebrate-card p { color: var(--text-2); margin-top: 8px; font-size: 14.5px; line-height: 1.55; }
.celebrate-card .btn-primary { margin-top: 20px; }
.confetti { position: absolute; top: -10px; width: 10px; height: 16px; opacity: .9; animation: confettiFall linear forwards; }
@keyframes confettiFall { to { transform: translateY(120vh) rotate(720deg); opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: scale(.8) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Study alarm modal */
.study-alarm-panel {
  border-top: 5px solid var(--danger) !important;
  max-width: 420px !important;
  text-align: center;
}
.sal-icon { font-size: 54px; line-height: 1; margin-bottom: 4px; animation: pulseGlow 1.5s ease-in-out infinite; }
.sal-actions { display: grid; gap: 10px; margin-top: 4px; }
.sal-photo-section { background: var(--primary-soft); border: 1.5px dashed var(--primary); border-radius: 14px; padding: 16px 14px; }
.sal-divider { display: flex; align-items: center; gap: 10px; margin: 2px 0; }
.sal-divider span { flex: 1; height: 1px; background: var(--line); }
.sal-divider small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }

/* Weekly schedule grid */
.rg-week-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px;
}
.rg-day-slot {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 6px; text-align: center; transition: border-color .15s;
}
.rg-day-slot:focus-within { border-color: var(--primary); }
.rg-day-name { font-size: 11px; font-weight: 800; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.rg-day-input {
  width: 100%; text-align: center; padding: 5px 2px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); font-size: 13px; font-weight: 700; color: var(--text);
}
.rg-day-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.rg-day-tag { font-size: 10px; font-weight: 700; color: var(--muted); }
.rg-day-off { background: var(--surface-3); }
.rg-day-off .rg-day-name { color: var(--muted); }
.rg-day-off .rg-day-tag { color: var(--muted); }
@media (max-width: 600px) { .rg-week-grid { grid-template-columns: repeat(4, 1fr); } }

/* Roadmap form: pace row toggle */
.rg-pace-row { margin-top: 14px; }

.danger-loader { display: grid; justify-items: center; gap: 14px; padding: 10px 0; }
.danger-ring { width: 84px; height: 84px; border-radius: 50%; border: 6px solid var(--danger-soft); border-top-color: var(--danger); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.strong-loader { width: 84px; height: 84px; border-radius: 50%; border: 6px solid var(--good-soft); border-top-color: var(--good); animation: spin .8s linear infinite; }

/* ============================================================
   Modal + toast
   ============================================================ */
.modal-backdrop { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 18px; background: rgba(8,12,22,0.55); backdrop-filter: blur(6px); animation: fadeIn .2s ease; overflow-y: auto; }
.modal-panel { width: min(680px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 24px; animation: popIn .35s cubic-bezier(.2,1.1,.3,1) both; margin: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.modal-head h2 { font-size: 19px; }
.modal-close { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; }
.modal-close:hover { color: var(--text); }
.media-lightbox { display: grid; gap: 10px; }
.video-frame { position: relative; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-loading { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; gap: 12px; background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 600; }
.video-loading .strong-loader { width: 54px; height: 54px; border-width: 5px; }
.video-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 12px; }
.video-foot .small-text { flex: 1; min-width: 180px; }
.video-foot a.btn { text-decoration: none; }

/* Gym: video set UI */
.gvs-wrap { padding: 8px 4px 4px; text-align: center; }
.gvs-icon { font-size: 48px; margin-bottom: 4px; }
.gvs-wrap h3 { font-size: 17px; }
.gvs-wrap .small-text { max-width: 42ch; margin: 0 auto; }
.gvs-wrap a.btn, .gvs-wrap .btn { text-decoration: none; }
.gvs-wrap .field { text-align: left; margin-top: 18px; }
.reminder-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.reminder-row:last-child { border-bottom: none; }
.sync-state-grid { display: grid; gap: 8px; margin: 12px 0; }

.toast {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%) translateY(20px);
  z-index: 1300; max-width: min(440px, 92vw);
  background: var(--text); color: var(--surface);
  padding: 13px 18px; border-radius: 14px; font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: .3s;
}
[data-theme="dark"] .toast { background: var(--surface-3); color: var(--text); border: 1px solid var(--line-2); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1080px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .next-grid { grid-template-columns: 1fr; }
  .dash-split { grid-template-columns: 1fr; }
}
@media (max-width: 920px) {
  .app-shell { grid-template-columns: 1fr; max-width: 100vw; overflow-x: hidden; }
  .main-shell { max-width: 100vw; overflow-x: hidden; }
  .sidebar { display: none; }
  .menu-only { display: inline-grid; }
  .bottom-nav { display: flex; }
  main { padding-bottom: 110px; }
  .deadline-grid { grid-template-columns: 1fr; }
  .grid.three { grid-template-columns: 1fr; }
  .food-impact-card { grid-template-columns: 1fr; }
  .food-impact-card > div:first-child { border-right: none; border-bottom: 1px solid var(--line); }
  .streak-stats { grid-template-columns: repeat(2, 1fr); }
  .hero, .streak-hero { grid-template-columns: 1fr; text-align: left; }
  .hero-ring, .streak-bigring { justify-self: start; }
  /* Discipline cards — single-column layout on all mobile/tablet */
  .disc-card-header { grid-template-columns: 1fr; }
  .dch-streak { text-align: left; }
  .disc-checkin-btns { grid-template-columns: 1fr; }
  .disc-stats { grid-template-columns: repeat(2, 1fr); }
  .disc-options-row { grid-template-columns: repeat(2, 1fr); }
  /* Diet checkin buttons — stack on mobile/tablet */
  .diet-checkin-btns { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .grid.two { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .water-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .hide-sm { display: none; }
  .lesson { grid-template-columns: auto 1fr; }
  .lesson .check-pill { grid-column: 2; justify-self: end; }
  main { padding-left: 14px; padding-right: 14px; }
  .modal-panel { padding: 18px; }
}

/* ============================================================
   Diet — Rebuild (milestone badges, setup prompt, plan week, water dash)
   ============================================================ */

/* Setup prompt */
.diet-setup-prompt { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: flex-start; background: var(--primary-soft); border: 2px dashed color-mix(in srgb, var(--primary) 35%, transparent); border-radius: 18px; padding: 20px 22px; margin-bottom: 4px; }
.dsp-icon { font-size: 2.6rem; line-height: 1; }
.dsp-body h3 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.dsp-body p { font-size: 13px; color: var(--text-2); margin-bottom: 12px; }

/* Diet check-in card */
.diet-checkin-card { display: grid; gap: 0; }
.diet-checkin-btns { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: stretch; }
.diet-relapse-wide { align-self: stretch; border-radius: 14px; padding: 12px 18px; font-size: 13px; font-weight: 700; white-space: nowrap; }

/* Milestone badge grid */
.milestone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.milestone-badge { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 6px 10px; border-radius: 14px; background: var(--surface-2); border: 1.5px solid var(--line); text-align: center; transition: all .18s; cursor: default; }
.milestone-badge.unlocked { border-color: color-mix(in srgb, var(--gold) 50%, transparent); background: linear-gradient(135deg, var(--gold-soft), var(--surface)); }
.milestone-badge.active { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); animation: milePulse 2.2s ease-in-out infinite; }
.milestone-badge.locked { opacity: 0.48; }
.mb-emoji { font-size: 1.7rem; line-height: 1; }
.mb-name { font-size: 10.5px; font-weight: 800; color: var(--text-1); line-height: 1.2; }
.mb-days { font-size: 10px; font-weight: 700; color: var(--muted); }
.mb-reward { font-size: 9.5px; color: var(--text-2); line-height: 1.3; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@keyframes milePulse { 0%,100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); } 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--primary) 8%, transparent); } }

/* Meal type selector in food judge */
.meal-type-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.meal-type-btn { padding: 7px 13px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--text-2); font-size: 12.5px; font-weight: 600; transition: .15s; cursor: pointer; }
.meal-type-btn:hover { border-color: var(--line-2); }
.meal-type-btn.on { background: var(--primary-soft); color: var(--primary-600); border-color: color-mix(in srgb, var(--primary) 35%, transparent); }

/* Personalized plan weekly grid */
.diet-plan-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.diet-plan-stats .streak-stat { flex: 1; min-width: 90px; padding: 12px 14px; border-radius: 14px; }
.diet-plan-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; overflow-x: auto; }
.diet-plan-day { background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 8px; min-width: 100px; transition: .15s; }
.diet-plan-day.today { border-color: var(--primary); background: var(--primary-soft); }
.dpd-day { font-family: var(--font-head); font-size: 13px; font-weight: 800; color: var(--text-1); margin-bottom: 8px; display: flex; align-items: baseline; gap: 4px; }
.dpd-day small { font-size: 10px; color: var(--primary-600); font-weight: 700; }
.diet-plan-day.today .dpd-day { color: var(--primary-600); }
.dpd-meals { display: grid; gap: 5px; }
.dpd-meal { display: flex; gap: 5px; align-items: flex-start; font-size: 11.5px; color: var(--text-2); line-height: 1.35; }
.dpd-meal span:first-child { flex: none; font-size: 13px; }
@media (max-width: 860px) { .diet-plan-week { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .diet-plan-week { grid-template-columns: repeat(2, 1fr); } }

/* Dashboard water card */
.dwc-card { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; padding: 16px 20px; }
.dwc-left { display: grid; gap: 8px; }
.dwc-progress-bar { height: 10px; border-radius: 999px; background: var(--ring-track); overflow: hidden; }
.dwc-fill { height: 100%; background: linear-gradient(90deg, #0ea5e9, #0284c7); border-radius: 999px; transition: width .4s; }
.dwc-numbers { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.dwc-ml { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--text-1); }
.dwc-ml small { font-size: 13px; font-weight: 600; color: var(--muted); }
.dwc-remain { font-size: 12.5px; font-weight: 600; color: var(--primary); }
.dwc-remain.done { color: var(--good); }
.dwc-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 560px) { .dwc-card { grid-template-columns: 1fr; } .dwc-btns { justify-content: flex-start; } }

/* ============================================================
   Discipline Engine — rebuild
   ============================================================ */

/* Hero */
.disc-hero { background: linear-gradient(135deg, #111827 0%, #1f2937 50%, #374151 100%); }

/* Setup page */
.disc-setup-hero { padding: 8px 0 20px; }
.disc-setup-hero h2 { font-size: clamp(26px, 5vw, 42px); margin: 8px 0 12px; }
.dsh-sub { font-size: 15px; color: var(--text-2); max-width: 60ch; line-height: 1.6; }
.disc-categories { display: grid; gap: 24px; margin-bottom: 8px; }
.disc-cat-group { }
.disc-cat-label { font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; padding-left: 2px; }
.disc-options-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.disc-option { padding: 14px 12px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); cursor: pointer; position: relative; transition: all .18s; display: grid; gap: 5px; user-select: none; }
.disc-option:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.07); }
.disc-option.selected { border-color: var(--primary); background: var(--primary-soft); }
.disc-opt-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.disc-opt-icon { font-size: 1.7rem; line-height: 1; }
.disc-opt-check { width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 11px; font-weight: 900; display: none; align-items: center; justify-content: center; flex: none; }
.disc-option.selected .disc-opt-check { display: flex; }
.disc-opt-name { font-size: 13.5px; font-weight: 800; color: var(--text-1); line-height: 1.2; }
.disc-opt-desc { font-size: 11.5px; color: var(--text-2); line-height: 1.4; }
.disc-setup-footer { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 0 40px; text-align: center; }
.disc-setup-footer .btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

/* Discipline card */
.disc-card { border-radius: 20px; overflow: hidden; margin-bottom: 24px; border: 1px solid var(--line); box-shadow: 0 2px 16px rgba(0,0,0,0.06); }
.disc-card-header { padding: 22px 24px 24px; color: #fff; display: grid; grid-template-columns: 1fr auto; align-items: flex-start; gap: 16px; position: relative; overflow: hidden; }
.disc-card-header::after { content: ""; position: absolute; right: -70px; top: -70px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,0.09); pointer-events: none; }
.dch-left { display: flex; gap: 14px; align-items: flex-start; position: relative; z-index: 1; }
.dch-icon { font-size: 2.2rem; flex: none; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); }
.dch-left h3 { font-size: 19px; font-weight: 800; margin-bottom: 5px; }
.dch-desc { font-size: 13px; opacity: 0.85; max-width: 44ch; line-height: 1.5; }
.dch-streak { text-align: center; flex: none; position: relative; z-index: 1; }
.dch-num { font-family: var(--font-head); font-size: 46px; font-weight: 900; line-height: 1; letter-spacing: -0.03em; }
.dch-label { font-size: 11px; opacity: 0.82; margin-top: 3px; font-weight: 600; }
.disc-card-body { padding: 20px 24px; display: grid; gap: 18px; background: var(--surface); }
.disc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.disc-stat { text-align: center; padding: 10px 6px; background: var(--surface-2); border-radius: 12px; }
.disc-stat strong { display: block; font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--text-1); }
.disc-stat span { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.disc-progress-wrap { display: grid; gap: 6px; }
.disc-next-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.disc-progress-bar { height: 8px; background: var(--ring-track); border-radius: 999px; overflow: hidden; }
.disc-progress-fill { height: 100%; background: var(--disc-color, var(--primary)); border-radius: 999px; transition: width .5s ease; }
.disc-checkin-btns { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: stretch; }
.disc-strong-btn { background: var(--btn-color, var(--primary)) !important; }
.disc-relapse-btn { align-self: stretch; border-radius: 14px; padding: 12px 16px; font-size: 13px; font-weight: 700; white-space: nowrap; }

/* Edit chips in modal */
.disc-edit-chip { padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--text-2); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: .15s; }
.disc-edit-chip:hover { border-color: var(--line-2); }
.disc-edit-chip.on { background: var(--primary-soft); color: var(--primary-600); border-color: color-mix(in srgb, var(--primary) 35%, transparent); }

@media (max-width: 480px) {
  .disc-options-row { grid-template-columns: 1fr 1fr; }
}

/* chip-toggle override for diet food reference tabs (use primary color not rose) */
.diet-ref-tabs .chip-toggle.on { background: var(--primary-soft); color: var(--primary-600); border-color: color-mix(in srgb, var(--primary) 32%, transparent); }

/* Women's Health / Period Tracker
   ============================================================ */
.health-hero { background: linear-gradient(135deg, #be185d 0%, #db2777 50%, #9d4edd 100%); }

/* ── Period countdown banner ── */
.period-countdown {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 16px 20px; border-radius: 16px; margin-top: 16px;
  border: 1.5px solid;
}
.period-countdown.coming { background: rgba(37,99,235,0.06); border-color: rgba(37,99,235,0.22); }
.period-countdown.soon   { background: rgba(234,179,8,0.08);  border-color: rgba(234,179,8,0.30); }
.period-countdown.imminent { background: rgba(244,63,94,0.08); border-color: rgba(244,63,94,0.28); }
.period-countdown.late   { background: rgba(244,63,94,0.10); border-color: rgba(244,63,94,0.35); }
.pcd-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.pcd-ico  { font-size: 26px; flex: none; }
.pcd-left strong { display: block; font-size: 14.5px; font-weight: 700; }
.pcd-left small  { color: var(--muted); font-size: 12.5px; }
.pcd-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pcd-days { font-size: 28px; font-weight: 800; color: var(--rose); letter-spacing: -0.03em; flex: none; }
.period-countdown.coming .pcd-days { color: var(--primary); }
.period-countdown.soon .pcd-days   { color: var(--warn); }

/* ── BSE result grid ── */
.bse-result-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.bse-result-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px;
  border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface-2);
  cursor: pointer; font-size: 12px; font-weight: 600; color: var(--text-2);
  transition: .16s; text-align: center;
}
.bse-result-btn .bse-result-ico { font-size: 24px; line-height: 1; }
.bse-result-btn.is-ok:hover { border-color: var(--teal); background: rgba(13,148,136,0.07); color: var(--teal); }
.bse-result-btn.is-concern:hover { border-color: var(--rose); background: rgba(244,63,94,0.07); color: var(--rose); }

/* ── BSE report card ── */
.bse-report-card { padding: 18px 20px; border-radius: 16px; }
.bse-report-card.report-ok      { background: rgba(13,148,136,0.07); border: 1.5px solid rgba(13,148,136,0.25); }
.bse-report-card.report-concern { background: rgba(244,63,94,0.07);  border: 1.5px solid rgba(244,63,94,0.25); }
.bse-report-header { display: flex; align-items: center; gap: 14px; }

/* ── btn-link helper ── */
.btn-link { background: none; border: none; color: var(--primary); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 0; text-decoration: underline; }

@media (max-width: 500px) {
  .bse-result-grid { grid-template-columns: repeat(2, 1fr); }
  .period-countdown { flex-direction: column; align-items: flex-start; }
}
.mood-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 8px; }
.mood-btn { display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); transition: .15s; }
.mood-btn span { font-size: 24px; }
.mood-btn small { font-size: 10px; color: var(--muted); font-weight: 600; }
.mood-btn:hover { border-color: var(--line-2); }
.mood-btn.selected { border-color: var(--rose); background: var(--rose-soft); }
.mood-btn.selected small { color: var(--rose); }
.chip-toggle { padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); font-size: 12.5px; font-weight: 600; transition: .15s; }
.chip-toggle:hover { border-color: var(--line-2); }
.chip-toggle.on { background: var(--rose-soft); color: var(--rose); border-color: color-mix(in srgb, var(--rose) 32%, transparent); }
.care-card h3 { font-size: 15px; margin-bottom: 10px; }
.care-list { margin: 0; padding-left: 18px; display: grid; gap: 7px; }
.care-list li { font-size: 13px; color: var(--text-2); line-height: 1.45; }
.cal-month { font-family: var(--font-head); font-weight: 800; font-size: 16px; margin-bottom: 12px; }
.cal-grid-head { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.cal-grid-head span { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-empty { aspect-ratio: 1; }
.cal-day { aspect-ratio: 1; display: grid; place-items: center; position: relative; border-radius: 10px; font-size: 13px; font-weight: 600; background: var(--surface-2); border: 1px solid transparent; }
.cal-day.is-period { background: var(--rose-soft); color: var(--rose); }
.cal-day.is-fertile { background: rgba(13,148,136,0.12); color: var(--teal); }
.cal-day.is-ovul { background: var(--violet-soft); color: var(--violet); border-color: color-mix(in srgb, var(--violet) 40%, transparent); font-weight: 800; }
.cal-day.is-today { outline: 2px solid var(--primary); outline-offset: 1px; }
.cal-mark { position: absolute; bottom: 3px; font-style: normal; font-size: 14px; line-height: 1; color: var(--rose); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); font-weight: 600; }
.cal-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.cal-legend .dot.is-period { background: var(--rose); }
.cal-legend .dot.is-fertile { background: var(--teal); }
.cal-legend .dot.is-ovul { background: var(--violet); }
@media (max-width: 620px) { .mood-row { grid-template-columns: repeat(3, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============================================================
   Control Center — full admin
   ============================================================ */
.ctrl-status-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px; margin-bottom: 4px;
}
.ctrl-stat {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; text-align: center;
}
.ctrl-stat-v { display: block; font-size: 18px; font-weight: 800; color: var(--primary); margin-bottom: 3px; }
.ctrl-stat span:last-child { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ctrl-info-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.ctrl-info-row:last-of-type { border-bottom: none; }
.ctrl-info-row span { color: var(--muted); }
.ctrl-info-row strong { color: var(--text); font-weight: 700; text-align: right; }
.ctrl-acc-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.ctrl-acc-row:last-child { border-bottom: none; }
.ctrl-acc-avatar {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 18px;
}
.ctrl-acc-info { flex: 1; min-width: 0; }
.ctrl-acc-info strong { display: block; font-size: 14px; font-weight: 700; }
.ctrl-acc-info small { color: var(--muted); font-size: 11.5px; }
.ctrl-danger-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid rgba(244,63,94,0.15); flex-wrap: wrap;
}
.ctrl-danger-row:last-child { border-bottom: none; padding-bottom: 0; }
.ctrl-danger-row strong { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 2px; }
.ctrl-danger-row p { font-size: 12px; color: var(--muted); margin: 0; }
@media (max-width: 500px) {
  .ctrl-status-strip { grid-template-columns: repeat(3, 1fr); }
  .ctrl-acc-row { flex-wrap: wrap; }
}

/* ============================================================
   Master Admin Panel — full control dashboard
   ============================================================ */
.ma-scene {
  min-height: 100vh;
  background: linear-gradient(160deg, #0f1824 0%, #162030 50%, #0d1a10 100%);
  padding: 0 0 60px;
}
.ma-wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* Top bar */
.ma-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0 24px; border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 28px;
}
.ma-brand { display: flex; align-items: center; gap: 12px; }
.ma-brand-icon { font-size: 22px; }
.ma-brand-name { font-family: var(--font-head); font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.ma-brand-sub { font-size: 11px; color: rgba(255,255,255,0.38); letter-spacing: .06em; text-transform: uppercase; }

/* Stats strip */
.ma-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 32px; }
.ma-stat {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; padding: 16px 18px;
}
.ma-stat strong { display: block; font-size: 26px; font-weight: 800; color: #fff; letter-spacing: -0.03em; }
.ma-stat span { font-size: 12px; color: rgba(255,255,255,0.45); margin-top: 2px; display: block; }

/* Section */
.ma-section { margin-bottom: 32px; }
.ma-section-head { margin-bottom: 14px; }
.ma-section-head h2 { font-family: var(--font-head); font-size: 18px; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.ma-section-head p { color: rgba(255,255,255,0.40); font-size: 13px; margin-top: 3px; }

/* User cards */
.ma-user-card {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 18px 20px; margin-bottom: 10px;
  transition: border-color .15s;
}
.ma-user-card:hover { border-color: rgba(255,255,255,0.14); }
.ma-user-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ma-avatar {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, #1e3fa8, #0f7060);
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 18px;
}
.ma-user-info { flex: 1; min-width: 0; }
.ma-user-info strong { display: block; font-size: 15px; font-weight: 700; color: #fff; }
.ma-user-info span { display: block; font-size: 12.5px; color: rgba(255,255,255,0.45); margin-top: 1px; }
.ma-user-info small { display: block; font-size: 11px; color: rgba(255,255,255,0.30); margin-top: 3px; }
.ma-user-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Admin buttons */
.ma-btn {
  padding: 7px 14px; border-radius: 10px; border: none; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: filter .15s, transform .1s; white-space: nowrap;
}
.ma-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.ma-btn:active { transform: translateY(0); }
.ma-btn-primary { background: #2563eb; color: #fff; }
.ma-btn-warn { background: #92400e; color: #fff; }
.ma-btn-danger { background: #991b1b; color: #fff; }
.ma-btn-ghost { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.75); border: 1px solid rgba(255,255,255,0.12); }

/* Generic card in admin */
.ma-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; overflow: hidden; }
.ma-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.ma-row:last-child { border-bottom: none; }
.ma-row strong { color: rgba(255,255,255,0.8); font-size: 13.5px; }
.ma-empty { color: rgba(255,255,255,0.35); font-size: 14px; text-align: center; padding: 40px 20px; }

/* Admin edit mode banner */
.admin-edit-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: linear-gradient(135deg, #1e3fa8, #0f7060);
  color: #fff; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px; font-size: 13px; font-weight: 600;
  box-shadow: 0 2px 16px rgba(0,0,0,0.4);
}
.admin-edit-banner button {
  background: rgba(255,255,255,0.18); border: none; color: #fff; padding: 6px 14px;
  border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.admin-edit-banner button:hover { background: rgba(255,255,255,0.28); }

/* Push content down when banner is showing */
body:has(.admin-edit-banner) .app-shell { padding-top: 44px; }

@media (max-width: 640px) {
  .ma-stats { grid-template-columns: repeat(2,1fr); }
  .ma-user-head { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   Gender picker (auth signup)
   ============================================================ */
.gender-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.gender-btn {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border-radius: 14px; border: 2px solid var(--line); background: var(--surface-2);
  cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text-2);
  transition: .18s; text-align: left; width: 100%;
}
.gender-btn .gender-ico { font-size: 24px; line-height: 1; }
.gender-btn:hover { border-color: var(--primary); color: var(--primary); }
.gender-btn.selected { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }

/* Hide Women's Health for male accounts */
.no-health .nav-item[data-view="health"],
.no-health .bottom-item[data-view="health"] { display: none !important; }

/* ============================================================
   Skincare tracker
   ============================================================ */
.sk-card { padding: 18px 20px; }
.sk-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.sk-header-ico { font-size: 28px; line-height: 1; }
.sk-header h3 { margin: 0; font-size: 15px; font-weight: 800; }
.sk-header small { color: var(--muted); font-size: 12px; display: block; margin-top: 2px; }
.sk-steps { display: grid; gap: 8px; }
.sk-step {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px;
  border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2);
  cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--text-2);
  transition: .16s; text-align: left; width: 100%;
}
.sk-step:hover { border-color: var(--teal); }
.sk-step-num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--surface-3);
  display: grid; place-items: center; font-size: 11px; font-weight: 800;
  color: var(--muted); flex: none; transition: .16s;
}
.sk-step-name { flex: 1; }
.sk-check-ico {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line);
  flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 800;
  color: transparent; transition: .15s;
}
.sk-step.done { background: rgba(13,148,136,0.07); border-color: color-mix(in srgb, var(--teal) 35%, transparent); }
.sk-step.done .sk-step-num { background: var(--teal); color: #fff; }
.sk-step.done .sk-check-ico { background: var(--teal); border-color: var(--teal); color: #fff; }
.sk-step.done .sk-step-name { color: var(--muted); text-decoration: line-through; }

.sk-weekly { display: grid; gap: 10px; margin-top: 10px; }
.sk-weekly-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: 13px; border: 1.5px solid var(--line); background: var(--surface-2);
  transition: .15s;
}
.sk-weekly-ico { font-size: 24px; line-height: 1; flex: none; }
.sk-weekly-info { flex: 1; min-width: 0; }
.sk-weekly-info strong { display: block; font-size: 13.5px; font-weight: 700; }
.sk-weekly-info small { color: var(--muted); font-size: 12px; }
.sk-weekly-item.done-today { background: rgba(13,148,136,0.07); border-color: color-mix(in srgb, var(--teal) 30%, transparent); }
.sk-streak { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; background: var(--warn-soft); color: var(--warn); border-radius: 20px; font-size: 12.5px; font-weight: 700; }

/* ============================================================
   Body tracking
   ============================================================ */
.body-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; margin-bottom: 16px; }
.body-stat-box {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; text-align: center;
}
.bsb-val { font-size: 22px; font-weight: 800; color: var(--primary); letter-spacing: -0.02em; }
.bsb-lbl { font-size: 10.5px; color: var(--muted); font-weight: 600; margin-top: 3px; text-transform: uppercase; letter-spacing: .04em; }
.weight-log { display: grid; gap: 7px; max-height: 200px; overflow-y: auto; margin-top: 8px; }
.weight-entry { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--surface-2); border-radius: 10px; font-size: 13px; border: 1px solid var(--line); }
.we-date { color: var(--muted); font-size: 12px; flex: 1; }
.we-kg { font-weight: 700; color: var(--text); }
.we-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 18px; padding: 0 2px; line-height: 1; }
.we-del:hover { color: var(--rose); }

/* ============================================================
   Breast self-exam card
   ============================================================ */
.bse-card {
  background: linear-gradient(135deg, #fff1f5, #fce7f3); border: 1.5px solid rgba(219,39,119,0.18);
  border-radius: var(--radius-lg); padding: 22px 24px;
}
[data-theme=dark] .bse-card { background: linear-gradient(135deg, rgba(190,24,93,0.12), rgba(157,78,221,0.08)); border-color: rgba(219,39,119,0.25); }
.bse-quote { font-size: 13px; color: var(--text-2); font-style: italic; margin-bottom: 4px; line-height: 1.6; }
.bse-source { font-size: 11.5px; color: var(--muted); margin-bottom: 16px; }
.bse-steps { display: grid; gap: 10px; margin-bottom: 16px; }
.bse-step { display: flex; align-items: flex-start; gap: 13px; padding: 13px 14px; background: rgba(255,255,255,0.65); border-radius: 12px; }
[data-theme=dark] .bse-step { background: rgba(255,255,255,0.07); }
.bse-step-num {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #db2777, #9d4edd); color: #fff;
  display: grid; place-items: center; font-size: 14px; font-weight: 800; margin-top: 1px;
}
.bse-step-text strong { display: block; font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.bse-step-text small { color: var(--muted); font-size: 12.5px; line-height: 1.5; }

/* ============================================================
   Partner share card
   ============================================================ */
.share-card {
  background: linear-gradient(135deg, rgba(37,99,235,0.05), rgba(13,148,136,0.05));
  border: 1.5px solid rgba(37,99,235,0.18); border-radius: var(--radius-lg); padding: 20px 22px;
}
.share-token {
  font-family: monospace; font-size: 30px; font-weight: 800; letter-spacing: .18em;
  color: var(--primary); text-align: center; padding: 14px; background: var(--surface-2);
  border-radius: 12px; margin: 12px 0; border: 1px solid var(--line);
}
.share-fields { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.share-field-btn {
  padding: 6px 13px; border-radius: 20px; border: 1.5px solid var(--line);
  background: var(--surface-2); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: .15s;
}
.share-field-btn.on { background: var(--primary-soft); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 35%, transparent); }

/* ============================================================
   Calendar — cycle day number overlay
   ============================================================ */
.cal-day { grid-template-rows: auto auto; align-content: center; gap: 1px; }
.cal-day-num { font-size: 13px; font-weight: 600; line-height: 1; }
.cal-cycle-day { font-size: 8px; font-weight: 800; color: var(--muted); line-height: 1; opacity: 0.7; }
.cal-day.is-period .cal-cycle-day { color: var(--rose); opacity: 1; }
.cal-day.is-fertile .cal-cycle-day { color: var(--teal); opacity: 1; }
.cal-day.is-ovul .cal-cycle-day { color: var(--violet); opacity: 1; }
.cal-day { cursor: pointer; }
.cal-day:hover { border-color: var(--line-2); }

/* ── Period confirmation banner (top of health view) ── */
.pcb {
  border-radius: var(--radius-lg); padding: 20px 22px;
  margin-bottom: 0; display: flex; flex-direction: column; gap: 16px;
  position: relative; overflow: hidden;
  border: 2px solid;
}
.pcb-due     { background: rgba(37,99,235,0.07);  border-color: rgba(37,99,235,0.3); }
.pcb-waiting { background: rgba(234,179,8,0.08);  border-color: rgba(234,179,8,0.35); }
.pcb-late    { background: rgba(244,63,94,0.08);  border-color: rgba(244,63,94,0.32); }
.pcb-pulse {
  position: absolute; top: 14px; right: 18px; width: 10px; height: 10px;
  border-radius: 50%; animation: pcb-blink 1.5s ease-in-out infinite;
}
.pcb-due .pcb-pulse     { background: #2563eb; }
.pcb-waiting .pcb-pulse { background: #ca8a04; }
.pcb-late .pcb-pulse    { background: var(--rose); }
@keyframes pcb-blink { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.4;transform:scale(0.7)} }
.pcb-body { display: flex; align-items: center; gap: 14px; }
.pcb-icon { font-size: 28px; line-height: 1; flex: none; }
.pcb-title { font-size: 15px; font-weight: 800; margin-bottom: 3px; }
.pcb-due .pcb-title     { color: var(--primary); }
.pcb-waiting .pcb-title { color: #92400e; }
.pcb-late .pcb-title    { color: var(--rose); }
.pcb-sub { font-size: 12.5px; color: var(--muted); }
.pcb-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pcb-yes {
  padding: 11px 22px; border-radius: 12px; border: none;
  font-size: 14px; font-weight: 700; cursor: pointer; transition: .15s;
  background: var(--rose); color: #fff; flex: none;
}
.pcb-due .pcb-yes { background: var(--primary); }
.pcb-waiting .pcb-yes { background: #b45309; }
.pcb-yes:hover { filter: brightness(1.1); transform: translateY(-1px); }
.pcb-alt {
  padding: 9px 16px; border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--surface-2); font-size: 13px; font-weight: 600; cursor: pointer; transition: .15s;
  color: var(--text-2);
}
.pcb-alt:hover { border-color: var(--line-2); }
.pcb-skip {
  background: none; border: none; color: var(--muted); font-size: 12.5px;
  font-weight: 600; cursor: pointer; padding: 4px 0; text-decoration: underline;
}
@media (max-width: 500px) {
  .pcb-actions { flex-direction: column; align-items: stretch; }
  .pcb-yes { text-align: center; }
  .pcb-alt { text-align: center; }
}

/* ── Calendar predicted period start marker ── */
.cal-period-flag {
  position: absolute; top: 3px; right: 4px;
  font-size: 8px; font-style: normal; color: var(--rose); opacity: 0.8; line-height: 1;
}
.cal-day.is-period-start { outline: 2px solid var(--rose); outline-offset: 1px; }

/* ── Multi-month calendar nav ── */
.cal-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.cal-nav-range { font-size: 13px; font-weight: 700; color: var(--text-2); }
.cal-month-block { margin-bottom: 4px; }
.cal-month-label { font-family: var(--font-head); font-weight: 800; font-size: 15px; margin-bottom: 10px; color: var(--text); }
.cal-month-sep { height: 1px; background: var(--line); margin: 18px 0; }

/* ── Pain / Energy level dots ── */
.level-dots { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.ldot {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line);
  background: var(--surface-2); cursor: pointer; transition: .15s; flex: none;
}
.ldot.on { background: var(--lc); border-color: var(--lc); }
.ldot:hover { border-color: var(--lc); opacity: 0.85; }

/* ── Cycle history chart ── */
.cch-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.cch-chart {
  position: relative; display: flex; align-items: flex-end;
  padding-bottom: 22px; /* room for labels */
  border-bottom: 1px solid var(--line); margin-bottom: 6px;
}
.cch-avg-line {
  position: absolute; left: 0; right: 0; height: 2px;
  background: color-mix(in srgb, var(--primary) 40%, transparent);
  border-top: 2px dashed var(--primary);
  pointer-events: none; z-index: 1;
}
.cch-bars { display: flex; align-items: flex-end; gap: 6px; width: 100%; overflow-x: auto; padding-bottom: 2px; }
.cch-bar-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex: 1; min-width: 28px; max-width: 52px;
}
.cch-val { font-size: 10px; font-weight: 800; color: var(--muted); line-height: 1; }
.cch-bar { width: 100%; border-radius: 6px 6px 0 0; min-height: 12px; transition: height .3s; }
.cch-lbl { font-size: 10px; color: var(--muted); font-weight: 600; position: absolute; bottom: 4px; }
.cch-bar-wrap { position: relative; }

/* ── Cycle insights card ── */
.insights-card { display: grid; gap: 12px; }
.insight-item { display: flex; align-items: flex-start; gap: 10px; }
.insight-dot { font-size: 8px; color: var(--rose); margin-top: 5px; flex: none; }
.insight-item p { font-size: 13.5px; color: var(--text-2); line-height: 1.5; margin: 0; }

/* ── Daily health summary card ── */
.hsum-empty {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  background: var(--surface-2); border: 1.5px dashed var(--line); border-radius: var(--radius-lg);
}
.hsum-empty-ico { font-size: 32px; flex: none; }
.hsum-empty-title { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.hsum-empty-sub { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.hsum-card { border-radius: var(--radius-lg); padding: 18px 20px; }
.hsum-hd { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.hsum-big-ico { font-size: 30px; line-height: 1; flex: none; }
.hsum-label { font-size: 15px; font-weight: 800; margin-bottom: 2px; }
.hsum-sublabel { font-size: 12px; color: var(--muted); }
.hsum-lines { display: grid; gap: 10px; }
.hsum-line { display: flex; align-items: flex-start; gap: 10px; }
.hsum-le { font-size: 18px; line-height: 1.3; flex: none; }
.hsum-line p { font-size: 13px; color: var(--text-2); line-height: 1.55; margin: 0; }

/* ── Interactive self-care (issue selector) ── */
.issue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.issue-btn {
  display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 8px;
  border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface-2);
  cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--text-2);
  transition: .16s; position: relative; text-align: center;
}
.issue-btn:hover { border-color: var(--line-2); background: var(--surface-3); }
.issue-btn.suggested { border-color: var(--ib, var(--rose)); background: color-mix(in srgb, var(--ib, var(--rose)) 8%, transparent); color: var(--ib, var(--rose)); }
.issue-btn-ico { font-size: 22px; line-height: 1; }
.issue-sug { position: absolute; top: 5px; right: 7px; font-size: 8px; color: var(--ib, var(--rose)); }
.issue-tx-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.issue-tips { display: grid; gap: 12px; margin-bottom: 4px; }
.issue-tip { display: flex; align-items: flex-start; gap: 13px; padding: 13px 14px; background: var(--surface-2); border-radius: 13px; border: 1px solid var(--line); }
.issue-tip-num {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; margin-top: 1px;
}
.issue-tip-body strong { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 3px; }
.issue-tip-body p { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin: 0; }

/* ── BSE improvements ── */
.bse-streak {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px;
  background: var(--warn-soft); color: var(--warn); border-radius: 20px;
  font-size: 12px; font-weight: 700;
}
.bse-checklist-note {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  background: var(--primary-soft); border-radius: 12px; margin: 12px 0;
  font-size: 12.5px; color: var(--text-2); line-height: 1.5;
}
.bse-checklist-note span { font-size: 16px; flex: none; margin-top: 1px; }
.bse-checklist-note p { margin: 0; }

/* ── Body tracking BMI insight ── */
.bmi-insight {
  display: flex; align-items: flex-start; gap: 12px; padding: 13px 15px;
  border-radius: 13px; border-left: 3px solid; background: var(--surface-2);
  margin-top: 14px;
}
.bmi-cat { font-size: 13px; font-weight: 800; white-space: nowrap; flex: none; }
.bmi-insight p { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 0; }

@media (max-width: 500px) {
  .sk-weekly-item { flex-wrap: wrap; }
  .body-stats { grid-template-columns: repeat(2, 1fr); }
  .cal-nav { flex-wrap: wrap; gap: 6px; }
  .cal-nav-range { width: 100%; text-align: center; order: -1; }
}


/* ── Password visibility toggle ── */
.pw-wrap {
  position: relative; display: flex; align-items: center;
}
.pw-wrap input {
  flex: 1; padding-right: 42px !important;
}
.pw-eye {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; padding: 4px; cursor: pointer;
  color: var(--text-3, #8a9ab0); display: flex; align-items: center;
  border-radius: 6px; transition: color 0.15s;
}
.pw-eye:hover { color: var(--primary, #2563eb); }

/* ── Biometric / Fingerprint button ── */
.biometric-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--surface-2, #f1f5fb); border: 1.5px solid var(--border, rgba(0,0,0,0.08));
  color: var(--text-1, #1a2535); font-weight: 600; font-size: 14px;
  padding: 11px 16px; border-radius: 12px; cursor: pointer; width: 100%;
  transition: background 0.15s, border-color 0.15s;
}
.biometric-btn:hover { background: var(--primary-soft, rgba(37,99,235,0.08)); border-color: var(--primary, #2563eb); color: var(--primary, #2563eb); }
