/**
 * @ermulaku/ui — design tokens + component styles.
 *
 * RTL-safe by construction: every directional rule uses CSS *logical*
 * properties (margin-inline, inset-inline, text-align: start, …) so the same
 * stylesheet mirrors correctly under `dir="rtl"` with no overrides.
 *
 * Animations are GPU-only: they touch `transform` / `opacity` exclusively and
 * hint the compositor with `will-change`, so they never trigger layout/paint.
 */

:root {
  /* Palette — original TutorHub brand (teal + warm accent), not a clone. */
  --th-bg: #ffffff;
  --th-surface: #ffffff;
  --th-surface-2: #f4f6f8;
  --th-border: #e3e8ee;
  --th-text: #16202b;
  --th-text-muted: #5b6b7b;
  --th-primary: #0e8f8a;
  --th-primary-hover: #0b746f;
  --th-primary-contrast: #ffffff;
  --th-primary-50: #f0f9f8;
  --th-primary-100: #d9efed;
  --th-primary-700: #0b746f;
  --th-accent: #f2994a;
  --th-accent-ink: #c2752b;
  --th-accent-tint: #fcecdb;
  --th-star: #f5b301;
  --th-danger: #e5484d;
  --th-danger-tint: #fbe6e7;
  --th-success: #1fa463;
  --th-success-tint: #e2f5ea;
  --th-warn-ink: #b67d12;
  --th-warn-tint: #fdf3e0;
  --th-blue-ink: #2f6fd0;
  --th-blue-tint: #e8f0fb;
  --th-border-soft: #eef2f6;
  --th-focus: #1a73e8;

  /* Spacing scale (rem). */
  --th-space-1: 0.25rem;
  --th-space-2: 0.5rem;
  --th-space-3: 0.75rem;
  --th-space-4: 1rem;
  --th-space-5: 1.5rem;
  --th-space-6: 2rem;

  /* Radii / elevation / motion. */
  --th-radius-sm: 6px;
  --th-radius-md: 10px;
  --th-radius-lg: 16px;
  --th-shadow-1: 0 1px 2px rgba(16, 32, 43, 0.06), 0 1px 3px rgba(16, 32, 43, 0.1);
  --th-shadow-2: 0 8px 24px rgba(16, 32, 43, 0.12);
  --th-shadow-md: 0 8px 24px rgba(22, 32, 43, 0.09);
  --th-shadow-lg: 0 22px 54px rgba(22, 32, 43, 0.18);
  --th-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --th-duration: 200ms;

  /* Hero wash behind the home headline (teal tint fading to page bg). */
  --th-hero-grad: linear-gradient(165deg, #e6f6f4 0%, #f4faf9 45%, var(--th-bg) 100%);

  --th-font:
    system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans',
    'Noto Sans Arabic', sans-serif;

  /**
   * Unprefixed aliases — let the tutor dashboard (and the design handoff CSS it
   * mirrors) use `--primary`, `--surface`, `--hero-grad`, … verbatim. These map
   * onto the canonical `--th-*` tokens, so they auto-switch in dark mode; the
   * `[data-accent]` blocks below override the brand ramp for Indigo/Plum.
   */
  --primary: var(--th-primary);
  --primary-hover: var(--th-primary-hover);
  --primary-50: var(--th-primary-50);
  --primary-100: var(--th-primary-100);
  --primary-700: var(--th-primary-700);
  --accent: var(--th-accent);
  --accent-ink: var(--th-accent-ink);
  --accent-tint: var(--th-accent-tint);
  --star: var(--th-star);
  --ink: var(--th-text);
  --muted: var(--th-text-muted);
  --faint: #9fb0bf; /* tertiary text/placeholders — no --th-* equivalent */
  --surface: var(--th-surface);
  --surface-2: var(--th-surface-2);
  --bg: var(--th-bg);
  --border: var(--th-border);
  --border-soft: var(--th-border-soft);
  --blue-tint: var(--th-blue-tint);
  --blue-ink: var(--th-blue-ink);
  --success: var(--th-success);
  --success-tint: var(--th-success-tint);
  --danger: var(--th-danger);
  --danger-tint: var(--th-danger-tint);
  --warn-tint: var(--th-warn-tint);
  --warn-ink: var(--th-warn-ink);
  --shadow-sm: var(--th-shadow-1);
  --shadow-md: var(--th-shadow-md);
  --shadow-lg: var(--th-shadow-lg);
  /* Saturated brand hero (dashboard "Up next"/earnings/onboarding panels) —
     distinct from the pale --th-hero-grad surface wash. Overridden per accent. */
  --hero-grad: linear-gradient(150deg, #13a39d 0%, #0c6f6a 55%, #0a5550 100%);
}

[data-theme='dark'] {
  --th-bg: #0f1620;
  --th-surface: #16202b;
  --th-surface-2: #1d2a37;
  --th-border: #2a3947;
  --th-text: #eef3f7;
  --th-text-muted: #9fb0bf;
  --th-primary: #2bb6b0;
  --th-primary-hover: #46cfc8;
  --th-primary-contrast: #06231f;
  --th-primary-50: #13262a;
  --th-primary-100: #15343a;
  --th-primary-700: #46cfc8;
  --th-accent-ink: #f0a85f;
  --th-accent-tint: #33271a;
  --th-danger: #f06a6e;
  --th-danger-tint: #3a1f21;
  --th-success: #46cf8a;
  --th-success-tint: #16302a;
  --th-warn-ink: #e7b964;
  --th-warn-tint: #33280f;
  --th-blue-ink: #7fb0ee;
  --th-blue-tint: #1b2a3d;
  --th-border-soft: #223040;
  --th-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --th-shadow-2: 0 10px 30px rgba(0, 0, 0, 0.5);
  --th-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --th-shadow-lg: 0 22px 54px rgba(0, 0, 0, 0.55);
  --th-hero-grad: linear-gradient(165deg, #13262a 0%, #111c27 50%, var(--th-bg) 100%);

  /* Dark-mode raw aliases (the rest inherit via the var() aliases in :root). */
  --faint: #6b7d8c;
  --hero-grad: linear-gradient(150deg, #0f8f89 0%, #0a5f5b 55%, #073f3c 100%);
}

/* ---- Accent palettes (Teal default · Indigo · Plum) ---------------------- */
/* These override the canonical --th-primary* ramp, so BOTH the UI primitives
   (Button, Avatar, Tag, …) and the dashboard's unprefixed aliases follow the
   accent. Teal needs no block (the :root defaults are teal). Only the dashboard
   sets [data-accent], so the marketplace is unaffected. */
[data-accent='indigo'] {
  --th-primary: #4f56d6;
  --th-primary-hover: #3f46bf;
  --th-primary-50: #f1f2fd;
  --th-primary-100: #e0e2fb;
  --th-primary-700: #3f46bf;
  --hero-grad: linear-gradient(150deg, #5b62e0 0%, #3a3fb0 55%, #2c3090 100%);
}
[data-theme='dark'][data-accent='indigo'] {
  --th-primary: #7b81f5;
  --th-primary-hover: #9aa0ff;
  --th-primary-50: #1b1e3a;
  --th-primary-100: #232860;
  --th-primary-700: #9aa0ff;
  --hero-grad: linear-gradient(150deg, #4a4fc0 0%, #2c2f80 55%, #1c1f5c 100%);
}
[data-accent='plum'] {
  --th-primary: #8b46c9;
  --th-primary-hover: #743aad;
  --th-primary-50: #f7f0fc;
  --th-primary-100: #ece0f8;
  --th-primary-700: #743aad;
  --hero-grad: linear-gradient(150deg, #9b53d8 0%, #6f37a8 55%, #52287f 100%);
}
[data-theme='dark'][data-accent='plum'] {
  --th-primary: #b878e8;
  --th-primary-hover: #cb9af0;
  --th-primary-50: #241a30;
  --th-primary-100: #33224a;
  --th-primary-700: #cb9af0;
  --hero-grad: linear-gradient(150deg, #7a3fb0 0%, #52287f 55%, #3a1c5c 100%);
}

/* ---- Button -------------------------------------------------------------- */
.th-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--th-space-2);
  font-family: var(--th-font);
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--th-radius-md);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform var(--th-duration) var(--th-ease),
    opacity var(--th-duration) var(--th-ease);
  will-change: transform;
}
.th-btn:disabled,
.th-btn[aria-disabled='true'] {
  opacity: 0.55;
  cursor: not-allowed;
}
.th-btn:not(:disabled):active {
  transform: scale(0.97);
}
.th-btn:focus-visible {
  outline: 2px solid var(--th-focus);
  outline-offset: 2px;
}
.th-btn--sm {
  font-size: 0.8125rem;
  padding-block: var(--th-space-2);
  padding-inline: var(--th-space-3);
}
.th-btn--md {
  font-size: 0.9375rem;
  padding-block: var(--th-space-3);
  padding-inline: var(--th-space-4);
}
.th-btn--lg {
  font-size: 1.0625rem;
  padding-block: var(--th-space-4);
  padding-inline: var(--th-space-5);
}
.th-btn--primary {
  background: var(--th-primary);
  color: var(--th-primary-contrast);
}
.th-btn--primary:not(:disabled):hover {
  background: var(--th-primary-hover);
}
.th-btn--secondary {
  background: var(--th-surface-2);
  color: var(--th-text);
  border-color: var(--th-border);
}
.th-btn--ghost {
  background: transparent;
  color: var(--th-primary);
}
.th-btn--ghost:not(:disabled):hover {
  background: var(--th-surface-2);
}
.th-btn--block {
  display: flex;
  inline-size: 100%;
}

/* ---- Card ---------------------------------------------------------------- */
.th-card {
  background: var(--th-surface);
  border: 1px solid var(--th-border);
  border-radius: var(--th-radius-lg);
  box-shadow: var(--th-shadow-1);
  padding: var(--th-space-5);
  transition:
    transform var(--th-duration) var(--th-ease),
    box-shadow var(--th-duration) var(--th-ease);
}
.th-card--interactive {
  cursor: pointer;
  will-change: transform;
}
.th-card--interactive:hover {
  transform: translateY(-4px);
  box-shadow: var(--th-shadow-2);
}
.th-card--interactive:focus-within {
  outline: 2px solid var(--th-focus);
  outline-offset: 2px;
}

/* ---- Avatar -------------------------------------------------------------- */
.th-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--th-primary);
  color: var(--th-primary-contrast);
  font-family: var(--th-font);
  font-weight: 700;
  overflow: hidden;
  flex: none;
  user-select: none;
}
.th-avatar img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}
.th-avatar--sm {
  inline-size: 2rem;
  block-size: 2rem;
  font-size: 0.75rem;
}
.th-avatar--md {
  inline-size: 3rem;
  block-size: 3rem;
  font-size: 1rem;
}
.th-avatar--lg {
  inline-size: 4.5rem;
  block-size: 4.5rem;
  font-size: 1.5rem;
}

/* ---- StarRating ---------------------------------------------------------- */
.th-rating {
  display: inline-flex;
  align-items: center;
  gap: var(--th-space-2);
  font-family: var(--th-font);
}
.th-rating__stars {
  position: relative;
  display: inline-block;
  font-size: 1rem;
  line-height: 1;
  /* The empty track is the muted glyphs; the fill clips bright glyphs on top. */
  color: var(--th-border);
}
.th-rating__stars::before {
  content: '★★★★★';
  letter-spacing: 2px;
}
.th-rating__fill {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--th-star);
}
.th-rating__fill::before {
  content: '★★★★★';
  letter-spacing: 2px;
}
.th-rating__value {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--th-text-muted);
}

