/* ==========================================================================
   The Puzzle Method — Student Portal v4
   Measured against live Eden (272px sidebar, 1280px stage, Geist, .surface-raised)
   and Stripe Sail (clean light mode, #F4F7FA offset, #D4DEE9 borders, #1A2C44 ink).
   ========================================================================== */

:root,
[data-theme="dark"] {
  --bg-base: #15121B;
  --bg-sidebar: #1B1722;
  --bg-surface: rgba(240, 243, 251, 0.055);
  --bg-surface-solid: #1E1A26;
  --bg-surface-2: rgba(255, 255, 255, 0.06);
  --bg-hover: rgba(255, 255, 255, 0.085);
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(211, 174, 235, 0.34);

  --lavender: #D3AEEB;
  --lavender-soft: rgba(211, 174, 235, 0.14);
  --text-primary: rgba(255, 255, 255, 0.92);
  --text-secondary: rgba(255, 255, 255, 0.65);
  --text-muted: rgba(255, 255, 255, 0.42);
  --input-bg: rgba(0, 0, 0, 0.28);

  --surface-shadow: 0 22px 44px -18px rgba(0, 0, 0, 0.78), 0 2px 6px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.09);
  --surface-shadow-hover: 0 28px 54px -16px rgba(0, 0, 0, 0.88), 0 0 0 1px rgba(211, 174, 235, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14);

  --mint: #6fd5a5;
  --mint-bg: rgba(111, 213, 165, 0.16);
  --amber: #dcab6f;
  --amber-bg: rgba(220, 171, 111, 0.16);
  --sky: #74B3F7;
  --sky-bg: rgba(116, 179, 247, 0.16);
  --coral: #d17866;
  --coral-bg: rgba(209, 120, 102, 0.18);
  --acai: #c48fe3;
  --acai-bg: rgba(168, 90, 136, 0.22);
}

[data-theme="light"] {
  --bg-base: #FAF8FC;
  --bg-sidebar: #FFFFFF;
  --bg-surface: #FFFFFF;
  --bg-surface-solid: #FFFFFF;
  --bg-surface-2: #F3EFF8;
  --bg-hover: #EFEAF6;
  --border-subtle: rgba(20, 13, 28, 0.10);
  --border-strong: rgba(130, 73, 181, 0.36);

  --lavender: #8249B5;
  --lavender-soft: rgba(130, 73, 181, 0.11);
  --text-primary: #140D1C;
  --text-secondary: #433952;
  --text-muted: #726782;
  --input-bg: #FFFFFF;

  --surface-shadow: 0 1px 2px rgba(20, 13, 28, 0.05), 0 8px 24px -10px rgba(84, 48, 120, 0.10);
  --surface-shadow-hover: 0 6px 20px -6px rgba(84, 48, 120, 0.18), 0 0 0 1px rgba(130, 73, 181, 0.28);

  --mint: #137A4D;
  --mint-bg: rgba(22, 130, 83, 0.11);
  --amber: #9E630B;
  --amber-bg: rgba(220, 171, 111, 0.18);
  --sky: #1E61B8;
  --sky-bg: rgba(30, 97, 184, 0.11);
  --coral: #B84A39;
  --coral-bg: rgba(209, 120, 102, 0.16);
  --acai: #7D3C98;
  --acai-bg: rgba(168, 90, 136, 0.14);
}

:root {
  --font-ui: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;
  --font-serif: 'EB Garamond', Georgia, serif;
  --sidebar-width: 272px;
  --ease: cubic-bezier(0.2, 0.75, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Eden Half-Moon Background Gradient across ALL pages (Login, Student, Coach) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 80% 65% at 0% 0%, rgba(211, 174, 235, 0.14) 0%, rgba(180, 180, 188, 0.045) 42%, transparent 78%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(111, 213, 165, 0.06) 0%, transparent 70%);
  z-index: 0;
}
[data-theme="light"] body::before {
  background-image:
    radial-gradient(ellipse 80% 65% at 0% 0%, rgba(114, 65, 163, 0.09) 0%, rgba(114, 65, 163, 0.025) 45%, transparent 78%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(22, 130, 83, 0.04) 0%, transparent 70%);
}
#app { position: relative; z-index: 1; }

