/* PrimeLedger "Godrix" look: the default theme and the shared component styling.
   Loaded after every other stylesheet. Colours come from custom properties, so the other themes in
   themes.json (set inline on <html>) still override them; the component rules below apply to every theme. */
:root{ /* shape and spacing: every theme */
  --radius:10px;--btn-radius:8px;--bw:1px;
  --shadow:0 1px 2px rgba(15,27,45,.04),0 4px 14px rgba(15,27,45,.05);
  --nav-on:#FF6B2C;
}
/* colours: only the default theme (another theme writes its own custom properties onto <html>) */
:root:not([style*="--"]){
  --bg:#F3F5F9;--panel:#FFFFFF;--ink:#0F1B2D;--muted:#64748B;--sub:#334155;
  --line:#E2E7EF;--line-strong:#CBD3DF;--th-line:#EDF0F5;
  --head:#0B2A55;--head-fg:#E3EAF4;--side:#0B2A55;
  --accent:#2457C5;--accent-fg:#FFFFFF;
  --btn-bg:#0B2A55;--btn-fg:#FFFFFF;
  --bad:#B42318;--ok:#15803D;--err-bg:#FDECEA;--ok-bg:#E7F6EC;
  --row-hover:#F5F8FC;--row-tot:#F8FAFC;
  --d-weight:700;--d-track:-.015em;
  --font:"Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,Roboto,"Helvetica Neue",Arial,sans-serif;
}

/* ---------- shell ---------- */
#side{background:var(--head);border-right:0;padding:14px 12px 16px}
.brand{font-size:18px;padding:4px 8px 14px;color:var(--head-fg)}
#side a.nav{padding:6px 10px;border-radius:7px;font-size:13.5px;opacity:.86}
#side a.nav:hover{opacity:1;background:color-mix(in srgb,var(--head-fg) 8%,transparent)}
#side a.nav.on{opacity:1;font-weight:600;background:color-mix(in srgb,var(--head-fg) 13%,transparent)}
#side a.nav.on::before{background:var(--nav-on,var(--accent));left:-12px;width:3px}
#side .nav-gh{color:var(--head-fg);border-top-color:color-mix(in srgb,var(--head-fg) 11%,transparent);padding:10px 10px 6px;font-size:12.5px}
#side a.nav kbd{border-color:color-mix(in srgb,var(--head-fg) 25%,transparent)}
body.side-dark .brand .logo-light{display:none!important}
body.side-dark .brand .logo-dark{display:block!important}
.top{min-height:60px;padding:10px 32px;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--panel) 92%,transparent);backdrop-filter:saturate(1.4) blur(8px)}
.top .tb-back{border-radius:8px}
#who .av{border-radius:50%}
main{padding:28px 32px 56px;max-width:1360px}

/* ---------- page header ---------- */
main>h2,main>div>h2:first-child,.ihead h2{font-size:26px;letter-spacing:-.02em;line-height:1.2;margin:0 0 6px}
h2 small{font-size:13px;font-weight:500;color:var(--muted)}
.sub-title{font-size:14.5px;color:var(--muted);margin:0 0 22px;max-width:860px}
h3{font-weight:650;letter-spacing:-.005em}

/* ---------- surfaces ---------- */
.card,.co,.kpi,.stat,.menu,.toolbar{border-color:var(--line);box-shadow:var(--shadow);border-radius:var(--radius)}
.card{padding:20px 22px;margin-bottom:18px}
.card>h3:first-child{font-size:15.5px;margin-bottom:12px}
.co{padding:18px;gap:8px}
.co:hover{border-color:color-mix(in srgb,var(--accent) 55%,var(--line));box-shadow:0 2px 4px rgba(15,27,45,.05),0 10px 24px rgba(15,27,45,.07)}
.toolbar{padding:14px 16px;gap:14px;margin:4px 0 18px}
.quick{gap:10px;margin:2px 0 22px}
.dash,.two{gap:18px}

