/* ─── NIU HR Design Tokens & Base ────────────────────── */
:root {
  --brand-ink: #1C1917;
  --brand-ink-soft: #292524;
  --brand-accent: #B45309;
  --brand-accent-soft: #FED7AA;
  --brand-accent-bg: #FFF7ED;

  --bg: #FAFAF9;
  --surface: #FFFFFF;
  --surface-2: #F5F5F4;
  --surface-3: #E7E5E4;
  --border: #E7E5E4;
  --border-strong: #D6D3D1;
  --text: #1C1917;
  --text-soft: #44403C;
  --text-muted: #78716C;
  --text-faint: #A8A29E;

  --success-fg: #166534;
  --success-bg: #DCFCE7;
  --warn-fg: #9A3412;
  --warn-bg: #FFEDD5;
  --error-fg: #991B1B;
  --error-bg: #FEE2E2;
  --info-fg: #1E40AF;
  --info-bg: #DBEAFE;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px;

  --r-1: 4px; --r-2: 8px; --r-3: 12px;

  --t-display: 28px;
  --t-h1: 22px;
  --t-h2: 17px;
  --t-h3: 15px;
  --t-body: 14px;
  --t-small: 13px;
  --t-mini: 12px;

  --topbar-h: 56px;
  --rail-w: 240px;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --dur: 200ms;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: var(--t-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
.num { font-variant-numeric: tabular-nums; }
h1, h2, h3, h4 { font-family: "Inter Tight", "Inter", sans-serif; margin: 0; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }

/* ─── Top bar ───────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 var(--s-5); gap: var(--s-5);
  position: sticky; top: 0; z-index: 30;
}
.logo { display: flex; align-items: baseline; gap: 6px; user-select: none; }
.logo-mark { font-family: "Inter Tight"; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; color: var(--brand-ink); }
.logo-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--brand-accent); align-self: center; margin: 0 2px; }
.logo-sub { font-weight: 500; font-size: 13px; color: var(--text-muted); letter-spacing: 0.02em; text-transform: uppercase; }

.workspace {
  display: flex; align-items: center; gap: var(--s-2);
  padding: 6px var(--s-3); border-radius: var(--r-2);
  cursor: pointer; color: var(--text-soft); font-weight: 500;
}
.workspace:hover { background: var(--surface-2); }
.workspace-avatar {
  width: 22px; height: 22px;
  background: var(--brand-ink); color: #fff;
  font-size: 11px; font-weight: 600;
  display: grid; place-items: center; border-radius: 5px;
}
.topbar-spacer { flex: 1; }
.cmdk {
  display: flex; align-items: center; gap: var(--s-3);
  height: 32px; padding: 0 var(--s-3);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-2);
  color: var(--text-muted); font-size: var(--t-small);
  min-width: 240px; cursor: pointer;
}
.cmdk:hover { border-color: var(--border-strong); }
.cmdk kbd {
  margin-left: auto; font-family: inherit; font-size: 11px;
  padding: 1px 6px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 4px;
  color: var(--text-muted);
}
.icon-btn {
  width: 32px; height: 32px; border: 0; background: transparent;
  border-radius: var(--r-2); display: grid; place-items: center;
  cursor: pointer; color: var(--text-soft);
}
.icon-btn:hover { background: var(--surface-2); }
.avatar-me {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #B45309, #7C2D12);
  color: #fff; display: grid; place-items: center;
  font-size: 11px; font-weight: 600; cursor: pointer;
}

/* ─── Layout ────────────────────────────────────── */
.layout { display: flex; min-height: calc(100vh - var(--topbar-h)); }

.rail {
  width: var(--rail-w); background: var(--surface);
  border-right: 1px solid var(--border);
  padding: var(--s-4) var(--s-3);
  display: flex; flex-direction: column; gap: var(--s-1);
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h)); overflow-y: auto;
}
.rail-section {
  text-transform: uppercase; font-size: 10.5px;
  color: var(--text-faint); font-weight: 600;
  letter-spacing: 0.06em;
  padding: var(--s-3) var(--s-3) var(--s-2);
}
.nav-item {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 9px var(--s-3); border-radius: var(--r-2);
  color: var(--text-soft); font-weight: 500; cursor: pointer;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--brand-ink); color: #fff; }
