/* ═══════════════════════════════════════════════════════════════
   YOGASPACE — SHARED LAYOUT SYSTEM
   Include BEFORE page-specific <style> blocks.
   Provides: fonts, design tokens, base reset, nav, footer, containers.
═══════════════════════════════════════════════════════════════ */

/* ═══ FONTS (single source of truth) ═══ */
/* Google Fonts loaded via <link> in HTML <head> for parallel fetching */

/* ═══ DESIGN TOKENS ═══ */
:root {
  --bg: #FAF8F5;
  --bg-card: #FFFFFF;
  --bg-warm: #F5F0EB;
  --text-primary: #1A1A18;
  --text-secondary: #5C574E;
  --text-tertiary: #6B665D;
  --accent: #D4594E;
  --accent-hover: #C04A40;
  --accent-light: rgba(212, 89, 78, 0.07);
  --border: #E8E5DE;
  --border-hover: #D0CCC4;
  --gold: #E2A83E;
  --gold-light: rgba(226,168,62,0.08);
  --green: #5B9A6B;
  --green-light: rgba(91,154,107,0.08);
  --green-border: rgba(91,154,107,0.25);
  --green-soft: rgba(91,154,107,0.12);
  --accent-glow: rgba(212,89,78,0.15);
  --accent-border: rgba(212, 89, 78, 0.3);
  --blue: #5B7BA4;
  --blue-light: rgba(91,123,164,0.08);
  --sent-bg: #D4594E;
  --sent-text: #fff;
  --recv-bg: #FFFFFF;
  --recv-text: var(--text-primary);
  --shadow-soft: 0 1px 3px rgba(26,26,24,0.04), 0 6px 24px rgba(26,26,24,0.06);
  --shadow-elevated: 0 2px 8px rgba(26,26,24,0.05), 0 16px 48px rgba(26,26,24,0.08);
  --shadow-card: 0 1px 2px rgba(26,26,24,0.04), 0 8px 32px rgba(26,26,24,0.06);
  --shadow-toast: 0 8px 32px rgba(26,26,24,0.2);
  --shadow-modal: 0 24px 80px rgba(26,26,24,0.15);
  --shadow-sticky: 0 -4px 24px rgba(26,26,24,0.06);
  --shadow-accent-sm: 0 1px 4px rgba(212,89,78,0.1);
  --shadow-accent-md: 0 4px 12px rgba(212,89,78,0.2);
  --shadow-accent-glow: 0 2px 8px rgba(212,89,78,0.12);
  --shadow-avatar: 0 0 0 2px var(--bg-card), 0 0 0 3px rgba(212,89,78,0.06);
  --shadow-avatar-warm: 0 0 0 2px var(--bg-warm), 0 0 0 3px rgba(212,89,78,0.08);
  --shadow-toggle: 0 1px 4px rgba(0,0,0,0.15);
  --shadow-green-dot: 0 0 0 2px rgba(91,154,107,0.2);
  --radius: 14px;
  --radius-lg: 20px;
  --radius-sm: 10px;
  --radius-pill: 100px;
  --radius-circle: 50%;
  --radius-xs: 4px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  /* Duration tokens for animations */
  --duration-fast: 0.2s;
  --duration-normal: 0.35s;
  --duration-slow: 0.5s;
  --duration-reveal: 0.6s;
  --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-sans: 'DM Sans', -apple-system, sans-serif;
  /* Line-height scale */
  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;
  /* Letter-spacing scale */
  --letter-tight: -0.01em;
  --letter-normal: 0.01em;
  --letter-wide: 0.04em;
  --noise-texture: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.4'/%3E%3C/svg%3E");
  /* Type scale — use these for new work; legacy sizes will be migrated over time */
  --text-xs:   0.72rem;
  --text-sm:   0.82rem;
  --text-base: 0.92rem;
  --text-md:   1.1rem;
  --text-lg:   1.5rem;
  --text-xl:   2.4rem;
  /* Spacing scale */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  12px;
  --space-lg:  16px;
  --space-xl:  24px;
  --space-2xl: 32px;
  --space-3xl: 48px;
  --space-4xl: 64px;
}

/* ═══ BASE RESET ═══ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-y: scroll; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-xs); }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
button { font-family: var(--font-sans); cursor: pointer; }
/* ═══ SKIP NAVIGATION ═══ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 16px;
  outline: 2.5px solid var(--text-primary);
  outline-offset: 3px;
}

/* ═══ FOCUS VISIBLE — keyboard navigation ═══ */
:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Cards and larger interactive surfaces need a softer ring */
.teacher-card:focus-visible,
.type-card:focus-visible,
.class-card:focus-visible,
.saved-card:focus-visible,
.session-card:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--accent-light);
}

