/* AeroFinance v2 — Telegram-подобная тема с жирным зелёным */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #EEF2F6;
  --surface: #FFFFFF;
  --surface-2: #F4F7FA;
  --surface-3: #E9EFF5;
  --text: #0B1220;
  --text-2: #33475B;
  --muted: #6B7C8F;
  --line: #E1E8EF;
  --green: #17C964;
  --green-strong: #0EA34F;
  --green-ink: #04240F;
  --green-soft: #E4FBEE;
  --mint: #D6F8E4;
  --danger: #F04438;
  --danger-soft: #FEECEA;
  --warn: #F79009;
  --warn-soft: #FFF4E5;
  --info: #2E90FA;
  --shadow-sm: 0 2px 8px rgba(11, 18, 32, .05);
  --shadow: 0 10px 30px rgba(11, 18, 32, .09);
  --shadow-lg: 0 24px 60px rgba(11, 18, 32, .18);
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 24px;
  --header-h: 58px;
  --tab-h: 62px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #0E1621;
  --surface: #17212B;
  --surface-2: #1B2733;
  --surface-3: #22303D;
  --text: #F3F7FB;
  --text-2: #C6D3DF;
  --muted: #8AA0B4;
  --line: #243342;
  --green: #3DDC84;
  --green-strong: #2ECC71;
  --green-ink: #04240F;
  --green-soft: #12301F;
  --mint: #0F2A1C;
  --danger-soft: #3A1B1A;
  --warn-soft: #3A2A14;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .28);
  --shadow: 0 16px 40px rgba(0, 0, 0, .38);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .55);
}

html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--green-strong); text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--green) 55%, transparent); outline-offset: 2px; }

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
}
@media (min-width: 520px) {
  body { background: radial-gradient(1200px 600px at 50% -10%, #d9f7e6 0%, #eef2f6 45%, #e7edf3 100%); }
  [data-theme="dark"] body { background: radial-gradient(900px 500px at 50% -10%, #10321f 0%, #0b131c 55%, #0a1119 100%); }
  .app { box-shadow: var(--shadow-lg); border-radius: 26px; height: min(920px, 96dvh); margin-top: 2dvh; border: 1px solid var(--line); }
}

/* ───────── шапка ───────── */
.app-header { position: relative; z-index: 20; }
.hdr {
  display: flex; align-items: center; gap: 12px;
  height: var(--header-h); padding: 0 14px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.hdr-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-strong) 100%);
  color: #fff; font-weight: 800; font-size: 15px;
  display: grid; place-items: center; flex: 0 0 auto;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--green) 35%, transparent);
}
.hdr-main { min-width: 0; flex: 1; }
.hdr-title { font-size: 16px; font-weight: 800; letter-spacing: -.2px; display: flex; align-items: center; gap: 6px; }
.hdr-sub { font-size: 12px; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hdr-actions { display: flex; align-items: center; gap: 6px; }
.hdr-actions .icon-btn + .icon-btn { margin-left: 2px; }

.icon-btn {
  width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: transparent; color: var(--text-2);
  display: grid; place-items: center;
  transition: background .15s ease, color .15s ease, transform .12s ease;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 21px; height: 21px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 10px; border-radius: 999px;
  background: var(--surface-3); color: var(--text-2);
  font-size: 11.5px; font-weight: 700; letter-spacing: .1px;
}
.chip--pro { background: linear-gradient(135deg, var(--green) 0%, var(--green-strong) 100%); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--green) 30%, transparent); }
.chip--soft { background: var(--green-soft); color: var(--green-strong); }
.chip--danger { background: var(--danger-soft); color: var(--danger); }
[data-theme="dark"] .chip--soft { color: var(--green); }

