:root {
  --brand: #4f46e5;
  --brand-2: #2563eb;
  --accent: #06b6d4;
  --grad: linear-gradient(120deg, #4f46e5 0%, #2563eb 55%, #06b6d4 100%);
  --ink: #0f172a; --ink-2: #1e293b; --muted: #64748b;
  --line: #e2e8f0; --line-strong: #cbd5e1;
  --bg: #f7f8fc; --surface: #fff; --surface-2: #f1f5f9;
  --success: #16a34a; --success-bg: #dcfce7;
  --warn: #d97706; --warn-bg: #fef3c7;
  --danger: #dc2626; --danger-bg: #fee2e2;
  --info-bg: #e0e7ff;
  --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(15,23,42,.06);
  --shadow-2: 0 4px 12px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow-3: 0 12px 32px rgba(15,23,42,.10), 0 2px 6px rgba(15,23,42,.04);
  --shadow-brand: 0 8px 24px color-mix(in oklab, var(--brand) 30%, transparent);
  --tab-h: 68px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --content-max: 1160px; --header-h: 60px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1); --dur: 220ms;
  --fs-h1: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem);
  --fs-h2: clamp(1.4rem, 1.1rem + 1.4vw, 1.9rem);
  --fs-h3: clamp(1.15rem, 1rem + .7vw, 1.35rem);
  --fs-sm: .875rem; --fs-xs: .78rem;
}

@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration:.001ms !important; transition-duration:.001ms !important; } }

*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.55;
  -webkit-font-smoothing: antialiased; min-height: 100dvh; }
img, svg { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid color-mix(in oklab, var(--brand) 55%, white); outline-offset: 2px; border-radius: 8px; }

.skip-link { position: fixed; top: -100px; left: 12px; z-index: 999;
  padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 600; }
.skip-link:focus { top: 12px; }

h1,h2,h3,h4 { margin: 0 0 .5em; line-height: 1.15; letter-spacing: -.015em; }
h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); font-weight: 700; }
h3 { font-size: var(--fs-h3); font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 20%, transparent); }

.container { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 0 16px; }

#app { padding-bottom: 0; }
@media (max-width: 899px) {
  #app { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 8px); }
}
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; }

.btn { --_bg: var(--brand); --_fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border: 1px solid transparent; border-radius: var(--r-pill);
  background: var(--_bg); color: var(--_fg); font-weight: 600; font-size: .95rem;
  cursor: pointer; text-decoration: none; box-shadow: var(--shadow-brand);
  transition: transform var(--dur) var(--ease), filter var(--dur) var(--ease); }
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; pointer-events: none; box-shadow: none; }
.btn.block { width: 100%; }
.btn.lg { min-height: 54px; padding: 0 26px; font-size: 1rem; }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: var(--fs-sm); }
.btn.gradient { background: var(--grad); color: #fff; }
.btn.secondary { background: var(--surface); color: var(--brand);
  border-color: var(--brand); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: none; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--danger); box-shadow: 0 8px 24px rgba(220,38,38,.28); }

.icon-btn { width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink); cursor: pointer;
  transition: background var(--dur) var(--ease); }
.icon-btn:hover { background: var(--surface-2); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: var(--fs-xs); color: var(--muted); }
.field input, .field select, .field textarea {
  min-height: 46px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 18%, transparent); }

/* ---------- Sticky Header Setup ---------- */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  padding-top: var(--safe-t);
  transition: box-shadow 0.3s ease;
}
.app-header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.app-header .inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  max-width: var(--content-max);
  margin: 0 auto;
  position: relative;
}
#main {
  padding-top: calc(var(--header-h) + var(--safe-t) + 16px);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 34px; width: auto; }
.brand-name { font-weight: 800; font-size: 1.1rem; letter-spacing: -.02em; }
.header-nav { display: none; gap: 8px; margin-left: auto; }
.header-nav a { padding: 8px 14px; border-radius: var(--r-pill); font-weight: 600;
  font-size: var(--fs-sm); color: var(--ink-2); text-decoration: none; }
.header-nav a:hover { background: var(--surface-2); }
.header-nav a.active { color: var(--brand); background: var(--info-bg); }
.header-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.avatar { width: 38px; height: 38px; border-radius: 50%;
  background: var(--grad); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: .9rem; box-shadow: var(--shadow-brand); border: 2px solid #fff; }
@media (min-width: 720px) {
  .header-nav { display: flex; }
  .header-actions { margin-left: 0; }
}

/* ---------- Superprof Style Header Search ---------- */
.sp-header-search-wrapper {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  height: 44px;
  width: 100%;
  max-width: 540px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 50;
}
.sp-header-search-wrapper.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.sp-header-search-wrapper:focus-within {
  border-color: var(--brand);
  box-shadow: 0 4px 20px rgba(79,70,229,0.15);
}

.sp-segment {
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 100%;
  cursor: text;
  flex: 1;
  position: relative;
}
.sp-segment:first-child {
  border-right: 1px solid var(--line);
}
.sp-segment svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  margin-right: 10px;
  flex-shrink: 0;
}
.sp-segment input {
  border: none;
  background: transparent;
  width: 100%;
  height: 100%;
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
}
.sp-segment input::placeholder {
  color: var(--muted);
  font-weight: 400;
}

