/* =============================================================
   Cognitive Blueprint™ — Global Stylesheet
   Matches the assessment's design language exactly.
   Inter for body, Playfair Display for display headings.
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --navy:        #22364f;
  --navy-2:      #314866;
  --cobalt:      #1e5a96;
  --cobalt-soft: #e8f4f8;
  --gold:        #b18b52;
  --gold-soft:   #f7f1e8;
  --bg:          #f8fbff;
  --white:       #ffffff;
  --ink:         #1f2f46;
  --ink-soft:    #4d617a;
  --muted:       #8a9bb0;
  --line:        #cfd8e3;
  --line-light:  #e8eff5;
  --panel:       #f4f7fa;
  --success:     #1a6b35;
  --success-bg:  #eff7f2;
  --error:       #c0392b;
  --error-bg:    #fdf0ef;
  --warning-bg:  #fef8ec;
  --shadow-sm:   0 2px 8px rgba(31,47,70,.06);
  --shadow:      0 4px 20px rgba(31,47,70,.10);
  --shadow-lg:   0 12px 40px rgba(31,47,70,.14);
  --radius-sm:   8px;
  --radius:      12px;
  --radius-lg:   18px;
  --max:         980px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
a { color: var(--cobalt); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ── Typography ────────────────────────────────────────────── */
.display {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}
h1, h2, h3 { color: var(--navy); font-weight: 700; line-height: 1.3; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.1rem; }
p { margin-bottom: .75rem; color: var(--ink-soft); }
p:last-child { margin-bottom: 0; }

