/* ============================================
   MathExpert — styles
   Palette inspired by the logo (teal + navy)
   ============================================ */

:root {
  --navy: #0F2942;
  --navy-800: #14324F;
  --navy-600: #24476B;
  --teal: #14B8A6;
  --teal-600: #0E9488;
  --teal-100: #E8F7F4;
  --gold: #C9A961;          /* nou: auriu discret pentru spirală + accente */
  --gold-soft: #E8DCC4;
  --cream: #FFFFFF;         /* alb pur */
  --cream-2: #F6F6F4;       /* gri cald foarte subtil */
  --coral: #D96E3E;         /* folosit mai rar, doar warnings */
  --coral-soft: #E89570;
  --ink: #0F1419;
  --ink-2: #3A4756;
  --muted: #6B7684;
  --line: #ECECEA;
  --line-2: #D9D9D5;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(15, 41, 66, 0.04), 0 2px 6px rgba(15, 41, 66, 0.03);
  --shadow-md: 0 6px 16px rgba(15, 41, 66, 0.06), 0 2px 4px rgba(15, 41, 66, 0.03);
  --shadow-lg: 0 20px 40px rgba(15, 41, 66, 0.10);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --font-heading: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* --- reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; letter-spacing: -0.01em; margin: 0; color: var(--navy); }
h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1.08; font-weight: 600; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.15; }
h3 { font-size: 1.25rem; line-height: 1.25; }
p { margin: 0 0 1rem; color: var(--ink-2); }
p:last-child { margin-bottom: 0; }

/* --- layout --- */
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-600);
  margin-bottom: 14px;
}
.eyebrow-light { color: var(--teal-100); }

.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { margin-bottom: 14px; }
.section-sub { color: var(--ink-2); font-size: 1.05rem; }

/* --- buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  border: 1.5px solid transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-lg { padding: 15px 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-800); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-outline-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); padding: 15px 28px; }
.btn-outline-light:hover { background: var(--white); color: var(--navy); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: rgba(15, 41, 66, 0.06); }

/* ============================================
   HEADER / NAV
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 238, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(15,41,66,0.03);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand { display: inline-flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.brand-logo { height: 56px; width: auto; display: block; }

@media (max-width: 1080px) {
  .brand-logo { height: 48px; }
}
@media (max-width: 560px) {
  .brand-logo { height: 42px; }
}
@media (max-width: 380px) {
  .brand-logo { height: 36px; }
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  min-width: 0;
}
.main-nav > ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 2px;
  align-items: center;
  flex-wrap: nowrap;
  flex: 1;
  justify-content: center;
}
.main-nav > ul a {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav > ul a:hover { background: rgba(15,41,66,0.06); color: var(--navy); }
.nav-badge { display: inline-flex; align-items: center; gap: 6px; }
.badge {
  background: var(--coral);
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
}

.auth-buttons { display: flex; align-items: center; gap: 8px; position: relative; flex-shrink: 0; }
.auth-buttons .btn { padding: 9px 16px; font-size: 0.88rem; white-space: nowrap; }
.auth-group { position: relative; }
.auth-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 60;
}
.auth-group.is-open .auth-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.auth-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.92rem;
  color: var(--ink);
}
.auth-menu a:hover { background: var(--cream-2); color: var(--navy); }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 96px;
  background: #ffffff;
}

/* ============================================
   SPIRALA FIBONACCI / DE AUR — animată
   ============================================ */
.hero-spiral {
  position: absolute;
  right: -8%;
  top: 50%;
  transform: translateY(-50%);
  width: 720px; height: 720px;
  pointer-events: none;
  z-index: 0;
}
.hero-spiral svg {
  width: 100%; height: 100%; display: block;
  overflow: visible;
  animation: spiralRotate 120s linear infinite;
}
@keyframes spiralRotate {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Curba spiralei — se desenează singură, apoi se "scurge" prin ea */
.fib-spiral {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: spiralDraw 9s cubic-bezier(0.65, 0, 0.35, 1) infinite;
  filter: drop-shadow(0 0 8px rgba(201, 169, 97, 0.25));
}
@keyframes spiralDraw {
  0%   { stroke-dashoffset: 1000; opacity: 0.2; }
  25%  { opacity: 0.9; }
  50%  { stroke-dashoffset: 0; opacity: 0.9; }
  75%  { opacity: 0.9; }
  100% { stroke-dashoffset: -1000; opacity: 0.2; }
}

/* Dreptunghiuri Fibonacci — pulsează unul după altul */
.fib-rect {
  stroke-width: 1.1;
  opacity: 0.25;
  animation: fibPulse 9s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.6s);
  transform-origin: center;
}
@keyframes fibPulse {
  0%, 100% { opacity: 0.2; }
  40%, 60% { opacity: 0.65; }
}

/* Punctul central φ — respiră */
.fib-dot {
  animation: fibBreathe 3s ease-in-out infinite;
  transform-origin: -21px 34px;
}
@keyframes fibBreathe {
  0%, 100% { opacity: 0.5; r: 2.5; }
  50%      { opacity: 1;   r: 4.5; }
}

.hero-inner { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .hero-spiral svg, .fib-spiral, .fib-rect, .fib-dot { animation: none; }
  .fib-spiral { stroke-dashoffset: 0; opacity: 0.6; }
  .fib-rect { opacity: 0.4; }
}
@media (max-width: 980px) {
  .hero-spiral { right: -40%; width: 540px; height: 540px; opacity: 0.75; }
}
@media (max-width: 560px) {
  .hero-spiral { display: none; }
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: center;
}

/* Layout editorial: titlu + CTA sus, stats sub, fără cards decorative */
.hero-inner--editorial {
  display: block;
  position: relative;
  max-width: 920px;
}
.hero-inner--editorial .hero-copy {
  max-width: 720px;
  padding: 20px 0 56px;
}
.hero-inner--editorial .hero-copy .lead { max-width: 620px; }
.hero-inner--editorial .hero-visual { display: none !important; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.hero-stats > div { display: flex; flex-direction: column; gap: 8px; }
.hero-stat-num {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1;
}
.hero-stat-num small {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  margin-left: 4px;
  letter-spacing: 0.08em;
}
.hero-stat-lbl {
  font-size: 0.85rem;
  color: var(--ink-2);
  line-height: 1.4;
}

@media (max-width: 780px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 24px; padding-top: 24px; }
  .hero-inner--editorial .hero-copy { padding-bottom: 32px; padding-top: 10px; }
  .hero-stat-num { font-size: 1.9rem; }
  .hero-stat-lbl { font-size: 0.78rem; }
  .hero-stat-lbl br { display: none; }
}
@media (max-width: 420px) {
  .hero-inner--editorial .hero-copy h1 { font-size: 1.75rem; line-height: 1.2; }
  .hero-stats { gap: 18px; }
  .hero-stat-num { font-size: 1.6rem; }
}

/* nav dot (în loc de badge "În lucru") */
.nav-dot {
  color: var(--coral);
  font-size: 1.2em;
  line-height: 0;
  margin-left: 2px;
  vertical-align: middle;
}

/* btn cu iconiță (WhatsApp etc) */
.btn-icon { display: inline-flex; align-items: center; gap: 8px; }
.contact-quick {
  margin-top: 20px;
  display: flex; gap: 10px; flex-wrap: wrap;
}
.contact-quick .btn-ghost {
  border: 1px solid var(--line-2);
  padding: 10px 18px;
}
.contact-quick .btn-ghost:hover { background: #0088cc; color: #fff; border-color: #0088cc; }

/* --- Contact form success state --- */
.contact-success {
  text-align: center;
  padding: 20px 10px;
}
.contact-success-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.contact-success h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--navy);
  margin: 0 0 12px;
}
.contact-success p {
  color: var(--ink-2);
  font-size: 1rem;
  margin: 0 0 10px;
  line-height: 1.55;
}
.contact-success-hint {
  color: var(--muted) !important;
  font-size: 0.9rem !important;
  margin-top: 16px !important;
}
.contact-success-hint a { color: var(--teal-600); font-weight: 600; }
.contact-success-hint a:hover { text-decoration: underline; }

/* ============================================
   ADMIN: CERERI DE PROBĂ
   ============================================ */
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 6px;
  background: var(--coral);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
}

.requests-filter { display: flex; gap: 6px; flex-wrap: wrap; }

.requests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.req-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.req-card.is-new { border-left: 4px solid var(--coral); }
.req-card:hover { box-shadow: var(--shadow-md); }
.req-card.req-inscris { opacity: 0.75; }
.req-card.req-refuzat { opacity: 0.55; }

.req-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.req-name strong { color: var(--navy); font-size: 1.05rem; }
.req-name .muted { color: var(--muted); font-size: 0.88rem; margin-left: 4px; }

.req-status {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.req-status-nou       { background: rgba(217,110,62,0.15); color: var(--coral); }
.req-status-contactat { background: var(--teal-100); color: var(--teal-600); }
.req-status-inscris   { background: rgba(34,197,94,0.15); color: #16a34a; }
.req-status-refuzat   { background: var(--cream-2); color: var(--muted); }

.req-contact { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.req-tel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--cream-2);
  color: var(--navy);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}
.req-tel:hover { background: var(--teal); color: var(--white); }
.req-contact .muted { font-size: 0.82rem; color: var(--muted); }

.req-msg {
  background: var(--cream-2);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin: 0;
  color: var(--ink-2);
  font-size: 0.9rem;
  line-height: 1.5;
}
.req-notes {
  background: rgba(201,169,97,0.1);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-2);
  font-style: italic;
}

.req-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.req-time { font-size: 0.76rem; color: var(--muted); }
.req-actions { display: flex; gap: 4px; flex-wrap: wrap; }

@media (max-width: 720px) {
  .requests-grid { grid-template-columns: 1fr; }
  .req-card { padding: 16px; }
  .req-footer { flex-direction: column; align-items: stretch; }
  .req-actions { justify-content: flex-start; }
}