.sp-search-btn {
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: 999px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  margin-right: 4px;
  cursor: pointer;
  transition: filter 0.2s;
  flex-shrink: 0;
  box-shadow: var(--shadow-brand);
  align-self: center;
}
.sp-search-btn:hover { filter: brightness(1.1); }
.sp-search-btn svg { width: 18px; height: 18px; }

/* Dropdown Menus */
.sp-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  border: 1px solid var(--line);
  padding: 8px;
  z-index: 100;
  display: none;
  flex-direction: column;
  min-width: 260px;
  animation: fade-down 0.2s ease-out;
}
.sp-dropdown.open { display: flex; }
@keyframes fade-down {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.sp-dropdown.subjects-dd { left: 0; }
.sp-dropdown.location-dd { left: 40%; }

.sp-dd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  transition: background 0.15s;
  border: none;
  background: transparent;
  text-align: left;
}
.sp-dd-item:hover { background: var(--surface-2); }
.sp-dd-item svg { width: 20px; height: 20px; color: var(--muted); }

@media (max-width: 1200px) {
  .sp-header-search-wrapper { display: none !important; }
  #main { padding-top: calc(var(--header-h) + var(--safe-t)); }
}

/* ---------- New Main Hero Search ---------- */
.main-search-wrapper {
  position: relative;
  max-width: 760px;
  margin: 0 auto 32px;
  z-index: 50;
}
.main-search-pill {
  display: flex;
  background: #fff;
  border-radius: 999px;
  padding: 6px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
  border: 1px solid var(--line);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.main-search-pill:focus-within {
  border-color: var(--brand);
  box-shadow: 0 10px 40px rgba(79,70,229,0.15);
}
.main-search-segment {
  display: flex;
  align-items: center;
  padding: 0 16px;
  flex: 1;
  position: relative;
}
.main-search-segment:first-child {
  flex: 1.4;
  border-right: 1px solid var(--line);
}
.main-search-segment svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
  margin-right: 12px;
  flex-shrink: 0;
}
.main-search-segment input {
  border: none;
  background: transparent;
  width: 100%;
  height: 48px;
  font-size: 1.05rem;
  color: var(--ink);
  outline: none;
}
.main-search-segment input::placeholder {
  color: var(--muted);
}
.main-search-btn {
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0 32px;
  height: 48px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s;
  flex-shrink: 0;
  box-shadow: var(--shadow-brand);
}
.main-search-btn:hover {
  filter: brightness(1.05);
}

/* Main Search Dropdowns */
.main-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  border: 1px solid var(--line);
  padding: 8px;
  z-index: 100;
  display: none;
  flex-direction: column;
  min-width: 280px;
  animation: fade-down 0.2s ease-out;
}
.main-dropdown.open { display: flex; }
.main-dropdown.subjects-dd { left: 0; }
.main-dropdown.location-dd { left: 45%; }

.main-dd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  transition: background 0.15s;
  border: none;
  background: transparent;
  text-align: left;
}
.main-dd-item:hover { background: var(--surface-2); }
.main-dd-item svg { width: 20px; height: 20px; color: var(--muted); }

@media (max-width: 768px) {
  .main-search-wrapper {
    padding: 0 20px;
  }
  .main-search-pill {
    flex-direction: column;
    border-radius: 24px;
    padding: 12px;
  }
  .main-search-segment {
    border-right: none !important;
    border-bottom: 1px solid var(--line);
    padding: 8px 12px;
  }
  .main-search-btn {
    width: 100%;
    margin-top: 12px;
  }
  .main-dropdown.subjects-dd { left: 0; width: 100%; }
  .main-dropdown.location-dd { left: 0; width: 100%; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 90% -10%, color-mix(in oklab, var(--accent) 18%, transparent), transparent 60%),
    radial-gradient(900px 400px at -10% 20%, color-mix(in oklab, var(--brand) 18%, transparent), transparent 60%),
    var(--bg);
  padding: 48px 0 32px; }
