/* ─── NovaFlow theme — signature components ─────────────────────────────────
   Tokens (palette, radii, sidebar surface, Plus Jakarta Sans) live in app.css
   `:root[data-theme="nova"]`. This file carries what tokens cannot: the reference analytics
   dashboard's *layout and shapes* — the lavender canvas with its big top-right disc and white
   swoosh rings, the two-tier header (search + round tools on top, a 40px greeting-size title over
   a gray subtitle below), KPI cards with a top-left icon chip and a sparkline, the chart card with
   its title + segmented range inside, and the indigo→violet auth panel.
   Scoped to `[data-theme="nova"]` (theme-boot.js always stamps it) and loaded last in <head>,
   so it wins ties with page stylesheets without `!important`. */

[data-theme="nova"] {
  --nv-inner: #f3f4fd;     /* hover wash + filled rows sitting on a white card */
  --nv-head-fill: #f7f8ff; /* table head / card foot band */
  --nv-line: #eceef9;
  --nv-track: #f3f4f9;     /* segmented-control track */
  --nv-text-2: #3e4462;    /* the reference's dark-slate secondary copy */
  --nv-raised: #ffffff;    /* search, tooltip, active tool button: the brightest surface */
  --nv-tool: rgba(255, 255, 255, 0.6);
  --nv-seg-on: #e9eafd;    /* active segment of a segmented control */
  --nv-field-line: #e4e7f6;
  --nv-grid: #eceefb;
  --nv-neutral-bg: #eef0f6;
  --nv-neutral-fg: #5a6283;
  --nv-up: #16a34a;        /* the reference's bright "+12.5%" green */
  --nv-solid-sidebar: rgba(255, 255, 255, 0.97);
  /* Canvas: a lavender disc centred off-screen top-right, its white rim and a faint outer ring. */
  --nv-canvas: #f6f6fd;
  --nv-canvas-end: #f3f4fc;
  --nv-disc-1: #c9cdfb;
  --nv-disc-2: #d6d9fc;
  --nv-disc-3: #e1e3fc;
  --nv-rim: rgba(255, 255, 255, 0.85);
  --nv-band: rgba(255, 255, 255, 0.40);
  --nv-ring: rgba(190, 196, 250, 0.30);
  /* Icon glyphs — alpha masks, tinted per use. */
  --nv-g-trend: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 17l6-6 4 4 8-8'/%3E%3Cpath d='M15 7h6v6'/%3E%3C/svg%3E");
  --nv-g-dollar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.5v19'/%3E%3Cpath d='M16.5 7c-.7-1.6-2.4-2.5-4.5-2.5-2.5 0-4.3 1.3-4.3 3.2 0 4.4 9 2 9 6.6 0 2-1.9 3.2-4.7 3.2-2.3 0-4.1-.9-4.9-2.6'/%3E%3C/svg%3E");
  --nv-g-cart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Ccircle cx='9' cy='20' r='1.8'/%3E%3Ccircle cx='18' cy='20' r='1.8'/%3E%3Cpath d='M1.5 3.2c0-.6.5-1 1-1h2.2c.5 0 .9.3 1 .8L6.1 5H21a1 1 0 011 1.2l-1.4 7.2a2 2 0 01-2 1.6H8.4l.3 1.3h10.1a1 1 0 010 2H8a1 1 0 01-1-.8L4 4.2H2.5c-.5 0-1-.4-1-1z'/%3E%3C/svg%3E");
  --nv-g-percent: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 5L5 19'/%3E%3Ccircle cx='7' cy='7' r='2.5'/%3E%3Ccircle cx='17' cy='17' r='2.5'/%3E%3C/svg%3E");
  --nv-g-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath fill-rule='evenodd' d='M12 2a10 10 0 110 20 10 10 0 010-20zm4.7 7.3a1 1 0 00-1.4-1.4L10.5 12.7 8.7 10.9a1 1 0 10-1.4 1.4l2.5 2.5a1 1 0 001.4 0z'/%3E%3C/svg%3E");
  --nv-g-users: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Ccircle cx='9' cy='7.5' r='4'/%3E%3Cpath d='M1.5 20c0-3.9 3.4-7 7.5-7s7.5 3.1 7.5 7a1 1 0 01-1 1h-13a1 1 0 01-1-1z'/%3E%3Ccircle cx='17' cy='8.5' r='3'/%3E%3Cpath d='M17.5 13c2.8.2 5 2.5 5 5.3a.9.9 0 01-.9.9h-3.6c-.2-2.4-1.2-4.5-2.8-6 .7-.1 1.5-.2 2.3-.2z'/%3E%3C/svg%3E");
  --nv-g-bars: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Crect x='3' y='12' width='4' height='9' rx='1.5'/%3E%3Crect x='10' y='7' width='4' height='14' rx='1.5'/%3E%3Crect x='17' y='3' width='4' height='18' rx='1.5'/%3E%3C/svg%3E");
}

