/* ══════════════════════════════════════════════════════════════
   ArraPrompt AI — Auth Pages (Qwen-inspired split layout)
   ══════════════════════════════════════════════════════════════ */

/* ── Auth Page Layout ─────────────────────────────────────── */
.auth-page {
  display: flex;
  min-height: 100vh;
  background: var(--bg-primary);
}

/* ── Left Branding Panel ──────────────────────────────────── */
.auth-brand {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d0d0d 0%, #141414 50%, #1a1510 100%);
  border-right: 1px solid var(--border-subtle);
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.auth-brand::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,168,83,0.06) 0%, transparent 70%);
  top: 20%;
  left: 30%;
  pointer-events: none;
}

.auth-brand::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,168,83,0.04) 0%, transparent 70%);
  bottom: 10%;
  right: 10%;
  pointer-events: none;
}

.auth-brand-inner {
  max-width: 380px;
  position: relative;
  z-index: 1;
}

.auth-brand-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 28px;
  filter: drop-shadow(0 4px 24px rgba(212,168,83,0.3));
}

.auth-brand-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text-primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-brand-tagline {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 40px;
  line-height: 1.5;
}

.auth-brand-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.auth-feature:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--border-medium);
}

.auth-feature-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.auth-feature strong {
  display: block;
  font-size: 0.88rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.auth-feature small {
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

/* ── Right Form Panel ─────────────────────────────────────── */
.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: var(--bg-primary);
}

.auth-form-container {
  width: 100%;
  max-width: 400px;
}

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

.auth-form-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.auth-form-subtitle {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* ── Google Auth Button ───────────────────────────────────── */
.btn-google-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-google-auth:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ── Divider ──────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  gap: 16px;
}

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

.auth-divider span {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Form Fields ──────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.auth-field input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: all var(--transition-fast);
}

.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.auth-field input::placeholder {
  color: var(--text-tertiary);
}

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

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

.btn-toggle-pw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px;
  opacity: 0.5;
  transition: opacity var(--transition-fast);
}

.btn-toggle-pw:hover {
  opacity: 1;
}

/* ── Error / Success Messages ─────────────────────────────── */
.auth-error {
  padding: 10px 14px;
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.2);
  border-radius: var(--radius-sm);
  color: var(--error);
  font-size: 0.85rem;
}

.auth-success {
  padding: 10px 14px;
  background: rgba(74,222,128,0.08);
  border: 1px solid rgba(74,222,128,0.2);
  border-radius: var(--radius-sm);
  color: var(--success);
  font-size: 0.85rem;
}

/* ── Submit Button ────────────────────────────────────────── */
.btn-auth-submit {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--accent), #b8862d);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.btn-auth-submit:hover {
  background: linear-gradient(135deg, var(--accent-hover), #c9952f);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212,168,83,0.3);
}

.btn-auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ── Spinner ──────────────────────────────────────────────── */
.auth-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: var(--text-inverse);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Switch Link ──────────────────────────────────────────── */
.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.auth-switch a {
  color: var(--accent);
  font-weight: 500;
}

.auth-switch a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ── Terms ────────────────────────────────────────────────── */
.auth-terms {
  text-align: center;
  margin-top: 16px;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  line-height: 1.5;
}

.auth-terms a {
  color: var(--text-secondary);
}

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

/* ── Forgot Password Link ────────────────────────────────── */
.auth-forgot {
  text-align: center;
  margin-top: 12px;
  margin-bottom: -8px;
  font-size: 0.85rem;
}

.auth-forgot a {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-forgot a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ── Hidden Utility ──────────────────────────────────────── */
.hidden {
  display: none !important;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .auth-page {
    flex-direction: column;
  }

  .auth-brand {
    padding: 32px 24px;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .auth-brand-features {
    display: none;
  }

  .auth-brand-inner {
    text-align: center;
  }

  .auth-brand-logo {
    margin: 0 auto 20px;
  }

  .auth-brand-tagline {
    margin-bottom: 0;
  }

  .auth-form-panel {
    padding: 32px 24px;
  }
}