/* ---- Tag ----------------------------------------------------------------- */
.th-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--th-space-1);
  font-family: var(--th-font);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  padding-block: var(--th-space-1);
  padding-inline: var(--th-space-2);
  border-radius: 999px;
  background: var(--th-surface-2);
  color: var(--th-text-muted);
  border: 1px solid var(--th-border);
}
.th-tag--beginner {
  background: rgba(14, 143, 138, 0.12);
  color: var(--th-primary);
  border-color: transparent;
}
.th-tag--intermediate {
  background: rgba(26, 115, 232, 0.12);
  color: var(--th-focus);
  border-color: transparent;
}
.th-tag--advanced {
  background: rgba(242, 153, 74, 0.16);
  color: var(--th-accent);
  border-color: transparent;
}

/* ---- Price --------------------------------------------------------------- */
.th-price {
  font-family: var(--th-font);
  font-weight: 700;
  color: var(--th-text);
  white-space: nowrap;
}
.th-price__unit {
  font-size: 0.8em;
  font-weight: 500;
  color: var(--th-text-muted);
}

/* ---- Skeleton ------------------------------------------------------------ */
.th-skeleton {
  position: relative;
  overflow: hidden;
  background: var(--th-surface-2);
  border-radius: var(--th-radius-sm);
}
.th-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  animation: th-shimmer 1.4s infinite;
  will-change: transform;
}
[dir='rtl'] .th-skeleton::after {
  animation-name: th-shimmer-rtl;
}
@keyframes th-shimmer {
  100% {
    transform: translateX(100%);
  }
}
@keyframes th-shimmer-rtl {
  100% {
    transform: translateX(-200%);
  }
}