/* ascund trust-bar: datele sunt deja în hero */
.trust-bar { display: none; }
.hero-copy h1 em {
  font-style: italic;
  color: var(--gold);
  font-weight: 500;
  font-family: var(--font-heading);
}
.hero-copy h1 .mark {
  background: linear-gradient(180deg, transparent 70%, var(--gold-soft) 70%, var(--gold-soft) 92%, transparent 92%);
  padding: 0 3px;
}
.hero-copy .lead {
  font-size: 1.1rem;
  color: var(--ink-2);
  margin: 22px 0 30px;
  max-width: 560px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-facts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  border-left: 3px solid var(--teal);
  padding-left: 16px;
}
.hero-facts li { font-size: 0.95rem; color: var(--ink-2); }
.hero-facts strong { color: var(--navy); font-weight: 700; }

/* hero visual */
.hero-visual {
  position: relative;
  min-height: 460px;
}
.hero-card {
  position: absolute;
  background: var(--white);
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  max-width: 240px;
}
.hero-card .tag {
  display: inline-block;
  background: var(--teal-100);
  color: var(--teal-600);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.hero-card p { font-size: 0.95rem; color: var(--ink); line-height: 1.45; }
.hero-card.card-1 { top: 20px; left: 0; transform: rotate(-3deg); }
.hero-card.card-2 { top: 180px; right: 20px; transform: rotate(2deg); background: var(--navy); color: var(--white); border-color: var(--navy); }
.hero-card.card-2 .tag { background: rgba(255,255,255,0.15); color: var(--teal-100); }
.hero-card.card-2 p { color: var(--white); }
.hero-card.card-2 strong { color: var(--coral-soft); }
.hero-card.card-3 { bottom: 20px; left: 40px; transform: rotate(-1deg); background: var(--cream-2); }
.hero-card.card-3 strong { color: var(--teal-600); }
.hero-formula {
  position: absolute;
  top: 40%;
  right: -20px;
  opacity: 0.14;
  z-index: -1;
}

/* ============================================
   TRUST BAR
   ============================================ */
.trust-bar {
  background: var(--navy);
  color: var(--white);
  padding: 40px 0;
}
.trust-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.trust-item { text-align: center; }
.trust-num {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 8px;
}
.trust-lbl { font-size: 0.9rem; color: rgba(255,255,255,0.75); line-height: 1.4; display: block; }

/* ============================================
   WHY US
   ============================================ */
.why { background: var(--cream); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.why-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.why-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal);
}
.why-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--teal-100);
  color: var(--teal-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.why-card h3 { margin-bottom: 8px; }
.why-card p { font-size: 0.96rem; color: var(--ink-2); }

/* ============================================
   PRICING
   ============================================ */
.pricing { background: var(--cream-2); }
.faq { background: var(--white); border-top: 1px solid var(--line); }
.contact { background: var(--white); }
.teachers { background: var(--white); border-top: 1px solid var(--line); }
.why { background: var(--white); }
.reviews { background: var(--cream-2); }
.resources { background: var(--white); border-top: 1px solid var(--line); }
.section-head h2 { letter-spacing: -0.015em; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.price-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.price-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.price-card header { margin-bottom: 20px; }
.price-size {
  display: inline-block;
  background: var(--cream-2);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.price-card h3 { color: var(--navy); }
.price-amount {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px dashed var(--line-2);
}
.price-amount .num {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1;
}
.price-amount .cur { font-weight: 600; color: var(--navy); font-size: 0.95rem; }
.price-amount .per { color: var(--muted); font-size: 0.88rem; margin-left: 6px; }
.price-features {
  list-style: none;
  padding: 0;
  margin: 0 0 auto;
  display: grid;
  gap: 10px;
}
.price-features li {
  font-size: 0.92rem;
  color: var(--ink-2);
  padding-left: 22px;
  position: relative;
}
.price-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 12px;
  background: var(--teal-100);
  border-radius: 50%;
  border: 2px solid var(--teal);
}

.price-card--featured {
  grid-column: span 3;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-600) 100%);
  color: var(--white);
  border-color: var(--navy);
  padding: 40px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
}
.price-card--featured header { margin-bottom: 0; grid-column: 1; }
.price-card--featured h3 { color: var(--white); font-size: 1.8rem; }
.price-card--featured .price-size { background: rgba(255,255,255,0.12); color: var(--teal-100); }
.price-card--featured .price-amount {
  grid-column: 1;
  border-bottom-color: rgba(255,255,255,0.2);
  margin-bottom: 0;
}
.price-card--featured .price-amount .num { color: var(--coral-soft); font-size: 4rem; }
.price-card--featured .price-amount .cur,
.price-card--featured .price-amount .per { color: rgba(255,255,255,0.85); }
.price-card--featured .price-features {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: start;
}
.price-card--featured .price-features li { color: rgba(255,255,255,0.9); font-size: 0.98rem; }
.price-card--featured .price-features li::before { background: rgba(255,255,255,0.15); border-color: var(--coral-soft); }
.price-card--featured .price-features li strong { color: var(--coral-soft); }
.price-card--featured .btn { grid-column: 1; margin-top: 8px; background: var(--coral); color: var(--white); border-color: var(--coral); }
.price-card--featured .btn:hover { background: var(--coral-soft); border-color: var(--coral-soft); color: var(--navy); }
.price-card--featured .price-note {
  grid-column: 1;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  margin: 0;
}
.price-badge {
  position: absolute;
  top: -14px;
  left: 32px;
  background: var(--coral);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}

/* ============================================
   TEACHERS
   ============================================ */
.teachers { background: var(--cream); }
.teachers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.teacher-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}
.teacher-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.teacher-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--cream-2);
  color: var(--navy);
  margin-bottom: 14px;
}
.teacher-card:first-child { border-color: var(--teal); box-shadow: var(--shadow-sm); }
.teacher-card:first-child .teacher-tag { background: var(--teal); color: var(--white); }
.teacher-card:first-child .teacher-portrait { background: linear-gradient(135deg, var(--coral) 0%, var(--navy) 100%); }
.teacher-portrait {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal) 0%, var(--navy) 100%);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 600;
  position: relative;
}
.teacher-portrait::before { content: attr(data-letter); }
.teacher-portrait::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px dashed var(--teal);
  opacity: 0.4;
}
.teacher-card h3 { margin-bottom: 4px; }
.teacher-role {
  display: block;
  font-size: 0.85rem;
  color: var(--teal-600);
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.teacher-card p { font-size: 0.94rem; }

/* ============================================
   RESOURCES
   ============================================ */
.resources { background: var(--cream-2); }
.resources-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: center;
}
.resources-copy h2 { margin-bottom: 16px; }
.resources-list {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  display: grid;
  gap: 18px;
}
.resources-list li {
  padding-left: 26px;
  position: relative;
}
.resources-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 14px;
  height: 2px;
  background: var(--teal);
}
.resources-list strong {
  display: block;
  color: var(--navy);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.resources-list span { font-size: 0.95rem; color: var(--ink-2); }

.resources-quote {
  background: var(--navy);
  color: var(--white);
  padding: 40px 34px;
  border-radius: var(--radius-lg);
  position: relative;
}
.resources-quote::before {
  content: "\201C";
  position: absolute;
  top: -30px;
  left: 20px;
  font-family: var(--font-heading);
  font-size: 8rem;
  color: var(--teal);
  line-height: 1;
  opacity: 0.7;
}
.resources-quote blockquote {
  margin: 0 0 16px;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  line-height: 1.35;
  font-weight: 500;
  color: var(--white);
  font-style: italic;
}
.resources-quote cite {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--teal-100);
  letter-spacing: 0.04em;
}

/* ============================================
   MATHONWHEELS
   ============================================ */
.mow {
  background: linear-gradient(135deg, var(--navy) 0%, #0a1c30 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.mow::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(20,184,166,0.15), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(232,128,75,0.10), transparent 40%);
  pointer-events: none;
}
.mow-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: center;
}
.mow h2 { color: var(--white); font-size: clamp(2rem, 3.4vw, 3rem); display: inline-flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.mow-badge {
  background: var(--coral);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mow p { color: rgba(255,255,255,0.85); font-size: 1.05rem; max-width: 540px; }
.mow-tease { color: rgba(255,255,255,0.65) !important; font-size: 0.95rem !important; }
.mow-visual { background: rgba(255,255,255,0.04); border-radius: var(--radius-lg); padding: 20px; border: 1px dashed rgba(255,255,255,0.2); }

/* ============================================
   REVIEWS
   ============================================ */
.reviews { background: var(--cream); }
.reviews-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}
.filter-chip {
  padding: 8px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-2);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.filter-chip:hover { border-color: var(--navy); color: var(--navy); }
.filter-chip.is-active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.reviews-grid {
  columns: 3;
  column-gap: 22px;
}
.review-card {
  break-inside: avoid;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  margin-bottom: 22px;
  display: inline-block;
  width: 100%;
  position: relative;
}
.review-card.hidden { display: none; }
.review-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
}
.review-role {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.review-tag {
  font-size: 0.72rem;
  color: var(--teal-600);
  font-weight: 600;
}
.review-text {
  font-size: 0.96rem;
  color: var(--ink);
  line-height: 1.55;
  margin: 0;
}
.reviews-actions { text-align: center; margin-top: 24px; }

/* ============================================
   FAQ
   ============================================ */
.faq { background: var(--cream-2); }
.faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}
.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 24px;
  transition: box-shadow 0.2s ease;
}
.faq-item[open] { box-shadow: var(--shadow-sm); }
.faq-item summary {
  cursor: pointer;
  padding: 18px 0;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-body);
  color: var(--teal-600);
  font-size: 1.5rem;
  font-weight: 400;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  padding: 0 0 20px;
  font-size: 0.98rem;
}

/* ============================================
   CONTACT
   ============================================ */
