@font-face{font-family:Roboto;src:url("./vendor/roboto-cyrillic-400-normal.woff2") format("woff2");font-weight:400;font-display:swap;unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Roboto;src:url("./vendor/roboto-latin-400-normal.woff2") format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:Roboto;src:url("./vendor/roboto-cyrillic-500-normal.woff2") format("woff2");font-weight:500;font-display:swap;unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Roboto;src:url("./vendor/roboto-latin-500-normal.woff2") format("woff2");font-weight:500;font-display:swap}
@font-face{font-family:Roboto;src:url("./vendor/roboto-cyrillic-600-normal.woff2") format("woff2");font-weight:600;font-display:swap;unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Roboto;src:url("./vendor/roboto-latin-600-normal.woff2") format("woff2");font-weight:600;font-display:swap}
@font-face{font-family:Roboto;src:url("./vendor/roboto-cyrillic-700-normal.woff2") format("woff2");font-weight:700;font-display:swap;unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Roboto;src:url("./vendor/roboto-latin-700-normal.woff2") format("woff2");font-weight:700;font-display:swap}

:root {
  color-scheme: light;
  --text: #222641;
  --subtle: #535b75;
  --muted: #626b82;
  --surface: #fff;
  --canvas: #f7f8fc;
  --line: #e7e9f1;
  --line-strong: #dce0eb;
  --accent: #5046a6;
  --accent-dark: #41388b;
  --accent-soft: #efedfc;
  --accent-line: #dedbf9;
  --green: #087254;
  --green-soft: #e8f6ef;
  --amber: #854b08;
  --amber-soft: #fff2dc;
  --radius: 16px;
  --sidebar: 232px;
  --header: 73px;
  background: var(--canvas);
  color: var(--text);
  font: 16px/1.5 Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; container: finance / inline-size; }
