/* =========================================================
   KneXus — Indigo Purple theme
   ========================================================= */

:root {
  --indigo-900: #2e1065;
  --indigo-800: #4c1d95;
  --indigo-700: #5b21b6;
  --indigo-600: #6d28d9;
  --indigo-500: #7c3aed;
  --indigo-400: #8b5cf6;
  --indigo-200: #ddd6fe;
  --indigo-100: #ede9fe;
  --indigo-50:  #f5f3ff;

  /* logo background lavender */
  --lavender-200: #ddd6f3;

  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;

  --amber-500: #f59e0b;
  --amber-100: #fef3c7;
  --green-600: #16a34a;
  --green-100: #dcfce7;
  --red-600: #dc2626;

  --white: #ffffff;

  --font-heading: "Poppins", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fraunces", "Poppins", Georgia, serif;

  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(30, 27, 75, 0.06);
  --shadow-md: 0 8px 24px rgba(49, 46, 129, 0.10);
  --shadow-lg: 0 20px 48px rgba(30, 27, 75, 0.16);
  --shadow-xl: 0 32px 64px -12px rgba(30, 27, 75, 0.28);
  --shadow-glow: 0 8px 30px rgba(109, 40, 217, 0.22), 0 2px 8px rgba(30, 27, 75, 0.08);

  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--slate-900);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--slate-900); margin: 0; line-height: 1.2; }
p { margin: 0; color: var(--slate-600); }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--indigo-600);
  margin-bottom: 12px;
}
.eyebrow-on-dark { color: var(--indigo-200); }

/* ---------------------------------------------------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease-premium), box-shadow 0.3s var(--ease-premium), background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(0) scale(0.97); }
.btn-primary, .btn-on-dark {
  isolation: isolate;
}
.btn-primary::before, .btn-on-dark::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.4) 50%, transparent 70%);
  transform: translateX(-130%);
  transition: transform 0.7s var(--ease-premium);
  pointer-events: none;
}
.btn-primary:hover::before, .btn-on-dark:hover::before { transform: translateX(130%); }
.btn-primary { background: var(--indigo-600); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--indigo-700); box-shadow: var(--shadow-glow); transform: translateY(-2px); }
.btn-secondary { background: var(--indigo-50); color: var(--indigo-700); }
.btn-secondary:hover { background: var(--indigo-100); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-danger { background: var(--red-600); color: var(--white); }
.btn-danger:hover { background: #b91c1c; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--indigo-700); border-color: var(--indigo-200); }
.btn-ghost:hover { background: var(--indigo-50); transform: translateY(-1px); }
.btn-on-dark { background: var(--white); color: var(--indigo-700); }
.btn-on-dark:hover { transform: translateY(-2px); box-shadow: var(--shadow-xl); }
.btn-disabled { background: var(--slate-100); color: var(--slate-400); cursor: not-allowed; }
.btn-lg { padding: 15px 30px; font-size: 1.02rem; }
.btn-sm { padding: 9px 16px; font-size: 0.86rem; }
.btn-block { width: 100%; }

/* ---------------------------------------------------- header ----------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(221, 214, 243, 0.82);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--slate-200);
  transition: box-shadow 0.3s var(--ease-premium), background-color 0.3s var(--ease-premium), border-color 0.3s var(--ease-premium);
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-md);
  border-bottom-color: transparent;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; }
.brand-mark {
  display: inline-block;
  width: 34px; height: 34px; border-radius: 10px;
  flex-shrink: 0;
  vertical-align: middle;
}
.brand-name { color: var(--slate-900); }

.site-nav { display: flex; align-items: center; gap: 28px; font-weight: 500; font-size: 0.94rem; }
.site-nav a:not(.nav-cta):not(.nav-cta-ghost) { color: var(--slate-700); }
.site-nav a:not(.nav-cta):not(.nav-cta-ghost):hover { color: var(--indigo-600); }
.nav-cta { background: var(--indigo-600); color: var(--white); padding: 10px 18px; border-radius: 999px; }
.nav-cta:hover { background: var(--indigo-700); }
.nav-cta-ghost { color: var(--indigo-700); font-weight: 600; }
.nav-cart-icon { display: inline-flex; align-items: center; padding: 4px; }
.nav-cart-icon svg { width: 22px; height: 22px; }

.profile-menu { position: relative; }
.profile-trigger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 999px; padding: 0;
  background: var(--indigo-50); color: var(--indigo-700); border: none; cursor: pointer;
  transition: background-color 0.15s ease;
}
.profile-trigger:hover { background: var(--indigo-100); }
.profile-trigger svg { width: 19px; height: 19px; }
.profile-trigger-text {
  width: auto; height: auto; border-radius: 999px; padding: 8px 14px;
  background: none; color: var(--indigo-700); font-weight: 600; font-size: 0.94rem;
  font-family: var(--font-body); display: inline-flex; align-items: center; gap: 6px;
}
.profile-trigger-text:hover { background: var(--indigo-50); }
.profile-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60;
  min-width: 180px; background: var(--white); border: 1px solid var(--slate-200);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  padding: 8px; display: none; flex-direction: column; gap: 2px;
}
.profile-dropdown.open { display: flex; }
.profile-dropdown-name {
  padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--slate-200);
  font-weight: 600; font-size: 0.86rem; color: var(--slate-900);
}
.profile-dropdown a { display: block; padding: 9px 10px; border-radius: var(--radius-md); font-size: 0.88rem; color: var(--slate-700); }
.profile-dropdown a:hover { background: var(--slate-50); color: var(--red-600); }
.profile-dropdown-course { display: block; padding: 4px 10px; font-size: 0.76rem; color: var(--slate-500); text-transform: uppercase; letter-spacing: 0.02em; }
.profile-dropdown-switch-form { display: block; }
.profile-dropdown-switch-form button {
  width: 100%; text-align: left; border: none; background: none; cursor: pointer; font-family: var(--font-body);
  display: block; padding: 9px 10px; border-radius: var(--radius-md); font-size: 0.88rem; color: var(--indigo-600); font-weight: 600;
}
.profile-dropdown-switch-form button:hover { background: var(--indigo-50); }
.profile-dropdown-wide { min-width: 220px; max-height: 70vh; overflow-y: auto; }
.profile-dropdown-group { padding-top: 6px; border-top: 1px solid var(--slate-100); }
.profile-dropdown-group:first-child { padding-top: 0; border-top: none; }
.profile-dropdown-group .profile-dropdown-course { padding-bottom: 0; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--slate-900); border-radius: 2px; }

/* ---------------------------------------------------- flash ------------ */

.flash-stack { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.flash { padding: 13px 18px; border-radius: var(--radius-md); font-size: 0.92rem; font-weight: 500; }
.flash-success { background: var(--green-100); color: #166534; border: 1px solid #bbf7d0; }
.flash-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* ---------------------------------------------- premium utilities ------ */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease-premium), transform 0.7s var(--ease-premium); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

.floating-orbs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.floating-orb { position: absolute; border-radius: 50%; filter: blur(50px); opacity: 0.35; animation: premiumDrift 16s ease-in-out infinite; }
@keyframes premiumDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(26px, -20px) scale(1.08); }
}

/* Sitewide 3D tilt -- applied via JS (see main.js) to product/value/tracker/
   resource/stat/checkout/auth cards. The card tilts toward the cursor in
   real perspective space, echoing the depth of the homepage scroll-zoom
   everywhere cards show up, not just on the homepage. */
.tilt-3d { transform-style: preserve-3d; transition: transform 0.1s ease-out, box-shadow 0.3s var(--ease-premium), border-color 0.3s var(--ease-premium), background-color 0.3s var(--ease-premium); }