/* ───────── экран ───────── */
.screen {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  position: relative;
  display: flex; flex-direction: column;
}
.screen > * { flex: 0 0 auto; }
.screen > .chat-wrap { flex: 1 1 auto; }
.screen::-webkit-scrollbar { display: none; }
.pad { padding: 16px 14px 24px; }
.pad-tight { padding: 10px 12px 24px; }
.stack { display: grid; gap: 12px; }
.stack-sm { display: grid; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.strong { font-weight: 800; }
.green { color: var(--green-strong); }
.danger { color: var(--danger); }
.nowrap { white-space: nowrap; }

.section-title { font-size: 12px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase; color: var(--muted); margin: 4px 2px 2px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 6px 2px; }
.section-head h2 { font-size: 17px; font-weight: 800; margin: 0; letter-spacing: -.3px; }
.link-btn { border: 0; background: none; color: var(--green-strong); font-size: 12.5px; font-weight: 700; padding: 4px; }

/* ───────── таб-бар ───────── */
.tabbar {
  position: relative; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--line);
}
.tab {
  border: 0; background: none; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 10.5px; font-weight: 600; position: relative;
  transition: color .15s ease;
}
.tab svg { width: 23px; height: 23px; transition: transform .18s cubic-bezier(.34,1.56,.64,1); }
.tab.active { color: var(--green-strong); }
.tab.active svg { transform: translateY(-1px) scale(1.06); }
.tab.active::before {
  content: ""; position: absolute; top: 6px; width: 40px; height: 30px; border-radius: 12px;
  background: var(--green-soft);
  z-index: -1;
}
.tab-label { line-height: 1; }
[data-theme="dark"] .tab.active { color: var(--green); }

/* ───────── карточки ───────── */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; box-shadow: var(--shadow-sm);
}
.card--flat { box-shadow: none; }
.card--pad-sm { padding: 12px; }
.card-hero {
  position: relative; overflow: hidden;
  border: 0; border-radius: var(--r-lg); padding: 18px;
  background: linear-gradient(145deg, #17C964 0%, #0EA34F 52%, #087A3B 100%);
  color: #fff;
  box-shadow: 0 18px 40px color-mix(in srgb, var(--green) 34%, transparent);
}
.card-hero::after {
  content: ""; position: absolute; right: -60px; top: -80px; width: 220px; height: 220px;
  border-radius: 50%; background: rgba(255,255,255,.14);
}
.card-hero::before {
  content: ""; position: absolute; right: 20px; bottom: -90px; width: 180px; height: 180px;
  border-radius: 50%; background: rgba(255,255,255,.08);
}
.hero-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.hero-label { font-size: 12px; font-weight: 700; opacity: .86; letter-spacing: .3px; }
.hero-value { font-size: 34px; font-weight: 800; letter-spacing: -1.2px; margin: 6px 0 2px; position: relative; z-index: 1; }
.hero-delta { font-size: 12.5px; font-weight: 600; opacity: .92; position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; position: relative; z-index: 1; }
.hero-cell { background: rgba(255,255,255,.14); border-radius: 14px; padding: 10px 9px; }
.hero-cell .k { font-size: 10.5px; opacity: .85; font-weight: 600; }
.hero-cell .v { font-size: 14px; font-weight: 800; margin-top: 3px; letter-spacing: -.3px; }

/* ───────── метрики ───────── */
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric-grid--3 { grid-template-columns: repeat(3, 1fr); }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 13px; }
.metric .k { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.metric .v { font-size: 19px; font-weight: 800; margin-top: 4px; letter-spacing: -.6px; }
.metric .s { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ───────── кольцо здоровья ───────── */
.score-row { display: flex; align-items: center; gap: 16px; }
.ring { position: relative; width: 96px; height: 96px; flex: 0 0 auto; }
.ring svg { transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--surface-3); stroke-width: 9; }
.ring-fill { fill: none; stroke-width: 9; stroke-linecap: round; transition: stroke-dasharray .8s cubic-bezier(.22,1,.36,1); }
.ring-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-text b { font-size: 24px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.ring-text span { font-size: 10px; color: var(--muted); font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }

/* ───────── прогресс и бары ───────── */
.bar-track { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--green); transition: width .6s cubic-bezier(.22,1,.36,1); }
.bar-fill--warn { background: var(--warn); }
.bar-fill--danger { background: var(--danger); }

.cat-row { display: grid; gap: 6px; }
.cat-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.cat-name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 auto; }
.cat-amount { font-weight: 800; letter-spacing: -.2px; }
.cat-sub { font-size: 11px; color: var(--muted); }

