/* ==========================================================================
   УМКА AI — страница авторизации
   ========================================================================== */

.auth-body{
  overflow-x: hidden;
  background-image:
    linear-gradient(180deg, rgba(2,7,9,0.35) 0%, rgba(2,7,9,0.55) 40%, rgba(2,6,8,0.88) 100%),
    url("../images/bg.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

/* ---------- Layout ---------- */
/* Страница на всю высоту экрана, футер прижат книзу даже когда контента мало (шаг ввода кода 2FA). */
.auth-body{
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.auth-body > main{
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-hero{ padding-block: 48px 72px; }
.auth-hero-inner{
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ---------- Visual / brand column ---------- */
.auth-visual{
  position: relative;
  display: flex;
  flex-direction: column;
}
.auth-visual-content{
  position: relative;
  z-index: 2;
  width: 100%;
  flex-shrink: 0;
}
.auth-brand-logo{ margin-bottom: 18px; }
.auth-brand-text{ font-size: 22px; }
.auth-brand-text small{ font-size: 13px; }
.auth-brand-desc{
  color: var(--text-dim);
  max-width: 46ch;
  margin-bottom: 24px;
}

.auth-feature-list{
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}
.auth-feature-list li{
  display: flex;
  align-items: center;
  gap: 14px;
}
.auth-feature-list .icon-badge{ margin-bottom: 0; flex-shrink: 0; }
.auth-feature-list h3{ font-size: 14.5px; margin-bottom: 2px; }
.auth-feature-list p{ font-size: 12.5px; color: var(--text-mute); margin: 0; }

.auth-tagline{
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 13.5px;
}
.auth-tagline span{
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--accent);
}

/* ---------- Auth card ---------- */
.auth-card{
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}

.auth-tabs{
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px;
  margin-bottom: 26px;
}
.auth-tab{
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--ff);
  font-weight: 700;
  font-size: 14px;
  padding: 11px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.auth-tab.is-active{
  background: var(--accent-dim);
  color: var(--accent);
  box-shadow: 0 0 0 1px var(--border-strong) inset;
}

.auth-panel{ display: none; }
.auth-panel.is-active{ display: block; }

.auth-panel h2{ font-size: 26px; margin-bottom: 8px; }
.auth-panel-sub{ color: var(--text-dim); margin-bottom: 22px; font-size: 14px; }

.auth-form{
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.auth-error{
  margin-top: -6px;
  color: #f87171;
  font-size: 13px;
  font-weight: 600;
}

.form-field.has-error{ border-color: #f87171; }
.form-field.has-error:focus-within{ border-color: #f87171; color: #f87171; }

.form-field{
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  color: var(--text-mute);
  background: rgba(255,255,255,0.015);
  transition: border-color .2s ease;
}
.form-field:focus-within{ border-color: var(--accent); color: var(--accent); }
.form-field input{
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: var(--ff);
  font-size: 14px;
}
.form-field input::placeholder{ color: var(--text-mute); }
.field-toggle{
  border: none;
  background: transparent;
  color: var(--text-mute);
  cursor: pointer;
  display: flex;
  padding: 0;
}
.field-toggle:hover{ color: var(--accent); }
.field-toggle.is-active{ color: var(--accent); }

.form-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
}

.checkbox{
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}
.checkbox input{ position: absolute; opacity: 0; width: 1px; height: 1px; }
.checkbox-box{
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
  position: relative;
  transition: border-color .2s ease, background .2s ease;
}
.checkbox-box::after{
  content: "";
  position: absolute;
  left: 5px; top: 1px;
  width: 5px; height: 9px;
  border: solid #00201c;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
}
.checkbox input:checked + .checkbox-box{
  background: var(--accent);
  border-color: var(--accent);
}
.checkbox input:checked + .checkbox-box::after{ opacity: 1; }
.checkbox input:focus-visible + .checkbox-box{ outline: 2px solid var(--accent); outline-offset: 2px; }

.form-link{ color: var(--accent); font-weight: 600; }
.form-link:hover{ text-decoration: underline; }

.btn-block{ width: 100%; padding-block: 14px; font-size: 15px; }

.auth-divider{
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-mute);
  font-size: 13px;
  margin-bottom: 18px;
}
.auth-divider::before,
.auth-divider::after{
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.oauth-row{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.btn-oauth{ gap: 10px; }

.auth-switch{
  text-align: center;
  font-size: 13.5px;
  color: var(--text-dim);
}
.link-btn{
  border: none;
  background: transparent;
  color: var(--accent);
  font-family: var(--ff);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 767px){
  .lang-dropdown-label{ display: none; }
  .lang-dropdown-btn{ padding: 6px; }
}

@media (min-width: 640px){
  .auth-card{ padding: 32px; }
}

/* ---------- 2FA: ввод кода из письма ---------- */
.twofa-heading{
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
.twofa-heading h2{ margin: 0; }
.twofa-icon{ flex-shrink: 0; margin-bottom: 0; }
.twofa-code-input{
  font-size: 22px !important;
  font-weight: 800;
  letter-spacing: .35em;
  text-align: center;
}
.auth-captcha{ min-height: 100px; }
.auth-status{
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 600;
}
.twofa-actions{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}
.twofa-actions form{ margin: 0; }
.twofa-cancel{ color: var(--text-mute); }

@media (min-width: 1024px){
  .auth-hero-inner{
    flex-direction: row;
    align-items: stretch;
    gap: 48px;
  }
  .auth-visual{ flex: 1 1 50%; padding: 48px; justify-content: center; }
  .auth-card{ flex: 0 0 480px; align-self: center; }
}

@media (min-width: 1200px){
  .auth-card{ flex-basis: 520px; }
}

/* ---------- Согласия при регистрации (partials/consent-checkboxes) и кнопки Яндекс/VK ---------- */
.consent-list{ display: flex; flex-direction: column; gap: 10px; }
.checkbox.checkbox-multiline{ align-items: flex-start; font-size: 13px; line-height: 1.45; }
.checkbox.checkbox-multiline .checkbox-box{ margin-top: 1px; }
.auth-hint{ margin: -4px 0 4px; color: var(--text-mute); font-size: 12.5px; line-height: 1.45; }
.oauth-row{ display: flex; flex-direction: column; gap: 10px; }