.glass-card {
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

/* ---------------------------------------------------- hero -------------- */

.hero {
  background: var(--lavender-200);
  border-bottom: 1px solid var(--slate-200);
  padding: 90px 0;
  text-align: center;
  position: relative;
}
.hero-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.hero h1 { font-family: var(--font-display); font-weight: 600; font-size: 2.8rem; letter-spacing: -0.01em; margin-bottom: 20px; }
.hero-sub { font-size: 1.08rem; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-bottom: 44px; }
.hero-trust { display: flex; gap: 36px; flex-wrap: wrap; justify-content: center; }
.hero-trust div { display: flex; flex-direction: column; align-items: center; }
.hero-trust .icon { width: 20px; height: 20px; color: var(--indigo-400); margin-bottom: 6px; }
.hero-trust strong { font-family: var(--font-heading); font-size: 1.5rem; color: var(--indigo-700); }
.hero-trust span { font-size: 0.82rem; color: var(--slate-600); }

/* ------------------------------------------------- hero progress visual --- */
/* A "live preview" of the progress tracker -- flanked by Classes/Revision
   chips the same way a planet illustration is flanked by its neighbours.
   The frame scales up slightly as the hero scrolls out of view (see
   updateHeroZoom in main.js), echoing a soft "zoom past it" transition. */

.hero-visual { position: relative; max-width: 640px; margin: 56px auto 0; }
.hero-visual-frame {
  position: relative;
  z-index: 1;
  overflow: hidden;
  text-align: left;
  max-width: 420px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--indigo-700), var(--indigo-500) 65%, var(--indigo-400));
  border-radius: var(--radius-xl);
  padding: 34px 32px 30px;
  box-shadow: var(--shadow-xl);
  transform: scale(var(--hero-zoom, 1));
  will-change: transform;
}
.hero-visual-stat {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.2rem;
  line-height: 1;
  color: var(--white);
  margin: 6px 0 6px;
}
.hero-visual-caption { color: var(--indigo-100); font-size: 0.9rem; margin-bottom: 28px; }

.hero-chart { position: relative; display: flex; align-items: flex-end; gap: 10px; height: 100px; }
.hero-chart-target { position: absolute; left: 0; right: 0; top: 18%; border-top: 2px dashed rgba(255, 255, 255, 0.35); }
.hero-chart-bar {
  flex: 1; min-width: 0; position: relative;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--white), var(--indigo-100));
  opacity: 0.82;
}
.hero-chart-bar-peak { opacity: 1; }
.hero-chart-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 26px; border-radius: 50%; background: var(--white); color: var(--indigo-600);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md);
}
.hero-chart-badge .icon { width: 15px; height: 15px; }

.hero-visual-badge {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white); color: var(--indigo-700);
  font-size: 0.82rem; font-weight: 700;
  padding: 10px 18px; border-radius: 999px;
  box-shadow: var(--shadow-md); white-space: nowrap; z-index: 2;
  opacity: var(--hero-badge-opacity, 1);
}
.hero-visual-badge .icon { width: 16px; height: 16px; color: var(--indigo-500); }
.hero-visual-badge-left { left: 0; }
.hero-visual-badge-right { right: 0; }

/* ---------------------------------------------------- pictorial icons --- */

.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; display: block; }
.icon-badge {
  width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--indigo-50); color: var(--indigo-600);
  transition: transform 0.35s var(--ease-premium), background-color 0.3s var(--ease-premium), color 0.3s var(--ease-premium);
}
.icon-badge .icon { width: 24px; height: 24px; }
.icon-badge-sm { width: 34px; height: 34px; border-radius: 10px; }
.icon-badge-sm .icon { width: 18px; height: 18px; }
.icon-badge-lg { width: 60px; height: 60px; border-radius: 18px; }
.icon-badge-lg .icon { width: 30px; height: 30px; }
.icon-badge-round { border-radius: 999px; }
.icon-badge-solid { background: var(--indigo-600); color: var(--white); }
.icon-badge-amber { background: var(--amber-100); color: #92400e; }
.icon-badge-green { background: var(--green-100); color: var(--green-600); }
.icon-badge-pink { background: #fae8ff; color: #a21caf; }
.icon-badge-slate { background: var(--slate-100); color: var(--slate-600); }

/* group-hover pulse: lift + slight rotate whenever the badge's card is hovered */
.product-card:hover .icon-badge,
.value-card:hover .icon-badge,
.tracker-card:hover .icon-badge-sm,
.resource-card:hover .icon-badge-sm,
.feature-row:hover .icon-badge { transform: scale(1.08) rotate(-4deg); }

/* ---------------------------------------------------- sections ---------- */

.section { padding: 88px 0; }
.section-tinted { background: var(--lavender-200); }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-family: var(--font-display); font-weight: 600; font-size: 2.2rem; margin-bottom: 14px; letter-spacing: -0.005em; }
.section-head p { font-size: 1.02rem; }

/* ------------------------------------------------------- legal ---------- */

.legal-content { max-width: 760px; margin: 0 auto; }
.legal-content .legal-updated { font-size: 0.88rem; color: var(--slate-400); margin-bottom: 36px; }
.legal-content h2 { font-size: 1.35rem; margin-top: 40px; margin-bottom: 14px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { margin-bottom: 14px; line-height: 1.7; }
.legal-content ul, .legal-content ol { margin: 0 0 14px; padding-left: 22px; color: var(--slate-600); line-height: 1.7; }
.legal-content li { margin-bottom: 8px; }
.legal-content li::marker { color: var(--indigo-500); }
.legal-content a { color: var(--indigo-600); text-decoration: underline; }
.legal-content strong { color: var(--slate-900); }

/* ---------------------------------------------------- products ---------- */

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.product-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s var(--ease-premium), box-shadow 0.3s var(--ease-premium), transform 0.3s var(--ease-premium);
}
.product-card:hover { border-color: var(--indigo-300, var(--indigo-400)); box-shadow: var(--shadow-glow); transform: translateY(-6px); }
.product-card-live { border-color: var(--indigo-500); border-width: 2px; }
.product-card h3 { font-size: 1.25rem; }
.product-card p { font-size: 0.92rem; flex-grow: 0; }
.product-features { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 8px; flex-grow: 1; }
.product-features li { font-size: 0.86rem; color: var(--slate-700); padding-left: 20px; position: relative; }
.product-features li::before { content: "✓"; position: absolute; left: 0; color: var(--indigo-600); font-weight: 700; }

.product-badge { align-self: flex-start; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
.badge-live { background: var(--indigo-600); color: var(--white); }
.badge-soon { background: var(--amber-100); color: #92400e; }

/* ---------------------------------------------------- tracker feature --- */

.tracker-copy-centered { max-width: 640px; margin: 0 auto; }

.feature-row { display: flex; gap: 18px; margin-bottom: 28px; }
.feature-row h4 { font-size: 1.05rem; margin-bottom: 6px; }
.feature-row p { font-size: 0.92rem; }

.progress-track { background: var(--slate-100); border-radius: 999px; height: 9px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--indigo-400), var(--indigo-600)); border-radius: 999px; transition: width 0.4s ease; }

/* ---------------------------------------------------- value grid -------- */

.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.value-card {
  background: var(--slate-50); border-radius: var(--radius-lg); padding: 28px; border: 1px solid var(--slate-200);
  transition: border-color 0.3s var(--ease-premium), box-shadow 0.3s var(--ease-premium), transform 0.3s var(--ease-premium), background-color 0.3s var(--ease-premium);
}
.value-card:hover { background: var(--white); border-color: var(--indigo-200); box-shadow: var(--shadow-glow); transform: translateY(-6px); }
.value-card .icon-badge { margin-bottom: 16px; }
.value-card h4 { font-size: 1.05rem; margin-bottom: 10px; }
.value-card p { font-size: 0.92rem; }

/* ---------------------------------------------------- cta band ---------- */

.cta-band { background: var(--indigo-700); padding: 70px 0; position: relative; overflow: hidden; }
.cta-band-inner { position: relative; z-index: 1; text-align: center; }
.cta-band h2 { font-family: var(--font-display); font-weight: 600; color: var(--white); font-size: 2rem; margin-bottom: 14px; }
.cta-band p { color: var(--indigo-100); margin-bottom: 28px; }

/* ---------------------------------------------------- footer ------------ */

.site-footer { background: var(--slate-900); padding: 56px 0 0; color: var(--slate-200); }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-brand { max-width: 320px; }
.footer-brand .brand-name { color: var(--white); margin-left: 8px; font-weight: 700; }
.footer-brand p { color: var(--slate-400); margin-top: 12px; font-size: 0.88rem; }
.footer-cols { display: flex; gap: 60px; }
.footer-cols h4 { color: var(--white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 14px; }
.footer-cols a { display: block; color: var(--slate-400); font-size: 0.9rem; margin-bottom: 10px; }
.footer-cols a:hover { color: var(--white); }
.soon-tag { font-size: 0.68rem; background: rgba(245,158,11,0.15); color: var(--amber-500); padding: 2px 7px; border-radius: 999px; margin-left: 6px; }
.footer-bottom { color: var(--slate-400); font-size: 0.82rem; padding: 20px 0; }

/* ---------------------------------------------------- auth pages -------- */

.auth-section { padding: 64px 0 96px; background: var(--lavender-200); min-height: calc(100vh - 72px); position: relative; overflow: hidden; }
.auth-section::before, .auth-section::after {
  content: ""; position: absolute; z-index: 0; border-radius: 50%; filter: blur(50px); opacity: 0.35; pointer-events: none;
  animation: premiumDrift 18s ease-in-out infinite;
}
.auth-section::before { width: 240px; height: 240px; background: var(--indigo-400); top: -70px; left: -60px; }
.auth-section::after { width: 190px; height: 190px; background: #f0abfc; bottom: -60px; right: -30px; animation-duration: 20s; animation-delay: -6s; }
.auth-wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.auth-wrap-narrow { grid-template-columns: 0.9fr 1fr; }
.auth-side h1 { font-family: var(--font-display); font-weight: 600; font-size: 2.2rem; margin-bottom: 16px; }
.auth-side p { font-size: 1rem; margin-bottom: 20px; }
.auth-points { display: flex; flex-direction: column; gap: 10px; }
.auth-points li { padding-left: 22px; position: relative; font-size: 0.92rem; color: var(--slate-700); }
.auth-points li::before { content: "✓"; position: absolute; left: 0; color: var(--indigo-600); font-weight: 700; }
.auth-points-pictorial { gap: 14px; margin-top: 6px; }
.auth-points-pictorial li { display: flex; align-items: center; gap: 12px; padding-left: 0; font-weight: 500; }
.auth-points-pictorial li::before { content: none; }
.auth-side-icon { margin-bottom: 18px; }

.auth-card {
  background: var(--white); border: 1px solid rgba(255, 255, 255, 0.8); border-radius: var(--radius-xl); padding: 40px;
  box-shadow: var(--shadow-xl); display: flex; flex-direction: column; gap: 16px; position: relative; z-index: 1;
}
.auth-card h2 { font-size: 1.35rem; margin-bottom: 4px; }

.field { display: flex; flex-direction: column; gap: 7px; font-size: 0.88rem; font-weight: 600; color: var(--slate-700); }
.field[hidden] { display: none; }
.field input, .field select {
  font-family: var(--font-body); font-size: 0.95rem; padding: 12px 14px;
  border: 1.5px solid var(--slate-200); border-radius: var(--radius-md);
  background: var(--slate-50); transition: border-color 0.15s ease, background-color 0.15s ease;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--indigo-500); background: var(--white); }

/* Native number-input spinner arrows look inconsistent across browsers -- drop them everywhere. */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

.time-picker { display: flex; align-items: center; gap: 4px; }
.time-picker select { flex: 1; min-width: 0; padding-left: 8px; padding-right: 8px; text-align: center; }
.time-picker-colon { font-weight: 700; color: var(--slate-500); }

.password-field { position: relative; display: flex; }
.password-field input { width: 100%; padding-right: 44px; }
.password-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; border-radius: var(--radius-md); cursor: pointer; color: var(--slate-400);
  transition: color 0.15s ease, background-color 0.15s ease;
}
.password-toggle:hover { color: var(--indigo-600); background: var(--indigo-50); }
.password-toggle svg { width: 19px; height: 19px; }
.password-toggle .icon-eye-off { display: none; }
.password-toggle[aria-pressed="true"] .icon-eye { display: none; }
.password-toggle[aria-pressed="true"] .icon-eye-off { display: block; }

.field-radio-group { border: none; padding: 0; margin: 0; }
.field-radio-group legend { padding: 0 0 8px; }
.radio-pill { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--slate-200); border-radius: 999px; padding: 9px 16px; margin-right: 10px; cursor: pointer; font-weight: 500; }
.radio-pill input { accent-color: var(--indigo-600); }
.radio-pill:has(input:checked) { border-color: var(--indigo-500); background: var(--indigo-50); color: var(--indigo-700); }