.contact { background: var(--cream); }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: start;
  max-width: 1000px;
  margin: 0 auto;
}
.contact-copy h2 { margin-bottom: 16px; }
.contact-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 12px;
}
.contact-list li { font-size: 0.98rem; }
.contact-list strong { color: var(--navy); font-weight: 600; margin-right: 6px; }
.contact-list a { color: var(--teal-600); font-weight: 500; }
.contact-list a:hover { text-decoration: underline; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  display: grid;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--cream);
  color: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease;
  font-weight: 400;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(20,184,166,0.15);
}
.contact-form textarea { resize: vertical; min-height: 90px; }
.form-status { text-align: center; font-size: 0.9rem; color: var(--teal-600); font-weight: 500; margin: 4px 0 0; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.75); padding: 64px 0 24px; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-logo { height: 44px; width: auto; margin-bottom: 14px; }
.footer-brand p { color: rgba(255,255,255,0.65); font-size: 0.9rem; max-width: 300px; }
.footer-col h4 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 16px;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-col a { font-size: 0.9rem; color: rgba(255,255,255,0.7); }
.footer-col a:hover { color: var(--teal-100); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 980px) {
  .section { padding: 72px 0; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { min-height: 380px; max-width: 460px; margin: 0 auto; }
  .trust-inner { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .price-card--featured { grid-column: span 2; grid-template-columns: 1fr; }
  .price-card--featured .price-features { grid-column: 1; grid-row: auto; }
  .teachers-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .resources-inner { grid-template-columns: 1fr; gap: 40px; }
  .mow-inner { grid-template-columns: 1fr; gap: 40px; }
  .reviews-grid { columns: 2; }
  .contact-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 1080px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: 88px;
    left: 0;
    right: 0;
    background: var(--cream);
    border-top: 1px solid var(--line);
    padding: 20px;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - 88px);
    overflow-y: auto;
  }
  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .main-nav > ul { flex-direction: column; gap: 4px; align-items: stretch; flex: initial; justify-content: initial; }
  .main-nav > ul a { padding: 12px 14px; font-size: 1rem; }
  .auth-buttons { flex-direction: column; align-items: stretch; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
  .auth-buttons .btn { padding: 12px 16px; font-size: 0.95rem; }
  .auth-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding: 4px 0 0; background: transparent; min-width: 0; }
  .auth-menu a { padding: 10px 20px; }
  .auth-group .btn { text-align: left; justify-content: flex-start; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding: 60px 0; }
  .wrap { padding: 0 20px; }

  .hero { padding: 48px 0 64px; }
  .hero-cta .btn { flex: 1; }
  .hero-visual { min-height: 360px; }
  .hero-card { max-width: 220px; }

  .trust-inner { grid-template-columns: 1fr 1fr; gap: 20px; }
  .trust-num { font-size: 1.8rem; }

  .why-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .price-card--featured { grid-column: 1; padding: 32px 24px; }

  .reviews-grid { columns: 1; }

  .contact-form { padding: 24px; }
  .form-row { grid-template-columns: 1fr; }

  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
}

/* ============================================
   AUTH PAGES (login / signup)
   ============================================ */
.auth-body {
  background: var(--cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-header {
  background: transparent;
  padding: 24px 0;
  border-bottom: 1px solid transparent;
}
.auth-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto;
}
.auth-header .brand-logo { height: 64px; width: auto; }
@media (max-width: 560px) {
  .auth-header { padding: 18px 0; }
  .auth-header .brand-logo { height: 50px; }
}
.auth-back {
  font-size: 0.9rem;
  color: var(--ink-2);
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.auth-back:hover { background: rgba(15,41,66,0.06); color: var(--navy); }

.auth-main {
  flex: 1;
  padding: 24px 0 60px;
  display: flex;
  align-items: center;
}
.auth-shell {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 32px;
  align-items: stretch;
}

.auth-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.auth-panel-inner {
  padding: 44px 44px 40px;
}
.auth-panel-inner .eyebrow { margin-bottom: 10px; }
.auth-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  color: var(--navy);
  margin: 0 0 8px;
  line-height: 1.15;
  font-weight: 600;
}
.auth-sub {
  color: var(--ink-2);
  font-size: 0.98rem;
  margin: 0 0 28px;
}

/* --- role picker (segmented) --- */
.role-picker {
  margin-bottom: 26px;
}
.role-picker-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}
.role-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  background: var(--cream-2);
  border-radius: 999px;
  border: 1px solid var(--line);
}
.role-tab {
  padding: 11px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.role-tab:hover { color: var(--navy); }
.role-tab.is-active {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

/* --- form --- */
.auth-form {
  display: grid;
  gap: 14px;
}
.auth-form label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
}
.auth-form input,
.auth-form select {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--cream);
  color: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  font-weight: 400;
  width: 100%;
}
.auth-form input:focus,
.auth-form select:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(20,184,166,0.15);
}
.auth-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.field-hint {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}

.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 76px; }
.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal-600);
  background: transparent;
  transition: background 0.15s ease;
}
.password-toggle:hover { background: var(--teal-100); }

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -4px;
  font-size: 0.88rem;
}
.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  font-size: 0.88rem;
}
.checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal-600);
  margin: 0;
  padding: 0;
  cursor: pointer;
}
.checkbox-full { display: flex; align-items: flex-start; gap: 10px; }
.checkbox-full input { margin-top: 3px; flex-shrink: 0; }
.checkbox-full span { font-size: 0.88rem; line-height: 1.45; color: var(--ink-2); font-weight: 400; }

.auth-link {
  color: var(--teal-600);
  font-weight: 600;
}
.auth-link:hover { text-decoration: underline; }

.auth-alt {
  margin-top: 22px;
  text-align: center;
  font-size: 0.92rem;
  color: var(--ink-2);
}
.auth-alt a { color: var(--teal-600); font-weight: 600; }
.auth-alt a:hover { text-decoration: underline; }

/* --- teacher notice --- */
.teacher-notice {
  background: rgba(232,128,75,0.08);
  border: 1px solid rgba(232,128,75,0.3);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.9rem;
  color: var(--ink-2);
  line-height: 1.5;
}
.teacher-notice strong {
  display: block;
  color: var(--coral);
  margin-bottom: 4px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.teacher-notice a { color: var(--coral); font-weight: 600; }
.teacher-notice a:hover { text-decoration: underline; }

/* --- aside (right side) --- */
.auth-aside {
  background: linear-gradient(135deg, var(--navy) 0%, #0a1c30 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.auth-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(20,184,166,0.18), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(232,128,75,0.12), transparent 45%);
  pointer-events: none;
}
.auth-aside-inner { position: relative; width: 100%; }
.auth-aside-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-100);
  padding: 4px 10px;
  background: rgba(20,184,166,0.18);
  border-radius: 999px;
  margin-bottom: 26px;
}
.auth-aside blockquote {
  margin: 0 0 14px;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  line-height: 1.35;
  font-weight: 500;
  color: var(--white);
  font-style: italic;
}
.auth-aside cite {
  font-style: normal;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
}
.auth-aside-formula {
  margin-top: 40px;
  opacity: 0.9;
}
.auth-perks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 18px;
}
.auth-perks li {
  padding-left: 22px;
  position: relative;
}
.auth-perks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 12px;
  height: 2px;
  background: var(--teal);
}
.auth-perks strong {
  display: block;
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.auth-perks span { color: rgba(255,255,255,0.7); font-size: 0.92rem; line-height: 1.45; }

/* --- footer --- */
.auth-footer {
  padding: 22px 0;
  border-top: 1px solid var(--line);
  background: var(--cream);
  font-size: 0.82rem;
  color: var(--muted);
}
.auth-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.auth-footer a { color: var(--muted); }
.auth-footer a:hover { color: var(--navy); }

.form-status.is-error { color: var(--coral); }
.form-status.is-success { color: var(--teal-600); }

/* --- signup success box --- */
.auth-success {
  text-align: center;
  padding: 20px 0 8px;
}
.auth-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 auto 16px;
}
.auth-success h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--navy);
  margin: 0 0 10px;
}
.auth-success p { color: var(--ink-2); font-size: 0.98rem; margin: 0 0 10px; }
.auth-success .auth-success-hint { color: var(--muted); font-size: 0.88rem; margin-bottom: 20px; }
.auth-success .btn { margin-top: 8px; }

@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-panel-inner { padding: 36px 32px; }
  .auth-header-inner { max-width: none; padding: 0 24px; }
}
@media (max-width: 560px) {
  .auth-main { padding: 16px 0 40px; }
  .auth-panel-inner { padding: 28px 22px; }
  .role-tabs { grid-template-columns: 1fr; border-radius: var(--radius); }
  .role-tab { border-radius: var(--radius-sm); }
  .auth-form .form-row { grid-template-columns: 1fr; }
  .auth-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .auth-footer-inner { flex-direction: column; text-align: center; gap: 6px; }
}

/* ============================================
   DASHBOARD
   ============================================ */
.dash-body { background: var(--cream); min-height: 100vh; display: flex; flex-direction: column; }
.dash-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.dash-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.dash-header .brand-logo { height: 60px; }
@media (max-width: 560px) {
  .dash-header { padding: 14px 0; }
  .dash-header .brand-logo { height: 48px; }
}
.dash-user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dash-user-name {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.94rem;
}
.dash-role-pill {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--cream-2);
  color: var(--navy);
}
.dash-role-pill[data-role="admin"]    { background: var(--coral); color: var(--white); }
.dash-role-pill[data-role="profesor"] { background: var(--teal); color: var(--white); }
.dash-role-pill[data-role="parinte"]  { background: var(--teal-100); color: var(--teal-600); }
.dash-role-pill[data-role="elev"]     { background: var(--cream-2); color: var(--navy); }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }

.dash-main { flex: 1; padding: 40px 0 80px; }
.dash-hero { margin-bottom: 40px; max-width: 720px; }
.dash-hero h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin: 6px 0 10px; }
.dash-sub { color: var(--ink-2); font-size: 1rem; }

