/* Вход, регистрация и восстановление доступа в стиле SPA GEO (те же цвета, шрифт и фон, что в кабинете). Область действия: body.spa-auth */
body.spa-auth {
  --spa-bg: #f6f8fd;
  --spa-panel: #ffffff;
  --spa-ink: #0f172a;
  --spa-muted: #8a94a8;
  --spa-line: #e7ebf3;
  --spa-accent: #2563eb;
  --spa-accent-2: #1d4ed8;
  --spa-accent-soft: #eaf1ff;
  --spa-ok: #16a36a;
  --spa-ok-bg: #e6f7ef;
  --spa-err: #e03a3a;
  --spa-err-bg: #fdeaea;
  --spa-shadow: 0 6px 24px rgba(30, 64, 175, 0.07), 0 1px 2px rgba(15, 23, 42, 0.04);
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--spa-ink);
  background: var(--spa-bg);
  -webkit-font-smoothing: antialiased;
}
body.spa-auth *, body.spa-auth *::before, body.spa-auth *::after { box-sizing: border-box; }
body.spa-auth :focus-visible { outline: 2px solid var(--spa-accent); outline-offset: 2px; }
/* те же размытые пятна на фоне, что и в кабинете */
body.spa-auth::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    url("/icons/spa-decor-blob-bl.svg") left bottom / min(620px, 70vw) auto no-repeat,
    url("/icons/spa-decor-blob-top.svg") right 16vw top / min(480px, 60vw) auto no-repeat,
    url("/icons/spa-decor-blob-br.svg") right bottom / min(560px, 70vw) auto no-repeat;
}

.auth-shell { position: relative; z-index: 1; width: min(100%, 440px); display: grid; gap: 28px; }

.auth-logo { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--spa-accent); text-decoration: none; }
.auth-logo-text { font-size: 1.6rem; letter-spacing: 0.02em; line-height: 1; white-space: nowrap; }
.auth-logo-text b { font-weight: 800; }
.auth-logo-text span { font-weight: 500; letter-spacing: 0.18em; font-size: 1.15rem; color: #4a5a85; }

.auth-card { padding: 32px; border-radius: 18px; background: var(--spa-panel); box-shadow: var(--spa-shadow); }
.auth-title { margin: 0; font-size: 1.6rem; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }
.auth-lead { margin: 8px 0 0; color: var(--spa-muted); font-size: 0.95rem; }

.auth-form { display: grid; gap: 16px; margin-top: 24px; }
.auth-field label { display: block; margin: 0 0 6px; font-size: 0.86rem; font-weight: 500; color: #3b4660; }
.auth-field input {
  width: 100%; height: 48px; padding: 0 14px; font: inherit; font-size: 0.95rem; color: var(--spa-ink);
  background: #fff; border: 1px solid var(--spa-line); border-radius: 12px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-field input::placeholder { color: var(--spa-muted); }
.auth-field input:focus { border-color: #9db8f5; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); }

.auth-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 50px; margin-top: 4px; padding: 0 24px;
  border: 0; border-radius: 12px; cursor: pointer; font: inherit; font-size: 1rem; font-weight: 600; color: #fff;
  background: linear-gradient(180deg, #3a78f5, var(--spa-accent-2));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.auth-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(37, 99, 235, 0.34); filter: brightness(1.04); }
.auth-btn:active { transform: translateY(0); }
.auth-btn:disabled { opacity: 0.6; cursor: default; transform: none; }

/* статус: скрипты страниц ставят классы .ok / .error */
.status { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; font-size: 0.9rem; background: var(--spa-accent-soft); color: #1e3a8a; }
.status:empty { display: none; }
.status.ok { background: var(--spa-ok-bg); color: #0f5132; }
.status.error { background: var(--spa-err-bg); color: var(--spa-err); }

.auth-links { margin: 20px 0 0; padding-top: 18px; border-top: 1px solid var(--spa-line); text-align: center; color: var(--spa-muted); font-size: 0.92rem; }
.auth-links a { color: var(--spa-accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.auth-links a:hover { color: var(--spa-accent-2); text-decoration: underline; }
.auth-links .sep { margin: 0 8px; }

@media (max-width: 480px) {
  .auth-card { padding: 24px 20px; }
  .auth-title { font-size: 1.4rem; }
}

/* Регистрация: необязательные поля, промокод, согласие */
.auth-field .auth-optional { font-weight: 400; color: var(--spa-muted); }
.auth-hint { margin: 6px 0 0; font-size: 0.82rem; color: var(--spa-muted); }
.auth-hint:empty { display: none; }
.auth-hint.ok { color: var(--spa-ok); }
.auth-hint.error { color: var(--spa-err); }
.auth-check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.86rem; line-height: 1.45; color: #3b4660; cursor: pointer; }
.auth-check input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--spa-accent); }
.auth-check a { color: var(--spa-accent); }
.auth-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.auth-promo-banner { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--spa-ok-bg); color: #0f5132; font-size: 0.9rem; }
.auth-promo-banner:empty { display: none; }
.auth-link-btn { margin-top: 10px; padding: 0; border: 0; background: none; font: inherit; font-size: 0.9rem; font-weight: 600; color: var(--spa-accent); cursor: pointer; }
.auth-link-btn:hover { text-decoration: underline; }
.auth-link-btn[hidden] { display: none; }
.auth-more > summary {
  display: inline-flex; align-items: center; gap: 6px; list-style: none; cursor: pointer;
  font-size: 0.88rem; font-weight: 600; color: var(--spa-accent); user-select: none;
}
.auth-more > summary::-webkit-details-marker { display: none; }
.auth-more > summary::after {
  content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform 0.15s ease;
}
.auth-more[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.auth-more > .auth-field { margin-top: 12px; }

.auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.auth-forgot { color: var(--spa-accent); font-size: 0.86rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.auth-forgot:hover { color: var(--spa-accent-2); text-decoration: underline; }
