/* Estilos de las herramientas: curso, simulacros y panel de administración */
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: .92rem; color: var(--ink); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; padding: .7em .85em; border: 1px solid #cfcfcf; border-radius: 10px; background: #fff; color: var(--ink); width: 100%;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(210,47,37,.25); border-color: var(--red); }
.field-full { grid-column: 1 / -1; }
.msg { margin: 12px 0 0; font-weight: 600; }
.msg-error { color: var(--red-dark); }
.msg-ok { color: #1b7a3a; }
.hidden { display: none !important; }
.narrow { max-width: 780px; margin: 0 auto; }

/* Curso */
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 0 0 24px; }
.progress > span { display: block; height: 100%; background: var(--red); transition: width .3s; }
.modulo h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.modulo .tip { background: var(--bg-alt); border-radius: 12px; padding: 16px 20px; margin: 18px 0; }
.ejemplo-correo { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 18px 0; font-size: .95rem; background: #fff; }
.ejemplo-correo .cab { background: var(--bg-alt); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ejemplo-correo .cab div { margin: 2px 0; }
.ejemplo-correo .cuerpo { padding: 16px; white-space: pre-line; }
.ejemplo-correo mark { background: #ffe1de; padding: 0 3px; border-radius: 4px; }
.pregunta { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin: 0 0 16px; background: #fff; }
.pregunta legend { font-weight: 700; color: var(--ink); padding: 0 6px; }
.pregunta label { display: flex; gap: 10px; align-items: flex-start; padding: 8px 6px; border-radius: 8px; cursor: pointer; }
.pregunta label:hover { background: var(--bg-alt); }
.pregunta input { margin-top: 5px; accent-color: var(--red); }
.pregunta.bien { border-color: #2e9b55; background: #f1fbf4; }
.pregunta.mal { border-color: var(--red); background: var(--red-soft); }
.resultado-grande { font-family: var(--font-head); font-size: 3.4rem; color: var(--ink); line-height: 1; margin: 8px 0; }

/* Constancia (se imprime a una hoja) */
.constancia { border: 10px solid var(--dark); outline: 2px solid var(--red); outline-offset: -18px; padding: 48px 40px; text-align: center; background: #fff; margin: 24px auto; max-width: 820px; }
.constancia img { margin: 0 auto 16px; }
.constancia h2 { font-size: 2.2rem; margin: 6px 0 18px; }
.constancia .nombre { font-family: var(--font-head); font-size: 2rem; color: var(--red); margin: 6px 0; }
.constancia .pie { display: flex; justify-content: space-between; gap: 20px; margin-top: 36px; font-size: .85rem; color: var(--muted); text-align: left; flex-wrap: wrap; }

/* Simulacros */
.sim-wrap { min-height: 100vh; display: grid; place-items: center; background: #eef1f5; padding: 24px; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.sim-box { background: #fff; border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.1); max-width: 420px; width: 100%; padding: 32px; }
.sim-box h1 { font-family: inherit; font-size: 1.4rem; margin: 0 0 6px; }
.sim-box p { color: #555; font-size: .95rem; }
.sim-box input { width: 100%; padding: 11px 12px; border: 1px solid #c8ccd2; border-radius: 6px; font: inherit; margin: 6px 0 12px; }
.sim-box button { width: 100%; padding: 12px; border: 0; border-radius: 6px; background: #2b5797; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.sim-marca { font-weight: 700; color: #2b5797; letter-spacing: .02em; margin-bottom: 18px; }
.sim-aviso { position: fixed; bottom: 6px; left: 0; right: 0; text-align: center; font-size: .72rem; color: #8a8f98; }

/* Panel de administración */
.admin-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; border-bottom: 1px solid var(--line); padding-bottom: 12px; align-items: center; }
.tab { background: none; border: 0; font: inherit; font-weight: 600; padding: .55em 1em; border-radius: 999px; cursor: pointer; color: var(--ink-2); }
.tab[aria-selected="true"] { background: var(--ink); color: #fff; }
.admin-bar .spacer { flex: 1; }
.tabla-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table.tabla { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tabla th, .tabla td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tabla th { background: var(--bg-alt); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla td.desc { white-space: pre-line; min-width: 260px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; background: var(--bg-alt); color: var(--ink-2); white-space: nowrap; }
.badge-ok { background: #e2f6e9; color: #1b7a3a; }
.badge-mal { background: var(--red-soft); color: var(--red-dark); }
.badge-alerta { background: #fff3d6; color: #8a5a00; }
.btn-sm { padding: .45em .9em; font-size: .85rem; }
.btn-link { background: none; border: 0; color: var(--red); font: inherit; font-size: .88rem; cursor: pointer; padding: 2px 4px; text-decoration: underline; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 20px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.kpi b { display: block; font-family: var(--font-head); font-size: 2rem; color: var(--ink); line-height: 1.1; }
.kpi span { font-size: .85rem; color: var(--muted); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin: 0 0 24px; }
.panel h3 { margin-top: 0; }
.filtros { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 0 0 16px; }
.filtros .field { min-width: 170px; }
.solo-impresion { display: none; }

@media print {
  .site-header, .site-footer, .wa-float, #contacto, .no-print, .admin-bar, .page-hero { display: none !important; }
  .solo-impresion { display: block; }
  body { font-size: 12px; }
  .section { padding: 0 !important; }
  .constancia { margin: 0 auto; page-break-inside: avoid; }
  .tabla th, .tabla td { padding: 5px 6px; }
}

/* Rutinas de gimnasio (/rutinas, acceso privado) */
.rt-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin: 0 0 12px; }
.rt-h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; }
.rt-acciones { display: flex; gap: 8px; align-items: center; }
.rt-secciones { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 12px; margin: 0 0 20px; border-bottom: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
.rt-secciones .tab { white-space: nowrap; }
.rt-fases, .rt-dias { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; -webkit-overflow-scrolling: touch; }
.rt-fase, .rt-dia-btn { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; cursor: pointer; text-align: left; color: var(--ink); }
.rt-fase b, .rt-dia-btn b { font-family: var(--font-head); font-size: 1.05rem; }
.rt-fase span, .rt-dia-btn span { font-size: .8rem; color: var(--muted); }
.rt-fase[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.rt-fase[aria-selected="true"] span { color: #ddd; }
.rt-dia-btn[aria-selected="true"] { border-color: var(--red); background: var(--red-soft); }
.rt-fase-intro { color: var(--ink-2); margin: 6px 0 14px; max-width: 70ch; }
.rt-dia-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 18px 0 6px; }
.rt-dia-cab h2 { margin: 0; font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.rt-grupo { margin: 18px 0 26px; }
.rt-grupo-tit { font-size: 1.15rem; margin: 0 0 10px; padding-left: 10px; border-left: 4px solid var(--red); }
.rt-grupo-tit span { font-family: var(--font-body); font-weight: 500; font-size: .85rem; color: var(--muted); }
.rt-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.rt-ej { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: opacity .2s, border-color .2s; }
.rt-ej.rt-hecho { opacity: .55; border-color: #2e9b55; }
.rt-img { position: relative; aspect-ratio: 3 / 2; background: var(--bg-alt); overflow: hidden; }
.rt-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rt-img .rt-img-2 { animation: rt-alterna 2.4s infinite steps(1); }
@keyframes rt-alterna { 0% { opacity: 0; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rt-img .rt-img-2 { animation: none; opacity: 0; } }
.rt-img-vacia { display: grid; place-items: center; align-content: center; color: var(--red); }
.rt-img-vacia span { font-size: 2.4rem; line-height: 1; }
.rt-img-vacia small { color: var(--muted); }
.rt-ej-cuerpo { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.rt-ej-cuerpo h3 { font-size: 1.08rem; margin: 0; }
.rt-ej-top { display: flex; gap: 10px; align-items: flex-start; }
.rt-orden { flex: 0 0 auto; background: var(--ink); color: #fff; font-weight: 700; font-size: .85rem; border-radius: 8px; padding: 3px 8px; }
.rt-en { font-size: .8rem; color: var(--muted); margin: 2px 0 0; }
.rt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rt-chips span { background: var(--bg-alt); border-radius: 99px; padding: 3px 10px; font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.rt-chips .rt-chip-sin { background: #fff3d6; color: #8a5a00; }
.rt-tec { font-size: .9rem; color: var(--ink-2); margin: 0; }
.rt-ej-pie { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 6px; }
.rt-yt { text-decoration: none; }
.rt-check { display: flex; gap: 6px; align-items: center; font-weight: 600; font-size: .9rem; cursor: pointer; }
.rt-check input { width: 20px; height: 20px; accent-color: #2e9b55; }
.rt-hiit-dia { margin: 8px 0 0; }
.rt-libre { margin-top: 18px; }
.rt-semana { padding-left: 1.2em; }
.rt-calc-res { margin-top: 16px; }
.rt-fuente { margin-top: 32px; }
.rt code { background: var(--bg-alt); padding: 2px 6px; border-radius: 6px; font-size: .9em; white-space: normal; }
@media (max-width: 600px) {
  .rt-grid { grid-template-columns: minmax(0, 1fr); }
  /* Tarjeta en celular: imagen chica junto al nombre; técnica, registro y botones a todo lo ancho */
  .rt-ej { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px 12px; padding: 12px; align-items: start; }
  .rt-img { grid-column: 1; grid-row: 1 / span 2; aspect-ratio: 1; margin: 0; border-radius: 10px; }
  .rt-img-vacia { min-height: 92px; }
  .rt-ej-cuerpo { display: contents; }
  .rt-ej-cuerpo > * { grid-column: 2; min-width: 0; margin: 0; }
  .rt-ej-cuerpo > .rt-tec, .rt-ej-cuerpo > .rt-nota, .rt-ej-cuerpo > .rt-series, .rt-ej-cuerpo > .rt-ej-pie { grid-column: 1 / -1; }
  .rt-ej-top { gap: 8px; }
  .rt-ej-cuerpo h3, .rt-en { overflow-wrap: anywhere; }
  .rt-ej-pie { flex-wrap: wrap; padding-top: 2px; }
  .rt-top { margin-bottom: 4px; }
  /* Filas de series que se ajustan al ancho */
  .rt-serie { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto minmax(0, 1fr); }
  .rt-serie input { width: 100%; min-width: 0; }
}

/* Registro de progreso (rutinas y panel) */
.rt-carga { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 2px 0 0; padding: 10px; background: var(--bg-alt); border-radius: 10px; }
.rt-carga label { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.rt-carga input { width: 92px; font: inherit; padding: .45em .6em; border: 1px solid #cfcfcf; border-radius: 8px; background: #fff; }
.rt-carga .rt-ultima { flex-basis: 100%; color: var(--muted); font-size: .8rem; }
.rt-hiit-reg { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-top: 10px; }
.rt-hiit-reg label { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; }
.rt-hiit-reg input[type=number] { width: 70px; }
.rt-hiit-reg input[type=number], .rt-hiit-reg select { font: inherit; padding: .35em .5em; border: 1px solid #cfcfcf; border-radius: 8px; background: #fff; }
.rt-hiit-reg .msg { margin: 0; }
.pg-grid2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin: 0 0 8px; }
.pg-fig { margin: 0 0 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 12px 4px; }
.pg-fig figcaption { font-weight: 700; color: var(--ink); margin: 0 0 4px 4px; }
.pg-fig figcaption span { font-weight: 500; color: var(--muted); font-size: .85rem; }
.pg-svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.pg-grid { stroke: #ececec; stroke-width: 1; }
.pg-eje { fill: var(--muted); font-size: 12px; font-family: var(--font-body); }
.pg-etq { fill: var(--ink); font-size: 13px; font-weight: 700; font-family: var(--font-body); paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.pg-linea { fill: none; stroke: var(--red); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pg-punto { fill: var(--red); stroke: #fff; stroke-width: 2; }
.pg-barra { fill: var(--red); }
.pg-guia { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.pg-hit { fill: transparent; cursor: crosshair; }
.pg-tip { position: absolute; z-index: 50; display: none; pointer-events: none; background: var(--dark); color: #fff; font-size: .82rem; line-height: 1.35; padding: 8px 10px; border-radius: 8px; box-shadow: var(--shadow); max-width: 240px; }
.pg-tip span { color: #ccc; }
.pg-vacio { padding: 18px; border: 1px dashed #cfcfcf; border-radius: 12px; color: var(--muted); font-size: .92rem; margin: 0 0 14px; }
.pg-sel { max-width: 360px; margin: 0 0 10px; }
.pg-hist { margin-top: 10px; }
.pg-hist summary { cursor: pointer; font-weight: 600; margin: 0 0 10px; }

/* Tendencia, series, consentimiento, privacidad, sin conexión */
.pg-diario { fill: #b9b9b9; }
.pg-leyenda { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 6px 4px; font-size: .82rem; color: var(--ink-2); }
.pg-leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.pg-ley-punto { width: 8px; height: 8px; border-radius: 50%; background: #b9b9b9; display: inline-block; }
.pg-ley-linea { width: 18px; height: 2px; background: var(--red); display: inline-block; border-radius: 2px; }
.pg-zonas { margin: 0 0 14px; }
.pg-zonas b { display: block; margin: 0 0 8px; }
.rt-series { margin: 2px 0 0; padding: 10px; background: var(--bg-alt); border-radius: 10px; display: flex; flex-direction: column; gap: 6px; }
.rt-series-tit { font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.rt-series-tit span { font-weight: 500; color: var(--muted); }
.rt-serie { display: flex; align-items: center; gap: 6px; }
.rt-snum { width: 24px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.rt-serie input { width: 72px; font: inherit; padding: .4em .5em; border: 1px solid #cfcfcf; border-radius: 8px; background: #fff; }
.rt-x { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.rt-series-pie { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 2px; }
.rt-series-pie .rt-ultima { flex-basis: 100%; color: var(--muted); font-size: .8rem; }
.rt-cardio-dia { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.rt-cardio-dia h3 { font-size: 1.05rem; margin: 0 0 10px; }
.rt-pasos-form { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.rt-perfil summary { cursor: pointer; }
.rt-perfil[open] summary { margin-bottom: 14px; }
.rt-consent-check { align-items: flex-start; margin: 12px 0; font-weight: 600; }
.rt-consent-check input { margin-top: 3px; flex: 0 0 auto; }
.rt-aviso-det summary { cursor: pointer; font-weight: 600; color: var(--red); margin: 6px 0; }
.rt-peligro { border-color: #f1c8c4; }
.rt-offline { margin: 0 0 14px; background: #fff3d6; border-color: #f0d38a; color: #6b4b00; }

/* Selector de plan y menú */
.rt-plan-sel { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 700; }
.rt-plan-sel select { font: inherit; font-weight: 600; padding: .4em .7em; border: 1.5px solid var(--ink); border-radius: 10px; background: #fff; }
.rt-nota { font-size: .85rem; color: #6b4b00; background: #fff3d6; border-radius: 8px; padding: 6px 10px; margin: 0; }
.rt-grid-plano { margin-top: 14px; }
.rt-menu-dia { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 10px 0; background: #fff; }
.rt-menu-dia summary { cursor: pointer; }
.rt-menu-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: 12px; }
.rt-comida { background: var(--bg-alt); border-radius: 10px; padding: 12px; }
.rt-comida h4 { margin: 0 0 8px; font-size: 1rem; }
.rt-comida table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.rt-comida td { padding: 3px 0; border-bottom: 1px solid #e6e6e6; vertical-align: top; }
.rt-comida td:last-child { text-align: right; color: var(--ink-2); white-space: nowrap; padding-left: 8px; }
.rt-comida p { margin: 8px 0 0; }

/* Descargas de la app */
.barras { display: flex; align-items: flex-end; gap: 2px; height: 160px; position: relative; padding-bottom: 22px; }
.barra { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.barra i { display: block; width: 100%; min-height: 1px; background: var(--red); border-radius: 3px 3px 0 0; }
.barras-eje { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); }
.desc-resumen { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 16px; }
.desc-resumen .panel { margin: 0; }
.conteo { display: grid; grid-template-columns: minmax(80px, 40%) 1fr auto; align-items: center; gap: 8px; font-size: .9rem; margin: 6px 0; }
.conteo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conteo i { display: block; height: 8px; background: var(--red); border-radius: 4px; opacity: .8; }

/* =========================================================
   Soporte TI (equipos con QR, tickets, portal) y reparaciones
   ========================================================= */
.badge-info { background: #e8eefc; color: #23439b; }
.hero-mini { padding: clamp(36px, 6vw, 60px) 0 clamp(30px, 5vw, 48px); }
.hero-mini h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: .25em; }
.hero-mini .lead { margin: 0; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hero-chips .badge { font-size: .82rem; padding: 4px 12px; }
.ah-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .ah-grid { grid-template-columns: minmax(0, 1fr); } }
.ah-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.ah-card + .ah-card { margin-top: 20px; }
.ah-card h2 { font-size: 1.35rem; margin: 0 0 12px; }
.ah-card h3 { font-size: 1.1rem; margin: 0 0 10px; }
.ah-card-roja { border-top: 5px solid var(--red); }
.datos { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: .95rem; }
.datos dt { color: var(--muted); font-weight: 600; }
.datos dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.pre { white-space: pre-line; }
.urgencias { display: grid; gap: 8px; }
.urgencias label { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; font-weight: 500; }
.urgencias label:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.urgencias input { margin-top: 4px; accent-color: var(--red); }
.urgencias b { display: block; color: var(--ink); }
.urgencias small { color: var(--muted); }
.trampa { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.exito { text-align: center; padding: 10px 0; }
.exito .folio { font-family: var(--font-head); font-size: 2.2rem; color: var(--red); line-height: 1; margin: 6px 0 10px; letter-spacing: .02em; }
.acciones { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.acciones.centro { justify-content: center; }
.lista-tiempo { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.lista-tiempo li { position: relative; padding: 0 0 16px 18px; }
.lista-tiempo li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--red); }
.lista-tiempo li:last-child { padding-bottom: 0; }
.lista-tiempo time { display: block; font-size: .8rem; color: var(--muted); }
.lista-tiempo b { color: var(--ink); }
.vacio { color: var(--muted); font-size: .92rem; padding: 12px; border: 1px dashed #cfcfcf; border-radius: 10px; }

/* Pasos del estado (reparación y ticket) */
.pasos-estado { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; list-style: none; padding: 0; margin: 8px 0 22px; counter-reset: paso; }
.pasos-estado li { position: relative; text-align: center; font-size: .82rem; font-weight: 600; color: var(--muted); padding-top: 38px; }
.pasos-estado li::before { counter-increment: paso; content: counter(paso); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid #d0d0d0; color: var(--muted); font-weight: 700; z-index: 1; }
.pasos-estado li::after { content: ""; position: absolute; top: 14px; left: -50%; width: 100%; height: 3px; background: #e2e2e2; }
.pasos-estado li:first-child::after { display: none; }
.pasos-estado li.hecho, .pasos-estado li.actual { color: var(--ink); }
.pasos-estado li.hecho::before { content: "✓"; background: var(--red); border-color: var(--red); color: #fff; }
.pasos-estado li.hecho::after, .pasos-estado li.actual::after { background: var(--red); }
.pasos-estado li.actual::before { border-color: var(--red); color: var(--red); box-shadow: 0 0 0 5px var(--red-soft); }
@media (max-width: 560px) { .pasos-estado li { font-size: .7rem; } }
.estado-grande { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 6px; }
.estado-grande .badge { font-size: 1rem; padding: 6px 16px; }
.alerta-caja { border-radius: 12px; padding: 14px 16px; margin: 0 0 16px; background: #fff3d6; color: #6b4b00; border: 1px solid #f0d38a; }
.alerta-caja.roja { background: var(--red-soft); color: var(--red-dark); border-color: #f1c8c4; }
.alerta-caja.verde { background: #e2f6e9; color: #1b5e33; border-color: #b9e4c7; }
.montos { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; font-size: .95rem; }
.montos .total { font-weight: 700; color: var(--ink); border-top: 1px solid var(--line); padding-top: 6px; }

/* Portal del cliente */
.portal-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; }
.portal-top h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }
.sub-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 16px; padding-bottom: 6px; }
.sub-tabs .tab { white-space: nowrap; border: 1px solid var(--line); }
.kpi.rojo b { color: var(--red); }
.kpi.verde b { color: #1b7a3a; }
.tabla tr.clic { cursor: pointer; }
.tabla tr.clic:hover td { background: #fafafa; }
.sla-tabla td, .sla-tabla th { text-align: center; }

/* Etiquetas QR para imprimir */
.etiquetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.etiqueta { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; border: 1.5px solid var(--ink); border-radius: 10px; padding: 10px; background: #fff; page-break-inside: avoid; break-inside: avoid; }
.etiqueta .qr { width: 96px; height: 96px; }
.etiqueta .et-logo { width: 84px; height: auto; margin: 0 0 4px; }
.etiqueta .et-id { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; color: var(--ink); line-height: 1.05; }
.etiqueta .et-eq { font-size: .72rem; color: var(--ink-2); line-height: 1.25; }
.etiqueta .et-cta { font-size: .7rem; font-weight: 700; color: var(--red); margin-top: 4px; line-height: 1.2; }
.etiqueta .et-tel { font-size: .66rem; color: var(--muted); }

/* Documentos imprimibles: garantía, aviso y comprobante de recepción */
.doc { background: #fff; max-width: 820px; margin: 0 auto; border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); padding: 44px 48px; color: var(--ink-2); font-size: .98rem; }
.doc-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; border-bottom: 4px solid var(--red); padding-bottom: 16px; margin-bottom: 22px; }
.doc-cab img { width: 150px; height: auto; }
.doc-cab .doc-contacto { text-align: right; font-size: .82rem; color: var(--muted); line-height: 1.5; }
.doc h1 { font-size: 1.9rem; margin: 0 0 4px; }
.doc h2 { font-size: 1.15rem; margin: 22px 0 8px; color: var(--ink); }
.doc .doc-folio { display: inline-block; font-family: var(--font-head); font-weight: 700; color: var(--red); border: 2px solid var(--red); border-radius: 8px; padding: 2px 10px; margin: 6px 0 4px; }
.doc .datos { font-size: .95rem; }
.doc-pie { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); }
.doc-pie .qr { flex: 0 0 auto; }
.doc-firma { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; text-align: center; font-size: .85rem; }
.doc-firma div { border-top: 1px solid var(--ink); padding-top: 6px; }
.doc-sello { position: relative; }
.doc-sello::after { content: attr(data-sello); position: absolute; right: 0; top: -6px; transform: rotate(-8deg); border: 3px solid currentColor; border-radius: 8px; padding: 4px 12px; font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; letter-spacing: .06em; opacity: .85; }
.doc-sello.vigente { color: #1b7a3a; }
.doc-sello.vencida { color: var(--red); }
@media (max-width: 640px) { .doc { padding: 26px 20px; } .doc-cab { flex-direction: column; } .doc-cab .doc-contacto { text-align: left; } }
@media print {
  .doc { border: 0; box-shadow: none; padding: 0; max-width: none; font-size: 11.5pt; }
  .ah-card { box-shadow: none; }
  .etiquetas { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .etiqueta { border-width: 1px; }
  body.imprimiendo-zona .zona-impresion { display: block !important; }
  body.imprimiendo-zona main > *:not(.zona-impresion) { display: none !important; }
  @page { margin: 12mm; }
}
.zona-impresion { display: none; }
.field input[type=checkbox], .field input[type=radio], .urgencias input { width: auto; padding: 0; flex: 0 0 auto; }
.doc .datos { margin-bottom: 18px; }
[hidden] { display: none !important; }

/* El técnico no ve ni captura cobros */
body.rol-sin-cobros .field:has([name="costo_estimado"]),
body.rol-sin-cobros .field:has([name="costo_final"]),
body.rol-sin-cobros .field:has([name="anticipo"]) { display: none !important; }

body.rol-sin-cobros .solo-admin { display: none !important; }

/* Panel de administración a todo lo ancho (tablas amplias sin cortes) */
.container.ancho-panel { max-width: 1840px; }
.tabla td.desc { min-width: 320px; max-width: 560px; }
.msg-grid { display: grid; gap: 16px; grid-template-columns: minmax(340px, 1fr) minmax(0, 1.25fr); align-items: start; }
@media (max-width: 1000px) { .msg-grid { grid-template-columns: minmax(0, 1fr); } }

/* Equipo entregado con pago pendiente (solo administrador) */
.tabla tr.fila-pago-pendiente td { background: #fdecea; color: var(--red-dark); }
.tabla tr.fila-pago-pendiente td .small { color: var(--red-dark); }

/* Diálogo para enviar la bitácora en PDF */
.dlg-enviar { border: 1px solid var(--line, #ddd); border-radius: 10px; padding: 1.25rem; width: min(30rem, 92vw); }
.dlg-enviar::backdrop { background: rgba(0,0,0,.45); }
.dlg-enviar .field { margin-bottom: .75rem; }

/* Dashboard del panel */
.dash-rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(460px, 1fr)); gap: 16px; }
.dash-ancho { grid-column: 1 / -1; }
.dash-leyenda { display: flex; flex-wrap: wrap; gap: 14px; margin: 6px 0 10px; font-size: .85rem; color: var(--muted); }
.dash-leyenda i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.dash-c-Preventivo { background: #2a6f97; }
.dash-c-Correctivo { background: #b3261e; }
.dash-c-Otros { background: #7a828c; }
.dash-fila { display: grid; grid-template-columns: 110px 1fr 34px; align-items: center; gap: 8px; margin: 6px 0; }
.dash-fila-alta { grid-template-columns: 130px 1fr 34px; }
.dash-fila .dash-nombres { grid-column: 2 / -1; margin-top: -2px; }
.dash-et { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-barra { display: flex; height: 24px; background: #f0f1f3; border-radius: 6px; overflow: hidden; }
.dash-barra i { display: flex; align-items: center; justify-content: center; color: #fff; font-style: normal; font-size: .78rem; min-width: 18px; }
.dash-fila b { text-align: right; }
.dash-cols { display: flex; align-items: flex-end; gap: 4px; height: 190px; padding-top: 6px; }
.dash-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.dash-pila { width: 100%; height: 140px; display: flex; flex-direction: column-reverse; justify-content: flex-start; }
.dash-pila i { display: block; width: 100%; }
.dash-n { font-size: .72rem; color: var(--muted); min-height: 14px; }
.dash-mes { font-size: .72rem; color: var(--muted); margin-top: 4px; white-space: nowrap; text-align: center; line-height: 1.2; }
