/* ============================================================
   Gradia — Design System v5  (Papillon-inspired)
   Typographie : Outfit (display) + DM Sans (body)
   Thème : Light mode — Ultra-soft, rounded, minimal
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Outfit:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ─── Tokens ────────────────────────────────────────────────── */
:root {
  /* Surfaces — clean & airy */
  --bg:          #F5F5F4;
  --surface:     #FFFFFF;
  --surface-2:   #F0EFEE;
  --navy-card:   #FFFFFF;
  --navy-mid:    #F5F5F4;
  --navy-raised: #ECEAE9;
  --navy-light:  #D6D3D1;
  --navy:        #F5F5F4;

  /* Brand — Papillon-style teal */
  --emerald:      #29947A;
  --emerald-dim:  #1F7A64;
  --emerald-pale: #EBF7F4;
  --emerald-glow: rgba(41,148,122,0.08);
  --emerald-ring: rgba(41,148,122,0.18);
  --indigo:       #6366F1;
  --blue:         #3B82F6;
  --violet:       #8B5CF6;

  /* Warm cream palette (Papillon-inspired, shared across pages) */
  --cream:      #FCF9F4;
  --cream-soft: #F7F3EC;
  --line-warm:  #EAE6DE;
  --teal-pale:  #E4F2EE;

  /* Text */
  --white:       #FFFFFF;
  --off-white:   #F5F5F4;
  --text:        #44403C;
  --text-bright: #1C1917;
  --muted:       #8C877F;

  /* Semantic */
  --danger:      #EF4444;
  --warning:     #E8B048;
  --success:     #29947A;

  /* Borders — ultra-subtle */
  --border:    rgba(0,0,0,0.06);
  --border-hi: rgba(0,0,0,0.10);

  /* Radii — Papillon-style generous rounding */
  --radius:    20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --radius-pill: 500px;

  /* Shadows — Papillon-style: very subtle, barely there */
  --shadow:    0 0 0 0.5px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.08), 0 0 0 0.5px rgba(0,0,0,0.04);
  --glow-emerald: 0 0 20px rgba(41,148,122,0.12);
  --glow-blue:    0 0 20px rgba(99,102,241,0.10);

  /* Motion — spring-like Papillon feel */
  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
  --spring:     0.35s cubic-bezier(0.2,1,0.3,1);
}

/* ─── Dark Mode  (Papillon-style true black) ─────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #0A0A09;
    --surface:     #141413;
    --surface-2:   #1C1B1A;
    --navy-card:   #141413;
    --navy-mid:    #1C1B1A;
    --navy-raised: #262524;
    --navy-light:  #3A3938;
    --navy:        #0A0A09;
    --off-white:   #1C1B1A;
    --white:       #F5F5F4;
    --text:        #A8A29E;
    --text-bright: #F5F5F4;
    --muted:       #78716C;
    --border:      rgba(255,255,255,0.08);
    --border-hi:   rgba(255,255,255,0.14);
    --emerald-pale: rgba(41,148,122,0.12);
    --emerald-glow: rgba(41,148,122,0.15);
    --shadow:    0 0 0 0.5px rgba(255,255,255,0.06), 0 1px 3px rgba(0,0,0,0.5);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.6), 0 0 0 0.5px rgba(255,255,255,0.06);
    /* Dark-specific extras */
    --cream:      #141413;
    --cream-soft: #1C1B1A;
    --ink:        #F5F5F4;
    --ink-soft:   #A8A29E;
    --ink-muted:  #78716C;
    --line:       rgba(255,255,255,0.08);
    --line-hi:    rgba(255,255,255,0.14);
    --scrollbar:  #3A3938;
    --scrollbar-hover: #504E4D;
  }
}
[data-theme="dark"] {
    --bg:          #0A0A09;
    --surface:     #141413;
    --surface-2:   #1C1B1A;
    --navy-card:   #141413;
    --navy-mid:    #1C1B1A;
    --navy-raised: #262524;
    --navy-light:  #3A3938;
    --navy:        #0A0A09;
    --off-white:   #1C1B1A;
    --white:       #F5F5F4;
    --text:        #A8A29E;
    --text-bright: #F5F5F4;
    --muted:       #78716C;
    --border:      rgba(255,255,255,0.08);
    --border-hi:   rgba(255,255,255,0.14);
    --emerald-pale: rgba(41,148,122,0.12);
    --emerald-glow: rgba(41,148,122,0.15);
    --shadow:    0 0 0 0.5px rgba(255,255,255,0.06), 0 1px 3px rgba(0,0,0,0.5);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.6), 0 0 0 0.5px rgba(255,255,255,0.06);
    --cream:      #141413;
    --cream-soft: #1C1B1A;
    --ink:        #F5F5F4;
    --ink-soft:   #A8A29E;
    --ink-muted:  #78716C;
    --line:       rgba(255,255,255,0.08);
    --line-hi:    rgba(255,255,255,0.14);
    --scrollbar:  #3A3938;
    --scrollbar-hover: #504E4D;
}

