/* =========================================================
   Quran Platform — Full responsive website
   Pages: Home + Schedule
========================================================= */

:root {
  --bg: #F2EBE0;
  --bg-alt: #EDE5D6;
  --bg-deep: #E8DFCB;
  --card: #FFFFFF;
  --card-soft: #FBF7EE;
  --primary: #2D5F3F;
  --primary-dark: #1F4A30;
  --primary-light: #3E7553;
  --gold: #C49A4F;
  --gold-light: #D4A85F;
  --gold-soft: #E8C079;
  --text: #1F2E25;
  --text-muted: #6B7568;
  --text-soft: #8A8E84;
  --rose: #D67A8E;
  --rose-light: #F2D6DD;
  --border: rgba(45, 95, 63, 0.1);
  --border-strong: rgba(45, 95, 63, 0.18);

  --shadow-sm: 0 2px 8px rgba(31, 46, 37, 0.06);
  --shadow-md: 0 8px 24px rgba(31, 46, 37, 0.08);
  --shadow-lg: 0 18px 48px rgba(31, 46, 37, 0.12);
  --shadow-xl: 0 30px 80px rgba(31, 46, 37, 0.18);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --container: 1240px;
  --header-h: 92px;
  --tabs-h: 76px;
}

/* =========================================================
   RESET
========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; background: transparent; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
img, svg { display: block; max-width: 100%; }
svg { width: 100%; height: 100%; }

/* =========================================================
   LAYOUT
========================================================= */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 28px; }
@media (max-width: 640px) { .container { padding: 0 18px; } }

/* =========================================================
   BUTTONS
========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(45,95,63,0.28); }
.btn--primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn--gold {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #fff;
  box-shadow: 0 6px 18px rgba(196, 154, 79, 0.32);
}
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(196,154,79,0.4); }

.icon-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  display: grid; place-items: center;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, background 0.2s ease;
}
.icon-btn:hover { background: #fff; transform: translateY(-2px); }
.icon-btn svg { width: 20px; height: 20px; }

/* =========================================================
   HEADER (desktop)
========================================================= */
.site-header {
  position: sticky;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(242, 235, 224, 0.0);
  backdrop-filter: blur(0px);
  transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(242, 235, 224, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom-color: var(--border);
  box-shadow: 0 2px 18px rgba(31,46,37,0.05);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 14px; font-family: 'Lora', serif; font-weight: 700; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 78px;
  height: 78px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: transparent;
}
.brand-mark img,
.brand-mark svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.brand-name { font-size: 24px; color: var(--primary); letter-spacing: 0.5px; }

/* Mobile keeps things tighter so the bigger logo doesn't push the
   nav off the header. */
@media (max-width: 720px) {
  .brand { gap: 10px; }
  .brand-mark { width: 56px; height: 56px; }
  .brand-name { font-size: 20px; }
}

.main-nav {
  display: flex; gap: 4px;
  flex: 1; justify-content: center;
}
.nav-link {
  padding: 8px 18px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-link:hover { color: var(--primary); background: rgba(45,95,63,0.06); }
.nav-link.active { color: var(--primary); background: rgba(45,95,63,0.1); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 10px; }

/* =========================================================
   HERO (Home — full-width mosque)
========================================================= */
.hero-full {
  position: relative;
  min-height: 620px;
  margin-top: calc(var(--header-h) * -1);
  padding-top: var(--header-h);
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

.hero-full__bg {
  position: absolute;
  inset: 0;
  background-image: url('assets/images/hero-main.png');
  background-size: cover;
  background-position: center right;
  z-index: 0;
}
.hero-full__fade {
  position: absolute; inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, transparent 0%, transparent 60%, var(--bg) 100%),
    linear-gradient(90deg, rgba(242,235,224,0.92) 0%, rgba(242,235,224,0.55) 35%, rgba(242,235,224,0.05) 65%, rgba(242,235,224,0) 100%);
}

.hero-full__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 60px;
  padding-bottom: 100px;
  gap: 36px;
}

.greeting {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0;
}
.heart { width: clamp(22px, 2.4vw, 30px); height: clamp(22px, 2.4vw, 30px); flex-shrink: 0; }

.reflection-card {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 22px;
  padding: 16px 18px 16px 16px;
  box-shadow: var(--shadow-md);
  max-width: 460px;
  width: fit-content;
}
.reflection-icon { flex: 0 0 auto; width: 50px; height: 50px; }
.reflection-icon svg { width: 100%; height: 100%; }
.reflection-body { flex: 1; min-width: 0; }
.reflection-body h3 { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.reflection-body p { font-size: 13.5px; color: var(--text-muted); }

.play-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg-alt);
  display: grid; place-items: center;
  flex: 0 0 auto;
  color: var(--primary);
  transition: transform 0.2s ease, background 0.2s ease;
}
.play-btn:hover { background: var(--bg-deep); transform: scale(1.06); }
.play-btn svg { width: 18px; height: 18px; margin-left: 2px; }

/* =========================================================
   SCHEDULE HERO
========================================================= */
.schedule-hero {
  position: relative;
  min-height: 320px;
  margin-top: calc(var(--header-h) * -1);
  padding-top: var(--header-h);
  overflow: hidden;
}
.schedule-hero__bg {
  position: absolute; inset: 0;
  background-image: url('assets/images/schedule-bg.png');
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.schedule-hero__fade {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(242,235,224,0.4) 0%, rgba(242,235,224,0.1) 50%, var(--bg) 100%);
}
.schedule-hero__inner {
  position: relative; z-index: 2;
  padding-top: 50px;
  padding-bottom: 60px;
}
.schedule-hero__title {
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  color: var(--primary-dark);
  letter-spacing: 0;
  margin-bottom: 8px;
}
.schedule-hero__subtitle {
  font-size: 16px;
  color: var(--text-muted);
}

/* =========================================================
   SECTIONS
========================================================= */
.section { padding: 70px 0; position: relative; }
.section--tight { padding: 30px 0; }
.section--quote { padding-bottom: 90px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.section-title {
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  color: var(--text);
  letter-spacing: 0;
}

/* =========================================================
   PATH CARD
========================================================= */
.path-card {
  position: relative;
  background: linear-gradient(135deg, #2C5E3D 0%, #1F4A30 60%, #143820 100%);
  border-radius: var(--radius-xl);
  padding: 50px 60px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: center;
  overflow: hidden;
  color: #F4ECE0;
  box-shadow: var(--shadow-lg);
  min-height: 280px;
}
.path-card-bg {
  position: absolute; inset: 0;
  background-image: url('assets/images/arch-window.png');
  background-size: cover;
  background-position: right center;
  opacity: 0.35;
  pointer-events: none;
}
.path-card-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(20,56,32,0.92) 0%, rgba(20,56,32,0.4) 60%, rgba(20,56,32,0.1) 100%);
}
.path-card-content { position: relative; z-index: 1; max-width: 560px; }
.path-tag {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(196,154,79,0.2);
  border: 1px solid rgba(196,154,79,0.4);
  color: var(--gold-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.path-title {
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.15;
  margin-bottom: 22px;
  color: #F4ECE0;
}
.progress-bar {
  width: 100%; max-width: 360px;
  height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}
.progress-fill {
  width: var(--progress, 0%);
  height: 100%;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
  border-radius: 999px;
  transition: width 0.8s ease;
}
.path-foot { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.path-meta { font-size: 13.5px; color: rgba(244,236,224,0.72); }

.progress-circle {
  position: relative; z-index: 1;
  width: 160px; height: 160px;
  display: grid; place-items: center;
}
.progress-circle svg { position: absolute; inset: 0; }
.progress-percent {
  position: relative;
  font-family: 'Lora', serif;
  font-size: 38px;
  font-weight: 700;
  color: var(--gold-soft);
  line-height: 1;
}
.progress-percent small { font-size: 16px; margin-left: 2px; opacity: 0.7; }

/* =========================================================
   CARDS GRID (Age, Levels)
========================================================= */
.cards-grid { display: grid; gap: 24px; }
.cards-grid--5 { grid-template-columns: repeat(5, 1fr); }
.cards-grid--3 { grid-template-columns: repeat(3, 1fr); gap: 28px; }

.age-card, .level-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 22px 18px 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}
/* Bigger padding + typography for the 3-column home grids. */
.cards-grid--3 .age-card,
.cards-grid--3 .level-card {
  padding: 28px 24px 26px;
}
.cards-grid--3 .age-card-title,
.cards-grid--3 .level-card-title {
  font-size: 24px;
  margin-top: 4px;
}
.age-card:hover, .level-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.age-card-image, .level-card-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  background: #E8E8E8;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-bottom: 16px;
}
.cards-grid--3 .age-card-image,
.cards-grid--3 .level-card-image {
  margin-bottom: 20px;
}
.age-card-title, .level-card-title {
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: 19px;
  color: var(--text);
}

/* image bindings */
.age-card-image[data-img="boy-4-6"]    { background-image: url('assets/images/boy-4-6.png'); }
.age-card-image[data-img="boy-7-10"]   { background-image: url('assets/images/boy-7-10.png'); }
.age-card-image[data-img="boy-11-14"]  { background-image: url('assets/images/boy-11-14.png'); }
.age-card-image[data-img="boy-15-17"]  { background-image: url('assets/images/boy-15-17.png'); }
.age-card-image[data-img="boy-18plus"] { background-image: url('assets/images/boy-18plus.png'); }

.level-card-image[data-img="level-beginner"] { background-image: url("assets/images/level-beginner.png"); }
.level-card-image[data-img="level-basic"]    { background-image: url("assets/images/level-basic.png"); }
.level-card-image[data-img="level-medium"]   { background-image: url("assets/images/level-medium.png"); }
.level-card-image[data-img="level-advanced"] { background-image: url("assets/images/level-advanced.png"); }
.level-card-image[data-img="level-hifz"] {
  background: linear-gradient(135deg, #E8DFCB 0%, #D4B98C 100%);
  position: relative;
}
.level-card-image[data-img="level-hifz"]::after {
  content: '📖';
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 56px;
  filter: grayscale(0.2);
}

/* =========================================================
   QUOTE CARD
========================================================= */
.section--quote { background: linear-gradient(180deg, transparent 0%, var(--bg-alt) 100%); }

.quote-card {
  position: relative;
  background: var(--card-soft);
  border-radius: var(--radius-xl);
  padding: 56px 64px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  min-height: 280px;
  max-width: 1000px;
  margin: 0 auto;
}
.quote-card-bg {
  position: absolute;
  right: -40px; bottom: -40px;
  width: 460px; height: 460px;
  background-image: url('assets/images/inspiration-dome.png');
  background-size: contain;
  background-position: right bottom;
  background-repeat: no-repeat;
  opacity: 0.95;
  pointer-events: none;
}
.quote-card-content { position: relative; z-index: 1; max-width: 520px; }
.quote-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.quote-source {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  transition: opacity 0.25s ease;
}
.quote-source svg { width: 18px; height: 18px; flex-shrink: 0; }
.share-btn {
  width: 42px; height: 42px;
  border-radius: 14px;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--border);
  color: var(--text);
  display: grid; place-items: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.share-btn:hover { background: #fff; transform: translateY(-2px); }
.share-btn svg { width: 18px; height: 18px; }
.quote-text {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 32px;
  font-weight: 500;
  transition: opacity 0.25s ease;
}
.dots { display: flex; gap: 8px; }
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(45,95,63,0.25);
  transition: all 0.25s ease;
  cursor: pointer;
  padding: 0; border: 0;
}
.dot.active { width: 28px; border-radius: 999px; background: var(--primary); }

/* =========================================================
   CALENDAR (Schedule page)
========================================================= */
.calendar-card {
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 18px;
}
.calendar-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.calendar-month {
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
}
.cal-nav {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-muted);
  transition: background 0.2s ease, color 0.2s ease;
}
.cal-nav:hover { background: var(--bg-alt); color: var(--primary); }
.cal-nav svg { width: 18px; height: 18px; }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 2px 12px;
  border-radius: 18px;
  transition: background 0.2s ease;
  cursor: pointer;
  position: relative;
}
.cal-day:hover { background: var(--bg-alt); }
.cal-day.is-active {
  background: var(--primary);
  color: #fff;
}
.cal-day.is-active .cal-weekday,
.cal-day.is-active .cal-month { color: rgba(244,236,224,0.78); }
.cal-day.is-active .cal-dot { background: var(--gold-soft); }

.cal-weekday {
  font-size: 12px; font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.cal-weekday.is-sunday { color: var(--gold); }
.cal-day.is-active .cal-weekday.is-sunday { color: rgba(244,236,224,0.85); }

.cal-date {
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: 22px;
  line-height: 1;
}
.cal-month {
  font-size: 11px;
  color: var(--text-soft);
  margin-top: 4px;
}
.cal-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: transparent;
  margin-top: 8px;
}
.cal-dot.is-on { background: var(--text-muted); }
.cal-dot.is-gold { background: var(--gold); }

/* Today card */
.today-card {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 18px;
  align-items: center;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}
.today-icon { width: 50px; height: 50px; }
.today-body { display: flex; flex-direction: column; }
.today-title {
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
  line-height: 1.1;
}
.today-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.today-quote {
  text-align: right;
  font-family: 'Lora', serif;
  font-style: italic;
  color: var(--text);
}
.today-quote p { font-size: 14px; line-height: 1.45; }
.today-quote-source {
  display: inline-block;
  margin-top: 4px;
  font-style: normal;
  font-size: 12px;
  color: var(--text-soft);
}

