/* ═══════════════════════════════════════════════════════════════
   Walking With Jesus — Design System
   Palette: Midnight Blue + Warm Gold + Parchment
   ═══════════════════════════════════════════════════════════════ */

:root {
  --midnight:    #0f172a;
  --deep-blue:   #1e293b;
  --navy:        #1a2744;
  --gold:        #c9973a;
  --gold-light:  #e8b96a;
  --gold-glow:   rgba(201,151,58,.15);
  --parchment:   #fdf8f0;
  --parchment-2: #f5ede0;
  --text-main:   #e2d9cc;
  --text-soft:   #94a3b8;
  --text-muted:  #64748b;
  --border:      rgba(201,151,58,.2);
  --radius:      12px;
  --radius-lg:   20px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--midnight);
  color: var(--text-main);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--parchment);
  line-height: 1.3;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem);   font-weight: 600; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; }

p { color: var(--text-main); margin-bottom: 1rem; }
a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-light); }

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--deep-blue);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--parchment) !important;
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
}
.brand-cross { color: var(--gold); font-size: 1.1rem; }
.navbar-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-link {
  color: var(--text-soft);
  font-size: .9rem;
  font-weight: 500;
  transition: color .2s;
}
.nav-link:hover { color: var(--gold); }
.btn-link { background: none; border: none; cursor: pointer; font-family: inherit; font-size: inherit; }

/* ── Main Layout ─────────────────────────────────────────────── */
.main-content { flex: 1; padding: 2rem; max-width: 1100px; margin: 0 auto; width: 100%; }

/* ── Hero / Dashboard ───────────────────────────────────────── */
.dashboard-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--deep-blue) 60%, rgba(201,151,58,.08) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}
.dashboard-hero::before {
  content: '✦';
  position: absolute;
  top: -20px;
  right: 30px;
  font-size: 8rem;
  color: var(--gold-glow);
  pointer-events: none;
}
.hero-greeting { color: var(--gold); font-size: .85rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .4rem; }
.hero-title { margin-bottom: .5rem; }
.hero-subtitle { color: var(--text-soft); font-size: .95rem; }

.next-session-card {
  background: var(--gold-glow);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.next-label { color: var(--gold); font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .25rem; }
.next-title { color: var(--parchment); font-family: 'Playfair Display', serif; font-size: 1.1rem; }

/* ── Progress Bar ───────────────────────────────────────────── */
.progress-strip {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--deep-blue);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
}
.progress-track {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,.08);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 4px;
  transition: width .6s ease;
}
.progress-label { color: var(--text-soft); font-size: .85rem; white-space: nowrap; }
.progress-count { color: var(--gold); font-weight: 600; font-size: 1rem; }

/* ── Unit Cards ─────────────────────────────────────────────── */
.units-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }

.unit-card {
  background: var(--deep-blue);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color .2s, transform .2s;
  cursor: pointer;
}
.unit-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.unit-icon { font-size: 1.8rem; margin-bottom: .75rem; }
.unit-number { color: var(--gold); font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.unit-title { font-family: 'Playfair Display', serif; color: var(--parchment); font-size: 1.15rem; margin: .3rem 0 .5rem; }
.unit-subtitle { color: var(--text-soft); font-size: .85rem; margin-bottom: 1rem; }
.unit-sessions { color: var(--text-muted); font-size: .8rem; }

.sessions-list { margin-top: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.session-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .75rem;
  border-radius: 8px;
  background: rgba(255,255,255,.03);
  transition: background .15s;
}
.session-row:hover { background: rgba(201,151,58,.08); }
.session-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: .6rem;
}
.session-check.done { background: var(--gold); border-color: var(--gold); color: var(--midnight); }
.session-day { color: var(--text-muted); font-size: .75rem; min-width: 45px; }
.session-name { color: var(--text-main); font-size: .875rem; flex: 1; }
.session-mins { color: var(--text-muted); font-size: .75rem; }

/* ── Session Page ───────────────────────────────────────────── */
.session-header {
  background: linear-gradient(135deg, var(--navy), var(--deep-blue));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.session-breadcrumb { color: var(--gold); font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .5rem; }
.session-day-badge {
  display: inline-block;
  background: var(--gold-glow);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: .75rem;
  font-weight: 600;
  padding: .25rem .75rem;
  border-radius: 20px;
  margin-bottom: .75rem;
  letter-spacing: .05em;
}
.session-title { margin-bottom: .5rem; }
.session-meta { color: var(--text-soft); font-size: .85rem; }

/* ── Scripture Block ────────────────────────────────────────── */
.scripture-block {
  background: var(--deep-blue);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
  position: relative;
}
.scripture-ref {
  color: var(--gold);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}
.scripture-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--parchment);
  font-style: italic;
  margin: 0;
}
.scripture-mark { color: var(--gold); font-size: 2rem; line-height: 1; margin-bottom: .5rem; display: block; }