/* ───────── списки ───────── */
.list { display: grid; gap: 2px; }
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 14px;
  background: transparent; border: 0; width: 100%; text-align: left;
  transition: background .14s ease;
}
button.row:hover, .row--tap:hover { background: var(--surface-2); }
.row + .row { border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: 0; }
.row-ico {
  width: 40px; height: 40px; border-radius: 13px; flex: 0 0 auto;
  display: grid; place-items: center; background: var(--surface-2); color: var(--text-2);
  font-size: 15px; font-weight: 800;
}
.row-ico--green { background: var(--green-soft); color: var(--green-strong); }
.row-ico--danger { background: var(--danger-soft); color: var(--danger); }
.row-ico--warn { background: var(--warn-soft); color: var(--warn); }
.row-main { min-width: 0; flex: 1; }
.row-title { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-end { text-align: right; flex: 0 0 auto; }
.row-amount { font-size: 14px; font-weight: 800; letter-spacing: -.3px; }
.row-amount--in { color: var(--green-strong); }
.row-amount--out { color: var(--text); }

/* ───────── кнопки ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 18px; border-radius: 14px; border: 1px solid transparent;
  background: var(--surface-3); color: var(--text); font-weight: 700; font-size: 14.5px;
  transition: transform .12s ease, filter .15s ease, background .15s ease;
}
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: linear-gradient(135deg, var(--green) 0%, var(--green-strong) 100%); color: #fff; box-shadow: 0 10px 24px color-mix(in srgb, var(--green) 30%, transparent); }
.btn--primary:hover { filter: brightness(1.04); }
.btn--soft { background: var(--green-soft); color: var(--green-strong); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--text-2); }
.btn--danger { background: var(--danger-soft); color: var(--danger); }
.btn--block { width: 100%; }
.btn--sm { height: 36px; padding: 0 12px; border-radius: 11px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--primary:disabled { filter: grayscale(.2); }

/* ───────── формы ───────── */
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; font-weight: 700; color: var(--muted); }
.input, .select {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  font-size: 15px; font-weight: 600; outline: none;
  transition: border-color .15s ease, background .15s ease;
}
.input:focus, .select:focus { border-color: var(--green); background: var(--surface); }
.input::placeholder { color: var(--muted); font-weight: 500; }
.input--amount { font-size: 26px; font-weight: 800; letter-spacing: -1px; height: 58px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ───────── чат ───────── */
.chat-wrap { display: flex; flex-direction: column; min-height: 100%; }
.chat-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(520px 320px at 12% 0%, color-mix(in srgb, var(--green) 9%, transparent), transparent 70%),
    radial-gradient(420px 280px at 100% 100%, color-mix(in srgb, var(--info) 7%, transparent), transparent 70%);
}
.chat-scroll { position: relative; z-index: 1; padding: 14px 12px 10px; display: grid; gap: 8px; align-content: start; flex: 1 1 auto; }
.day-sep { text-align: center; margin: 6px 0; }
.day-sep span { display: inline-block; padding: 5px 12px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 75%, transparent); color: var(--muted); font-size: 11px; font-weight: 700; backdrop-filter: blur(6px); }

.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 100%; }
.msg--out { justify-content: flex-end; }
.msg-avatar { width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto; background: linear-gradient(135deg, var(--green), var(--green-strong)); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.bubble {
  max-width: 84%; padding: 10px 13px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 14.5px; line-height: 1.42; white-space: pre-wrap; word-wrap: break-word;
  box-shadow: var(--shadow-sm);
}
.msg--in .bubble { border-bottom-left-radius: 6px; }
.msg--out .bubble {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-strong) 100%);
  color: #fff; border: 0; border-bottom-right-radius: 6px;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--green) 28%, transparent);
}
.msg--out .bubble a { color: #fff; text-decoration: underline; }
.msg-time { font-size: 10px; opacity: .55; margin-top: 4px; text-align: right; }
.msg--out .msg-time { color: rgba(255,255,255,.8); }

.bubble .card { margin-top: 8px; box-shadow: none; padding: 12px; }
.bubble > * { white-space: normal; }
.msg-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.msg-stat { background: var(--surface-2); border-radius: 12px; padding: 9px 10px; }
.msg-stat .k { font-size: 10.5px; color: var(--muted); font-weight: 700; }
.msg-stat .v { font-size: 14px; font-weight: 800; margin-top: 2px; }

.quick-chips { display: flex; gap: 8px; overflow-x: auto; padding: 8px 12px 4px; scrollbar-width: none; }
.quick-chips::-webkit-scrollbar { display: none; }
.quick-chip {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface);
  color: var(--text-2); border-radius: 999px; padding: 8px 13px; font-size: 12.5px; font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.quick-chip:hover { border-color: var(--green); color: var(--green-strong); }

.composer-wrap {
  position: sticky; bottom: 0; z-index: 5; margin-top: auto;
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 55%, color-mix(in srgb, var(--bg) 0%, transparent));
}
.composer {
  display: flex; align-items: flex-end; gap: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  padding: 6px 6px 6px 8px; box-shadow: var(--shadow);
}
.composer textarea {
  flex: 1; border: 0; background: transparent; resize: none; outline: none;
  font-size: 15px; line-height: 1.35; padding: 9px 4px; max-height: 120px; min-height: 38px;
  color: var(--text);
}
.composer textarea::placeholder { color: var(--muted); }
.composer .icon-btn { width: 36px; height: 36px; }
.composer .icon-btn svg { width: 20px; height: 20px; }
.send-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 0; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--green), var(--green-strong)); color: #fff;
  display: grid; place-items: center; box-shadow: 0 6px 16px color-mix(in srgb, var(--green) 34%, transparent);
  transition: transform .12s ease;
}
.send-btn:active { transform: scale(.92); }
.send-btn svg { width: 19px; height: 19px; }
.mic-btn.is-rec { background: var(--danger); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(240,68,56,.4); } 50% { box-shadow: 0 0 0 12px rgba(240,68,56,0); } }

