/* inter-cyrillic-ext-wght-normal */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2) format('woff2-variations');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* inter-cyrillic-wght-normal */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* inter-greek-ext-wght-normal */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2) format('woff2-variations');
  unicode-range: U+1F00-1FFF;
}

/* inter-greek-wght-normal */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/inter-greek-wght-normal-CkhJZR-_.woff2) format('woff2-variations');
  unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
}

/* inter-vietnamese-wght-normal */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* inter-latin-ext-wght-normal */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* inter-latin-wght-normal */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/inter-latin-wght-normal-Dx4kXJAl.woff2) format('woff2-variations');
  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;
}/* unbounded-cyrillic-ext-600-normal */
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(data:font/woff2;base64,d09GMgABAAAAAAQ8ABAAAAAACCQAAAPiAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGhYbgQwcLgZgP1NUQVQqAFwRCAqDJIJvCxQAATYCJAMiBCAFhQwHZwwHG8IGIK4KbGN6UBdhJpEWQy2Toz3zeWyACp7/16Pu+8kA9BItK5ZERbPbbs7mr/3aQ1SS2Ik66n9PbO8r4o2hiSc6oaiHRCM0pkM0uXtOJNKIo7byH74wHw1xI27+L8f3js7WsN0WKNJE5uYx6Y5+gaS9M2xQuAYGMoW2Hl6WBhQIpVM3ecy+RsYKIJp/V4sA1gCAQhA0BAEsiaSQUVzqGYTKXabiUPlzTBIqZQIYBgLI5BEqCbmAAIKOBeYI5ggKMEfhLRNI1SYdDcB4PaJJKyagwoIpFKTnpRwqWo93bQ2gpFUAunql2skCtVRIoKof6UWUVuBhBijOVjs+gPP492Htk2EF+l/xBWT1vfugMtVfwF8G8nqO4CwNzpM+fyzMpOmAQgDEQrUDgAI0wFmG02dkUg6wxRyFKf6MLrggyv+wAUxmGJ+dN6KAvGskDVxIEAN2AFgA4AiwAsYAqwFvQIMoZUhpzildUPMEvc22z0q3nD+FSTZYK6BN7Og9y3KrCZaTB3afPpWFh+49a2v7eaSDTy2XPva2fIblVsuePGHB/sePm5vfru9mwRNb/Zmf1WNos8SBlcmuVrNlYe2NLeSWV8B19dPyP8f+HrP5c/Tv0QN/xreN75Q/xL1Va03XLm7t+LsRvikzbNPNzj9csZuwPqs5au1Y/vcdKZrkbi6+GBLZKPT0+6TslUlxR/g8czR0nN44b+y6zI9MtgwW9bt1vdszql3sHxoT3p8wKe2JXmTaObcMDkkNe63Nw5C//fbjnTtOI073vPYLCY27zbVtq7VnYruV9FDSADPMpAYw7DbnIcQDUKDt1m6rx7uHAHJors9L5/vssv+Za9p3gHd5K5cAvO8O6oN0Y/p0MEUBIPBXAdo+1H9TgiFfVDfX2nBesQfPOCynbSEU4KZMGmBBhkw8ZQTZTyGANavQEN0C2CvlS0UITrCisBVXRSPdb69OU0xotaOYEoxQbEnFU+yVa5QdlCp0Ex1rSMl97ELaIBEhYYwBSEKECRZHGJI0D2MlERBifD9GCk2Fj4+2gBKRwqDx0CLieDBKCJ+fjSeUcW86fRhChfipsKRWQjxyAkJqIUEMDIujTRDgUeIRUeAhIBypbiEIQURJTokwFWj0PkY+6oKg/vFCWHFzKCffrd1mWMoyqqHv3EpEQESk1aAwpDXYpAAKFoUsOJpvxGKEYRRaq47Gl0IiJI01jyclLLFhdQwLiUOCsCQGjY9N2+qUDvwaG0h0AAsg2LcoNNFEFxMxNS0YpBCHcuZOiwgEBQL1RZGgUFI8MMQy6GQboSNuFAvnMkri+NR155UY7ddXAA==) format('woff2'), url(data:font/woff;base64,d09GRgABAAAAAAZIAA8AAAAAB8gAAQABAAAAAAAAAAAAAAAAAAAAAAAAAABHREVGAAABWAAAABYAAAAWABEABEdQT1MAAAFwAAAAYAAAAIyO+5dmR1NVQgAAAdAAAAAtAAAALiN2JIJPUy8yAAACAAAAAEoAAABgYdt+TlNUQVQAAAJMAAAAJwAAACp5nGrlY21hcAAAAnQAAABCAAAAXEHQ4ltnYXNwAAACuAAAAAgAAAAIAAAAEGdseWYAAALAAAABawAAAYhwFPywaGVhZAAABCwAAAA2AAAANiSMqbNoaGVhAAAEZAAAAB8AAAAkCb8CyWhtdHgAAASEAAAAIAAAACIUDQCMbG9jYQAABKQAAAAUAAAAFAFtAfxtYXhwAAAEuAAAABwAAAAgABsA8W5hbWUAAATUAAABIwAAAmIy3lZmcG9zdAAABfgAAABQAAAAZ1ZaGUUAAQAAAAwAAAAAAAAAAgABAAEAAwABAAB42iWJJQJCURBFzwiaX6SiHelIIrIAtOAue2Ut30euIkCdHiNsMpsvCJvf/Ug4rp5nAg4Qxwggh939TBUKh1OjiuSvQBWlgQMDWigGEP+LRxGEElCw5Kt57kWbALJODYB42mNgZGBg4GLQAUJmFzefEAaJ5MqiHAaRnMSSPAYRBhBgARH//4NIAJZPBzwAAAB42mNgYZZgimBgZWBg6gLSDAzeEJoxjsGIMYwBFbADMROM4+fox8BwgEFBYQvz4//cDAws7xjlgPqmg+SYrJjeASkFBmYAxUMLAAAAeNpjYARCDiBmYBABkzIMTOXpGSWMLEA2E1iEgZGTKYKBAQAsXwJlAHjaY2BgYAJiZiAWAZKMYJqFwQNI8zFwAOXYGBQYHBkWMBxkZFLY8v8/UByF///J/wP/U/87/me8HwTUjQIAZb8SQgAAAAEAAf//AA942jxLJXBDQRB9uzf9YQZ/uYApfyqjKTPX6/r6eBkvC75+ytwm3quAnzAu7wMw1gHh4xIEHEBEhmQkJEPr/FSbe6BTLtXCvFU/oVtwKyHuW0oH3ACRykiHoogQfEAX76v1q9UPumxks21PLsel+gqN1AuNRtcnvjgNAuCAg7aBAf47wJ3ItzYh3aiIa65jFhhKpNOmYStTt2zLtqUpLdNIq4TmUAusT8bjsahDjynNoTkcMia1WDSuT1q27md6aS5jTiiLd7ecvmUEy7/JTF7cwT5B/hw72KJmp6VPD2YPWSKlZBGqwNj7dwN3pH9oFM9OtriFAjbZrmLCoYK8/HyMYULiWkZmaq6Z1pbJjrISYTxcAnwcoULi2iZGeu7Z1kB3ijOrM9Yxn2FgBoabMbvyqiur9zCfWQrygSCzAuMv5vMMvCAZMYiT2NiUldQE+/mMVNWMefvFG2Ojm5jPyyooyEaEhzMAAEGZV+oAAAEAAAABs3X7Ap9BXw889QADA+gAAAAA3z+OhAAAAADgXCNR/r/+yQcaBL0AAAAGAAIAAAAAAAB42mNgZGBgfvyfm4GB3ejf/j/N7FJAEVTAAQCM0AWRAHjaYw5n8GRez8AEwwx/GBhAmHkBgxqQJc4gCABt9QWpAAAAFQAxAD0ASQBJAEkAnQCqAMR42mNgZGBg4GSYz8DOEMDABuYhAAsDIwAYegENeNqM0EOCHVEUANATm9PY/oqTSTyJbRdb7zvOkrKS7Cmorjbfu/a9WOunZZYsX4NfS86U8hL7l2wt5aU2Llleysuc87uUlxuPscIT/VJeab8HpbzRGdtH5SXLrbe5lNfYjIdiw3JXBEMiT8VyqUy3wK6mjguqqjo+ass1dXVUdOSGVARtqaq7brjlsREfBD0jIrHIiRldnoi1i/xgxG51FWfV1F2USnSFIrLjpZqK8yoazqmIxPpOOyYVizScd9Z5kddTqtxx2R0XFzXNA7FUz5D32rNk7J6RcVXQ9EV7/Fa7NdQ0NOz2SCa2e9ZK97QFA2Ifi6zLesWlg7aO3Q7PuHoqLyJ6Pqj4KBgurEGQGhJL/B0wFEFxAhQvxbBTEwCrLltzAHjaY2BiAIP/cxiMGLABTiBWYTjJyMTAzMjMyMLIysjG5phUlFqWyl6al2lg4GgAoo0MnEz4EpNLS1KT83OT9JITi1N5QNLGBmZgDgCJKRMC) format('woff');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* unbounded-cyrillic-600-normal */
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/assets/unbounded-cyrillic-600-normal-DW6uzIMB.woff2) format('woff2'), url(/assets/unbounded-cyrillic-600-normal-B-s5c2Kn.woff) format('woff');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* unbounded-vietnamese-600-normal */
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/assets/unbounded-vietnamese-600-normal-Cx2bTSHN.woff2) format('woff2'), url(/assets/unbounded-vietnamese-600-normal-BzfrgZ_C.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* unbounded-latin-ext-600-normal */
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/assets/unbounded-latin-ext-600-normal-0iZLtTDV.woff2) format('woff2'), url(/assets/unbounded-latin-ext-600-normal-ClMPf-bu.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* unbounded-latin-600-normal */
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/assets/unbounded-latin-600-normal-oRSANpZr.woff2) format('woff2'), url(/assets/unbounded-latin-600-normal-BPdB_PEv.woff) format('woff');
  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;
}/* ═══════════════════════════════════════════════════════════════════════════
   ГРАФИТ — дизайн-система «Запаса»
   Глубокий чёрный, графитовые поверхности, один яркий акцент (Citrus),
   матовое стекло только там, где оно работает: меню и шторки. Шрифт — Inter.
   ═══════════════════════════════════════════════════════════════════════════ */