/* ── Layout Helpers ────────────────────────────────────────── */
.wrap  { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.wrap--sm { max-width: 520px; margin: 0 auto; padding: 0 24px; }
.wrap--md { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* ── Top Nav ────────────────────────────────────────────────── */
.site-nav {
  background: var(--white);
  border-bottom: 1px solid var(--line-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.site-nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-nav__logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -.01em;
}
.site-nav__logo span { color: var(--gold); }
.site-nav__links { display: flex; align-items: center; gap: 20px; }
.site-nav__links a { font-size: .875rem; font-weight: 500; color: var(--ink-soft); }
.site-nav__links a:hover { color: var(--navy); text-decoration: none; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 40px;
}
.card--sm { padding: 28px 32px; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .03em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  -webkit-appearance: none;
}
.form-input:focus {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(30,90,150,.12);
}
.form-input::placeholder { color: var(--muted); }
.form-hint {
  font-size: .8125rem;
  color: var(--muted);
  margin-top: 5px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s ease;
  white-space: nowrap;
}
.btn--primary {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--white);
  box-shadow: 0 2px 10px rgba(34,54,79,.25);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(34,54,79,.35);
  text-decoration: none;
  color: var(--white);
}
.btn--primary:active { transform: translateY(0); }
.btn--secondary {
  background: var(--white);
  color: var(--navy);
  border: 1.5px solid var(--line);
}
.btn--secondary:hover {
  border-color: var(--navy);
  background: var(--panel);
  text-decoration: none;
  color: var(--navy);
}
.btn--gold {
  background: linear-gradient(135deg, #b18b52 0%, #9a7540 100%);
  color: var(--white);
  box-shadow: 0 2px 10px rgba(177,139,82,.3);
}
.btn--gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(177,139,82,.4);
  text-decoration: none;
  color: var(--white);
}
.btn--full { width: 100%; }
.btn--sm { padding: 8px 18px; font-size: .875rem; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none !important; }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.badge--green  { background: var(--success-bg); color: var(--success); }
.badge--amber  { background: var(--warning-bg); color: #92400e; }
.badge--navy   { background: var(--cobalt-soft); color: var(--cobalt); }
.badge--muted  { background: var(--line-light); color: var(--muted); }

/* ── Flash messages ──────────────────────────────────────────── */
.flash {
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  margin-bottom: 20px;
}
.flash--success { background: var(--success-bg); color: var(--success); border-left: 3px solid var(--success); }
.flash--error   { background: var(--error-bg);   color: var(--error);   border-left: 3px solid var(--error); }
.flash--info    { background: var(--cobalt-soft); color: var(--cobalt);  border-left: 3px solid var(--cobalt); }

/* ── Auth pages layout ───────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.auth-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 32px;
  text-align: center;
}
.auth-logo span { color: var(--gold); }
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
}
.auth-card h1 { font-size: 1.5rem; margin-bottom: 6px; }
.auth-card .auth-subtitle { color: var(--ink-soft); font-size: .9375rem; margin-bottom: 28px; }
.auth-footer { margin-top: 24px; text-align: center; font-size: .875rem; color: var(--muted); }
.auth-footer a { color: var(--cobalt); font-weight: 500; }
.auth-divider { margin: 20px 0; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .8125rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ── Dashboard layout ────────────────────────────────────────── */
.dashboard {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 24px;
}
.dashboard__header { margin-bottom: 36px; }
.dashboard__greeting {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.dashboard__subtitle { color: var(--ink-soft); font-size: .9375rem; }
.dashboard__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}
.report-card {
  background: var(--white);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
}
.report-card__kicker {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.report-card__title { font-size: 1.2rem; margin-bottom: 10px; }
.report-card__meta { font-size: .8125rem; color: var(--muted); margin-bottom: 18px; }
.report-card--locked { opacity: .65; }
.report-card--locked .btn { pointer-events: none; }

/* ── Product page ────────────────────────────────────────────── */
.product-hero {
  background: linear-gradient(160deg, #22364f 0%, #314866 100%);
  color: var(--white);
  padding: 80px 24px;
  text-align: center;
}
.product-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  color: var(--white);
  max-width: 700px;
  margin: 0 auto 16px;
  line-height: 1.2;
}
.product-hero p { color: rgba(255,255,255,.8); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }
.product-hero .kicker {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.product-body { max-width: 820px; margin: 0 auto; padding: 60px 24px; }
.feature-list { list-style: none; margin: 0 0 32px; }
.feature-list li {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-light);
  font-size: .9375rem;
  color: var(--ink-soft);
}
.feature-list li:last-child { border-bottom: none; }
.feature-list .check {
  width: 20px;
  height: 20px;
  background: var(--success-bg);
  color: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.price-box {
  background: var(--gold-soft);
  border: 1.5px solid rgba(177,139,82,.25);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  margin: 32px 0;
}
.price-box .price-amount {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 6px;
}
.price-box .price-desc { color: var(--ink-soft); font-size: .9rem; margin-bottom: 24px; }

/* ── Admin ───────────────────────────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px;
  background: var(--navy);
  color: var(--white);
  padding: 28px 0;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-sidebar__logo {
  padding: 0 24px 28px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 20px;
  font-family: 'Playfair Display', serif;
  font-size: .95rem;
  font-weight: 700;
  color: var(--white);
}
.admin-sidebar__logo span { color: var(--gold); }
.admin-sidebar__label {
  padding: 0 24px 8px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
}
.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  font-size: .875rem;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  transition: all .15s;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
  background: rgba(255,255,255,.08);
  color: var(--white);
}
.admin-main { flex: 1; padding: 40px; background: var(--bg); overflow-x: auto; }
.admin-header { margin-bottom: 32px; }
.admin-header h1 { font-size: 1.5rem; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 36px; }
.stat-card {
  background: var(--white);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}
.stat-card__value { font-size: 2rem; font-weight: 700; color: var(--navy); line-height: 1; margin-bottom: 4px; }
.stat-card__label { font-size: .8125rem; color: var(--muted); font-weight: 500; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  background: var(--white);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.data-table th {
  background: var(--panel);
  padding: 12px 16px;
  text-align: left;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}
.data-table td {
  padding: 13px 16px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-light);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--panel); }
.data-table .name-cell { color: var(--ink); font-weight: 500; }

/* ── Payment pages ───────────────────────────────────────────── */
.status-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  flex-direction: column;
  text-align: center;
}
.status-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 24px;
}
.status-icon--success { background: var(--success-bg); }
.status-icon--pending { background: var(--warning-bg); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .card { padding: 24px 20px; }
  .auth-card { padding: 32px 24px; }
  .form-row { grid-template-columns: 1fr; }
  .dashboard__grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; }
  .admin-main { padding: 24px 16px; }
  .product-hero h1 { font-size: 1.75rem; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.5rem; }
}