.tnum { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.serif-accent { font-family: var(--font-serif); font-style: italic; font-weight: 500; color: var(--lavender); }

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(28px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes beaconPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(211, 174, 235, 0.55); transform: scale(1); }
  50% { box-shadow: 0 0 0 7px rgba(211, 174, 235, 0); transform: scale(1.12); }
}
@keyframes floatGentle {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(3deg); }
}
.fade-in { animation: fadeIn 0.35s var(--ease) both; }
.slide-in { animation: slideInRight 0.3s var(--ease) both; }

/* Live Pulse Beacon (Next Class & Active Improvements) */
.live-beacon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lavender);
  display: inline-block;
  animation: beaconPulse 2.1s ease-in-out infinite;
}
.next-class-strip {
  position: relative;
  overflow: hidden;
}
.next-class-puzzle-deco {
  position: absolute;
  right: 160px;
  top: -12px;
  color: var(--lavender);
  opacity: 0.08;
  pointer-events: none;
  animation: floatGentle 7s ease-in-out infinite;
}

/* Notification Bell + Panel */
.notif-btn {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: border-color 0.15s, color 0.15s;
}
.notif-btn:hover { border-color: var(--lavender); color: var(--text-primary); }
.notif-dot {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
  animation: beaconPulse 2s ease-in-out infinite;
}
.notif-drawer {
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: var(--surface-shadow-hover);
}

/* Habit Cards: Separate Total vs Translucent Skill Tints + 28-Day Heatmap */
.habits-split-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
.habit-total-card {
  background: linear-gradient(155deg, rgba(211, 174, 235, 0.14) 0%, var(--bg-surface) 100%);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--surface-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.habit-skills-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.habit-skill-card {
  text-align: left;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid var(--border-subtle);
  transition: transform 0.15s, border-color 0.15s;
}
.habit-skill-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.habit-skill-card.active { border-color: var(--lavender); }
.skill-tint-lavender { background: rgba(211, 174, 235, 0.08); }
.skill-tint-sky { background: rgba(116, 179, 247, 0.08); }
.skill-tint-mint { background: rgba(111, 213, 165, 0.08); }
.skill-tint-amber { background: rgba(220, 171, 111, 0.08); }

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}
.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 5px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  transition: transform 0.12s;
}
.heatmap-cell:hover { transform: scale(1.15); }
.heat-1 { background: rgba(111, 213, 165, 0.25); }
.heat-2 { background: rgba(111, 213, 165, 0.50); }
.heat-3 { background: rgba(111, 213, 165, 0.85); }

/* Vocab Flashcard */
.flashcard-box {
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 34px 28px;
  text-align: center;
  box-shadow: var(--surface-shadow);
  cursor: pointer;
  transition: transform 0.2s var(--ease);
}
.flashcard-box:hover { transform: translateY(-2px); }

/* Weekly Calendar Grid */
.week-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}
.week-cal-day {
  background: var(--bg-surface);
  border-radius: 14px;
  padding: 12px;
  min-height: 150px;
  box-shadow: var(--surface-shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.week-cal-day.today { border: 1px solid var(--lavender); }
.cal-event-pill {
  padding: 8px 9px;
  border-radius: 8px;
  font-size: 12px;
  border-left: 3px solid var(--lavender);
  background: var(--lavender-soft);
}
.cal-event-pill.masterclass {
  border-left-color: var(--mint);
  background: var(--mint-bg);
}

/* Community Reactions & Author Header */
.comm-author-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.comm-avatar {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--lavender-soft);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  color: var(--lavender);
}
.comm-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint);
  border: 2px solid var(--bg-surface-solid);
}
.reaction-rail { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.react-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: transform 0.12s, border-color 0.12s, background 0.12s;
}
.react-pill:hover { transform: scale(1.05); border-color: var(--lavender); color: var(--text-primary); }
.react-pill.reacted { background: var(--lavender-soft); border-color: var(--lavender); color: var(--lavender); }

/* Group Classes: Live Event Stage / Cinema Layout */
.cinema-stage {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 34px 32px;
  background: radial-gradient(circle at 80% 15%, rgba(211, 174, 235, 0.22), transparent 55%),
              radial-gradient(circle at 15% 85%, rgba(111, 213, 165, 0.14), transparent 50%),
              var(--bg-surface-solid);
  border: 1px solid var(--border-strong);
  box-shadow: var(--surface-shadow-hover);
  margin-bottom: 26px;
}
.cinema-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.cinema-thumb {
  height: 150px;
  border-radius: 12px;
  background: linear-gradient(135deg, #251B36 0%, #140E1C 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 12px;
  border: 1px solid var(--border-subtle);
}
.cinema-play-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--lavender);
  color: #140D1C;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1080px) {
  .habits-split-grid, .cinema-grid { grid-template-columns: 1fr; }
  .habit-skills-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .week-cal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   TPM Brand DNA (from Design-Rules.md & approved design-preview.html)
   ========================================================================== */