/* ─── Dark Mode overrides ────────────────────────────────────── */
[data-theme="dark"] body { background: var(--bg) !important; color: var(--text); }
[data-theme="dark"] body::after { display: none; }
[data-theme="dark"] .sidebar,
[data-theme="dark"] .mobile-header,
[data-theme="dark"] .mobile-bottom-nav { background: var(--surface); }
[data-theme="dark"] .landing-nav { background: rgba(10,10,9,0.92) !important; backdrop-filter: blur(12px); }
[data-theme="dark"] .nav-mobile-menu { background: rgba(10,10,9,0.98); }
[data-theme="dark"] .feature-card,
[data-theme="dark"] .pricing-card,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .card { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .mockup-window { background: var(--surface); border-color: var(--border-hi); }
[data-theme="dark"] .mockup-topbar { background: var(--surface-2); }
[data-theme="dark"] .section-alt { background: #060605; }
[data-theme="dark"] .stat-card { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border); }
[data-theme="dark"] .btn-secondary:hover { background: var(--navy-raised); }
[data-theme="dark"] .hw-item { background: var(--surface-2); border-color: var(--border); }
[data-theme="dark"] .lesson-item { background: var(--surface-2); }
[data-theme="dark"] .alert { background: var(--surface-2); border-color: var(--border); }
[data-theme="dark"] .alert-success { background: rgba(41,148,122,0.08); border-color: rgba(41,148,122,0.2); }
[data-theme="dark"] .alert-danger { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.2); }
[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select { background: var(--surface-2) !important; border-color: var(--border) !important; color: var(--text-bright) !important; }
[data-theme="dark"] .form-input:focus,
[data-theme="dark"] .form-select:focus { background: var(--surface) !important; border-color: var(--emerald) !important; }
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select { background: var(--surface-2); color: var(--text-bright); border-color: var(--border); }
[data-theme="dark"] .empty-state-icon { background: var(--surface-2); }
[data-theme="dark"] .empty-state .empty-cta { background: var(--surface-2); border-color: var(--border); }
[data-theme="dark"] .empty-state .empty-cta:hover { background: rgba(41,148,122,0.12); }

/* Loading overlay dark mode */
[data-theme="dark"] .loading-overlay { background: rgba(10,10,9,0.92) !important; }
[data-theme="dark"] .gradia-loader-bar { background: var(--surface-2) !important; }
[data-theme="dark"] .gradia-loader-text { color: var(--muted) !important; }

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* No ambient tint — Papillon-clean flat background */
body::after { display: none; }

/* ─── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--navy-light, #D6D3D1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted, #A8A29E); }

/* ─── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-bright);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
h4 { font-size: 0.95rem; font-weight: 600; }
p  { color: var(--text); font-size: 0.95rem; }
a  { color: var(--emerald); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.75; }

/* ─── Layout ────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.page-wrapper { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* ─── Sidebar  (Papillon-clean) ─────────────────────────────── */
.sidebar {
  width: 250px;
  min-height: 100vh;
  background: var(--surface);
  border-right: none;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0.75rem;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-logo {
  padding: 0.25rem 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: none;
  margin-bottom: 0.5rem;
}

.sidebar-logo .logo-icon {
  width: 36px; height: 36px;
  background: #FCF9F4;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 2px rgba(60, 40, 10, 0.06), inset 0 0 0 0.5px rgba(41, 148, 122, 0.12);
  flex-shrink: 0;
}
.sidebar-logo .logo-icon svg { display: block; }

.sidebar-logo span {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-bright);
  letter-spacing: -0.02em;
}

.nav-section { padding: 0 0.25rem; margin-bottom: 0.5rem; }

.nav-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.5rem 0.75rem 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s var(--spring);
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 2px;
  position: relative;
}

.nav-item:hover {
  background: var(--surface-2);
  color: var(--text-bright);
  transform: scale(1.01);
}

.nav-item.active {
  background: var(--cream-soft, #F7F3EC);
  color: var(--emerald-dim);
  font-weight: 600;
}

/* ─── Sidebar active indicator v2 — left ink-bar ──────────────── */
/* Teal vertical bar animates in with scaleY. Icon + text shift to teal. */
.nav-item { position: relative; }
.nav-item::before {
  content: '';
  position: absolute;
  left: -0.35rem;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  transform-origin: center;
  width: 3px;
  height: 58%;
  background: var(--emerald);
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.22,1,0.36,1), opacity 0.22s ease;
  pointer-events: none;
}
.nav-item.active::before {
  display: block;
  transform: translateY(-50%) scaleY(1);
  opacity: 1;
}
.nav-item.active .nav-icon svg { stroke: var(--emerald); }
@media (prefers-reduced-motion: reduce) {
  .nav-item::before { transition: none; }
}

/* ─── Global editorial accent — used inside page-header h2 & card titles ─── */
.editorial {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--emerald);
  -webkit-text-fill-color: var(--emerald);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  padding-right: 0.08em;
  letter-spacing: 0;
}

/* Unified page-header H1 treatment */
.page-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-bright);
  line-height: 1.1;
}
.page-header .subtitle {
  color: #6B6660;
  font-size: 0.9rem;
  margin-top: 0.35rem;
}
@media (max-width: 500px) {
  .page-header h2 { font-size: 1.3rem; }
  .page-header .subtitle { font-size: 0.8rem; }
}

/* ─── Skeleton loaders — warm cream pulse ──────────────────────── */
@keyframes skeletonPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}
.skeleton {
  background: linear-gradient(
    90deg,
    var(--cream-soft, #F7F3EC) 0%,
    #EDE8DF 50%,
    var(--cream-soft, #F7F3EC) 100%
  );
  background-size: 200% 100%;
  border-radius: 8px;
  animation: skeletonShimmer 1.6s ease-in-out infinite;
  display: inline-block;
}
@keyframes skeletonShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-line {
  height: 0.9em;
  width: 100%;
  border-radius: 6px;
  margin: 0.35em 0;
}
.skeleton-line.short { width: 40%; }
.skeleton-line.mid   { width: 70%; }
.skeleton-title {
  height: 1.6em;
  width: 55%;
  border-radius: 8px;
  margin-bottom: 0.6em;
}
.skeleton-card {
  height: 80px;
  width: 100%;
  border-radius: 14px;
}
.skeleton-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: skeletonPulse 1.6s ease-in-out infinite; }
}

.nav-item .nav-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-item .nav-icon svg { width: 20px; height: 20px; stroke-width: 2; }

.sidebar-footer {
  margin-top: auto;
  padding: 1rem 0.75rem;
  border-top: none;
}

.user-badge { display: flex; align-items: center; gap: 0.75rem; }

.user-avatar {
  width: 36px; height: 36px;
  background: var(--emerald);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 700; color: white;
  flex-shrink: 0;
}

.user-info .user-name { font-size: 0.85rem; font-weight: 600; color: var(--text-bright); }
.user-info .user-role { font-size: 0.7rem; color: var(--muted); margin-top: 2px; }