.auth-switch { text-align: center; font-size: 0.88rem; color: var(--slate-600); font-weight: 400; }
.auth-switch a { color: var(--indigo-600); font-weight: 600; }

/* ---------------------------------------------------- app / dashboard --- */

.page-app { background: var(--slate-50); }
.app-hero { background: linear-gradient(135deg, var(--indigo-800), var(--indigo-600)); padding: 52px 0 40px; position: relative; overflow: hidden; }
.app-hero::before, .app-hero::after {
  content: ""; position: absolute; z-index: 0; border-radius: 50%; filter: blur(50px); opacity: 0.3; pointer-events: none;
  animation: premiumDrift 18s ease-in-out infinite;
}
.app-hero::before { width: 220px; height: 220px; background: var(--indigo-400); top: -70px; left: -50px; }
.app-hero::after { width: 170px; height: 170px; background: #f0abfc; bottom: -60px; right: -30px; animation-duration: 20s; animation-delay: -6s; }
.app-hero .container { position: relative; z-index: 1; }
.app-hero h1 { font-family: var(--font-display); font-weight: 600; color: var(--white); font-size: 2rem; margin: 8px 0 6px; }
.app-hero p { color: var(--indigo-100); }
.app-hero .eyebrow { color: var(--indigo-200); }
.app-hero-compact { padding: 32px 0 30px; }
.back-link { display: inline-block; color: var(--indigo-100); font-size: 0.86rem; font-weight: 600; margin-bottom: 14px; }
.back-link:hover { color: var(--white); }

.dashboard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tracker-card {
  background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-lg);
  padding: 24px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s var(--ease-premium), transform 0.3s var(--ease-premium), border-color 0.3s var(--ease-premium);
}
.tracker-card:hover { box-shadow: var(--shadow-glow); transform: translateY(-4px); border-color: var(--indigo-200); }
.tracker-card-classes { border-color: var(--indigo-300, var(--indigo-200)); }
.tracker-card-top { display: flex; justify-content: space-between; align-items: center; }
.tracker-card-top h3 { font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.percent-pill { background: var(--indigo-50); color: var(--indigo-700); font-weight: 700; font-size: 0.82rem; padding: 4px 11px; border-radius: 999px; }
.tracker-card-meta { font-size: 0.84rem; }
.tracker-card-actions { display: flex; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.tracker-card-remove { margin-top: -4px; }
.link-danger { background: none; border: none; color: var(--red-600); font-size: 0.78rem; cursor: pointer; padding: 0; font-weight: 600; }
.link-danger:hover { text-decoration: underline; }

.tracker-card-top-right { display: flex; align-items: center; gap: 10px; }
.tracker-card-menu { position: relative; }
.tracker-card-menu-btn {
  background: none; border: none; cursor: pointer; font-size: 1.2rem; line-height: 1; color: var(--slate-500);
  padding: 4px 8px; border-radius: var(--radius-md);
}
.tracker-card-menu-btn:hover { background: var(--slate-100); color: var(--slate-700); }
.tracker-card-menu-dropdown {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 10; min-width: 190px;
  background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); display: flex; flex-direction: column; padding: 6px; gap: 2px;
}
.tracker-card-menu-dropdown[hidden] { display: none; }
.tracker-card-menu-dropdown a, .tracker-card-menu-dropdown button {
  display: block; width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  font-size: 0.86rem; font-weight: 600; color: var(--slate-700); padding: 8px 10px; border-radius: var(--radius-sm, 6px);
}
.tracker-card-menu-dropdown a:hover, .tracker-card-menu-dropdown button:hover { background: var(--slate-50); }
.tracker-card-menu-dropdown form { display: block; }
.tracker-card-menu-danger { color: var(--red-600) !important; }

.tracker-card-add { align-items: center; text-align: center; justify-content: center; border: 1.5px dashed var(--indigo-300, var(--indigo-200)); background: var(--indigo-50); gap: 10px; }

.tracker-section-spaced { margin-top: 36px; }

/* ------------------------------------------------------ tracker tab bar --- */

.tracker-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; border-bottom: 1px solid var(--slate-200); padding-bottom: 2px; }
.tracker-tab {
  background: none; border: none; border-bottom: 2.5px solid transparent; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 4px 12px; font-size: 0.92rem; font-weight: 600; color: var(--slate-500);
  margin-right: 18px; transition: color 0.15s, border-color 0.15s;
}
.tracker-tab .icon { width: 17px; height: 17px; transition: transform 0.3s var(--ease-premium); }
.tracker-tab:hover { color: var(--indigo-600); }
.tracker-tab:hover .icon { transform: translateY(-1px) scale(1.08); }
.tracker-tab.active { color: var(--indigo-700); border-bottom-color: var(--indigo-600); }