/* ---- Modal / Sheet ------------------------------------------------------- */
.th-modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--th-space-4);
  background: rgba(16, 32, 43, 0.45);
  opacity: 0;
  transition: opacity var(--th-duration) var(--th-ease);
  will-change: opacity;
  z-index: 1000;
}
.th-modal-overlay[data-state='open'] {
  opacity: 1;
}
.th-modal {
  position: relative;
  inline-size: min(34rem, 100%);
  max-block-size: calc(100dvh - 2 * var(--th-space-6));
  overflow: auto;
  background: var(--th-surface);
  color: var(--th-text);
  border-radius: var(--th-radius-lg);
  box-shadow: var(--th-shadow-2);
  padding: var(--th-space-6);
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition:
    transform var(--th-duration) var(--th-ease),
    opacity var(--th-duration) var(--th-ease);
  will-change: transform, opacity;
}
.th-modal-overlay[data-state='open'] .th-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.th-modal__close {
  position: absolute;
  inset-block-start: var(--th-space-4);
  inset-inline-end: var(--th-space-4);
  border: none;
  background: transparent;
  color: var(--th-text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: var(--th-space-1);
  border-radius: var(--th-radius-sm);
}
.th-modal__close:hover {
  background: var(--th-surface-2);
}

/* ---- Status pill --------------------------------------------------------- */
.th-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--th-space-1);
  font-family: var(--th-font);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  padding-block: 3px;
  padding-inline: 11px;
  border-radius: 999px;
  background: var(--th-surface-2);
  color: var(--th-text-muted);
  white-space: nowrap;
}
.th-pill--success {
  background: var(--th-success-tint);
  color: var(--th-success);
}
.th-pill--warn {
  background: var(--th-warn-tint);
  color: var(--th-warn-ink);
}
.th-pill--danger {
  background: var(--th-danger-tint);
  color: var(--th-danger);
}
.th-pill--info {
  background: var(--th-blue-tint);
  color: var(--th-blue-ink);
}

/* ---- fadeUp (dropdowns, menus, inline panels) ---------------------------- */
@keyframes th-fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.th-fade-up {
  animation: th-fade-up 0.2s var(--th-ease);
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
  .th-btn,
  .th-card,
  .th-modal,
  .th-modal-overlay,
  .th-fade-up,
  .th-skeleton::after {
    transition: none;
    animation: none;
  }
}

/**
 * TutorHub dashboard — shell + layout styles.
 *
 * Design tokens come from @ermulaku/ui (imported first in main.tsx): the
 * unprefixed --primary/--surface/--bg/--hero-grad aliases + light/dark theming
 * via [data-theme] and the Teal/Indigo/Plum [data-accent] palettes.
 */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Hanken Grotesk', var(--th-font);
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
}