.workspace::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1.1px, transparent 1.3px);
  background-size: 24px 24px;
  mask-image: radial-gradient(70% 60% at 55% 35%, #000 22%, transparent 86%);
  -webkit-mask-image: radial-gradient(70% 60% at 55% 35%, #000 22%, transparent 86%);
  z-index: 0;
}
[data-theme="light"] .workspace::before {
  background-image: radial-gradient(rgba(20, 13, 28, 0.08) 1.1px, transparent 1.3px);
}
.sidebar, .main-stage-wrap { position: relative; z-index: 1; }

/* AI Partner (Eve-inspired Hero, Chat Thread, Composer & Mic) */
.ai-shell {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 96px);
  max-width: 780px;
  margin: 0 auto;
}
.ai-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.ai-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 0 40px;
}
.ai-orb-canvas {
  width: 156px;
  height: 156px;
  margin-bottom: 14px;
}
.ai-thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 24px;
}
.ai-msg-user {
  align-self: flex-end;
  max-width: 76%;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  padding: 11px 16px;
  border-radius: 16px 16px 4px 16px;
  font-size: 14.5px;
}
.ai-msg-assistant {
  align-self: flex-start;
  max-width: 88%;
  font-size: 14.5px;
  line-height: 1.6;
}
.ai-puzzle-tip {
  margin-top: 10px;
  padding: 10px 13px;
  border-radius: 10px;
  background: var(--lavender-soft);
  border-left: 3px solid var(--lavender);
  font-size: 13px;
  color: var(--text-secondary);
}
.ai-composer {
  position: sticky;
  bottom: 16px;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: var(--surface-shadow);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-composer-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 6px 4px;
  font-size: 14.5px;
  color: var(--text-primary);
}
.ai-composer-input:focus { outline: none; }
.mic-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-2);
  color: var(--text-secondary);
  transition: all 0.15s;
}
.mic-btn.recording { background: rgba(209, 120, 102, 0.25); color: var(--coral); animation: beaconPulse 1.4s infinite; }
.chat-sidebar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  text-align: left;
  font-size: 13px;
  color: var(--text-secondary);
}
.chat-sidebar-row:hover { background: var(--bg-surface-2); color: var(--text-primary); }
.chat-sidebar-row.active { background: var(--bg-surface-2); color: var(--text-primary); font-weight: 500; }
.chat-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; }

/* Vibrant Upcoming Lesson Hero */
.upcoming-hero {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 26px 28px;
  background:
    radial-gradient(circle at 85% 15%, rgba(242, 189, 108, 0.22), transparent 48%),
    radial-gradient(circle at 12% 0%, rgba(211, 174, 235, 0.16), transparent 45%),
    var(--bg-surface-solid);
  border: 1px solid rgba(242, 189, 108, 0.42);
  box-shadow: var(--surface-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.upcoming-puzzle-3d {
  position: absolute;
  right: 230px;
  top: -18px;
  width: 112px;
  height: 112px;
  opacity: 0.36;
  pointer-events: none;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.55));
  animation: floatGentle 6.8s ease-in-out infinite;
}
.live-pill-amber {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(242, 189, 108, 0.18);
  color: var(--amber);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.cta-glow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #F5CA82 0%, #E09F43 100%);
  color: #140D1C;
  font-weight: 600;
  font-size: 13.5px;
  height: 40px;
  padding: 0 20px;
  border-radius: 11px;
  box-shadow: 0 12px 28px -8px rgba(242, 189, 108, 0.55);
  transition: transform 0.2s var(--ease);
}
.cta-glow:hover { transform: translateY(-2px); }