.dash-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 32px;
  margin-bottom: 24px;
}
.dash-panel h2 {
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 8px;
}
.dash-panel > p { color: var(--ink-2); margin-bottom: 24px; }
.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.dash-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
}
.dash-card h3 {
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 6px;
}
.dash-card.is-empty p {
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
  margin: 0;
}

.dash-loading, .dash-empty, .dash-error {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  background: var(--cream);
  border-radius: var(--radius);
}
.dash-error { color: var(--coral); }

/* --- admin: invites --- */
.admin-invite-card, .admin-users-card {
  margin-top: 24px;
  padding: 24px;
  background: var(--cream);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.admin-invite-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.admin-invite-head h3 { font-size: 1.2rem; color: var(--navy); margin-bottom: 4px; }
.admin-invite-hint { font-size: 0.88rem; color: var(--muted); margin: 0; }
.admin-invite-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-invite-actions input {
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: inherit;
  font-size: 0.9rem;
  min-width: 240px;
}
.admin-invite-actions input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20,184,166,0.15);
}

.admin-invite-list { display: grid; gap: 8px; }
.invite-row {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.invite-row.is-used { opacity: 0.6; }
.invite-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.invite-code {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.05em;
}
.invite-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 0.82rem; }
.invite-note { color: var(--ink-2); }
.invite-date { color: var(--muted); }
.invite-status { font-weight: 600; }
.invite-status.is-open { color: var(--teal-600); }
.invite-status.is-used { color: var(--muted); }
.invite-actions { display: flex; gap: 6px; }

/* --- admin: users table --- */
.admin-users-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.admin-users-table th, .admin-users-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.admin-users-table th {
  background: var(--cream-2);
  font-weight: 600;
  color: var(--navy);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.admin-users-table tbody tr:last-child td { border-bottom: none; }
.admin-users-table .dash-role-pill { font-size: 0.66rem; padding: 3px 8px; }

/* --- admin: expanded --- */
.dash-panel--wide { padding: 32px 28px; }
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.admin-header h2 { margin-bottom: 4px; }
.admin-header p { margin: 0; color: var(--ink-2); }
.admin-tabs {
  display: flex;
  gap: 4px;
  background: var(--cream-2);
  padding: 4px;
  border-radius: 999px;
}
.admin-tab {
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.admin-tab:hover { color: var(--navy); }
.admin-tab.is-active {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}
.admin-tabpanel { display: none; }
.admin-tabpanel:not([hidden]) { display: block; }
.prof-tabpanel { display: none; }
.prof-tabpanel:not([hidden]) { display: block; }

/* stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--navy);
}
.stat-tone-teal::before      { background: var(--teal); }
.stat-tone-teal-soft::before { background: var(--teal-100); }
.stat-tone-coral::before     { background: var(--coral); }
.stat-tone-success::before   { background: #22c55e; }
.stat-tone-muted::before     { background: var(--muted); }

.stat-value {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.01em;
}
.stat-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
}

/* recent list */
.stats-recent {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.stats-recent h3 { font-size: 1.05rem; color: var(--navy); margin-bottom: 14px; }
.recent-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.recent-list li {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-size: 0.9rem;
}
.recent-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--teal-100);
  color: var(--teal-600);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
}
.recent-avatar[data-role="admin"]    { background: var(--coral); color: var(--white); }
.recent-avatar[data-role="profesor"] { background: var(--teal); color: var(--white); }
.recent-main { display: flex; flex-direction: column; min-width: 0; }
.recent-main strong { color: var(--navy); font-weight: 600; font-size: 0.92rem; }
.recent-main span { color: var(--muted); font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-when { color: var(--muted); font-size: 0.82rem; }

/* users toolbar */
.users-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: var(--cream);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.users-search {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: inherit;
  font-size: 0.92rem;
}
.users-search:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20,184,166,0.15);
}
.users-filters { display: flex; gap: 4px; flex-wrap: wrap; }
.users-filters .filter-chip { padding: 7px 14px; font-size: 0.82rem; }
.users-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--ink-2);
  font-weight: 500;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
}
.users-toggle input { accent-color: var(--coral); }

/* users table */
.users-table-wrap {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.admin-users-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-users-table th, .admin-users-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
  vertical-align: middle;
}
.admin-users-table th {
  background: var(--cream-2);
  font-weight: 700;
  color: var(--navy);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.admin-users-table tbody tr:last-child td { border-bottom: none; }
.admin-users-table tbody tr:hover { background: var(--cream); }
.admin-users-table tr.is-suspended { opacity: 0.55; background: rgba(232,128,75,0.04); }
.admin-users-table .ta-right { text-align: right; }
.admin-users-table .dash-role-pill { font-size: 0.66rem; padding: 3px 8px; }

.user-cell { display: flex; align-items: center; gap: 12px; }
.user-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--teal-100);
  color: var(--teal-600);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  flex-shrink: 0;
}
.user-avatar[data-role="admin"]    { background: var(--coral); color: var(--white); }
.user-avatar[data-role="profesor"] { background: var(--teal); color: var(--white); }
.user-avatar.lg { width: 54px; height: 54px; font-size: 1.3rem; }
.user-cell-main { display: flex; flex-direction: column; min-width: 0; }
.user-cell-main strong { color: var(--navy); font-weight: 600; }
.user-cell-main strong em { color: var(--coral); font-style: normal; font-size: 0.75rem; font-weight: 500; margin-left: 4px; }
.user-cell-main span { color: var(--muted); font-size: 0.82rem; }
.user-cell-hint { color: var(--muted); font-size: 0.78rem; }

.status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.status-badge.is-active    { background: rgba(34,197,94,0.15); color: #16a34a; }
.status-badge.is-suspended { background: rgba(232,128,75,0.15); color: var(--coral); }
.status-motiv {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 4px;
  font-style: italic;
}

.row-actions {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.btn-xs {
  padding: 5px 10px;
  font-size: 0.78rem;
  border-radius: 6px;
}
.btn-danger {
  background: transparent;
  color: var(--coral);
  border: 1px solid rgba(232,128,75,0.3);
}
.btn-danger:hover { background: var(--coral); color: var(--white); border-color: var(--coral); }

/* modal */
.mx-modal { display: none; }
.mx-modal:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.mx-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,41,66,0.55);
  backdrop-filter: blur(3px);
}
.mx-modal-panel {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 30px 34px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
}
.mx-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cream-2);
  color: var(--navy);
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mx-modal-close:hover { background: var(--coral); color: var(--white); }
.user-modal-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.user-modal-head h3 { font-family: var(--font-heading); font-size: 1.4rem; color: var(--navy); margin: 0 0 6px; }
.user-dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px 20px; margin: 0; }
.user-dl dt { font-weight: 600; color: var(--ink-2); font-size: 0.85rem; }
.user-dl dd { margin: 0; color: var(--ink); font-size: 0.9rem; word-break: break-word; }
.user-dl code { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 0.78rem; color: var(--teal-600); background: var(--cream-2); padding: 2px 6px; border-radius: 4px; }

@media (max-width: 980px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .recent-list li { grid-template-columns: auto 1fr auto; }
  .recent-when { display: none; }
}

/* ============================================
   GROUPS
   ============================================ */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.group-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.group-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.group-card.is-inactive { opacity: 0.6; }
.group-card-head { display: flex; gap: 6px; flex-wrap: wrap; }
.group-tier {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--teal-100);
  color: var(--teal-600);
  letter-spacing: 0.02em;
}
.group-level {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--cream-2);
  color: var(--navy);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.group-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--navy);
  margin: 0;
  line-height: 1.2;
}
.group-teacher { font-size: 0.9rem; color: var(--ink-2); margin: 0; }
.group-teacher .muted { color: var(--muted); font-style: italic; }
.group-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
}
.group-stats div { display: flex; flex-direction: column; align-items: center; text-align: center; }
.group-stats strong {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--navy);
  line-height: 1;
}
.group-stats span { font-size: 0.72rem; color: var(--muted); margin-top: 4px; }
.group-notes {
  font-size: 0.85rem;
  color: var(--ink-2);
  background: var(--cream);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin: 0;
  font-style: italic;
}
.group-actions { display: flex; gap: 6px; justify-content: space-between; align-items: center; margin-top: auto; }

/* modal — group manager */
.mx-modal-panel--lg { max-width: 720px; }
.modal-title { font-family: var(--font-heading); font-size: 1.4rem; color: var(--navy); margin: 0 0 6px; }
.modal-sub { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.modal-form { margin-top: 16px; }
.modal-form textarea {
  font-family: inherit; font-size: 0.95rem;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--cream);
  color: var(--ink);
  resize: vertical;
  min-height: 60px;
}
.modal-form textarea:focus { outline: none; border-color: var(--teal); background: var(--white); box-shadow: 0 0 0 3px rgba(20,184,166,0.15); }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.manage-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.manage-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.manage-head h4 { font-family: var(--font-heading); color: var(--navy); font-size: 1.1rem; margin: 0; }
.manage-head .muted { color: var(--muted); font-size: 0.85rem; font-weight: 400; margin-left: 6px; }

/* members list */
.member-list, .session-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.member-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--cream);
  border-radius: var(--radius-sm);
}
.member-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.member-main strong { color: var(--navy); font-weight: 600; font-size: 0.92rem; }
.member-main span { color: var(--muted); font-size: 0.8rem; }

.add-member-row {
  margin-top: 10px;
  position: relative;
}
.add-member-row input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--cream);
  font-family: inherit;
  font-size: 0.9rem;
}
.add-member-row input:focus { outline: none; border-color: var(--teal); background: var(--white); box-shadow: 0 0 0 3px rgba(20,184,166,0.15); }
.student-results { margin-top: 6px; display: grid; gap: 4px; max-height: 220px; overflow-y: auto; }
.student-hit {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 8px 12px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  cursor: pointer; text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.student-hit:hover { background: var(--cream); border-color: var(--teal); }
.student-hit strong { font-size: 0.9rem; color: var(--navy); }
.student-hit span { font-size: 0.78rem; color: var(--muted); }

/* session list */
.session-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: var(--cream);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}
.session-list li strong { color: var(--navy); min-width: 80px; }
.session-list .muted { color: var(--muted); font-size: 0.85rem; }
.session-list li button { margin-left: auto; }