.muted {
  color: var(--muted);
}
.error {
  color: var(--danger);
}

/* ---- Shell --------------------------------------------------------------- */
.shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}
.shell__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.shell__content {
  padding: 24px 28px;
  max-width: 1300px;
  width: 100%;
}

/* ---- Sidebar ------------------------------------------------------------- */
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 16px;
  background: var(--surface);
  border-inline-end: 1px solid var(--border);
}
.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 8px;
}
.sidebar__logo {
  font-size: 22px;
  color: var(--primary);
}
.sidebar__wordmark {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.sidebar__eyebrow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--faint);
}
.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  overflow-y: auto;
}
.sidebar__group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar__group-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 4px 12px;
}
.sidebar__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.sidebar__link:hover {
  background: var(--surface-2);
}
.sidebar__link--active {
  background: var(--primary-50);
  color: var(--primary-700);
}
.sidebar__badge {
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
}
.sidebar__badge--primary {
  background: var(--primary);
}
.sidebar__badge--danger {
  background: var(--danger);
}
.sidebar__footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar__profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 13px;
  background: var(--primary-50);
  text-decoration: none;
}
.sidebar__profile-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.sidebar__profile-meta {
  font-size: 11.5px;
  color: var(--muted);
}
.sidebar__signout {
  width: 100%;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
}
.sidebar__signout:hover {
  background: var(--danger-tint);
  color: var(--danger);
}

/* ---- Topbar -------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar__title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.topbar__subtitle {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}
.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar__search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 240px;
  padding: 8px 12px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
}
.topbar__search input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
}
.topbar__search-icon {
  flex: none;
}
.topbar__pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.topbar__pill--on {
  background: var(--success-tint);
  color: var(--success);
  border-color: transparent;
}
.topbar__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.topbar__accents {
  display: inline-flex;
  gap: 5px;
  padding: 0 4px;
}
.topbar__accent {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}
.topbar__accent--active {
  border-color: var(--ink);
}
.topbar__icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
}
.topbar__icon-btn:hover {
  color: var(--ink);
}
.topbar__bell-dot {
  position: absolute;
  top: 9px;
  inset-inline-end: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
}

/* ---- Login --------------------------------------------------------------- */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}
.login__panel {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  padding: 32px;
}
.login__brand {
  font-size: 17px;
  font-weight: 600;
}
.login__eyebrow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--faint);
  margin-inline-start: 4px;
}
.login__title {
  margin: 18px 0 4px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.login__subtitle {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13.5px;
}
.login__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.login__field input {
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  outline: none;
}
.login__field input:focus {
  border-color: var(--primary);
}
.login__error {
  margin: 0;
  color: var(--danger);
  font-size: 13px;
}
.login__alt {
  margin: 16px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.login__alt a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.login__alt a:hover {
  text-decoration: underline;
}
.settings__danger-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.login__hint {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12.5px;
}
.login__resend {
  margin-top: 14px;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--primary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* ===== Phase 1 — Dashboard / Calendar / Lessons ========================== */

/* Shared card heads */
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card-head h3,
.card-head__title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card-head h3 {
  margin: 0;
}
.card-head__link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

/* Dashboard */
.dash__greeting h2 {
  margin: 0 0 2px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.dash__greeting p {
  margin: 0 0 20px;
}
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.kpi__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kpi__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--primary-50);
  color: var(--primary-700);
}
.kpi__delta {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}
.kpi__delta--success {
  background: var(--success-tint);
  color: var(--success);
}
.kpi__delta--danger {
  background: var(--danger-tint);
  color: var(--danger);
}
.kpi__delta--neutral {
  background: var(--surface-2);
  color: var(--muted);
}
.kpi__value {
  margin-top: 14px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.kpi__label {
  font-size: 13px;
  color: var(--muted);
}

.dash__cols {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  align-items: start;
}
.dash__rail {
  display: grid;
  gap: 16px;
}

/* Schedule rows */
.sched-list,
.lesson-list {
  display: flex;
  flex-direction: column;
}
.sched-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border-soft);
}
.sched-row:first-child {
  border-top: none;
}
.sched-row__time {
  display: flex;
  flex-direction: column;
  width: 52px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.sched-row__spine {
  width: 3px;
  align-self: stretch;
  border-radius: 3px;
  background: var(--primary);
}
.sched-row__spine--physics {
  background: var(--accent);
}
.sched-row__info {
  flex: 1;
  min-width: 0;
}
.sched-row__title {
  font-size: 14px;
  font-weight: 600;
}

/* Up next */
.upnext {
  background: var(--hero-grad);
  color: #fff;
  border: none;
}
.upnext__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}
.upnext__title {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 700;
}
.upnext__meta {
  margin: 4px 0 14px;
  font-size: 13px;
  opacity: 0.9;
}
.upnext .th-btn--primary {
  background: #fff;
  color: var(--primary-700);
}

/* Quick actions */
.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.quick-action {
  padding: 14px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.quick-action:hover {
  border-color: var(--primary);
  color: var(--primary-700);
}

/* Segmented tabs */
.segtabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.segtabs__tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.segtabs__tab--active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.segtabs__badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* Lessons */
.lesson-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--border-soft);
}
.lesson-row:first-child {
  border-top: none;
}
.lesson-row__who {
  flex: 1;
  min-width: 0;
}
.lesson-row__name {
  font-size: 14px;
  font-weight: 700;
}
.lesson-row__when {
  width: 130px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.lesson-row__actions {
  display: flex;
  gap: 8px;
  width: 220px;
  justify-content: flex-end;
}

/* Calendar */
.cal__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cal__toolbar h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.cal__legend {
  display: flex;
  gap: 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.cal__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cal__legend-item::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--primary);
}
.cal__legend-item--physics::before {
  background: var(--accent);
}
.cal__grid {
  display: grid;
  grid-template-columns: 58px repeat(7, 1fr);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.cal__corner {
  background: var(--surface-2);
  border-inline-end: 1px solid var(--border-soft);
}
.cal__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  background: var(--surface-2);
  border-inline-start: 1px solid var(--border-soft);
  font-size: 12px;
  color: var(--muted);
}
.cal__head strong {
  font-size: 15px;
  color: var(--ink);
}
.cal__head--today strong {
  color: var(--primary-700);
}
.cal__gutter {
  border-inline-end: 1px solid var(--border-soft);
}
.cal__hour {
  font-size: 11px;
  color: var(--faint);
  text-align: end;
  padding: 2px 6px;
  border-top: 1px solid var(--border-soft);
}
.cal__col {
  position: relative;
  border-inline-start: 1px solid var(--border-soft);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent calc(var(--row-h) - 1px),
    var(--border-soft) var(--row-h)
  );
}
.cal__col--today {
  background-color: var(--primary-50);
}
.cal__event {
  position: absolute;
  inset-inline: 3px;
  padding: 5px 7px;
  border-radius: 8px;
  background: var(--primary-50);
  border-inline-start: 3px solid var(--primary);
  overflow: hidden;
}
.cal__event--physics {
  background: var(--accent-tint);
  border-inline-start-color: var(--accent);
}
.cal__event--pending {
  background: var(--warn-tint);
  border-inline-start-color: var(--warn-ink);
}
.cal__event-subject {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
}
.cal__event-meta,
.cal__event-time {
  font-size: 11px;
  color: var(--muted);
}

