@font-face {
  font-family: Inter;
  src: url("/assets/inter-cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 750;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Inter;
  src: url("/assets/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 750;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #22352c;
  background: #f5f6f1;
  font-synthesis: none;
  --canvas: #f5f6f1;
  --surface: #fff;
  --text: #23372d;
  --muted: #617067;
  --border: #dfe5da;
  --forest: #184639;
  --deep: #153c34;
  --accent: #c9e590;
  --teal: #397564;
  --clay: #ac6045;
  --danger: #9b423a;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.5; }
button, input, textarea, select { font: inherit; }
button, select, summary { cursor: pointer; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
button { border: 0; font-weight: 550; }
button:disabled { opacity: .48; cursor: default; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid #8da963;
  outline-offset: 3px;
}
[hidden] { display: none !important; }
a { color: var(--forest); text-decoration: none; }
h1,h2,h3,p,ul,ol { margin: 0; }
h1,h2,h3 { font-weight: 650; }
h1 { letter-spacing: -.056em; font-size: clamp(32px, 3.3vw, 50px); line-height: 1.12; }
h2 { letter-spacing: -.033em; font-size: 21px; line-height: 1.24; }
h3 { letter-spacing: -.022em; font-size: 16px; }
button, a { touch-action: manipulation; }
.icon { flex: none; display: inline-block; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.button, .text-button, .text-link, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.button { min-height: 43px; padding: 10px 17px; border-radius: 8px; font-weight: 600; line-height: 1.35; text-align: center; transition: background .14s, border-color .14s, color .14s; }
.button .icon { width: 17px; height: 17px; }
.primary { background: var(--forest); color: #fff; border: 1px solid var(--forest); }
.primary:hover:not(:disabled) { background: #245a47; border-color: #245a47; }
.soft { color: #28583f; background: #eaf1e2; border: 1px solid #e3ebda; }
.soft:hover:not(:disabled) { background: #ddeacd; }
.outlined, .plain { color: var(--text); background: #fff; border: 1px solid #d7e0d5; }
.outlined:hover:not(:disabled), .plain:hover:not(:disabled) { background: #f1f5ed; }
.danger { background: #9b423a; color: #fff; border: 1px solid #9b423a; }
.danger:hover { background: #81372f; }
.text-button, .text-link { min-height: 32px; padding: 0; border-radius: 3px; color: #315e46; background: transparent; font-weight: 620; }
.text-button:hover, .text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-link .icon, .text-button .icon { width: 16px; height: 16px; }
.text-button.muted { color: var(--muted); }
.destructive { color: var(--danger); }
.icon-button { background: transparent; color: inherit; width: 35px; height: 35px; padding: 0; border-radius: 7px; }
.icon-button:hover { background: #ecf1e8; }
.icon-button .icon { width: 18px; height: 18px; }
.brand, .brand-link { display: inline-flex; align-items: center; width: fit-content; }
.brand { gap: 10px; color: inherit; font-size: 29px; letter-spacing: -.077em; font-weight: 720; line-height: 1; }
.brand img { display: block; border-radius: 10px; }
.form-stack { display: grid; gap: 19px; }
form label, .key-fields label { display: block; color: var(--text); font-weight: 600; line-height: 1.35; }
label > input, label > select, label > textarea, .password-field, .copy-field { margin-top: 8px; }
input:not([type="radio"]), textarea, select {
  display: block; width: 100%; min-width: 0; background: #fff; color: var(--text);
  padding: 11px 13px; min-height: 44px; border: 1px solid #cdd7cd; border-radius: 7px; font-weight: 450;
}
input::placeholder, textarea::placeholder { color: #78847b; opacity: 1; }
input:focus, textarea:focus, select:focus { border-color: #688f72; }
textarea { resize: vertical; line-height: 1.5; }
.password-field, .copy-field { position: relative; display: block; }
.password-field input, .copy-field input { padding-right: 48px; }
.password-eye, .copy-field .icon-button { position: absolute; top: 50%; right: 3px; transform: translateY(-50%); display: grid; place-items: center; width: 40px; height: 38px; color: #657569; border-radius: 6px; background: transparent; }
.password-eye .icon { width: 19px; height: 19px; }
.password-eye:hover { background: #f0f3eb; }
label small { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; font-weight: 450; line-height: 1.5; }
.form-error { padding: 10px 12px; border-radius: 7px; background: #f9ebe6; color: #863c32; font-weight: 500; overflow-wrap: anywhere; }
.small-tile, .service-icon, .empty-icon, .metric-icon, .operation-icon, .advice-glyph { display: inline-grid; place-items: center; flex: none; }
.small-tile { width: 43px; height: 43px; background: #e6efda; color: #365e43; border-radius: 12px; }
.launch, .failure-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 32px; gap: 16px; text-align: center; color: var(--muted); }
.launch-mark { width: 38px; height: 38px; background: center / contain no-repeat url("/assets/mark.svg"); }
.failure-screen .brand { color: var(--forest); margin-bottom: 23px; }
.failure-screen h1 { color: var(--text); font-size: 34px; }
.no-script { padding: 20px; position: fixed; bottom: 0; width: 100%; background: #fff; text-align: center; }

.auth-layout { display: grid; grid-template-columns: minmax(0,.94fr) minmax(0,1fr); padding: 20px; gap: 20px; min-height: 100vh; min-height: 100svh; background: #f7f8f3; }
.auth-panel { display: flex; flex-direction: column; padding: clamp(18px,2.3vw,35px) clamp(24px,3.8vw,66px); }
.auth-brand { margin: 2px 0; color: #214338; }
.auth-form-wrap { width: min(100%,390px); margin: auto; padding: 44px 0; }
.auth-symbol { width: 42px; height: 42px; margin-bottom: 20px; border: 1px solid #dfe8d4; }
.auth-form-wrap h1 { font-size: clamp(35px,3.5vw,55px); line-height: 1.04; }
.auth-intro { color: var(--muted); font-size: 15px; line-height: 1.58; margin: 14px 0 30px; max-width: 37ch; }
.auth-form-wrap input { min-height: 49px; }
.auth-submit { width: 100%; justify-content: space-between; min-height: 49px; margin-top: 4px; padding-inline: 18px; }
.auth-switch { margin-top: 21px; font-size: 13px; color: var(--muted); }
.auth-switch .text-button { margin-left: 3px; font-size: inherit; }
.auth-bottom { display: flex; align-items: center; gap: 8px; color: #657369; font-size: 12px; }
.auth-bottom .icon { width: 14px; height: 14px; }
.invitation-ok { display: flex; align-items: center; gap: 7px; padding: 10px 12px; background: #e9f1dd; color: #365c3e; border-radius: 7px; font-size: 13px; }
.invitation-ok .icon { width: 17px; height: 17px; }
.auth-art {
  --art-space: clamp(28px,4.5vw,76px); position: relative; isolation: isolate; display: grid; grid-template-rows: auto minmax(220px,1fr) auto;
  min-height: calc(100vh - 40px); min-height: calc(100svh - 40px); border-radius: 24px; padding: var(--art-space);
  overflow: hidden; color: #eff4e6; background-color: #183e34;
  background-image: radial-gradient(ellipse at 82% 18%, rgba(125,163,112,.23) 0%, transparent 56%), linear-gradient(135deg,#244f42 0%,#183e34 46%,#12342d 100%);
}
.auth-art::before { content: ""; position: absolute; z-index: -1; inset: 0; opacity: .65; pointer-events: none;
  background-image: linear-gradient(to right,rgba(180,203,166,.07) 1px,transparent 1px),linear-gradient(to bottom,rgba(180,203,166,.07) 1px,transparent 1px); background-size: 54px 54px;
  mask-image: linear-gradient(155deg,rgba(0,0,0,.1),#000 54%,rgba(0,0,0,.65));
}
.art-ticks { position: absolute; top: var(--art-space); right: var(--art-space); opacity: .6; width: 26px; height: 26px; border-top: 1px solid #92ac8f; border-right: 1px solid #92ac8f; }
.art-copy { position: relative; padding-right: 20px; }
.art-copy h2 { font-size: clamp(42px,5vw,78px); font-weight: 520; letter-spacing: -.075em; line-height: .99; }
.art-copy h2 span { color: var(--accent); }
.art-copy p { max-width: 33ch; margin-top: 19px; color: #cedcc8; font-size: clamp(14px,1.2vw,17px); line-height: 1.52; }
.ledger-art { position: relative; display: block; align-self: stretch; object-fit: contain; width: calc(100% + var(--art-space) + var(--art-space) - 12px); margin-left: calc(6px - var(--art-space)); height: 100%; min-height: 0; }
.art-guide { display: flex; align-items: center; gap: 13px; padding-top: 23px; color: #f1f5e9; border-top: 1px solid rgba(201,222,193,.23); width: 100%; }
.guide-icon { display: grid; place-items: center; width: 41px; height: 41px; background: rgba(197,221,177,.1); border: 1px solid rgba(197,221,177,.17); border-radius: 10px; color: #d0e8ab; }
.art-guide strong, .art-guide small { display: block; }
.art-guide strong { font-size: 14px; font-weight: 580; }
.art-guide small { font-size: 12px; margin-top: 2px; color: #bfcebe; }
.guide-arrow { margin-left: auto; width: 34px; height: 34px; display: grid; place-items: center; color: #d7e7cb; border: 1px solid rgba(201,222,193,.25); border-radius: 50%; transition: background .15s; }
.guide-arrow .icon { width: 16px; height: 16px; }
.art-guide:hover .guide-arrow { background: rgba(221,238,196,.17); }

.app-shell { display: grid; grid-template-columns: 234px minmax(0,1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; z-index: 8; height: 100vh; height: 100dvh; padding: 33px 17px 16px; display: flex; flex-direction: column; color: #eaf2e4; background: var(--deep); }
.sidebar-head { padding: 2px 12px; }
.sidebar .brand-link { color: #eef4e9; }
.sidebar .brand { font-size: 28px; }
.sidebar .brand img { width: 36px; height: 36px; }
.sidebar-nav { display: grid; gap: 4px; margin-top: 51px; overflow-y: auto; }
.nav-link { display: flex; align-items: center; gap: 13px; min-height: 43px; padding: 10px 13px; color: #c3d6c9; border-radius: 7px; font-weight: 500; line-height: 1.2; }
.nav-link .icon { width: 18px; height: 18px; }
.nav-link:hover { color: #fff; background: rgba(195,218,185,.08); }
.nav-link[aria-current="page"] { color: #e4f4cf; background: #365947; font-weight: 600; }
.nav-link[aria-current="page"] .icon { color: #d8ecaa; }
.nav-rule { height: 1px; background: rgba(216,231,209,.16); margin: 15px 12px; }
.nav-badge, .count-pill { margin-left: auto; display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; font-size: 11px; font-weight: 650; }
.nav-badge { color: #d8edb7; background: #3c5947; }
.count-pill { margin-left: 0; color: #496447; background: #edf3e6; }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 18px 7px 0; border-top: 1px solid rgba(216,231,209,.16); }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: #d1dfb8; color: #284b3d; font-size: 15px; font-weight: 650; }
.account-label { flex: 1; min-width: 0; }
.account-label small, .account-label strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-label small { color: #b7cbbd; font-size: 10px; }
.account-label strong { font-size: 13px; font-weight: 570; color: #edf3e9; }
.sidebar .icon-button { color: #c6d6c8; }
.sidebar .icon-button:hover { background: rgba(215,233,204,.13); }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 16px; color: #fff; background: var(--forest); border-radius: 5px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.mobile-header, .nav-scrim, .side-close { display: none; }
.main-area { min-width: 0; outline: none; }
.workspace { max-width: 1500px; margin-inline: auto; padding: clamp(30px,3.35vw,60px) clamp(24px,3.2vw,56px) 50px; }
.page-head { min-height: 56px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 13px 20px; margin-bottom: 22px; }
.page-head h1 { font-size: clamp(34px,3.35vw,54px); color: #203b2f; }
#page-title:focus { outline: none; }
.page-head p,.panel-title p,.panel-description { color: var(--muted); }
.page-head p { margin-top: 8px; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 0 0 22px; }
.month-control, .currency-select { display: inline-flex; align-items: center; background: #fff; border: 1px solid #d5dfd3; border-radius: 8px; color: #3b5140; }
.month-control { padding: 2px; }
.month-control .icon-button { width: 30px; height: 31px; }
.month-control .icon-button .icon { width: 15px; height: 15px; }
.month-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 4px 7px; min-width: 127px; height: 31px; border-radius: 5px; font-size: 13px; font-weight: 600; color: var(--text); background: transparent; }
.month-button .icon { width: 16px; height: 16px; color: #687870; }
.month-button:hover { background: #eff4eb; }
.currency-select { position: relative; height: 37px; gap: 0; padding: 0; }
.currency-select > .icon:first-of-type { position: absolute; left: 10px; top: 10px; width: 16px; height: 16px; pointer-events: none; color: #687870; }
.currency-select select { appearance: none; border: 0; background: transparent; min-height: 0; margin: 0; padding: 5px 25px 5px 35px; height: 100%; font-size: 13px; font-weight: 600; }
.select-chevron { position: absolute; pointer-events: none; right: 8px; width: 12px; height: 12px; }
.panel, .metric { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.panel { padding: clamp(18px,2.05vw,29px); min-width: 0; }
.panel-title { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 19px; }
.panel-title p { margin-top: 5px; font-size: 13px; }
.panel-title .text-link { font-size: 13px; }
.metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; margin-bottom: 17px; }
.metric { position: relative; isolation: isolate; min-width: 0; overflow: hidden; padding: 19px clamp(15px,1.7vw,26px) 20px; }
.metric-label { display: flex; gap: 9px; align-items: center; margin-bottom: 12px; }
.metric-label h2 { font-size: 14px; letter-spacing: -.01em; font-weight: 600; }
.metric-icon { width: 29px; height: 29px; color: #36664a; background: #e6efd9; border-radius: 8px; }
.metric-icon .icon { width: 17px; height: 17px; }
.metric-icon.income { background: #e9f1e8; color: #397564; }
.metric-icon.expense { background: #f8ebe3; color: #a75a40; }
.metric-value { display: block; font-size: clamp(23px,2.45vw,42px); line-height: 1.1; letter-spacing: -.061em; font-weight: 580; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric p { margin-top: 11px; color: var(--muted); font-size: 12px; }
.metric p b { margin-left: 3px; color: #425749; font-weight: 560; }
.balance { color: #f1f4e9; background: #234b3d; border-color: #234b3d; }
.balance::after { content: ""; z-index: -1; position: absolute; width: 66%; height: 180%; right: -19%; bottom: -64%; transform: rotate(-17deg); opacity: .75;
  background: repeating-radial-gradient(ellipse at 100% 100%, transparent 0 8px, rgba(207,226,170,.17) 8.5px 9.2px, transparent 9.8px 13px); }
.balance .metric-icon { background: #426148; color: #d8eaa6; }
.balance p { color: #cad7c5; }
.overview-grid { display: grid; align-items: start; grid-template-columns: minmax(0,1.56fr) minmax(250px,.87fr); gap: 17px; margin-bottom: 17px; }
.chart-panel .panel-title { margin-bottom: 11px; }
.chart-legend { display: flex; gap: 16px; align-items: center; }
.chart-legend > span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.legend-dot { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 3px; }
.income-dot { background: #458675; } .expense-dot { background: #c77a5c; }
.tone-0 { background: #397564; } .tone-1 { background: #9ab972; } .tone-2 { background: #d99b72; } .tone-3 { background: #718eac; }
.tone-4 { background: #bdad80; } .tone-5 { background: #9d89a7; } .tone-6 { background: #70a6a0; } .tone-7 { background: #b67e74; }
.cash-chart { position: relative; height: 215px; margin-top: 12px; }
.cash-chart canvas, .donut-wrap canvas { display: block; width: 100%; height: 100%; }
.chart-empty { position: absolute; inset: 0 0 23px; display: grid; place-items: center; pointer-events: none; }
.chart-empty span { background: rgba(255,255,255,.96); color: #65746a; padding: 5px 9px; border-radius: 5px; font-size: 12px; }
.chart-details { font-size: 12px; color: var(--muted); margin-top: 3px; }
.chart-details summary { width: fit-content; padding: 5px 0; }
.chart-details summary:hover { color: var(--forest); }
.detail-scroll { max-height: 230px; overflow: auto; margin-top: 5px; }
.detail-scroll th,.detail-scroll td { padding: 5px 7px; }
.donut-wrap { width: 156px; max-width: 100%; height: 156px; position: relative; margin: 0 auto 12px; }
.donut-text { position: absolute; inset: 20%; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; gap: 2px; }
.donut-text small { font-size: 10px; color: var(--muted); }
.donut-text strong { font-size: 15px; line-height: 1.15; letter-spacing: -.04em; font-weight: 650; overflow-wrap: anywhere; }
.empty-caption { color: var(--muted); font-size: 12px; text-align: center; max-width: 230px; margin: 13px auto 0; }
.category-list { display: grid; gap: 8px; list-style: none; padding: 0; }
.category-list li { display: grid; grid-template-columns: 8px minmax(0,1fr) auto auto; gap: 7px; align-items: center; font-size: 12px; }
.category-list li > span { overflow-wrap: anywhere; }
.category-list .legend-dot { width: 7px; height: 7px; border-radius: 2px; }
.category-list small { color: var(--muted); font-size: 11px; }
.category-list strong { font-weight: 600; text-align: right; }
.table-panel { padding-bottom: 7px; }
.table-panel .panel-title { margin-bottom: 12px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; }
.transactions-table th { font-size: 11px; color: var(--muted); font-weight: 550; border-bottom: 1px solid var(--border); padding: 9px 8px; }
.transactions-table td { border-bottom: 1px solid #e9ede7; padding: 11px 8px; font-size: 13px; }
.transactions-table tr:last-child td { border-bottom: 0; }
.transactions-table :is(th,td):first-child { padding-left: 0; }
.transactions-table :is(th,td):last-child { padding-right: 0; }
.operation-cell { max-width: 240px; }
.operation-info { display: flex; align-items: center; gap: 10px; }
.operation-info > div { min-width: 0; }
.operation-info strong, .operation-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operation-info strong { color: var(--text); font-size: 13px; font-weight: 590; }
.operation-info small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.operation-icon { width: 35px; height: 35px; border-radius: 10px; background: #f0f2e8; color: #687653; }
.operation-icon .icon { width: 17px; height: 17px; }
.operation-icon.positive { background: #e7f1e9; color: #3d7359; }
.mobile-date { display: none; }
.source-label { display: inline-block; border-radius: 5px; padding: 3px 7px; font-size: 11px; color: #526452; background: #eff2ec; font-weight: 540; }
.bank-source { color: #3e6560; background: #e8efea; }
.amount-cell, .edit-cell { text-align: right; white-space: nowrap; }
.amount-cell strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.money-in { color: #37735b; }
.edit-cell { width: 36px; }
.edit-cell .icon-button { color: #5d6f60; width: 30px; height: 30px; }
.empty-state { text-align: center; padding: 22px 12px 28px; max-width: 440px; margin: auto; }
.empty-icon { width: 41px; height: 41px; border-radius: 12px; background: #eef3e7; color: #64805d; margin-bottom: 9px; }
.empty-state h3 { font-size: 16px; font-weight: 620; }
.empty-state p { color: var(--muted); font-size: 13px; margin: 5px 0 0; }
.empty-state .text-button { margin-top: 6px; font-size: 13px; }
.ledger-tools { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 13px; }
.segmented { display: inline-flex; align-items: center; padding: 3px; gap: 2px; border-radius: 7px; background: #eef2e9; }
.segmented button { padding: 6px 12px; font-size: 12px; border-radius: 5px; background: transparent; color: #526653; }
.segmented button[aria-pressed="true"] { color: #254834; background: #fff; box-shadow: 0 1px 3px rgba(29,55,36,.12); }
.search-field { position: relative; width: min(100%,240px); }
.search-field .icon { position: absolute; width: 16px; height: 16px; top: 11px; left: 9px; color: #728176; pointer-events: none; }
.search-field input { margin: 0; padding: 8px 9px 8px 32px; font-size: 12px; min-height: 36px; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; padding: 10px 0; border-top: 1px solid var(--border); margin-top: 3px; }
.table-foot .text-button { font-size: 12px; }
.insight-grid, .setting-grid { display: grid; gap: 17px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.advice-panel, .budget-panel, .service-card { display: flex; align-items: flex-start; flex-direction: column; }
.advice-panel { border-color: #d8e4cc; background: linear-gradient(125deg,#edf3e2,#f7f9f1); }
.advice-glyph { width: 46px; height: 46px; color: #315f42; background: #d9e8c1; border-radius: 13px; }
.advice-glyph .icon { width: 25px; height: 25px; }
.advice-panel h2, .budget-panel h2 { margin: 19px 0 8px; }
.panel-description { font-size: 14px; line-height: 1.55; }
.advice-panel > .button, .budget-panel > .text-link { margin-top: 23px; }
.advice-compact { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px 15px; padding-block: 18px; margin-bottom: 17px; }
.advice-compact h2 { margin: 0 0 3px; font-size: 18px; }
.advice-compact .panel-description { font-size: 13px; }
.advice-compact > .button { grid-row: 1; grid-column: 3; margin: 0; min-height: 38px; font-size: 13px; }
.advice-compact .advice-result { grid-column: 1/-1; margin: 0; padding-top: 12px; }
.advice-result { border-top: 1px solid #d1dec5; width: 100%; margin-top: 18px; padding-top: 16px; }
.advice-result p { white-space: pre-line; overflow-wrap: anywhere; font-size: 14px; margin-top: 7px; }
.result-label { display: inline-block; padding: 3px 7px; font-size: 11px; color: #476343; background: #e3edd5; border-radius: 4px; margin-bottom: 7px; }
.budget-sums { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.budget-sums strong { font-size: 25px; font-weight: 610; letter-spacing: -.05em; }
.budget-sums small, .budget-panel > p { color: var(--muted); }
.budget-panel > p b { color: var(--text); }
.budget-progress { width: 100%; height: 7px; appearance: none; border: 0; border-radius: 10px; background: #ecf0e6; overflow: hidden; margin: 7px 0 9px; }
.budget-progress::-webkit-progress-bar { background: #ecf0e6; }
.budget-progress::-webkit-progress-value { background: #79a16d; }
.budget-progress::-moz-progress-bar { background: #79a16d; }
.budget-progress.over-budget::-webkit-progress-value { background: #c17a5c; }
.budget-progress.over-budget::-moz-progress-bar { background: #c17a5c; }
.review-panel .panel-title { justify-content: flex-start; }
.review-list { padding: 0; list-style: none; }
.review-list li { display: flex; gap: 13px; align-items: flex-start; padding: 16px 0; border-top: 1px solid var(--border); }
.review-info { min-width: 0; flex: 1; }
.review-info > strong { font-size: 14px; font-weight: 600; }
.review-info p { margin: 4px 0 7px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.review-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.review-actions .button, .review-actions .text-button { font-size: 12px; }
.setting-grid { margin-bottom: 17px; }
.service-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
.service-icon { width: 44px; height: 44px; border-radius: 12px; }
.bank-icon { color: #446b3c; background: #e4eed8; }
.telegram-icon { color: #48737b; background: #e1edef; }
.service-card h2 { margin: 17px 0 6px; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; background: #f0f2ed; color: #626e62; border-radius: 20px; padding: 4px 8px; font-size: 11px; font-weight: 550; }
.status-badge i { width: 6px; height: 6px; border-radius: 50%; background: #869084; }
.status-badge.connected { color: #3c694b; background: #e7f2e4; }
.status-badge.connected i { background: #539269; }
.setting-detail { margin-top: 12px; font-size: 12px; color: var(--muted); }
.setting-detail strong { display: block; font-weight: 550; color: var(--text); }
.delivery-issue { color: #80513b; background: #fbf0e6; border-radius: 6px; padding: 8px 10px; margin-top: 9px; font-size: 12px; }
.service-card > .text-link { margin: 6px 0 0; font-size: 13px; }
.service-actions { margin-top: auto; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.service-actions .text-button { font-size: 13px; }
.limit-panel .toolbar { margin-bottom: 0; }
.form-columns, .split-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.limit-panel .form-error { margin-top: 14px; }
.limit-panel form > .button { margin-top: 20px; }
.limit-panel .panel-title { margin-bottom: 23px; }
.loading-panel, .load-failure { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); padding: 45px 20px; }
.load-failure { flex-wrap: wrap; }
.spinner { display: inline-block; width: 17px; height: 17px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { position: fixed; z-index: 30; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translate(-50%,8px); opacity: 0; width: max-content; max-width: min(540px,calc(100% - 30px)); pointer-events: none; color: #fff; background: #244735; box-shadow: 0 5px 22px rgba(26,41,31,.19); padding: 11px 18px; border-radius: 9px; font-size: 13px; transition: transform .18s,opacity .18s; text-align: center; }
.notice.visible { transform: translate(-50%,0); opacity: 1; }
.notice-error { background: #863f36; }
dialog { width: min(490px,calc(100% - 28px)); max-height: min(88vh,800px); max-height: min(90dvh,800px); margin: auto; overflow: auto; overscroll-behavior: contain; border: 1px solid #d7dfd2; border-radius: 17px; padding: 0; background: #fff; color: var(--text); box-shadow: 0 24px 100px rgba(9,29,19,.28); }
dialog::backdrop { background: rgba(16,35,26,.43); }
body:has(dialog[open]) { overflow: hidden; }
.dialog-inner { padding: clamp(18px,3vw,28px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 19px; }
.dialog-head h2 { font-size: 24px; }
.dialog-head .icon-button { color: var(--muted); flex: none; }
.dialog-copy { color: var(--muted); line-height: 1.55; }
.dialog-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.form-stack .dialog-actions { margin-top: 0; }
.dialog-actions .text-button:first-child,.dialog-actions .text-link:first-child { margin-right: auto; }
.dialog-actions .text-button, .dialog-actions .text-link { font-size: 13px; }
.dialog-actions .button { min-height: 40px; }
#confirmation-form .form-error { margin-top: 14px; }
.kind-field { border: 0; padding: 0; margin: 0; }
.kind-options { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #eff3eb; padding: 4px; border-radius: 8px; }
.kind-options label { position: relative; cursor: pointer; }
.kind-options input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.kind-options span { border-radius: 5px; display: flex; gap: 7px; justify-content: center; align-items: center; padding: 8px; color: #68766b; font-size: 13px; }
.kind-options .icon { width: 15px; height: 15px; }
.kind-options :checked + span { background: #fff; color: var(--forest); box-shadow: 0 1px 4px rgba(23,46,29,.12); }
.kind-options :focus-visible + span { outline: 2px solid #87a568; }
.amount-fields { grid-template-columns: minmax(0,1.4fr) minmax(0,.65fr); }
.optional { font-size: 11px; margin-left: 4px; font-weight: 400; color: var(--muted); }
.review-summary { background: #f1f4ed; border-radius: 7px; padding: 10px 12px; margin-bottom: 16px; color: #526450; font-size: 13px; overflow-wrap: anywhere; }
.key-fields { margin-top: 19px; }
.copy-field input { font-size: 13px; font-variant-numeric: tabular-nums; }
.copy-status { color: var(--forest); font-size: 12px; }
.copy-status:empty { display: none; }
.picker-year { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 12px; }
.picker-year strong { font-size: 18px; font-weight: 620; }
.picker-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.picker-grid button { min-height: 40px; border-radius: 7px; background: #f3f5f0; color: #526551; font-size: 13px; }
.picker-grid button:hover { background: #e3edd7; }
.picker-grid button[aria-pressed="true"] { background: var(--forest); color: #fff; }

@media (min-width: 1800px) {
  .auth-layout { max-width: 1920px; margin-inline: auto; }
  .app-shell { grid-template-columns: 265px minmax(0,1fr); }
}
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 202px minmax(0,1fr); }
  .sidebar { padding-inline: 12px; }
  .workspace { padding-inline: 23px; }
  .overview-grid { grid-template-columns: minmax(0,1.2fr) minmax(221px,.8fr); }
  .metrics { gap: 10px; }
  .metric { padding: 15px; }
  .metric-value { font-size: 28px; }
  .category-list li { font-size: 11px; gap: 5px; }
  .panel h2 { font-size: 19px; }
  .auth-layout { gap: 12px; padding: 15px; }
  .auth-art { min-height: calc(100svh - 30px); }
  .auth-panel { padding-inline: 29px; }
}
@media (max-width: 820px) {
  .app-shell { display: block; }
  .mobile-header { position: sticky; z-index: 10; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 10px 20px; background: var(--deep); color: #edf3e7; }
  .mobile-header .brand { color: #edf3e7; font-size: 24px; gap: 8px; }
  .mobile-header .brand img { width: 31px; height: 31px; border-radius: 8px; }
  .mobile-header .icon-button:hover { background: rgba(214,231,203,.14); }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: min(278px,85vw); z-index: 22; transform: translateX(-103%); visibility: hidden; padding: 23px 15px 22px; transition: transform .2s; }
  .sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 0 7px; }
  .sidebar-nav { margin-top: 32px; }
  .side-close { display: inline-flex; }
  .nav-open { overflow: hidden; }
  .nav-open .sidebar { visibility: visible; transform: translateX(0); }
  .nav-open .nav-scrim { display: block; position: fixed; z-index: 20; inset: 0; background: rgba(12,31,22,.43); }
  .nav-link { min-height: 46px; }
  .workspace { padding: 26px 20px 37px; }
  .page-head h1 { font-size: 38px; }
  .auth-panel { padding: 19px 16px; }
  .auth-art { --art-space: 25px; }
  .auth-form-wrap h1 { font-size: 36px; }
  .art-copy h2 { font-size: 46px; }
  .art-copy p { font-size: 14px; }
  input:not([type="radio"]),textarea,select { font-size: 16px; }
  .currency-select select { font-size: 14px; }
}
@media (max-width: 650px) {
  .auth-layout { display: flex; flex-direction: column; gap: 0; padding: 0; }
  .auth-panel { padding: 25px 24px 23px; align-items: stretch; }
  .auth-form-wrap { width: min(100%,420px); padding: 39px 0 7px; }
  .auth-brand { width: min(100%,420px); margin: 0 auto; }
  .auth-brand .brand { font-size: 26px; }
  .auth-brand img { width: 34px; height: 34px; }
  .auth-form-wrap h1 { font-size: 37px; }
  .auth-symbol { width: 37px; height: 37px; border-radius: 10px; margin-bottom: 15px; }
  .auth-intro { margin: 10px 0 23px; font-size: 14px; }
  .auth-form-wrap .form-stack { gap: 15px; }
  .auth-switch { margin-top: 15px; }
  .auth-bottom { display: none; }
  .auth-art { --art-space: 21px; margin: 5px auto 15px; width: min(calc(100% - 28px),455px); min-height: 0; border-radius: 17px; padding: 22px; display: grid; grid-template-columns: 1fr 105px; grid-template-rows: auto auto; }
  .art-copy { padding: 0; align-self: center; }
  .art-copy h2 { font-size: 28px; letter-spacing: -.058em; line-height: 1.02; }
  .art-copy p { display: none; }
  .art-ticks { width: 11px; height: 11px; right: 13px; top: 13px; }
  .ledger-art { align-self: center; margin: 0; margin-left: -12px; width: 125px; height: 70px; }
  .art-guide { grid-column: 1/-1; padding-top: 13px; margin-top: 11px; gap: 9px; }
  .guide-icon { width: 32px; height: 32px; border-radius: 7px; }
  .guide-icon .icon { width: 16px; height: 16px; }
  .art-guide strong { font-size: 12px; }
  .art-guide small { font-size: 10px; }
  .guide-arrow { width: 29px; height: 29px; }
  .workspace { padding: 22px 14px 35px; }
  .mobile-header { padding: 9px 14px; }
  .page-head { margin-bottom: 15px; min-height: 0; align-items: flex-start; }
  .page-head h1 { font-size: 32px; }
  .page-head > .button { min-height: 36px; padding: 7px 10px; font-size: 12px; }
  .page-head > .button .icon { width: 15px; height: 15px; }
  .page-head p { font-size: 13px; }
  .toolbar { margin-bottom: 14px; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 12px; gap: 9px; }
  .balance { grid-column: 1/-1; }
  .metric { padding: 14px; }
  .metric-label { margin-bottom: 7px; }
  .metric-label h2 { font-size: 13px; }
  .metric p { font-size: 11px; margin-top: 7px; }
  .metric-value { font-size: clamp(24px,5vw,28px); }
  .balance .metric-value { font-size: 33px; }
  .balance::after { width: 39%; right: -7%; }
  .overview-grid { grid-template-columns: minmax(0,1fr); gap: 12px; margin-bottom: 12px; }
  .panel { padding: 17px; border-radius: 12px; }
  .panel-title { margin-bottom: 13px; }
  .panel-title .text-link { font-size: 12px; min-height: 28px; }
  .chart-panel .panel-title { margin-bottom: 8px; }
  .cash-chart { height: 168px; }
  .categories-panel { display: grid; grid-template-columns: 117px minmax(0,1fr); align-items: center; gap: 4px 12px; }
  .categories-panel .panel-title { grid-column: 1/-1; margin-bottom: 3px; }
  .donut-wrap { width: 112px; height: 112px; margin: 0; }
  .donut-text strong { font-size: 12px; }
  .donut-text small { font-size: 9px; }
  .empty-caption { text-align: left; margin: 0; }
  .category-list { gap: 6px; }
  .category-list li { grid-template-columns: 6px minmax(0,1fr) auto; }
  .category-list small { display: none; }
  .table-panel { padding-bottom: 6px; }
  .table-panel .panel-title { margin-bottom: 5px; }
  .transactions-table th { font-size: 10px; }
  .transactions-table td { padding: 9px 4px; font-size: 12px; }
  .date-cell, .source-cell { display: none; }
  .mobile-date { display: block; font-size: 10px; color: var(--muted); }
  .operation-info { gap: 7px; }
  .operation-info strong { font-size: 12px; }
  .operation-info small { font-size: 10px; }
  .operation-icon { width: 29px; height: 29px; border-radius: 8px; }
  .operation-icon .icon { width: 15px; height: 15px; }
  .operation-cell { max-width: 140px; }
  .edit-cell { width: 26px; }
  .edit-cell .icon-button { width: 27px; }
  .ledger-tools { align-items: stretch; gap: 9px; }
  .search-field { width: 100%; }
  .search-field input { font-size: 16px; padding-block: 6px; }
  .insight-grid, .setting-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .advice-compact { grid-template-columns: auto minmax(0,1fr); gap: 9px 12px; margin-bottom: 12px; }
  .advice-compact .advice-glyph { width: 36px; height: 36px; border-radius: 9px; }
  .advice-compact .advice-glyph .icon { width: 20px; height: 20px; }
  .advice-compact > .button { grid-row: auto; grid-column: 2; justify-self: start; }
  .setting-grid { margin-bottom: 12px; }
  .form-columns { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .limit-panel .panel-title { align-items: flex-start; }
  .limit-panel .panel-title .toolbar { margin-left: 0; }
  .review-list li { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 8px; }
  .review-actions { grid-column: 2; justify-content: flex-start; }
  .review-actions .button { min-height: 35px; padding: 6px 10px; }
  .empty-state { padding: 18px 5px 22px; }
}
@media (max-width: 365px) {
  .workspace { padding-inline: 10px; }
  .page-head h1 { font-size: 29px; }
  .page-head { gap: 8px; }
  .page-head > .button { font-size: 11px; }
  .panel, .metric { padding-inline: 11px; }
  .split-fields { gap: 8px; }
  .dialog-inner { padding: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