/* ─── Canvas: off-screen lavender disc top-right, white swoosh rims, near-white elsewhere ── */
/* Plus Jakarta Sans is already tightly spaced: the shell's -0.01em body tracking glues words together. */
[data-theme="nova"] body { background: var(--nv-canvas); letter-spacing: 0; }
[data-theme="nova"] body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    /* bright white rim of the disc + a second, fainter outer ring */
    radial-gradient(circle at 108% -40%, transparent 0 51vw, var(--nv-rim) 54vw, transparent 58vw),
    radial-gradient(circle at 108% -40%, transparent 0 59vw, var(--nv-ring) 62.5vw, transparent 67vw),
    /* inner swoosh band */
    radial-gradient(circle at 108% -40%, transparent 0 33vw, var(--nv-band) 38vw, transparent 44vw),
    /* the lavender disc itself */
    radial-gradient(circle at 108% -40%, var(--nv-disc-1) 0, var(--nv-disc-2) 32vw, var(--nv-disc-3) 50vw, transparent 54vw),
    linear-gradient(180deg, var(--nv-canvas) 0%, var(--nv-canvas-end) 100%);
}
@media print { [data-theme="nova"] body::before { display: none; } }

/* ─── Sidebar: near-white rail, roomy rows, lavender active pill ───────────── */
[data-theme="nova"] .sidebar { padding: 22px 16px 14px; backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); }
@media (max-width: 1024px) { [data-theme="nova"] .sidebar { background: var(--nv-solid-sidebar); } }
[data-theme="nova"] .sidebar-brand { padding-bottom: 14px; }
[data-theme="nova"] .sidebar-brand .brand-name { font-size: 19px; font-weight: 700; letter-spacing: -0.025em; }
[data-theme="nova"] .sidebar-label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.01em; opacity: 0.85; }
[data-theme="nova"] .sidebar-link { min-height: 46px; padding: 10px 14px; gap: 14px; font-size: 15px; font-weight: 500; border-radius: 14px; }
[data-theme="nova"] .sidebar-link .nav-icon { width: 20px; height: 20px; flex-basis: 20px; }
[data-theme="nova"] .sidebar-link:hover { background: var(--nv-inner); }
[data-theme="nova"] .sidebar-link.is-active { font-weight: 600; }
[data-theme="nova"] .sidebar-link.is-active .nav-icon { stroke-width: 2.1; }
[data-theme="nova"] .sidebar-link.is-active:hover { background: var(--nav-active-bg); }
[data-theme="nova"] .sidebar-footer { padding-top: 16px; }
[data-theme="nova"] .sidebar-footer .avatar { width: 40px; height: 40px; flex-basis: 40px; border-radius: 50%; background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); }
[data-theme="nova"] .sidebar-footer .user-name { font-size: 14px; }

