/* ─── Maven theme — signature components ──────────────────────────────────────
   Tokens live in app.css `:root[data-theme="maven"]`. This file carries the reference's component
   shapes: white top bar on a hairline, underline tabs, bordered flat cards, light-weight figures,
   compact square badges, grey table heads, a workspace-switcher brand block and blue/teal charts.
   Scoped to `[data-theme="maven"]`, loaded last in <head>. */

[data-theme="maven"] {
  --topbar-h: 64px;
  --mv-head-fill: #f9fafb;
}

/* ─── Top bar: white, hairline below, compact square search ─────────────── */
[data-theme="maven"] .topbar {
  background: color-mix(in oklab, var(--surface) 92%, transparent);
  border-bottom-color: var(--border);
}
[data-theme="maven"] .topbar-search input { height: 38px; box-shadow: none; background: var(--mv-head-fill); }
[data-theme="maven"] .topbar-search input:focus { background: var(--surface); }
[data-theme="maven"] .topbar-title h1 { font-size: clamp(16px, 1vw + 8px, 20px); font-weight: 600; letter-spacing: -0.02em; }
[data-theme="maven"] .icon-btn { border-color: var(--border); box-shadow: none; }
[data-theme="maven"] .content { padding-top: var(--space-6); }

/* ─── Type: lighter figures, medium headings ─────────────────────────────── */
[data-theme="maven"] h1,
[data-theme="maven"] h2,
[data-theme="maven"] h3 { font-weight: 600; }
[data-theme="maven"] .card-header h2,
[data-theme="maven"] .dashboard-section-head h2,
[data-theme="maven"] .page-intro h2 { font-size: 16px; font-weight: 500; letter-spacing: -0.015em; }

/* ─── Cards: flat, bordered, no ambient shadow ───────────────────────────── */
[data-theme="maven"] .card,
[data-theme="maven"] .metric,
[data-theme="maven"] .task-card { border-color: var(--border); box-shadow: none; }
[data-theme="maven"] .card-header { border-bottom-color: transparent; padding-bottom: var(--space-2); }
[data-theme="maven"] .card-footer { background: var(--mv-head-fill); }
[data-theme="maven"] .modal-panel,
[data-theme="maven"] .drawer { border: 1px solid var(--border); }

/* ─── Metric strip: one bordered panel, light large figures ("Total balance") ── */
[data-theme="maven"] .fin-kpi,
[data-theme="maven"] .kpi-row { box-shadow: none; border-color: var(--border); border-radius: var(--radius-lg); }
[data-theme="maven"] .fin-kpi-cell,
[data-theme="maven"] .kpi-row .kpi-cell { padding: 18px 20px; }
[data-theme="maven"] .fin-kpi-label,
[data-theme="maven"] .kpi-row .kpi-label { font-family: var(--font-body); color: var(--muted); }
[data-theme="maven"] .fin-kpi-value,
[data-theme="maven"] .kpi-row .kpi-num { font-size: 26px; font-weight: 400; letter-spacing: -0.03em; margin-top: 6px; }
[data-theme="maven"] .kpi-row .kpi-unit { font-family: var(--font-body); font-weight: 400; }
[data-theme="maven"] .kpi-row .kpi-cell.is-active { background: color-mix(in oklab, var(--accent) 6%, var(--surface)); box-shadow: inset 0 -2px 0 var(--accent); }
[data-theme="maven"] .metric .metric-value { font-weight: 400; }

/* ─── Tabs: underline, as in "My accounts / Linked accounts" ─────────────── */
[data-theme="maven"] .tabs {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 0;
  gap: var(--space-5);
}
[data-theme="maven"] .tab-btn {
  border-radius: 0;
  padding: 9px 2px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
}
[data-theme="maven"] .tab-btn.is-active {
  background: transparent;
  box-shadow: none;
  color: var(--fg);
  border-bottom-color: var(--accent);
}