/* Hover Fan-Out Stacked Deck */
.fan-stage {
  position: relative;
  height: 290px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  margin-bottom: 20px;
}
.fan-card {
  position: absolute;
  width: 260px;
  border-radius: 18px;
  padding: 20px;
  background: radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.075), transparent 46%), var(--bg-surface-solid);
  border: 1px solid var(--border-strong);
  box-shadow: var(--surface-shadow);
  transition: transform 0.65s var(--ease), box-shadow 0.4s var(--ease), border-color 0.3s;
  cursor: pointer;
}
.fan-card:nth-child(1) { transform: translate(-110px, 8px) rotate(-6deg); z-index: 1; }
.fan-card:nth-child(2) { transform: translate(0px, -6px) rotate(1.5deg); z-index: 2; }
.fan-card:nth-child(3) { transform: translate(110px, 10px) rotate(5.5deg); z-index: 3; }
.fan-stage:hover .fan-card:nth-child(1) { transform: translate(-245px, 4px) rotate(-10deg); }
.fan-stage:hover .fan-card:nth-child(2) { transform: translate(0px, -14px) rotate(0deg); }
.fan-stage:hover .fan-card:nth-child(3) { transform: translate(245px, 6px) rotate(9deg); }
.fan-card:hover {
  z-index: 10 !important;
  border-color: var(--lavender);
  box-shadow: var(--surface-shadow-hover), 0 0 0 3px rgba(211, 174, 235, 0.25);
}

/* Tactile 3D Flashcard & Editorial Slang */
.flashcard-3d {
  position: relative;
  border-radius: 20px;
  padding: 36px 28px;
  text-align: center;
  background: radial-gradient(circle at 22% 0%, rgba(211, 174, 235, 0.16), transparent 50%), var(--bg-surface-solid);
  border: 1px solid var(--border-strong);
  box-shadow: var(--surface-shadow);
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.flashcard-3d:hover { transform: translateY(-4px) rotate(-0.6deg); box-shadow: var(--surface-shadow-hover); }

.slang-editorial {
  position: relative;
  border-radius: 20px;
  padding: 28px;
  background: radial-gradient(circle at 85% 0%, rgba(209, 120, 102, 0.18), transparent 48%), var(--bg-surface-solid);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--surface-shadow);
}
.slang-stamp {
  display: inline-block;
  transform: rotate(-2deg);
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--coral-bg);
  color: var(--coral);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Full Monthly Calendar (with TPM radial gradients) */
.full-cal {
  border-radius: 20px;
  padding: 24px;
  background:
    radial-gradient(circle at 86% 10%, rgba(242, 189, 108, 0.14), transparent 45%),
    radial-gradient(circle at 14% 0%, rgba(211, 174, 235, 0.16), transparent 46%),
    var(--bg-surface-solid);
  border: 1px solid var(--border-strong);
  box-shadow: var(--surface-shadow);
}
.cal-weekdays, .cal-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.cal-weekdays { margin-bottom: 10px; font-size: 11.5px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.cal-cell {
  min-height: 92px;
  border-radius: 12px;
  padding: 9px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cal-cell.empty { opacity: 0.35; }
.cal-cell.today { border-color: var(--lavender); background: var(--lavender-soft); }
.cal-ev {
  font-size: 11px;
  padding: 4px 7px;
  border-radius: 6px;
  font-weight: 500;
  line-height: 1.3;
}
.cal-ev.one { background: var(--amber-bg); color: var(--amber); border-left: 2px solid var(--amber); }
.cal-ev.mc { background: var(--mint-bg); color: var(--mint); border-left: 2px solid var(--mint); }

/* Inicio Time Invested bars */
.mini-bars { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 9px; }
.mini-bar-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.mini-track { flex: 1; height: 7px; border-radius: 999px; background: var(--bg-surface-2); overflow: hidden; }
.mini-fill { height: 100%; border-radius: 999px; }

@media (max-width: 760px) {
  .fan-stage { height: auto; flex-direction: column; gap: 12px; }
  .fan-card { position: static; width: 100%; transform: none !important; }
  .cal-weekdays { display: none; }
  .cal-days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Branded Clases y Replays Cards (Vertical Stack) */
.classes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.class-tpm-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 22px 24px;
  background: radial-gradient(circle at 18% 0%, rgba(211, 174, 235, 0.12), transparent 48%), var(--bg-surface-solid);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--surface-shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.25s;
}
.class-tpm-card:hover { transform: translateY(-3px); box-shadow: var(--surface-shadow-hover); border-color: var(--border-strong); }
.class-tpm-card.upcoming {
  border-color: rgba(242, 189, 108, 0.45);
  background: radial-gradient(circle at 85% 10%, rgba(242, 189, 108, 0.16), transparent 50%), var(--bg-surface-solid);
}
.card-puzzle-watermark {
  position: absolute;
  bottom: -16px;
  right: -12px;
  width: 86px;
  height: 86px;
  opacity: 0.16;
  pointer-events: none;
  animation: floatGentle 7.2s ease-in-out infinite;
}

/* Branded Cosas por Mejorar Cards (Tilted, Layered, Light-Leak, Puzzle Accent) */
.mejora-tpm-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 22px 24px;
  background: radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.08), transparent 46%), var(--bg-surface-solid);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--surface-shadow);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.25s;
}
.mejora-tpm-card:nth-child(odd) { transform: rotate(-0.8deg); }
.mejora-tpm-card:nth-child(even) { transform: rotate(0.8deg); }
.mejora-tpm-card:hover {
  transform: translateY(-4px) rotate(0deg);
  box-shadow: var(--surface-shadow-hover);
}
.mejora-tpm-card.needs-attention {
  border-color: rgba(242, 189, 108, 0.48);
  background: radial-gradient(circle at 88% 8%, rgba(242, 189, 108, 0.14), transparent 48%), var(--bg-surface-solid);
}
.mejora-tpm-card.mastered {
  border-color: rgba(111, 213, 165, 0.32);
  background: radial-gradient(circle at 88% 8%, rgba(111, 213, 165, 0.10), transparent 48%), var(--bg-surface-solid);
}