/* ─── Header (desktop): search + round tools on top, big title + subtitle below ─── */
@media (min-width: 769px) {
  [data-theme="nova"] { --topbar-h: 0px; } /* the header scrolls with the page, so sticky offsets start at 0 */
  [data-theme="nova"] .main > .topbar { order: -1; }
  [data-theme="nova"] .topbar {
    position: relative; height: auto; flex-wrap: wrap; row-gap: 28px; column-gap: 16px;
    padding: 26px 32px 4px; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 0;
  }
  [data-theme="nova"] .topbar-search { order: 1; flex: 0 1 500px; }
  [data-theme="nova"] .topbar-tools { order: 2; margin-left: auto; gap: 12px; }
  [data-theme="nova"] .topbar-title { order: 3; flex: 1 0 100%; }
  [data-theme="nova"] .content { padding-top: 22px; }
}
[data-theme="nova"] .topbar-title { display: flex; flex-direction: column-reverse; justify-content: center; }
[data-theme="nova"] .topbar-title h1 { font-size: clamp(24px, 1.7vw + 13px, 40px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }
[data-theme="nova"] .topbar-title .breadcrumb { font-family: var(--font-body); font-size: clamp(14px, 0.4vw + 11px, 18px); color: var(--nv-text-2); margin: 6px 0 0; }
[data-theme="nova"] .topbar-search input {
  height: 50px; padding-left: 48px; font-size: 15px; border-radius: 16px;
  border-color: transparent; background: var(--nv-raised);
  box-shadow: 0 1px 2px rgba(31, 34, 92, 0.04), 0 8px 24px -12px rgba(79, 70, 229, 0.20);
}
[data-theme="nova"] .topbar-search .search-icon { left: 18px; width: 19px; height: 19px; color: var(--nv-text-2); }
/* Round, borderless, barely-tinted tool buttons; the notice count becomes the reference's red dot. */
[data-theme="nova"] .icon-btn,
[data-theme="nova"] .notice-bell-btn {
  width: 46px; height: 46px; border-radius: 50%; border-color: transparent;
  background: var(--nv-tool); color: var(--nv-text-2); box-shadow: none;
}
[data-theme="nova"] .icon-btn:hover,
[data-theme="nova"] .notice-bell-btn:hover,
[data-theme="nova"] .notice-bell-btn[aria-expanded="true"] { background: var(--nv-raised); color: var(--accent); }
[data-theme="nova"] .notice-bell-btn svg { width: 22px; height: 22px; }
[data-theme="nova"] .notice-bell-badge { top: 9px; right: 10px; min-width: 10px; width: 10px; height: 10px; padding: 0; font-size: 0; border: 2px solid var(--nv-raised); }

/* System-health strip (admin dashboard): a white card under the header, not a page-wide band. */
[data-theme="nova"] .dashboard-health-strip {
  margin: 20px 32px 0; padding: 0 12px; background: var(--surface);
  border: 1px solid var(--nv-line); border-radius: var(--radius-lg); box-shadow: var(--elev-raised);
}
@media (max-width: 768px) { [data-theme="nova"] .dashboard-health-strip { margin: 12px 16px 0; } }

/* ─── Type + cards: bold headings, white cards on a faint indigo shadow ────── */
[data-theme="nova"] .card-header h2,
[data-theme="nova"] .dashboard-section-head h2,
[data-theme="nova"] .page-intro h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: var(--fg); }
[data-theme="nova"] .card,
[data-theme="nova"] .metric,
[data-theme="nova"] .task-card,
[data-theme="nova"] .attention-card { border-color: var(--nv-line); box-shadow: var(--elev-raised); }
[data-theme="nova"] .card-header { border-bottom-color: transparent; padding-bottom: var(--space-2); }
[data-theme="nova"] .card-footer { background: var(--nv-head-fill); }
[data-theme="nova"] .modal-panel,
[data-theme="nova"] .drawer { border-radius: 24px; }

/* ─── Business Snapshot: bar-chart glyph before the band title (reference "Growth Overview") ── */
[data-theme="nova"] .overview-head h2 { display: flex; align-items: center; gap: 12px; }
[data-theme="nova"] .overview-head h2::before {
  content: ''; width: 20px; height: 20px; flex: 0 0 20px; background: var(--accent);
  -webkit-mask: var(--nv-g-bars) center / contain no-repeat; mask: var(--nv-g-bars) center / contain no-repeat;
}