/* ---------------------------------------------------------- calendar UI --- */

.calendar-app { display: flex; gap: 24px; align-items: flex-start; }

.calendar-sidebar { width: 240px; flex-shrink: 0; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 24px; }
.calendar-new-btn { width: 100%; justify-content: center; font-size: 0.95rem; padding: 12px; border-radius: var(--radius-xl); }

.calendar-mine h4 { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--slate-500); margin: 0 0 10px 4px; }
.calendar-mine-list { display: flex; flex-direction: column; gap: 4px; }
.calendar-mine-item { display: flex; align-items: center; gap: 9px; padding: 6px 4px; border-radius: var(--radius-md); font-size: 0.86rem; color: var(--slate-700); cursor: pointer; }
.calendar-mine-item:hover { background: var(--slate-50); }
.calendar-mine-item input { accent-color: var(--indigo-600); }
.calendar-mine-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.calendar-main { flex: 1; min-width: 0; }

.calendar-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.calendar-toolbar h3 { font-size: 1.15rem; font-weight: 700; color: var(--slate-900); margin-right: auto; }
.calendar-chevron {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--slate-200); background: var(--white);
  cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--slate-600); font-size: 0.9rem;
}
.calendar-chevron:hover { background: var(--slate-50); border-color: var(--indigo-300, var(--indigo-200)); color: var(--indigo-600); }

.calendar-month-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 32px;
}
.calendar-day-heading { text-align: center; font-size: 0.76rem; font-weight: 700; color: var(--slate-500); text-transform: uppercase; letter-spacing: 0.03em; padding-bottom: 6px; }
.calendar-day-cell {
  min-height: 92px; border: 1px solid var(--slate-200); border-radius: var(--radius-md); background: var(--white);
  padding: 8px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left;
  cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s;
}
.calendar-day-cell:hover { border-color: var(--indigo-300, var(--indigo-200)); box-shadow: var(--shadow-sm); }
.calendar-day-outside { visibility: hidden; cursor: default; }
.calendar-day-today { border-color: var(--indigo-600); border-width: 2px; }
.calendar-day-number { font-weight: 700; font-size: 0.86rem; color: var(--slate-700); }
.calendar-day-number-today {
  background: var(--indigo-600); color: var(--white); width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 0.78rem;
}
.calendar-entry { display: block; width: 100%; font-size: 0.7rem; font-weight: 600; padding: 2px 7px; border-radius: 999px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Glassy status coloring for Target entries: indigo violet (own, pending),
   yellow (mentor/admin-assigned, pending), green (completed), red (missed
   -- a remark was written, or the date passed with neither). Applied via
   inline background/color/border-color from calendar.js's styleEntry(). */
.calendar-entry-glass {
  border: 1px solid transparent;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.tracker-comparison-wrap { margin-top: 28px; }
.tracker-comparison-delta-positive { color: var(--indigo-600); font-weight: 700; }
.tracker-comparison-delta-negative { color: var(--red-600); font-weight: 700; }

.calendar-modal {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); display: flex;
  align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
.calendar-modal[hidden] { display: none; }
.calendar-modal-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 28px; width: 100%; max-width: 420px;
  box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: 14px;
}
.calendar-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* ------------------------------------------------------- side panel --- */

.calendar-side-panel { position: fixed; inset: 0; z-index: 50; }
.calendar-side-panel[hidden] { display: none; }
.calendar-side-panel-backdrop {
  position: absolute; inset: 0; background: rgba(15, 23, 42, 0.35); opacity: 0; transition: opacity 0.22s ease;
}
.calendar-side-panel.open .calendar-side-panel-backdrop { opacity: 1; }
.calendar-side-panel-card {
  position: absolute; top: 0; right: 0; bottom: 0; width: 100%; max-width: 440px; background: var(--white);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; transform: translateX(100%);
  transition: transform 0.22s ease;
}
.calendar-side-panel.open .calendar-side-panel-card { transform: translateX(0); }
.calendar-panel-header {
  display: flex; align-items: center; justify-content: space-between; padding: 20px 24px;
  border-bottom: 1px solid var(--slate-200); flex-shrink: 0;
}
.calendar-panel-header h3 { font-size: 1.05rem; }
.calendar-panel-close {
  width: 32px; height: 32px; border-radius: 50%; border: none; background: none; cursor: pointer;
  color: var(--slate-500); font-size: 1.3rem; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.calendar-panel-close:hover { background: var(--slate-100); color: var(--slate-800); }
.calendar-panel-body { padding: 22px 24px 28px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.calendar-panel-body form { display: flex; flex-direction: column; gap: 14px; }
.calendar-panel-body form[hidden] { display: none; }

.calendar-day-item-list { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.calendar-day-item {
  display: flex; flex-direction: column; gap: 8px; border: 1px solid transparent;
  padding: 8px 10px; background: var(--slate-50); border-radius: var(--radius-md); font-size: 0.82rem; color: var(--slate-700);
}
.calendar-day-item-row { display: flex; align-items: center; gap: 10px; }
.calendar-day-item-label { flex-grow: 1; }
.calendar-day-item-dot { flex-shrink: 0; }
.calendar-day-item-remark { margin: 0; font-size: 0.78rem; font-style: italic; opacity: 0.85; }
.calendar-day-item-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.calendar-day-item-remark-form { display: flex; gap: 8px; }
.calendar-day-item-remark-form[hidden] { display: none; }
.calendar-day-item-remark-form input {
  flex: 1; min-width: 0; padding: 6px 10px; border: 1.5px solid var(--slate-200); border-radius: var(--radius-md);
  font-family: var(--font-body); font-size: 0.82rem;
}

.calendar-kind-toggle { display: flex; gap: 8px; margin-bottom: 4px; }
.calendar-kind-toggle button.active { background: var(--indigo-600); color: var(--white); }

.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; min-width: 0; }

/* --------------------------------------------------------- time select --- */

.time-select { position: relative; }
.time-select-trigger {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  border: 1.5px solid var(--slate-200); border-radius: var(--radius-md); background: var(--slate-50);
  font-family: var(--font-body); font-size: 0.9rem; color: var(--slate-700); cursor: pointer; text-align: left;
  transition: border-color 0.15s, background-color 0.15s;
}
.time-select-icon { width: 15px; height: 15px; flex-shrink: 0; color: var(--slate-400); }
.time-select-trigger:hover { border-color: var(--indigo-300, var(--indigo-200)); }
.time-select.open .time-select-trigger { border-color: var(--indigo-500); background: var(--white); box-shadow: 0 0 0 3px var(--indigo-100); }
.time-select-value { flex-grow: 1; }
.time-select-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); max-height: 220px; overflow-y: auto; padding: 6px;
}
.time-select-list { display: flex; flex-direction: column; gap: 1px; }
.time-select-option {
  border: none; background: none; text-align: left; padding: 7px 10px; border-radius: 7px;
  font-size: 0.86rem; color: var(--slate-700); cursor: pointer;
}
.time-select-option:hover { background: var(--indigo-50); }
.time-select-option.selected { background: var(--indigo-600); color: var(--white); }
.time-select-option-clear { color: var(--slate-400); font-style: italic; border-bottom: 1px solid var(--slate-100); margin-bottom: 4px; padding-bottom: 8px; }

.calendar-view-toggle { display: flex; gap: 8px; }
.calendar-view-toggle button.active { background: var(--indigo-600); color: var(--white); }

.calendar-week-grid { margin-bottom: 32px; }
.calendar-week-header, .calendar-week-allday-row {
  display: grid; grid-template-columns: 64px repeat(7, 1fr); gap: 1px;
}
.calendar-week-day-heading {
  text-align: center; font-size: 0.76rem; font-weight: 700; color: var(--slate-600);
  text-transform: uppercase; letter-spacing: 0.03em; padding: 10px 4px; border-bottom: 1px solid var(--slate-200);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.calendar-week-day-heading.calendar-day-today { color: var(--indigo-700); }
.calendar-week-day-num {
  font-size: 0.92rem; font-weight: 700; color: var(--slate-800); width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.calendar-week-day-num-today { background: var(--indigo-600); color: var(--white); }
.calendar-week-gutter, .calendar-week-time-gutter {
  font-size: 0.68rem; color: var(--slate-400); text-align: right; padding-right: 6px;
}
.calendar-week-allday-cell {
  min-height: 30px; border: 1px solid var(--slate-100); border-radius: var(--radius-sm, 6px);
  padding: 3px; display: flex; flex-wrap: wrap; gap: 3px; align-content: flex-start; cursor: pointer;
}
.calendar-week-allday-cell:hover { border-color: var(--indigo-200); }
.calendar-week-body {
  display: grid; grid-template-columns: 64px repeat(7, 1fr); gap: 1px;
  max-height: 576px; overflow-y: auto; border-top: 1px solid var(--slate-200); position: relative;
}
.calendar-week-hour-label { height: 48px; box-sizing: border-box; padding-top: 2px; }
.calendar-week-day-col { position: relative; border-left: 1px solid var(--slate-100); }
.calendar-week-hour-slot { height: 24px; box-sizing: border-box; border-bottom: 1px dashed var(--slate-100); cursor: pointer; }
.calendar-week-hour-slot:hover { background: var(--slate-50); }
.calendar-week-hour-slot:nth-child(2n) { border-bottom: 1px solid var(--slate-200); }
.calendar-week-entry {
  position: absolute; left: 2px; right: 2px; border-radius: 6px; font-size: 0.72rem; font-weight: 700;
  padding: 3px 7px 3px 9px; overflow: hidden; cursor: pointer; box-shadow: var(--shadow-sm); border-left: 3px solid transparent;
  line-height: 1.25;
}
.calendar-current-time-line { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--red-600); z-index: 5; }
.calendar-current-time-line::before {
  content: ""; position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--red-600);
}

/* -------------------------------------------------------- day timeline --- */

.calendar-day-agenda { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; }
.calendar-day-agenda-allday { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.calendar-day-agenda-empty { padding: 24px 0; }
.calendar-day-agenda-add { align-self: flex-start; margin-top: 6px; }

.calendar-day-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.calendar-day-timeline-item, .calendar-day-timeline-gap { display: flex; align-items: stretch; }
.calendar-day-timeline-item { cursor: pointer; }
.calendar-day-timeline-item.calendar-entry-glass { border-radius: var(--radius-md); margin-bottom: 4px; }
.calendar-day-timeline-rail { width: 26px; flex-shrink: 0; position: relative; }
.calendar-day-timeline-rail::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px;
  border-radius: 2px; background: var(--rail-color, var(--slate-200));
}
.calendar-day-timeline-dot {
  position: absolute; top: 4px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
  border: 3px solid var(--white); box-shadow: 0 0 0 1px var(--slate-200); z-index: 1;
}
.calendar-day-timeline-content { flex: 1; padding: 8px 16px 20px; border-radius: var(--radius-md); transition: background-color 0.15s; }
.calendar-day-timeline-item:hover .calendar-day-timeline-content { background: var(--slate-50); }
.calendar-day-timeline-time { display: block; font-size: 0.78rem; font-weight: 700; color: var(--slate-600); margin-bottom: 2px; }
.calendar-day-timeline-title { display: block; font-size: 0.94rem; font-weight: 700; }
.calendar-day-timeline-gap .calendar-day-timeline-content {
  display: flex; align-items: center; font-size: 0.76rem; color: var(--slate-400); font-style: italic; padding: 4px 16px 4px 0;
}

/* ---------------------------------------------------------- pomodoro --- */

.pomodoro-stage {
  position: relative; overflow: hidden; border-radius: var(--radius-xl); min-height: 620px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--indigo-100), var(--lavender-200), var(--indigo-50));
  background-size: 220% 220%; animation: pomodoroGradient 22s ease-in-out infinite;
  box-shadow: var(--shadow-lg);
}
.pomodoro-stage-custom-bg { background-size: cover; background-position: center; animation: none; }
.pomodoro-stage-custom-bg::after {
  content: ""; position: absolute; inset: 0; background: rgba(15, 23, 42, 0.28); backdrop-filter: blur(0px);
}
@keyframes pomodoroGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.pomodoro-orb {
  position: absolute; border-radius: 50%; filter: blur(40px); opacity: 0.55; z-index: 0;
  animation: pomodoroDrift 14s ease-in-out infinite;
}
.pomodoro-orb-1 { width: 260px; height: 260px; background: var(--indigo-400); top: -60px; left: -40px; animation-duration: 16s; }
.pomodoro-orb-2 { width: 200px; height: 200px; background: #f0abfc; top: 60%; right: -30px; animation-duration: 20s; animation-delay: -4s; }
.pomodoro-orb-3 { width: 160px; height: 160px; background: var(--amber-500); bottom: -40px; left: 30%; animation-duration: 18s; animation-delay: -8s; }
@keyframes pomodoroDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(24px, -18px) scale(1.08); }
}

