/* Стрелка — кабинет клиента. Тот же язык, что у пульта. */
:root {
  --bg: #F4F4F1; --s1: #FFFFFF; --s2: #ECECE7; --s3: #E2E2DC;
  --line: rgba(14, 16, 17, .08); --line-2: rgba(14, 16, 17, .15);
  --ink: #111416; --ink-2: #4D555B; --ink-3: #868D92;
  --go: #8DB816; --go-ink: #4C6505; --warn: #D6950F; --stop: #DD4A36;
  --focus: #4C6505; --sel: rgba(141, 184, 22, .16);
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110; --s1: #191715; --s2: #201E1B; --s3: #2A2724; /* тот же тёплый тёмный, что у пульта */
    --line: rgba(232, 236, 238, .08); --line-2: rgba(232, 236, 238, .14);
    --ink: #E8ECEE; --ink-2: #A0A8AE; --ink-3: #697278;
    --go: #C6F432; --go-ink: #C6F432; --warn: #F2B544; --stop: #F25F4C;
    --focus: #C6F432; --sel: rgba(198, 244, 50, .1);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; scrollbar-width: none !important; }
*::-webkit-scrollbar { width: 0; height: 0; display: none; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0; min-height: 100%; background: var(--bg); color: var(--ink);
  font: 400 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
h1, h2 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 13px; font-weight: 500; color: var(--ink-3); text-transform: uppercase; letter-spacing: .02em; }
p { margin: 0; }
code, .mono { font-family: var(--mono); }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--sel); }
.hint { color: var(--ink-3); font-size: 13px; }
.err { color: var(--stop); font-size: 13px; min-height: 1.2em; }