/* ─── Metric strip → separate white cards ──────────────────────────────────── */
[data-theme="nova"] .fin-kpi,
[data-theme="nova"] .kpi-row { gap: 16px; background: transparent; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
[data-theme="nova"] .fin-kpi-cell,
[data-theme="nova"] .kpi-row .kpi-cell {
  border: 1px solid var(--nv-line) !important; /* the strip's responsive divider rules use !important on mobile */
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 20px 22px;
  box-shadow: var(--elev-raised);
}
[data-theme="nova"] .fin-kpi-label,
[data-theme="nova"] .kpi-row .kpi-label { font-family: var(--font-body); font-size: 15px; font-weight: 500; color: var(--nv-text-2); }
[data-theme="nova"] .fin-kpi-value,
[data-theme="nova"] .kpi-row .kpi-num { font-size: 28px; line-height: 1.15; letter-spacing: -0.03em; margin-top: 4px; }
[data-theme="nova"] .kpi-row .kpi-unit,
[data-theme="nova"] .overview-kpis .kpi-num .unit { font-family: var(--font-body); }
[data-theme="nova"] .overview-delta { font-size: 13.5px; font-weight: 600; }
[data-theme="nova"] .overview-delta.up { color: var(--nv-up); }
[data-theme="nova"] a.kpi-cell:hover { filter: brightness(0.985); background-color: inherit; }
[data-theme="nova"] .kpi-row .kpi-cell.is-active { box-shadow: inset 0 0 0 2px var(--accent); }

/* Dashboard KPI cards: icon chip top-left, label/value/delta to its right, sparkline bottom-right.
   Chip hue + glyph follow the metric (`data-kpi`), not the column position. */
[data-theme="nova"] .overview-kpis .kpi-cell {
  --nv-tile-fg: #7c4dff; --nv-glyph: var(--nv-g-trend);
  position: relative; min-height: 134px;
  display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 18px; align-content: start;
}
[data-theme="nova"] .overview-kpis .kpi-cell > * { grid-column: 2; }
[data-theme="nova"] .overview-kpis .kpi-cell::before {
  content: ''; grid-column: 1; grid-row: 1 / span 3; align-self: start;
  width: 48px; height: 48px; border-radius: 14px; background: color-mix(in oklab, var(--nv-tile-fg) 15%, var(--surface));
}
[data-theme="nova"] .overview-kpis .kpi-cell::after {
  content: ''; position: absolute; left: 34px; top: 32px; width: 24px; height: 24px;
  background: var(--nv-tile-fg);
  -webkit-mask: var(--nv-glyph) center / contain no-repeat; mask: var(--nv-glyph) center / contain no-repeat;
}
[data-theme="nova"] .overview-kpis .overview-delta { max-width: 56%; margin-top: 8px; }
[data-theme="nova"] .overview-kpis .overview-delta .delta-ctx { display: none; }
[data-theme="nova"] .overview-kpis .kpi-spark {
  display: block; position: absolute; right: 18px; bottom: 18px; width: 40%; height: 34px;
  color: var(--nv-tile-fg); overflow: visible;
}
[data-theme="nova"] .overview-kpis .kpi-cell[data-kpi="revenue"] { --nv-tile-fg: #16a34a; --nv-glyph: var(--nv-g-dollar); }
[data-theme="nova"] .overview-kpis .kpi-cell[data-kpi="orders"] { --nv-tile-fg: #f97316; --nv-glyph: var(--nv-g-cart); }
[data-theme="nova"] .overview-kpis .kpi-cell[data-kpi="aov"] { --nv-tile-fg: #7c4dff; --nv-glyph: var(--nv-g-users); }
[data-theme="nova"] .overview-kpis .kpi-cell:is([data-kpi="margin"], [data-kpi="contribution-margin"]) { --nv-tile-fg: #2f6fe4; --nv-glyph: var(--nv-g-percent); }
[data-theme="nova"] .overview-kpis .kpi-cell[data-kpi="pnl-completeness"] { --nv-tile-fg: #2f6fe4; --nv-glyph: var(--nv-g-check); }

/* ─── Segmented controls: light track, lavender active segment ────────────── */
[data-theme="nova"] .tabs { background: var(--nv-track); border-radius: 14px; padding: 4px; gap: 2px; }
[data-theme="nova"] .tab-btn { padding: 7px 14px; font-size: 14px; font-weight: 500; color: var(--muted); border-radius: 10px; }
[data-theme="nova"] .tab-btn.is-active { background: var(--nv-seg-on); color: var(--accent-ink); font-weight: 600; box-shadow: none; }
[data-theme="nova"] .fin-subnav { border-radius: 14px; border-color: transparent; background: var(--nv-track); }
[data-theme="nova"] .fin-subnav a { border-radius: 10px; }
[data-theme="nova"] .fin-subnav a.is-active { background: var(--nv-seg-on); color: var(--accent-ink); }

/* ─── Pills + tags: borderless soft tint ("On Track" green / "Planned" gray) ── */
[data-theme="nova"] .pill { font-family: var(--font-body); font-size: 12.5px; font-weight: 600; padding: 5px 14px; border-color: transparent; }
[data-theme="nova"] .pill::before { display: none; }
[data-theme="nova"] .pill-neutral { background: var(--nv-neutral-bg); color: var(--nv-neutral-fg); }
[data-theme="nova"] .tag:not(.is-active) { border-color: transparent; }
[data-theme="nova"] .tag.is-ok,
[data-theme="nova"] .tag.is-warn,
[data-theme="nova"] .tag.is-danger { border-color: transparent; }

/* ─── Inputs + buttons ────────────────────────────────────────────────────── */
[data-theme="nova"] .input,
[data-theme="nova"] .select,
[data-theme="nova"] .textarea,
[data-theme="nova"] .ms-btn { background-color: var(--surface); border-color: var(--nv-field-line); }
[data-theme="nova"] .input:hover,
[data-theme="nova"] .select:hover,
[data-theme="nova"] .textarea:hover,
[data-theme="nova"] .ms-btn:hover { border-color: color-mix(in oklab, var(--nv-field-line), var(--accent) 35%); }
[data-theme="nova"] .btn { font-weight: 600; border-color: var(--nv-field-line); }

/* ─── Tables: lavender head band, faint rules, indigo-tinted hover ───────── */
[data-theme="nova"] .ds-table th { background: var(--nv-head-fill); color: var(--muted); font-weight: 600; border-bottom-color: var(--border-soft); }
[data-theme="nova"] .ds-table thead th { box-shadow: inset 0 -1px 0 var(--border-soft); }
[data-theme="nova"] .ds-table td { border-bottom-color: color-mix(in oklab, var(--border-soft) 70%, transparent); }
[data-theme="nova"] .ds-table tbody tr:hover { background: color-mix(in oklab, var(--accent) 3.5%, transparent); }

/* ─── Dashboard task / attention cards: big tinted icon chip, no severity stripe ── */
[data-theme="nova"] .task-card,
[data-theme="nova"] .task-card--danger,
[data-theme="nova"] .task-card--warn,
[data-theme="nova"] .task-card--reminder,
[data-theme="nova"] .task-card--ok { border-top-color: var(--nv-line); }
[data-theme="nova"] .task-icon { width: 40px; height: 40px; border-radius: 12px; }
[data-theme="nova"] .attention-card { border-radius: var(--radius-lg); padding: 20px; }
[data-theme="nova"] .attention-card:hover { background: var(--nv-inner); }
[data-theme="nova"] .attention-head { gap: 12px; }
[data-theme="nova"] .attention-icon { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; font-size: 16px; }
[data-theme="nova"] .attention-count { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }
[data-theme="nova"] .attention-cta { color: var(--accent); font-weight: 600; }

/* ─── Charts: hairline grid, 13px axis, indigo curve with a soft fade, teal second line ── */
[data-theme="nova"] .chart-area .grid-line { border-top: 1px solid var(--nv-grid); }
[data-theme="nova"] .chart-area .ax-label,
[data-theme="nova"] .dashboard-chart-labels { font-family: var(--font-body); font-size: 13px; color: var(--muted); }
[data-theme="nova"] .chart-area svg path[fill="none"] { stroke-width: 2.6px; vector-effect: non-scaling-stroke; }
[data-theme="nova"] #overview-pnl-line,
[data-theme="nova"] #dashboard-pnl-line,
[data-theme="nova"] #finance-contribution-line { stroke-dasharray: none; stroke-width: 2.2px; }
[data-theme="nova"] .chart-area linearGradient stop:first-child { stop-opacity: 0.20; }
[data-theme="nova"] .legend .sw { border-radius: 50%; }
[data-theme="nova"] .donut .donut-num { font-weight: 700; }

/* Endpoint pin on the growth chart (placed by dashboard.js): dot, dashed drop line, value tooltip.
   The tooltip is centred on the dot, so at the series peak it rises ~30px above the plot —
   leave that room under the title/legend row instead of letting it cover the legend. */
[data-theme="nova"] .overview-chart-head { margin-bottom: 36px; font-size: 14px; }
[data-theme="nova"] .overview-chart-pin { display: block; position: absolute; z-index: 2; width: 0; height: 0; }
[data-theme="nova"] .overview-chart-pin[hidden] { display: none; }
[data-theme="nova"] .overview-chart-pin .pin-dot {
  position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--nv-raised); box-shadow: 0 0 0 1.5px var(--accent), 0 4px 10px rgba(79, 70, 229, 0.35);
}
[data-theme="nova"] .overview-chart-pin .pin-drop { position: absolute; left: 0; top: 8px; height: var(--pin-drop, 0); border-left: 1px dashed color-mix(in oklab, var(--accent) 55%, transparent); }
[data-theme="nova"] .overview-chart-pin .pin-tip {
  position: absolute; right: 18px; top: 0; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 1px; white-space: nowrap;
  padding: 8px 14px; border: 1px solid var(--nv-line); border-radius: 12px; background: var(--nv-raised); box-shadow: var(--elev-overlay);
}
[data-theme="nova"] .overview-chart-pin .pin-value { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; color: var(--fg); }
[data-theme="nova"] .overview-chart-pin .pin-label { font-size: 12px; color: var(--muted); }

/* ─── Auth pages: the rail becomes an indigo→violet welcome panel ─────────── */
[data-theme="nova"] .auth-aside {
  background: linear-gradient(150deg, #4338ca 0%, #5b50e6 52%, #7c5cf0 100%);
  border-right-color: transparent; box-shadow: none;
}
[data-theme="nova"] .auth-aside .brand-row .name,
[data-theme="nova"] .auth-aside .aside-body h1,
[data-theme="nova"] .auth-aside .aside-feat .t { color: #ffffff; }
[data-theme="nova"] .auth-aside .brand-row .sub,
[data-theme="nova"] .auth-aside .aside-feat .d,
[data-theme="nova"] .auth-aside .aside-foot { color: rgba(255, 255, 255, 0.72); }
[data-theme="nova"] .auth-aside .aside-body .eyebrow,
[data-theme="nova"] .auth-aside .aside-body h1 em { color: #d7dbff; }
[data-theme="nova"] .auth-aside .aside-body p { color: rgba(255, 255, 255, 0.86); }
[data-theme="nova"] .auth-aside .aside-feat { background: rgba(255, 255, 255, 0.10); border-color: rgba(255, 255, 255, 0.18); box-shadow: none; }
[data-theme="nova"] .auth-aside .aside-feat .ic { background: #ffffff; color: var(--accent); }
[data-theme="nova"] .auth-aside .aside-foot { border-top-color: rgba(255, 255, 255, 0.18); }
[data-theme="nova"] .auth-aside .aside-foot .legal a:hover { color: #ffffff; }
[data-theme="nova"] .auth-card { border-color: transparent; }

/* ─── Dark mode (`<html data-mode="dark">`, toggled by the sun button) ─────────
   Tokens flip in app.css; here only the sheet's own surfaces: an indigo-night canvas where the
   disc becomes a deep glow and the rims dim to a faint violet, raised surfaces one step lighter
   than cards, and the few page rules that read light-only colours. */
[data-theme="nova"][data-mode="dark"] {
  --nv-inner: #1c2040;
  --nv-head-fill: #181b35;
  --nv-line: #242845;
  --nv-track: #10132a;
  --nv-text-2: #c3c8e6;
  --nv-raised: #1d2140;
  --nv-tool: rgba(255, 255, 255, 0.06);
  --nv-seg-on: rgba(139, 134, 255, 0.20);
  --nv-field-line: #2c3152;
  --nv-grid: #222642;
  --nv-neutral-bg: rgba(255, 255, 255, 0.08);
  --nv-neutral-fg: #c3c8e6;
  --nv-up: #34d399;
  --nv-solid-sidebar: #111428;
  --nv-canvas: #0c0e20;
  --nv-canvas-end: #0a0b1a;
  --nv-disc-1: rgba(79, 70, 229, 0.38);
  --nv-disc-2: rgba(79, 70, 229, 0.22);
  --nv-disc-3: rgba(79, 70, 229, 0.10);
  --nv-rim: rgba(165, 160, 255, 0.22);
  --nv-band: rgba(165, 160, 255, 0.08);
  --nv-ring: rgba(124, 116, 255, 0.12);
}
/* `--accent` is the light text indigo here; the filled primary keeps a white label on deep indigo. */
[data-theme="nova"][data-mode="dark"] .btn-primary,
[data-theme="nova"][data-mode="dark"] .btn-primary:hover { color: #ffffff; }
/* Category chips mix their hue with `--fg`; on dark that needs more light to stay readable. */
[data-theme="nova"][data-mode="dark"] .cat-soft,
[data-theme="nova"][data-mode="dark"] .tag.cat-soft,
[data-theme="nova"][data-mode="dark"] .pill.cat-soft {
  color: color-mix(in oklab, var(--cat, var(--cat-1)), var(--fg) 58%);
  background: color-mix(in oklab, var(--cat, var(--cat-1)), var(--surface) 78%);
}
[data-theme="nova"][data-mode="dark"] .auth-card { background: var(--surface); }