.pomodoro-card {
  position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 18px;
  background: rgba(255, 255, 255, 0.72); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.5); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
  padding: 40px 48px; animation: pomodoroFloat 7s ease-in-out infinite;
}
@keyframes pomodoroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.pomodoro-mode-pill {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 6px 16px; border-radius: 999px; background: var(--indigo-100); color: var(--indigo-700);
}
.pomodoro-stage[data-mode="short"] .pomodoro-mode-pill { background: #ccfbf1; color: #0f766e; }
.pomodoro-stage[data-mode="long"] .pomodoro-mode-pill { background: var(--amber-100); color: #92400e; }

.pomodoro-ring-wrap { position: relative; width: 220px; height: 220px; }
.pomodoro-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.pomodoro-ring-track { fill: none; stroke: rgba(109, 40, 217, 0.12); stroke-width: 10; }
.pomodoro-ring-progress {
  fill: none; stroke: var(--indigo-600); stroke-width: 10; stroke-linecap: round;
  transition: stroke-dashoffset 0.25s linear;
}
.pomodoro-stage[data-mode="short"] .pomodoro-ring-progress { stroke: #0d9488; }
.pomodoro-stage[data-mode="long"] .pomodoro-ring-progress { stroke: var(--amber-500); }
.pomodoro-ring-center {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.pomodoro-time { font-family: var(--font-heading); font-size: 2.6rem; font-weight: 700; color: var(--slate-900); letter-spacing: 0.02em; }
.pomodoro-cycle-label { font-size: 0.8rem; color: var(--slate-500); font-weight: 600; }

.pomodoro-dots { display: flex; gap: 8px; }
.pomodoro-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--slate-200); transition: background-color 0.2s; }
.pomodoro-dot-filled { background: var(--indigo-600); }
.pomodoro-stage[data-mode="short"] .pomodoro-dot-filled { background: #0d9488; }
.pomodoro-stage[data-mode="long"] .pomodoro-dot-filled { background: var(--amber-500); }

.pomodoro-controls { display: flex; align-items: center; gap: 18px; }
.pomodoro-icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--slate-200); background: var(--white);
  display: flex; align-items: center; justify-content: center; color: var(--slate-600); cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s; box-shadow: var(--shadow-sm);
}
.pomodoro-icon-btn svg { width: 18px; height: 18px; }
.pomodoro-icon-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--indigo-600); }
.pomodoro-toggle-btn {
  width: 72px; height: 72px; border-radius: 50%; border: none; background: var(--indigo-600); color: var(--white);
  display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-md);
  transition: transform 0.15s, box-shadow 0.15s;
}
.pomodoro-toggle-btn svg { width: 26px; height: 26px; }
.pomodoro-toggle-btn:hover { transform: translateY(-2px) scale(1.03); box-shadow: var(--shadow-lg); }
.pomodoro-stage[data-mode="short"] .pomodoro-toggle-btn { background: #0d9488; }
.pomodoro-stage[data-mode="long"] .pomodoro-toggle-btn { background: var(--amber-500); }

.pomodoro-hint { font-size: 0.88rem; color: var(--slate-500); min-height: 1.2em; }

.pomodoro-settings-btn {
  position: absolute; top: 20px; right: 20px; z-index: 3; background: rgba(255, 255, 255, 0.75); backdrop-filter: blur(6px);
}

.pomodoro-settings-panel {
  position: absolute; top: 70px; right: 20px; z-index: 10; width: 300px; max-height: calc(100% - 90px); overflow-y: auto;
  background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 22px; padding-top: 44px;
  display: flex; flex-direction: column; gap: 12px;
}
.pomodoro-settings-panel h3 { font-size: 0.9rem; margin-top: 6px; }
.pomodoro-settings-panel h3:first-of-type { margin-top: 0; }
.pomodoro-settings-close { position: absolute; top: 10px; right: 10px; }
.pomodoro-settings-note { font-size: 0.78rem; color: var(--slate-500); margin: -4px 0 0; }
.pomodoro-checkbox-field { display: flex; align-items: center; gap: 8px; font-size: 0.86rem; color: var(--slate-700); }
.pomodoro-checkbox-field input { accent-color: var(--indigo-600); }
.pomodoro-settings-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pomodoro-upload-btn { cursor: pointer; }
.pomodoro-save-btn { width: 100%; justify-content: center; }

@media (max-width: 680px) {
  .pomodoro-stage { min-height: 520px; }
  .pomodoro-card { padding: 28px 22px; }
  .pomodoro-ring-wrap { width: 180px; height: 180px; }
  .pomodoro-time { font-size: 2.1rem; }
  .pomodoro-settings-panel { left: 12px; right: 12px; width: auto; top: 64px; }
}

.consistency-cell { justify-content: space-between; }
.consistency-cell-score { font-size: 0.72rem; font-weight: 700; align-self: flex-end; }
.consistency-cell-neutral { background: var(--white); }
.consistency-cell-poor { background: #fee2e2; border-color: #fca5a5; }
.consistency-cell-poor .consistency-cell-score { color: #b91c1c; }
.consistency-cell-fair { background: #fef3c7; border-color: #fcd34d; }
.consistency-cell-fair .consistency-cell-score { color: #92400e; }
.consistency-cell-good { background: var(--indigo-50); border-color: var(--indigo-200, var(--indigo-300)); }
.consistency-cell-good .consistency-cell-score { color: var(--indigo-700); }
.consistency-cell-perfect { background: var(--indigo-600); border-color: var(--indigo-600); }
.consistency-cell-perfect .consistency-cell-score, .consistency-cell-perfect .calendar-day-number { color: var(--white); }

.consistency-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px; font-size: 0.8rem; color: var(--slate-600); }
.consistency-legend span { display: flex; align-items: center; gap: 6px; }
.consistency-swatch { width: 12px; height: 12px; border-radius: 4px; display: inline-block; border: 1px solid var(--slate-200); }
.tracker-card-add-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--indigo-600); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 700; }
.tracker-card-add h3 { font-size: 1rem; }
.tracker-card-add p { font-size: 0.84rem; }

.resource-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; border-bottom: 1px solid var(--slate-200); padding-bottom: 2px; }
.resource-tab {
  background: none; border: none; border-bottom: 2.5px solid transparent; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 4px 12px; font-size: 0.92rem; font-weight: 600; color: var(--slate-500);
  margin-right: 18px; transition: color 0.15s, border-color 0.15s;
}
.resource-tab .icon { width: 17px; height: 17px; }
.resource-tab:hover { color: var(--indigo-600); }
.resource-tab.active { color: var(--indigo-700); border-bottom-color: var(--indigo-600); }
.resource-tab-panel { display: none; }
.resource-tab-panel.active { display: block; }

.attempt-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.attempt-tab {
  background: var(--slate-100); border: none; border-radius: 999px; cursor: pointer;
  padding: 8px 16px; font-size: 0.84rem; font-weight: 600; color: var(--slate-600);
  transition: background-color 0.15s, color 0.15s;
}
.attempt-tab:hover { background: var(--indigo-100); color: var(--indigo-700); }
.attempt-tab.active { background: var(--indigo-600); color: var(--white); }
.attempt-panel { display: none; }
.attempt-panel.active { display: block; }

.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.resource-card {
  background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-lg);
  padding: 20px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-sm);
  transition: border-color 0.3s var(--ease-premium), box-shadow 0.3s var(--ease-premium), transform 0.3s var(--ease-premium);
}
.resource-card:hover { border-color: var(--indigo-300, var(--indigo-200)); box-shadow: var(--shadow-glow); transform: translateY(-5px); }
.resource-card h3 { font-size: 0.96rem; color: var(--slate-800); flex-grow: 1; }
.resource-card-cta { font-size: 0.84rem; font-weight: 700; color: var(--indigo-600); }