/* Slang Horizontal Phrase Rows (distinct from Vocab fan-out deck) */
.slang-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 14px;
  background: radial-gradient(circle at 12% 0%, rgba(209, 120, 102, 0.08), transparent 42%), var(--bg-surface-solid);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--surface-shadow);
  transition: transform 0.2s var(--ease), border-color 0.2s;
  flex-wrap: wrap;
}
.slang-list-row:hover { transform: translateX(4px); border-color: var(--coral); }

@media (max-width: 900px) {
  .classes-grid { grid-template-columns: 1fr; }
  .mejora-tpm-card:nth-child(n) { transform: rotate(0deg); }
}

/* Brand Logo */
.tpm-logo { display: block; height: 22px; width: auto; object-fit: contain; }
.tpm-logo-lg { height: 28px; }

/* ==========================================================================
   Login View + Orbital Puzzle Aura
   ========================================================================== */
.login-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  overflow: hidden;
}

.login-aura {
  position: absolute;
  width: 720px;
  height: 720px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

.login-aura-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed var(--border-strong);
  opacity: 0.45;
  animation: spinSlow 60s linear infinite;
}

.login-aura-ring-inner {
  position: absolute;
  inset: 90px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: radial-gradient(circle, rgba(211, 174, 235, 0.11) 0%, transparent 65%);
}

.login-aura-piece {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  color: var(--lavender);
  opacity: 0.75;
}

.login-topbar, .login-card { position: relative; z-index: 1; width: 100%; max-width: 430px; }
.login-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }

.login-card {
  background: var(--bg-surface-solid);
  border-radius: 16px;
  padding: 32px 30px 26px;
  box-shadow: var(--surface-shadow);
}

.login-title { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; margin: 0 0 6px; }
.login-sub { color: var(--text-secondary); font-size: 14px; margin: 0 0 22px; }

.field-group { margin-bottom: 14px; }
.field-label { display: block; font-size: 12.5px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.field-input-wrap { position: relative; }

.field-input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 10px 13px;
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color 0.15s;
}
.field-input:focus { outline: none; border-color: var(--lavender); }

.password-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 12px; }

/* Buttons & Pills */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--lavender);
  color: #140D1C;
  font-weight: 600;
  font-size: 13.5px;
  height: 38px;
  padding: 0 18px;
  border-radius: 9px;
  transition: opacity 0.15s, transform 0.15s;
}
[data-theme="light"] .btn-primary { color: #FFFFFF; }
.btn-primary:hover { opacity: 0.92; transform: translateY(-1px); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 13px;
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  transition: border-color 0.15s, background 0.15s;
}
.btn-secondary:hover { border-color: var(--border-strong); background: var(--bg-hover); }
.btn-full { width: 100%; }

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  height: 32px;
  padding: 0 12px;
  border-radius: 9px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all 0.15s;
}
.pill-btn:hover, .pill-btn.active { border-color: var(--lavender); color: var(--text-primary); background: var(--lavender-soft); }

