/* ── Auth pages (login & register) ───────────────────── */

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

body {
  font-family: 'Manrope', sans-serif;
  min-height: 100vh;
  display: flex;
}

/* ── Left brand panel ─────────────────────────────────── */

.auth-brand {
  width: 45%;
  background: linear-gradient(155deg, #0f2044 0%, #1e3a6e 50%, #1e6fc0 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 52px;
  position: relative;
  overflow: hidden;
}

.auth-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 110% 20%, rgba(30,111,192,0.35) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at -10% 80%, rgba(30,111,192,0.20) 0%, transparent 70%);
}

.auth-brand > * {
  position: relative;
  z-index: 1;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-icon {
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.12);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.18);
}

.brand-logo-icon i {
  font-size: 20px;
  color: #fff;
}

.brand-logo-text {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.brand-logo-text span {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 0 40px;
}

.brand-tagline {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.brand-tagline em {
  font-style: normal;
  color: #64b5f6;
}

.brand-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  max-width: 320px;
}

.brand-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 40px;
}

.brand-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.70);
}

.brand-feature i {
  font-size: 16px;
  color: #64b5f6;
  flex-shrink: 0;
}

.brand-footer {
  font-size: 12px;
  color: rgba(255,255,255,0.28);
}

/* ── Right form panel ─────────────────────────────────── */

.auth-form-wrap {
  flex: 1;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  position: relative;
  z-index: 1;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 2;
}

.auth-card-header {
  margin-bottom: 32px;
}

.auth-card-header h1 {
  font-size: 26px;
  font-weight: 700;
  color: #0f2044;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.auth-card-header p {
  font-size: 14px;
  color: #6b7280;
}

/* ── Form fields ──────────────────────────────────────── */

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

.auth-field .form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.input-icon-wrap {
  position: relative;
}

.input-icon-wrap .input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 16px;
  pointer-events: none;
}

.input-icon-wrap input {
  width: 100%;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 11px 14px 11px 38px;
  font-size: 14px;
  font-family: 'Manrope', sans-serif;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  color: #1f2a37;
  outline: none;
}

.input-icon-wrap input:focus {
  border-color: #1e6fc0;
  box-shadow: 0 0 0 3px rgba(30,111,192,0.10);
}

.field-error {
  font-size: 12px;
  color: #dc2626;
  margin-top: 5px;
}

.field-hint {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 5px;
  line-height: 1.5;
}

.auth-field-captcha {
  margin-bottom: 20px;
  isolation: isolate;
  contain: layout;
}

.auth-field-captcha .smart-captcha {
  min-height: 100px;
  max-height: 120px;
  overflow: hidden;
}

/* Кнопка поверх виджета капчи (iframe может перекрывать) */
.auth-submit-wrap {
  position: relative;
  z-index: 100;
  margin-top: 8px;
}

/* ── Alert box ────────────────────────────────────────── */

.auth-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-alert i {
  color: #dc2626;
  font-size: 16px;
  flex-shrink: 0;
}

.auth-alert span {
  font-size: 13px;
  color: #991b1b;
}

/* ── Step badge (2FA) ─────────────────────────────────── */

.step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  color: #1e6fc0;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
  border: 1px solid #bfdbfe;
}

/* ── Submit button ────────────────────────────────────── */

.btn-auth {
  background: #1e6fc0;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Manrope', sans-serif;
  width: 100%;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.01em;
  margin-top: 0;
  position: relative;
  z-index: 100;
  pointer-events: auto;
}

.auth-submit-wrap .btn-auth {
  margin-top: 0;
}

.btn-auth:hover { background: #1660ac; }
.btn-auth:active { transform: scale(0.99); }

.btn-auth-outline {
  background: transparent !important;
  color: #1e6fc0;
  border: 1.5px solid #1e6fc0;
  margin-top: 0;
}
.btn-auth-outline:hover { background: rgba(30, 111, 192, 0.08) !important; }

.auth-resend-block {
  text-align: center;
}
.auth-resend-timer {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.auth-resend-timer i {
  color: #9ca3af;
}

/* ── Divider & bottom link ────────────────────────────── */

.auth-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 28px 0;
}

.auth-bottom-link {
  text-align: center;
  font-size: 13px;
  color: #6b7280;
}

.auth-bottom-link a {
  color: #1e6fc0;
  font-weight: 600;
  text-decoration: none;
}

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

/* ── Mobile ───────────────────────────────────────────── */

@media (max-width: 768px) {
  .auth-brand { display: none; }
  body { background: #f8fafc; }
  .auth-form-wrap { padding: 24px 16px; }
}