.resource-viewer-card { max-width: 900px; margin: 0 auto; }
.resource-viewer-frame {
  width: 100%; height: 80vh; border: 1px solid var(--slate-200); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); background: var(--white);
}

/* ---------------------------------------------------- checklist --------- */

.checklist-panel { max-width: 720px; margin: 0 auto; background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-sm); }
.checklist-summary { margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid var(--slate-200); }
.checklist-summary-row { display: flex; justify-content: space-between; align-items: center; margin: 10px 0 16px; font-size: 0.9rem; color: var(--slate-700); font-weight: 500; }

.checklist-check {
  width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--slate-200); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s ease; background: var(--white);
}
input:checked ~ .checklist-check { background: var(--indigo-600); border-color: var(--indigo-600); }
input:checked ~ .checklist-check::after { content: "✓"; color: var(--white); font-size: 0.8rem; font-weight: 700; }

.add-topic-form { display: flex; gap: 10px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--slate-200); }
.add-topic-form input { flex-grow: 1; padding: 11px 14px; border: 1.5px solid var(--slate-200); border-radius: var(--radius-md); font-size: 0.9rem; background: var(--slate-50); }
.add-topic-form input:focus { outline: none; border-color: var(--indigo-500); background: var(--white); }

.empty-note { font-size: 0.88rem; color: var(--slate-400); font-style: italic; padding: 10px 0; }

/* ------------------------------------------------------- subject list --- */

.subject-list { display: flex; flex-direction: column; gap: 4px; }
.subject-row-link { display: block; padding: 16px 14px; border-radius: var(--radius-md); transition: background-color 0.3s var(--ease-premium), transform 0.3s var(--ease-premium); }
.subject-row-link:hover { background: var(--slate-50); transform: translateX(4px); }
.subject-row-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.subject-row-name { font-weight: 600; font-size: 1rem; color: var(--slate-900); }
.subject-row-meta { display: block; margin-top: 8px; font-size: 0.82rem; color: var(--slate-600); }

/* --------------------------------------------------------- chapter list --- */

.chapter-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.chapter-card {
  border: 1px solid var(--slate-200); border-radius: var(--radius-md); padding: 18px 20px; background: var(--slate-50);
  transition: box-shadow 0.3s var(--ease-premium), border-color 0.3s var(--ease-premium);
}
.chapter-card:hover { box-shadow: var(--shadow-sm); border-color: var(--indigo-200); }
.chapter-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.chapter-name { font-weight: 600; font-size: 0.98rem; color: var(--slate-900); }
a.chapter-name { text-decoration: none; }
a.chapter-name:hover { color: var(--indigo-600); }
.percent-pill-sm { font-size: 0.74rem; padding: 3px 9px; margin-right: auto; margin-left: 10px; }

.chapter-hours-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.chapter-hours-readout { font-size: 0.85rem; color: var(--slate-700); font-weight: 500; }
.chapter-percent-label { margin-left: auto; font-weight: 700; color: var(--indigo-700); font-size: 0.88rem; }

.add-chapter-form { display: flex; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.add-chapter-form input {
  padding: 11px 14px; border: 1.5px solid var(--slate-200); border-radius: var(--radius-md);
  font-size: 0.9rem; background: var(--slate-50);
}
.add-chapter-form input:focus { outline: none; border-color: var(--indigo-500); background: var(--white); }
.add-chapter-form input[name="name"] { flex-grow: 1; min-width: 160px; }
.add-chapter-form input[name="target_hours"] { width: 130px; }

/* ----------------------------------------------------------- targets --- */

.target-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.target-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px dashed var(--slate-200); }
.target-row:last-child { border-bottom: none; }
.target-checkbox-label { display: flex; cursor: pointer; }
.target-checkbox-label input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.target-info { flex-grow: 1; display: flex; flex-direction: column; gap: 2px; }
.target-concept { font-size: 0.92rem; color: var(--slate-700); }
.target-row:has(input:checked) .target-concept { color: var(--slate-400); text-decoration: line-through; }
.target-deadline { font-size: 0.76rem; color: var(--amber-500); font-weight: 600; }
.target-row:has(input:checked) .target-deadline { color: var(--slate-400); }

.link-danger-sm { font-size: 0.72rem; }

.static-check {
  width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--slate-200); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: transparent; font-size: 0.72rem; font-weight: 700;
}
.static-check.is-done { background: var(--indigo-600); border-color: var(--indigo-600); color: var(--white); }

.add-target-form { display: flex; gap: 8px; flex-wrap: wrap; }
.add-target-form input {
  padding: 9px 12px; border: 1.5px solid var(--slate-200); border-radius: var(--radius-md);
  font-size: 0.86rem; background: var(--white);
}
.add-target-form input:focus { outline: none; border-color: var(--indigo-500); }
.add-target-form input[name="concept"] { flex-grow: 1; min-width: 160px; }
.add-target-form input[name="complete_by"] { width: 150px; }