/* ─── Main content ──────────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: 250px;
  padding: 2.25rem 2.5rem;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow-x: hidden;
}

.main-content > * {
  animation: slideUpFade 0.4s cubic-bezier(0.22,1,0.36,1) both;
}
.main-content > *:nth-child(1) { animation-delay: 0.03s; }
.main-content > *:nth-child(2) { animation-delay: 0.07s; }
.main-content > *:nth-child(3) { animation-delay: 0.11s; }
.main-content > *:nth-child(4) { animation-delay: 0.15s; }
.main-content > *:nth-child(5) { animation-delay: 0.19s; }

@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-header { margin-bottom: 2rem; }
/* .page-header h2 size is set globally above (1.85rem) */
/* .page-header .subtitle is set globally above */

/* ─── Cards  (Papillon-style: clean, borderless) ─────────────── */
.card {
  background: var(--surface);
  border: none;
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.25s var(--spring), box-shadow 0.25s ease;
  position: relative;
  overflow-wrap: break-word;
  word-wrap: break-word;
  min-width: 0;
}

.card:hover {
  transform: scale(1.005);
  box-shadow: var(--shadow-lg);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-bright);
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.card-title > svg,
.card-title svg:first-of-type {
  width: 16px;
  height: 16px;
  color: var(--emerald);
  stroke: var(--emerald);
  stroke-width: 2.2;
  flex-shrink: 0;
}

/* ─── Stat Cards  (Papillon-style: flat tinted, borderless) ──── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--surface);
  border: none;
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem 1.1rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s var(--spring), box-shadow 0.25s ease;
}

.stat-card:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}
.stat-card:active {
  transform: scale(0.97);
}

/* No bottom bar */
.stat-card::after { display: none; }

/* Soft accent tint — whole card */
.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-color, var(--emerald));
  opacity: 0.04;
  pointer-events: none;
  border-radius: var(--radius);
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

.stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.stat-value.good   { color: var(--emerald); }
.stat-value.warn   { color: var(--warning); }
.stat-value.danger { color: var(--danger); }
.stat-value.bad    { color: var(--danger); }

.stat-sub { font-size: 0.75rem; color: var(--muted); margin-top: 0.45rem; display:flex; align-items:center; gap:0.4rem; flex-wrap:wrap; }

/* ─── v2 decimal/unit split — big integer, italic grey decimal ────── */
.stat-value .dec {
  font-size: 0.62em;
  font-weight: 500;
  font-style: italic;
  color: var(--muted);
  letter-spacing: 0;
}
.stat-value .unit {
  font-size: 0.48em;
  font-weight: 500;
  color: var(--muted);
  margin-left: 0.12em;
  letter-spacing: 0;
}

/* ─── v2 delta pill: ↑ green / ↓ red / = neutral ──────────────────── */
.delta {
  display:inline-flex;
  align-items:center;
  padding: 0.14rem 0.48rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: color-mix(in oklab, var(--emerald) 14%, transparent);
  color: var(--emerald);
  line-height: 1.2;
}
.delta.down {
  background: color-mix(in oklab, var(--danger) 14%, transparent);
  color: var(--danger);
}
.delta.neutral {
  background: color-mix(in oklab, var(--muted) 18%, transparent);
  color: var(--muted);
}

/* ─── v2 sparkline, docked top-right of card ─────────────────────── */
.stat-spark {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 50px;
  height: 18px;
  pointer-events:none;
}
.stat-spark polyline {
  fill: none;
  stroke: var(--accent-color, var(--emerald));
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.75;
}