.add-session-form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
}
.add-session-form select, .add-session-form input {
  padding: 8px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: inherit;
  font-size: 0.88rem;
}
.add-session-form input[type="time"] { min-width: 100px; }
.add-session-form input[type="text"] { flex: 1; min-width: 140px; }

/* ============================================
   LESSONS + EARNINGS
   ============================================ */
.earnings-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.earn-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.earn-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--teal);
}
.earn-featured {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-600) 100%);
  color: var(--white);
  border-color: var(--navy);
}
.earn-featured::before { background: var(--coral); }
.earn-featured .earn-label,
.earn-featured .earn-hint { color: rgba(255,255,255,0.7); }
.earn-warn::before { background: var(--coral); }
.earn-warn { border-color: rgba(232,128,75,0.4); background: rgba(232,128,75,0.05); }
.earn-warn .earn-value { color: var(--coral); }

.earn-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.earn-value {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.1;
}
.earn-featured .earn-value { color: var(--coral-soft); font-size: 2.1rem; }
.earn-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

.lessons-section {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.lessons-section h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 4px;
}
.lessons-section h3 .muted { color: var(--muted); font-weight: 400; font-size: 0.9rem; }
.lessons-hint { color: var(--ink-2); font-size: 0.9rem; margin-bottom: 14px; }
.lessons-list { display: grid; gap: 6px; }
.lesson-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  font-family: inherit;
}
.lesson-row:hover { border-color: var(--teal); background: var(--cream); transform: translateY(-1px); }
.lessons-warn .lesson-row { border-color: rgba(232,128,75,0.3); background: rgba(232,128,75,0.03); }
.lessons-warn .lesson-row:hover { border-color: var(--coral); background: rgba(232,128,75,0.06); }
.lesson-when { display: flex; flex-direction: column; gap: 2px; }
.lesson-when strong { color: var(--navy); font-size: 0.92rem; text-transform: capitalize; }
.lesson-when span { color: var(--muted); font-size: 0.82rem; }
.lesson-main { display: flex; flex-direction: column; min-width: 0; }
.lesson-main strong { color: var(--navy); font-size: 0.98rem; }
.lesson-main span { color: var(--muted); font-size: 0.8rem; }
.lesson-badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.lesson-badge-done   { background: rgba(34,197,94,0.15); color: #16a34a; }
.lesson-badge-warn   { background: rgba(232,128,75,0.15); color: var(--coral); }
.lesson-badge-plan   { background: var(--teal-100); color: var(--teal-600); }
.lesson-badge-cancel { background: var(--cream-2); color: var(--muted); }

/* attendance modal — 3 stări */
.attendance-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.attendance-item {
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: grid; gap: 10px;
}
.attendance-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.attendance-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.att-opt {
  display: flex; align-items: center; justify-content: center;
  padding: 8px 10px;
  background: var(--white);
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.att-opt input { display: none; }
.att-opt:hover { border-color: var(--navy); }
.att-prezent.is-active   { background: rgba(34,197,94,0.12); border-color: #22c55e; color: #16a34a; }
.att-motivat.is-active   { background: var(--cream-2); border-color: var(--muted); color: var(--ink-2); }
.att-nemotivat.is-active { background: rgba(232,128,75,0.12); border-color: var(--coral); color: var(--coral); }
.attendance-note {
  padding: 6px 10px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--white);
  font-family: inherit;
  font-size: 0.82rem;
  min-width: 160px;
  max-width: 220px;
  margin-left: auto;
}
.attendance-note:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 2px rgba(20,184,166,0.15); }
.attendance-summary {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--cream-2);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--ink-2);
  text-align: center;
}
.attendance-summary strong { color: var(--navy); }
.notes-field { display: grid; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--navy); margin-top: 16px; }
.notes-field textarea {
  font-family: inherit; font-size: 0.9rem;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--cream);
  resize: vertical;
}
.notes-field textarea:focus { outline: none; border-color: var(--teal); background: var(--white); box-shadow: 0 0 0 3px rgba(20,184,166,0.15); }

/* finance grid (admin) */
.finance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.finance-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.finance-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.finance-head strong { display: block; color: var(--navy); font-size: 1rem; }
.finance-head .muted { font-size: 0.8rem; color: var(--muted); }
.finance-nums {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.finance-nums > div { display: flex; flex-direction: column; text-align: center; gap: 2px; }
.finance-nums .muted { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.finance-nums strong { font-family: var(--font-heading); font-size: 1.05rem; color: var(--navy); }
.finance-nums .finance-total { color: var(--teal-600); font-size: 1.2rem; }

.finance-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.finance-col { display: flex; flex-direction: column; gap: 8px; }
.finance-col-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.finance-col-admin .finance-col-title { color: var(--coral); }
.finance-col .finance-nums { border-top: none; padding-top: 0; }
.finance-col-admin .finance-total { color: var(--coral); }

.summary-row { margin-bottom: 6px; }
.summary-split { display: flex; justify-content: space-between; gap: 10px; font-size: 0.88rem; flex-wrap: wrap; }
.summary-split .muted { color: var(--muted); }
.summary-split strong { color: var(--teal-600); }

/* ============================================
   BALANCES & TRANSACTIONS
   ============================================ */
.balance-cell {
  font-weight: 700;
  color: var(--teal-600);
  font-family: "SF Mono", Menlo, Consolas, monospace;
}
.balance-cell.is-neg { color: var(--coral); }

.elev-balance-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-600) 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.elev-balance-card::before {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20,184,166,0.2), transparent 70%);
}
.balance-inner { position: relative; }
.balance-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.balance-value {
  display: block;
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 600;
  color: var(--teal-100);
  line-height: 1;
  margin-bottom: 12px;
}
.balance-inner.is-negative .balance-value { color: var(--coral-soft); }
.balance-hint { font-size: 0.9rem; color: rgba(255,255,255,0.75); max-width: 520px; display: block; }
.balance-warn { color: var(--coral-soft) !important; }

.elev-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}
.elev-col h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 12px;
}

.tx-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.tx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.tx-main { display: flex; flex-direction: column; min-width: 0; }
.tx-main strong { color: var(--navy); font-size: 0.92rem; }
.tx-main span { color: var(--muted); font-size: 0.8rem; }
.tx-amount { text-align: right; }
.tx-amount strong {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.95rem;
  display: block;
}
.tx-amount .muted { font-size: 0.72rem; color: var(--muted); }
.tx-in .tx-amount strong  { color: #16a34a; }
.tx-out .tx-amount strong { color: var(--coral); }

.elev-group {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 8px;
}
.elev-group strong { display: block; color: var(--navy); margin-bottom: 6px; }
.elev-group ul { list-style: none; padding: 0; margin: 0; }
.elev-group li { padding: 4px 0; font-size: 0.88rem; color: var(--ink-2); }
.elev-group .muted { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 6px; }

/* Parent panel */
.parent-header {
  margin-bottom: 20px;
  padding: 16px 20px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.parent-picker { display: inline-flex; flex-direction: column; gap: 6px; }
.parent-picker span {
  font-size: 0.75rem; font-weight: 700;
  color: var(--navy); text-transform: uppercase; letter-spacing: 0.06em;
}
.parent-picker select {
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: inherit; font-size: 0.95rem;
  min-width: 260px;
}
.parent-picker select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(20,184,166,0.15); }

.parent-nolink {
  text-align: center;
  padding: 60px 32px;
  background: var(--cream);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-lg);
}
.parent-nolink-icon { font-size: 3rem; margin-bottom: 16px; }
.parent-nolink h2 { color: var(--navy); font-family: var(--font-heading); margin-bottom: 10px; }
.parent-nolink p { color: var(--ink-2); max-width: 520px; margin: 0 auto 12px; }
.parent-nolink-hint { color: var(--muted); font-size: 0.9rem; }
.parent-nolink a { color: var(--teal-600); font-weight: 600; }