/* -------------------------------------------------------------- syllabus --- */

.syllabus-board { display: flex; gap: 20px; align-items: flex-start; overflow-x: auto; padding-bottom: 8px; }
.syllabus-col {
  flex: 0 0 240px; background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-lg);
  padding: 18px; box-shadow: var(--shadow-sm);
}
.syllabus-col h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--slate-400); margin-bottom: 12px; }
.syllabus-pick-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; max-height: 340px; overflow-y: auto; }
.syllabus-pick-row { display: flex; align-items: center; gap: 6px; }
.syllabus-pick {
  display: block; flex-grow: 1; padding: 9px 10px; border-radius: var(--radius-md); font-size: 0.88rem;
  color: var(--slate-700); transition: background-color 0.2s var(--ease-premium);
}
.syllabus-pick:hover { background: var(--slate-50); }
.syllabus-pick.active { background: var(--indigo-50); color: var(--indigo-700); font-weight: 600; }
.syllabus-add-form { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--slate-200); }
.syllabus-add-form input {
  padding: 9px 11px; border: 1.5px solid var(--slate-200); border-radius: var(--radius-md);
  font-size: 0.86rem; background: var(--slate-50); width: 100%;
}
.syllabus-add-form input:focus { outline: none; border-color: var(--indigo-500); background: var(--white); }

/* --------------------------------------------------------------- checkout --- */

.checkout-layout { display: flex; flex-direction: column; gap: 24px; max-width: 560px; margin: 0 auto; }
.checkout-layout.has-summary { max-width: 1000px; flex-direction: row; align-items: flex-start; }
.checkout-layout.has-summary .checkout-details-card { flex: 1 1 56%; min-width: 0; }
.checkout-layout.has-summary .checkout-summary-card { flex: 1 1 40%; min-width: 0; position: sticky; top: 96px; }

.checkout-card {
  background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-lg); padding: 32px;
  box-shadow: var(--shadow-md); transition: box-shadow 0.3s var(--ease-premium);
}

.checkout-course-row {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--slate-200);
  font-weight: 600; font-size: 0.9rem; color: var(--slate-700);
}
.checkout-course-badge { background: var(--indigo-50); color: var(--indigo-700); padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 0.85rem; }
.checkout-form { display: flex; flex-direction: column; gap: 20px; }
.checkout-fields-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; }

.select-wrap { position: relative; }
.select-wrap select {
  width: 100%; appearance: none; -webkit-appearance: none; cursor: pointer;
  font-family: var(--font-body); font-size: 0.95rem; padding: 12px 40px 12px 14px;
  border: 1.5px solid var(--slate-200); border-radius: var(--radius-md); background: var(--slate-50);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.select-wrap select:focus { outline: none; border-color: var(--indigo-500); background: var(--white); }
.select-wrap::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--slate-400); border-bottom: 2px solid var(--slate-400);
  transform: translateY(-65%) rotate(45deg); pointer-events: none;
}

.option-card-list { display: flex; flex-direction: column; gap: 10px; }
.option-card {
  position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px;
  border: 1.5px solid var(--slate-200); border-radius: var(--radius-md);
  padding: 14px 16px; cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.option-card:hover { border-color: var(--indigo-400); }
.option-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.option-card-radio {
  width: 18px; height: 18px; border-radius: 999px; border: 2px solid var(--slate-300); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; transition: border-color 0.15s ease;
}
.option-card-radio::after {
  content: ""; width: 9px; height: 9px; border-radius: 999px; background: var(--indigo-600);
  transform: scale(0); transition: transform 0.15s ease;
}
.option-card:has(input:checked) { border-color: var(--indigo-500); background: var(--indigo-50); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08); }
.option-card:has(input:checked) .option-card-radio { border-color: var(--indigo-600); }
.option-card:has(input:checked) .option-card-radio::after { transform: scale(1); }
.option-card-label { font-weight: 600; color: var(--slate-800); flex: 1; }
.option-card-price { font-weight: 700; color: var(--indigo-700); font-size: 0.92rem; }
.option-card-coupon-hint { flex-basis: 100%; margin-left: 30px; font-size: 0.78rem; color: var(--green-600); font-weight: 600; }

.checkout-price-preview {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; background: var(--indigo-50); border-radius: var(--radius-md);
  font-weight: 600; color: var(--slate-700);
}
.checkout-price-preview strong { color: var(--indigo-700); font-size: 1.15rem; }

.coupon-input-row { display: flex; gap: 8px; }
.coupon-input-row input { flex: 1; min-width: 0; }
.coupon-input-row button { flex-shrink: 0; }

.checkout-amount-hero {
  display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(135deg, var(--indigo-600), var(--indigo-800));
  color: var(--white); padding: 20px 22px; border-radius: var(--radius-md); margin-bottom: 22px;
}
.checkout-amount-hero span { font-size: 0.78rem; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.checkout-amount-hero strong { font-size: 1.6rem; font-family: var(--font-heading); }

.report-facts.checkout-summary-facts { grid-template-columns: 1fr; margin-bottom: 18px; }
.checkout-error { color: var(--red-600); font-size: 0.85rem; margin-top: 10px; text-align: center; min-height: 1.2em; }

@media (max-width: 860px) {
  .checkout-layout.has-summary { flex-direction: column; max-width: 560px; }
  .checkout-layout.has-summary .checkout-summary-card { position: static; }
}

/* --------------------------------------------------------------- schedule --- */

.panel-heading { font-size: 1.05rem; margin-bottom: 16px; }
.panel-heading-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.panel-heading-row .panel-heading { margin-bottom: 0; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card {
  background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-lg);
  padding: 20px; text-align: center;
  transition: box-shadow 0.3s var(--ease-premium), transform 0.3s var(--ease-premium);
}
.stat-card:hover { box-shadow: var(--shadow-glow); transform: translateY(-4px); }
.stat-card strong { display: block; font-family: var(--font-heading); font-size: 1.8rem; color: var(--indigo-700); }
.stat-card span { font-size: 0.82rem; color: var(--slate-600); }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.admin-table th { text-align: left; padding: 10px 8px; border-bottom: 2px solid var(--slate-200); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--slate-500); white-space: nowrap; }
.admin-table td { padding: 12px 8px; border-bottom: 1px solid var(--slate-200); vertical-align: middle; }
.admin-table-actions { display: flex; gap: 12px; white-space: nowrap; }
.admin-table-actions a { color: var(--indigo-600); font-weight: 600; }
.admin-table-actions a:hover { text-decoration: underline; }

.assign-mentor-form select {
  padding: 8px 10px; border: 1.5px solid var(--slate-200); border-radius: var(--radius-md);
  font-size: 0.85rem; background: var(--slate-50); font-family: var(--font-body);
}
.assign-mentor-form select:focus { outline: none; border-color: var(--indigo-500); }
.google-connect-panel { border-left: 3px solid var(--indigo-500); }
.google-connect-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.google-connect-row .panel-heading { margin-bottom: 4px; }
.field-hint { display: block; font-size: 0.78rem; color: var(--slate-400); margin-top: 6px; font-weight: 400; }

.consent-checkbox { display: flex; align-items: flex-start; gap: 9px; font-size: 0.86rem; color: var(--slate-600); cursor: pointer; margin: 14px 0; }
.consent-checkbox input { accent-color: var(--indigo-600); margin-top: 3px; flex-shrink: 0; }
.consent-checkbox a { color: var(--indigo-600); text-decoration: underline; }

.student-list, .session-list { display: flex; flex-direction: column; gap: 4px; }
.student-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 10px; border-bottom: 1px solid var(--slate-200);
}
.student-row:last-child { border-bottom: none; }
.student-name { display: block; font-weight: 600; font-size: 0.95rem; color: var(--slate-900); }
.student-meta { display: block; font-size: 0.8rem; color: var(--slate-500); margin-top: 2px; }
.student-row-actions { display: flex; gap: 10px; }