/* Toasts */
.toast-stack {
  position: fixed;
  inset-block-end: 28px;
  inset-inline: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  z-index: 1200;
}
.toast {
  background: var(--ink);
  color: var(--bg);
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
}

/* ===== Phase 2 — Catalog / Availability ================================== */

/* Catalog */
.catalog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.catalog__head p {
  margin: 0;
}
.catalog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.svc {
  display: flex;
  flex-direction: column;
}
.svc--hidden {
  opacity: 0.62;
}
.svc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.svc-pill {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.svc-pill--primary {
  background: var(--primary-50);
  color: var(--primary-700);
}
.svc-pill--info {
  background: var(--blue-tint);
  color: var(--blue-ink);
}
.svc-pill--accent {
  background: var(--accent-tint);
  color: var(--accent-ink);
}
.svc__dot {
  font-size: 12px;
  font-weight: 600;
  color: var(--faint);
}
.svc__dot--live {
  color: var(--success);
}
.svc__name {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}
.svc__level {
  font-size: 12.5px;
  text-transform: capitalize;
}
.svc__desc {
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0;
  flex: 1;
}
.svc__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}
.svc__price {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.svc__actions {
  display: flex;
  gap: 2px;
}
.catalog__add {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  border: 2px dashed var(--border);
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.catalog__add:hover {
  border-color: var(--primary);
  color: var(--primary-700);
}
.svc-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.svc-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.svc-form select,
.svc-form input {
  font: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink);
}

/* Toggle switch */
.toggle {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  border: none;
  background: var(--border);
  cursor: pointer;
  padding: 0;
  flex: none;
  transition: background var(--th-duration) var(--th-ease);
}
.toggle--on {
  background: var(--primary);
}
.toggle__knob {
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s var(--th-ease);
  will-change: transform;
}
.toggle--on .toggle__knob {
  transform: translateX(18px);
}

/* Availability */
.avail {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 16px;
  align-items: start;
}
.avail__rail {
  display: grid;
  gap: 16px;
}
.avail__days {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}
.avail__day {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--border-soft);
}
.avail__day:first-child {
  border-top: none;
}
.avail__day-name {
  width: 96px;
  font-size: 14px;
  font-weight: 600;
}
.avail__range {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.avail__range input,
.avail__off-add input {
  font: inherit;
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink);
}
.avail__rules {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}
.avail__off-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--border-soft);
  font-size: 13.5px;
}
.avail__off-add {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 8px;
  margin-top: 12px;
}

