/* Dental Clinic Demo — compact SaaS style (docs/08-UI-STYLE-COMPACT.md): Inter, white cards, blue accent */
:root {
  --primary: #000052;
  --primary-hover: #2A2A8C;
  --primary-text: #000052;
  --title: #000052;
  --tint-50: #EFF4FF;
  --tint-100: #DBE6FE;
  --tint-200: #BFD3FE;
  --track: #F3F6FE;
  --blue-400: #6B93F5;
  --teal: #8FD3DE; --teal-text: #0E6B78;
  --ink: #111827;
  --text-2: #374151;
  --muted: #6B7280;
  --border: #E5E7EB;
  --border-strong: #D1D5DB;
  --row-rule: #F1F2F4;
  --bg: #F7F8FA;
  --card: #FFFFFF;
  --navy: #000052;
  --accent: var(--primary);
  --accent-dark: var(--primary-hover);
  --accent-soft: var(--tint-50);
  --ok-bg: #E7F7EE; --ok-fg: #15803D;
  --warn-bg: #FEF3C7; --warn-fg: #92400E;
  --danger-bg: #FDECEC; --danger-fg: #B91C1C;
  --info-bg: var(--tint-50); --info-fg: var(--primary-text);
  --muted-bg: #F3F4F6; --muted-fg: #4B5563;
  --series-light: #93B4F8; --series-coral: #F28B82; --series-green: #5CC99B;
  --c-healthy: #FFFFFF;
  --c-caries: #FFD9B8;
  --c-filled: #D3E4F8;
  --c-crown: #BFE6EA;
  --c-rct: #E4D9F2;
  --c-missing: #E3E8E9;
  --c-extraction: #F8D0D0;
  --radius: 10px;
  --radius-sm: 8px;
  --control: 36px;
  --touch: 36px;
  --pop-shadow: 0 8px 24px rgba(17, 24, 39, 0.12);
  --font-display: 'Cinzel', Georgia, serif;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-size: 13px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
input, select, textarea, button { font-family: inherit; font-size: 13px; color: inherit; }
.num, .table td, .kpi-value, .totals { font-variant-numeric: tabular-nums; }

/* ---------- shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  flex: 0 0 220px; width: 220px; background: #fff; border-right: 1px solid var(--border); padding: 16px 12px;
  display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.brand-mark {
  width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: 0.02em;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { color: var(--muted); font-size: 11px; }
.nav-group { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 12px 10px 4px; }
.sidebar a {
  position: relative; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: var(--radius-sm);
  text-decoration: none; font-size: 13px; font-weight: 500; color: var(--text-2);
}
.sidebar a svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.sidebar a:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.sidebar a.active { background: var(--tint-50); color: var(--primary-text); }
.sidebar a.active svg { color: var(--primary); }
.sidebar a.active::before { content: ''; position: absolute; left: -12px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.sidebar-foot { margin-top: auto; padding: 12px 10px 0; color: var(--muted); font-size: 11px; border-top: 1px solid var(--border); }
.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 24px; background: #fff;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5;
}
.topbar-title { font-size: 12px; font-weight: 500; color: var(--muted); }
.topbar-date { margin-left: auto; color: var(--muted); font-size: 12px; }
.nav-toggle { display: none; }
#view { padding: 20px 24px 40px; display: flex; flex-direction: column; gap: 16px; outline: none; }

/* ---------- page parts ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.page-head h1 { font-size: 20px; font-weight: 600; color: var(--title); }
.page-head h1 a { color: inherit; }
.page-head .sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.page-head .actions, .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.card-head h2, .card-head h3 { font-size: 14px; font-weight: 600; color: var(--ink); }
.card-head a, .card-head .small { font-size: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.grid-1-2 { grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spacer { flex: 1; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi-label { font-size: 12px; color: var(--muted); }
.kpi-value { font-size: 24px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.kpi-note { font-size: 11px; color: var(--muted); }
a.kpi { text-decoration: none; color: inherit; }
a.kpi:hover { border-color: var(--tint-200); text-decoration: none; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; color: var(--text-2); }
.table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 500;
  height: 40px; padding: 0 12px; background: #fff; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 10px 12px; border-bottom: 1px solid var(--row-rule); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--tint-50); }
.table tr.clickable { cursor: pointer; }
.table td:first-child { white-space: nowrap; }
.table td:has(> .btn) { white-space: nowrap; }
.table td strong { color: var(--ink); font-weight: 600; }
.table tfoot td { font-weight: 700; color: var(--ink); border-top: 1px solid var(--border); border-bottom: 0; }
.table input, .table select { min-height: 32px; padding: 4px 8px; border: 1px solid var(--border-strong); border-radius: 6px; }
.text-right { text-align: right !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--control); padding: 0 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: #fff; color: var(--text-2);
  font-size: 13px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: var(--border-strong); background: var(--bg); color: var(--ink); text-decoration: none; }
.btn:focus-visible, .tab:focus-visible, .sidebar a:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--tint-50); border-color: transparent; color: var(--primary-text); }
.btn-danger { background: #fff; border-color: #F5C2C2; color: var(--danger-fg); }
.btn-danger:hover { background: var(--danger-bg); color: var(--danger-fg); border-color: var(--danger-fg); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label, .field > .label { font-size: 12px; font-weight: 500; color: var(--text-2); }
.field input, .field select, .field textarea, .toolbar input, .toolbar select {
  height: var(--control); padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; width: 100%; color: var(--ink);
}
.field input[type=checkbox], .field input[type=radio] { width: auto; height: auto; }
.field textarea { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .toolbar input:focus, .toolbar select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 0, 82, 0.15);
}
.field .req { color: var(--danger-fg); }
.field-error { color: var(--danger-fg); font-size: 12px; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: var(--control); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar input[type=search] {
  flex: 1 1 220px; width: auto; padding-left: 32px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 10px center;
}
.toolbar select { width: auto; }
.toolbar label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.toolbar input[type=checkbox] { width: 16px; height: 16px; padding: 0; margin: 0; accent-color: var(--primary); }

/* ---------- tabs (segmented) ---------- */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--muted-bg); border-radius: var(--radius-sm); align-self: flex-start; }
.tab {
  height: 30px; padding: 0 12px; background: transparent; border: 1px solid transparent; border-radius: 6px;
  color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer;
}
.tab:hover { color: var(--ink); }
.tab.active { background: #fff; border-color: var(--border); color: var(--ink); font-weight: 600; }

/* ---------- badges, alerts, misc ---------- */
.badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; white-space: nowrap; line-height: 1.3; }
.badge-ok { background: var(--ok-bg); color: var(--ok-fg); }
.badge-warn { background: var(--warn-bg); color: var(--warn-fg); }
.badge-danger { background: var(--danger-bg); color: var(--danger-fg); }
.badge-info { background: var(--info-bg); color: var(--info-fg); }
.badge-muted { background: var(--muted-bg); color: var(--muted-fg); }
.alert { padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid transparent; font-size: 13px; }
.alert-danger { background: var(--danger-bg); color: var(--danger-fg); border-color: #F5C2C2; }
.alert-warn { background: var(--warn-bg); color: var(--warn-fg); border-color: #FBDF94; }
.alert-info { background: var(--info-bg); color: var(--info-fg); border-color: var(--tint-200); }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.empty-state { padding: 20px 12px; text-align: center; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); font-size: 13px; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--row-rule); font-size: 13px; }
.list-plain li:last-child { border-bottom: 0; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--tint-50); color: var(--primary-text); font-weight: 600; font-size: 15px; display: flex; align-items: center; justify-content: center; flex: none; }
.patient-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.patient-head h1 { font-size: 20px; }
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; margin: 0; font-size: 13px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; color: var(--ink); }
.totals { margin-left: auto; width: min(340px, 100%); }
.totals .line { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; }
.totals .grand { border-top: 1px solid var(--ink); font-size: 15px; font-weight: 700; margin-top: 4px; padding-top: 8px; }
.print-only { display: none; }

