/* ==========================================================================
   AfriTutors — global stylesheet
   Palette: black, red, white + Uganda yellow, deep blue, green, indigo, teal.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Web fonts, self-hosted. Serving them from our own origin means the site
   never calls a third party, so no visitor IP leaks to Google and the pages
   still work offline. Inter carries the interface; Source Serif 4 carries
   headings and figures — a book-like face that suits a school.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('assets/fonts/source-serif-4-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('assets/fonts/source-serif-4-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Core brand */
  --black: #0b0b0c;
  --near-black: #141418;
  --red: #e11d2e;
  --red-dark: #b3101f;
  --white: #ffffff;
  --yellow: #fcd303;      /* Uganda flag yellow */
  --blue: #1d4ed8;        /* deep blue */
  --blue-dark: #153bb0;
  --green: #0e9f6e;

  /* Extra two brand accents */
  --indigo: #4f46e5;
  --teal: #0d9488;

  /* Neutrals */
  --ink: #16161a;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #f7f7f8;
  --surface-2: #eef0f3;

  /* Chat */
  --chat-bg: #f2f6f3;
  --chat-input: #e7f6ec;
  --chat-send: #0e9f6e;

  /* Status */
  --ok: #0e9f6e;
  --warn: #d97706;
  --danger: #dc2626;
  --info: #2563eb;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(11, 11, 12, 0.10);
  --shadow-sm: 0 2px 10px rgba(11, 11, 12, 0.07);
  --maxw: 1200px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  /* Fluid spacing / sizing used by the marketing pages so they adapt to any
     screen without needing a breakpoint for every size. */
  --gutter: clamp(16px, 4vw, 24px);
  --section-y: clamp(52px, 7vw, 84px);
  --radius-lg: 20px;
  --glass: rgba(12, 12, 15, 0.55);
  --glass-line: rgba(255, 255, 255, 0.16);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;  /* stop iOS inflating text in landscape */
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Long emails and URLs must never push a phone screen sideways. */
  overflow-wrap: break-word;
}

img, svg, video { max-width: 100%; }