/* ─── Homework card — pending homework list (parent + student) ─── */
.homework-list { display: flex; flex-direction: column; gap: 0.5rem; }
.homework-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0.85rem;
  background: var(--cream-soft, #F7F3EC);
  border: 1px solid var(--line-warm, #EAE6DE);
  border-radius: 12px;
  transition: border-color 0.2s ease, transform 0.15s ease, background 0.15s ease;
}
.homework-row:hover {
  border-color: #D8D2C7;
  transform: translateY(-1px);
  background: #FFFFFF;
}
.homework-row .hw-subject {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: var(--teal-pale, #E4F2EE);
  color: #1E7057;
  white-space: nowrap;
  flex-shrink: 0;
}
.homework-row .hw-desc {
  font-size: 0.85rem;
  color: var(--text-bright);
  line-height: 1.35;
  min-width: 0;
  font-weight: 500;
}
.homework-row .hw-deadline {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.homework-row.hw-urgent { border-color: rgba(201,54,45,0.28); }
.homework-row.hw-urgent .hw-deadline { color: #C9362D; }
.homework-row.hw-urgent .hw-subject { background: rgba(201,54,45,0.1); color: #C9362D; }
.homework-row.hw-soon { border-color: rgba(232,139,76,0.28); }
.homework-row.hw-soon .hw-deadline { color: #A35215; }
.homework-row.hw-soon .hw-subject { background: rgba(232,139,76,0.1); color: #A35215; }
.homework-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}
.homework-empty svg { width: 22px; height: 22px; color: var(--emerald); margin-bottom: 0.35rem; }
.homework-count {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--cream-soft, #F7F3EC);
}
@media (max-width: 600px) {
  .homework-row { grid-template-columns: 1fr; gap: 0.35rem; }
  .homework-row .hw-subject { justify-self: start; }
  .homework-row .hw-deadline { justify-self: start; }
}
[data-theme="dark"] .homework-row {
  background: var(--surface-2);
  border-color: var(--border);
}
[data-theme="dark"] .homework-row:hover { background: var(--navy-raised); }
[data-theme="dark"] .homework-row .hw-subject {
  background: rgba(52,211,153,0.12); color: #2DD4A0;
}
[data-theme="dark"] .homework-row.hw-urgent .hw-subject {
  background: rgba(248,113,113,0.14); color: #FCA5A5;
}
[data-theme="dark"] .homework-row.hw-soon .hw-subject {
  background: rgba(232,139,76,0.16); color: #F5A76A;
}
[data-theme="dark"] .homework-row.hw-urgent { border-color: rgba(248,113,113,0.28); }
[data-theme="dark"] .homework-row.hw-soon { border-color: rgba(232,139,76,0.28); }
[data-theme="dark"] .homework-row.hw-urgent .hw-deadline { color: #FCA5A5; }
[data-theme="dark"] .homework-row.hw-soon .hw-deadline { color: #F5A76A; }
[data-theme="dark"] .homework-count {
  background: var(--surface-2); color: var(--muted);
}

/* ─── Buttons  (Papillon-style: pill, scale press) ───────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-pill);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition:
    transform 0.18s cubic-bezier(0.22,1,0.36,1),
    box-shadow 0.22s ease,
    background-color 0.18s ease,
    color 0.18s ease,
    opacity 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  letter-spacing: 0.01em;
  overflow: hidden;
  will-change: transform;
  isolation: isolate;
}
.btn::before {
  /* soft teal glow on hover for primary, subtle cream for secondary */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: -1;
}
.btn::after {
  /* sheen — diagonal highlight that sweeps on hover */
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255,255,255,0.25) 50%,
    transparent 100%
  );
  transform: skewX(-18deg);
  transition: left 0.5s cubic-bezier(0.2,0.9,0.3,1);
  pointer-events: none;
  opacity: 0;
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(41,148,122,0.2), 0 0 0 1px var(--emerald);
}

.btn-primary {
  background: var(--emerald);
  color: white;
  box-shadow: 0 1px 2px rgba(41,148,122,0.15);
}
.btn-primary:hover {
  background: var(--emerald-dim);
  color: white;
  transform: translateY(-1px);
  box-shadow:
    0 6px 16px -4px rgba(41,148,122,0.35),
    0 2px 4px rgba(41,148,122,0.15);
}
.btn-primary:hover::after { left: 130%; opacity: 1; }
.btn-primary:active {
  transform: translateY(0) scale(0.985);
  box-shadow: 0 1px 2px rgba(41,148,122,0.2), inset 0 1px 2px rgba(0,0,0,0.12);
  transition-duration: 0.08s;
}

.btn-secondary {
  background: var(--cream-soft, #F7F3EC);
  color: var(--text-bright);
  border: 1px solid var(--line-warm, #EAE6DE);
  box-shadow: 0 1px 2px rgba(60,40,10,0.03);
}
.btn-secondary:hover {
  background: #F0EAE2;
  color: var(--text-bright);
  border-color: #D8D2C7;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -4px rgba(60,40,10,0.12);
}
.btn-secondary:active {
  transform: translateY(0) scale(0.985);
  box-shadow: inset 0 1px 2px rgba(60,40,10,0.08);
  transition-duration: 0.08s;
}

/* Small variant — same micro-interactions, tighter */
.btn.btn-sm { padding: 0.45rem 0.95rem; font-size: 0.8rem; }

@media (prefers-reduced-motion: reduce) {
  .btn, .btn::after { transition: background-color 0.15s ease, color 0.15s ease; }
  .btn:hover { transform: none; }
  .btn:active { transform: none; }
}

.btn-danger {
  background: rgba(239,68,68,0.08);
  color: var(--danger);
  border: none;
}
.btn-danger:hover { background: rgba(239,68,68,0.14); }
.btn-danger:active { transform: scale(0.97); }

.btn-sm { padding: 0.4rem 1rem; font-size: 0.78rem; }
.btn-lg { padding: 0.9rem 2.4rem; font-size: 0.95rem; }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ─── Form Inputs ────────────────────────────────────────────── */
.form-group { margin-bottom: 1.2rem; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.45rem;
  letter-spacing: 0.02em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--surface-2);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-bright);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  padding: 0.75rem 1.05rem;
  outline: none;
  transition: background var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--emerald-ring);
}

.form-input::placeholder { color: var(--muted); }
.form-select option       { background: var(--surface); color: var(--text-bright); }
.form-textarea            { resize: vertical; min-height: 100px; }

.form-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.4rem;
  line-height: 1.5;
}

/* ─── Badge / Pill ───────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.badge-success { background: rgba(20,184,166,0.12); color: #0D9488; border: 1px solid rgba(20,184,166,0.22); }
.badge-danger  { background: rgba(239,68,68,0.1);   color: #DC2626; border: 1px solid rgba(239,68,68,0.2); }
.badge-warning { background: rgba(245,158,11,0.1);  color: #D97706; border: 1px solid rgba(245,158,11,0.2); }
.badge-neutral { background: var(--surface-2);      color: var(--text); border: 1px solid var(--border); }

/* ─── Table ──────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th {
  padding: 0.7rem 1rem;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
  background: var(--surface-2);
}
td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
tr:hover td { background: var(--surface-2); }

/* ─── Alert ──────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.875rem;
  border: none;
}
.alert-icon { font-size: 1rem; flex-shrink: 0; }
.alert-danger  { background: rgba(239,68,68,0.08);  color: #DC2626; }
.alert-warning { background: rgba(232,176,72,0.1);  color: #B8860B; }
.alert-success { background: rgba(41,148,122,0.08); color: var(--emerald-dim); }
.alert-info    { background: rgba(99,102,241,0.08); color: #4F46E5; }

/* ─── Chat ───────────────────────────────────────────────────── */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 180px);
  background: var(--surface);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chat-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--surface-2);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-behavior: smooth;
  background: var(--bg);
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.message {
  max-width: 75%;
  padding: 0.85rem 1.15rem;
  border-radius: 20px;
  font-size: 0.875rem;
  line-height: 1.65;
  animation: msgIn 0.25s cubic-bezier(0.22,1,0.36,1);
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.message.user {
  align-self: flex-end;
  background: var(--emerald);
  color: white;
  border-bottom-right-radius: 6px;
  box-shadow: none;
}

.message.assistant {
  align-self: flex-start;
  background: var(--surface-2);
  color: var(--text-bright);
  border: none;
  border-bottom-left-radius: 6px;
  box-shadow: none;
}
.message.assistant p { color: var(--text-bright); }

.chat-input-area {
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  gap: 0.7rem;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  background: var(--surface-2);
  border: none;
  border-radius: var(--radius-pill);
  color: var(--text-bright);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  padding: 0.75rem 1.15rem;
  outline: none;
  resize: none;
  max-height: 120px;
  transition: background var(--transition), box-shadow var(--transition);
}
.chat-input:focus {
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--emerald-ring);
}

.chat-send-btn {
  width: 42px; height: 42px;
  background: var(--emerald);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  transition: all 0.2s var(--spring);
  flex-shrink: 0;
  box-shadow: none;
}
.chat-send-btn:hover {
  transform: scale(1.08);
}
.chat-send-btn:active { transform: scale(0.93); }

/* ─── Planning ───────────────────────────────────────────────── */
.planning-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.65rem;
}

