/*
 * ETN Fitness — visual refresh
 * Dark, athletic and slightly alive. This layer intentionally sits after the
 * legacy styles so the existing product behaviour and responsive selectors stay
 * untouched while the visual language can evolve independently.
 */
:root {
  color-scheme: dark;
  --ink: #f1f7f4;
  --muted: #91a59f;
  --paper: #070a0a;
  --line: rgba(171, 207, 193, .14);
  --accent: #39f58b;
  --accent-dark: #19bb69;
  --success: #39f58b;
  --warning: #ffd166;
  --coral: #ff806d;
  --deep: #09110f;
  --panel: rgba(17, 26, 24, .78);
  --panel-strong: rgba(20, 33, 29, .93);
  --pointer-x: 50%;
  --pointer-y: 42%;
}

html { color-scheme: dark; background: var(--paper); }
body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: #070a0a;
}
body::before {
  content: '';
  position: fixed;
  z-index: 0;
  inset: -28%;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--pointer-x) var(--pointer-y), rgba(57, 245, 139, .18), transparent 19rem),
    radial-gradient(circle at 12% 18%, rgba(108, 99, 255, .17), transparent 24rem),
    radial-gradient(circle at 86% 82%, rgba(255, 104, 82, .12), transparent 25rem);
  filter: blur(18px);
  opacity: .9;
  animation: etn-aurora 18s ease-in-out infinite alternate;
}
body::after {
  content: '';
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: .28;
  background-image: radial-gradient(rgba(255,255,255,.16) .7px, transparent .7px);
  background-size: 5px 5px;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}
#app { position: relative; z-index: 1; }

@keyframes etn-aurora {
  0% { transform: translate3d(-2%, -1%, 0) scale(1); }
  48% { transform: translate3d(2%, 2%, 0) scale(1.05); }
  100% { transform: translate3d(-1%, 3%, 0) scale(1.02); }
}
@keyframes etn-grid-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, 28px, 0); }
}
@keyframes etn-pulse {
  0%, 100% { opacity: .35; transform: scale(.96); }
  50% { opacity: .8; transform: scale(1.04); }
}
@keyframes etn-rise {
  from { transform: translateY(10px); opacity: .35; }
  to { transform: translateY(0); opacity: 1; }
}

.boot {
  min-height: 100vh;
  background: #070a0a;
  color: var(--ink);
}
.app-layout {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  color: var(--ink);
  background: transparent;
}
.app-layout::before {
  content: '';
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: .2;
  background-image:
    linear-gradient(rgba(112, 255, 178, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 255, 178, .09) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 80%, transparent);
  animation: etn-grid-drift 15s linear infinite;
}
.app-layout::after {
  content: '';
  position: fixed;
  z-index: -1;
  width: 22rem;
  height: 22rem;
  right: 9%;
  top: 18%;
  border: 1px solid rgba(57, 245, 139, .12);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(57,245,139,.025), 0 0 0 56px rgba(57,245,139,.02);
  pointer-events: none;
  animation: etn-pulse 8s ease-in-out infinite;
}

