:root {
  --red: #e10600;
  --red-dark: #a80500;
  --red-soft: rgba(225, 6, 0, 0.14);
  --black: #0a0a0a;
  --surface: #141414;
  --surface-2: #1c1c1c;
  --border: #2a2a2a;
  --white: #ffffff;
  --text: #f2f2f2;
  --muted: #9a9a9a;
  --ok: #e8e8e8;
  --warn: #ffb020;
  --radius: 14px;
  --display: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--black);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  /* Sin selección de texto en la app (ni el menú de copiar al mantener presionado en el celular).
     Lo que se puede copiar se copia con los botones de la app. Los campos de formulario siguen funcionando. */
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
input, textarea, select, [contenteditable="true"] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: #050505; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 22px 14px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 22px; }
.brand img { width: 42px; height: 42px; border-radius: 10px; }
img[data-logo] { object-fit: contain; }
.logo-edit { display: flex; gap: 16px; align-items: center; }
.logo-preview { width: 88px; height: 88px; border-radius: 16px; background: var(--black); border: 1px solid var(--border); padding: 6px; flex-shrink: 0; }
.brand-name { font-family: var(--display); font-size: 28px; letter-spacing: 1.5px; line-height: 1; color: var(--white); }
.brand-name span { color: var(--red); }
.brand-sub { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 2px; margin-top: 3px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px; color: var(--muted); font-weight: 500;
  border-left: 3px solid transparent; transition: background .15s, color .15s;
}
.nav a svg { width: 20px; height: 20px; }
.nav a:hover { background: var(--surface); color: var(--white); }
.nav a.active { background: var(--red-soft); color: var(--white); border-left-color: var(--red); }
.nav a.active svg { color: var(--red); }
.sidebar-foot { margin-top: auto; font-size: 11px; color: #555; padding: 8px; text-transform: uppercase; letter-spacing: 1px; }

.topbar, .bottom-nav { display: none; }
.main { padding: 72px 32px 60px; max-width: 1280px; width: 100%; min-width: 0; }

/* ---------- Headings ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-family: var(--display); font-weight: 400; font-size: 44px; letter-spacing: 1.5px; margin: 0; line-height: 1; }
.page-head h1::after { content: ''; display: block; width: 44px; height: 4px; background: var(--red); margin-top: 8px; border-radius: 2px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
h2.section { font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: 1px; margin: 0 0 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--white);
  padding: 10px 16px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14px;
  transition: background .15s, border-color .15s, transform .05s; white-space: nowrap;
}
.btn:hover { border-color: #444; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--red); border-color: var(--red); }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-ghost { background: transparent; }
.btn-danger { background: transparent; border-color: var(--red-dark); color: #ff5a52; }
.btn-sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn svg { width: 16px; height: 16px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; color: var(--white);
}
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- Cards & KPIs ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi { position: relative; overflow: hidden; }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--red); }
.kpi .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 600; }
.kpi .value { font-family: var(--display); font-size: 42px; letter-spacing: 1px; line-height: 1.1; margin-top: 6px; }
.kpi .hint { color: var(--muted); font-size: 12px; }
.grid-2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }

/* ---------- Lists ---------- */
.list { display: flex; flex-direction: column; }
.row {
  display: grid; grid-template-columns: 2fr 1.4fr 1.2fr 1fr auto; gap: 12px; align-items: center;
  padding: 13px 14px; border-bottom: 1px solid var(--border);
}
.row:last-child { border-bottom: 0; }
.row.head { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; padding-top: 4px; }
.row.clickable { cursor: pointer; border-radius: 10px; }
.row.clickable:hover { background: var(--surface-2); }
.row .name { font-weight: 600; }
.row .sub { color: var(--muted); font-size: 13px; }
.simple-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.simple-row:last-child { border-bottom: 0; }
.empty { color: var(--muted); text-align: center; padding: 28px 10px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--red-soft); color: var(--red);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0;
  border: 1px solid rgba(225,6,0,.4);
}
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who > div { min-width: 0; }
.who .name, .who .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--border); white-space: nowrap; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.activo { color: var(--white); border-color: #3a3a3a; background: #1f1f1f; }
.badge.porvencer { color: var(--warn); border-color: rgba(255,176,32,.35); background: rgba(255,176,32,.08); }
.badge.vencido, .badge.sin { color: #ff5a52; border-color: rgba(225,6,0,.4); background: var(--red-soft); }
.tag { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; background: #222; color: var(--white); }
.tag.Powerlifting { background: var(--red); }
.tag.Streetlifting { background: var(--white); color: var(--black); }
.tag.Halterofilia { background: #2c2c2c; border: 1px solid var(--red); }
.tag.Personalizado { background: #2c2c2c; border: 1px solid #666; }

/* ---------- Toolbar / chips / inputs ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.search { flex: 1; min-width: 200px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 500; color: var(--muted); }
.chip.on { background: var(--white); color: var(--black); border-color: var(--white); }
input, select, textarea {
  width: 100%; background: var(--black); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; outline: none; transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--red); }
input[type="checkbox"] { width: auto; accent-color: var(--red); }
input[type="date"], input[type="month"], input[type="time"] { color-scheme: dark; }
div.field, label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }

/* ---------- Plans ---------- */
.plan { display: flex; flex-direction: column; gap: 10px; border-top: 3px solid var(--red); }
.plan h3 { font-family: var(--display); font-weight: 400; font-size: 28px; letter-spacing: 1px; margin: 0; }
.plan .price { font-family: var(--display); font-size: 36px; color: var(--red); line-height: 1; }
.plan .price small { font-family: var(--body); font-size: 13px; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; color: #ccc; font-size: 14px; }
.plan ul li::before { content: '▸ '; color: var(--red); }
.plan .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px solid var(--border); }
/* Portal: botones del plan en grilla para que nunca se salgan del cuadro en el teléfono */
.plan .foot.sp-plan-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sp-plan-actions > .btn { width: 100%; min-width: 0; justify-content: center; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-plan-actions > .sp-wide { grid-column: 1 / -1; }
.plan .sp-freeze { margin: 10px 0 0; font-size: 13px; line-height: 1.45; }
.plan .sp-freeze .attach-link { display: inline-block; margin-top: 4px; }
.plan.inactive { opacity: .55; border-top-color: #555; }

/* ---------- Schedule ---------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.day-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; min-height: 160px; }
.day-col h4 { margin: 2px 4px 10px; font-family: var(--display); font-weight: 400; font-size: 20px; letter-spacing: 1px; display: flex; justify-content: space-between; }
.day-col h4 small { font-family: var(--body); font-size: 11px; color: var(--muted); align-self: center; }
.day-col.today { border-color: var(--red); }
.slot {
  background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--red);
  border-radius: 10px; padding: 9px 10px; margin-bottom: 8px; cursor: pointer; font-size: 13px;
}
.slot:hover { border-color: #444; border-left-color: var(--red); }
.slot .time { font-weight: 700; color: var(--white); }
.slot .meta { color: var(--muted); font-size: 12px; margin-top: 3px; }
.slot.Streetlifting { border-left-color: var(--white); }
.slot.Halterofilia { border-left-color: #ff6b5f; }
.slot.Personalizado { border-left-color: #777; }
.slot.block { border-left-style: dashed; background: #181818; }

/* ---------- Finanzas ---------- */
.viz { width: 100%; height: auto; display: block; overflow: visible; }
.viz-grid { stroke: #262626; stroke-width: 1; }
.viz-axis { stroke: #3a3a3a; stroke-width: 1; }
.viz-tick { fill: var(--muted); font-size: 11px; font-family: var(--body); }
.viz-hit { fill: transparent; }
g[data-tip]:hover .viz-hit { fill: rgba(255,255,255,.04); }
.viz-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.viz-legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.viz-legend span { display: inline-flex; align-items: center; gap: 6px; }
.viz-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.viz-tip { position: fixed; z-index: 90; pointer-events: none; background: #222; border: 1px solid #3a3a3a; border-radius: 10px; padding: 8px 10px; font-size: 13px; color: #ddd; box-shadow: 0 10px 30px rgba(0,0,0,.5); max-width: 260px; }
.viz-tip[hidden] { display: none; }
.viz-tip b { display: block; color: var(--white); margin-bottom: 2px; text-transform: capitalize; }
.hbars { display: flex; flex-direction: column; gap: 12px; }
.hbar-label { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 5px; }
.hbar-label span { color: #ddd; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 8px; background: #262626; border-radius: 99px; overflow: hidden; }
.hbar-track span { display: block; height: 100%; border-radius: 99px; min-width: 2px; }
.ret-cell { display: flex; align-items: center; gap: 10px; }
.ret-cell > span { min-width: 52px; font-weight: 600; }
.er { display: flex; flex-direction: column; }
.er-title { font-family: var(--display); font-size: 20px; letter-spacing: 1px; margin: 14px 0 4px; color: var(--muted); }
.er-title:first-child { margin-top: 0; }
.er-line { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 14px; border-bottom: 1px dashed #262626; }
.er-line.total { border-bottom: 1px solid #3a3a3a; font-weight: 600; }
.er-line.result { margin-top: 12px; padding: 12px; border: 0; border-radius: 10px; background: rgba(57,135,229,.12); font-size: 17px; }
.er-line.result.neg { background: var(--red-soft); }
.att-box { gap: 10px; background: var(--black); border: 1px dashed #333; border-radius: 12px; padding: 12px; }
.att-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--text); font-weight: 600; }
.att-month { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 500; }
.att-month input { width: auto; padding: 6px 8px; }
.att-list { display: flex; flex-direction: column; gap: 8px; }
.att-item { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.att-item.pending { border-style: dashed; opacity: .85; }
.att-item .icon-btn { width: 32px; height: 32px; flex-shrink: 0; }
.att-ico { width: 38px; height: 38px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; background: var(--red-soft); color: #ff6b62; border: 1px solid rgba(225,6,0,.35); }
.att-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.att-name b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.att-name span { font-size: 12px; color: var(--muted); }
.att-tag { font-size: 12px; color: #7fb3ef; margin-top: 3px; }
.att-tag.none { color: var(--warn); }
/* Gastos fijos: estado de pago del mes y botón Pagar */
.fx-row { align-items: center; gap: 12px; }
.fx-status { margin-top: 6px; }
.fx-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; text-align: right; }
.fx-side small { font-size: 11px; }
.clickable-row { cursor: pointer; border-radius: 8px; }
.clickable-row:hover { background: var(--surface-2); }

/* ---------- Comunidad ---------- */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.post { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.post-imgs { display: grid; gap: 2px; background: var(--black); }
.post-imgs.n1 { grid-template-columns: 1fr; }
.post-imgs.n2 { grid-template-columns: 1fr 1fr; }
.post-imgs.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.post-imgs.n3 img:first-child { grid-row: span 2; }
.post-imgs img { width: 100%; height: 100%; min-height: 120px; max-height: 300px; object-fit: cover; display: block; cursor: zoom-in; }
.post-imgs.n1 img { max-height: 380px; }
.post-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.post-body h3 { font-family: var(--display); font-weight: 400; font-size: 26px; letter-spacing: 1px; margin: 0; line-height: 1.1; }
.post-body p { margin: 0; color: #ccc; font-size: 14px; line-height: 1.5; }
.post-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.ph { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; cursor: pointer; }
.ph span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; text-align: center; background: rgba(0,0,0,.7); padding: 2px; }
.ph.pending { border-style: dashed; }
.benefit { display: flex; flex-direction: column; gap: 8px; border-top: 3px solid var(--red); }
.benefit.inactive { opacity: .55; }
.benefit.locked { opacity: .7; border-top-color: #555; }
.benefit-ico { font-size: 34px; line-height: 1; }
.benefit h3 { font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: 1px; margin: 0; }
.benefit p { margin: 0; color: #ccc; font-size: 14px; }
.q-title { font-size: 16px; margin: 6px 0 12px; }
.q-score { font-size: 15px; margin-bottom: 12px; color: var(--warn); }
.q-score b { color: var(--white); font-size: 20px; }
.nps-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: #262626; gap: 2px; }
.nps-bar span { display: block; height: 100%; }
.q-texts { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.q-texts blockquote { margin: 0; background: var(--black); border-left: 3px solid var(--red); border-radius: 8px; padding: 8px 12px; font-size: 14px; color: #ddd; display: flex; flex-direction: column; gap: 4px; }
.q-texts blockquote span { font-size: 11px; color: var(--muted); }
.q-edit { background: var(--black); border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.q-edit-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.q-edit-head b { width: 26px; height: 26px; border-radius: 50%; background: var(--red); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.q-edit-head select { width: auto; padding: 6px 8px; }
.q-edit-head .icon-btn { width: 30px; height: 30px; }
.q-edit-head .icon-btn:disabled { opacity: .3; }
.q-edit textarea[hidden] { display: none; }
.rules-list { margin: 0; padding-left: 18px; color: #ccc; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }

/* Pestañas de horario (estilo navegador) */
.tabbar { display: flex; align-items: flex-end; gap: 4px; overflow-x: auto; border-bottom: 2px solid var(--red); margin-bottom: 14px; padding: 0 2px; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; cursor: pointer; user-select: none;
  padding: 9px 12px 9px 16px; border: 1px solid var(--border); border-bottom: 0; border-radius: 10px 10px 0 0;
  background: var(--surface); color: var(--muted); font-weight: 600; font-size: 14px; max-width: 260px;
}
.tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab small { font-size: 11px; background: #262626; color: var(--muted); border-radius: 99px; padding: 1px 7px; }
.tab:hover { color: var(--white); background: var(--surface-2); }
.tab.on { background: var(--red); border-color: var(--red); color: var(--white); }
.tab.on small { background: rgba(0,0,0,.25); color: var(--white); }
button.tab { font: inherit; font-weight: 600; font-size: 14px; }
.tab-edit { background: none; border: 0; color: inherit; cursor: pointer; padding: 0 4px; font-size: 16px; line-height: 1; opacity: .7; border-radius: 6px; }
.tab-edit:hover { opacity: 1; background: rgba(255,255,255,.12); }
.tab-add { flex-shrink: 0; width: 34px; height: 34px; margin-bottom: 4px; border-radius: 9px; border: 1px dashed #444; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; }
.tab-add:hover { color: var(--white); border-color: var(--red); }
.tab-note { font-size: 13px; color: var(--muted); margin: -4px 0 14px; }
.tab-note b { color: var(--white); }
.sp-strip { scrollbar-width: thin; scrollbar-color: #333 transparent; }
.sp-strip::-webkit-scrollbar, .tabbar::-webkit-scrollbar { height: 6px; }
.sp-strip::-webkit-scrollbar-track, .tabbar::-webkit-scrollbar-track { background: transparent; }
.sp-strip::-webkit-scrollbar-thumb, .tabbar::-webkit-scrollbar-thumb { background: #333; border-radius: 99px; }
.range-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.range-row input { flex: 1; }
.range-row span { color: var(--muted); }
.range-row .icon-btn { width: 34px; height: 34px; flex-shrink: 0; }

/* ---------- Bookings ---------- */
.date-nav { display: flex; align-items: center; gap: 8px; }
.date-nav input { width: auto; }
.class-card { display: flex; flex-direction: column; gap: 12px; }
.class-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.class-head .time { font-family: var(--display); font-size: 30px; letter-spacing: 1px; line-height: 1; }
.cap { font-weight: 700; font-size: 14px; white-space: nowrap; }
.cap.full { color: var(--red); }
.bar { height: 8px; background: #262626; border-radius: 99px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--red); border-radius: 99px; transition: width .3s; }
.bar.light > span { background: var(--white); }
.class-card .simple-row .who { flex: 1; }
.class-card .simple-row .actions { flex-wrap: nowrap; flex-shrink: 0; gap: 6px; }
/* Panel · Renovaciones pendientes: estado y botón siempre en la misma línea y en la misma columna. */
.renew-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.renew-row .actions { display: grid; grid-template-columns: 136px auto; gap: 8px; align-items: center; justify-items: end; }
.renew-row .actions .badge { white-space: nowrap; }
@media (max-width: 520px) {
  .renew-row .actions { grid-template-columns: auto; justify-items: end; gap: 6px; }
}
.att { display: flex; gap: 4px; }
.att button { padding: 5px 8px; font-size: 12px; border-radius: 7px; border: 1px solid var(--border); background: transparent; cursor: pointer; color: var(--muted); }
.att button.on-ok { background: var(--white); color: var(--black); border-color: var(--white); }
.att button.on-no { background: var(--red); color: var(--white); border-color: var(--red); }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--red);
  border-radius: 16px; width: 100%; max-width: 560px; max-height: calc(100vh - 40px);
  display: flex; flex-direction: column; animation: pop .18s ease-out;
}
.modal.wide { max-width: 760px; }
.modal form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 26px; letter-spacing: 1px; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.modal-foot:empty { display: none; }
.modal-foot .left { margin-right: auto; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.detail-grid div { background: var(--black); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.detail-grid small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 3px; }
.hr { height: 1px; background: var(--border); margin: 16px 0; }
.note { background: var(--black); border: 1px dashed var(--border); border-radius: 10px; padding: 10px 12px; color: var(--muted); font-size: 13px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast {
  background: var(--white); color: var(--black); padding: 12px 16px; border-radius: 10px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); border-left: 5px solid var(--red); max-width: 360px; animation: pop .2s ease-out;
}
.toast.error { background: var(--red); color: var(--white); border-left-color: var(--black); }

/* ---------- Sincronización y acceso ---------- */
.sync { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: 0; white-space: nowrap; }
.sync::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #666; flex-shrink: 0; }
.sync[data-s="synced"]::before { background: #3ddc84; box-shadow: 0 0 0 3px rgba(61,220,132,.15); }
.sync[data-s="saving"]::before { background: var(--warn); animation: blink 1s infinite; }
.sync[data-s="offline"]::before { background: var(--warn); }
.sync[data-s="error"]::before { background: var(--red); }
.sync[data-s="error"] { color: #ff5a52; }
@keyframes blink { 50% { opacity: .3; } }
.sidebar-foot .sync { margin-bottom: 10px; white-space: normal; }
.topbar .actions { flex-wrap: nowrap; }
.sync.dot-only { font-size: 0; gap: 0; padding: 8px; }
.cloud-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.cloud-card > div:first-child { flex: 1; min-width: 260px; }

.login {
  position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(circle at 50% 0%, rgba(225,6,0,.25), transparent 60%), var(--black);
}
.login[hidden] { display: none; }
.login-card {
  width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--red);
  border-radius: 18px; padding: 28px 24px; display: flex; flex-direction: column; gap: 14px; text-align: center;
}
.login-card img { width: 64px; height: 64px; border-radius: 14px; margin: 0 auto; }
.login-card .brand-name { font-size: 36px; }
.login-card p { margin: -8px 0 4px; }
.login-card .field { text-align: left; }
.login-msg { color: #ff5a52; font-size: 13px; min-height: 18px; }

/* ---------- Página pública de pago ---------- */
/* El degradado rojo va en una capa fija del tamaño de la pantalla: no se repite al bajar por páginas largas
   (antes se veían cortes entre un degradado y el siguiente en artículos y listas largas). */
.pay-page { background: var(--black); min-height: 100vh; }
.pay-page::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(circle at 50% 0%, rgba(225,6,0,.22), transparent 55%), var(--black); }
.pay-wrap { max-width: 560px; margin: 0 auto; padding: calc(24px + env(safe-area-inset-top)) 16px 40px; display: flex; flex-direction: column; gap: 14px; }
.pay-brand { text-align: center; margin-bottom: 6px; }
.pay-brand img { width: 64px; height: 64px; border-radius: 14px; }
.pay-brand .brand-name { font-size: 40px; margin-top: 8px; }
.pay-brand p { margin: 4px 0 0; }
.pay-step { position: relative; padding-top: 20px; border-top: 3px solid var(--red); }
.pay-step[hidden] { display: none; }
.pay-step-num {
  position: absolute; top: -14px; left: 16px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--red); color: var(--white); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.pay-plans { display: flex; flex-direction: column; gap: 10px; }
.pay-plan {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; text-align: left; width: 100%;
  background: var(--black); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.pay-plan:hover { border-color: #555; }
.pay-plan.on { border-color: var(--red); background: var(--red-soft); }
.pay-plan-name { font-family: var(--display); font-size: 24px; letter-spacing: 1px; }
.pay-plan-price { font-family: var(--display); font-size: 26px; color: var(--red); grid-row: span 2; align-self: center; }
.pay-plan.on .pay-plan-price { color: var(--white); }
.pay-plan-meta, .pay-plan-desc { color: var(--muted); font-size: 13px; grid-column: 1; }
.pay-plan-last { grid-column: 1 / -1; font-size: 12px; font-weight: 700; color: #ffc400; letter-spacing: .3px; }
.pay-back { margin-bottom: 12px; }
.pay-back:empty { display: none; }
.pay-back-hi { font-size: 14px; background: var(--black); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
.pay-visit h3, .pay-book h3 { margin: 0 0 4px; font-size: 16px; }
.pay-visit > p { margin: 0 0 10px; font-size: 13px; }
.pay-book { background: var(--black); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.pay-days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; scrollbar-width: none; }
.pay-days::-webkit-scrollbar { display: none; }
.pay-day { flex: 0 0 auto; background: var(--black); color: var(--white); border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 13px; text-transform: capitalize; cursor: pointer; }
.pay-day.on { background: var(--red); border-color: var(--red); }
.pay-hours { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; margin-bottom: 10px; }
.pay-hour { display: grid; gap: 1px; background: var(--black); color: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 8px 4px; font: inherit; cursor: pointer; text-align: center; }
.pay-hour b { font-size: 16px; }
.pay-hour span { font-size: 11px; color: var(--muted); }
.pay-hour.on { border-color: var(--red); background: rgba(225, 6, 0, .18); }
.pay-back-link { background: none; border: 0; padding: 0; margin-left: 6px; color: var(--muted); text-decoration: underline; font: inherit; font-size: 13px; cursor: pointer; }
/* Página de pago: pagar 1 a 6 meses de una vez */
.pay-months { margin: 0 0 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.pay-months h3 { font-size: 15px; margin: 0 0 10px; }
.pay-months-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px 8px; padding-top: 8px; }
.pay-month { background: var(--black); border: 1px solid var(--border); border-radius: 10px; padding: 10px 4px; color: var(--white); font: inherit; cursor: pointer; text-align: center; line-height: 1.15; }
.pay-month b { display: block; font-family: 'Bebas Neue', sans-serif; font-size: 26px; font-weight: 400; }
.pay-month span { font-size: 11px; color: var(--muted); }
.pay-month { position: relative; }
.pay-month-off { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); background: var(--gold, #ffc400); color: #111; font-style: normal; font-weight: 800; font-size: 11px; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.pay-save { display: inline-block; margin-bottom: 4px; color: #22c55e; font-weight: 700; }
.pay-month.on { border-color: var(--red); background: rgba(225, 6, 0, .14); box-shadow: 0 0 0 1px var(--red) inset; }
.pay-month:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.pay-months p { margin: 10px 0 0; font-size: 13px; }
@media (max-width: 420px) { .pay-months-opts { grid-template-columns: repeat(3, 1fr); } }
.pay-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.pay-summary div { background: var(--black); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.pay-summary small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 3px; }
.pay-amount { font-family: var(--display); font-size: 30px; font-weight: 400; color: var(--red); letter-spacing: 1px; }
.pay-copy { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.pay-go { width: 100%; padding: 14px; font-size: 16px; }
.pay-after { font-size: 13px; text-align: center; margin: 12px 0 0; }
.pay-foot { text-align: center; font-size: 13px; }
.pay-foot a { color: var(--muted); text-decoration: underline; }
.pay-pending { background: rgba(255,176,32,.1); border: 1px solid rgba(255,176,32,.4); color: var(--warn); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.pay-pending span { color: #e8d3a8; font-size: 13px; }
.pay-pending[hidden], .pay-done[hidden], #flow[hidden] { display: none; }
#flow { display: flex; flex-direction: column; gap: 14px; }
.pay-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
  border: 2px dashed #3a3a3a; border-radius: 12px; padding: 22px 14px; margin-bottom: 12px; cursor: pointer; color: var(--muted);
  transition: border-color .15s, background .15s;
}
.pay-drop:hover { border-color: var(--red); background: var(--red-soft); }
.pay-drop b { color: var(--white); }
.pay-drop img { max-width: 100%; max-height: 260px; border-radius: 8px; }
.pay-done { text-align: center; border-top: 3px solid var(--red); }
.pay-done-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--red); color: var(--white); font-size: 30px; display: flex; align-items: center; justify-content: center; margin: 4px auto 10px; }
.pay-done p { color: #ccc; }

/* ---------- Comprobantes (staff) ---------- */
.proofs-card { border-color: rgba(255,176,32,.45); margin-bottom: 16px; }
.proofs-card h2 { display: flex; align-items: center; gap: 10px; }
.proof { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.proof:last-child { border-bottom: 0; }
.proof-thumb {
  width: 56px; height: 56px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: var(--black);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer;
}
.proof-thumb img { width: 100%; height: 100%; object-fit: cover; }
.proof-info { flex: 1; min-width: 0; }
.proof-info .name { font-weight: 600; }
.proof-info .sub { color: var(--muted); font-size: 13px; }
.proof-full { display: block; background: var(--black); border: 1px solid var(--border); border-radius: 10px; padding: 8px; text-align: center; margin-bottom: 14px; }
.proof-full img { max-width: 100%; max-height: 420px; border-radius: 6px; }
.count-pill { background: var(--warn); color: var(--black); border-radius: 999px; font-family: var(--body); font-size: 12px; font-weight: 800; padding: 2px 9px; }
.nav-badge { margin-left: auto; background: var(--warn); color: var(--black); border-radius: 999px; font-size: 11px; font-weight: 800; padding: 1px 7px; }
.bottom-nav a { position: relative; }
.bottom-nav .nav-badge { position: absolute; top: 0; right: calc(50% - 22px); margin: 0; font-size: 10px; padding: 0 5px; }
.badge.aprobado { color: var(--white); border-color: #3a3a3a; background: #1f1f1f; }
.badge.pendiente { color: var(--warn); border-color: rgba(255,176,32,.35); background: rgba(255,176,32,.08); }
.badge.rechazado { color: #ff5a52; border-color: rgba(225,6,0,.4); background: var(--red-soft); }
.attach-link { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; text-decoration: underline; padding: 0; }

/* ---------- Campana y panel de notificaciones ---------- */
.desk-top { position: fixed; top: 18px; right: 24px; z-index: 30; display: flex; gap: 8px; }
.desk-top .icon-btn.active { border-color: var(--red); color: var(--red); }
.icon-btn.bell { position: relative; }
.bell-count {
  position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--red); color: var(--white); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--black); line-height: 1;
}
.bell-count[hidden] { display: none; }
.notif-panel {
  position: fixed; z-index: 45; width: 380px; max-width: calc(100vw - 24px); max-height: min(70vh, 560px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.6);
  display: flex; flex-direction: column; overflow: hidden; animation: pop .15s ease-out;
}
.notif-panel[hidden] { display: none; }
.notif-panel::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--red); }
.nhead { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.nhead b { font-family: var(--display); font-size: 24px; font-weight: 400; letter-spacing: 1px; }
.nlist { overflow-y: auto; padding: 6px 0; }
.nitem { display: flex; gap: 12px; padding: 10px 16px; align-items: flex-start; position: relative; }
.nitem:hover { background: var(--surface-2); }
.nitem.new { background: rgba(225,6,0,.07); }
.nitem.new::after { content: ''; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--red); }
.nitem.new:has(.ndel)::after { right: 42px; }
.nitem.past { opacity: .5; }
.navatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: var(--black); border: 2px solid var(--border);
}
.navatar.cierre { border-color: var(--red); }
.navatar.entrenador { border-color: var(--warn); }
.navatar.general { border-color: var(--white); }
.nbody { flex: 1; min-width: 0; padding-right: 14px; }
.ntext { font-size: 14px; line-height: 1.35; color: #ddd; }
.ntext b { color: var(--white); }
.nmeta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 5px; font-size: 12px; color: var(--muted); }
.nchip { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #262626; color: var(--white); }
.nchip.hoy { background: var(--red); }
.nchip.off { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.ndel { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; padding: 2px 4px; position: relative; z-index: 1; }
.ndel:hover { color: #ff5a52; }
.nempty { text-align: center; color: var(--muted); padding: 36px 16px; line-height: 2; }

/* ---------- Reglas por plan / avisos en reservas ---------- */
.day-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.day-pick { position: relative; cursor: pointer; }
.day-pick input { position: absolute; opacity: 0; pointer-events: none; }
.day-pick span { display: inline-block; min-width: 46px; text-align: center; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--black); color: var(--muted); font-size: 13px; font-weight: 600; }
.day-pick input:checked + span { background: var(--red); border-color: var(--red); color: var(--white); }
.day-pick input:focus-visible + span { outline: 2px solid var(--white); }
.alert-bar { display: flex; gap: 10px; align-items: flex-start; background: var(--red-soft); border: 1px solid rgba(225,6,0,.45); color: var(--white); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; font-size: 14px; }
.alert-bar.coach { background: rgba(255,176,32,.08); border-color: rgba(255,176,32,.4); color: #f3dcae; }
.alert-bar.small { font-size: 12px; padding: 7px 10px; margin: 0; }
.class-card.dim { opacity: .55; }
.mates { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.mates.none { font-size: 12px; color: var(--muted); }
.mates-av { display: flex; flex-shrink: 0; }
.mates-av span { width: 26px; height: 26px; border-radius: 50%; background: var(--red-soft); color: #ff8a84; border: 2px solid var(--surface); font-size: 10px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; margin-left: -7px; }
.mates-av span:first-child { margin-left: 0; }
.mates-av span.more { background: #262626; color: var(--white); }
.mates-txt { font-size: 12px; color: var(--muted); line-height: 1.3; }
.mates-txt b { color: #ddd; font-weight: 600; }
.mates-privacy { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 13px; font-weight: 500; color: var(--muted); width: 100%; }
.sing-card { border-top: 3px solid var(--white); display: flex; flex-direction: column; gap: 10px; }
.sing-card p { margin: 0; color: #ccc; font-size: 14px; line-height: 1.5; }
.sing-head { display: flex; align-items: center; gap: 12px; }
.sing-head small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.sing-head .nchip { margin-left: auto; white-space: nowrap; }
.sing-mark { width: 44px; height: 44px; border-radius: 12px; background: var(--white); color: var(--black); font-family: var(--display); font-size: 30px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sing-steps { margin: 0; padding-left: 20px; color: #ccc; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.sing-ally { display: flex; align-items: center; gap: 12px; }
.sing-ally b { display: block; }
.sing-ally span { display: block; font-size: 13px; color: var(--muted); }
.stu-box { display: flex; flex-direction: column; gap: 8px; background: var(--black); border: 1px dashed #3a3a3a; border-radius: 10px; padding: 10px 12px; }
.stu-box[hidden], .stu-box .note[hidden] { display: none; }
.sd-price { background: var(--black); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 14px; color: var(--white); }
.sd-hint { font-size: 13px; color: #7fb3ef; }
.sd-hint:empty { display: none; }
.res-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.res-summary b { font-size: 16px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 600; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { width: 40px; height: 22px; border-radius: 99px; background: #333; position: relative; transition: background .15s; flex-shrink: 0; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + span { background: var(--red); }
.switch input:checked + span::after { transform: translateX(18px); }
.class-card.dim .alert-bar { opacity: 1; }

/* ---------- Portal de socios ---------- */
.pay-wrap[hidden], .sp-form[hidden], .sp-tabs-auth[hidden], #portal[hidden] { display: none; }
.sp-tabs-auth { display: flex; gap: 6px; margin-bottom: 14px; }
.sp-form { display: flex; flex-direction: column; gap: 12px; }
.login-msg.ok { color: #7ee2a8; }
.sp-header {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 20px 10px; background: rgba(10,10,10,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
}
.sp-header .brand { padding: 0; }
.sp-header .brand img { width: 34px; height: 34px; }
.sp-header .brand-name { font-size: 26px; }
.sp-main { max-width: 760px; margin: 0 auto; padding: 24px 16px calc(100px + env(safe-area-inset-bottom)); }
/* Menú del portal: siempre abajo, centrado, en teléfono y computador */
.sp-bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center; gap: 6px;
  background: rgba(5,5,5,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--border);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
}
.sp-bottom a {
  flex: 0 1 150px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 7px 0; border-radius: 12px; color: var(--muted); font-size: 12px; font-weight: 600;
}
.sp-bottom a svg { width: 22px; height: 22px; }
.sp-bottom a:hover { color: var(--white); }
.sp-bottom a.active { background: var(--red-soft); color: var(--white); }
.sp-bottom a.active svg { color: var(--red); }
.sp-usage { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.sp-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.sp-day {
  flex: 0 0 auto; width: 56px; padding: 8px 0; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  color: var(--white); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative;
}
.sp-day small { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.sp-day b { font-family: var(--display); font-size: 24px; font-weight: 400; line-height: 1; }
.sp-day.off { opacity: .4; }
.sp-day.on { background: var(--red); border-color: var(--red); opacity: 1; }
.sp-day.on small { color: var(--white); }
.sp-day i { position: absolute; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--white); }
.sp-slots { display: flex; flex-direction: column; gap: 10px; }
.sp-slot { display: flex; align-items: center; gap: 14px; padding: 14px; }
.sp-slot.dim { opacity: .6; }
.sp-slot.mine { border-color: var(--red); }
.sp-slot-time { font-family: var(--display); font-size: 28px; line-height: 1; min-width: 64px; display: flex; flex-direction: column; }
.sp-slot-time small { font-family: var(--body); font-size: 12px; color: var(--muted); margin-top: 3px; }
.sp-slot-info { flex: 1; min-width: 0; }
.sp-why { font-size: 12px; color: #ff8a84; margin-top: 4px; }
.sp-warn { font-size: 12px; color: var(--warn); margin-top: 4px; }
@media (max-width: 760px) {
  .sp-bottom a { flex: 1 1 0; }
  .sp-header .brand-name { font-size: 22px; }
  .sp-slot { flex-wrap: wrap; }
  .sp-slot .btn { width: 100%; }
}

/* ---------- Registro de ingreso (página del socio) ---------- */
.ck-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 20px; }
.ck-card[hidden] { display: none; }
.ck-card p { margin: 0; color: #ccc; }
.ck-card .note { text-align: left; width: 100%; }
.ck-card .btn { width: 100%; }
.ck-icon { width: 84px; height: 84px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 46px; font-weight: 800; background: #262626; color: var(--white); }
.ck-card.ok { border-color: #2f9e61; border-top: 4px solid #2f9e61; }
.ck-card.ok .ck-icon { background: #2f9e61; }
.ck-card.denied { border-color: var(--red); border-top: 4px solid var(--red); }
.ck-card.denied .ck-icon { background: var(--red); }
.ck-title { font-family: var(--display); font-weight: 400; font-size: 38px; letter-spacing: 1px; margin: 4px 0 0; }
.ck-time { font-family: var(--display); font-size: 30px; color: var(--muted); }
#doorBox { width: 100%; }
#doorBox:empty { display: none; }
.ck-door { width: 100%; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 6px; padding: 16px 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid #2a2a2a; }
.ck-door-t { font-weight: 700; color: var(--white); }
.ck-door .door-code { margin: 8px 0; }
.ck-spin { width: 46px; height: 46px; border-radius: 50%; border: 4px solid #333; border-top-color: var(--red); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Pantalla QR de la entrada (kiosco) ---------- */
.kiosk { position: fixed; inset: 0; z-index: 80; background: radial-gradient(circle at 30% 20%, rgba(225,6,0,.25), transparent 55%), var(--black); display: flex; flex-direction: column; }
.kiosk-top { display: flex; justify-content: space-between; align-items: center; padding: 18px 28px; }
.kiosk-top .brand { padding: 0; }
.kiosk-body { flex: 1; display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; padding: 10px 40px 40px; align-items: center; min-height: 0; }
.kiosk-left { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.kiosk-qr { width: min(56vh, 46vw); aspect-ratio: 1; background: #fff; border-radius: 22px; padding: 14px; box-shadow: 0 0 0 6px var(--red), 0 30px 80px rgba(0,0,0,.6); }
.kiosk-qr svg { width: 100%; height: 100%; display: block; }
.kiosk-bar { width: min(56vh, 46vw); height: 6px; background: #262626; border-radius: 99px; overflow: hidden; }
.kiosk-bar span { display: block; height: 100%; background: var(--red); transition: width .25s linear; }
.kiosk-left h2 { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4vw, 54px); letter-spacing: 1px; margin: 10px 0 0; }
.kiosk-left p { color: var(--muted); font-size: clamp(14px, 1.4vw, 20px); margin: 0; }
.kiosk-right { align-self: stretch; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.kiosk-clock { font-family: var(--display); font-size: clamp(60px, 9vw, 130px); line-height: 1; }
.kiosk-feed-title { color: var(--muted); text-transform: uppercase; letter-spacing: 2px; font-size: 13px; font-weight: 700; }
.kiosk-feed { display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.kiosk-item { display: grid; grid-template-columns: 64px 1fr 32px; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid #2f9e61; border-radius: 12px; padding: 12px 14px; font-size: 18px; }
.kiosk-item span { color: var(--muted); font-size: 15px; }
.kiosk-item i { font-style: normal; font-weight: 800; color: #2f9e61; text-align: right; }
.kiosk-item.denegado { border-left-color: var(--red); }
.kiosk-item.denegado i { color: var(--red); }
.kiosk-flash { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.kiosk-flash[hidden] { display: none; }
.kiosk-flash.ok { background: rgba(14, 70, 40, .96); }
.kiosk-flash.denied { background: rgba(120, 6, 0, .96); }
.kiosk-flash .ck-icon { width: 160px; height: 160px; font-size: 96px; background: rgba(255,255,255,.15); }
.kiosk-flash b { font-family: var(--display); font-weight: 400; font-size: clamp(44px, 7vw, 96px); letter-spacing: 1px; }
.kiosk-flash span { font-size: clamp(18px, 2vw, 28px); opacity: .9; }
@media (max-width: 860px) {
  .kiosk-body { grid-template-columns: 1fr; padding: 10px 16px 24px; overflow-y: auto; }
  .kiosk-qr, .kiosk-bar { width: min(80vw, 420px); }
  .kiosk-top { padding: 12px 16px; }
}

/* Portal: constancia, novedades, encuesta */
.sp-points-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.sp-level { display: flex; flex-direction: column; align-items: center; background: var(--black); border: 1px solid var(--border); border-radius: 14px; padding: 8px 14px; cursor: pointer; color: var(--white); min-width: 86px; }
.sp-level:hover { border-color: var(--red); }
.sp-level span { font-size: 22px; line-height: 1; }
.sp-level b { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1; margin-top: 2px; }
.sp-level small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.sp-level.big { margin: 0 auto; padding: 14px 26px; cursor: default; width: max-content; }
.sp-level.big span { font-size: 40px; } .sp-level.big b { font-size: 52px; }
.sp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sp-stats > div { background: var(--black); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sp-stats small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.sp-stats b { font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1; }
.sp-stats b span { font-size: 20px; color: var(--muted); }
.sp-stats em { font-style: normal; font-size: 12px; color: var(--muted); }
.sp-news-peek { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; cursor: pointer; padding: 10px; }
.sp-news-peek img, .sp-news-ico { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--black); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.sp-news-peek div:not(.sp-news-ico) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sp-news-peek b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-news-peek > span { color: var(--muted); font-size: 24px; }
/* Comunidad: último artículo con la foto como franja de lado a lado y el título debajo */
.sp-art-peek { margin-bottom: 16px; cursor: pointer; padding: 0; overflow: hidden; }
.sp-art-peek img { display: block; width: 100%; height: 140px; object-fit: cover; }
.sp-art-body { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.sp-art-body > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sp-art-body b { font-size: 16px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sp-art-body > span { color: var(--muted); font-size: 24px; }

/* Comunidad: ranking de PRs con el top 3 */
.sp-rank-peek { margin-bottom: 16px; cursor: pointer; padding: 12px 14px; }
.sp-rank-head { display: flex; align-items: center; gap: 12px; }
.sp-rank-head > div:not(.sp-news-ico) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sp-rank-head .sp-news-ico { width: 48px; height: 48px; }
.sp-rank-head > span { color: var(--muted); font-size: 24px; }
.sp-rank-top { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sp-rank-top li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; background: var(--black); font-size: 14px; }
.sp-rank-top li.me { outline: 1px solid rgba(225, 6, 0, .6); }
.sp-rank-top .medal { font-size: 18px; text-align: center; }
.sp-rank-top .who { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; line-height: 1.25; }
.sp-rank-top .who > * { max-width: 100%; }
.sp-rank-top .who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-rank-top .who b small { color: var(--muted); font-weight: 500; }
.sp-rank-top .kg { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-rank-top .gl { font-weight: 700; text-align: right; white-space: nowrap; }
.sp-survey-peek { cursor: pointer; }
.sp-feed { display: flex; flex-direction: column; gap: 16px; }
/* Guías (carruseles dentro del portal) */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.guide-card { padding: 0; overflow: hidden; text-align: left; cursor: pointer; display: flex; flex-direction: column; color: inherit; font: inherit; }
.guide-card img { width: 100%; aspect-ratio: 1080 / 1350; object-fit: cover; display: block; background: var(--black); }
.guide-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.guide-body .muted { font-size: 13px; }
.guide-body small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.blog-cover.guide-cover { object-position: center top; }
/* Staff: pestañas de Novedades y editor de láminas */
.nov-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.nov-bar .chip .muted { font-size: 12px; margin-left: 4px; }
.guide-card.staff { cursor: default; }
.guide-card.staff .post-meta { margin-bottom: 4px; }
.guide-noimg { aspect-ratio: 1080 / 1350; display: flex; align-items: center; justify-content: center; color: var(--muted); background: var(--black); }
.guide-slides { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.gs-item { position: relative; border-radius: 8px; overflow: hidden; background: var(--black); border: 1px solid var(--line, #2a2a2a); }
.gs-item img { width: 100%; aspect-ratio: 1080 / 1350; object-fit: cover; display: block; }
.gs-n { position: absolute; top: 4px; left: 4px; background: rgba(0,0,0,.75); color: #fff; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 1px 7px; }
.gs-tools { display: flex; justify-content: space-between; padding: 4px; gap: 4px; }
.gs-tools button { flex: 1; background: #1c1c1c; color: #fff; border: 1px solid #333; border-radius: 6px; padding: 3px 0; cursor: pointer; font: inherit; font-size: 13px; }
.gs-tools button:disabled { opacity: .3; cursor: default; }
.guide-feed { cursor: pointer; }
.guide-view { display: flex; flex-direction: column; gap: 10px; }
.guide-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 10px; background: var(--black); }
.guide-track::-webkit-scrollbar { display: none; }
.guide-track img { flex: 0 0 100%; width: 100%; max-height: 70vh; aspect-ratio: 1080 / 1350; object-fit: contain; scroll-snap-align: center; }
.guide-nav { display: flex; align-items: center; justify-content: center; gap: 16px; color: var(--muted); font-size: 14px; }
.sp-viewer img {width: 100%; max-height: 65vh; object-fit: contain; border-radius: 10px; background: var(--black); }
.sp-thumbs { display: flex; gap: 6px; overflow-x: auto; margin-top: 8px; }
.sp-thumbs img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; opacity: .55; cursor: pointer; flex-shrink: 0; }
.sp-thumbs img.on { opacity: 1; outline: 2px solid var(--red); }
.sp-survey { display: flex; flex-direction: column; gap: 4px; }
.sp-q { padding: 14px 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.sp-q.missing .sp-q-title { color: #ff6b62; }
.sp-q-title { font-weight: 600; font-size: 15px; }
.req { color: var(--red); }
.sp-stars { display: flex; gap: 6px; }
.sp-stars button { font-size: 34px; line-height: 1; background: none; border: 0; color: #3a3a3a; cursor: pointer; padding: 0 2px; }
.sp-stars button.on { color: var(--warn); }
.sp-nps { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; }
.sp-nps button { padding: 9px 0; border-radius: 8px; border: 1px solid var(--border); background: var(--black); color: var(--white); cursor: pointer; font-weight: 700; font-size: 14px; }
.sp-nps button.on { background: var(--red); border-color: var(--red); }
.sp-nps-legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.sp-choice { display: flex; flex-direction: column; gap: 6px; }
.sp-choice label { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; background: var(--black); }
.sp-choice input { width: auto; accent-color: var(--red); }
.sp-choice label:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
@media (max-width: 760px) {
  .sp-stats { grid-template-columns: 1fr 1fr; }
  .sp-stats > div:last-child { grid-column: span 2; }
  .sp-bottom a { font-size: 10px; }
  .sp-bottom a svg { width: 20px; height: 20px; }
  .sp-nps button { padding: 8px 0; font-size: 12px; }
}

.login-socio { font-size: 13px; color: var(--muted); }
.login-socio a { color: var(--white); font-weight: 600; text-decoration: underline; text-decoration-color: var(--red); }
.pay-link-box { display: flex; gap: 8px; align-items: center; }
.pay-link-box input { font-size: 13px; }

.muted { color: var(--muted); }
.right { text-align: right; }
.mt { margin-top: 16px; }
.money { font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar {
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 20; background: rgba(10,10,10,.92); backdrop-filter: blur(8px);
    padding: calc(10px + env(safe-area-inset-top)) 16px 10px; border-bottom: 1px solid var(--border);
  }
  .app { grid-template-rows: auto 1fr; }
  .desk-top { display: none; }
  .notif-panel { left: 12px; right: 12px; width: auto; }
  .topbar .brand { padding: 0; }
  .topbar .brand img { width: 32px; height: 32px; }
  .topbar .brand-name { font-size: 24px; }
  .main { padding: 18px 14px calc(90px + env(safe-area-inset-bottom)); }
  .page-head h1 { font-size: 36px; }
  .bottom-nav {
    display: flex; overflow-x: auto; scrollbar-width: none;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: #050505; border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a { flex: 1 0 58px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; color: var(--muted); padding: 6px 0; border-radius: 8px; }
  .bottom-nav a svg { width: 22px; height: 22px; }
  .bottom-nav a.active { color: var(--white); }
  .bottom-nav a.active svg { color: var(--red); }
  .row { grid-template-columns: 1fr auto; row-gap: 6px; }
  .row.head { display: none; }
  .row .hide-sm { display: none; }
  .week { grid-template-columns: 1fr; }
  .day-col { min-height: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { max-width: none; border-radius: 18px 18px 0 0; max-height: 92vh; }
  .toasts { left: 14px; right: 14px; bottom: calc(80px + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }
}

@media (max-width: 420px) {
  .kpi .value { font-size: 34px; }
  .page-head .actions .btn span.lbl { display: none; }
}

/* ---------- Blog (artículos de entrenamiento) ---------- */
.blog-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: border-color .15s, transform .15s; }
.blog-card:hover { border-color: rgba(225, 6, 0, .55); }
.blog-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--black); }
.blog-card-title { font-family: var(--body) !important; font-weight: 700 !important; font-size: 21px !important; letter-spacing: 0 !important; line-height: 1.3 !important; color: var(--white); }
.blog-card .post-body p { font-size: 15px; line-height: 1.6; color: #bdbdbd; }
.blog-more { color: var(--red); font-weight: 600; font-size: 14px; margin-top: 4px; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.blog-back { margin-bottom: 8px; }
.blog-article { max-width: 720px; margin: 0 auto; }
.blog-article header { text-align: center; padding: 8px 0 22px; }
.blog-article h1 { font-family: var(--body); font-weight: 800; font-size: clamp(28px, 4.6vw, 40px); line-height: 1.2; letter-spacing: -0.5px; margin: 0 0 14px; color: var(--white); }
.blog-meta { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.blog-meta b { color: var(--text); font-weight: 600; }
.blog-meta i { font-style: normal; opacity: .6; }
.blog-lead { font-size: 17px; line-height: 1.65; color: #d0d0d0; margin: 18px auto 0; max-width: 600px; }
.blog-hero { width: 100%; border-radius: 14px; display: block; margin: 0 0 30px; max-height: 480px; object-fit: cover; }
.blog-body { font-size: 17px; line-height: 1.8; color: #e4e4e4; overflow-wrap: anywhere; }
.blog-body > :first-child { margin-top: 0; }
.blog-body p { margin: 0 0 1.15em; }
.blog-body h2 { font-family: var(--body); font-weight: 800; font-size: 27px; line-height: 1.3; color: var(--white); margin: 1.8em 0 .6em; letter-spacing: -0.3px; }
.blog-body h3 { font-family: var(--body); font-weight: 700; font-size: 21px; line-height: 1.35; color: var(--white); margin: 1.5em 0 .5em; }
.blog-body ul, .blog-body ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.blog-body li { margin: .35em 0; }
.blog-body li::marker { color: var(--red); }
.blog-body a { color: #ff4d45; text-decoration: underline; text-underline-offset: 3px; }
.blog-body strong { color: var(--white); }
.blog-body blockquote { margin: 1.5em 0; padding: 14px 20px; border-left: 4px solid var(--red); background: var(--surface-2); border-radius: 0 10px 10px 0; font-size: 18px; color: var(--white); }
.blog-body hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.blog-body figure { margin: 1.6em 0; }
.blog-body figure img { width: 100%; border-radius: 12px; display: block; }
.blog-body figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 8px; line-height: 1.5; }
.blog-editor-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.blog-toolbar { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.blog-toolbar .btn { padding: 5px 10px; font-size: 12px; }
#bcBody { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 13px; line-height: 1.55; }
.blog-preview { border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; max-height: 60vh; overflow: auto; font-size: 15px; background: var(--black); }
.blog-cover-prev { width: 100%; max-width: 360px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; display: block; }
@media (max-width: 600px) { .blog-body { font-size: 16px; } .blog-body h2 { font-size: 23px; } .blog-lead { font-size: 16px; } }

/* Libro de movimientos con comisión e IVA por venta */
.row.ledger { grid-template-columns: 78px 1.6fr 1fr 0.9fr 0.8fr 0.8fr 0.9fr 0.9fr; }
@media (max-width: 860px) { .row.ledger { grid-template-columns: 64px 1fr auto auto; } }

/* Botón para volver al portal desde la página de pago */
.pay-home { width: 100%; justify-content: center; padding: 14px; margin-top: 4px; }

/* Respuestas del cuestionario de ingreso (ficha del socio) */
.intake-answers { display: flex; flex-direction: column; gap: 10px; }
.intake-qa { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.intake-qa small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.intake-qa div { color: var(--white); line-height: 1.5; }

/* Encuesta destacada dentro de Novedades */
.sp-survey-card { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; cursor: pointer; border-color: rgba(225, 6, 0, .45); background: linear-gradient(135deg, rgba(225, 6, 0, .12), var(--surface) 60%); }
.sp-survey-card:hover { border-color: rgba(225, 6, 0, .75); }
.sp-survey-ico { font-size: 30px; line-height: 1; padding-top: 2px; }

/* Lista de socios con columna de monto / deuda */
/* Columnas de ancho fijo (Vence, Disciplina, Estado, Monto) para que todas las filas queden alineadas,
   sin importar el largo del nombre, del plan o de la etiqueta de estado. */
.row.members { grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr) 118px 172px 236px 110px; }
.row.members > div { min-width: 0; }
.row.members .who { min-width: 0; }
.row.members .who > div { min-width: 0; }
.row.members .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.members .badge { white-space: nowrap; }
.row.members > div:nth-child(5) { overflow-wrap: anywhere; }
.row.members:not(.head) { padding-top: 10px; padding-bottom: 10px; }
/* Asesorados online: Asesorado (nombre + correo) · Plan · Paga el · Estado · Monto */
.row.members.onl { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.6fr) 100px 150px 110px; }
.row.members.onl > div:nth-child(5) { overflow-wrap: normal; }
.member-amount { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; white-space: nowrap; }
.member-amount small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.amt-debt { color: #ff5a52; }
.amt-muted { color: var(--muted); font-weight: 600; }
/* Celular / tablet: nombre arriba con el monto a la derecha y el estado debajo del nombre. */
@media (max-width: 860px) {
  .row.members { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .row.members > div:nth-child(1) { grid-column: 1; grid-row: 1; }
  .row.members > div:nth-child(5) { grid-column: 1; grid-row: 2; padding-left: 50px; }
  .row.members > div:nth-child(6) { grid-column: 2; grid-row: 1 / span 2; }
  .row.members.onl { grid-template-columns: minmax(0, 1fr) auto; }
  .row.members.onl > div:nth-child(4) { grid-column: 1; grid-row: 2; padding-left: 50px; }
  .row.members.onl > div:nth-child(5) { grid-column: 2; grid-row: 1 / span 2; padding-left: 0; }
}

/* Finanzas: nota del pago de un gasto fijo en su mes */
.fx-note { margin-top: 6px; font-size: 13px; color: #d4d4d4; background: rgba(255,255,255,.04); border-left: 3px solid var(--border); border-radius: 6px; padding: 5px 8px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Portal del socio: link de referidos */
.ref-link input { width: 100%; font-size: 13px; }
/* Página de pago: llegó con link de referido */
.pay-ref[hidden] { display: none; }
.pay-ref { margin-bottom: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255, 196, 0, .5); background: rgba(255, 196, 0, .08); font-size: 14px; }

/* Portal del socio: aforo del centro en el inicio */
.sp-aforo-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sp-aforo .aforo-bar { margin-bottom: 0; }

/* Configuración de comisión: % + cargo fijo por medio de pago */
.pos-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 10px; align-items: end; }
.pos-row > b { padding-bottom: 12px; }
@media (max-width: 600px) { .pos-row { grid-template-columns: 1fr 1fr; } .pos-row > b { grid-column: 1 / -1; padding-bottom: 0; } }

/* ---------- Contrato digital ---------- */
body.ct-open { overflow: hidden; }
.ct-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .75); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ct-dialog { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--red); border-radius: 16px; width: min(860px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.ct-head { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 18px 22px 10px; border-bottom: 1px solid var(--border); }
.ct-brand { font-family: var(--display); font-size: 20px; letter-spacing: 2px; color: var(--white); }
.ct-brand span { color: var(--red); }
.ct-head h2 { font-family: var(--body); font-size: 18px; font-weight: 800; line-height: 1.35; margin: 4px 0 6px; color: var(--white); }
.ct-meta { font-size: 13px; color: var(--muted); }
.ct-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 22px; border-bottom: 1px solid var(--border); }
.ct-body { overflow: auto; padding: 8px 22px 22px; flex: 1; outline: none; }
.ct-body:focus-visible { box-shadow: inset 0 0 0 2px var(--red); }
.ct-section { padding-top: 14px; scroll-margin-top: 8px; }
.ct-section h3 { font-family: var(--body); font-weight: 800; font-size: 18px; color: var(--white); margin: 6px 0 12px; }
.ct-text { font-size: 16px; line-height: 1.75; }
.ct-text h2 { font-size: 19px !important; margin-top: 1.6em !important; }
.ct-dl { margin: 0; display: grid; gap: 2px; }
.ct-dl > div { display: grid; grid-template-columns: 190px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.ct-dl dt { color: var(--muted); font-size: 14px; }
.ct-dl dd { margin: 0; color: var(--white); font-size: 15px; line-height: 1.5; }
.ct-foot { border-top: 1px solid var(--border); padding: 14px 22px 18px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.ct-signer { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.ct-signer[hidden], #ctRep[hidden] { display: none; }
.ct-accept { align-items: flex-start; font-size: 15px; line-height: 1.5; color: var(--white); }
.ct-accept input { width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px; accent-color: var(--red); }
.ct-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ct-actions .btn-primary { font-weight: 800; letter-spacing: .3px; }
.ct-actions .btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.ct-msg { color: #ff5a52; font-size: 14px; min-height: 0; }
.ct-msg:empty { display: none; }
.ct-ok { display: flex; gap: 10px; align-items: flex-start; background: rgba(46, 160, 67, .12); border: 1px solid rgba(46, 160, 67, .45); border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.pay-locked { opacity: .55; }
.pay-lock-msg { color: var(--warn); font-weight: 600; margin: -4px 0 10px; }
@media (max-width: 640px) {
  .ct-overlay { padding: 0; }
  .ct-dialog { border-radius: 0; max-height: 100vh; height: 100%; }
  .ct-head, .ct-tabs, .ct-body, .ct-foot { padding-left: 14px; padding-right: 14px; }
  .ct-dl > div { grid-template-columns: 1fr; gap: 2px; }
  .ct-signer { grid-template-columns: 1fr; }
  .ct-actions { flex-direction: column-reverse; align-items: stretch; }
  .ct-actions .btn { width: 100%; justify-content: center; }
}

.row.ct-row { grid-template-columns: 150px 1.4fr 1.2fr 1fr auto auto; }
@media (max-width: 860px) { .row.ct-row { grid-template-columns: 1fr auto auto; } }
@media (max-width: 640px) {
  .ct-dialog { overflow-y: auto; display: block; }
  .ct-body { overflow: visible; }
  .ct-tabs { position: sticky; top: 0; z-index: 2; background: var(--surface); }
  .ct-foot { border-top: 3px solid var(--red); }
}
.ct-tabs .ct-jump { margin-left: auto; }

/* Contacto (portal de socios) */
.contact-row { gap: 12px; align-items: center; }
.contact-row b { display: block; overflow-wrap: anywhere; }
.contact-row small { display: block; }
.contact-ico { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; background: rgba(255,255,255,.06); }

/* Campos que se ocultan según el tipo de aviso */
.field[hidden], .switch[hidden], .note[hidden] { display: none; }
.form-grid[hidden], .check[hidden], .pay-am[hidden] { display: none; }
/* Tarifa AM en la página de pago */
.pay-am { margin-bottom: 14px; }
.pay-am h3 { margin: 0 0 8px; font-size: 16px; }
.pay-am-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-am-opt { text-align: left; background: var(--black); border: 1px solid var(--border); border-radius: 12px; padding: 12px; color: var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 4px; font: inherit; }
.pay-am-opt b { font-size: 15px; color: var(--white); }
.pay-am-opt .pay-am-price { font-family: 'Bebas Neue', sans-serif; font-size: 24px; color: var(--red); letter-spacing: .5px; }
.pay-am-opt small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.pay-am-opt.on { border-color: var(--red); background: rgba(225, 6, 0, .12); }

/* Acceso premium (Novedades y Beneficios bloqueados sin mensualidad vigente) */
.sp-bottom a { position: relative; }
.sp-bottom a.locked { opacity: .55; }
.sp-bottom a svg.nav-lock { position: absolute; top: 3px; left: calc(50% + 6px); width: 13px; height: 13px; color: var(--white); background: var(--red); border-radius: 50%; padding: 2px; }
.premium-lock { text-align: center; padding: 28px 20px; margin-bottom: 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.premium-lock h2 { margin: 0; font-size: 20px; }
.premium-lock p { margin: 0; max-width: 420px; line-height: 1.5; }
.premium-ico { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; background: var(--red-soft); border: 1px solid var(--red); }

/* Inicio: comunidad e Instagram */
.sp-community { margin-bottom: 16px; display: flex; flex-direction: column; gap: 10px; }
.sp-community > .section { margin: 0; }
.sp-community .alert-bar, .sp-community .card { margin: 0; }
.sp-insta { margin-top: 16px; padding: 14px; }
.sp-insta-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sp-insta-head b { display: block; }
.sp-insta-ico { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(45deg, #f9ce34, #ee2a7b 50%, #6228d7); }
.sp-insta-ico svg { width: 22px; height: 22px; }
.sp-insta-clip { position: relative; overflow: hidden; width: 100%; aspect-ratio: 3 / 2; border-radius: 10px; background: #111; }
.sp-insta-frame { position: absolute; left: 0; top: calc(-1 * var(--ig-head, 148px)); width: 100%; height: calc(100% + var(--ig-head, 148px) + 80px); border: 0; background: transparent; }

/* Que nada se salga del ancho del teléfono: las columnas de grilla pueden encogerse
   y los textos largos se cortan con "…" en vez de ensanchar la pantalla. */
.main, .grid-2 > *, .grid-cards > *, .kpis > *, .form-grid > *, .card { min-width: 0; }
.grid-2 { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* Panel: próximos 7 días con reservas */
.week-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.week-day { min-width: 0; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: rgba(255,255,255,.02); display: flex; flex-direction: column; gap: 8px; }
.week-day.empty-day { opacity: .55; }
.week-day-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; color: inherit; text-decoration: none; }
.week-day-head b { font-size: 14px; }
.week-day-head span { font-size: 12px; white-space: nowrap; }
.week-day-head:hover b { color: var(--red); }
.week-slot { border-top: 1px solid var(--border); padding-top: 8px; min-width: 0; }
.week-slot-top { display: flex; align-items: center; gap: 8px; }
.week-slot-top .cap { margin-left: auto; }
.week-slot-who { font-size: 12px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.day-pick[hidden] { display: none !important; }
/* Portal · Comunidad: pestañas (Novedades, Constancia, PRs, Beneficios) y ranking de constancia */
.sp-comtabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; margin-bottom: 4px; scrollbar-width: none; }
.sp-comtabs::-webkit-scrollbar { display: none; }
.sp-comtabs .chip { flex: 0 0 auto; }
.sp-rank-row { gap: 12px; align-items: center; }
.sp-rank-row.me { background: rgba(225, 6, 0, .10); border-radius: 10px; }
.sp-rank-pos { flex: 0 0 34px; text-align: center; font-size: 20px; }
.sp-rank-pts { font-family: var(--display, 'Bebas Neue'), sans-serif; font-size: 24px; white-space: nowrap; }
.sp-rank-pts small { font-family: Inter, sans-serif; font-size: 12px; color: var(--muted); font-weight: 600; }
/* Invitados del día (pases que cobraron los socios o compraron los asesorados online) */
.week-guest { border-top: 1px solid var(--border); padding: 8px 8px 6px; margin: 0 -4px; border-radius: 8px; background: rgba(255, 196, 0, .06); min-width: 0; }
.week-guest-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.week-guest-top b { font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week-guest .week-slot-who { -webkit-line-clamp: 4; word-break: break-word; }

/* Panel: Renovaciones y Clases de hoy en columnas iguales (una sola columna en pantallas chicas) */
.grid-2.panel-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .grid-2.panel-grid { grid-template-columns: minmax(0, 1fr); } }

/* Aforo por bloque horario */
.aforo-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 14px; }
.aforo-item { min-width: 0; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: rgba(255,255,255,.02); display: flex; flex-direction: column; gap: 6px; }
.aforo-item.full { border-color: rgba(225,6,0,.55); background: var(--red-soft); }
.aforo-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.aforo-top span { white-space: nowrap; color: var(--muted); }
.aforo-item.full .aforo-top span { color: var(--white); font-weight: 600; }
.aforo-item small { font-size: 12px; }
.block-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; padding: 8px 0; border-bottom: 1px solid var(--border); }
@media (max-width: 640px) { .block-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .block-row .field:first-child { grid-column: 1 / -1; } }

/* Asesorados: ficha y tabla de mediciones */
/* Columnas de ancho fijo (estado, cuestionario, medición): todas las filas quedan alineadas. */
.aseso-row { grid-template-columns: minmax(0, 2fr) 236px 160px 210px; }
.aseso-row > div { min-width: 0; }
.aseso-row .badge { white-space: nowrap; }
@media (max-width: 860px) { .aseso-row { grid-template-columns: minmax(0, 1fr) auto; } }
.meas-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 12px; }
.meas-table { border-collapse: collapse; width: max-content; min-width: 100%; font-size: 14px; }
.meas-table th, .meas-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: center; white-space: nowrap; }
.meas-table tbody th, .meas-table thead th:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); z-index: 1; font-weight: 600; }
.meas-table thead th { font-weight: 700; vertical-align: top; }
.meas-table tr.meas-group th { background: rgba(225, 6, 0, .14); text-align: left; position: static; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--white); }
.meas-table tr.meas-calc td { font-weight: 700; }
.meas-table td small.meas-delta { display: block; font-size: 11px; color: var(--muted); }
.meas-actions { display: flex; gap: 8px; justify-content: center; margin-top: 4px; font-weight: 400; }
.meas-actions .attach-link { font-size: 12px; }
.meas-note { white-space: normal !important; max-width: 180px; font-size: 12px; color: var(--muted); }
.meas-delta { font-size: 12px; color: var(--muted); margin-left: 4px; }
.meas-evo { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.meas-evo > div { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.meas-evo small { display: block; color: var(--muted); font-size: 12px; }
.meas-form-group { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--red); margin-top: 6px; border-bottom: 1px solid var(--border); padding-bottom: 4px; }

/* Portal: Mi progreso (gráficos y tabla de mediciones) */
.prog-privacy { font-size: 13px; margin: -6px 0 14px; }
.prog-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 18px; }
.prog-tile { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; margin: 0; }
.prog-tile small { color: var(--muted); font-size: 12px; }
.prog-tile b { font-size: 24px; font-family: 'Bebas Neue', sans-serif; letter-spacing: .02em; }
.prog-tile b span { font-size: 14px; color: var(--muted); font-family: Inter, sans-serif; }
.prog-tile .muted { font-size: 12px; }
.prog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.prog-chart { margin: 0; padding: 12px 12px 8px; min-width: 0; }
.prog-chart figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; font-size: 14px; margin-bottom: 4px; }
.prog-chg { margin-left: auto; font-size: 12px; color: var(--muted); }
.prog-plot { position: relative; touch-action: pan-y; }
.prog-plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.prog-plot .g { stroke: var(--border); stroke-width: 1; }
.prog-plot .ax { fill: var(--muted); font-size: 10px; font-family: Inter, sans-serif; }
.prog-plot .ln { fill: none; stroke: #e10600; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.prog-plot .pt { fill: #e10600; stroke: var(--surface); stroke-width: 2; }
.prog-plot .lbl { fill: var(--white); font-size: 11px; font-weight: 700; font-family: Inter, sans-serif; }
.prog-plot .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.prog-tip { position: absolute; transform: translate(-50%, -100%); background: #000; border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; pointer-events: none; white-space: nowrap; font-size: 12px; z-index: 2; }
.prog-tip small { display: block; color: var(--muted); font-size: 11px; }
.prog-tip[hidden] { display: none; }
.prog-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prog-table { border-collapse: collapse; width: max-content; min-width: 100%; font-size: 13px; }
.prog-table th, .prog-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: center; white-space: nowrap; }
.prog-table thead th { font-size: 12px; font-weight: 700; vertical-align: bottom; }
.prog-table thead th small { color: var(--muted); font-weight: 400; }
.prog-table tbody th, .prog-table thead th:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); }

/* Pase diario para invitar a un amigo */
.gp-card { display: flex; flex-direction: column; gap: 12px; }
.gp-head { display: flex; gap: 12px; align-items: flex-start; }
.gp-head h3 { margin: 0 0 4px; }
.gp-head p { margin: 0; font-size: 14px; }
.gp-free { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; border: 1px dashed var(--red); border-radius: 12px; padding: 12px; background: var(--red-soft); }
.gp-pass { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.gp-pass > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gp-pass small { font-size: 12px; color: var(--muted); }
.gp-pass .muted { font-size: 13px; }
.gp-pass.usado { opacity: .75; }
.gp-how { font-size: 12px; margin: 0; }
.gp-checkin .section { margin-top: 0; }
#guest[hidden] { display: none; }
.gp-jump { width: 100%; justify-content: center; margin-bottom: 14px; border-color: var(--red); }

/* Ranking de PRs */
.pr-me { margin-bottom: 16px; display: flex; flex-direction: column; gap: 10px; }
.pr-me-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pr-me-head h3 { margin: 0; }
.pr-lifts { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.pr-lifts > div { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.pr-lifts small { display: block; color: var(--muted); font-size: 11px; }
.pr-lifts b { font-family: 'Bebas Neue', sans-serif; font-size: 24px; letter-spacing: .02em; }
.pr-lifts b span { font-family: Inter, sans-serif; font-size: 12px; color: var(--muted); }
.pr-lifts .pr-tot { border-color: rgba(225, 6, 0, .55); background: var(--red-soft); }
.pr-recent .simple-row { padding: 8px 0; }
.pr-filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; margin: 0 0 10px; }
.pr-table { border-collapse: collapse; width: max-content; min-width: 100%; font-size: 14px; }
.pr-table th, .pr-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: center; white-space: nowrap; }
.pr-table thead th { font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: .04em; }
.pr-table tbody th { text-align: left; font-weight: 600; }
.pr-table td.pos { font-weight: 700; width: 36px; }
.pr-table td.hl { font-weight: 800; color: var(--white); }
.pr-table tr.me { background: var(--red-soft); }
.pr-table tr.me th small { color: var(--muted); font-weight: 400; }
.pr-filters .chips { flex-wrap: wrap; }
.pr-table tbody th { white-space: normal; min-width: 110px; }
.simple-row.pr-pend { cursor: pointer; border-radius: 10px; transition: background .15s; }
.simple-row.pr-pend:hover { background: rgba(255,255,255,.04); }
.pr-view-big { display: flex; flex-direction: column; align-items: flex-start; margin: 0 0 14px; }
.pr-view-big small { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.pr-view-big b { font-size: 34px; line-height: 1.1; color: var(--white); }
.detail-grid > .full { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .simple-row.pr-pend { flex-wrap: wrap; gap: 10px; }
  .simple-row.pr-pend .who { flex: 1 1 100%; min-width: 0; }
  .simple-row.pr-pend .who .sub { white-space: normal; overflow: visible; text-overflow: clip; }
  .simple-row.pr-pend .actions { flex: 1 1 100%; flex-wrap: nowrap; justify-content: flex-end; }
}
.age-warn { margin-top: 8px; padding: 8px 10px; border: 1px solid rgba(255,176,32,.45); border-radius: 10px; background: rgba(255,176,32,.08); font-size: 12px; color: var(--white); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.meas-table td.age-bad { color: #ffb020; }
/* Rangos de referencia bajo los gráficos de IMC e índice cintura/cadera */
.rg { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.rg + .rg { margin-top: 10px; }
.rg-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13px; margin-bottom: 8px; }
.rg-now b { color: var(--white); }
.rg-t-good { color: #3fcf8e; } .rg-t-mid { color: #f5b544; } .rg-t-bad { color: #ff6b6b; }
.rg-bar { position: relative; display: flex; gap: 2px; height: 10px; }
.rg-seg { height: 100%; border-radius: 3px; }
.rg-good { background: #2f9e6a; } .rg-mid { background: #d99a2b; } .rg-bad { background: #c9423f; }
.rg-mark { position: absolute; top: -5px; width: 4px; height: 20px; margin-left: -2px; border-radius: 2px; background: var(--white); box-shadow: 0 0 0 2px var(--surface); }
.rg-ticks { position: relative; height: 16px; margin-top: 4px; font-size: 10px; color: var(--muted); }
.rg-ticks i { position: absolute; transform: translateX(-50%); font-style: normal; }
.rg-legend { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; font-size: 12px; }
.rg-legend li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rg-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.rg-note { font-size: 11px; margin: 8px 0 0; }

/* ---------- ONLINE (asesorías online) ---------- */
.on-title { padding: 14px 16px 10px; font-family: var(--display); font-size: 20px; letter-spacing: .5px; }
.on-des .on-title { color: var(--muted); }
.on-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.on-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; white-space: nowrap; }
.on-table th, .on-table td { padding: 8px 10px; border-top: 1px solid var(--border); text-align: center; }
.on-table thead th { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: capitalize; border-top: 0; }
.on-table .on-name { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; min-width: 150px; box-shadow: 1px 0 0 var(--border); }
.on-table .on-name .attach-link { font-weight: 600; color: var(--text); text-align: left; }
.on-table .on-plan { color: var(--muted); }
.on-table td.on-c { cursor: pointer; min-width: 78px; font-variant-numeric: tabular-nums; }
.on-table td.on-c:hover { background: rgba(255, 255, 255, .06); }
.on-table td.on-skip { color: var(--muted); }
.on-table td.on-pending { background: #c9423f; color: #fff; font-weight: 700; }
.on-table td.on-pending:hover { background: #d9534f; }
.on-table .on-now { box-shadow: inset 0 2px 0 var(--red); }
.on-table tfoot td, .on-table tfoot th { font-weight: 700; color: var(--text); }
.on-des .on-table td.on-paid { color: var(--muted); }
.on-table .on-tot { font-weight: 700; border-left: 1px solid var(--border); background: rgba(255, 255, 255, .03); }
.on-table tfoot td, .on-table tfoot th { border-top: 2px solid var(--border); }
.on-sum .on-table tfoot td, .on-sum .on-table tfoot th { color: #fff; font-size: 14px; }
/* ---------- Control de asistencia · reconocimiento facial ---------- */
.face-wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .face-wrap { grid-template-columns: 1fr; } }
.face-cam { padding: 12px; }
.face-stage { position: relative; aspect-ratio: 4 / 3; background: #050505; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.face-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
.face-stage video.mirror { transform: scaleX(-1); }
.face-guide { position: absolute; left: 50%; top: 48%; width: 46%; aspect-ratio: 3 / 4; transform: translate(-50%, -50%); border: 3px dashed rgba(255, 255, 255, .55); border-radius: 50%; pointer-events: none; }
.face-stage.on .face-guide { border-color: var(--red); border-style: solid; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .35); }
.face-off { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 15px; padding: 20px; }
.face-hint { text-align: center; color: var(--muted); margin: 10px 0; font-size: 14px; }
.face-ctrl { justify-content: center; flex-wrap: wrap; }
.face-ctrl .btn { min-height: 46px; }
.face-result { text-align: center; }
.face-result.idle { text-align: left; }
.face-result.ok { border-color: #2f9e6a; }
.face-result.ok .ck-icon { background: #2f9e6a; }
.face-result.denied { border-color: var(--red); }
.face-result.ask { border-color: var(--warn); text-align: left; }
.face-result .actions { justify-content: center; }
.face-result .ck-icon { margin: 0 auto 8px; }
.face-side .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.face-side .detail-grid > div { min-width: 0; overflow-wrap: anywhere; }
.face-wrap > * { min-width: 0; }
.face-ctrl .btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- Pestañas de secciones agrupadas (Socios/Asesorados, Reservas/Horarios, Pagos/Finanzas) ---------- */
.subnav { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; max-width: 100%; overflow-x: auto; }
.subnav a { padding: 8px 18px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.subnav a:hover { color: var(--text); }
.subnav a.on { background: var(--red); color: #fff; }
/* ---------- Portal público de artículos (articulos.html) ---------- */
.pub-page .sp-header .brand { text-decoration: none; color: inherit; }
.pub-main { padding-bottom: 32px; }
.pub-hero { text-align: center; padding: 18px 0 22px; }
.pub-hero h1 { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: clamp(44px, 9vw, 72px); line-height: .95; letter-spacing: 1px; margin: 6px 0 10px; }
.pub-hero h1 em { font-style: normal; color: var(--red); }
.pub-hero p { max-width: 520px; margin: 0 auto; font-size: 15px; }
.pub-kicker { font-size: 12px; font-weight: 800; letter-spacing: 4px; text-transform: uppercase; color: var(--red); }
.pub-sub { position: relative; border-top: 3px solid var(--red); padding-top: 20px; }
.pub-sub-badge { position: absolute; top: -14px; right: 16px; background: var(--red); color: #fff; font-family: 'Bebas Neue', sans-serif; font-size: 22px; padding: 2px 12px; border-radius: 999px; box-shadow: 0 6px 18px rgba(225, 6, 0, .35); }
.pub-sub-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.pub-sub-form input[type=email] { min-width: 0; }
.pub-consent { grid-column: 1 / -1; font-size: 12px; color: var(--muted); align-items: flex-start; line-height: 1.4; }
.pub-notice, .pub-coupon { margin-bottom: 18px; }
.pub-coupon { text-align: center; border: 1px solid rgba(225, 6, 0, .5); background: radial-gradient(circle at 50% 0%, rgba(225, 6, 0, .18), transparent 70%), var(--panel, #151515); }
.pub-coupon h2 { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 34px; margin: 4px 0 10px; }
.pub-coupon-code { display: inline-block; font-family: 'Bebas Neue', sans-serif; font-size: 40px; letter-spacing: 4px; color: var(--white); border: 2px dashed var(--red); border-radius: 12px; padding: 6px 22px; margin-bottom: 10px; }
.pub-coupon p { max-width: 460px; margin: 0 auto 14px; font-size: 14px; }
.pub-coupon-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pub-share { display: flex; justify-content: center; margin: 22px 0 8px; }
.pub-cta { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; }
.pub-cta div { display: flex; flex-direction: column; gap: 2px; }
.pub-cta .muted { font-size: 13px; }
.pub-foot { text-align: center; color: var(--muted); font-size: 13px; padding: 0 16px 28px; }
.pub-foot a { color: var(--muted); }
@media (max-width: 480px) { .pub-sub-form { grid-template-columns: 1fr; } .pub-cta { flex-direction: column; align-items: stretch; text-align: center; } }

/* Página de pago: cupón */
.pay-coupon { margin-top: 12px; }
.pay-coupon-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.pay-coupon-row input { text-transform: uppercase; letter-spacing: 1px; min-width: 0; }
.pay-coupon-msg { font-size: 13px; margin-top: 6px; }
.pay-coupon-msg.ok { color: #22c55e; }
.pay-coupon-msg.bad { color: #ff8a80; }

/* ---------- Puerta: clave de un solo uso ---------- */
.door-card { border-top: 3px solid var(--red); }
.door-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.door-ico { font-size: 26px; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(225, 6, 0, .14); border: 1px solid rgba(225, 6, 0, .45); }
.door-code { display: inline-block; max-width: 100%; box-sizing: border-box; font-family: 'Bebas Neue', sans-serif; font-size: clamp(34px, 10.5vw, 56px); letter-spacing: clamp(2px, 1.1vw, 8px); color: var(--white); border: 2px dashed var(--red); border-radius: 14px; padding: 6px 20px; margin: 12px 0; }
.door-code.sm { font-size: 30px; letter-spacing: 4px; padding: 2px 12px; margin: 0 8px; vertical-align: middle; }
.door-last { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; font-size: 14px; }
.door-last .muted { font-size: 12px; width: 100%; }
.door-backup { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .04); border: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.door-backup b { color: var(--white); font-size: 18px; letter-spacing: 2px; }
.door-reveal { display: block; margin: 8px auto 0; }
.door-last .door-reveal { margin: 6px 0 0; }