/* ---------- modal & toast ---------- */
#modal-root { display: none; }
#modal-root.open { display: block; position: fixed; inset: 0; z-index: 50; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(17, 24, 39, 0.4); }
.modal {
  position: relative; margin: 6vh auto 0; width: min(500px, calc(100% - 32px)); max-height: 88vh; overflow: auto;
  background: #fff; border-radius: 12px; box-shadow: 0 20px 50px rgba(17, 24, 39, 0.22);
}
.modal-wide { width: min(800px, calc(100% - 32px)); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 4px; }
.modal-head h2 { font-size: 16px; font-weight: 600; }
.modal-body { padding: 12px 18px; display: flex; flex-direction: column; gap: 12px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--border); }
#toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 10px 14px; border-radius: var(--radius-sm); color: #fff; font-weight: 500; box-shadow: var(--pop-shadow); max-width: 360px; }
.toast-ok { background: var(--ink); }
.toast-error { background: var(--danger-fg); }
#print-root { display: none; }

/* ---------- dashboard widgets & mini charts ---------- */
.dash-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
.dash-grid > .stack, .dash-col { min-width: 0; }
.kpis-dash { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.kpi-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--tint-50); color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.kpi-icon svg { width: 18px; height: 18px; }
.kpi-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.delta { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 6px; line-height: 1.3; }
.delta-up { background: var(--ok-bg); color: var(--ok-fg); }
.delta-down { background: var(--danger-bg); color: var(--danger-fg); }
.delta-flat { background: var(--muted-bg); color: var(--muted-fg); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: var(--muted); margin: -4px 0 8px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.bar-chart { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; padding-top: 40px; }
.bar-axis { display: flex; flex-direction: column; justify-content: space-between; height: 160px; font-size: 11px; color: var(--muted); text-align: right; }
.bar-cols { display: flex; gap: 10px; align-items: stretch; min-width: 0; }
.bar-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.bar-track { position: relative; height: 160px; background: var(--track); border-radius: var(--radius-sm); display: flex; align-items: flex-end; }
.bar-fill { width: 100%; background: var(--tint-100); border-radius: var(--radius-sm); min-height: 2px; position: relative; }
.bar-col.top .bar-fill { background: var(--primary); }
.bar-col.top .bar-fill::after { content: ''; position: absolute; top: 5px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #fff; }
.bar-label { font-size: 11px; color: var(--text-2); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-tip {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(100% + 8px); z-index: 2; white-space: nowrap;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--pop-shadow); padding: 6px 10px; font-size: 11px; color: var(--muted);
}
.bar-tip b { display: block; color: var(--primary-text); font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.line-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.line-chart text { font-size: 10px; fill: var(--muted); font-family: inherit; }
.donut-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.donut-wrap svg { width: 150px; height: 150px; flex: none; }
.donut-wrap text { font-family: inherit; }
.donut-list { flex: 1 1 120px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-2); }
.donut-list div { display: flex; align-items: center; gap: 6px; }
.donut-list i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.donut-list b { margin-left: auto; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.progress { display: flex; flex-direction: column; gap: 10px; }
.progress-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 4px 10px; align-items: center; }
.progress-label { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-2); }
.progress-label span:last-child { color: var(--muted); font-size: 11px; white-space: nowrap; }
.progress-track { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 999px; }
.progress-row.crit .progress-fill { background: var(--danger-fg); }
.progress-pct { font-size: 12px; font-weight: 600; color: var(--primary); text-align: right; font-variant-numeric: tabular-nums; }
.progress-row.crit .progress-pct { color: var(--danger-fg); }
.staff-list li { justify-content: flex-start; }
.staff-list .avatar { width: 30px; height: 30px; font-size: 11px; }
.staff-list .staff-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.staff-list .staff-meta span { font-size: 11px; color: var(--muted); }

/* ---------- odontogram ---------- */
.odonto { overflow-x: auto; }
.odonto-inner { min-width: 560px; display: flex; flex-direction: column; gap: 14px; align-items: center; padding: 4px 0; }
.odonto-label { font-size: 11px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.odonto-arch { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.odonto-row { display: flex; gap: 4px; align-items: flex-start; }
.odonto-mid { width: 2px; align-self: stretch; margin: 0 5px; background: var(--border-strong); }
.tooth-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tooth {
  width: 30px; height: 42px; padding: 0; font-weight: 600; font-size: 11px; color: var(--ink);
  border: 1.5px solid var(--border-strong); border-radius: 8px 8px 14px 14px; background: var(--c-healthy); cursor: default;
}
.odonto-lower .tooth { border-radius: 14px 14px 8px 8px; }
.odonto.selectable .tooth { cursor: pointer; }
.odonto.selectable .tooth:hover { border-color: var(--primary); }
.tooth-code { font-size: 10px; color: var(--muted); min-height: 13px; }
.tooth.c-caries { background: var(--c-caries); border-color: #C8601A; }
.tooth.c-filled { background: var(--c-filled); border-color: #3E78B5; }
.tooth.c-crown { background: var(--c-crown); border-color: var(--teal-text); }
.tooth.c-rct { background: var(--c-rct); border-color: #7A55B0; }
.tooth.c-missing { background: var(--c-missing); color: #8A9A9F; border-style: dotted; }
.tooth.c-extraction { background: var(--c-extraction); border-color: var(--danger-fg); }
.tooth.pending { outline: 2px dashed var(--primary); outline-offset: 2px; }
.tooth.selected { box-shadow: 0 0 0 3px var(--primary); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--border-strong); display: inline-block; }
.swatch-pending { border: 2px dashed var(--primary); background: #fff; }
.cond-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cond-picker .btn { justify-content: flex-start; }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 40; transform: translateX(-100%); transition: transform 0.2s; }
  .app-shell.nav-open .sidebar { transform: translateX(0); box-shadow: 0 0 40px rgba(17, 24, 39, 0.2); }
  .nav-toggle { display: inline-flex; }
  .topbar, #view { padding-left: 16px; padding-right: 16px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .dl { grid-template-columns: 1fr; }
  .bar-cols { gap: 4px; }
}

/* ---------- print ---------- */
@media print {
  @page { margin: 12mm; }
  body { background: #fff; font-size: 12px; }
  .sidebar, .topbar, .no-print, #modal-root, #toast-root { display: none !important; }
  .print-only { display: block; }
  #view { padding: 0; }
  .card { border: 0; padding: 0; }
  body.printing .app-shell { display: none !important; }
  body.printing #print-root { display: block !important; }
  #print-root .table th, #print-root .table td { padding: 5px 6px; height: auto; }
  #print-root .table td { border-bottom: 1px solid var(--border); }
  .page-break { page-break-after: always; break-after: page; }
}