.bar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; height: 56px;
  padding: 0 max(16px, calc((100vw - 920px) / 2)); background: var(--bg); border-bottom: 1px solid var(--line);
}
.mark { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.mark svg { width: 26px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mark svg circle { fill: var(--go); stroke: none; }
.mark em { font-style: normal; color: var(--ink-3); font-size: 13px; }
.bar-tools { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.who { color: var(--ink-3); font-size: 13px; }
.link { border: 0; background: none; cursor: pointer; color: var(--ink-2); padding: 0; font-size: 13px; }
.link:hover { color: var(--ink); }

main { max-width: 920px; margin: 0 auto; padding: 32px 16px; display: grid; gap: 16px; }

/* ---------- вход: сцена со следами трафика + форма ---------- */
.login {
  position: fixed; inset: 0; z-index: 30; overflow-y: auto;
  display: grid; place-items: center; padding: 20px;
  background: radial-gradient(900px 600px at 70% -10%, rgba(198, 244, 50, .07), transparent 60%), #050607;
  color: #E8ECEE; color-scheme: dark;
  --l-ink: #E8ECEE; --l-ink-2: #A0A8AE; --l-ink-3: #697278;
  --l-line: rgba(232, 236, 238, .1); --l-field: #0F1112; --lime: #C6F432;
}
.auth-shell {
  width: 100%; max-width: 1120px; min-height: min(720px, calc(100dvh - 40px));
  display: grid; grid-template-columns: 1.08fr 1fr; gap: 12px;
  background: #0B0C0D; border: 1px solid var(--l-line); border-radius: 28px; padding: 12px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6);
  animation: shellIn .6s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes shellIn { from { opacity: 0; transform: translateY(12px) scale(.99); } }

.scene {
  position: relative; overflow: hidden; border-radius: 20px; min-height: 260px;
  background: #07090A; isolation: isolate;
}
.scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.scene::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 6, 7, .35) 0%, transparent 28%, transparent 45%, rgba(5, 6, 7, .88) 100%);
}
.scene-top { position: absolute; top: 26px; left: 28px; display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.scene-top svg, .auth-mark svg { width: 28px; height: 20px; fill: none; stroke: var(--l-ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.scene-top svg circle { fill: var(--lime); stroke: none; }
.scene-bottom { position: absolute; left: 28px; right: 28px; bottom: 28px; display: grid; gap: 14px; }
.pill {
  justify-self: start; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px; font-size: 12.5px; color: var(--l-ink);
  background: rgba(232, 236, 238, .08); border: 1px solid rgba(232, 236, 238, .12);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.scene-title { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.04; letter-spacing: -.03em; font-weight: 600; color: var(--l-ink); text-transform: none; }
.scene-sub { color: var(--l-ink-2); font-size: 14.5px; }
.steps { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.steps li {
  display: grid; gap: 22px; padding: 14px; border-radius: 14px; min-height: 104px; align-content: space-between;
  background: rgba(232, 236, 238, .05); border: 1px solid rgba(232, 236, 238, .08);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--l-ink-2); font-size: 13px; line-height: 1.3;
}
.steps b { font: 500 12px var(--mono); color: var(--l-ink-3); }
.steps li.on { background: var(--lime); border-color: var(--lime); color: #0B0C0D; }
.steps li.on b { color: rgba(11, 12, 13, .55); }

.auth-pane { display: grid; place-items: center; padding: 40px 24px; }
.auth-form { width: 100%; max-width: 380px; display: grid; gap: 16px; }
.auth-head { display: grid; gap: 8px; margin-bottom: 10px; }
.auth-head h1 { font-size: 32px; letter-spacing: -.03em; color: var(--l-ink); }
.auth-head p { color: var(--l-ink-2); font-size: 14.5px; }

.field { display: grid; gap: 7px; }
.field > span:first-child { font-size: 13px; color: var(--l-ink-2); }
.field-hint { color: var(--l-ink-3); font-size: 12px; }
.login input {
  min-height: 50px; padding: 12px 15px; border-radius: 14px; font-size: 15px;
  background: var(--l-field); border: 1px solid var(--l-line); color: var(--l-ink);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.login input::placeholder { color: #4A5257; }
.login input:hover { border-color: rgba(232, 236, 238, .18); }
.login input:focus { border-color: var(--lime); box-shadow: 0 0 0 4px rgba(198, 244, 50, .12); background: #111314; }
.login input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px var(--l-field) inset; -webkit-text-fill-color: var(--l-ink); caret-color: var(--l-ink); }
.pass { position: relative; display: block; }
.pass input { padding-right: 52px; }
.eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px;
  background: none; color: var(--l-ink-3); cursor: pointer; transition: color .15s, background .15s;
}
.eye:hover { color: var(--l-ink); background: rgba(232, 236, 238, .06); }
.eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.eye[aria-pressed="true"] .slash { display: none; }

.btn-go {
  margin-top: 4px; min-height: 52px; border: 0; border-radius: 999px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--lime); color: #0B0C0D; font-weight: 600; font-size: 15px;
  box-shadow: 0 10px 34px rgba(198, 244, 50, .22);
  transition: transform .15s cubic-bezier(.2, .8, .2, 1), box-shadow .2s, filter .15s;
}
.btn-go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.btn-go:hover { filter: brightness(1.04); box-shadow: 0 14px 40px rgba(198, 244, 50, .3); }
.btn-go:hover svg { transform: translateX(3px); }
.btn-go:active { transform: scale(.98); }
.btn-go[disabled] { opacity: .6; cursor: progress; }
.login .err { color: #F25F4C; margin-top: -6px; }
.login .err:empty { display: none; }

.divider { display: flex; align-items: center; gap: 12px; color: var(--l-ink-3); font-size: 12.5px; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--l-line); }
/* color-scheme: light — иначе iframe кнопки Google на тёмной странице получает белую подложку */
.google-btn { display: flex; justify-content: center; min-height: 44px; color-scheme: light; }
.switch { text-align: center; color: var(--l-ink-2); font-size: 14px; margin-top: 4px; }
.link-go, .link-legal { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; }
.link-go { color: var(--lime); font-weight: 500; }
.link-go:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-legal { text-align: center; font-size: 12px; color: var(--l-ink-3); }
.link-legal { color: var(--l-ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(232, 236, 238, .25); }
.link-legal:hover { color: var(--l-ink); }

@media (max-width: 900px) {
  .login { padding: 0; place-items: stretch; }
  .auth-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; border-radius: 0; border: 0; min-height: 100dvh; padding: 10px; }
  .scene { min-height: 220px; }
  .scene-sub, .steps { display: none; }
  .scene-top { top: 18px; left: 20px; }
  .scene-bottom { left: 20px; right: 20px; bottom: 20px; gap: 10px; }
  .scene-title { font-size: 28px; }
  .auth-pane { place-items: start center; padding: 28px 10px 32px; }
  .auth-head h1 { font-size: 28px; }
}

/* ---------- модалка: политика конфиденциальности ---------- */
.sheet {
  width: min(640px, calc(100vw - 32px)); max-height: min(80dvh, 760px); padding: 0;
  border: 1px solid rgba(232, 236, 238, .1); border-radius: 22px;
  background: #0B0C0D; color: #E8ECEE; color-scheme: dark;
  box-shadow: 0 40px 120px rgba(0, 0, 0, .7);
  display: none; flex-direction: column; overflow: hidden;
}
.sheet[open] { display: flex; animation: sheetIn .28s cubic-bezier(.2, .8, .2, 1); }
.sheet::backdrop { background: rgba(3, 4, 5, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .2s ease; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes fadeIn { from { opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px 24px; border-bottom: 1px solid rgba(232, 236, 238, .08); }
.sheet-head h2 { flex: 1; font-size: 17px; color: #E8ECEE; text-transform: none; letter-spacing: -.01em; font-weight: 600; }
.lang { display: inline-flex; padding: 3px; border-radius: 999px; background: #131516; }
.lang button { border: 0; background: none; color: #8A949B; font: 500 12px var(--mono); padding: 5px 10px; border-radius: 999px; cursor: pointer; }
.lang button.on { background: #24282A; color: #E8ECEE; }
.sheet-x { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #131516; color: #A0A8AE; cursor: pointer; }
.sheet-x:hover { color: #E8ECEE; background: #1C1F21; }
.sheet-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.sheet-body { overflow-y: auto; padding: 8px 24px 26px; display: grid; gap: 10px; }
.sheet-body h3 { margin: 16px 0 0; font-size: 14.5px; font-weight: 600; }
.sheet-body p { color: #A0A8AE; line-height: 1.65; font-size: 14px; }
.sheet-body .hint { color: #697278; font-size: 12.5px; }
.sheet-body a { color: #C6F432; }
@media (max-width: 640px) {
  .sheet { width: 100vw; max-width: 100vw; max-height: 88dvh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  @keyframes sheetIn { from { transform: translateY(100%); } }
}
@media (prefers-reduced-motion: reduce) {
  .auth-shell, .sheet[open], .sheet::backdrop { animation: none; }
}

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.seg label { display: flex; }
.seg input { position: absolute; opacity: 0; }
.seg span { padding: 7px 14px; cursor: pointer; color: var(--ink-2); font-size: 13px; }
.seg input:checked + span { background: var(--sel); color: var(--ink); font-weight: 500; }
input { border: 1px solid var(--line-2); background: var(--s1); border-radius: 8px; padding: 9px 11px; min-height: 38px; width: 100%; }
input:focus { border-color: var(--focus); box-shadow: 0 0 0 3px var(--sel); outline: none; }

.btn {
  border: 1px solid var(--line-2); background: var(--s1); border-radius: 8px; padding: 9px 16px;
  cursor: pointer; color: var(--ink); font-weight: 500; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--go); border-color: var(--go); color: #111416; }
.btn.primary:hover { filter: brightness(.96); }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; gap: 12px; }
.big { font: 500 40px/1 var(--mono); letter-spacing: -.02em; }
.big .cur { font-size: 20px; color: var(--ink-3); margin-left: 6px; }
.limits { display: grid; gap: 8px; }
.limits .row { display: flex; justify-content: space-between; gap: 12px; }
.limits .k { color: var(--ink-2); }
.limits .v { font-family: var(--mono); }

.amounts { display: flex; flex-wrap: wrap; gap: 8px; }
.amounts button { min-width: 64px; }
.amounts button.on { background: var(--sel); border-color: var(--focus); }
.row { display: flex; gap: 10px; }
.row input { flex: 1; max-width: 180px; font-family: var(--mono); }
.pay-box { display: flex; gap: 10px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 8px 10px; border-top: 1px solid var(--line); }
thead th { color: var(--ink-3); font-weight: 500; font-size: 12px; }
td.num, th.num { text-align: right; font-family: var(--mono); }
.empty { color: var(--ink-3); padding: 18px 10px; }
.st { font-family: var(--mono); font-size: 12.5px; }
.st.pending { color: var(--warn); }
.st.paid { color: var(--go-ink); }
.pos { color: var(--go-ink); }
.neg { color: var(--stop); }

@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .row { flex-direction: column; }
  .row input { max-width: none; }
}

/* Страница политики конфиденциальности */
.legal { max-width: 680px; gap: 40px; }
.legal article { display: grid; gap: 10px; }
.legal article + article { padding-top: 32px; border-top: 1px solid var(--line); }
.legal h3 { margin: 14px 0 0; font-size: 15px; font-weight: 600; }
.legal p { color: var(--ink-2); line-height: 1.6; }
.legal a { color: var(--go-ink); }
.legal ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); line-height: 1.6; }
.legal b { color: var(--ink); font-weight: 500; }
.legal-nav { gap: 18px; }
.legal-nav a { color: var(--ink-3); text-decoration: none; font-size: 13px; }
.legal-nav a:hover, .legal-nav a[aria-current] { color: var(--ink); }
.legal-nav .lang { display: inline-block; font-family: var(--mono); font-size: 12px; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--ink-2); }
.legal-nav .lang:hover { color: var(--ink); border-color: var(--ink-3); }
/* Шапка документов — по той же линии, что и текст. */
body:has(> main.legal) .bar { padding-inline: max(16px, calc((100vw - 680px) / 2 + 16px)); }
@media (max-width: 520px) { .legal-nav { gap: 12px; } }