img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Headings use the serif so the site reads like a schoolbook, not a dashboard. */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding: var(--section-y) 0; }
.section--tight { padding: 40px 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row--between { justify-content: space-between; }
.grow { flex: 1 1 auto; }
/* Grid/flex children default to min-content width and can overflow on small
   screens; this keeps long words and images inside their column. */
.grid > *, .hero__grid > *, .dash > * { min-width: 0; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--blue);
  --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: var(--btn-bg); color: var(--btn-fg); font-weight: 650; font-size: 15px;
  cursor: pointer; transition: transform .06s ease, filter .15s ease, box-shadow .15s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn--red { --btn-bg: var(--red); }
.btn--green { --btn-bg: var(--green); }
.btn--black { --btn-bg: var(--black); }
.btn--yellow { --btn-bg: var(--yellow); --btn-fg: #1a1a1a; }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface); }
/* Ghost button on the dark hero/photo backgrounds. */
.btn--ghost-light { --btn-bg: rgba(255,255,255,.06); --btn-fg: #fff; border-color: rgba(255,255,255,.38); }
.btn--ghost-light:hover { background: rgba(255,255,255,.16); }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--blue); border-color: var(--blue); }
.btn--sm { padding: 7px 12px; font-size: 13.5px; }
.btn--lg { padding: 16px 30px; font-size: 18px; border-radius: 12px; }
.btn--block { width: 100%; }

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(9, 9, 11, .94); color: #fff;
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 0 1px 0 rgba(225, 29, 46, .6);
}
.nav__inner { position: relative; display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: .2px; color: #fff; display: flex; align-items: center; gap: 10px; flex: none; }
.brand:hover { text-decoration: none; }
/* The emblem sits on a small white tile: on the near-black bar the black
   graduation cap would otherwise disappear. */
.brand__logo { width: 40px; height: 40px; flex: none; box-sizing: border-box; padding: 4px; background: #fff; border-radius: 12px; object-fit: contain; }
.brand__logo--footer { width: 38px; height: 38px; }
.brand span { color: var(--red); }
.nav__links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav__links a { color: #e7e7ea; padding: 10px 12px; border-radius: 9px; font-weight: 550; font-size: 15px; }
.nav__links a:hover { background: rgba(255,255,255,.10); text-decoration: none; }
.nav__links a.is-active { color: var(--yellow); }
.nav__toggle {
  display: none; margin-left: auto; min-width: 46px; min-height: 44px;
  align-items: center; justify-content: center;
  background: rgba(255,255,255,.07); border: 1px solid #3a3a42; color: #fff;
  border-radius: 10px; font-size: 19px; line-height: 1; cursor: pointer;
}
.nav__toggle:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.nav__cta { display: flex; gap: 8px; align-items: center; }
/* Set while the mobile menu is open so the page behind cannot scroll. */
body.nav-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; background: #0b0b0c; }
.hero__media { position: absolute; inset: 0; z-index: -1; }
/* Four classroom photographs cross-fade behind the floating panel. Each slide
   holds for ~6s and dissolves into the next; the 8s offsets keep the 32s loop
   seamless, and the negative delay on the first slide means there is a picture
   on screen the moment the page paints. */
.hero__slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 42%;
  opacity: 0;
  animation: heroFade 32s ease-in-out infinite;
}
.hero__slide:nth-child(1) { animation-delay: -1s; }
.hero__slide:nth-child(2) { animation-delay: 7s; }
.hero__slide:nth-child(3) { animation-delay: 15s; }
.hero__slide:nth-child(4) { animation-delay: 23s; }
@keyframes heroFade {
  0%   { opacity: 0; }
  3%   { opacity: 1; }
  25%  { opacity: 1; }
  28%  { opacity: 0; }
  100% { opacity: 0; }
}
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(115deg, rgba(6,6,8,.95) 0%, rgba(8,8,11,.87) 36%, rgba(12,7,9,.62) 72%, rgba(12,7,9,.45) 100%),
    linear-gradient(0deg, rgba(6,6,8,.5), rgba(6,6,8,.15));
}
.hero__grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px;
  padding-block: clamp(36px, 6vw, 84px);
  min-height: min(82vh, 700px);
  align-content: center;
}
/* The floating, semi-transparent text zone. */
.hero__panel {
  max-width: 640px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 24px;
  padding: clamp(20px, 3vw, 34px);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .5);
}
.hero__eyebrow { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--yellow); margin-bottom: 8px; }
.hero__title { font-family: var(--font-display); font-size: clamp(42px, 7.6vw, 74px); line-height: .98; letter-spacing: -1.4px; font-weight: 700; margin: 0 0 12px; }
.hero__title span { color: var(--red); }
.hero__lead { font-size: clamp(15.5px, 1.5vw, 18.5px); color: #dedee3; max-width: 56ch; margin-bottom: 20px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
/* auto-fit collapses the spare track, so three figures share the panel evenly
   while four would still sit two-by-two. */
.hero__stats { list-style: none; display: grid; gap: 10px; margin: 22px 0 0; padding: 0; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }
.hero__stats li { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.13); border-radius: 14px; padding: 12px 13px; }
.hero__num { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(25px, 2.8vw, 35px); line-height: 1; font-variant-numeric: tabular-nums; }
.hero__num--red { color: #ff97a2; }
.hero__label { display: block; margin-top: 7px; font-size: 11.5px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: #cfcfd6; }
.hero__trust { margin: 16px 0 0; font-size: 13px; color: #bcbcc4; }
/* Photograph attribution. The two CC BY images require credit wherever they
   appear, so it travels with the slideshow. */
.hero__credit {
  position: relative; z-index: 1;
  max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter) 16px;
  font-size: 11.5px; line-height: 1.55; color: rgba(255, 255, 255, .62);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .75);
}
.hero__credit a { color: rgba(255, 255, 255, .78); text-decoration: underline; }

/* ---------- Inline icons (used instead of emoji) ---------- */
/* Size comes from the inline style set by icon(); these rules only make the
   box behave predictably inside flex/grid layouts. */
.icon { display: inline-flex; align-items: center; justify-content: center; flex: none; vertical-align: middle; }
.icon svg { width: 100%; height: 100%; display: block; }

/* ---------- Pills & light panels (used on dark bands too) ---------- */
.pill { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.16); color: #fff; padding: 7px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 600; }
.pill--yellow { background: var(--yellow); color: #111; border-color: var(--yellow); }
.pill--red { background: var(--red); border-color: var(--red); }
.pill--dark { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.hero__card { background: #fff; color: var(--ink); border-radius: var(--radius-lg); padding: clamp(20px, 2.4vw, 26px); box-shadow: var(--shadow); }
.hero__card h3 { margin-top: 0; }
.hero__card p:last-child { margin-bottom: 0; }

/* ---------- Section headings ---------- */
.eyebrow { color: var(--red); font-weight: 800; text-transform: uppercase; letter-spacing: 1.4px; font-size: 12.5px; margin-bottom: 8px; }
.h2 { font-size: clamp(24px, 3vw, 36px); font-weight: 820; letter-spacing: -.4px; }
.sub { color: var(--muted); max-width: 68ch; }
.dark-band { background: var(--black); color: #fff; }
.dark-band .sub, .dark-band .muted { color: #b9b9c0; }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.card--flat { box-shadow: none; }
.card__title { font-size: 18px; font-weight: 750; margin-bottom: 6px; }
/* Centered status block: email verification, logout, error and reset pages. */
.status__icon { color: var(--red); margin-bottom: 8px; }
.status__card { max-width: 520px; }

.feature { display: flex; gap: 14px; }
.feature__icon { width: 46px; height: 46px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--surface-2); }
.feature__icon--red { background: #fde8ea; color: var(--red); }
.feature__icon--blue { background: #e6edfd; color: var(--blue); }
.feature__icon--green { background: #e3f6ee; color: var(--green); }
.feature__icon--yellow { background: #fef7d6; color: #a97c00; }

/* Tutor profile card */
.tutor { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .12s ease, box-shadow .15s ease; }
.tutor:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tutor__photo { aspect-ratio: 4 / 3; background: linear-gradient(135deg, #1a1a1e, #35353d); position: relative; overflow: hidden; }
.tutor__photo img { width: 100%; height: 100%; object-fit: cover; }
.tutor__verified { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 4px; background: var(--green); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.tutor__body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tutor__name { font-weight: 780; font-size: 17px; }
.tutor__subject { color: var(--red); font-weight: 650; }
.tutor__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { background: var(--surface-2); color: #374151; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; }
.tag--blue { background: #e6edfd; color: var(--blue-dark); }
.tag--green { background: #e3f6ee; color: #06603f; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.label { display: block; font-weight: 650; font-size: 14px; margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; color: var(--ink); background: #fff; transition: border-color .12s ease, box-shadow .12s ease;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29,78,216,.15); }
.textarea { min-height: 120px; resize: vertical; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.error-text { color: var(--danger); font-size: 13px; margin-top: 5px; }
.input--error, .select--error, .textarea--error { border-color: var(--danger); }
.checkbox { display: flex; gap: 10px; align-items: flex-start; }
.checkbox input { margin-top: 4px; width: 17px; height: 17px; flex: none; }
.phone-group { display: flex; gap: 8px; }
.phone-group .select { max-width: 190px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0 0 20px; }
legend { font-weight: 750; padding: 0 8px; color: var(--red); }
.file-drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 18px; text-align: center; background: var(--surface); }
.file-drop input[type=file] { margin-top: 8px; }

/* ---------- Auth pages ---------- */
.auth { min-height: calc(100vh - 66px); display: grid; place-items: center; padding: 40px 20px; background: linear-gradient(160deg, #0b0b0c, #241014); }
.auth__panel { width: 100%; max-width: 1040px; display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.auth__pane { padding: 34px; }
.auth__pane + .auth__pane { border-left: 1px solid var(--line); }
.auth__side { background: linear-gradient(160deg, #111, #2a0d12); color: #fff; padding: 34px; display: none; }
@media (min-width: 1000px) { .auth__wrap { max-width: 1180px; } }
/* Cards that sit alone on the dark gradient: round them off and lift them, so a
   short outcome does not look like bare text on a blank page. */
.auth .card { border-radius: 20px; box-shadow: 0 18px 50px rgba(0, 0, 0, .45); padding: 32px 30px; }
.auth .card.center { text-align: center; }
.auth .card h1, .auth .card h2 { margin-bottom: .35em; }
.auth .card .status__icon + h1 { font-size: 26px; }
.auth__pane h2 { margin-top: 0; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 66px); background: var(--surface); }
.side { background: var(--black); color: #cfcfd6; padding: 22px 16px; position: sticky; top: 66px; height: calc(100vh - 66px); overflow: auto; }
.side__user { display: flex; gap: 12px; align-items: center; padding: 12px; background: rgba(255,255,255,.06); border-radius: 12px; margin-bottom: 20px; }
.side__user img, .side__user .avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.avatar { background: linear-gradient(135deg, #23232b, #b3101f); display: grid; place-items: center; font-weight: 800; color: #fff; }
.side__name { font-weight: 700; color: #fff; font-size: 14.5px; }
.side__role { font-size: 12px; color: #9a9aa5; text-transform: capitalize; }
.side__nav { display: flex; flex-direction: column; gap: 4px; }
.side__nav a { color: #cfcfd6; padding: 11px 13px; border-radius: 10px; font-weight: 600; font-size: 14.5px; display: flex; gap: 10px; align-items: center; }
.side__nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; color: #fff; }
.side__nav a.is-active { background: var(--red); color: #fff; }
.side__nav .badge { margin-left: auto; }
.main { padding: 28px; min-width: 0; }
.main__head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 22px; }
.main__head h1 { font-size: 26px; margin: 0; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); border-left: 5px solid var(--blue); }
.stat--red { border-left-color: var(--red); }
.stat--green { border-left-color: var(--green); }
.stat--yellow { border-left-color: var(--yellow); }
.stat__label { font-size: 13px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .6px; }
.stat__value { font-size: clamp(22px, 2vw, 30px); font-weight: 850; line-height: 1.1; margin-top: 6px; white-space: nowrap; }
.stat__value--text { font-size: 19px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: #374151; }
.badge--ok { background: #e3f6ee; color: #06603f; }
.badge--warn { background: #fef3d6; color: #92500a; }
.badge--danger { background: #fde8ea; color: #a3121f; }
.badge--info { background: #e6edfd; color: var(--blue-dark); }
.badge--dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: var(--surface); font-weight: 750; font-size: 12.5px; text-transform: uppercase; letter-spacing: .5px; color: #4b5563; white-space: nowrap; }
tbody tr:hover { background: #fafafa; }
td.actions { white-space: nowrap; }
td.actions .btn { margin-right: 6px; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .input, .toolbar .select { max-width: 260px; }

/* ---------- Reminders / alerts ---------- */
.alert { border-radius: var(--radius); padding: 15px 17px; border: 1px solid; display: flex; gap: 12px; align-items: flex-start; }
.alert__icon { display: inline-flex; align-items: center; font-size: 20px; line-height: 1; }
.alert--warn { background: #fff8e6; border-color: #f6d98a; color: #7a4b06; }
.alert--ok { background: #e9f8f1; border-color: #a7e3c8; color: #075c3d; }
.alert--danger { background: #fdeef0; border-color: #f4b6bd; color: #8f111c; }
.alert--info { background: #eef3fd; border-color: #bcd0f7; color: #1c3a86; }
.alert strong { display: block; margin-bottom: 2px; }
.reminder { font-weight: 800; font-size: 15.5px; }

/* ---------- Chat room ---------- */
.chat { display: grid; grid-template-columns: 300px 1fr; height: calc(100vh - 66px); background: var(--chat-bg); }
.chat__list { background: #fff; border-right: 1px solid var(--line); overflow-y: auto; }
.chat__list-head { padding: 16px; border-bottom: 1px solid var(--line); font-weight: 800; }
.conv { display: flex; gap: 12px; padding: 13px 15px; cursor: pointer; border-bottom: 1px solid var(--line); align-items: center; }
.conv:hover { background: var(--surface); }
.conv.is-active { background: #eaf3ff; border-left: 4px solid var(--blue); }
.conv .avatar { width: 44px; height: 44px; border-radius: 50%; flex: none; }
.conv__meta { min-width: 0; flex: 1; }
.conv__name { font-weight: 700; font-size: 14.5px; }
.conv__last { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat__panel { display: flex; flex-direction: column; min-width: 0; }
.chat__head { background: #fff; border-bottom: 1px solid var(--line); padding: 14px 18px; display: flex; align-items: center; gap: 12px; }
.chat__body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: min(70%, 560px); padding: 10px 14px; border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); position: relative; }
.msg--mine { align-self: flex-end; background: #dcf5e6; }
.msg__body { white-space: pre-wrap; word-wrap: break-word; }
.msg__time { font-size: 11px; color: var(--muted); margin-top: 5px; display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.msg__ticks { font-weight: 700; }
.msg__ticks--sent { color: #9ca3af; }
.msg__ticks--delivered { color: #9ca3af; }
.msg__ticks--read { color: var(--blue); }
.msg__attach { display: inline-flex; gap: 8px; align-items: center; background: rgba(0,0,0,.05); padding: 8px 10px; border-radius: 9px; margin-top: 6px; font-size: 13.5px; }
.chat__compose { border-top: 1px solid var(--line); padding: 12px 14px; background: #fff; display: flex; gap: 10px; align-items: flex-end; }
.chat__input { flex: 1; background: var(--chat-input); border: 1px solid #c8e6d3; border-radius: 12px; padding: 12px 14px; min-height: 48px; max-height: 160px; resize: none; font: inherit; }
.chat__input:focus { outline: none; border-color: var(--chat-send); box-shadow: 0 0 0 3px rgba(14,159,110,.15); }
.btn--send { background: var(--chat-send); width: 48px; height: 48px; padding: 0; border-radius: 12px; font-size: 19px; }
.chat__empty { margin: auto; text-align: center; color: var(--muted); }
.chat__empty .big { display: flex; justify-content: center; color: var(--red); margin-bottom: 6px; }
/* A large .big icon inside our own empty/empty-chat blocks. */
.empty-state .big { display: flex; justify-content: center; color: var(--red); }

/* ---------- Footer ---------- */
.footer { background: var(--black); color: #b9b9c0; padding: 52px 0 24px; margin-top: 0; }
.footer a { color: #d7d7dd; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px; }
/* Grid items default to min-content width; without this the footer columns
   refuse to shrink and push a phone screen sideways. */
.footer__grid > * { min-width: 0; }
.footer__contact a { overflow-wrap: anywhere; }
.footer h4 { color: #fff; font-size: 15px; text-transform: uppercase; letter-spacing: .8px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 9px; }
.footer__bottom { border-top: 1px solid #26262c; margin-top: 32px; padding-top: 18px; font-size: 13.5px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer__contact li { display: flex; align-items: flex-start; gap: 9px; }
.footer__contact .icon { color: var(--red); margin-top: 2px; }
.footer__made { display: flex; align-items: center; gap: 7px; }
.footer__made .icon { color: var(--red); }

/* ---------- Misc ---------- */
.toasts { position: fixed; top: 78px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: min(92vw, 380px); }
.toast { background: #fff; border-left: 5px solid var(--blue); border-radius: 10px; padding: 13px 16px; box-shadow: var(--shadow); animation: slidein .18s ease; }
.toast--ok { border-left-color: var(--ok); }
.toast--error { border-left-color: var(--danger); }
.toast--warn { border-left-color: var(--warn); }
@keyframes slidein { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

.modal-backdrop { position: fixed; inset: 0; background: rgba(11,11,12,.55); display: grid; place-items: center; z-index: 300; padding: 20px; }
.modal { background: #fff; border-radius: var(--radius); max-width: 640px; width: 100%; max-height: 90vh; overflow: auto; padding: 26px; }
.modal h3 { margin-top: 0; }

.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
.spinner--ink { border-color: rgba(0,0,0,.2); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton { background: linear-gradient(90deg, #eee, #f5f5f5, #eee); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; height: 100%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.empty-state { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty-state .big { font-size: 42px; margin-bottom: 8px; }
.empty-state .icon { margin: 0 auto 10px; color: var(--red); }

.kv { display: grid; grid-template-columns: 200px 1fr; gap: 8px 16px; }
.kv dt { font-weight: 700; color: #4b5563; }
.kv dd { margin: 0; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: relative; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: -14px; left: 20px; width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 800; }

.accordion { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion details:last-child { border-bottom: 0; }
.accordion summary { padding: 15px 18px; font-weight: 700; cursor: pointer; background: #fff; }
.accordion summary:hover { background: var(--surface); }
.accordion .acc-body { padding: 0 18px 16px; color: #374151; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.pagination button { min-width: 40px; }

.legal h2 { margin-top: 34px; color: var(--black); }
.legal h3 { margin-top: 22px; }
.legal p, .legal li { color: #333; }

/* ---------- Lessons: rates, ratings, bookings ---------- */

/* Price and rating chips on tutor cards and profiles */
.tutor__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 4px; }
.rate-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: #e3f6ee; color: #06603f; border: 1px solid #bfe8d5;
  font-weight: 700; font-size: 13px; padding: 4px 10px;
  border-radius: 999px; white-space: nowrap;
}
.rate-pill--muted { background: var(--surface-2); color: #4b5563; border-color: var(--line); font-weight: 600; }
.rating { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #374151; }
.rating__icon { color: #f59e0b; }
.rating__count { color: var(--muted); font-size: 12px; }
.rating__none {
  font-size: 12px; color: var(--muted); background: var(--surface);
  border: 1px dashed var(--line); padding: 3px 9px; border-radius: 999px;
}

/* Star rows */
.stars { display: inline-flex; gap: 1px; }
.stars__star { color: #d1d5db; display: inline-flex; }
.stars__star.is-on { color: #f59e0b; }
.stars--input { gap: 6px; margin: 10px 0 4px; }
.stars--input .stars__star {
  background: none; border: 0; padding: 2px; cursor: pointer;
  border-radius: 8px; transition: transform .12s ease;
}
.stars--input .stars__star:hover { transform: scale(1.12); }
.stars--input .stars__star:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Booking call to action on a tutor profile */
.cta-block {
  margin-top: 18px; padding: 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.cta-block__price {
  font-family: var(--font-display); font-size: 26px; font-weight: 700;
  color: var(--ink); margin-bottom: 10px;
}
.btn--block { display: flex; width: 100%; justify-content: center; }

/* The dashboard sidebar is a fixed-height sticky column, so the page behind it
   below the fold must stay dark or the column looks cut off on long pages. */
@media (min-width: 781px) {
  .dash { background: linear-gradient(90deg, var(--black) 0 250px, var(--surface) 250px); }
}

/* The two money figures at the top of the request modal */
.booking-summary {
  flex: 1; min-width: 130px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.booking-summary__label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.booking-summary__value { font-weight: 800; font-size: 16px; margin-top: 3px; }

/* Reviews */
.reviews { display: grid; gap: 14px; margin-top: 14px; }
.review { border-top: 1px solid var(--line); padding-top: 14px; }
.review:first-child { border-top: 0; padding-top: 0; }
.review__text { margin: 9px 0 6px; color: #333; }

/* Lesson cards */
.bookings { display: grid; gap: 16px; margin-top: 20px; }
.booking {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm);
}
.booking--requested { border-left-color: var(--yellow); }
.booking--accepted { border-left-color: var(--blue); }
.booking--completed { border-left-color: var(--green); }
.booking--disputed, .booking--declined, .booking--no_show { border-left-color: var(--red); }
.booking__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.booking__avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.booking__meta { display: flex; flex-wrap: wrap; gap: 14px; margin: 12px 0 0; color: #4b5563; font-size: 13px; }
.booking__meta > span { display: inline-flex; align-items: center; gap: 6px; }
.booking__meta .icon { color: var(--muted); }
.booking__topic { margin: 12px 0 0; color: #333; }
.booking__note { margin-top: 10px; background: var(--surface); border-radius: 10px; padding: 9px 12px; font-size: 13.5px; color: #374151; }
.booking__note--warn { background: #fef3f4; color: #8a1020; }
.booking__money { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 14px; padding: 12px 14px; background: var(--surface); border-radius: 12px; }
.booking__money-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; color: var(--muted); }
.booking__money-value { font-weight: 800; font-size: 17px; margin-top: 2px; }
.booking__money-value--sm { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.booking__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.booking__actions .hint { margin: 0; display: inline-flex; align-items: center; gap: 4px; }

/* Payment sheet steps */
.pay-step { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.pay-step:first-child { border-top: 0; padding-top: 4px; }
.pay-step__n {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--red); color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 14px;
}
.pay-number { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.pay-number code {
  background: var(--near-black); color: #fff; padding: 7px 12px;
  border-radius: 9px; font-size: 15px; letter-spacing: .02em;
}

@media (max-width: 780px) {
  .booking__money { gap: 16px; }
  .cta-block__price { font-size: 22px; }
  .booking-summary { min-width: 100%; }
}

/* ---------- Responsive ----------
   Most of the marketing pages adapt on their own (fluid type, clamp() spacing,
   auto-fit grids). These rules are only for the cases that need a real change
   of layout: the navigation, side-by-side panels and the dashboard shells. */

/* Small laptop / large tablet */
@media (max-width: 1080px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .auth__panel { grid-template-columns: 1fr; max-width: 520px; }
  .auth__pane + .auth__pane { border-left: 0; border-top: 1px solid var(--line); }
  .chat { grid-template-columns: 250px 1fr; }
  .hero__grid { min-height: 0; }
}

/* Tablet and below: the nav becomes a full-width menu panel. */
@media (max-width: 900px) {
  .nav__toggle { display: inline-flex; }
  /* The homepage's three value cards put an icon beside the text; below this
     width that leaves the copy too narrow, so they stack instead. */
  body[data-page="home"] .grid--3 { grid-template-columns: 1fr; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 2px;
    background: #0b0b0c; border-top: 1px solid #23232a;
    padding: 12px var(--gutter) calc(16px + env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 64px);
    overflow-y: auto; overscroll-behavior: contain;
    box-shadow: 0 26px 44px rgba(0,0,0,.55);
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 14px 12px; font-size: 16.5px; border-radius: 10px; }
  .nav__cta {
    flex-direction: column; align-items: stretch; gap: 10px;
    margin-top: 10px; padding-top: 12px; border-top: 1px solid #23232a;
  }
  .nav__cta .btn { width: 100%; padding: 13px 16px; font-size: 16px; }
}

/* Phones */
@media (max-width: 780px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .dash { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .kv { grid-template-columns: 1fr; }
  .chat { grid-template-columns: 1fr; height: auto; }
  .chat__list { max-height: 300px; }
  .chat__panel { height: calc(100dvh - 320px); }
  .hero__media img { object-position: 62% 30%; }
  .row--between { align-items: flex-start; }
}

/* Narrow phones */
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .hero__title { letter-spacing: -1px; }
  .hero__actions .btn { width: 100%; }
  .hero__panel { border-radius: 18px; }
  .brand { font-size: 20px; }
  .brand__logo { width: 32px; height: 32px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 22px; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 380px) {
  .footer__grid { grid-template-columns: 1fr; }
  .hero__num { font-size: 24px; }
}

/* Phones held sideways: the hero is short, so trim it back and keep the
   statistics on one row instead of stacking them off-screen. */
@media (orientation: landscape) and (max-height: 580px) {
  .hero__grid { padding-block: 20px; min-height: 0; }
  .hero__title { font-size: clamp(30px, 5.4vw, 42px); }
  .hero__lead { font-size: 15px; margin-bottom: 14px; }
  .hero__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 14px; }
  .hero__num { font-size: 22px; }
  .hero__label { font-size: 10.5px; }
  .hero__panel { padding: 18px; }
  .nav__links { max-height: calc(100dvh - 60px); }
}

/* Ultrawide and 4K: keep the measure comfortable instead of stretching text. */
@media (min-width: 1560px) {
  :root { --maxw: 1300px; }
  .hero__panel { max-width: 700px; }
  .hero__title { font-size: 82px; }
}

@media print {
  .nav, .footer, .side, .toasts { display: none !important; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  /* Without the cross-fade every slide would sit at opacity 0, so pin the
     first photograph in place instead of leaving a blank hero. */
  .hero__slide:first-child { opacity: 1; }
}