.nav-item.active svg { stroke: #fff; }
.nav-item svg { stroke: var(--text-muted); flex-shrink: 0; }
.nav-item:hover svg { stroke: var(--text); }
.nav-badge {
  margin-left: auto; font-size: 11px; font-weight: 600;
  background: var(--brand-accent-bg); color: var(--brand-accent);
  padding: 1px 7px; border-radius: 10px;
}
.nav-item.active .nav-badge { background: rgba(255,255,255,0.12); color: #fff; }

.rail-foot {
  margin-top: auto; padding: var(--s-3);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-3);
}
.rail-foot-title { font-weight: 600; font-size: var(--t-small); margin-bottom: 4px; }
.rail-foot-text { font-size: var(--t-mini); color: var(--text-muted); margin-bottom: var(--s-3); line-height: 1.45; }
.rail-foot-cta {
  display: block; text-align: center;
  background: var(--brand-ink); color: #fff;
  font-size: var(--t-small); font-weight: 500;
  padding: 7px; border-radius: var(--r-2);
}

.main { flex: 1; min-width: 0; }
.container { max-width: 1280px; margin: 0 auto; padding: var(--s-6) var(--s-7); }

/* ─── Common ─────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: var(--t-mini); font-weight: 600; line-height: 1;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.review { background: var(--warn-bg); color: var(--warn-fg); }
.badge.review .badge-dot { background: #EA580C; }

.btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 9px var(--s-4); border-radius: var(--r-2);
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font-weight: 500; font-size: var(--t-body);
  cursor: pointer; font-family: inherit;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
  text-decoration: none;
}
.btn:hover { background: var(--surface-2); border-color: var(--text-faint); }
.btn.primary { background: var(--brand-ink); color: #fff; border-color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-ink-soft); border-color: var(--brand-ink-soft); }
.btn.sm { padding: 5px 10px; font-size: var(--t-small); }
.btn.on-dark { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.15); color: #fff; }
.btn.on-dark:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.25); }

/* ─── Avatar palette ────────────────────────────── */
.av-1 { background: linear-gradient(135deg, #B45309, #7C2D12); }
.av-2 { background: linear-gradient(135deg, #166534, #14532D); }
.av-3 { background: linear-gradient(135deg, #1E40AF, #1E3A8A); }
.av-4 { background: linear-gradient(135deg, #7E22CE, #581C87); }
.av-5 { background: linear-gradient(135deg, #BE185D, #831843); }
.av-6 { background: linear-gradient(135deg, #0F766E, #134E4A); }
.av-7 { background: linear-gradient(135deg, #92400E, #78350F); }
.av-8 { background: linear-gradient(135deg, #4338CA, #312E81); }
.emp-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  font-weight: 600; font-size: var(--t-small); flex-shrink: 0;
}

/* ─── HOME ─────────────────────────────────────── */
.greeting { margin-bottom: var(--s-6); }
.greeting h1 {
  font-size: 30px; font-weight: 600; letter-spacing: -0.025em;
  margin-bottom: 6px;
}
.greeting-meta {
  color: var(--text-muted); font-size: var(--t-h3);
  display: flex; align-items: center; gap: var(--s-3);
}
.greeting-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-faint); }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4); margin-bottom: var(--s-5);
}
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-3); padding: var(--s-5);
  transition: border-color var(--dur) var(--ease);
}
.stat:hover { border-color: var(--border-strong); }
.stat-label {
  font-size: var(--t-small); color: var(--text-muted); font-weight: 500;
  margin-bottom: var(--s-3); display: flex; align-items: center; gap: var(--s-2);
}
.stat-value {
  font-family: "Inter Tight"; font-size: 26px; font-weight: 600;
  letter-spacing: -0.02em; color: var(--text); cursor: pointer;
}
.stat-value:hover { color: var(--brand-accent); }
.stat-meta { font-size: var(--t-small); color: var(--text-muted); margin-top: 6px; }
.stat-meta .delta-up { color: var(--success-fg); font-weight: 500; }
.stat-meta .delta-warn { color: var(--warn-fg); font-weight: 500; }

.widget {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-3); overflow: hidden;
  margin-bottom: var(--s-4);
}
.widget-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border);
}
.widget-title {
  font-size: var(--t-h3); font-weight: 600;
  display: flex; align-items: center; gap: var(--s-2);
}
.widget-link {
  color: var(--brand-accent); font-size: var(--t-small); font-weight: 500;
  display: flex; align-items: center; gap: 4px;
}
.widget-link:hover { text-decoration: underline; }
.widget-body { padding: var(--s-5); }
.widget-body.flush { padding: 0; }

.grid-2 {
  display: grid; grid-template-columns: 7fr 5fr; gap: var(--s-4);
  margin-bottom: var(--s-4);
}

/* Compliance hero */
.compliance-hero {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface) 60%, var(--surface-2) 100%);
}
.compliance-hero-body {
  padding: var(--s-6); display: grid;
  grid-template-columns: 1fr 1.5fr; gap: var(--s-7); align-items: center;
}
.compliance-score-num {
  font-family: "Inter Tight"; font-size: 64px; font-weight: 600;
  letter-spacing: -0.04em; line-height: 1; color: var(--text);
}
.compliance-score-num small {
  font-size: 28px; color: var(--text-muted); font-weight: 500;
  margin-left: var(--s-2); letter-spacing: -0.02em;
}
.compliance-score-label {
  color: var(--text-soft); font-size: var(--t-h3);
  margin-top: var(--s-3);
}
.compliance-score-bar {
  margin-top: var(--s-4); height: 6px;
  background: var(--surface-3); border-radius: 3px; overflow: hidden;
}
.compliance-score-bar-fill {
  height: 100%; background: var(--success-fg); border-radius: 3px;
}
.compliance-issues { display: flex; flex-direction: column; gap: var(--s-3); }
.issue {
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-2);
}
.issue-sev {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
  font-weight: 700; font-size: 13px;
}
.issue-sev.high { background: var(--error-bg); color: var(--error-fg); }
.issue-sev.med { background: var(--warn-bg); color: var(--warn-fg); }
.issue-text { flex: 1; min-width: 0; }
.issue-title { font-weight: 600; font-size: var(--t-body); }
.issue-meta {
  font-size: var(--t-small); color: var(--text-muted); margin-top: 2px;
  display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap;
}
.issue-meta .pill {
  background: var(--surface-3); padding: 1px 6px; border-radius: 4px;
  font-size: 11px; color: var(--text-soft); font-weight: 500;
}

/* Approval rows */
.approval {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border);
}
.approval:last-child { border-bottom: 0; }
.approval-text { flex: 1; min-width: 0; }
.approval-title { font-weight: 500; font-size: var(--t-body); line-height: 1.3; }
.approval-meta { font-size: var(--t-small); color: var(--text-muted); margin-top: 2px; }
.approval-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Activity feed */
.activity {
  padding: var(--s-3) var(--s-5); display: flex; gap: var(--s-3);
  align-items: flex-start; position: relative;
}
.activity::before {
  content: ""; position: absolute;
  left: calc(var(--s-5) + 5px); top: 0; bottom: 0;
  width: 1px; background: var(--border);
}
.activity:first-child::before { top: 50%; }
.activity:last-child::before { bottom: 50%; }
.activity-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--text-faint);
  flex-shrink: 0; margin-top: 4px; z-index: 1;
}
.activity.success .activity-dot { border-color: var(--success-fg); background: var(--success-bg); }
.activity.warn .activity-dot { border-color: var(--warn-fg); background: var(--warn-bg); }
.activity.info .activity-dot { border-color: var(--info-fg); background: var(--info-bg); }
.activity-text { flex: 1; line-height: 1.4; padding: 4px 0; }
.activity-text strong { font-weight: 600; }
.activity-time { font-size: var(--t-mini); color: var(--text-muted); margin-top: 2px; }

/* Document expiry */
.expiry-summary {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3); padding: var(--s-5);
  border-bottom: 1px solid var(--border);
}
.expiry-bucket {
  text-align: left; padding: var(--s-3) var(--s-4);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-2);
}
.expiry-bucket-num {
  font-family: "Inter Tight"; font-size: 24px; font-weight: 600;
  letter-spacing: -0.02em;
}
.expiry-bucket.high .expiry-bucket-num { color: var(--error-fg); }
.expiry-bucket.med .expiry-bucket-num { color: var(--warn-fg); }
.expiry-bucket-label {
  font-size: var(--t-mini); color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em; margin-top: 4px; font-weight: 600;
}

