:root {
  --bg: #090c12;
  --surface: #121722;
  --surface-2: #192131;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --volt: #a3e635;
  --volt-dark: #0b1106;
  --emerald: #22c55e;
  --amber: #f59e0b;
  --coral: #f97316;
  --danger: #ef4444;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.app-shell {
  max-width: 540px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(96px + var(--safe-bottom));
}

.loading-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 600;
}

/* --- Cabeceras y layout móvil --- */
.page {
  padding: 18px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.page-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 3px;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(163, 230, 53, 0.14);
  color: var(--volt);
  border: 1px solid rgba(163, 230, 53, 0.32);
}

.badge-muted {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  border-color: var(--border);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

/* --- Botones --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 16px;
  border-radius: 13px;
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  color: var(--text);
  background: var(--surface-2);
  transition: transform 0.08s ease, filter 0.15s ease;
  user-select: none;
}

.btn:active { transform: scale(0.97); }
.btn-volt { background: linear-gradient(135deg, #bef264, #84cc16); color: var(--volt-dark); }
.btn-secondary { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--muted); }
.btn-danger { background: rgba(239, 68, 68, 0.16); border-color: rgba(239, 68, 68, 0.35); color: #fca5a5; }
.btn-sm { padding: 8px 12px; font-size: 0.8rem; border-radius: 10px; }
.btn-xs { padding: 6px 10px; font-size: 0.74rem; border-radius: 8px; }
.btn-full { width: 100%; }

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

/* --- Onboarding Wizard --- */
.onboard-wrap {
  padding: 24px 18px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand-hero {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-hero img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.step-dots {
  display: flex;
  gap: 6px;
}

.step-dot {
  height: 5px;
  flex: 1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.step-dot.active {
  background: var(--volt);
}

.choice-grid {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.choice-card {
  text-align: left;
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.choice-card.selected {
  border-color: var(--volt);
  background: rgba(163, 230, 53, 0.08);
}

.choice-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.choice-title {
  font-size: 1.02rem;
  font-weight: 800;
}

.choice-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.day-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.day-tabs::-webkit-scrollbar { display: none; }

.day-tab {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.day-tab.active {
  background: var(--volt);
  color: var(--volt-dark);
  border-color: var(--volt);
}

.setup-ex-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.setup-ex-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.setup-ex-info {
  min-width: 0;
  flex: 1;
}

.setup-ex-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text);
}

.setup-ex-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

.setup-ex-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --- Tarjetas Home ("¿Qué toca hoy?") --- */
.resume-banner {
  background: linear-gradient(135deg, rgba(163, 230, 53, 0.16), rgba(34, 197, 94, 0.14));
  border: 1.5px solid rgba(163, 230, 53, 0.5);
  border-radius: 16px;
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.day-cards {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.day-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.day-card:active { transform: scale(0.99); }

.day-card.suggested {
  border-color: rgba(163, 230, 53, 0.45);
  background: linear-gradient(180deg, rgba(163, 230, 53, 0.07) 0%, var(--surface) 100%);
}

.day-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.day-card-title {
  font-size: 1.1rem;
  font-weight: 900;
}

.day-card-focus {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}

.day-ex-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-chip {
  font-size: 0.72rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 4px 8px;
  border-radius: 8px;
}

.day-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  color: var(--muted);
}

/* --- Modo Entrenamiento Activo --- */
.workout-topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  background: rgba(9, 12, 18, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.workout-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.workout-title-col {
  flex: 1;
  min-width: 0;
}

.workout-title-col h2 {
  font-size: 1.05rem;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workout-meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.progress-track {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #a3e635, #22c55e);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.ex-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.ex-card.all-done {
  border-color: rgba(34, 197, 94, 0.45);
}

.ex-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ex-title-btn {
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  flex: 1;
  min-width: 0;
  padding: 0;
}

.ex-name-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.muscle-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ex-name {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.ex-sub-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 5px;
}

.tag-sm {
  font-size: 0.69rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
}

.tag-guide {
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.tag-swapped {
  background: rgba(245, 158, 11, 0.16);
  color: #fde047;
}

/* Tip visible directo en modo Principiante */
.beginner-tip-box {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 12px;
  padding: 10px 11px;
  font-size: 0.8rem;
  color: #fef3c7;
  line-height: 1.38;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

/* Barra objetivo + última vez + botón descanso */
.ex-stats-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 11px;
  padding: 8px 10px;
}

.ex-targets {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.76rem;
}

.target-line {
  color: #e2e8f0;
  font-weight: 700;
}

.prev-line {
  color: var(--muted);
  font-weight: 600;
}

.rest-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  border-radius: 10px;
  border: 1px solid rgba(163, 230, 53, 0.35);
  background: rgba(163, 230, 53, 0.12);
  color: var(--volt);
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

/* Filas de series */
.sets-table {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sets-head {
  display: grid;
  grid-template-columns: 58px 1fr 1fr 48px;
  gap: 8px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 0 4px;
}

.set-row {
  display: grid;
  grid-template-columns: 58px 1fr 1fr 48px;
  gap: 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 5px;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.set-row.done {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
}

.set-label-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
}

.set-num {
  font-size: 0.8rem;
  font-weight: 900;
  color: #cbd5e1;
}

.set-prev {
  font-size: 0.65rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.set-input {
  width: 100%;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0a0e16;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
  outline: none;
}

.set-input:focus {
  border-color: var(--volt);
}

.set-check {
  width: 44px;
  height: 42px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  background: #0d121c;
  color: var(--muted);
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.set-row.done .set-check {
  background: var(--volt);
  border-color: var(--volt);
  color: var(--volt-dark);
}

.ex-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* --- Placa Visual Estilo Máquina de Gym --- */
.machine-plate {
  background: linear-gradient(180deg, #161d2c 0%, #0d121c 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.plate-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.plate-rivet {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #475569;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.plate-brand {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #94a3b8;
}

.plate-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.plate-panel {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.plate-step {
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--volt);
  background: rgba(163, 230, 53, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
}

.plate-svg {
  width: 100%;
  max-width: 140px;
  height: 112px;
}

.plate-cue {
  font-size: 0.72rem;
  font-weight: 700;
  color: #e2e8f0;
  text-align: center;
  line-height: 1.25;
  min-height: 28px;
  display: flex;
  align-items: center;
}

.plate-arrow-mid {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--volt);
}

.plate-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 9px;
  font-size: 0.7rem;
  color: var(--muted);
}

.leg-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}

.leg-muscle { background: #f97316; }
.leg-arrow { background: #a3e635; }

.coach-tip-card {
  margin-top: 12px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px;
  padding: 13px;
}

.coach-tip-label {
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fbbf24;
  margin-bottom: 5px;
}

.coach-tip-text {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fef3c7;
  line-height: 1.4;
}

/* --- Sustitución de máquinas --- */
.swap-group-title {
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 12px 0 8px;
}

.swap-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 9px;
}

.swap-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.swap-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* --- Temporizador Inteligente Flotante --- */
.rest-dock {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(74px + var(--safe-bottom));
  width: calc(100% - 24px);
  max-width: 512px;
  background: rgba(15, 22, 36, 0.96);
  backdrop-filter: blur(20px);
  border: 1.5px solid rgba(163, 230, 53, 0.45);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65);
  z-index: 45;
}

.rest-dock.finished {
  border-color: var(--volt);
  animation: dockPulse 0.9s ease-in-out infinite;
}

@keyframes dockPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(163, 230, 53, 0.5), 0 14px 36px rgba(0, 0, 0, 0.65); }
  50% { box-shadow: 0 0 0 8px rgba(163, 230, 53, 0), 0 14px 36px rgba(0, 0, 0, 0.65); }
}

.rest-progress-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.rest-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #a3e635, #22c55e);
  transition: width 0.25s linear;
}

.rest-dock-main {
  padding: 10px 12px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rest-info {
  min-width: 0;
}

.rest-ex-name {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rest-time-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rest-countdown {
  font-size: 1.65rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  line-height: 1.1;
}

.rest-done-tag {
  font-size: 0.78rem;
  font-weight: 900;
  color: var(--volt);
}

.rest-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rest-btn {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.rest-btn-accent {
  background: var(--volt);
  color: var(--volt-dark);
  border-color: var(--volt);
}

.rest-btn-ghost {
  background: transparent;
  color: var(--muted);
}

.rest-presets-row {
  display: flex;
  gap: 6px;
  padding: 0 12px 10px;
  flex-wrap: wrap;
}

.rest-preset-chip {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  cursor: pointer;
}

.rest-preset-chip.active {
  background: rgba(163, 230, 53, 0.18);
  border-color: var(--volt);
  color: var(--volt);
}

/* --- Navegación inferior fija --- */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 540px;
  background: rgba(11, 15, 23, 0.94);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 8px 10px calc(8px + var(--safe-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  z-index: 35;
}

.nav-item {
  background: none;
  border: none;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.nav-item .nav-ic {
  font-size: 1.2rem;
  line-height: 1;
}

.nav-item.active {
  color: var(--volt);
  background: rgba(163, 230, 53, 0.1);
}

/* --- Bottom Sheet Modal --- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 12, 0.74);
  backdrop-filter: blur(5px);
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-card {
  width: 100%;
  max-width: 540px;
  max-height: 88vh;
  background: #101622;
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  border-top: 1px solid var(--border-strong);
  padding: 10px 16px calc(22px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: sheetUp 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes sheetUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 auto;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sheet-title {
  font-size: 1.05rem;
  font-weight: 900;
}

.sheet-body {
  overflow-y: auto;
  padding-right: 2px;
}

/* --- Progreso & Perfil --- */
.stat-cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
}

.stat-num {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--volt);
  font-variant-numeric: tabular-nums;
}

.stat-lbl {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 700;
}

.chart-card, .history-card, .setting-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.select-input {
  width: 100%;
  background: #0a0e16;
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 700;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.setting-row:last-child { border-bottom: none; }

.segmented {
  display: inline-flex;
  background: #090c12;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
}

.seg-btn.active {
  background: var(--volt);
  color: var(--volt-dark);
}

.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: #182235;
  color: #ffffff;
  border: 1px solid rgba(163, 230, 53, 0.45);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
  z-index: 90;
  white-space: nowrap;
}

/* --- Sobrecarga progresiva & Mesociclo --- */
.meso-card {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.11), rgba(163, 230, 53, 0.09));
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 16px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}

.meso-card.phase-overload {
  border-color: rgba(249, 115, 22, 0.42);
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.13), rgba(245, 158, 11, 0.08));
}

.meso-card.phase-deload {
  border-color: rgba(168, 85, 247, 0.42);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.13), rgba(56, 189, 248, 0.08));
}

.meso-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.meso-title {
  font-size: 0.9rem;
  font-weight: 900;
  color: #ffffff;
}

.meso-tip {
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.35;
}

.meso-bars {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
}

.meso-seg {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.meso-seg.done { background: rgba(163, 230, 53, 0.5); }
.meso-seg.current { background: var(--volt); box-shadow: 0 0 8px rgba(163, 230, 53, 0.6); }

.overload-banner {
  border-radius: 12px;
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.8rem;
  line-height: 1.35;
}

.overload-banner.up {
  background: rgba(34, 197, 94, 0.13);
  border: 1px solid rgba(34, 197, 94, 0.42);
  color: #dcfce7;
}

.overload-banner.down {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.36);
  color: #fef3c7;
}

.overload-banner.next-week {
  background: rgba(56, 189, 248, 0.11);
  border: 1px solid rgba(56, 189, 248, 0.32);
  color: #e0f2fe;
}

.overload-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-size: 0.8rem;
}

.hidden { display: none !important; }
