/* VedaCapital Mini App — стиль сайта vedacapital.ru + зелёный с фирменного фото */
:root {
  color-scheme: dark;
  --bg: #070513;
  --surf: #0F0B24;
  --surf2: #17123A;
  --line: #2A2166;
  --violet: #5A45E0;
  --violet2: #7B66FF;
  --violet-l: #9A8AFF;
  --deep: #4432BA;
  --green: #22B5A0;
  --green-l: #4FD6BF;
  --muted: #C9C8D3;
  --muted2: #A7A7A7;
  --ink: #070513;
  --ink2: #5C5873;
  --warn: #F5B94A;
  --bad: #FF8FA3;
  --grad: linear-gradient(100deg, #5A45E0 0%, #6D5BF0 45%, #22B5A0 100%);
  --font: 'Onest', 'Gilroy', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --r: 24px;
  --tabs-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: #fff; font: 15px/1.45 var(--font); min-height: 100%; }
body { overscroll-behavior-y: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--green-l); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; }
[hidden] { display: none !important; }

#glow-a, #glow-b { position: fixed; border-radius: 50%; pointer-events: none; z-index: 0; }
#glow-a { top: -150px; right: -130px; width: 360px; height: 360px; background: radial-gradient(circle, rgba(90,69,224,.38), rgba(90,69,224,0) 70%); }
#glow-b { bottom: -170px; left: -150px; width: 380px; height: 380px; background: radial-gradient(circle, rgba(34,181,160,.22), rgba(34,181,160,0) 70%); }

#app { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; padding: 0 20px calc(var(--tabs-h) + var(--safe-b) + 24px); }
body.no-tabs #app { padding-bottom: calc(var(--safe-b) + 24px); }
.view { display: flex; flex-direction: column; gap: 16px; animation: in .18s ease-out; }
@keyframes in { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view { animation: none; } }

.splash { min-height: 70vh; display: grid; place-items: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surf2); border-top-color: var(--violet2); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid var(--surf2); border-top-color: var(--green-l); animation: spin .8s linear infinite; }

