@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/static/fonts/manrope-cyrillic-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/static/fonts/manrope-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/static/fonts/manrope-latin-ext-wght-normal.woff2) format("woff2");
  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; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/static/fonts/manrope-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --brand: #12715B; --brand-2: #0E5A48; --brand-soft: #E3F1EC; --gold: #E0A92E; --gold-soft: #FBF0D4;
  --bg: #F3F5F2; --surface: #FFFFFF; --surface-2: #F7F8F6; --line: #E4E8E3; --line-2: #D3D9D2;
  --text: #15201C; --muted: #66736D; --faint: #98A39D;
  --pos: #138A5E; --pos-soft: #E2F4EC; --neg: #C8412F; --neg-soft: #FBE7E3; --info: #2F63C9; --info-soft: #E5EDFB;
  --shadow: 0 1px 2px rgba(16,32,26,.06), 0 6px 20px rgba(16,32,26,.06);
  --r: 16px; --r-sm: 11px;
  --nav-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #3FBF97; --brand-2: #5CD3AE; --brand-soft: #173A31; --gold: #F2C14E; --gold-soft: #3A3020;
    --bg: #0C1512; --surface: #14201C; --surface-2: #192824; --line: #22332E; --line-2: #2D403A;
    --text: #E8EFEC; --muted: #9AABA4; --faint: #6C7C76;
    --pos: #4CD39B; --pos-soft: #16352A; --neg: #FF7A66; --neg-soft: #3B1E1A; --info: #7FA6F5; --info-soft: #1B2740;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .pos { color: var(--pos); } .neg { color: var(--neg); }
.small { font-size: 13px; } .tiny { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; } .between { justify-content: space-between; } .wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; } .ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stack > * + * { margin-top: 12px; }

/* ---------- каркас */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px; border-bottom: 1px solid transparent; }
.top-in { max-width: 980px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.logo img { width: 30px; height: 30px; border-radius: 9px; }
.main { max-width: 980px; margin: 0 auto; padding: 8px 16px calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 28px); }
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px); }
.nav-in { max-width: 680px; margin: 0 auto; display: grid; grid-template-columns: repeat(6, 1fr); height: var(--nav-h); }
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none;
  color: var(--faint); font-size: 10.5px; font-weight: 600; letter-spacing: -.01em; }
.nav a svg { width: 23px; height: 23px; }
.nav a.on { color: var(--brand); }
@media (min-width: 900px) {
  .nav { top: 0; bottom: 0; right: auto; width: 92px; border-top: 0; border-right: 1px solid var(--line); padding-top: 90px; }
  .nav-in { display: flex; flex-direction: column; height: auto; gap: 8px; }
  .nav a { height: 64px; }
  .top, .main { margin-left: 92px; }
  .main { padding-bottom: 40px; }
}
h1 { font-size: 22px; margin: 6px 0 14px; letter-spacing: -.015em; }
h2 { font-size: 16px; margin: 0 0 10px; }
.sec-title { display: flex; align-items: center; justify-content: space-between; margin: 22px 2px 10px; font-weight: 700; font-size: 15px; }

/* ---------- карточки */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .grid4 { grid-template-columns: repeat(4, 1fr); } .cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; } .cols2 > * + * { margin-top: 0 !important; } }
.kpi { padding: 14px; }
.kpi .l { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi .v { font-size: 20px; font-weight: 800; margin-top: 2px; letter-spacing: -.01em; }
.kpi .d { font-size: 12px; margin-top: 3px; }
.hero { background: linear-gradient(135deg, #0F5E4C, #12715B 55%, #1A8A6E); color: #fff; border: 0; }
@media (prefers-color-scheme: dark) { .hero { background: linear-gradient(135deg, #0F3A30, #145443 60%, #1A6A55); } }
.hero .l { color: rgba(255,255,255,.75); }
.hero .big { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 10px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.acc { flex: none; background: rgba(255,255,255,.14); border-radius: 12px; padding: 8px 12px; min-width: 120px; }
.acc .n { font-size: 12px; opacity: .8; } .acc .b { font-weight: 700; }

/* ---------- ИИ-ввод */
.ai { padding: 14px; border: 1.5px solid color-mix(in srgb, var(--brand) 35%, var(--line)); }
.ai textarea { width: 100%; border: 0; outline: 0; resize: none; background: transparent; font-size: 16px; min-height: 76px; padding: 2px; }
.ai textarea::placeholder { color: var(--faint); }
.ai-bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.mic { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center;
  flex: none; cursor: pointer; box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 40%, transparent); }
.mic svg { width: 24px; height: 24px; }
.mic.rec { background: var(--neg); animation: pulse 1.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--neg) 55%, transparent); } 100% { box-shadow: 0 0 0 16px transparent; } }
.hint { font-size: 12.5px; color: var(--faint); }
.reply { background: var(--brand-soft); color: var(--text); border-radius: 14px; padding: 11px 13px; font-size: 14.5px; }
.op { display: flex; gap: 11px; align-items: flex-start; padding: 11px 0; border-top: 1px solid var(--line); }
.op:first-child { border-top: 0; }
.op .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; flex: none; background: var(--surface-2); }
.op .t { font-weight: 700; font-size: 14.5px; }
.op input.amt { width: 120px; text-align: right; font-weight: 800; font-size: 16px; border: 1px solid var(--line-2); border-radius: 9px;
  padding: 5px 8px; background: var(--surface); }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--gold-soft); color: #8A6212; margin: 3px 4px 0 0; }
@media (prefers-color-scheme: dark) { .badge { color: var(--gold); } }
.x { border: 0; background: transparent; color: var(--faint); font-size: 18px; cursor: pointer; padding: 4px 6px; }

/* ---------- кнопки и поля */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-2); background: var(--surface);
  border-radius: 12px; padding: 10px 15px; font-weight: 700; font-size: 14.5px; cursor: pointer; text-decoration: none; color: var(--text); }