.expiry-row {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--border);
  font-size: var(--t-body);
}
.expiry-row:last-child { border-bottom: 0; }
.expiry-days {
  font-family: "Inter Tight"; font-weight: 600;
  width: 60px; text-align: right; flex-shrink: 0;
  font-size: var(--t-small);
}
.expiry-days.high { color: var(--error-fg); }
.expiry-days.med { color: var(--warn-fg); }
.expiry-days.low { color: var(--text-muted); }
.expiry-content { flex: 1; min-width: 0; }
.expiry-name { font-weight: 500; }
.expiry-doc { font-size: var(--t-small); color: var(--text-muted); }

/* Payroll preview card */
.payroll-preview {
  background: linear-gradient(135deg, #1C1917 0%, #292524 100%);
  color: #fff; border: 0; overflow: hidden; border-radius: var(--r-3);
  margin-bottom: var(--s-4);
}
.payroll-preview .widget-head { border-bottom: 1px solid rgba(255,255,255,0.08); padding: var(--s-4) var(--s-5); display: flex; justify-content: space-between; align-items: center; }
.payroll-preview .widget-title { color: #fff; font-size: var(--t-h3); font-weight: 600; }
.payroll-preview-body {
  padding: var(--s-5); display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr; gap: var(--s-5);
}
.pp-stat-label {
  font-size: var(--t-mini); color: rgba(255,255,255,0.5);
  text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600;
  margin-bottom: 6px;
}
.pp-stat-value {
  font-family: "Inter Tight"; font-size: 22px; font-weight: 600;
  letter-spacing: -0.02em;
}
.payroll-preview-foot {
  padding: var(--s-4) var(--s-5); border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: space-between;
}
.payroll-preview-foot-text { color: rgba(255,255,255,0.7); font-size: var(--t-small); }

/* Quick actions */
.quick-actions {
  display: flex; gap: var(--s-2); margin-bottom: var(--s-5);
}
.qa {
  flex: 1; display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-2); cursor: pointer;
  color: var(--text); transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.qa:hover { border-color: var(--brand-ink); background: var(--surface-2); }
.qa-icon {
  width: 32px; height: 32px; border-radius: var(--r-2);
  background: var(--surface-2); display: grid; place-items: center;
  flex-shrink: 0; color: var(--text-soft);
}
.qa-text { line-height: 1.2; }
.qa-title { font-weight: 500; font-size: var(--t-small); }
.qa-sub { font-size: var(--t-mini); color: var(--text-muted); margin-top: 2px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }
:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 2px; border-radius: var(--r-1); }

/* ─── PAGE HEAD (common) ─────────────────────────── */
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--s-5); margin-bottom: var(--s-6);
}
.breadcrumb {
  font-size: var(--t-small); color: var(--text-muted);
  margin-bottom: var(--s-2); display: flex; align-items: center; gap: var(--s-2);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text-soft); }