h1, h2, h3, p { margin: 0; }
img, svg { display: block; }
svg { display: inline-block; vertical-align: middle; }
a { color: inherit; }

:root {
  /* Палитра: Royal Blue · Mulberry · Turquoise · Nitro Orange */
  --royal: #191970;
  --mulberry: #32292F;
  --turq: #99E1D9;
  --nitro: #FB5607;

  /* Поверхности */
  --bg: #07071A;
  --s1: rgba(255, 255, 255, 0.07);
  --s2: rgba(255, 255, 255, 0.09);
  --s3: rgba(255, 255, 255, 0.13);
  --s4: rgba(255, 255, 255, 0.19);
  --hair: rgba(255, 255, 255, 0.09);
  --hair-2: rgba(255, 255, 255, 0.16);

  /* Смысловые цвета */
  --accent: #FB5607;             /* Nitro Orange — действия */
  --accent-ink: #FFFFFF;
  --accent-dim: rgba(251, 86, 7, 0.16);
  --up: #99E1D9;                 /* Turquoise — доходы, «хорошо» */
  --up-dim: rgba(153, 225, 217, 0.15);
  --down: #FF8F6B;
  --down-dim: rgba(255, 143, 107, 0.15);
  --warn: #FFC15E;
  --warn-dim: rgba(255, 193, 94, 0.15);
  --frozen: #A0BDDB;

  /* Текст */
  --t1: #F3F4F8;
  --t2: rgba(233, 236, 245, 0.68);
  --t3: rgba(233, 236, 245, 0.46);
  --t4: rgba(233, 236, 245, 0.28);

  /* Стекло */
  --glass: linear-gradient(140deg, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0.05) 45%, rgba(255, 255, 255, 0.08) 100%);
  --glass-blur: blur(30px) saturate(180%);
  --glass-edge: linear-gradient(135deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.08) 30%, rgba(255, 255, 255, 0.03) 60%, rgba(255, 255, 255, 0.28));
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 24px 48px -26px rgba(0, 0, 0, 0.85);

  --r-s: 12px;
  --r-m: 16px;
  --r-l: 24px;
  --r-xl: 30px;

  --font-ui: "Inter Variable", "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --font-display: var(--font-ui);
  --font-brand: "Unbounded", var(--font-ui);

  --safe-b: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 68px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);

  /* Совместимость со старыми именами */
  --ink: var(--bg); --milk: var(--t1); --ice: var(--turq); --ice-dim: var(--up-dim); --void: var(--bg);
  --gold: var(--accent); --gold-bright: var(--accent); --gold-border: rgba(251, 86, 7, 0.4); --gold-faint: var(--accent-dim); --gold-glow: transparent;
  --text-100: var(--t1); --text-70: var(--t2); --text-45: var(--t3); --text-25: var(--t4);
  --text-primary: var(--t1); --text-secondary: var(--t2); --text-muted: var(--t3);
  --border: var(--hair); --glass-border: var(--hair-2); --glass-bg: var(--s2);
  --income: var(--up); --expense: var(--down); --dn: var(--down);
  --accent-light: var(--turq); --accent-gradient: linear-gradient(135deg, #FF7A33, #FB5607);
  --r-md: var(--r-s); --r-lg: var(--r-m); --goal: var(--turq);
  --g-fill: var(--glass); --g-shadow: var(--glass-shadow);
}

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { height: 100%; overscroll-behavior: none; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  min-height: 100%; margin: 0;
  background: var(--bg); color: var(--t1);
  font-family: var(--font-ui);
  font-size: 15px; line-height: 1.42; font-weight: 450;
  letter-spacing: -0.006em;
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button { font-family: inherit; color: inherit; letter-spacing: inherit; }
input, select, textarea { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ─── Фон: глубокая ночь с цветными пятнами — под ними стекло «оживает» ───── */
.backdrop {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(60% 40% at 0% 0%, rgba(25, 25, 112, 0.95), transparent 70%),
    radial-gradient(55% 45% at 100% 30%, rgba(92, 52, 78, 0.85), transparent 70%),
    radial-gradient(45% 30% at 10% 78%, rgba(251, 86, 7, 0.26), transparent 70%),
    radial-gradient(40% 30% at 95% 95%, rgba(153, 225, 217, 0.20), transparent 70%),
    radial-gradient(70% 50% at 50% 110%, rgba(25, 25, 112, 0.7), transparent 70%),
    linear-gradient(180deg, #0B0B24 0%, #07071A 55%, #0A0716 100%);
}
.backdrop::after {
  content: ""; position: absolute; inset: 0; opacity: 0.08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#root { position: relative; z-index: 1; min-height: 100dvh; }

/* ─── Стекло ──────────────────────────────────────────────────────────────── */
.glass, .acard, .stat-card, .pricing-card {
  position: relative;
  background: var(--glass);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--r-l);
  box-shadow: var(--glass-shadow);
  isolation: isolate;
}
.glass::before, .acard::before, .hero-card::before, .tabbar::before, .sheet::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--glass-edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
/* Цветное стекло — как карточки-образцы: Royal Blue, Mulberry, Turquoise, Nitro */
.glass.tint-ice, .glass.t-blue  { background: linear-gradient(140deg, rgba(48, 48, 170, 0.55), rgba(25, 25, 112, 0.35) 60%, rgba(70, 70, 190, 0.40)); }
.glass.tint-up, .glass.t-turq   { background: linear-gradient(140deg, rgba(153, 225, 217, 0.30), rgba(153, 225, 217, 0.12) 60%, rgba(190, 240, 234, 0.22)); }
.glass.tint-down, .glass.t-nitro{ background: linear-gradient(140deg, rgba(251, 86, 7, 0.42), rgba(251, 86, 7, 0.18) 60%, rgba(255, 130, 60, 0.30)); }
.glass.tint-warn                { background: linear-gradient(140deg, rgba(255, 193, 94, 0.26), rgba(255, 193, 94, 0.08)); }
.glass.t-mulberry               { background: linear-gradient(140deg, rgba(110, 70, 96, 0.55), rgba(50, 41, 47, 0.45) 60%, rgba(120, 80, 105, 0.45)); }
.glass.pad { padding: 18px; }
.glass.pad-s { padding: 14px 16px; }
/* Главная карта: Royal Blue стекло с бликом */
.hero-card {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 28px; padding: 20px;
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(153, 225, 217, 0.22), transparent 55%),
    radial-gradient(80% 90% at 0% 100%, rgba(251, 86, 7, 0.20), transparent 60%),
    linear-gradient(150deg, rgba(52, 52, 180, 0.62), rgba(25, 25, 112, 0.50) 55%, rgba(50, 41, 47, 0.55));
  backdrop-filter: blur(34px) saturate(190%); -webkit-backdrop-filter: blur(34px) saturate(190%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.30), 0 30px 60px -30px rgba(0, 0, 0, 0.9);
}
.hero-card::after {
  content: ""; position: absolute; inset: -40% -20% auto auto; width: 70%; height: 120%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.16), transparent); transform: rotate(-20deg);
}
.hero-card > * { position: relative; z-index: 1; }

