/* Approved dark Finance world. Loaded last so legacy layouts remain functional. */
:root {
  color-scheme: dark;
  --canvas: #070f14;
  --panel: #101e23;
  --surface: #15272c;
  --ink: #edf5f4;
  --muted: #a9bac4;
  --line: #2b4348;
  --forest: #112f27;
  --green: #87ecc5;
  --red: #ff7c88;
  --blue: #93c8ff;
  --amber: #f5ce82;
  background: var(--canvas);
  color: var(--ink);
}
body {
  color: var(--ink);
  background: radial-gradient(ellipse at 88% 0, #173b322e, transparent 48%), var(--canvas);
  caret-color: var(--green);
  scrollbar-color: #43655f var(--canvas);
}
body ::selection { background: #326a53; color: #fff; }
body :focus-visible { outline: 3px solid #87ecc5; outline-offset: 3px; }
body input, body select, body textarea {
  background: #0c191e;
  color: var(--ink);
  border-color: #3b555a;
  min-width: 0;
  min-height: 44px;
  caret-color: var(--green);
}
body input::placeholder, body textarea::placeholder { color: #9eb0bb; opacity: 1; }
body option { background: #101e23; color: var(--ink); }
body input[type=checkbox] { accent-color: #56bc91; }
body button, body a.secondary { min-height: 44px; }
body button:disabled { opacity: .58; }
body .primary, body .header-actions .primary, body #apply-period, body .login-submit {
  background: linear-gradient(160deg, #2f7557, #174b37);
  border: 1px solid #69c592;
  color: #f3fff7;
  box-shadow: inset 0 1px 0 #a6ffd34d;
}
body .primary:hover:not(:disabled), body #apply-period:hover, body .login-submit:hover:not(:disabled) { background: #306d51; border-color: #9ce9bd; }
body .secondary, body .quiet, body .header-actions .quiet, body .header-actions .secondary,
body .section-heading a.secondary, body .account-tile .secondary, body .payment-panel>a.secondary,
body .period-toolbar button, body .finance-session button, body .operation-menu>summary {
  background: #16282b;
  color: #d9ede7;
  border: 1px solid #324d50;
}
body .secondary:hover:not(:disabled), body .quiet:hover:not(:disabled), body .finance-session button:hover { background: #203b37; border-color: #55806d; }
body .danger { background: #733240; color: #fff2f3; border: 1px solid #bc5c70; }
body .danger:hover { background: #8a3d4d; }
body aside { background: #0a151b; border-color: #1b3337; }
body aside .brand, body .brand, body .login-brand { color: #d6ffe9; }
body .brand span, body .login-brand span { color: #a9d3bf; }
body nav a { color: #b9c8d3; border: 1px solid transparent; }
body nav a:hover { background: #132b29; }
body nav a[aria-current=page] {
  background: linear-gradient(110deg, #245b405c, #112b24);
  border-color: #416b54;
  color: #b9f7d6;
  box-shadow: inset 2px 0 0 #8ee7b2;
}
body .aside-note { color: var(--muted); background: #0d1c21; border: 1px solid #20373b; }
body .finance-session { border-color: var(--line); color: var(--muted); }
body .panel, body .editor, body .trend, body .ai-helper, body .accounts,
body .totals, body .monthly, body .table-wrap, body .account-tile,
body .accounts-list-view .account-card-grid, body .debt-filters,
body #operations-page>.filters, body #operations-page>.foot,
body #clients-page>.toolbar, body #operations-summary article,
body .debt-summary .next-debt, body .login-card {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
}
body .balances-panel, body .results-panel { border-color: #345b50; }
body #operations-summary article.panel { background: var(--panel); color: var(--ink); }
body .row, body .monthly>div+div, body .account, body td, body .debt-actual { border-color: #253b40; }
body .balances-panel #accounts .row { background: #16262b; border: 1px solid #283d42; border-radius: 12px; padding: 11px 12px; margin: 7px 0; }
body .row strong, body .tile-balance, body .people-metric strong, body .empty strong { color: var(--ink); }
body .account-name { min-width: 0; overflow-wrap: anywhere; }
body .cash-summary { background: linear-gradient(135deg, #1d4434, #112a25); border: 1px solid #41725a; padding: 16px; }
body .cash-summary .total, body .total { color: #b4f4da; border-color: #3e745a; }
body .debt-total { color: var(--amber); border-color: #ad955b; }
body .unknown, body .account-warning, body #clients .payment-soon { color: var(--amber); }
body .attention { background: #dfecc8; color: #283a2b; }
body .attention strong { color: #102f24; }
body .attention small { color: #455648; }
body .muted, body .foot, body small, body .panel-description,
body .people-metric span, body .client-fields small, body .debt-summary article>span,
body .debt-summary article>small, body .debt-balance-label, body .debt-actual small,
body #clients-page .filters label, body #clients-page .reminder-note,
body #debts .foot, body #clients td:before, body .period-toolbar label { color: var(--muted); }
body .income, body .good { color: var(--green); }
body .expense, body .due, body #clients .payment-overdue { color: var(--red); }
body .transfer { color: var(--blue); }
body .panel h2>.fi-icon, body .period-toolbar h2>.fi-icon,
body .ledger-summary article>.fi-icon, body #accounts-summary article.metric-1>.fi-icon,
body .people-metric>svg { color: #88eac1; background: #204a3c; }
body .ledger-summary article.metric-1>.fi-icon, body #accounts-summary article.metric-2>.fi-icon,
body .monthly>div:nth-child(2)>.fi-icon, body .monthly>div:nth-child(2):before { background: #4c2c35; color: var(--red); }
body .monthly>div>.fi-icon, body .monthly>div:before { background: #1d4037; color: var(--green); }
body .monthly>div:nth-child(3)>.fi-icon, body .monthly>div:nth-child(3):before,
body .metric-neutral>svg { background: #293b42; color: #b8ced5; }
body .metric-attention>svg { background: #413c2b; color: var(--amber); }
body .account-symbol { background: #1d3645; color: #92c5f0; }
body .account-usdt { background: #1c4539; color: #99f1ce; }
body .account-usd { background: #2b3941; color: #e2e9ed; }
body .account-kzt { background: #443c28; color: #f1d58f; }
body #client-detail h2 svg, body .debt-summary article>svg, body #debts h2 svg { color: var(--green); }
body .debt-summary .next-debt>svg { color: var(--amber); }
body .period-comparison, body .reminder-note, body .ai-workflow, body .loading { background: #14292a; color: var(--muted); }
body .tag, body #debts .status { background: #214137; color: #abf2cf; }
body .tag.expense { background: #4d2b35; color: #ffb6be; }
body .tag.transfer { background: #203d53; color: #b2d9ff; }
body .status { background: #423b29; color: var(--amber); }
body .cancelled, body #debts .debt-closed .status { background: #24343b; color: #b2c1ca; }
body .view-switch, body .operation-tabs { background: #0d1c21; }
body .view-switch button, body .operation-tabs button { color: #b9cbd1; }
body .view-switch button[aria-pressed=true], body .operation-tabs button[aria-pressed=true] { background: #285c45; color: #e6fff0; }
body .operations-table th, body .data-table th, body #clients .data-table th { background: #193037; color: #b9cbd3; }
body .budget-table th { background: #193037; color: #b9cbd3; }
body .data-table td, body .data-table th, body .budget-table td, body .budget-table tbody,
body .operations-table td, body .operations-table th, body tbody,
body .category, body .mini-op, body .client-fields div, body #ai-result,
body h1, body h2, body h3, body .section-heading { border-color: var(--line); }
body .budget-table progress {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: #253c40;
  color: var(--red);
  border-radius: 3px;
  overflow: hidden;
}
body .budget-table progress::-webkit-progress-bar { background: #253c40; border-radius: 3px; }
body .budget-table progress::-webkit-progress-value { background: var(--red); border-radius: 3px; }
body .budget-table progress::-moz-progress-bar { background: var(--red); border-radius: 3px; }
body .operation-menu .row-actions { background: #172a30; border-color: #45645d; box-shadow: 0 10px 24px #0006; }
body .operation-status:before { background: var(--green); }
body .operation-status.cancelled:before { background: #99abb5; }
body details summary, body .history-entry summary, body #debts details>summary, body #clients .data-table .quiet { color: #b4efd1; }
body .error, body .login-error { background: #41242d; color: #ffc0c7; border: 1px solid #84505b; }
body .finance-session .finance-session-error,
body .data-freshness[data-state=conflict], body .data-freshness[data-state=error] { color: #ffabb6; }
body .category progress, body .category progress::-webkit-progress-bar { background: #253c40; }
body .category progress::-webkit-progress-value, body .barline progress::-webkit-progress-value { background: #63d7a5; }
body .category.expense progress::-webkit-progress-value, body .barline.expense progress::-webkit-progress-value { background: #f27182; }
body .category progress::-moz-progress-bar, body .barline progress::-moz-progress-bar { background: #63d7a5; }
body .category.expense progress::-moz-progress-bar, body .barline.expense progress::-moz-progress-bar { background: #f27182; }
body main, body main>*, body .lead>*, body .section-heading>*, body .page-heading>*, body .header-actions, body .form-grid>*, body .client-fields>* { min-width: 0; }
body .page-heading, body .section-heading, body .header-actions, body .toolbar, body .form-actions { flex-wrap: wrap; }
body .header-actions { gap: 10px; }
body .table-wrap { max-width: 100%; overflow-x: auto; }
body h1, body h2, body h3, body .row strong { overflow-wrap: anywhere; }
body.login-page { background: radial-gradient(ellipse at 75% 0, #173d31, transparent 65%), var(--canvas); color: var(--ink); }
body.login-page .login-shell { max-width: 440px; padding: 40px 0; }
body.login-page .login-card { border-color: #3b5c50; }
body.login-page .login-lock { color: var(--green); }
body.login-page .login-description, body.login-page .login-remember small,
body.login-page .login-status, body.login-page .login-footer { color: var(--muted); }
body.login-page .login-card input:not([type=checkbox]) { background: #0c191e; color: var(--ink); border-color: #3b555a; }
body.login-page .login-password-row button { background: #1e3631; color: #b4efd1; }
body.login-page .login-retry { color: var(--green); }
@media(min-width:1101px) {
  body .lead { grid-template-columns: minmax(0,1.12fr) minmax(0,.95fr); gap: 16px; }
}
@media(max-width:1100px) and (min-width:781px) {
  body .lead { grid-template-columns: minmax(0,1fr); }
  body .obligation-column { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
  body .header-actions { width: 100%; }
}
@media(max-width:780px) {
  body .shell { display: block; }
  body aside { height: auto; position: static; }
  body main { padding: 22px 16px; }
  body .lead, body .obligation-column, body .recon-lead { grid-template-columns: minmax(0,1fr); }
  body .header-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; }
  body .header-actions button { min-width: 0; overflow-wrap: anywhere; }
  body input, body select, body textarea { font-size: 16px; }
  body .form-grid { grid-template-columns: minmax(0,1fr); }
  body .section-heading { gap: 12px; }
  body .row { gap: 10px; }
  body .balances-panel #accounts .row { flex-wrap: wrap; }
  body .balances-panel #accounts .row strong { margin-left: auto; text-align: right; }
  body .cash-summary .total { gap: 12px; }
  body .monthly strong { white-space: normal; overflow-wrap: anywhere; }
  body .people-metric>div { flex-wrap: wrap; }
  body .client-fields { grid-template-columns: minmax(0,1fr); }
  body.login-page .login-shell { width: min(440px,calc(100% - 32px)); padding: 28px 0; }
  body.login-page .login-card { padding: 26px 22px; }
}
@media(prefers-reduced-motion:reduce) { body *, body *::before, body *::after { transition: none !important; scroll-behavior: auto !important; } }

/* Liquid Glass: the supplied wallet reference owns the material, not its data. */
:root { --canvas:#08090b; --panel:rgba(29,31,35,.76); --surface:rgba(44,47,53,.72); --ink:#f6f7f9; --muted:#b0b4bf; --line:rgba(255,255,255,.12); --forest:#133a2d; }
body { background:radial-gradient(ellipse at 68% -8%,#68313a38,transparent 46%),radial-gradient(ellipse at 0 65%,#234e4230,transparent 50%),#08090b; background-attachment:fixed; }
body aside { background:rgba(15,17,20,.82); border-color:var(--line); backdrop-filter:blur(28px); -webkit-backdrop-filter:blur(28px); }
body .panel, body .editor, body .trend, body .ai-helper, body .accounts,
body .totals, body .monthly, body .table-wrap, body .account-tile,
body .accounts-list-view .account-card-grid, body .debt-filters,
body #operations-page>.filters, body #operations-page>.foot, body #clients-page>.toolbar,
body #operations-summary article.panel, body .debt-summary .next-debt, body .login-card {
  background:linear-gradient(140deg,rgba(255,255,255,.045),transparent 60%),var(--panel);
  border:1px solid var(--line); border-radius:16px;
}
body main { padding:32px 28px; }
body .panel { padding:24px; }
body .page-heading { gap:24px; margin-bottom:24px; }
body h1 { letter-spacing:-.025em; }
body .secondary, body .quiet, body .header-actions .quiet, body .header-actions .secondary,
body .section-heading a.secondary, body .account-tile .secondary, body .payment-panel>a.secondary,
body .period-toolbar button, body .finance-session button, body .operation-menu>summary {
  background:rgba(255,255,255,.055); border-color:rgba(255,255,255,.14); color:#e4e9ed;
  border-radius:12px; display:inline-flex; align-items:center; justify-content:center; gap:10px;
}
body .secondary:hover:not(:disabled), body .quiet:hover:not(:disabled) { background:rgba(255,255,255,.10); border-color:#ffffff38; }
body .primary, body .header-actions .primary, body #apply-period, body .login-submit { background:linear-gradient(150deg,#316b53,#214935); border-color:#70ac8970; border-radius:12px; box-shadow:none; }
body input, body select, body textarea, body.login-page .login-card input:not([type=checkbox]) { background:#121418; border-color:#ffffff28; border-radius:10px; }
body nav a { border-radius:12px; gap:14px; }
body nav a[aria-current=page] { background:#ffffff0d; color:#c6ffe5; border-color:#ffffff17; box-shadow:none; }
body nav a:hover { background:#ffffff09; }
body .aside-note, body .period-comparison, body .reminder-note, body .ai-workflow { background:#ffffff06; border-color:var(--line); }
body .balances-panel #accounts .row { background:transparent; border:0; border-bottom:1px solid var(--line); border-radius:0; padding:14px 0; margin:0; }
body .balances-panel #accounts .row:last-child { border-bottom:0; }
body .cash-summary { background:linear-gradient(130deg,#2a4b3d80,#293b3440); border-color:#89c7a033; border-radius:14px; margin-top:20px; }
body .cash-summary .total { align-items:center; flex-wrap:wrap; }
body .cash-summary .total strong { font-size:clamp(23px,2.3vw,32px); }
body .panel h2>.fi-icon, body .period-toolbar h2>.fi-icon, body .people-metric>svg { background:#ffffff08; color:#a5e4c5; }
body .account-symbol { background:#ffffff09; color:#c2d5e7; flex-shrink:0; }
body .account-symbol .fi-icon { padding:0; box-sizing:border-box; width:23px; height:23px; }
body .account-usdt { color:#9de7c6; background:#28584350; }
body .account-kzt { color:#e6cf94; background:#5c4f2d50; }
body .debt-total { display:flex; flex-direction:column; align-items:flex-start; gap:8px; border-color:var(--line); padding-top:20px; margin-top:18px; }
body .debt-total strong { color:var(--ink); font-size:24px; }
body .debt-total>span { color:var(--muted); font-size:12px; }
body #overview-debts .row { gap:18px; align-items:flex-start; }
body #overview-debts .row>span { min-width:0; }
body #overview-debts .row>strong { flex-shrink:0; font-size:14px; }
body .payment-date { display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; margin:6px 0 14px; font-size:13px; }
body .attention { background:linear-gradient(125deg,#31534355,#293a3450); color:var(--ink); border:1px solid #c6e5d221; padding:20px; border-radius:14px; }
body .attention strong { color:#d5ffe8; font-size:clamp(24px,3vw,32px); margin:10px 0; }
body .attention small { color:var(--muted); }
body #accounts-summary, body #operations-summary { align-items:start; gap:16px; }
body .ledger-summary article.panel, body #accounts-summary article.panel {
  display:flex; flex-direction:column; align-self:start; gap:10px; padding:22px; min-height:0; height:auto;
}
/* Metrics need labels and amounts, not a second set of decorative arrows. */
body .ledger-summary article>.fi-icon { display:none; }
body .ledger-summary article>span, body .ledger-summary article>small { margin:0; }
body .ledger-summary article>strong { font-size:22px; margin:0; line-height:1.3; }
body .ledger-summary article.cash-metric>strong { font-size:clamp(25px,2.6vw,34px); }
body .ledger-summary article>small { font-size:12px; line-height:1.5; }
body #accounts-period-slot .period-toolbar { margin:16px 0 24px; padding:0; }
body .account-card-grid { gap:16px; align-items:start; }
body #account-list.account-card-grid { background:transparent; border:0; border-radius:0; padding:0; }
body #accounts-period-slot { margin-bottom:20px; }
body .account-card-grid .account-tile { padding:20px; }
body .account-card-grid .account-tile header { gap:14px; min-height:0; align-items:center; }
body .account-card-grid .tile-balance { margin:20px 0 8px; min-height:0; }
body .account-card-grid .account-tile>.secondary { margin-top:12px; min-height:44px; }
body .account-detail>summary { min-height:40px; font-size:12px; }
body .account-detail .account-basis { line-height:1.6; }
body .operations-table th, body .data-table th, body #clients .data-table th, body .budget-table th { background:#26282d; color:#c5cad3; }
body .view-switch, body .operation-tabs { background:#ffffff05; border-color:var(--line); }
body .view-switch button[aria-pressed=true], body .operation-tabs button[aria-pressed=true] { background:#ffffff16; color:#d3ffe7; }
body .operation-menu .row-actions { background:#24272c; border-color:#ffffff26; }
body .mobile-bar, body .nav-close, body .nav-shade { display:none; }
body .statement-detail { flex-direction:row; align-items:center; gap:12px; margin:20px 0; font-size:14px; }
body .statement-detail input { width:20px; height:20px; min-height:20px; flex-shrink:0; }
body.login-page { background:radial-gradient(ellipse at 80% 5%,#59313c66,transparent 60%),#090b0d; }
body.login-page .login-card { backdrop-filter:blur(24px); -webkit-backdrop-filter:blur(24px); border-color:var(--line); }
@supports not (backdrop-filter:blur(1px)) { body aside, body .login-card { background:#191c20; } }
@media(min-width:781px) { body .accounts-list-view .account-tile { border-radius:0; background:transparent; } }
@media(max-width:1100px) and (min-width:781px) { body .obligation-column { grid-template-columns:1fr; } }
@media(max-width:780px) {
  body .mobile-bar { position:sticky; top:0; z-index:30; display:flex; justify-content:space-between; align-items:center; padding:12px 16px; background:#13151bd9; backdrop-filter:blur(24px); -webkit-backdrop-filter:blur(24px); border-bottom:1px solid var(--line); }
  body .mobile-brand { text-decoration:none; color:#d5ffe6; font-weight:800; font-size:22px; letter-spacing:-.025em; }
  body #mobile-menu svg { width:21px; height:21px; }
  body .mobile-bar button { min-height:44px; }
  body .shell>aside { position:fixed; inset:0 auto 0 0; width:min(320px,calc(100vw - 44px)); height:100dvh; z-index:50; overflow-y:auto; padding:22px 18px; transform:translateX(-105%); visibility:hidden; background:#17191eed; transition:transform .22s ease-out,visibility .22s; }
  body.navigation-open { overflow:hidden; }
  body.navigation-open .shell>aside { transform:translateX(0); visibility:visible; }
  body .shell>aside .brand { display:block; margin-bottom:18px; }
  body .shell>aside nav { display:grid; grid-template-columns:1fr; overflow:visible; gap:6px; padding:0; }
  body .shell>aside nav a { white-space:normal; display:flex; width:100%; padding:13px 14px; }
  body .shell>aside .aside-note { display:block; margin:20px 0; padding:16px; }
  body .shell>aside .finance-session { display:block; margin-top:20px; }
  body .nav-close { display:flex; width:100%; margin-bottom:20px; }
  body .nav-shade:not([hidden]) { display:block; position:fixed; inset:0; width:100%; height:100dvh; background:#0009; border:0; border-radius:0; z-index:40; padding:0; }
  body main { padding:24px 16px 36px; }
  body .panel { padding:20px; }
  body .page-heading { gap:18px; }
  body .page-heading h1 { font-size:27px; }
  body .header-actions { gap:10px; }
  body .ledger-summary article.panel, body #accounts-summary article.panel { padding:20px; gap:8px; }
  body .ledger-summary article.cash-metric>strong { font-size:30px; }
  body .account-card-grid { grid-template-columns:1fr; }
  body .monthly>div { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
  body .monthly>div>.fi-icon { display:none; }
  body .monthly>div strong { max-width:180px; text-align:right; }
  body #overview-debts .row { flex-wrap:wrap; }
  body #overview-debts .row>strong { margin-left:auto; }
  body .operation-tabs { flex-wrap:wrap; overflow:visible; width:100%; }
  body .operation-tabs button { flex:1 1 40%; }
}
@media(prefers-reduced-transparency:reduce), (prefers-contrast:more) {
  :root { --panel:#1a1d22; --surface:#282c32; --line:#74808b; }
  body aside, body .mobile-bar, body.login-page .login-card, body .shell>aside { background:#14171b; backdrop-filter:none; -webkit-backdrop-filter:none; }
}

/* Clearer glass and consistent card geometry, per the user's refinement. */
:root { --panel:rgba(17,20,22,.76); --surface:rgba(36,40,41,.74); --muted:#c0cdc7; --line:rgba(232,244,237,.16); }
body, body.login-page {
  background:radial-gradient(ellipse 760px 560px at 78% 14%,rgba(180,213,193,.14),transparent 75%),
    radial-gradient(ellipse 680px 650px at 24% 74%,rgba(106,151,129,.08),transparent 78%),#090c0d;
  background-attachment:fixed;
}
body::before {
  content:''; position:fixed; pointer-events:none; z-index:-1;
  width:min(800px,90vw); height:600px; top:-100px; right:-120px;
  background:#bfe4cc; opacity:.06; border-radius:50%; filter:blur(150px);
}
body .panel, body .editor, body .trend, body .ai-helper, body .totals,
body .monthly, body .account-tile, body .debt-filters, body #clients-page>.toolbar,
body #operations-summary article.panel, body .debt-summary .next-debt, body .login-card {
  background:linear-gradient(140deg,rgba(255,255,255,.04),rgba(255,255,255,.01) 60%),var(--panel);
  backdrop-filter:blur(28px) saturate(100%); -webkit-backdrop-filter:blur(28px) saturate(100%);
  border-color:var(--line);
}
body aside { background:rgba(11,16,16,.76); }
body .financing, body .repayment { color:var(--blue); }
body .ledger-summary, body #accounts-summary, body #operations-summary {
  grid-template-columns:repeat(3,minmax(0,1fr)); grid-auto-rows:1fr; align-items:stretch;
}
body .ledger-summary article.panel, body #accounts-summary article.panel {
  align-self:stretch; min-height:196px; height:auto; gap:10px;
}
body .ledger-summary article>span { min-height:40px; }
body .ledger-summary article>strong, body .ledger-summary article.cash-metric>strong { font-size:24px; line-height:1.3; }
body .ledger-summary article>small { margin-top:auto; padding-top:4px; }
body .account-card-grid { align-items:stretch; grid-auto-rows:1fr; }
body .account-card-grid .account-tile {
  display:flex; flex-direction:column; min-height:272px; gap:0;
}
body .account-card-grid .account-tile header { min-height:88px; align-items:flex-start; }
body .account-card-grid .account-tile header>div { min-width:0; }
body .account-card-grid .account-tile h3 { line-height:1.4; }
body .account-card-grid .tile-balance { margin:12px 0 8px; min-height:32px; font-size:22px; line-height:1.45; }
body .account-card-grid .tile-balance .unknown { font-size:16px; }
body .account-card-grid .account-detail { margin-top:auto; padding-top:4px; }
body .account-card-grid .account-tile>.secondary { align-self:flex-start; margin-top:12px; }
@media(min-width:781px) {
  body .accounts-list-view .account-card-grid { display:block; }
  body .accounts-list-view .account-tile { display:grid; min-height:0; background:transparent; backdrop-filter:none; }
  body .accounts-list-view .account-tile header { min-height:0; align-items:center; }
  body .accounts-list-view .tile-balance { min-height:0; margin:0; font-size:16px; }
  body .accounts-list-view .account-detail { margin:0; padding:0; }
}
@media(max-width:780px) {
  body .ledger-summary, body #accounts-summary, body #operations-summary { grid-template-columns:1fr; }
  body .ledger-summary article.panel, body #accounts-summary article.panel { min-height:180px; }
  body .ledger-summary article>strong, body .ledger-summary article.cash-metric>strong { font-size:24px; }
  body .mobile-bar { background:rgba(12,24,17,.65); }
  body .shell>aside { background:rgba(13,25,19,.90); }
  body .account-card-grid .account-tile { min-height:280px; }
}
@supports not (backdrop-filter:blur(1px)) {
  :root { --panel:#18221d; --surface:#24362b; }
}
/* Viewer controls are hidden for clarity; server-side authorization is decisive. */
body.finance-viewer #add-operation, body.finance-viewer #open-transfer,
body.finance-viewer #add-client, body.finance-viewer #add-debt,
body.finance-viewer #add-reconciliation, body.finance-viewer #add-with-ai,
body.finance-viewer .header-words, body.finance-viewer [data-reconcile],
body.finance-viewer [data-edit-client], body.finance-viewer [data-pay-debt],
body.finance-viewer [data-action=edit], body.finance-viewer [data-action=cancel],
body.finance-viewer #editor, body.finance-viewer #workspace-editor,
body.finance-viewer #budget-copy, body.finance-viewer .budget-save,
body.finance-viewer #budget-copy-preview, body.finance-viewer #sync-run,
body.finance-viewer nav [data-page=ai] { display:none !important; }
body.finance-viewer #budget-form input[readonly] { border-color:transparent; background:transparent; }
body.finance-viewer #ai-page>* { display:none !important; }
body.finance-viewer #ai-page::before { content:'Для этого входа доступен только просмотр. Отчёты и статистика доступны на главной и в PDF.'; display:block; padding:24px; }
@media(prefers-reduced-transparency:reduce), (prefers-contrast:more) {
  :root { --panel:#18221d; --surface:#24362b; --line:#748b7e; }
  body .panel, body .editor, body .trend, body .ai-helper, body .totals,
  body .monthly, body .account-tile, body .debt-filters, body #clients-page>.toolbar,
  body #operations-summary article.panel, body .debt-summary .next-debt, body .login-card {
    background:var(--panel); backdrop-filter:none; -webkit-backdrop-filter:none;
  }
  body::before { display:none; }
}

/* Outgoing confirmation stays visible across every finance screen. */
#writeback-feedback{padding:12px 16px;margin:12px 0;border:1px solid var(--line);border-radius:10px;color:var(--ink)}
#writeback-feedback[data-state="pending"],#writeback-feedback[data-state="sending"]{color:#f5ce82;background:rgba(245,206,130,.08);border-color:rgba(245,206,130,.35)}
#writeback-feedback[data-state="confirmed"]{color:#87ecc5}
#writeback-feedback[data-state="error"],#writeback-feedback[data-state="conflict"]{color:#ffb2b9;background:rgba(255,124,136,.08);border-color:rgba(255,124,136,.35)}
