﻿:root {
  --ink: #173044;
  --ink-strong: #102637;
  --nav: #102638;
  --nav-raised: #1d384b;
  --muted: #647789;
  --muted-soft: #8193a1;
  --line: #dce5e8;
  --line-soft: #eaf0f1;
  --surface: #ffffff;
  --canvas: #f3f6f5;
  --accent: #d3ec72;
  --accent-ink: #344b16;
  --blue: #335f7a;
  --teal: #4b8b89;
  --amber: #b78038;
  font-family: Inter, 'Segoe UI', Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .48; cursor: default; }
:focus-visible { outline: 3px solid #7dadbd; outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, strong { font-weight: 700; }
#app { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: 100vh; }
#app[hidden], .view[hidden], #login[hidden], [hidden] { display: none !important; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 28px 16px 22px; background: var(--nav); color: #f1f6f6; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 11px; margin-bottom: 52px; }
.brand-mark { flex: none; width: 39px; height: 39px; display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: var(--nav); font-size: 24px; font-weight: 800; letter-spacing: -.09em; }
.brand b { display: block; font-size: 18px; letter-spacing: -.04em; }
.brand small { display: block; margin-top: 3px; color: #aabdc8; font-size: 9px; font-weight: 700; letter-spacing: .11em; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 13px; border: 1px solid transparent; border-left: 3px solid transparent; border-radius: 7px; color: #bacbd4; background: transparent; font-size: 13px; font-weight: 600; text-align: left; transition: background .16s ease, color .16s ease; }
.sidebar nav button:hover { color: #fff; background: var(--nav-raised); }
.sidebar nav button.active { color: #fff; border-left-color: var(--accent); background: var(--nav-raised); }
.sidebar-bottom { margin-top: auto; padding: 18px 13px 0; border-top: 1px solid #304657; color: #d0dfe3; font-size: 11px; line-height: 1.7; }
.sidebar-bottom small { color: #9dafb9; }
.status-dot { flex: none; width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: #94be63; }
.sidebar-bottom .status-dot { margin-right: 7px; }
.main { min-width: 0; }
.topbar { min-height: 92px; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 20px 38px; border-bottom: 1px solid var(--line); background: var(--surface); }
.eyebrow { color: #6c7f8d; font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.topbar .eyebrow { margin-bottom: 7px; }
.topbar h1 { color: var(--ink-strong); font-size: 25px; letter-spacing: -.035em; line-height: 1.2; }
.top-controls { display: flex; align-items: center; gap: 16px; min-width: 0; }
.company-identity { min-width: 204px; display: grid; gap: 3px; padding: 8px 14px; border-left: 3px solid var(--accent); background: #f6f9f7; }
.company-identity span { color: var(--muted-soft); font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.company-identity strong { color: var(--ink-strong); font-size: 13px; white-space: nowrap; }
.account-pill { display: flex; align-items: center; gap: 9px; min-width: 0; }
.avatar { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #e2edbc; color: var(--accent-ink); font-size: 14px; font-weight: 800; }
.account-copy { display: grid; gap: 2px; min-width: 0; }
.account-copy small { color: var(--muted-soft); font-size: 10px; }
.account-copy strong { max-width: 175px; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-size: 12px; white-space: nowrap; }
.logout { padding: 8px 11px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 700; }
.logout:hover, .filterbar button:hover { background: #f2f6f5; }
.content { max-width: 1470px; min-height: calc(100vh - 92px); margin: 0 auto; padding: 28px 38px 56px; }
.content[aria-busy='true'] { opacity: .68; }
.filterbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 23px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.date-filter { display: flex; align-items: center; gap: 11px; min-width: 0; }
.date-filter span:first-child { margin-right: 4px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.date-filter span:nth-child(3) { color: var(--muted-soft); }
.date-filter input, .section-head select, .search, .table-select select { min-height: 38px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); }
.filterbar button { padding: 9px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 700; white-space: nowrap; }
.notice { margin-bottom: 17px; padding: 11px 14px; border-left: 3px solid #c0864f; border-radius: 5px; background: #fff6ed; color: #89562b; font-size: 12px; }
.overview-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 124px; padding: 24px 28px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.overview-heading .eyebrow { margin-bottom: 7px; }
.overview-heading h2 { color: var(--ink-strong); font-size: clamp(23px, 2vw, 30px); letter-spacing: -.035em; line-height: 1.12; }
.overview-heading p:last-child { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.source-stamp { display: flex; align-items: flex-start; gap: 8px; padding: 9px 0 9px 20px; border-left: 1px solid var(--line); white-space: nowrap; }
.source-stamp .status-dot { margin-top: 4px; }
.source-stamp div { display: grid; gap: 3px; }
.source-stamp strong { font-size: 11px; }
.source-stamp small { color: var(--muted-soft); font-size: 10px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0 16px; }
.kpis article { min-width: 0; min-height: 130px; padding: 19px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.kpis article:first-child { border-color: var(--nav); background: var(--nav); color: #fff; }
.kpis p { margin-bottom: 12px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .09em; }
.kpis article:first-child p { color: #c8d7dd; }
.kpis strong { display: block; color: var(--ink-strong); font-size: clamp(24px, 2.2vw, 31px); letter-spacing: -.055em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpis article:first-child strong { color: #fff; }
.kpis small { display: block; margin-top: 6px; color: var(--muted-soft); font-size: 11px; }
.kpis article:first-child small { color: #c5d4db; }
.grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); gap: 16px; margin-bottom: 16px; }
.panel { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.panel-head .eyebrow { margin-bottom: 6px; }
.panel h3 { color: var(--ink-strong); font-size: 16px; letter-spacing: -.02em; }
.tag { padding: 5px 9px; border-radius: 4px; background: #edf2f1; color: var(--muted); font-size: 10px; white-space: nowrap; }
.chart { display: flex; align-items: flex-end; gap: 10px; height: 225px; padding: 15px 8px 0; border-bottom: 1px solid var(--line); background-image: linear-gradient(to top, transparent 24%, #edf1f1 25%, transparent 25.5%, transparent 49%, #edf1f1 50%, transparent 50.5%, transparent 74%, #edf1f1 75%, transparent 75.5%); }
.chart-col { flex: 1; min-width: 25px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; }
.chart-bars { display: flex; align-items: flex-end; gap: 2px; width: 100%; height: 100%; }
.chart-bars i { display: block; flex: 1; min-width: 3px; min-height: 2px; border-radius: 3px 3px 0 0; }
.chart-col small { color: var(--muted); font-size: 9px; white-space: nowrap; }
.blue { background: var(--blue); }
.orange { background: var(--amber); }
.green { background: #91ba6b; }
.purple { background: var(--teal); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 17px; margin-top: 17px; color: var(--muted); font-size: 11px; }
.legend i { width: 8px; height: 8px; display: inline-block; margin-right: 5px; border-radius: 2px; }
.doc-list { display: grid; gap: 13px; padding-top: 4px; }
.doc-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.doc-row span { color: var(--muted); }
.doc-row strong { color: var(--ink-strong); font-variant-numeric: tabular-nums; }
.mini-track { height: 5px; margin-top: 7px; border-radius: 3px; background: #edf1ef; }
.mini-track i { display: block; height: 100%; border-radius: 3px; background: #9cbd71; }
.currency-cards { display: flex; flex-wrap: wrap; gap: 10px; }
.currency-card { min-width: 190px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfb; }
.currency-card small { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.currency-card strong { font-size: 19px; font-variant-numeric: tabular-nums; }
.footnote { margin-top: 15px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 9px 0 20px; }
.section-head .eyebrow { margin-bottom: 6px; }
.section-head h2 { color: var(--ink-strong); font-size: 25px; letter-spacing: -.03em; }
.section-head p:last-child { margin-top: 7px; color: var(--muted); font-size: 12px; }
.search { min-width: 260px; }
.table-select { display: flex; flex-wrap: wrap; gap: 8px; }
.table-select select { max-width: 260px; }
.table-panel { padding: 0; overflow-x: auto; }
.table-panel table { width: 100%; min-width: 700px; border-collapse: collapse; }
.table-panel th { padding: 13px 17px; border-bottom: 1px solid var(--line); background: #f8faf9; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-align: left; white-space: nowrap; }
.table-panel td { max-width: 300px; padding: 12px 17px; border-bottom: 1px solid var(--line-soft); color: var(--ink); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-panel tbody tr:hover td { background: #f7faf8; }
.badge { display: inline-block; padding: 4px 7px; border-radius: 4px; background: #e7f2e4; color: #35644a; font-size: 10px; font-weight: 700; }
.badge.warn { background: #fff0dd; color: #845414; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 13px 17px; color: var(--muted); font-size: 11px; }
.pager button { padding: 5px 2px; border: 0; background: transparent; color: var(--blue); font-size: 11px; font-weight: 700; }
.empty { padding: 38px 18px; color: var(--muted); font-size: 12px; text-align: center; }
.single-company-note { display: flex; justify-content: space-between; gap: 12px; margin-top: 17px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: #f8faf9; font-size: 12px; }
.single-company-note span { color: var(--muted); }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: #fff; }
.login-card { width: min(390px, calc(100% - 40px)); margin: auto; }
.login-card .brand-mark { margin-bottom: 34px; }
.login-card .eyebrow { margin-bottom: 10px; }
.login-card h1 { color: var(--ink-strong); font-size: clamp(30px, 3vw, 39px); letter-spacing: -.05em; line-height: 1.13; }
.muted { margin-top: 13px; margin-bottom: 26px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.login-card label { display: block; margin: 14px 0; color: var(--ink); font-size: 12px; font-weight: 700; }
.login-card input { display: block; width: 100%; min-height: 43px; margin-top: 7px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.primary { width: 100%; min-height: 43px; margin-top: 13px; padding: 10px 14px; border: 0; border-radius: 6px; background: var(--nav); color: #fff; font-size: 13px; font-weight: 700; }
.primary:hover { background: #244458; }
.error { min-height: 19px; margin-top: 10px; color: #9d3030; font-size: 12px; }
.login-art { position: relative; display: flex; align-items: flex-end; padding: 10%; overflow: hidden; background: var(--nav); color: #fff; }
.orbit { position: absolute; top: -170px; right: -90px; width: 580px; height: 580px; border: 1px solid #365164; border-radius: 50%; }
.orbit-b { top: -85px; right: 10px; width: 390px; height: 390px; border-color: #6a816c; }
.art-copy { position: relative; }
.art-copy span { color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.art-copy strong { display: block; margin-top: 17px; font-size: clamp(43px, 5vw, 78px); letter-spacing: -.055em; line-height: 1.08; }
@media (max-width: 1150px) {
  #app { grid-template-columns: 72px minmax(0, 1fr); }
  .sidebar { padding-inline: 10px; }
  .brand { padding-inline: 5px; justify-content: center; }
  .brand > div:last-child, .sidebar nav span, .sidebar-bottom { display: none; }
  .sidebar nav button { justify-content: center; font-size: 20px; }
  .account-copy { display: none; }
  .grid { grid-template-columns: 1fr; }
}
@media (max-width: 750px) {
  #app { display: block; padding-bottom: 70px; }
  .sidebar { position: fixed; z-index: 20; top: auto; right: 0; bottom: 0; left: 0; width: auto; height: 66px; padding: 5px 8px; border-top: 1px solid #315066; }
  .sidebar .brand, .sidebar-bottom { display: none; }
  .sidebar nav { display: flex; align-items: stretch; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .sidebar nav button { flex: 1 0 74px; flex-direction: column; justify-content: center; gap: 2px; padding: 4px 3px; border: 0; border-radius: 6px; font-size: 18px; }
  .sidebar nav span { display: inline; font-size: 9px; line-height: 1.1; text-align: center; white-space: nowrap; }
  .sidebar nav button.active { box-shadow: inset 0 -2px var(--accent); }
  .topbar { min-height: 0; flex-wrap: wrap; gap: 16px; padding: 18px 20px; }
  .topbar h1 { font-size: 22px; }
  .top-controls { width: 100%; gap: 10px; }
  .company-identity { flex: 1; min-width: 0; }
  .company-identity strong { overflow: hidden; text-overflow: ellipsis; }
  .content { min-height: 0; padding: 18px 16px 30px; }
  .filterbar { flex-wrap: wrap; }
  .date-filter { flex: 1 1 100%; flex-wrap: wrap; }
  .date-filter span:first-child { flex: 1 1 100%; }
  .date-filter input { min-width: 0; max-width: calc(50% - 20px); }
  .filterbar button { margin-left: auto; }
  .overview-heading { padding: 20px; }
  .source-stamp { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis article { min-height: 122px; padding: 16px; }
  .panel { padding: 18px; }
  .table-panel { padding: 0; }
  .section-head { align-items: stretch; flex-direction: column; }
  .search, .table-select select { width: 100%; min-width: 0; max-width: none; }
  .table-select { width: 100%; }
  .chart { overflow-x: auto; }
  .chart-col { min-width: 33px; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
}
@media (max-width: 390px) {
  .company-identity { padding-inline: 9px; }
  .company-identity strong { font-size: 11px; }
  .avatar { width: 30px; height: 30px; }
  .logout { padding: 7px; }
  .date-filter { gap: 6px; }
  .date-filter input { padding-inline: 6px; font-size: 11px; }
  .kpis { gap: 8px; }
  .kpis strong { font-size: 23px; }
  .panel-head { flex-wrap: wrap; }
}