/* шапка */
.hdr { display: flex; align-items: center; gap: 10px; padding: 14px 0 4px; }
.brand { display: flex; align-items: center; gap: 8px; flex: 1; font-weight: 600; font-size: 15px; }
.logo { width: 40px; height: 40px; fill: var(--violet2); filter: drop-shadow(0 0 10px rgba(123,102,255,.55)); flex: none; }
.badge-admin { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 30px; background: #fff; color: var(--ink); }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; flex: none; }
.iconbtn.solid { background: var(--surf2); border: 0; }
.hdr-title { flex: 1; font-size: 17px; font-weight: 600; }

/* типографика */
.h1 { font-size: 28px; line-height: 1.12; letter-spacing: -.01em; }
.h2 { font-size: 20px; line-height: 1.2; }
.muted { color: var(--muted); }
.muted2 { color: var(--muted2); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mono { font-family: var(--mono); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted2); }
.row { display: flex; align-items: center; gap: 12px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.center { text-align: center; align-items: center; }

/* кнопки */
.btn { min-height: 52px; padding: 0 22px; border-radius: 30px; border: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 16px; font-weight: 600; width: 100%; transition: transform .1s, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(90,69,224,.35); }
.btn-ghost { background: transparent; color: #fff; border: 1px solid var(--violet); }
.btn-white { background: #fff; color: var(--ink); }
.btn-soft { background: var(--surf2); color: #fff; }
.btn-sm { min-height: 44px; font-size: 14px; padding: 0 16px; }
.link { color: var(--violet-l); font-weight: 600; font-size: 14px; background: none; border: 0; padding: 8px 0; }

/* карточки */
.card { background: var(--surf); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.card.accent-border { border-color: var(--violet); }
.card-white { background: #fff; color: var(--ink); border-radius: 30px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.card-white .muted, .card-white .muted2 { color: var(--ink2); }
.card-violet { position: relative; overflow: hidden; background: var(--violet); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.card-violet .candles { position: absolute; right: 14px; top: 14px; opacity: .9; }
.card-violet p { color: #EDEAFF; max-width: 300px; }
.card-green { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: var(--r); background: linear-gradient(100deg, rgba(34,181,160,.18), rgba(90,69,224,.18)); border: 1px solid rgba(34,181,160,.45); }

.chip { font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 30px; white-space: nowrap; display: inline-block; }
.chip-green { background: var(--green); color: #04241F; }
.chip-violet { background: var(--violet); color: #fff; }
.chip-outline { border: 1px solid var(--violet-l); color: var(--violet-l); }
.chip-soft { background: var(--surf2); color: var(--muted); }
.chip-ink { background: #EEEAFF; color: var(--deep); }
.chip-warn { border: 1px solid rgba(245,185,74,.6); color: var(--warn); }
.chip-bad { background: #2A1030; color: var(--bad); }

.ic { width: 40px; height: 40px; border-radius: 50%; background: var(--violet); display: grid; place-items: center; flex: none; }
.ic svg { width: 20px; height: 20px; }
.ic.green { background: var(--green); }
.ic.soft { background: var(--surf2); }
.ic.warn { background: #3A2A10; }
.ic.bad { background: #2A1030; }
.ic.white { background: #fff; }
svg.i { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* списки */
.list { display: flex; flex-direction: column; }
.li { min-height: 68px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-top: 0; padding: 0; width: 100%; text-align: left; }
.li:last-child { border-bottom: 0; }
.li-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.li-title { font-size: 16px; font-weight: 600; }
.li-sub { font-size: 13px; color: var(--muted2); overflow: hidden; text-overflow: ellipsis; }
.li-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.chev { color: var(--muted2); }

/* шаги (как на сайте) */
.steps { display: flex; flex-direction: column; }
.step { position: relative; display: flex; gap: 14px; padding-bottom: 14px; }
.step:last-child { padding-bottom: 0; }
.step:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 30px; bottom: -2px; width: 2px; background: var(--violet); opacity: .35; }
.step-n { width: 28px; height: 28px; border-radius: 50%; background: var(--violet); color: #fff; font-size: 13px; font-weight: 600; display: grid; place-items: center; flex: none; }
.step-t { font-size: 15px; font-weight: 600; padding-top: 3px; }
.step-s { font-size: 13px; color: var(--ink2); }

/* поля */
.field { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.input { min-height: 54px; padding: 0 18px; background: var(--surf); border: 1px solid var(--violet); border-radius: 30px; color: #fff; font-size: 16px; width: 100%; }
.input.mono { font-family: var(--mono); }
textarea.input { padding: 14px 18px; border-radius: 24px; min-height: 110px; resize: vertical; line-height: 1.45; }
.input::placeholder { color: #6E6893; }
.input:focus { outline: none; border-color: var(--green-l); }
.hint { font-size: 12px; color: var(--muted2); }
.err { font-size: 13px; color: var(--bad); }

/* шкала баланса */
.scale { position: relative; height: 38px; }
.scale-track { position: absolute; left: 0; right: 0; top: 8px; height: 8px; border-radius: 30px; background: #ECEAF5; }
.scale-fill { position: absolute; left: 0; top: 8px; height: 8px; border-radius: 30px; background: var(--grad); max-width: 100%; }
.scale-tick { position: absolute; top: 4px; width: 2px; height: 16px; background: var(--ink); }
.scale-lab { position: absolute; top: 24px; font-size: 11px; font-weight: 600; transform: translateX(-50%); white-space: nowrap; }
.bar { height: 8px; border-radius: 30px; background: var(--surf2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--grad); border-radius: 30px; }

/* сегменты и фильтры */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 30px; background: var(--surf2); }
.seg button { min-height: 44px; border: 0; border-radius: 30px; background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; }
.seg button.on { background: var(--grad); color: #fff; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters button { min-height: 36px; padding: 0 14px; border-radius: 30px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; }
.filters button.on { background: var(--grad); border-color: transparent; color: #fff; }

/* выбор варианта */
.opt { background: var(--surf); border: 1px solid var(--line); border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 8px; text-align: left; color: #fff; }
.opt.on { background: var(--surf2); border: 1.5px solid var(--green-l); }
.opt .dot { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--muted2); display: grid; place-items: center; }
.opt.on .dot { background: var(--green); border-color: var(--green); }

/* большой статус */
.status { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; margin: 12px auto 0; }
.status.ok { background: var(--grad); box-shadow: 0 0 40px rgba(34,181,160,.45); }
.status.warn { border: 2px solid var(--violet2); color: var(--violet2); }
.status svg { width: 42px; height: 42px; }

/* пары ключ-значение */
.kv { display: flex; flex-direction: column; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #ECEAF5; font-size: 14px; }
.kv > div:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--ink2); }
.kv span:last-child { font-weight: 600; text-align: right; }

/* FAQ */
.faq { border-bottom: 1px solid var(--line); padding: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.faq button { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: none; border: 0; padding: 0; color: #fff; font-size: 15px; font-weight: 600; text-align: left; }
.faq .plus { width: 36px; height: 36px; border-radius: 50%; background: var(--violet); display: grid; place-items: center; flex: none; transition: transform .2s; }
.faq.open .plus { transform: rotate(45deg); }
.faq p { display: none; color: var(--muted); font-size: 14px; }
.faq.open p { display: block; }

/* таймлайн */
.tl { display: flex; flex-direction: column; }
.tl-i { position: relative; display: flex; gap: 12px; padding-bottom: 16px; }
.tl-i:last-child { padding-bottom: 0; }
.tl-i:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 38px; bottom: 0; width: 2px; background: var(--line); }
.tl-i .ic { width: 36px; height: 36px; }
.tl-i .ic svg { width: 18px; height: 18px; }
.tl-b { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 2px; }
.tl-t { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; font-weight: 600; }
.tl-t time { font-size: 12px; color: var(--muted2); font-family: var(--mono); font-weight: 500; white-space: nowrap; }
.tl-d { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }

/* статистика */
.stat { background: var(--surf); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; text-align: left; color: #fff; }
.stat b { font-size: 30px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }
.stat .lab { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted2); }
.mini { display: flex; flex-direction: column; gap: 2px; }
.mini span { font-size: 12px; color: var(--ink2); }
.mini b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }

.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--surf2); color: var(--violet-l); font-size: 13px; font-weight: 600; display: grid; place-items: center; flex: none; text-transform: uppercase; }
.avatar.big { width: 64px; height: 64px; font-size: 20px; background: var(--grad); color: #fff; }
.divider { height: 1px; background: linear-gradient(90deg, rgba(90,69,224,0), var(--violet), rgba(34,181,160,.6), rgba(90,69,224,0)); }
.addr { display: flex; gap: 10px; align-items: center; }
.addr code { flex: 1; font-family: var(--mono); font-size: 13px; word-break: break-all; line-height: 1.5; }
.copy { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--violet); display: grid; place-items: center; flex: none; color: #fff; }
.progress-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.progress-steps div { display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: var(--muted2); }
.progress-steps i { height: 4px; border-radius: 4px; background: var(--surf2); }
.progress-steps .on { color: #fff; }
.progress-steps .on i { background: var(--grad); }
.empty { padding: 24px 0; text-align: center; color: var(--muted2); font-size: 14px; }
.skeleton { height: 68px; border-radius: 20px; background: linear-gradient(90deg, var(--surf), var(--surf2), var(--surf)); background-size: 200% 100%; animation: sk 1.2s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* нижнее меню */
#tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-top: 1px solid var(--line); background: rgba(7,5,19,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 0 8px calc(8px + var(--safe-b)); }
#tabs button { position: relative; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 500; color: var(--muted2); background: none; border: 0; }
#tabs button.on { color: var(--violet2); font-weight: 600; }
#tabs button.on::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--grad); }
#tabs svg { width: 22px; height: 22px; }

#toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + var(--safe-b) + 16px); transform: translateX(-50%); z-index: 10; background: #fff; color: var(--ink); padding: 12px 18px; border-radius: 30px; font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.4); max-width: calc(100% - 40px); text-align: center; }