.day-column {
  background: var(--surface);
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--spring), box-shadow 0.25s ease;
}
.day-column:hover { box-shadow: var(--shadow-lg); transform: scale(1.01); }
.day-column:active { transform: scale(0.98); }

.day-header {
  padding: 0.7rem;
  text-align: center;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.day-name { font-family: 'Outfit', sans-serif; font-size: 0.78rem; font-weight: 700; color: var(--text-bright); }
.day-date { font-size: 0.68rem; color: var(--muted); margin-top: 0.1rem; }

.day-column.today .day-header { background: var(--emerald-pale); border-bottom-color: var(--emerald-ring); }
.day-column.today .day-name   { color: var(--emerald-dim); }

.day-slots { padding: 0.5rem; display: flex; flex-direction: column; gap: 0.4rem; min-height: 120px; }

.slot {
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  font-size: 0.72rem;
  border-left: 3px solid;
  cursor: pointer;
  transition: transform var(--transition), opacity var(--transition);
}
.slot:hover { transform: scale(1.02); }
.slot-time    { font-weight: 700; font-size: 0.65rem; opacity: 0.7; margin-bottom: 0.12rem; }
.slot-subject { font-weight: 600; }
.slot-task    { opacity: 0.65; margin-top: 0.1rem; font-size: 0.65rem; }

/* ─── Subject List ───────────────────────────────────────────── */
.subject-list { display: flex; flex-direction: column; gap: 0.4rem; }

.subject-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: none;
  transition: all 0.2s var(--spring);
}
.subject-row:hover { transform: scale(1.01); }
.subject-row:active { transform: scale(0.98); }

.subject-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.subject-name { flex: 1; font-size: 0.875rem; font-weight: 500; color: var(--text-bright); }

.subject-avg {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  min-width: 38px;
  text-align: right;
}
.subject-avg.good    { color: var(--emerald); }
.subject-avg.average { color: var(--warning); }
.subject-avg.bad     { color: var(--danger); }

/* ─── Progress Bars ──────────────────────────────────────────── */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.22,1,0.36,1);
  background: linear-gradient(90deg, var(--emerald), #5EEAD4);
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: progressShimmer 2.5s infinite;
}
@keyframes progressShimmer {
  0%   { left: -60%; }
  100% { left: 160%; }
}

/* ─── Homework ───────────────────────────────────────────────── */
.homework-list { display: flex; flex-direction: column; gap: 0.4rem; }

.hw-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: none;
  border-left: 3px solid var(--emerald);
  transition: all 0.2s var(--spring);
}
.hw-item:hover { transform: scale(1.01); }
.hw-item:active { transform: scale(0.98); }
.hw-item.urgent { border-left-color: var(--danger); }
.hw-item.soon   { border-left-color: var(--warning); }
.hw-item.done   { opacity: 0.4; border-left-color: var(--muted); }

.hw-checkbox { width: 16px; height: 16px; accent-color: var(--emerald); cursor: pointer; margin-top: 3px; flex-shrink: 0; }
.hw-content { flex: 1; }

.hw-subject {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 0.2rem;
}
.hw-desc     { font-size: 0.875rem; color: var(--text-bright); line-height: 1.4; }
.hw-deadline { font-size: 0.72rem; color: var(--muted); margin-top: 0.2rem; }

/* ─── Timetable ──────────────────────────────────────────────── */
.timetable-day { margin-bottom: 1.5rem; }

.timetable-day-header {
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--emerald-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.lesson-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}
.lesson-item:hover { background: var(--bg); }
.lesson-time { font-size: 0.75rem; font-weight: 600; color: var(--muted); min-width: 88px; font-variant-numeric: tabular-nums; }
.lesson-name { font-size: 0.875rem; font-weight: 500; color: var(--text-bright); flex: 1; }
.lesson-room { font-size: 0.72rem; color: var(--muted); }
.lesson-canceled .lesson-name { text-decoration: line-through; color: var(--muted); }

/* ─── Gradia Loader (warm editorial) ─────────────────────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(252, 249, 244, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: gradiaOverlayIn 0.35s ease-out both;
}

@keyframes gradiaOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.gradia-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  animation: gradiaLoaderIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes gradiaLoaderIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gradia-loader-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 10px 28px rgba(41, 148, 122, 0.22),
    0 3px 8px rgba(60, 40, 10, 0.06);
  animation: gradiaLoaderPulse 1.8s ease-in-out infinite;
}
.gradia-loader-mark svg {
  width: 56px;
  height: 56px;
  display: block;
  border-radius: 16px;
}

@keyframes gradiaLoaderPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.045); }
}

.gradia-loader-bar {
  position: relative;
  width: 148px;
  height: 3px;
  background: rgba(41, 148, 122, 0.14);
  border-radius: 99px;
  overflow: hidden;
}
.gradia-loader-bar span {
  position: absolute;
  top: 0;
  left: -45%;
  height: 100%;
  width: 45%;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent 0%, #29947A 50%, transparent 100%);
  animation: gradiaLoaderSlide 1.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

@keyframes gradiaLoaderSlide {
  0%   { left: -45%; }
  100% { left: 100%; }
}

.gradia-loader-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  font-style: italic;
  color: #8B7A5E;
  letter-spacing: 0.01em;
  margin: 0;
  text-align: center;
}

/* Legacy fallback — neutralise l'ancien spinner si le markup statique n'a pas été migré */
.loading-overlay .spinner { display: none; }
.loading-overlay .loading-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  font-style: italic;
  color: #8B7A5E;
  margin-top: 0.8rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Toast ──────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 260px;
  max-width: 380px;
  animation: toastIn 0.35s var(--spring), toastOut 0.28s ease 2.72s forwards;
  box-shadow: var(--shadow-lg);
  border-left: 3px solid;
  background: var(--surface);
}