.list { overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; min-height: 60px; width: 100%;
  background: none; border: none; text-align: left; cursor: pointer; position: relative;
}
.row + .row::before, .swipe + .swipe::before {
  content: ""; position: absolute; top: 0; left: 68px; right: 0; height: 1px; background: var(--hair); z-index: 3;
}
.row:active { background: rgba(255, 255, 255, 0.06); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 560; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 13px; color: var(--t3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-end { text-align: right; flex-shrink: 0; }
.row-amount { font-weight: 620; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -0.02em; }
.chev { color: var(--t4); flex-shrink: 0; }

/* ─── Свайп-строка ────────────────────────────────────────────────────────── */
.swipe { position: relative; overflow: hidden; }
.swipe-actions { position: absolute; top: 0; right: 0; bottom: 0; display: flex; align-items: stretch; }
.swipe-actions button {
  width: 76px; border: none; color: #fff; font-size: 12px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer;
}
.swipe-actions .sa-edit { background: #2B2B7A; }
.swipe-actions .sa-del { background: #D8553D; }
.swipe-content { position: relative; z-index: 2; background: transparent; touch-action: pan-y; }
.swipe.open .swipe-content, .swipe.dragging .swipe-content { background: rgba(20, 20, 50, 0.96); }

/* ─── Иконка-плашка ───────────────────────────────────────────────────────── */
.badge-icon {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; position: relative;
}
.badge-icon.lg { width: 52px; height: 52px; border-radius: 16px; }
.badge-icon.sm { width: 32px; height: 32px; border-radius: 10px; }

/* ─── Типографика ─────────────────────────────────────────────────────────── */
.display { font-weight: 680; letter-spacing: -0.035em; }
.brand { font-family: var(--font-brand); font-weight: 600; letter-spacing: -0.02em; }
.h1 { font-weight: 720; font-size: 28px; letter-spacing: -0.04em; line-height: 1.1; margin: 0; }
.h2 { font-size: 18px; font-weight: 680; letter-spacing: -0.025em; margin: 0; }
.amount-xl { font-weight: 700; font-size: 38px; letter-spacing: -0.045em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.amount-l { font-weight: 680; font-size: 26px; letter-spacing: -0.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.label { font-size: 13px; color: var(--t3); font-weight: 500; }
.overline { font-size: 11.5px; color: var(--t3); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.muted { color: var(--t3); }
.c-up { color: var(--up); }
.c-down { color: var(--down); }
.c-warn { color: var(--warn); }
.c-ice, .c-accent { color: var(--accent); }
.num { font-variant-numeric: tabular-nums; }

/* ─── Раскладка ───────────────────────────────────────────────────────────── */
.page { padding: 12px 16px calc(var(--tabbar-h) + var(--safe-b) + 44px); max-width: 560px; margin: 0 auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px 18px; }
.page-head .sub { font-size: 14px; color: var(--t3); margin-top: 6px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack-l { display: flex; flex-direction: column; gap: 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px 10px; }
.section-head .h2 { font-size: 20px; }
.link { color: var(--t2); font-size: 14px; font-weight: 560; background: none; border: none; padding: 0; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 2px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hstack { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ─── Кнопки ──────────────────────────────────────────────────────────────── */
.btn {
  height: 52px; padding: 0 20px; border-radius: var(--r-m); border: none;
  font-size: 16px; font-weight: 620; letter-spacing: -0.015em;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  transition: transform 0.15s var(--ease), opacity 0.15s, background 0.2s; white-space: nowrap;
}
.btn:active { transform: scale(0.975); }
.btn:disabled { opacity: 0.38; cursor: default; transform: none; }
.btn.block { width: 100%; }
.btn.sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn-primary { background: linear-gradient(180deg, #FF7433, #FB5607); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 12px 28px -12px rgba(251, 86, 7, 0.75); }
.btn-light { background: var(--t1); color: #0B0B0F; }
.btn-glass { background: rgba(255,255,255,.11); color: var(--t1); backdrop-filter: blur(20px) saturate(170%); -webkit-backdrop-filter: blur(20px) saturate(170%); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), inset 0 0 0 1px rgba(255,255,255,.08); }
.btn-danger { background: var(--down-dim); color: var(--down); }
.btn-up { background: var(--up-dim); color: var(--up); }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; color: var(--t1); background: rgba(255,255,255,.12); flex-shrink: 0;
  backdrop-filter: blur(20px) saturate(170%); -webkit-backdrop-filter: blur(20px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24), inset 0 0 0 1px rgba(255,255,255,.07);
  transition: transform 0.15s var(--ease), background 0.2s;
}
.icon-btn:active { transform: scale(0.92); }
.icon-btn.primary { background: linear-gradient(180deg, #FF7433, #FB5607); color: #fff; }
.icon-btn.sm { width: 32px; height: 32px; }

/* ─── Поля ────────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; color: var(--t3); padding-left: 4px; }
.input {
  height: 50px; width: 100%; padding: 0 16px; border-radius: 14px; border: none;
  background: var(--s2); box-shadow: inset 0 0 0 1px var(--hair);
  color: var(--t1); font-size: 16px; font-weight: 500; outline: none;
  -webkit-appearance: none; appearance: none; transition: box-shadow 0.15s, background 0.15s;
}
.input::placeholder { color: var(--t4); }
.input:focus { background: var(--s3); box-shadow: inset 0 0 0 1.5px rgba(153, 225, 217, 0.75); }
textarea.input { height: auto; min-height: 96px; padding: 14px 16px; resize: vertical; line-height: 1.45; }
select.input {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A3A6AF' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
select.input option { background: #16163C; color: #fff; }
input[type="date"].input { min-width: 0; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: 0.6; }

.amount-field { display: flex; align-items: baseline; justify-content: center; gap: 8px; padding: 6px 0 2px; max-width: 100%; overflow: hidden; }
.amount-box { display: inline-grid; min-width: 0; max-width: calc(100% - 40px); }
.amount-mirror, .amount-field input {
  grid-area: 1 / 1; font-weight: 700; font-size: 44px; letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums; padding: 0 4px; margin: 0; white-space: pre; line-height: 1.2;
}
.amount-mirror { visibility: hidden; min-width: 1ch; overflow: hidden; }
.amount-field input { width: 1px; min-width: 100%; background: none; border: none; outline: none; color: var(--t1); text-align: center; }
.amount-field input::placeholder { color: var(--t4); }
.amount-field .cur { font-size: 28px; font-weight: 600; color: var(--t3); }

/* ─── Сегменты и чипы ─────────────────────────────────────────────────────── */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; gap: 4px; border-radius: 14px; background: rgba(255,255,255,.08); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: inset 0 0 0 1px var(--hair); }
.seg button {
  height: 36px; border: none; border-radius: 10px; background: none;
  color: var(--t3); font-size: 14px; font-weight: 580; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background 0.2s, color 0.2s;
}
.seg button.on { background: rgba(255,255,255,.22); color: var(--t1); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 2px 6px rgba(0, 0, 0, 0.3); }
.seg button.on.up { background: var(--up-dim); color: var(--up); }
.seg button.on.down { background: var(--down-dim); color: var(--down); }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chip {
  flex-shrink: 0; height: 36px; padding: 0 14px; border-radius: 999px; border: none;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--s2); box-shadow: inset 0 0 0 1px var(--hair);
  color: var(--t2); font-size: 14px; font-weight: 540; cursor: pointer; white-space: nowrap;
}
.chip.on, .chip.active { background: var(--t1); color: #0B0B24; box-shadow: none; }

/* ─── Прогресс ────────────────────────────────────────────────────────────── */
.bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--turq); transition: width 0.6s var(--ease); }
.bar.up > i { background: var(--up); }
.bar.down > i { background: var(--down); }
.bar.warn > i { background: var(--warn); }

/* ─── Меню: стеклянная капсула с круглыми стеклянными кнопками ─────────────── */
.tabbar {
  position: fixed; left: 14px; right: 14px; bottom: calc(10px + var(--safe-b)); z-index: 100;
  max-width: 440px; margin: 0 auto; height: var(--tabbar-h); padding: 7px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: space-between; gap: 5px;
  background: linear-gradient(140deg, rgba(255,255,255,.16), rgba(255,255,255,.05) 50%, rgba(255,255,255,.10));
  backdrop-filter: blur(30px) saturate(190%); -webkit-backdrop-filter: blur(30px) saturate(190%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 22px 44px -18px rgba(0, 0, 0, 0.9);
}
.tab {
  height: 54px; min-width: 54px; border-radius: 999px; padding: 0 15px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  color: var(--t1); text-decoration: none; font-size: 13.5px; font-weight: 640; letter-spacing: -0.01em;
  background: radial-gradient(120% 120% at 30% 15%, rgba(255,255,255,.22), rgba(255,255,255,.05) 55%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.30), inset 0 0 0 1px rgba(255,255,255,.08), 0 6px 14px -8px rgba(0,0,0,.6);
  transition: background 0.35s var(--ease), color 0.25s, flex-grow 0.35s var(--ease);
  flex: 0 0 auto;
}
.tab::after { content: ""; position: absolute; top: 5px; left: 10px; width: 16px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.55); filter: blur(3px); opacity: .7; pointer-events: none; }
.tab .tab-lbl { display: none; white-space: nowrap; }
.tab.on { background: #F6F7FB; color: #0B0B24; flex: 1 1 auto; box-shadow: 0 8px 20px -8px rgba(0,0,0,.6); }
.tab.on::after { display: none; }
.tab.on .tab-lbl { display: inline; }
.tab-ico { display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.tab-add {
  width: 54px; height: 54px; border-radius: 50%; border: none; cursor: pointer; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #FF7A3A, #FB5607); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 10px 24px -8px rgba(251, 86, 7, 0.8);
  transition: transform 0.15s var(--ease);
}
.tab-add:active { transform: scale(0.92); }

/* ─── Прогрессивный блюр сверху и снизу (как в Cornery при прокрутке) ─────── */
.pblur { position: fixed; left: 0; right: 0; z-index: 90; pointer-events: none; transition: opacity .3s ease; }
.pblur.top { top: 0; height: 104px; opacity: 0; }
.pblur.top.on { opacity: 1; }
.pblur.bottom { bottom: 0; height: calc(var(--tabbar-h) + var(--safe-b) + 44px); }
.pblur > i { position: absolute; inset: 0; }
.pblur.top > i:nth-child(1) { backdrop-filter: blur(1px); -webkit-backdrop-filter: blur(1px); mask: linear-gradient(to bottom, #000 0%, #000 40%, transparent 100%); -webkit-mask: linear-gradient(to bottom, #000 0%, #000 40%, transparent 100%); }
.pblur.top > i:nth-child(2) { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); mask: linear-gradient(to bottom, #000 0%, #000 30%, transparent 75%); -webkit-mask: linear-gradient(to bottom, #000 0%, #000 30%, transparent 75%); }
.pblur.top > i:nth-child(3) { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); mask: linear-gradient(to bottom, #000 0%, #000 20%, transparent 55%); -webkit-mask: linear-gradient(to bottom, #000 0%, #000 20%, transparent 55%); }
.pblur.top > i:nth-child(4) { backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); mask: linear-gradient(to bottom, #000 0%, #000 12%, transparent 40%); -webkit-mask: linear-gradient(to bottom, #000 0%, #000 12%, transparent 40%); }
.pblur.top::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(10, 10, 32, 0.55), rgba(10, 10, 32, 0) 85%); }
.pblur.bottom > i:nth-child(1) { backdrop-filter: blur(1px); -webkit-backdrop-filter: blur(1px); mask: linear-gradient(to top, #000 0%, #000 40%, transparent 100%); -webkit-mask: linear-gradient(to top, #000 0%, #000 40%, transparent 100%); }
.pblur.bottom > i:nth-child(2) { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); mask: linear-gradient(to top, #000 0%, #000 30%, transparent 75%); -webkit-mask: linear-gradient(to top, #000 0%, #000 30%, transparent 75%); }
.pblur.bottom > i:nth-child(3) { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); mask: linear-gradient(to top, #000 0%, #000 20%, transparent 55%); -webkit-mask: linear-gradient(to top, #000 0%, #000 20%, transparent 55%); }
.pblur.bottom > i:nth-child(4) { backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); mask: linear-gradient(to top, #000 0%, #000 12%, transparent 40%); -webkit-mask: linear-gradient(to top, #000 0%, #000 12%, transparent 40%); }
.pblur.bottom::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8, 8, 26, 0.6), rgba(8, 8, 26, 0) 80%); }
/* Компактный заголовок появляется в размытой полосе при прокрутке */
.ctitle { position: fixed; top: 0; left: 0; right: 0; z-index: 95; height: 52px; display: flex; align-items: center; justify-content: center;
  font-weight: 680; font-size: 16px; letter-spacing: -0.02em; pointer-events: none; opacity: 0; transform: translateY(-6px); transition: opacity .25s ease, transform .3s var(--ease); }
.ctitle.on { opacity: 1; transform: none; }

/* Страница отъезжает назад, когда открыта шторка (как в Cornery / iOS) */
#root { transition: transform .45s var(--ease), filter .45s var(--ease), border-radius .45s var(--ease); transform-origin: 50% 0; }
body.sheet-open #root { transform: scale(0.94) translateY(8px); border-radius: 28px; overflow: hidden; filter: saturate(0.9) brightness(0.8); }

/* ─── Шторка: фон страницы размывается, снизу — аккуратный блок ───────────── */
.sheet-wrap { position: fixed; inset: 0; z-index: 300; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(4, 4, 18, 0.36);
  backdrop-filter: blur(16px) saturate(120%); -webkit-backdrop-filter: blur(16px) saturate(120%);
  animation: fade 0.3s ease both;
}
.sheet {
  position: relative; width: 100%; max-width: 560px; max-height: 88dvh;
  display: flex; flex-direction: column;
  border-radius: 30px 30px 0 0;
  background: linear-gradient(170deg, rgba(40, 38, 96, 0.82), rgba(18, 16, 44, 0.90) 45%, rgba(30, 22, 34, 0.92));
  backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 -30px 60px -20px rgba(0, 0, 0, 0.7);
  animation: rise 0.48s var(--ease) both;
  will-change: transform;
}
.sheet-top { padding: 8px 20px 0; flex-shrink: 0; touch-action: none; cursor: grab; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 0 20px calc(24px + var(--safe-b)); flex: 1; }
.sheet-handle { width: 36px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.16); margin: 0 auto 14px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sheet-head .h2 { font-size: 21px; font-weight: 700; letter-spacing: -0.035em; }
.sheet-close { width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.22); color: var(--t2); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.sheet.closing { animation: sink 0.28s var(--ease) both; }
.sheet-backdrop.closing { animation: fadeout 0.28s ease both; }

/* ─── Тосты ───────────────────────────────────────────────────────────────── */
.toasts { position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); left: 12px; right: 12px; z-index: 500; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  pointer-events: auto; max-width: 480px; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 18px; font-size: 14px; font-weight: 540;
  background: rgba(30, 30, 80, 0.72);
  backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 14px 30px -12px rgba(0, 0, 0, 0.8);
  animation: drop 0.36s var(--ease);
}

/* ─── Пустые и ошибки ─────────────────────────────────────────────────────── */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 36px 20px; }
.empty .ico { width: 64px; height: 64px; border-radius: 22px; display: flex; align-items: center; justify-content: center; background: var(--s2); color: var(--t2); margin-bottom: 4px; }
.empty .t { font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
.empty .d { font-size: 14px; color: var(--t3); max-width: 290px; }
.skeleton {
  border-radius: var(--r-l);
  background: linear-gradient(100deg, var(--s1) 30%, var(--s2) 50%, var(--s1) 70%);
  background-size: 300% 100%; animation: shimmer 1.4s linear infinite;
}

/* ─── Кольцо ──────────────────────────────────────────────────────────────── */
.ring { position: relative; flex-shrink: 0; }
.ring > span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }

/* ─── Карточка счёта ──────────────────────────────────────────────────────── */
.acard {
  position: relative; overflow: hidden; border-radius: 22px; padding: 16px; min-height: 112px;
  display: flex; flex-direction: column; justify-content: space-between;
  cursor: pointer;
}

/* ─── Детализация категории ───────────────────────────────────────────────── */
.mbar { position: relative; height: 44px; border-radius: 14px; overflow: hidden; background: var(--s2); display: flex; align-items: center; padding: 0 12px; gap: 10px; }
.mbar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; opacity: 0.18; }
.mbar > * { position: relative; }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cat-pick {
  border: none; cursor: pointer; border-radius: 16px; padding: 12px 6px 10px;
  background: var(--s2); color: var(--t2); font-size: 12px; font-weight: 560; line-height: 1.2;
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.cat-pick.on { background: rgba(251, 86, 7, 0.18); color: var(--t1); box-shadow: inset 0 0 0 1.5px var(--accent); }
.toggle { width: 46px; height: 28px; border-radius: 99px; border: none; background: var(--s4); position: relative; cursor: pointer; flex-shrink: 0; transition: background 0.25s; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.3s var(--ease); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); }
.toggle.on { background: var(--accent); }
.toggle.on::after { transform: translateX(18px); background: #fff; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--s3); color: var(--t2); }
.pill.ok { background: var(--up-dim); color: var(--up); }
.pill.bad { background: var(--down-dim); color: var(--down); }
.pill.acc { background: var(--accent-dim); color: #FF9A66; }

/* ─── Recharts ────────────────────────────────────────────────────────────── */
.recharts-cartesian-axis-tick-value { fill: var(--t3) !important; font-size: 11px; }
.recharts-tooltip-wrapper { outline: none; }
.chart-tip { background: rgba(26, 26, 76, 0.92); border-radius: 12px; padding: 8px 12px; font-size: 13px; box-shadow: inset 0 0 0 1px var(--hair-2); }

/* ─── Совместимость (ROI / Pricing) ───────────────────────────────────────── */
.input-glass { height: 50px; width: 100%; padding: 0 16px; border-radius: 14px; border: none; background: var(--s2); box-shadow: inset 0 0 0 1px var(--hair); color: var(--t1); font-size: 16px; outline: none; }
.btn-glow { height: 52px; border-radius: 16px; border: none; background: var(--accent); color: var(--accent-ink); font-weight: 620; font-size: 16px; cursor: pointer; }
.btn-glow:disabled { opacity: 0.4; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.page-title { font-weight: 720; font-size: 28px; letter-spacing: -0.04em; }
.page-sub { font-size: 14px; color: var(--t3); margin-top: 4px; }
.pb-safe { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 44px); }
.stat-card { padding: 16px; }
.stat-label { font-size: 13px; color: var(--t3); margin-bottom: 6px; }
.stat-value { font-weight: 680; font-size: 20px; letter-spacing: -0.035em; }
.stat-income { color: var(--up); }
.stat-expense { color: var(--down); }
.stat-accent { color: var(--accent); }
.chip-group { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pricing-card { width: 100%; text-align: left; padding: 18px; border: none; color: var(--t1); cursor: pointer; }
.pricing-card.popular { box-shadow: inset 0 0 0 1.5px var(--accent); }
.pricing-popular-badge { position: absolute; top: 12px; right: 14px; padding: 4px 10px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; }
.progress-track { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px; background: var(--accent); }
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 32px 16px; }
.empty-title { font-weight: 650; font-size: 17px; }
.empty-desc { color: var(--t3); font-size: 14px; }

/* ─── Анимации ────────────────────────────────────────────────────────────── */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeout { from { opacity: 1; } to { opacity: 0; } }
@keyframes rise { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes sink { from { transform: translateY(var(--drag, 0px)); } to { transform: translateY(100%); } }
@keyframes drop { from { transform: translateY(-16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.spin { animation: spin 0.8s linear infinite; }
.appear { animation: appear 0.45s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
::-webkit-scrollbar { width: 0; height: 0; }

/* ─── Детали в духе Cornery ───────────────────────────────────────────────── */
/* Счётчик в строке меню: «2», «200 Б» */
.cnt { min-width: 22px; height: 22px; padding: 0 8px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center;
  background: #F3F4F8; color: #0B0B24; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; flex-shrink: 0; letter-spacing: -0.01em; }
/* Карта участника: тёмное стекло Mulberry, тонкие дуги, точка-акцент */
.member-card {
  position: relative; overflow: hidden; isolation: isolate; display: block;
  border-radius: 26px; padding: 20px;
  background: linear-gradient(150deg, rgba(64, 50, 60, 0.82), rgba(32, 26, 32, 0.88) 60%, rgba(25, 25, 112, 0.55));
  backdrop-filter: blur(30px) saturate(170%); -webkit-backdrop-filter: blur(30px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 26px 50px -26px rgba(0, 0, 0, 0.9);
}
.member-card::before {
  content: ""; position: absolute; right: -60px; top: -80px; width: 300px; height: 300px; border-radius: 50%; pointer-events: none; z-index: -1;
  background: repeating-radial-gradient(circle, transparent 0 22px, rgba(255, 255, 255, 0.06) 22px 23px);
  mask: radial-gradient(circle, #000 30%, transparent 70%); -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%);
}
.member-card .dot { position: absolute; right: 52px; top: 22px; width: 6px; height: 6px; border-radius: 50%; background: var(--nitro); box-shadow: 0 0 10px 2px rgba(251, 86, 7, 0.7); }
.avatar { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #F6F7FB, #C9D4E6); color: #191970; font-weight: 750; font-size: 17px; letter-spacing: -0.02em; }
/* Круглая кнопка-стрелка в углу плитки */
.go { position: absolute; right: 12px; bottom: 12px; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); color: var(--t1); }
/* Шторка: счётчик у заголовка и закреплённая кнопка внизу */
.sheet-head .h2 .count { color: var(--t3); font-weight: 600; margin-left: 6px; }
.sheet-foot { flex-shrink: 0; padding: 12px 20px calc(14px + var(--safe-b)); position: relative;
  background: linear-gradient(to top, rgba(16, 14, 40, 0.96) 60%, rgba(16, 14, 40, 0)); }
.sheet-foot + .sheet-body { order: -1; }
.sum-rows { display: grid; gap: 6px; font-size: 14px; color: var(--t2); }
.sum-rows > div { display: flex; justify-content: space-between; }
.sum-rows .total { color: var(--t1); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; margin-top: 4px; }

/* ═══════════════════════════════════════════════════════════════════════════
   2.5 · Плотность как в Cornery, «живое» стекло, компактное меню, боковая панель
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  --tabbar-h: 58px;
  --r-l: 20px;
  --glass: linear-gradient(180deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 38%),
           linear-gradient(135deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,.04) 46%, rgba(255,255,255,.075) 100%);
  --glass-blur: blur(26px) saturate(190%) brightness(1.06);
  --glass-edge: linear-gradient(150deg, rgba(255,255,255,.70) 0%, rgba(255,255,255,.12) 22%, rgba(255,255,255,.02) 55%, rgba(255,255,255,.10) 80%, rgba(255,255,255,.38) 100%);
  --glass-shadow: inset 0 1px 0 rgba(255,255,255,.30), inset 0 -1px 0 rgba(0,0,0,.28), inset 0 0 24px rgba(255,255,255,.025), 0 18px 36px -22px rgba(0,0,0,.9);
}
body { font-size: 14px; }
.page { padding: 8px 14px calc(var(--tabbar-h) + var(--safe-b) + 36px); }
.page-head { padding: 8px 2px 14px; }
.h1 { font-size: 24px; letter-spacing: -0.035em; }
.h2 { font-size: 16px; }
.section-head { padding: 0 4px 8px; }
.section-head .h2 { font-size: 17px; }
.stack { gap: 8px; }
.stack-l { gap: 20px; }
.row { padding: 10px 14px; min-height: 52px; gap: 11px; }
.row + .row::before, .swipe + .swipe::before { left: 61px; }
.row-title { font-size: 14.5px; font-weight: 540; }
.row-sub { font-size: 12px; }
.row-amount { font-size: 14.5px; }
.badge-icon { width: 36px; height: 36px; border-radius: 11px; }
.badge-icon svg { width: 17px; height: 17px; }
.badge-icon.lg { width: 46px; height: 46px; border-radius: 14px; }
.badge-icon.lg svg { width: 21px; height: 21px; }
.badge-icon.sm { width: 28px; height: 28px; border-radius: 9px; }
.badge-icon.sm svg { width: 15px; height: 15px; }
.amount-xl { font-size: 32px; }
.amount-l { font-size: 22px; }
.label { font-size: 12.5px; }
.overline { font-size: 10.5px; letter-spacing: 0.09em; }
.glass.pad { padding: 16px; }
.glass.pad-s { padding: 12px 14px; }
.hero-card { padding: 18px; border-radius: 24px; }
.btn { height: 46px; font-size: 15px; border-radius: 14px; }
.btn.sm { height: 34px; font-size: 13px; border-radius: 11px; padding: 0 12px; }
.icon-btn { width: 36px; height: 36px; }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn svg { width: 17px; height: 17px; }
.input { height: 46px; font-size: 15px; border-radius: 13px; }
.chip { height: 32px; font-size: 13px; padding: 0 12px; }
.seg { border-radius: 12px; padding: 3px; }
.seg button { height: 31px; font-size: 13px; border-radius: 9px; }
.amount-mirror, .amount-field input { font-size: 38px; }
.sheet { border-radius: 26px 26px 0 0; }
.sheet-head .h2 { font-size: 19px; }
.sheet-body { padding: 0 16px calc(20px + var(--safe-b)); }
.sheet-top { padding: 8px 16px 0; }
.cat-pick { padding: 10px 4px 8px; font-size: 11.5px; border-radius: 14px; gap: 6px; }
.empty { padding: 28px 18px; }

/* «Живое» стекло: блик сверху, преломление по краю */
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(120% 60% at 15% -10%, rgba(255,255,255,.14), transparent 55%),
              radial-gradient(80% 50% at 110% 120%, rgba(153,225,217,.07), transparent 60%);
}

/* ─── Компактное меню: 6 кнопок, иконка + подпись ─────────────────────────── */
.tabbar {
  left: 10px; right: 10px; bottom: calc(8px + var(--safe-b)); max-width: 460px;
  height: var(--tabbar-h); padding: 5px; border-radius: 22px; gap: 2px;
  display: grid; grid-template-columns: repeat(6, 1fr); align-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.04) 60%, rgba(255,255,255,.07));
  backdrop-filter: blur(28px) saturate(200%) brightness(1.08); -webkit-backdrop-filter: blur(28px) saturate(200%) brightness(1.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.32), inset 0 -1px 0 rgba(0,0,0,.25), 0 16px 34px -16px rgba(0,0,0,.95);
}
.tab {
  height: 48px; min-width: 0; padding: 0; border-radius: 16px; flex: initial;
  flex-direction: column; gap: 3px; font-size: 10px; font-weight: 600; letter-spacing: 0;
  color: var(--t3); background: none; box-shadow: none; overflow: visible;
  transition: color .25s, background .35s var(--ease);
}
.tab::after { display: none; }
.tab .tab-lbl { display: block; white-space: nowrap; }
.tab .tab-ico svg { width: 20px; height: 20px; }
.tab.on {
  color: var(--t1); flex: initial;
  background: radial-gradient(100% 120% at 30% 0%, rgba(255,255,255,.26), rgba(255,255,255,.08) 60%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 0 0 1px rgba(255,255,255,.06), 0 6px 14px -8px rgba(0,0,0,.6);
}
.tab.on .tab-ico { color: #FF8A4C; }
.tab-add { width: 44px; height: 44px; justify-self: center; border-radius: 15px; }
.tab-add svg { width: 21px; height: 21px; }
button.tab { border: none; cursor: pointer; font-family: inherit; }

/* ─── Боковая панель «Меню»: выезжает справа, фон размыт и отъезжает ───────── */
.drawer-wrap { position: fixed; inset: 0; z-index: 280; }
.drawer-back { position: absolute; inset: 0; background: rgba(4, 4, 18, .34);
  backdrop-filter: blur(12px) saturate(120%); -webkit-backdrop-filter: blur(12px) saturate(120%); animation: fade .3s ease both; }
.drawer {
  position: absolute; top: 8px; bottom: 8px; right: 8px; width: min(86vw, 370px);
  border-radius: 26px; overflow: hidden; display: flex; flex-direction: column;
  background: linear-gradient(170deg, rgba(42, 40, 104, .80), rgba(18, 16, 44, .90) 45%, rgba(34, 24, 36, .92));
  backdrop-filter: blur(40px) saturate(190%); -webkit-backdrop-filter: blur(40px) saturate(190%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.26), inset 0 0 0 1px rgba(255,255,255,.07), -30px 0 60px -20px rgba(0,0,0,.7);
  animation: slidein .45s var(--ease) both;
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 10px; }
.drawer-body { overflow-y: auto; padding: 0 12px 20px; flex: 1; }
.drawer.closing { animation: slideout .28s var(--ease) both; }
.drawer-back.closing { animation: fadeout .28s ease both; }
body.drawer-open #root { transform: translateX(-28px) scale(.93); border-radius: 28px; overflow: hidden; filter: brightness(.75) saturate(.9); }
@keyframes slidein { from { transform: translateX(105%); } to { transform: none; } }
@keyframes slideout { from { transform: none; } to { transform: translateX(105%); } }

/* ─── Переходы между экранами ─────────────────────────────────────────────── */
.route-tab { animation: routeFade .38s var(--ease) both; }
.route-push { animation: routePush .42s var(--ease) both; }
@keyframes routeFade { from { opacity: 0; transform: translateY(6px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes routePush { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }

/* ═══════════════════════════════════════════════════════════════════════════
   2.5 · Палитры. Каждая тема задаёт несколько опорных цветов (тройки RGB),
   а все поверхности ниже собираются из них — так стекло, фон, шторки
   и акценты меняются вместе, без ручных правок по экранам.
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  --p-deep: 25, 25, 112;      /* главное цветное пятно фона и стекла */
  --p-deep2: 52, 52, 180;     /* светлее — для цветного стекла */
  --p-mid: 92, 52, 78;        /* второе пятно */
  --p-up: 153, 225, 217;      /* доходы / «хорошо» */
  --p-acc: 251, 86, 7;        /* действие */
  --acc-hi: #FF7433;          /* верх градиента кнопки */
  --acc-ink: #FFFFFF;         /* текст на кнопке */
  --acc-text: #FF8A4C;        /* акцент как цвет текста/иконки */
  --bg-a: #0B0B24; --bg-b: #07071A; --bg-c: #0A0716;
  --sh-a: 40, 38, 96; --sh-b: 18, 16, 44; --sh-c: 30, 22, 34;   /* шторки и панель */
  --hero-c: 50, 41, 47;
  --veil: 4, 4, 18;           /* затемнение под шторкой */
  --acc-k: 1;                 /* насколько плотно заливать акцентом плитки */
}
[data-theme="mulberry"] {
  --acc-k: .5;
  --p-deep: 92, 62, 80; --p-deep2: 128, 88, 110; --p-mid: 60, 40, 52; --p-up: 153, 225, 217; --p-acc: 153, 225, 217;
  --acc-hi: #C8F0EB; --acc-ink: #10211F; --acc-text: #99E1D9;
  --bg-a: #1E171C; --bg-b: #141013; --bg-c: #1A1217;
  --sh-a: 70, 52, 64; --sh-b: 30, 23, 28; --sh-c: 40, 30, 36; --hero-c: 50, 41, 47; --veil: 14, 8, 12;
  --bg: #141013; --accent: #99E1D9; --accent-ink: #10211F; --accent-dim: rgba(153, 225, 217, .16); --turq: #99E1D9; --nitro: #99E1D9;
}
[data-theme="eclipse"] {
  --acc-k: .5;
  --p-deep: 0, 78, 86; --p-deep2: 0, 112, 120; --p-mid: 0, 52, 58; --p-up: 159, 230, 200; --p-acc: 224, 255, 79;
  --acc-hi: #EEFF9A; --acc-ink: #142000; --acc-text: #E0FF4F;
  --bg-a: #03313A; --bg-b: #001A1D; --bg-c: #001417;
  --sh-a: 0, 62, 68; --sh-b: 0, 28, 32; --sh-c: 0, 36, 40; --hero-c: 0, 39, 43; --veil: 0, 10, 12;
  --bg: #001A1D; --accent: #E0FF4F; --accent-ink: #142000; --accent-dim: rgba(224, 255, 79, .14); --up: #9FE6C8; --up-dim: rgba(159, 230, 200, .15); --turq: #9FE6C8; --nitro: #E0FF4F;
}
[data-theme="shadow"] {
  --acc-k: .5;
  --p-deep: 62, 66, 48; --p-deep2: 96, 104, 66; --p-mid: 44, 44, 44; --p-up: 210, 240, 140; --p-acc: 228, 253, 151;
  --acc-hi: #F2FFC8; --acc-ink: #1C2108; --acc-text: #E4FD97;
  --bg-a: #1C1C1C; --bg-b: #141414; --bg-c: #101010;
  --sh-a: 48, 48, 46; --sh-b: 22, 22, 22; --sh-c: 30, 31, 26; --hero-c: 34, 34, 32; --veil: 6, 6, 6;
  --bg: #141414; --accent: #E4FD97; --accent-ink: #1C2108; --accent-dim: rgba(228, 253, 151, .14); --up: #D2F08C; --up-dim: rgba(210, 240, 140, .14); --turq: #D2F08C; --nitro: #E4FD97;
}
[data-theme="blackstone"] {
  --acc-k: .5;
  --p-deep: 70, 78, 88; --p-deep2: 104, 114, 126; --p-mid: 44, 49, 55; --p-up: 169, 216, 204; --p-acc: 233, 236, 239;
  --acc-hi: #FFFFFF; --acc-ink: #212529; --acc-text: #E9ECEF;
  --bg-a: #2A2F35; --bg-b: #212529; --bg-c: #1A1D21;
  --sh-a: 56, 62, 70; --sh-b: 30, 34, 38; --sh-c: 38, 42, 47; --hero-c: 33, 37, 41; --veil: 10, 12, 14;
  --bg: #212529; --accent: #E9ECEF; --accent-ink: #212529; --accent-dim: rgba(233, 236, 239, .14); --up: #A9D8CC; --up-dim: rgba(169, 216, 204, .15); --turq: #A9D8CC; --nitro: #E9ECEF;
}
[data-theme="iris"] {
  --acc-k: .5;
  --p-deep: 34, 34, 96; --p-deep2: 62, 74, 140; --p-mid: 22, 22, 56; --p-up: 127, 179, 217; --p-acc: 160, 189, 219;
  --acc-hi: #CFDEEF; --acc-ink: #080813; --acc-text: #A0BDDB;
  --bg-a: #0F0F26; --bg-b: #080813; --bg-c: #06060E;
  --sh-a: 32, 34, 76; --sh-b: 12, 12, 30; --sh-c: 18, 20, 42; --hero-c: 8, 8, 19; --veil: 2, 2, 8;
  --bg: #080813; --accent: #A0BDDB; --accent-ink: #080813; --accent-dim: rgba(160, 189, 219, .15); --up: #7FB3D9; --up-dim: rgba(127, 179, 217, .15); --turq: #A0BDDB; --nitro: #A0BDDB;
}
[data-theme="dusk"] {
  --acc-k: .5;
  --p-deep: 48, 61, 89; --p-deep2: 83, 102, 132; --p-mid: 30, 38, 59; --p-up: 152, 169, 196; --p-acc: 220, 227, 239;
  --acc-hi: #FFFFFF; --acc-ink: #111522; --acc-text: #DCE3EF;
  --bg-a: #1E263B; --bg-b: #111522; --bg-c: #0D1019;
  --sh-a: 48, 61, 89; --sh-b: 22, 28, 44; --sh-c: 30, 38, 59; --hero-c: 30, 38, 59; --veil: 6, 8, 14;
  --bg: #111522; --accent: #DCE3EF; --accent-ink: #111522; --accent-dim: rgba(220, 227, 239, .14); --up: #98A9C4; --up-dim: rgba(152, 169, 196, .16); --turq: #98A9C4; --nitro: #DCE3EF;
}

/* Поверхности, собранные из опорных цветов темы */
.backdrop {
  background:
    radial-gradient(60% 40% at 0% 0%, rgba(var(--p-deep), .95), transparent 70%),
    radial-gradient(55% 45% at 100% 30%, rgba(var(--p-mid), .85), transparent 70%),
    radial-gradient(45% 30% at 10% 78%, rgba(var(--p-acc), .22), transparent 70%),
    radial-gradient(40% 30% at 95% 95%, rgba(var(--p-up), .18), transparent 70%),
    radial-gradient(70% 50% at 50% 110%, rgba(var(--p-deep), .7), transparent 70%),
    linear-gradient(180deg, var(--bg-a) 0%, var(--bg-b) 55%, var(--bg-c) 100%);
}
.glass.tint-ice, .glass.t-blue { background: linear-gradient(140deg, rgba(var(--p-deep2), .55), rgba(var(--p-deep), .35) 60%, rgba(var(--p-deep2), .40)); }
.glass.tint-up, .glass.t-turq { background: linear-gradient(140deg, rgba(var(--p-up), .30), rgba(var(--p-up), .12) 60%, rgba(var(--p-up), .22)); }
.glass.tint-down, .glass.t-nitro { background: linear-gradient(140deg, rgba(var(--p-acc), calc(.42 * var(--acc-k))), rgba(var(--p-acc), calc(.18 * var(--acc-k))) 60%, rgba(var(--p-acc), calc(.30 * var(--acc-k)))); }
.glass.t-mulberry { background: linear-gradient(140deg, rgba(var(--p-mid), .65), rgba(var(--p-mid), .45) 60%, rgba(var(--p-deep), .45)); }
.hero-card {
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(var(--p-up), .22), transparent 55%),
    radial-gradient(80% 90% at 0% 100%, rgba(var(--p-acc), .20), transparent 60%),
    linear-gradient(150deg, rgba(var(--p-deep2), .62), rgba(var(--p-deep), .50) 55%, rgba(var(--hero-c), .55));
}
.member-card { background: linear-gradient(150deg, rgba(var(--p-mid), .85), rgba(var(--sh-b), .9) 60%, rgba(var(--p-deep), .6)); }
.member-card .dot { background: rgb(var(--p-acc)); box-shadow: 0 0 10px 2px rgba(var(--p-acc), .7); }
.btn-primary { background: linear-gradient(180deg, var(--acc-hi), rgb(var(--p-acc))); color: var(--acc-ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 12px 28px -12px rgba(var(--p-acc), .75); }
.icon-btn.primary, .tab-add { background: linear-gradient(180deg, var(--acc-hi), rgb(var(--p-acc))); color: var(--acc-ink); }
.tab-add { box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 10px 24px -8px rgba(var(--p-acc), .8); }
.tab.on .tab-ico { color: var(--acc-text); }
.input:focus { box-shadow: inset 0 0 0 1.5px rgba(var(--p-up), .75); }
.cat-pick.on { background: rgba(var(--p-acc), .18); }
.pill.acc { color: var(--acc-text); }
.glass::after { background: radial-gradient(120% 60% at 15% -10%, rgba(255,255,255,.14), transparent 55%), radial-gradient(80% 50% at 110% 120%, rgba(var(--p-up), .07), transparent 60%); }
.sheet { background: linear-gradient(170deg, rgba(var(--sh-a), .82), rgba(var(--sh-b), .90) 45%, rgba(var(--sh-c), .92)); }
.drawer { background: linear-gradient(170deg, rgba(var(--sh-a), .80), rgba(var(--sh-b), .90) 45%, rgba(var(--sh-c), .92)); }
.sheet-foot { background: linear-gradient(to top, rgba(var(--sh-b), .96) 60%, rgba(var(--sh-b), 0)); }
.sheet-backdrop { background: rgba(var(--veil), .36); }
.drawer-back { background: rgba(var(--veil), .34); }
.pblur.top::after { background: linear-gradient(to bottom, rgba(var(--sh-b), .55), rgba(var(--sh-b), 0) 85%); }
.pblur.bottom::after { background: linear-gradient(to top, rgba(var(--sh-b), .6), rgba(var(--sh-b), 0) 80%); }
.toast { background: rgba(var(--sh-a), .78); }
.chart-tip { background: rgba(var(--sh-a), .94); }
.swipe-actions .sa-edit { background: rgb(var(--p-deep2)); }
.swipe.open .swipe-content, .swipe.dragging .swipe-content { background: rgba(var(--sh-b), .96); }
select.input option { background: rgb(var(--sh-b)); }
.avatar { color: rgb(var(--p-deep)); }

/* Плавная смена палитры */
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after {
  transition: background-color .5s ease, background .5s ease, color .4s ease, border-color .4s ease, box-shadow .5s ease, fill .4s ease !important;
}

/* ─── Светлая тема Whiteout ───────────────────────────────────────────────── */
[data-theme="whiteout"] {
  --p-deep: 160, 189, 219; --p-deep2: 190, 210, 232; --p-mid: 220, 227, 239; --p-up: 15, 143, 126; --p-acc: 33, 37, 41;
  --acc-hi: #454C55; --acc-ink: #FFFFFF; --acc-text: #212529;
  --bg-a: #F4F6F8; --bg-b: #E9ECEF; --bg-c: #DFE4EA;
  --sh-a: 250, 251, 252; --sh-b: 238, 241, 244; --sh-c: 232, 236, 241; --hero-c: 33, 37, 41; --veil: 120, 130, 145;
  --bg: #E9ECEF; --accent: #212529; --accent-ink: #FFFFFF; --accent-dim: rgba(33, 37, 41, .08);
  --up: #0F8F7E; --up-dim: rgba(15, 143, 126, .12); --down: #D2512F; --down-dim: rgba(210, 81, 47, .11); --warn: #B7791F; --warn-dim: rgba(183, 121, 31, .12);
  --turq: #0F8F7E; --nitro: #212529;
  --t1: #15181C; --t2: rgba(21, 24, 28, .66); --t3: rgba(21, 24, 28, .48); --t4: rgba(21, 24, 28, .30);
  --s1: rgba(255, 255, 255, .55); --s2: rgba(255, 255, 255, .70); --s3: rgba(255, 255, 255, .85); --s4: rgba(21, 24, 28, .16);
  --hair: rgba(21, 24, 28, .08); --hair-2: rgba(21, 24, 28, .14);
  --glass: linear-gradient(180deg, rgba(255,255,255,.75) 0%, rgba(255,255,255,.45) 100%);
  --glass-blur: blur(26px) saturate(160%);
  --glass-edge: linear-gradient(150deg, rgba(255,255,255,1) 0%, rgba(255,255,255,.5) 30%, rgba(21,24,28,.05) 60%, rgba(255,255,255,.8) 100%);
  --glass-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 14px 30px -20px rgba(40, 55, 80, .35), 0 1px 2px rgba(40, 55, 80, .06);
}
[data-theme="whiteout"] .backdrop::after { opacity: .04; }
[data-theme="whiteout"] .glass::after { background: radial-gradient(120% 60% at 15% -10%, rgba(255,255,255,.6), transparent 55%); }
[data-theme="whiteout"] .glass.t-turq, [data-theme="whiteout"] .glass.tint-up { background: linear-gradient(140deg, rgba(15,143,126,.16), rgba(255,255,255,.55)); }
[data-theme="whiteout"] .glass.t-blue, [data-theme="whiteout"] .glass.tint-ice { background: linear-gradient(140deg, rgba(160,189,219,.55), rgba(255,255,255,.5)); }
/* Тёмные «карты» на светлом фоне — как банковская карта Blackstone */
[data-theme="whiteout"] .hero-card, [data-theme="whiteout"] .member-card, [data-theme="whiteout"] .glass.t-nitro, [data-theme="whiteout"] .glass.tint-down {
  --t1: #F3F4F8; --t2: rgba(233, 236, 245, .7); --t3: rgba(233, 236, 245, .5); --t4: rgba(233, 236, 245, .3);
  --s1: rgba(255,255,255,.07); --s2: rgba(255,255,255,.1); --s3: rgba(255,255,255,.14); --hair: rgba(255,255,255,.1);
  --up: #8FE0CF; --down: #FF9C7E;
  color: var(--t1);
}
[data-theme="whiteout"] .hero-card { background: radial-gradient(90% 80% at 100% 0%, rgba(160,189,219,.30), transparent 55%), linear-gradient(150deg, #3A4048, #212529 60%, #181B1E); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 24px 44px -24px rgba(20, 30, 45, .55); }
[data-theme="whiteout"] .member-card { background: linear-gradient(150deg, #3A4048, #212529 60%, #2A3442); }
[data-theme="whiteout"] .glass.t-nitro, [data-theme="whiteout"] .glass.tint-down { background: linear-gradient(140deg, #3A4048, #212529); }
[data-theme="whiteout"] .member-card .dot { background: #A0BDDB; box-shadow: 0 0 10px 2px rgba(160,189,219,.8); }
[data-theme="whiteout"] .avatar { background: linear-gradient(160deg, #FFFFFF, #DCE3EF); color: #212529; }
[data-theme="whiteout"] .tabbar { background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.6)); box-shadow: inset 0 1px 0 #fff, 0 16px 34px -16px rgba(40,55,80,.4), 0 0 0 1px rgba(21,24,28,.05); }
[data-theme="whiteout"] .tab.on { background: rgba(21,24,28,.07); box-shadow: inset 0 0 0 1px rgba(21,24,28,.05); }
[data-theme="whiteout"] .sheet, [data-theme="whiteout"] .drawer { box-shadow: inset 0 1px 0 #fff, 0 -20px 50px -20px rgba(40,55,80,.35); }
[data-theme="whiteout"] .sheet-handle { background: rgba(21,24,28,.16); }
[data-theme="whiteout"] .sheet-close, [data-theme="whiteout"] .icon-btn, [data-theme="whiteout"] .go, [data-theme="whiteout"] .btn-glass { background: rgba(21,24,28,.06); box-shadow: inset 0 0 0 1px rgba(21,24,28,.05); color: var(--t1); }
[data-theme="whiteout"] .hero-card .icon-btn, [data-theme="whiteout"] .hero-card .go, [data-theme="whiteout"] .member-card .go, [data-theme="whiteout"] .t-nitro .go { background: rgba(255,255,255,.14); color: #F3F4F8; }
[data-theme="whiteout"] .seg { background: rgba(21,24,28,.05); }
[data-theme="whiteout"] .seg button.on { background: #fff; box-shadow: 0 1px 3px rgba(21,24,28,.14); }
[data-theme="whiteout"] .bar, [data-theme="whiteout"] .progress-track { background: rgba(21,24,28,.07); }
[data-theme="whiteout"] .row:active { background: rgba(21,24,28,.04); }
[data-theme="whiteout"] .chip.on, [data-theme="whiteout"] .chip.active { background: #212529; color: #fff; }
[data-theme="whiteout"] .btn-light { background: #212529; color: #fff; }
[data-theme="whiteout"] .cnt { background: #212529; color: #fff; }
[data-theme="whiteout"] .toast, [data-theme="whiteout"] .chart-tip { color: var(--t1); box-shadow: inset 0 0 0 1px rgba(21,24,28,.06), 0 14px 30px -12px rgba(40,55,80,.35); }
[data-theme="whiteout"] .swipe-actions .sa-edit { background: #536684; }
/* Пастельные цвета категорий темнеют, чтобы читаться на светлом */
[data-theme="whiteout"] .badge-icon { filter: saturate(1.5) brightness(.68); }
[data-theme="whiteout"] input[type="date"]::-webkit-calendar-picker-indicator { filter: none; }
[data-theme="whiteout"] .pblur.top > i, [data-theme="whiteout"] .pblur.bottom > i { -webkit-backdrop-filter: blur(14px) saturate(140%); }

/* Карточки выбора палитры в настройках */
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.theme-card {
  position: relative; border: none; cursor: pointer; text-align: left; overflow: hidden;
  border-radius: 18px; padding: 10px 11px 11px; min-height: 118px;
  display: flex; flex-direction: column; gap: 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 0 0 1px rgba(255,255,255,.08), 0 10px 22px -14px rgba(0,0,0,.7);
  transition: transform .2s var(--ease), box-shadow .25s;
}
.theme-card:active { transform: scale(.97); }
.theme-card.on { box-shadow: inset 0 0 0 2px var(--accent), 0 10px 22px -14px rgba(0,0,0,.7); }
.tc-mini { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 4px 8px; align-items: center; padding: 8px; border-radius: 10px; margin-bottom: 6px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.tc-mini i { display: block; height: 5px; border-radius: 3px; grid-column: 1; }
.tc-mini b { grid-column: 2; grid-row: 1 / span 2; width: 18px; height: 18px; border-radius: 6px; }
.tc-dots { display: flex; gap: 3px; margin-bottom: 4px; }
.tc-dots i { width: 11px; height: 11px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.tc-name { font-weight: 680; font-size: 14px; letter-spacing: -.02em; }
.tc-sub { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-check { position: absolute; right: 9px; bottom: 10px; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
[data-theme="whiteout"] .theme-card { box-shadow: inset 0 0 0 1px rgba(21,24,28,.08), 0 8px 18px -14px rgba(40,55,80,.5); }
[data-theme="whiteout"] .theme-card.on { box-shadow: inset 0 0 0 2px #212529, 0 8px 18px -14px rgba(40,55,80,.5); }

[data-theme="whiteout"] .member-card, [data-theme="whiteout"] .glass.t-nitro { color: #F3F4F8 !important; }

/* Стрелки доход/расход: доход — зелёная вверх, расход — красная вниз (во всех палитрах) */
:root { --inc: #3DDC84; --inc-dim: rgba(61, 220, 132, .16); --exp: #FF5F57; --exp-dim: rgba(255, 95, 87, .16); }
[data-theme="whiteout"] { --inc: #17A34A; --inc-dim: rgba(23, 163, 74, .12); --exp: #E5484D; --exp-dim: rgba(229, 72, 77, .11); }
[data-theme="whiteout"] .hero-card { --inc: #4ADE80; --inc-dim: rgba(74, 222, 128, .16); --exp: #FF6B66; --exp-dim: rgba(255, 107, 102, .16); }
[data-theme="whiteout"] .hero-card .badge-icon { filter: none; }