.hero .inner { position: relative; max-width: var(--content-max); margin: 0 auto; padding: 0 16px; }
.hero h1 { max-width: 20ch; margin: 0 auto 24px; }
.hero h1 .accent { background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { max-width: 52ch; font-size: 1.05rem; margin: 0 auto; }

.hero-badges {
  display: flex; gap: 16px; flex-wrap: wrap; margin-top: 24px; font-size: var(--fs-sm); color: var(--ink-2); font-weight: 500;
}
.hero-badges span { display: flex; align-items: center; gap: 6px; }
.hero-badges svg { color: var(--success); width: 18px; height: 18px; }

/* ---------- Grids & Sections ---------- */
.section { padding: 32px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

.tutor-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .tutor-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .tutor-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .tutor-grid { grid-template-columns: repeat(4, 1fr); } }

/* Compact Premium Tutor Cards */
.tutor-card-premium {
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: 16px;
  overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none; color: inherit; border: 1px solid var(--line); position: relative;
}
.tutor-card-premium:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); text-decoration: none; }
.tutor-img-area { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #e2e8f0; }
.tutor-img-area img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.tutor-card-premium:hover .tutor-img-area img { transform: scale(1.05); }
.tutor-img-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 45%); }
.tutor-img-top-badges { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; align-items: flex-start; }
.tutor-img-bottom-info { position: absolute; bottom: 12px; left: 12px; right: 12px; color: #fff; }
.tutor-img-bottom-info h3 { margin: 0 0 2px; font-size: 1.15rem; font-weight: 700; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.tutor-img-bottom-info .location { font-size: 0.78rem; opacity: 0.9; }
.tutor-content { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tutor-subject-highlight { font-size: 0.85rem; color: var(--ink-2); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.tutor-stats-row { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--muted); font-weight: 500; }
.tutor-stats-row .star-icon { color: #f59e0b; width: 14px; height: 14px; }
.tutor-footer { padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 16px 16px; }
.tutor-price { font-size: 1.1rem; font-weight: 800; color: var(--ink); }
.tutor-price span { font-size: 0.72rem; font-weight: 500; color: var(--muted); }
.tutor-free-tag { background: #dcfce7; color: #166534; padding: 4px 8px; border-radius: 6px; font-size: 0.72rem; font-weight: 700; }
.badge-glass { background: rgba(255,255,255,0.95); backdrop-filter: blur(4px); color: var(--ink); padding: 4px 8px; border-radius: 999px; font-size: 0.68rem; font-weight: 700; display: flex; align-items: center; gap: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.badge-glass.verified { color: #166534; }
.badge-glass.pro { color: #92400e; }
.heart-btn { background: rgba(255,255,255,0.95); backdrop-filter: blur(4px); width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #64748b; border: none; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.1); transition: all 0.2s; }
.heart-btn:hover { color: #ef4444; background: #fff; transform: scale(1.05); }

/* Horizontal Scroller */
.horizontal-scroll::-webkit-scrollbar { display: none; }
.subject-scroll-btn:hover { border-color: var(--brand); background: var(--surface-2); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.subject-scroll-btn svg { width: 100%; height: 100%; }

/* Subject Grid */
.subject-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); margin-top: 24px; }
@media (min-width: 640px) { .subject-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .subject-grid { grid-template-columns: repeat(4, 1fr); } }
.subject-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px 16px; text-align: center; cursor: pointer; transition: all var(--dur) var(--ease); text-decoration: none; color: var(--ink); }
.subject-card:hover { border-color: var(--brand); box-shadow: var(--shadow-2); transform: translateY(-2px); text-decoration: none; }
.subject-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--info-bg); color: var(--brand); display: grid; place-items: center; margin: 0 auto 16px; }
.subject-icon svg { width: 24px; height: 24px; }
.subject-card h4 { font-size: 1rem; margin: 0; font-weight: 600; }

/* Steps */
.step-grid { display: grid; gap: 24px; grid-template-columns: 1fr; margin-top: 32px; }
@media (min-width: 768px) { .step-grid { grid-template-columns: repeat(3, 1fr); } }
.step-card { text-align: center; padding: 32px 24px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-2); position: relative; transition: transform var(--dur) var(--ease); }
.step-card:hover { transform: translateY(-4px); }
.step-num { width: 48px; height: 48px; border-radius: 50%; background: var(--info-bg); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 1.25rem; margin: 0 auto 16px; }
.step-card h3 { margin-bottom: 8px; font-size: 1.15rem; }
.step-card p { color: var(--muted); font-size: var(--fs-sm); margin: 0; }

/* Trust Banner */
.trust-banner { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); border-radius: var(--r-xl); padding: 40px 32px; color: #fff; display: flex; flex-direction: column; gap: 32px; align-items: center; position: relative; overflow: hidden; }
.trust-banner::before { content: ""; position: absolute; top: -50%; right: -20%; width: 60%; height: 200%; background: radial-gradient(circle, color-mix(in oklab, var(--accent) 20%, transparent) 0%, transparent 60%); pointer-events: none; }
@media (min-width: 768px) { .trust-banner { flex-direction: row; justify-content: space-between; padding: 48px; } .trust-banner .text-content { flex: 1; max-width: 50%; } }
.trust-banner h2 { color: #fff; margin-bottom: 16px; }
.trust-banner p { color: #cbd5e1; margin-bottom: 24px; font-size: 1.05rem; }
.trust-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; width: 100%; max-width: 400px; }
.trust-stat { text-align: center; }
.trust-stat .num { font-size: 2rem; font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: 4px; }
.trust-stat .lbl { font-size: var(--fs-sm); color: #94a3b8; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }

/* Testimonials */
.testimonial-slider-wrapper { position: relative; padding: 0 56px; }
.testimonial-slider { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none; padding-bottom: 20px; scroll-behavior: smooth; }
.testimonial-slider::-webkit-scrollbar { display: none; }
.testimonial-slide { flex: 0 0 calc(100% - 32px); scroll-snap-align: center; background: var(--surface); border-radius: var(--r-xl); padding: 40px; box-shadow: var(--shadow-2); display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); }
@media (min-width: 768px) { .testimonial-slide { flex: 0 0 calc(50% - 12px); } }
@media (min-width: 1024px) { .testimonial-slide { flex: 0 0 calc(33.333% - 16px); } }
.testimonial-slide .stars { color: #00b67a; font-size: 1.25rem; letter-spacing: 2px; margin-bottom: 20px; }
.testimonial-slide .quote { font-size: 1.05rem; color: var(--ink-2); line-height: 1.6; margin-bottom: 32px; flex: 1; }
.testimonial-slide .author { display: flex; align-items: center; gap: 16px; }
.testimonial-slide .author .avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1rem; }
.testimonial-slide .author h4 { margin: 0; font-size: 1rem; }
.testimonial-slide .author p { margin: 0; font-size: 0.85rem; color: var(--muted); }
.slider-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-2); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 10; color: var(--ink); transition: all var(--dur) var(--ease); }
.slider-nav:hover { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: var(--shadow-brand); }
.slider-nav.prev { left: 0; }
.slider-nav.next { right: 0; }
@media (max-width: 768px) { .testimonial-slider-wrapper { padding: 0; } .slider-nav { display: none; } }

/* ---------- Footer ---------- */
.site-footer { background: #0f172a; color: #94a3b8; padding: 64px 0 24px; margin-top: 64px; border-top: 4px solid var(--brand); }
.footer-grid { display: grid; gap: 48px; grid-template-columns: 1fr; margin-bottom: 48px; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 2fr; gap: 32px; } }
.footer-brand img { height: 40px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer-brand p { font-size: var(--fs-sm); line-height: 1.6; margin-bottom: 24px; max-width: 300px; }
.footer-socials { display: flex; gap: 12px; }
.footer-socials a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.05); display: grid; place-items: center; color: #fff; transition: background var(--dur); }
.footer-socials a:hover { background: var(--brand); text-decoration: none; }
.footer-socials svg { width: 18px; height: 18px; }
.footer-links h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; font-weight: 600; letter-spacing: 0.02em; }
.footer-links ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-links a { color: #94a3b8; font-size: var(--fs-sm); text-decoration: none; transition: color var(--dur); }
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-newsletter h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; font-weight: 600; }
.footer-newsletter p { font-size: var(--fs-sm); margin-bottom: 16px; }
.newsletter-form { display: flex; gap: 8px; }
.newsletter-form input { flex: 1; min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); color: #fff; font-size: var(--fs-sm); }
.newsletter-form input:focus { outline: none; border-color: var(--brand); }
.newsletter-form button { min-height: 44px; padding: 0 20px; border-radius: 8px; border: none; background: var(--brand); color: #fff; font-weight: 600; cursor: pointer; transition: filter var(--dur); }
.newsletter-form button:hover { filter: brightness(1.1); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; display: flex; flex-direction: column; gap: 16px; align-items: center; font-size: var(--fs-xs); }
@media (min-width: 768px) { .footer-bottom { flex-direction: row; justify-content: space-between; } }
.footer-legal { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.footer-legal a { color: #94a3b8; text-decoration: none; }
.footer-legal a:hover { color: #fff; }
.footer-payments { display: flex; gap: 8px; align-items: center; opacity: 0.7; }
.footer-payments svg { height: 24px; width: auto; }

/* ---------- Tab Bar & Mobile ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: color-mix(in oklab, #fff 92%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); z-index: 50; }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .72rem; font-weight: 600; color: var(--muted); text-decoration: none; position: relative; transition: color var(--dur) var(--ease); }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.active { color: var(--brand); }
.tabbar a.active::before { content: ""; position: absolute; top: 6px; width: 36px; height: 3px; border-radius: 3px; background: var(--grad); }
@media (min-width: 900px) { .tabbar { display: none; } }

@media (max-width: 768px) {
  .step-grid { grid-template-columns: 1fr !important; }
  .main-search-pill { flex-direction: column; border-radius: 24px; padding: 12px; }
  .main-search-segment { border-right: none !important; border-bottom: 1px solid var(--line); padding: 8px 12px; }
  .main-search-btn { width: 100%; margin-top: 12px; }
  .main-dropdown.subjects-dd { left: 0; width: 100%; }
  .main-dropdown.location-dd { left: 0; width: 100%; }
}

/* Other utility classes */
.card { background: var(--surface); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-2); }
.card.pad-sm { padding: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--r-pill); font-size: .72rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.badge.verified { background: var(--success-bg); color: #166534; }
.badge.pro { background: var(--warn-bg); color: #92400e; }
.badge.pending { background: var(--info-bg); color: #3730a3; }
.badge.new { background: var(--surface-2); color: var(--ink-2); }
.badge.verified::before { content: "✓"; font-weight: 900; }

.auth-shell { min-height: calc(100dvh - var(--tab-h)); display: grid; place-items: center; padding: 20px 16px calc(20px + var(--safe-b)); background: radial-gradient(900px 500px at 10% 0%, color-mix(in oklab, var(--brand) 10%, transparent), transparent 60%), radial-gradient(900px 500px at 90% 100%, color-mix(in oklab, var(--accent) 12%, transparent), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-3); padding: 24px; }
.auth-card h1 { font-size: 1.65rem; margin-bottom: 4px; }
.auth-card .sub { color: var(--muted); margin-bottom: 20px; }

.toast-region { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 12px); transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100% - 24px)); pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-3); font-size: var(--fs-sm); font-weight: 500; pointer-events: auto; animation: toast-in var(--dur) var(--ease); }
.toast.success { background: #0f5132; }
.toast.error { background: #842029; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.boot-skeleton { padding: 16px; max-width: var(--content-max); margin: 0 auto; }
.sk-bar, .sk-card { background: linear-gradient(90deg,#eef2ff 0%,#f8fafc 50%,#eef2ff 100%); background-size: 200% 100%; animation: sk 1.4s ease-in-out infinite; border-radius: var(--r); }
.sk-bar { height: 20px; width: 40%; margin: 20px 0; }
.sk-card { height: 130px; margin-bottom: 12px; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty svg { width: 64px; height: 64px; margin: 0 auto 12px; opacity: .6; }
.offline { text-align: center; padding: 80px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }

.admin-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; background: var(--surface-2); border-radius: var(--r-pill); margin-bottom: 20px; -webkit-overflow-scrolling: touch; }
.admin-tabs button { padding: 10px 16px; border: none; background: transparent; border-radius: var(--r-pill); font-weight: 600; font-size: var(--fs-sm); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.admin-tabs button.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-1); }
.settings-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .settings-grid { grid-template-columns: 1fr 1fr; } }
.settings-group { background: var(--surface); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-2); }
.settings-group h3 { margin-bottom: 16px; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.settings-group h3::before { content: ""; width: 4px; height: 18px; background: var(--grad); border-radius: 2px; }
.switch { position: relative; display: inline-block; width: 44px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; cursor: pointer; background: var(--line-strong); border-radius: 999px; transition: var(--dur); }
.switch .slider::before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform var(--dur) var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: none; }
.switch-row .lbl { font-weight: 500; font-size: var(--fs-sm); }
.switch-row .desc { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
.color-input { display: flex; gap: 8px; align-items: center; }
.color-input input[type="color"] { width: 46px; height: 46px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: #fff; }
.color-input input[type="text"] { flex: 1; min-height: 46px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; font-family: monospace; font-size: .9rem; }

/* Save Bar (Non-Sticky) */
.save-bar {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-2);
  border: 1px solid var(--line);
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 24px;
  margin-bottom: 24px;
}
.save-bar .status { flex: 1; font-size: var(--fs-sm); color: var(--muted); }
.save-bar .status.dirty { color: var(--warn); font-weight: 600; }

/* ---------- Slider Navigation Disabled State ---------- */
.slider-nav:disabled {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.badge-glass.featured {
  color: #92400e; 
  background: #fef3c7; 
  border: 1px solid #fcd34d;
}

/* ---------- Live Autocomplete Dropdown ---------- */
.suggest-box {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(15,23,42,0.12);
  padding: 6px;
  z-index: 60;
  max-height: 280px;
  overflow: auto;
  animation: fade-down 0.15s ease-out;
}
.suggest-box.sp-suggest {
  top: calc(100% + 8px);
  min-width: 260px;
}
.suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.12s;
}
.suggest-item:hover,
.suggest-item:focus-visible {
  background: var(--surface-2);
  outline: none;
}

/* ---------- Subject Scroll Cards (Home Hero) ---------- */
.subject-scroll-btn {
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 100px;
  transition: all 0.2s ease;
  cursor: pointer;
  color: var(--ink);
}

.subject-scroll-btn:hover {
  background: color-mix(in oklab, var(--brand) 8%, transparent);
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.subject-scroll-btn svg {
  color: currentColor;
  transition: color 0.2s ease;
}

.subject-scroll-btn span {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* ---------- Beautiful Autocomplete Dropdown ---------- */
.search-autocomplete {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.15);
  padding: 8px;
  z-index: 100;
  max-height: 320px;
  overflow-y: auto;
  display: none;
  animation: slide-down 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-autocomplete.open {
  display: block;
}

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.sa-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  transition: background 0.15s ease, color 0.15s ease;
}

.sa-item:hover,
.sa-item:focus {
  background: color-mix(in oklab, var(--brand) 8%, transparent);
  color: var(--brand);
}

.sa-item svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.sa-item:hover svg {
  color: var(--brand);
}

.sa-item span {
  flex: 1;
}

.sa-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--surface-2);
  padding: 4px 8px;
  border-radius: 6px;
}

.sa-item:hover .sa-badge {
  background: var(--brand);
  color: #fff;
}

/* Sidebar Filter Components */
.filter-group {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}

.filter-group:last-of-type {
  border-bottom: none;
}

.filter-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}

.filter-select, .filter-input {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 0.95rem;
  background: var(--surface-2);
  transition: border-color 0.2s;
}

.filter-select:focus, .filter-input:focus {
  border-color: var(--brand);
  outline: none;
  background: #fff;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--ink-2);
  cursor: pointer;
  padding: 4px 0;
}

.radio-label input[type="radio"],
.radio-label input[type="checkbox"] {
  accent-color: var(--brand);
  width: 18px;
  height: 18px;
}

/* ---------- Beautiful Filter Pills ---------- */
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  text-decoration: none !important;
}

.filter-pill svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: color 0.2s ease;
}

.filter-pill:hover {
  border-color: var(--brand);
  background: color-mix(in oklab, var(--brand) 5%, transparent);
  color: var(--brand);
  text-decoration: none !important;
}

.filter-pill:hover svg {
  color: var(--brand);
}

.filter-pill.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: var(--shadow-brand);
  text-decoration: none !important;
}

.filter-pill.active svg {
  color: #fff;
}

/* Details/Summary Styling */
details summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
details summary::-webkit-details-marker {
  display: none;
}
details summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--muted);
}
details[open] summary::after {
  content: "−";
}