.page-title {
  font-size: var(--t-display); font-weight: 600; letter-spacing: -0.025em;
  display: flex; align-items: center; gap: var(--s-3);
}
.page-sub { color: var(--text-muted); margin-top: 6px; font-size: var(--t-h3); }
.head-actions { display: flex; gap: var(--s-3); flex-shrink: 0; }

/* ─── PEOPLE LIST ────────────────────────────────── */
.people-stats {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s-3);
  margin-bottom: var(--s-5);
}
.people-stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-2); padding: var(--s-3) var(--s-4);
}
.people-stat-label {
  font-size: var(--t-mini); color: var(--text-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px;
}
.people-stat-value {
  font-family: "Inter Tight"; font-size: 22px; font-weight: 600;
  letter-spacing: -0.02em;
}
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-3); overflow: hidden; }
.toolbar {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border);
}
.search {
  flex: 1; max-width: 360px;
  display: flex; align-items: center; gap: var(--s-3);
  height: 36px; padding: 0 var(--s-3);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-2);
}
.search input { border: 0; outline: 0; background: transparent; font: inherit; flex: 1; }
.search input::placeholder { color: var(--text-faint); }
.filter-chip {
  height: 36px; padding: 0 var(--s-3);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-2);
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--t-small); color: var(--text-soft); cursor: pointer;
}
.filter-chip.active {
  background: var(--brand-ink); color: #fff; border-color: var(--brand-ink);
}
.toolbar-meta { color: var(--text-muted); font-size: var(--t-small); margin-left: auto; }

table.people {
  width: 100%; border-collapse: collapse; font-size: var(--t-body);
}
table.people thead th {
  text-align: left; font-size: var(--t-mini); font-weight: 600;
  color: var(--text-muted); padding: var(--s-3) var(--s-4);
  background: var(--surface-2); border-bottom: 1px solid var(--border);
  text-transform: uppercase; letter-spacing: 0.04em;
}
table.people tbody td {
  padding: var(--s-4); border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.people tbody tr { cursor: pointer; transition: background var(--dur) var(--ease); }
table.people tbody tr:hover { background: var(--surface-2); }
table.people tbody tr:last-child td { border-bottom: 0; }
.emp { display: flex; align-items: center; gap: var(--s-3); min-width: 220px; }
.emp-name { font-weight: 500; line-height: 1.2; }
.emp-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--t-mini); color: var(--text-muted); margin-top: 2px;
}
.type-badge {
  font-size: 10px; font-weight: 600;
  padding: 2px 8px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.04em;
  display: inline-block;
}
.type-ft { background: var(--surface-3); color: var(--text-soft); }
.type-pt { background: var(--info-bg); color: var(--info-fg); }
.type-vis { background: var(--brand-accent-bg); color: var(--brand-accent); }
.type-project { background: var(--success-bg); color: var(--success-fg); }
.status-badge {
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 4px;
}
.status-active { background: var(--success-bg); color: var(--success-fg); }
.status-active::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #16A34A; }
.status-blocked { background: var(--error-bg); color: var(--error-fg); }
.status-blocked::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--error-fg); }
.status-on_leave { background: var(--warn-bg); color: var(--warn-fg); }
.status-on_leave::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--warn-fg); }
.status-terminated { background: var(--surface-3); color: var(--text-muted); }

/* ─── PROFILE ────────────────────────────────────── */
.profile-header {
  display: flex; align-items: flex-start; gap: var(--s-5);
  padding: var(--s-5) 0 var(--s-6);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s-6);
}
.profile-avatar-large {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  font-weight: 600; font-size: 24px;
  flex-shrink: 0; letter-spacing: -0.02em;
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.18);
}
.profile-info { flex: 1; min-width: 0; }
.profile-info h1 {
  font-size: var(--t-display); font-weight: 600;
  letter-spacing: -0.025em; margin-bottom: 4px;
}
.profile-subtitle {
  color: var(--text-muted); font-size: var(--t-h3);
  margin-bottom: var(--s-3); display: flex; align-items: center;
  gap: var(--s-3); flex-wrap: wrap;
}
.profile-subtitle-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-faint); }
.profile-chips {
  display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap;
}
.tenure-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: var(--t-mini); font-weight: 500;
  color: var(--text-soft); background: var(--surface-2);
  border: 1px solid var(--border);
}
.profile-actions { display: flex; gap: var(--s-2); flex-shrink: 0; }

.tabs {
  display: flex; gap: var(--s-1);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s-5); overflow-x: auto;
}
.tab {
  padding: var(--s-3) var(--s-4); border: 0; background: transparent;
  color: var(--text-muted); font-weight: 500; font-size: var(--t-body);
  cursor: pointer; font-family: inherit;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px; white-space: nowrap;
  display: flex; align-items: center; gap: var(--s-2);
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--brand-ink); font-weight: 600; }
.tab .tab-count {
  font-size: 11px; padding: 1px 6px; border-radius: 10px;
  background: var(--surface-3); color: var(--text-soft); font-weight: 500;
}