/* ===== Phase 3 — Messages ================================================ */
.chat {
  display: grid;
  grid-template-columns: 320px 1fr;
  padding: 0;
  overflow: hidden;
  height: calc(100vh - 66px - 48px);
}
.chat__list {
  border-inline-end: 1px solid var(--border);
  overflow-y: auto;
}
.chat__thread {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid var(--border-soft);
  background: transparent;
  cursor: pointer;
  text-align: start;
}
.chat__thread:hover {
  background: var(--surface-2);
}
.chat__thread--active {
  background: var(--primary-50);
}
.chat__thread-body {
  flex: 1;
  min-width: 0;
}
.chat__thread-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.chat__thread-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.chat__thread-name--unread {
  font-weight: 700;
}
.chat__thread-time {
  font-size: 11.5px;
  flex: none;
}
.chat__thread-preview {
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat__unread {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex: none;
}
.chat__pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.chat__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.chat__header-name {
  font-size: 15px;
  font-weight: 700;
}
.chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat__bubble {
  max-width: 70%;
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.4;
}
.chat__bubble--mine {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-radius: 14px 14px 4px 14px;
}
.chat__bubble--theirs {
  align-self: flex-start;
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 4px;
}
.chat__composer {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
}
.chat__composer input {
  flex: 1;
  font: inherit;
  font-size: 14px;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink);
  outline: none;
}
.chat__send {
  padding: 0 18px;
  border: none;
  border-radius: 11px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.chat__empty {
  display: grid;
  place-items: center;
  height: 100%;
}

/* ===== Phase 4 — Earnings ================================================ */
.earn__top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.earn__balance {
  background: var(--hero-grad);
  color: #fff;
  border: none;
}
.earn__balance-label {
  font-size: 12.5px;
  opacity: 0.85;
}
.earn__balance-value {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin: 4px 0;
}
.earn__balance-meta {
  font-size: 12.5px;
  opacity: 0.9;
  margin-bottom: 14px;
}
.earn__balance .th-btn--primary {
  background: #fff;
  color: var(--primary-700);
}
.earn__stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.earn__stat-label {
  font-size: 13px;
  color: var(--muted);
}
.earn__stat-value {
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-top: 6px;
}
.earn__mid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
  align-items: start;
}
.earn__method {
  font-size: 18px;
  font-weight: 700;
  margin: 6px 0 8px;
}

/* Bar chart */
.barchart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 200px;
  padding-top: 18px;
}
.barchart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 6px;
}
.barchart__value {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.barchart__bar {
  width: 100%;
  max-width: 38px;
  background: var(--primary-100);
  border-radius: 7px 7px 0 0;
  min-height: 4px;
}
.barchart__bar--hl {
  background: var(--primary);
}
.barchart__label {
  font-size: 11.5px;
  color: var(--faint);
}

/* Transactions table */
.txn {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.txn th {
  text-align: start;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--faint);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.txn td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border-soft);
}
.txn__net {
  color: var(--success);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ===== Phase 5 — Marketing =============================================== */
.mkt__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.mkt__promos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.promo__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.promo__name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.promo__discount {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}
.promo__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 13px;
}
.codechip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  cursor: pointer;
  font: inherit;
}
.codechip__code {
  font-family: ui-monospace, monospace;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ink);
}
.codechip__icon {
  color: var(--primary);
}
.mkt__bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.mkt__gift {
  background: var(--hero-grad);
  color: #fff;
  border: none;
}
.mkt__gift-value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 10px;
}
.mkt__referral {
  display: flex;
  gap: 32px;
  margin-top: 12px;
}
.mkt__referral-num {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ===== Phase 6 — Reviews / Analytics / Settings / Onboarding ============= */

/* Reviews */
.rev-summary {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  margin-bottom: 16px;
}
.rev-summary__score {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  border-inline-end: 1px solid var(--border-soft);
}
.rev-summary__avg {
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
}
.rev-summary__dist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}
.rev-summary__row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rev-summary__star {
  width: 28px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.rev-summary__bar-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.rev-summary__bar-fill {
  height: 100%;
  background: var(--star);
  border-radius: 999px;
}
.rev-summary__count {
  width: 24px;
  text-align: end;
  font-size: 12.5px;
}
.reviews__list {
  display: grid;
  gap: 14px;
}
.review__head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.review__who {
  flex: 1;
}
.review__name {
  font-size: 14px;
  font-weight: 700;
}
.review__body {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.5;
}
.review__reply {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--primary-50);
  border-inline-start: 3px solid var(--primary);
  border-radius: 0 10px 10px 0;
  font-size: 13.5px;
}
.review__reply-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-700);
  margin-bottom: 4px;
}
.review__reply-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.review__reply-form input {
  flex: 1;
  font: inherit;
  font-size: 13.5px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink);
}

/* Analytics */
.analytics__row {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}
.areachart {
  width: 100%;
  height: 200px;
}
.topsubs {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.topsubs__row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topsubs__name {
  width: 110px;
  font-size: 13px;
  font-weight: 600;
}
.topsubs__track {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.topsubs__fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
}
.topsubs__pct {
  width: 36px;
  text-align: end;
  font-size: 12.5px;
}
.splitbar {
  display: flex;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  margin: 8px 0 12px;
}
.splitbar__seg--ret {
  background: var(--primary);
}
.splitbar__seg--new {
  background: var(--accent);
}
.splitbar__legend {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--muted);
}
.splitbar__dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-inline-end: 6px;
}
.splitbar__dot--ret {
  background: var(--primary);
}
.splitbar__dot--new {
  background: var(--accent);
}