/* --- Cookie consent banner --- */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  background: #0f172a;
  color: #fff;
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  transform: translateY(0);
  opacity: 1;
  transition: opacity .2s ease, transform .2s ease;
}

.cookie-banner.closing {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.cookie-banner-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
}

.cookie-banner-text {
  flex: 1;
  min-width: 240px;
}

.cookie-banner-text strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
}

.cookie-banner-text p {
  margin: 0;
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.cookie-banner-text a {
  color: #93c5fd;
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .cookie-banner-actions { width: 100%; }
  .cookie-banner-actions .btn { flex: 1; }
}

/* ---------- Mobile Optimizations for Filter Pills & Chat ---------- */
@media (max-width: 768px) {
  .filter-pill-container {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .filter-pill-container::-webkit-scrollbar {
    display: none;
  }
  #inbox-layout {
    flex-direction: column;
  }
  #inbox-sidebar {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
    margin-bottom: 16px;
  }
}

/* ==========================================================================
   ADMIN DASHBOARD LAYOUT
   ========================================================================== */

.admin-layout {
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - var(--header-h) - 40px);
  background: var(--bg);
  max-width: 1400px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  margin-top: 20px;
  margin-bottom: 40px;
}

.admin-sidebar {
  width: 260px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  align-self: flex-start; 
  position: sticky;
  top: calc(var(--header-h) + 20px);
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow-y: auto;
  border-top-left-radius: var(--r-lg);
  border-bottom-left-radius: var(--r-lg);
}

