/* ===========================
   The People Pulse - Stylesheet
   =========================== */

:root {
  --primary: #1a3a8f;
  --primary-hover: #152f75;
  --primary-light: #eef2fb;
  --accent: #6abf4b;
  --accent-hover: #58a83b;
  --teal: #2a9fd6;
  --success: #6abf4b;
  --warning: #d97706;
  --danger: #dc2626;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f7f9fc;
  --white: #ffffff;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== NAVBAR ===== */
.navbar {
  background: var(--white);
  border-bottom: 3px solid var(--accent);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.nav-brand {
  display: flex;
  align-items: center;
}
.nav-brand img { height: 40px; width: auto; }
.nav-brand a { display: flex; align-items: center; text-decoration: none; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
}
.nav-links span { color: var(--text-muted); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; filter: brightness(0.95); }
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--primary); color: var(--white); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-large { padding: 14px 32px; font-size: 1.05rem; }
.btn-full { width: 100%; text-align: center; }

/* ===== CONTAINER ===== */
.container { max-width: 1000px; margin: 0 auto; padding: 32px 24px; }

/* ===== ALERTS ===== */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 0.95rem; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }

/* ===== BADGES ===== */
.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.rag-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: 700; color: white; }
.rag-badge.large { font-size: 1rem; padding: 6px 16px; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
label small { font-weight: 400; color: var(--text-muted); }
input[type=text], input[type=email], input[type=password] {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: border-color 0.15s;
  background: var(--white);
}
input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,58,143,0.1); }

/* ===== TABLES ===== */
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--border); color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.table td { padding: 12px; border-bottom: 1px solid var(--border); }
.table tr:last-child td { border-bottom: none; }

/* ===== CARDS ===== */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 24px; }
.card h2 { font-size: 1.1rem; margin-bottom: 16px; }

/* ===== HOME PAGE ===== */
.hero {
  background: linear-gradient(135deg, #0f2460 0%, #1a3a8f 55%, #2a9fd6 100%);
  color: white;
  padding: 88px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 6px;
  background: var(--accent);
}
.hero-content { max-width: 700px; margin: 0 auto; }
.hero-logo { height: 64px; margin-bottom: 28px; filter: brightness(0) invert(1); }
.hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 20px; line-height: 1.2; }
.hero p { font-size: 1.15rem; margin-bottom: 32px; opacity: 0.9; }
.hero .btn-primary { background: var(--accent); color: white; font-size: 1.1rem; box-shadow: 0 4px 14px rgba(106,191,75,0.4); }
.hero-note { margin-top: 16px; opacity: 0.7; font-size: 0.9rem; }

.features { padding: 64px 24px; background: var(--white); }
.features h2 { text-align: center; font-size: 1.8rem; margin-bottom: 40px; color: var(--primary); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; max-width: 1000px; margin: 0 auto; }
.feature-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; border-top: 3px solid var(--accent); }
.feature-icon { font-size: 2rem; margin-bottom: 12px; }
.feature-card h3 { font-size: 1rem; margin-bottom: 8px; color: var(--primary); }
.feature-card p { font-size: 0.9rem; color: var(--text-muted); }

.domains-section { padding: 48px 24px; background: var(--primary-light); text-align: center; }
.domains-section h2 { font-size: 1.8rem; margin-bottom: 24px; color: var(--primary); }
.domains-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; max-width: 800px; margin: 0 auto; }
.domain-chip { background: var(--white); border: 1.5px solid var(--primary); color: var(--primary); border-radius: 24px; padding: 8px 20px; font-weight: 600; font-size: 0.95rem; }

.cta-section { padding: 64px 24px; text-align: center; background: var(--white); }
.cta-section h2 { font-size: 1.8rem; margin-bottom: 12px; color: var(--primary); }
.cta-section p { color: var(--text-muted); margin-bottom: 24px; }

.footer { background: var(--primary); color: rgba(255,255,255,0.6); text-align: center; padding: 28px 24px; font-size: 0.9rem; }
.footer img { height: 28px; margin-bottom: 10px; filter: brightness(0) invert(1); opacity: 0.7; display: block; margin: 0 auto 10px; }
.footer a { color: rgba(255,255,255,0.6); }

