:root {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #13284b;
  --dark: #102346;
  --muted: #546783;
  --edge: #e0e8f5;
  --green: #245dce;
  --wash: #f3f6fc;
  color: var(--ink);
}
.workspace-shell { grid-template-columns: 248px minmax(0,1fr); }
.desk-side { position: sticky; top: 0; height: 100dvh; padding: 26px 16px 21px; gap: 34px; background: #102346; }
.desk-side .brand { padding-inline: 8px; }
.brand-mark { background: #3476f1; color: #fff; border-radius: 12px; box-shadow: 0 3px 10px #07152f31; }
.brand small { color: #b3c3df; opacity: 1; font-size: .82rem; }
.login .brand small { color: var(--muted); }
.nav-stack { flex: 1; min-height: 0; overflow: auto; }
.nav-stack > small { display: block; margin: 8px 12px 9px; color: #b2c3e3; font-size: .68rem; font-weight: 760; letter-spacing: .085em; }
.nav-stack nav + small { margin-top: 26px; }
.nav-stack nav { display: grid; gap: 3px; }
.glyph { width: 21px; height: 21px; flex: none; vertical-align: middle; }
.nav-link { display: flex; align-items: center; gap: 11px; color: #d5e3fa; font-size: .92rem; }
.nav-link span { display: inline; width: auto; font-size: inherit; }
.nav-link[aria-current] { background: #2858a9; color: #fff; }
.nav-link:not([aria-current]):hover { background: #1d3963; }
.side-exit { margin-top: auto; }
.workspace-top { min-height: 67px; padding: 12px clamp(17px,3vw,43px); align-items: center; }
.desktop-context,.top-end { display: flex; align-items: center; gap: 12px; }
.desktop-context strong { color: var(--ink); }
.demo-label { background: #e8f0ff; color: #204d9f; padding: 4px 9px; border-radius: 99px; font-weight: 660; white-space: nowrap; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #2554a6; background: #e9f0ff; font-weight: 750; }
.mobile-brand,.mobile-nav { display: none; }
.workspace-content { padding: 30px clamp(17px,3vw,43px); max-width: 1510px; }
.dashboard-intro,.page-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 22px; }
.dashboard-intro { padding: 26px 27px; border-radius: 17px; background: linear-gradient(112deg,#143876 0%,#2159b5 69%,#3175da 100%); color: #fff; }
.dashboard-intro h1,.page-head h1 { font-size: clamp(1.95rem,3.3vw,2.55rem); letter-spacing: -.047em; }
.dashboard-intro p,.page-head p { margin-top: 8px; }
.dashboard-intro p { color: #edf4ff; }
.dashboard-intro .primary { background: white; color: #16468d; white-space: nowrap; }
.dashboard-intro .primary:hover { background: #e6f0ff; }
.primary,.secondary { gap: 8px; }
.primary { background: #245dce; }
.kpi-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin-bottom: 19px; }
.kpi,.panel { border: 1px solid var(--edge); border-radius: 15px; background: #fff; box-shadow: 0 2px 6px #172e5207; color: var(--ink); min-width: 0; }
.kpi { display: grid; gap: 6px; justify-items: start; text-align: left; padding: 14px; }
button.kpi:hover { border-color: #99b7ef; }
.kpi-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 10px; background: #eaf2ff; color: #235dc8; margin-bottom: 2px; }
.kpi small,.kpi-caption { color: var(--muted); }
.kpi strong { font-size: clamp(1.15rem,2.1vw,1.65rem); line-height: 1.2; overflow-wrap: anywhere; max-width: 100%; }
.kpi-caption { font-size: .81rem; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; align-items: start; }
.panel { overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--edge); }
.panel-head h2 { font-size: 1.06rem; line-height: 1.25; }
.text-button { border: 0; color: #2358af; background: transparent; font-size: .88rem; font-weight: 680; white-space: nowrap; padding: 2px 0; }
.text-button:hover { text-decoration: underline; }
.panel-head:has(.text-button) { padding-block: 4px; }
.panel-empty,.panel-copy { padding: 13px 16px; color: var(--muted); }
.mini-row { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 15px; border: 0; border-bottom: 1px solid var(--edge); background: white; color: var(--ink); text-align: left; overflow-wrap: anywhere; }
.mini-row:last-child { border-bottom: 0; }
.mini-row:hover { background: #f4f8ff; }
.mini-row span:first-child { min-width: 0; }
.mini-row strong,.mini-row small { display: block; }
.mini-row small { color: var(--muted); margin-top: 4px; }
.mini-row .badge { flex: none; max-width: 45%; }
.chart { min-height: 198px; display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; padding: 16px 12px; align-items: end; background: linear-gradient(#f5f8ff,#fff 80%); }
.chart-column { display: grid; justify-items: center; align-items: end; gap: 6px; color: var(--muted); font-size: .8rem; min-width: 0; }
.chart-column meter { writing-mode: vertical-lr; direction: rtl; appearance: none; width: min(32px,70%); height: 111px; border-radius: 8px; overflow: hidden; }
.chart-column meter::-webkit-meter-bar { background: #eaf0fa; border: 0; border-radius: 8px; }
.chart-column meter::-webkit-meter-optimum-value { background: #89adf4; border-radius: 8px; }
.chart-column meter.current::-webkit-meter-optimum-value { background: #306ee2; }
.chart-column meter::-moz-meter-bar { background: #89adf4; }
.bar-value { font-size: .71rem; white-space: nowrap; text-align: center; }
.quick-grid,.more-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.more-link { display: flex; align-items: center; gap: 9px; padding: 14px; text-align: left; font-weight: 650; }
.more-link .glyph { color: #245dce; }
.more-exit { margin-top: 18px; }
.info-box,.offline-notice { padding: 10px 12px; margin-block: 8px; background: #eaf2ff; border-radius: 9px; color: #173e81; }
.offline-notice { background: #fff0cc; color: #704c08; }
.detail-section { border-top: 1px solid var(--edge); margin-top: 16px; padding-top: 12px; }
.detail-section > .secondary { margin-top: 8px; }
.detail-section h3 { font-size: 1rem; }
.detail-section .panel-empty { padding-left: 0; }
.file-links,.export-links { display: flex; gap: 8px; flex-wrap: wrap; padding-block: 10px; }
.file-links a { overflow-wrap: anywhere; max-width: 100%; }
.file-picker { margin: 5px 0; }
.panel .file-picker,.export-links { padding-inline: 15px; }
.panel .error { padding-inline: 15px; }
.money-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin-block: 10px; }
.money-grid div { background: #edf3ff; padding: 8px; border-radius: 9px; overflow-wrap: anywhere; }
.money-grid strong,.money-grid small { display: block; }
.movement { display: flex; justify-content: space-between; align-items: center; gap: 7px; }
.movement button { flex: none; }
.report-filters { padding: 12px; margin-bottom: 16px; }
.report-filters .form-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.rank-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 15px; border-bottom: 1px solid var(--edge); overflow-wrap: anywhere; }
.search .glyph { color: #5a7197; }
.badge.neutral { background: #edf2fa; color: #3e5579; }
@media(max-width:1050px) {
  .workspace-shell { grid-template-columns: 210px minmax(0,1fr); }
  .kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:780px) {
  .workspace-shell { display: block; }
  .desk-side,.desktop-context,.avatar { display: none; }
  .mobile-brand { display: block; }
  .workspace-top { padding: 9px 14px; min-height: 58px; }
  .top-date { display: none; }
  .mobile-nav { position: fixed; z-index: 3; inset: auto 0 0; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 2px; padding: 5px 6px calc(5px + env(safe-area-inset-bottom)); background: #102346; }
  .mobile-nav .nav-link { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; font-size: .68rem; min-height: 48px; padding: 4px 1px; white-space: nowrap; }
  .mobile-nav .glyph { width: 18px; height: 18px; }
  .mobile-nav .nav-link span { margin: 0; }
  .workspace-content { padding: 15px 13px calc(78px + env(safe-area-inset-bottom)); }
  #notice:not(:empty) { z-index: 5; }
}
@media(max-width:560px) {
  .dashboard-intro { flex-wrap: wrap; padding: 16px; margin-bottom: 13px; gap: 12px; }
  .dashboard-intro p { font-size: .92rem; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 10px; }
  .kpi-grid { gap: 8px; margin-bottom: 13px; }
  .kpi { padding: 10px; }
  .kpi-caption { font-size: .76rem; }
  .report-filters .form-grid { grid-template-columns: 1fr; }
  .panel-head h2 { font-size: 1rem; }
}
