/* RSS Acct — Finance & Accounting dashboard styles (no external fonts / CDN) */
:root {
  --navy-900: #0b1529;
  --navy-800: #0f1b33;
  --navy-700: #182a4d;
  --navy-600: #25396a;
  --accent: #2a78d6;
  --accent-600: #1f63b6;
  --accent-50: #eaf2fd;
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e3e8ef;
  --border-strong: #cfd7e3;
  --ink: #1b2433;
  --ink-2: #4a5568;
  --ink-3: #7a8699;
  --good: #11875d;
  --good-bg: #e6f6ef;
  --bad: #c6302f;
  --bad-bg: #fdecec;
  --warn: #9a6300;
  --warn-bg: #fff4d6;
  --serious: #c2410c;
  --serious-bg: #ffedd5;
  --info: #1f63b6;
  --info-bg: #e8f1fc;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, .16);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}
a { color: var(--accent-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num, .kpi-value, .table td.num, .tabular { font-variant-numeric: tabular-nums; }
.neg { color: var(--bad); }
.muted { color: var(--ink-3); }
.mono { font-family: var(--mono); font-size: 12.5px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ----------------------------------------------------------------- Top nav */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  color: #e6ecf7;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 2px 8px rgba(0, 0, 0, .18);
}
.topnav-inner {
  max-width: 1560px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 18px; min-height: 56px;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(135deg, #3b8cf0, #1baf7a); color: #fff; font-weight: 800; font-size: 16px;
}
.brand-name { display: flex; flex-direction: column; font-weight: 700; font-size: 15px; line-height: 1.1; }
.brand-name small { font-weight: 500; font-size: 10.5px; color: #93a3c0; letter-spacing: .03em; text-transform: uppercase; }
.nav-menu { flex: 1; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.nav-list > li { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 12px; border-radius: 6px; border: 0; background: transparent;
  color: #c9d4e8; font: inherit; font-weight: 550; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.nav-link.active, .nav-group.active > .nav-link { color: #fff; background: rgba(59, 140, 240, .22); box-shadow: inset 0 -2px 0 #4a9af5; }
.caret { font-size: 10px; opacity: .8; }
.nav-dropdown {
  list-style: none; margin: 0; padding: 6px; position: absolute; top: calc(100% + 4px); left: 0; min-width: 220px;
  background: #fff; border-radius: 8px; box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  display: none;
}
.nav-group.open > .nav-dropdown { display: block; }
@media (hover: hover) and (min-width: 1001px) {
  .nav-group:hover > .nav-dropdown { display: block; }
  .nav-group:hover > .nav-dropdown::before { content: ""; position: absolute; top: -6px; left: 0; right: 0; height: 6px; }
}
.nav-sublink { display: block; padding: 8px 12px; border-radius: 6px; color: var(--ink); white-space: nowrap; }
.nav-sublink:hover { background: var(--accent-50); color: var(--accent-600); text-decoration: none; }
.nav-sublink.active { background: var(--accent-50); color: var(--accent-600); font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.sync-ind { display: inline-flex; align-items: center; gap: 7px; color: #c9d4e8; font-size: 12.5px; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .06); }
.sync-ind:hover { text-decoration: none; background: rgba(255, 255, 255, .1); color: #fff; }
.sync-ind .dot { width: 8px; height: 8px; border-radius: 50%; background: #7a8699; }
.sync-ind.fresh .dot { background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .2); }
.sync-ind.stale .dot { background: #fbbf24; }
.sync-ind.old .dot, .sync-ind.never .dot { background: #f87171; }
.btn-nav { background: transparent; color: #e6ecf7; border-color: rgba(255, 255, 255, .25); }
.btn-nav:hover { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .4); }
.nav-burger { display: none; margin-left: auto; background: transparent; border: 1px solid rgba(255, 255, 255, .25); color: #fff; border-radius: 6px; font-size: 18px; padding: 4px 10px; cursor: pointer; }

@media (max-width: 1000px) {
  .topnav-inner { flex-wrap: wrap; gap: 10px; padding: 8px 16px; }
  .nav-burger { display: block; }
  .nav-menu, .nav-right { display: none; width: 100%; }
  .topnav.menu-open .nav-menu, .topnav.menu-open .nav-right { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; width: 100%; padding-bottom: 6px; }
  .nav-link { width: 100%; justify-content: space-between; }
  .nav-dropdown { position: static; box-shadow: none; border: 0; background: rgba(255, 255, 255, .05); margin: 2px 0 6px 12px; }
  .nav-sublink { color: #d6deee; }
  .nav-sublink:hover, .nav-sublink.active { background: rgba(255, 255, 255, .1); color: #fff; }
  .nav-right { justify-content: space-between; padding: 6px 0 10px; border-top: 1px solid rgba(255, 255, 255, .08); }
}

/* ------------------------------------------------------------- Banner */
.demo-banner {
  background: #fff3c4; color: #5c4400; border-bottom: 1px solid #f1d27a;
  text-align: center; padding: 8px 16px; font-size: 13px;
}
.demo-banner strong { letter-spacing: .06em; }
.demo-banner a { color: #5c4400; text-decoration: underline; font-weight: 600; }

/* ------------------------------------------------------------- Layout */
.container { max-width: 1560px; margin: 0 auto; padding: 20px 20px 48px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 18px; }
.page-title p, .page-sub { margin: 4px 0 0; color: var(--ink-3); font-size: 13px; }
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.span-2 { grid-column: span 2; }
@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2-1, .grid-1-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .container { padding: 14px 12px 40px; }
  h1 { font-size: 19px; }
}

/* --------------------------------------------------------------- Card */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; display: flex; flex-direction: column; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 6px; flex-wrap: wrap; }
.card-head h2 { font-size: 14.5px; }
.card-head .card-sub { color: var(--ink-3); font-size: 12px; font-weight: 400; margin-top: 2px; }
.card-body { padding: 8px 16px 16px; min-width: 0; flex: 1; }
.card-body.flush { padding: 0 0 4px; }
.card-tools { display: flex; gap: 6px; align-items: center; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 22px 0 10px; font-weight: 650; }

/* ---------------------------------------------------------------- KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi-grid.kpi-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi-grid.kpi-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .kpi-grid, .kpi-grid.kpi-5, .kpi-grid.kpi-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 340px) { .kpi-grid, .kpi-grid.kpi-5, .kpi-grid.kpi-3 { grid-template-columns: minmax(0, 1fr); } }
.kpi-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; position: relative; overflow: hidden; min-height: 100px;
}
.kpi-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); opacity: .85; }
.kpi-card.kpi-bad::before { background: var(--bad); }
.kpi-card.kpi-warn::before { background: #eda100; }
.kpi-card.kpi-good::before { background: #1baf7a; }
.kpi-label { color: var(--ink-2); font-size: 12.5px; font-weight: 550; }
.kpi-value { font-size: 25px; font-weight: 700; margin: 4px 0 4px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-delta { font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 999px; }
.kpi-delta .arrow { font-size: 9px; }
.kpi-delta.good { color: var(--good); background: var(--good-bg); }
.kpi-delta.bad { color: var(--bad); background: var(--bad-bg); }
.kpi-delta.neutral { color: var(--ink-2); background: #eef1f5; }
.kpi-delta-label { color: var(--ink-3); font-weight: 400; }
.kpi-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.kpi-split { display: flex; gap: 14px; flex-wrap: wrap; }

/* ------------------------------------------------------------- Inputs */
.input {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 6px 9px; min-height: 34px; max-width: 100%;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(42, 120, 214, .18); }
.input-sm { min-height: 30px; padding: 4px 8px; font-size: 13px; }
select.input { padding-right: 26px; }
.btn {
  font: inherit; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border-strong); background: #fff; color: var(--ink); border-radius: var(--radius-sm);
  padding: 7px 14px; cursor: pointer; min-height: 34px; white-space: nowrap; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); border-color: #b8c3d3; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-600); border-color: var(--accent-600); }
.btn-dark { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.btn-dark:hover { background: var(--navy-600); border-color: var(--navy-600); }
.btn-sm { min-height: 30px; padding: 4px 10px; font-size: 12.5px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: #eef2f7; border-color: transparent; color: var(--ink); }
.btn-icon { min-width: 34px; padding: 4px 8px; font-size: 16px; }
.btn .spin { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------- Filter bar */
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.fb-field { display: flex; flex-direction: column; gap: 3px; }
.fb-label { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; font-weight: 650; }
.fb-range { display: flex; align-items: center; gap: 6px; }
.fb-range .input { width: 165px; }
.fb-sep { color: var(--ink-3); }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: #fff; min-height: 34px; }
.seg-btn { font: inherit; font-size: 12.5px; font-weight: 600; border: 0; background: transparent; color: var(--ink-2); padding: 0 10px; cursor: pointer; border-right: 1px solid var(--border); }
.seg-btn:last-child { border-right: 0; }
.seg-btn:hover { background: var(--surface-2); }
.seg-btn.active { background: var(--accent-50); color: var(--accent-600); }
@media (max-width: 760px) {
  .filter-bar { width: 100%; }
  .fb-range .input { width: 130px; }
}

/* --------------------------------------------------------------- Table */
.dt { min-width: 0; }
.dt-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.dt-title { font-weight: 600; color: var(--ink-2); font-size: 13px; }
.dt-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
.dt-search { width: 220px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th, .table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid #edf0f5; white-space: nowrap; }
.table thead th {
  position: sticky; top: 0; z-index: 1; background: #f6f8fb; color: var(--ink-2); font-weight: 650; font-size: 12px;
  text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--border);
}
.table th.num, .table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tbody tr:hover td { background: #f7faff; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tfoot td { font-weight: 700; background: #f6f8fb; border-top: 2px solid var(--border-strong); border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table td.wrap { white-space: normal; min-width: 200px; }
.table-compact th, .table-compact td { padding: 5px 10px; }
.th-btn { font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.th-btn.active { color: var(--accent-600); }
.th-btn .sort-ind { font-size: 9px; opacity: .55; }
.th-btn.active .sort-ind { opacity: 1; }
th.num .th-btn { flex-direction: row; }
.dt-pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; color: var(--ink-3); }
.dt-pages { display: flex; align-items: center; gap: 4px; }
.dt-pageno { padding: 0 6px; }
.dt-empty { padding: 0 !important; }
.dt.is-loading .table-scroll { opacity: .55; transition: opacity .15s; }
.cell-strong { font-weight: 600; }
.cell-sub { color: var(--ink-3); font-size: 12px; }

/* Tree table (P&L / Balance sheet) */
.tree-table .sticky-col { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 280px; }
.tree-table thead .sticky-col { background: #f6f8fb; z-index: 2; }
.tree-table tbody tr:hover td.sticky-col { background: #f7faff; }
.tt-toggle { border: 0; background: transparent; width: 18px; margin-right: 4px; cursor: pointer; color: var(--ink-2); font-size: 12px; padding: 0; }
.tt-spacer { display: inline-block; width: 22px; }
.tt-num { color: var(--ink-3); margin-right: 8px; font-family: var(--mono); font-size: 12px; }
.tt-section td { font-weight: 700; background: #f2f5fa; }
.tt-section td.sticky-col { background: #f2f5fa; }
.tt-group td { font-weight: 600; }
.tt-total td { font-weight: 700; border-top: 1px solid var(--border-strong); }
.tt-grand td { font-weight: 800; background: #e9f0fb; border-top: 2px solid var(--accent); }
.tt-grand td.sticky-col { background: #e9f0fb; }
.tt-spacer-row td { height: 8px; padding: 0; border: 0; }
.tree-table td.col-compare, .tree-table th.col-compare { background: #fbfcfe; }
.tree-table td.col-total, .tree-table th.col-total { font-weight: 700; border-left: 1px solid var(--border); }
td.tone-good { color: var(--good); }
td.tone-bad { color: var(--bad); }

/* ---------------------------------------------------------------- Chart */
.chart-box { position: relative; height: 280px; width: 100%; }
.chart-box.chart-sm { height: 220px; }
.chart-box.chart-lg { height: 340px; }
.chart-data { margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.chart-data summary { cursor: pointer; width: max-content; }
.chart-data .table-scroll { margin-top: 6px; max-height: 260px; overflow: auto; }

.aging-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: #eef1f5; gap: 2px; }
.aging-bar span { display: block; height: 100%; }
.legend-inline { display: flex; flex-wrap: wrap; gap: 10px 16px; font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.legend-inline i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------------------------------------------------------- Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 650; line-height: 1.5; background: #eef1f5; color: var(--ink-2); white-space: nowrap; }
.badge-good { background: var(--good-bg); color: var(--good); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-caution { background: #f4f7d9; color: #5d6b0a; }
.badge-serious { background: var(--serious-bg); color: var(--serious); }
.badge-info { background: var(--info-bg); color: var(--info); }

/* ------------------------------------------------- Skeleton / empty / error */
.sk { background: linear-gradient(90deg, #edf0f5 25%, #f6f8fb 50%, #edf0f5 75%); background-size: 200% 100%; animation: sk 1.3s ease-in-out infinite; border-radius: 6px; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.sk-line { height: 12px; margin: 8px 0; }
.sk-lg { height: 24px; }
.sk-head { height: 18px; }
.sk-w40 { width: 40%; } .sk-w50 { width: 50%; } .sk-w70 { width: 70%; }
.sk-chart { height: 260px; }
.sk-table .sk-line { height: 16px; margin: 10px 0; }
.skeleton-card::before { opacity: .2; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; color: var(--ink-3); gap: 6px; min-height: 180px; }
.empty-state.compact { padding: 24px 16px; min-height: 120px; }
.empty-icon { font-size: 28px; color: #b6c0cf; }
.empty-title { font-weight: 600; color: var(--ink-2); }
.empty-hint { font-size: 12.5px; max-width: 460px; }
.error-state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bad-bg); color: var(--bad); border: 1px solid #f6c9c9; }
.error-state span { color: #7a1f1f; }
.notice { padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); color: var(--ink-2); margin-bottom: 16px; }
.notice-warn { background: var(--warn-bg); border-color: #f2d48a; color: #5c4400; }
.notice-info { background: var(--info-bg); border-color: #c4dbf6; color: #173f73; }
.notice-bad { background: var(--bad-bg); border-color: #f6c9c9; color: #7a1f1f; }

/* ------------------------------------------------------------ Toasts */
.toast-host { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--navy-800); color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow-lg); font-size: 13px; transition: opacity .3s, transform .3s; }
.toast-error { background: #8f1d1d; }
.toast-good { background: #0c6b49; }
.toast.out { opacity: 0; transform: translateY(6px); }
.session-warn {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 120;
  background: #fff; border: 1px solid #f2d48a; border-left: 4px solid #eda100; border-radius: 10px; box-shadow: var(--shadow-lg);
  padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; max-width: calc(100vw - 24px);
}
.sw-actions { display: flex; gap: 6px; }

/* -------------------------------------------------------------- Lists */
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #edf0f5; align-items: center; }
.mini-list li:last-child { border-bottom: 0; }
.mini-main { min-width: 0; }
.mini-main .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-main .s { font-size: 12px; color: var(--ink-3); }
.mini-amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

/* ---------------------------------------------------------- Sync page */
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 4px 8px; padding: 10px 0; border-bottom: 1px solid #edf0f5; }
.check-list li:last-child { border-bottom: 0; }
.check-ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; }
.check-ico.ok { background: #1baf7a; }
.check-ico.fail { background: var(--bad); }
.check-name { font-weight: 600; }
.check-detail { grid-column: 2; font-family: var(--mono); font-size: 12px; white-space: pre-wrap; word-break: break-word; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; }
.check-list li.fail .check-detail { background: var(--bad-bg); border-color: #f6c9c9; color: #7a1f1f; }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 600; }
.err-text { color: var(--bad); white-space: normal; max-width: 460px; font-size: 12px; }

/* --------------------------------------------------------------- Login */
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 20px; background: radial-gradient(1200px 600px at 10% -10%, #24427a 0%, transparent 60%), linear-gradient(160deg, var(--navy-800), var(--navy-900)); }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); padding: 32px 30px 26px; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-brand .brand-mark { width: 42px; height: 42px; font-size: 20px; border-radius: 10px; }
.login-brand h1 { font-size: 20px; }
.login-brand p { margin: 2px 0 0; color: var(--ink-3); font-size: 13px; }
.login-card label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.login-card .input { width: 100%; min-height: 42px; font-size: 15px; }
.login-card .btn { width: 100%; min-height: 42px; margin-top: 14px; font-size: 15px; }
.login-msg { margin-bottom: 14px; padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.login-msg.error { background: var(--bad-bg); color: #7a1f1f; border: 1px solid #f6c9c9; }
.login-msg.info { background: var(--warn-bg); color: #5c4400; border: 1px solid #f2d48a; }
.login-msg.ok { background: var(--good-bg); color: #0c5b3e; border: 1px solid #b7e6d1; }
.login-foot { margin-top: 18px; text-align: center; font-size: 12px; color: var(--ink-3); }
.pw-wrap { position: relative; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--ink-3); cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; padding: 6px; }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.kpi-grid > .error-state, .kpi-grid > .empty-state { grid-column: 1 / -1; }
.legend-inline i.lg-good { background: #1baf7a; }
.legend-inline i.lg-bad { background: #d63b3b; }
#budget-na { margin-bottom: 16px; }
.table tr.muted td { color: var(--ink-3); }

/* ------------------------------------------------- Budget upload (Addendum A) */
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: #a82827; border-color: #a82827; color: #fff; }
.btn-del { color: var(--bad); }
.upload-target { font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
  border: 2px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2);
  padding: 26px 16px; cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent); background: var(--accent-50); outline: none; }
.dropzone.drag { border-color: var(--accent); background: var(--accent-50); box-shadow: 0 0 0 4px rgba(42, 120, 214, .12); }
.dz-icon { font-size: 28px; color: var(--accent); line-height: 1; }
.dz-title { font-weight: 600; }
.dz-link { color: var(--accent-600); text-decoration: underline; }
.dz-hint { font-size: 12px; color: var(--ink-3); max-width: 460px; }
.dz-file { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--ink-3); word-break: break-all; }
.dz-file.ok { color: var(--good); }
.dz-file.bad { color: var(--bad); }
.upload-actions { margin: 12px 0 4px; }
#budget-upload .notice { margin: 12px 0 0; }
.import-result { margin-top: 12px; }
.import-result .notice { margin-bottom: 10px; }
.import-stats { margin-bottom: 10px; }
.sub-head { font-size: 12px; font-weight: 650; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; margin: 12px 0 6px; }
.warn-list { margin: 0 0 8px; padding-left: 18px; color: var(--warn); font-size: 13px; }
.budget-empty { margin-bottom: 16px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.step-no { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 800; }
.step-title { font-weight: 650; margin-bottom: 4px; }
.step-text { font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
@media (max-width: 900px) { .steps { grid-template-columns: minmax(0, 1fr); } }