/* ===== AUTH PAGE ===== */
.auth-page { background: var(--bg); }
.auth-container { display: flex; justify-content: center; align-items: flex-start; padding: 48px 24px; }
.auth-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; width: 100%; max-width: 480px; box-shadow: var(--shadow-md); border-top: 4px solid var(--accent); }
.auth-logo { display: block; height: 44px; margin: 0 auto 24px; }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 8px; color: var(--primary); text-align: center; }
.auth-sub { color: var(--text-muted); margin-bottom: 28px; font-size: 0.95rem; text-align: center; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 0.9rem; color: var(--text-muted); }

/* ===== DASHBOARD ===== */
.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.dashboard-header h1 { font-size: 1.6rem; color: var(--primary); }
.text-muted { color: var(--text-muted); }
.empty-state { text-align: center; padding: 40px; color: var(--text-muted); }
.empty-state p { margin-bottom: 16px; }
.info-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-top: 24px; }
.info-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; border-left: 4px solid var(--accent); }
.info-card h3 { font-size: 0.95rem; margin-bottom: 8px; color: var(--primary); }
.info-card p { font-size: 0.875rem; color: var(--text-muted); }

/* ===== ASSESSMENT ===== */
.assessment-layout { display: grid; grid-template-columns: 290px 1fr; min-height: calc(100vh - 64px); }
.assessment-sidebar { background: var(--white); border-right: 1px solid var(--border); padding: 24px; position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; }
.assessment-sidebar h3 { font-size: 0.85rem; margin-bottom: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 700; }
.progress-bar-wrap { background: var(--border); border-radius: 99px; height: 8px; margin-bottom: 6px; }
.progress-bar { background: var(--accent); height: 8px; border-radius: 99px; transition: width 0.3s; }
.progress-label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; }

.domains-nav { display: flex; flex-direction: column; gap: 4px; }
.domain-nav-item { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; padding: 8px 10px; border-radius: 6px; color: var(--text-muted); }
.domain-nav-item small { margin-left: auto; font-size: 0.8rem; }
.domain-nav-item.current { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.domain-nav-item.complete { color: var(--accent); }
.domain-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

.assessment-main { padding: 40px 48px; max-width: 700px; }
.domain-header { margin-bottom: 32px; }
.domain-badge { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--white); background: var(--primary); padding: 4px 12px; border-radius: 4px; }
.domain-header h2 { font-size: 1.5rem; margin: 12px 0 6px; color: var(--primary); }
.domain-header p { color: var(--text-muted); }

.question-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-md); border-top: 4px solid var(--accent); }
.question-number { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; }
.question-text { font-size: 1.15rem; font-weight: 600; line-height: 1.5; margin-bottom: 28px; color: var(--primary); }

.answer-scale { margin-bottom: 28px; }
.scale-labels { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 10px; }
.scale-options { display: flex; gap: 12px; justify-content: center; }
.scale-option input[type=radio] { display: none; }
.scale-circle {
  width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700; cursor: pointer; transition: all 0.15s;
  background: var(--white); color: var(--text-muted);
}
.scale-circle:hover { border-color: var(--accent); color: var(--accent); }

/* ===== COMPLETE PAGE ===== */
.complete-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 48px; max-width: 560px; margin: 48px auto; text-align: center; box-shadow: var(--shadow-md); border-top: 4px solid var(--accent); }
.complete-icon { font-size: 3rem; margin-bottom: 16px; }
.complete-card h1 { font-size: 1.8rem; margin-bottom: 12px; color: var(--primary); }
.complete-card p { color: var(--text-muted); margin-bottom: 16px; }
.complete-card strong { color: var(--text); }
.report-features { list-style: none; text-align: left; margin: 20px 0; }
.report-features li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.report-features li:last-child { border-bottom: none; }
.price-box { background: var(--primary-light); border: 1px solid #c7d4f0; border-radius: var(--radius); padding: 20px; margin: 24px 0; }
.price-box p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 6px; }
.price { font-size: 2.5rem; font-weight: 800; color: var(--primary); }
.secure-note { font-size: 0.85rem; color: var(--text-muted); margin-top: 12px; }

/* ===== REPORT ===== */
.report-container { max-width: 900px; margin: 0 auto; padding: 32px 24px 64px; }
.report-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 32px; }
.report-header h1 { font-size: 1.8rem; color: var(--primary); margin-bottom: 6px; }
.report-header-logo { height: 44px; }
.report-meta { color: var(--text-muted); font-size: 0.95rem; }