.admin-sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.admin-sidebar-header h2 {
  font-size: 1.1rem;
  margin: 0;
  color: var(--ink);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 800;
}

.admin-nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.admin-nav-item svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
  transition: color 0.2s ease;
}

.admin-nav-item:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.admin-nav-item.active {
  background: color-mix(in oklab, var(--brand) 10%, transparent);
  color: var(--brand);
}

.admin-nav-item.active svg {
  color: var(--brand);
}

.admin-main {
  flex: 1;
  padding: 32px 40px;
  overflow-y: auto;
  border-top-right-radius: var(--r-lg);
  border-bottom-right-radius: var(--r-lg);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.admin-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.admin-metric-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.admin-metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.admin-metric-icon svg {
  width: 24px;
  height: 24px;
}

.admin-metric-value {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--ink);
}

.admin-metric-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.admin-content-split {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 24px;
}

.admin-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.admin-panel h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.2rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.admin-actions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-action-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  transition: all 0.2s ease;
}

.admin-action-btn:hover {
  border-color: var(--brand);
  background: var(--surface-2);
}

.admin-action-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
}

.admin-action-icon svg {
  width: 18px;
  height: 18px;
}

.admin-status-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-status-item {
  display: flex;
  gap: 12px;
}

.admin-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.admin-status-dot.success {
  background: var(--success);
  box-shadow: 0 0 0 4px var(--success-bg);
}

