/* ============================================================
   Делорум v2 — Стили авторизации
   ============================================================ */

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

:root {
  --accent:      #7C3AED;
  --accent-dark: #6D28D9;
  --text:        #111827;
  --text-muted:  #6B7280;
  --border:      #E5E7EB;
  --bg:          #F9FAFB;
  --bg-card:     #FFFFFF;
  --radius:      12px;
  --shadow:      0 4px 24px rgba(0,0,0,.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Golos Text', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

/* ── Layout ──────────────────────────────────────────────── */
.auth-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ── Левая панель ────────────────────────────────────────── */
.auth-left {
  background: linear-gradient(135deg, #7C3AED 0%, #4F46E5 60%, #2563EB 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 32px 40px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.auth-left-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.auth-left-content h1 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.auth-left-content p {
  font-size: 16px;
  opacity: 0.85;
  line-height: 1.6;
}

.auth-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-features li {
  font-size: 15px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-trial-badge {
  display: inline-block;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(4px);
  width: fit-content;
}

.auth-left-footer {
  display: flex;
  gap: 16px;
  font-size: 12px;
  opacity: 0.6;
}

.auth-left-footer a {
  color: #fff;
  text-decoration: none;
}
.auth-left-footer a:hover { opacity: 1; }

/* ── Правая панель ───────────────────────────────────────── */
.auth-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  overflow-y: auto;
}

.auth-form-wrap {
  width: 100%;
  max-width: 420px;
}

/* ── Вкладки ─────────────────────────────────────────────── */
.auth-tabs {
  display: flex;
  background: #F3F4F6;
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 28px;
}

.auth-tab {
  flex: 1;
  padding: 8px 16px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
}

.auth-tab.active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

/* ── Панели ──────────────────────────────────────────────── */
.auth-panel { display: none; }
.auth-panel.active { display: block; }

.auth-panel-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.auth-panel-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ── Элементы формы ──────────────────────────────────────── */
.auth-group {
  margin-bottom: 16px;
}

.auth-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.auth-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--text);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

.auth-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}

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

.auth-input-wrap .auth-input {
  padding-right: 42px;
}

.auth-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  line-height: 1;
  color: var(--text-muted);
}

.auth-strength {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
}

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.auth-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.auth-check a { color: var(--accent); }

/* ── Кнопки ──────────────────────────────────────────────── */
.auth-btn {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .1s;
  margin-top: 4px;
}

.auth-btn:hover:not(:disabled) { background: var(--accent-dark); }
.auth-btn:active:not(:disabled) { transform: scale(0.99); }
.auth-btn:disabled { opacity: .6; cursor: not-allowed; }

.auth-forgot-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.auth-link {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  font-size: inherit;
  padding: 0;
}

/* ── OAuth ────────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-oauth {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  background: #fff;
  transition: border-color .2s, background .2s;
}

.auth-oauth-btn:hover {
  border-color: #9CA3AF;
  background: #F9FAFB;
}

/* ── Уведомления ─────────────────────────────────────────── */
.auth-alert {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.auth-alert.error   { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }
.auth-alert.success { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }

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

/* ── Мобильная адаптация ─────────────────────────────────── */
@media (max-width: 768px) {
  .auth-wrap {
    grid-template-columns: 1fr;
  }

  .auth-left {
    position: relative;
    height: auto;
    padding: 24px 20px;
    min-height: auto;
  }

  .auth-left-content {
    display: none;
  }

  .auth-left-footer {
    display: none;
  }

  .auth-right {
    padding: 24px 16px;
    align-items: flex-start;
  }
}