/* ─── Badges: small, square-ish, tinted ("Pending" / "Failed" / "Paid") ─── */
[data-theme="maven"] .pill {
  border-radius: 6px;
  padding: 2px 8px;
  font-family: var(--font-body);
  font-size: 11.5px;
  border-color: transparent;
}
[data-theme="maven"] .pill::before { width: 5px; height: 5px; }
[data-theme="maven"] .tag { border-radius: 8px; }

/* ─── Buttons & fields: crisp white, hairline, faint drop ───────────────── */
[data-theme="maven"] .btn:not(.btn-primary):not(.btn-danger):not(.btn-ghost) {
  border-color: var(--border);
  box-shadow: 0 1px 2px rgba(14, 18, 27, 0.05);
}
[data-theme="maven"] .btn { min-height: 36px; padding: 7px 14px; }
[data-theme="maven"] .btn-sm { min-height: 30px; padding: 5px 10px; border-radius: 8px; }

/* ─── Tables: grey head band, medium-weight labels ───────────────────────── */
[data-theme="maven"] .ds-table th {
  background: var(--mv-head-fill);
  color: var(--muted);
  font-weight: 500;
  border-bottom-color: var(--border);
}
[data-theme="maven"] .ds-table tbody tr:hover { background: color-mix(in oklab, var(--accent) 3%, transparent); }

/* ─── Sidebar: workspace-switcher brand block, sentence-case section labels ── */
[data-theme="maven"] .sidebar-brand {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: var(--space-4);
  background: var(--mv-head-fill);
}
[data-theme="maven"] .sidebar-brand .mark { width: 28px; height: 28px; border-radius: 8px; font-size: 15px; }
[data-theme="maven"] .sidebar-label { color: var(--muted); font-weight: 500; }
[data-theme="maven"] .sidebar-link { min-height: 36px; padding: 7px 10px; font-size: 13.5px; }
[data-theme="maven"] .sidebar-link.is-active { font-weight: 500; }
[data-theme="maven"] .sidebar-footer .avatar { background: var(--fg); box-shadow: none; }

/* ─── Dashboard task cards: hairline card, severity as a square icon tile ── */
[data-theme="maven"] .task-card { border-top: 1px solid var(--border); }
[data-theme="maven"] .task-icon { border-radius: 8px; }

/* ─── Charts: blue + teal solid lines, faint blue wash ───────────────────── */
[data-theme="maven"] #dashboard-pnl-line,
[data-theme="maven"] #overview-pnl-line,
[data-theme="maven"] #finance-contribution-line { stroke-dasharray: none; stroke-width: 2.4; }
[data-theme="maven"] #dashboard-revenue-area,
[data-theme="maven"] #overview-revenue-area,
[data-theme="maven"] #finance-revenue-area { opacity: 0.45; }

/* ─── Dashboard "Needs attention" cards: hairline cards, square icon tile ─── */
[data-theme="maven"] .attention-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: none;
}
[data-theme="maven"] .attention-card:hover { background: var(--mv-head-fill); }
[data-theme="maven"] .attention-icon { width: 26px; height: 26px; border-radius: 8px; }
[data-theme="maven"] .attention-count { font-weight: 400; letter-spacing: -0.03em; }
[data-theme="maven"] .tag.is-ok,
[data-theme="maven"] .tag.is-warn,
[data-theme="maven"] .tag.is-danger,
[data-theme="maven"] .tag.is-muted { border-radius: 6px; border-color: transparent; padding: 2px 8px; }
/* Severity moves from a left stripe to the badge + icon tile, like the reference's status chips. */

/* ─── System-health strip: white band under a hairline ───────────────────── */
[data-theme="maven"] .dashboard-health-strip { background: var(--surface); border-bottom-color: var(--border); }

/* ─── Section sub-navs (finance areas) → underline tabs too ──────────────── */
[data-theme="maven"] .fin-subnav {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  gap: var(--space-5);
}
[data-theme="maven"] .fin-subnav a {
  border-radius: 0;
  padding: 9px 2px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  background: transparent;
  box-shadow: none;
}
[data-theme="maven"] .fin-subnav a.is-active {
  background: transparent;
  box-shadow: none;
  color: var(--fg);
  border-bottom-color: var(--accent);
}