.rec-banner {
  display: flex; align-items: center; gap: 10px; margin: 0 10px 8px;
  padding: 10px 14px; border-radius: 16px; background: var(--danger-soft); color: var(--danger);
  font-size: 13px; font-weight: 700;
}
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .25; } }

.typing { display: inline-flex; gap: 4px; align-items: center; height: 18px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: bounce 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%,60%,100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

/* ───────── сегменты ───────── */
.seg { display: flex; gap: 4px; padding: 4px; background: var(--surface-3); border-radius: 14px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
  flex: 1 0 auto; border: 0; background: transparent; color: var(--muted);
  height: 34px; padding: 0 12px; border-radius: 11px; font-size: 12.5px; font-weight: 700;
  white-space: nowrap; transition: all .15s ease;
}
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ───────── бейджи ───────── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .2px; }
.badge--green { background: var(--green-soft); color: var(--green-strong); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge--muted { background: var(--surface-3); color: var(--muted); }

/* ───────── лист (sheet) ───────── */
.backdrop {
  position: fixed; inset: 0; background: rgba(4, 12, 20, .5); backdrop-filter: blur(3px);
  z-index: 100; opacity: 0; transition: opacity .22s ease;
}
.backdrop.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 101;
  max-width: 480px; margin: 0 auto; max-height: 92dvh;
  background: var(--surface); border-radius: 24px 24px 0 0;
  box-shadow: var(--shadow-lg);
  transform: translateY(100%); transition: transform .28s cubic-bezier(.22,1,.36,1);
  display: flex; flex-direction: column; overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet.show { transform: translateY(0); }
.sheet-grab { width: 38px; height: 4px; border-radius: 999px; background: var(--line); margin: 8px auto 0; flex: 0 0 auto; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px 8px; flex: 0 0 auto; }
.sheet-head h3 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.4px; flex: 1; }
.sheet-body { padding: 6px 18px 24px; overflow-y: auto; }
.sheet-body--flush { padding: 0 0 24px; }