@keyframes toastIn  { from { opacity: 0; transform: translateX(100%) scale(0.94); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateX(10px); } }

.toast-success { border-left-color: var(--emerald); color: var(--emerald-dim); }
.toast-error   { border-left-color: var(--danger);  color: #DC2626; }
.toast-info    { border-left-color: var(--indigo);  color: #4F46E5; }
.toast-warning { border-left-color: var(--warning); color: #D97706; }

/* ─── Empty State ────────────────────────────────────────────── */
/* ─── Empty States — warm Papillon aesthetic ──────────────────── */
.empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}
.empty-state-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
  background: var(--surface-2, #F7F3EC);
}
.empty-state-icon svg {
  width: 24px;
  height: 24px;
  color: var(--muted, #8B7A5E);
  opacity: 0.7;
}
.empty-state h3 {
  font-family: 'Outfit', 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text, #1C1917);
  margin: 0 0 0.3rem;
  line-height: 1.3;
}
.empty-state p {
  font-size: 0.82rem;
  color: var(--muted, #8B7A5E);
  margin: 0;
  line-height: 1.5;
  max-width: 280px;
}
.empty-state .empty-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.85rem;
  padding: 0.55rem 1.1rem;
  background: var(--surface-2, #F7F3EC);
  border: 1px solid var(--border, #EAE6DE);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #29947A;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
}
.empty-state .empty-cta:hover {
  background: #E4F2EE;
  border-color: rgba(41,148,122,0.3);
  transform: translateY(-1px);
}
.empty-state .empty-cta svg {
  width: 14px;
  height: 14px;
  color: #29947A;
  opacity: 1;
}

/* ─── Mobile / Hamburger ─────────────────────────────────────── */
.hamburger {
  display: none;
  position: fixed;
  top: 0.9rem; left: 0.9rem;
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  width: 40px; height: 40px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-bright);
  transition: background var(--transition);
}
.hamburger:hover { background: var(--surface-2); }

/* ─── Mobile touch & tap improvements ────────────────────────── */
@media (max-width: 900px) {
  * { -webkit-tap-highlight-color: transparent; }
  html { -webkit-text-size-adjust: 100%; }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); z-index: 200; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main-content { margin-left: 0; padding: 1rem 1rem calc(4.5rem + env(safe-area-inset-bottom, 0px)); padding-top: 3.75rem; overflow-x: hidden; }
  .hamburger { display: none; } /* replaced by mobile-header */
  .planning-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .card { padding: 1.15rem; }
  .page-header { margin-bottom: 1rem; }
  .page-header h2 { font-size: 1.2rem; }
  .card-header { margin-bottom: 1rem; }
  .stat-card { padding: 1.15rem 1.2rem 1rem; }
  .btn-sm { min-height: 44px; }
  .form-input,
  .form-select,
  .form-textarea { min-height: 44px; }
}
@media (max-width: 768px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .card { padding: 1rem; }
}
@media (max-width: 500px) {
  .planning-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; gap: 0.65rem; }
  .stat-card { padding: 1rem 1.1rem 0.9rem; }
  .stat-value { font-size: 1.4rem; }
  .stat-label { font-size: max(0.72rem, 0.75rem); }
  .page-header h2 { font-size: 1.1rem; }
}
@media (max-width: 380px) {
  .card { padding: 0.85rem; }
  .stat-card { padding: 0.85rem 0.95rem 0.75rem; }
  .main-content { padding: 0.75rem 0.75rem 4.5rem; padding-top: 3.75rem; }
}

/* ─── Sidebar overlay (mobile tap-outside close) ─────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28,25,23,0.25);
  z-index: 190;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.visible { display: block; }

/* ─── Mobile Header Bar (app pages) ─────────────────────────── */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 150;
  height: 48px;
  background: var(--surface);
  border-bottom: none;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  align-items: center;
  justify-content: space-between;
  padding: 0 0.9rem;
}
.mobile-header-logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}
.mobile-header-logo .logo-dot {
  width: 24px; height: 24px;
  background: #FCF9F4;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 0.5px rgba(41, 148, 122, 0.12);
}
.mobile-header-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-bright);
  font-size: 1rem;
  transition: background var(--transition);
}
.mobile-header-btn:hover { background: var(--navy-raised); }
@media (max-width: 900px) { .mobile-header { display: flex; } }

/* ─── Mobile Bottom Nav ──────────────────────────────────────── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 150;
  background: var(--surface);
  border-top: none;
  box-shadow: 0 -1px 12px rgba(0,0,0,0.06);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mobile-bottom-nav-inner {
  display: flex;
  align-items: stretch;
  height: 50px;
}
.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  position: relative;
  transition: color var(--transition);
}
.mobile-nav-item:hover { opacity: 1; color: var(--text); }
.mobile-nav-item.active { color: var(--emerald); }
.mobile-nav-item.active .mobile-nav-icon-wrap::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 50%;
  transform: translateX(-50%);
  width: 20px; height: 3px;
  background: var(--emerald);
  border-radius: 999px;
}
.mobile-nav-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-nav-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
}
.mobile-nav-icon svg { width: 20px; height: 20px; }
.mobile-nav-badge {
  position: absolute;
  top: -4px; right: -8px;
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 1px 4px;
  min-width: 14px;
  text-align: center;
  line-height: 1.4;
}
@media (max-width: 900px) { .mobile-bottom-nav { display: block; } }

/* ─── Divider ────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }

/* ─── Tabs (login) ───────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0.2rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 0.2rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}
.tab {
  flex: 1;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--muted);
  transition: all var(--transition);
  text-align: center;
  font-family: 'DM Sans', sans-serif;
}
.tab.active {
  background: var(--surface);
  color: var(--text-bright);
  box-shadow: var(--shadow);
}

/* ─── Login Page ─────────────────────────────────────────────── */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
  background: var(--bg);
  position: relative;
}

