/* =====================================================================
   Страницы входа: layouts/auth (UI-аудит 07.10.2026).
   Только токены кабинета (application.css) — никаких своих цветов.
   ===================================================================== */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 32px;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.auth-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: var(--text);
}

.auth-sub {
  margin: 0 0 24px;
  font-size: 14px;
  text-align: center;
  color: var(--muted);
}

.auth-field { margin-bottom: 16px; }

.auth-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field input[type="text"] {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

.auth-field input::placeholder { color: var(--muted2); }

.auth-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* «Запомнить меня» слева, «Забыли пароль?» справа. */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 13px;
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.auth-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.auth-check label { margin: 0; font-weight: 400; }

/* Галочка оферты на регистрации: текст в две строки, флажок у первой. */
.auth-check--offer {
  align-items: flex-start;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.45;
}
.auth-check--offer input { flex: none; margin-top: 1px; }

/* Страница оферты: длинный документ в каркасе входа. */
.auth-card--doc { max-width: 760px; }

.offer-text { color: var(--text); font-size: 14px; line-height: 1.6; }
.offer-text h1 { font-size: 22px; margin: 0 0 12px; }
.offer-text h2 { font-size: 16px; margin: 24px 0 8px; }
.offer-text h3 { font-size: 14px; margin: 16px 0 6px; }
.offer-text p { margin: 0 0 10px; }
.offer-text ul { margin: 0 0 12px; padding-left: 20px; }
.offer-text li { margin-bottom: 4px; }

.auth-link {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}

.auth-link:hover { text-decoration: underline; }

.auth-submit.btn-primary {
  width: 100%;
  height: 46px;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
}

.auth-links {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}

.auth-flash,
.auth-errors {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
}

.auth-flash--notice { background: var(--accent-bg); color: var(--text); }

.auth-flash--alert,
.auth-errors {
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
  color: var(--danger);
}

.auth-errors ul { margin: 0; padding-left: 18px; }
.auth-errors li + li { margin-top: 2px; }

/* Код из письма: крупные моноширинные цифры. */
.auth-code input[type="text"] {
  height: 56px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: .4em;
  text-align: center;
}

.auth-secondary {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  background: none;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

.auth-secondary:hover { background: var(--accent-bg); }

@media (max-width: 480px) {
  .auth-page { align-items: flex-start; padding-top: 32px; }
  .auth-card { padding: 24px 20px; border-radius: 14px; }
}
