:root {
  color-scheme: light;
  --nav: #142039;
  --nav-bright: #233557;
  --canvas: #f4f6fb;
  --card: #fff;
  --text: #16213a;
  --muted: #53627a;
  --subtle: #65748a;
  --border: #e4e9f2;
  --blue: #2959d8;
  --blue-dark: #214bc2;
  --ink-blue: #204ecb;
  --incoming: #3567e6;
  --outgoing: #a4b8ec;
  --green: #087153;
  --amber: #8a540a;
  --red: #aa3249;
  --sidebar-size: 232px;
  font: 100%/1.45 "Aptos", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--canvas); min-width: 320px; }
button, input, select, textarea { color: inherit; font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid #769afa; outline-offset: 3px; }
svg { inline-size: 20px; block-size: 20px; flex: none; vertical-align: middle; }
[hidden] { display: none !important; }
.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip { position: fixed; z-index: 3; top: 1rem; left: 1rem; padding: .6rem 1rem; background: white; color: var(--blue-dark); border-radius: .5rem; }
.positive { color: var(--green); }
.warning { color: var(--amber); }
.negative { color: var(--red) !important; }
.muted { color: var(--muted); }
.number, .metric-value { font-variant-numeric: tabular-nums; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 2;
  width: var(--sidebar-size);
  display: flex;
  flex-direction: column;
  padding: 29px 17px 19px;
  overflow: auto;
  background: var(--nav);
  color: #f8faff;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 4px; width: max-content; }
.brand-mark, .brand-lockup {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.38;
  border-radius: 9px;
  background: #f2f2ec;
}
.brand-mark { flex: 0 0 50px; width: 50px; }
.brand-mark img, .brand-lockup img {
  position: absolute;
  left: 50%;
  top: var(--logo-top);
  width: var(--logo-width);
  height: auto;
  transform: translateX(-50%);
}
.brand-mark { --logo-width: 169%; --logo-top: -20.5%; }
.brand-lockup { --logo-width: 134%; --logo-top: -16.7%; width: 186px; border-radius: 12px; }
.brand strong { display: block; letter-spacing: -.025em; font-size: 1rem; font-weight: 720; }
.brand small { display: block; margin-top: 3px; color: #b9c7e1; font-weight: 650; font-size: .75rem; letter-spacing: .12em; }
.sidebar nav { margin-top: 48px; display: grid; gap: 6px; }
.nav-heading { margin: 0 0 7px 12px; font-size: .75rem; letter-spacing: .13em; color: #a9b7d1; font-weight: 650; }
.nav-catalog-heading { margin-top: 13px; }
.sidebar nav a, .backup-button {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  border-radius: 8px;
  padding: 9px 11px;
  color: #c4d0e7;
  white-space: nowrap;
  font-size: .92rem;
  font-weight: 580;
}
.sidebar nav a:hover, .backup-button:hover { color: #fff; background: #ffffff12; }
.sidebar nav a[aria-current] { background: var(--nav-bright); color: #fff; box-shadow: inset 0 0 0 1px #7f9ff225; font-weight: 670; }
.sidebar nav a[aria-current] svg { color: #a2bafa; }
.nav-count { margin-left: auto; padding: 2px 7px; border-radius: 6px; font-size: .76rem; font-weight: 650; background: #334768; color: #e3ebff; }
.sidebar-end { margin-top: auto; padding-top: 26px; }
.backup-button { background: transparent; border: 0; width: 100%; text-align: left; margin-bottom: 13px; }
.workspace { border-top: 1px solid #3d4a65; display: flex; align-items: center; gap: 10px; padding: 16px 2px 0; }
.workspace-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: #263b58; color: #aadacb; }
.workspace-icon svg { width: 17px; height: 17px; }
.workspace strong, .workspace small { display: block; }
.workspace strong { font-weight: 650; font-size: .875rem; }
.workspace small { color: #b9c7e1; font-size: .75rem; margin-top: 1px; }
.shell { margin-left: var(--sidebar-size); }
.topbar {
  height: 65px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 2.4vw, 40px);
}
.breadcrumbs { display: flex; align-items: center; gap: 10px; font-size: .875rem; font-weight: 670; }
.breadcrumb-parent { color: var(--muted); font-weight: 500; }
.crumb-icon { color: #77869d; }
.crumb-icon svg { width: 14px; height: 14px; }
.account { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #e9efff; color: #234dbb; font-size: .78rem; font-weight: 780; }
.account-menu { position: relative; }
.account-menu summary { cursor: pointer; display: flex; align-items: center; gap: 9px; padding: 2px 6px; border-radius: 8px; list-style: none; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary:hover { background: #f1f5ff; }
.account-name { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; font-size: .875rem; }
.account-popover { position: absolute; right: 0; top: calc(100% + 8px); z-index: 3; min-width: 215px; max-width: min(310px, 86vw); padding: 7px; border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: 0 10px 30px #17274529; }
.account-info { padding: 6px 9px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; overflow-wrap: anywhere; }
.account-info strong, .account-info small { display: block; }
.account-info strong { font-size: .88rem; }
.account-info small { margin-top: 2px; color: var(--muted); }
.account-popover :is(button, a) { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; padding: 8px 9px; border-radius: 7px; font-size: .875rem; text-align: left; }
.account-popover :is(button, a):hover { color: var(--blue-dark); background: #eef3fe; }
.account-popover svg { width: 16px; height: 16px; }
main { max-width: 1630px; margin: 0 auto; padding: 30px clamp(20px, 2.4vw, 40px) 44px; }
main:focus { outline: 0; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 2.25vw, 2.25rem); font-weight: 760; line-height: 1.16; letter-spacing: -.045em; }
.page-heading p { color: var(--muted); font-size: 1rem; margin-top: 7px; }
.page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; flex: none; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; min-height: 42px; border: 1px solid transparent; border-radius: 8px; font-size: .875rem; font-weight: 670; white-space: nowrap; }
.button svg { width: 18px; height: 18px; }
.primary { color: #fff; background: var(--blue); box-shadow: 0 2px 4px #1c48bf2b; }
.primary:hover:not(:disabled) { background: var(--blue-dark); }
.secondary { background: #fff; border-color: #dce3ef; color: #3b4a63; }
.secondary:hover:not(:disabled), .icon-button:hover:not(:disabled) { background: #eef3fe; border-color: #cddbf9; color: var(--blue-dark); }
select, .search-field, input:not([type="search"]), textarea {
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background-color: #fff;
}
select {
  appearance: none;
  min-height: 40px;
  padding: 8px 31px 8px 11px;
  font-size: .875rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2353627a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 10px center;
  background-repeat: no-repeat;
}
.period-select { display: flex; flex: auto; align-items: center; position: relative; }
.period-select svg { position: absolute; left: 12px; color: var(--muted); pointer-events: none; width: 17px; height: 17px; }
.period-select select { padding-left: 36px; min-height: 42px; width: 100%; font-weight: 620; color: #3a4963; }
.compact-select { min-height: 35px; background-color: #fbfcff; color: #40516e; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.metric, .card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: 0 2px 4px #24385f05, 0 5px 12px #24385f03;
}
.metric { position: relative; display: flex; flex-direction: column; padding: 16px 16px 14px; min-height: 127px; }
.metric-top { display: flex; align-items: center; gap: 9px; }
.metric-top h2 { color: #4a5971; font-size: .88rem; font-weight: 680; line-height: 1.2; }
.metric-icon { display: grid; place-items: center; flex: 0 0 32px; height: 32px; border-radius: 8px; }
.metric-icon svg { width: 17px; height: 17px; }
.metric-icon.blue { color: #244fcd; background: #eaf0ff; }
.metric-icon.green { color: #087153; background: #e5f5ed; }
.metric-icon.amber { color: #8a540a; background: #fff1df; }
.metric-icon.violet { color: #6450ab; background: #f0ebff; }
.metric-value { font-size: clamp(1.26rem, 2.03vw, 1.9rem); display: block; letter-spacing: -.047em; line-height: 1.15; margin-top: 11px; font-weight: 760; overflow-wrap: anywhere; }
.metric-foot { color: var(--muted); font-size: .79rem; margin-top: 7px; }
.metric-foot strong, .metric-foot span { font-weight: 690; }
.metric-featured { border-color: #2855d0; background: linear-gradient(120deg, #214bc6 1%, #2d5bdb 100%); color: white; box-shadow: 0 4px 10px #2855d027; }
.metric-featured .metric-icon { color: white; background: #ffffff23; }
.metric-featured .metric-top h2, .metric-featured .metric-foot { color: #edf3ff; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.58fr) minmax(0, 1fr); gap: 18px; margin-bottom: 20px; }
.dashboard-grid.lower { margin-bottom: 0; align-items: start; }
.card { min-width: 0; }
.card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 19px 15px; }
.card-heading h2 { font-size: 1.12rem; line-height: 1.24; font-weight: 735; letter-spacing: -.025em; }
.card-heading p { color: var(--muted); font-size: .84rem; margin-top: 5px; }
.chart-card { display: flex; flex-direction: column; }
.chart-scroll { overflow-x: auto; margin-top: 8px; padding: 8px 20px 0 16px; }
.chart { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 12px; min-width: calc(57px + (var(--groups) * 44px)); height: 200px; }
.axis { display: flex; flex-direction: column; justify-content: space-between; align-items: end; padding-bottom: 27px; color: var(--subtle); font-size: .75rem; line-height: 1; }
.plot { position: relative; min-width: 0; margin-top: 5px; }
.grid-lines { position: absolute; inset: 0 0 33px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.grid-lines i { border-top: 1px dashed #e0e7f5; }
.grid-lines i:last-child { border-top: 1px solid #dce4f1; }
.series { display: grid; grid-template-columns: repeat(var(--groups), minmax(0, 1fr)); height: 100%; position: relative; }
.bar-group { display: flex; min-width: 0; position: relative; flex-direction: column; align-items: center; border-radius: 5px; }
.bar-pair { display: flex; justify-content: center; align-items: end; gap: clamp(3px, .55vw, 8px); height: calc(100% - 33px); width: 100%; }
.bar { height: var(--height); width: 28%; max-width: 30px; border-radius: 5px 5px 0 0; display: block; }
.bar-in { background: var(--incoming); }
.bar-out { background: var(--outgoing); }
.bar-label { color: var(--muted); font-size: .75rem; margin-top: 8px; text-transform: capitalize; white-space: nowrap; }
.chart-tooltip {
  background: #182645;
  box-shadow: 0 6px 15px #1420393d;
  border-radius: 8px;
  color: #fff;
  display: none;
  font-size: .78rem;
  line-height: 1.4;
  padding: 8px 10px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 1;
}
.bar-group:first-child .chart-tooltip { left: 0; transform: none; }
.bar-group:last-child:not(:first-child) .chart-tooltip { left: auto; right: 0; transform: none; }
.chart-tooltip span, .chart-tooltip strong { display: block; }
.bar-group:hover .chart-tooltip, .bar-group:focus-visible .chart-tooltip { display: block; }
.chart-footer { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 3px 19px 15px; color: var(--muted); font-size: .83rem; }
.chart-footer small { margin-left: auto; font-size: .75rem; color: var(--subtle); }
.legend, .composition-label span { display: flex; align-items: center; gap: 7px; }
.dot { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 3px; display: inline-block; }
.dot.incoming { background: var(--incoming); }
.dot.outgoing { background: var(--outgoing); }
.dot.amber { background: #efb85f; }
.category-card { display: flex; flex-direction: column; }
.category-list { padding: 0 19px 8px; display: grid; gap: 10px; }
.category-title, .category-footer { display: flex; justify-content: space-between; align-items: baseline; gap: 9px; font-size: .875rem; }
.category-title span { color: #40516a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-title strong, .category-footer strong { white-space: nowrap; font-weight: 690; font-variant-numeric: tabular-nums; }
.category-track { height: 5px; border-radius: 7px; background: #edf1f9; margin-top: 5px; }
.category-track i {
  display: block;
  width: var(--width);
  height: 100%;
  border-radius: 7px;
  background: hsl(223 72% min(71%, calc(50% + var(--category) * 4%)));
}
.category-footer { margin-top: auto; padding: 11px 19px 13px; border-top: 1px solid var(--border); color: var(--muted); }
.category-footer strong { color: var(--text); }
.composition-card .category-footer { margin-top: 7px; }
.status-group { padding: 3px 19px 9px; font-size: .875rem; }
.status-group + .status-group { padding-top: 12px; }
.composition-bar { display: flex; background: #edf1f9; border-radius: 8px; height: 8px; overflow: hidden; margin: 7px 0 8px; }
.composition-bar i { width: var(--width); background: var(--incoming); }
.composition-bar i + i { background: #efb85f; }
.composition-label { display: flex; justify-content: space-between; gap: 8px; margin: 5px 0; color: var(--muted); }
.composition-label strong { color: var(--text); font-weight: 660; white-space: nowrap; }
.text-link { color: var(--ink-blue); font-size: .875rem; font-weight: 680; padding: 3px 0 0; white-space: nowrap; border: 0; background: transparent; }
.text-link:hover, .record-link:hover { color: var(--blue-dark); text-decoration: underline; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; }
.ledger-table { min-width: 755px; }
.project-table { min-width: 970px; }
.dre-heading { flex-wrap: wrap; }
.dre-heading p { overflow-wrap: anywhere; }
.dre-table th:first-child { overflow-wrap: anywhere; }
.dre-table .dre-detail th { padding-left: 34px; font-weight: 450; color: var(--muted); }
.dre-table .dre-detail td { font-weight: 500; }
.dre-table .dre-section { background: #f6f8fd; font-weight: 710; }
.dre-table .dre-subtotal { background: #f3f6fd; font-weight: 710; }
.dre-table .dre-total { font-size: .95rem; }
.dre-table .dre-profit td { color: var(--green); }
.dre-table .dre-loss td { color: var(--red); }
.dre-table .dre-margin { color: var(--muted); font-size: .83rem; }
.dre-note { padding: 12px 19px; color: var(--muted); font-size: .82rem; }
.recent-table { min-width: 450px; }
thead tr { background: #f7f9fd; }
th, td { padding: 11px 11px; border-bottom: 1px solid #eaf0f7; vertical-align: middle; }
thead th { color: #53637a; font-size: .79rem; font-weight: 690; line-height: 1.28; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 19px; }
th:last-child, td:last-child { padding-right: 19px; }
tbody tr:hover { background: #fbfcff; }
tbody td { color: #3f4f68; }
tbody td.number { font-weight: 650; }
tbody td small { display: block; font-size: .76rem; color: var(--subtle); margin-top: 3px; }
tbody td:first-child { min-width: 145px; }
tbody td:first-child small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: min(34vw, 285px); }
tfoot { background: #f3f6fd; font-weight: 730; }
tfoot td, tfoot th { border-bottom: 0; }
.number { text-align: right; white-space: nowrap; }
.record-link { color: var(--text); border: 0; background: transparent; padding: 0; text-align: left; font-weight: 670; overflow-wrap: anywhere; }
.recent-table td, .recent-table th { padding-top: 8px; padding-bottom: 8px; }
.recent-card tbody tr:last-child td { border-bottom: 0; }
.badge { border-radius: 6px; padding: 3px 7px; display: inline-flex; align-items: center; gap: 5px; font-size: .77rem; white-space: nowrap; font-weight: 690; }
.badge i { display: block; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.badge-settled { color: #0c7154; background: #e7f6ee; }
.badge-pending { color: #845210; background: #fff2da; }
.type-label.in { color: var(--green); font-weight: 640; }
.filters { display: grid; grid-template-columns: minmax(175px, 1fr) max-content max-content minmax(154px, 225px); padding: 0 19px 15px; gap: 9px; align-items: center; }
.filters:has(#filter-project):not(:has(#filter-status)) { grid-template-columns: minmax(175px, 1fr) max-content minmax(154px, 225px); }
.settlement-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  column-gap: 9px;
  row-gap: 8px;
  padding: 0 19px 15px;
}
.settlement-filters label { display: grid; gap: 4px; color: var(--muted); font-size: .82rem; font-weight: 650; }
.settlement-filters input { min-height: 40px; padding: 7px 10px; width: 145px; min-width: 0; font-size: .875rem; }
.settlement-filters input:disabled { background-color: #f6f8fc; color: #63728a; }
.settlement-filters .button { min-height: 40px; }
.filters input, .filters select { width: 100%; text-overflow: ellipsis; }
.search-field { min-height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 10px; min-width: 0; }
.search-field:focus-within { outline: 3px solid #769afa; outline-offset: 2px; }
.search-field svg { width: 17px; height: 17px; color: var(--subtle); }
.search-field input { outline: none; border: none; color: var(--text); min-width: 0; background: transparent; font-size: .875rem; }
.table-actions, .pagination > div { display: flex; justify-content: end; align-items: center; gap: 6px; }
.icon-button { width: 33px; height: 33px; display: inline-grid; flex: 0 0 33px; place-items: center; border: 1px solid #dfe6f2; border-radius: 7px; color: #526786; background: #fff; padding: 0; }
.icon-button svg { width: 16px; height: 16px; }
.pagination { min-height: 56px; padding: 10px 19px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: .82rem; }
.pagination > div { gap: 10px; }
.empty { color: var(--muted); padding: 22px 19px; font-size: .92rem; }
.large-empty { text-align: center; padding: 50px 15px; background: #fbfcff; border-block: 1px solid var(--border); }
.notice { padding: 11px 12px; border-radius: 8px; background: #fff6e7; color: #754b13; margin: 0 19px 14px; display: flex; align-items: center; gap: 8px; font-size: .88rem; }
.notice svg { width: 17px; height: 17px; }
.report-card { overflow: hidden; }
.page-error, .loading { padding: 24px; color: var(--muted); }
.page-error p { margin: 8px 0 14px; }

.analysis-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px 12px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: .875rem;
}
.analysis-filters label { color: var(--text); font-weight: 670; }
.analysis-filters select { max-width: min(100%, 330px); text-overflow: ellipsis; }
.analysis-filters p { margin-left: auto; }
.analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}
.analysis-grid:last-child { margin-bottom: 0; }
.analysis-top { grid-template-columns: minmax(0, 1.58fr) minmax(0, 1fr); }
.analysis-card { display: flex; flex-direction: column; }
.analysis-card .card-heading { padding-bottom: 14px; }
.analysis-blue { background: #2659d4; }
.analysis-violet { background: #8052bf; }
.analysis-green { background: #208368; }
.analysis-red { background: #c84a62; }
.analysis-orange { background: #cc791b; }
.analysis-empty { margin: auto 0; padding-block: 24px 32px; }
.analysis-note, .analysis-footer {
  border-top: 1px solid var(--border);
  padding: 10px 19px 13px;
  margin-top: auto;
  font-size: .79rem;
  color: var(--muted);
}
.analysis-footer { display: flex; gap: 8px 15px; flex-wrap: wrap; }

.balance-reading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0 19px 8px;
  padding: 9px 11px;
  border-radius: 7px;
  background: #f2f5fc;
  font-size: .8rem;
  color: var(--muted);
}
.balance-reading > span { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 3px 6px; }
.balance-reading strong { color: var(--text); font-variant-numeric: tabular-nums; }
.balance-reading > strong { text-transform: capitalize; }
.balance-reading .dot { width: 7px; height: 7px; flex-basis: 7px; }
.balance-scroll { overflow-x: auto; margin-inline: 19px; }
.balance-grid {
  --plot-height: 165px;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px;
  padding: 3px 0 4px;
  min-width: calc(80px + var(--points) * 47px);
}
.balance-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: end;
  height: var(--plot-height);
  padding-block: 2px;
  color: var(--subtle);
  font-size: .75rem;
  line-height: 1;
}
.balance-plot { position: relative; }
.balance-plot canvas { position: absolute; inset: 0 auto auto 0; width: 100%; height: var(--plot-height); pointer-events: none; }
.balance-periods { position: relative; display: grid; grid-template-columns: repeat(var(--points), minmax(0, 1fr)); }
.balance-periods button {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  height: calc(var(--plot-height) + 24px);
  padding: 0 2px 3px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: .75rem;
  text-transform: capitalize;
  white-space: nowrap;
}
.balance-periods button[aria-pressed="true"] { color: var(--ink-blue); font-weight: 730; }
.balance-periods button:focus-visible { outline-offset: -2px; }
.balance-card .analysis-note { margin-top: 7px; }

.cost-mix {
  margin: auto 0;
  padding: 12px 19px 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-evenly;
  gap: 16px;
}
.cost-ring {
  flex: 0 0 clamp(130px, 12vw, 177px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#2659d4 0 var(--share), #8052bf var(--share) 100%);
}
.cost-ring > div {
  width: 83%;
  height: 83%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  border-radius: 50%;
  background: var(--card);
}
.cost-ring small, .cost-key small { color: var(--muted); font-size: .75rem; }
.cost-ring strong { font-size: clamp(.86rem, 1.32vw, 1.16rem); letter-spacing: -.035em; overflow-wrap: anywhere; }
.cost-key { display: grid; gap: 14px; font-size: .875rem; }
.cost-key strong { display: block; margin-top: 2px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.analysis-rows { list-style: none; display: grid; gap: 11px; margin: 0; padding: 0 19px 16px; }
.analysis-row-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: .875rem; }
.analysis-row-title strong { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.analysis-row-note { display: block; margin-top: 3px; color: var(--muted); font-size: .76rem; }
.analysis-track { position: relative; height: 7px; overflow: hidden; background: #edf1f9; border-radius: 8px; margin-top: 5px; }
.analysis-track i { display: block; width: var(--width); height: 100%; flex: none; border-radius: inherit; }
.stacked-track { display: flex; }
.stacked-track i { border-radius: 0; }
.result-track::before { content: ""; position: absolute; left: var(--zero); height: 100%; width: 1px; background: #a0afca; }
.result-track i { position: absolute; left: var(--zero); }
.result-track i.analysis-red { left: calc(var(--zero) - var(--width)); }
.concentration-note { display: flex; justify-content: space-between; gap: 10px; }
.concentration-note span:last-child { color: var(--ink-blue); font-weight: 650; }

.maturity-chart { padding: 0 19px 18px; font-size: .875rem; }
.maturity-heading, .maturity-row {
  display: grid;
  grid-template-columns: minmax(78px, 1.05fr) repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 8px 12px;
}
.maturity-heading { color: var(--muted); font-size: .79rem; }
.maturity-row { border-top: 1px solid var(--border); padding: 8px 0; margin-top: 3px; }
.maturity-row strong { font-weight: 650; }
.maturity-row span { font-variant-numeric: tabular-nums; }
.maturity-row .analysis-track { height: 5px; margin-top: 4px; }

.access-layout { display: grid; grid-template-columns: minmax(340px, .88fr) minmax(0, 1.12fr); padding: 0; max-width: none; min-height: 100vh; }
.access-brand {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  gap: 28px;
  padding: clamp(28px, 5vw, 74px);
  background: radial-gradient(ellipse at 20% 82%, #234581 0%, #172646 49%, #111c34 100%);
  color: white;
}
.access-brand::before, .access-brand::after {
  content: "";
  position: absolute;
  z-index: -1;
  bottom: -30vw;
  left: 24%;
  width: 66vw;
  aspect-ratio: 1;
  border: 1px solid #a9bde82f;
  border-radius: 22%;
  transform: rotate(-33deg);
  pointer-events: none;
}
.access-brand::after { width: 62vw; left: 28%; border-color: #a9bde81e; }
.access-brand-content { max-width: 425px; }
.access-brand-content p:first-child { font-size: clamp(2.3rem, 4.25vw, 4.2rem); font-weight: 760; line-height: 1.02; letter-spacing: -.055em; }
.access-brand-content p + p { max-width: 30ch; margin-top: 16px; color: #d4e2fb; font-size: clamp(1rem, 1.25vw, 1.13rem); }
.access-environment { display: flex; align-items: center; gap: 8px; color: #d4e2fb; font-size: .875rem; }
.access-environment svg { color: #a5bfed; }
.access-content { display: grid; place-items: center; padding: 37px 24px; background: #f8faff; }
.access-panel { width: min(100%, 460px); padding: clamp(22px, 3.1vw, 42px); background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 11px 30px #24385f0a; }
.access-symbol { display: grid; place-items: center; width: 44px; height: 44px; background: #eaf0ff; color: var(--blue-dark); border-radius: 12px; margin-bottom: 15px; }
.access-panel h1 { font-size: clamp(1.65rem, 3.2vw, 2.12rem); }
.access-panel > p { margin: 8px 0 19px; color: var(--muted); }
.access-panel > p.form-error { color: #8e2339; }
.access-panel form, .account-fields { display: grid; gap: 12px; }
.account-field { display: block; color: var(--text); min-width: 0; font-size: .875rem; font-weight: 680; }
.account-field input, .account-field select { width: 100%; min-height: 42px; display: block; margin-top: 4px; padding: 8px 10px; font-size: 1rem; font-weight: 430; }
.account-field select { padding-right: 29px; }
.account-field input:disabled, .account-field select:disabled { background-color: #f5f7fb; color: var(--muted); }
.account-field small { display: block; margin-top: 4px; color: var(--muted); font-weight: 450; font-size: .79rem; }
.password-field { position: relative; }
.password-field input { padding-right: 42px; }
.password-toggle { position: absolute; top: 6px; right: 5px; width: 31px; height: 31px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.password-toggle:hover { background: #eef3fe; color: var(--blue-dark); }
.password-toggle svg { width: 18px; height: 18px; }
.auth-submit { margin-top: 5px; width: 100%; min-height: 45px; }
.auth-exit { margin-top: 12px; }
.access-site-link { display: block; width: fit-content; margin: 12px auto 0; }
.user-form-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.directory { margin-bottom: 18px; }
.directory .card-heading { align-items: center; }
.users-table { min-width: 590px; }
.users-table tbody tr:last-child td { border-bottom: 0; }
.user-identity { display: flex; align-items: center; gap: 9px; }
.user-identity .account { flex: 0 0 34px; }
.user-identity strong, .user-identity div > span { display: block; overflow-wrap: anywhere; }
.user-identity strong { color: var(--text); }
.user-identity div > span { color: var(--muted); font-size: .8rem; }
.user-identity strong small { display: inline; margin-left: 7px; font-weight: 450; white-space: nowrap; }
.role-label { display: inline-flex; padding: 4px 7px; border-radius: 7px; background: #edf1f7; color: #40516b; font-weight: 680; white-space: nowrap; }
.role-admin { background: #eaefff; color: #244da6; }
.role-finance { background: #f2edff; color: #674397; }
.badge-inactive { background: #f2f4f8; color: #53627a; }
.permissions-card dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0 19px 19px; }
.permissions-card dl > div { background: #f6f8fd; border: 1px solid #edf1f7; border-radius: 8px; padding: 10px 12px; }
.permissions-card dt { font-weight: 700; font-size: .9rem; }
.permissions-card dd { margin: 3px 0 0; color: var(--muted); font-size: .84rem; }
.catalog-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 0 19px 15px; }
.catalog-filters .search-field { flex: 1 1 240px; }
.catalog-filters input { width: 100%; }
.catalog-table { min-width: 520px; }
.work-catalog { min-width: 645px; }
.catalog-table td { overflow-wrap: anywhere; }
.catalog-table tbody tr:last-child td { border-bottom: 0; }
.catalog-count { border-top: 1px solid var(--border); padding: 11px 19px; color: var(--muted); font-size: .82rem; }
.catalog-mobile-label { display: none; }
.direction-in { background: #e7f6ee; color: #0c7154; }
.direction-out { background: #fff2da; color: #845210; }
.direction-both { background: #edf0ff; color: #354ea0; }
.catalog-fields textarea { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; resize: vertical; font-weight: 430; }
.catalog-fields label > span { color: var(--muted); font-weight: 450; }

.modal {
  width: min(590px, calc(100% - 30px));
  max-height: calc(100% - 24px);
  border: 1px solid var(--border);
  border-radius: 15px;
  color: var(--text);
  padding: 0;
  background: white;
  box-shadow: 0 25px 65px #101b3b4d;
}
.modal::backdrop { background: #12234181; }
.modal-heading, .modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; background: #fff; }
.modal-heading { border-bottom: 1px solid var(--border); }
.modal-heading h2 { font-size: 1.29rem; letter-spacing: -.025em; }
.modal-heading p { color: var(--muted); margin-top: 3px; font-size: .875rem; }
.modal-footer { border-top: 1px solid var(--border); position: sticky; bottom: 0; }
.footer-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.form-body { padding: 15px 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.form-grid label { display: block; font-size: .875rem; font-weight: 660; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea {
  font-size: 1rem;
  font-weight: 400;
  display: block;
  min-height: 39px;
  margin-top: 4px;
  padding: 7px 10px;
  width: 100%;
  min-width: 0;
}
.form-grid select { padding-right: 29px; }
.form-grid textarea { resize: vertical; }
.form-grid .optional { font-weight: 400; color: var(--subtle); }
.form-total { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-top: 12px; padding: 9px 12px; color: #213f8b; background: #eef3ff; border-radius: 8px; font-size: .9rem; }
.form-total strong { font-size: 1.1rem; }
.form-error { margin-top: 10px; color: #8e2339; background: #fcecf0; padding: 8px 11px; border-radius: 6px; font-size: .875rem; }
.confirm-modal { max-width: 442px; }
.danger { background: #a6263e; color: #fff; }
.danger:hover:not(:disabled) { background: #8c1d32; }
.delete-button { background: #fff; color: #a6263e; padding-left: 2px; }
.delete-button:hover { text-decoration: underline; }
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: calc(100% - 40px);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #cce5db;
  color: #155642;
  background: #f2fff9;
  border-radius: 10px;
  padding: 11px 16px;
  box-shadow: 0 8px 24px #172a462a;
  font-size: .9rem;
}

@media (max-width: 1170px) {
  :root { --sidebar-size: 208px; }
  .metrics { gap: 11px; }
  .metric { padding-right: 11px; padding-left: 11px; }
  .dashboard-grid { gap: 13px; }
  .page-actions { flex-shrink: 1; justify-content: end; }
}
@media (max-width: 1020px) {
  .page-heading { flex-wrap: wrap; }
  .page-actions { justify-content: start; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .analysis-top { grid-template-columns: 1fr; }
  .analysis-filters p { margin-left: 0; }
  .metric-value { font-size: 1.36rem; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters, .filters:has(#filter-project):not(:has(#filter-status)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .sidebar { position: static; display: block; width: auto; padding: 13px 12px 7px; }
  .brand { padding: 0 3px; gap: 8px; }
  .brand-mark { width: 43px; flex-basis: 43px; border-radius: 7px; }
  .brand small { margin-top: 0; }
  .sidebar nav { margin-top: 11px; display: flex; flex-wrap: wrap; gap: 4px; }
  .nav-heading, .workspace { display: none; }
  .sidebar nav a { gap: 5px; padding: 6px 8px; min-height: 37px; font-size: .875rem; }
  .sidebar nav a svg { width: 14px; height: 14px; }
  .nav-count { display: none; }
  .sidebar-end { padding: 0; position: absolute; right: 10px; top: 13px; }
  .backup-button { min-height: 32px; padding: 5px 6px; margin: 0; font-size: .8rem; gap: 4px; }
  .backup-button svg { width: 15px; height: 15px; }
  .shell { margin-left: 0; }
  .topbar { height: 43px; padding-inline: 14px; }
  .account { width: 29px; height: 29px; }
  .account-name { display: none; }
  .access-layout { display: block; padding: 0; }
  .access-brand { flex-direction: row; align-items: center; justify-content: flex-start; min-height: auto; gap: 14px; padding: 18px 20px; }
  .access-brand .brand-lockup { flex: none; width: clamp(88px, 24vw, 138px); }
  .access-brand-content p:first-child { font-size: clamp(1.2rem, 5vw, 1.7rem); }
  .access-brand-content p + p, .access-environment { display: none; }
  .access-content { padding: 18px 13px 25px; }
  main { padding: 22px 13px 30px; }
  .page-heading { gap: 13px; margin-bottom: 16px; }
  .page-heading p { font-size: .92rem; }
  .page-actions { width: 100%; }
  .page-actions .button { padding-inline: 10px; }
  .metrics { gap: 9px; margin-bottom: 14px; }
  .metric { padding: 11px; min-height: 115px; }
  .metric-icon { flex-basis: 27px; height: 27px; }
  .metric-icon svg { width: 15px; height: 15px; }
  .metric-top { gap: 6px; }
  .metric-top h2 { font-size: .81rem; }
  .metric-value { font-size: 1.27rem; }
  .dashboard-grid { gap: 13px; margin-bottom: 13px; }
  .analysis-grid { grid-template-columns: 1fr; gap: 13px; margin-bottom: 13px; }
  .analysis-filters { gap: 5px 9px; }
  .analysis-filters label, .analysis-filters select { width: 100%; }
  .analysis-filters p { font-size: .79rem; }
  .analysis-note, .analysis-footer, .analysis-rows, .maturity-chart, .cost-mix { padding-inline: 13px; }
  .balance-reading, .balance-scroll { margin-inline: 13px; }
  .balance-reading { gap: 3px 10px; }
  .balance-reading > strong { flex-basis: 100%; }
  .card-heading { padding: 15px 13px 12px; }
  .card-heading h2 { font-size: 1.05rem; }
  .chart-scroll { padding-inline: 12px; }
  .chart-footer { padding-inline: 13px; }
  .filters, .filters:has(#filter-project):not(:has(#filter-status)) { padding-inline: 13px; }
  .settlement-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 13px; }
  .settlement-filters label:first-child, .settlement-filters .button { grid-column: 1 / -1; }
  .settlement-filters input, .settlement-filters select { width: 100%; }
  .search-field { grid-column: 1 / -1; }
  th:first-child, td:first-child { padding-left: 13px; }
  th:last-child, td:last-child { padding-right: 13px; }
  .dre-table .dre-detail th { padding-left: 24px; }
  .dre-note { padding-inline: 13px; }
  tbody td:first-child small { max-width: 165px; }
  .pagination { padding-inline: 13px; }
  .form-body, .modal-heading, .modal-footer { padding-inline: 13px; }
  .permissions-card dl { grid-template-columns: 1fr; padding-inline: 13px; }
  .catalog-filters { padding-inline: 13px; }
  .modal-footer .button { padding-inline: 8px; }
  .modal-footer .button svg { display: none; }
}
@media (max-width: 500px) {
  .sidebar nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
  .sidebar nav a { font-size: .81rem; padding-inline: 7px; white-space: normal; }
  .sidebar nav a [data-icon] { display: none; }
  .users-table { min-width: 0; }
  .users-table thead { position: absolute; height: 1px; width: 1px; overflow: hidden; clip-path: inset(50%); }
  .users-table tbody { display: block; }
  .users-table tbody tr { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto; align-items: start; gap: 8px; padding: 12px 13px; border-top: 1px solid var(--border); }
  .users-table tbody td { min-width: 0; border: 0; padding: 0; }
  .users-table tbody td:first-child { grid-column: 1 / 3; }
  .users-table tbody td:last-child { grid-area: 1 / 3 / 3 / 4; align-self: start; }
  .users-table .user-identity { min-width: 0; }
  .catalog-table { min-width: 0; }
  .catalog-table thead { position: absolute; height: 1px; width: 1px; overflow: hidden; clip-path: inset(50%); }
  .catalog-table tbody { display: block; }
  .catalog-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: start; padding: 11px 13px; border-top: 1px solid var(--border); }
  .catalog-editable tbody tr { grid-template-columns: repeat(2, minmax(0, 1fr)) 33px; }
  .catalog-table tbody td { padding: 0; min-width: 0; border: 0; }
  .catalog-table tbody td:first-child { grid-column: 1 / 3; }
  .catalog-editable tbody td:last-child { grid-area: 1 / 3 / 3 / 4; }
  .catalog-table tbody td.number:not(:last-child), .catalog-table:not(.catalog-editable) tbody td.number { text-align: left; }
  .catalog-mobile-label { display: block; color: var(--muted); font-size: .76rem; font-weight: 450; }
  .catalog-filters .search-field { flex-basis: 100%; }
  .catalog-filters select { max-width: 100%; }
}
@media (max-width: 350px) {
  .sidebar nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
