/* ==========================================================================
   PayrollOps — "Aurora" design system. Dark (default) + light themes.
   ========================================================================== */
:root, [data-theme="dark"] {
  --bg: #070b14;
  --bg-2: #0b1120;
  --panel: rgba(17, 24, 43, 0.62);
  --panel-solid: #111a2e;
  --panel-hi: rgba(255, 255, 255, 0.04);
  --ink: #e8eefc;
  --ink-2: #b7c3dd;
  --muted: #7d8aa8;
  --line: rgba(148, 170, 220, 0.12);
  --line-2: rgba(148, 170, 220, 0.22);
  --brand: #22d3ee;
  --brand-2: #8b5cf6;
  --brand-3: #34d399;
  --grad: linear-gradient(135deg, #22d3ee 0%, #6366f1 55%, #a855f7 100%);
  --grad-soft: linear-gradient(135deg, rgba(34,211,238,.16), rgba(168,85,247,.16));
  --brand-soft: rgba(34, 211, 238, 0.12);
  --glow: 0 0 0 1px rgba(34,211,238,.35), 0 8px 30px -6px rgba(34,211,238,.45);
  --danger: #fb7185; --danger-soft: rgba(251,113,133,.13);
  --warn: #fbbf24; --warn-soft: rgba(251,191,36,.13);
  --ok: #34d399; --ok-soft: rgba(52,211,153,.13);
  --info: #60a5fa; --info-soft: rgba(96,165,250,.13);
  --input: rgba(8, 13, 26, 0.7);
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 50px -20px rgba(0,0,0,.6);
  --side: rgba(9, 14, 27, 0.72);
  --grid-line: rgba(120, 150, 220, 0.05);
  --aurora-1: rgba(34, 211, 238, 0.16);
  --aurora-2: rgba(139, 92, 246, 0.18);
  --aurora-3: rgba(52, 211, 153, 0.08);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f3f6fc;
  --bg-2: #eaf0fa;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-solid: #ffffff;
  --panel-hi: rgba(15, 23, 42, 0.03);
  --ink: #0b1324;
  --ink-2: #334155;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.08);
  --line-2: rgba(15, 23, 42, 0.16);
  --brand: #0891b2;
  --brand-2: #7c3aed;
  --brand-3: #059669;
  --grad: linear-gradient(135deg, #06b6d4 0%, #6366f1 55%, #9333ea 100%);
  --grad-soft: linear-gradient(135deg, rgba(6,182,212,.10), rgba(147,51,234,.10));
  --brand-soft: rgba(8, 145, 178, 0.10);
  --glow: 0 0 0 1px rgba(99,102,241,.25), 0 8px 24px -8px rgba(99,102,241,.45);
  --danger: #e11d48; --danger-soft: rgba(225,29,72,.09);
  --warn: #b45309; --warn-soft: rgba(245,158,11,.13);
  --ok: #047857; --ok-soft: rgba(16,185,129,.12);
  --info: #2563eb; --info-soft: rgba(37,99,235,.09);
  --input: #ffffff;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 12px 32px -16px rgba(15,23,42,.18);
  --side: rgba(255, 255, 255, 0.7);
  --grid-line: rgba(15, 23, 42, 0.035);
  --aurora-1: rgba(6, 182, 212, 0.12);
  --aurora-2: rgba(124, 58, 237, 0.10);
  --aurora-3: rgba(16, 185, 129, 0.06);
  color-scheme: light;
}
:root {
  --radius: 16px; --radius-sm: 10px;
  font-family: "Inter", "SF Pro Display", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-size: 14px; color: var(--ink);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; transition: background .3s ease, color .3s ease;
}
/* Aurora + grid backdrop */
body::before, body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; }
body::before {
  background:
    radial-gradient(700px 480px at 12% -8%, var(--aurora-1), transparent 60%),
    radial-gradient(800px 560px at 95% 8%, var(--aurora-2), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, var(--aurora-3), transparent 60%);
  animation: drift 24s ease-in-out infinite alternate;
}
body::after {
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
}
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-2%, 2%, 0) scale(1.06); } }
#app, #modal-root, #toasts { position: relative; z-index: 1; }
::selection { background: rgba(99,102,241,.35); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1 { font-size: 26px; margin: 0; letter-spacing: -.025em; font-weight: 750; }
h2 { font-size: 15px; margin: 0 0 14px; letter-spacing: -.01em; font-weight: 650; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
h3 { font-size: 14px; margin: 0 0 8px; }
.boot { padding: 40px; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hidden { display: none !important; }
.mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
svg.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
kbd { font-family: inherit; font-size: 11px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; color: var(--muted); background: var(--panel-hi); }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 14px;
  background: var(--side); border-right: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  display: flex; flex-direction: column;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -.02em; padding: 4px 10px 20px; }
.logo .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; box-shadow: var(--glow); }
.logo .mark svg { width: 17px; height: 17px; stroke: #fff; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.logo small { display: block; font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.nav { flex: 1; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 11px; color: var(--ink-2); padding: 9px 12px; border-radius: 11px; margin: 2px 0;
  font-weight: 550; transition: background .18s, color .18s, transform .18s;
}
.nav a span.lbl { flex: 1; }
.nav a:hover { background: var(--panel-hi); color: var(--ink); text-decoration: none; transform: translateX(2px); }
.nav a.active { color: var(--ink); background: var(--grad-soft); box-shadow: inset 0 0 0 1px var(--line-2); }
.nav a.active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 4px 4px 0; background: var(--grad); box-shadow: 0 0 14px var(--brand); }
.nav a.active svg.ic { color: var(--brand); filter: drop-shadow(0 0 6px var(--brand)); }
.nav .sect { font-size: 10.5px; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); padding: 16px 12px 6px; font-weight: 700; opacity: .8; }
.pill-count { background: var(--grad); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 8px; font-weight: 700; box-shadow: 0 0 12px rgba(99,102,241,.6); }
.side-foot { border-top: 1px solid var(--line); padding: 12px 6px 0; margin-top: 12px; }
.search-btn { width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel-hi); color: var(--muted); font: inherit; cursor: pointer; }
.search-btn:hover { border-color: var(--line-2); color: var(--ink); }
.search-btn kbd { margin-left: auto; }
.main { min-width: 0; }
.top {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 32px; position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 70%, transparent); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.crumb { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.6); } 70% { box-shadow: 0 0 0 8px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.top .who { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; box-shadow: var(--glow); }
.who-text { line-height: 1.2; text-align: right; } .who-text b { color: var(--ink); display: block; font-weight: 600; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-hi); color: var(--ink-2); cursor: pointer; transition: all .18s; }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); box-shadow: var(--glow); }
.page { padding: 28px 32px 70px; max-width: 1360px; animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 6px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 6px; display: inline-block; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Glass cards ---------- */
.card, .kpi {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(130%); -webkit-backdrop-filter: blur(14px) saturate(130%);
}
.card { padding: 20px; margin-bottom: 18px; }
.card::before, .kpi::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(160deg, rgba(255,255,255,.14), transparent 35%, transparent 70%, rgba(139,92,246,.18));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
[data-theme="light"] .card::before, [data-theme="light"] .kpi::before { background: linear-gradient(160deg, rgba(255,255,255,.9), transparent 40%, transparent 70%, rgba(99,102,241,.14)); }
.card.flush { padding: 0; overflow-x: auto; }
.card.flush > h2 { padding: 18px 20px 4px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid.top { align-items: start; }
.kpi { padding: 18px 20px; overflow: hidden; transition: transform .25s, box-shadow .25s; }
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow), var(--glow); }
.kpi::after { content: ""; position: absolute; width: 140px; height: 140px; right: -50px; top: -60px; border-radius: 50%; background: var(--grad); opacity: .14; filter: blur(30px); }
.kpi .label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.kpi .label svg.ic { width: 15px; height: 15px; color: var(--brand); }
.kpi .value { font-size: 28px; font-weight: 800; margin-top: 10px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi:first-child .value { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kpi .hint { color: var(--muted); font-size: 12px; margin-top: 6px; }
@media (max-width: 1080px) { .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3, .g2 { grid-template-columns: 1fr; } }

/* ---------- Hero (dashboard / portal) ---------- */
.hero { position: relative; overflow: hidden; border-radius: 20px; padding: 26px 28px; margin-bottom: 20px; border: 1px solid var(--line-2);
  background: radial-gradient(600px 220px at 85% 0%, rgba(168,85,247,.28), transparent 60%), radial-gradient(500px 220px at 0% 100%, rgba(34,211,238,.22), transparent 60%), var(--panel);
  backdrop-filter: blur(14px); box-shadow: var(--shadow); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.hero h1 { font-size: 30px; }
.hero .sub { color: var(--ink-2); margin-top: 6px; max-width: 620px; }
.hero .orb { position: absolute; right: 22%; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: var(--grad); filter: blur(60px); opacity: .25; animation: float 9s ease-in-out infinite alternate; pointer-events: none; }
@keyframes float { to { transform: translate(40px, 30px); } }
.progress { height: 6px; background: var(--panel-hi); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.progress > div { height: 100%; background: var(--grad); border-radius: 99px; box-shadow: 0 0 12px var(--brand); width: 0; transition: width .8s cubic-bezier(.2,.8,.2,1); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: 10.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; white-space: nowrap; background: var(--panel-hi); }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--grad-soft); }
tbody tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tfoot td { font-weight: 750; background: var(--panel-hi); border-top: 1px solid var(--line-2); border-bottom: 0; }
td.actions { display: table-cell; white-space: nowrap; text-align: right; }
td.actions .btn + .btn, td.actions .btn + a.btn { margin-left: 6px; }
.run-table td:first-child { min-width: 190px; }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty::before { content: ""; display: block; width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 14px; background: var(--grad-soft); border: 1px dashed var(--line-2); }
.person { display: flex; align-items: center; gap: 11px; }
.person .av { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: 12px; font-weight: 750; color: #fff; flex: none; }
.c0 { background: linear-gradient(135deg,#22d3ee,#6366f1); } .c1 { background: linear-gradient(135deg,#a855f7,#ec4899); }
.c2 { background: linear-gradient(135deg,#34d399,#0ea5e9); } .c3 { background: linear-gradient(135deg,#f59e0b,#ef4444); }
.c4 { background: linear-gradient(135deg,#6366f1,#a855f7); } .c5 { background: linear-gradient(135deg,#14b8a6,#84cc16); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 3px 10px; font-size: 11.5px; font-weight: 650; background: var(--panel-hi); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; text-transform: capitalize; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.b-draft { background: var(--info-soft); color: var(--info); border-color: transparent; }
.b-pending, .b-medium { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.b-approved, .b-paid, .b-active, .b-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.b-void, .b-rejected, .b-terminated, .b-high { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.b-open { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.b-cancelled { color: var(--muted); }

/* ---------- Forms ---------- */
label { display: block; font-size: 12px; font-weight: 650; color: var(--ink-2); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); font: inherit; background: var(--input); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft), 0 0 20px -6px var(--brand); }
[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.8); }
.field { margin-bottom: 14px; }
.field .help { font-size: 12px; color: var(--muted); margin-top: 5px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 14px; }
.form-grid.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.fieldset-title { grid-column: 1 / -1; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; font-weight: 750; color: var(--brand); margin: 10px 0 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 13px; color: var(--ink); }
.check input { width: auto; margin-top: 2px; accent-color: var(--brand-2); }
input[type=checkbox] { accent-color: var(--brand-2); width: 16px; height: 16px; }
.inline-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.inline-filters .field { margin: 0; min-width: 160px; }
.filterbar { padding: 16px 20px; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .form-grid, .form-grid.g3 { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; border-radius: 11px;
  border: 1px solid var(--line-2); background: var(--panel-hi); color: var(--ink); font: inherit; font-weight: 650; cursor: pointer; white-space: nowrap;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
}
.btn:hover { text-decoration: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.primary { background: var(--grad); background-size: 160% 160%; border-color: transparent; color: #fff; box-shadow: 0 8px 24px -10px rgba(99,102,241,.9), inset 0 1px 0 rgba(255,255,255,.25); }
.btn.primary:hover { background-position: 100% 50%; box-shadow: var(--glow); }
.btn.danger { color: var(--danger); border-color: rgba(251,113,133,.35); }
.btn.danger:hover { background: var(--danger-soft); border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.btn.sm { padding: 6px 11px; font-size: 12px; border-radius: 9px; }
.btn:disabled { opacity: .5; cursor: progress; transform: none; }
.btn svg.ic { width: 16px; height: 16px; }
.link-btn { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; padding: 0; font-weight: 650; }

/* ---------- Alerts ---------- */
.alert { border-radius: 12px; padding: 12px 15px; margin-bottom: 14px; border: 1px solid; }
.alert.warn { background: var(--warn-soft); border-color: rgba(251,191,36,.3); color: var(--warn); }
.alert.danger { background: var(--danger-soft); border-color: rgba(251,113,133,.3); color: var(--danger); }
.alert.info { background: var(--info-soft); border-color: rgba(96,165,250,.28); color: var(--info); }
.alert.ok { background: var(--ok-soft); border-color: rgba(52,211,153,.3); color: var(--ok); }
.card.flush > .alert { margin: 6px 20px 14px; }
.flag-list { list-style: none; padding: 0; margin: 0; }
.flag-list li { display: flex; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.flag-list li:last-child { border-bottom: 0; }
.flag-list strong { color: var(--ink); }

/* ---------- Charts ---------- */
.bars .row { display: grid; grid-template-columns: 140px 1fr 110px; gap: 12px; align-items: center; margin: 10px 0; }
.bars .track { background: var(--panel-hi); border: 1px solid var(--line); border-radius: 99px; height: 10px; overflow: hidden; }
.bars .fill { background: var(--grad); height: 100%; border-radius: 99px; width: 0; box-shadow: 0 0 14px rgba(99,102,241,.6); transition: width .9s cubic-bezier(.2,.8,.2,1); }
.vbars { display: flex; align-items: flex-end; gap: 14px; height: 190px; padding-top: 10px; border-bottom: 1px solid var(--line); }
.vbars .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 8px; min-width: 0; }
.vbars .bar { width: 100%; max-width: 52px; background: var(--grad); border-radius: 10px 10px 3px 3px; height: 0; box-shadow: 0 0 24px -4px rgba(99,102,241,.7); transition: height .9s cubic-bezier(.2,.8,.2,1); }
.vbars .lbl { font-size: 11px; color: var(--muted); }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { padding: 7px 0; display: flex; gap: 10px; align-items: center; }
.checklist .tick { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; flex: none; border: 1px solid var(--line-2); color: var(--muted); }
.checklist .done .tick { background: var(--ok-soft); color: var(--ok); border-color: transparent; box-shadow: 0 0 10px rgba(52,211,153,.4); }
.checklist .done { color: var(--ink-2); } .checklist .todo { color: var(--ink); }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth .pitch { position: relative; overflow: hidden; padding: 64px; display: flex; flex-direction: column; justify-content: center; }
.auth .pitch h1 { font-size: 46px; line-height: 1.05; margin: 18px 0 18px; letter-spacing: -.04em; }
.auth .pitch p { color: var(--ink-2); font-size: 16px; max-width: 520px; }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 26px; max-width: 620px; }
.feature { padding: 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(12px); display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); }
.feature svg.ic { color: var(--brand); margin-top: 1px; }
.feature b { color: var(--ink); display: block; margin-bottom: 2px; font-size: 13.5px; }
.auth .formside { display: flex; align-items: center; justify-content: center; padding: 32px; }
.auth .box { width: 100%; max-width: 420px; padding: 30px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: var(--shadow), 0 0 80px -30px rgba(99,102,241,.6); backdrop-filter: blur(20px); }
.auth .box h1 { font-size: 24px; margin-bottom: 6px; }
.auth .box .btn.primary { width: 100%; padding: 12px; margin-top: 6px; }
.ring { position: absolute; border-radius: 50%; border: 1px solid var(--line-2); pointer-events: none; }
.ring.r1 { width: 520px; height: 520px; right: -200px; bottom: -220px; animation: spin 60s linear infinite; border-style: dashed; }
.ring.r2 { width: 340px; height: 340px; right: -110px; bottom: -130px; border-color: rgba(34,211,238,.35); box-shadow: 0 0 60px rgba(34,211,238,.15) inset; }
@keyframes spin { to { transform: rotate(360deg); } }
.tabs { display: flex; gap: 4px; background: var(--panel-hi); border: 1px solid var(--line); padding: 4px; border-radius: 12px; margin-bottom: 22px; }
.tabs button { flex: 1; border: 0; background: none; padding: 9px; border-radius: 9px; font: inherit; font-weight: 650; cursor: pointer; color: var(--muted); transition: all .2s; }
.tabs button.on { background: var(--grad); color: #fff; box-shadow: 0 6px 20px -8px rgba(99,102,241,.9); }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth .pitch { padding: 32px 24px 8px; } .auth .pitch h1 { font-size: 32px; } .feature-grid { grid-template-columns: 1fr; } }

/* ---------- Modal / toast / command palette ---------- */
.overlay { position: fixed; inset: 0; background: rgba(3,6,14,.62); backdrop-filter: blur(6px); display: flex; align-items: flex-start; justify-content: center; padding: 7vh 16px; z-index: 50; overflow-y: auto; animation: fade .2s ease both; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 20px; width: 100%; max-width: 580px; box-shadow: 0 40px 100px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.03), 0 0 80px -40px rgba(99,102,241,.8); animation: pop .28s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.modal.wide { max-width: 860px; }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal header h2 { margin: 0; font-size: 17px; }
.modal .body { padding: 20px 22px; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--panel-hi); border-radius: 0 0 20px 20px; }
.x { background: var(--panel-hi); border: 1px solid var(--line); width: 32px; height: 32px; border-radius: 9px; font-size: 18px; cursor: pointer; color: var(--muted); line-height: 1; }
.x:hover { color: var(--ink); }
#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 60; }
.toast { background: var(--panel-solid); color: var(--ink); border: 1px solid var(--line-2); border-left: 3px solid var(--ok); padding: 12px 16px; border-radius: 12px; box-shadow: 0 20px 40px -12px rgba(0,0,0,.5); max-width: 380px; animation: slidein .3s cubic-bezier(.2,.9,.3,1.2) both; }
.toast.err { border-left-color: var(--danger); }
@keyframes slidein { from { opacity: 0; transform: translateX(20px); } }
.palette { max-width: 600px; overflow: hidden; }
.palette .pin { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.palette .pin input { border: 0; background: transparent; font-size: 16px; padding: 6px 0; box-shadow: none; }
.palette .pin svg.ic { color: var(--brand); }
.palette ul { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow-y: auto; }
.palette li { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; cursor: pointer; color: var(--ink-2); }
.palette li .grp { margin-left: auto; font-size: 11px; color: var(--muted); }
.palette li.sel, .palette li:hover { background: var(--grad-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.palette .foot { padding: 10px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); display: flex; gap: 14px; }

/* ---------- Detail lists ---------- */
dl.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 14px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; font-weight: 550; }
.secret-box { background: var(--panel-hi); border: 1px dashed var(--line-2); padding: 12px 14px; border-radius: 12px; }
.big-number { font-size: 32px; font-weight: 850; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.delta-up { color: var(--ok); } .delta-down { color: var(--danger); }
details summary { cursor: pointer; color: var(--muted); }

/* ---------- Pay stub (always printed light) ---------- */
.stub { max-width: 840px; margin: 0 auto; background: #fff; color: #0b1324; border-radius: 18px; padding: 32px; box-shadow: var(--shadow), 0 0 80px -30px rgba(99,102,241,.6); }
.stub .muted, .stub dl.kv dt { color: #64748b; }
.stub th { background: #f4f6fb; color: #64748b; }
.stub th, .stub td { border-color: #e6eaf2; padding: 7px 9px; }
.stub tbody tr:hover { background: transparent; }
.stub tfoot td { background: #f4f6fb; border-color: #dfe5f0; }
.stub .head { display: flex; justify-content: space-between; border-bottom: 2px solid #0b1324; padding-bottom: 14px; margin-bottom: 18px; }
.stub .head h2 { color: #0b1324; }
.stub .net { background: linear-gradient(135deg, #ecfeff, #f5f3ff); border: 1px solid #ddd6fe; border-radius: 14px; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.stub .grid.g2 { gap: 16px; }

/* ---------- Mobile ---------- */
@media (max-width: 780px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; z-index: 6; height: auto; padding: 10px 10px 8px; flex-direction: column; }
  .logo { padding: 2px 6px 8px; font-size: 15px; } .logo small { display: none; }
  .nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .nav .sect, .side-foot, .nav a.active::before { display: none; }
  .nav a { white-space: nowrap; flex: none; gap: 7px; padding: 7px 11px; }
  .page { padding: 18px 16px 60px; } .top { position: static; padding: 12px 16px; } .who-text { display: none; }
  .hero { padding: 20px; } .hero h1 { font-size: 24px; }
}

/* ---------- Print ---------- */
@media print {
  body::before, body::after, .side, .top, .no-print, #toasts { display: none !important; }
  html, body { background: #fff !important; }
  .shell { display: block; } .page { padding: 0; animation: none; } .stub { box-shadow: none; padding: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ==========================================================================
   STUDIO theme (default) — warm neutral bento layout with a dark sidebar.
   --dark and --accent are user-selectable (Settings → Appearance).
   ========================================================================== */
:root { --dark: #151515; --on-dark: #ffffff; --accent: #d7e36a; --on-accent: #151515; }
[data-theme="studio"] {
  --bg: #c9c7c2; --bg-2: #e8e6e1; --frame: #e9e7e2;
  --panel: #f8f7f3; --panel-solid: #ffffff; --panel-hi: rgba(20,20,20,.04);
  --ink: #141414; --ink-2: #3d3d3b; --muted: #77756f;
  --line: rgba(20,20,20,.08); --line-2: rgba(20,20,20,.14);
  --brand: var(--dark); --brand-2: var(--dark); --brand-soft: rgba(20,20,20,.06);
  --grad: linear-gradient(var(--dark), var(--dark)); --grad-soft: rgba(20,20,20,.045);
  --glow: 0 0 0 1px rgba(20,20,20,.12);
  --danger: #c2413b; --danger-soft: #f6dedb; --warn: #9a6a00; --warn-soft: #f4e9c8;
  --ok: #3f7d32; --ok-soft: #e1eed6; --info: #3a5a8c; --info-soft: #dfe6f1;
  --input: #ffffff; --shadow: none; --side: var(--dark);
  --t-white: #ffffff; --t-beige: #dcd9d2; --t-cream: #f2ead2; --t-grey: #d3d1cc;
  color-scheme: light;
  font-family: "Helvetica Neue", "Inter", Arial, system-ui, sans-serif;
}
[data-theme="studio"] body { background: radial-gradient(1200px 700px at 70% -10%, #efe9da, transparent 60%), linear-gradient(180deg, #d4d2cd, #b9b8b6); }
[data-theme="studio"] body::before, [data-theme="studio"] body::after,
[data-theme="studio"] .card::before, [data-theme="studio"] .kpi::before, [data-theme="studio"] .kpi::after, [data-theme="studio"] .hero .orb { display: none; }
[data-theme="studio"] .shell { margin: 14px; min-height: calc(100vh - 28px); border-radius: 30px; overflow: hidden; background: var(--frame); box-shadow: 0 30px 80px -30px rgba(0,0,0,.45); }
[data-theme="studio"] .side { top: 0; background: var(--dark); color: var(--on-dark); border-right: 0; backdrop-filter: none; height: calc(100vh - 28px); }
[data-theme="studio"] .logo { color: var(--on-dark); font-weight: 500; font-size: 22px; letter-spacing: .02em; text-transform: uppercase; }
[data-theme="studio"] .logo .mark { display: none; }
[data-theme="studio"] .logo small { color: color-mix(in srgb, var(--on-dark) 45%, transparent); }
[data-theme="studio"] .nav .sect { color: color-mix(in srgb, var(--on-dark) 35%, transparent); }
[data-theme="studio"] .nav a { color: color-mix(in srgb, var(--on-dark) 62%, transparent); text-transform: uppercase; font-size: 12px; letter-spacing: .06em; font-weight: 500; }
[data-theme="studio"] .nav a:hover { background: color-mix(in srgb, var(--on-dark) 7%, transparent); color: var(--on-dark); }
[data-theme="studio"] .nav a.active { background: transparent; box-shadow: none; color: var(--accent); }
[data-theme="studio"] .nav a.active svg.ic { color: var(--accent); filter: none; }
[data-theme="studio"] .nav a.active::before { background: var(--accent); box-shadow: 0 0 12px var(--accent); left: -14px; }
[data-theme="studio"] .pill-count { background: var(--accent); color: var(--on-accent); box-shadow: none; }
[data-theme="studio"] .side-foot { border-color: color-mix(in srgb, var(--on-dark) 12%, transparent); }
[data-theme="studio"] .search-btn { background: color-mix(in srgb, var(--on-dark) 7%, transparent); border-color: color-mix(in srgb, var(--on-dark) 12%, transparent); color: color-mix(in srgb, var(--on-dark) 60%, transparent); }
[data-theme="studio"] .search-btn kbd { color: inherit; border-color: color-mix(in srgb, var(--on-dark) 20%, transparent); background: transparent; }
[data-theme="studio"] .top { background: transparent; border-bottom: 0; backdrop-filter: none; position: static; padding: 22px 30px 0; }
[data-theme="studio"] .icon-btn { width: 40px; height: 40px; border-radius: 12px; background: var(--t-beige); border: 0; color: var(--ink); }
[data-theme="studio"] .icon-btn:hover { box-shadow: none; background: var(--t-grey); }
[data-theme="studio"] .avatar { background: var(--dark); color: var(--on-dark); box-shadow: none; }
[data-theme="studio"] .page { padding: 18px 30px 40px; }
[data-theme="studio"] h1 { font-weight: 600; letter-spacing: -.03em; }
[data-theme="studio"] .card, [data-theme="studio"] .kpi { background: var(--panel); border: 0; border-radius: 26px; backdrop-filter: none; }
[data-theme="studio"] .kpi:hover { transform: none; box-shadow: none; }
[data-theme="studio"] .kpi .value, [data-theme="studio"] .kpi:first-child .value { background: none; color: var(--ink); -webkit-background-clip: initial; background-clip: initial; font-weight: 600; }
[data-theme="studio"] .kpi .label svg.ic { color: var(--ink); }
[data-theme="studio"] .grad-text { background: none; color: var(--muted); }
[data-theme="studio"] .hero { background: var(--panel); border: 0; border-radius: 26px; }
[data-theme="studio"] th { background: transparent; }
[data-theme="studio"] tbody tr:hover { background: rgba(20,20,20,.03); }
[data-theme="studio"] tfoot td { background: rgba(20,20,20,.03); }
[data-theme="studio"] .btn { border-radius: 99px; background: var(--t-white); border-color: transparent; box-shadow: 0 1px 0 rgba(0,0,0,.04); font-weight: 600; }
[data-theme="studio"] .btn:hover { border-color: transparent; box-shadow: 0 0 0 2px var(--line-2); }
[data-theme="studio"] .btn.primary { background: var(--dark); color: var(--on-dark); box-shadow: none; }
[data-theme="studio"] .btn.primary:hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--dark) 25%, transparent); }
[data-theme="studio"] .btn.danger { background: var(--danger-soft); color: var(--danger); }
[data-theme="studio"] .badge { border: 0; text-transform: uppercase; font-size: 10.5px; letter-spacing: .05em; }
[data-theme="studio"] .badge::before { box-shadow: none; }
[data-theme="studio"] .bars .fill, [data-theme="studio"] .vbars .bar { background: var(--dark); box-shadow: none; }
[data-theme="studio"] .progress > div { background: linear-gradient(90deg, #e2c14b, #a6cf5b); box-shadow: none; }
[data-theme="studio"] .tabs button.on { background: var(--dark); color: var(--on-dark); box-shadow: none; }
[data-theme="studio"] .auth .box { background: var(--panel); border: 0; box-shadow: 0 30px 80px -30px rgba(0,0,0,.35); }
[data-theme="studio"] .auth .pitch { background: var(--dark); color: var(--on-dark); margin: 14px; border-radius: 30px; }
[data-theme="studio"] .auth .pitch p, [data-theme="studio"] .auth .pitch .feature { color: color-mix(in srgb, var(--on-dark) 70%, transparent); }
[data-theme="studio"] .auth .pitch .grad-text { color: var(--accent); }
[data-theme="studio"] .auth .pitch .logo { color: var(--on-dark); }
[data-theme="studio"] .feature { background: color-mix(in srgb, var(--on-dark) 6%, transparent); border-color: color-mix(in srgb, var(--on-dark) 10%, transparent); }
[data-theme="studio"] .feature b { color: var(--on-dark); } [data-theme="studio"] .feature svg.ic { color: var(--accent); }
[data-theme="studio"] .ring { border-color: color-mix(in srgb, var(--on-dark) 15%, transparent); }
[data-theme="studio"] .modal { border: 0; box-shadow: 0 40px 100px -20px rgba(0,0,0,.45); }
[data-theme="studio"] .fieldset-title { color: var(--ink); }
[data-theme="studio"] input:focus, [data-theme="studio"] select:focus, [data-theme="studio"] textarea:focus { border-color: var(--dark); box-shadow: 0 0 0 4px rgba(20,20,20,.08); }
[data-theme="studio"] .palette li.sel, [data-theme="studio"] .palette li:hover { background: var(--t-beige); box-shadow: none; }
[data-theme="studio"] .person .av { border-radius: 12px; }
[data-theme="studio"] .checklist .done .tick { box-shadow: none; }

/* ---------- Bento components (both themes) ---------- */
html:not([data-theme="studio"]) { --t-white: var(--panel); --t-beige: var(--panel); --t-cream: var(--panel); --t-grey: var(--panel); }
.page-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-title h1 { font-size: 34px; }
.page-title .back { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--ink-2); display: inline-flex; gap: 6px; margin-top: 8px; }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.s2 { grid-column: span 2; } .s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s5 { grid-column: span 5; } .s6 { grid-column: span 6; }
.s7 { grid-column: span 7; } .s8 { grid-column: span 8; } .s9 { grid-column: span 9; } .s12 { grid-column: span 12; } .r2 { grid-row: span 2; }
.tile { position: relative; border-radius: 26px; padding: 22px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; min-width: 0; display: flex; flex-direction: column; }
[data-theme="studio"] .tile { border: 0; }
.t-white { background: var(--t-white); } .t-beige { background: var(--t-beige); } .t-cream { background: var(--t-cream); } .t-grey { background: var(--t-grey); }
.t-frost { background: radial-gradient(260px 200px at 20% 20%, rgba(255,255,255,.75), transparent 70%), linear-gradient(140deg, #d9d6e8 0%, #ece4d2 45%, #c9cbd2 100%); }
[data-theme="aurora"] .t-frost, [data-theme="dark"] .t-frost { background: radial-gradient(260px 200px at 20% 20%, rgba(255,255,255,.08), transparent 70%), var(--grad-soft), var(--panel); }
.tile h3 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin: 0; }
.tile .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.tile .cap { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--ink-2); }
.tile .stat { font-size: 40px; font-weight: 600; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.tile .grow { flex: 1; }
.pill-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 99px; border: 0; background: var(--panel-solid); color: var(--ink); font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; white-space: nowrap; transition: transform .15s, box-shadow .15s; }
.pill-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -8px rgba(0,0,0,.35); text-decoration: none; }
.pill-btn.dark { background: var(--dark); color: var(--on-dark); }
[data-theme="aurora"] .pill-btn.dark, [data-theme="dark"] .pill-btn.dark { background: var(--grad); color: #fff; }
.pill-btn.block { width: 100%; }
.sparkle { width: 22px; height: 22px; opacity: .55; }
.sparkle path { fill: currentColor; }
/* Feature tile with frosted name plate */
.feature-tile { padding: 0; min-height: 260px; justify-content: flex-end; }
.feature-tile .art { position: absolute; inset: 0; display: grid; place-items: center; font-size: 96px; font-weight: 700; letter-spacing: -.05em; color: rgba(255,255,255,.55); }
.art.a0 { background: radial-gradient(circle at 30% 25%, #f6f1e7, transparent 55%), linear-gradient(150deg, #c9c3b6, #8f8a80); }
.art.a1 { background: radial-gradient(circle at 70% 20%, #f2e6f0, transparent 55%), linear-gradient(150deg, #cdb8c7, #7f6e7d); }
.art.a2 { background: radial-gradient(circle at 30% 20%, #e3efe9, transparent 55%), linear-gradient(150deg, #b7c9be, #6f8679); }
.art.a3 { background: radial-gradient(circle at 60% 30%, #f3ead8, transparent 55%), linear-gradient(150deg, #d8c39b, #8d7552); }
.art.a4 { background: radial-gradient(circle at 40% 20%, #e5e9f3, transparent 55%), linear-gradient(150deg, #b9c1d4, #6c7690); }
.art.a5 { background: radial-gradient(circle at 50% 20%, #efe7e1, transparent 55%), linear-gradient(150deg, #cfbfb1, #857161); }
.plate { position: relative; margin: 14px; padding: 16px 18px; border-radius: 18px; background: rgba(255,255,255,.42); border: 1px solid rgba(255,255,255,.55); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); color: #141414; }
.plate .big { font-size: 26px; font-weight: 600; letter-spacing: -.03em; }
.plate .cap { color: #2d2d2b; }
/* Concentric rings */
.rings { display: grid; place-items: center; position: relative; margin: 4px auto 12px; }
.rings svg { width: 170px; height: 170px; transform: rotate(-90deg); }
.rings circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.rings .center { position: absolute; text-align: center; }
.rings .center b { display: block; font-size: 30px; letter-spacing: -.03em; font-weight: 600; }
.rings .center span { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--ink-2); }
.legend { display: flex; justify-content: space-between; gap: 8px; }
.legend div { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; color: var(--ink-2); }
.legend b { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink); letter-spacing: 0; }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
/* Progress with scale */
.scale { display: flex; justify-content: space-between; font-size: 10.5px; font-weight: 600; margin-top: 6px; color: var(--ink-2); }
.bigpct { font-size: 34px; font-weight: 600; letter-spacing: -.03em; }
.marker-bar { position: relative; height: 6px; border-radius: 99px; background: linear-gradient(90deg, #e2c14b, #a6cf5b); }
.marker-bar.rainbow { background: linear-gradient(90deg, #ecc7c2, #e4dd8c, #9fd3c7); height: 5px; }
.marker-bar .mk { position: absolute; top: -11px; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid var(--ink); transform: translateX(-6px); left: 0; }
/* Task list */
.tasks { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tasks li { display: flex; align-items: center; gap: 12px; }
.tasks .thumb { width: 52px; height: 52px; border-radius: 12px; flex: none; display: grid; place-items: center; color: rgba(255,255,255,.85); }
.tasks .thumb svg.ic { width: 22px; height: 22px; }
.tasks .t { flex: 1; min-width: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.tasks .t small { display: block; margin-top: 5px; font-weight: 600; color: var(--ink-2); letter-spacing: .02em; }
.tasks .t a { color: inherit; }
.chk { width: 22px; height: 22px; border-radius: 50%; border: 1.6px solid var(--ink); display: grid; place-items: center; flex: none; }
.chk.on { background: var(--ink); color: var(--panel-solid); }
.chk.on::after { content: ""; width: 8px; height: 4px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg) translate(1px, -1px); }
/* Week calendar */
.cal-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.cal-nav h3 { font-size: 22px; }
.cal { display: grid; grid-template-columns: 70px repeat(7, minmax(0, 1fr)); row-gap: 8px; position: relative; }
.cal .dh { font-size: 10.5px; text-transform: uppercase; font-weight: 600; letter-spacing: .04em; color: var(--ink-2); text-align: center; padding-bottom: 6px; }
.cal .dh.today { color: var(--ink); } .cal .dh.today::after { content: ""; display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin: 4px auto 0; box-shadow: 0 0 0 2px var(--dark); }
.cal .rl { font-size: 10.5px; color: var(--ink-2); font-weight: 600; padding-top: 9px; }
.cal .lane { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); min-height: 38px; background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(100%/7 - 1px), var(--line-2) calc(100%/7 - 1px), var(--line-2) calc(100%/7)); background-size: 100% 6px; background-repeat: repeat-y; }
.evt { align-self: center; margin: 2px 4px; padding: 6px 6px 6px 14px; border-radius: 99px; background: var(--dark); color: var(--on-dark); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
[data-theme="aurora"] .evt, [data-theme="dark"] .evt { background: var(--grad); color: #fff; }
.evt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evt.pending { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.evt.pay { background: var(--accent); color: var(--on-accent); }
.faces { display: flex; flex: none; }
.faces i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 9px; font-weight: 700; color: #fff; border: 2px solid var(--dark); margin-left: -6px; }
.evt.pending .faces i { border-color: var(--frame, var(--panel)); }
.cal-empty { grid-column: 2 / -1; color: var(--muted); font-size: 12px; padding: 12px 4px; }
/* Sidebar extras */
.promo { margin: 14px 4px 10px; padding: 18px 14px 14px; border-radius: 18px; text-align: center; color: #141414;
  background: radial-gradient(160px 120px at 30% 20%, rgba(255,255,255,.9), transparent 70%), linear-gradient(150deg, #d7d3e4, #ece4d2 50%, #c6c8cf); }
.promo .sparkle { color: #8f8a7c; }
.promo p { margin: 8px 0 12px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; line-height: 1.5; }
.promo .pill-btn { background: #151515; color: #fff; padding: 9px 16px; font-size: 10px; }
.me-chip { display: flex; align-items: center; gap: 10px; padding: 8px 6px 2px; }
.me-chip .av { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: var(--on-accent); background: var(--accent); flex: none; }
.me-chip div { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; line-height: 1.4; min-width: 0; }
.me-chip small { display: block; opacity: .6; }
[data-theme="aurora"] .me-chip .av, [data-theme="dark"] .me-chip .av { background: var(--grad); color: #fff; }
/* Appearance */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.sw { width: 38px; height: 38px; border-radius: 12px; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); position: relative; padding: 0; }
.sw.on { border-color: var(--ink); }
.sw.on::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 800; text-shadow: 0 0 3px rgba(0,0,0,.6); }
.sw-custom { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.sw-custom input { width: 44px; height: 38px; padding: 2px; border-radius: 12px; cursor: pointer; }
.theme-pick { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.theme-pick button { border: 2px solid var(--line-2); border-radius: 16px; padding: 10px; background: var(--panel-hi); cursor: pointer; text-align: left; font: inherit; color: var(--ink); font-weight: 600; }
.theme-pick button.on { border-color: var(--ink); }
.theme-pick .pv { height: 64px; border-radius: 10px; margin-bottom: 8px; display: grid; grid-template-columns: 26% 1fr; overflow: hidden; }
.pv.studio { background: #e9e7e2; } .pv.studio i { background: var(--dark); }
.pv.aurora { background: linear-gradient(135deg,#0b1120,#1b1440); } .pv.aurora i { background: rgba(255,255,255,.08); }
.pv b { margin: 10px; border-radius: 6px; background: rgba(255,255,255,.7); }
.pv.aurora b { background: linear-gradient(135deg,#22d3ee55,#a855f755); }
@media (max-width: 1180px) { .s3 { grid-column: span 6; } .s4, .s5 { grid-column: span 6; } .s7, .s8, .s9 { grid-column: span 12; } .r2 { grid-row: auto; } }
@media (max-width: 780px) {
  .bento > * { grid-column: span 12 !important; }
  [data-theme="studio"] .shell { margin: 0; border-radius: 0; }
  [data-theme="studio"] .side { height: auto; position: sticky; }
  .promo, .me-chip { display: none; }
  .cal { grid-template-columns: 0 repeat(7, minmax(0,1fr)); } .cal .rl { visibility: hidden; }
  .evt { font-size: 9px; padding-left: 8px; } .faces { display: none; }
}
@media print { [data-theme="studio"] .shell { margin: 0; box-shadow: none; border-radius: 0; } }
.bento.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.bento.five > .tile { min-height: 210px; }
a.tile, a.tile:hover { color: inherit; text-decoration: none; }
a.tile { transition: transform .2s; } a.tile:hover { transform: translateY(-2px); }
.feature-tile .art svg.ic { width: 70px; height: 70px; stroke-width: 1.2; color: rgba(255,255,255,.7); }
@media (max-width: 1180px) { .bento.five { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
[data-theme="studio"] .shell { overflow: clip; background: linear-gradient(90deg, var(--dark) 252px, var(--frame) 252px); }
[data-theme="studio"] .side { position: sticky; top: 0; height: 100vh; max-height: calc(100vh - 28px); }
[data-theme="studio"] .ring.r2 { box-shadow: none; border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.t-white .pill-btn:not(.dark), .t-frost .pill-btn:not(.dark) { background: var(--t-beige); }
@media (max-width: 780px) { [data-theme="studio"] .shell { background: var(--frame); } }
/* ---------- Profile photos ---------- */
img.photo { object-fit: cover; display: block; background: var(--panel-hi); }
img.av.photo { width: 34px; height: 34px; border-radius: 11px; flex: none; }
img.avatar.photo { width: 32px; height: 32px; border-radius: 50%; }
.me-chip img.av.photo { width: 34px; height: 34px; border-radius: 9px; }
.feature-tile .art-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile-actions { position: absolute; top: 14px; right: 14px; z-index: 2; display: flex; gap: 6px; opacity: 0; transition: opacity .2s; }
.feature-tile:hover .tile-actions, .tile-actions:focus-within { opacity: 1; }
@media (hover: none) { .tile-actions { opacity: 1; } }
.tile-actions .pill-btn { background: rgba(255,255,255,.85); color: #141414; backdrop-filter: blur(8px); padding: 8px 12px; font-size: 10px; }
.pill-btn.upload { cursor: pointer; }
.pill-btn.upload svg.ic { width: 15px; height: 15px; }
.pill-btn.busy { opacity: .6; pointer-events: none; }
.big-av { width: 88px; height: 88px; border-radius: 24px; display: grid; place-items: center; font-size: 28px; font-weight: 700; color: #fff; flex: none; }
.me-photo { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.hero-me { display: flex; gap: 18px; align-items: center; }
.tile-actions.show { opacity: 1; }
.profile-card { min-height: 290px; }
.faces img.face { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 2px solid var(--dark); margin-left: -6px; }
.evt.pending .faces img.face { border-color: var(--frame, var(--panel)); }

/* ==========================================================================
   v4 modules: HR, recruiting, workflows, org chart, grid, notifications…
   ========================================================================== */
.viewas { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 8px 16px; background: var(--accent); color: var(--on-accent); font-size: 13px; flex-wrap: wrap; }
.viewas svg.ic { width: 16px; height: 16px; }
.co-switch { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; font: inherit; font-weight: 650; color: var(--ink); cursor: pointer; padding: 4px 8px; border-radius: 9px; }
.co-switch:hover { background: var(--panel-hi); }
.co-switch svg.ic { width: 16px; height: 16px; }
.icon-btn.bell { position: relative; }
.icon-btn.bell .dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #e5484d; color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.notif-list { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.notif-list li a { display: flex; flex-direction: column; gap: 3px; padding: 11px 12px; border-radius: 12px; color: var(--ink); }
.notif-list li a:hover { background: var(--panel-hi); text-decoration: none; }
.notif-list li.unread a { background: var(--brand-soft); }
.notif-list li.unread .nt { font-weight: 700; }
.notif-list li.unread .nt::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #e5484d; margin-right: 7px; vertical-align: middle; }
.co-list { display: flex; flex-direction: column; gap: 8px; }
.co-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel-hi); cursor: pointer; text-align: left; font: inherit; color: var(--ink); }
.co-item.on { border-color: var(--ink); }
.co-item span:nth-child(2) { flex: 1; } .co-item small { display: block; color: var(--muted); }
.co-item .av { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.pick-box { border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.pick-list { max-height: 200px; overflow-y: auto; display: grid; gap: 6px; }
.qa-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.qa { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; border-radius: 16px; border: 0; background: var(--t-beige); color: var(--ink); font: inherit; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; text-align: left; transition: transform .15s; }
.qa:hover { transform: translateY(-2px); background: var(--t-grey); }
.qa svg.ic { width: 22px; height: 22px; }
.activity { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; }
.activity li { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.activity b { text-transform: capitalize; font-weight: 600; }
.dotx { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--dark); margin-top: 6px; flex: none; }
.review-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: 16px; background: var(--t-cream); margin-bottom: 16px; }
.mini-bar { height: 6px; border-radius: 99px; background: var(--panel-hi); overflow: hidden; margin: 6px 0 4px; border: 1px solid var(--line); }
.mini-bar > div { height: 100%; width: 0; background: linear-gradient(90deg, #e2c14b, #a6cf5b); border-radius: 99px; transition: width .6s; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 7px 13px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); font: inherit; font-size: 12px; color: var(--ink); cursor: pointer; }
.chip.on { background: var(--dark); color: var(--on-dark); border-color: transparent; }
.chip b { opacity: .7; } .chip svg.ic { width: 14px; height: 14px; }
.tabs.slim { max-width: 480px; }
.bigpct.sm { font-size: 22px; font-weight: 650; }
button.chk { background: transparent; cursor: pointer; padding: 0; color: inherit; }
button.chk.on { background: var(--ink); color: var(--panel-solid); }
.sys-list { display: flex; gap: 6px; flex-wrap: wrap; }
.sys { display: inline-flex; gap: 6px; align-items: center; padding: 5px 10px; border-radius: 99px; background: var(--ok-soft); font-size: 12px; font-weight: 600; }
.sys.revoked { background: var(--panel-hi); color: var(--muted); text-decoration: line-through; }
.sys.risk { background: var(--danger-soft); color: var(--danger); }
.kanban { display: grid; grid-template-columns: repeat(6, minmax(180px, 1fr)); gap: 12px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 6px; }
.kcol { background: var(--t-beige); border-radius: 18px; padding: 10px; min-height: 200px; display: flex; flex-direction: column; gap: 8px; }
.khead { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; padding: 4px 6px; display: flex; justify-content: space-between; }
.kcard { background: var(--panel-solid); border-radius: 14px; padding: 11px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.kcard .person .av { width: 30px; height: 30px; border-radius: 9px; font-size: 11px; }
.kact { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.kact select { padding: 6px 8px; font-size: 12px; width: auto; flex: 1; }
.kempty { text-align: center; padding: 14px; }
.stars { display: flex; gap: 1px; }
.star { background: none; border: 0; padding: 0 1px; font-size: 15px; color: var(--line-2); cursor: pointer; }
.star.on { color: #e2b23a; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rating { color: #e2b23a; letter-spacing: 1px; white-space: nowrap; }
.rating .muted { color: var(--line-2); }
.pre { white-space: pre-wrap; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; margin: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); cursor: pointer; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + span { background: var(--dark); }
.switch input:checked + span::before { transform: translateX(18px); }
.wf-name { font-weight: 650; margin: 2px 0 6px; }
.wf-steps { margin: 10px 0 0; padding-left: 0; list-style: none; display: grid; gap: 6px; }
.wf-steps li { display: flex; gap: 8px; align-items: center; font-size: 13px; padding: 8px 10px; border-radius: 10px; background: var(--panel-hi); }
.wf-steps svg.ic { width: 15px; height: 15px; color: var(--ink-2); }
.wf-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.wf-row select, .wf-row input { flex: 1; }
.wf-action { border: 1px solid var(--line-2); border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.org-wrap { overflow-x: auto; }
.org-tree, .org-tree ul { list-style: none; margin: 0; padding: 0; }
.org-tree ul { margin-left: 26px; border-left: 1.5px solid var(--line-2); padding-left: 18px; }
.org-tree li { position: relative; padding: 6px 0; }
.org-tree ul > li::before { content: ""; position: absolute; left: -18px; top: 28px; width: 16px; border-top: 1.5px solid var(--line-2); }
.org-node { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 16px; background: var(--t-white, var(--panel-solid)); border: 1px solid var(--line); color: var(--ink); min-width: 240px; }
.org-node:hover { text-decoration: none; border-color: var(--ink); }
.org-node .av { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; flex: none; }
.org-node small { display: block; color: var(--muted); font-size: 11px; }
.org-node i { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; background: var(--panel-hi); border-radius: 99px; padding: 2px 8px; }
.grid-table th.sortable { cursor: pointer; user-select: none; }
.grid-table th.sortable:hover { color: var(--ink); }
details.cols { position: relative; }
details.cols summary { list-style: none; }
details.cols summary::-webkit-details-marker { display: none; }
.cols-pop { position: absolute; right: 0; top: 44px; z-index: 10; background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px; display: grid; gap: 6px; min-width: 200px; box-shadow: 0 20px 40px -12px rgba(0,0,0,.3); }
.two-col { columns: 2; } @media (max-width: 760px) { .two-col { columns: 1; } .qa-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.int-ic { width: 42px; height: 42px; border-radius: 13px; background: var(--t-beige); display: grid; place-items: center; }
.int-ic svg.ic { width: 20px; height: 20px; }
dl.kv.sm { grid-template-columns: 90px 1fr; gap: 6px 10px; font-size: 13px; }
.bars .row.sm { grid-template-columns: 70px 1fr 30px; }
.arch { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.arch-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; width: 100%; }
.arch-box { width: 100%; max-width: 760px; border-radius: 16px; padding: 14px 16px; background: var(--t-beige); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.arch-row .arch-box { flex-direction: column; align-items: flex-start; }
.arch-box b { width: 100%; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.arch-box span { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: var(--panel-solid); }
.arch-box.b1 { background: var(--t-cream); } .arch-box.b2 { background: var(--dark); color: var(--on-dark); } .arch-box.b2 span { color: var(--ink); }
.arch-box.b3 { background: var(--ok-soft); } .arch-box.b4 { background: var(--t-grey); }
.arrow { font-size: 12px; color: var(--muted); font-weight: 650; }
@media (max-width: 900px) { .arch-row { grid-template-columns: repeat(2, minmax(0,1fr)); } .kanban { grid-template-columns: repeat(6, 220px); } }
.link-btn.small { font-size: 12px; font-weight: 600; }
[data-theme="studio"] .nav a { padding: 7px 12px; margin: 1px 0; }
[data-theme="studio"] .nav .sect { padding: 12px 12px 4px; }
.big-av { color: #fff; }
