/* ============================================================
   Вход и регистрация 2026 (login.html, register.html + en/).
   Цвета берутся из токенов --ab-* (css/about-2026.css подключён
   раньше), обе темы — там. Имена классов прежние: их ждут скрипты
   страниц (googleBtn, emailSection, msg…), разметку форм не меняем.
   ============================================================ */

body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }

.auth-grid {
  position: relative; z-index: 1;
  width: 100%; max-width: 960px;
  display: grid; grid-template-columns: 1fr 440px; gap: 18px; align-items: stretch;
}

/* Левая панель: что даёт аккаунт */
.auth-side {
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  padding: 36px;
  border-radius: 28px;
  border: 1px solid var(--ab-line);
  background:
    radial-gradient(500px 300px at 0% 0%, rgba(var(--ab-accent-rgb), .18), transparent 70%),
    radial-gradient(500px 300px at 100% 100%, rgba(var(--ab-warm-rgb), .12), transparent 70%),
    var(--ab-card);
  box-shadow: var(--ab-shadow);
}
.auth-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ab-t1); font-weight: 800; font-size: 18px; }
.auth-mark {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #22d3ee, #0ea5e9); color: #04131a;
}
:root[data-theme="light"] .auth-mark { background: linear-gradient(135deg, #0e7490, #0369a1); color: #fff; }
.auth-mark svg { width: 22px; height: 22px; }
.auth-side h2 { margin: 26px 0 0; font-size: clamp(24px, 2.8vw, 32px); font-weight: 900; line-height: 1.15; letter-spacing: -.02em; }
.auth-side ul { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 14px; }
.auth-side li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: var(--ab-t2); }
.auth-side li svg { flex: none; width: 22px; height: 22px; color: var(--ab-ok); margin-top: 1px; }
.auth-side li b { color: var(--ab-t1); }
.auth-foot { font-size: 13px; color: var(--ab-t3); }
.auth-foot a { color: var(--ab-accent); font-weight: 700; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

/* Карточка формы */
.wrap { width: 100%; }
.card {
  height: 100%;
  padding: 40px 36px;
  border-radius: 28px;
  background: var(--ab-card);
  border: 1px solid var(--ab-line);
  box-shadow: var(--ab-shadow);
}
.logo { display: none; }
.title { margin: 0 0 6px; font-size: 26px; font-weight: 900; letter-spacing: -.02em; text-align: left; }
.sub { margin: 0 0 26px; font-size: 14.5px; color: var(--ab-t2); text-align: left; }

.btn-google {
  width: 100%; padding: 15px; border-radius: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; color: #1f2937; border: 1px solid rgba(15, 23, 42, .12);
  font-family: inherit; font-size: 15px; font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
  transition: transform .2s, box-shadow .2s;
}
.btn-google:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0, 0, 0, .25); }
.btn-google:disabled { opacity: .7; cursor: not-allowed; transform: none; }
.btn-google .spinner { width: 18px; height: 18px; border: 2px solid #ddd; border-top-color: #4285F4; border-radius: 50%; animation: au-spin .6s linear infinite; display: none; }
.btn-google.loading .spinner { display: block; }
.btn-google.loading .g-logo { display: none; }
.btn-google.loading .g-text { opacity: .7; }
@keyframes au-spin { to { transform: rotate(360deg); } }

.safe-note {
  margin-top: 12px; padding: 10px 14px; border-radius: 12px;
  display: flex; align-items: center; gap: 10px;
  background: rgba(var(--ab-ok-rgb), .07); border: 1px solid rgba(var(--ab-ok-rgb), .22);
  font-size: 12.5px; line-height: 1.5; color: var(--ab-ok);
}
.safe-note svg { width: 16px; height: 16px; flex: none; }

.divider { display: flex; align-items: center; gap: 12px; margin: 24px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--ab-line-2); }
.divider span { font-size: 12px; color: var(--ab-t3); white-space: nowrap; }

.email-section { display: none; }
.email-section.open { display: block; }
.form-group { margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.card label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ab-t3); }
.card input[type=email], .card input[type=password], .card input[type=text] {
  width: 100%; padding: 13px 14px; border-radius: 12px;
  background: var(--ab-card-flat); border: 1px solid var(--ab-line-2);
  color: var(--ab-t1); font-family: inherit; font-size: 15px;
  transition: border-color .2s, box-shadow .2s;
}
:root[data-theme="light"] .card input[type=email], :root[data-theme="light"] .card input[type=password], :root[data-theme="light"] .card input[type=text] { background: #f8fafc; }
.card input:focus { outline: none; border-color: var(--ab-accent); box-shadow: 0 0 0 3px rgba(var(--ab-accent-rgb), .15); }
.card input::placeholder { color: var(--ab-t3); opacity: .8; }
.pw-wrap { position: relative; }
.pw-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 17px; padding: 4px; color: var(--ab-t3); }
.forgot { text-align: right; margin-bottom: 18px; }
.forgot a { color: var(--ab-accent); font-size: 13px; font-weight: 700; text-decoration: none; }
.forgot a:hover { text-decoration: underline; }

.btn-email {
  width: 100%; padding: 14px; margin-top: 4px; border: none; border-radius: 12px; cursor: pointer;
  font-family: inherit; font-weight: 800; font-size: 15px;
  color: var(--ab-btn-text); background: linear-gradient(135deg, #22d3ee, #0ea5e9);
  transition: transform .2s, box-shadow .2s;
}
:root[data-theme="light"] .btn-email { background: linear-gradient(135deg, #0e7490, #0369a1); }
.btn-email:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(6, 182, 212, .3); }
.btn-email:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.toggle-email {
  width: 100%; padding: 13px; border-radius: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent; border: 1px solid var(--ab-line-2);
  color: var(--ab-t2); font-family: inherit; font-size: 14px; font-weight: 700;
  transition: border-color .2s, color .2s;
}
.toggle-email:hover { border-color: rgba(var(--ab-accent-rgb), .5); color: var(--ab-t1); }

.msg { border-radius: 10px; padding: 12px 14px; font-size: 13.5px; margin-bottom: 16px; display: none; line-height: 1.5; }
.msg.error { background: rgba(239, 68, 68, .1); border: 1px solid rgba(239, 68, 68, .3); color: #fca5a5; }
.msg.info { background: rgba(var(--ab-accent-rgb), .1); border: 1px solid rgba(var(--ab-accent-rgb), .3); color: var(--ab-accent); }
.msg.success { background: rgba(var(--ab-ok-rgb), .1); border: 1px solid rgba(var(--ab-ok-rgb), .3); color: var(--ab-ok); }
:root[data-theme="light"] .msg.error { color: #b91c1c; }

.bottom { text-align: center; margin-top: 22px; font-size: 14px; color: var(--ab-t3); }
.bottom a { color: var(--ab-accent); font-weight: 800; text-decoration: none; }
.bottom a:hover { text-decoration: underline; }
.back { text-align: center; margin-top: 14px; }
.back a { color: var(--ab-t3); font-size: 13px; text-decoration: none; }
.back a:hover { color: var(--ab-t1); }

@media (max-width: 860px) {
  .auth-grid { grid-template-columns: 1fr; max-width: 460px; }
  .auth-side { padding: 24px; gap: 0; }
  .auth-side h2, .auth-side ul, .auth-foot { display: none; }
}
@media (max-width: 480px) {
  .card { padding: 28px 20px; border-radius: 24px; }
  .title { font-size: 23px; }
  .form-row { grid-template-columns: 1fr; }
}