/* =========================================================
   LESSONS
========================================================= */
.lessons-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}
/* Cards stay in a single horizontal row, no wrapping to next line. */
.lessons-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.future-list  { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

.schedule-empty-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 118px;
  padding: 18px 20px;
  border: 1px solid rgba(212, 168, 95, 0.32);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 0 0, rgba(212, 168, 95, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(255, 251, 244, 0.96), rgba(255, 255, 255, 0.86));
  box-shadow: var(--shadow-sm);
}
.schedule-empty-card__icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: linear-gradient(135deg, #E8EFE9, #F8EED9);
  box-shadow: inset 0 0 0 1px rgba(45, 95, 63, 0.08);
}
.schedule-empty-card__icon svg {
  width: 26px;
  height: 26px;
}
.schedule-empty-card__body h3 {
  font-family: 'Lora', serif;
  font-size: 21px;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 6px;
}
.schedule-empty-card__body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}
.schedule-empty-card__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 10px 22px rgba(45, 95, 63, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.schedule-empty-card__action:hover {
  transform: translateY(-1px);
  background: var(--primary-dark);
  box-shadow: 0 14px 28px rgba(45, 95, 63, 0.24);
}

.lesson-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 18px 18px 18px 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.lesson-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.lesson-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  min-width: 110px;
  position: relative;
}
.lesson-time--green { background: #E8EFE9; }
.lesson-time--gold { background: #FBF1DC; }
.lesson-time-icon {
  width: 22px; height: 22px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.lesson-time-icon svg { width: 100%; height: 100%; }
.lesson-time-value {
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--text);
  line-height: 1;
}
.lesson-time-divider {
  width: 32px; height: 2px;
  background: rgba(45,95,63,0.2);
  border-radius: 2px;
  margin: 10px 0;
}
.lesson-time--gold .lesson-time-divider { background: rgba(196,154,79,0.4); }
.lesson-time-badge {
  font-size: 11px;
  font-weight: 600;
  background: rgba(45,95,63,0.1);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.2px;
}

.lesson-body { min-width: 0; }
.lesson-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.lesson-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.lesson-category svg { width: 16px; height: 16px; color: var(--primary); flex-shrink: 0; }

.lesson-status {
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.status--confirmed { background: #E5EFE6; color: var(--primary); }

.lesson-title {
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.2;
}

.lesson-teacher {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: 15px;
  flex-shrink: 0;
}
.avatar.is-male {
  background: linear-gradient(135deg, #E5EFE6, #C8DBCC);
  color: var(--primary-dark);
}
.avatar.is-female {
  background: linear-gradient(135deg, #F2D6DD, #E0BCC4);
  color: #8E4254;
}
.lesson-teacher-name {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.lesson-teacher-topic {
  display: block;
  font-size: 12.5px;
  color: var(--text-muted);
}

.lesson-where {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.lesson-format { display: inline-flex; align-items: center; gap: 6px; }
.lesson-format svg { width: 16px; height: 16px; color: var(--primary); }
.lesson-dot {
  width: 4px; height: 4px;
  background: var(--text-soft);
  border-radius: 50%;
  display: inline-block;
}
.lesson-location { font-weight: 500; color: var(--text); }

.lesson-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.lesson-action-btn {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  display: grid; place-items: center;
  color: var(--text);
  transition: transform 0.2s ease, background 0.2s ease;
}
.lesson-action-btn:hover { background: var(--bg-deep); transform: translateY(-2px); }
.lesson-action-btn svg { width: 22px; height: 22px; color: var(--primary); }
.lesson-action-label {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Future cards (compact) */
.future-card {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 16px;
  align-items: center;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.future-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.future-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  min-width: 56px;
}
.future-date--green { background: #E8EFE9; }
.future-date--gold { background: #FBF1DC; }
.future-weekday { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.future-day {
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--text);
  line-height: 1;
  margin: 2px 0;
}
.future-month { font-size: 11px; color: var(--text-soft); }

.future-time {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
}
.future-dot { width: 7px; height: 7px; border-radius: 50%; }
.future-dot--green { background: var(--primary); }
.future-dot--gold { background: var(--gold); }

.future-body { min-width: 0; }
.future-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 4px;
}
.future-meta { font-size: 12.5px; color: var(--text-muted); }
.future-where {
  font-size: 12.5px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}
.future-where svg { width: 13px; height: 13px; color: var(--primary); }

.future-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.status-pill {
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.status-pill--planned { background: #FBF1DC; color: #8E6826; }
.status-pill--reminder { background: #FDF1F3; color: #8E4254; }
.status-pill svg { width: 13px; height: 13px; }
.future-chevron {
  width: 18px; height: 18px;
  color: var(--text-soft);
}

/* =========================================================
   BOOKING PAGE
========================================================= */
.booking-main { padding-bottom: 30px; }

/* Hero */
.booking-hero {
  position: relative;
  margin-top: calc(var(--header-h) * -1);
  padding-top: var(--header-h);
  overflow: hidden;
  min-height: 240px;
}
.booking-hero__bg {
  position: absolute; inset: 0;
  background-image: url('assets/images/schedule-bg.png');
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.booking-hero__fade {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(242,235,224,0.35) 0%, rgba(242,235,224,0.1) 50%, var(--bg) 100%);
}
.booking-hero__inner {
  position: relative; z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 36px 0 30px;
}
.booking-hero__title {
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  color: var(--primary-dark);
  letter-spacing: 0;
  margin-bottom: 6px;
}
.booking-hero__subtitle {
  font-size: 15px;
  color: var(--text-muted);
}
.booking-bell {
  flex-shrink: 0;
  width: 46px; height: 46px;
}

/* Layout */
.booking-content { padding: 8px 0 40px; }
.booking-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  align-items: start;
}
.booking-col { display: flex; flex-direction: column; gap: 18px; }

/* Group card */
.group-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-height: 100px;
}
.group-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #F4ECE0;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.group-icon svg { width: 26px; height: 26px; }
.group-info { min-width: 0; }
.group-eyebrow {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.2px;
  display: block;
}
.group-title {
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 28px);
  color: var(--text);
  line-height: 1.1;
  margin: 2px 0 6px;
}
.group-tags {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.group-tags .bullet {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--text-soft);
  display: inline-block;
}
.group-image {
  width: 58px;
  height: 58px;
  align-self: center;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: rgba(45,95,63,0.08);
  border: 1px solid rgba(45,95,63,0.12);
  box-shadow: inset 0 0 0 4px rgba(255,255,255,0.42);
  flex-shrink: 0;
}
.group-image[data-img="boy-4-6"]    { background-image: url('assets/images/boy-4-6.png'); }
.group-image[data-img="boy-7-10"]   { background-image: url('assets/images/boy-7-10.png'); }
.group-image[data-img="boy-11-14"]  { background-image: url('assets/images/boy-11-14.png'); }
.group-image[data-img="boy-15-17"]  { background-image: url('assets/images/boy-15-17.png'); }
.group-image[data-img="boy-18plus"] { background-image: url('assets/images/boy-18plus.png'); }
.group-image[data-img="level-beginner"] { background-image: url('assets/images/level-beginner.png'); }
.group-image[data-img="level-basic"]    { background-image: url('assets/images/level-basic.png'); }
.group-image[data-img="level-medium"]   { background-image: url('assets/images/level-medium.png'); }
.group-image[data-img="level-advanced"] { background-image: url('assets/images/level-advanced.png'); }

.group-badge {
  position: absolute;
  right: 14px; bottom: 12px;
  font-size: 11.5px;
  font-weight: 600;
  background: #E5EFE6;
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 999px;
}

/* Tabs */
.booking-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--card);
  border-radius: 999px;
  padding: 6px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.booking-tab {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}
.booking-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(45,95,63,0.25);
}

/* Calendar full */
.calendar-full {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 18px 18px 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.calfull-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.calfull-month {
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
}
.calfull-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 0 2px;
}
.calfull-weekdays .is-sun { color: var(--gold); }

.calfull-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  cursor: pointer;
  padding: 0;
  border: 0;
}
.cal-cell:hover { background: var(--bg-alt); }
.cal-cell.is-other { color: rgba(31,46,37,0.25); cursor: default; }
.cal-cell.is-other:hover { background: transparent; }
.cal-cell.is-selected {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(45,95,63,0.3);
}
.cal-cell .d { line-height: 1; }
.cal-cell .dot {
  position: absolute;
  bottom: 6px;
  width: 4px; height: 4px;
  border-radius: 50%;
}
.cal-cell .dot--green { background: var(--primary); }
.cal-cell .dot--gold  { background: var(--gold); }
.cal-cell.is-selected .dot { display: none; }
.page-booking .cal-cell.has-event,
.page-schedule .cal-cell.has-event {
  isolation: isolate;
}
.page-booking .cal-cell.has-event .d,
.page-schedule .cal-cell.has-event .d {
  position: relative;
  z-index: 1;
}
.page-booking .cal-cell.has-event--green:not(.is-selected),
.page-schedule .cal-cell.has-event--green:not(.is-selected) {
  background: rgba(45,95,63,0.06);
  box-shadow: inset 0 0 0 1px rgba(45,95,63,0.14);
}
.page-booking .cal-cell.has-event--gold:not(.is-selected),
.page-schedule .cal-cell.has-event--gold:not(.is-selected) {
  background: linear-gradient(160deg, rgba(232,192,121,0.38), rgba(255,255,255,0.84));
  color: var(--primary-dark);
  box-shadow: inset 0 0 0 1px rgba(196,154,79,0.62), 0 6px 14px rgba(196,154,79,0.18);
}
.page-booking .cal-cell.has-event--gold:not(.is-selected)::before,
.page-schedule .cal-cell.has-event--gold:not(.is-selected)::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 11px;
  border: 1px solid rgba(196,154,79,0.22);
  pointer-events: none;
}
.page-booking .cal-cell.has-event--gold:not(.is-selected)::after,
.page-schedule .cal-cell.has-event--gold:not(.is-selected)::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(232,192,121,0.26);
}
.page-booking .cal-cell.has-event .dot,
.page-schedule .cal-cell.has-event .dot {
  bottom: 5px;
  width: 14px;
  height: 4px;
  border-radius: 999px;
  opacity: 0.95;
}
.page-booking .cal-cell.has-event--gold .dot,
.page-schedule .cal-cell.has-event--gold .dot { background: var(--gold); }
.page-booking .cal-cell.has-event--green .dot,
.page-schedule .cal-cell.has-event--green .dot { background: var(--primary); }
.page-booking .cal-cell.is-selected.has-event--gold,
.page-schedule .cal-cell.is-selected.has-event--gold {
  box-shadow: 0 6px 16px rgba(45,95,63,0.3), inset 0 0 0 2px var(--gold-soft);
}
.booking-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}
.booking-calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.legend-dot {
  width: 18px;
  height: 6px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: inset 0 0 0 1px rgba(31,46,37,0.08);
}
.legend-dot--free {
  background: rgba(45,95,63,0.78);
}
.legend-dot--booked {
  background: var(--gold);
}
.legend-dot--empty {
  background: #E6E9E2;
}
.cal-cell .cell-spark {
  position: absolute;
  bottom: 4px;
  width: 12px; height: 12px;
  color: var(--gold-soft);
}

/* Stats */
.booking-stats {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.stat { display: flex; align-items: center; gap: 12px; }
.stat-ic {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.stat-ic--green { background: #E5EFE6; color: var(--primary); }
.stat-ic--gold { background: #FBF1DC; color: var(--gold); }
.stat-ic svg { width: 22px; height: 22px; }
.stat-body small {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}
.stat-body strong {
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--text);
  line-height: 1;
}
.stat-body strong span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 2px;
}
.stat-divider {
  width: 22px; height: 22px;
  color: var(--gold);
  opacity: 0.6;
}

/* Slots */
.slots-section { display: flex; flex-direction: column; gap: 10px; }
.section-head--small { margin-bottom: 4px; }
.slots-title {
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--text);
}
.see-all-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
}
.slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.slot-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 10px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: 17px;
  color: var(--text);
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.slot-btn:hover { transform: translateY(-2px); border-color: var(--primary); }
.slot-btn.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(45,95,63,0.3);
}
.slot-btn.is-hot {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.slot-btn.is-disabled { opacity: 0.5; cursor: not-allowed; }
.slot-spark {
  position: absolute;
  bottom: 4px;
  width: 12px; height: 12px;
  color: var(--gold-soft);
}
/* Group lesson slots keep a subtle gold ring without a visible label. */
.slot-btn.is-group {
  border-color: var(--gold-soft);
  box-shadow: inset 0 0 0 1px rgba(196,154,79,0.18);
}
.slot-btn.is-group.is-active,
.slot-btn.is-group.is-hot {
  background: linear-gradient(135deg, var(--primary) 0%, #3a7a52 100%);
  border-color: var(--gold);
  box-shadow: 0 6px 18px rgba(45,95,63,0.32), inset 0 0 0 1px rgba(196,154,79,0.45);
}
.slot-cap {
  position: absolute;
  top: 4px;
  right: 6px;
  font-family: 'Manrope', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(196,154,79,0.20);
  color: #8a6526;
  line-height: 1.4;
}
.slot-btn.is-active .slot-cap,
.slot-btn.is-hot    .slot-cap {
  background: rgba(255,255,255,0.25);
  color: #fff;
}

/* Teacher card */
.teacher-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  align-items: center;
}
.teacher-avatar.avatar-lg {
  width: 64px; height: 64px;
  font-size: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: 'Lora', serif;
  font-weight: 600;
  flex-shrink: 0;
}
.teacher-avatar.is-male {
  background: linear-gradient(135deg, #E5EFE6, #C8DBCC);
  color: var(--primary-dark);
}
.teacher-avatar.is-female {
  background: linear-gradient(135deg, #F2D6DD, #E0BCC4);
  color: #8E4254;
}
.teacher-eyebrow {
  font-size: 12px;
  color: var(--text-muted);
}
.teacher-name {
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: 21px;
  color: var(--text);
  line-height: 1.1;
  margin: 2px 0 4px;
}
.teacher-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.teacher-formats { display: flex; gap: 8px; flex-wrap: wrap; }
.format-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
}
.format-pill svg { width: 14px; height: 14px; }
.format-pill--green { background: #E5EFE6; color: var(--primary); }
.format-pill--gold  { background: #FBF1DC; color: #8E6826; }

/* CTA */
.booking-cta-wrap { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.booking-cta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 24px;
  background: linear-gradient(135deg, #2C5E3D 0%, #1F4A30 100%);
  color: #F4ECE0;
  border-radius: 18px;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.2px;
  box-shadow: 0 12px 28px rgba(45,95,63,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.booking-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(45,95,63,0.4);
}
.cta-spark { width: 22px; height: 22px; color: var(--gold-soft); }
.booking-note {
  font-size: 12px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.lock-ic { width: 13px; height: 13px; color: var(--text-muted); flex-shrink: 0; }

/* =========================================================
   TEACHERS PAGE
========================================================= */
.teachers-main { padding-bottom: 30px; }

.teachers-hero {
  position: relative;
  margin-top: calc(var(--header-h) * -1);
  padding-top: var(--header-h);
  overflow: hidden;
}
.teachers-hero__bg {
  position: absolute; inset: 0;
  background-image: url('assets/images/schedule-bg.png');
  background-size: cover;
  background-position: center top;
  z-index: 0;
}
.teachers-hero__fade {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(242,235,224,0.3) 0%, rgba(242,235,224,0.05) 30%, rgba(242,235,224,0.6) 80%, var(--bg) 100%);
}
.teachers-hero__inner {
  position: relative; z-index: 2;
  padding: 24px 0 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Welcome card */
.welcome-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 22px;
  padding: 12px 16px 12px 12px;
  box-shadow: var(--shadow-sm);
  max-width: 720px;
}
.welcome-avatar {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: #F4ECE0;
  display: grid; place-items: center;
}
.welcome-avatar svg { width: 26px; height: 26px; }
.welcome-text { display: flex; flex-direction: column; min-width: 0; }
.welcome-greet {
  font-size: 13px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.welcome-spark { width: 14px; height: 14px; color: var(--gold); display: inline-flex; }
.welcome-spark svg { width: 100%; height: 100%; }
.welcome-name {
  font-family: 'Lora', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.1;
  margin-top: 1px;
}
.welcome-actions { display: flex; gap: 8px; }

/* Hero head */
.teachers-hero__head { max-width: 720px; }
.teachers-hero__title {
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  color: var(--primary-dark);
  letter-spacing: 0;
  margin-bottom: 8px;
}
.teachers-hero__subtitle {
  font-size: 16px;
  color: var(--text-muted);
}

/* Filter chips */
.filter-chips {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin: 0 calc(-1 * 28px);
  padding-left: 28px;
  padding-right: 28px;
}
.filter-chips::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.chip:hover { transform: translateY(-2px); border-color: var(--primary); color: var(--primary); }
.chip.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(45,95,63,0.28);
}

/* Teachers list */
.teachers-content { padding: 14px 0 30px; }
.teachers-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

/* Teacher card */
.teacher-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.teacher-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.teacher-row-photo {
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #E5EFE6, #C8DBCC);
  flex-shrink: 0;
}
.teacher-row-photo.is-female {
  background: linear-gradient(135deg, #F2D6DD, #E0BCC4);
}
.teacher-row-photo img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}
.teacher-row-initial {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: 56px;
  color: var(--primary-dark);
  z-index: 0;
}
.teacher-row-photo.is-female .teacher-row-initial { color: #8E4254; }

.teacher-verified {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #fff;
  display: grid;
  place-items: center;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(196,154,79,0.4);
  border: 2px solid #fff;
}
.teacher-verified svg { width: 14px; height: 14px; }

.teacher-row-body { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.teacher-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.teacher-row-name {
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 28px);
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 6px;
}
.teacher-row-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}
.teacher-row-rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}
.teacher-row-rating svg { width: 18px; height: 18px; }
.teacher-row-lessons {
  font-size: 13px;
  color: var(--text-muted);
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #E5EFE6;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  width: fit-content;
}
.cat-pill svg { width: 16px; height: 16px; }

.teacher-row-desc {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.teacher-row-actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.btn-outline, .btn-solid {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.btn-outline {
  background: var(--card);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}
.btn-outline svg { width: 16px; height: 16px; }

.btn-solid {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(45,95,63,0.25);
}
.btn-solid:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(45,95,63,0.32);
}
.btn-solid svg { width: 16px; height: 16px; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 16px;
}

/* =========================================================
   LEGAL / PRIVACY
========================================================= */
.page-privacy {
  background:
    radial-gradient(circle at 12% 0, rgba(196, 154, 79, 0.16), transparent 30%),
    linear-gradient(180deg, #FBF7EE 0%, #F7EFE2 100%);
}
.legal-hero {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  background: #F9F1E5;
}
.legal-hero__bg {
  position: absolute;
  inset: 0;
  background: url('assets/images/schedule-bg.png') center right / cover no-repeat;
  opacity: 0.22;
}
.legal-hero__fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(251, 247, 238, 0.98) 0%, rgba(251, 247, 238, 0.82) 48%, rgba(251, 247, 238, 0.28) 100%),
    linear-gradient(180deg, transparent 55%, #FBF7EE 100%);
}
.legal-hero__inner {
  position: relative;
  z-index: 1;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
}
.legal-eyebrow {
  margin: 0 0 12px;
  color: var(--gold-dark);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0;
}
.legal-hero h1 {
  margin: 0;
  font-family: 'Lora', serif;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.02;
  color: var(--primary-dark);
}
.legal-hero p:not(.legal-eyebrow) {
  max-width: 620px;
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.7;
}
.legal-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.34fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.legal-summary,
.legal-card {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(45, 95, 63, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.legal-summary {
  position: sticky;
  top: 96px;
  padding: 24px;
}
.legal-summary__icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: linear-gradient(135deg, #E8EFE9, #F8EED9);
  margin-bottom: 18px;
}
.legal-summary__icon svg {
  width: 28px;
  height: 28px;
}
.legal-summary h2,
.legal-card h2 {
  font-family: 'Lora', serif;
  color: var(--primary-dark);
  line-height: 1.18;
}
.legal-summary h2 {
  font-size: 25px;
  margin: 0 0 10px;
}
.legal-summary p {
  margin: 0 0 22px;
  color: var(--text-muted);
  line-height: 1.65;
}
.legal-summary dl {
  display: grid;
  gap: 14px;
  margin: 0;
}
.legal-summary dt {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}
.legal-summary dd {
  margin: 3px 0 0;
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}
.legal-summary a,
.legal-card a {
  color: var(--primary);
  font-weight: 700;
}
.legal-card {
  padding: 12px 30px;
}
.legal-card section {
  padding: 24px 0;
  border-bottom: 1px solid rgba(45, 95, 63, 0.09);
}
.legal-card section:last-child {
  border-bottom: 0;
}
.legal-card h2 {
  font-size: 25px;
  margin: 0 0 12px;
}
.legal-card p,
.legal-card li {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.75;
}
.legal-card p {
  margin: 0 0 12px;
}
.legal-card p:last-child {
  margin-bottom: 0;
}
.legal-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

/* =========================================================
   FOOTER
========================================================= */
.site-footer {
  background: var(--primary-dark);
  color: rgba(244,236,224,0.78);
  padding: 40px 0 32px;
  margin-top: 40px;
}
.site-footer .brand-name { color: #F4ECE0; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.footer-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-nav a {
  font-size: 14.5px;
  color: rgba(244,236,224,0.7);
}
.footer-nav a:hover { color: var(--gold-soft); }
.footer-copy { font-size: 13.5px; color: rgba(244,236,224,0.5); }

/* =========================================================
   MOBILE BOTTOM TABS
========================================================= */
.mobile-tabs {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 80;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  height: var(--tabs-h);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-soft);
  padding: 3px 1px;
  transition: color 0.2s ease;
  text-align: center;
}
.tab-icon {
  display: grid; place-items: center;
  width: 38px; height: 28px;
  border-radius: 999px;
  transition: background 0.25s ease, transform 0.2s ease;
}
.tab-icon svg { width: 20px; height: 20px; }
.tab-label {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0px;
  white-space: nowrap;
}
.tab.active { color: var(--primary); }
.tab.active .tab-icon {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(45,95,63,0.28);
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 1100px) {
  .cards-grid--5 { grid-template-columns: repeat(3, 1fr); }
  .booking-grid { grid-template-columns: 1fr; gap: 18px; }
}

/* Schedule cards: keep horizontal as long as possible, stack only on phones */
@media (max-width: 860px) {
  .future-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .lessons-list, .future-list { grid-template-columns: 1fr; }
  .schedule-empty-card {
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: start;
    padding: 16px;
  }
  .schedule-empty-card__icon {
    width: 48px;
    height: 48px;
  }
  .schedule-empty-card__icon svg {
    width: 22px;
    height: 22px;
  }
  .schedule-empty-card__body h3 {
    font-size: 18px;
  }
  .schedule-empty-card__action {
    grid-column: 1 / -1;
    justify-self: start;
    min-height: 40px;
  }
  .legal-hero,
  .legal-hero__inner {
    min-height: 240px;
  }
  .legal-hero h1 {
    font-size: 40px;
  }
  .legal-hero p:not(.legal-eyebrow) {
    font-size: 15px;
  }
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .legal-summary {
    position: static;
    padding: 20px;
  }
  .legal-card {
    padding: 4px 20px;
  }
  .legal-card h2 {
    font-size: 21px;
  }
}

/* Desktop: 2-column teachers grid */
@media (min-width: 1100px) {
  .teachers-list {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }
}

@media (max-width: 960px) {
  /* Hide desktop nav, show mobile tabs */
  .main-nav, .header-actions { display: none; }
  .mobile-tabs { display: grid; }
  body { padding-bottom: var(--tabs-h); }

  .header-inner { justify-content: center; }
  .site-header { background: rgba(242,235,224,0.85); backdrop-filter: blur(14px); }
  .site-header.scrolled { background: rgba(242,235,224,0.95); }

  .page-home .site-header,
  .page-home .site-header.scrolled {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: transparent;
    box-shadow: none;
  }

  .hero-full { min-height: 480px; }
  .page-home .hero-full {
    margin-top: calc(var(--header-h) * -1);
    padding-top: var(--header-h);
  }
  .hero-full__inner { padding-top: 30px; padding-bottom: 60px; gap: 24px; }
  .hero-full__bg { background-position: 70% center; }
  .hero-full__fade {
    background:
      linear-gradient(180deg, transparent 0%, transparent 55%, var(--bg) 100%),
      linear-gradient(90deg, rgba(242,235,224,0.92) 0%, rgba(242,235,224,0.55) 50%, rgba(242,235,224,0.05) 100%);
  }

  .schedule-hero { min-height: 240px; }
  .schedule-hero__inner { padding-top: 24px; padding-bottom: 30px; }

  .path-card {
    grid-template-columns: 1fr;
    padding: 36px 32px;
    gap: 28px;
  }
  .progress-circle { width: 130px; height: 130px; justify-self: start; }
  .progress-percent { font-size: 30px; }

  .quote-card { padding: 44px 36px; }
  .quote-card-bg { width: 280px; height: 280px; opacity: 0.5; }

  .footer-inner { justify-content: center; text-align: center; }

  .section { padding: 50px 0; }

  .today-card {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "icon body"
      "quote quote";
    row-gap: 14px;
  }
  .today-icon { grid-area: icon; }
  .today-body { grid-area: body; }
  .today-quote {
    grid-area: quote;
    text-align: left;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }
}

/* === BOOKING — MOBILE COMPACT ===
   Чтобы всё уместилось без скролла на телефоне */
@media (max-width: 720px) {
  /* Hero — компактный */
  .booking-hero { min-height: 0; }
  .booking-hero__inner {
    padding: 16px 0 12px;
    gap: 12px;
  }
  .booking-hero__title {
    font-size: 32px;
    letter-spacing: 0;
    margin-bottom: 2px;
  }
  .booking-hero__subtitle { font-size: 13px; }
  .booking-bell { width: 40px; height: 40px; }

  .booking-content { padding: 4px 0 16px; }
  .booking-col { gap: 10px; }

  /* Group card */
  .group-card {
    padding: 10px 14px 10px 12px;
    gap: 12px;
    min-height: 0;
  }
  .group-icon { width: 44px; height: 44px; }
  .group-icon svg { width: 22px; height: 22px; }
  .group-title { font-size: 22px; margin: 0 0 3px; }
  .group-eyebrow { font-size: 11px; }
  .group-tags { font-size: 12px; gap: 5px; }
  .group-image { width: 48px; height: 48px; }
  .group-badge { right: 12px; bottom: 10px; font-size: 10.5px; padding: 3px 9px; }

  /* Tabs */
  .booking-tabs { padding: 4px; }
  .booking-tab { padding: 8px 14px; font-size: 13px; }

  /* Calendar */
  .calendar-full { padding: 12px 12px 10px; }
  .calfull-head { margin-bottom: 6px; }
  .calfull-month { font-size: 16px; }
  .cal-nav { width: 32px; height: 32px; }
  .cal-nav svg { width: 16px; height: 16px; }
  .calfull-weekdays { font-size: 11px; margin-bottom: 4px; }
  .calfull-grid { gap: 1px; }
  .cal-cell { font-size: 14px; border-radius: 12px; }
  .cal-cell .dot { bottom: 4px; width: 3px; height: 3px; }
  .cal-cell .cell-spark { width: 10px; height: 10px; bottom: 3px; }

  /* Stats */
  .booking-stats { padding: 10px 14px; gap: 8px; }
  .stat-ic { width: 36px; height: 36px; border-radius: 11px; }
  .stat-ic svg { width: 18px; height: 18px; }
  .stat-body small { font-size: 11px; }
  .stat-body strong { font-size: 18px; }
  .stat-body strong span { font-size: 12px; }
  .stat-divider { width: 18px; height: 18px; }

  /* Slots */
  .slots-section { gap: 6px; }
  .slots-title { font-size: 16px; }
  .see-all-link { font-size: 12px; }
  .slots-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .slot-btn { padding: 10px 6px; font-size: 14.5px; border-radius: 12px; }
  .slot-spark { width: 10px; height: 10px; bottom: 3px; }

  /* Teacher */
  .teacher-card { padding: 10px 14px; gap: 12px; }
  .teacher-avatar.avatar-lg { width: 50px; height: 50px; font-size: 22px; }
  .teacher-eyebrow { font-size: 11px; }
  .teacher-name { font-size: 17px; margin: 1px 0 2px; }
  .teacher-subtitle { font-size: 12px; margin-bottom: 5px; }
  .format-pill { padding: 4px 10px; font-size: 11.5px; }
  .format-pill svg { width: 12px; height: 12px; }

  /* CTA */
  .booking-cta { padding: 14px 20px; font-size: 14.5px; border-radius: 16px; }
  .cta-spark { width: 18px; height: 18px; }
  .booking-note { font-size: 11px; }

  /* === HOME PAGE — MOBILE COMPACT (everything fits on one screen) === */
  /* Keep the logo, but remove the beige strip over the hero image. */
  .page-home .site-header,
  .page-home .site-header.scrolled {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: transparent;
    box-shadow: none;
  }
  .page-home .header-inner {
    height: 56px;
    justify-content: center;
  }
  .page-home .brand-name { display: none; }
  .page-home .brand-mark { width: 44px; height: 44px; }
  .page-home .header-actions {
    display: none;
    gap: 6px;
  }
  .page-home .header-actions .icon-btn { width: 38px; height: 38px; }
  .page-home .header-actions .icon-btn svg { width: 18px; height: 18px; }

  /* Compact hero — keep ~180px so mosque is visible */
  .page-home .hero-full {
    min-height: 200px;
    padding-top: 56px;
    margin-top: -56px;
  }
  .page-home .hero-full__inner {
    padding-top: 12px;
    padding-bottom: 14px;
    gap: 10px;
  }
  .page-home .greeting {
    font-size: 17px;
    gap: 6px;
  }
  .page-home .heart { width: 14px; height: 14px; }
  .page-home .reflection-card {
    padding: 6px 10px 6px 6px;
    gap: 8px;
    border-radius: 14px;
    max-width: none;
    width: 100%;
  }
  .page-home .reflection-icon { width: 34px; height: 34px; }
  .page-home .reflection-body h3 { font-size: 12.5px; margin-bottom: 1px; }
  .page-home .reflection-body p { font-size: 10.5px; }
  .page-home .play-btn { width: 30px; height: 30px; }
  .page-home .play-btn svg { width: 14px; height: 14px; }

  /* Compact sections */
  .page-home .section { padding: 10px 0; }
  .page-home .section-head { margin-bottom: 8px; }
  .page-home .section-title { font-size: 17px; }

  /* Compact path card */
  .page-home .path-card {
    padding: 14px 14px;
    grid-template-columns: 1fr auto;
    gap: 12px;
    min-height: 0;
    border-radius: 22px;
  }
  .page-home .path-tag {
    padding: 3px 9px;
    font-size: 9.5px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
  }
  .page-home .path-title {
    font-size: 16px;
    margin-bottom: 10px;
    line-height: 1.2;
    max-width: 200px;
  }
  .page-home .progress-bar {
    height: 4px;
    max-width: 220px;
    margin-bottom: 6px;
  }
  .page-home .path-foot { gap: 12px; }
  .page-home .path-meta { font-size: 11px; }
  .page-home .path-foot .btn { padding: 7px 14px; font-size: 12px; }
  .page-home .progress-circle { width: 80px; height: 80px; }
  .page-home .progress-percent { font-size: 18px; }
  .page-home .progress-percent small { font-size: 10px; }

  /* 4 cards in a row */
  .page-home .cards-grid--5 {
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
  }
  .page-home .age-card,
  .page-home .level-card {
    padding: 8px 6px 10px;
    border-radius: 12px;
    min-width: 0;
  }
  .page-home .age-card-image,
  .page-home .level-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 9px;
    margin-bottom: 5px;
  }
  .page-home .age-card-title,
  .page-home .level-card-title {
    font-size: 12px;
    line-height: 1.15;
    font-weight: 600;
  }

  /* Compact quote */
  .page-home .section--quote {
    padding: 10px 0 14px;
    background: none;
  }
  .page-home .quote-card {
    padding: 18px 18px 14px;
    min-height: 0;
    border-radius: 20px;
  }
  .page-home .quote-card-bg {
    display: block;
    width: 200px; height: 170px;
    opacity: 0.85;
    right: -10px; bottom: -10px;
  }
  .page-home .quote-card-content { max-width: 200px; }
  .page-home .quote-head { margin-bottom: 12px; }
  .page-home .quote-source { padding: 4px 10px; font-size: 11px; gap: 6px; }
  .page-home .quote-source svg { width: 14px; height: 14px; }
  .page-home .share-btn { width: 32px; height: 32px; border-radius: 10px; }
  .page-home .share-btn svg { width: 14px; height: 14px; }
  .page-home .quote-text {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 10px;
  }
  .page-home .dot { width: 5px; height: 5px; }
  .page-home .dot.active { width: 16px; }

  /* Hide footer on mobile home (saves space, mobile-tabs is the nav) */
  .page-home .site-footer { display: none; }

  /* Hide site-header on booking mobile to fit on one screen */
  .page-booking .site-header { display: none; }
  .page-booking .booking-hero {
    margin-top: 0;
    padding-top: 14px;
    min-height: 0;
  }
  .page-booking .booking-main { padding-bottom: 8px; }

  /* === TEACHERS PAGE — MOBILE === */
  .page-teachers .site-header { display: none; }
  .page-teachers .teachers-hero {
    margin-top: 0;
    padding-top: 0;
  }
  .teachers-hero__inner {
    padding: 16px 0 22px;
    gap: 18px;
  }
  .welcome-card { padding: 8px 12px 8px 8px; gap: 10px; border-radius: 18px; }
  .welcome-avatar { width: 44px; height: 44px; }
  .welcome-avatar svg { width: 22px; height: 22px; }
  .welcome-greet { font-size: 12px; }
  .welcome-name { font-size: 16px; }
  .welcome-actions { gap: 6px; }
  .welcome-actions .icon-btn { width: 38px; height: 38px; }
  .welcome-actions .icon-btn svg { width: 18px; height: 18px; }

  .teachers-hero__title { font-size: 38px; letter-spacing: 0; }
  .teachers-hero__subtitle { font-size: 14px; }

  .filter-chips {
    margin: 0 -18px;
    padding: 4px 18px 8px;
    gap: 8px;
  }
  .chip { padding: 9px 18px; font-size: 13px; }

  .teachers-content { padding: 6px 0 12px; }
  .teachers-list { gap: 14px; }

  .teacher-row {
    padding: 16px 16px 18px;
    gap: 14px;
  }
  .teacher-row-photo { width: 88px; height: 88px; }
  .teacher-row-initial { font-size: 38px; }
  .teacher-verified { width: 22px; height: 22px; bottom: 4px; right: 4px; }
  .teacher-verified svg { width: 11px; height: 11px; }

  .teacher-row-name { font-size: 19px; margin-bottom: 4px; }
  .teacher-row-rating { font-size: 15px; }
  .teacher-row-rating svg { width: 14px; height: 14px; }
  .teacher-row-lessons { font-size: 11.5px; }

  .cat-pill { padding: 4px 10px; font-size: 11.5px; gap: 4px; }
  .cat-pill svg { width: 13px; height: 13px; }

  .teacher-row-desc { font-size: 13px; line-height: 1.45; margin-bottom: 4px; }

  .teacher-row-actions { gap: 8px; justify-content: flex-end; }
  .btn-outline, .btn-solid {
    padding: 8px 16px;
    font-size: 12.5px;
    gap: 5px;
  }
  .btn-outline svg, .btn-solid svg { width: 14px; height: 14px; }
}

@media (max-width: 720px) {
  .cards-grid--5 { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .cards-grid--3 { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .age-card, .level-card { padding: 14px 12px 16px; }
  .age-card-title, .level-card-title { font-size: 16px; }
  .cards-grid--3 .age-card,
  .cards-grid--3 .level-card { padding: 16px 14px 18px; }
  .cards-grid--3 .age-card-title,
  .cards-grid--3 .level-card-title { font-size: 17px; }

  .greeting { font-size: 28px; }
  .reflection-card { padding: 12px 14px 12px 12px; gap: 12px; max-width: 100%; }
  .reflection-icon { width: 44px; height: 44px; }
  .reflection-body h3 { font-size: 14.5px; }

  .path-card { padding: 28px 22px; }
  .path-tag { font-size: 11px; padding: 4px 10px; }
  .path-foot { gap: 14px; }

  .quote-card { padding: 32px 24px; }
  .quote-card-bg { display: none; }

  .calendar-card { padding: 18px 16px; }
  .calendar-grid { gap: 4px; }
  .cal-day { padding: 8px 0 10px; border-radius: 14px; }
  .cal-date { font-size: 18px; }
  .cal-weekday { font-size: 10.5px; }
  .cal-month { font-size: 10px; }

  .lesson-card {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "time body"
      "action action";
    gap: 14px;
    padding: 14px;
  }
  .lesson-time { grid-area: time; min-width: 90px; padding: 12px 14px; }
  .lesson-time-value { font-size: 18px; }
  .lesson-body { grid-area: body; }
  .lesson-action {
    grid-area: action;
    flex-direction: row;
    justify-content: flex-start;
    border-top: 1px solid var(--border);
    padding-top: 10px;
    gap: 10px;
  }
  .lesson-action-btn { width: 40px; height: 40px; }
  .lesson-title { font-size: 17px; }

  .future-card {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "date body status"
      "date time status";
    column-gap: 14px;
    row-gap: 4px;
    padding: 12px 14px;
  }
  .future-date { grid-area: date; }
  .future-time { grid-area: time; font-size: 13px; }
  .future-body { grid-area: body; }
  .future-status { grid-area: status; }
  .future-chevron { display: none; }

  .schedule-hero__title { font-size: 38px; }

  .section--quote { padding-bottom: 60px; }
}

@media (max-width: 520px) {
  .footer-nav { gap: 16px; justify-content: center; }
  .footer-inner { gap: 18px; }
}

/* =========================================================
   ACCESSIBILITY
========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =========================================================
   AUTH PAGES (login + register) — isolated, doesn't touch
   any existing classes. Reuses .btn / .btn--primary.
========================================================= */
.page-login,
.page-register {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  padding: 24px 16px;
}
/* Reserve room for the mobile bottom nav so the card doesn't slide under it. */
@media (max-width: 960px) {
  .page-login,
  .page-register {
    padding-bottom: calc(24px + var(--tabs-h));
  }
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 32px 28px 26px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}
.auth-brand .brand-mark { width: 48px; height: 48px; }
.auth-brand .brand-name {
  font-family: 'Lora', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
}
.auth-title {
  font-family: 'Lora', serif;
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  margin: 0 0 4px;
}
.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 22px;
}
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label { font-size: 13px; font-weight: 500; color: var(--text); }
.auth-input {
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  font: inherit;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.auth-input:focus {
  border-color: var(--primary);
  background: #fff;
}
.auth-error {
  background: rgba(214, 122, 142, 0.12);
  color: #a64355;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  display: none;
}
.auth-error.is-on { display: block; }
.auth-submit {
  margin-top: 6px;
  width: 100%;
  padding: 13px 22px;
}
.auth-submit:disabled { opacity: 0.6; cursor: wait; }
.auth-foot {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}
.auth-foot a { color: var(--primary); font-weight: 600; }
.auth-foot a:hover { text-decoration: underline; }
.auth-consent {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.auth-consent input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--primary);
}
.auth-consent a,
.auth-legal a {
  color: var(--primary);
  font-weight: 700;
}
.auth-consent a:hover,
.auth-legal a:hover {
  text-decoration: underline;
}
.auth-legal {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.55;
  text-align: center;
}

/* =========================================================
   TEACHER DASHBOARD — minimal, reuses palette and existing
   .calfull-* / .cal-cell calendar styles.
========================================================= */
.teacher-page { display: flex; flex-direction: column; gap: 24px; }
.teacher-hello {
  background: var(--card);
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.teacher-hello h1 {
  font-family: 'Lora', serif;
  font-size: 24px;
  margin: 0 0 4px;
  color: var(--text);
}
.teacher-hello p { color: var(--text-muted); margin: 0; font-size: 14.5px; }

.teacher-section {
  background: var(--card);
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.teacher-section > h2 {
  font-family: 'Lora', serif;
  font-size: 20px;
  margin: 0 0 14px;
  color: var(--text);
}
.teacher-block-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin: 16px 0 10px;
}
.teacher-bookings-block + .teacher-bookings-block { margin-top: 8px; }

.t-booking {
  display: grid;
  grid-template-columns: minmax(110px, auto) 1fr auto;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  background: var(--bg);
}
.t-booking-time {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--card);
  min-width: 110px;
  text-align: center;
}
.t-booking-time--green { box-shadow: inset 4px 0 0 var(--primary); }
.t-booking-time--gold  { box-shadow: inset 4px 0 0 var(--gold); }
.t-booking-time--muted { box-shadow: inset 4px 0 0 var(--border-strong); opacity: 0.85; }
.t-booking-time .t-time { font-weight: 700; font-size: 18px; color: var(--text); }
.t-booking-time .t-date { font-size: 11.5px; color: var(--text-muted); }

.t-booking-student {
  display: flex; align-items: center; gap: 10px; min-width: 0;
}
.t-booking-student .t-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg-alt);
  color: var(--primary);
  font-weight: 700; font-size: 14px;
  display: grid; place-items: center; flex-shrink: 0;
  position: relative; overflow: hidden;
}
.t-booking-student .t-avatar img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.t-booking-student strong { display: block; font-size: 14.5px; color: var(--text); }
.t-booking-student small  { display: block; font-size: 12px; color: var(--text-muted); }
.t-booking-status .status-pill {
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text-muted);
}
.t-booking-status .status-pill--confirmed { background: rgba(45,95,63,0.12); color: var(--primary); }
.t-booking-status .status-pill--pending   { background: rgba(196,154,79,0.18); color: #8a6a2a; }
.t-booking-status .status-pill--cancelled { background: rgba(214,122,142,0.18); color: #a64355; }
.t-booking-status .status-pill--completed { background: rgba(45,95,63,0.18); color: var(--primary-dark); }

.t-booking-actions {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.btn-action {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  border: 0;
  cursor: pointer;
}
.btn-action:hover { background: var(--primary-dark); }
.btn-action--ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border-strong);
}
.btn-action--ghost:hover { background: var(--bg-alt); }
.btn-action--danger { background: #c25d7a; }
.btn-action--danger:hover { background: #a64355; }

.t-booking-link {
  grid-column: 1 / -1;
  display: flex; gap: 8px; align-items: center;
  padding-top: 8px;
}
.t-booking-link input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font: inherit;
  outline: none;
}
.t-booking-link input:focus { border-color: var(--primary); }

.t-slots-day { margin-top: 16px; }
.t-slots-list {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 14px;
}
.t-slot-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px 6px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text);
}
/* Group slots get a subtle gold border. */
.t-slot-chip.is-group {
  background: rgba(196,154,79,0.10);
  border-color: rgba(196,154,79,0.35);
}
/* Has bookings: green tint. Bookings are not capped by capacity. */
.t-slot-chip.has-bookings {
  background: rgba(45,95,63,0.08);
  border-color: rgba(45,95,63,0.25);
}
/* Legacy class kept harmless if older data renders it. */
.t-slot-chip.is-full {
  background: rgba(214,122,142,0.12);
  border-color: rgba(214,122,142,0.45);
  color: #b54565;
}
.t-slot-cap {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.07);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.t-slot-chip.is-full .t-slot-cap { background: rgba(214,122,142,0.25); color: #b54565; }
.t-slot-chip.is-group .t-slot-cap { background: rgba(196,154,79,0.25); color: #8a6526; }

.t-slot-delete,
.t-slot-edit,
.t-slot-link-btn {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--card);
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  display: grid; place-items: center;
}
.t-slot-link-btn svg { width: 14px; height: 14px; }
.t-slot-chip.has-link {
  box-shadow: inset 0 0 0 1px rgba(45,95,63,0.08);
}
.t-slot-link-badge {
  background: rgba(45,95,63,0.12);
  color: var(--primary);
}
.t-slot-edit:hover,
.t-slot-link-btn:hover { background: var(--primary); color: #fff; }
.t-slot-delete:hover { background: #c25d7a;       color: #fff; }

.t-slot-link-editor[hidden] { display: none; }
.t-slot-link-card {
  width: 100%;
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(45,95,63,0.16);
  border-radius: 14px;
  background: rgba(45,95,63,0.06);
}
.t-slot-link-card strong {
  display: block;
  font-family: 'Lora', serif;
  color: var(--primary);
}
.t-slot-link-card small {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12.5px;
}
.t-slot-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.t-slot-link-row input {
  flex: 1 1 240px;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--card);
  font: inherit;
  outline: none;
}
.t-slot-link-row input:focus { border-color: var(--primary); }
.t-slot-link-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 0;
  background: var(--card);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.t-slot-link-close:hover { background: #c25d7a; color: #fff; }

.t-add-slot {
  display: flex; gap: 8px; align-items: center;
  flex-wrap: wrap;
}
.t-add-slot input[type="time"],
.t-add-slot input[type="number"] {
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font: inherit;
  outline: none;
}
.t-add-slot input[type="number"] { width: 80px; }
.t-add-slot input[type="time"]:focus,
.t-add-slot input[type="number"]:focus { border-color: var(--primary); }
.t-add-slot-hint {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.teacher-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 20px;
  font-size: 16px;
}

@media (max-width: 720px) {
  .teacher-section, .teacher-hello { padding: 16px 14px; }
  .t-booking { grid-template-columns: 1fr; }
  .t-booking-time { min-width: 0; flex-direction: row; gap: 10px; align-items: center; }
  .t-booking-status { justify-self: start; }
}

/* =========================================================
   PANEL PAGES (profile + admin) — reuses .teacher-section
   visuals via the .panel-card class.
========================================================= */
.panel-page { display: flex; flex-direction: column; gap: 24px; }
.panel-card {
  background: var(--card);
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.panel-card > h2 {
  font-family: 'Lora', serif;
  font-size: 20px;
  margin: 0 0 14px;
  color: var(--text);
}
.panel-card .panel-row {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 10px 0;
}
.panel-card .panel-row + .panel-row { border-top: 1px solid var(--border); }
.panel-card .panel-label {
  flex: 0 0 140px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.panel-card .panel-value {
  flex: 1;
  font-size: 15px;
  color: var(--text);
}
.panel-input {
  flex: 1;
  min-width: 220px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font: inherit;
  outline: none;
}
.panel-input:focus { border-color: var(--primary); }

.panel-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 14px;
}

.panel-msg {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  display: none;
}
.panel-msg.is-on { display: block; }
.panel-msg.is-error   { background: rgba(214,122,142,0.15); color: #a64355; }
.panel-msg.is-success { background: rgba(45,95,63,0.12);   color: var(--primary); }

.panel-link-row {
  display: flex; flex-direction: column; gap: 8px;
}
.panel-link-row a {
  display: inline-block;
  padding: 9px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.panel-link-row a:hover { background: var(--bg-deep); }

.panel-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.panel-card-head h2 {
  font-family: 'Lora', serif;
  font-size: 20px;
  margin: 0;
  color: var(--text);
}
.panel-card-head a {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.panel-card-head a:hover { color: var(--primary); }

.profile-bookings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.profile-booking-card {
  display: grid;
  grid-template-columns: 112px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(251,247,238,0.70));
}
.profile-booking-time {
  min-height: 76px;
  border-radius: 14px;
  background: rgba(45,95,63,0.10);
  color: var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
}
.profile-booking-time strong {
  font-family: 'Lora', serif;
  font-size: 24px;
  line-height: 1;
}
.profile-booking-time span {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.profile-booking-main h3 {
  margin: 0 0 4px;
  font-family: 'Lora', serif;
  font-size: 18px;
  color: var(--text);
}
.profile-booking-main p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}
.profile-booking-link {
  margin-top: 7px;
  font-size: 12px;
}
.profile-booking-link a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}
.profile-booking-link span { color: var(--text-muted); }
.profile-booking-status {
  justify-self: end;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(45,95,63,0.12);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.profile-booking-status--pending {
  background: rgba(196,154,79,0.16);
  color: var(--accent);
}
.profile-booking-status--cancelled {
  background: rgba(214,122,142,0.15);
  color: #a64355;
}
.profile-bookings-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px;
  border-radius: 16px;
  background: var(--bg-alt);
  color: var(--text-muted);
}
.profile-bookings-empty strong {
  color: var(--text);
  font-family: 'Lora', serif;
  font-size: 17px;
}

/* =========================================================
   PROFILE — APP-LIKE DASHBOARD
========================================================= */
.page-profile {
  background:
    radial-gradient(circle at 10% 0%, rgba(196,154,79,0.13), transparent 30%),
    linear-gradient(180deg, #FBF7EE 0%, #F7EFE4 42%, #EFE5D5 100%);
}
.page-profile main {
  position: relative;
  overflow: hidden;
}
.page-profile main::before {
  content: "";
  position: absolute;
  inset: 0 0 auto auto;
  width: min(760px, 86vw);
  height: 320px;
  background: url('assets/images/hero-mosque.png') right top/contain no-repeat;
  opacity: 0.13;
  pointer-events: none;
}
.profile-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 980px;
  margin: 0 auto;
}
.profile-hero {
  min-height: 210px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 34px 4px 18px;
}
.profile-hero h1 {
  margin: 0;
  font-family: 'Lora', serif;
  font-size: clamp(56px, 9vw, 88px);
  line-height: 0.95;
  font-weight: 500;
  color: var(--primary-dark);
  letter-spacing: 0;
}
.profile-hero p {
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: clamp(17px, 2vw, 22px);
}
.profile-bell-btn {
  width: 82px;
  height: 82px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  color: var(--primary-dark);
  background: rgba(255,255,255,0.70);
  border: 1px solid rgba(196,154,79,0.44);
  box-shadow: 0 14px 34px rgba(95,69,38,0.10);
  flex: 0 0 auto;
}
.profile-bell-btn svg { width: 34px; height: 34px; }

.profile-main-card,
.profile-progress-card,
.profile-menu-card,
.profile-section-card {
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(196,154,79,0.24);
  border-radius: 28px;
  box-shadow: 0 18px 42px rgba(64,45,26,0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.profile-main-card { padding: 28px; }
.profile-main-user {
  display: grid;
  grid-template-columns: 168px 1fr auto;
  align-items: center;
  gap: 28px;
}
.profile-avatar-xl {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(45,95,63,0.12), rgba(196,154,79,0.12));
  border: 1px solid rgba(196,154,79,0.30);
}
.profile-avatar-xl img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-avatar-xl .profile-photo__initial { font-size: 64px; }
.profile-main-copy h2 {
  margin: 0 0 8px;
  font-family: 'Lora', serif;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
  font-weight: 500;
  color: var(--primary-dark);
}
.profile-main-copy p {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 18px;
}
.profile-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(45,95,63,0.10);
  color: var(--primary-dark);
  font-weight: 700;
}
.profile-role-pill svg { width: 20px; height: 20px; }
.profile-avatar-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.profile-edit-btn {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text-muted);
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--border-strong);
  transition: color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.profile-edit-btn:hover {
  color: var(--primary);
  border-color: rgba(45,95,63,0.32);
  transform: translateY(-1px);
}
.profile-edit-btn svg { width: 28px; height: 28px; }
.profile-remove-photo {
  border: 0;
  background: transparent;
  color: #a64355;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 28px;
  border: 1px solid rgba(196,154,79,0.18);
  border-radius: 20px;
  background: rgba(255,255,255,0.48);
  overflow: hidden;
}
.profile-stat {
  min-height: 104px;
  display: grid;
  grid-template-columns: 58px 1fr;
  grid-template-areas: "icon value" "icon label";
  align-content: center;
  column-gap: 14px;
  padding: 18px 22px;
}
.profile-stat + .profile-stat { border-left: 1px solid rgba(196,154,79,0.18); }
.profile-stat__icon {
  grid-area: icon;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: rgba(45,95,63,0.10);
}
.profile-stat__icon svg { width: 28px; height: 28px; }
.profile-stat strong {
  grid-area: value;
  align-self: end;
  font-family: 'Lora', serif;
  font-size: 34px;
  line-height: 1;
  font-weight: 500;
  color: var(--primary-dark);
}
.profile-stat span:last-child {
  grid-area: label;
  color: var(--text-muted);
  font-size: 14px;
}

.profile-progress-card,
.profile-section-card {
  padding: 24px;
  scroll-margin-top: 110px;
}
.profile-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.profile-section-head h2 {
  margin: 0;
  font-family: 'Lora', serif;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 500;
  color: var(--primary-dark);
}
.profile-section-head a {
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.profile-progress-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.profile-progress-tile {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border-radius: 18px;
  background: rgba(255,255,255,0.50);
  border: 1px solid rgba(196,154,79,0.16);
}
.profile-progress-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.profile-progress-icon.is-green {
  color: #fff;
  background: var(--primary);
}
.profile-progress-icon.is-gold {
  color: var(--accent);
  background: rgba(196,154,79,0.16);
}
.profile-progress-icon svg { width: 34px; height: 34px; }
.profile-progress-tile span {
  display: block;
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 8px;
}
.profile-progress-tile strong {
  font-family: 'Lora', serif;
  font-weight: 500;
  font-size: 34px;
  color: var(--primary-dark);
}
.profile-progress-tile small {
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  color: var(--text-muted);
}
.profile-progress-line {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: rgba(31,46,37,0.10);
  margin-top: 10px;
  overflow: hidden;
}
.profile-progress-line em {
  display: block;
  width: var(--p);
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.profile-menu-card {
  overflow: hidden;
}
.profile-menu-row {
  display: grid;
  grid-template-columns: 56px 1fr 24px;
  align-items: center;
  gap: 18px;
  min-height: 82px;
  padding: 12px 28px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid rgba(31,46,37,0.07);
}
.profile-menu-row:last-child { border-bottom: 0; }
.profile-menu-row:hover { background: rgba(45,95,63,0.04); }
.profile-menu-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: rgba(45,95,63,0.10);
}
.profile-menu-icon svg { width: 25px; height: 25px; }
.profile-menu-row span:nth-child(2) {
  font-size: 20px;
  font-weight: 500;
}
.profile-menu-row i {
  color: var(--text-muted);
  display: grid;
  place-items: center;
}
.profile-menu-row i svg { width: 20px; height: 20px; }

.profile-section-card .panel-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 11px 0;
}
.profile-section-card .panel-row + .panel-row { border-top: 1px solid rgba(31,46,37,0.07); }
.profile-section-card .panel-label {
  flex: 0 0 150px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}
.profile-section-card .panel-value {
  flex: 1;
  font-size: 15px;
  color: var(--text);
}
.profile-section-card .panel-actions { margin-top: 16px; }
.profile-account-card .panel-link-row:not(:empty) { margin-bottom: 12px; }
.profile-logout-btn {
  background: #b95b70 !important;
  box-shadow: 0 12px 28px rgba(185,91,112,0.22) !important;
}
.profile-empty-soft {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.52);
  border: 1px solid rgba(196,154,79,0.14);
  color: var(--text-muted);
}
.profile-empty-soft strong {
  color: var(--primary-dark);
  font-family: 'Lora', serif;
  font-size: 19px;
  font-weight: 500;
}

@media (max-width: 960px) {
  .page-profile .site-header,
  .page-profile .site-footer { display: none; }
  .page-profile .section { padding-top: 0; padding-bottom: 26px; }
  .page-profile .container { padding-left: 18px; padding-right: 18px; }
  .profile-shell { gap: 18px; }
  .profile-hero { min-height: 170px; padding-top: 28px; }
  .profile-bell-btn { width: 66px; height: 66px; border-radius: 20px; }
  .profile-bell-btn svg { width: 28px; height: 28px; }
  .profile-main-card { padding: 22px; border-radius: 24px; }
  .profile-main-user {
    grid-template-columns: 116px 1fr auto;
    gap: 16px;
  }
  .profile-avatar-xl { width: 116px; height: 116px; }
  .profile-main-copy p { font-size: 15px; margin-bottom: 12px; }
  .profile-edit-btn { width: 48px; height: 48px; }
  .profile-stats { margin-top: 22px; }
  .profile-stat {
    grid-template-columns: 44px 1fr;
    min-height: 86px;
    column-gap: 10px;
    padding: 14px 12px;
  }
  .profile-stat__icon { width: 44px; height: 44px; }
  .profile-stat__icon svg { width: 22px; height: 22px; }
  .profile-stat strong { font-size: 25px; }
  .profile-stat span:last-child { font-size: 12px; }
}

@media (max-width: 640px) {
  .profile-hero h1 { font-size: 56px; }
  .profile-hero p { font-size: 16px; max-width: 260px; }
  .profile-main-user {
    grid-template-columns: 92px 1fr;
    align-items: start;
  }
  .profile-avatar-xl { width: 92px; height: 92px; }
  .profile-avatar-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .profile-main-copy h2 { font-size: 30px; }
  .profile-stats,
  .profile-progress-grid { grid-template-columns: 1fr; }
  .profile-stat + .profile-stat {
    border-left: 0;
    border-top: 1px solid rgba(196,154,79,0.18);
  }
  .profile-section-card,
  .profile-progress-card { padding: 18px; border-radius: 22px; }
  .profile-section-head h2 { font-size: 23px; }
  .profile-progress-tile {
    grid-template-columns: 58px 1fr;
    padding: 16px;
  }
  .profile-progress-icon { width: 54px; height: 54px; }
  .profile-progress-icon svg { width: 28px; height: 28px; }
  .profile-menu-row {
    min-height: 72px;
    grid-template-columns: 48px 1fr 20px;
    gap: 14px;
    padding: 10px 18px;
  }
  .profile-menu-icon { width: 44px; height: 44px; }
  .profile-menu-row span:nth-child(2) { font-size: 17px; }
  .profile-section-card .panel-label { flex: 0 0 100%; }
}

/* ── Admin tabs ── */
.admin-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.admin-tab {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
}
.admin-tab.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ── Admin tables ── */
.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.admin-table th, .admin-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table th {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: var(--bg);
}
.admin-table tr:hover td { background: var(--bg); }
.admin-table select,
.admin-table input {
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  background: #fff;
}
.admin-mono { font-family: 'Courier New', monospace; font-size: 11.5px; color: var(--text-muted); }
.admin-flag { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; }
.admin-flag--on  { background: rgba(45,95,63,0.15);   color: var(--primary); }
.admin-flag--off { background: rgba(214,122,142,0.15); color: #a64355; }

@media (max-width: 720px) {
  .panel-card { padding: 16px 14px; }
  .panel-card .panel-label { flex: 0 0 100%; }
  .profile-booking-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .profile-booking-status { justify-self: start; }
  .profile-booking-time {
    min-height: auto;
    align-items: flex-start;
    text-align: left;
  }
}

/* =========================================================
   BOOKING SUCCESS MODAL
   Shown after a confirmed booking. Mirrors the design ref:
   white rounded card, soft sage emblem with leaves, gold
   diamond divider, four icon rows, lesson-link block,
   primary "Закрыть" button.
========================================================= */
body.no-scroll { overflow: hidden; }

.success-modal {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.success-modal.is-open    { opacity: 1; }
.success-modal.is-leaving { opacity: 0; }

.success-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(45, 95, 63, 0.32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.success-modal__card {
  position: relative;
  width: min(640px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: linear-gradient(180deg, #FBF7EE 0%, #F6EFE2 100%);
  border-radius: 28px;
  padding: 36px 44px 30px;
  box-shadow: 0 30px 80px rgba(45,95,63,0.25),
              0 8px 24px rgba(45,95,63,0.12);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s cubic-bezier(0.4, 1.4, 0.6, 1);

  /* subtle islamic geometric pattern at the bottom-left edge */
  background-image:
    linear-gradient(180deg, #FBF7EE 0%, #F6EFE2 100%),
    radial-gradient(circle at 100% 100%, rgba(196,154,79,0.08) 0%, transparent 40%);
}
.success-modal.is-open .success-modal__card { transform: translateY(0) scale(1); }

.success-modal__close {
  position: absolute; top: 14px; right: 16px;
  width: 32px; height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.15s ease;
}
.success-modal__close:hover { background: rgba(0,0,0,0.06); }

/* ─── Hero (logo + leaves + sparkles) ───────────────── */
.success-modal__hero {
  position: relative;
  display: grid; place-items: center;
  height: 130px;
  margin-bottom: 6px;
}
.success-modal__check {
  position: relative;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: rgba(45,95,63,0.10);
  padding: 4px;
  display: grid; place-items: center;
  z-index: 2;
}
.success-modal__logo {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
/* Soft check badge in the corner — keeps the logo readable. */
.success-modal__check-overlay {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 40px;
  height: 40px;
  display: grid; place-items: center;
  background: #fff;
  border: 3px solid #FBF7EE;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(45,95,63,0.18);
  opacity: 0;
  transform: scale(0.6);
  animation: success-check 0.5s 0.15s forwards ease-out;
}
@keyframes success-check {
  0%   { opacity: 0; transform: scale(0.4); }
  60%  { opacity: 1; transform: scale(1.15); }
  100% { opacity: 1; transform: scale(1); }
}
.success-modal__leaf {
  position: absolute;
  top: 30px;
  width: 110px; height: 60px;
  color: rgba(196,154,79,0.55);
  z-index: 1;
}
.success-modal__leaf--left  { left: calc(50% - 130px); }
.success-modal__leaf--right { right: calc(50% - 130px); }
.success-modal__leaf svg    { width: 100%; height: 100%; }

.success-modal__sparkle {
  position: absolute;
  color: rgba(196,154,79,0.7);
  font-size: 14px;
  animation: sparkle-pop 1.6s infinite ease-in-out;
}
.success-modal__sparkle.s1 { top: 18px;  left: calc(50% - 70px); animation-delay: 0s;   }
.success-modal__sparkle.s2 { top: 10px;  left: calc(50% + 36px); animation-delay: 0.4s; font-size: 10px; }
.success-modal__sparkle.s3 { top: 60px;  left: calc(50% + 70px); animation-delay: 0.8s; }
@keyframes sparkle-pop {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50%      { opacity: 1;   transform: scale(1.1); }
}

/* ─── Title + divider ────────────────────────────────── */
.success-modal__title {
  margin: 8px 0 4px;
  text-align: center;
  font-family: 'Lora', serif;
  font-size: 44px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0;
}
.success-modal__divider {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  margin: 0 0 24px;
  color: var(--gold);
}
.success-modal__divider svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}
.success-modal__divider span {
  display: block;
  height: 1px;
  width: 60px;
  background: linear-gradient(90deg, transparent, var(--gold-soft), transparent);
}

/* ─── Detail rows ─────────────────────────────────────── */
.success-modal__rows {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.success-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px dashed rgba(196,154,79,0.30);
}
.success-row:last-child { border-bottom: 0; }
.success-row__icon {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: rgba(45,95,63,0.10);
  display: grid; place-items: center;
  color: var(--primary);
}
.success-row__icon svg { width: 20px; height: 20px; }
.success-row__label {
  font-size: 15px;
  color: #5d6b62;
  font-weight: 500;
}
.success-row__value {
  font-family: 'Lora', serif;
  font-size: 19px;
  color: var(--primary);
  font-weight: 600;
  text-align: right;
  line-height: 1.2;
}
.success-seats {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 10px;
  background: rgba(196,154,79,0.20);
  color: #8a6526;
  font-family: 'Manrope', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 999px;
  vertical-align: 2px;
}

/* ─── Lesson-link block ──────────────────────────────── */
.success-link {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin: 0 0 22px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(196,154,79,0.25);
  border-radius: 16px;
}
@media (max-width: 760px) {
  .success-link {
    grid-template-columns: 44px 1fr;
    grid-template-areas:
      "icon body"
      "actions actions";
    row-gap: 10px;
  }
  .success-link-icon    { grid-area: icon;    }
  .success-link-body    { grid-area: body;    min-width: 0; }
  .success-link-actions { grid-area: actions; }
  .success-link-actions .btn { flex: 1; justify-content: center; }
}
.success-link.is-pending {
  grid-template-columns: 44px 1fr;
  background: rgba(196,154,79,0.06);
  border-style: dashed;
}
.success-link-icon {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: rgba(45,95,63,0.10);
  display: grid; place-items: center;
  color: var(--primary);
}
.success-link-icon svg { width: 20px; height: 20px; }
.success-link-body { min-width: 0; }
.success-link-body small {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 2px;
  white-space: nowrap;
}
.success-link-url {
  display: block;
  font-family: 'Manrope', sans-serif;
  font-size: 14.5px;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.success-link-url.muted { color: var(--text-muted); font-style: italic; }
.success-link-actions {
  display: flex; gap: 8px;
  flex-shrink: 0;
}
.success-link-btn {
  padding: 9px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.success-link-btn.is-copied { background: var(--primary); color: #fff; }

/* Outline gold "Скопировать" button. .btn--ghost may already
   exist with another shade — scope this so we don't override it. */
.success-link-btn.btn--ghost {
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--gold);
}
.success-link-btn.btn--ghost:hover {
  background: rgba(196,154,79,0.08);
}

/* ─── Close CTA ──────────────────────────────────────── */
.success-modal__cta {
  display: block;
  width: 100%;
  padding: 16px;
  font-size: 17px;
  border-radius: 18px;
  letter-spacing: 0.2px;
}

/* ─── Mobile ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .success-modal { padding: 12px; }
  .success-modal__card { padding: 28px 20px 22px; border-radius: 22px; }
  .success-modal__title { font-size: 34px; }
  .success-modal__hero  { height: 110px; }
  .success-modal__check { width: 78px; height: 78px; }
  .success-modal__leaf  { width: 80px; height: 50px; top: 24px; }
  .success-modal__leaf--left  { left:  calc(50% - 100px); }
  .success-modal__leaf--right { right: calc(50% - 100px); }

  .success-row {
    grid-template-columns: 38px 1fr;
    grid-template-areas:
      "icon label"
      "icon value";
    gap: 4px 12px;
  }
  .success-row__icon  { grid-area: icon; }
  .success-row__label { grid-area: label; }
  .success-row__value { grid-area: value; text-align: left; font-size: 17px; }

  .success-link {
    grid-template-columns: 38px 1fr;
    grid-template-areas:
      "icon body"
      "actions actions";
    gap: 10px;
    padding: 12px;
  }
  .success-link-icon    { grid-area: icon; }
  .success-link-body    { grid-area: body; min-width: 0; }
  .success-link-actions { grid-area: actions; gap: 8px; }
  .success-link-actions .btn { flex: 1; justify-content: center; }
  .success-link.is-pending {
    grid-template-columns: 38px 1fr;
    grid-template-areas: "icon body";
  }
}

/* Filter banner shown on /teachers when arriving via ?level=… */
.level-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 14px;
  margin: 0 0 14px;
  background: rgba(196,154,79,0.12);
  border: 1px solid rgba(196,154,79,0.35);
  border-radius: 999px;
  font-size: 14px;
  color: var(--text);
}
.level-banner__label  { color: var(--text-muted); }
.level-banner__value  { color: var(--primary); font-family: 'Lora', serif; font-weight: 600; }
.level-banner__close  {
  width: 22px; height: 22px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,0.06); color: var(--text-muted);
  cursor: pointer; display: grid; place-items: center; font-size: 14px;
}
.level-banner__close:hover { background: var(--primary); color: #fff; }

/* =========================================================
   ADMIN PANEL EXTENSIONS
   Search/filter toolbar, stat cards, action buttons.
   The base table styles already exist above.
========================================================= */
.admin-shell { padding: 0; overflow: hidden; }

/* Stats grid on the dashboard tab */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding: 22px 24px 12px;
}
.admin-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px 16px;
  display: flex; flex-direction: column; gap: 4px;
  box-shadow: var(--shadow-sm);
}
.admin-stat--warn {
  background: rgba(214,122,142,0.08);
  border-color: rgba(214,122,142,0.40);
}
.admin-stat__label {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.admin-stat__value {
  font-family: 'Lora', serif;
  font-size: 38px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
}
.admin-stat--warn .admin-stat__value { color: #b54565; }
.admin-stat__sub {
  font-size: 12px;
  color: var(--text-muted);
}
.admin-hint {
  padding: 4px 26px 22px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Toolbar above each tab's table */
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 16px 22px 0;
}
.admin-search {
  flex: 1 1 260px;
  min-width: 220px;
  padding: 9px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font: inherit;
  outline: none;
}
.admin-search:focus { border-color: var(--primary); }
.admin-filter {
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  cursor: pointer;
}
.admin-filter:focus { border-color: var(--primary); outline: none; }

/* Action buttons in cells */
.admin-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
/* New, well-scoped admin button. Avoids fighting with the older
   global .btn-action style used elsewhere in the app. */
.admin-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.admin-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}
.admin-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.admin-btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.admin-btn--primary:hover:not(:disabled) {
  background: #234d33;
  border-color: #234d33;
  color: #fff;
}
.admin-btn--warn {
  background: #f6e8c5;
  border-color: #d8b865;
  color: #6f5512;
}
.admin-btn--warn:hover:not(:disabled) {
  background: #efd99a;
  border-color: #b88f30;
  color: #4f3c08;
}
.admin-btn--danger {
  background: #fbe7ec;
  border-color: #d68aa0;
  color: #b54565;
}
.admin-btn--danger:hover:not(:disabled) {
  background: #f5c5d2;
  border-color: #b54565;
  color: #fff;
}

/* Self tag in user table */
.admin-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.admin-self-tag {
  display: inline-block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(196,154,79,0.20);
  color: #8a6526;
}
.admin-link {
  text-decoration: none;
  color: var(--gold);
  margin-left: 4px;
  cursor: pointer;
}
.admin-link:hover { color: var(--primary); }

@media (max-width: 720px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); padding: 16px; gap: 10px; }
  .admin-stat__value { font-size: 28px; }
  .admin-toolbar { padding: 12px; }
}

/* =========================================================
   ADMIN DASHBOARD — hero design
   Matches the reference mockup: hero greeting with mosque
   background, metric cards, quick action tiles, two-column
   live cards, recent activity list.
========================================================= */

/* Page wrapper takes the entire admin panel area. The .panel-page
   container in admin.html stays for layout but we hide its default
   padding so our cards have full breathing room. */
.page-admin {
  background:
    radial-gradient(circle at 12% 0%, rgba(196,154,79,0.16), transparent 30%),
    linear-gradient(180deg, #FBF7EE 0%, #F2EBE0 44%, #EEE5D5 100%);
}
.admin-app-header {
  position: sticky;
  top: 0;
  z-index: 120;
  padding: 18px 0 10px;
  background: linear-gradient(180deg, rgba(251,247,238,0.94), rgba(251,247,238,0.78));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.admin-app-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.admin-app-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--primary);
}
.admin-app-brand__mark {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(45,95,63,0.08);
  box-shadow: 0 10px 28px rgba(45,95,63,0.12);
  overflow: hidden;
}
.admin-app-brand__mark img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}
.admin-app-brand__name {
  font-family: 'Lora', serif;
  font-size: 24px;
  font-weight: 700;
}
.admin-app-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-round-btn {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 12px 26px rgba(31,46,37,0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.admin-round-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(31,46,37,0.12);
}
.admin-round-btn svg {
  width: 25px;
  height: 25px;
}
.admin-round-btn--notify::after {
  content: '';
  position: absolute;
  top: 13px;
  right: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}
.admin-app-main {
  padding: 18px 0 110px;
}
.admin-app-section {
  padding: 0;
}
.admin-container {
  max-width: 1180px;
}
.page-admin .panel-page {
  background: transparent;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.adm-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.adm-screen-top {
  position: relative;
  min-height: 168px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 16px;
  padding: 16px 4px 72px;
  overflow: hidden;
}
.adm-screen-top::before {
  content: '';
  position: absolute;
  inset: -26px -28px 0 36%;
  background:
    linear-gradient(90deg, rgba(251,247,238,0.96), rgba(251,247,238,0.2)),
    url('assets/images/hero-mosque.png') right center/cover no-repeat;
  opacity: 0.74;
  pointer-events: none;
}
.adm-screen-top__back,
.adm-screen-top__actions,
.adm-screen-top__title {
  position: relative;
  z-index: 1;
}
.adm-screen-top__back {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: rgba(255,255,255,0.9);
  box-shadow: 0 12px 26px rgba(31,46,37,0.08);
}
.adm-screen-top__back svg {
  width: 24px;
  height: 24px;
}
.adm-screen-top__title {
  align-self: end;
  margin: 0;
  font-family: 'Lora', serif;
  font-size: 44px;
  line-height: 1;
  color: var(--primary);
}
.adm-screen-top__actions {
  display: flex;
  gap: 10px;
}

/* ───── HERO with mosque background ───── */
.adm-hero {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.72) 0%, rgba(251,247,238,0.94) 100%);
  border: 1px solid rgba(255,255,255,0.82);
  box-shadow: 0 18px 54px rgba(31,46,37,0.08);
}
.adm-hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('assets/images/hero-mosque.png');
  background-position: right -28px center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.54;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 34%, #000 82%);
          mask-image: linear-gradient(90deg, transparent 0%, transparent 34%, #000 82%);
}
.adm-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 62% 22%, rgba(196,154,79,0.10), transparent 24%),
    linear-gradient(90deg, rgba(251,247,238,0.98) 0%, rgba(251,247,238,0.88) 46%, rgba(251,247,238,0.22) 100%);
  pointer-events: none;
}
.adm-hero__inner {
  position: relative;
  z-index: 1;
  padding: 32px 36px 28px;
}
.adm-hero__greet {
  margin: 0;
  font-family: 'Lora', serif;
  font-weight: 500;
  font-size: 22px;
  color: var(--text-muted);
}
.adm-hero__name {
  margin: 4px 0 6px;
  font-family: 'Lora', serif;
  font-size: 44px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0;
}
.adm-hero__sub {
  margin: 0 0 24px;
  font-size: 15px;
  color: var(--text-muted);
}

/* ───── HERO METRICS ROW ───── */
.adm-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.adm-metrics--standalone {
  margin-top: -78px;
  position: relative;
  z-index: 2;
}
.adm-metric {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.78);
  border-radius: 18px;
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  box-shadow: 0 10px 26px rgba(31,46,37,0.07);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.adm-metric:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(45,95,63,0.10); }
.adm-metric__icon {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px; height: 28px;
  color: var(--primary);
  opacity: 0.85;
}
.adm-metric__icon svg { width: 100%; height: 100%; }
.adm-metric__label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  padding-right: 36px; /* leave room for the icon */
}
.adm-metric__value {
  font-family: 'Lora', serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
  margin-top: -2px;
}
.adm-metric__delta {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 18px;
}
.adm-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 500;
}
.adm-delta--up   { color: #2D5F3F; }
.adm-delta--down { color: #b54565; }

/* ───── QUICK ACTIONS ───── */
.adm-section-title {
  margin: 0 0 14px;
  font-family: 'Lora', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
}
.adm-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.adm-section-head .adm-section-title {
  margin-bottom: 0;
}
.adm-quick__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 12px;
}
.adm-quick__tile {
  min-height: 104px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.78);
  border-radius: 18px;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  font: inherit;
}
.adm-quick__tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  border-color: rgba(45,95,63,0.30);
}
.adm-quick__icon {
  width: 36px; height: 36px;
  color: var(--primary);
}
.adm-quick__icon svg { width: 100%; height: 100%; }
.adm-quick__label {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
}

/* ───── TWO-COLUMN CARD ROW ───── */
.adm-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.adm-card {
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.78);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(31,46,37,0.07);
}
.adm-card--full { grid-column: 1 / -1; }
.adm-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 22px 12px;
}
.adm-card__title {
  margin: 0;
  font-family: 'Lora', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.adm-card__more {
  background: transparent;
  border: 0;
  color: var(--gold);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.adm-card__more:hover { color: var(--primary); text-decoration: underline; }
.adm-card__body { padding: 0 22px 18px; }
.adm-card__body .empty-state {
  padding: 32px 12px;
  text-align: center;
}

/* ───── ROWS in "Заявки на подтверждение" ───── */
.adm-row {
  display: grid;
  grid-template-columns: 48px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.adm-row:last-child { border-bottom: 0; }
.adm-row__avatar { width: 44px; height: 44px; }
.adm-initial {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(45,95,63,0.10);
  color: var(--primary);
  font-family: 'Lora', serif;
  font-size: 18px;
  font-weight: 700;
}
.adm-row__main { min-width: 0; }
.adm-row__name {
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adm-row__meta {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.35;
}
.adm-row__when {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.adm-row__time {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.adm-row__date {
  font-size: 11.5px;
  color: var(--text-muted);
}
.adm-row__actions { display: flex; gap: 6px; }
.adm-pill {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 0;
  display: grid; place-items: center;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease;
}
.adm-pill:hover { transform: scale(1.08); }
.adm-pill--ok {
  background: rgba(45,95,63,0.15);
  color: var(--primary);
}
.adm-pill--ok:hover { background: var(--primary); color: #fff; }
.adm-pill--no {
  background: rgba(214,122,142,0.15);
  color: #b54565;
}
.adm-pill--no:hover { background: #b54565; color: #fff; }

/* ───── LESSON CARDS in "Ближайшие уроки" ───── */
.adm-lesson {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.adm-lesson:last-child { border-bottom: 0; }
.adm-lesson__when {
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.adm-lesson__when.is-confirmed {
  background: linear-gradient(180deg, var(--primary) 0%, #234d33 100%);
  color: #fff;
}
.adm-lesson__time {
  font-family: 'Lora', serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}
.adm-lesson__day {
  font-size: 11px;
  text-transform: lowercase;
  opacity: 0.85;
}
.adm-lesson__loc {
  margin-top: 2px;
  font-size: 11px;
  opacity: 0.8;
}
.adm-lesson__main { min-width: 0; }
.adm-lesson__teacher {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.adm-lesson__sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}
.adm-status {
  display: inline-block;
  margin-top: 6px;
  font-size: 11.5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 500;
}
.adm-status--pending   { background: rgba(196,154,79,0.18); color: #8a6526; }
.adm-status--confirmed { background: rgba(45,95,63,0.15);   color: var(--primary); }
.adm-status--cancelled { background: rgba(214,122,142,0.15); color: #b54565; }
.adm-status--completed { background: rgba(0,0,0,0.06);      color: var(--text-muted); }

/* ───── RECENT ACTIVITY ───── */
.adm-activity__row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.adm-activity__row:last-child { border-bottom: 0; }
.adm-activity__icon {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: rgba(45,95,63,0.10);
  display: grid; place-items: center;
  color: var(--primary);
}
.adm-activity__icon svg { width: 18px; height: 18px; }
.adm-activity__title {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.adm-activity__sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
}
.adm-activity__when {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.adm-activity__when span {
  font-size: 13px;
  font-weight: 500;
}
.adm-activity__when small {
  font-size: 11px;
  color: var(--text-muted);
}

.adm-week-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
.adm-week-summary > div {
  min-height: 92px;
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(180deg, #fff 0%, #FBF7EE 100%);
  border: 1px solid var(--border);
}
.adm-week-summary span,
.adm-summary-strip__item span {
  display: block;
  font-size: 12.5px;
  color: var(--text-muted);
}
.adm-week-summary strong,
.adm-summary-strip__item strong {
  display: block;
  margin-top: 2px;
  font-family: 'Lora', serif;
  font-size: 30px;
  line-height: 1.1;
  color: var(--primary);
}
.adm-week-summary small,
.adm-summary-strip__item small {
  display: block;
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--text-soft);
}
.adm-week-bars {
  height: 152px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  align-items: end;
  padding-top: 8px;
}
.adm-week-bars__bar {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  align-items: end;
  text-align: center;
}
.adm-week-bars__bar i {
  width: 100%;
  height: var(--h, 8%);
  min-height: 10px;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, var(--primary) 0%, #0F7A5D 100%);
  box-shadow: 0 8px 18px rgba(45,95,63,0.16);
}
.adm-week-bars__bar:nth-child(6n) i,
.adm-week-bars__bar:nth-child(7n) i {
  background: linear-gradient(180deg, var(--gold-soft) 0%, var(--gold) 100%);
}
.adm-week-bars__bar small {
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-summary-strip {
  min-height: 118px;
  display: grid;
  grid-template-columns: 220px repeat(4, 1fr);
  align-items: stretch;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #0F5C45 0%, #073C2D 100%);
  color: #fff;
  box-shadow: 0 18px 42px rgba(15,92,69,0.22);
}
.adm-summary-strip__media {
  min-height: 118px;
  background:
    linear-gradient(90deg, rgba(7,60,45,0.1), rgba(7,60,45,0.76)),
    url('assets/images/arch-window.png') center/cover no-repeat;
}
.adm-summary-strip__item {
  padding: 20px 22px;
  border-left: 1px solid rgba(255,255,255,0.12);
}
.adm-summary-strip__item span,
.adm-summary-strip__item small {
  color: rgba(255,255,255,0.72);
}
.adm-summary-strip__item strong {
  color: #fff;
}

/* ───── SUB-PAGE NAV (back + tabs) ───── */
.adm-subnav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.adm-subnav__back {
  background: transparent;
  border: 0;
  color: var(--primary);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 0;
}
.adm-subnav__back:hover { text-decoration: underline; }
.adm-subnav__tabs {
  display: flex;
  gap: 6px;
  max-width: 100%;
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  scrollbar-width: none;
}
.adm-subnav__tabs::-webkit-scrollbar { display: none; }
.adm-subnav__tab {
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s ease, color 0.15s ease;
}
.adm-subnav__tab:hover { color: var(--primary); }
.adm-subnav__tab.is-active {
  background: var(--primary);
  color: #fff;
}

.admin-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 140;
  display: none;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.94);
  border-top: 1px solid var(--border);
  box-shadow: 0 -10px 30px rgba(31,46,37,0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.admin-bottom-nav button,
.admin-bottom-nav a {
  min-width: 0;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 16px;
  color: var(--text-muted);
  font: inherit;
}
.admin-bottom-nav svg {
  width: 22px;
  height: 22px;
}
.admin-bottom-nav span {
  max-width: 100%;
  font-size: 11px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-bottom-nav .is-active {
  color: var(--primary);
  background: rgba(45,95,63,0.08);
}

/* ───── MOBILE ───── */
@media (max-width: 900px) {
  .adm-metrics      { grid-template-columns: repeat(2, 1fr); }
  .adm-grid-2       { grid-template-columns: 1fr; }
  .adm-hero__inner  { padding: 24px 22px 20px; }
  .adm-hero__name   { font-size: 32px; }
  .adm-hero__bg     { opacity: 0.18; }
  .adm-screen-top {
    min-height: 150px;
    padding-bottom: 58px;
  }
  .adm-screen-top__title {
    font-size: 38px;
  }
  .adm-metrics--standalone {
    margin-top: -64px;
  }
  .adm-summary-strip {
    grid-template-columns: 1fr 1fr;
  }
  .adm-summary-strip__media {
    display: none;
  }
  .adm-summary-strip__item:nth-child(2n + 1) {
    border-left: 0;
  }
  .admin-bottom-nav {
    display: grid;
  }
}
@media (max-width: 520px) {
  .admin-app-header {
    padding-top: 14px;
  }
  .admin-app-brand__mark {
    width: 48px;
    height: 48px;
  }
  .admin-app-brand__mark img {
    width: 43px;
    height: 43px;
  }
  .admin-app-brand__name {
    font-size: 19px;
  }
  .admin-app-header__actions {
    gap: 8px;
  }
  .admin-round-btn {
    width: 46px;
    height: 46px;
  }
  .admin-round-btn svg {
    width: 21px;
    height: 21px;
  }
  .admin-round-btn--notify::after {
    top: 10px;
    right: 10px;
  }
  .admin-app-main {
    padding-top: 10px;
  }
  .adm-quick__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .adm-screen-top {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
  }
  .adm-screen-top__back {
    width: 48px;
    height: 48px;
  }
  .adm-screen-top__actions .admin-round-btn {
    width: 46px;
    height: 46px;
  }
  .adm-screen-top__title {
    align-self: center;
    font-size: 34px;
  }
  .adm-screen-top::before {
    left: 18%;
  }
  .adm-quick__tile {
    min-height: 92px;
    padding: 14px 8px;
  }
  .adm-quick__icon {
    width: 30px;
    height: 30px;
  }
  .adm-quick__label {
    font-size: 12.5px;
    line-height: 1.2;
  }
  .adm-week-summary {
    grid-template-columns: 1fr;
  }
  .adm-summary-strip {
    grid-template-columns: 1fr;
  }
  .adm-summary-strip__item {
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,0.12);
  }
  .adm-metrics--standalone {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .adm-card__head, .adm-card__body { padding-left: 16px; padding-right: 16px; }
  .adm-row {
    grid-template-columns: 40px 1fr;
    grid-template-areas:
      "ava main"
      ". when";
    gap: 6px 12px;
  }
  .adm-row__avatar  { grid-area: ava; }
  .adm-row__main    { grid-area: main; }
  .adm-row__when    { grid-area: when; text-align: left; flex-direction: row; gap: 6px; }
  .adm-row__actions { grid-column: 1 / -1; justify-content: flex-end; }
  .adm-lesson { grid-template-columns: 90px 1fr; }
}

/* =========================================================
   ADMIN — STUDENTS / CATALOG hero pages
   Matches reference mockup: hero with mosque + 4 metrics +
   action tiles + chip filters + search row + cards.
========================================================= */

/* Same hero applied as a sub-page header */
.adm-hero--page {
  margin-bottom: 18px;
}
.adm-hero--page .adm-hero__inner { padding-top: 28px; padding-bottom: 24px; }

/* Action tiles row — 2 or 3 large pill-shaped tiles */
.adm-action-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.adm-action-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  box-shadow: 0 2px 8px rgba(45,95,63,0.04);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.adm-action-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(45,95,63,0.10);
  border-color: rgba(45,95,63,0.30);
}
.adm-action-tile__icon {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(45,95,63,0.10);
  color: var(--primary);
  flex-shrink: 0;
}
.adm-action-tile__icon svg { width: 22px; height: 22px; }
.adm-action-tile__label {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}
.adm-action-tile__chev {
  font-size: 22px;
  color: var(--text-muted);
}

/* Chip-style filter tabs (Все / Активные / Новые / Архив) */
.adm-chip-tabs {
  display: flex;
  gap: 8px;
  margin: 4px 0 18px;
  flex-wrap: wrap;
}
.adm-chip-tabs--with-side {
  align-items: center;
  justify-content: space-between;
}
.adm-chip-tabs__main {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.adm-chip {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 22px;
  font: inherit;
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.adm-chip:hover { color: var(--primary); border-color: rgba(45,95,63,0.30); }
.adm-chip.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Search row with magnifier icon */
.adm-search-row {
  position: relative;
  margin-bottom: 18px;
}
.adm-search-row__icon {
  position: absolute;
  left: 18px; top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  opacity: 0.62;
  pointer-events: none;
}
.adm-search-row__icon svg { width: 100%; height: 100%; }
.adm-search-row__input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 13px 18px 13px 46px;
  font: inherit;
  font-size: 14.5px;
  outline: none;
  box-shadow: 0 1px 4px rgba(45,95,63,0.04);
}
.adm-search-row__input:focus { border-color: var(--primary); }
.adm-search-row--compact {
  margin-top: -2px;
}

/* Student cards */
.adm-stu-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.adm-stu-card {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1.3fr 1fr 1fr;
  gap: 14px 18px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 56px 18px 18px;   /* right padding leaves room for the kebab */
  box-shadow: 0 2px 8px rgba(45,95,63,0.04);
}
.adm-stu-card__avatar { width: 64px; height: 64px; }
.adm-stu-card__avatar .adm-initial { width: 64px; height: 64px; font-size: 24px; }
.adm-stu-card__name {
  margin: 0 0 6px;
  font-family: 'Lora', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.adm-stu-card__meta {
  margin: 0 0 2px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}
.adm-stu-card__teacher .adm-stu-card__meta-label {
  margin: 0 0 2px;
  font-size: 12px;
  color: var(--text-muted);
}
.adm-stu-card__teacher .adm-stu-card__meta-value {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.adm-stu-card__status {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}
.adm-stu-card__group {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}
.adm-stu-card__joined {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
}
.adm-stu-card__menu {
  position: absolute;
  top: 14px; right: 14px;
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 6px;
}
.adm-stu-card__menu:hover { background: var(--bg-alt); color: var(--text); }

/* Status dots used by both student and catalog cards */
.adm-status-dot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 500;
}
.adm-status-dot--on  { color: var(--primary); }
.adm-status-dot--off { color: #b88f30; }

/* Progress bar inside student / catalog cards */
.adm-progress {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(45,95,63,0.10);
  overflow: hidden;
}
.adm-progress__bar {
  width: var(--p, 0%);
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #C49A4F);
  border-radius: 999px;
}
.adm-progress__pct {
  position: absolute;
  right: 0; top: -18px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}

/* Catalog (teacher) cards */
.adm-cat-list { display: flex; flex-direction: column; gap: 12px; }
.adm-cat-card {
  display: grid;
  grid-template-columns: 64px 1fr 220px;
  gap: 14px 18px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 2px 8px rgba(45,95,63,0.04);
}
.adm-cat-card__avatar { width: 64px; height: 64px; }
.adm-cat-card__avatar .adm-initial { width: 64px; height: 64px; font-size: 24px; }
.adm-cat-card__name {
  margin: 0 0 4px;
  font-family: 'Lora', serif;
  font-size: 18px;
  font-weight: 700;
}
.adm-cat-card__meta {
  margin: 0 0 2px;
  font-size: 13px;
  color: var(--text-muted);
}
.adm-cat-card__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

/* Mobile responsive adjustments */
@media (max-width: 760px) {
  .adm-stu-card {
    grid-template-columns: 56px 1fr;
    grid-template-areas:
      "ava head"
      "tea tea"
      "sta sta";
    padding: 16px 16px 16px 16px;
  }
  .adm-stu-card__avatar  { grid-area: ava; }
  .adm-stu-card__avatar .adm-initial { width: 56px; height: 56px; font-size: 22px; }
  .adm-stu-card__head    { grid-area: head; }
  .adm-stu-card__teacher { grid-area: tea; }
  .adm-stu-card__status  { grid-area: sta; align-items: flex-start; text-align: left; flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .adm-cat-card {
    grid-template-columns: 56px 1fr;
    grid-template-areas:
      "ava main"
      "side side";
  }
  .adm-cat-card__avatar  { grid-area: ava; }
  .adm-cat-card__avatar .adm-initial { width: 56px; height: 56px; font-size: 22px; }
  .adm-cat-card__main    { grid-area: main; }
  .adm-cat-card__side    { grid-area: side; flex-direction: row; flex-wrap: wrap; align-items: center; }
}

/* =========================================================
   ADMIN — PROFILE PHOTO UPLOAD
========================================================= */
.profile-photo-card { position: relative; }
.profile-photo {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.profile-photo__circle {
  width: 96px; height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(45,95,63,0.10);
  display: grid; place-items: center;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.profile-photo__circle img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.profile-photo__initial {
  font-family: 'Lora', serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
}
.profile-photo__actions {
  display: flex; flex-direction: column; gap: 8px;
  align-items: flex-start;
}
.profile-photo__actions .btn { cursor: pointer; }

/* Avatar with photo (used in admin lists) */
.adm-initial--photo {
  padding: 0;
  overflow: hidden;
  background: transparent !important;
}
.adm-initial--photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* =========================================================
   ADMIN — CHATS PAGE
========================================================= */
.chat-list { display: flex; flex-direction: column; gap: 6px; }
.chat-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s ease;
  border: 1px solid transparent;
}
.chat-row.is-pinned {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(251,247,238,0.92));
  border-color: var(--border-strong);
  box-shadow: 0 10px 28px rgba(31,46,37,0.06);
}
.chat-row:hover {
  background: var(--bg-alt);
  border-color: var(--border);
}
.chat-row__avatar { width: 52px; height: 52px; }
.chat-row__avatar .adm-initial { width: 52px; height: 52px; font-size: 20px; }
.chat-row__name {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.chat-row__role {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 6px;
}
.chat-row__pin {
  display: inline-flex;
  margin-bottom: 4px;
  font-size: 12px;
  color: #9A7228;
}
.chat-row__last {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 540px;
}
.chat-row__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
  min-width: 60px;
}
.chat-row__time, .chat-row__date {
  font-size: 12px;
  color: var(--text-muted);
}
.chat-row__unread {
  display: inline-grid;
  place-items: center;
  min-width: 22px; height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.adm-floating-action {
  position: sticky;
  float: right;
  right: 0;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 14px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), #0F6F54);
  color: #fff;
  box-shadow: 0 14px 32px rgba(45,95,63,0.24);
  font-weight: 700;
}
.adm-floating-action svg {
  width: 22px;
  height: 22px;
}

/* Chat modal — overlay messenger view */
.chat-modal {
  position: fixed; inset: 0; z-index: 999;
  display: flex; justify-content: flex-end;
}
.chat-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(20,30,25,0.30);
  backdrop-filter: blur(2px);
}
.chat-modal__card {
  position: relative;
  width: 480px; max-width: 100%;
  background: var(--bg);
  display: flex; flex-direction: column;
  box-shadow: -8px 0 30px rgba(0,0,0,0.20);
  animation: chatModalIn 0.18s ease-out;
}
@keyframes chatModalIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.chat-modal.is-leaving .chat-modal__card { animation: chatModalOut 0.18s ease-in forwards; }
@keyframes chatModalOut { to { transform: translateX(20px); opacity: 0; } }
.chat-modal__head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.chat-modal__close {
  background: transparent;
  border: 0;
  font-size: 22px;
  cursor: pointer;
  color: var(--primary);
  padding: 4px 8px;
  border-radius: 8px;
}
.chat-modal__close:hover { background: var(--bg-alt); }
.chat-modal__avatar { width: 40px; height: 40px; }
.chat-modal__avatar .adm-initial { width: 40px; height: 40px; font-size: 16px; }
.chat-modal__title strong { display: block; font-size: 15px; }
.chat-modal__title small  { font-size: 11.5px; color: var(--text-muted); }
.chat-modal__body {
  flex: 1; overflow-y: auto;
  padding: 18px 16px;
  display: flex; flex-direction: column; gap: 6px;
  background: linear-gradient(180deg, #FBF7EE 0%, #F2EBE0 100%);
}
.chat-day {
  align-self: center;
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.65);
  padding: 3px 12px;
  border-radius: 999px;
  margin: 8px 0;
}
.chat-msg {
  display: flex; flex-direction: column;
  align-items: flex-start;
  max-width: 75%;
  gap: 2px;
}
.chat-msg--mine {
  align-self: flex-end;
  align-items: flex-end;
}
.chat-msg__bubble {
  background: #fff;
  padding: 9px 13px;
  border-radius: 14px 14px 14px 4px;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-msg--mine .chat-msg__bubble {
  background: var(--primary);
  color: #fff;
  border-radius: 14px 14px 4px 14px;
}
.chat-msg__time {
  font-size: 10.5px;
  color: var(--text-muted);
  padding: 0 6px;
}
.chat-modal__send {
  display: flex; gap: 8px; align-items: flex-end;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--card);
}
.chat-modal__send textarea {
  flex: 1;
  resize: none;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px;
  font: inherit;
  font-size: 14px;
  outline: none;
  min-height: 38px; max-height: 140px;
  line-height: 1.4;
}
.chat-modal__send textarea:focus { border-color: var(--primary); }

@media (max-width: 540px) {
  .chat-modal__card { width: 100%; }
}

/* =========================================================
   ADMIN — GROUPS PAGE
========================================================= */
.grp-list { display: flex; flex-direction: column; gap: 12px; }
.grp-card {
  position: relative;
  display: grid;
  grid-template-columns: 86px 1fr auto;
  gap: 18px;
  align-items: center;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.78);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(31,46,37,0.06);
}
.grp-card__icon {
  width: 86px; height: 86px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #2D5F3F 0%, #1F4530 100%);
  color: #F2EBE0;
  border: 6px solid rgba(242,235,224,0.9);
  box-shadow: 0 12px 28px rgba(45,95,63,0.18);
}
.grp-glyph {
  font-family: 'Lora', serif;
  font-size: 26px;
  font-weight: 700;
}
.grp-card__row1 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.grp-card__title {
  margin: 0;
  font-family: 'Lora', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.grp-card__pill {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(196,154,79,0.15);
  color: #8a6526;
}
.grp-card__meta {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
}
.grp-card__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 7px 16px;
  margin-top: 10px;
  color: var(--primary);
}
.grp-card__facts span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 13px;
  color: var(--text-muted);
}
.grp-card__facts svg {
  width: 17px;
  height: 17px;
  color: var(--primary);
  flex: 0 0 auto;
}
.grp-card__more {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-muted);
}
.grp-card__more:hover {
  background: var(--bg-alt);
  color: var(--primary);
}
.grp-card__more svg {
  width: 18px;
  height: 18px;
}

/* =========================================================
   ADMIN — ATTENDANCE
========================================================= */
.att-list { display: flex; flex-direction: column; gap: 8px; }
.att-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}
.att-row.is-yes     { border-left: 3px solid var(--primary); }
.att-row.is-no      { border-left: 3px solid #b54565; }
.att-row.is-pending { border-left: 3px solid #C49A4F; }
.att-row__time {
  display: flex; flex-direction: column;
  align-items: center;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
  gap: 2px;
}
.att-row__date {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.att-row__hour {
  font-family: 'Lora', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}
.att-row__title {
  margin: 0 0 3px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}
.att-row__meta {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
}
.att-row__actions {
  display: flex; gap: 6px; align-items: center;
}
.att-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
}
.att-badge--yes { background: rgba(45,95,63,0.15); color: var(--primary); }
.att-badge--no  { background: rgba(214,122,142,0.15); color: #b54565; }

@media (max-width: 640px) {
  .att-row { grid-template-columns: 60px 1fr; }
  .att-row__actions { grid-column: 1 / -1; flex-wrap: wrap; }
  .grp-card { grid-template-columns: 60px 1fr; }
  .grp-card__icon { width: 60px; height: 60px; }
  .grp-card__more { position: absolute; right: 12px; top: 12px; }
  .grp-card__facts { grid-template-columns: 1fr; }
}

/* =========================================================
   ADMIN — REPORTS / CHARTS (pure SVG, no library)
========================================================= */
.cx-chart { width: 100%; height: 240px; display: block; }
.cx-line  { fill: none; stroke: var(--primary); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.cx-grid  { stroke: rgba(0,0,0,0.06); stroke-dasharray: 3 3; }
.cx-axis  { font-size: 10px; fill: var(--text-muted); text-anchor: middle; }
.cx-axis--y { text-anchor: end; }
.cx-dot   { fill: #fff; stroke: var(--primary); stroke-width: 1.8; cursor: pointer; }
.cx-dot:hover { fill: var(--primary); }

/* Donut */
.cx-donut-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 8px 0;
}
.cx-donut { width: 160px; height: 160px; flex-shrink: 0; }
.cx-donut-num {
  font-family: 'Lora', serif;
  font-size: 22px;
  font-weight: 700;
  fill: var(--primary);
  text-anchor: middle;
}
.cx-donut-lbl {
  font-size: 10px;
  fill: var(--text-muted);
  text-anchor: middle;
  text-transform: uppercase;
}
.cx-legend {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.cx-leg-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

/* Bars */
.cx-bars { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.cx-bar {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  align-items: center;
  gap: 10px;
}
.cx-bar__name {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cx-bar__track {
  background: rgba(0,0,0,0.05);
  border-radius: 999px;
  overflow: hidden;
  height: 10px;
}
.cx-bar__fill {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
}
.cx-bar__num {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-align: right;
  min-width: 30px;
}

@media (max-width: 540px) {
  .cx-donut-wrap { flex-direction: column; align-items: flex-start; }
  .cx-bar { grid-template-columns: 90px 1fr auto; }
}