/* Buttons that already have custom box-shadow states */
.btn-book:focus-visible,
.btn--primary:focus-visible,
.nav__btn--accent:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--accent);
}

/* Universal focus ring for inputs — components may override with their own styles */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}



/* ═══ SCREEN READER ONLY ═══ */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ═══ NAV (hub pages) ═══ */
.nav {
  position: sticky;
  top: 0; z-index: 100;
  padding: 0 48px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(250, 248, 245, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
/* Nav variants */
.nav--warm { padding: 0 32px; background: var(--bg-warm); backdrop-filter: none; -webkit-backdrop-filter: none; }
.nav--centered { padding: 0 32px; background: var(--bg-warm); backdrop-filter: none; -webkit-backdrop-filter: none; justify-content: center; }
.nav--onboarding { padding: 0 24px; background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
/* Back button (used in nav--warm pages) */
.nav__back { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--text-secondary); background: none; border: none; cursor: pointer; font-weight: 500; transition: color var(--transition); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.nav__back:hover { color: var(--text-primary); text-decoration-color: var(--text-tertiary); }

.nav__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav__logo-text { font-family: var(--font-serif); font-size: 1.2rem; letter-spacing: -0.02em; color: var(--text-primary); }
.nav__actions { display: flex; align-items: center; gap: 8px; visibility: hidden; }
.nav__actions--ready { visibility: visible; }
.nav__btn {
  padding: 12px 18px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
  letter-spacing: 0.01em;
}
.nav__btn:hover { background: rgba(26,26,24,0.04); color: var(--text-primary); }
.nav__btn--active { color: var(--accent); background: var(--accent-light); }
.nav__btn--accent {
  background: var(--accent); color: #fff; border: none;
  font-weight: 600; letter-spacing: 0.02em;
  box-shadow: var(--shadow-accent-sm);
}
.nav__btn--accent:hover { background: var(--accent-hover); color: #fff; box-shadow: var(--shadow-accent-md); transform: translateY(-1px); }
.nav__btn--accent:active { transform: translateY(0); }
.nav__avatar {
  width: 44px; height: 44px; border-radius: var(--radius-circle);
  padding: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 0.82rem; color: #fff;
  cursor: pointer; flex-shrink: 0;
  transition: box-shadow var(--transition), transform var(--transition);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--border);
}
.nav__avatar:hover { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--accent); transform: scale(1.06); }
.nav__avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-circle); }

/* Avatar dropdown */
.nav__avatar-wrap { position: relative; }
.nav__badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: #B84840; color: #fff;
  border-radius: var(--radius-pill); border: 2px solid var(--bg);
  font-family: var(--font-sans); font-size: 0.7rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.nav__dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 220px; padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(26,26,24,0.1), 0 2px 8px rgba(26,26,24,0.04);
  opacity: 0; visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 150;
}
.nav__dropdown--open { opacity: 1; visibility: visible; transform: translateY(0); }
.nav__dropdown-item {
  display: block; width: 100%;
  padding: 10px 14px;
  font-size: 0.82rem; font-weight: 400;
  color: var(--text-secondary);
  border-radius: var(--radius-sm); border: none; background: none;
  text-align: left; cursor: pointer;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.nav__dropdown-item:hover { background: var(--bg-warm); color: var(--text-primary); }
.nav__dropdown-item--active { color: var(--accent); font-weight: 500; }
.nav__dropdown-item--logout { color: var(--accent); }
.nav__dropdown-item--logout:hover { background: var(--accent-light); }
.nav__dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* Mobile: logout button style */
.nav__btn--logout { color: var(--accent); }

/* Mobile toggle — hidden on desktop */
.nav__mobile-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none; border: none;
  align-items: center; justify-content: center;
  color: var(--text-primary); cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  flex-shrink: 0; margin-left: 4px;
}
.nav__mobile-toggle:hover { background: rgba(26,26,24,0.04); }

/* Mobile overlay — bottom sheet pattern (thumb-friendly) */
.nav__mobile-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(26,26,24,0.3);
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.nav__mobile-overlay--open { opacity: 1; visibility: visible; }

.nav__mobile-panel {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--bg-card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-sticky);
  padding: 8px 16px 32px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav__mobile-overlay--open .nav__mobile-panel { transform: translateY(0); }