.profile-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s-4); }
.profile-grid > div { display: flex; flex-direction: column; gap: var(--s-4); }

.comp-list { padding: 0; }
.comp-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--border);
  font-size: var(--t-body);
}
.comp-row:last-child { border-bottom: 0; }
.comp-row .lhs { color: var(--text-soft); }
.comp-row .lhs-sub { color: var(--text-muted); font-size: var(--t-mini); margin-top: 2px; }
.comp-row .rhs { font-variant-numeric: tabular-nums; font-weight: 500; }
.comp-row.total {
  background: var(--surface-2); border-top: 1px solid var(--border);
  border-bottom: 0;
}
.comp-row.total .lhs { font-weight: 600; color: var(--text); }
.comp-row.total .rhs { font-weight: 700; }

.info-list { padding: var(--s-3) var(--s-5); }
.info-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 0; font-size: var(--t-body);
}
.info-row .lhs { color: var(--text-muted); }
.info-row .rhs { color: var(--text); text-align: right; max-width: 60%; word-break: break-word; }

.doc-row {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--border); font-size: var(--t-body);
}
.doc-row:last-child { border-bottom: 0; }
.doc-icon {
  width: 32px; height: 32px; border-radius: var(--r-2);
  background: var(--surface-2); display: grid; place-items: center;
  flex-shrink: 0; color: var(--text-soft);
}
.doc-content { flex: 1; min-width: 0; }
.doc-name { font-weight: 500; }
.doc-meta { font-size: var(--t-small); color: var(--text-muted); }
.doc-status {
  font-size: var(--t-small); font-weight: 500; flex-shrink: 0;
  display: flex; align-items: center; gap: 4px;
}
.doc-status.ok { color: var(--success-fg); }
.doc-status.warn { color: var(--warn-fg); }
.doc-status.high { color: var(--error-fg); }
.doc-status.muted { color: var(--text-muted); }

table.mini {
  width: 100%; border-collapse: collapse; font-size: var(--t-body);
}
table.mini thead th {
  text-align: right; font-size: var(--t-mini); font-weight: 600;
  color: var(--text-muted); padding: var(--s-3) var(--s-4);
  background: var(--surface-2); border-bottom: 1px solid var(--border);
  text-transform: uppercase; letter-spacing: 0.04em;
}
table.mini thead th:first-child { text-align: left; }
table.mini tbody td {
  padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border);
  text-align: right; vertical-align: middle;
}
table.mini tbody td:first-child { text-align: left; font-weight: 500; }
table.mini tbody tr:last-child td { border-bottom: 0; }
.money { font-variant-numeric: tabular-nums; }
.money.muted { color: var(--text-faint); }
.money.strong { font-weight: 600; }
.money.neg { color: var(--error-fg); }

/* ─── FORM (Add Employee) ────────────────────────── */
.form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-3); overflow: hidden;
}
.form-section {
  padding: var(--s-5) var(--s-6);
  border-bottom: 1px solid var(--border);
}
.form-section:last-child { border-bottom: 0; }
.form-section-title {
  font-size: var(--t-h2); font-weight: 600; letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.form-section-meta {
  color: var(--text-muted); font-size: var(--t-small);
  margin-bottom: var(--s-4);
}
.form-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-4);
}
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row.full { grid-column: 1 / -1; }
.form-row label {
  font-size: var(--t-mini); color: var(--text-muted);
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
}
.form-row label .required { color: var(--brand-accent); }
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%; height: 36px; padding: 0 var(--s-3);
  border: 1px solid var(--border); border-radius: var(--r-2);
  font: inherit; font-size: var(--t-body);
  background: var(--surface); color: var(--text);
}
.form-row textarea { height: auto; min-height: 80px; padding: var(--s-2) var(--s-3); resize: vertical; }
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 0; border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px var(--brand-accent-bg);
}
.form-row .form-hint {
  font-size: var(--t-mini); color: var(--text-muted); margin-top: 2px;
}
.form-actions {
  display: flex; align-items: center; justify-content: flex-end;
  gap: var(--s-3); padding: var(--s-4) var(--s-6);
  background: var(--surface-2); border-top: 1px solid var(--border);
}
.form-actions-meta { margin-right: auto; font-size: var(--t-small); color: var(--text-muted); }

/* Flash message */
.flash {
  padding: var(--s-3) var(--s-4);
  background: var(--success-bg); border: 1px solid #BBF7D0;
  border-radius: var(--r-2); color: var(--success-fg);
  font-size: var(--t-small); font-weight: 500;
  margin-bottom: var(--s-4);
  display: flex; align-items: center; gap: var(--s-2);
}

