/* Parasvision design system – calm, data-dense, consistent. */
:root {
    --bg: #f4f6f7; --panel: #ffffff; --ink: #14212b; --ink-2: #3a4a57; --muted: #66768a; --line: #e2e7eb; --line-2: #cfd7de;
    --accent: #0f766e; --accent-2: #0d9488; --accent-ink: #ffffff; --accent-soft: #e6f4f2; --accent-ring: rgba(13,148,136,.28);
    --danger: #b42318; --danger-soft: #fef3f2; --ok: #067647; --ok-soft: #ecfdf3; --warn: #a15c07; --warn-soft: #fffaeb; --info-soft: #eff8ff;
    --side: #0e1d1b; --side-2: #142824; --side-ink: #b9cbc6; --side-ink-strong: #ffffff; --side-active: rgba(45,212,191,.14);
    --head: #f2f5f7; --group: #f7f9fa;
    --radius: 10px; --radius-sm: 7px;
    --chev: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%20fill=%27none%27%20stroke=%27%2366768a%27%20stroke-width=%272%27%20stroke-linecap=%27round%27%20stroke-linejoin=%27round%27%3E%3Cpath%20d=%27M6%209l6%206%206-6%27/%3E%3C/svg%3E");
    --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
    --shadow-lg: 0 12px 32px rgba(16,24,40,.12);
    --font: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; font-weight: 650; letter-spacing: -.01em; margin: 0 0 14px; }
