/* Copyright (c) 2026 MYTH TECHNOLOGIES. All rights reserved. */
body.treasury { --treasury-tone:#159b87; margin:0; display:flex; min-height:100vh; background:var(--bg); color:var(--text); font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif; font-size:14px; }
html[data-theme="light"] body.treasury { --treasury-tone:#087563; }
.treasury button.primary { background:#137f70; border-color:#137f70; color:#fff; }
* { box-sizing:border-box; } button,input,select { font:inherit; } button,a,input,select,summary { outline-offset:4px; } button { cursor:pointer; } button:disabled { cursor:wait; opacity:.5; }
.skip-link { position:fixed; top:-60px; left:20px; z-index:50; padding:10px; background:var(--panel); color:var(--text); }.skip-link:focus { top:10px; }
.sidebar { width:238px; flex:none; display:flex; flex-direction:column; padding:32px 20px 22px; border-right:1px solid var(--border); background:var(--panel); min-height:100vh; position:sticky; top:0; height:100vh; }
.treasury-brand { display:flex; gap:12px; align-items:center; text-decoration:none; color:var(--text); padding:0 8px; }.treasury-brand img { width:39px; height:39px; }.treasury-brand span { font-size:11px; letter-spacing:.13em; }.treasury-brand strong { display:block; font-size:19px; letter-spacing:-.02em; margin-top:2px; font-weight:650; }
.nav-caption { font-size:9px; color:var(--muted); letter-spacing:.14em; margin:47px 12px 14px; font-weight:700; }.sidebar nav { display:grid; gap:7px; }.sidebar nav button { display:flex; gap:13px; align-items:center; text-align:left; border:0; padding:13px 14px; border-radius:9px; color:var(--muted); background:transparent; font-size:13px; }.sidebar nav button span { font-size:20px; width:22px; text-align:center; line-height:1; }.sidebar nav button:hover { background:var(--panel-2); color:var(--text); }.sidebar nav button[aria-current="page"] { background:color-mix(in srgb,#159b87 12%,var(--panel)); color:var(--text); box-shadow:inset 3px 0 #159b87; font-weight:650; }
.sidebar-bottom { margin-top:auto; padding:30px 10px 0; }.admin-badge { font-size:9px; font-weight:700; letter-spacing:.08em; border:1px solid var(--border); border-radius:5px; padding:5px 7px; color:var(--muted); }.sidebar-bottom p { font-size:12px; line-height:1.7; color:var(--muted); margin:16px 0 22px; }.sidebar-bottom a { display:block; color:var(--muted); text-decoration:none; font-size:11px; margin-top:16px; }.sidebar-bottom a:hover { color:var(--text); }
.workspace { min-width:0; flex:1; }.topbar { min-height:68px; display:flex; align-items:center; justify-content:space-between; padding:12px 36px; border-bottom:1px solid var(--border); background:var(--panel); }.breadcrumb { font-size:12px; color:var(--muted); }.breadcrumb span { padding:0 12px; opacity:.5; }.topbar>div { display:flex; gap:16px; align-items:center; }.topbar .ghost { font-size:12px; }
main { max-width:1510px; margin:0 auto; padding:35px 36px 22px; }.page-heading { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:27px; }.page-heading .eyebrow { font-size:9px; letter-spacing:.16em; color:var(--treasury-tone); margin:0 0 10px; }h1 { font-size:30px; letter-spacing:-.045em; line-height:1.2; font-weight:650; margin:0; }.page-heading p:not(.eyebrow) { font-size:13px; color:var(--muted); margin:10px 0 0; line-height:1.6; }.heading-actions { display:flex; gap:9px; }.primary,.secondary { display:inline-flex; align-items:center; justify-content:center; gap:7px; padding:10px 14px; border-radius:7px; border:1px solid var(--border); font-size:12px; min-height:38px; }.primary { background:#137f70; border-color:#137f70; color:white; }.primary:hover { background:#106b5e; }.secondary { background:var(--panel); color:var(--text); }.secondary:hover { background:var(--panel-2); }
.filters { display:grid; grid-template-columns:minmax(160px,1.25fr) minmax(130px,1fr) minmax(150px,1fr) repeat(2,minmax(130px,.85fr)) minmax(105px,.7fr) auto; gap:0; align-items:stretch; border:1px solid var(--border); border-radius:10px; background:var(--panel); padding:13px 4px; }.filters label,.filters details { display:flex; flex-direction:column; gap:5px; padding:0 14px; min-width:0; color:var(--muted); font-size:10px; font-weight:600; border-right:1px solid var(--border); }.filters select,.filters input { width:100%; border:0; padding:0; border-radius:0; background:transparent; color:var(--text); font-size:12px; min-height:24px; }.filters .apply { align-self:center; margin:0 10px; }.filters details { position:relative; }.filters summary { list-style:none; cursor:pointer; display:grid; gap:7px; min-height:40px; }.filters summary::-webkit-details-marker { display:none; }.filters summary strong { color:var(--text); font-size:12px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }.filters summary strong:after { content:'⌄'; float:right; margin-left:8px; }.product-options { position:absolute; z-index:10; top:57px; left:0; padding:15px; width:265px; border:1px solid var(--border); border-radius:9px; background:var(--panel); box-shadow:0 14px 40px #0003; }.product-options button { background:var(--panel-2); border:0; color:var(--text); padding:9px; border-radius:5px; width:100%; margin-bottom:8px; }.product-options label { display:flex; align-items:center; flex-direction:row; gap:10px; border:0; padding:9px 0; color:var(--text); font-size:12px; cursor:pointer; }.product-options input { width:16px; min-height:16px; accent-color:var(--treasury-tone); }
.context-line { display:flex; align-items:center; justify-content:space-between; gap:15px; min-height:50px; color:var(--muted); font-size:11px; }.context-line p { margin:0; }.context-line label { display:flex; align-items:center; gap:8px; flex:none; }.context-line select { color:var(--text); border:0; background:transparent; font-size:11px; padding:5px; }
.kpi-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:15px; margin:8px 0 23px; }.kpi { padding:20px 21px 18px; border:1px solid var(--border); background:var(--panel); border-radius:11px; position:relative; overflow:hidden; }.kpi.featured { border-top:3px solid #159b87; padding-top:18px; }.kpi-label { margin:0; color:var(--muted); font-size:11px; font-weight:500; }.kpi strong { display:block; font-size:29px; letter-spacing:-.045em; font-weight:650; margin:14px 0 10px; font-variant-numeric:tabular-nums; }.kpi small { display:block; color:var(--muted); font-size:10px; line-height:1.6; }.kpi .positive { color:var(--treasury-tone); }.kpi .negative { color:var(--danger); }
.dashboard-grid { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(260px,1fr); gap:20px; margin-bottom:22px; }.panel { background:var(--panel); border:1px solid var(--border); border-radius:11px; overflow:hidden; margin-bottom:20px; }.dashboard-grid .panel { margin:0; }.panel-heading { padding:20px 22px 0; display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }.panel h2 { margin:0; font-size:14px; font-weight:650; letter-spacing:-.015em; }.panel-heading p { color:var(--muted); font-size:10px; line-height:1.7; margin:7px 0 0; }.panel-heading select { background:var(--panel-2); color:var(--text); font-size:11px; border:1px solid var(--border); border-radius:5px; padding:6px; }.panel-body { padding:18px 22px 22px; }.chart { display:block; width:100%; height:255px; overflow:visible; }.chart text { fill:var(--muted); font-size:10px; font-family:inherit; }.chart-grid { stroke:var(--border); stroke-dasharray:3 4; }.chart-line { fill:none; stroke-width:2.5; }.chart-legend { display:flex; flex-wrap:wrap; gap:12px; font-size:10px; color:var(--muted); margin:4px 0 0 26px; }.legend-dot { display:inline-block; width:7px; height:7px; border-radius:50%; margin-right:5px; }.rank-row { display:grid; grid-template-columns:24px 1fr auto; gap:10px; align-items:center; margin-bottom:21px; }.rank-number { font-size:10px; color:var(--muted); }.rank-row button { display:block; color:var(--text); font-size:12px; padding:0; border:0; background:none; text-align:left; }.rank-row strong { font-size:12px; font-weight:600; font-variant-numeric:tabular-nums; }.rank-track { height:5px; background:var(--panel-2); border-radius:4px; margin-top:10px; overflow:hidden; }.rank-track i { display:block; height:100%; border-radius:4px; }.rank-note { font-size:10px; line-height:1.7; color:var(--muted); }
.table-wrap { overflow-x:auto; }table { border-collapse:collapse; width:100%; font-size:12px; text-align:left; }th { font-size:9px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); padding:14px 20px; background:var(--panel-2); font-weight:600; white-space:nowrap; }td { padding:17px 20px; border-top:1px solid var(--border); vertical-align:middle; }td.number,th.number { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }td strong { font-weight:600; }td small { display:block; color:var(--muted); font-size:10px; margin-top:5px; }.table-wrap button { padding:0; background:none; border:0; color:var(--text); text-align:left; }.source-badge { display:inline-block; border-radius:5px; font-size:11px; padding:4px 6px; border:1px solid var(--border); color:var(--muted); white-space:nowrap; }.source-badge.canonical { color:var(--treasury-tone); background:color-mix(in srgb,#159b87 8%,var(--panel)); border-color:color-mix(in srgb,#159b87 25%,var(--border)); }.source-badge.legacy { color:var(--warn); background:color-mix(in srgb,#b98c3c 7%,var(--panel)); }
.notice { border:1px solid var(--border); border-left:3px solid #bd9347; background:var(--panel); padding:16px 20px; border-radius:8px; color:var(--muted); font-size:11px; line-height:1.8; margin:18px 0 22px; }.notice strong { color:var(--text); font-weight:600; }.notice ul { padding-left:16px; margin:7px 0 0; }.notice p { margin:0; }.empty,.error,.loading { padding:48px 24px; text-align:center; color:var(--muted); font-size:13px; line-height:1.8; }.empty strong,.error strong { display:block; color:var(--text); font-size:16px; margin-bottom:8px; font-weight:600; }.error button { margin-top:15px; }.loading span { display:block; width:22px; height:22px; border:2px solid var(--border); border-top-color:var(--treasury-tone); border-radius:50%; margin:0 auto 15px; animation:spin 1s linear infinite; }.empty-cell { color:var(--muted); text-align:center; padding:32px; }.page-footer { display:flex; justify-content:space-between; gap:20px; border-top:1px solid var(--border); padding-top:18px; margin-top:26px; color:var(--muted); font-size:10px; }.table-footer { padding:13px 20px; display:flex; gap:12px; align-items:center; justify-content:space-between; color:var(--muted); font-size:10px; border-top:1px solid var(--border); }.history-kind { display:inline-block; width:8px; height:8px; border-radius:50%; background:#159b87; margin-right:9px; }
@keyframes spin { to { transform:rotate(360deg); } }
@media(min-width:1750px) { main { padding-top:45px; }.kpi strong { font-size:34px; } }
@media(max-width:1280px) { .sidebar { width:205px; padding-left:12px; padding-right:12px; }main { padding:26px 24px; }.topbar { padding:12px 24px; }.filters { grid-template-columns:repeat(3,minmax(0,1fr)); gap:15px 0; }.filters label:nth-of-type(2),.filters label:last-of-type { border-right:0; }.filters .apply { grid-column:1/-1; width:calc(100% - 20px); }.kpi { padding:17px; }.kpi strong { font-size:25px; }.dashboard-grid { grid-template-columns:minmax(0,1.4fr) minmax(230px,1fr); } }
@media(max-width:950px) { .sidebar { width:180px; }.treasury-brand strong { font-size:16px; }.treasury-brand img { width:30px; height:30px; }.sidebar nav button { font-size:12px; padding:12px 9px; gap:8px; } .kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.dashboard-grid { grid-template-columns:1fr; }.page-heading { align-items:flex-start; flex-direction:column; }.chart { height:230px; } }
@media(max-width:650px) { body.treasury { display:block; }.sidebar { position:static; min-height:auto; width:auto; height:auto; padding:18px 18px 12px; border-right:0; border-bottom:1px solid var(--border); }.treasury-brand { padding:0; }.nav-caption,.sidebar-bottom { display:none; }.sidebar nav { display:flex; overflow-x:auto; margin-top:16px; gap:4px; }.sidebar nav button { flex:none; padding:9px; font-size:11px; min-height:40px; }.sidebar nav button span { display:none; }.topbar { padding:10px 18px; min-height:52px; }main { padding:22px 18px; }h1 { font-size:26px; }.filters { grid-template-columns:repeat(2,minmax(0,1fr)); }.filters>* { border-right:0 !important; }.kpi-grid { gap:10px; }.kpi strong { font-size:24px; }.kpi { padding:15px; }.panel-heading,.panel-body { padding-left:17px; padding-right:17px; }.page-footer { flex-direction:column; gap:8px; }.context-line { align-items:flex-start; padding:12px 0; }.heading-actions { width:100%; }.heading-actions button { flex:1; }.filters input,.filters select { min-height:32px; }.notice { font-size:11px; } }
@media(prefers-reduced-motion:reduce) { .loading span { animation:none; } }

.treasury [hidden] { display:none !important; }
.simulation-toggle svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.7; }
.simulation-toggle[aria-pressed="true"],.source-badge.simulation { color:var(--text); background:var(--panel-2); border:1px solid #ba8129; }
.simulation-notice { display:flex; align-items:center; justify-content:space-between; gap:20px; border:1px solid #ba8129; border-radius:9px; padding:16px 20px; margin-bottom:18px; background:var(--panel); }
.simulation-notice strong { font-size:11px; letter-spacing:.08em; }.simulation-notice p { color:var(--muted); margin:6px 0 0; font-size:12px; line-height:1.6; }
.simulation-goal { padding:22px; display:flex; gap:25px; justify-content:space-between; align-items:center; background:var(--panel); border:1px solid var(--border); border-radius:10px; margin-bottom:18px; }
.simulation-goal span { font-size:10px; color:var(--muted); letter-spacing:.04em; }.simulation-goal h2 { font-size:27px; margin:12px 0 8px; }.simulation-goal small { font-size:15px; font-weight:400; color:var(--muted); }.simulation-goal p { color:var(--muted); font-size:12px; margin:0; }.goal-meter { width:30%; min-width:170px; }.goal-meter progress { display:block; width:100%; accent-color:var(--treasury-tone); height:10px; margin-bottom:10px; }
@media(max-width:850px) { .simulation-goal,.simulation-notice { flex-wrap:wrap; }.goal-meter { width:100%; }.topbar>div { gap:8px; } }

.treasury[data-simulation="true"] .admin-badge { border-color:#ba8129; color:var(--text); }

/* Evolution reuses the Treasury panels, typography and palette. */
.evolution-section { border-top:1px solid var(--border); margin-top:32px; padding-top:26px; }
.evolution-heading { display:flex; gap:20px; justify-content:space-between; align-items:flex-start; }
.evolution-heading h2 { font-size:20px; margin:5px 0 10px; letter-spacing:-.025em; }.evolution-heading p { color:var(--muted); font-size:11px; line-height:1.7; }.evolution-heading .eyebrow { color:var(--treasury-tone); letter-spacing:.12em; font-size:9px; margin:0; }
.evolution-heading label { display:grid; gap:8px; font-size:10px; color:var(--muted); }.evolution-heading select { border:1px solid var(--border); background:var(--panel); color:var(--text); padding:10px; border-radius:7px; max-width:260px; }
.evolution-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin:18px 0; }.evolution-card { margin:0; }.evolution-card:first-child { grid-column:1/-1; }.evolution-card h3 { font-size:14px; margin:0; }
.evolution-bars { display:flex; gap:12px; overflow-x:auto; padding:9px 0; }.evolution-column { min-width:72px; flex:1; text-align:center; font-variant-numeric:tabular-nums; }.evolution-column strong { display:block; white-space:nowrap; font-size:11px; font-weight:600; margin-bottom:12px; }.evolution-column>span { display:block; margin-top:12px; font-size:10px; color:var(--muted); }.evolution-column small { display:block; font-size:9px; line-height:1.5; margin-top:5px; color:var(--muted); }
.evolution-track { position:relative; height:130px; margin:0 auto; width:56%; max-width:58px; }.evolution-baseline { position:absolute; height:1px; left:-14px; right:-14px; background:var(--border); }.evolution-fill { display:block; position:absolute; left:0; right:0; background:var(--treasury-tone); border-radius:4px 4px 0 0; }.evolution-fill.negative { background:var(--danger); border-radius:0 0 4px 4px; }.evolution-fill.partial { opacity:.7; background-image:repeating-linear-gradient(135deg,transparent,transparent 5px,var(--panel) 5px,var(--panel) 7px); }.bar-absent { position:absolute; top:45%; left:0; right:0; color:var(--muted); }
.evolution-navigation { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }.evolution-navigation>span { font-size:11px; color:var(--muted); }.evolution-navigation button:disabled { cursor:default; }.evolution-navigation [data-export-evolution] { margin-left:auto; }
@media(max-width:950px) { .evolution-grid { grid-template-columns:1fr; }.evolution-heading { flex-wrap:wrap; } }

@media(max-width:1400px) { .evolution-grid { grid-template-columns:1fr; } }

.heading-actions a { text-decoration:none; }