.login-error {
  background: rgba(209, 120, 102, 0.14);
  border: 1px solid rgba(209, 120, 102, 0.4);
  color: var(--coral);
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 9px;
  margin-bottom: 14px;
}

.demo-switcher { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border-subtle); text-align: center; }
.demo-switcher-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 8px; }
.demo-pills { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   Workspace Shell (Exact Eden 272px Sidebar + 1280px Stage)
   ========================================================================== */
.workspace { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-top-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 14px; }

.mode-switcher {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 3px;
  background: var(--bg-surface-2);
  border-radius: 9px;
  margin: 0 4px 16px;
}

.mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  border-radius: 7px;
  color: var(--text-muted);
  transition: all 0.15s;
}
.mode-btn:hover { color: var(--text-primary); }
.mode-btn.active {
  background: var(--bg-surface-solid);
  color: var(--text-primary);
  box-shadow: var(--surface-shadow);
}

.sidebar-section-label { font-size: 11.5px; font-weight: 500; color: var(--text-muted); padding: 8px 10px 5px; }
.nav-list { display: flex; flex-direction: column; gap: 2px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 400;
  transition: background 0.12s, color 0.12s;
}
.nav-item:hover { background: var(--bg-surface-2); color: var(--text-primary); }
.nav-item.active {
  background: var(--bg-surface-2);
  color: var(--text-primary);
  font-weight: 500;
  box-shadow: var(--surface-shadow);
}
.nav-item-icon { display: inline-flex; color: var(--text-muted); }
.nav-item.active .nav-item-icon { color: var(--lavender); }

.sidebar-spacer { flex: 1; }
.sidebar-controls { display: flex; gap: 6px; padding: 8px 4px 10px; }

.sidebar-contact-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px;
  margin: 0 4px 10px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 6px 2px;
  border-top: 1px solid var(--border-subtle);
}
.user-chip { display: flex; align-items: center; gap: 9px; min-width: 0; }
.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--lavender-soft);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--lavender);
  flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text-muted); }
.logout-btn { font-size: 12.5px; color: var(--text-muted); padding: 5px 8px; border-radius: 7px; }
.logout-btn:hover { color: var(--text-primary); background: var(--bg-surface-2); }

/* Main Stage (Eden 1280px max-width + generous padding) */
.main-stage-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
  padding: 38px 40px 80px;
}
.main-stage { width: 100%; max-width: 1280px; }
.mobile-topbar { display: none; }

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.page-title { font-size: 28px; font-weight: 600; letter-spacing: -0.035em; line-height: 1.2; margin: 0; }
.page-subtitle { color: var(--text-secondary); font-size: 14.5px; margin: 5px 0 0; }

.preview-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--lavender-soft);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 20px;
  font-size: 13.5px;
}

/* Surface Primitives */
.panel {
  background: var(--bg-surface);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: var(--surface-shadow);
}

.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.section-title { font-size: 13px; font-weight: 500; color: var(--text-secondary); }

.tag { font-size: 11.5px; font-weight: 500; padding: 3px 9px; border-radius: 6px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.tag-mint { background: var(--mint-bg); color: var(--mint); }
.tag-lavender { background: var(--lavender-soft); color: var(--lavender); }
.tag-amber { background: var(--amber-bg); color: var(--amber); }
.tag-sky { background: var(--sky-bg); color: var(--sky); }
.tag-coral { background: var(--coral-bg); color: var(--coral); }
.tag-acai { background: var(--acai-bg); color: var(--acai); }
.tag-neutral { background: var(--bg-surface-2); color: var(--text-muted); }

/* ==========================================================================
   Overview (Eden Home Quick Actions + Asymmetric Bento)
   ========================================================================== */
.next-class-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: var(--surface-shadow);
  border-left: 3px solid var(--lavender);
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.eden-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}

.eden-tile {
  text-align: left;
  background: var(--bg-surface);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--surface-shadow);
  transition: box-shadow 0.15s, background 0.15s, transform 0.15s;
}
.eden-tile:hover { box-shadow: var(--surface-shadow-hover); background: var(--bg-hover); transform: translateY(-2px); }

