/* Спокойный «финтех-терминал»: графит, тонкие рамки, скругления, один акцентный цвет.
   Зелёный и красный только для прибыли и убытка, жёлтый - вход и предупреждения.
   Старые имена переменных оставлены алиасами, чтобы разметка не ломалась. */
:root {
  --bg: #0B0E14; --bg2: #0F131A; --panel: #151A23; --panel2: #1A202B; --line: #252C38; --line2: #1D232E; --row: #202733;
  --text: #E6E9EF; --muted: #9AA3B2; --dim: #8A93A3; --white: #FFFFFF;
  --accent: #6E56F0; --accent-hi: #7D67F4; --accent-soft: rgba(110,86,240,.14); --link: #A48CFF;
  --up: #1FC7A0; --down: #F2546B; --warn: #F5C451;
  --up-soft: rgba(31,199,160,.12); --down-soft: rgba(242,84,107,.10); --warn-soft: rgba(245,196,81,.08);
  /* алиасы для старого кода */
  --teal: var(--up); --pink: var(--down); --pink2: var(--down); --violet: var(--accent); --violet2: var(--link); --yellow: var(--warn);
  --r-sm: 8px; --r: 12px; --r-lg: 16px;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Inter', system-ui, sans-serif; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
body { min-height: 100vh; overflow-x: hidden; }
.strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
a { color: var(--link); }
button, input, select, textarea { font-family: inherit; }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hidden { display: none !important; }
.wrap { max-width: 480px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; position: relative; }
.top { height: 56px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line2); background: rgba(11,14,20,.92); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; }
.top .title { font-size: 15px; font-weight: 600; color: var(--white); }
.iconbtn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--muted); background: none; border: none; cursor: pointer; border-radius: 10px; }
.iconbtn:active { background: var(--panel); }
.content { padding: 16px 16px 140px; display: flex; flex-direction: column; gap: 14px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.label { font-size: 13px; font-weight: 600; color: var(--muted); }
.btn { min-height: 52px; display: flex; align-items: center; justify-content: center; padding: 0 16px; border: none; border-radius: var(--r); font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; line-height: 1.2; gap: 0; transition: transform .12s, background .2s, opacity .2s; }
.btn:active { transform: scale(.985); }
/* Иконка + текст одинаково в любом WebView: отступ задаёт сама иконка (старые движки не знают flex-gap) */
.btn svg { display: inline-block; vertical-align: middle; flex-shrink: 0; margin: -2px 8px 0 0; }
.btn:disabled { background: var(--panel2); color: var(--dim); box-shadow: none; cursor: default; }
.btn.primary, .btn.go { background: var(--accent); color: #fff; box-shadow: 0 6px 20px rgba(110,86,240,.28); }
.btn.primary:active, .btn.go:active { background: var(--accent-hi); }
.btn.gold { background: var(--warn); color: #0B0E14; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); min-height: 46px; font-weight: 500; }
.btn.danger { background: transparent; color: var(--text); border: 1px solid var(--line); min-height: 46px; font-weight: 500; }
.btn .sub { display: block; font-size: 12px; font-weight: 500; opacity: .8; margin-top: 3px; }
.btn.two { flex-direction: column; min-height: 60px; }
.chip { flex-shrink: 0; min-height: 36px; padding: 0 14px; font-size: 13px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 6px; background: var(--panel); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }
.chip.on { background: var(--accent-soft); color: #fff; border-color: rgba(125,103,244,.55); }
.chip .tagx { font-size: 10px; color: var(--warn); font-weight: 600; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.input { min-height: 48px; padding: 0 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); color: var(--text); font-size: 15px; width: 100%; }
.input:focus { outline: none; border-color: var(--accent); }
textarea.input { padding: 10px 12px; resize: vertical; }
.sr { position: absolute; left: -9999px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #F1F3F7; color: #0B0E14; padding: 11px 16px; font-size: 14px; font-weight: 600; z-index: 100; max-width: 90vw; border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.4); }
.sheet-bg { position: fixed; inset: 0; background: rgba(4,6,10,.7); z-index: 50; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; max-height: 88vh; overflow-y: auto; margin: 0 auto; background: var(--panel); border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; padding: 12px 16px 28px; display: flex; flex-direction: column; gap: 12px; z-index: 51; }
.bottom { position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; padding: 12px 16px 18px; background: rgba(11,14,20,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--line2); z-index: 30; display: flex; flex-direction: column; gap: 8px; }
.note { font-size: 12px; color: var(--dim); line-height: 1.45; }
.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 12px 14px; border-bottom: 1px solid var(--row); }
.kv:last-child { border-bottom: none; }
.kv span:first-child { color: var(--muted); }
.toggle { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 56px; padding: 0 14px; border-bottom: 1px solid var(--row); cursor: pointer; }
.toggle:last-child { border-bottom: none; }
.toggle input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); flex-shrink: 0; }
.radio { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 14px; cursor: pointer; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.radio.on { background: var(--accent-soft); border-color: rgba(125,103,244,.6); }
.dot { flex-shrink: 0; margin-top: 2px; width: 18px; height: 18px; border: 1.5px solid #4A5263; border-radius: 50%; }
.radio.on .dot { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 45%, transparent 50%); }
.check { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 0; flex-shrink: 0; border-radius: 6px; border: 1.5px solid #4A5263; background: var(--panel); cursor: pointer; display: grid; place-items: center; }
.check:checked { background: var(--accent); border-color: var(--accent); }
.check:checked::after { content: ''; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.check.attn { border-color: var(--warn); box-shadow: 0 0 0 3px rgba(245,196,81,.25); }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--muted); cursor: pointer; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.pill.live { color: var(--text); } .pill.live i { background: var(--up); animation: soft 2s ease-in-out infinite; }
.badge { display: inline-flex; white-space: nowrap; flex-shrink: 0; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.badge.warn { background: rgba(245,196,81,.14); color: var(--warn); }
.badge.up { background: var(--up-soft); color: var(--up); }
.badge.acc { background: var(--accent-soft); color: var(--link); }
.up { color: var(--up); } .down { color: var(--down); } .warn { color: var(--warn); }
@keyframes soft { 0%,100% { opacity: 1 } 50% { opacity: .45 } }
@keyframes blink { 0%,49% { opacity: 1 } 50%,100% { opacity: .25 } }
.blink { animation: soft 2s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
.spin { animation: spin 1s linear infinite; }
