/* PrismRAG — Auth pages (register / login) */

.auth-body {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: stretch;
}

.auth-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  min-height: 100vh;
}

/* ── Left: form card ───────────────────────────────────────────────────── */
.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 64px;
  border-right: 1px solid var(--border);
  background: var(--bg-card);
}

.auth-logo {
  display: inline-flex;
  margin-bottom: 40px;
}

.auth-h1 {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}

.auth-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.auth-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.875rem;
  margin-bottom: 20px;
}

.auth-success {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.875rem;
  margin-bottom: 20px;
}

.auth-mfa-hint {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 0 0 12px;
  line-height: 1.5;
}

.auth-forgot {
  margin: -8px 0 0;
  text-align: right;
  font-size: 0.82rem;
}

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

.auth-link-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 8px 0;
  text-align: center;
}
.auth-link-btn:hover { color: var(--text); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-dim);
  font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-sso-btn {
  display: block;
  text-align: center;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: border-color 0.15s, background 0.15s;
}
.auth-sso-btn:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.06);
}

.qr-enroll {
  text-align: center;
  margin: 16px 0;
}
.qr-enroll img {
  border-radius: 8px;
  border: 1px solid var(--border);
}
.secret-mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  word-break: break-all;
  background: var(--bg);
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

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

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.field input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 0.9rem;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  width: 100%;
}

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

.field input:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.field input:focus-visible { outline: none; }

.auth-submit {
  margin-top: 6px;
  padding: 13px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  background: linear-gradient(135deg, var(--indigo), var(--purple));
  color: #fff;
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.3);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.auth-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 36px rgba(99, 102, 241, 0.45);
}

.auth-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
  color: var(--text-dim);
  font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-switch {
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}
.auth-switch a { color: var(--indigo); font-weight: 500; }
.auth-switch a:hover { text-decoration: underline; }

.auth-legal {
  margin-top: 16px;
  font-size: 0.775rem;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.5;
}
.auth-legal a { color: var(--text-muted); }
.auth-legal a:hover { color: var(--text); }

/* ── Right: social proof panel ─────────────────────────────────────────── */
.auth-side {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 60% 40%, rgba(99,102,241,0.14), transparent 60%),
              radial-gradient(ellipse at 30% 70%, rgba(139,92,246,0.10), transparent 60%),
              var(--bg);
}

.auth-side::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.05) 1px, transparent 1px);
  background-size: 50px 50px;
}

.auth-side-inner {
  position: relative;
  z-index: 1;
  padding: 48px;
  max-width: 440px;
}

.auth-quote {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
}

.auth-quote-icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 16px;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-quote p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-style: italic;
}
.auth-quote p em {
  color: var(--text);
  font-style: normal;
  font-weight: 600;
}

.auth-quote-author strong {
  display: block;
  font-size: 0.825rem;
  color: var(--text-dim);
  font-weight: 500;
}

.auth-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.auth-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.4;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side  { display: none; }
  .auth-card  { padding: 48px 32px; border-right: none; }
}

@media (max-width: 480px) {
  .auth-card  { padding: 32px 20px; }
  .field-row  { grid-template-columns: 1fr; }
}