.fruit-tile {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: #FFFFFF;
}
.fruit-mint { background: linear-gradient(180deg, #66b08b 0%, #448a68 100%); }
.fruit-amber { background: linear-gradient(180deg, #dcab6f 0%, #b57e3c 100%); }
.fruit-acai { background: linear-gradient(180deg, #9874ba 0%, #6d4f8c 100%); }
.fruit-sky { background: linear-gradient(180deg, #6293c4 0%, #426a94 100%); }
.fruit-coral { background: linear-gradient(180deg, #d17866 0%, #a85242 100%); }

.eden-tile-title { font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.eden-tile-desc { font-size: 13px; color: var(--text-muted); line-height: 1.4; }

.overview-bento { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; }

.checklist { display: flex; flex-direction: column; gap: 8px; }
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--bg-surface-2);
  cursor: pointer;
  font-size: 13.5px;
}
.check-box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.check-row.done .check-box { background: var(--mint); border-color: var(--mint); color: #140D1C; }
.check-row.done .check-text { color: var(--text-muted); text-decoration: line-through; }

/* ==========================================================================
   Roadmap (Point A->B Bridge + Eden Gradient Products Cards + Timeline)
   ========================================================================== */
.point-bridge {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  background: var(--bg-surface);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: var(--surface-shadow);
  margin-bottom: 22px;
}
.bridge-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--lavender-soft);
  color: var(--lavender);
}

.eden-products-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.eden-product-card {
  padding: 0;
  background: var(--bg-surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--surface-shadow);
  transition: box-shadow 0.15s, transform 0.15s;
}
.eden-product-card:hover { box-shadow: var(--surface-shadow-hover); transform: translateY(-2px); }
.eden-product-banner { height: 76px; position: relative; }
.banner-amber { background: linear-gradient(135deg, #dcab6f 0%, #996528 100%); }
.banner-sky { background: linear-gradient(135deg, #5c94d6 0%, #2b548a 100%); }
.banner-lavender { background: linear-gradient(135deg, #b88ce0 0%, #663d8c 100%); }
.banner-coral { background: linear-gradient(135deg, #d17866 0%, #8f3f30 100%); }
.banner-mint { background: linear-gradient(135deg, #66b08b 0%, #347052 100%); }

.eden-product-icon {
  position: absolute;
  bottom: -16px;
  left: 18px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-surface-solid);
  box-shadow: var(--surface-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}
.eden-product-body { padding: 26px 18px 18px; }

.timeline-block {
  background: var(--bg-surface);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: var(--surface-shadow);
  margin-bottom: 14px;
}
.timeline-weeks { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-left: 16px; border-left: 2px solid var(--border-strong); }
.week-node {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--bg-surface-2);
  cursor: pointer;
}
.week-node:hover { background: var(--bg-hover); }

/* ==========================================================================
   Plan de Mejora (Vibrant Coloured Eden Cards + Interactive Modal Drawer)
   ========================================================================== */
.mejora-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* ==========================================================================
   Antes y Después (Guided Animated Step-by-Step Assessment + Category Rings)
   ========================================================================== */
.quiz-stage {
  background: var(--bg-surface-solid);
  border-radius: 16px;
  padding: 26px 28px;
  box-shadow: var(--surface-shadow);
  margin-top: 20px;
}

.quiz-progress-segments {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}
.quiz-seg {
  height: 5px;
  border-radius: 999px;
  background: var(--bg-surface-2);
  overflow: hidden;
}
.quiz-seg-fill { height: 100%; background: var(--lavender); transition: width 0.35s var(--ease); }

.rating-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 18px 0;
}
.rating-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px 8px;
  border-radius: 12px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.rating-card:hover { transform: translateY(-2px); border-color: var(--lavender); background: var(--lavender-soft); }
.rating-card.picked { border-color: var(--lavender); background: var(--lavender-soft); box-shadow: 0 0 0 1px var(--lavender); }

/* ==========================================================================
   Classes Ledger + Habits (Eden Store) + Comunidad (Multi-colour Discover)
   ========================================================================== */
.ledger-table { background: var(--bg-surface); border-radius: 16px; box-shadow: var(--surface-shadow); overflow: hidden; margin-bottom: 22px; }
.ledger-row { padding: 18px 22px; border-bottom: 1px solid var(--border-subtle); }
.ledger-row:last-child { border-bottom: none; }
.ledger-row.upcoming { border-left: 3px solid var(--lavender); }
.ledger-row.completed { border-left: 3px solid var(--mint); }

.eden-kpi-card { background: var(--bg-surface); border-radius: 16px; box-shadow: var(--surface-shadow); overflow: hidden; margin-bottom: 20px; }
.eden-kpi-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--border-subtle); }
.eden-kpi-cell { padding: 18px 20px; border-right: 1px solid var(--border-subtle); position: relative; text-align: left; }
.eden-kpi-cell:last-child { border-right: none; }
.eden-kpi-cell.active::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--mint); }
.eden-kpi-label { font-size: 12.5px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.eden-kpi-val { font-size: 26px; font-weight: 600; letter-spacing: -0.025em; }
.eden-kpi-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.eden-chart-area { padding: 20px 24px 22px; }
.bar-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; align-items: end; height: 185px; padding-top: 20px; border-bottom: 1px solid var(--border-subtle); }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.bar-fill { width: 100%; max-width: 48px; border-radius: 6px 6px 0 0; background: rgba(111, 213, 165, 0.72); transition: height 0.35s var(--ease); }
.bar-col:hover .bar-fill { background: var(--mint); }
.bar-label { font-size: 11.5px; color: var(--text-muted); }

/* Multi-colour Community Masonry */
.masonry-grid { column-count: 3; column-gap: 14px; }
.masonry-card {
  break-inside: avoid;
  margin-bottom: 14px;
  background: var(--bg-surface);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--surface-shadow);
}
.masonry-card.cat-podcast { border-top: 3px solid var(--coral); }
.masonry-card.cat-music { border-top: 3px solid var(--acai); }
.masonry-card.cat-note { border-top: 3px solid var(--mint); }
.masonry-card.cat-video { border-top: 3px solid var(--sky); }

/* Helpers */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stack-list { display: flex; flex-direction: column; gap: 14px; }
.embed-wrap { margin-top: 14px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border-subtle); background: #0A0610; }
.embed-wrap iframe { width: 100%; height: 340px; border: 0; display: block; }
.booking-frame-wrap {
  border-radius: 20px;
  overflow: hidden;
  padding: 16px;
  background:
    radial-gradient(circle at 85% 10%, rgba(242, 189, 108, 0.14), transparent 45%),
    radial-gradient(circle at 12% 0%, rgba(211, 174, 235, 0.18), transparent 48%),
    var(--bg-surface-solid);
  border: 1px solid var(--border-strong);
  box-shadow: var(--surface-shadow);
}
.booking-frame-inner {
  background: #FFFFFF;
  border-radius: 12px;
  overflow: hidden;
}
.booking-frame-inner iframe { width: 100%; height: 640px; border: 0; display: block; }

/* Coach */
.coach-layout { display: grid; grid-template-columns: 250px 1fr; gap: 20px; align-items: start; }
.roster-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.roster-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left; padding: 9px 11px; border-radius: 9px; }
.roster-btn:hover { background: var(--bg-surface-2); }
.roster-btn.active { background: var(--lavender-soft); border: 1px solid var(--border-strong); }
.coach-panel-grid { display: flex; flex-direction: column; gap: 18px; }
.inline-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(8, 4, 12, 0.74); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 60; }
.modal-card { width: 100%; max-width: 560px; background: var(--bg-surface-solid); border-radius: 16px; padding: 28px; box-shadow: var(--surface-shadow-hover); }
.toast-root { position: fixed; bottom: 20px; right: 20px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--bg-surface-solid); border: 1px solid var(--lavender); color: var(--text-primary); padding: 10px 15px; border-radius: 10px; font-size: 13px; box-shadow: var(--surface-shadow); }

@media (max-width: 1080px) {
  .eden-grid-4, .eden-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eden-products-grid, .three-col, .mejora-grid { grid-template-columns: 1fr; }
  .overview-bento, .two-col, .coach-layout, .inline-form-row, .point-bridge { grid-template-columns: 1fr; }
  .masonry-grid { column-count: 2; }
  .main-stage-wrap { padding: 24px 20px 56px; }
}

@media (max-width: 760px) {
  .workspace { flex-direction: column; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; transform: translateX(-100%); transition: transform 0.22s var(--ease); }
  .sidebar.open { transform: translateX(0); }
  .mobile-topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--border-subtle); background: var(--bg-sidebar); position: sticky; top: 0; z-index: 40; }
  .eden-grid-4, .eden-kpi-strip, .rating-cards { grid-template-columns: 1fr; }
  .masonry-grid { column-count: 1; }
}