/* Shared surfaces */
.sidebar,
.topbar,
.card,
.metric,
.exercise-row,
.editor-row,
.planning-toolbar,
.students-card,
.history-item,
.week-control,
.save-bar,
.login-form {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .24), inset 0 1px rgba(255,255,255,.035);
  backdrop-filter: blur(18px);
}
.sidebar {
  background: linear-gradient(180deg, rgba(10,16,15,.96), rgba(10,16,15,.82));
  border-right-color: var(--line);
  box-shadow: 12px 0 36px rgba(0,0,0,.26);
}
.brand { color: #fff; letter-spacing: -.045em; }
.brand-light { color: var(--accent); }
.brand small { color: #6f8980; }
.brand img { filter: drop-shadow(0 0 12px rgba(57,245,139,.28)); }
.workspace-label { color: #6f8980; text-transform: uppercase; letter-spacing: .13em; }
.nav-item { color: #8ea49d; border: 1px solid transparent; transition: transform .2s, color .2s, background .2s, border-color .2s; }
.nav-item:hover { color: var(--accent); background: rgba(57,245,139,.07); border-color: rgba(57,245,139,.12); transform: translateX(3px); }
.nav-item.active { color: var(--accent); background: linear-gradient(100deg, rgba(57,245,139,.17), rgba(57,245,139,.035)); border-color: rgba(57,245,139,.18); box-shadow: inset 3px 0 var(--accent), 0 8px 20px rgba(0,0,0,.12); }
.nav-item.active i { display: block; width: 5px; height: 5px; margin-left: auto; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.sidebar-coach { color: #eaf5f0; }
.sidebar-coach>.avatar { background: linear-gradient(135deg, #193d2c, #39f58b); color: #05110b; box-shadow: 0 0 26px rgba(57,245,139,.2); }
.sidebar-coach>span, .sidebar-coach p { color: #779189; }
.instagram-link { color: var(--accent); }
.topbar { background: rgba(8, 13, 12, .72); border-bottom-color: var(--line); }
.breadcrumb { color: #7c938b; }
.mobile-brand { color: #fff; }
.mobile-brand>strong>span { color: var(--accent); }
.avatar { background: #17372b; color: var(--accent); }
.user-chip { color: var(--ink); }
.user-chip:hover { background: rgba(57,245,139,.08); }
.user-chip small { color: #7b938b; }
.demo-banner { color: #dce9ad; background: rgba(87, 101, 42, .34); border-bottom-color: rgba(255, 209, 102, .18); }

main { color: var(--ink); }
h1, h2, h3 { color: var(--ink); }
.muted, .page-heading p, .section-title p, .page-footer { color: var(--muted); }
.eyebrow { color: var(--accent); letter-spacing: .12em; font-size: .72rem; }
.page-heading { animation: etn-rise .45s ease both; }
.page-heading h1 { letter-spacing: -.055em; text-shadow: 0 0 24px rgba(57,245,139,.08); }
.page-heading .eyebrow { color: var(--accent); }
.page-footer { color: #667b74; }

.button, .icon-button {
  color: var(--ink);
  background: rgba(255,255,255,.035);
  border-color: rgba(160, 196, 184, .22);
  box-shadow: none;
  transition: transform .2s, border-color .2s, background .2s, box-shadow .2s, color .2s;
}
.button:hover, .icon-button:hover { color: var(--accent); background: rgba(57,245,139,.08); border-color: rgba(57,245,139,.42); transform: translateY(-1px); }
.button.primary, .button.dark { color: #03110a; background: linear-gradient(135deg, #39f58b, #18c96f); border-color: #39f58b; box-shadow: 0 8px 24px rgba(57,245,139,.2); }
.button.primary:hover, .button.dark:hover { color: #03110a; background: linear-gradient(135deg, #64ffab, #20df7d); border-color: #64ffab; box-shadow: 0 10px 30px rgba(57,245,139,.3); }
.button.ghost { color: #a0b6af; }
.theme-button[aria-pressed="true"] { color: #03110a; background: var(--accent); }
.pill { color: var(--accent); background: rgba(57,245,139,.1); border: 1px solid rgba(57,245,139,.2); }
.pill.success { color: var(--accent); background: rgba(57,245,139,.11); }
.pill.neutral { color: #ffd166; background: rgba(255,209,102,.11); border-color: rgba(255,209,102,.18); }

input, select, textarea {
  color: var(--ink);
  background: rgba(4, 10, 8, .7);
  border-color: rgba(160, 196, 184, .24);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.24);
}
input::placeholder, textarea::placeholder { color: #657b73; }
input:disabled { background: rgba(255,255,255,.05); color: #81948e; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(57,245,139,.14), 0 0 20px rgba(57,245,139,.08); }
label { color: #c0d0ca; }
label small { color: #789089; }

.card, .metric, .exercise-row, .editor-row, .planning-toolbar { color: var(--ink); }
.card:hover, .student-card:hover, .exercise-row:hover { border-color: rgba(57,245,139,.28); box-shadow: 0 18px 42px rgba(0,0,0,.28), 0 0 0 1px rgba(57,245,139,.05); }
.metric>div, .metric>small { color: #8ea59d; }
.metric>div .icon { color: var(--accent); }
.metric>strong { color: #fff; }
.week-control { background: rgba(9,15,13,.75); }
.week-control input { background: transparent; color: var(--ink); }
.week-picker-copy small { color: #789089; }
.week-picker-copy strong { color: var(--ink); }
.week-heading>.muted { color: #789089; }
.day-tab { color: #a8bbb4; background: rgba(12,20,18,.68); border-color: rgba(160,196,184,.18); }
.day-tab:hover { color: var(--accent); background: rgba(57,245,139,.07); border-color: rgba(57,245,139,.3); }
.day-tab.selected { color: #03110a; background: linear-gradient(135deg, #39f58b, #16b968); border-color: #39f58b; box-shadow: 0 10px 24px rgba(57,245,139,.18); }

.training-hero {
  background: linear-gradient(120deg, rgba(9, 28, 21, .98), rgba(12, 53, 37, .92) 58%, rgba(21, 83, 58, .86));
  border-color: rgba(57,245,139,.24);
  box-shadow: 0 24px 55px rgba(0,0,0,.34), inset 0 1px rgba(255,255,255,.06);
}
.training-hero::before { content: ''; position: absolute; width: 420px; height: 420px; right: -120px; top: -190px; border: 1px solid rgba(57,245,139,.22); border-radius: 50%; box-shadow: 0 0 0 34px rgba(57,245,139,.035), 0 0 0 68px rgba(57,245,139,.025); animation: etn-pulse 7s ease-in-out infinite; }
.training-hero::after { width: 300px; height: 300px; right: -128px; bottom: -178px; border: 38px solid rgba(57,245,139,.13); border-radius: 50%; }
.training-hero h2 { color: #fff; }
.training-hero p, .hero-helper { color: #a6c0b4; }
.training-hero .dark-pill { color: var(--accent); background: rgba(57,245,139,.1); border-color: rgba(57,245,139,.24); }
.training-hero .button { color: #03110a; background: var(--accent); border-color: var(--accent); }
.training-hero .button:hover { color: #03110a; background: #78ffb7; }
.hero-art { color: rgba(255,255,255,.075); }
main .training-hero { background: linear-gradient(120deg, rgba(9, 28, 21, .98), rgba(12, 53, 37, .92) 58%, rgba(21, 83, 58, .86)); border-color: rgba(57,245,139,.24); box-shadow: 0 24px 55px rgba(0,0,0,.34), inset 0 1px rgba(255,255,255,.06); }
main .training-hero .button { color: #03110a; background: linear-gradient(135deg, #39f58b, #18c96f); border-color: #39f58b; box-shadow: 0 8px 24px rgba(57,245,139,.2); }
main .training-hero .button:hover { color: #03110a; background: #78ffb7; }
.exercise-card-heading h3, .exercise-prescription dd { color: #fff; }
.exercise-card-heading .eyebrow, .exercise-kind, .exercise-card-footer>span { color: #829890; }
.exercise-number { color: var(--accent); background: rgba(57,245,139,.1); border: 1px solid rgba(57,245,139,.2); }
.exercise-prescription>div, .exercise-prescription>div:nth-child(3) { background: rgba(255,255,255,.035); border: 1px solid rgba(160,196,184,.1); }
main .exercise-prescription>div, main .exercise-prescription>div:nth-child(3) { color: #dcece5; background: rgba(255,255,255,.035); border-color: rgba(160,196,184,.1); }
.exercise-prescription dt { color: #7f968e; }
.exercise-prescription dd small { color: #85a098; }
.guide-button { color: #b4c5bf; }

.coach-note { background: linear-gradient(135deg, rgba(24, 64, 49, .8), rgba(14, 31, 25, .82)); border-color: rgba(57,245,139,.17); }
main .coach-note { background: linear-gradient(135deg, rgba(24, 64, 49, .8), rgba(14, 31, 25, .82)); border-color: rgba(57,245,139,.17); }
.coach-note>.eyebrow, .coach-note>p { color: #9ec3b0; }
.coach-person .avatar { color: var(--accent); background: rgba(57,245,139,.13); }
.coach-person span:not(.avatar) { color: #7fa194; }
.weekly-card, .goal-card { background: rgba(13, 21, 19, .72); }
.week-progress>strong { color: #fff; }
.week-progress small, .week-progress>span, .weekly-card>p, .goal-card p { color: #88a098; }
.progress-track { background: rgba(255,255,255,.1); }
.progress-track>span { background: linear-gradient(90deg, #39f58b, #9affc4); box-shadow: 0 0 14px rgba(57,245,139,.45); }
main .day-tab.selected { color: #03110a; background: linear-gradient(135deg, #39f58b, #16b968); border-color: #39f58b; box-shadow: 0 10px 24px rgba(57,245,139,.18); }

.page-heading>.button, .section-title>.button { flex-shrink: 0; }
.student-card { background: var(--panel); }
.student-facts dt, .student-facts dd, .table-person p { color: #829890; }
.table-person h3 { color: #fff; }
.editor-day-tab { color: #a5b8b1; background: rgba(12,20,18,.7); border-color: rgba(160,196,184,.18); }
.editor-day-tab.selected { color: var(--accent); background: rgba(57,245,139,.1); border-color: var(--accent); box-shadow: inset 0 -3px var(--accent); }
.editor-summary { color: #9ec3b0; background: rgba(57,245,139,.08); }
.add-exercise { color: var(--accent); background: rgba(57,245,139,.06); border-color: rgba(57,245,139,.36); }
.save-bar { background: rgba(13, 30, 23, .88); border-color: rgba(57,245,139,.2); }
.save-bar #save-status { color: #a4c4b5; }
.history-item[open] { border-color: rgba(57,245,139,.36); box-shadow: 0 14px 36px rgba(0,0,0,.28), 0 0 24px rgba(57,245,139,.06); }
.history-check { color: var(--accent); background: rgba(57,245,139,.1); }
.empty { color: var(--ink); background: rgba(20, 27, 25, .7); border-color: rgba(57,245,139,.22); }
.empty>.icon { color: var(--accent); }
#toast { color: #03110a; background: linear-gradient(135deg, #39f58b, #a6ffd0); box-shadow: 0 12px 30px rgba(57,245,139,.2); }

/* Progress and library surfaces added by the feature layer. */
.progress-overview { background: linear-gradient(120deg, #0b2d20, #123f2c 60%, #164f37); border: 1px solid rgba(57,245,139,.2); box-shadow: 0 22px 48px rgba(0,0,0,.28); }
.progress-overview h2, .progress-overview p, .progress-overview .eyebrow { color: #fff; }
.analysis-icon { color: var(--accent) !important; background: rgba(57,245,139,.12); }
.progress-period { background: rgba(255,255,255,.07); }
.progress-period .button { color: #95aca3; }
.progress-period .button[aria-pressed="true"] { color: var(--accent); background: rgba(57,245,139,.12); box-shadow: none; }
.weekly-summary-grid>div {
  color: var(--ink);
  background: rgba(255,255,255,.035);
  border-color: rgba(160,196,184,.14);
  box-shadow: inset 0 1px rgba(255,255,255,.025);
}
.weekly-summary-grid strong { color: #fff; }
.weekly-summary-grid span { color: #8da49b; }
.achievement-card {
  color: #91a69e;
  background: rgba(255,255,255,.035);
  border-color: rgba(160,196,184,.14);
  box-shadow: inset 0 1px rgba(255,255,255,.025);
}
.achievement-card strong { color: #dce9e3; }
.achievement-card p { color: #8da49b; }
.achievement-icon { color: #91a69e; background: rgba(160,196,184,.1); }
.achievement-status { color: #82978f; }
.achievement-card.earned {
  color: var(--accent);
  background: linear-gradient(145deg, rgba(57,245,139,.14), rgba(57,245,139,.055));
  border-color: rgba(57,245,139,.3);
}
.achievement-card.earned strong { color: #effff6; }
.achievement-card.earned p { color: #a8c8b8; }
.achievement-card.earned .achievement-icon { color: #03110a; background: var(--accent); }
.achievement-card.earned .achievement-status { color: var(--accent); }
main .progress-exercise-label select,
main .progress-mode-label select {
  color: var(--ink);
  background-color: rgba(4,10,8,.78);
  border-color: rgba(160,196,184,.24);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.24);
}
main .progress-exercise-label select:hover,
main .progress-mode-label select:hover { border-color: rgba(57,245,139,.42); }
main .progress-exercise-label select option,
main .progress-mode-label select option { color: var(--ink); background: #0c1712; }
.metric-toggle {
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(160,196,184,.12);
}
.metric-toggle button { color: #9db1aa; }
.metric-toggle button:hover { color: var(--accent); background: rgba(57,245,139,.07); }
.metric-toggle button[aria-pressed="true"] {
  color: #03110a;
  background: var(--accent);
  box-shadow: 0 5px 14px rgba(57,245,139,.18);
}
.progress-highlights>div, .progress-empty, .point-detail, .record-chips>span, .activity-track { background: rgba(255,255,255,.035); border-color: rgba(160,196,184,.12); }
.progress-highlights>div span, .progress-highlights>div p, .point-detail, .chart-dates, .chart-scale { color: #8da49b; }
.progress-highlights>div strong { color: #fff; }
.progress-highlights .change-highlight { background: rgba(57,245,139,.09); border-color: rgba(57,245,139,.2); }
.chart-point>span { background: #0c1712; border-color: var(--accent); }
.chart-point:hover>span, .chart-point[aria-pressed="true"]>span { background: var(--accent); box-shadow: 0 0 0 6px rgba(57,245,139,.14); }
.activity-track>span { background: linear-gradient(180deg, #8affbb, #1cbb6b); }
.history-detail, .history-exercise { color: #d7e4df; }
.history-sets>div { background: rgba(255,255,255,.045); }

/* Media, calendar and the smaller feature surfaces use the same dark canvas. */
main .exercise-visual,
main .exercise-visual.has-media {
  color: #dcece5;
  background: linear-gradient(135deg, rgba(18, 35, 28, .96), rgba(7, 17, 13, .96));
  border-color: rgba(57,245,139,.25);
  box-shadow: inset 0 0 36px rgba(57,245,139,.035);
}
main .exercise-visual:hover { background: linear-gradient(135deg, rgba(24, 57, 42, .96), rgba(8, 21, 15, .96)); border-color: rgba(57,245,139,.52); }
.visual-fallback { color: #dcece5; }
.visual-fallback > .icon { color: var(--accent); filter: drop-shadow(0 0 10px rgba(57,245,139,.32)); }
.visual-fallback small { color: #7e9b8e; }
.exercise-visual img, .exercise-visual video { background: #0b1711; }
.exercise-visual.compact img, .exercise-visual.compact video { background: #0b1711; }
.visual-caption { background: linear-gradient(180deg, transparent, rgba(4,14,9,.94) 34%); }
.video-badge { background: rgba(4,18,11,.86); border-color: rgba(57,245,139,.3); color: var(--accent); }
main .movement-art, main .movement-1, main .movement-2, main .movement-3 {
  color: #dcece5;
  background: linear-gradient(135deg, rgba(18, 35, 28, .96), rgba(8, 18, 14, .96));
  border-bottom-color: var(--accent);
}
.movement-art>.icon { color: var(--accent); filter: drop-shadow(0 0 10px rgba(57,245,139,.25)); }
.movement-art>span:first-child { color: #a1b9ae; }
.movement-art>.pill { color: var(--accent); background: rgba(57,245,139,.1); }
.library-body h2 { color: #fff; }
.library-body .eyebrow { color: var(--accent); }
.next-training { color: var(--ink); background: rgba(57,245,139,.08); border: 1px solid rgba(57,245,139,.18); }
.calendar-cell { color: #cfe0d9; background: rgba(15, 27, 22, .84); border-color: rgba(160,196,184,.15); }
.calendar-cell small { color: inherit; }
.calendar-cell[aria-current], .calendar-cell[aria-pressed="true"] { border-color: var(--accent); outline-color: rgba(57,245,139,.35); }
.status-completed { background: rgba(57,245,139,.18); color: var(--accent); }
.status-pending { background: rgba(93,151,255,.17); color: #9fc4ff; }
.status-partial { background: rgba(255,209,102,.16); color: #ffd166; }
.status-active { background: rgba(154,128,255,.17); color: #c4b8ff; }
.status-rest, .status-none { background: rgba(255,255,255,.045); color: #8da49b; }
.status-moved { background: rgba(74,184,148,.14); color: #9ce6c5; }
.calendar-legend span { border: 1px solid rgba(160,196,184,.12); }
.attention-card, .simple-details, .preference-sample { color: var(--ink); background: rgba(15, 27, 22, .8); border-color: rgba(160,196,184,.15); }
.attention-card h3, .simple-details summary { color: #fff; }
.attention-card p { color: #8da49b; }
.alternative-picker { color: var(--ink); background: rgba(6, 15, 11, .7); border-color: rgba(160,196,184,.16); }
.alternative-picker label, .alternative-option { color: #d9e8e1; background: rgba(255,255,255,.035); border-color: rgba(160,196,184,.15); }
.alternative-picker label small, .alternative-note span, .alternative-option small { color: #88a098; }
.alternative-note { background: rgba(57,245,139,.08); border-left-color: var(--accent); }
.alternative-option.selected { background: rgba(57,245,139,.12); border-color: rgba(57,245,139,.4); }
.feedback-summary > span { color: #d9e8e1; background: rgba(57,245,139,.08); border-color: rgba(57,245,139,.17); }
.technique-list article { border-color: rgba(160,196,184,.15); }
.technique-thumb > .icon { color: var(--accent); background: rgba(57,245,139,.12); }
.rating-scale label span { color: #d9e8e1; background: rgba(255,255,255,.035); border-color: rgba(160,196,184,.2); }
.rating-scale input:checked + span { color: #03110a; background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 2px rgba(3,17,10,.7); }

dialog { color: var(--ink); background: rgba(12, 22, 18, .97); border-color: rgba(57,245,139,.22); box-shadow: 0 24px 90px rgba(0,0,0,.62), 0 0 0 1px rgba(57,245,139,.06); }
dialog::backdrop { background: rgba(1, 6, 4, .78); backdrop-filter: blur(8px); }
dialog>p { color: #96ada4; }
.modal-header h2 { color: #fff; }

/* Main student dashboard: a real fitness cockpit instead of a document list. */
.student-pulse {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px minmax(300px, .92fr);
  align-items: center;
  gap: 28px;
  overflow: hidden;
  min-height: 250px;
  margin: -4px 0 30px;
  padding: 30px;
  border: 1px solid rgba(57,245,139,.25);
  border-radius: 28px;
  background:
    linear-gradient(115deg, rgba(10, 28, 21, .98), rgba(13, 52, 35, .92) 54%, rgba(16, 29, 26, .95)),
    radial-gradient(circle at 90% 10%, rgba(57,245,139,.2), transparent 18rem);
  box-shadow: 0 24px 60px rgba(0,0,0,.32), inset 0 1px rgba(255,255,255,.07);
  isolation: isolate;
  animation: etn-rise .5s ease both;
}
.student-pulse::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .25;
  background-image: linear-gradient(115deg, transparent 25%, rgba(57,245,139,.18), transparent 65%);
  transform: translateX(-70%);
  animation: pulse-sheen 8s ease-in-out infinite;
}
@keyframes pulse-sheen { 0%, 35% { transform: translateX(-70%); } 70%, 100% { transform: translateX(70%); } }
.pulse-orbit { position: absolute; width: 420px; height: 420px; right: 15%; top: -245px; border: 1px solid rgba(57,245,139,.22); border-radius: 50%; box-shadow: 0 0 0 28px rgba(57,245,139,.035), 0 0 0 56px rgba(57,245,139,.025); pointer-events: none; animation: etn-pulse 9s ease-in-out infinite; }
.pulse-copy { position: relative; z-index: 1; min-width: 0; }
.pulse-copy .eyebrow { color: var(--accent); }
.pulse-copy h2 { margin: 8px 0 8px; color: #fff; font-size: clamp(1.8rem, 3.3vw, 2.8rem); letter-spacing: -.06em; }
.pulse-copy p { max-width: 440px; margin-bottom: 20px; color: #a5c4b3; }
.pulse-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pulse-actions .button { min-height: 48px; }
.pulse-link { color: #b9d2c6; border-color: rgba(255,255,255,.16); }
.pulse-link:hover { color: var(--accent); }
.pulse-ring { position: relative; display: grid; place-items: center; width: 164px; height: 164px; margin: auto; border-radius: 50%; background: conic-gradient(var(--accent) var(--progress), rgba(255,255,255,.1) 0); box-shadow: 0 0 34px rgba(57,245,139,.12); transform: rotate(-12deg); }
.pulse-ring::before { content: ''; position: absolute; width: 132px; height: 132px; border-radius: 50%; background: #0d2a1c; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.pulse-ring>div { position: relative; z-index: 1; display: grid; gap: 2px; text-align: center; transform: rotate(12deg); }
.pulse-ring strong { color: #fff; font-size: 2rem; letter-spacing: -.07em; }
.pulse-ring span { color: #8fb3a1; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; }
.pulse-stats { display: grid; grid-template-columns: 1fr; gap: 10px; min-width: 0; }
.pulse-stat { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; align-items: center; padding: 13px 15px; border: 1px solid rgba(255,255,255,.1); border-radius: 15px; background: rgba(4, 16, 10, .32); transition: transform .2s, border-color .2s, background .2s; }
.pulse-stat:hover { transform: translateX(4px); border-color: rgba(57,245,139,.38); background: rgba(57,245,139,.08); }
.pulse-stat>span { display: flex; align-items: center; gap: 7px; color: #9fc2b1; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; }
.pulse-stat>span .icon { width: 15px; height: 15px; color: var(--accent); }
.pulse-stat>strong { grid-column: 2; grid-row: 1 / span 2; color: #fff; font-size: 1.45rem; text-align: right; }
.pulse-stat>small { color: #719185; font-size: .72rem; }
.pulse-stat-green { border-color: rgba(57,245,139,.22); background: rgba(57,245,139,.08); }

@media (max-width: 1200px) {
  .student-pulse { grid-template-columns: minmax(0, 1fr) 150px; }
  .pulse-stats { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pulse-ring { width: 142px; height: 142px; }
  .pulse-ring::before { width: 114px; height: 114px; }
}
@media (max-width: 760px), (pointer: coarse) and (max-width: 1000px) {
  .student-pulse { grid-template-columns: 1fr; gap: 18px; min-height: 0; margin-bottom: 24px; padding: 22px; border-radius: 22px; }
  .pulse-copy h2 { font-size: 2rem; }
  .pulse-copy p { margin-bottom: 16px; }
  .pulse-ring { width: 128px; height: 128px; margin: 0; }
  .pulse-ring::before { width: 102px; height: 102px; }
  .pulse-ring strong { font-size: 1.6rem; }
  .pulse-stats { grid-template-columns: 1fr; }
  .pulse-stat { min-height: 62px; }
}

/* Login: same product, same atmosphere. */
.login-layout { position: relative; isolation: isolate; color: var(--ink); background: transparent; }
.login-story { background: linear-gradient(140deg, #09100d, #0c2b1d 64%, #10251e); color: #fff; }
.login-story::before { background: rgba(57,245,139,.16); box-shadow: 0 0 100px rgba(57,245,139,.18); }
.login-story::after { border-color: rgba(57,245,139,.16); }
.login-story .eyebrow { color: var(--accent); }
.login-story h1 { color: #fff; }
.login-story em { color: var(--accent); }
.login-story p { color: #a7c1b5; }
.login-bottom { color: #6f9181; }
.login-form-wrap { background: rgba(7,10,10,.78); }
.login-form { color: var(--ink); background: rgba(14,22,19,.82); border-color: rgba(57,245,139,.16); }
.login-form>.eyebrow { color: var(--accent); }
.login-form h2 { color: #fff; }
.login-form .button.primary { color: #03110a; background: var(--accent); border-color: var(--accent); }
.login-form .pill { color: #ffd166; background: rgba(255,209,102,.11); }
.login-form-wrap .text-link, .login-form-wrap .text-button { color: var(--accent); }
.login-signature { color: #789089; }

@media (max-width: 760px), (pointer: coarse) and (max-width: 1000px) {
  .app-layout::after { width: 14rem; height: 14rem; right: -5rem; top: 14%; }
  .sidebar { background: rgba(8,14,12,.88); border-top-color: rgba(57,245,139,.15); }
  .nav-item { color: #8ea49c; }
  .nav-item.active { background: rgba(57,245,139,.1); box-shadow: inset 0 3px var(--accent); }
  .nav-item.active i { display: none; }
  .topbar { background: rgba(8,13,12,.78); }
  main { padding-top: 28px; }
  .page-heading h1 { font-size: clamp(1.75rem, 8vw, 2.35rem); }
  .training-hero { padding: 24px; }
  .card, .exercise-row, .editor-row { box-shadow: 0 12px 28px rgba(0,0,0,.2), inset 0 1px rgba(255,255,255,.035); }
}

@media (prefers-reduced-motion: reduce) {
  body::before, .app-layout::before, .app-layout::after, .training-hero::before, .page-heading { animation: none !important; }
}

/* Accessibility preferences follow the active dark theme. */
:focus-visible { outline-color: var(--accent); }
.error { color: #ff9a90; }
.button.ghost:hover { color: var(--accent); background: rgba(57,245,139,.08); }
html[data-contrast="high"] { --ink: #fff; --muted: #d9e8e1; --line: #8ca99b; --accent: #70ffa9; }
html[data-contrast="high"] :is(main, dialog) :is(p, small, dt, .muted, .eyebrow) { color: #d9e8e1; }
html[data-contrast="high"] :is(main, dialog) :is(.card, input, select, textarea, .button, .attention-card, .calendar-cell) { border-color: #8ca99b; }
html[data-contrast="high"] :is(.button.primary, .button.dark, [aria-pressed="true"].button) { background: #70ffa9; color: #03110a; }

/* Dark-theme coverage for components that still carried light backgrounds from the legacy styles. */
.readiness-scale label span, .discomfort-field label span { color: #d9e8e1; background: rgba(255,255,255,.035); border-color: rgba(160,196,184,.2); }
.readiness-scale input:checked + span, .discomfort-field input:checked + span { color: #03110a; background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 2px rgba(3,17,10,.7); }
.readiness-scale input:focus-visible + span, .discomfort-field input:focus-visible + span, .rating-scale input:focus-visible + span { outline-color: var(--accent); }
.readiness-note { color: #b8cdc4; background: rgba(255,255,255,.045); }
.readiness-summary { color: var(--ink); background: rgba(255,255,255,.035); border-color: rgba(160,196,184,.16); }
.readiness-summary > div > span { color: #d9e8e1; background: rgba(255,255,255,.06); }
.previous-suggestion { background: rgba(57,245,139,.07); border-color: rgba(57,245,139,.2); }
.previous-suggestion p { color: #b8cdc4; }
.previous-suggestion small { color: #8ea59d; }
.template-card { color: var(--ink); background: rgba(255,255,255,.035); border-color: rgba(160,196,184,.16); }
.template-preview { color: var(--ink); background: rgba(4,10,8,.55); }
.template-preview section+section { border-top-color: rgba(160,196,184,.16); }
.template-preview p { color: #a8bbb4; }
.number-stepper { background: rgba(4,10,8,.7); border-color: rgba(160,196,184,.24); }
.number-stepper input { background: transparent; box-shadow: none; }
.number-stepper>button { color: var(--accent); background: rgba(255,255,255,.06); }
.number-stepper>button:hover { background: rgba(57,245,139,.12); }
.working-label { color: #b8cdc4; background: rgba(255,255,255,.045); }
.finish-icon { color: var(--accent); background: rgba(57,245,139,.12); }
.video-placeholder { color: var(--ink); background: rgba(255,255,255,.04); }
.video-source { color: var(--accent); background: rgba(57,245,139,.12); }
.video-disclaimer { color: #96ada4; background: rgba(255,255,255,.04); }
.demonstration-image { background: rgba(255,255,255,.05); }
.sound-on { color: #03110a; background: var(--accent); }
.visual-goal { color: var(--ink); background: rgba(255,255,255,.035); border-color: rgba(160,196,184,.16); }
.visual-goal.achieved { background: rgba(57,245,139,.09); border-color: rgba(57,245,139,.3); }
.goal-ring { background: conic-gradient(var(--accent) var(--goal), rgba(255,255,255,.1) 0); }
.goal-ring::after { background: #0c1712; }
.change-list > div { color: var(--ink); background: rgba(255,255,255,.04); }
.change-list i { color: var(--accent); }
.skip-link { color: #03110a; background: var(--accent); }
select option, select optgroup { color: var(--ink); background: #0c1712; }

/* Vuelta a la página de presentación desde el acceso */
.login-form .back-home { display: flex; margin: 4px 0 -4px; color: var(--accent); }

/* ===== Navegación por pestañas dentro de cada pantalla (26/09/2026) =====
   Cada pantalla muestra un bloque por vez: se elige arriba en lugar de bajar. */
.view-off { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.view-tabs {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 15;
  display: flex; gap: 6px; margin: 0 0 22px; padding: 6px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none;
  border: 1px solid var(--line); border-radius: 16px;
  background: rgba(9, 15, 13, .9); backdrop-filter: blur(16px);
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
}
.view-tabs::-webkit-scrollbar { display: none; }
.view-tab {
  flex: 1 0 auto; scroll-snap-align: start;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 8px 16px; border: 1px solid transparent; border-radius: 11px;
  background: transparent; color: #9db1aa; font-size: .9375rem; font-weight: 650; white-space: nowrap;
  transition: background .18s, color .18s, border-color .18s;
}
.view-tab .icon { width: 18px; height: 18px; }
.view-tab:hover { color: var(--accent); background: rgba(57,245,139,.07); }
.view-tab[aria-selected="true"] { color: #03110a; background: linear-gradient(135deg, #39f58b, #18c96f); box-shadow: 0 6px 16px rgba(57,245,139,.2); }
.view-tab b { min-width: 22px; padding: 1px 7px; border-radius: 99px; background: rgba(255,255,255,.1); font-size: .75rem; text-align: center; }
.view-tab[aria-selected="true"] b { background: rgba(3,17,10,.18); }
html[data-contrast="high"] .view-tab { color: #d9e8e1; }
html[data-contrast="high"] .view-tab[aria-selected="true"] { background: #70ffa9; color: #03110a; }
.view-tabs.mobile-only { display: none; }
@media (max-width: 1000px) {
  .view-tabs.mobile-only { display: flex; }
  .view-off-mobile { display: none !important; }
}
/* Cuando una pestaña oculta una columna, la otra ocupa todo el ancho. */
.dashboard-grid:has(> .view-off), .progress-layout:has(> .view-off) { grid-template-columns: minmax(0, 1fr); }
.dashboard-grid .right-stack:not(.view-off) { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.view-tabs ~ .calendar-section, .view-tabs ~ .goals-section, .view-tabs ~ .student-pulse { margin-top: 0; }
#main[data-view="historial"] .history-heading { margin-top: 0; }
.attention-section { margin-top: 0; }

/* El resumen va después del entrenamiento en el HTML (así el primer "Empezar" es el visible),
   pero en "Mi semana" se muestra primero. */
#main[data-view="semana"] { display: flex; flex-direction: column; }
#main[data-view="semana"] > .page-heading { order: -3; }
#main[data-view="semana"] > .view-tabs { order: -2; }
#main[data-view="semana"] > .student-pulse { order: -1; }

/* Hoy en los días de la semana */
.today-badge { margin-left: 6px; padding: 1px 7px; border-radius: 99px; font-style: normal; font-size: .68rem; font-weight: 750; color: #03110a; background: var(--accent); vertical-align: 1px; }
.day-tab.is-today:not(.selected) { border-color: rgba(57,245,139,.45); }

/* Editor: cada ejercicio se pliega y muestra su resumen */
.editor-row-toggle { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 2px 12px; min-height: 48px; padding: 4px 8px; border: 0; border-radius: 10px; background: transparent; text-align: left; color: var(--ink); }
.editor-row-toggle:hover { background: rgba(57,245,139,.06); }
.editor-row-toggle strong { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-row-toggle small { grid-column: 1; color: var(--muted); font-size: .8125rem; }
.editor-row-toggle .toggle-chevron { grid-column: 2; grid-row: 1 / span 2; width: 20px; height: 20px; color: var(--accent); transform: rotate(90deg); transition: transform .2s; }
.editor-row.collapsed .toggle-chevron { transform: none; }
.editor-row.collapsed { padding-top: 14px; padding-bottom: 14px; }
.editor-row.collapsed .editor-exercise-heading { margin-bottom: 0; }
.editor-row.collapsed .editor-row-body { display: none; }
.editor-exercise-heading { flex-wrap: nowrap !important; }

/* Biblioteca: buscador y filtros por grupo */
.library-toolbar { display: grid; gap: 12px; margin-bottom: 22px; }
.library-search { position: relative; display: block; max-width: 520px; }
.library-search > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--accent); pointer-events: none; }
.library-search input { padding-left: 46px; }
.filter-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip { flex: 0 0 auto; min-height: 40px; padding: 8px 14px; border: 1px solid rgba(160,196,184,.22); border-radius: 99px; background: rgba(255,255,255,.035); color: #a8bbb4; font-size: .875rem; font-weight: 600; white-space: nowrap; }
.filter-chip:hover { color: var(--accent); border-color: rgba(57,245,139,.42); }
.filter-chip[aria-pressed="true"] { color: #03110a; background: var(--accent); border-color: var(--accent); }
.library-count { color: var(--muted); font-size: .8125rem; }
.library-card[hidden] { display: none; }
.library-empty { margin: 0 0 18px; }

/* Entrenamiento: el objetivo de repeticiones era blanco sobre blanco en el tema oscuro. */
.repetition-target { background: rgba(57,245,139,.07) !important; border: 1px solid rgba(57,245,139,.2); }
.timer-circle strong { color: #fff; }
.timer-track { stroke: rgba(255,255,255,.1); }
.resting .timer-ring { stroke: #9fc4ff; }
/* La vista previa ya abre las indicaciones: no repetir el botón debajo. */
.workout-main .exercise-visual ~ .session-guide { display: none; }

/* ===== Celulares (cualquier tamaño, vertical u horizontal) ===== */
@media (max-width: 760px), (pointer: coarse) and (max-width: 1000px) {
  main { padding-top: 18px; }
  .page-heading { gap: 14px; margin-bottom: 18px; }
  .page-heading .eyebrow { margin-bottom: 4px; font-size: .68rem; }
  .page-heading h1 { font-size: clamp(1.55rem, 7vw, 2rem); margin-bottom: 4px; }
  .app-layout:not(.workout-mode) .page-heading p { display: none; }
  .page-heading > .button { width: 100%; }
  .view-tabs { margin: 0 -6px 18px; padding: 5px; border-radius: 14px; }
  .view-tab { flex: 1 0 auto; min-height: 44px; padding: 8px 12px; font-size: .875rem; gap: 6px; }
  .demo-banner { padding-top: 7px; padding-bottom: 7px; }
  .topbar { min-height: 64px; padding-top: 8px; padding-bottom: 8px; }

  /* Días: una sola fila deslizable en lugar de varias filas */
  .day-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(96px, 1fr); grid-template-columns: none; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; margin: 0 -2px 18px; padding: 2px; }
  .day-tabs::-webkit-scrollbar { display: none; }
  .day-tab { scroll-snap-align: start; padding: 10px; gap: 4px; }
  .week-heading { display: none; }
  .training-hero { padding: 20px; margin-bottom: 20px; }
  .training-hero h2 { font-size: 1.55rem; margin: 12px 0 6px; }
  .training-hero p { margin-bottom: 14px; }
  .hero-helper, .hero-art { display: none; }
  .section-title { margin-bottom: 14px; }
  .exercise-list { gap: 12px; }
  .exercise-row { padding: 16px; }
  .exercise-card-heading { margin-bottom: 12px; }
  .exercise-number { width: 36px; height: 36px; }
  .exercise-prescription { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .exercise-prescription > div { padding: 9px 6px; text-align: center; }
  .exercise-prescription dt { font-size: .6875rem; margin-bottom: 4px; }
  .exercise-prescription dd { font-size: 1.15rem; }
  .exercise-prescription small { font-size: .6875rem; }
  .no-weight { font-size: .75rem; }
  .exercise-card-footer { margin-top: 12px; }
  .exercise-visual.compact { min-height: 76px; margin-bottom: 12px; }

  /* Panel de Thiago: métricas en una fila, acciones en dos columnas */
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
  .metric { display: block; padding: 12px 10px; }
  .metric > div { font-size: .6875rem; line-height: 1.3; margin-bottom: 6px; }
  .metric > strong { font-size: 1.45rem; }
  .metric > strong > span { font-size: .9rem; }
  .metric > small { display: none; }
  .students-card .section-title { margin-bottom: 12px; }
  .student-search-label { margin-bottom: 16px; }
  .student-card { padding: 16px; gap: 14px; }
  .row-actions { display: grid; grid-template-columns: 1fr 1fr; flex-direction: row; gap: 8px; }
  .row-actions .button { min-height: 44px; padding: 8px 10px; font-size: .8125rem; }
  .row-actions .button.primary { grid-column: 1 / -1; }

  /* Editor */
  .planning-toolbar { padding: 14px; gap: 12px; margin-bottom: 16px; }
  .planning-toolbar > .button { width: auto; flex: 1 1 45%; }
  .editor-days { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; }
  .editor-days::-webkit-scrollbar { display: none; }
  .editor-day-tab, .editor-days > .button { flex: 0 0 auto; min-width: 118px; }
  .editor-day-heading { padding: 16px; gap: 14px; margin-bottom: 14px; }
  .editor-row { padding: 14px; margin-bottom: 12px; }
  .editor-row-toggle strong { font-size: .98rem; }
  .save-bar { position: sticky; bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 8px); z-index: 12; padding: 8px 10px; gap: 4px; }
  .save-bar > div { flex-direction: row; gap: 8px; }
  .save-bar .button { flex: 1 1 0; min-height: 44px; padding: 8px; font-size: .8125rem; gap: 6px; }
  .save-bar .button .icon { width: 18px; height: 18px; }
  .save-bar > span { font-size: .75rem; line-height: 1.3; }
  .planning-toolbar > .button { min-height: 44px; padding: 8px 10px; font-size: .8125rem; white-space: nowrap; gap: 6px; }
  .planning-toolbar > .button .icon { width: 18px; height: 18px; }
  .planning-toolbar .inline-label { gap: 4px; }

  /* Progreso */
  .progress-overview { padding: 18px; gap: 14px; }
  .overview-number { font-size: 2.8rem; margin: 8px 0; }
  .weekly-summary-grid > div { padding: 12px; }
  .progress-period { margin-bottom: 14px; }
  .goals-section, .achievement-section, .weekly-summary, .progress-focus { margin-bottom: 16px; }

  /* Entrenamiento: todo lo necesario para la serie en la primera pantalla */
  .workout-mode .page-heading { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin-bottom: 12px; }
  .workout-mode .page-heading h1 { font-size: 1.5rem; }
  .workout-mode .page-heading p { font-size: .875rem; }
  .workout-mode .page-heading > .button { width: auto; justify-self: start; min-height: 40px; padding: 6px 0; font-size: .875rem; }
  .workout-mode .session-progress { margin-bottom: 12px; }
  .workout-main { padding: 16px 14px; }
  .workout-card-top { margin-bottom: 12px; }
  .workout-main .exercise-visual.compact { margin-bottom: 8px; }
  .workout-main .alternative-button, .workout-main [data-action="upload-technique"] { min-height: 44px; margin: 6px 0; font-size: .875rem; }
  .timer-area { margin: 14px 0; }
  .repetition-target { padding: 10px 14px; }
  .previous-suggestion { padding: 14px; margin-bottom: 14px; }
  .prescription { margin: 12px 0 14px; }
  .timer-browser-note { margin-top: 14px; font-size: .75rem; }
  .library-toolbar { margin-bottom: 16px; }
  .library-grid { gap: 14px; }
  .library-grid { gap: 10px; }
  .library-card { display: grid; grid-template-columns: 108px minmax(0, 1fr); flex-direction: row; padding: 0; }
  .library-card > .exercise-visual { aspect-ratio: auto; min-height: 100%; height: 100%; border-radius: 16px 0 0 16px; }
  .library-card > .exercise-visual .visual-fallback { justify-content: center; padding: 10px; }
  .library-card > .exercise-visual .visual-fallback > span, .library-card > .exercise-visual .visual-caption { display: none; }
  .library-card > .exercise-visual .visual-fallback > .icon { display: block; width: 28px; height: 28px; }
  .library-card > .exercise-visual .video-badge { top: auto; bottom: 6px; left: 6px; right: 6px; justify-content: center; padding: 4px; font-size: 0; }
  .library-card > .exercise-visual .video-badge .icon { width: 14px; height: 14px; }
  .library-body { padding: 12px 14px; }
  .library-body .eyebrow { margin-bottom: 4px; }
  .library-body h2 { min-height: 0; margin-bottom: 4px; font-size: 1.05rem; }
  .library-body > p { -webkit-line-clamp: 2; font-size: .8125rem; margin-bottom: 8px; }
  .library-body > .button { min-height: 42px; padding: 8px 10px; font-size: .8125rem; }
  .library-body > .button .icon:last-child { display: none; }
  .library-body > .text-link { margin-top: 2px; min-height: 36px; padding: 4px 0; font-size: .8125rem; }
}
/* Celulares chicos (iPhone SE, Android compactos) */
@media (max-width: 380px) {
  .view-tab { padding: 8px 10px; font-size: .8125rem; }
  .view-tab .icon { display: none; }
  .metric > div { font-size: .625rem; }
  .metric > strong { font-size: 1.25rem; }
  .exercise-prescription { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row-actions { grid-template-columns: 1fr; }
}
/* Horizontal: la barra de pestañas y la de guardado no deben comerse el alto */
@media (pointer: coarse) and (orientation: landscape) and (max-height: 500px) {
  .view-tabs { position: static; }
  .save-bar { position: static; }
}
/* Muchos alumnos: filtros, orden, conteo, "mostrar más" y buscador de alumno */
.student-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin: -8px 0 16px; }
.student-toolbar .filter-chips { flex: 1 1 420px; min-width: 0; }
.filter-chip b { margin-left: 4px; font-weight: 700; opacity: .75; }
.student-sort select { min-width: 200px; }
.results-count { margin: 0 0 12px; color: var(--muted); font-size: .875rem; }
.show-more { margin-top: 16px; }
.student-picker { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; flex: 1 1 520px; min-width: 0; }
.student-picker .inline-label { flex: 1 1 200px; min-width: 0; }
.student-picker .inline-label input, .student-picker .inline-label select { width: 100%; min-width: 0; }
.picker-done { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--accent); font-size: .875rem; font-weight: 600; }
.picker-done .icon { width: 18px; height: 18px; }
.loading-state { display: grid; justify-items: center; gap: 14px; padding: 72px 16px; color: var(--muted); text-align: center; }
.loading-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); animation: loading-pulse 1s ease-in-out infinite alternate; }
@keyframes loading-pulse { from { opacity: .25; transform: scale(.8); } to { opacity: 1; transform: scale(1.15); } }
html[data-reduced-motion="true"] .loading-dot { animation: none; }
@media (prefers-reduced-motion: reduce) { .loading-dot { animation: none; } }
@media (max-width: 720px) {
  .student-toolbar { margin-top: 0; }
  .student-sort, .student-sort select { width: 100%; }
  .planning-toolbar > .student-picker { width: 100%; }
  .student-picker > .button, .student-picker > .picker-done { width: 100%; justify-content: center; }
}
/* Entrenar sin temporizador: rutina completa en una pantalla y cierre con un botón */
.quick-start { margin-left: 10px; }
.hero-copy .quick-start { margin-top: 10px; }
.training-hero .button.quick-start, .training-hero .button.quick-start:hover { color: var(--accent); background: rgba(57, 245, 139, .08); border-color: rgba(57, 245, 139, .45); box-shadow: none; }
.training-hero .button.quick-start:hover { background: rgba(57, 245, 139, .16); }
.routine-heading { flex-wrap: wrap; gap: 10px; }
.session-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-workout { display: grid; gap: 16px; }
.quick-list .exercise-card-footer { flex-wrap: wrap; gap: 10px; }
.quick-check { margin-left: auto; }
.quick-check[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: rgba(57, 245, 139, .1); }
.quick-instructions { margin: 14px 0 0; color: var(--muted); font-size: .9375rem; line-height: 1.55; }
.exercise-row.quick-done { opacity: .62; }
.exercise-row.quick-done:hover { opacity: 1; }
.quick-finish { display: grid; gap: 14px; border-color: rgba(57, 245, 139, .35); }
.quick-finish strong { font-size: 1.125rem; }
.quick-finish p { margin: 6px 0 0; color: var(--muted); font-size: .9375rem; }
@media (max-width: 720px) {
  .quick-start, .hero-copy .quick-start { width: 100%; margin-left: 0; justify-content: center; }
  .session-actions, .session-actions > .button { width: 100%; }
  .session-actions > .button { justify-content: center; }
  .quick-check { width: 100%; margin-left: 0; justify-content: center; }
  .quick-finish { padding: 18px; }
}
