/* auth-core.css v1 — стили карточки авторизации (v5 Graphite Amber).
   Хосты: модалка landing.html, /login, /register. Правка = бамп ?v= везде,
   где подключён auth-core (grep "auth-core.css?v="). Палитра — переменные
   :root страницы-хоста (--bg, --surface, --line, --text, --muted, --dim, --amber). */

.auth-card { padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.auth-card [hidden] { display: none !important; }
.auth-kicker { display: flex; justify-content: space-between; gap: 12px; color: var(--amber); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.auth-kicker span:last-child { color: var(--dim); }
.auth-card h3 { margin: 24px 0 8px; font-size: 26px; letter-spacing: -.03em; }
.auth-card .auth-lead { margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.field { display: block; margin-top: 12px; }
.field span { display: block; margin-bottom: 6px; color: var(--dim); font-size: 10px; }
.field input { width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; outline: 0; color: var(--text); background: #0f1115; font: inherit; }
.field input:focus { border-color: rgba(242, 169, 59, .55); box-shadow: 0 0 0 3px rgba(242, 169, 59, .07); }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 4px; color: var(--dim); font-size: 11px; }
.auth-submit { width: 100%; height: 48px; margin-top: 12px; border: 1px solid var(--amber); border-radius: 999px; color: #171207; background: var(--amber); font: inherit; font-weight: 650; cursor: pointer; }
.auth-submit:hover { background: #ffbd55; }
.auth-submit:disabled { border-color: var(--line); color: var(--dim); background: #15171c; cursor: not-allowed; }
.tg-auth { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; height: 48px; margin-top: 12px; border: 1px solid rgba(45, 164, 224, .5); border-radius: 999px; color: #f5fbff; background: linear-gradient(135deg, #249bd8, #1785c1); font: inherit; font-weight: 640; cursor: pointer; text-decoration: none; }
.tg-auth:hover { filter: brightness(1.08); }
.tg-auth:disabled { opacity: .55; cursor: wait; }
.tg-auth svg { width: 18px; height: 18px; flex: 0 0 auto; }
.auth-divider { display: flex; align-items: center; gap: 11px; margin: 16px 0 4px; color: var(--dim); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-steps { display: flex; align-items: center; gap: 8px; margin: 18px 0 4px; }
.auth-step { display: flex; align-items: center; gap: 7px; color: var(--dim); font-size: 9px; }
.auth-step i { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font-style: normal; }
.auth-step.active { color: var(--text); }
.auth-step.active i { border-color: rgba(45, 164, 224, .6); color: #e8f8ff; background: rgba(45, 164, 224, .12); }
.auth-step-line { flex: 1; height: 1px; background: var(--line); }
.auth-tg-note { margin: 12px 0 0; color: var(--dim); text-align: center; font-size: 9px; line-height: 1.45; }
.auth-switch { margin-top: 16px; color: var(--dim); text-align: center; font-size: 11px; }
.auth-switch button { padding: 0; border: 0; color: var(--text); background: transparent; font: inherit; font-size: 11px; cursor: pointer; }
.auth-switch button:hover { color: var(--amber); }

/* служебные элементы флоу */
.ac-err { min-height: 16px; margin-top: 10px; color: #ff6b7f; font-size: 12px; line-height: 1.4; }
.ac-err:empty { min-height: 0; margin: 0; }
.ac-ok { color: #31d18b; font-size: 12px; line-height: 1.4; margin-top: 6px; }
.ac-ok:empty { margin: 0; }
.ac-link { padding: 0; border: 0; color: var(--amber); background: transparent; font: inherit; font-size: inherit; cursor: pointer; }
.ac-link:hover { text-decoration: underline; }
.ac-back { display: block; margin: 14px auto 0; font-size: 11px; color: var(--muted); }
.ac-tag { margin-top: 8px; color: #31d18b; font-size: 11px; }
.ac-tg-panel { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #0f1115; }
.ac-tg-head { display: flex; justify-content: space-between; gap: 12px; color: var(--dim); font-size: 11px; }
.ac-tg-head b { color: var(--text); letter-spacing: .08em; }
.ac-qr { display: grid; place-items: center; width: 132px; margin: 14px auto 2px; padding: 8px; border-radius: 10px; background: #fff; }
.ac-qr svg { display: block; width: 116px; height: 116px; }
.ac-qr-fail { color: #333; font-size: 11px; }
.ac-status { margin-top: 12px; text-align: center; font-size: 12px; color: var(--muted); }
.ac-status.ok { color: #31d18b; }
.ac-status.expired { color: #ff6b7f; }
.ac-spin { display: inline-block; width: 12px; height: 12px; margin-right: 7px; vertical-align: -2px; border: 2px solid var(--line); border-top-color: var(--amber); border-radius: 50%; animation: ac-spin .8s linear infinite; }
@keyframes ac-spin { to { transform: rotate(360deg); } }

/* модалка (хост: landing.html) */
.auth-modal { position: fixed; z-index: 120; inset: 0; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(5, 6, 8, .85); backdrop-filter: blur(18px); }
.auth-modal.open { display: flex; }
.auth-dialog { position: relative; width: min(430px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; }
.auth-close { position: absolute; z-index: 4; right: 14px; top: 14px; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; color: var(--text); background: #191c21; font-size: 15px; cursor: pointer; }
.auth-close:hover { border-color: rgba(242, 169, 59, .4); }

@media (max-width: 480px) {
  .auth-card { padding: 22px 18px; }
  .auth-modal { padding: 12px; align-items: flex-start; }
  .auth-dialog { max-height: calc(100dvh - 24px); }
  .auth-close { width: 44px; height: 44px; right: 8px; top: 8px; } /* тач-цель ≥44px */
}