/* ─── SCHEDULE ────────────────────────────────────── */
.sch-toolbar {
  display: flex; align-items: center; gap: var(--s-3);
  margin-bottom: var(--s-4); flex-wrap: wrap;
}
.sch-week-nav {
  display: flex; align-items: center; gap: var(--s-2);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-2); padding: 4px;
}
.sch-week-arrow {
  width: 30px; height: 30px; border-radius: var(--r-1);
  background: transparent; border: 0; cursor: pointer;
  display: grid; place-items: center; color: var(--text-soft);
  text-decoration: none;
}
.sch-week-arrow:hover { background: var(--surface-2); }
.sch-week-label { padding: 0 var(--s-3); font-weight: 600; font-size: var(--t-small); }
.sch-week-today {
  padding: 4px 10px; border-radius: var(--r-1);
  font-size: var(--t-mini); font-weight: 600;
  border: 1px solid var(--border-strong); background: transparent;
  cursor: pointer; text-decoration: none; color: var(--text-soft);
}
.sch-week-today:hover { background: var(--surface-2); }
.sch-view-tabs {
  display: flex; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-2); padding: 3px;
}
.sch-view-tab {
  padding: 5px 12px; border-radius: var(--r-1);
  font-size: var(--t-small); font-weight: 500;
  color: var(--text-muted); border: 0; background: transparent; cursor: pointer;
}
.sch-view-tab.active { background: var(--brand-ink); color: #fff; }
.sch-stats {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s-3);
  margin-bottom: var(--s-5);
}
.sch-stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-2); padding: var(--s-3) var(--s-4);
}
.sch-stat-label {
  font-size: var(--t-mini); color: var(--text-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px;
}
.sch-stat-value {
  font-family: "Inter Tight"; font-size: 22px; font-weight: 600;
  letter-spacing: -0.02em;
}
.sch-stat-meta { font-size: var(--t-mini); color: var(--text-muted); margin-top: 2px; }
.sch-stat-meta.warn { color: var(--warn-fg); }

/* Grid */
.sch-grid-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-3); overflow: hidden;
}
.sch-grid {
  display: grid;
  grid-template-columns: 220px repeat(7, 1fr);
}
.sch-day-header {
  padding: var(--s-3) var(--s-2);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center; font-size: var(--t-small);
}
.sch-day-header:last-child { border-right: 0; }
.sch-day-header .day-name {
  font-size: var(--t-mini); color: var(--text-muted);
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px;
}
.sch-day-header .day-num {
  font-family: "Inter Tight"; font-size: 18px; font-weight: 600; letter-spacing: -0.02em;
}
.sch-day-header.today { background: var(--brand-accent-bg); }
.sch-day-header.today .day-name { color: var(--brand-accent); }
.sch-day-header.today .day-num { color: var(--brand-accent); }
.sch-day-header.rest-day {
  background: linear-gradient(180deg, var(--surface-2), #F0EDEC);
}
.sch-day-header.rest-day .day-name { color: var(--text-muted); }
.sch-day-header .rest-marker {
  font-size: 9px; color: var(--text-faint); font-weight: 500; margin-top: 2px;
}
.sch-corner {
  background: var(--surface-2); border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border); padding: var(--s-3);
  display: flex; align-items: center;
  font-size: var(--t-mini); font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.sch-row-staff {
  padding: var(--s-3); border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: var(--s-2);
  background: var(--surface);
}
.sch-row-staff .emp-avatar { width: 30px; height: 30px; font-size: 11px; }
.sch-row-staff-name { font-weight: 500; font-size: var(--t-small); line-height: 1.2; }
.sch-row-staff-meta {
  font-size: 10px; color: var(--text-muted); margin-top: 2px;
  display: flex; align-items: center; gap: 4px;
}
.sch-license-chip {
  background: var(--warn-bg); color: var(--warn-fg);
  padding: 0 5px; border-radius: 3px;
  font-size: 9px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.sch-cell {
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 5px; background: var(--surface);
  min-height: 56px; position: relative;
}
.sch-cell:last-child { border-right: 0; }
.sch-cell.rest-day { background: var(--surface-2); }

/* Shift blocks */
.sch-shift {
  border-radius: 4px; padding: 5px 7px;
  font-size: 11px; line-height: 1.3;
  cursor: pointer; transition: filter var(--dur) var(--ease);
  margin-bottom: 3px;
}
.sch-shift:last-child { margin-bottom: 0; }
.sch-shift:hover { filter: brightness(1.05); }
.sch-shift-time { font-weight: 600; font-variant-numeric: tabular-nums; }
.sch-shift-role { font-size: 10px; opacity: 0.85; margin-top: 1px; }
.sch-shift.dentist { background: #FEF3C7; color: #92400E; border-left: 3px solid #B45309; }
.sch-shift.reception { background: #DBEAFE; color: #1E3A8A; border-left: 3px solid #1E40AF; }
.sch-shift.nurse { background: #FCE7F3; color: #831843; border-left: 3px solid #BE185D; }
.sch-shift.assistant { background: #D1FAE5; color: #064E3B; border-left: 3px solid #047857; }
.sch-shift.lab { background: #E0E7FF; color: #312E81; border-left: 3px solid #4338CA; }
.sch-shift.manager { background: #F3E8FF; color: #581C87; border-left: 3px solid #7E22CE; }
.sch-shift.visiting {
  background: var(--surface); color: var(--text-soft);
  border: 1px dashed var(--brand-accent); border-left: 3px dashed var(--brand-accent);
}

.sch-ot-tag {
  display: inline-block; font-size: 9px; font-weight: 700;
  padding: 0 4px; border-radius: 3px;
  background: rgba(180, 83, 9, 0.18); color: var(--brand-accent);
  margin-left: 4px; letter-spacing: 0.04em;
}
.sch-late-flag {
  background: var(--error-bg); color: var(--error-fg);
  border: 1px solid var(--error-fg); border-left: 3px solid var(--error-fg);
}
.sch-off {
  color: var(--text-faint); font-size: 11px; font-weight: 500;
  height: 100%; display: flex; align-items: center; justify-content: center;
}

/* Blocked row — full row red diagonal stripe */
.sch-row-blocked-cell {
  grid-column: 1 / -1;
  background: repeating-linear-gradient(45deg, var(--error-bg), var(--error-bg) 8px, #FECACA 8px, #FECACA 16px);
  border-bottom: 1px solid var(--border);
  padding: var(--s-3) var(--s-4);
  display: flex; align-items: center; gap: var(--s-3);
}
.sch-row-blocked-cell .emp-avatar {
  width: 30px; height: 30px; font-size: 11px; flex-shrink: 0;
  filter: grayscale(0.4); opacity: 0.85;
}
.sch-blocked-text { flex: 1; }
.sch-blocked-name {
  font-weight: 600; font-size: var(--t-small); color: var(--error-fg);
  display: flex; align-items: center; gap: var(--s-2);
}
.sch-blocked-meta {
  font-size: var(--t-mini); color: var(--error-fg); margin-top: 2px; opacity: 0.85;
}

.compliance-strip {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-3); padding: var(--s-4) var(--s-5);
  margin-top: var(--s-4); display: flex; align-items: center; gap: var(--s-4);
}
.compliance-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--success-bg); color: var(--success-fg);
  display: grid; place-items: center; flex-shrink: 0;
}
.compliance-text { flex: 1; }
.compliance-title { font-weight: 600; }
.compliance-meta { font-size: var(--t-small); color: var(--text-muted); margin-top: 2px; }

/* ─── COMPLIANCE ──────────────────────────────────── */
.comp-overview {
  display: grid; grid-template-columns: 1fr 1.5fr auto;
  gap: var(--s-6);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-3); padding: var(--s-5) var(--s-6);
  margin-bottom: var(--s-5); align-items: center;
}
.comp-score-num {
  font-family: "Inter Tight"; font-size: 56px; font-weight: 600;
  letter-spacing: -0.04em; line-height: 1; color: var(--text);
}
.comp-score-num small {
  font-size: 24px; color: var(--text-muted); font-weight: 500;
  margin-left: 4px; letter-spacing: -0.02em;
}
.comp-score-label {
  color: var(--text-soft); font-size: var(--t-h3); margin-top: var(--s-2);
}
.comp-score-bar {
  margin-top: var(--s-3); height: 6px;
  background: var(--surface-3); border-radius: 3px; overflow: hidden;
}
.comp-score-bar-fill {
  height: 100%; background: var(--success-fg); border-radius: 3px;
}
.comp-breakdown { display: flex; gap: var(--s-5); flex-wrap: wrap; }
.comp-bd-cell { display: flex; align-items: center; gap: var(--s-3); }
.comp-bd-icon {
  width: 36px; height: 36px; border-radius: var(--r-2);
  display: grid; place-items: center; flex-shrink: 0;
}
.comp-bd-icon.pass { background: var(--success-bg); color: var(--success-fg); }
.comp-bd-icon.warn { background: var(--warn-bg); color: var(--warn-fg); }
.comp-bd-icon.fail { background: var(--error-bg); color: var(--error-fg); }
.comp-bd-icon.pending { background: var(--surface-3); color: var(--text-muted); }
.comp-bd-num {
  font-family: "Inter Tight"; font-size: 22px; font-weight: 600;
  letter-spacing: -0.02em; line-height: 1;
}
.comp-bd-label {
  font-size: var(--t-mini); color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
  font-weight: 600; margin-top: 2px;
}

.rule-group {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-3); margin-bottom: var(--s-4); overflow: hidden;
}
.rule-group-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.rule-group-title {
  font-size: var(--t-h2); font-weight: 600; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: var(--s-3);
}
.rule-group-title .group-icon {
  width: 28px; height: 28px; border-radius: var(--r-2);
  background: var(--surface-3); color: var(--text-soft);
  display: grid; place-items: center; flex-shrink: 0;
}
.rule-group-summary {
  display: flex; align-items: center; gap: var(--s-3);
  font-size: var(--t-small); color: var(--text-muted);
}
.rule-group-pill {
  padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
}
.rule-group-pill.pass { background: var(--success-bg); color: var(--success-fg); }
.rule-group-pill.warn { background: var(--warn-bg); color: var(--warn-fg); }
.rule-group-pill.fail { background: var(--error-bg); color: var(--error-fg); }
.rule-group-pill.pending { background: var(--surface-3); color: var(--text-muted); }

.rule {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--border);
}
.rule:last-child { border-bottom: 0; }
.rule:hover { background: var(--surface-2); }
.rule.fail {
  background: linear-gradient(90deg, var(--error-bg) 0%, transparent 30%);
  border-left: 3px solid var(--error-fg);
}
.rule.warn {
  background: linear-gradient(90deg, var(--warn-bg) 0%, transparent 30%);
  border-left: 3px solid var(--warn-fg);
}
.rule-icon {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
}
.rule-icon.pass { background: var(--success-bg); color: var(--success-fg); }
.rule-icon.warn { background: var(--warn-bg); color: var(--warn-fg); font-weight: 700; }
.rule-icon.fail { background: var(--error-bg); color: var(--error-fg); font-weight: 700; }
.rule-icon.pending { background: var(--surface-3); color: var(--text-muted); }
.rule.pending { opacity: 0.85; }
.rule-content { flex: 1; min-width: 0; }
.rule-title { font-weight: 500; font-size: var(--t-body); line-height: 1.35; }
.rule.fail .rule-title, .rule.warn .rule-title { font-weight: 600; }
.rule-meta {
  font-size: var(--t-small); color: var(--text-muted);
  margin-top: 2px; display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap;
}
.rule-meta .pill {
  background: var(--surface-3); padding: 1px 6px; border-radius: 4px;
  font-size: 11px; color: var(--text-soft); font-weight: 500;
}
.rule-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ─── DRAWER (click-any-number) ──────────────────── */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(28, 25, 23, 0.32);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur) var(--ease); z-index: 40;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 480px; background: var(--surface);
  box-shadow: -16px 0 48px rgba(28, 25, 23, 0.12);
  transform: translateX(100%);
  transition: transform var(--dur) var(--ease);
  z-index: 50; display: flex; flex-direction: column;
  overflow-y: auto;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  padding: var(--s-5) var(--s-6); border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--s-4); position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.drawer-head-text { flex: 1; }
.drawer-eyebrow {
  font-size: var(--t-mini); font-weight: 600; color: var(--brand-accent);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px;
}
.drawer-title {
  font-size: var(--t-h1); font-weight: 600; letter-spacing: -0.02em;
}
.drawer-result {
  font-family: "Inter Tight"; font-size: 32px; font-weight: 600;
  color: var(--text); margin-top: var(--s-2);
  font-variant-numeric: tabular-nums; letter-spacing: -0.025em;
}
.drawer-body { padding: var(--s-6); }

.calc-section { margin-bottom: var(--s-6); }
.calc-section:last-child { margin-bottom: 0; }
.calc-section-label {
  font-size: var(--t-mini); font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--s-3);
}
.calc-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: var(--s-3) 0; border-bottom: 1px solid var(--border);
  font-size: var(--t-body);
}
.calc-row:last-child { border-bottom: 0; }
.calc-row-label { color: var(--text-soft); }
.calc-row-value { font-variant-numeric: tabular-nums; font-weight: 500; }
.calc-row.add .calc-row-value { color: var(--success-fg); }
.calc-row.sub .calc-row-value { color: var(--error-fg); }
.calc-row.total {
  border-top: 2px solid var(--text); border-bottom: 0;
  padding-top: var(--s-4); margin-top: var(--s-2);
}
.calc-row.total .calc-row-label { font-weight: 600; color: var(--text); }
.calc-row.total .calc-row-value { font-weight: 700; font-size: var(--t-h2); }

