/* Topka ID — страницы входа. Палитра и шрифт — как на сайте TopkaAI. */

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/geist-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/geist-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}

:root {
  color-scheme: dark;
  --ink: #f4f4f6;
  --ink-2: #b4b4be;
  --ink-3: #7a7a86;
  --accent: #53a9ff;
  --accent-hi: #6fb7ff;
  --on-accent: #0c1e30;
  --line: rgba(255, 255, 255, .075);
  --tile: rgba(255, 255, 255, .03);
  --tg-hi: #43c7ff;
  --tg-lo: #2097d5;
  --vk-hi: #5ea9ff;
  --vk-lo: #0077ff;
  --ok: #c5ff59;
  --bad: #ff5959;
  --spring: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  background: radial-gradient(120% 90% at 50% -10%, #0a1a2c 0%, #0b0b0b 58%) fixed, #0b0b0b;
  color: var(--ink);
  font: 15px/1.45 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.glow {
  position: fixed;
  left: 50%;
  top: -18vh;
  width: min(900px, 140vw);
  height: 55vh;
  translate: -50% 0;
  background: radial-gradient(50% 50% at 50% 50%, rgba(83, 169, 255, .2), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}

.shell {
  position: relative;
  width: min(460px, 100%);
  display: grid;
  gap: 18px;
}
.shell--wide { width: min(640px, 100%); }

.brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  font-size: 17px;
  letter-spacing: .01em;
}
.brand img { filter: drop-shadow(0 0 14px rgba(83, 169, 255, .55)); }

.card {
  display: grid;
  gap: 16px;
  padding: 28px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: rise .5s var(--spring);
}
@media (max-width: 420px) { .card { padding: 22px 18px; border-radius: 20px; } }

.eyebrow {
  margin: 0;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .09em;
}

.title {
  margin: -10px 0 0;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
  background: linear-gradient(180deg, #f4f4f6, #c6c6c6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead { margin: 0; color: var(--ink-2); }
.grants, .fine { margin: 0; font-size: 13px; color: var(--ink-3); text-align: center; }
.fine { margin-top: -8px; }
.foot { margin: 0; text-align: center; font-size: 12.5px; color: var(--ink-3); }
.foot a { color: var(--ink-2); white-space: nowrap; }

.providers { display: grid; gap: 10px; margin-top: 2px; }

/* ── кнопки ─────────────────────────────────────────────────────────────── */

.btn {
  appearance: none;
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 2px 12px rgba(255, 255, 255, .2);
  transition: transform .15s var(--spring), filter .15s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.985); }
.btn:focus-visible, .link:focus-visible, .chip:focus-visible, .back:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: grayscale(.5); }
.btn__ico { width: 18px; height: 18px; flex: none; filter: brightness(0) invert(1); }

.btn--telegram { background: linear-gradient(180deg, var(--tg-hi), var(--tg-lo)); box-shadow: inset 0 2px 12px rgba(255, 255, 255, .2), 0 10px 30px rgba(32, 151, 213, .25); }
.btn--vk { background: linear-gradient(180deg, var(--vk-hi), var(--vk-lo)); box-shadow: inset 0 2px 12px rgba(255, 255, 255, .2), 0 10px 30px rgba(0, 119, 255, .22); }
.btn--primary {
  background: linear-gradient(180deg, var(--accent-hi), var(--accent));
  color: var(--on-accent);
  box-shadow: inset 0 3px 16px rgba(255, 255, 255, .17), 0 0 33px rgba(83, 169, 255, .2);
}
.btn--ghost-danger {
  min-height: 46px;
  font-size: 14px;
  background: transparent;
  color: #ffb3b3;
  border: 1px solid rgba(255, 89, 89, .3);
  box-shadow: none;
}

.link {
  appearance: none;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  color: var(--accent-hi);
  text-decoration: none;
  cursor: pointer;
  justify-self: start;
}
.link:hover { text-decoration: underline; }
.link--center { justify-self: center; }
.link--qr { display: none; }

.back {
  appearance: none;
  justify-self: start;
  margin: -6px 0 -6px -8px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  font: inherit;
  font-size: 14px;
  color: var(--ink-3);
  cursor: pointer;
}
.back:hover { color: var(--ink); background: var(--tile); }

.chip {
  appearance: none;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  font: inherit;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover { color: var(--ink); border-color: rgba(255, 255, 255, .16); }
.chip--danger:hover { color: #ffb3b3; border-color: rgba(255, 89, 89, .4); }

/* ── Telegram ───────────────────────────────────────────────────────────── */

.tg { display: grid; grid-template-columns: 176px 1fr; gap: 20px; align-items: center; }
.tg__side { display: grid; gap: 12px; min-width: 0; }
.tg__side .btn { min-height: 48px; padding: 0 14px; font-size: 15px; white-space: nowrap; }

.qr { margin: 0; display: grid; gap: 8px; justify-items: center; }
.qr__svg {
  width: 176px;
  height: 176px;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 12px 40px rgba(83, 169, 255, .18);
}
.qr__svg path { fill: #0b0b0b; }
.qr figcaption { font-size: 12px; color: var(--ink-3); text-align: center; }

.steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--ink-2); font-size: 14px; }
.steps b { color: var(--ink); font-weight: 600; }

@media (max-width: 520px), (pointer: coarse) {
  .tg { grid-template-columns: 1fr; }
  .qr { display: none; }
  .qr.is-open { display: grid; }
  .link--qr { display: inline; }
  .steps { display: none; }
}


.status { margin: 0; min-height: 22px; display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.status[data-tone="ok"] { color: var(--ok); }
.status[data-tone="bad"] { color: #ffb3b3; }
.status[data-tone] .spinner { display: none; }
.spinner {
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .14);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
.hint { margin: -8px 0 0; font-size: 12px; color: var(--ink-3); min-height: 16px; }

/* ── аккаунт ────────────────────────────────────────────────────────────── */

.who {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--tile);
}
.who--head { padding: 0; border: 0; background: none; }
.who__text { min-width: 0; }
.who__name { margin: 0; font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.who__via { margin: 2px 0 0; font-size: 13px; color: var(--ink-3); }

.ava {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--accent-hi), #4a8fd5);
  color: var(--on-accent);
  font-weight: 700;
}
.ava--lg { width: 56px; height: 56px; font-size: 22px; }
.ava img { width: 100%; height: 100%; object-fit: cover; display: block; }

.note { display: grid; gap: 10px; padding: 14px; border-radius: 14px; border: 1px dashed rgba(255, 255, 255, .12); color: var(--ink-2); font-size: 14px; }
.note p { margin: 0; }

.alert { margin: 0; padding: 12px 14px; border-radius: 12px; font-size: 14px; background: rgba(255, 89, 89, .08); border: 1px solid rgba(255, 89, 89, .25); color: #ffc2c2; }
.alert--ok { background: rgba(197, 255, 89, .06); border-color: rgba(197, 255, 89, .22); color: #e2ffb3; }

.h2 { margin: 8px 0 -6px; font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .025);
}
.row--empty { color: var(--ink-3); justify-content: center; font-size: 14px; }
.row__ico {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
}
.row__ico img { filter: brightness(0) invert(1); }
.row__ico--telegram { background: linear-gradient(180deg, var(--tg-hi), var(--tg-lo)); }
.row__ico--vk { background: linear-gradient(180deg, var(--vk-hi), var(--vk-lo)); }
.row__text { flex: 1; min-width: 0; }
.row__text p { margin: 0; font-weight: 550; }
.row__text small { display: block; font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.row .btn { width: auto; min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
@media (max-width: 480px) {
  .row { flex-wrap: wrap; }
  .row__actions, .row > form, .row > .btn { width: 100%; justify-content: flex-start; }
}

.tag {
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(83, 169, 255, .12);
  color: var(--accent-hi);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  vertical-align: 1px;
}

code { font-family: ui-monospace, 'SF Mono', Consolas, monospace; font-size: 12.5px; color: var(--ink-2); }
form { margin: 0; }
.danger-zone { margin-top: 4px; }

.badge { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; font-size: 20px; font-weight: 800; }
.badge--bad { background: rgba(255, 89, 89, .12); color: var(--bad); }
.badge--ok { background: rgba(197, 255, 89, .1); color: var(--ok); }

@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.99); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