h2 { font-size: 15px; font-weight: 650; margin: 18px 0 8px; }
h1:focus { outline: none; }
.ico { flex: none; vertical-align: -3px; }
.small { font-size: 12px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.main { min-width: 0; display: flex; flex-direction: column; }
.content { padding: 22px 28px 48px; max-width: 1600px; width: 100%; }

/* ---------- sidebar ---------- */
.side { background: var(--side); color: var(--side-ink); padding: 14px 10px 40px; overflow-y: auto; max-height: 100vh; position: sticky; top: 0; scrollbar-width: thin; scrollbar-color: #2a3f3b transparent; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; color: var(--side-ink-strong); font-weight: 700; font-size: 17px; letter-spacing: .2px; }
.brand:hover { text-decoration: none; }
.brand small { display: block; font-weight: 400; font-size: 11.5px; color: var(--side-ink); letter-spacing: 0; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 18px; color: #fff; background: linear-gradient(135deg, #14b8a6, #0f766e); box-shadow: 0 4px 12px rgba(20,184,166,.35); }
.nav-section { padding: 16px 10px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase; color: #6f8a84; }
.side a, .side summary { display: flex; align-items: center; gap: 10px; border-radius: 8px; color: var(--side-ink); }
.side a.nav-top, .side summary { padding: 8px 10px; font-weight: 600; font-size: 13.5px; }
.side details { margin: 1px 0; }
.side summary { cursor: pointer; list-style: none; user-select: none; }
.side summary::-webkit-details-marker { display: none; }
.side summary::after { content: ""; margin-left: auto; width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); opacity: .55; transition: transform .15s; }
.side details[open] > summary::after { transform: rotate(45deg); }
.side summary:hover, .side a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.side details > a { padding: 6px 10px 6px 38px; font-size: 13px; }
.side details > a.active, .side a.nav-top.active { background: var(--side-active); color: #fff; box-shadow: inset 3px 0 0 #2dd4bf; }
.side .sub { padding: 10px 10px 3px 38px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px; color: #6f8a84; font-weight: 700; }
.side details.folder { margin-left: 16px; }
.side details.folder > summary { font-weight: 500; font-size: 13px; padding: 6px 10px; }
.side details.folder > a { padding-left: 34px; font-size: 12.5px; }
.side .count { margin-left: auto; font-size: 11px; background: rgba(255,255,255,.08); color: var(--side-ink); border-radius: 10px; padding: 0 7px; font-weight: 600; }
.side details.folder > summary::after { margin-left: 8px; }
.side form { margin: 0; }
.side .navbtn { display: block; width: 100%; text-align: left; background: none; border: none; color: var(--side-ink); font: inherit; font-size: 13px; padding: 6px 10px 6px 38px; cursor: pointer; border-radius: 8px; }
.side .navbtn:hover { background: rgba(255,255,255,.06); color: #fff; }

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; gap: 12px; padding: 10px 28px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; flex-wrap: wrap; }
.top .spacer { flex: 1; }
.ctx-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-2); font-size: 13px; }
.ctx-chip b { color: var(--ink); font-weight: 600; }
.ctx-chip:hover { border-color: var(--line-2); text-decoration: none; background: var(--group); }
.user-menu { position: relative; }
.user-menu > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 3px 10px 3px 3px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; }
.user-menu > summary::-webkit-details-marker { display: none; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #14b8a6, #0f766e); color: #fff; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; }
.menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: 12.5px; color: var(--muted); }
.menu .who b { display: block; color: var(--ink); font-size: 14px; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; border: none; background: none; color: var(--ink); font: inherit; font-size: 13.5px; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--group); text-decoration: none; }
.menu form { margin: 0; }

/* ---------- page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 2px 0 4px; }
.page-head p { margin: 0; }
.crumbs { display: flex; gap: 6px; font-size: 12.5px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }

/* ---------- panels, cards & forms ---------- */
.panel, .card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 12px; font-weight: 650; margin-bottom: 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 16px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label, .lbl { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.field.wide { grid-column: span 2; }
.field.full { grid-column: 1 / -1; }
input, select, textarea { font: inherit; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; color: var(--ink); min-width: 0; transition: border-color .12s, box-shadow .12s; }
input:hover, select:hover, textarea:hover { border-color: #b4c0ca; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-ring); }
input[type=checkbox] { width: 16px; height: 16px; vertical-align: middle; accent-color: var(--accent); padding: 0; }
input.amt { text-align: right; font-variant-numeric: tabular-nums; }
.check { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* one button height everywhere: 36px (small 30px) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; font: inherit; font-size: 13.5px; font-weight: 600; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap; box-shadow: 0 1px 2px rgba(16,24,40,.05); transition: background .12s, border-color .12s; }
.btn:hover { background: var(--group); border-color: #b4c0ca; text-decoration: none; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: #0b5f59; }
.btn.danger { color: var(--danger); border-color: #f4c7c3; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: #eaeef1; }
.btn.small, .btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: default; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }

.msg { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; border: 1px solid; }
.msg.err { background: var(--danger-soft); color: var(--danger); border-color: #fecdca; }
.msg.ok { background: var(--ok-soft); color: var(--ok); border-color: #abefc6; }
.msg.warn { background: var(--warn-soft); color: var(--warn); border-color: #fedf89; }
.muted { color: var(--muted); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; }
.pill.grey { background: #eef1f4; color: var(--ink-2); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.err { background: var(--danger-soft); color: var(--danger); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.empty { padding: 36px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed var(--line-2); border-radius: var(--radius); }

/* ---------- tables ---------- */
table.data { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--panel); }
table.data th { text-align: left; background: var(--head); font-size: 12px; font-weight: 650; color: var(--ink-2); padding: 8px 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; }
table.data td { padding: 7px 10px; border-bottom: 1px solid #eef1f4; vertical-align: top; }
table.data tr:hover td { background: #f8fbfa; }
table.data td.num, table.data th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.data tr.sel td { background: var(--accent-soft); }
table.edit td { padding: 3px 4px; }
table.edit input, table.edit select { width: 100%; }
.scroll { overflow: auto; max-height: 70vh; border: 1px solid var(--line); border-radius: var(--radius-sm); }

/* ---------- reports hub ---------- */
.search-box { position: relative; width: min(360px, 100%); }
.search-box input { width: 100%; padding-left: 34px; height: 38px; border-radius: 999px; }
.search-box .ico { position: absolute; left: 12px; top: 11px; color: var(--muted); }
.report-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.folder-card { margin: 0; padding: 0; overflow: hidden; }
.folder-card .card-head { padding: 14px 16px; margin: 0; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fff, #fafcfc); }
.folder-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); flex: none; }
.folder-title { color: var(--ink); font-size: 15px; }
.folder-card .count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); background: #eef1f4; border-radius: 999px; padding: 1px 9px; }
.report-list { list-style: none; margin: 0; padding: 6px; }
.report-list li { display: flex; align-items: center; border-radius: 7px; }
.report-list li:hover { background: var(--group); }
.report-list li a { flex: 1; padding: 6px 10px; color: var(--ink); }
.report-list li a:hover { color: var(--accent); text-decoration: none; }
.fav { border: none; background: none; color: #c3ccd4; cursor: pointer; padding: 4px 8px; opacity: 0; }
.report-list li:hover .fav, .fav.on { opacity: 1; }
.fav.on { color: #f59e0b; }
.fav.on .ico { fill: #fbbf24; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13px; }
.chip:hover { text-decoration: none; background: #d5ece8; }

/* ---------- dashboard ---------- */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.hello h1 { margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.kpi .k { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi .k .ico { color: var(--accent); }
.kpi .v { font-size: 23px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 12px; color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
.dash-grid > * { min-width: 0; }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.quick a { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); font-weight: 600; font-size: 13px; background: #fff; }
.quick a:hover { border-color: var(--accent-2); background: var(--accent-soft); text-decoration: none; }
.quick a .ico { color: var(--accent); }
.bar { background: #eef1f4; border-radius: 99px; height: 8px; overflow: hidden; }
.bar > div { height: 8px; border-radius: 99px; background: var(--accent-2); }
.bar > div.warn { background: #f59e0b; }
.bar > div.over { background: var(--danger); }
.alerts { list-style: none; margin: 0; padding: 0; }
.alerts li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.alerts li:last-child { border: none; }
.alerts .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--accent-2); flex: none; }
.alerts .dot.red { background: var(--danger); }
.alerts .dot.amber { background: #f59e0b; }
.chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.chart-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--c); }

/* ---------- reports: the printed document follows the Departments Crystal designs ---------- */
/* Arial, left-aligned header (company / Branch : … / title + period on one line), boxed grid, bold headings, bold-italic totals. */
.report { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow); color: #000; font-family: Arial, "Liberation Sans", Helvetica, sans-serif; }
.report .rh { text-align: left; margin-bottom: 10px; }
.report .rh .rh-company { font-size: 19px; font-weight: 400; color: #000; margin-bottom: 2px; }
.report .rh .rh-line { font-size: 12.5px; color: #000; }
.report .rh .rh-pair { margin-right: 26px; }
.report .rh .rh-pair b { margin-left: 2px; }
.report .rh .rh-title { display: flex; align-items: baseline; gap: 28px; flex-wrap: wrap; margin: 12px 0 6px; }
.report .rh h2 { margin: 0; font-size: 16px; font-weight: 700; color: #000; }
.report td { white-space: pre-line; }
.report .scroll { overflow: visible; }
.report table { width: 100%; border-collapse: collapse; font-size: 12px; font-family: inherit; }
.report th { background: #fff; color: #000; padding: 4px 6px; text-align: left; font-weight: 700; border: 1px solid #000; position: sticky; top: 57px; z-index: 2; }
.report th.num, .report td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.report td { padding: 2px 6px; border: 1px solid #000; vertical-align: top; color: #000; }
.report tr.k-Heading td { font-weight: 700; padding-top: 4px; background: #fff; }
.report tr.k-Group td { font-weight: 700; }
.report tr.k-Subtotal td { font-weight: 700; font-style: italic; }
.report tr.k-Total td { font-weight: 700; font-style: italic; border-top: 1.5px solid #000; border-bottom: 1.5px solid #000; }
.report tr.k-Blank td { height: 8px; border: none; }
.report td.drill { cursor: pointer; }
.report td.drill:hover { text-decoration: underline; color: var(--accent); }
.report .notes { margin-top: 10px; color: #222; font-style: italic; font-size: 12px; }
.signatures { display: flex; gap: 28px; margin-top: 28px; page-break-inside: avoid; break-inside: avoid; }
.signatures .sig { flex: 1; text-align: center; font-size: 13px; min-width: 0; }
.signatures .sig-space { height: 44px; border-bottom: 1px solid #444; margin-bottom: 6px; }
.signatures .sig-name { font-weight: 600; min-height: 18px; }
.signatures .sig-caption { font-weight: 700; }
.signatures .sig-date { color: var(--muted); font-size: 12px; margin-top: 2px; }
.printed-info { margin-top: 14px; font-size: 11px; color: var(--muted); text-align: right; font-style: italic; }
@media print { .signatures { margin-top: 32px; } .page-break { page-break-after: always; break-after: page; } .page-break:last-child { page-break-after: auto; break-after: auto; } }
.page-break { margin-bottom: 18px; }
.catalog { columns: 3 300px; column-gap: 24px; }
.catalog section { break-inside: avoid; margin-bottom: 16px; }
.catalog h2 { margin-top: 0; }
.catalog a { display: block; padding: 2px 0; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(1200px 600px at 10% 0%, #ccfbf1 0%, transparent 60%), radial-gradient(900px 500px at 100% 100%, #e0f2fe 0%, transparent 60%), #f4f6f7; }
.login { width: 380px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 30px; box-shadow: var(--shadow-lg); }
.login h1 { font-size: 26px; letter-spacing: -.02em; margin-bottom: 2px; color: var(--ink); }
.login .field { margin-bottom: 14px; }
.login .btn { width: 100%; height: 40px; }

/* legacy card grid (other pages) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 14px; }
.cards .card { margin: 0; padding: 12px 14px; }
.card .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.card .v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }

#blazor-error-ui { background: #fffaeb; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none; left: 0; padding: .6rem 1.25rem .7rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.menu-btn, .scrim { display: none; }
@media (max-width: 900px) {
    .shell { grid-template-columns: 1fr; }
    /* the menu slides in from the left */
    .side { position: fixed; top: 0; left: 0; bottom: 0; width: 280px; max-height: none; z-index: 60; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.25); }
    .shell.menu-open .side { transform: none; }
    .shell.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 55; }
    .menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); cursor: pointer; }
    .top { gap: 8px; flex-wrap: wrap; position: sticky; top: 0; z-index: 40; }
    .ctx-chip { padding: 4px 9px; font-size: 12px; }
    .user-menu summary { font-size: 0; } .user-menu summary .avatar { font-size: 13px; }
    .grid { grid-template-columns: 1fr 1fr; }
    .field.full, .field.wide { grid-column: 1 / -1; }
    .page-head { flex-direction: column; align-items: stretch; gap: 10px; }
    .actions { flex-wrap: wrap; }
    .kpis { grid-template-columns: 1fr 1fr; }
    .scroll, .report .scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table.data th { position: static; }
    h1 { font-size: 21px; }
    .field.wide { grid-column: auto; }
    .content { padding: 16px; }
    .top { padding: 10px 16px; }
    }

@media print {
    .side, .top, .no-print, .filters { display: none !important; }
    .shell, .main { display: block; min-height: 0 !important; }
    html, body, .main, .content { background: #fff !important; }
    .signatures { margin-top: 22px; }
    .printed-info { margin-top: 6px; break-before: avoid; }
    .content { padding: 0; max-width: none; }
    .report { border: none; padding: 0; box-shadow: none; border-radius: 0; }
    .report th { position: static; }
    .report { font-size: 11px; }
    .scroll { max-height: none; overflow: visible; border: none; }
    body { background: #fff; font-size: 11px; }
    .report thead { display: table-header-group; } /* column captions repeat on every printed page, as in Departments */
    .report tr { break-inside: avoid; }
    .report table { font-size: 10.5px; }
    .report.landscape table { font-size: 9.5px; }
}

/* ---------- tabs, status chips ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 4px 0 14px; flex-wrap: wrap; }
.tabs button, .tabs a { border: 0; background: none; padding: 9px 14px; font: inherit; font-weight: 600; color: var(--ink-2); border-bottom: 2px solid transparent; cursor: pointer; }
.tabs button.active, .tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.chip.warn { background: #fff4e5; color: #9a5b00; }
.chip.ok { background: #e7f6ee; color: #1d7a45; }
.chip.bad { background: #fdecec; color: #b42318; }
.chip.grey { background: var(--group); color: var(--ink-2); }
table.data tr.muted td { color: var(--ink-3, #8a94a0); }
.tabs a:hover { text-decoration: none; color: var(--accent); }
@media (max-width: 520px) {
    .grid { grid-template-columns: 1fr; }
    .kpis { grid-template-columns: 1fr; }
    .ctx-chip b { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
    .tabs { overflow-x: auto; flex-wrap: nowrap; } .tabs a, .tabs button { white-space: nowrap; }
    .btn { height: 40px; }
}
.report.annual h2 { font-size: 17px; color: var(--accent); border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-top: 22px; }
@media print { .report.annual h2 { break-after: avoid; } .report.annual table { break-inside: auto; } }


/* ---------- search box & command palette (Ctrl+K) ---------- */
.gsearch { display: flex; align-items: center; gap: 10px; width: min(440px, 42vw); height: 38px; padding: 0 8px 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--group); color: var(--muted); font: inherit; font-size: 13.5px; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.gsearch:hover { background: #fff; border-color: var(--line-2); box-shadow: var(--shadow); }
.gsearch:focus-visible { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-ring); }
.gsearch .ph { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gsearch kbd, .cmdk kbd { font: 600 11px var(--font); color: var(--ink-2); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; background: #fff; }
.cmdk-backdrop { position: fixed; inset: 0; background: rgba(15,23,30,.42); backdrop-filter: blur(3px); z-index: 900; animation: cmdk-fade .15s ease; }
.cmdk { position: fixed; z-index: 901; top: 9vh; left: 50%; transform: translateX(-50%); width: min(640px, calc(100vw - 32px)); max-height: 76vh; display: flex; flex-direction: column; background: #fff; border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 24px 64px rgba(15,23,30,.28), 0 2px 6px rgba(15,23,30,.08); overflow: hidden; animation: cmdk-in .18s cubic-bezier(.2,.8,.3,1); }
.cmdk-input { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.cmdk-input input { flex: 1; border: 0; padding: 4px 0; font-size: 16px; background: transparent; box-shadow: none !important; color: var(--ink); }
.cmdk-input input::placeholder { color: #8a97a6; }
.cmdk-input kbd { cursor: pointer; }
.cmdk-list { overflow-y: auto; padding: 6px 8px 10px; scrollbar-width: thin; }
.cmdk-grp { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 12px 6px; }
.cmdk-item { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-size: 14.5px; }
.cmdk-item .ico { color: var(--accent); flex: none; }
.cmdk-item.act .ico { color: #c2850c; }
.cmdk-item .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-item .g { font-size: 12px; color: var(--muted); white-space: nowrap; }
.cmdk-item .go { opacity: 0; color: var(--muted); display: flex; transition: opacity .12s; }
.cmdk-item:hover { text-decoration: none; }
.cmdk-item.hi { background: var(--accent-soft); color: var(--ink); }
.cmdk-item.hi .go { opacity: 1; color: var(--accent); }
.cmdk-none { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 20px; color: var(--muted); text-align: center; }
.cmdk-none .ico { color: var(--line-2); }
.cmdk-none div { color: var(--ink-2); font-weight: 600; }
.cmdk-foot { display: flex; gap: 18px; padding: 9px 18px; border-top: 1px solid var(--line); background: var(--group); font-size: 12px; color: var(--muted); }
.cmdk-foot kbd { margin-right: 3px; padding: 0 5px; }
@keyframes cmdk-in { from { opacity: 0; transform: translate(-50%, -8px) scale(.98); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes cmdk-fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 640px) { .gsearch { width: auto; flex: 1; } .gsearch kbd { display: none; } .cmdk { top: 12px; max-height: calc(100vh - 24px); } .cmdk-foot { display: none; } }

/* ---------- form controls: float-label outline fields with an icon (wwwroot/app.js marks the fields) ---------- */
.field[data-fl] { position: relative; gap: 0; margin-top: 6px; }
.field[data-fl] > :is(input, select, textarea) { width: 100%; box-sizing: border-box; height: 44px; padding: 10px 14px 9px 40px; border: 1px solid var(--line-2); border-radius: 11px; background-color: #fff; font-size: 14px; transition: border-color .15s, box-shadow .15s, background-color .15s; }
.field[data-fl] > select { padding-right: 34px; }
.field[data-fl] > textarea { height: auto; min-height: 88px; padding-top: 13px; resize: vertical; line-height: 1.45; }
.field[data-fl] > :is(input, select, textarea):hover { border-color: #a9b6c2; }
.field[data-fl] > :is(input, select, textarea):focus { border-color: var(--accent-2); box-shadow: 0 0 0 4px var(--accent-ring); }
.field[data-fl] > :is(input, select, textarea):disabled { background-color: var(--group); color: var(--muted); cursor: not-allowed; }
.field[data-fl] > label { position: absolute; z-index: 2; left: 11px; top: -8px; max-width: calc(100% - 24px); padding: 0 5px; line-height: 16px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; border-radius: 4px; background: linear-gradient(to bottom, transparent 45%, #fff 45%); transition: top .16s ease, left .16s ease, font-size .16s ease, color .16s ease; }
.field[data-fl]:has(> :disabled) > label { background: linear-gradient(to bottom, transparent 45%, var(--group) 45%); }
.field[data-fl]:has(> :is(input, textarea)[data-ph]:placeholder-shown:not(:focus)) > label { top: 14px; left: 35px; font-size: 14px; font-weight: 400; color: #8391a0; background: transparent; }
.field[data-fl]:focus-within > label { color: var(--accent); }
.field[data-fl]::before { content: ""; position: absolute; z-index: 2; left: 13px; top: 13px; width: 18px; height: 18px; background: #8391a0; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; pointer-events: none; transition: background .15s; }
.field[data-fl]:focus-within::before { background: var(--accent); }
.field[data-fl] > input.amt { text-align: right; }
.field[data-fl] > :is(small, .muted, .hint) { margin-top: 5px; padding-left: 4px; font-size: 12px; }
.field[data-fl] > input::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
/* type-ahead boxes (input + datalist): our chevron instead of the browser's triangle */
input[list] { background-image: var(--chev); background-repeat: no-repeat; background-position: right 11px center; background-size: 16px; padding-right: 34px; }
input[list]::-webkit-calendar-picker-indicator, .field[data-fl] > input[list]::-webkit-calendar-picker-indicator { opacity: 0; cursor: pointer; }
.field[data-ico="calendar"] { --ico: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Crect x=%274%27 y=%275%27 width=%2716%27 height=%2715%27 rx=%272%27/%3E%3Cpath d=%27M8 3v4M16 3v4M4 10h16%27/%3E%3Cpath d=%27M8 14h2M12 14h2M8 17h2%27/%3E%3C/svg%3E"); }
.field[data-ico="mail"] { --ico: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Crect x=%273%27 y=%275%27 width=%2718%27 height=%2714%27 rx=%272%27/%3E%3Cpath d=%27M3 7l9 6 9-6%27/%3E%3C/svg%3E"); }
.field[data-ico="phone"] { --ico: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M5 4h4l2 5-2.5 1.5a11 11 0 0 0 5 5L15 13l5 2v4a2 2 0 0 1-2 2A16 16 0 0 1 3 6a2 2 0 0 1 2-2%27/%3E%3C/svg%3E"); }
.field[data-ico="lock"] { --ico: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Crect x=%275%27 y=%2711%27 width=%2714%27 height=%2710%27 rx=%272%27/%3E%3Cpath d=%27M8 11V7a4 4 0 0 1 8 0v4%27/%3E%3Cpath d=%27M12 15v2%27/%3E%3C/svg%3E"); }
.field[data-ico="user"] { --ico: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Ccircle cx=%2712%27 cy=%278%27 r=%274%27/%3E%3Cpath d=%27M4 21c0-4.4 3.6-8 8-8s8 3.6 8 8%27/%3E%3C/svg%3E"); }
.field[data-ico="hash"] { --ico: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M5 9h14M5 15h14M10 4L8 20M16 4l-2 16%27/%3E%3C/svg%3E"); }
.field[data-ico="rupee"] { --ico: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M6 4h12M6 8h12M6 4h3a4 4 0 0 1 0 8H6l8 8%27/%3E%3C/svg%3E"); }
.field[data-ico="note"] { --ico: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M5 4h14v12l-4 4H5z%27/%3E%3Cpath d=%27M15 20v-4h4M8 8h8M8 12h6%27/%3E%3C/svg%3E"); }
.field[data-ico="pin"] { --ico: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M12 21s-7-6.2-7-11a7 7 0 0 1 14 0c0 4.8-7 11-7 11z%27/%3E%3Ccircle cx=%2712%27 cy=%2710%27 r=%272.5%27/%3E%3C/svg%3E"); }
.field[data-ico="id"] { --ico: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Crect x=%273%27 y=%275%27 width=%2718%27 height=%2714%27 rx=%272%27/%3E%3Ccircle cx=%278.5%27 cy=%2711%27 r=%272%27/%3E%3Cpath d=%27M5.5 16c.6-1.5 1.7-2.2 3-2.2s2.4.7 3 2.2M14 9h4M14 13h4%27/%3E%3C/svg%3E"); }
.field[data-ico="pencil"] { --ico: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M4 20h4L19 9l-4-4L4 16z%27/%3E%3Cpath d=%27M13 7l4 4%27/%3E%3C/svg%3E"); }
.field[data-ico="search"] { --ico: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Ccircle cx=%2711%27 cy=%2711%27 r=%276%27/%3E%3Cpath d=%27M20 20l-4.5-4.5%27/%3E%3C/svg%3E"); }
.field[data-ico="list"] { --ico: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M9 6h11M9 12h11M9 18h11%27/%3E%3Cpath d=%27M4 6h1M4 12h1M4 18h1%27/%3E%3C/svg%3E"); }
.field[data-ico="book"] { --ico: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M4 5a2 2 0 0 1 2-2h13v16H6a2 2 0 0 0-2 2z%27/%3E%3Cpath d=%27M4 19V5M19 19v2H6%27/%3E%3C/svg%3E"); }
.field[data-ico="bank"] { --ico: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M3 9l9-5 9 5%27/%3E%3Cpath d=%27M5 10v8M9 10v8M15 10v8M19 10v8M3 20h18%27/%3E%3C/svg%3E"); }
.field[data-ico="folder"] { --ico: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M3 6a1 1 0 0 1 1-1h5l2 2h9a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z%27/%3E%3C/svg%3E"); }
.field[data-ico="handshake"] { --ico: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M3 12l4-4 4 2 3-2 7 4%27/%3E%3Cpath d=%27M7 8l-4 4 6 6 2-2%27/%3E%3Cpath d=%27M14 8l4 4-6 6-2-2%27/%3E%3C/svg%3E"); }
.field[data-ico="building"] { --ico: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M4 21V5l8-2v18M12 7l8 2v12M4 21h16%27/%3E%3Cpath d=%27M8 8h1M8 12h1M8 16h1M15 12h1M15 16h1%27/%3E%3C/svg%3E"); }
.field[data-ico="tag"] { --ico: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M3 12V4h8l10 10-8 8z%27/%3E%3Ccircle cx=%277.5%27 cy=%277.5%27 r=%271.2%27/%3E%3C/svg%3E"); }
.field[data-ico="globe"] { --ico: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Ccircle cx=%2712%27 cy=%2712%27 r=%279%27/%3E%3Cpath d=%27M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18%27/%3E%3C/svg%3E"); }
.field[data-ico="clock"] { --ico: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Ccircle cx=%2712%27 cy=%2712%27 r=%279%27/%3E%3Cpath d=%27M12 7v5l3 2%27/%3E%3C/svg%3E"); }
.field[data-ico="heart"] { --ico: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z%27/%3E%3C/svg%3E"); }
.field[data-ico="box"] { --ico: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M12 3l8 4v10l-8 4-8-4V7z%27/%3E%3Cpath d=%27M4 7l8 4 8-4M12 11v10%27/%3E%3C/svg%3E"); }

/* ---------- dropdowns ---------- */
select:not([multiple]):not([size]) { appearance: none; -webkit-appearance: none; background-image: var(--chev); background-repeat: no-repeat; background-position: right 11px center; background-size: 16px; padding-right: 34px; cursor: pointer; }
@supports (appearance: base-select) {
    /* browsers with customisable selects (Edge / Chrome 135+, both desktop apps): a styled list instead of the plain system one */
    select:not([multiple]):not([size]), select:not([multiple]):not([size])::picker(select) { appearance: base-select; }
    select:not([multiple]):not([size]) { background-image: none; display: inline-flex; align-items: center; }
    .field[data-fl] > select { display: flex; }
    select::picker-icon { content: ""; width: 16px; height: 16px; margin-left: auto; background: var(--chev) center / 16px no-repeat; transition: rotate .2s ease; }
    select:open::picker-icon { rotate: 180deg; }
    select:not([multiple]):not([size])::picker(select) { border: 1px solid var(--line); border-radius: 12px; padding: 6px; margin-block: 6px; background: #fff; box-shadow: 0 18px 44px rgba(15,23,30,.18), 0 2px 6px rgba(15,23,30,.06); max-height: min(360px, 55vh); overflow-y: auto; scrollbar-width: thin; }
    select option { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
    select option:hover, select option:focus-visible { background: var(--accent-soft); color: var(--ink); outline: none; }
    select option:checked { color: var(--accent); font-weight: 600; background: #f1f8f7; }
    select option::checkmark { order: 1; margin-left: auto; color: var(--accent); }
    select option:disabled { color: #b1bcc6; cursor: default; }
    select optgroup { font-weight: 700; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 6px 2px; }
}
