﻿/* Hide body until auth check completes — prevents login flash */
body { visibility: hidden; }

/* ─── Design Tokens ─────────────────────────────────────── */
:root {
  --ink:          #1A2332;
  --ink-soft:     #3D4F63;
  --ink-muted:    #8496A9;
  --accent:       #E07B54;
  --accent-dark:  #C5623B;
  --accent-glow:  rgba(224,123,84,0.18);
  --cream:        #F7F4EF;
  --cream-dark:   #EDE8E0;
  --surface:      #FFFFFF;
  --border:       #E8E3DC;
  --border-focus: #E07B54;
  --error:        #B91C1C;
  --error-bg:     #FEF2F2;
  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    20px;
  --shadow-card:  0 4px 24px rgba(26,35,50,0.08), 0 1px 4px rgba(26,35,50,0.04);
  --shadow-modal: 0 24px 64px rgba(26,35,50,0.22);
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Navbar extras (Tailwind handles nav base styles) ──── */
.lc-lang-toggle {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: 9999px;
  overflow: hidden;
  background: var(--surface);
}
.lc-lang-btn {
  padding: 10px 14px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.lc-lang-btn.active {
  background: var(--ink);
  color: #fff;
}
.lc-lang-btn:hover:not(.active) {
  background: var(--cream);
}

.lc-nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 600;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(224,123,84,0.28);
  transition: background 0.15s, transform 0.1s;
}
.lc-nav-cta:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

/* ─── Main / Background ──────────────────────────────────── */
.lc-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 56px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, #FDF7F2 0%, #FFF3EA 55%, #F4F2FF 100%);
}

/* Decorative blobs */
.lc-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.5;
  pointer-events: none;
}
.lc-blob-1 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #F9C9AD 0%, transparent 70%);
  top: -120px;
  right: 5%;
}
.lc-blob-2 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, #C8D9F0 0%, transparent 70%);
  bottom: -60px;
  left: 3%;
}

/* ─── Login Card ─────────────────────────────────────────── */
.lc-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 40px 36px 36px;
  box-shadow: 0 8px 40px rgba(26,35,50,0.10), 0 1px 4px rgba(26,35,50,0.05);
  border: 1px solid rgba(26,35,50,0.06);
  animation: cardIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Icon badge above title */
.lc-icon-badge {
  width: 48px;
  height: 48px;
  background: #FFF0E6;
  border: 1.5px solid #F5C4A6;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.lc-form-header { margin-bottom: 28px; }
.lc-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: var(--ink);
  margin-bottom: 5px;
}
.lc-subtitle {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* ─── Role Cards ─────────────────────────────────────────── */
.role-cards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }

.role-card {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 16px;
  background: #FAFAF9;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.role-card:hover {
  border-color: var(--ink-muted);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(26,35,50,0.09);
}
.role-card.selected {
  border-color: var(--accent);
  background: #FFF8F4;
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.role-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.role-icon.nanny  { background: #FDE8F0; }
.role-icon.parent { background: #E0EEFF; }
.role-icon.admin  { background: #FEF5E0; }

.role-card-text h3 { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.role-card-text p  { font-size: 12px; color: var(--ink-muted); }

.role-check {
  margin-left: auto; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.role-card.selected .role-check { background: var(--accent); border-color: var(--accent); }
.role-check svg { display: none; }
.role-card.selected .role-check svg { display: block; }

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  width: 100%; padding: 13px;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 600; font-size: 14px;
  cursor: pointer; border: none;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 14px rgba(224,123,84,0.30);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(224,123,84,0.38);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.38; cursor: not-allowed; }

.btn-secondary {
  background: var(--cream-dark); color: var(--ink-soft);
  margin-top: 8px; box-shadow: none;
}
.btn-secondary:hover { background: var(--border); }

.btn-back {
  background: none; border: none; cursor: pointer;
  padding: 4px 0; margin-bottom: 20px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px; font-weight: 500; color: var(--ink-muted);
  transition: color 0.15s;
}
.btn-back:hover { color: var(--ink); }

/* ─── Form Fields ────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--ink-soft); margin-bottom: 6px;
}
.input-field {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #FAFAF9;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 16px; color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.input-field::placeholder { color: var(--ink-muted); }
.input-field:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.otp-input {
  text-align: center; font-size: 24px;
  letter-spacing: 12px; font-weight: 700;
  padding: 14px;
}

/* ─── Alerts ─────────────────────────────────────────────── */
.alert-error {
  display: none;
  background: var(--error-bg);
  border: 1px solid rgba(185,28,28,0.2);
  color: var(--error);
  padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: 13px; margin-bottom: 16px; line-height: 1.5;
}
.alert-error.show { display: block; }

/* ─── Loading ────────────────────────────────────────────── */
.loading-wrap { text-align: center; padding: 40px 0; }
.spinner {
  display: inline-block; width: 28px; height: 28px;
  border: 2.5px solid var(--cream-dark);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { margin-top: 14px; color: var(--ink-muted); font-size: 14px; }

/* ─── Bottom link ────────────────────────────────────────── */
.bottom-link {
  text-align: center; font-size: 13px;
  color: var(--ink-muted);
}
.link { color: var(--accent); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* ─── Footer ─────────────────────────────────────────────── */
.lc-footer {
  text-align: center;
  padding: 16px 20px;
  font-size: 12px;
  color: var(--ink-muted);
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* ─── Sign-Up Role Modal ─────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(26,35,50,0.50);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: fadeOverlay 0.2s ease;
}
@keyframes fadeOverlay { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px;
  max-width: 400px; width: 100%;
  box-shadow: var(--shadow-modal);
  animation: popIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.role-modal-card {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer; text-decoration: none; color: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
  margin-bottom: 10px; background: var(--surface);
}
.role-modal-card:hover {
  border-color: var(--accent);
  background: #FDF8F5;
  transform: translateY(-1px);
}
.role-modal-card:last-child { margin-bottom: 0; }
.role-modal-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

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

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 480px) {
  .lc-card { padding: 28px 22px 24px; border-radius: var(--radius-md); }
  .lc-nav-inner { padding: 0 16px; }
  .lc-main { padding: 32px 16px 48px; }
  .lc-title { font-size: 22px; }
}