.parent-history { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.parent-history li {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.att-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}
.att-badge.att-prezent   { background: rgba(34,197,94,0.15); color: #16a34a; }
.att-badge.att-motivat   { background: var(--cream-2); color: var(--ink-2); }
.att-badge.att-nemotivat { background: rgba(232,128,75,0.15); color: var(--coral); }

@media (max-width: 720px) {
  .elev-grid { grid-template-columns: 1fr; }
  .balance-value { font-size: 2.4rem; }
  .attendance-choices { grid-template-columns: 1fr; }
  .attendance-note { margin-left: 0; width: 100%; max-width: none; }
}

@media (max-width: 720px) {
  .finance-split { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .lesson-row { grid-template-columns: 1fr; gap: 6px; padding: 12px 14px; }
  .lesson-status { text-align: left; }
  .attendance-row { flex-wrap: wrap; }
  .attendance-note { width: 100%; max-width: none; }
}

/* ============================================
   CALENDAR
   ============================================ */
.calendar-toolbar {
  display: flex; justify-content: flex-end; margin-bottom: 14px;
}
.calendar-toolbar label {
  display: inline-flex; flex-direction: column; gap: 4px;
  font-size: 0.78rem; font-weight: 600; color: var(--navy);
}
.calendar-toolbar select {
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: inherit; font-size: 0.9rem;
  min-width: 240px;
}

.calendar-wrap {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  overflow-x: auto;
}
.cal-grid {
  display: grid;
  grid-template-columns: 56px repeat(7, minmax(120px, 1fr));
  min-width: 900px;
  gap: 0;
}
.cal-col { border-left: 1px solid var(--line); position: relative; }
.cal-col.cal-hours { border-left: none; }
.cal-col-head {
  padding: 10px 8px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--navy);
  text-align: center;
  border-bottom: 1px solid var(--line);
  background: var(--cream-2);
}
.cal-col-body { position: relative; background: repeating-linear-gradient(to bottom, transparent 0, transparent 47px, var(--line) 47px, var(--line) 48px); }
.cal-col.cal-hours .cal-col-body { background: none; }
.cal-hour {
  position: absolute; left: 0; right: 0; text-align: right;
  padding-right: 8px;
  font-size: 0.72rem; color: var(--muted);
  transform: translateY(-6px);
}
.cal-event {
  position: absolute;
  left: 4px; right: 4px;
  background: var(--teal);
  color: var(--white);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.72rem;
  box-shadow: 0 2px 6px rgba(20,184,166,0.25);
  overflow: hidden;
  border-left: 3px solid var(--navy);
  display: flex; flex-direction: column; gap: 2px;
}
.cal-event-time { font-weight: 700; font-size: 0.68rem; opacity: 0.85; }
.cal-event-name { font-weight: 700; font-size: 0.82rem; line-height: 1.2; }
.cal-event-meta { font-size: 0.68rem; opacity: 0.85; }
.cal-event-loc { font-size: 0.68rem; opacity: 0.85; }

@media (max-width: 720px) {
  .dash-panel { padding: 24px 20px; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-user-name { display: none; }
  .admin-invite-head { flex-direction: column; align-items: stretch; }
  .admin-invite-actions { flex-direction: column; align-items: stretch; }
  .admin-invite-actions input { min-width: 0; }
  .admin-users-table { font-size: 0.82rem; }
  .admin-users-table th, .admin-users-table td { padding: 8px 10px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-header { flex-direction: column; align-items: stretch; }
  .admin-tabs { overflow-x: auto; }
  .user-cell-hint { display: none; }
  .row-actions { flex-direction: column; align-items: flex-end; }
  .row-actions .btn-xs { padding: 4px 8px; font-size: 0.74rem; }
  .user-dl { grid-template-columns: 1fr; gap: 4px 0; }
  .user-dl dt { margin-top: 10px; }
  .groups-grid { grid-template-columns: 1fr; }
  .add-session-form { flex-direction: column; align-items: stretch; }
  .add-session-form input[type="text"] { min-width: 0; }
}

/* ============================================================
   =============== MOBILE POLISH ==============================
   ============================================================
   Aici trăiește tot ce reface UI-ul pentru telefon.
   Prioritate: tabele → carduri, calendar utilizabil,
   modaluri ca bottom sheets, tab-uri scrollable curat.
   ============================================================ */

/* --- Tab bar: scroll orizontal cu efect fade la margini --- */
@media (max-width: 900px) {
  .admin-header { flex-wrap: wrap; align-items: stretch; }
  .admin-header > *:first-child { flex: 1 1 auto; min-width: 0; }
  .admin-tabs, .role-tabs {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    justify-content: flex-start;
    flex-wrap: nowrap;
  }
  .admin-tabs::-webkit-scrollbar,
  .role-tabs::-webkit-scrollbar { display: none; }
  .admin-tab, .role-tab { scroll-snap-align: start; flex-shrink: 0; white-space: nowrap; }
}

/* dash-panel--wide nu poate să-și lase copiii să-l depășească */
.dash-panel--wide { overflow-x: hidden; }

@media (max-width: 720px) {
  .admin-tab, .prof-tab, .role-tab { padding: 8px 14px; font-size: 0.82rem; }
}

/* --- Users table → carduri pe mobil --- */
@media (max-width: 720px) {
  .users-toolbar { flex-direction: column; align-items: stretch; padding: 12px; gap: 10px; }
  .users-search { min-width: 0; width: 100%; }
  .users-filters {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }
  .users-filters::-webkit-scrollbar { display: none; }
  .users-filters .filter-chip { flex-shrink: 0; }
  .users-toggle { align-self: flex-start; }

  .users-table-wrap { border: none; background: transparent; }
  .admin-users-table, .admin-users-table thead { display: none; }
  .admin-users-table, .admin-users-table tbody, .admin-users-table tr, .admin-users-table td {
    display: block;
    width: 100%;
  }
  .admin-users-table { display: grid; gap: 10px; }
  .admin-users-table tr {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 12px;
    align-items: center;
  }
  .admin-users-table tr.is-suspended { border-color: rgba(232,128,75,0.4); }
  .admin-users-table td { padding: 0; border: none; font-size: 0.9rem; }
  .admin-users-table td:nth-child(1) { grid-column: 1 / -1; }
  .admin-users-table td:nth-child(2) { grid-column: 1; }
  .admin-users-table td:nth-child(3) { grid-column: 2; text-align: right; color: var(--muted); font-size: 0.82rem; }
  .admin-users-table td:nth-child(4) { grid-column: 1; }
  .admin-users-table td:nth-child(5) { grid-column: 2; text-align: right; }
  .admin-users-table td:nth-child(6) { display: none; }
  .admin-users-table td:nth-child(7) {
    grid-column: 1 / -1;
    text-align: left;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
  }
  .row-actions {
    display: flex; flex-direction: row; flex-wrap: wrap;
    gap: 6px; justify-content: flex-start;
  }
  .row-actions .btn-xs { padding: 8px 14px; font-size: 0.82rem; }
  .user-cell { gap: 10px; }
  .user-avatar { width: 42px; height: 42px; font-size: 0.95rem; }
  .balance-cell { font-size: 1rem; }
}

/* --- Overview / stats cards mai mari targeturi --- */
@media (max-width: 720px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 16px 18px; }
  .stat-value { font-size: 1.8rem; }
  .stat-label { font-size: 0.78rem; }
  .stat-hint { font-size: 0.7rem; }
}

/* --- Groups grid mai bun --- */
@media (max-width: 720px) {
  .groups-grid { gap: 12px; }
  .group-card { padding: 18px; }
  .group-name { font-size: 1.1rem; }
  .group-actions { flex-direction: row; justify-content: space-between; }
  .group-actions .btn { flex: 1; }
}

/* --- Calendar: pe mobil devine listă verticală pe zile --- */
@media (max-width: 720px) {
  .calendar-toolbar select { min-width: 0; width: 100%; }
  .calendar-toolbar label { width: 100%; }

  .calendar-wrap { padding: 8px; overflow-x: visible; }
  .cal-grid { display: grid; grid-template-columns: 1fr; min-width: 0; gap: 10px; }
  .cal-col { border-left: none; }
  .cal-col.cal-hours { display: none; }
  .cal-col-head {
    background: var(--navy);
    color: var(--white);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    text-align: left;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: none;
    margin-bottom: 8px;
  }
  .cal-col-body {
    position: relative;
    height: auto !important;
    min-height: 0;
    background: transparent;
    display: grid; gap: 6px;
  }
  .cal-col:not(:has(.cal-event)) .cal-col-body::before {
    content: "Fără sesiuni";
    display: block;
    padding: 12px 14px;
    color: var(--muted);
    font-size: 0.82rem;
    background: var(--cream);
    border-radius: var(--radius-sm);
    font-style: italic;
    text-align: center;
  }
  .cal-event {
    position: static;
    left: auto; right: auto; top: auto !important;
    height: auto !important;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    display: grid;
    gap: 4px;
    box-shadow: none;
  }
  .cal-event-time { font-size: 0.82rem; }
  .cal-event-name { font-size: 0.95rem; }
  .cal-event-meta { font-size: 0.78rem; }
}

/* --- Lecții & câștiguri: rând lecție mai mare, mai clar --- */
@media (max-width: 720px) {
  .earnings-strip { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .earn-card { padding: 14px 16px; }
  .earn-value { font-size: 1.5rem; }
  .earn-featured .earn-value { font-size: 1.7rem; }

  .lesson-row {
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding: 14px 16px;
  }
  .lesson-when { grid-column: 1; }
  .lesson-main { grid-column: 1; grid-row: 2; }
  .lesson-status { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}

/* --- Attendance modal: bottom sheet + choices stackate cu icon --- */
@media (max-width: 720px) {
  .attendance-choices { grid-template-columns: 1fr; gap: 6px; }
  .att-opt { padding: 12px 14px; justify-content: flex-start; text-align: left; }
  .att-opt::before {
    content: "○";
    margin-right: 8px;
    font-size: 1.1rem;
    color: var(--muted);
  }
  .att-opt.is-active::before { content: "●"; color: currentColor; }

  .attendance-head { gap: 10px; }
  .attendance-note { width: 100%; max-width: none; margin-left: 0; margin-top: 4px; }
  .attendance-summary { padding: 14px; font-size: 0.88rem; }
  .summary-split { flex-direction: column; gap: 4px; }
}

/* --- Modale ca "bottom sheets" pe mobil mic --- */
@media (max-width: 560px) {
  .mx-modal:not([hidden]) { padding: 0; align-items: flex-end; }
  .mx-modal-panel, .mx-modal-panel--lg {
    max-width: 100%;
    max-height: 92vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 22px 20px 28px;
    animation: sheetUp 0.24s ease-out;
  }
  @keyframes sheetUp {
    from { transform: translateY(20px); opacity: 0.7; }
    to   { transform: translateY(0);    opacity: 1; }
  }
  .mx-modal-panel::before {
    content: "";
    position: absolute;
    top: 8px; left: 50%;
    transform: translateX(-50%);
    width: 40px; height: 4px;
    background: var(--line-2);
    border-radius: 4px;
  }
  .mx-modal-close { top: 10px; right: 14px; }
  .modal-actions {
    position: sticky;
    bottom: -28px;
    background: linear-gradient(to bottom, transparent, var(--white) 20%);
    padding-top: 20px;
    padding-bottom: 8px;
    margin-bottom: -20px;
  }
}

/* --- Finance cards single column --- */
@media (max-width: 720px) {
  .finance-grid { grid-template-columns: 1fr; }
  .finance-split { grid-template-columns: 1fr; gap: 12px; }
  .finance-nums { grid-template-columns: repeat(3, 1fr); }
  .finance-nums strong { font-size: 0.9rem; }
}

/* --- Balance card mai zvelt pe mobil --- */
@media (max-width: 720px) {
  .elev-balance-card { padding: 22px 24px; margin-bottom: 18px; }
  .balance-value { font-size: 2.4rem; }
  .balance-label { font-size: 0.75rem; }
}

/* --- Elev / parinte grid → single column --- */
@media (max-width: 900px) {
  .elev-grid { grid-template-columns: 1fr; gap: 20px; }
  .parent-picker { width: 100%; }
  .parent-picker select { min-width: 0; width: 100%; }
}

/* --- Dashboard header mai bun pe telefon --- */
@media (max-width: 560px) {
  .dash-header { padding: 14px 0; }
  .dash-header .brand-logo { height: 54px; }
  .dash-user { gap: 8px; }
  .dash-user-name { display: none; }
  .dash-role-pill { padding: 4px 10px; font-size: 0.66rem; }
  .btn-sm { padding: 8px 12px; font-size: 0.82rem; }
  .dash-hero h1 { font-size: 1.6rem; }
  .dash-hero { margin-bottom: 26px; }
  .dash-panel--wide { padding: 20px 14px; }
  .dash-main { padding: 20px 0 60px; }
}
@media (max-width: 400px) {
  .dash-header .brand-logo { height: 46px; }
}

/* --- Butoane min touch target --- */
@media (max-width: 720px) {
  .btn { min-height: 40px; }
  .btn-xs { min-height: 32px; }
  .filter-chip { min-height: 34px; }
}

/* --- Home page hero: pe mobil ascundem cardurile decorative
   care nu se așează bine cu position:absolute la lățime mică --- */
@media (max-width: 780px) {
  .hero-visual { min-height: 0; display: flex; flex-direction: column; gap: 12px; margin: 0 auto; max-width: 100%; }
  .hero-card { position: static; transform: none !important; max-width: 100%; padding: 16px 20px; }
  .hero-formula { display: none; }
  .hero-card.card-1, .hero-card.card-2, .hero-card.card-3 {
    position: static; transform: none; left: auto; right: auto; top: auto; bottom: auto;
  }
}
@media (max-width: 560px) {
  .hero { padding: 40px 0 48px; }
  .hero-copy h1 { font-size: 2rem; line-height: 1.15; }
  .hero-copy .lead { font-size: 1rem; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .hero-visual { display: none; }
}

/* --- Home page: pricing cards mai vizibile --- */
@media (max-width: 560px) {
  .price-card { padding: 22px 20px; }
  .price-amount .num { font-size: 2.4rem; }
  .price-card--featured { padding: 26px 20px; }
  .price-card--featured .price-amount .num { font-size: 3rem; }
}

/* --- Recenzii single column mobile --- */
@media (max-width: 560px) {
  .reviews-grid { columns: 1; column-gap: 0; }
  .reviews-filters { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; }
  .reviews-filters::-webkit-scrollbar { display: none; }
  .filter-chip { flex-shrink: 0; }
}

/* --- Auth pages pe mobil --- */
@media (max-width: 560px) {
  .auth-panel-inner { padding: 24px 18px; }
  .auth-title { font-size: 1.5rem; }
  .auth-form .form-row { grid-template-columns: 1fr; }
}

/* --- Recent list mai lizibil mobil --- */
@media (max-width: 560px) {
  .recent-list li {
    grid-template-columns: auto 1fr;
    padding: 12px;
    gap: 10px;
  }
  .recent-list li .dash-role-pill { grid-column: 2; grid-row: 2; justify-self: start; }
  .recent-when { display: none; }
}

/* --- Session list mobil --- */
@media (max-width: 560px) {
  .session-list li { flex-wrap: wrap; padding: 12px; }
  .session-list li button { margin-left: 0; margin-top: 4px; }
}

/* --- Manage group modal mobil --- */
@media (max-width: 560px) {
  .manage-section { margin-top: 16px; padding-top: 16px; }
  .add-member-row input { padding: 12px 14px; font-size: 1rem; }
  .student-hit { padding: 12px; }
  .student-hit strong { font-size: 0.95rem; }
}

/* --- Body scroll lock cand modalul e deschis pe mobil --- */
@media (max-width: 560px) {
  body:has(.mx-modal:not([hidden])) { overflow: hidden; }
}

/* ============================================
   MX CONFIRM MODAL + TOAST
   ============================================ */
.mx-confirm {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.mx-confirm.is-open { opacity: 1; }
.mx-confirm-backdrop {
  position: absolute; inset: 0;
  background: rgba(15,41,66,0.55);
  backdrop-filter: blur(3px);
}
.mx-confirm-panel {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px 30px 24px;
  width: 100%;
  max-width: 420px;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.2s ease;
}
.mx-confirm.is-open .mx-confirm-panel { transform: translateY(0) scale(1); }
.mx-confirm-panel h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--navy);
  margin: 0 0 10px;
  font-weight: 600;
}
.mx-confirm-panel p {
  color: var(--ink-2);
  font-size: 0.98rem;
  line-height: 1.5;
  margin: 0 0 22px;
  white-space: pre-line;
}
.mx-confirm-actions {
  display: flex; justify-content: flex-end; gap: 10px;
}
.btn-danger-solid {
  background: var(--coral);
  color: var(--white);
  border: 1.5px solid var(--coral);
}
.btn-danger-solid:hover { background: #d16a3a; border-color: #d16a3a; box-shadow: var(--shadow-md); }

/* toast */
.mx-toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: var(--white);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: calc(100% - 40px);
  text-align: center;
}
.mx-toast.is-open { opacity: 1; transform: translateX(-50%) translateY(0); }
.mx-toast-success { background: #16a34a; }
.mx-toast-error   { background: var(--coral); }

@media (max-width: 560px) {
  .mx-confirm-panel { padding: 22px 22px 18px; max-width: 100%; }
  .mx-confirm-panel h3 { font-size: 1.2rem; }
  .mx-confirm-actions { flex-direction: column-reverse; }
  .mx-confirm-actions .btn { width: 100%; }
}

/* ====================================================================
   =========== FINAL MOBILE POLISH (overrides all above) ==============
   Rulează ULTIMA, deci are prioritate. Fix pentru interfața pe telefon
   la viewport între 320px și 720px.
   ==================================================================== */

@media (max-width: 720px) {

  /* --- container padding mai aerat --- */
  .wrap { padding: 0 18px; }

  /* --- secțiuni cu padding redus (home) --- */
  .section { padding: 48px 0; }
  .section-head { margin-bottom: 32px; }
  .section-head h2 { font-size: 1.8rem; line-height: 1.2; }
  .section-sub { font-size: 0.95rem; }
  .eyebrow { font-size: 0.72rem; margin-bottom: 10px; }

  /* --- HERO curat --- */
  .hero { padding: 32px 0 48px; }
  .hero-inner--editorial .hero-copy { padding: 8px 0 24px; max-width: 100%; }
  .hero-copy h1 {
    font-size: 1.9rem;
    line-height: 1.18;
    letter-spacing: -0.01em;
    margin-bottom: 14px;
  }
  .hero-copy .lead {
    font-size: 1rem;
    line-height: 1.55;
    margin: 14px 0 24px;
  }
  .hero-cta { gap: 10px; flex-direction: column; width: 100%; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .hero-stats {
    padding-top: 24px;
    gap: 20px;
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-stat-num { font-size: 1.7rem; }
  .hero-stat-num small { font-size: 0.65rem; }
  .hero-stat-lbl { font-size: 0.76rem; line-height: 1.4; }
  .hero-stat-lbl br { display: none; }

  /* --- WHY (de ce noi) --- */
  .why-grid { grid-template-columns: 1fr; gap: 14px; }
  .why-card { padding: 22px 20px; }
  .why-card h3 { font-size: 1.1rem; }
  .why-card p { font-size: 0.92rem; }
  .why-icon { width: 40px; height: 40px; margin-bottom: 14px; }

  /* --- PRICING --- */
  .pricing-grid { grid-template-columns: 1fr; gap: 12px; }
  .price-card { padding: 22px 20px; }
  .price-amount .num { font-size: 2.4rem; }
  .price-card h3 { font-size: 1.15rem; }
  .price-card--featured {
    grid-column: 1;
    padding: 28px 20px;
    display: block;
  }
  .price-card--featured .price-amount { margin-bottom: 20px; padding-bottom: 20px; }
  .price-card--featured .price-amount .num { font-size: 2.8rem; }
  .price-card--featured h3 { font-size: 1.4rem; }
  .price-card--featured .price-features { margin-bottom: 20px; }
  .price-badge { left: 20px; top: -12px; font-size: 0.66rem; padding: 5px 11px; }

  /* --- TEACHERS --- */
  .teachers-grid { grid-template-columns: 1fr; max-width: 100%; gap: 14px; }
  .teacher-card { padding: 26px 22px; }
  .teacher-portrait { width: 80px; height: 80px; font-size: 2rem; margin-bottom: 16px; }
  .teacher-card h3 { font-size: 1.3rem; }

  /* --- RESOURCES --- */
  .resources-inner { grid-template-columns: 1fr; gap: 28px; }
  .resources-copy h2 { margin-bottom: 12px; }
  .resources-list { gap: 16px; }
  .resources-list strong { font-size: 1.05rem; }
  .resources-list span { font-size: 0.9rem; }
  .resources-quote { padding: 32px 24px; border-radius: var(--radius); }
  .resources-quote::before { font-size: 5rem; top: -18px; left: 14px; }
  .resources-quote blockquote { font-size: 1.15rem; }

  /* --- MATHONWHEELS --- */
  .mow-inner { grid-template-columns: 1fr; gap: 24px; }
  .mow h2 { font-size: 1.8rem; }

  /* --- REVIEWS --- */
  .reviews-grid { columns: 1; column-gap: 0; }
  .review-card { padding: 20px; margin-bottom: 12px; }
  .reviews-filters {
    overflow-x: auto;
    scrollbar-width: none;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    padding-bottom: 4px;
    margin: 0 -18px 28px;
    padding-left: 18px;
    padding-right: 18px;
  }
  .reviews-filters::-webkit-scrollbar { display: none; }
  .filter-chip { flex-shrink: 0; padding: 8px 14px; font-size: 0.84rem; }

  /* --- FAQ --- */
  .faq-item { padding: 4px 20px; }
  .faq-item summary { font-size: 1rem; padding: 16px 0; }
  .faq-item summary::after { font-size: 1.3rem; }
  .faq-item p { font-size: 0.92rem; padding-bottom: 16px; }

  /* --- CONTACT --- */
  .contact-inner { grid-template-columns: 1fr; gap: 28px; }
  .contact-copy h2 { font-size: 1.75rem; }
  .contact-form { padding: 24px 22px; border-radius: var(--radius); }
  .contact-form .form-row { grid-template-columns: 1fr; gap: 12px; }
  .contact-form input, .contact-form select, .contact-form textarea {
    font-size: 16px;  /* 16px previne zoom-ul auto pe iOS */
    padding: 13px 14px;
  }
  .contact-quick { margin-top: 18px; }
  .contact-quick .btn { width: 100%; justify-content: center; }

  /* --- FOOTER --- */
  .site-footer { padding: 44px 0 20px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; padding-bottom: 32px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col h4 { font-size: 0.88rem; margin-bottom: 12px; }
  .footer-col a { font-size: 0.84rem; }
  .footer-logo { height: 36px; margin-bottom: 10px; }
  .footer-brand p { font-size: 0.85rem; }
  .footer-bottom { padding-top: 20px; gap: 4px; font-size: 0.76rem; }

  /* --- HEADER / NAV --- */
  .site-header { padding-top: 2px; padding-bottom: 2px; }
  .header-inner { padding-top: 8px; padding-bottom: 8px; gap: 12px; }
  .nav-toggle { width: 44px; height: 44px; }

  /* --- Butoane generale --- */
  .btn { min-height: 44px; padding: 11px 20px; font-size: 0.95rem; }
  .btn-lg { min-height: 48px; padding: 13px 24px; font-size: 1rem; }
  .btn-sm { min-height: 36px; padding: 7px 14px; }

  /* --- Form inputs peste tot: 16px minim ca iOS să nu zoomeze --- */
  input[type="text"], input[type="email"], input[type="tel"],
  input[type="password"], input[type="number"], input[type="search"],
  input[type="date"], input[type="time"], select, textarea {
    font-size: 16px;
  }

  /* --- AUTH pages (login/signup) --- */
  .auth-shell { grid-template-columns: 1fr; gap: 20px; padding: 0 16px; }
  .auth-main { padding: 12px 0 32px; }
  .auth-panel { border-radius: var(--radius); }
  .auth-panel-inner { padding: 28px 22px; }
  .auth-title { font-size: 1.6rem; }
  .auth-sub { font-size: 0.95rem; }
  .auth-aside { display: none; }
  .auth-header { padding: 16px 0; }
  .auth-header .brand-logo { height: 48px; }
  .auth-back { font-size: 0.82rem; padding: 6px 10px; }
  .auth-form { gap: 12px; }
  .auth-form .form-row { grid-template-columns: 1fr; gap: 12px; }
  .role-tabs { grid-template-columns: 1fr 1fr 1fr; padding: 3px; }
  .role-tab { padding: 9px 8px; font-size: 0.85rem; }

  /* --- DASHBOARD general --- */
  .dash-header { padding: 10px 0; }
  .dash-header-inner { padding: 0 16px; gap: 10px; }
  .dash-user { gap: 8px; }
  .dash-main { padding: 18px 0 40px; }
  .dash-main .wrap { padding: 0 14px; }
  .dash-hero { margin-bottom: 20px; }
  .dash-hero h1 { font-size: 1.5rem; margin-bottom: 6px; }
  .dash-sub { font-size: 0.9rem; }
  .dash-panel { padding: 22px 18px; border-radius: var(--radius); }
  .dash-panel--wide { padding: 22px 16px; }
  .dash-panel h2 { font-size: 1.3rem; margin-bottom: 6px; }
  .dash-panel > p { font-size: 0.9rem; margin-bottom: 20px; }

  .admin-header { padding-bottom: 16px; margin-bottom: 16px; gap: 14px; }
  .admin-header h2 { font-size: 1.3rem; }
  .admin-header p { font-size: 0.88rem; }
  .admin-tabs {
    margin: 0 -16px;
    padding: 4px 16px;
    border-radius: 0;
    background: transparent;
    border: none;
    gap: 6px;
  }
  .admin-tab, .prof-tab {
    border: 1px solid var(--line);
    background: var(--white);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.82rem;
  }
  .admin-tab.is-active, .prof-tab.is-active {
    background: var(--navy); color: var(--white); border-color: var(--navy);
    box-shadow: none;
  }

  /* --- Stats grid --- */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
  .stat-card { padding: 14px 16px; }
  .stat-value { font-size: 1.7rem; }
  .stat-label { font-size: 0.76rem; }
  .stat-hint { font-size: 0.68rem; }

  /* --- Admin invite head --- */
  .admin-invite-head { flex-direction: column; align-items: stretch; gap: 14px; }
  .admin-invite-actions { flex-direction: column; align-items: stretch; }
  .admin-invite-actions input { width: 100%; min-width: 0; }

  /* --- Groups cards --- */
  .groups-grid { grid-template-columns: 1fr; gap: 12px; }
  .group-card { padding: 18px 18px 16px; }
  .group-name { font-size: 1.1rem; }
  .group-stats strong { font-size: 1.1rem; }
  .group-actions { flex-direction: column; gap: 8px; align-items: stretch; }
  .group-actions .btn { width: 100%; }

  /* --- Earnings strip --- */
  .earnings-strip { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .earn-card { padding: 14px 16px; }
  .earn-value { font-size: 1.4rem; }
  .earn-featured .earn-value { font-size: 1.6rem; }
  .earn-label { font-size: 0.68rem; }
  .earn-hint { font-size: 0.68rem; }

  /* --- Lessons list --- */
  .lesson-row { padding: 14px 14px; }
  .lesson-when strong { font-size: 0.9rem; }
  .lesson-main strong { font-size: 0.96rem; }
  .lesson-badge { font-size: 0.72rem; }

  /* --- Finance --- */
  .finance-grid { grid-template-columns: 1fr; }
  .finance-split { grid-template-columns: 1fr; gap: 10px; }

  /* --- Elev / Parinte --- */
  .elev-grid { grid-template-columns: 1fr; gap: 18px; }
  .elev-balance-card { padding: 24px 22px; margin-bottom: 18px; }
  .balance-value { font-size: 2.2rem; }
  .balance-label { font-size: 0.72rem; }
  .balance-hint { font-size: 0.82rem; }
  .parent-header { padding: 14px 16px; margin-bottom: 16px; }
  .parent-nolink { padding: 40px 24px; }
  .parent-nolink h2 { font-size: 1.3rem; }

  /* --- Modal (lesson/group) full-screen pe telefon --- */
  .mx-modal:not([hidden]) { padding: 0; align-items: flex-end; }
  .mx-modal-panel, .mx-modal-panel--lg {
    max-width: 100%;
    width: 100%;
    max-height: 94vh;
    border-radius: 18px 18px 0 0;
    padding: 24px 20px 24px;
  }
  .modal-title { font-size: 1.2rem; }
  .modal-sub { gap: 6px; margin-bottom: 16px; }
  .modal-actions {
    position: sticky;
    bottom: -24px;
    background: linear-gradient(to top, var(--white) 70%, rgba(255,255,255,0.9));
    padding: 14px 0 8px;
    margin: 16px -4px -24px;
    padding-left: 4px;
    padding-right: 4px;
    flex-direction: column-reverse;
    gap: 8px;
    border-top: 1px solid var(--line);
  }
  .modal-actions .btn { width: 100%; justify-content: center; }

  /* --- Users toolbar / filters --- */
  .users-toolbar { padding: 12px; gap: 10px; }
  .users-filters {
    overflow-x: auto; scrollbar-width: none;
    flex-wrap: nowrap; gap: 6px;
  }
  .users-filters::-webkit-scrollbar { display: none; }

  /* --- Table → cards --- */
  .admin-users-table tr { padding: 14px; gap: 8px 10px; }
  .row-actions { gap: 5px; }
  .row-actions .btn-xs { padding: 6px 10px; font-size: 0.76rem; min-height: 32px; }

  /* --- Calendar vertical --- */
  .calendar-wrap { padding: 8px; }
  .calendar-toolbar { margin-bottom: 10px; }

  /* --- Attendance 3-state --- */
  .attendance-item { padding: 12px; }
  .attendance-choices { grid-template-columns: 1fr; gap: 6px; }
  .att-opt { padding: 11px 14px; font-size: 0.88rem; justify-content: flex-start; text-align: left; }
  .att-opt::before { content: "○"; margin-right: 10px; font-size: 1.1rem; }
  .att-opt.is-active::before { content: "●"; color: currentColor; }
  .attendance-note { width: 100%; max-width: none; margin-left: 0; margin-top: 6px; }
}

/* --- Breakpoint minim (iPhone SE 320px, iPhone standard 375px) --- */
@media (max-width: 400px) {
  .wrap { padding: 0 14px; }
  .hero-copy h1 { font-size: 1.65rem; }
  .section-head h2 { font-size: 1.55rem; }
  .hero-stat-num { font-size: 1.5rem; }
  .brand-logo { height: 38px; }
  .dash-header .brand-logo { height: 38px; }
  .dash-hero h1 { font-size: 1.3rem; }
  .stats-grid { gap: 8px; }
  .stat-value { font-size: 1.5rem; }
  .earnings-strip { grid-template-columns: 1fr; }
  .admin-tab, .prof-tab { padding: 7px 11px; font-size: 0.78rem; }
}

/* iOS Safari fix: 16px fonts previn zoom-ul auto la focus */
@supports (-webkit-touch-callout: none) {
  input, select, textarea { font-size: 16px !important; }
}