.btn.pri { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.pri { color: #06231B; } .mic { color: #06231B; } }
.btn.danger { color: var(--neg); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.field { display: block; }
.field > span { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 0 0 5px 2px; }
.in { width: 100%; border: 1px solid var(--line-2); background: var(--surface); border-radius: 12px; padding: 11px 12px; font-size: 16px; outline: 0; }
.in:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.in.big { font-size: 24px; font-weight: 800; }
.seg { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; overflow-x: auto; }
.seg button { flex: 1; border: 0; background: transparent; padding: 8px 10px; border-radius: 9px; font-weight: 700; font-size: 13.5px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.pills { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: none; border: 1px solid var(--line-2); background: var(--surface); border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--muted); }
.pill.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.month { display: flex; align-items: center; gap: 4px; }
.month button { border: 0; background: var(--surface); border: 1px solid var(--line); width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 17px; }
.month b { min-width: 120px; text-align: center; font-size: 14.5px; }

/* ---------- списки операций */
.day { font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 16px 4px 6px; display: flex; justify-content: space-between; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.item:first-child { border-top: 0; }
.item:active { background: var(--surface-2); }
.item .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); font-size: 18px; flex: none; }
.item .t { font-weight: 700; font-size: 14.5px; }
.item .s { font-size: 12.5px; color: var(--muted); }
.item .a { font-weight: 800; font-size: 15px; }
.empty { text-align: center; color: var(--faint); padding: 26px 10px; font-size: 14px; }

/* ---------- графики */
.bars { display: flex; flex-direction: column; gap: 11px; }
.bar-row .top-l { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; margin-bottom: 5px; }
.track { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.track i { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.track i.neg { background: var(--neg); } .track i.gold { background: var(--gold); }
.chart { width: 100%; overflow-x: auto; }
.chart svg { display: block; width: 100%; min-width: 520px; height: auto; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- модалка */
.ov { position: fixed; inset: 0; z-index: 50; background: rgba(8,16,13,.45); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { background: var(--surface); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: 22px 22px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px)); animation: up .2s ease-out; }
@media (min-width: 620px) { .ov { align-items: center; } .sheet { border-radius: 22px; } }
@keyframes up { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
.fab { position: fixed; right: 18px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 16px); z-index: 25; width: 56px; height: 56px;
  border-radius: 18px; border: 0; background: var(--brand); color: #fff; font-size: 28px; cursor: pointer; box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 45%, transparent); }
@media (min-width: 900px) { .fab { bottom: 28px; right: 28px; } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 20px); z-index: 60;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow); max-width: 90vw; }
.spin { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: rot .7s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: 100%; max-width: 380px; padding: 26px; }
.progress { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; background: var(--pos); }
.check { width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--line-2); background: transparent; flex: none; cursor: pointer; display: grid; place-items: center; color: #fff; }
.check.on { background: var(--pos); border-color: var(--pos); }

/* ---------- голосовой режим */
.voice-cta { border-style: dashed; color: var(--brand); background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.vm { position: fixed; inset: 0; z-index: 70; background: var(--bg); display: flex; flex-direction: column; animation: fade .15s;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.vm-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.vm-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; max-width: 640px; width: 100%; margin: 0 auto; }
.vm-hint { margin: auto 0; text-align: center; display: grid; gap: 8px; font-size: 15px; }
.bub { max-width: 85%; padding: 10px 14px; border-radius: 18px; font-size: 15.5px; line-height: 1.4; white-space: pre-wrap; }
.bub.user { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 6px; }
@media (prefers-color-scheme: dark) { .bub.user { color: #06231B; } }
.bub.assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.vm-bottom { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 16px 22px; }
.orb { width: 96px; height: 96px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #fff; font-size: 30px;
  background: radial-gradient(circle at 35% 30%, #2FA884, #12715B 70%); box-shadow: 0 10px 30px color-mix(in srgb, var(--brand) 45%, transparent);
  transition: transform .08s linear, background .2s; }
.orb svg { width: 38px; height: 38px; }
.orb.listening { background: radial-gradient(circle at 35% 30%, #FF8A70, #C8412F 70%); box-shadow: 0 0 0 10px color-mix(in srgb, var(--neg) 18%, transparent); }
.orb.speaking { background: radial-gradient(circle at 35% 30%, #F5CF6B, #D89A1E 70%); animation: breathe 1.6s ease-in-out infinite; }
.orb.thinking { opacity: .8; }
.orb:disabled { cursor: default; }
@keyframes breathe { 50% { box-shadow: 0 0 0 16px color-mix(in srgb, var(--gold) 20%, transparent); } }

.gold-t { color: #B07A0C; font-weight: 700; }
@media (prefers-color-scheme: dark) { .gold-t { color: var(--gold); } }
