/* Analizador de Fuerza - Mobile Styles */
:root {
  --bg-dark: #0B0B12;
  --bg-card: #14141F;
  --bg-input: #1C1C2A;
  --border-color: #29293D;
  --accent-green: #7C5CFF;
  --accent-orange: #F2C200;
  --accent-blue: #22D3EE;
  --accent-pink: #E53935;
  --text-main: #f0f2f5;
  --text-muted: #8e95a5;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.5;
  padding-bottom: 40px;
}

.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 20px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

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

.logo-icon {
  font-size: 26px;
  background: none; overflow: hidden;
  border-radius: 10px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.subtitle {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-demo {
  background: rgba(255, 150, 40, 0.15);
  border: 1px solid var(--accent-orange);
  color: var(--accent-orange);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-demo:hover {
  background: var(--accent-orange);
  color: #000;
}

/* Views */
.view {
  display: none;
}

.view.active {
  display: block;
}

/* Sections */
.section {
  margin-bottom: 22px;
}

.section-title {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}

/* Presets */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.preset-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-main);
  text-align: left;
}

.preset-card:active,
.preset-card.active {
  border-color: var(--accent-green);
  background: rgba(90, 220, 120, 0.08);
}

.preset-icon {
  font-size: 22px;
  margin-bottom: 6px;
}

.preset-name {
  font-size: 14px;
  font-weight: 700;
}

.preset-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* Video Dropzone */
.video-dropzone {
  background: var(--bg-card);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  transition: border-color 0.2s;
}

.video-dropzone.has-file {
  border-color: var(--accent-green);
  background: rgba(90, 220, 120, 0.05);
}

.camera-icon {
  font-size: 38px;
  margin-bottom: 8px;
}

.drop-text strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.drop-text span {
  font-size: 12px;
  color: var(--text-muted);
}

.drop-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.btn-pill {
  background: var(--accent-green);
  color: #ffffff;
  border: none;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
}

.btn-pill.outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.file-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
}

.btn-remove {
  background: none;
  border: none;
  color: #ff5555;
  font-size: 16px;
  cursor: pointer;
}

/* Form inputs */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.input-unit {
  position: relative;
  display: flex;
  align-items: center;
}

.input-unit input,
.form-group input,
.form-group select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  outline: none;
}

.input-unit input:focus,
.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent-green);
}

.input-unit span {
  position: absolute;
  right: 12px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
}