.admin-status-dot.warning {
  background: var(--warn);
  box-shadow: 0 0 0 4px var(--warn-bg);
}

.admin-status-item strong {
  display: block;
  font-size: 0.95rem;
  color: var(--ink);
}

.admin-status-item p {
  margin: 2px 0 0;
  font-size: 0.85rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  padding: 12px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 2px solid var(--line);
}

.admin-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  position: relative;
}

.admin-table tbody tr:hover {
  background: var(--surface-2);
}

.admin-table .badge {
  text-transform: capitalize;
}

.admin-table button {
  position: relative;
  z-index: 10;
}

/* ==========================================================================
   ADMIN — MOBILE RESPONSIVE
   ========================================================================== */

@media (max-width: 900px) {
  .admin-layout {
    flex-direction: column;
    border-radius: 0;
    border: none;
    margin-top: 0;
    margin-bottom: 0;
    box-shadow: none;
  }
  .admin-sidebar {
    width: 100%;
    position: static;
    align-self: auto;
    max-height: none;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: #fff;
  }
  .admin-sidebar-header {
    padding: 12px 16px;
    border-bottom: none;
  }
  .admin-sidebar-header h2 {
    font-size: 0.85rem;
  }
  .admin-nav {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    padding: 8px 12px 14px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .admin-nav::-webkit-scrollbar {
    display: none;
  }
  .admin-nav-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
  }
  .admin-nav-item.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
  }
  .admin-nav-item.active svg {
    color: #fff;
  }
  .admin-nav-item svg {
    width: 16px;
    height: 16px;
  }
  .admin-main {
    padding: 20px 16px;
    border-radius: 0;
  }
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 20px;
  }
  .admin-header h1 {
    font-size: 1.4rem !important;
  }
  .admin-header .row {
    width: 100%;
  }
  .admin-header .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .admin-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
  }
  .admin-metric-card {
    padding: 14px;
    gap: 10px;
    border-radius: 12px;
  }
  .admin-metric-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }
  .admin-metric-icon svg {
    width: 18px;
    height: 18px;
  }
  .admin-metric-value {
    font-size: 1.3rem;
  }
  .admin-metric-label {
    font-size: 0.62rem;
    letter-spacing: 0.03em;
  }
  .admin-panel {
    padding: 16px;
    border-radius: 12px;
  }
  .admin-panel h3 {
    font-size: 1rem;
    margin-bottom: 14px;
    padding-bottom: 10px;
  }
  .admin-panel .row.between {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .admin-panel .row.between h3 {
    margin-bottom: 0 !important;
  }
  .admin-panel .row.between input[type="search"] {
    width: 100% !important;
    min-width: 0 !important;
  }
  .admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
  }
  .admin-table thead {
    display: none;
  }
  .admin-table,
  .admin-table tbody {
    display: block;
    width: 100%;
  }
  .admin-table tr {
    display: block;
    width: 100%;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  }
  .admin-table td {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    border: none;
    font-size: 0.9rem;
    text-align: left !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    min-width: 0;
  }
  .admin-table td > * {
    min-width: 0;
    max-width: 100%;
  }
  .admin-table td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    flex-shrink: 0;
    flex-basis: 100%;
    margin-bottom: 2px;
    text-align: left;
  }
  .admin-table td:last-child {
    border-top: 1px solid var(--line);
    margin-top: 8px;
    padding-top: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
  }
  .admin-table td:last-child::before {
    content: none;
  }
  .admin-table td:last-child .btn {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 40px;
  }
  .admin-table td .badge {
    margin-left: 0;
  }
  .admin-panel .empty {
    padding: 32px 16px;
  }
  .admin-panel .empty h3 {
    font-size: 1.1rem;
  }
  .admin-actions-list {
    gap: 10px;
  }
  .admin-action-btn {
    padding: 14px;
    font-size: 0.9rem;
  }
  .admin-action-icon {
    width: 32px;
    height: 32px;
  }
  .admin-action-icon svg {
    width: 16px;
    height: 16px;
  }
  .admin-content-split {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .admin-tabs {
    padding: 3px;
    margin-bottom: 16px;
  }
  .admin-tabs button {
    padding: 8px 14px;
    font-size: 0.82rem;
  }
  .settings-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .settings-group {
    padding: 16px;
  }
  .settings-group h3 {
    font-size: 0.95rem;
  }
  .color-input input[type="text"] {
    min-width: 0;
    font-size: 0.8rem;
  }
  .switch-row {
    padding: 8px 0;
    gap: 12px;
  }
  .switch-row .lbl {
    font-size: 0.85rem;
  }
  .save-bar {
    flex-wrap: wrap;
    padding: 14px;
    gap: 10px;
  }
  .save-bar .status {
    width: 100%;
    margin-bottom: 4px;
    font-size: 0.8rem;
  }
  .save-bar .btn {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .admin-metrics-grid {
    grid-template-columns: 1fr;
  }
  .admin-metric-card {
    padding: 16px;
  }
  .admin-metric-value {
    font-size: 1.5rem;
  }
  .admin-metric-label {
    font-size: 0.7rem;
  }
  .admin-table td:last-child .btn {
    flex: 1 1 calc(50% - 4px);
  }
  .mobile-menu-drawer {
    width: 85vw;
  }
}

/* ==========================================================================
   MOBILE PADDING — Prevent content from touching screen edges
   ========================================================================== */

@media (max-width: 768px) {
  /* Add padding to all containers */
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Add padding to all sections (home hero, subject grids, etc.) */
  .section {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Remove double padding if a section is inside a container */
  .section > .container {
    padding-left: 0;
    padding-right: 0;
  }

  /* Hero sections on the homepage */
  .hero {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Ensure the inner wrapper of the hero doesn't double-pad */
  .hero .inner {
    padding-left: 0;
    padding-right: 0;
  }

  /* Tutor cards and subject cards get a tiny bit of breathing room */
  .tutor-grid,
  .subject-grid,
  .step-grid {
    padding-left: 4px;
    padding-right: 4px;
  }
}

/* ==========================================================================
   HAMBURGER MENU & MOBILE DRAWER
   ========================================================================== */

.hamburger-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
  padding: 0;
}

.hamburger-btn:hover {
  background: var(--surface-2);
}

.hamburger-btn svg {
  display: block;
  width: 20px;
  height: 20px;
}

@media (max-width: 899px) {
  .hamburger-btn {
    display: flex;
  }
  .header-nav {
    display: none !important;
  }
  .header-desktop-only {
    display: none !important;
  }
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.mobile-menu.open {
  pointer-events: auto;
  opacity: 1;
}

.mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
}

.mobile-menu-drawer {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 80vw;
  background: #fff;
  box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
  overflow-y: auto;
  padding: 16px 0;
}

.mobile-menu.open .mobile-menu-drawer {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.mobile-menu-close {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.mobile-menu-close:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.mobile-menu-item {
  display: block;
  padding: 14px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-2);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.mobile-menu-item:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.mobile-menu-item.active {
  color: var(--brand);
  background: color-mix(in oklab, var(--brand) 8%, transparent);
  border-left: 3px solid var(--brand);
  padding-left: 17px;
}
/* ==========================================================================
   ADMIN MOBILE — FINAL OVERRIDE
   ========================================================================== */

@media (max-width: 900px) {
  /* Force the layout to stack */
  .admin-layout {
    display: block !important;
    min-height: auto !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* Sidebar becomes horizontal scrollable tabs */
  .admin-sidebar {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    border-right: none !important;
    border-bottom: 1px solid var(--line) !important;
    border-radius: 0 !important;
  }

  .admin-sidebar-header {
    padding: 12px 16px !important;
    border-bottom: none !important;
  }

  .admin-nav {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    padding: 8px 16px 14px !important;
    gap: 6px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }
  .admin-nav::-webkit-scrollbar { display: none !important; }

  .admin-nav-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 10px 14px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    border-radius: 999px !important;
    border: 1px solid var(--line) !important;
    background: #fff !important;
    font-size: 0.85rem !important;
  }
  .admin-nav-item.active {
    background: var(--brand) !important;
    color: #fff !important;
    border-color: var(--brand) !important;
  }
  .admin-nav-item.active svg { color: #fff !important; }

  /* Full-width main area */
  .admin-main {
    padding: 20px 16px !important;
    border-radius: 0 !important;
    width: 100% !important;
  }

  /* Header stacks vertically */
  .admin-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding-bottom: 16px !important;
    margin-bottom: 20px !important;
  }
  .admin-header > div:first-child { width: 100%; }
  .admin-header .row {
    width: 100% !important;
    margin-top: 4px;
  }
  .admin-header .btn {
    width: 100% !important;
    justify-content: center !important;
    min-height: 48px !important;
  }

  /* Metric cards: 2 per row */
  .admin-metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  /* Content split stacks */
  .admin-content-split {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

@media (max-width: 480px) {
  .admin-metrics-grid {
    grid-template-columns: 1fr !important;
  }
}
/* =========================================
   DASHBOARD LAYOUT
   ========================================= */
.dash-layout {
  display: flex;
  min-height: 100vh;
  background: var(--surface-2);
}

/* Sidebar (Desktop) */
.dash-sidebar {
  width: 260px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
}

.dash-brand {
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.dash-nav {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
}

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  margin-bottom: 4px;
}

.dash-nav-item svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
  transition: color 0.2s;
}

.dash-nav-item:hover {
  background: var(--surface-2);
}

.dash-nav-item.active {
  background: var(--info-bg);
  color: var(--brand);
}

.dash-nav-item.active svg {
  color: var(--brand);
}

.dash-sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--line);
}

.dash-sidebar-footer .dash-nav-item {
  color: var(--danger);
}
.dash-sidebar-footer .dash-nav-item:hover {
  background: var(--danger-bg);
}
.dash-sidebar-footer .dash-nav-item svg {
  color: var(--danger);
}

/* Main Content */
.dash-main {
  flex: 1;
  margin-left: 260px; /* Offset for fixed sidebar */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.dash-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
}

.dash-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.dash-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--line);
  transition: border-color 0.2s;
  text-decoration: none;
}
.dash-avatar:hover { border-color: var(--brand); }

.dash-content {
  padding: 32px;
  flex: 1;
}

/* Grid & Cards */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.dash-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.dash-stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.dash-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dash-stat-icon svg { width: 24px; height: 24px; }

.dash-stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
  color: var(--ink);
}

.dash-stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Mobile Nav */
.dash-mobile-nav {
  display: none; /* Hidden on desktop */
  background: #fff;
  border-top: 1px solid var(--line);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
}

.dash-mobile-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 4px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
  gap: 4px;
}

.dash-mobile-item svg {
  width: 24px;
  height: 24px;
}

.dash-mobile-item.active {
  color: var(--brand);
}

/* Responsive Adjustments */
@media (max-width: 900px) {
  .dash-sidebar { display: none; }
  
  .dash-main { 
    margin-left: 0; 
    padding-bottom: 70px; /* Space for bottom nav */
  }
  
  .dash-mobile-nav { 
    display: flex; 
  }
  
  .dash-header { 
    padding: 16px 20px; 
  }
  
  .dash-content { 
    padding: 20px; 
  }
  
  .dash-grid {
    grid-template-columns: 1fr;
  }
}