/* =========================================================
   MIRG — estilos compartidos del admin y el portal de socios
   Misma marca que la landing: negro + azul acero + azul MIRG
   ========================================================= */
:root {
  --bg: #0b0b0c;
  --surface: #141416;
  --surface-2: #1b1b1f;
  --line: #26262b;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --faint: #71717a;
  --accent: #3d72c4;
  --accent-dark: #2c5a9e;
  --accent-text: #6fa0e6;
  --steel-1: #6683a3;
  --steel-2: #263951;
  --ice: #a9cbf2;
  --chart: #5b8fd6;            /* serie de gráficas (validada sobre fondo oscuro) */
  /* estados (reservados: siempre con ícono + texto) */
  --good: #3fb37f;
  --warning: #e0a52e;
  --critical: #e5534b;
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --font-logo: "Montserrat", "Inter", sans-serif;
  --font-script: "Great Vibes", cursive;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo img { width: 38px; height: 38px; border-radius: 9px; box-shadow: 0 0 16px rgba(130,170,220,.3); }
.logo__text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.logo__name { font-family: var(--font-logo); font-weight: 900; font-size: 1.35rem; letter-spacing: .06em; }
.logo__tagline { font-family: var(--font-script); font-size: .82rem; white-space: nowrap; margin-top: .05rem; }
.logo__tagline em { font-style: normal; color: var(--accent-text); }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .6rem 1rem; border-radius: 10px; font-weight: 600; font-size: .86rem; border: 1px solid transparent; transition: background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--ghost { border-color: var(--line); color: var(--text); background: var(--surface-2); }
.btn--ghost:hover { border-color: #3a3a42; }
.btn--danger { color: #fff; background: #a33a34; }
.btn--danger:hover { background: #8a2f2a; }
.btn--sm { padding: .38rem .7rem; font-size: .8rem; border-radius: 8px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.link-btn { color: var(--accent-text); font-weight: 600; }
.link-btn:hover { text-decoration: underline; }

/* ---------- formularios ---------- */
.field { display: flex; flex-direction: column; gap: .35rem; font-size: .8rem; font-weight: 600; color: var(--muted); }
.field small { font-weight: 400; color: var(--faint); }
.input, .field input, .field select, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 10px;
  padding: .62rem .8rem; font: inherit; font-size: .9rem; font-weight: 400;
}
.field textarea { min-height: 80px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.check { display: flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--text); font-weight: 500; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; }
.stack { display: grid; gap: .9rem; }
.form-error { color: #ff9b94; font-size: .85rem; background: rgba(229,83,75,.1); border: 1px solid rgba(229,83,75,.3); padding: .6rem .8rem; border-radius: 10px; }

/* ---------- tarjetas ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.card__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.card__title { font-size: 1rem; font-weight: 700; }
.card__sub { color: var(--muted); font-size: .82rem; }

/* KPI / número destacado */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.kpi__label { color: var(--muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.kpi__value { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; margin: .25rem 0 .1rem; font-variant-numeric: tabular-nums; }
.kpi__foot { color: var(--muted); font-size: .8rem; }
.delta-up { color: var(--good); }
.delta-down { color: var(--critical); }

/* ---------- tablas ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 700; padding: .75rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: .7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--surface-2); }
td.right, th.right { text-align: right; }
.empty { padding: 2.2rem 1rem; text-align: center; color: var(--muted); }

/* ---------- etiquetas de estado (ícono + texto, nunca solo color) ---------- */
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge--good { color: #8fe0b8; border-color: rgba(63,179,127,.35); background: rgba(63,179,127,.1); }
.badge--warning { color: #f3cd7f; border-color: rgba(224,165,46,.35); background: rgba(224,165,46,.1); }
.badge--critical { color: #ff9b94; border-color: rgba(229,83,75,.35); background: rgba(229,83,75,.1); }
.badge--info { color: var(--ice); border-color: rgba(111,160,230,.35); background: rgba(61,114,196,.12); }

/* ---------- tabs y filtros ---------- */
.toolbar { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar .input { max-width: 300px; }
.toolbar .spacer { flex: 1; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip { padding: .38rem .8rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: .8rem; font-weight: 600; }
.chip:hover { color: var(--text); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line); margin-bottom: 1.2rem; overflow-x: auto; }
.tab { padding: .7rem 1rem; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); border-color: var(--accent); }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.65); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 1rem; z-index: 100; animation: fade .15s; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 2rem); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.5rem; box-shadow: 0 30px 80px -20px rgba(0,0,0,.8); }
.modal--wide { width: min(760px, 100%); }
.modal__head { display: flex; justify-content: space-between; align-items: start; gap: 1rem; margin-bottom: 1.1rem; }
.modal__title { font-size: 1.15rem; font-weight: 700; }
.modal__close { color: var(--muted); font-size: 1.4rem; line-height: 1; padding: .1rem .4rem; }
.modal__foot { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.3rem; }
@keyframes fade { from { opacity: 0; } }

.secret { display: flex; gap: .5rem; align-items: center; background: var(--bg); border: 1px dashed var(--accent); border-radius: 10px; padding: .75rem 1rem; font-family: ui-monospace, Menlo, monospace; font-size: 1.05rem; letter-spacing: .04em; }
.secret code { flex: 1; }

/* ---------- toast ---------- */
.toasts { position: fixed; right: 1rem; bottom: 1rem; display: grid; gap: .5rem; z-index: 200; }
.toast { background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: .75rem 1rem; border-radius: 10px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.6); animation: fade .2s; max-width: 360px; }
.toast--error { border-left-color: var(--critical); }

/* ---------- gráficas ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis text { fill: var(--faint); font-size: 11px; font-family: var(--font); }
.chart .series-line { fill: none; stroke: var(--chart); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .series-area { fill: url(#chartFade); }
.chart .dot { fill: var(--chart); stroke: var(--surface); stroke-width: 2; }
.chart .bar { fill: var(--chart); }
.chart .bar.is-hover { fill: var(--accent-text); }
.chart .crosshair { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .hit { fill: transparent; }
.chart-tip { position: absolute; pointer-events: none; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: .4rem .6rem; font-size: .78rem; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); box-shadow: 0 8px 20px -8px rgba(0,0,0,.6); z-index: 5; }
.chart-tip strong { display: block; font-size: .9rem; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .6rem; }
.chart-head__title { font-weight: 700; }
.chart-head__value { font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.chart-head__delta { font-size: .8rem; color: var(--muted); }
details.data-table { margin-top: .6rem; }
details.data-table summary { cursor: pointer; color: var(--muted); font-size: .78rem; }
details.data-table table { margin-top: .5rem; font-size: .82rem; }
details.data-table td, details.data-table th { padding: .35rem .6rem; }

/* barra de progreso de metas */
.progress { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.progress > span { display: block; height: 100%; background: var(--chart); border-radius: 999px; }

/* ---------- páginas de login ---------- */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(circle at 50% 0%, #15263f 0%, var(--bg) 60%); }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 2.4rem 2.1rem; box-shadow: 0 30px 80px -30px rgba(0,0,0,.8); }
.auth-card .logo { justify-content: center; width: 100%; margin-bottom: 1.8rem; }
.auth-card .logo img { width: 50px; height: 50px; border-radius: 12px; }
.auth-card .logo__name { font-size: 1.8rem; }
.auth-card .logo__tagline { font-size: 1.05rem; }
.auth-card h1 { font-size: 1.2rem; text-align: center; }
.auth-card .sub { color: var(--muted); font-size: .88rem; text-align: center; margin: .3rem 0 1.6rem; }
.auth-card .back { display: block; text-align: center; margin-top: 1.4rem; color: var(--muted); font-size: .85rem; }

@media (max-width: 900px) {
  .kpis, .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .kpis, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .modal { padding: 1.2rem; }
}

/* Series múltiples (paleta validada sobre la superficie oscura: azul, naranja, aqua) */
:root { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --good: #0ca30c; --critical: #d03b3b; }
.chart .series-line.s1, .chart .ring.s1 { stroke: var(--s1); }
.chart .series-line.s2, .chart .ring.s2 { stroke: var(--s2); }
.chart .series-line.s3, .chart .ring.s3 { stroke: var(--s3); }
.chart .dot.s1 { fill: var(--s1); } .chart .dot.s2 { fill: var(--s2); } .chart .dot.s3 { fill: var(--s3); }
.chart .grid line.zero { stroke: var(--muted); stroke-opacity: .5; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; background: var(--chart); }
.sw--1 { background: var(--s1); } .sw--2 { background: var(--s2); } .sw--3 { background: var(--s3); }
.chart-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .82rem; margin: .2rem 0 .5rem; }
.chart-legend__item { white-space: nowrap; }
.chart-tip .tip-row { display: block; }
.chart .ring, .chart .ring-track { fill: none; stroke-linecap: round; }
.chart .ring-track { stroke: var(--surface-2); stroke-linecap: butt; }
.chart .rings, .chart .gauge { width: 100%; max-width: 190px; height: auto; display: block; margin-inline: auto; }
.gauge__value { fill: var(--text); font-size: 30px; font-weight: 800; font-family: var(--font); }
.gauge__sub { fill: var(--muted); font-size: 11px; font-family: var(--font); }

/* Marcas de asistencia (✓ asistió · ✕ faltó · ○ reservada) */
.mark { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: .72rem; font-weight: 800; line-height: 1; flex: 0 0 auto; }
.mark--ok { background: rgba(12,163,12,.18); color: #4cd44c; }
.mark--miss { background: rgba(208,59,59,.18); color: #f07a7a; }
.mark--booked { border: 1.5px solid var(--chart); color: var(--chart); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Histórico de asistencia */
.h-tabs { display: flex; gap: .3rem; padding: .25rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; margin-bottom: .7rem; }
.h-tab { flex: 1; padding: .4rem .6rem; border-radius: 7px; border: 0; background: none; color: var(--muted); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.h-tab.is-on { background: var(--accent); color: #fff; }
.h-body { display: grid; gap: .1rem; }
.h-body--compact { max-height: 440px; overflow-y: auto; padding-right: .2rem; }
.h-week { border-bottom: 1px solid var(--line); }
.h-week summary { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .6rem .1rem; cursor: pointer; list-style: none; }
.h-week summary::-webkit-details-marker { display: none; }
.h-week summary::before { content: "›"; color: var(--faint); font-weight: 700; transition: transform .15s; }
.h-week[open] summary::before { transform: rotate(90deg); }
.h-week__title { flex: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .5rem; min-width: 0; font-size: .88rem; }
.h-week__title .faint { font-size: .76rem; width: 100%; }
.h-week__nums { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.h-bar { display: inline-block; width: 52px; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; vertical-align: middle; margin-left: .3rem; }
.h-bar > span { display: block; height: 100%; background: var(--chart); border-radius: 99px; }
.h-days, .h-table { width: 100%; font-size: .82rem; }
.h-days td, .h-table td, .h-table th { padding: .4rem .35rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.h-days tr:last-child td { border-bottom: 0; }
.h-days tr.is-today td { background: rgba(61,114,196,.08); }
.h-days { margin-bottom: .5rem; }
.h-items { display: flex; flex-wrap: wrap; gap: .3rem .7rem; }
.h-item { display: inline-flex; align-items: center; gap: .3rem; }
.h-item .mark { width: 17px; height: 17px; font-size: .62rem; }
.h-note { font-size: .76rem; padding: 0 .35rem .5rem; }
.h-foot { font-size: .74rem; margin-top: .6rem; }
.nowrap { white-space: nowrap; }
.cap { text-transform: capitalize; }
.h-days { table-layout: fixed; }
.h-days td:nth-child(1) { width: 7.2rem; }
.h-days td:nth-child(2) { width: 5.5rem; }

/* Esquema corporal */
.body-card { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1.2rem; align-items: center; }
.body-card__fig { display: grid; place-items: center; }
.body-svg { width: 100%; max-width: 470px; height: auto; display: block; }
.body-svg .b-halo { stroke: rgba(8,10,14,.7); stroke-width: 9; stroke-linecap: round; }
.body-svg .b-halo--thin { stroke-width: 6; }
.body-svg .b-line { stroke: var(--ice); stroke-width: 3.5; stroke-linecap: round; }
.body-svg .b-end { fill: var(--ice); stroke: rgba(8,10,14,.8); stroke-width: 3; }
.body-svg .b-lead { stroke: var(--ice); stroke-width: 2; stroke-dasharray: 6 6; }
.body-svg .b-lbl { fill: var(--muted); font: 700 22px var(--font); text-transform: uppercase; letter-spacing: .06em; }
.body-svg .b-val { fill: var(--text); font: 800 30px var(--font); }
.b-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.b-stat { display: grid; gap: .15rem; padding: .85rem .95rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.b-stat__lbl { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.b-stat__val { font-size: 1.35rem; font-weight: 800; }
.b-stat__foot { font-size: .76rem; color: var(--muted); }
@media (max-width: 700px) { .body-card { grid-template-columns: 1fr; } }
.h-foot--compact { margin-top: .45rem; font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Tablas de datos de las gráficas: nunca más anchas que su tarjeta */
.data-table { max-width: 100%; overflow-x: auto; }

/* Login: ver contraseña, recordarme y recuperación */
.pw-field { position: relative; display: block; }
.pw-field input { width: 100%; padding-right: 2.9rem; }
.pw-toggle { position: absolute; top: 50%; right: .35rem; transform: translateY(-50%); width: 2.3rem; height: 2.3rem; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.pw-toggle:hover { color: var(--text); background: var(--surface-2); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; font-size: .84rem; }
.auth-row a, .auth-alt a { color: var(--accent-text); font-weight: 600; }
.auth-row a:hover, .auth-alt a:hover { text-decoration: underline; }
.auth-alt { text-align: center; margin-top: 1.1rem; font-size: .84rem; color: var(--muted); }
.auth-ok { padding: .85rem 1rem; border-radius: 12px; border: 1px solid rgba(63,179,127,.35); background: rgba(63,179,127,.1); color: #8fe0b8; font-size: .9rem; line-height: 1.5; }
.auth-ok a.btn { color: #fff; }

/* ===== Formularios por renglones: etiqueta arriba, campo a la misma altura, ayuda debajo ===== */
.frow { display: grid; gap: .9rem; align-items: start; }
.frow--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.frow--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.frow__span2 { grid-column: span 2; }
.frow .field > input:not([type=checkbox]):not([type=radio]), .frow .field > select { height: 42px; }
.field > label { color: inherit; }
.field__hint { font-size: .74rem; font-weight: 400; color: var(--faint); line-height: 1.35; min-height: 1em; }
.field__hint.is-ok { color: var(--good); font-weight: 600; }
.field__hint.is-bad { color: var(--critical); font-weight: 600; }
button.field__hint { justify-self: start; text-align: left; color: var(--accent-text); font-weight: 600; }
.req { color: var(--critical); font-weight: 700; }
.fsec { display: grid; gap: .9rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.fsec:first-child { padding-top: 0; border-top: 0; }
.fsec__title { font-size: .95rem; font-weight: 700; color: var(--text); }
@media (max-width: 640px) { .frow--2, .frow--3 { grid-template-columns: minmax(0, 1fr); } .frow__span2 { grid-column: auto; } }

/* quién registra: persona nueva */
.newperson { display: grid; gap: .7rem; padding: .9rem; border-radius: 12px; border: 1px dashed #3a3a42; background: var(--surface-2); }
.newperson__title { font-weight: 700; font-size: .85rem; }
.newperson__btns { display: flex; justify-content: flex-end; gap: .5rem; }

/* resumen del precio */
.price-sum { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; align-items: baseline; padding: .7rem .9rem; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.price-sum strong { color: var(--text); }
.price-sum__off, .price-sum__off strong { color: var(--good); }
.price-sum__total { margin-left: auto; font-size: .95rem; }
.price-sum__total strong { font-size: 1.1rem; }

/* datos para transferencia (recuadro flotante) */
.tbox { position: fixed; z-index: 120; display: grid; gap: .6rem; padding: .9rem 1rem 1rem; border-radius: 14px; background: var(--surface-2); border: 1px solid #3d4a5c; box-shadow: 0 22px 50px rgba(0,0,0,.6); }
.tbox__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.tbox__close { width: 30px; height: 30px; border-radius: 8px; color: var(--muted); font-size: .9rem; }
.tbox__close:hover { background: var(--surface); color: var(--text); }
.tbox__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tbox__list { display: grid; gap: .35rem; margin: 0; }
.tbox__list div { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: .6rem; font-size: .84rem; }
.tbox__list dt { color: var(--faint); }
.tbox__list dd { margin: 0; color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.tbox__notes { font-size: .8rem; color: var(--muted); }
.tbox__foot { display: flex; justify-content: flex-start; padding-top: .5rem; border-top: 1px solid var(--line); }
.tbox__copy svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }

/* identificación */
.idcap { gap: .55rem; }
.idcap > span:first-child { color: var(--muted); }
.idcap__btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.idcap__btns label { cursor: pointer; position: relative; }
.idcap__btns label:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.idcap__btns label.is-disabled { opacity: .45; pointer-events: none; }
.idcap__thumbs { display: flex; flex-wrap: wrap; gap: .6rem; }
.idcap__thumbs:empty { display: none; }
.idcap__thumb { position: relative; margin: 0; width: 130px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.idcap__thumb img { display: block; width: 100%; height: 86px; object-fit: cover; }
.idcap__thumb figcaption { font-size: .72rem; padding: .25rem .45rem; color: var(--muted); }
.idcap__rm { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.7); color: #fff; font-size: .7rem; }
.src-tag { display: inline-block; margin-top: .2rem; padding: .05rem .4rem; border-radius: 6px; font-size: .68rem; font-weight: 700; color: #c4b5fd; background: rgba(139,92,246,.14); border: 1px solid rgba(139,92,246,.35); }
.code-tag { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; padding: .1rem .4rem; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }

/* Membresía: el selector ocupa más espacio para que se lea completo */
.frow--plan { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 640px) { .frow--plan { grid-template-columns: minmax(0, 1fr); } }
.ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Agenda de clases del paquete / clase suelta */
.sched { display: grid; gap: .8rem; padding: .9rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.sched__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.sched__count { font-size: .8rem; font-weight: 700; color: var(--accent-text); }
.sched__count.is-full { color: var(--good); }
.sched__help { padding-top: .2rem; }
.sched__slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.slot { display: grid; gap: .1rem; text-align: left; padding: .55rem .7rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: .82rem; transition: border-color .15s, background .15s; }
.slot:hover:not(:disabled) { border-color: var(--accent); }
.slot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.slot span { color: var(--text); font-weight: 600; }
.slot em { font-style: normal; font-size: .72rem; color: var(--faint); }
.slot.is-on { border-color: var(--accent); background: rgba(61,114,196,.2); }
.slot.is-on strong::after { content: " ✓"; color: var(--accent-text); }
.slot:disabled { opacity: .45; cursor: not-allowed; }
.sched__picked { list-style: none; display: grid; gap: .35rem; }
.sched__picked:empty { display: none; }
.sched__picked li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .45rem .7rem; border-radius: 8px; background: var(--surface); font-size: .84rem; }
.sched__rm { width: 26px; height: 26px; border-radius: 50%; color: var(--muted); }
.sched__rm:hover { background: var(--surface-2); color: var(--text); }

/* Cámara guiada para la identificación */
.cam { position: fixed; inset: 0; z-index: 140; display: grid; grid-template-rows: auto 1fr auto; background: #050506; color: #fff; }
.cam__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.2rem; }
.cam__head > div { display: grid; }
.cam__step { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ice); font-weight: 700; }
.cam__close { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.1); font-size: 1rem; }
.cam__stage { position: relative; display: grid; place-items: center; overflow: hidden; min-height: 0; }
.cam__stage--file { gap: 1rem; text-align: center; padding: 1.5rem; align-content: center; }
.cam__video, .cam__img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cam__guide { position: absolute; width: min(86vw, 560px); aspect-ratio: 1.586; border: 3px solid rgba(255,255,255,.85); border-radius: 16px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); pointer-events: none; }
.cam__tip { position: absolute; bottom: 1rem; left: 1rem; right: 1rem; text-align: center; font-size: .85rem; color: rgba(255,255,255,.85); }
.cam__foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding: 1rem 1.2rem 1.4rem; }
.cam__foot > :last-child { justify-self: end; }
.cam__shutter { width: 72px; height: 72px; border-radius: 50%; background: #fff; border: 5px solid rgba(255,255,255,.35); background-clip: padding-box; box-shadow: 0 0 0 3px #fff; }
.cam__shutter:active { transform: scale(.94); }
.cam__shutter:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; }
.cam__foot--2 { display: flex; justify-content: center; flex-wrap: wrap; }