/* ───────── тосты ───────── */
.toast-root { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(92%, 420px); pointer-events: none; }
.toast {
  background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 14px;
  font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-lg);
  animation: toastIn .25s ease;
  display: flex; align-items: center; gap: 8px;
}
[data-theme="dark"] .toast { background: #E9F2F9; color: #0B1220; }
.toast--ok { background: var(--green-strong); color: #fff; }
.toast--err { background: var(--danger); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ───────── загрузка ───────── */
.splash {
  position: fixed; inset: 0; z-index: 300; display: grid; place-content: center; justify-items: center; gap: 10px;
  background: linear-gradient(160deg, #0B1220 0%, #0E2A1B 60%, #0B3A22 100%);
  color: #fff; transition: opacity .4s ease, visibility .4s ease;
}
.splash.hide { opacity: 0; visibility: hidden; }
.splash-logo {
  width: 74px; height: 74px; border-radius: 22px; display: grid; place-items: center;
  background: linear-gradient(135deg, #3DDC84, #0EA34F); color: #04240F;
  font-weight: 900; font-size: 26px; letter-spacing: -1px;
  box-shadow: 0 20px 50px rgba(23,201,100,.35);
}
.splash-text { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.splash-sub { font-size: 12.5px; color: #9db3c6; letter-spacing: .4px; }

.skel { border-radius: 14px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.empty { text-align: center; padding: 26px 16px; color: var(--muted); }
.empty-ico { width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center; margin: 0 auto 10px; background: var(--surface-2); color: var(--muted); }
.empty-ico svg { width: 26px; height: 26px; }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

/* ───────── paywall ───────── */
.paywall-hero { text-align: center; padding: 6px 0 14px; }
.paywall-crown { width: 58px; height: 58px; border-radius: 18px; margin: 0 auto 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--green), var(--green-strong)); color: #fff; box-shadow: 0 14px 30px color-mix(in srgb, var(--green) 35%, transparent); }
.paywall-hero h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.5px; }
.paywall-hero p { margin: 0; color: var(--muted); font-size: 13px; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan {
  position: relative; border: 2px solid var(--line); border-radius: 18px; padding: 14px;
  background: var(--surface); text-align: left; transition: border-color .15s ease, background .15s ease;
}
.plan.active { border-color: var(--green); background: var(--green-soft); }
.plan .p-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.plan .p-price { font-size: 26px; font-weight: 800; letter-spacing: -1px; margin: 4px 0 2px; }
.plan .p-sub { font-size: 11px; color: var(--muted); }
.plan .p-save { position: absolute; top: -9px; right: 10px; }
.method { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); margin-bottom: 8px; text-align: left; }
.method.active { border-color: var(--green); background: var(--green-soft); }
.method-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); font-weight: 800; font-size: 12px; }
.method.active .method-ico { background: var(--green); color: #fff; }
.method-main { flex: 1; }
.method-title { font-size: 13.5px; font-weight: 700; }
.method-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }

.lock-overlay { position: relative; }
.lock-overlay > .locked { filter: blur(5px); opacity: .55; pointer-events: none; user-select: none; }
.lock-cta {
  position: absolute; inset: auto 12px 12px; z-index: 2;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 10px;
}
.lock-cta .lk { width: 34px; height: 34px; border-radius: 11px; background: var(--green-soft); color: var(--green-strong); display: grid; place-items: center; flex: 0 0 auto; }

/* ───────── таблица ───────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table.data { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 420px; }
table.data th { text-align: left; padding: 9px 10px; background: var(--surface-2); color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; }
table.data td { padding: 9px 10px; border-top: 1px solid var(--line); white-space: nowrap; }
table.data td.num { text-align: right; font-weight: 700; }

/* ───────── виджет-превью ───────── */
.widget-preview {
  background: linear-gradient(145deg, #17C964, #087A3B); color: #fff;
  border-radius: 22px; padding: 16px; width: 100%; box-shadow: var(--shadow);
}
.widget-preview .w-top { display: flex; align-items: center; justify-content: space-between; font-size: 11px; opacity: .85; }
.widget-preview .w-value { font-size: 28px; font-weight: 800; letter-spacing: -1px; margin: 8px 0 2px; }
.widget-preview .w-sub { font-size: 11.5px; opacity: .9; }
.widget-preview .w-row { display: flex; gap: 8px; margin-top: 12px; }
.widget-preview .w-pill { background: rgba(255,255,255,.16); border-radius: 10px; padding: 7px 9px; font-size: 10.5px; font-weight: 600; }

/* ───────── прочее ───────── */
.divider { height: 1px; background: var(--line); margin: 12px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.center { text-align: center; }
.progress-line { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress-line > div { height: 100%; background: var(--green); border-radius: 999px; }
.avatar-lg { width: 56px; height: 56px; border-radius: 18px; background: linear-gradient(135deg, var(--green), var(--green-strong)); color: #fff; display: grid; place-items: center; font-size: 20px; font-weight: 800; }
.toggle { position: relative; width: 48px; height: 28px; border-radius: 999px; background: var(--surface-3); border: 0; transition: background .18s ease; flex: 0 0 auto; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .18s ease; }
.toggle.on { background: var(--green); }
.toggle.on::after { transform: translateX(20px); }
.hide { display: none !important; }
.fade-in { animation: fadeIn .28s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* офлайн-баннер: данные из кэша остаются на экране */
.offline-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  margin: 8px 12px 0;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255, 196, 107, .14);
  border: 1px solid rgba(255, 196, 107, .35);
  color: var(--text, #1b1f24);
  font-size: 12px;
  line-height: 1.35;
}
.offline-bar span { flex: 1; }
.offline-bar .link-btn { flex: 0 0 auto; white-space: nowrap; }

/* вход через Google */
.g-btn-wrap{display:flex;justify-content:center;margin:4px 0 10px}
.g-btn-wrap iframe{border-radius:12px}

/* админ-статистика */
.mini-stat{background:var(--card2,#f4f6f8);border-radius:12px;padding:10px 12px}