/* ── Content Sections ───────────────────────────────────────── */
.content-section {
  background: var(--deep-blue);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.section-label {
  color: var(--gold);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}
.section-content { color: var(--text-main); line-height: 1.8; }

/* ── Discussion Questions ───────────────────────────────────── */
.questions-list { list-style: none; display: flex; flex-direction: column; gap: .75rem; }
.question-item {
  display: flex;
  gap: .75rem;
  padding: 1rem;
  background: rgba(201,151,58,.06);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.question-num {
  color: var(--gold);
  font-weight: 700;
  font-size: .9rem;
  min-width: 24px;
}
.question-text { color: var(--text-main); font-size: .95rem; }

/* ── Notes & Journal ────────────────────────────────────────── */
.note-box {
  background: var(--deep-blue);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.note-box textarea {
  width: 100%;
  min-height: 120px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  font-size: .9rem;
  padding: .75rem 1rem;
  resize: vertical;
  transition: border-color .2s;
}
.note-box textarea:focus { outline: none; border-color: var(--gold); }
.note-box textarea::placeholder { color: var(--text-muted); }

.other-note {
  border-left: 3px solid var(--border);
  padding: .75rem 1rem;
  margin-bottom: .75rem;
  border-radius: 0 8px 8px 0;
}
.other-note .note-author { color: var(--gold); font-size: .75rem; font-weight: 600; margin-bottom: .25rem; }
.other-note .note-body { color: var(--text-soft); font-size: .9rem; }

/* ── AI Chat ────────────────────────────────────────────────── */
.chat-section {
  background: var(--deep-blue);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.chat-messages { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1rem; max-height: 400px; overflow-y: auto; }
.chat-bubble {
  padding: .875rem 1rem;
  border-radius: 10px;
  max-width: 88%;
}
.chat-bubble.user {
  background: var(--gold-glow);
  border: 1px solid var(--gold);
  color: var(--parchment);
  align-self: flex-end;
}
.chat-bubble.ai {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  color: var(--text-main);
  align-self: flex-start;
}
.chat-bubble .bubble-label { font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .35rem; color: var(--gold); }
.chat-input-row { display: flex; gap: .75rem; }
.chat-input-row input {
  flex: 1;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  font-size: .9rem;
  padding: .75rem 1rem;
  transition: border-color .2s;
}
.chat-input-row input:focus { outline: none; border-color: var(--gold); }
.chat-input-row input::placeholder { color: var(--text-muted); }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: .9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--gold);
  color: var(--midnight);
}
.btn-primary:hover { background: var(--gold-light); color: var(--midnight); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}
.btn-outline:hover { background: var(--gold-glow); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-soft);
}
.btn-ghost:hover { border-color: var(--text-soft); color: var(--text-main); }
.btn-sm { padding: .5rem 1rem; font-size: .8rem; }
.btn-complete {
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.4);
  color: #4ade80;
}
.btn-complete:hover { background: rgba(34,197,94,.2); }
.btn-complete.done { background: rgba(34,197,94,.25); }

/* ── Session Navigation ─────────────────────────────────────── */
.session-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
}

/* ── Login Page ─────────────────────────────────────────────── */
.login-wrap {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  background: var(--deep-blue);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo .cross { color: var(--gold); font-size: 2.5rem; display: block; margin-bottom: .5rem; }
.login-logo h1 { font-size: 1.5rem; }
.login-logo p { color: var(--text-soft); font-size: .875rem; }

.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; color: var(--text-soft); font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .5rem; }
.form-control {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  font-size: .95rem;
  padding: .875rem 1rem;
  transition: border-color .2s;
}
.form-control:focus { outline: none; border-color: var(--gold); }
.form-control::placeholder { color: var(--text-muted); }

.validation-error { color: #f87171; font-size: .8rem; margin-top: .3rem; }
.alert-error {
  background: rgba(248,113,113,.1);
  border: 1px solid rgba(248,113,113,.3);
  border-radius: 8px;
  color: #fca5a5;
  padding: .875rem 1rem;
  margin-bottom: 1.25rem;
  font-size: .875rem;
}

.remember-row { display: flex; align-items: center; gap: .5rem; margin-bottom: 1.5rem; }
.remember-row label { color: var(--text-soft); font-size: .875rem; cursor: pointer; }
.hint-credentials {
  background: rgba(201,151,58,.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1.5rem;
  font-size: .8rem;
  color: var(--text-soft);
}
.hint-credentials strong { color: var(--gold); }

/* ── Journal ────────────────────────────────────────────────── */
.journal-entry {
  background: var(--deep-blue);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.journal-entry .entry-date { color: var(--gold); font-size: .75rem; font-weight: 600; margin-bottom: .25rem; }
.journal-entry .entry-title { font-family: 'Playfair Display', serif; color: var(--parchment); font-size: 1.1rem; margin-bottom: .5rem; }
.journal-entry .entry-body { color: var(--text-soft); font-size: .9rem; line-height: 1.7; }

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .8rem;
}
.footer-verse { color: var(--gold); font-style: italic; margin-top: .25rem; font-size: .8rem; }

/* ── Utilities ──────────────────────────────────────────────── */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 1rem; }
.text-gold { color: var(--gold); }
.text-soft { color: var(--text-soft); }
.text-sm { font-size: .85rem; }
.w-full { width: 100%; }
.completed-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.3);
  color: #4ade80;
  font-size: .75rem;
  font-weight: 600;
  padding: .25rem .75rem;
  border-radius: 20px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .main-content { padding: 1rem; }
  .navbar { padding: .875rem 1rem; }
  .dashboard-hero { padding: 1.5rem; }
  .next-session-card { flex-direction: column; align-items: flex-start; }
  .units-grid { grid-template-columns: 1fr; }
  .session-nav { flex-direction: column; }
  .chat-input-row { flex-direction: column; }
}
