/* ═══════════════════════════════════════════════════════════
   VolunTutor — styles.css
   Design system: Trust Blue · Lora headings · DM Sans body
═══════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ────────────────────────────────────────── */
:root {
  --primary:       #2563EB;
  --primary-dark:  #1D4ED8;
  --primary-light: #DBEAFE;
  --green:         #10B981;
  --green-dark:    #059669;
  --green-light:   #D1FAE5;
  --gold:          #F59E0B;
  --gold-light:    #FEF3C7;
  --danger:        #EF4444;
  --danger-light:  #FEE2E2;

  --bg:            #F8FAFC;
  --bg-alt:        #F1F5F9;
  --surface:       #FFFFFF;
  --border:        #E2E8F0;
  --border-dark:   #CBD5E1;

  --text:          #1E293B;
  --text-muted:    #64748B;
  --text-light:    #94A3B8;

  --font-body:     'DM Sans', system-ui, sans-serif;
  --font-display:  'Lora', Georgia, serif;

  --shadow-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow:        0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:     0 12px 36px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);

  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     16px;
  --radius-pill:   999px;

  --nav-h:         64px;
  --container:     1140px;
  --container-sm:  760px;

  --transition:    .15s ease;
}

/* ── RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0 0 .5em;
  line-height: 1.25;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; font-family: var(--font-body); font-weight: 600; }
p  { margin: 0 0 1em; color: var(--text-muted); }
a  { color: var(--primary); }
ul, ol { padding-left: 1.25em; }
li { margin-bottom: .3em; color: var(--text-muted); }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 1rem; }
img { max-width: 100%; display: block; }
hr { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

/* ── SKIP LINK ────────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--primary); color: #fff;
  padding: .5rem 1rem; border-radius: var(--radius); z-index: 9999;
  font-size: .9rem; font-weight: 600;
  &:focus { top: 1rem; }
}

/* ── ACCESSIBILITY HELPERS ────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap;
}

/* ── LAYOUT ───────────────────────────────────────────────── */
.container {
  width: 100%; max-width: var(--container);
  margin: 0 auto; padding: 0 1.5rem;
}
.section    { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.section-alt { background: var(--bg-alt); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.mt-1 { margin-top: .75rem; } .mt-2 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .75rem; } .mb-2 { margin-bottom: 1.5rem; }
.ml-auto { margin-left: auto; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-green { color: var(--green); }
.text-sm { font-size: .875rem; }
.text-lg { font-size: 1.15rem; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-xs { margin-top: .35rem; }
.mr-1 { margin-right: .5rem; }

/* ── NAV ──────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: var(--nav-h);
  display: flex; align-items: center;
}
.nav-inner {
  max-width: var(--container); width: 100%; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; gap: 1.5rem;
}
.nav-logo {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 700;
  color: var(--text); background: none; border: none; padding: 0;
  white-space: nowrap; flex-shrink: 0;
  &:hover { color: var(--primary); }
  span { color: var(--primary); }
}
.nav-links { display: flex; gap: .25rem; }
.nav-btn {
  background: none; border: none; padding: .45rem .75rem;
  border-radius: var(--radius-sm); font-size: .9rem; font-weight: 500;
  color: var(--text-muted); transition: color var(--transition), background var(--transition);
  &:hover { color: var(--text); background: var(--bg-alt); }
  &.active { color: var(--primary); background: var(--primary-light); }
}
.nav-auth { display: flex; gap: .5rem; margin-left: auto; }
.nav-user {
  display: flex; align-items: center; gap: .5rem; margin-left: auto;
  position: relative;
  &:hover .nav-user-menu { display: block; }
}
.nav-user-name { font-size: .9rem; font-weight: 500; }
.nav-user-menu {
  display: none; position: absolute; top: calc(100% + .5rem); right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .4rem; min-width: 180px;
  box-shadow: var(--shadow-lg); z-index: 300;
}
.menu-item {
  display: block; width: 100%; text-align: left;
  background: none; border: none; padding: .55rem .75rem;
  border-radius: var(--radius-sm); font-size: .9rem;
  color: var(--text); transition: background var(--transition);
  &:hover { background: var(--bg-alt); }
}
.menu-item-danger { color: var(--danger); &:hover { background: var(--danger-light); } }
.menu-divider { border: none; border-top: 1px solid var(--border); margin: .35rem 0; }

/* ── HAMBURGER ────────────────────────────────────────────── */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: .4rem;
  border-radius: var(--radius-sm); margin-left: auto;
  span {
    display: block; width: 22px; height: 2px;
    background: var(--text); border-radius: 2px;
    transition: transform .2s, opacity .2s;
  }
  &.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  &.open span:nth-child(2) { opacity: 0; }
  &.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ── MOBILE MENU ──────────────────────────────────────────── */
.mobile-menu {
  position: fixed; inset: 0; z-index: 400;
  background: var(--surface);
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  &.open { transform: translateX(0); }
}
.mobile-menu-inner {
  padding: 1.5rem; display: flex; flex-direction: column; height: 100%; gap: 1rem;
}
.mobile-close {
  background: none; border: none; font-size: 1.4rem; align-self: flex-end; padding: .25rem;
}
.mobile-nav-btn {
  display: block; width: 100%; text-align: left;
  background: none; border: none; padding: .9rem 0;
  font-size: 1.15rem; font-weight: 500; color: var(--text);
  border-bottom: 1px solid var(--border);
}
.mobile-auth-btns { display: flex; flex-direction: column; gap: .75rem; margin-top: auto; }

/* ── PAGE ROUTING ─────────────────────────────────────────── */
.page { display: none; min-height: calc(100vh - var(--nav-h)); }
.page.active { display: block; }

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  position: relative; padding: 7rem 0 6rem;
  background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 60%, #1e40af 100%);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(37,99,235,.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(16,185,129,.2) 0%, transparent 40%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-block; background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.2);
  padding: .35rem 1rem; border-radius: var(--radius-pill);
  font-size: .85rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; margin-bottom: 1.25rem;
}
.hero-h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: #fff; font-family: var(--font-display);
  margin-bottom: .75rem; line-height: 1.15;
}
.hero-accent { color: #60a5fa; }
.hero-sub {
  font-size: 1.15rem; color: rgba(255,255,255,.75);
  max-width: 540px; margin-bottom: 2rem; line-height: 1.7;
}
.hero-cta-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.hero-trust {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
  span { font-size: .85rem; color: rgba(255,255,255,.6); }
}

/* ── STATS BAR ────────────────────────────────────────────── */
.stats-bar { background: var(--surface); border-bottom: 1px solid var(--border); }
.stats-bar-inner {
  display: flex; align-items: center; justify-content: space-around;
  padding: 1.5rem 0; flex-wrap: wrap; gap: 1rem;
}
.stat-item { text-align: center; }
.stat-num { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: .82rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* ── PAGE HERO SM ─────────────────────────────────────────── */
.page-hero-sm {
  background: linear-gradient(120deg, #1E293B 0%, #1e40af 100%);
  padding: 3rem 0 2.5rem;
  h1 { color: #fff; margin-bottom: .4rem; }
}
.page-hero-dark { background: linear-gradient(120deg, #0F172A 0%, #1E293B 100%); }
.page-hero-sub { color: rgba(255,255,255,.7); margin: 0; font-size: 1.05rem; }

/* ── SECTION HEADER ───────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 3rem; }
.eyebrow, .overline {
  display: block; font-size: .8rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--primary); margin-bottom: .4rem;
}
.section-header h2 { margin: 0; }

/* ── HOW GRID ─────────────────────────────────────────────── */
.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.how-step { text-align: center; }
.how-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.how-step h3 { font-size: 1rem; font-family: var(--font-body); font-weight: 700; margin-bottom: .4rem; }
.how-step p { font-size: .9rem; margin: 0; }

/* ── SPLIT GRID ───────────────────────────────────────────── */
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.split-card {
  border-radius: var(--radius-lg); padding: 2.5rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.split-card-blue { background: linear-gradient(135deg, #EFF6FF, #DBEAFE); border: 1px solid #BFDBFE; }
.split-card-green { background: linear-gradient(135deg, #ECFDF5, #D1FAE5); border: 1px solid #A7F3D0; }
.split-icon { font-size: 2.5rem; }
.split-card h3 { font-size: 1.5rem; margin: 0; }
.split-list { list-style: none; padding: 0; margin: 0;
  li { padding: .4rem 0; border-bottom: 1px solid rgba(0,0,0,.06); font-size: .95rem;
       display: flex; align-items: center; gap: .5rem; color: var(--text);
       &::before { content: '✓'; color: var(--green); font-weight: 700; } }
}

/* ── SUBJECTS ─────────────────────────────────────────────── */
.subject-grid { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.subject-chip {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: .5rem 1.1rem;
  font-size: .9rem; font-weight: 500; color: var(--text);
  transition: all var(--transition);
  &:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
}
.subject-chip-more {
  background: var(--primary-light); border-color: var(--primary); color: var(--primary);
  cursor: pointer; font-weight: 600;
}

/* ── CTA BANNER ───────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 4rem 0;
}
.cta-banner-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
  h2 { color: #fff; margin: 0; }
  p  { color: rgba(255,255,255,.75); margin: .3rem 0 0; }
}
.cta-btn-row { display: flex; gap: 1rem; flex-shrink: 0; flex-wrap: wrap; }

/* ── CARDS ────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.card-sm { padding: 1rem; border-radius: var(--radius); }
.card-hover {
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: pointer;
  &:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
}
.skeleton-card { animation: skeleton-pulse 1.4s ease-in-out infinite; }
.skeleton-circle { width: 48px; height: 48px; border-radius: 50%; background: var(--bg-alt); }
.skeleton-line { height: 14px; border-radius: 4px; background: var(--bg-alt); margin-top: .65rem; }
.skeleton-line.w-60 { width: 60%; } .skeleton-line.w-40 { width: 40%; } .skeleton-line.w-full { width: 100%; }
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; } 50% { opacity: .5; }
}

/* ── AVATAR ───────────────────────────────────────────────── */
.avatar {
  border-radius: 50%; background: var(--primary);
  color: #fff; font-weight: 700; display: flex;
  align-items: center; justify-content: center;
  flex-shrink: 0; font-family: var(--font-body);
}
.avatar-sm  { width: 36px; height: 36px; font-size: .85rem; }
.avatar-md  { width: 48px; height: 48px; font-size: 1rem; }
.avatar-lg  { width: 64px; height: 64px; font-size: 1.2rem; }
.avatar-xl  { width: 80px; height: 80px; font-size: 1.5rem; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .6rem 1.25rem; border-radius: var(--radius-pill);
  font-size: .9rem; font-weight: 600; border: 2px solid transparent;
  transition: all var(--transition); text-decoration: none; white-space: nowrap;
  &:disabled { opacity: .5; cursor: not-allowed; }
}
.btn-sm { padding: .4rem .9rem; font-size: .82rem; }
.btn-lg { padding: .8rem 1.75rem; font-size: 1rem; }
.btn-xs { padding: .25rem .6rem; font-size: .78rem; }

.btn-primary {
  background: var(--primary); color: #fff; border-color: var(--primary);
  &:hover:not(:disabled) { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.35); }
}
.btn-green {
  background: var(--green); color: #fff; border-color: var(--green);
  &:hover:not(:disabled) { background: var(--green-dark); border-color: var(--green-dark); }
}
.btn-outline {
  background: transparent; color: var(--primary); border-color: var(--primary);
  &:hover:not(:disabled) { background: var(--primary-light); }
}
.btn-outline-white {
  background: transparent; color: #fff; border-color: rgba(255,255,255,.5);
  &:hover:not(:disabled) { background: rgba(255,255,255,.1); border-color: #fff; }
}
.btn-outline-red {
  background: transparent; color: var(--danger); border-color: var(--danger);
  &:hover:not(:disabled) { background: var(--danger-light); }
}
.btn-ghost {
  background: transparent; color: var(--text-muted); border-color: transparent;
  &:hover:not(:disabled) { background: var(--bg-alt); color: var(--text); }
}
.btn-danger {
  background: var(--danger); color: #fff; border-color: var(--danger);
  &:hover:not(:disabled) { opacity: .88; }
}
.btn-white {
  background: #fff; color: var(--primary); border-color: #fff;
  &:hover:not(:disabled) { background: var(--primary-light); }
}
.btn-gold {
  background: var(--gold); color: #fff; border-color: var(--gold);
  &:hover:not(:disabled) { opacity: .88; }
}
.btn-back {
  background: none; border: none; color: rgba(255,255,255,.7);
  font-size: .9rem; padding: .4rem .8rem; border-radius: var(--radius-sm);
  &:hover { color: #fff; background: rgba(255,255,255,.1); }
}
.btn-link {
  background: none; border: none; padding: 0;
  color: var(--primary); font-size: inherit; font-weight: 500;
  text-decoration: underline; cursor: pointer;
}

/* ── FORMS ────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.1rem; }
.form-label { font-size: .88rem; font-weight: 600; color: var(--text); }
.form-input {
  padding: .65rem .9rem; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: .95rem; color: var(--text);
  background: var(--surface); transition: border-color var(--transition), box-shadow var(--transition);
  &:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
  &.input-error { border-color: var(--danger); }
  &::placeholder { color: var(--text-light); }
}
textarea.form-input { resize: vertical; min-height: 100px; }
.field-error { font-size: .82rem; color: var(--danger); font-weight: 500; }
.form-checkbox-group { flex-direction: row; align-items: flex-start; }
.checkbox-label { display: flex; align-items: flex-start; gap: .5rem; font-size: .9rem; cursor: pointer;
  input[type="checkbox"] { margin-top: .2rem; flex-shrink: 0; }
}

/* ── BADGES / CHIPS ───────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: .2rem .65rem; border-radius: var(--radius-pill);
  font-size: .78rem; font-weight: 600; white-space: nowrap;
}
.badge-blue   { background: var(--primary-light); color: var(--primary); }
.badge-green  { background: var(--green-light);   color: var(--green-dark); }
.badge-gold   { background: var(--gold-light);     color: #92400E; }
.badge-gray   { background: var(--bg-alt);         color: var(--text-muted); }
.free-badge   { background: var(--green); color: #fff; }

.chip { display: inline-flex; align-items: center; padding: .25rem .65rem; border-radius: var(--radius-pill); font-size: .82rem; }
.chip-sm { font-size: .78rem; padding: .18rem .55rem; }
.chip-blue { background: var(--primary-light); color: var(--primary); }
.chip-gray { background: var(--bg-alt); color: var(--text-muted); }
.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip.on { background: var(--primary); color: #fff; }

/* ── ALERTS ───────────────────────────────────────────────── */
.alert {
  padding: .85rem 1rem; border-radius: var(--radius);
  font-size: .9rem; line-height: 1.5;
}
.alert-info    { background: var(--primary-light); color: var(--primary-dark); }
.alert-success { background: var(--green-light); color: var(--green-dark); }
.alert-error   { background: var(--danger-light); color: var(--danger); }

/* ── TUTOR CARD ───────────────────────────────────────────── */
.tutor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.tutor-card-header { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: .75rem; }
.tutor-card-info { flex: 1; min-width: 0; }
.tutor-name-row { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .2rem; }
.tutor-name { font-weight: 700; font-size: 1rem; }
.star-row { display: flex; align-items: center; gap: .2rem; }
.star-full { color: #F59E0B; } .star-empty { color: var(--border-dark); }
.rating-text { font-size: .82rem; color: var(--text-muted); }
.tutor-bio { font-size: .88rem; color: var(--text-muted); margin: .5rem 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tutor-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: .75rem; }
.tutor-stats { font-size: .8rem; color: var(--text-muted); }

/* ── FILTER BAR ───────────────────────────────────────────── */
.filter-bar { display: flex; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; align-items: center; }
.filter-input { flex: 1; min-width: 200px; }
.filter-select { width: auto; min-width: 160px; }

/* ── STATS ROW (dashboard) ────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem;
  text-align: center;
}
.stat-card-num { font-family: var(--font-display); font-size: 2rem; font-weight: 700; margin-bottom: .2rem; }
.stat-card-label { font-size: .82rem; color: var(--text-muted); font-weight: 500; }
.stat-card-blue .stat-card-num { color: var(--primary); }
.stat-card-green .stat-card-num { color: var(--green); }
.stat-card-gold .stat-card-num { color: var(--gold); }
.stat-card-red .stat-card-num { color: var(--danger); }

/* ── DASHBOARD NAV ────────────────────────────────────────── */
.dash-nav { display: flex; gap: .25rem; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; flex-wrap: wrap; }
.dash-nav-btn {
  background: none; border: none; padding: .65rem 1rem;
  font-size: .9rem; font-weight: 500; color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
  &:hover { color: var(--text); }
  &.active { color: var(--primary); border-bottom-color: var(--primary); }
}
.dash-panel { display: none; }
.dash-panel.active { display: block; }

/* ── SESSION ROW ──────────────────────────────────────────── */
.session-row {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  margin-bottom: .75rem;
}
.session-row-info { flex: 1; min-width: 0; }
.session-row-subject { font-weight: 600; font-size: .95rem; }
.session-row-peer { font-size: .85rem; color: var(--text-muted); }
.session-row-time { text-align: right; }

/* ── PROGRESS BAR ─────────────────────────────────────────── */
.pbar { width: 100%; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.pfill-blue { height: 100%; background: var(--primary); border-radius: 4px; transition: width .4s ease; }
.progress-row { margin-bottom: 1rem; }
.progress-label-row { display: flex; justify-content: space-between; margin-bottom: .35rem; }

/* ── MILESTONE ────────────────────────────────────────────── */
.milestone-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: .25rem; }
.milestone-row { margin-bottom: .35rem; }

/* ── CERT ─────────────────────────────────────────────────── */
.cert-layout { display: grid; grid-template-columns: 340px 1fr; gap: 3rem; align-items: start; }
.cert-preview-col { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
.cert-placeholder { border: 2px dashed var(--border); border-radius: var(--radius-lg);
  padding: 4rem 2rem; text-align: center; color: var(--text-muted); }
.cert-placeholder-icon { font-size: 3rem; margin-bottom: 1rem; }

.certbox {
  background: linear-gradient(160deg, #0F172A 0%, #1e3a5f 100%);
  border-radius: var(--radius-lg); padding: 2.5rem; position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.cert-watermark {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-30deg);
  font-family: var(--font-display); font-size: 5rem; font-weight: 700;
  color: rgba(255,255,255,.04); pointer-events: none; white-space: nowrap;
}
.cert-header { text-align: center; margin-bottom: 1.25rem; }
.cert-logo { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: #fff;
  span { color: #60a5fa; } }
.cert-tagline { font-size: .8rem; color: rgba(255,255,255,.5); margin-top: .2rem; }
.cert-divider { border: none; border-top: 1px solid rgba(255,255,255,.12); margin: 1rem 0; }
.cert-body { text-align: center; margin: 1.25rem 0; }
.cert-label { font-size: .8rem; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: .06em; }
.cert-name { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: #fff; margin: .4rem 0 .6rem; }
.cert-stats { display: flex; gap: 2rem; justify-content: center; }
.cert-stat { text-align: center; }
.cert-stat-num { font-family: var(--font-display); font-size: 2.5rem; font-weight: 700; color: #60a5fa; }
.cert-stat-label { font-size: .78rem; color: rgba(255,255,255,.55); margin-top: .2rem; }
.cert-footer { text-align: center; }
.cert-issued { font-size: .82rem; color: rgba(255,255,255,.5); }
.cert-verify { font-size: .85rem; color: rgba(255,255,255,.75); margin: .35rem 0; }
.cert-verify-url { font-size: .75rem; color: rgba(255,255,255,.4); }
.cert-actions { display: flex; gap: .75rem; justify-content: center; margin-top: 1.25rem; }
.cert-cta-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ── CHAT ─────────────────────────────────────────────────── */
.chat-layout {
  display: grid; grid-template-columns: 280px 1fr;
  height: calc(100vh - var(--nav-h)); overflow: hidden;
}
.chat-sidebar { border-right: 1px solid var(--border); background: var(--surface); overflow-y: auto; display: flex; flex-direction: column; }
.chat-sidebar-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); h3 { margin: 0; font-size: 1rem; } }
.chat-contacts { flex: 1; overflow-y: auto; }
.chat-contact-btn {
  display: flex; align-items: center; gap: .75rem;
  width: 100%; text-align: left; background: none; border: none;
  padding: .85rem 1.25rem; transition: background var(--transition);
  border-bottom: 1px solid var(--border);
  &:hover { background: var(--bg-alt); }
  &.active { background: var(--primary-light); }
}
.chat-contact-avatar-wrap { position: relative; }
.unread-dot { position: absolute; top: 0; right: 0; width: 10px; height: 10px;
  background: var(--danger); border-radius: 50%; border: 2px solid var(--surface); }
.chat-contact-name { font-weight: 600; font-size: .9rem; }
.chat-contact-role { font-size: .8rem; }
.chat-main { display: flex; flex-direction: column; background: var(--bg); }
.chat-header { padding: 1rem 1.5rem; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .75rem; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: .75rem; }
.chat-select-prompt, .chat-no-msgs, .chat-empty { color: var(--text-muted); text-align: center; font-size: .9rem; padding: 2rem; }
.chat-input-row { padding: 1rem 1.5rem; background: var(--surface); border-top: 1px solid var(--border); }
.chat-safety-notice { font-size: .78rem; color: var(--text-muted); margin-bottom: .5rem; }
.chat-input-group { display: flex; gap: .75rem; }
.chat-input { flex: 1; }
.msg-row { display: flex; }
.msg-row-me { justify-content: flex-end; }
.msg-row-them { justify-content: flex-start; }
.msg-bubble { max-width: 70%; padding: .65rem .9rem; border-radius: var(--radius-lg); font-size: .92rem; }
.msg-bubble-me { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.msg-bubble-them { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg-time { display: block; font-size: .72rem; opacity: .6; margin-top: .25rem; }

/* ── SESSION ROOM ─────────────────────────────────────────── */
.session-room { background: #0F172A; min-height: calc(100vh - var(--nav-h)); color: #fff; }
.session-room-inner { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }
.session-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.session-logo { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: #fff; span { color: #60a5fa; } }
.session-status-bar { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); padding: 1rem 1.5rem; display: flex; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.session-detail-label { font-size: .75rem; color: rgba(255,255,255,.45); text-transform: uppercase; letter-spacing: .05em; }
.session-detail-value { font-weight: 600; color: #fff; font-size: .95rem; }
.session-detail-sub { font-size: .8rem; color: rgba(255,255,255,.5); }
.session-status-badge { font-size: 1rem; font-weight: 700; }
.session-grid { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; }
.session-panel { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.panel-title { font-size: .9rem; font-weight: 700; color: rgba(255,255,255,.7); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 .75rem; font-family: var(--font-body); }
.countdown-panel { text-align: center; }
.countdown-label { font-size: .8rem; color: rgba(255,255,255,.45); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .5rem; }
.countdown-display { font-family: var(--font-display); font-size: 3.5rem; font-weight: 700; color: #60a5fa; letter-spacing: .05em; }
.countdown-sub { font-size: .82rem; color: rgba(255,255,255,.45); margin: .5rem 0 1.25rem; }
.join-btn-wrapper { margin: .75rem 0; }
.join-btn {
  background: var(--green); color: #fff; border: none; border-radius: var(--radius-pill);
  padding: .85rem 2rem; font-size: 1rem; font-weight: 700; cursor: pointer; width: 100%;
  transition: all var(--transition);
  &:disabled { background: rgba(255,255,255,.15); color: rgba(255,255,255,.4); cursor: not-allowed; }
  &:not(:disabled):hover { background: var(--green-dark); transform: translateY(-1px); }
}
.backup-link { font-size: .82rem; color: rgba(255,255,255,.4); margin: .5rem 0 0; a { color: #93C5FD; } }
.participants-row { display: flex; flex-direction: column; gap: .75rem; }
.participant { display: flex; align-items: center; gap: .65rem; }
.participant-name { font-weight: 600; font-size: .9rem; }
.participant-role { font-size: .78rem; color: rgba(255,255,255,.45); }
.session-notes-input { width: 100%; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-sm); padding: .65rem; color: #fff; font-size: .9rem; resize: vertical; min-height: 100px; box-sizing: border-box; &::placeholder { color: rgba(255,255,255,.3); } &:focus { outline: none; border-color: #60a5fa; } }
.notes-status { font-size: .78rem; color: rgba(255,255,255,.4); margin-top: .35rem; }
.session-id-panel { padding: .75rem 1rem; }
.session-id { font-size: .72rem; color: rgba(255,255,255,.4); word-break: break-all; }
.action-stack { display: flex; flex-direction: column; gap: .65rem; }
.safety-panel { border-color: rgba(239,68,68,.3); }
.safety-title { color: rgba(239,68,68,.8); }
.safety-note { font-size: .82rem; color: rgba(255,255,255,.45); margin-bottom: .75rem; }
.verify-status-list { display: flex; flex-direction: column; gap: .5rem; }
.verify-row { display: flex; justify-content: space-between; align-items: center; font-size: .88rem; }
.verify-label { color: rgba(255,255,255,.6); }
.verify-val.done { color: var(--green); font-weight: 600; }
.verify-val.pending { color: var(--gold); }
.rating-panel { background: rgba(255,255,255,.07); }
.star-picker { display: flex; gap: .5rem; margin: .5rem 0; }
.rating-star { font-size: 2rem; color: rgba(255,255,255,.3); cursor: pointer; transition: color var(--transition), transform var(--transition); &:hover { transform: scale(1.15); } }

/* ── LEADERBOARD ──────────────────────────────────────────── */
.lb-stats-bar { display: flex; gap: 2rem; margin-bottom: 2rem; flex-wrap: wrap; }
.lb-stat { font-size: 1.5rem; font-weight: 700; font-family: var(--font-display); color: var(--primary); }
.lb-stat-label { font-size: .82rem; font-weight: 400; color: var(--text-muted); font-family: var(--font-body); margin-left: .3rem; }
.lb-list { display: flex; flex-direction: column; gap: .75rem; }
.mrow { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .85rem 1rem; display: flex; align-items: center; gap: .85rem; }
.rank-medal { font-size: 1.5rem; width: 36px; text-align: center; }
.rank-num { font-size: .9rem; color: var(--text-muted); font-weight: 600; }
.lb-info { flex: 1; min-width: 0; }
.lb-hours { text-align: right; }
.lb-hours-num { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.lb-hours-label { font-size: .78rem; color: var(--text-muted); }

/* ── IMPACT STATS ─────────────────────────────────────────── */
.impact-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.impact-stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; text-align: center; }
.impact-num { font-family: var(--font-display); font-size: 3rem; font-weight: 700; color: var(--text); margin-bottom: .4rem; }
.impact-label { font-size: .9rem; color: var(--text-muted); font-weight: 500; }
.impact-stat-card-blue .impact-num { color: var(--primary); }
.impact-stat-card-green .impact-num { color: var(--green); }
.impact-stat-card-gold .impact-num { color: var(--gold); }

/* ── MODALS ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 1.5rem;
  &.open { display: flex; }
}
.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 2rem; max-width: 460px; width: 100%;
  position: relative; box-shadow: var(--shadow-lg);
  max-height: 90vh; overflow-y: auto;
  h2 { margin-bottom: 1.5rem; }
}
.modal-lg { max-width: 620px; }
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--bg-alt); border: none; border-radius: 50%;
  width: 32px; height: 32px; font-size: 1rem; display: flex;
  align-items: center; justify-content: center;
  &:hover { background: var(--border); }
}
.modal-footer-links { margin-top: 1rem; display: flex; flex-direction: column; gap: .5rem; align-items: center; font-size: .88rem; }

/* ── ROLE SELECTOR ────────────────────────────────────────── */
.role-selector { display: flex; gap: .5rem; }
.role-btn {
  flex: 1; background: var(--bg-alt); border: 2px solid var(--border);
  border-radius: var(--radius); padding: .65rem .5rem;
  font-size: .88rem; font-weight: 600; color: var(--text-muted);
  display: flex; flex-direction: column; align-items: center; gap: .25rem;
  transition: all var(--transition);
  span { font-size: 1.25rem; }
  &:hover { border-color: var(--primary); color: var(--primary); }
  &.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
}

/* ── BOOKING MODAL ────────────────────────────────────────── */
.booking-tutor-row { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.booking-tutor-name { font-weight: 700; }
.booking-tutor-subs { font-size: .85rem; color: var(--text-muted); }
.booking-section { margin-bottom: 1.25rem; }
.slot-grid { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.bslot {
  padding: .35rem .8rem; border-radius: var(--radius-pill);
  border: 1.5px solid var(--border); background: var(--surface);
  font-size: .85rem; font-weight: 500; color: var(--text);
  transition: all var(--transition); cursor: pointer;
  &:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
  &.on { border-color: var(--primary); background: var(--primary); color: #fff; }
  &.disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
}
.booking-notice { margin: 1rem 0; font-size: .85rem; }
.booking-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 1rem; border-top: 1px solid var(--border); gap: 1rem; }
.booking-success { text-align: center; padding: 1rem 0; }
.booking-success .success-icon { font-size: 3rem; color: var(--green); margin-bottom: .5rem; }
.booking-success h3 { margin-bottom: .3rem; }
.booking-success-actions { display: flex; gap: 1rem; justify-content: center; margin-top: 1.5rem; }

/* ── STAT PILLS ───────────────────────────────────────────── */
.stats-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.stat-pill { background: var(--bg-alt); border-radius: var(--radius); padding: .75rem; text-align: center; }
.stat-pill-blue .stat-pill-num { color: var(--primary); }
.stat-pill-green .stat-pill-num { color: var(--green); }
.stat-pill-gold .stat-pill-num { color: var(--gold); }
.stat-pill-num { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; display: block; }
.stat-pill-label { font-size: .75rem; color: var(--text-muted); }

/* ── TUTOR MODAL ──────────────────────────────────────────── */
.tutor-modal-header { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.25rem; }
.name-badge-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.modal-section { margin-bottom: 1rem; }
.modal-cta-row { display: flex; gap: .75rem; margin-top: 1.5rem; flex-wrap: wrap; }
.loading-spinner {
  width: 36px; height: 36px; margin: 2rem auto;
  border: 3px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── TOAST ────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(120%);
  background: var(--text); color: #fff; padding: .75rem 1.5rem;
  border-radius: var(--radius-pill); font-size: .9rem; font-weight: 500;
  z-index: 1000; box-shadow: var(--shadow-lg);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), opacity .25s;
  opacity: 0; white-space: nowrap; max-width: 90vw; text-align: center;
  &.show { transform: translateX(-50%) translateY(0); opacity: 1; }
  &.toast-success { background: var(--green); }
  &.toast-error   { background: var(--danger); }
  &.toast-info    { background: var(--primary); }
  &.toast-warning { background: var(--gold); }
}

/* ── MISC COMPONENTS ──────────────────────────────────────── */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-icon { font-size: 3rem; margin-bottom: .75rem; }
.table-wrapper { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem;
  th { background: var(--bg-alt); font-weight: 600; text-align: left; padding: .65rem .85rem; border-bottom: 2px solid var(--border); font-size: .82rem; }
  td { padding: .75rem .85rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
  tr:hover td { background: var(--bg-alt); }
}
.export-btn-row { display: flex; gap: .75rem; flex-wrap: wrap; }
.flagged-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.flagged-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.verify-status-list { font-size: .88rem; }
.info-box { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem; }
.testimonial { margin: 0 0 1rem; padding: .75rem 1rem; border-left: 3px solid var(--primary); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  cite { display: block; font-size: .8rem; color: var(--text-muted); font-style: normal; margin-top: .4rem; }
}
.check-list { list-style: none; padding: 0; margin: 0;
  li { display: flex; gap: .5rem; padding: .35rem 0; color: var(--text-muted);
       &::before { content: '✓'; color: var(--green); font-weight: 700; flex-shrink: 0; }
  }
}
.benefit-list { display: flex; flex-direction: column; gap: 1.25rem; }
.benefit-item { display: flex; gap: .85rem; align-items: flex-start; }
.benefit-icon { font-size: 1.75rem; flex-shrink: 0; }
.steps-list { padding-left: 1.25rem;
  li { margin-bottom: .75rem; color: var(--text-muted); }
}
.about-prose { max-width: var(--container-sm); p { color: var(--text-muted); line-height: 1.8; } }
.about-cta-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.donate-layout { display: grid; grid-template-columns: 1fr 360px; gap: 3rem; align-items: start; }
.prose-page { max-width: var(--container-sm); h2 { margin: 1.75rem 0 .5rem; font-size: 1.3rem; } }

/* ── FOOTER ───────────────────────────────────────────────── */
.site-footer { background: #0F172A; padding: 4rem 0 0; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 3rem; padding-bottom: 3rem; }
.footer-logo { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: .4rem; span { color: #60a5fa; } }
.footer-tagline { color: rgba(255,255,255,.4); font-size: .88rem; line-height: 1.6; margin-bottom: 1.25rem; }
.footer-col-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.3); margin-bottom: .75rem; }
.footer-link { display: block; background: none; border: none; text-align: left; padding: .3rem 0; font-size: .88rem; color: rgba(255,255,255,.5); transition: color var(--transition); &:hover { color: #fff; } }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 1.25rem 0; text-align: center; font-size: .82rem; color: rgba(255,255,255,.3); }
.nl-form { display: flex; gap: .5rem; }
.nl-input { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); color: #fff; flex: 1; &::placeholder { color: rgba(255,255,255,.35); } }
.nl-btn { flex-shrink: 0; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .how-grid { grid-template-columns: repeat(2, 1fr); }
  .tutor-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .cert-layout { grid-template-columns: 1fr; }
  .cert-preview-col { position: static; }
  .session-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-auth  { display: none; }
  .hamburger { display: flex; }

  .hero { padding: 5rem 0 4rem; }
  .hero-cta-row { flex-direction: column; align-items: flex-start; }

  .how-grid     { grid-template-columns: 1fr; gap: 1.5rem; }
  .split-grid   { grid-template-columns: 1fr; }
  .two-col      { grid-template-columns: 1fr; }
  .stats-row    { grid-template-columns: repeat(2, 1fr); }
  .impact-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .tutor-grid   { grid-template-columns: 1fr; }
  .filter-bar   { flex-direction: column; }
  .filter-select, .filter-input { width: 100%; }
  .cta-banner-inner { flex-direction: column; }
  .donate-layout { grid-template-columns: 1fr; }

  .chat-layout  { grid-template-columns: 1fr; }
  .chat-sidebar { display: none; }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .stats-grid-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .stats-row    { grid-template-columns: repeat(2, 1fr); }
  .impact-stats-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-trust   { flex-direction: column; gap: .35rem; }
  .booking-footer { flex-direction: column; }
  .cta-btn-row  { flex-direction: column; }
  .stats-bar-inner { justify-content: center; }
  .stat-divider { display: none; }
}
ENDOFHTML
echo "styles.css done. Lines:" && wc -l /home/claude/voluntutor/css/styles.css