/* ────────────────────────────────────────────────────────────────────────
   Nouvia · Client Deliverable Auth Gate · Sign-in Styling
   Brand tokens match Nouvia design standard
   ──────────────────────────────────────────────────────────────────────── */

:root {
  --bg: #0F172A;
  --bg-2: #1E293B;
  --surface: #FFFFFF;
  --ink: #0F172A;
  --ink-2: #475569;
  --muted: #94A3B8;
  --line: #E2E8F0;
  --accent: #3B82F6;
  --accent-dark: #1E40AF;
  --warn: #F59E0B;
  --error: #DC2626;
  --success: #15803D;
}

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

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 100%);
  -webkit-font-smoothing: antialiased;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 40px 24px;
}

/* ───── Header ───── */
.auth-header {
  width: 100%;
  max-width: 480px;
  display: flex;
  justify-content: flex-start;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fff;
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-text {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ───── Main · Auth Card ───── */
.auth-main {
  width: 100%;
  max-width: 480px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
}

.auth-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  width: 100%;
}

.auth-card.hidden { display: none; }

.auth-card h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.25;
}

.auth-card .lede {
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 24px;
  line-height: 1.55;
}

/* ───── Buttons ───── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.btn-primary:hover {
  background: var(--bg-2);
  border-color: var(--bg-2);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

.link-button {
  background: none;
  border: none;
  color: var(--accent);
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

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

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

.divider span {
  padding: 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

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

.form label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form input[type="email"] {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.15s ease;
}

.form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ───── Footnote ───── */
.footnote {
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.footnote a {
  color: var(--accent);
  text-decoration: none;
}

.footnote a:hover { text-decoration: underline; }

/* ───── Icon marks ───── */
.icon-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  margin: 0 auto 20px;
}

.icon-success {
  background: rgba(21, 128, 61, 0.1);
  color: var(--success);
}

.icon-warn {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warn);
}

.icon-error {
  background: rgba(220, 38, 38, 0.1);
  color: var(--error);
}

/* ───── Spinner ───── */
.spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

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

/* ───── Footer ───── */
.auth-footer {
  width: 100%;
  max-width: 480px;
  display: flex;
  justify-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.auth-footer .dot { opacity: 0.5; }

/* ───── Responsive ───── */
@media (max-width: 520px) {
  .auth-card {
    padding: 28px 22px;
  }

  .auth-card h1 {
    font-size: 20px;
  }
}