.session-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 16px 10px; border-bottom: 1px solid var(--slate-200); flex-wrap: wrap;
  border-radius: var(--radius-md); transition: background-color 0.3s var(--ease-premium);
}
.session-row:last-child { border-bottom: none; }
.session-row:hover { background: var(--slate-50); }
.session-row-main { display: flex; flex-direction: column; gap: 4px; }
.session-topic { font-weight: 600; font-size: 0.95rem; color: var(--slate-900); }
.session-meta { font-size: 0.8rem; color: var(--slate-500); word-break: break-all; }
.session-status-cancelled .session-topic { color: var(--slate-400); text-decoration: line-through; }
.session-row-action { display: flex; align-items: center; gap: 10px; }
.session-row-action-col { flex-direction: column; align-items: stretch; gap: 8px; min-width: 200px; }

.set-link-form { display: flex; gap: 8px; }
.set-link-form input {
  flex-grow: 1; padding: 8px 10px; border: 1.5px solid var(--slate-200); border-radius: var(--radius-md);
  font-size: 0.82rem; background: var(--slate-50);
}
.set-link-form input:focus { outline: none; border-color: var(--indigo-500); background: var(--white); }

.add-session-form { display: flex; gap: 10px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--slate-200); flex-wrap: wrap; }
.add-session-form input {
  padding: 11px 14px; border: 1.5px solid var(--slate-200); border-radius: var(--radius-md);
  font-size: 0.9rem; background: var(--slate-50);
}
.add-session-form input:focus { outline: none; border-color: var(--indigo-500); background: var(--white); }
.add-session-form input[name="topic"] { flex-grow: 1; min-width: 180px; }
.add-session-form input[name="duration_minutes"] { width: 110px; }

/* ------------------------------------------------------------------ chat --- */

.chat-panel { display: flex; flex-direction: column; height: 68vh; min-height: 420px; padding: 0; overflow: hidden; }
.chat-header {
  display: flex; align-items: center; gap: 12px; padding: 16px 22px;
  border-bottom: 1px solid var(--slate-200); flex-shrink: 0;
}
.chat-header-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--indigo-600); color: var(--white);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; flex-shrink: 0;
}
.chat-header-name { font-weight: 700; font-size: 0.98rem; color: var(--slate-900); }
.chat-header-role { font-size: 0.78rem; color: var(--slate-500); }

.chat-thread { flex: 1; overflow-y: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.chat-bubble-row { display: flex; }
.chat-bubble-row-mine { justify-content: flex-end; }
.chat-bubble {
  max-width: 72%; padding: 10px 14px; border-radius: var(--radius-lg); font-size: 0.9rem; line-height: 1.45;
  background: var(--slate-100); color: var(--slate-800); word-break: break-word;
}
.chat-bubble-row-mine .chat-bubble { background: var(--indigo-600); color: var(--white); border-bottom-right-radius: 4px; }
.chat-bubble-row:not(.chat-bubble-row-mine) .chat-bubble { border-bottom-left-radius: 4px; }
.chat-bubble-meta { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 4px; }
.chat-bubble-row:not(.chat-bubble-row-mine) .chat-bubble-meta { justify-content: flex-start; }
.chat-bubble-time { font-size: 0.68rem; opacity: 0.7; }
.chat-ticks { display: inline-flex; color: rgba(255, 255, 255, 0.55); flex-shrink: 0; }
.chat-ticks svg { width: 15px; height: 11px; display: block; }
.chat-ticks-read { color: var(--indigo-200); }
.chat-bubble-sender {
  display: block; margin-bottom: 2px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.03em; opacity: 0.65;
}

/* -------------------------------------------------- WhatsApp-style chat list --- */

.chat-list-panel { padding: 0; overflow: hidden; }
.chat-list { list-style: none; margin: 0; padding: 0; }
.chat-list li { border-bottom: 1px solid var(--slate-100); }
.chat-list li:last-child { border-bottom: none; }
.chat-list-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; color: inherit; transition: background-color 0.15s; }
.chat-list-row:hover { background: var(--slate-50); }
.chat-list-avatar {
  width: 46px; height: 46px; border-radius: 50%; background: var(--indigo-600); color: var(--white);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; flex-shrink: 0;
}
.chat-list-main { flex: 1; min-width: 0; }
.chat-list-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.chat-list-name { font-weight: 700; font-size: 0.96rem; color: var(--slate-900); }
.chat-list-time { font-size: 0.74rem; color: var(--slate-400); flex-shrink: 0; }
.chat-list-row-unread .chat-list-time { color: var(--indigo-600); font-weight: 700; }
.chat-list-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 3px; }
.chat-list-preview { font-size: 0.86rem; color: var(--slate-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chat-list-row-unread .chat-list-preview { color: var(--slate-800); font-weight: 600; }
.chat-list-badge {
  background: var(--indigo-600); color: var(--white); font-size: 0.72rem; font-weight: 700;
  border-radius: 999px; min-width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
  padding: 0 6px; flex-shrink: 0;
}

.chat-composer { display: flex; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--slate-200); flex-shrink: 0; }
.chat-composer input {
  flex-grow: 1; padding: 12px 16px; border: 1.5px solid var(--slate-200); border-radius: 999px;
  font-size: 0.92rem; background: var(--slate-50);
}
.chat-composer input:focus { outline: none; border-color: var(--indigo-500); background: var(--white); }

.chat-unread-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 999px; background: var(--red-600); color: var(--white);
  font-size: 0.66rem; font-weight: 700; margin-left: 6px; line-height: 1;
}

/* --------------------------------------------------------- report chapters --- */

.report-subject { margin: 30px 0; }
.report-subject-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.report-subject-head h3 { font-size: 1.05rem; }

/* ---------------------------------------------------- report ------------ */

.report-section { padding: 48px 0 88px; }
.report-toolbar { display: flex; justify-content: space-between; align-items: center; max-width: 780px; margin: 0 auto 20px; }
.report-sheet { max-width: 780px; margin: 0 auto; background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-lg); padding: 48px; box-shadow: var(--shadow-sm); }
.report-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 22px; border-bottom: 2px solid var(--slate-900); margin-bottom: 28px; }
.report-header .brand-name { margin-left: 8px; font-family: var(--font-heading); font-weight: 700; }
.report-meta { font-size: 0.82rem; color: var(--slate-500); }
.report-title { font-size: 1.5rem; margin-bottom: 22px; }
.report-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 30px; margin: 0 0 24px; }
.report-facts div { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--slate-200); padding-bottom: 8px; }
.report-facts dt { color: var(--slate-500); font-size: 0.86rem; }
.report-facts dd { margin: 0; font-weight: 600; font-size: 0.9rem; }
.report-progress { margin-bottom: 28px; height: 12px; }
.report-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.report-table th { text-align: left; padding: 10px 8px; border-bottom: 2px solid var(--slate-900); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--slate-600); }
.report-table td { padding: 12px 8px; border-bottom: 1px solid var(--slate-200); }
.status-chip { font-size: 0.78rem; font-weight: 700; padding: 4px 11px; border-radius: 999px; }
.status-done { background: var(--green-100); color: #166534; }
.status-pending { background: var(--slate-100); color: var(--slate-600); }
.report-footer-note { margin-top: 26px; font-size: 0.8rem; color: var(--slate-400); font-style: italic; }

@media print {
  .no-print, .site-header, .site-footer, .flash-stack { display: none !important; }
  body { background: var(--white); }
  .report-sheet { box-shadow: none; border: none; padding: 0; }
  .report-section { padding: 0; }
}

/* ---------------------------------------------------- responsive -------- */

@media (max-width: 960px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .value-grid { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .resource-grid { grid-template-columns: repeat(2, 1fr); }
  .calendar-app { flex-direction: column; }
  .calendar-sidebar { width: 100%; position: static; flex-direction: row; align-items: flex-start; flex-wrap: wrap; }
  .calendar-mine { flex: 1; min-width: 180px; }
  .calendar-new-btn { width: auto; order: -1; flex-basis: 100%; }
}

@media (max-width: 680px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 72px; left: 0; right: 0; background: var(--white);
    flex-direction: column; align-items: stretch; padding: 18px 24px; gap: 16px;
    border-bottom: 1px solid var(--slate-200); box-shadow: var(--shadow-md);
    display: none;
  }
  .site-nav.open { display: flex; }
  .nav-cta, .nav-cta-ghost { text-align: center; }

  .hero h1 { font-size: 2rem; }
  .hero-visual-badge { display: none; }
  .product-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .resource-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .footer-cols { gap: 40px; }
  .auth-card { padding: 28px; }
  .checklist-panel, .report-sheet, .checkout-card { padding: 22px; }
  .report-facts { grid-template-columns: 1fr; }
  .calendar-sidebar { flex-direction: column; }
  .calendar-side-panel-card { max-width: 100%; }
}