body[data-device="phone"] { width: min(430px, 100%); margin-inline: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent-dark); }
a:hover { text-decoration-thickness: 2px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
input, select, textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  padding: 10px 12px;
  line-height: 1.4;
  transition: border .12s;
}
input:hover, select:hover, textarea:hover { border-color: #b9b4dd; }
input::placeholder, textarea::placeholder { color: #737b91; }
input[type="checkbox"] { width: 17px; min-width: 17px; height: 17px; accent-color: var(--accent); margin: 0; }
input[type="date"] { min-height: 44px; }
select {
  appearance: none;
  padding-right: 35px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23626b82' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
}
textarea { min-height: 64px; resize: vertical; }
svg { display: inline-block; width: 21px; height: 21px; flex: 0 0 auto; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.15; }
h1 { font-size: clamp(1.95rem, 3vw, 2.65rem); letter-spacing: -.045em; margin-bottom: 8px; font-weight: 700; }
h2 { font-size: 1.15rem; margin: 0; letter-spacing: -.015em; }
h3 { font-size: 1rem; margin-bottom: 0; font-weight: 650; }
p { margin-bottom: 12px; }
small { line-height: 1.45; }
strong { font-weight: 650; }
.sr-only { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); border:0; white-space:nowrap; }
.muted { color: var(--muted); }
.positive { color: var(--green) !important; }
.warning-text { color: var(--amber); }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.amount { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 650; }
.text-button { border: 0; color: var(--text); font-weight: 650; padding: 0; background: transparent; text-align: left; }
.text-button:hover { color: var(--accent); text-decoration: underline; }
.subtle-link { font-size: .875rem; font-weight: 550; text-underline-offset: 3px; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  padding: 26px 17px 20px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 3;
}
.brand { display: flex; align-items: center; gap: 11px; user-select: none; }
.sidebar .brand { margin: 0 0 51px 11px; }
.brand-symbol { display: grid; place-items: center; width: 42px; height: 42px; background: var(--accent); color: white; border-radius: 11px; box-shadow: 0 2px 5px #5046a630; }
.brand-symbol svg { width: 34px; height: 34px; }
.brand strong { display: block; font-size: 1.05rem; letter-spacing: .075em; line-height: 1.15; font-weight: 700; }
.brand small { display: block; color: var(--muted); font-size: .62rem; letter-spacing: .22em; line-height: 1.45; font-weight: 600; }
.sidebar nav { display: grid; gap: 5px; }
.nav-item { border: 0; background: transparent; border-radius: 10px; text-align: left; display: flex; gap: 11px; align-items: center; min-height: 46px; padding: 0 12px; color: var(--subtle); font-size: .93rem; font-weight: 500; white-space: nowrap; }
.nav-item:hover { background: var(--canvas); color: var(--accent); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-dark); font-weight: 650; }
.nav-item svg { width: 20px; height: 20px; }
.topbar {
  background: var(--surface); padding: 0 clamp(24px, 3.4vw, 52px); border-bottom: 1px solid var(--line);
  height: var(--header); margin-left: var(--sidebar); display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; z-index: 2;
}
.top-context { color: var(--subtle); font-weight: 600; font-size: .92rem; }
.top-actions { display: flex; align-items: center; gap: 15px; min-width: 0; }
.profile-trigger { margin-left: 3px; border: 0; padding: 0; display: flex; align-items: center; gap: 8px; background: none; font-size: .875rem; font-weight: 650; }
.profile-trigger:hover { color: var(--accent); }
.profile-trigger svg { width: 15px; height: 15px; color: var(--muted); }
.profile-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
.avatar { display: grid; place-items: center; border-radius: 50%; width: 34px; height: 34px; color: var(--accent-dark); background: var(--accent-soft); font-weight: 650; }
.mobile-brand, .mobile-nav { display: none; }
.main { margin-left: var(--sidebar); }
.page { max-width: 1550px; margin-inline: auto; padding: 35px clamp(24px, 3.4vw, 52px) 56px; }
.page-intro { margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.page-intro h1 { margin: 0; }
.page-intro .actions { flex-shrink: 0; }

.button { min-height: 39px; align-items: center; justify-content: center; display: inline-flex; gap: 8px; border: 1px solid transparent; padding: 8px 13px; border-radius: 9px; font-weight: 600; font-size: .875rem; text-decoration: none; line-height: 1.25; transition: background .12s, border-color .12s; text-align: center; }
.button svg { width: 17px; height: 17px; }
.button.primary { padding: 10px 15px; background: var(--accent); color: white; border-color: var(--accent); }
.button.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.button.secondary, .button.period-button { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.button.period-button { color: var(--subtle); font-size: .875rem; }
.button.secondary:hover, .button.period-button:hover { background: var(--canvas); border-color: #c7c3e7; }
.button.quiet { background: transparent; color: var(--accent-dark); }
.button.quiet:hover { background: var(--accent-soft); }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.icon-button { background: none; color: var(--muted); border: 0; min-width: 34px; min-height: 34px; border-radius: 8px; display: inline-grid; place-items: center; padding: 5px; }
.icon-button svg { width: 19px; height: 19px; }
.icon-button:hover { background: var(--accent-soft); color: var(--accent); }

.notice, .next-step {
  border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: 13px; display: flex; align-items: center;
  gap: 12px; padding: 12px 14px; margin-bottom: 18px; color: var(--text);
}
.notice > div, .next-step > div { flex: 1; min-width: 0; }
.notice strong, .next-step strong { font-size: .94rem; }
.notice > div span { display: block; font-size: .875rem; color: var(--subtle); }
.notice-icon, .soft-icon { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.notice-icon { background: var(--accent-soft); }
.next-step { background: var(--surface); border-color: var(--line); padding: 14px; }
.next-step p { margin: 3px 0 0; font-size: .875rem; color: var(--subtle); }
.notice-text { background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--text); border-radius: 10px; padding: 11px 13px; overflow-wrap: anywhere; }
.notice-text p { margin: 4px 0; }

.metrics, .tax-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 17px; }
.metric { padding: 15px 16px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: left;
  display: flex; flex-direction: column; align-items: start; min-width: 0; box-shadow: 0 1px 2px #1b204406; }
.metric:hover { border-color: #c7c1ec; box-shadow: 0 2px 10px #22234b0a; }
.metric-top { display:flex; align-items:center; justify-content:space-between; width:100%; margin-bottom: 15px; }
.metric-top > svg { color: #757d93; height: 15px; width: 15px; }
.metric-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.metric-icon svg { width: 18px; height: 18px; }
.metric-icon.in { background: var(--green-soft); color: var(--green); }
.metric-icon.help { background: var(--amber-soft); color: var(--amber); }
.metric-title { color: var(--subtle); font-weight: 550; font-size: .875rem; line-height: 1.25; }
.metric strong { display: block; margin: 3px 0 2px; font-size: clamp(1.3rem, 2.4vw, 2.13rem); font-weight: 700; line-height: 1.18; letter-spacing: -.045em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric small { color: var(--muted); font-size: .77rem; }
.tax-summary .metric strong { font-size: clamp(1.25rem, 2vw, 1.8rem); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; box-shadow: 0 1px 2px #1b204406; margin-bottom: 17px; }
.panel-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding: 15px 19px 13px; min-height: 63px; }
.panel-heading > .muted { font-size: .875rem; }
.panel-footer { padding: 12px 19px; border-top: 1px solid var(--line); }
.dashboard-grid { display:grid; grid-template-columns: minmax(0, 1.46fr) minmax(0, 1fr); gap: 16px; }
.dashboard-grid.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.expense-bars { display: grid; gap: 10px; padding: 2px 19px 17px; }
.expense-bar { display: grid; grid-template-columns: 1fr auto; gap: 4px 9px; align-items: center; background: transparent; border: 0; padding: 2px 0; text-align: left; font-size: .875rem; }
.expense-bar:hover { color: var(--accent-dark); }
.expense-bar strong, .expense-bar small { text-align: right; font-variant-numeric: tabular-nums; }
.expense-bar small { color: var(--muted); font-size: .73rem; }
.bar-track, .coverage-track { display: block; overflow: hidden; height: 6px; border-radius: 99px; background: #ebe9f9; }
.bar-track span, .coverage-track > div { height: 100%; display: block; border-radius: inherit; background: #7970c9; }
.expense-bar:nth-child(2) .bar-track span { background: #8a81d0; }
.expense-bar:nth-child(3) .bar-track span { background: #9a91d9; }
.expense-bar:nth-child(n+4) .bar-track span { background: #a59de2; }
.coverage { padding: 1px 19px 19px; }
.coverage-total { display: flex; align-items: baseline; gap: 8px; color: var(--subtle); margin-top: 3px; font-size: .87rem; }
.coverage-total strong { font-size: 1.9rem; color: var(--text); letter-spacing: -.055em; font-weight: 700; }
.coverage-total b { margin-inline-start: auto; color: var(--accent-dark); }
.coverage-track { height: 8px; margin: 7px 0 16px; }
.coverage-track > div { background: var(--accent); }
.coverage-detail { display: flex; align-items: center; gap: 10px; background: var(--canvas); border-radius: 10px; padding: 10px; margin-bottom: 15px; font-size: .875rem; }
.coverage-detail .soft-icon { width: 32px; height: 32px; }
.coverage-detail .soft-icon svg { width: 17px; height: 17px; }
.coverage-detail small { display: block; color: var(--muted); font-size: .77rem; }
.coverage .button { width: 100%; }
.footer-totals { display: flex; gap: 15px; flex-wrap: wrap; color: var(--muted); font-size: .82rem; }
.empty { text-align: center; padding: 25px 20px 34px; }
.empty > svg { width: 39px; height: 39px; padding: 8px; border-radius: 12px; color: var(--accent); background: var(--accent-soft); margin-bottom: 9px; }
.empty h3 { margin-bottom: 5px; }
.empty p { margin: 0 auto 12px; color: var(--muted); font-size: .875rem; max-width: 36ch; }
.empty p:last-child { margin-bottom: 0; }

.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.toolbar select { width: auto; min-width: 145px; font-size: .875rem; }
.toolbar.currencies { margin-bottom: 13px; font-size: .875rem; }
.filter-panel { padding: 14px 15px 12px; }
.searchbox { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 9px; min-width: 170px; flex: 1; padding: 0 10px; }
.searchbox input { border: 0; padding: 10px 7px; background: none; font-size: .9rem; }
.searchbox:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.searchbox input:focus-visible { outline: none; }
.searchbox svg { color: var(--muted); width: 18px; height: 18px; }
.filter-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.filter-tags:not(:empty) { padding-top: 8px; }
.button.filter-tag { min-height: 30px; background: var(--accent-soft); color: var(--accent-dark); padding: 4px 8px; font-size: .81rem; }
.selection-bar { padding: 7px 12px; background: var(--canvas); display: flex; gap: 6px; flex-wrap: wrap; }
.group-heading { padding: 12px 16px; background: var(--canvas); font-size: .875rem; text-transform: capitalize; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .875rem; }
th { background: var(--canvas); color: var(--subtle); font-weight: 650; text-align: left; white-space: nowrap; }
th, td { padding: 10px 12px; vertical-align: middle; border-top: 1px solid var(--line); }
th:first-child, td:first-child { padding-left: 19px; }
th:last-child, td:last-child { padding-right: 19px; }
td { overflow-wrap: anywhere; }
td small, .simple-list small { display: block; color: var(--muted); font-size: .78rem; margin-top: 3px; }
td small.warning-text { color: var(--amber); }
.ledger .numeric { white-space: nowrap; }
.ledger .numeric .button { padding: 3px 5px; min-height: 34px; }
.operations-table tbody tr { cursor: pointer; }
.operations-table tbody tr:hover { background: var(--accent-soft); }
.operations-table th:nth-last-child(2) { min-width: 128px; }
.check-col { width: 36px; }
.row-button { display: flex; gap: 9px; align-items: center; text-align: left; font-size: .9rem; background: transparent; border: 0; padding: 0; }
.row-button strong { overflow-wrap: anywhere; }
.row-button small { color: var(--muted); line-height: 1.35; }
.row-symbol { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--accent); background: var(--accent-soft); flex-shrink: 0; }
.row-symbol svg { width: 16px; height: 16px; }
.row-symbol.credit { color: var(--green); background: var(--green-soft); }
.account-cell { white-space: nowrap; font-size: .84rem; }
.account-cell span { color: var(--muted); }
.status-row { display: flex; align-items: center; gap: 4px; }
.chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 6px; padding: 4px 7px; line-height: 1.25; min-height: 24px; background: var(--canvas); border: 1px solid transparent; color: var(--subtle); font-size: .78rem; font-weight: 600; text-align: left; white-space: nowrap; }
.chip svg { width: 13px; height: 13px; }
.chip.edit-chip:hover { border-color: currentColor; }
.tag-npd { background: var(--green-soft); color: var(--green); }
.tag-personal, .tag-business, .tag-split { background: var(--accent-soft); color: var(--accent-dark); }
.tag-review, .tag-refund { background: var(--amber-soft); color: var(--amber); }
.tabs { display: flex; align-items: stretch; flex-wrap: wrap; gap: 4px; padding: 0 15px; }
.tab { background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--subtle); padding: 8px 10px 10px; font-size: .875rem; font-weight: 600; }
.tab:hover { color: var(--accent); }
.tab.active { color: var(--accent-dark); border-color: var(--accent); }
.tab span { font-size: .76rem; display: inline-block; min-width: 21px; margin-left: 6px; padding: 1px 5px; border-radius: 6px; background: var(--canvas); }
.tab.active span { background: var(--accent-soft); }
.tax-table td:nth-child(2) { max-width: 360px; }
.simple-list { display: grid; }
.simple-list > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.simple-list > div:first-child { border-top: 0; }
.panel > .simple-list { padding: 0 19px 12px; }
.simple-list strong { flex-shrink: 0; text-align: right; }
.simple-list .button.quiet { padding: 3px 2px; min-height: 30px; }
.document-row { background: transparent; border: 0; border-top: 1px solid var(--line); display: grid;
  grid-template-columns: 39px minmax(120px, 1fr) auto minmax(80px, auto) 16px; gap: 10px; align-items: center;
  text-align: left; padding: 12px 19px; width: 100%; font-size: .875rem; }
.document-row:hover { background: var(--canvas); }
.document-row small { display: block; color: var(--muted); margin-top: 2px; }
.document-row > .amount { text-align: right; }
.document-row > svg { width: 15px; height: 15px; color: var(--muted); }

dialog {
  color: var(--text);
  margin: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0;
  width: min(620px, calc(100% - 36px));
  max-height: min(900px, calc(100dvh - 42px));
  box-shadow: 0 24px 100px #20274545;
  overflow: hidden;
}
dialog.wide { width: min(880px, calc(100% - 36px)); }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: #2023446b; backdrop-filter: blur(2px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px 12px 22px; border-bottom: 1px solid var(--line); gap: 10px; background: var(--surface); }
.dialog-heading h2 { font-size: 1.32rem; overflow-wrap: anywhere; }
.dialog-body { overflow: auto; overscroll-behavior: contain; padding: 18px 22px 23px; }
.dialog-body > * + * { margin-top: 11px; }
.dialog-body > :last-child { margin-bottom: 0; }
.stack { display: grid; gap: 12px; min-width: 0; }
.stack.compact { gap: 7px; margin-top: 9px; }
.stack > p, .kind-fields p { margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; align-items: start; }
.field { display: grid; gap: 4px; align-self: start; min-width: 0; }
.field > span { font-weight: 600; font-size: .875rem; }
.field > small { color: var(--muted); font-size: .79rem; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.form-error { color: var(--amber); font-size: .875rem; font-weight: 550; }
.form-error:empty { display: none; }
.check { display: inline-flex; gap: 8px; align-items: flex-start; font-size: .875rem; }
.check > input { margin-top: 2px; }
.outlined, .registration-status { border: 1px solid var(--line); border-radius: 11px; padding: 9px 12px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding-inline: 5px; }
summary { cursor: pointer; color: var(--accent-dark); font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
details p, details ul { font-size: .87rem; }
.dropzone { position: relative; min-height: 112px; display: grid; align-content: center; justify-items: center; gap: 3px; border: 1px dashed #bbb6e2; background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; overflow: hidden; text-align: center; }
.dropzone .soft-icon { width: 31px; height: 31px; margin-bottom: 2px; }
.dropzone .soft-icon svg { width: 17px; height: 17px; }
.dropzone small { color: var(--muted); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone:hover, .dropzone.dragover, .dropzone:focus-within { background: var(--accent-soft); border-color: var(--accent); }
.camera-upload { position: relative; display: inline-flex; align-items: center; gap: 7px; color: var(--accent-dark); font-size: .875rem; cursor: pointer; width: fit-content; }
.camera-upload input { opacity: 0; position: absolute; inset: 0; cursor: pointer; }
.operation-head { display: flex; align-items: center; gap: 12px; }
.operation-head div { min-width: 0; flex: 1; }
.operation-head strong { display:block; overflow-wrap:anywhere; }
.operation-head small { display: block; color: var(--muted); }
.operation-head b { font-size: 1.36rem; text-align: right; letter-spacing: -.02em; white-space: nowrap; }
.subpanel { background: var(--canvas); padding: 11px 13px; border-radius: 11px; }
.subpanel small { color: var(--muted); }
.subpanel p { margin: 3px 0 6px; overflow-wrap: anywhere; }
.operation-docs { display: flex; flex-wrap: wrap; gap: 6px; }
.decision-fields { display: grid; gap: 12px; }
.kind-fields { display: grid; gap: 9px; }
.parts-list { background: var(--canvas); border-radius: 10px; padding: 0 10px; }
.mapping-grid { margin-block: 10px; }
.preview-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.review-items { padding-left: 18px; color: var(--amber); }
.review-items small { display: block; font-weight: 400; color: var(--muted); overflow-wrap: anywhere; }
.locked-page { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.locked-card { width: min(460px, 100%); padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.locked-card h1 { margin-top: 24px; font-size: 1.85rem; }
.setup-card { width: min(640px, 100%); }
.setup-card h1 { margin-bottom: 18px; }
.locked-card .button.quiet { margin-top: 10px; }
.notifications { position: fixed; z-index: 10; bottom: 20px; right: 22px; max-width: min(530px, calc(100% - 40px)); }
.toast { display: flex; align-items: center; gap: 10px; border: 1px solid #404060; border-radius: 12px; background: #262643; color: white; padding: 7px 9px 7px 11px; font-size: .89rem; box-shadow: 0 7px 24px #20234425; }
.toast-icon { display: flex; align-items: center; color: #cbc5fb; }
.toast-icon svg { width: 18px; height: 18px; }
.toast .icon-button, .toast .button.toast-action { color: white; }
.toast .icon-button:hover, .toast .button.toast-action:hover { background: #ffffff20; }
.toast .button.toast-action { min-height: 32px; border-color: #ffffff50; padding: 4px 7px; }

@media (max-width: 1170px) {
  :root { --sidebar: 204px; }
}
@container finance (max-width: 1170px) {
  .sidebar { padding-inline: 13px; }
  .page-intro { flex-wrap: wrap; }
  .page-intro .actions { flex-shrink: 1; }
  .metric { padding-inline: 13px; }
  .ledger, .tax-table { min-width: 610px; }
}
@container finance (max-width: 900px) {
  .notice, .next-step { flex-wrap: wrap; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .dashboard-grid.equal { grid-template-columns: minmax(0, 1fr); }
  .metrics, .tax-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric strong { font-size: 1.68rem; }
  .profile-name { display: none; }
  .top-actions { gap: 10px; }
}
@container finance (max-width: 720px) {
  .sidebar, .top-context { display: none; }
  .mobile-brand { display: block; }
  .mobile-brand .brand { gap: 6px; }
  .mobile-brand .brand-symbol { width: 29px; height: 29px; border-radius: 7px; }
  .mobile-brand .brand-symbol svg { width: 25px; height: 25px; }
  .mobile-brand .brand strong { font-size: .75rem; }
  .mobile-brand .brand small { font-size: .49rem; }
  .topbar, .main { margin-left: 0; }
  .topbar { height: 58px; padding-inline: 13px; }
  .top-actions { gap: 6px; }
  .top-actions .button { font-size: .78rem; padding: 6px; min-height: 33px; }
  .top-actions .button svg { width: 14px; height: 14px; }
  .top-actions .period-button { min-width: 0; }
  .top-actions .period-button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .profile-trigger { margin-left: 0; }
  .profile-trigger > svg { display: none; }
  .avatar { width: 30px; height: 30px; font-size: .8rem; }
  .mobile-nav { position: fixed; inset: auto 0 calc(40px + env(safe-area-inset-bottom)); padding: 4px 3px; background: var(--surface);
    border-top: 1px solid var(--line); z-index: 3; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .mobile-nav .nav-item { flex-direction: column; gap: 3px; align-items: center; justify-content: center; padding: 5px 1px; min-height: 51px; border-radius: 7px; font-size: .69rem; line-height: 1.1; white-space: normal; text-align: center; }
  .mobile-nav .nav-item svg { width: 18px; height: 18px; }
  .page { padding: 18px 13px calc(116px + env(safe-area-inset-bottom)); }
  .page-intro { gap: 12px; margin-bottom: 15px; }
  .page-intro h1 { font-size: 1.95rem; }
  .notice { gap: 7px; padding: 9px; }
  .notice > div { min-width: min(220px, 70%); }
  .notice > div span { font-size: .79rem; }
  .notice-icon { width: 32px; height: 32px; }
  .notice-icon svg { width: 17px; height: 17px; }
  .next-step > div { flex-basis: calc(100% - 54px); }
  .next-step > .button { margin-left: 44px; }
  .panel-heading { padding: 10px 12px; min-height: 53px; flex-wrap: wrap; }
  .panel-heading h2 { font-size: 1.07rem; }
  .panel-heading .button { padding: 5px 7px; }
  .panel { border-radius: 13px; margin-bottom: 12px; }
  .metric { padding: 11px; border-radius: 12px; }
  .metric-top { margin-bottom: 8px; }
  .metric-title { font-size: .81rem; }
  .metric strong { font-size: clamp(1.18rem, 6vw, 1.66rem); }
  .metric small { font-size: .73rem; }
  .metric-icon { width: 29px; height: 29px; }
  .metric-icon svg { height: 16px; width: 16px; }
  .tax-summary .metric strong { font-size: clamp(1.18rem, 6vw, 1.66rem); }
  .expense-bars, .coverage, .panel > .simple-list { padding-inline: 13px; }
  .operations-table, .operations-table tbody { display: block; }
  .operations-table thead { display: none; }
  .operations-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 10px 12px; border-top: 1px solid var(--line); column-gap: 6px; }
  .operations-table tr:has(.check-col) { grid-template-columns: 20px minmax(0, 1fr) auto; }
  .operations-table td { padding: 0; border: 0; min-width: 0; }
  .operations-table .check-col { grid-column: 1; grid-row: 1 / 3; align-self: center; width: auto; }
  .operations-table td:nth-last-child(4) { grid-column: -3; grid-row: 1; }
  .operations-table td:nth-last-child(3) { grid-column: -2; grid-row: 2; align-self: center; text-align: right; }
  .operations-table td:nth-last-child(2) { grid-column: -3; grid-row: 2; padding-left: 41px; }
  .operations-table td:last-child { grid-column: -2; grid-row: 1; align-self: center; font-size: .86rem; }
  .account-cell { font-size: .71rem; white-space: normal; }
  .row-button { gap: 7px; }
  .row-symbol { width: 34px; height: 34px; }
  .status-row .icon-button { min-width: 25px; min-height: 27px; }
  .operations-table .status-row .chip { font-size: .72rem; min-height: 22px; padding: 3px 5px; }
  .tab { padding-inline: 6px; }
  .tabs { padding-inline: 5px; }
  .toolbar select { flex: 1; min-width: 120px; }
  .toolbar .searchbox { flex-basis: 55%; }
  .document-row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 7px; padding-inline: 10px; }
  .document-row > :nth-child(3) { grid-column: 2; grid-row: 2; justify-self: start; }
  .document-row > :nth-child(4) { grid-column: 3; grid-row: 1; }
  .document-row > svg { display: none; }
  dialog, dialog.wide { inset: auto 0 0; margin: 0; width: 100%; max-width: 100%; max-height: min(90dvh, calc(100dvh - 20px)); border-radius: 17px 17px 0 0; }
  .dialog-heading { padding: 12px 11px 9px 14px; }
  .dialog-body { padding: 12px 14px max(20px, env(safe-area-inset-bottom)); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .notifications { bottom: calc(106px + env(safe-area-inset-bottom)); right: 9px; max-width: calc(100% - 18px); }
  .operation-head b { font-size: 1.12rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

.auth-card { width: min(440px, 100%); padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 21px; font-size: 1.27rem; }
.auth-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 17px; }
.auth-switch .button { min-height: 43px; }
.auth-card form .form-actions .button { width: 100%; }
.auth-card > .button.quiet { margin-top: 9px; }
.device-switch { position: fixed; z-index: 3; bottom: 0; left: var(--sidebar); right: 0; min-height: calc(40px + env(safe-area-inset-bottom)); padding: 3px 14px max(3px, env(safe-area-inset-bottom));
  display: flex; gap: 5px; justify-content: center; background: var(--surface); border-top: 1px solid var(--line); }
.device-switch .button { min-height: 33px; padding-block: 4px; }
.device-switch .device-active { background: var(--accent-soft); color: var(--accent-dark); }
@container finance (max-width: 720px) {
  .device-switch { left: 0; }
}
body[data-device="phone"] :is(.mobile-nav, .device-switch) { width: min(430px, 100vw); margin-inline: auto; inset-inline: 0; }

.purchase-line { padding-left: 43px; }
.purchase-line .button { padding: 3px 5px; min-height: 29px; }
.purchase-actions { gap: 3px; }
.stats-list, .padded { padding: 8px 14px 13px; }
.documents-tabs { margin-bottom: 13px; }
.receipt-search-field { max-width: 150px; }
.receipt-original img { display: block; max-width: 100%; max-height: 76vh; object-fit: contain; margin: 7px auto; }
.receipt-table small { max-width: 26ch; }
@container finance (max-width: 720px) {
  .purchase-line { padding-left: 0; }
  .purchase-actions .button { font-size: .75rem; justify-content: flex-start; padding-inline: 3px; }
}

body[data-device="phone"] :is(dialog, dialog.wide) { width: min(430px, 100vw); margin-inline: auto; }
body[data-device="phone"] .notifications {
  right: calc((100vw - min(430px, 100vw)) / 2 + 9px);
  max-width: calc(min(430px, 100vw) - 18px);
}

.local-panel {
  --panel-bg: #252343;
  --panel-border: #655d91;
  --panel-text: #fcfaff;
  --panel-selected: #453d75;
  position: fixed;
  z-index: 5;
  inset: 12px auto auto 12px;
  width: fit-content;
  max-width: calc(100vw - 24px);
  margin: 0;
  color: var(--panel-text);
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 9px;
  box-shadow: 0 5px 18px #19172d40;
}
.local-panel[open] { width: min(276px, calc(100vw - 24px)); }
.local-panel summary {
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 0;
  padding: 6px 10px;
  list-style: none;
  color: inherit;
  font-size: .86rem;
  font-weight: 650;
  line-height: 1.2;
  border-radius: inherit;
}
.local-panel summary::-webkit-details-marker { display: none; }
.local-panel summary svg { width: 15px; height: 15px; }
.local-panel[open] summary svg { transform: rotate(180deg); }
.local-panel :is(summary, button, a):focus-visible { outline-color: #cfc3ff; }
.local-panel-options { padding: 0 8px 8px; }
.local-panel-devices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding-bottom: 7px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--panel-border);
}
.local-panel-destinations { display: grid; gap: 5px; }
.local-panel-devices .button, .local-panel-destinations :is(a, button) {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 500;
  color: inherit;
  text-decoration: none;
  background: transparent;
}
.local-panel-destinations :is(a, button) { justify-content: start; }
.local-panel-devices .button:hover, .local-panel-destinations :is(a, button):hover { background: #38335e; }
.local-panel-devices .device-active, .local-panel-destinations [aria-current="page"] {
  background: var(--panel-selected);
  border-color: #b5a9e7;
}
body[data-local-preview] .sidebar { padding-top: 64px; }
body[data-device="phone"] .local-panel { left: calc((100vw - min(430px, 100vw)) / 2 + 10px); }
@container finance (max-width: 720px) {
  .local-panel { inset: 10px auto auto 10px; }
  body[data-local-preview] .topbar { justify-content: flex-end; padding-left: 169px; }
  body[data-local-preview] .mobile-brand { display: none; }
  body[data-local-preview] .mobile-nav { bottom: 0; padding-bottom: calc(4px + env(safe-area-inset-bottom)); }
  body[data-local-preview] .page { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  body[data-local-preview] .notifications { bottom: calc(66px + env(safe-area-inset-bottom)); }
}

.vehicle-status { margin: 0; color: var(--muted); font-size: .88rem; }
.vehicle-title { display: flex; align-items: center; gap: 8px 14px; justify-content: space-between; flex-wrap: wrap; }
.vehicle-title h2, .vehicle-title h3 { font-size: 1.35rem; letter-spacing: -.02em; }
.vehicle-title small { font-size: .83rem; color: var(--accent-dark); font-weight: 500; margin-left: 5px; padding: 3px 6px; border-radius: 5px; background: var(--accent-soft); white-space: nowrap; }
.vehicle-title a, .vehicle-source { font-size: .82rem; }
.vehicle-comparison { display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, 29%); gap: 10px; margin-top: 10px; }
.vehicle-viewer {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  background: var(--canvas);
  border: 1px solid #e5e7f3;
  border-radius: 13px;
  overflow: hidden;
}
.vehicle-stage { position: relative; min-height: 0; background: radial-gradient(ellipse at 48% 59%, #fafaff 0, #e5e6ef 59%, #c7c9d8 100%); }
.vehicle-poster { display: block; width: 100%; height: 232px; object-fit: contain; }
.vehicle-viewer canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; visibility: hidden; }
[data-vehicle-ready] canvas { visibility: visible; }
[data-vehicle-ready] .vehicle-poster { visibility: hidden; }
.vehicle-interactive-label { display: none; }
.vehicle-viewer:has([data-vehicle-ready]) .vehicle-interactive-label { display: inline; }
.vehicle-viewer:has([data-vehicle-ready]) .vehicle-poster-label { display: none; }
.vehicle-reset { display: none; position: absolute; right: 8px; top: 8px; width: 29px; height: 29px; border: 1px solid #d3d6e3; border-radius: 8px; background: #ffffffc9; color: #424861; line-height: 1; font-size: 21px; }
[data-vehicle-ready] .vehicle-reset { display: block; }
.vehicle-model-unavailable { display: none; position: absolute; inset: auto 6px 6px; padding: 4px 6px; text-align: center; margin: 0; color: var(--text); background: var(--surface); font-size: .75rem; border-radius: 5px; }
[data-vehicle-unavailable] .vehicle-model-unavailable { display: block; }
[data-vehicle-unavailable] canvas { visibility: hidden; }
.vehicle-viewer canvas:active { cursor: grabbing; }
.vehicle-viewer canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; border-radius: 11px; }
.vehicle-viewer-caption { display: flex; justify-content: space-between; gap: 2px 10px; flex-wrap: wrap; padding: 6px 12px 9px; color: var(--muted); font-size: .74rem; }
.vehicle-viewer-caption span:first-child { font-weight: 600; color: var(--subtle); }
.vehicle-photo { display: flex; flex-direction: column; text-align: center; border-radius: 13px; overflow: hidden; background: var(--canvas); margin: 0; }
.vehicle-photo a { display: block; background: #e7e9ee; }
.vehicle-photo img { display: block; width: 100%; height: 232px; object-fit: contain; }
.vehicle-photo figcaption { padding: 7px 8px; color: var(--subtle); font-size: .75rem; font-weight: 600; }
.vehicle-specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; }
.vehicle-specs div { border: 1px solid var(--line); background: var(--canvas); border-radius: 9px; padding: 8px 10px; }
.vehicle-specs dt, .vehicle-price-label { color: var(--muted); font-size: .78rem; }
.vehicle-specs dd { margin: 2px 0 0; font-size: .9rem; font-weight: 600; }
.vehicle-plate { display: inline-flex; font-size: .82rem; font-weight: 700; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); color: var(--text); white-space: nowrap; }
.vehicle-plate span { padding: 3px 6px; }
.vehicle-plate span + span { border-left: 1px solid var(--line-strong); }
.vehicle-price-label { margin: 9px 0 0; }
.vehicle-price { font-size: 1.36rem; font-weight: 700; line-height: 1.25; margin: 2px 0; }
@container finance (max-width: 540px) {
  .vehicle-status { margin: 0; min-height: 1.4em; }
  .vehicle-comparison { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 6px; }
  .vehicle-comparison :is(.vehicle-poster, .vehicle-photo img) { height: 132px; }
  .vehicle-viewer-caption { font-size: .67rem; padding-inline: 7px; }
  .vehicle-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.vehicle-quote { padding: 9px 12px; margin: 9px 0; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--text); border-radius: 10px; }
.vehicle-quote .vehicle-price-label { margin: 0; }
.vehicle-quote-heading, .vehicle-price-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 12px; }
.vehicle-quote .vehicle-price { font-size: 1.48rem; }
.vehicle-price-meta { gap: 3px 10px; font-size: .76rem; color: var(--muted); }
.vehicle-range, .vehicle-quote-empty { margin: 3px 0; font-size: .85rem; }
.vehicle-trend { padding: 2px 7px; border-radius: 6px; background: var(--canvas); color: var(--muted); font-size: .8rem; font-weight: 600; }
.vehicle-trend.up { background: var(--green-soft); color: var(--green); }
.vehicle-trend.down { background: light-dark(#faeaec, #47272a); color: light-dark(#973849, #ffbfc4); }
.vehicle-provider-photo { max-width: 420px; margin-top: 8px; }
.vehicle-trend small { font-size: .7rem; font-weight: 400; margin-inline-start: 7px; }