/* Handle bar */
.nav__mobile-panel::before {
  content: '';
  display: block;
  width: 32px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 8px auto 16px;
}

.nav__mobile-panel .nav__btn--item {
  display: flex; align-items: center; width: 100%;
  padding: 14px 16px; min-height: 48px;
  border-radius: var(--radius);
  font-size: 0.92rem; font-weight: 500;
  color: var(--text-primary); background: none; border: none;
  text-align: left; cursor: pointer;
  transition: background var(--transition);
}
.nav__mobile-panel .nav__btn--item:hover { background: var(--bg-warm); }
.nav__mobile-panel .nav__btn--active { color: var(--accent); background: var(--accent-light); }
.nav__mobile-panel .nav__btn--accent {
  background: var(--accent); color: #fff;
  justify-content: center; margin-top: 8px;
  border-radius: var(--radius); font-weight: 600;
  box-shadow: var(--shadow-accent-sm);
}

/* ═══ CONTAINERS ═══ */
.container       { max-width: 1100px; margin: 0 auto; padding: 32px 48px 80px; }
.container--narrow { max-width: 960px; }
.container--wide   { max-width: 1400px; }

/* ═══ FOOTER ═══ */
.footer { padding: 64px 48px 40px; border-top: 1px solid var(--border); }
.footer__top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 48px;
}
.footer__brand-desc {
  font-size: 0.86rem; color: var(--text-secondary);
  line-height: 1.7; max-width: 280px; margin-top: 16px; font-weight: 300;
}
.footer__col-title {
  font-weight: 600; font-size: 0.75rem; color: var(--text-primary);
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 16px;
}
.footer__links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer__link {
  font-size: 0.86rem; color: var(--text-secondary);
  transition: color var(--transition); font-weight: 400;
  padding: 2px 0;
}
.footer__link:hover { color: var(--text-primary); }
.footer__bottom {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding-top: 32px; border-top: 1px solid var(--border); text-align: center;
}
.footer__legal { display: flex; gap: 24px; justify-content: center; }
.footer__legal a {
  font-size: 0.78rem; color: var(--text-tertiary);
  transition: color var(--transition); font-weight: 400;
}
.footer__legal a:hover { color: var(--text-primary); }
.footer__copy { font-size: 0.78rem; color: var(--text-tertiary); margin-top: 4px; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 900px) {
  .nav { padding: 0 24px; }
  .nav__mobile-toggle { display: flex; }
  .nav__actions { margin-left: auto; gap: 0; }
  .nav__actions .nav__btn--item { display: none; }
  .nav__avatar-wrap { display: none; }
  .container { padding: 24px 24px 64px; }
  .footer { padding: 48px 24px 32px; }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer__brand-desc { max-width: none; }
  .footer__link { padding: 4px 0; }
}
@media (max-width: 600px) {
  .nav { padding: 0 16px; height: 60px; }
  .container { padding: 20px 16px 56px; }

  /* Footer — compact accordion on mobile */
  .footer { padding: 32px 16px 32px; }
  .footer__top { grid-template-columns: 1fr; gap: 0; margin-bottom: 32px; }

  /* Brand section — always visible, compact */
  .footer__top > div:first-child { padding-bottom: 24px; border-bottom: 1px solid var(--border); }
  .footer__brand-desc { font-size: 0.82rem; margin-top: 12px; }

  /* Link columns — accordion: title visible, links collapsed */
  .footer__top > div:not(:first-child) { border-bottom: 1px solid var(--border); }
  .footer__top > div:last-child { border-bottom: none; }

  .footer__col-title {
    margin-bottom: 0;
    padding: 16px 0;
    cursor: pointer;
    display: flex; align-items: center; justify-content: space-between;
    -webkit-tap-highlight-color: transparent;
  }
  .footer__col-title::after {
    content: '+';
    font-size: 1.1rem; font-weight: 400; color: var(--text-tertiary);
    transition: transform 0.2s ease;
  }
  .footer__col-title--open::after { content: '\2212'; }

  .footer__links {
    max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0;
  }
  .footer__links--open { max-height: 240px; padding-bottom: 16px; }

  .footer__link { padding: 8px 0; font-size: 0.88rem; }

  /* Bottom bar */
  .footer__bottom { gap: 8px; padding-top: 24px; }
}