/* ---------- KPI tiles ---------- */
.kpis,.dkpis{gap:16px;margin:4px 0 22px}
.kpi{padding:16px 18px 18px;position:relative}
.kpi span{font-size:12.5px;font-weight:600;color:var(--muted);letter-spacing:.01em}
.kpi b{font-size:25px;font-weight:700;letter-spacing:-.02em;margin-top:6px}
.kpi small{display:block;margin-top:2px}
.stat b{font-size:24px;letter-spacing:-.02em}

/* ---------- buttons ---------- */
.btn,button.btn,a.btn{min-height:36px;padding:8px 16px;border-radius:var(--btn-radius);font-weight:600;letter-spacing:.005em;box-shadow:0 1px 2px rgba(15,27,45,.08)}
.btn:hover{filter:none}
.btn:focus-visible,.btn.alt:focus-visible{outline:3px solid color-mix(in srgb,var(--accent) 35%,transparent);outline-offset:1px}
.btn.alt,.btn.ghost{background:var(--panel);color:var(--ink);border-color:var(--line-strong);box-shadow:0 1px 2px rgba(15,27,45,.04)}
.btn.alt:hover,.btn.ghost:hover{background:var(--row-hover);border-color:color-mix(in srgb,var(--ink) 25%,var(--line-strong))}
.btn.del{background:var(--bad);border-color:var(--bad);color:#fff}
.btn.del:hover{background:color-mix(in srgb,var(--bad) 85%,#000)}
.btn.sm{min-height:30px;padding:5px 11px;font-size:13px}
.btn[disabled]{opacity:.55;cursor:not-allowed}

/* ---------- forms ---------- */
label{font-size:13px;font-weight:600;color:var(--sub);margin:14px 0 6px}
input,select,textarea{min-height:38px;padding:8px 11px;border-radius:var(--btn-radius);border-color:var(--line-strong);background:var(--panel)}
textarea{min-height:auto}
input[type=checkbox],input[type=radio]{min-height:auto;accent-color:var(--accent)}
input:hover,select:hover,textarea:hover{border-color:color-mix(in srgb,var(--ink) 30%,var(--line-strong))}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 18%,transparent)}
.top select{min-height:34px}

/* ---------- tables ---------- */
table{border-color:var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
th{background:var(--row-tot);color:var(--muted);font-size:12px;font-weight:650;letter-spacing:.02em;padding:10px 14px;border-bottom:1px solid var(--line);top:60px}
td{padding:10px 14px;border-bottom-color:var(--th-line)}
tbody tr:hover>td{background:var(--row-hover)}
tr.tot td,tfoot td{font-weight:700;background:var(--row-tot)}
td.n,th.n{font-variant-numeric:tabular-nums}
.card table,.dash .card table{box-shadow:none}

/* ---------- messages, chips, tabs ---------- */
.err,.okmsg{border-radius:var(--btn-radius);border-left-width:4px;padding:11px 14px}
.pill,.dst,.bstate{border-radius:99px}
.tabs{border-radius:var(--btn-radius);padding:3px}
.tabs a{border-radius:6px}
.tabs a.on{box-shadow:0 1px 3px rgba(15,27,45,.1)}
.empty{padding:48px 20px}
.empty b{font-size:17px}
details>summary{color:var(--accent)}
a{text-underline-offset:2px}

/* ---------- dialogs ---------- */
.bmodal{background:rgba(11,42,85,.38);backdrop-filter:blur(2px)}
.bm-card{border-radius:14px;box-shadow:0 24px 64px rgba(11,42,85,.28);padding:24px 26px}

/* ---------- small screens ---------- */
@media(max-width:860px){main{padding:18px 16px 44px}.top{padding:8px 14px}main>h2,.ihead h2{font-size:22px}}

/* ---------- charts ---------- */
.chart .b.e,.legend i.e{background:var(--nav-on,#FF6B2C)}
.chart .b{border-radius:3px 3px 0 0}

/* sidebar colour runs the full height of long pages */
@media(min-width:861px){.app{background:linear-gradient(90deg,var(--head) 0,var(--head) var(--nav-w),transparent var(--nav-w))}}