/* Advanced details */
.advanced-details {
  margin-top: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.advanced-details summary {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

/* Primary Button */
.action-footer {
  margin-top: 24px;
  position: sticky;
  bottom: 12px;
  z-index: 10;
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #8B6DFF, #5B3FE0);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(90, 220, 120, 0.25);
  transition: transform 0.1s, opacity 0.2s;
}

.btn-primary:active {
  transform: scale(0.98);
}

/* Progress View */
.progress-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  margin-top: 40px;
}

.spinner-ring {
  width: 50px;
  height: 50px;
  margin: 0 auto 20px;
  border: 4px solid rgba(90, 220, 120, 0.15);
  border-top-color: var(--accent-green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.progress-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

.progress-bar-container {
  background: var(--bg-input);
  border-radius: 10px;
  height: 10px;
  overflow: hidden;
  margin: 24px 0 10px;
}

.progress-bar-fill {
  background: linear-gradient(90deg, var(--accent-green), var(--accent-blue));
  height: 100%;
  transition: width 0.3s ease;
}

.progress-pct {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-green);
}

.progress-steps {
  margin-top: 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-item {
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--bg-input);
}

.step-item.active {
  color: #fff;
  border-left: 3px solid var(--accent-green);
}

/* Results View */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.btn-back {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.badge-success {
  background: rgba(90, 220, 120, 0.15);
  color: var(--accent-green);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 12px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 12px;
}

.kpi-card.highlight {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(255, 150, 40, 0.12), rgba(236, 72, 200, 0.08));
  border-color: rgba(255, 150, 40, 0.4);
}

.kpi-label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.kpi-value {
  display: block;
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  margin: 4px 0 2px;
}

.kpi-card.highlight .kpi-value {
  color: var(--accent-orange);
  font-size: 32px;
}

.kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* Video Container */
.video-container {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  margin-bottom: 14px;
  border: 1px solid var(--border-color);
}

.video-container video {
  width: 100%;
  display: block;
  max-height: 520px;
  object-fit: contain;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.btn-download {
  display: block;
  text-align: center;
  text-decoration: none;
  background: var(--accent-blue);
  color: #0b1528;
  font-size: 13px;
  font-weight: 700;
  padding: 12px;
  border-radius: var(--radius-md);
}

.btn-download.secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

/* Reps Table */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.rep-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  font-size: 12px;
}

.rep-table th,
.rep-table td {
  padding: 10px 8px;
  text-align: center;
}

.rep-table th {
  background: var(--bg-input);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 11px;
}

.rep-table tbody tr {
  border-top: 1px solid var(--border-color);
}

.rep-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.badge-fastest {
  color: var(--accent-green);
  font-weight: 700;
}


/* ====== Analizador de Fuerza (app en el celular) ====== */
html { color-scheme: dark; }
body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.app-container { padding-top: calc(12px + env(safe-area-inset-top)); }
button, input, select { font-family: inherit; }
.hint { font-size: 12.5px; color: var(--text-muted); margin-top: 10px; line-height: 1.45; }
.aviso { background: rgba(255,150,40,.12); border: 1px solid rgba(255,150,40,.45); color: #ffd2a6;
  border-radius: var(--radius-md); padding: 10px 12px; font-size: 13px; margin-bottom: 16px; }
.aviso.ok { background: rgba(124,92,255,.1); border-color: rgba(124,92,255,.4); color: #DCD3FF; }
.buscar { width: 100%; background: var(--bg-input); border: 1px solid var(--border-color); color: #fff;
  font-size: 15px; padding: 11px 12px; border-radius: var(--radius-sm); outline: none; margin-bottom: 10px; }
.buscar:focus { border-color: var(--accent-green); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-muted);
  font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 18px; cursor: pointer; }
.chip.active { color: #ffffff; background: var(--accent-green); border-color: var(--accent-green); }
.lista-ej { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px;
  max-height: 290px; overflow-y: auto; padding-right: 2px; }
.ej-elegido { display: flex; align-items: center; gap: 12px; background: rgba(124,92,255,.08);
  border: 1px solid var(--accent-green); border-radius: var(--radius-md); padding: 12px 14px; margin-bottom: 10px; }
.ej-elegido .preset-icon { margin: 0; font-size: 26px; }
.ej-elegido strong { display: block; font-size: 15px; }
.ej-elegido small { color: var(--text-muted); font-size: 12px; }
.ej-elegido button { margin-left: auto; }
.btn-sec { background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-main);
  padding: 8px 14px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-sec.peligro { color: #ff7b7b; border-color: rgba(255,90,90,.4); }
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: center;
  background: rgba(10,12,16,.94); backdrop-filter: blur(10px); border-top: 1px solid var(--border-color);
  padding-bottom: env(safe-area-inset-bottom); }
.nav-in { display: flex; width: 100%; max-width: 480px; }
.nav button { flex: 1; background: none; border: none; color: var(--text-muted); padding: 10px 0 12px;
  font-size: 11px; font-weight: 600; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.nav button span { font-size: 20px; line-height: 1; }
.nav button.active { color: var(--accent-green); }
.action-footer { bottom: calc(72px + env(safe-area-inset-bottom)); }
.card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md);
  padding: 14px; margin-bottom: 12px; }
.card h3 { font-size: 14px; font-weight: 800; margin-bottom: 8px; }
.card p, .card li { font-size: 13px; color: #cfd3dc; line-height: 1.5; }
.card ul { padding-left: 18px; }
.card li + li { margin-top: 6px; }
.kpi-grid.tres { grid-template-columns: repeat(3, 1fr); }
.kpi-grid.tres .kpi-value { font-size: 22px; }
.kpi-card.rpe { background: linear-gradient(135deg, rgba(34,211,238,.14), rgba(124,92,255,.08)); border-color: rgba(34,211,238,.4); }
.kpi-card.rpe .kpi-value { color: var(--accent-blue); }
.kpi-value small { font-size: 14px; font-weight: 700; color: var(--text-muted); }
.etiqueta { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 12px;
  background: var(--bg-input); color: var(--text-main); margin: 0 6px 6px 0; }
.etiqueta.verde { background: rgba(124,92,255,.15); color: var(--accent-green); }
.etiqueta.naranja { background: rgba(255,150,40,.15); color: var(--accent-orange); }
.etiqueta.azul { background: rgba(34,211,238,.15); color: var(--accent-blue); }
.tabla { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tabla th { text-align: left; color: var(--text-muted); font-weight: 700; font-size: 11px; padding: 8px 6px;
  border-bottom: 1px solid var(--border-color); white-space: nowrap; }
.tabla td { padding: 9px 6px; border-bottom: 1px solid rgba(38,44,61,.6); white-space: nowrap; }
.tabla tr:last-child td { border-bottom: none; }
.table-responsive { overflow-x: auto; background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: 4px 8px; }
.badge-fastest { color: var(--accent-green); font-weight: 800; }
canvas.grafica { width: 100%; height: 190px; display: block; }
.fila-botones { display: flex; gap: 8px; flex-wrap: wrap; }
.historial-item { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid rgba(38,44,61,.6); }
.historial-item:last-child { border-bottom: none; }
.historial-item strong { font-size: 13.5px; display: block; }
.historial-item small { color: var(--text-muted); font-size: 12px; }
.historial-item .der { text-align: right; flex: none; }
.historial-item .der b { color: var(--accent-orange); font-size: 15px; display: block; }
.vacio { text-align: center; color: var(--text-muted); font-size: 13px; padding: 26px 10px; }
.progress-card .btn-sec { margin-top: 18px; }
.step-item.hecho { color: var(--accent-green); }
.btn-crear { width: 100%; margin-top: 10px; padding: 11px 14px; }
.form-propio { margin-top: 12px; background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: 14px; }
.form-propio .form-group.full { grid-column: 1 / -1; }
.form-propio input[type=text] { width: 100%; }
.fila-botones { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.ej-botones { margin-left: auto; display: flex; gap: 6px; }
.ej-elegido .ej-botones button { margin-left: 0; }
.btn-pill.vivo { margin-top: 12px; width: 100%; background: rgba(255,80,80,.12); color: #ffb3b3; border: 1px solid rgba(255,90,90,.45); }
.btn-marca { width: 100%; margin-top: 10px; padding: 10px 14px; }
.btn-marca.hecho { border-color: var(--accent-green); color: var(--accent-green); }
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.82); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-caja { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 14px; width: 100%; max-width: 480px; }
.marca-lienzo { display: flex; justify-content: center; background: #000; border-radius: 10px; overflow: hidden; }
#marca-canvas { max-width: 100%; max-height: 62vh; touch-action: none; cursor: crosshair; }
.grafica.alta { height: 260px; }
.pestanas { margin-bottom: 14px; }
.sesion { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 12px 14px; margin-bottom: 10px; }
.sesion-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sesion-cab strong { font-size: 15px; }
.sesion-cab small, .sesion small { color: var(--text-muted); font-size: 12px; }
.sesion-ej { border-top: 1px solid var(--border-color); margin-top: 9px; padding-top: 8px; font-size: 13px; }
.sesion-ej b { display: block; margin-bottom: 3px; }
.sesion-ej .serie { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 12.5px; padding: 1px 0; }
.sesion-ej .fatiga { color: #ffd2a6; font-size: 12px; margin-top: 3px; }
.tec-ok { color: #DCD3FF; }
.tec-lista { margin: 0; padding-left: 18px; }
.tec-lista li { margin: 3px 0; color: #ffd2a6; }
td.tec { color: #ffb070; font-size: 11.5px; max-width: 150px; }
#v-vivo.active { display: flex; flex-direction: column; }
.vivo-pantalla { position: relative; background: #000; border-radius: var(--radius-md); overflow: hidden; height: 62vh; min-height: 300px; }
.vivo-pantalla video, .vivo-pantalla canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.vivo-hud { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; }
.vivo-reps { background: rgba(10,12,16,.78); border-radius: 14px; padding: 6px 14px; text-align: center; }
.vivo-reps span { display: block; font-size: 54px; font-weight: 800; line-height: 1; color: var(--accent-green); }
.vivo-reps small, .vivo-datos small { color: var(--text-muted); font-size: 11px; display: block; }
.vivo-datos { display: flex; gap: 8px; }
.vivo-datos div { background: rgba(10,12,16,.78); border-radius: 12px; padding: 6px 10px; text-align: center; min-width: 74px; }
.vivo-datos b { font-size: 24px; display: block; }
.vivo-aviso { position: absolute; left: 10px; right: 10px; bottom: 44px; background: rgba(220,40,40,.92); color: #fff; font-weight: 800; font-size: 22px; text-align: center; border-radius: 12px; padding: 12px; }
.vivo-cuenta { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 120px; font-weight: 800; color: #fff; text-shadow: 0 4px 20px #000; }
.vivo-estado { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; color: #fff; font-size: 13px; text-shadow: 0 1px 4px #000; margin: 0; }
.vivo-controles { margin-top: 12px; }
.btn-pdf { width: 100%; margin-bottom: 16px; }
.aviso-video { margin: 0 0 14px; }
.historial-item[role=button], .serie[role=button] { cursor: pointer; }
.historial-item[role=button]:active, .serie[role=button]:active { background: rgba(124,92,255,.08); }
.historial-item small.ver { color: var(--accent-green); font-size: 11px; display: block; margin-bottom: 2px; }
.serie[role=button] span:last-child::after { content: ' ›'; color: var(--accent-green); }

/* ============ Entrenar ============ */
#v-entrenar { padding-bottom: 70px; }
.en-imp-fila { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.en-imp-fila .btn-sec { flex: 1; min-width: 140px; }
.en-unidad, .en-desc-sel select { background: var(--bg-input); color: var(--text-main); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 8px; font-size: 13px; }
.en-tarjeta { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 12px 14px; margin-bottom: 10px; cursor: pointer; }
.en-tarjeta:active { border-color: var(--accent-green); }
.en-tarjeta-cab strong { display: block; font-size: 15px; }
.en-tarjeta-cab small { color: var(--text-muted); font-size: 12px; }
.en-tarjeta-datos { display: flex; gap: 12px; margin: 8px 0 6px; font-size: 13px; color: var(--accent-orange); font-weight: 700; }
.en-origen { color: var(--accent-blue) !important; font-weight: 600 !important; }
.en-tarjeta-ej { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.en-cab { position: sticky; top: 0; z-index: 5; background: var(--bg-dark); padding: 6px 0 10px; border-bottom: 1px solid var(--border-color); margin-bottom: 12px; }
.en-titulo { width: 100%; background: transparent; border: none; color: var(--text-main); font-size: 19px; font-weight: 800; padding: 4px 0; outline: none; }
.en-cab-datos { display: flex; gap: 14px; font-size: 13px; color: var(--text-muted); margin: 2px 0 8px; }
.en-cab-datos b { color: var(--text-main); }
.en-cab-fila { display: flex; gap: 8px; align-items: center; }
.en-desc-sel { font-size: 12px; color: var(--text-muted); display: flex; gap: 6px; align-items: center; margin-right: auto; }
.en-terminar { background: var(--accent-green) !important; color: #ffffff !important; border-color: var(--accent-green) !important; font-weight: 800; }
.en-ej { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 12px 10px; margin-bottom: 14px; }
.en-ej-cab { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.en-ej-cab strong { flex: 1; color: var(--accent-blue); font-size: 15px; }
.en-ej-icono { font-size: 18px; }
.en-mini { background: none; border: 1px solid var(--border-color); color: var(--text-muted); border-radius: 8px; width: 30px; height: 30px; font-size: 14px; }
.en-nota { width: 100%; background: transparent; border: none; border-bottom: 1px dashed var(--border-color); color: var(--text-muted); font-size: 12.5px; padding: 4px 2px; margin-bottom: 8px; outline: none; }
.en-fila { display: grid; grid-template-columns: 32px minmax(0,1fr) 58px 46px 44px 34px 30px; gap: 5px; align-items: center; padding: 3px 0; border-radius: 8px; }
.en-fila-cab { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; font-weight: 700; text-align: center; }
.en-fila input { width: 100%; background: var(--bg-input); border: 1px solid transparent; color: var(--text-main); border-radius: 7px; padding: 8px 2px; text-align: center; font-size: 15px; font-weight: 700; -moz-appearance: textfield; }
.en-fila input::-webkit-outer-spin-button, .en-fila input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.en-fila input:focus { border-color: var(--accent-green); outline: none; }
.en-fila input::placeholder { color: #4b5263; font-weight: 600; }
.en-fila.hecha { background: rgba(124,92,255,.13); }
.en-fila.hecha input { background: transparent; }
.en-num { background: var(--bg-input); border: none; color: var(--text-main); border-radius: 7px; height: 34px; font-weight: 800; font-size: 13px; }
.en-num.t-calentamiento { color: var(--accent-orange); } .en-num.t-fallo { color: #ff7b7b; } .en-num.t-drop { color: var(--accent-blue); }
.en-prev { background: none; border: none; color: var(--text-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0; }
.en-check { background: var(--bg-input); border: none; color: var(--text-muted); border-radius: 7px; height: 34px; font-weight: 900; font-size: 16px; }
.en-fila.hecha .en-check { background: var(--accent-green); color: #ffffff; }
.en-video { background: none; border: none; font-size: 16px; padding: 0; height: 34px; opacity: .75; }
.en-video.con { opacity: 1; }
.en-analisis { display: block; width: 100%; background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.35); color: var(--accent-blue); border-radius: 7px; font-size: 12px; padding: 5px 8px; margin: 2px 0 4px; text-align: left; }
.en-mas-serie { width: 100%; margin-top: 8px; }
.en-agregar { margin-top: 4px; }
.en-modal { align-items: flex-end; padding: 0; }
.en-sel-caja { max-height: 88vh; display: flex; flex-direction: column; border-radius: 16px 16px 0 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
.en-sel-cab { display: flex; gap: 8px; margin-bottom: 8px; }
.en-sel-cab .buscar { margin: 0; }
.en-sel-lista, .en-det-cuerpo { overflow-y: auto; flex: 1; }
.en-sel-grupo { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .6px; margin: 10px 0 4px; }
.en-sel-item { display: flex; gap: 10px; align-items: center; width: 100%; background: none; border: none; border-bottom: 1px solid var(--border-color); color: var(--text-main); padding: 9px 4px; text-align: left; }
.en-sel-item > span:first-child { font-size: 20px; width: 28px; text-align: center; }
.en-sel-item b { display: block; font-size: 14px; }
.en-sel-item small { color: var(--text-muted); font-size: 12px; }
.en-sel-item.nuevo b { color: var(--accent-green); }
.en-ok { background: rgba(124,92,255,.14); border: 1px solid rgba(124,92,255,.4); color: var(--accent-green); border-radius: 10px; padding: 10px; font-weight: 800; text-align: center; margin-bottom: 10px; }
.en-det-titulo { margin: 0; font-size: 18px; }
.en-det-ej { border-top: 1px solid var(--border-color); padding: 10px 0 6px; }
.en-det-ej strong { color: var(--accent-blue); font-size: 14px; }
.en-det-ej small { color: var(--text-muted); }
.en-det-serie { display: flex; gap: 10px; align-items: center; font-size: 13.5px; padding: 3px 0; }
.en-det-serie > span:first-child { width: 22px; text-align: center; font-weight: 800; color: var(--text-muted); }
.en-det-serie.cal > span:first-child { color: var(--accent-orange); }
.en-vel { margin-left: auto; background: none; border: 1px solid rgba(34,211,238,.4); color: var(--accent-blue); border-radius: 7px; font-size: 12px; padding: 3px 7px; }
.en-det-botones { display: flex; gap: 8px; margin-top: 12px; }
.en-det-botones .btn-sec { flex: 1; }
.en-hoja { align-items: flex-end; padding: 0; }
.en-hoja-caja { background: var(--bg-card); width: 100%; max-width: 480px; border-radius: 16px 16px 0 0; padding: 10px 10px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 6px; }
.en-hoja-caja button { background: var(--bg-input); border: 1px solid var(--border-color); color: var(--text-main); border-radius: 10px; padding: 12px; text-align: left; font-size: 14px; display: flex; gap: 10px; align-items: center; }
.en-hoja-caja button.activo { border-color: var(--accent-green); }
.en-hoja-caja button.peligro { color: #ff7b7b; }
.en-hoja-caja .en-num { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; }
.en-desc { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 35; width: calc(100% - 24px); max-width: 456px;
  background: #17142B; border: 1px solid var(--accent-green); border-radius: 14px; padding: 8px 10px; align-items: center; gap: 8px; overflow: hidden; }
.en-desc b { flex: 1; text-align: center; font-size: 22px; color: var(--accent-green); font-variant-numeric: tabular-nums; }
.en-desc .btn-sec { padding: 6px 10px; font-size: 13px; }
.en-desc-barra { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(124,92,255,.15); }
.en-desc-barra div { height: 100%; background: var(--accent-green); transition: width 1s linear; }
.en-barra { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 35; width: calc(100% - 24px); max-width: 456px;
  background: #13202f; border: 1px solid var(--accent-blue); border-radius: 14px; padding: 10px 12px; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; cursor: pointer; }
.en-barra .en-volver { color: var(--accent-blue); flex: none; }

/* ============ Entrenar: fase 3 ============ */
.en-sec-cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.en-sec-cab .section-title { margin: 0; }
.en-sec-cab .btn-sec { padding: 6px 12px; font-size: 13px; }
.en-rutina { display: flex; gap: 8px; align-items: center; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 10px 10px 10px 14px; margin-bottom: 8px; }
.en-rutina-txt { flex: 1; min-width: 0; }
.en-rutina-txt strong { display: block; font-size: 15px; }
.en-rutina-txt small { display: block; color: var(--text-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.en-rutina .btn-sec { padding: 8px 12px; flex: none; }
.en-cal { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; }
.en-cal span { height: 15px; border-radius: 3px; background: var(--bg-input); }
.en-cal span.si { background: var(--accent-green); }
.en-cal span.fut { background: transparent; }
.en-mus { display: grid; grid-template-columns: 96px 1fr 28px; gap: 8px; align-items: center; font-size: 13px; margin-bottom: 6px; }
.en-mus b { text-align: right; }
.en-mus-barra { position: relative; height: 10px; background: var(--bg-input); border-radius: 5px; }
.en-mus-barra div { height: 100%; border-radius: 5px; background: var(--accent-green); }
.en-mus-barra div.poco { background: var(--accent-blue); } .en-mus-barra div.mucho { background: var(--accent-orange); }
.en-mus-barra i { position: absolute; top: -2px; bottom: -2px; width: 1px; background: rgba(255,255,255,.35); }
.en-ejs { padding: 4px 12px; }
.en-ej-fila { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border-color); cursor: pointer; }
.en-ej-fila:last-child { border-bottom: none; }
.en-ej-fila > div:nth-child(2) { flex: 1; min-width: 0; }
.en-ej-fila strong { display: block; font-size: 13.5px; }
.en-ej-fila small { color: var(--text-muted); font-size: 11.5px; }
.en-ej-fila .der { text-align: right; flex: none; }
.en-ej-fila .der b { display: block; color: var(--accent-orange); font-size: 15px; }
.en-pr { color: #f2c200 !important; }
.en-ref { font-size: 12px; color: var(--accent-blue); background: rgba(34,211,238,.08); border-radius: 7px; padding: 5px 8px; margin-bottom: 6px; }
.en-fila input.sug::placeholder { color: rgba(34,211,238,.75); }
.en-records { background: rgba(242,194,0,.1); border: 1px solid rgba(242,194,0,.45); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 13px; }
.en-records > b { display: block; color: #f2c200; font-size: 15px; margin-bottom: 4px; }
.en-records > div { padding: 5px 0; border-top: 1px solid rgba(242,194,0,.2); }
.en-rm-real { background: var(--bg-input); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.en-rm-real label { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.en-rm-real > div { display: flex; gap: 8px; margin: 6px 0; }
.en-rm-real input { flex: 1; min-width: 0; background: var(--bg-card); border: 1px solid var(--border-color); color: #fff; border-radius: 8px; padding: 9px 10px; font-size: 16px; font-weight: 700; }
.en-rm-real small { color: var(--text-muted); font-size: 11.5px; line-height: 1.4; display: block; }
.en-kpis .kpi-value { font-size: 20px; }
.en-graf { width: 100%; display: block; background: var(--bg-input); border-radius: 10px; }
.en-tabla { width: 100%; border-collapse: collapse; font-size: 13px; }
.en-tabla th, .en-tabla td { padding: 6px 4px; border-bottom: 1px solid var(--border-color); text-align: center; }
.en-tabla th { color: var(--text-muted); font-size: 11px; }
.en-tabla td:first-child { text-align: left; }
.en-dc-disp { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; margin: 6px 0 12px; }
.en-dc-disp label { display: flex; gap: 4px; align-items: center; }
.en-dc-barra { display: flex; align-items: center; gap: 2px; min-height: 110px; padding: 6px 0; overflow-x: auto; }
.en-dc-eje { width: 70px; height: 12px; background: #9aa0a6; border-radius: 3px; flex: none; }
.en-dc-tope { width: 14px; height: 20px; background: #6b7078; border-radius: 2px; flex: none; }
.en-dc-disco { width: 26px; border-radius: 4px; display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11px; font-weight: 800; flex: none; border: 1px solid rgba(0,0,0,.35); }
.en-discos2 { padding: 8px 10px !important; }
.modo-rutina .en-check, .modo-rutina .en-video, .modo-rutina .en-fila-cab span:nth-child(6), .modo-rutina .en-fila-cab span:nth-child(7), .modo-rutina .en-prev { visibility: hidden; }
.modo-rutina .en-cab-datos, .modo-rutina .en-desc-sel, .modo-rutina .en-discos2 { display: none !important; }
.modo-rutina .en-cab-fila { justify-content: flex-end; }

/* ============ Nutricion ============ */
#v-nutricion { padding-bottom: 20px; }
.nu-dia { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.nu-dia strong { flex: 1; text-align: center; font-size: 17px; text-transform: capitalize; }
.nu-dia .btn-sec { padding: 8px 12px; }
.nu-resumen { margin-bottom: 14px; }
.nu-anillo-fila { display: flex; align-items: center; gap: 18px; margin-bottom: 8px; }
.nu-anillo { width: 118px; height: 118px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.nu-anillo > div { width: 96px; height: 96px; border-radius: 50%; background: var(--bg-card); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.nu-anillo b { font-size: 24px; }
.nu-anillo small, .nu-anillo-txt small { color: var(--text-muted); font-size: 11px; }
.nu-anillo-txt { display: flex; flex-direction: column; gap: 10px; }
.nu-anillo-txt b { display: block; font-size: 18px; }
.nu-macro { margin-top: 8px; }
.nu-macro-cab { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-muted); margin-bottom: 3px; }
.nu-macro-cab b { color: var(--text-main); }
.nu-macro-barra { height: 8px; background: var(--bg-input); border-radius: 4px; overflow: hidden; }
.nu-macro-barra div { height: 100%; border-radius: 4px; }
.nu-comida { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 10px 12px; margin-bottom: 10px; }
.nu-comida-cab { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.nu-comida-cab span { font-size: 12px; color: var(--accent-orange); font-weight: 700; }
.nu-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--border-color); cursor: pointer; }
.nu-item b { display: block; font-size: 13.5px; font-weight: 600; }
.nu-item small { color: var(--text-muted); font-size: 11.5px; }
.nu-item > span { font-weight: 800; flex: none; }
.nu-agregar { width: 100%; background: none; border: none; color: var(--accent-green); font-weight: 700; padding: 8px 0 2px; text-align: left; font-size: 13.5px; }
.nu-cant-fila { display: flex; align-items: center; gap: 10px; margin: 12px 0 8px; }
.nu-cant-fila input { width: 120px; background: var(--bg-input); border: 1px solid var(--border-color); color: #fff; border-radius: 10px; padding: 10px; font-size: 22px; font-weight: 800; text-align: center; }
.nu-prev { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0; text-align: center; }
.nu-prev div { background: var(--bg-input); border-radius: 8px; padding: 8px 2px; }
.nu-prev b { display: block; font-size: 17px; }
.nu-prev small { color: var(--text-muted); font-size: 11px; }
.nu-scan { z-index: 70; }
.nu-scan-caja { position: relative; width: 100%; max-width: 480px; text-align: center; }
.nu-scan-caja video { width: 100%; border-radius: 12px; background: #000; }
.nu-scan-marco { position: absolute; left: 12%; right: 12%; top: 30%; height: 22%; border: 3px solid var(--accent-green); border-radius: 10px; pointer-events: none; }
.nu-scan-caja p { margin: 10px 0; }
.nav button { font-size: 11px; }

/* ============ Perfil y comunidad ============ */
.pf-cab { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; }
.pf-cabecera { display: flex; gap: 14px; align-items: center; flex: 1; min-width: 0; }
.pf-foto { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; flex: none; background: linear-gradient(135deg, var(--accent-orange), var(--accent-pink)); display: flex; align-items: center; justify-content: center; }
.pf-foto img { width: 100%; height: 100%; object-fit: cover; }
.pf-foto span { font-size: 30px; font-weight: 900; color: #fff; }
.pf-datos { min-width: 0; }
.pf-datos strong { display: block; font-size: 19px; }
.pf-datos small { color: var(--text-muted); font-size: 12.5px; }
.pf-datos p { margin: 6px 0 0; font-size: 13px; }
.pf-cab .btn-sec { padding: 6px 12px; font-size: 13px; flex: none; }
.pf-sbd { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.pf-sbd div { background: var(--bg-input); border-radius: 10px; padding: 10px 4px; }
.pf-sbd small, .pf-total small { display: block; color: var(--text-muted); font-size: 11.5px; }
.pf-sbd b { display: block; font-size: 22px; margin: 2px 0; }
.pf-sbd i { font-style: normal; font-size: 10.5px; color: var(--accent-blue); }
.pf-total { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; margin-top: 10px; }
.pf-total b { display: block; font-size: 17px; color: var(--accent-orange); }
.pf-menu { padding: 2px 12px; }
.pf-menu button { display: block; width: 100%; background: none; border: none; border-bottom: 1px solid var(--border-color); color: var(--text-main); text-align: left; padding: 13px 2px; font-size: 14px; }
.pf-menu button:last-child { border-bottom: none; }
.pf-foto-edit { display: flex; gap: 14px; align-items: center; margin: 10px 0 12px; }
.pf-volver { margin-bottom: 12px; padding: 6px 12px; }
.pf-pronto { text-align: center; padding: 22px 16px; }
.pf-pronto-icono { font-size: 44px; }
.pf-pronto h3 { margin: 6px 0 10px; }
.pf-pronto p { font-size: 14px; line-height: 1.5; }
.pf-lista { text-align: left; font-size: 13.5px; line-height: 1.6; padding-left: 20px; margin: 10px 0; }
.nav button { font-size: 10.5px; }

/* ============ Marca FuerzaPro ============ */
.logo-icon img { width: 100%; height: 100%; display: block; }
.btn-primary { box-shadow: 0 8px 24px rgba(124,92,255,.28); }