/* ═══ REUSABLE AVATAR ═══ */
.avatar {
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-circle); overflow: hidden;
  font-family: var(--font-serif); color: #fff;
  flex-shrink: 0;
}
.avatar--sm  { width: 32px; height: 32px; font-size: 0.72rem; }
.avatar--md  { width: 44px; height: 44px; font-size: 0.82rem; }
.avatar--lg  { width: 64px; height: 64px; font-size: 1.1rem; }
.avatar--xl  { width: 96px; height: 96px; font-size: 1.5rem; }
.avatar--gradient { background: linear-gradient(145deg, #D4594E, #E88A83); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ═══ INTERACTIVE STATES ═══ */
.is-hoverable {
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}
.is-hoverable:hover {
  background: rgba(26, 26, 24, 0.04);
}
.is-hoverable:active {
  transform: scale(0.98);
}

/* Card hover — elevated feel */
.card-hover {
  transition: transform var(--transition), box-shadow var(--transition);
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}
.card-hover:active {
  transform: translateY(0);
}

/* Selected state — accent ring */
.is-selected {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: var(--accent-light);
}

/* ═══ BUTTON SYSTEM ═══ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 24px;
  font-family: var(--font-sans); font-size: 0.88rem; font-weight: 500;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  letter-spacing: 0.01em;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--accent); color: #fff;
  position: relative; overflow: hidden;
}
.btn--primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.1), transparent);
  pointer-events: none;
}
.btn--primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(212,89,78,0.25);
  transform: translateY(-1px);
}
.btn--primary:active { transform: translateY(0); }

/* Size modifiers */
.btn--lg { padding: 16px 36px; font-size: 0.95rem; font-weight: 600; box-shadow: var(--shadow-accent-glow); }
.btn--full { width: 100%; }

.btn--secondary {
  background: var(--bg-card); color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn--secondary:hover {
  border-color: var(--border-hover);
  background: rgba(26,26,24,0.02);
}

.btn--ghost {
  background: none; color: var(--text-secondary);
}
.btn--ghost:hover {
  background: rgba(26,26,24,0.04); color: var(--text-primary);
}

.btn--sm { padding: 6px 16px; font-size: 0.82rem; }
.btn--xs { padding: 7px 16px; font-size: 0.72rem; }
.btn--danger {
  background: none; color: var(--accent);
  border: 1px solid rgba(212,89,78,0.25);
}
.btn--danger:hover { background: var(--accent-light); border-color: var(--accent); }

/* ═══ FORM FIELD SYSTEM ═══ */
.field__label {
  display: block; font-size: 0.82rem; font-weight: 500;
  margin-bottom: 6px; color: var(--text-primary); letter-spacing: 0.02em;
}
.field__label--required::after { content: ' *'; color: var(--accent); font-weight: 400; }
.field__input {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-card); font-family: var(--font-sans);
  font-size: 0.9rem; color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field__input::placeholder { color: var(--text-tertiary); font-weight: 300; }
.field__input:hover { border-color: var(--border-hover); }
.field__input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.field__input--error { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-light) !important; }
textarea.field__input { min-height: 100px; resize: vertical; line-height: 1.6; }
.password-wrapper .field__input { padding-right: 48px; }
.field__error { font-size: 0.74rem; color: var(--accent); margin-top: 5px; display: none; align-items: center; gap: 4px; }
.field__error--visible { display: flex; }
.field__hint { font-size: 0.74rem; color: var(--text-tertiary); margin-top: 4px; }

/* ═══ STYLED SELECT ═══ */
.select-styled {
  appearance: none; background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 36px 9px 14px;
  font-family: var(--font-sans); font-size: 0.84rem; font-weight: 500; color: var(--text-primary);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.5 3.75L5 6.25L7.5 3.75' stroke='%235C574E' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.select-styled:hover { border-color: var(--border-hover); }
.select-styled:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

/* ═══ CHIP / PILL SYSTEM ═══ */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  font-size: 0.82rem; font-weight: 500;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.chip:hover {
  border-color: var(--border-hover); color: var(--text-primary);
  background: rgba(26,26,24,0.02);
}
.chip--active,
.chip[aria-checked="true"],
.chip[aria-pressed="true"] {
  background: var(--accent-light); color: var(--accent);
  border-color: rgba(212,89,78,0.3);
}

/* ═══ RESPONSIVE HEADING SCALES ═══ */
.heading-xl { font-family: var(--font-serif); font-size: clamp(2rem, 4.5vw, 3.5rem); line-height: 1.15; letter-spacing: -0.02em; }
.heading-lg { font-family: var(--font-serif); font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1.2; letter-spacing: -0.015em; }
.heading-md { font-family: var(--font-serif); font-size: clamp(1.2rem, 2vw, 1.6rem); line-height: 1.25; letter-spacing: -0.01em; }
.heading-sm { font-family: var(--font-sans); font-size: clamp(0.95rem, 1.2vw, 1.1rem); line-height: 1.3; font-weight: 600; }

/* ═══ OFFLINE BANNER ═══ */
.offline-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: var(--accent); color: #fff; text-align: center;
  padding: 8px 16px; font-size: .82rem; font-weight: 500;
  transform: translateY(-100%); transition: transform .3s ease;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.offline-banner--visible { transform: translateY(0); }
.offline-banner__icon { flex-shrink: 0; }

/* ═══ TOAST NOTIFICATIONS ═══ */
.toast-container {
  position: fixed; top: 80px; right: 24px; z-index: 9000;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-elevated);
  font-size: 0.88rem; font-weight: 400; color: var(--text-primary);
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
  max-width: 380px;
}
.toast--visible {
  transform: translateX(0);
  opacity: 1;
}
.toast--success { border-left: 3px solid var(--green); }
.toast--error   { border-left: 3px solid var(--accent); }
.toast--info    { border-left: 3px solid var(--blue); }
.toast__icon {
  flex-shrink: 0; width: 20px; height: 20px;
}
.toast__icon--success { color: var(--green); }
.toast__icon--error   { color: var(--accent); }
.toast__icon--info    { color: var(--blue); }
.toast__msg { flex: 1; line-height: 1.4; }
.toast__close {
  flex-shrink: 0; width: 24px; height: 24px;
  background: none; border: none; cursor: pointer;
  color: var(--text-tertiary); border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.toast__close:hover { background: rgba(26,26,24,0.06); color: var(--text-primary); }
@media (max-width: 600px) {
  .toast-container { top: auto; bottom: 24px; right: 16px; left: 16px; }
  .toast { max-width: none; transform: translateY(120%); }
  .toast--visible { transform: translateY(0); }
}

/* ═══ SKELETON LOADING ═══ */
@keyframes shimmer { 0%,100%{opacity:.5} 50%{opacity:1} }
.skeleton { background: var(--border); border-radius: var(--radius-sm); animation: shimmer 1.4s ease infinite; display: inline-block; }

/* ═══ MOBILE TOUCH TARGETS & OVERFLOW ═══ */
@media (max-width: 600px) {
  .chip { min-height: 44px; display: inline-flex; align-items: center; }
  .btn--sm { min-height: 44px; }
  .field__input, .field__select { min-height: 44px; }
  body { overflow-wrap: break-word; word-break: break-word; }
}

/* ═══ DARK MODE (OS preference only) ═══ */
/* Manual toggle can be added in a future iteration */
@media (prefers-color-scheme: dark) {
  :root {
    /* --noise-texture: unchanged — opacity-based SVG works in both modes */
    --bg:           #1A1916;
    --bg-card:      #242220;
    --bg-warm:      #2A2824;
    --text-primary: #F5F2EE;
    --text-secondary: #C5BDB2;
    --text-tertiary:  #A8A298;
    --border:         #2E2C28;
    --border-hover:   #3A3834;
    --accent-light:   rgba(212, 89, 78, 0.16);
    --green-light:    rgba(91, 154, 107, 0.12);
    --gold-light:     rgba(226, 168, 62, 0.10);
    --blue-light:     rgba(91, 123, 164, 0.12);
    --shadow-soft:    0 1px 3px rgba(0,0,0,0.2), 0 6px 24px rgba(0,0,0,0.25);
    --shadow-elevated: 0 2px 8px rgba(0,0,0,0.25), 0 16px 48px rgba(0,0,0,0.3);
    --shadow-card:    0 1px 2px rgba(0,0,0,0.2), 0 8px 32px rgba(0,0,0,0.25);
    --sent-bg:        #C04A40;
    --recv-bg:        #2A2824;
    --recv-text:      var(--text-primary);
    --accent-glow:    rgba(212,89,78,0.25);
    --accent-border:  rgba(212, 89, 78, 0.4);
    --green-border:   rgba(91,154,107,0.35);
    --green-soft:     rgba(91,154,107,0.18);
    --red-light:      rgba(212,89,78,0.15);
  }

  .select-styled {
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.5 3.75L5 6.25L7.5 3.75' stroke='%238A847C' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  }

  .avatar--gradient { background: linear-gradient(145deg, #C04A40, #D4594E); }
  .skip-link { background: var(--accent-hover); }
  .toast { background: var(--bg-card); border-color: var(--border); }

  .nav__logo svg circle { opacity: 0.35; }
  .nav { background: rgba(26, 25, 22, 0.92) !important; border-bottom-color: rgba(255,255,255,0.06); }

  .visual-panel__bg {
    background:
      radial-gradient(ellipse 120% 80% at 20% 90%, rgba(212,89,78,0.1) 0%, transparent 60%),
      linear-gradient(175deg, #242018 0%, #1E1C18 100%);
  }

  ::-webkit-scrollbar-thumb { background: var(--border); }

  /* Dim light-colored card backgrounds in dark mode */
  .teacher-card__img-bg { opacity: 0.25; }
  .cert-item__thumb, .cert-preview-wrap { background: var(--bg-warm); }

  /* Toggle switches */
  .toggle__thumb { background: var(--text-primary) !important; }

  /* Crop ring */
  .crop-area__ring { border-color: rgba(255,255,255,.3) !important; }
}

/* ═══ SHARED DATE PICKER ═══ */
.dp-wrap{padding:20px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);margin-bottom:16px}
.date-nav{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.date-nav__label{font-size:.86rem;font-weight:500;color:var(--text-primary)}
.date-arrow{width:38px;height:38px;border-radius:var(--radius-circle);border:1px solid var(--border);background:var(--bg-card);display:flex;align-items:center;justify-content:center;color:var(--text-secondary);cursor:pointer;transition:all var(--transition)}
.date-arrow:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-light)}

.days-row{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin-bottom:16px}
.day-cell{text-align:center;padding:10px 4px;border-radius:var(--radius);cursor:pointer;transition:all var(--transition);border:1.5px solid transparent}
.day-cell:hover{background:var(--bg-warm);border-color:var(--border)}
.day-cell--selected{border-color:var(--accent);background:var(--accent-light)}
.day-cell--selected .day-cell__dow{color:var(--accent)}
.day-cell--selected .day-cell__num{color:var(--accent)}
.day-cell--selected .day-cell__dot{background:var(--accent)}
.day-cell--today .day-cell__num{color:var(--accent);font-weight:600}
.day-cell--disabled{opacity:.25;pointer-events:none}
.day-cell__dow{font-size:.68rem;color:var(--text-tertiary);font-weight:500;text-transform:uppercase;letter-spacing:.03em;display:block;margin-bottom:4px;transition:color var(--transition)}
.day-cell__num{font-size:.88rem;font-weight:500;color:var(--text-primary);display:block;transition:color var(--transition)}
.day-cell__dot{width:6px;height:6px;border-radius:50%;background:#5B9A6B;margin:6px auto 0;display:none;transition:background var(--transition)}
.day-cell--has-slots .day-cell__dot{display:block}

.slots-area{padding-top:14px;border-top:1px solid var(--border);margin-bottom:4px}
.slots-area__label{font-size:.78rem;color:var(--text-secondary);margin-bottom:10px;font-weight:500}
.slots-grid{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}
.slot{padding:8px 18px;background:var(--bg-card);border:1.5px solid var(--border);border-radius:var(--radius-pill);font-size:.82rem;font-weight:400;color:var(--text-secondary);cursor:pointer;transition:all var(--transition)}
.slot:hover{border-color:var(--accent);color:var(--accent);background:var(--bg-card);transform:translateY(-1px)}
.slot--selected{background:var(--accent-light);color:var(--accent);border-color:var(--accent);font-weight:500}
.slot--selected:hover{background:var(--accent-light);color:var(--accent);border-color:var(--accent);transform:translateY(-1px)}

/* ═══ PAGE ENTRANCE ANIMATIONS ═══ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up    { opacity: 0; animation: fadeUp 0.5s ease-out forwards; }
.stagger-1  { opacity: 0; animation: fadeUp 0.5s ease-out 0.10s forwards; }
.stagger-2  { opacity: 0; animation: fadeUp 0.5s ease-out 0.20s forwards; }
.stagger-3  { opacity: 0; animation: fadeUp 0.5s ease-out 0.30s forwards; }
.stagger-4  { opacity: 0; animation: fadeUp 0.5s ease-out 0.40s forwards; }
.stagger-5  { opacity: 0; animation: fadeUp 0.5s ease-out 0.50s forwards; }
.stagger-6  { opacity: 0; animation: fadeUp 0.5s ease-out 0.60s forwards; }

/* ═══ REDUCED MOTION ═══ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