/* Settings */
.settings__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.settings__form .login__field:nth-child(3) {
  grid-column: 1 / -1;
}
.settings__form input,
.settings__form textarea {
  font: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink);
  resize: vertical;
}
.settings__method {
  font-size: 18px;
  font-weight: 700;
  margin-top: 6px;
}
.payout-editor {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.payout-editor .login__field {
  width: 100%;
}
.payout-editor__schedule {
  margin-top: 6px;
}
.payout-editor__connect {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.payout-editor__connect-hint {
  font-size: 12.5px;
}
.settings__schedule {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.settings__sched {
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.settings__sched--active {
  background: var(--primary-50);
  color: var(--primary-700);
  border-color: var(--primary);
}
.settings__notify {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--border-soft);
}
.settings__notify:first-child {
  border-top: none;
}
.settings__notify-title {
  font-size: 14px;
  font-weight: 600;
}

/* Onboarding */
/* Onboarding is always presented in light mode (matches the design), so it
   re-declares the light --th-* tokens locally to override [data-theme='dark']
   on <html>. Every unprefixed alias (--bg, --ink, --surface-2, …) maps onto
   these via var(), so the whole wizard flips back to light with no per-rule
   changes. `.ob-modal` is the "Add subject" modal panel, which portals to
   <body> (outside .ob), so it opts into the same light tokens explicitly. */
.ob,
.ob-modal {
  --th-bg: #ffffff;
  --th-surface: #ffffff;
  --th-surface-2: #f4f6f8;
  --th-border: #e3e8ee;
  --th-text: #16202b;
  --th-text-muted: #5b6b7b;
  --th-primary: #0e8f8a;
  --th-primary-hover: #0b746f;
  --th-primary-contrast: #ffffff;
  --th-primary-50: #f0f9f8;
  --th-primary-100: #d9efed;
  --th-primary-700: #0b746f;
  --th-accent-ink: #c2752b;
  --th-accent-tint: #fcecdb;
  --th-danger: #e5484d;
  --th-danger-tint: #fbe6e7;
  --th-success: #1fa463;
  --th-success-tint: #e2f5ea;
  --th-warn-ink: #b67d12;
  --th-warn-tint: #fdf3e0;
  --th-blue-ink: #2f6fd0;
  --th-blue-tint: #e8f0fb;
  --th-border-soft: #eef2f6;
  --th-shadow-1: 0 1px 2px rgba(16, 32, 43, 0.06), 0 1px 3px rgba(16, 32, 43, 0.1);
  --th-shadow-md: 0 8px 24px rgba(22, 32, 43, 0.09);
  --th-shadow-lg: 0 22px 54px rgba(22, 32, 43, 0.18);
  --faint: #9fb0bf;
  --hero-grad: linear-gradient(150deg, #13a39d 0%, #0c6f6a 55%, #0a5550 100%);
  color-scheme: light;
}
.ob {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  grid-template-columns: 330px 1fr;
  background: var(--bg);
}
.ob__panel {
  background: var(--hero-grad);
  color: #fff;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}
.ob__brand {
  font-size: 18px;
  font-weight: 600;
}
.ob__panel-title {
  margin: 28px 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}
.ob__stepper {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}
.ob__step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.6;
}
.ob__step--current {
  opacity: 1;
}
.ob__step--done {
  opacity: 0.85;
}
.ob__step-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.ob__step--done .ob__step-dot,
.ob__step--current .ob__step-dot {
  background: #fff;
  color: var(--primary-700);
}
.ob__panel-foot {
  font-size: 13px;
  opacity: 0.85;
}
.ob__content {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px;
}
.ob__close {
  position: absolute;
  top: 20px;
  inset-inline-end: 24px;
  border: none;
  background: transparent;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
}
.ob__body {
  flex: 1;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.ob__body h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
}
.ob__features {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}
.ob__features li {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface-2);
  font-weight: 600;
}
.ob__subjects {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: grid;
  gap: 12px;
}
.ob__subject {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.ob__subject-avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 700;
}
.ob__subject-avatar--teal {
  background: var(--primary-100);
  color: var(--primary-700);
}
.ob__subject-avatar--accent {
  background: var(--accent-tint);
  color: var(--accent-ink);
}
.ob__subject-avatar--blue {
  background: var(--blue-tint);
  color: var(--blue-ink);
}
.ob__subject-avatar--green {
  background: var(--success-tint);
  color: var(--success);
}
.ob__subject-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ob__subject-name {
  font-weight: 700;
  color: var(--ink);
}
.ob__subject-meta {
  font-size: 13px;
  color: var(--muted);
}
.ob__subject-price {
  margin-inline-start: auto;
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  white-space: nowrap;
}
.ob__subject-per {
  font-weight: 500;
  font-size: 13px;
  color: var(--muted);
}
.ob__subject-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  border: 1.5px dashed var(--border);
  background: transparent;
  color: var(--primary-700);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: border-color var(--th-duration, 0.2s) ease, background var(--th-duration, 0.2s) ease;
}
.ob__subject-add:hover {
  border-color: var(--primary);
  background: var(--primary-50);
}
/* The onboarding shell is a fixed z-index:2000 layer; lift the "Add subject"
   modal (portaled to <body>, default overlay z-index:1000) above it. */
.th-modal-overlay:has(.ob-modal) {
  z-index: 2100;
}
.ob__check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--success-tint);
  color: var(--success);
  display: grid;
  place-items: center;
  font-size: 28px;
}
.ob__footer {
  display: flex;
  justify-content: space-between;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
  padding-top: 18px;
}
.ob__footer .th-btn:only-child {
  margin-inline-start: auto;
}

/* ===== Responsive ======================================================== */

/* Hamburger + drawer backdrop are desktop-hidden by default. */
.topbar__menu {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-inline-end: 4px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  flex: none;
}
.shell__backdrop {
  display: none;
  border: none;
  padding: 0;
}