.overall-score-card {
  background: linear-gradient(135deg, #0f2460 0%, #1a3a8f 100%);
  color: white;
  border-radius: var(--radius);
  padding: 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
}
.overall-left h2 { font-size: 1.3rem; margin-bottom: 8px; color: white; }
.overall-left p { opacity: 0.75; font-size: 0.9rem; }
.overall-right { text-align: center; }
.score-circle { width: 110px; height: 110px; border-radius: 50%; border: 4px solid; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto 12px; background: rgba(255,255,255,0.08); }
.score-big { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.score-denom { font-size: 0.9rem; opacity: 0.7; }

.section { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); margin-bottom: 24px; }
.section h2 { font-size: 1.2rem; margin-bottom: 8px; color: var(--primary); }
.section > p { color: var(--text-muted); margin-bottom: 20px; font-size: 0.95rem; }

.priority-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.priority-card { display: flex; gap: 16px; align-items: center; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; border-left: 4px solid var(--accent); }
.priority-number { font-size: 1.8rem; font-weight: 800; color: var(--accent); min-width: 40px; }
.priority-detail h4 { font-size: 0.95rem; margin-bottom: 2px; color: var(--primary); }
.priority-detail p { font-size: 0.85rem; color: var(--text-muted); }

.domains-list { display: flex; flex-direction: column; gap: 20px; }
.domain-row { border-bottom: 1px solid var(--border); padding-bottom: 20px; }
.domain-row:last-child { border-bottom: none; padding-bottom: 0; }
.domain-row-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.domain-row-header h3 { font-size: 1rem; color: var(--primary); }
.score-bar-wrap { background: var(--border); border-radius: 99px; height: 10px; position: relative; margin-bottom: 10px; }
.score-bar { height: 10px; border-radius: 99px; transition: width 0.5s; }
.score-val { position: absolute; right: 0; top: -20px; font-size: 0.85rem; font-weight: 700; color: var(--text); }
.domain-commentary { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }

.debrief-box { background: linear-gradient(135deg, #eef2fb, #dce8f5); border: 1.5px solid #b0c4e8; border-radius: var(--radius); padding: 32px; text-align: center; margin-bottom: 24px; }
.debrief-box.booked { background: #f0fdf4; border-color: #86efac; }
.debrief-box h3 { font-size: 1.2rem; margin-bottom: 8px; color: var(--primary); }
.debrief-box p { color: var(--text-muted); margin-bottom: 16px; font-size: 0.95rem; }
.debrief-box .price { font-size: 2rem; font-weight: 800; color: var(--primary); margin-bottom: 16px; }

.report-footer { text-align: center; color: var(--text-muted); font-size: 0.85rem; padding-top: 32px; border-top: 1px solid var(--border); margin-top: 16px; }

/* ===== RESPONSIVE ===== */
.assessment-context { padding: 24px 16px 24px 0; display: flex; flex-direction: column; gap: 16px; }
.context-box { border-radius: 8px; padding: 18px; font-size: 0.875rem; line-height: 1.7; }
.context-domain { background: #eff6ff; border: 1px solid #bfdbfe; }
.context-question { background: #f0fdf4; border: 1px solid #bbf7d0; }
.context-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; }
.context-domain .context-label { color: #1e40af; }
.context-question .context-label { color: #166534; }
.context-domain p { color: #1e3a8a; }
.context-question p { color: #166534; }

/* ===== CREDIBILITY SECTION ===== */
.credibility-section { padding: 72px 24px; background: var(--white); border-top: 1px solid var(--border); }
.credibility-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; max-width: 1000px; margin: 0 auto; }
.credibility-eyebrow { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 12px; }
.credibility-text h2 { font-size: 1.8rem; color: var(--primary); margin-bottom: 20px; line-height: 1.3; }
.credibility-text p { color: #374151; line-height: 1.8; margin-bottom: 14px; font-size: 0.95rem; }
.credibility-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; border-left: 4px solid var(--accent); }
.stat-number { font-size: 2.4rem; font-weight: 800; color: var(--primary); line-height: 1; margin-bottom: 8px; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }

/* ===== GLOBAL FOOTER ===== */
body { display: flex; flex-direction: column; min-height: 100vh; }
.container, .report-container, .auth-container { flex: 1; }
.site-footer {
  background: #1e293b;
  color: #94a3b8;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  padding: 10px 24px;
  font-size: 0.8rem;
  flex-wrap: wrap;
  margin-top: auto;
}
.site-footer a { color: #94a3b8; text-decoration: underline; }
.site-footer a:hover { color: #fff; }

@media (max-width: 768px) {
  .assessment-layout { grid-template-columns: 1fr; }
  .site-footer { justify-content: center; text-align: center; }
  .credibility-grid { grid-template-columns: 1fr; gap: 32px; }
}
