/* ===========================
   Общий стиль для:
   - /loginA (вход)
   - /loginR (регистрация)
   - /loginZ (восстановление)
   =========================== */

/* Базовые сбросы */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Цвета и переменные */

:root {
  --bg-main: #021f29;
  --bg-card: rgba(2, 27, 35, 0.97);
  --accent: #48bfff;
  --accent-dark: #3a8fff;
  --text-main: #f9fbff;
  --text-muted: rgba(255, 255, 255, 0.65);
  --border-soft: rgba(255, 255, 255, 0.16);
  --radius-lg: 20px;
  --radius-full: 999px;
  --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.7);
}

/* Фон и базовая раскладка */

body {
  min-height: 100vh;
  background: radial-gradient(circle at top, #053b4b 0, var(--bg-main) 50%, #01090c 100%);
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
}

html, body {
  height: 100%;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at top, #053b4b 0, var(--bg-main) 50%, #01090c 100%);
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* ВАЖНО: центрируем всё содержимое */
  display: flex;
  justify-content: center;
  align-items: center;

  padding: 16px;
  margin: 0;
}



/* Обёртка всех auth-страниц */

.auth-shell {
  width: 100%;
  max-width: 440px;
}

/* Верхняя панель (назад + бренд маленьким) */

.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

/* Кнопка "Назад" */

.back-btn {
  border: none;
  background: rgba(1, 19, 27, 0.85);
  color: var(--text-main);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  line-height: 1;
  transition: opacity 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}

.back-btn span {
  font-size: 1.1rem;
  line-height: 1;
}

.back-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

/* Если во времени в шапке есть текст/бренд */

.auth-header-logo {
  font-weight: 700;
  font-size: 0.95rem;
  opacity: 0.85;
}

.auth-header-logo span {
  color: var(--accent);
}

/* Основная карточка (форма) */

.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 26px 22px 20px;
  backdrop-filter: blur(12px);
}

/* Шапка внутри карточки: логотип + заголовок + подзаголовок */

.auth-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

/* маленький логотип слева от заголовка (login / register / recovery) */
.auth-card-logo {
  height: 32px;
  width: auto;
  display: block;
}

.auth-card-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-card-title {
  font-size: 1rem;
  font-weight: 600;
}

.auth-card-subtitle {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Горизонтальная линия между заголовком и кнопкой Google */

.section-divider {
  width: 100%;
  height: 1px;
  margin: 8px 0 16px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  );
  opacity: 0.9;
}

/* Кнопка входа/регистрации через Google */

.google-btn {
  width: 100%;
  border: 1px solid var(--border-soft);
  background: #ffffff;
  color: #1f2933;
  border-radius: var(--radius-full);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
  text-decoration: none;
}

.google-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  background: #f5f5f5;
}

.google-btn img {
  width: 18px;
  height: 18px;
}

/* Разделитель "або" */

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 16px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.25)
  );
}

/* Поля формы (input) */

.field {
  margin-bottom: 13px;
}

.field-label {
  font-size: 0.75rem;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.72);
}

.field-input-wrapper {
  position: relative;
}

.field-input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: rgba(3, 41, 52, 0.95);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: border 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field-input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.field-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(72, 191, 255, 0.7);
  background: rgba(5, 50, 63, 1);
}

/* Иконка внутри поля (📧, 🔒, 🔑) */

.field-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  opacity: 0.8;
  pointer-events: none;
}

/* Ссылки под полем (например "Забули пароль?") */

.auth-links {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
  margin-bottom: 16px;
  font-size: 0.75rem;
}

.auth-link {
  color: rgba(72, 191, 255, 0.95);
  text-decoration: none;
  cursor: pointer;
}

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

/* Основная кнопка (Увійти / Зареєструватися / Підтвердити) */

.submit-btn {
  width: 100%;
  border: none;
  border-radius: var(--radius-full);
  padding: 11px 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #02131b;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.1s ease;
  margin-top: 10px;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}

.submit-btn:active {
  transform: translateY(0);
  box-shadow: none;
  opacity: 0.9;
}

/* Текст внизу формы: "Немає акаунту? Зареєструватися" / "Пам’ятаєте пароль?" */

.auth-footer {
  text-align: center;
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

.auth-footer a:hover {
  text-decoration: underline;
}

/* Ссылка снизу страницы – запасной выход / переход */
    .auth-title {
      font-size: clamp(1.1rem, 4vw, 1.3rem);
      font-weight: 700;
      margin-bottom: 14px;
      text-align: center;
    }



.page-exit {
  margin-top: 10px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.page-exit a {
  color: var(--accent);
  text-decoration: none;
}

.page-exit a:hover {
  text-decoration: underline;
}

/* Сообщения (успех, ошибка, предупреждение) */

.info_succes,
.info_error,
.info_warning {
  margin-top: 14px;
  font-size: 0.8rem;
  border-radius: 12px;
  padding: 10px 12px;
  line-height: 1.4;
}

.info_succes {
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid rgba(46, 204, 113, 0.65);
  color: #c9ffdd;
}

.info_error {
  background: rgba(231, 76, 60, 0.12);
  border: 1px solid rgba(231, 76, 60, 0.75);
  color: #ffd0d0;
}

.info_warning {
  background: rgba(241, 196, 15, 0.12);
  border: 1px solid rgba(241, 196, 15, 0.75);
  color: #fff3bf;
}

/* Адаптация под разные экраны */

@media (max-width: 480px) {
  body {
    align-items: flex-start;
  }

  .auth-shell {
    margin-top: 20px;
  }

  .auth-card {
    padding: 22px 18px 18px;
    border-radius: 16px;
  }

  .auth-card-logo {
    height: 28px;
  }
}

@media (min-width: 768px) {
  body {
    padding: 32px;
  }

  .auth-card {
    padding: 30px 28px 24px;
  }
}

@media (min-width: 1200px) {
  body {
    padding: 40px;
  }

  .auth-shell {
    max-width: 480px;
  }
}
