/* Страница входа /login — без React и сборки; токены — из src/ui/tokens.css (значения продублированы: страница самостоятельна). */
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('/fonts/inter-cyrillic-400-normal.woff2') format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('/fonts/inter-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('/fonts/inter-cyrillic-500-normal.woff2') format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('/fonts/inter-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('/fonts/inter-cyrillic-600-normal.woff2') format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('/fonts/inter-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --ink: #17150f;
  --text-2: #4a463f;
  --text-3: #6e6a62;
  --line-strong: #e0ddd6;
  --line: #e9e7e2;
  --track: #f3f2ee;
  --paper: #faf9f6;
  --surface: #ffffff;
  --select: #1f6feb;
  --error: #c62828;
  --error-tint: #fdeeee;
  --ink-hover: #2e2a22;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.45;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px 16px;
  -webkit-text-size-adjust: 100%;
}

.card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 28px 24px;
  box-shadow: 0 1px 2px rgba(23, 21, 15, 0.04), 0 8px 24px rgba(23, 21, 15, 0.05);
}

.logo { display: block; height: 22px; width: auto; color: var(--ink); margin-bottom: 20px; }
h1 { margin: 0 0 4px; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.lead { margin: 0 0 20px; color: var(--text-3); font-size: 13px; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 42px; padding: 0 16px;
  border-radius: 8px; border: 1px solid transparent;
  font: inherit; font-weight: 500; font-size: 14px; cursor: pointer; text-decoration: none;
  transition: background 0.12s, border-color 0.12s;
}
.btn:focus-visible, .input:focus-visible, .link:focus-visible { outline: 2px solid var(--select); outline-offset: 2px; }
.btn[disabled] { opacity: 0.55; cursor: default; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover:not([disabled]) { background: var(--ink-hover); }
.btn-google { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-google:hover { background: var(--paper); }
.btn svg { width: 18px; height: 18px; flex: none; }

.sep { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--text-3); font-size: 12px; }
.sep::before, .sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }

label { display: block; margin: 0 0 6px; font-size: 12px; font-weight: 500; color: var(--text-2); }
.input {
  display: block; width: 100%; height: 42px; padding: 0 12px; margin-bottom: 12px;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface);
  font: inherit; font-size: 16px; /* 16px — иначе iOS Safari увеличивает страницу при фокусе */ color: var(--ink);
}
.input.code { font-size: 24px; letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums; padding-left: 0.4em; }

.err { margin: 0 0 12px; padding: 9px 12px; border-radius: 8px; background: var(--error-tint); color: var(--error); font-size: 13px; }
.note { margin: 0 0 12px; color: var(--text-2); font-size: 13px; }
.row { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 13px; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.link[disabled] { color: var(--text-3); text-decoration: none; cursor: default; }
.foot { margin: 18px 0 0; color: var(--text-3); font-size: 12px; }
[hidden] { display: none !important; }

@media (max-width: 480px) {
  body { align-items: flex-start; padding-top: 32px; }
  .card { padding: 22px 18px 20px; border-radius: 12px; }
}

.inv { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; background: var(--paper); }
.inv p { margin: 0 0 4px; font-size: 14px; }
.inv .sub { color: var(--text-3); font-size: 12px; margin-bottom: 10px; }
.inv .acts { display: flex; gap: 8px; }
.inv .acts .btn { height: 36px; font-size: 13px; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover:not([disabled]) { background: var(--paper); }
#inv-stay { margin-top: 4px; }