/* --- Tablet / drawer threshold --- */
@media (max-width: 1024px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    width: 264px;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 0.22s var(--th-ease);
    will-change: transform;
    box-shadow: var(--shadow-lg);
  }
  [dir='rtl'] .sidebar {
    transform: translateX(100%);
  }
  .shell--drawer-open .sidebar {
    transform: none;
  }
  .shell--drawer-open .shell__backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(16, 32, 43, 0.45);
  }
  .topbar__menu {
    display: inline-flex;
  }
  .topbar__search {
    display: none;
  }
}

/* --- Collapse two-column layouts --- */
@media (max-width: 900px) {
  .dash__cols,
  .earn__mid,
  .avail,
  .analytics__row,
  .mkt__bottom,
  .rev-summary,
  .settings__form {
    grid-template-columns: 1fr;
  }
  .kpi-row,
  .earn__top,
  .mkt__stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .rev-summary__score {
    border-inline-end: none;
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 16px;
  }
}

/* --- Phone --- */
@media (max-width: 640px) {
  .shell__content {
    padding: 16px;
  }
  .topbar {
    padding: 0 16px;
    gap: 8px;
  }
  .topbar__subtitle {
    display: none;
  }
  .topbar__title {
    font-size: 17px;
  }
  .topbar__actions {
    gap: 6px;
  }
  /* Trim the crowded topbar on phones — these live elsewhere on mobile. */
  .topbar__pill,
  .topbar__accents,
  .topbar__actions > .th-btn {
    display: none;
  }
  .kpi-row,
  .earn__top,
  .mkt__stats,
  .svc-form__row,
  .avail__off-add {
    grid-template-columns: 1fr;
  }
  /* Wide content (tables, calendar grid) scrolls within its card. */
  .th-card {
    overflow-x: auto;
  }
  .cal__grid {
    min-width: 700px;
  }
  .txn {
    min-width: 460px;
  }
  /* Chat stacks: thread list above, conversation below. */
  .chat {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - 66px - 32px);
  }
  .chat__list {
    max-height: 220px;
    border-inline-end: none;
    border-bottom: 1px solid var(--border);
  }
  .lesson-row {
    flex-wrap: wrap;
  }
  .lesson-row__when {
    width: auto;
  }
  .lesson-row__actions {
    width: 100%;
    justify-content: flex-start;
  }
  /* Onboarding: drop the side panel, keep the steps. */
  .ob {
    grid-template-columns: 1fr;
  }
  .ob__panel {
    display: none;
  }
  .login__panel {
    padding: 24px;
  }
}

/* Calendar week navigation */
.cal__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cal__chevron {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.cal__chevron:hover {
  border-color: var(--primary);
  color: var(--primary-700);
}

/* Dashboard setup banner + latest review */
.setup-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--hero-grad);
  color: #fff;
  margin-bottom: 20px;
}
.setup-banner__text strong {
  display: block;
  font-size: 15px;
}
.setup-banner__text span {
  font-size: 13px;
  opacity: 0.9;
}
.setup-banner__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.setup-banner .th-btn--primary {
  background: #fff;
  color: var(--primary-700);
}
.setup-banner__close {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.85;
  padding: 4px;
}
.latest-review__quote {
  font-size: 13.5px;
  line-height: 1.5;
  margin: 10px 0;
}
.latest-review__by {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

/* Notifications dropdown */
.notif {
  position: relative;
}
.notif__panel {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: 0;
  width: 320px;
  max-height: 420px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 70;
  padding: 6px;
}
.notif__head {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--faint);
  padding: 10px 12px 6px;
}
.notif__empty {
  padding: 16px 12px;
  font-size: 13.5px;
}
.notif__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
}
.notif__item:hover {
  background: var(--surface-2);
}
.notif__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex: none;
}
.notif__dot--warn {
  background: var(--warn-ink);
}
.notif__dot--primary {
  background: var(--primary);
}
.notif__dot--star {
  background: var(--star);
}
.notif__body {
  flex: 1;
  min-width: 0;
}
.notif__title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
}
.notif__detail {
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notif__time {
  font-size: 11.5px;
  flex: none;
}

/* Calendar toolbar right cluster + month view */
.cal__toolbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.cal__toolbar-right .segtabs {
  margin-bottom: 0;
}
.cal-month__head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cal-month__head > div {
  padding: 6px 8px;
}
.cal-month__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(96px, auto);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.cal-month__cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  padding: 6px;
  border-inline-start: 1px solid var(--border-soft);
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
  text-align: start;
  cursor: pointer;
  min-width: 0;
}
.cal-month__cell:hover {
  background: var(--surface-2);
}
.cal-month__cell--muted {
  background: var(--surface-2);
  opacity: 0.55;
}
.cal-month__date {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}
.cal-month__cell--today .cal-month__date {
  color: #fff;
  background: var(--primary);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cal-month__chip {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--primary-50);
  color: var(--primary-700);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-month__chip--physics {
  background: var(--accent-tint);
  color: var(--accent-ink);
}
.cal-month__more {
  font-size: 10.5px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .cal__toolbar-right {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .cal-month__grid {
    min-width: 640px;
  }
}

/* Lessons search-results chip */
.lessons__searchbar {
  margin-bottom: 16px;
}
.lessons__searchchip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 14px;
  border-radius: 999px;
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 13px;
  font-weight: 600;
}
.lessons__searchchip button {
  border: none;
  background: var(--primary);
  color: #fff;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  cursor: pointer;
  line-height: 1;
}


/*# sourceMappingURL=main.f13f89f92266bd2a37ed.css.map*/