.calc-formula {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-2); padding: var(--s-4);
  font-family: ui-monospace, monospace;
  font-size: var(--t-small); color: var(--text-soft); line-height: 1.7;
  margin-top: var(--s-3);
}
.calc-formula .step { display: flex; justify-content: space-between; }
.calc-formula .step .lhs { color: var(--text-soft); }
.calc-formula .step .rhs { color: var(--text); font-weight: 500; }
.calc-formula .arrow { color: var(--text-faint); }

.legal-ref {
  background: var(--brand-accent-bg);
  border: 1px solid var(--brand-accent-soft);
  border-radius: var(--r-2); padding: var(--s-4);
  display: flex; gap: var(--s-3);
}
.legal-ref-icon {
  width: 28px; height: 28px; background: var(--brand-accent);
  color: #fff; border-radius: var(--r-1);
  display: grid; place-items: center; flex-shrink: 0;
  font-weight: 700; font-size: 13px;
}
.legal-ref-text { font-size: var(--t-small); color: var(--brand-accent); line-height: 1.55; }
.legal-ref-text strong { font-weight: 600; }

.meta-stamp {
  margin-top: var(--s-5); padding-top: var(--s-4);
  border-top: 1px solid var(--border);
  font-size: var(--t-mini); color: var(--text-muted);
  display: flex; justify-content: space-between;
}

/* Make any element with data-calc visually clickable */
[data-calc] {
  cursor: pointer; transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
[data-calc]:hover { color: var(--brand-accent); }
.money[data-calc] { border-bottom: 1px dashed transparent; }
.money[data-calc]:hover { border-bottom-color: var(--brand-accent); }