.login-wrapper::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 25% 15%, rgba(20,184,166,0.07), transparent),
    radial-gradient(ellipse 55% 45% at 78% 88%, rgba(99,102,241,0.05), transparent);
  pointer-events: none;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.25rem 2.5rem;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
  animation: cardRise 0.45s cubic-bezier(0.22,1,0.36,1);
}

@keyframes cardRise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.login-logo .logo-icon {
  width: 42px; height: 42px;
  background: #FCF9F4;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 1px 2px rgba(60, 40, 10, 0.06), inset 0 0 0 0.5px rgba(41, 148, 122, 0.12);
}

.login-logo h1 { font-size: 1.45rem; letter-spacing: -0.02em; }

/* ─── Subject Grid (assistant) ───────────────────────────────── */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 0.55rem;
}

.subject-btn {
  padding: 0.7rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  box-shadow: 0 1px 3px rgba(28,25,23,0.04);
  font-family: 'DM Sans', sans-serif;
}
.subject-btn:hover,
.subject-btn.active {
  background: var(--emerald-pale);
  border-color: var(--emerald-ring);
  color: var(--emerald-dim);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* ─── Typing Indicator ───────────────────────────────────────── */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 0.8rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  width: fit-content;
  box-shadow: var(--shadow);
}
.typing-dot {
  width: 6px; height: 6px;
  background: var(--muted);
  border-radius: 50%;
  animation: typingBounce 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.18s; }
.typing-dot:nth-child(3) { animation-delay: 0.36s; }

@keyframes typingBounce {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  50%       { transform: translateY(-5px); opacity: 1; }
}

/* ─── Skeleton (legacy — cream version above supersedes) ──────── */
/* Kept only skeleton-text for back-compat; .skeleton/.skeleton-card
   are defined globally near the top with cream shimmer. */
.skeleton-text { height: 13px; margin-bottom: 0.5rem; }
.skeleton-text.wide   { width: 100%; }
.skeleton-text.medium { width: 62%; }
.skeleton-text.short  { width: 32%; }

/* ─── Counter ────────────────────────────────────────────────── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.count-animated { animation: countUp 0.35s ease forwards; }

/* ─── Pricing Cards ──────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 820px;
  margin: 0 auto;
}
@media (max-width: 700px) { .pricing-grid { grid-template-columns: 1fr; } }

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.pricing-card.featured {
  border-color: rgba(20,184,166,0.3);
  box-shadow: 0 0 0 1px rgba(20,184,166,0.1), var(--shadow-lg);
  background: linear-gradient(180deg, rgba(20,184,166,0.03) 0%, #FFFFFF 40%);
}

.pricing-badge {
  position: absolute;
  top: -11px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--emerald), #0D9488);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.18rem 0.9rem;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 10px rgba(20,184,166,0.35);
}

.pricing-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
}

.pricing-price {
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1;
  margin-bottom: 0.25rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.pricing-price span { font-size: 0.95rem; font-weight: 400; color: var(--muted); }

.pricing-features {
  list-style: none;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.pricing-features li {
  font-size: 0.875rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pricing-features li.unavailable { color: var(--muted); opacity: 0.4; }

/* ─── Testimonials ───────────────────────────────────────────── */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}
.testimonial-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 1rem; right: 1.25rem;
  font-family: 'Outfit', sans-serif;
  font-size: 3.5rem;
  line-height: 1;
  color: var(--emerald);
  opacity: 0.1;
  font-weight: 800;
  pointer-events: none;
}

.testimonial-stars { color: #F59E0B; font-size: 0.85rem; margin-bottom: 0.7rem; letter-spacing: 0.05em; }

.testimonial-text {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 1rem;
}

.testimonial-author { display: flex; align-items: center; gap: 0.75rem; }

.testimonial-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 700;
  color: white; flex-shrink: 0;
}

.testimonial-name { font-size: 0.82rem; font-weight: 600; color: var(--text-bright); }
.testimonial-role { font-size: 0.7rem; color: var(--muted); }

/* ─── FAQ Accordion ──────────────────────────────────────────── */
.faq-list { max-width: 740px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.6rem; }

details.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: border-color var(--transition);
}
details.faq-item[open] { border-color: var(--emerald-ring); }

details.faq-item summary {
  padding: 0.95rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-bright);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: color var(--transition);
}
details.faq-item summary:hover { color: var(--emerald-dim); }
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: '+';
  font-size: 1.15rem;
  color: var(--emerald);
  font-weight: 300;
  transition: transform var(--transition);
  flex-shrink: 0;
  line-height: 1;
}
details.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-answer {
  padding: 0 1.2rem 0.95rem;
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.75;
  border-top: 1px solid var(--border);
  padding-top: 0.85rem;
}

/* ─── Scroll-appear (landing) ────────────────────────────────── */
.scroll-appear {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22,1,0.36,1);
}
.scroll-appear.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Landing page — General ─────────────────────────────────── */
.landing-section {
  padding: 6rem 0;
}

.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--text-bright);
  text-align: center;
  margin-bottom: 0.75rem;
  letter-spacing: -0.03em;
}

.section-sub {
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 3rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Feature cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.feature-icon-wrap {
  width: 46px; height: 46px;
  background: var(--emerald-pale);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  border: 1px solid var(--emerald-ring);
}

/* How-it-works connector */
.how-connector {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--emerald-ring), var(--border));
  margin: 0 0.5rem;
  display: none;
}
@media (min-width: 700px) { .how-connector { display: block; } }

