﻿:root {
  --bg: #FAFAF8;
  --panel: #FFFFFF;
  --border: #E8E0D8;
  --text: #1A1A1A;
  --muted: #6B6459;
  --accent: #E8642A;
  --accent-2: #C44E1A;
  --green: #10b981;
  --red: #ef4444;
  --radius: 12px;
}

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

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

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

@media (max-width: 768px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-left { display: none; }
}

/* ── LEFT PANEL ── */
.auth-left {
  background: linear-gradient(145deg, #9B2D0A 0%, #E8642A 50%, #C44E1A 100%);
  padding: 48px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: white;
  position: sticky;
  top: 0;
  height: 100vh;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
}

.auth-brand .logo { font-size: 22px; }

.auth-pitch h1 {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.highlight {
  background: linear-gradient(135deg, #FBCAA3, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-pitch p {
  font-size: 16px;
  opacity: 0.85;
  line-height: 1.6;
  margin-bottom: 28px;
}

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

.af-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14.5px;
  font-weight: 500;
  opacity: 0.9;
  background: rgba(255,255,255,0.08);
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
}

.af-item span { font-size: 18px; }

.auth-testimonial {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  padding: 20px;
}

.auth-testimonial p {
  font-size: 15px;
  font-style: italic;
  opacity: 0.95;
  margin-bottom: 8px;
  line-height: 1.5;
}

.auth-testimonial span {
  font-size: 13px;
  opacity: 0.7;
  font-weight: 600;
}

/* ── RIGHT PANEL ── */
.auth-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  overflow-y: auto;
}

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

#authHeader {
  margin-bottom: 28px;
}

#authTitle {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

#authSubtitle {
  font-size: 14.5px;
  color: var(--muted);
}

/* ── SOCIAL BUTTONS ── */
.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  border-radius: 10px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.08s;
}

.social-btn:active { transform: translateY(1px); }

.social-btn.google {
  background: var(--panel);
  border: 1.5px solid var(--border);
  color: var(--text);
}

.social-btn.google:hover {
  background: var(--bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.social-btn.linkedin {
  background: #E8642A;
  border: none;
  color: white;
}

.social-btn.linkedin:hover {
  background: #C44E1A;
  box-shadow: 0 2px 8px rgba(0,119,181,0.3);
}

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

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

/* ── FORM ── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-row.hidden { display: none; }

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

.auth-field span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.auth-field input {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font: inherit;
  font-size: 14.5px;
  color: var(--text);
  background: var(--panel);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,100,42,0.15);
}

.auth-field input.error {
  border-color: var(--red);
}

.password-wrap {
  position: relative;
}

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

.show-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  padding: 4px;
}

.forgot-row {
  text-align: right;
  margin-top: -6px;
}

.forgot-row a {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.forgot-row a:hover { text-decoration: underline; }

.auth-submit {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: white;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.08s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(232,100,42,0.3);
  margin-top: 4px;
}

.auth-submit:hover {
  opacity: 0.93;
  box-shadow: 0 6px 20px rgba(232,100,42,0.4);
}

.auth-submit:active { transform: translateY(1px); }

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

.auth-error {
  color: var(--red);
  font-size: 13.5px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}

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

.auth-switch a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  margin-left: 4px;
}

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

.auth-terms {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 16px;
  line-height: 1.5;
}

.auth-terms a {
  color: var(--muted);
  text-decoration: underline;
}

/* ── LOADING STATE ── */
#auth-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
#auth-loading p { margin-top: 16px; font-size: 14px; }
.loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── CLERK COMPONENT OVERRIDES ── */
#sign-in-container, #sign-up-container {
  width: 100%;
}
.clerk-card {
  box-shadow: none !important;
  border: 1px solid #e5e7eb !important;
}

/* ── FALLBACK ── */
.fallback-icon { font-size: 40px; margin-bottom: 12px; }
.fallback-continue {
  display: block;
  text-align: center;
  margin-top: 16px;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.fallback-continue:hover { text-decoration: underline; }
.code-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-size: 12.5px;
  font-family: monospace;
  margin-top: 8px;
  white-space: pre;
  overflow-x: auto;
}

/* ── FORGOT PASSWORD VIEW ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 24px;
  background: none;
  border: none;
  padding: 0;
}

.back-link:hover { text-decoration: underline; }

/* ── LOADING SPINNER ── */
.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

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

/* ── SUCCESS STATE ── */
.auth-success {
  text-align: center;
  padding: 20px 0;
}
.auth-success .success-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.auth-success h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}
.auth-success p {
  color: var(--muted);
  font-size: 14.5px;
  margin-bottom: 24px;
}