/* Stats */
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(20,184,166,0.08);
  border: 1px solid var(--emerald-ring);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.8rem;
  color: var(--emerald-dim);
  font-weight: 600;
}

/* ─── Landing Nav (override) ─────────────────────────────────── */
.landing-nav {
  background: rgba(255,255,255,0.9) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border) !important;
}

/* ─── Hero Mockup ───────────────────────────────────────────── */
.hero-mockup {
  margin-top: 3rem;
  position: relative;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}
.mockup-glow {
  position: absolute;
  inset: -40px;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(20,184,166,0.12), transparent);
  pointer-events: none;
  z-index: 0;
}
.mockup-window {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(28,25,23,0.12), 0 4px 16px rgba(28,25,23,0.06);
  overflow: hidden;
}
.mockup-topbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.7rem 1rem;
  background: #F7FAFC;
  border-bottom: 1px solid var(--border);
}
.mockup-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.mockup-body {
  padding: 1rem 1.25rem;
}
.mockup-stat-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}
.mockup-stat {
  flex: 1;
  background: var(--bg);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
}
.mockup-stat-val {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-bright);
}
.mockup-stat-lbl {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.1rem;
}
.mockup-bar-row {
  margin-bottom: 0.55rem;
}
.mockup-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.mockup-bar-track {
  height: 5px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
}
.mockup-bar-fill {
  height: 100%;
  border-radius: 999px;
}

/* ─── Pricing ───────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  max-width: 1000px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.pricing-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.pricing-card.featured {
  border-color: var(--emerald);
  box-shadow: 0 0 0 1px var(--emerald), var(--shadow-lg);
}
.pricing-name {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 0.4rem;
}
.pricing-price {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 0.35rem;
  line-height: 1;
}
.pricing-price span { font-size: 1rem; font-weight: 400; color: var(--muted); }
.pricing-desc { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.25rem; }
.pricing-features {
  list-style: none;
  padding: 0; margin: 0;
  flex: 1;
  font-size: 0.85rem;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.pricing-features li { display: flex; align-items: baseline; gap: 0.4rem; }
.pricing-badge {
  display: inline-block;
  background: var(--emerald);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  margin-bottom: 0.75rem;
}

/* ─── FAQ ────────────────────────────────────────────────────── */
.faq-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.faq-item summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-bright);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: '−'; }
.faq-answer {
  padding: 0 1.25rem 1rem;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.7;
  border-top: 1px solid var(--border);
  margin-top: 0;
  padding-top: 0.75rem;
}

/* ─── Footer ────────────────────────────────────────────────── */
.landing-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3.5rem 2rem 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  max-width: 1060px;
  margin: 0 auto 2rem;
}
@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 260px;
}
.footer-col-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-bright);
  margin-bottom: 0.85rem;
}
.footer-links {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--emerald); }
.footer-bottom {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  max-width: 1060px;
  margin: 0 auto;
}
.footer-bottom a { color: var(--emerald); text-decoration: none; }

/* ─── Feature card title/desc helpers ───────────────────────── */
.feature-title {
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}
.feature-desc {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ─── Scroll reveal helper ───────────────────────────────────── */
.scroll-appear { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22,1,0.36,1); }
.scroll-appear.visible { opacity: 1; transform: none; }

/* ─── Landing page — mobile ──────────────────────────────────── */
@media (max-width: 640px) {
  .section { padding: 3.5rem 1.25rem; }
  .section-sub { font-size: 0.88rem; margin-bottom: 2rem; }

  .hero-section { padding: 5.5rem 1.25rem 3rem; }
  .hero-h1 { font-size: clamp(1.9rem, 7.5vw, 2.4rem) !important; }
  .hero-sub { font-size: 0.92rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { text-align: center; justify-content: center; }
  .btn-lg { padding: 0.9rem 1.5rem; font-size: 0.95rem; }
  /* Hide decorative elements on mobile — prevents horizontal overflow */
  .hero-orb, .hero-bg-grad, .mockup-glow { display: none !important; }
  /* Constrain hero-inner to available width so buttons don't overflow */
  .hero-inner { width: 100%; max-width: 100%; }
  .hero-actions { width: 100%; }
  .hero-mockup { max-width: 100%; overflow: hidden; }

  .social-proof-row { gap: 0.5rem; }
  .proof-pill { font-size: 0.72rem; padding: 0.28rem 0.65rem; }

  .hero-mockup { margin-top: 2rem; }
  .mockup-stat-row { gap: 0.5rem; }
  .mockup-stat-val { font-size: 1rem; }
  .mockup-body { padding: 0.75rem 0.85rem; }

  .features-grid-6 { grid-template-columns: 1fr; gap: 0.85rem; }
  .feature-card { padding: 1.25rem; }

  .how-grid { gap: 1.5rem; }

  .pricing-card { padding: 1.5rem 1.25rem; }

  .faq-item summary { font-size: 0.88rem; padding: 0.85rem 1rem; }
  .faq-answer { padding: 0 1rem 0.85rem; padding-top: 0.65rem; }

  .cta-final { padding: 4rem 1.25rem; }

  .landing-footer { padding: 2.5rem 1.25rem 1.5rem; }
  .footer-grid { gap: 1.75rem; }
  .footer-brand p { max-width: 100%; }
}
@media (max-width: 400px) {
  .section { padding: 3rem 1rem; }
  .hero-section { padding: 5rem 1rem 2.5rem; }
}

/* ─── Login — mobile ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .login-wrapper { padding: 0.75rem; align-items: flex-start; padding-top: 2rem; }
  .login-card { padding: 1.5rem 1.25rem; }
}

/* ─── Toast — mobile ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .toast-container { bottom: 5rem; right: 0.75rem; left: 0.75rem; }
  .toast { min-width: unset; max-width: 100%; width: 100%; }
}
