/* ==========================================================================
   Dashboard Liga Municipal
   Pensado primero para el celular: botones de 44px, navegación del torneo
   abajo (al alcance del pulgar) y partidos apilados como un marcador.
   ========================================================================== */
:root {
  --bg: #0b0b10;
  --surface: #14131a;
  --surface-2: #1c1b24;
  --surface-3: #25232f;
  --border: #292732;
  --border-strong: #3a3746;
  --text: #f5f4f8;
  --muted: #9e9aaa;
  --faint: #6d6979;
  --primary: #8c52ff;
  --primary-dim: #7440e0;
  --primary-soft: rgba(140, 82, 255, .14);
  --primary-line: rgba(140, 82, 255, .45);
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, .12);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .12);
  --danger: #ff6e84;
  --danger-soft: rgba(255, 110, 132, .1);
  --live: #f43f5e;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 30px -18px rgba(0, 0, 0, .8);
  --font: "Manrope", system-ui, sans-serif;
  --font-head: "Lexend", system-ui, sans-serif;
  --topbar-h: 60px;
  --bottomnav-h: 0px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5;
  background-image: radial-gradient(1200px 500px at 85% -10%, rgba(140, 82, 255, .10), transparent 60%);
  background-attachment: fixed; min-height: 100vh; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
p a, .ayuda a { color: #b794ff; text-underline-offset: 3px; }
code { font-family: ui-monospace, SFMono-Regular, monospace; font-size: .85em; background: var(--surface-3); padding: 1px 6px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-head); margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.12rem; font-weight: 700; }
h3 { font-size: 1rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.hidden, [hidden] { display: none !important; }
.rol-cargador .solo-admin, html:not(.rol-cargador) .solo-cargador { display: none !important; }
.no-super .solo-super, html:not(.no-super) .solo-cliente { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
::selection { background: var(--primary); color: #fff; }

/* Íconos (SVG en línea, ver ICONOS en app.js) */
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Barra superior ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--topbar-h);
  padding: 0 24px; border-bottom: 1px solid var(--border); background: rgba(11, 11, 16, .82);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  position: sticky; top: 0; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; text-decoration: none; min-width: 0; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; color: #fff; flex: none;
  background: linear-gradient(135deg, #a274ff, #6b34f0); box-shadow: 0 6px 18px -6px rgba(140, 82, 255, .7);
}
.brand-text { display: grid; line-height: 1.1; }
.brand-text small { font-family: var(--font); font-weight: 600; font-size: .7rem; color: var(--muted); letter-spacing: .02em; }
.nav { display: flex; gap: 2px; align-items: center; }
.nav a {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none; padding: 8px 12px; border-radius: 10px;
  color: var(--muted); font-weight: 600; font-size: .9rem; min-height: 40px;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--text); background: var(--surface-3); }
.nav .nav-sep { width: 1px; height: 22px; background: var(--border); margin: 0 6px; }
.nav-user { display: inline-flex; align-items: center; gap: 8px; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 800;
  background: var(--primary-soft); color: #c9b0ff; border: 1px solid var(--primary-line); flex: none;
}
.nav-email { display: grid; line-height: 1.2; font-size: .85rem; color: var(--text); }
.nav-rol { font-size: .7rem; color: var(--faint); font-weight: 600; }
.nav-cuenta { display: none; }

/* Botón flotante "Ayuda" (chat de soporte con Crisp), solo en escritorio. Verde de la marca para que se vea
   a primera vista. En el celular se oculta (ver más abajo). */
.ayuda-flotante {
  position: fixed; right: 20px; bottom: calc(20px + var(--bottomnav-h)); z-index: 40;
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px 12px 15px; border: 0; border-radius: 999px;
  background: #2be38a; color: #0b0b10; font: 700 .95rem var(--font); cursor: pointer;
  box-shadow: 0 10px 28px -8px rgba(43, 227, 138, .65), 0 2px 6px rgba(0, 0, 0, .35);
  transition: transform .15s ease, background .15s ease;
}
.ayuda-flotante:hover { background: #5cf0a6; transform: translateY(-2px); }
.ayuda-flotante .ico { width: 20px; height: 20px; stroke-width: 2.4; }
.ayuda-flotante.con-mensaje::after, .nav a.js-soporte.con-mensaje::after, .sb-item.js-soporte.con-mensaje::after {
  content: ""; position: absolute; top: -2px; right: -2px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--live); border: 2px solid var(--bg);
}
body.soporte-abierto .ayuda-flotante { display: none; }
.nav a.js-soporte { position: relative; }
body:has(.ayuda-flotante) .container { padding-bottom: calc(100px + var(--bottomnav-h)); }
@media print { .ayuda-flotante { display: none; } }

.container { max-width: 1200px; margin: 0 auto; padding: 28px 24px 72px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .lead { margin: 6px 0 0; max-width: 640px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumb {
  display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: .85rem; font-weight: 600;
  padding: 4px 8px 4px 2px; margin-left: -2px; border-radius: 8px;
}
.crumb:hover { color: var(--text); }
.crumb .ico { width: 16px; height: 16px; }
.head-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; color: var(--muted); font-size: .88rem; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }

/* ---------- Ayuda plegable ---------- */
.ayuda { margin: 0 0 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); max-width: 760px; }
.ayuda summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  color: var(--muted); font-size: .85rem; font-weight: 700; user-select: none;
}
.ayuda summary::-webkit-details-marker { display: none; }
.ayuda summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.ayuda[open] summary::after { transform: rotate(-135deg); }
.ayuda summary:hover { color: var(--text); }
.ayuda summary .ico { width: 16px; height: 16px; color: #b794ff; }
.ayuda > div, .ayuda > p { padding: 0 14px 12px; margin: 0; color: var(--muted); font-size: .86rem; }
.ayuda p { margin: 0 0 6px; }

/* ---------- Tarjetas ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card > h2:first-child { margin-bottom: 4px; }
.card-danger { border-color: rgba(255, 110, 132, .3); background: linear-gradient(180deg, var(--danger-soft), transparent 70%), var(--surface); }
.grid { display: grid; gap: 16px; }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.torneo-card { display: flex; flex-direction: column; gap: 14px; text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; position: relative; }
.torneo-card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: 0 18px 40px -24px rgba(140, 82, 255, .55); }
.grid > .torneo-card + .torneo-card { margin-top: 0; }
.torneo-link { display: flex; flex-direction: column; gap: 14px; color: inherit; text-decoration: none; }
.torneo-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.torneo-sitio { position: relative; z-index: 1; }
.torneo-oculto .torneo-link { opacity: .6; }
.torneo-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.torneo-top h2 { font-size: 1.15rem; }
.torneo-sub { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.torneo-ir { color: var(--faint); transition: color .15s, transform .15s; }
.torneo-card:hover .torneo-ir { color: var(--text); transform: translateX(2px); }
/* Pie de la tarjeta: qué se ve en el sitio público */
.torneo-sitio { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--border); min-height: 32px; }
.stats { display: flex; gap: 22px; }
.stat b { display: block; font-family: var(--font-head); font-size: 1.3rem; line-height: 1.2; }
.stat span { color: var(--muted); font-size: .78rem; }
.progreso { display: grid; gap: 6px; }
.progreso-txt { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }
.progreso-txt b { color: var(--text); font-weight: 700; }
.barra { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.barra i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #b794ff); }
.cliente-card .cliente-top { display: flex; align-items: center; gap: 12px; }
.cliente-logo {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none; font-family: var(--font-head);
  font-weight: 700; font-size: 1rem; color: #fff; background: linear-gradient(135deg, #a274ff, #5b2bd6);
}
.card-nuevo {
  display: grid; place-items: center; gap: 6px; text-align: center; min-height: 150px; border: 1.5px dashed var(--border-strong);
  background: transparent; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; box-shadow: none;
}
.card-nuevo:hover { color: var(--text); border-color: var(--primary); background: var(--primary-soft); }
.card-nuevo .ico { width: 26px; height: 26px; }

/* ---------- Formularios ---------- */
label { display: block; font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; font: inherit; min-height: 42px; transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); background: var(--surface-3); box-shadow: 0 0 0 3px rgba(140, 82, 255, .25); }
input[readonly] { color: var(--muted); }
select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239e9aaa' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=checkbox] { accent-color: var(--primary); min-height: 0; }
.form-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; }
.field { margin-bottom: 14px; }
.field-hint { margin: 6px 0 0; color: var(--muted); font-size: .82rem; }
.check { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: .92rem; font-weight: 600; margin: 0; cursor: pointer; min-height: 28px; }
.check input { width: 18px; height: 18px; }
.checks { display: grid; gap: 4px; max-height: 260px; overflow-y: auto; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.checks .check { padding: 6px 8px; border-radius: 8px; }
.checks .check:hover { background: var(--surface-3); }
/* Interruptor: un checkbox con forma de switch (visible en el sitio, mostrar goleadores…) */
.switch input {
  appearance: none; -webkit-appearance: none; width: 40px; height: 24px; border-radius: 99px; background: var(--surface-3);
  border: 1px solid var(--border-strong); position: relative; cursor: pointer; flex: none; margin: 0; padding: 0; transition: background .18s, border-color .18s;
}
.switch input::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #cfcbd8;
  transition: transform .18s, background .18s; box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}
.switch input:checked { background: var(--primary); border-color: var(--primary); }
.switch input:checked::after { transform: translateX(16px); background: #fff; }
.switch input:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; box-shadow: none; }
.switch input:disabled { opacity: .5; cursor: not-allowed; }
.switches { display: grid; gap: 4px; margin-top: 16px; padding: 6px 0; border-top: 1px solid var(--border); }
.switches .check { justify-content: space-between; flex-direction: row-reverse; padding: 10px 0; border-bottom: 1px solid var(--border); }
.switches .check:last-child { border-bottom: 0; }
.switches .check span { flex: 1; }
.switches .check small { display: block; color: var(--muted); font-weight: 500; font-size: .8rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 9px 16px; min-height: 42px; font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer;
  text-decoration: none; background: var(--surface-2); color: var(--text); white-space: nowrap; transition: background .15s, border-color .15s, color .15s, transform .05s;
}
.btn:hover { border-color: var(--muted); background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn .ico { width: 17px; height: 17px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 6px 16px -8px rgba(140, 82, 255, .9); }
.btn-primary:hover { background: var(--primary-dim); border-color: var(--primary-dim); }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(255, 110, 132, .4); }
.btn-danger:hover { border-color: var(--danger); background: var(--danger-soft); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); border-color: var(--border); }
.btn-sm { padding: 6px 11px; min-height: 34px; font-size: .82rem; border-radius: 9px; }
.btn-icon { padding: 0; width: 42px; }
.btn-sm.btn-icon { width: 34px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; line-height: 1.3;
}
.badge-en_curso, .badge-jugado { color: var(--ok); background: var(--ok-soft); border-color: rgba(52, 211, 153, .3); }
.badge-borrador, .badge-pendiente { color: var(--warn); background: var(--warn-soft); border-color: rgba(251, 191, 36, .3); }
.badge-finalizado { color: var(--muted); }
.badge-destacado { color: #c9b0ff; background: var(--primary-soft); border-color: var(--primary-line); }
.badge-en_vivo { color: #fff; background: #e11d48; border-color: #e11d48; display: inline-flex; align-items: center; gap: 6px; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulso 1.2s ease-in-out infinite; font-style: normal; flex: none; }
.tab .live-dot { color: var(--live); margin-right: 4px; vertical-align: middle; }
@keyframes pulso { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.badge-suspendido { color: var(--danger); background: var(--danger-soft); border-color: rgba(255, 110, 132, .3); }

/* ---------- Pestañas ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; width: fit-content; max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 7px; background: none; border: none; color: var(--muted); font: inherit; font-weight: 700; font-size: .9rem;
  padding: 8px 14px; min-height: 38px; cursor: pointer; border-radius: 9px; white-space: nowrap; transition: color .15s, background .15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); background: var(--surface-3); box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset; }
.tab.active .ico { color: #b794ff; }
.tab .ico { width: 17px; height: 17px; }
.tab-label { display: inline-flex; align-items: center; }
.tab.has-live .ico { color: var(--live); }
.tab .live-dot { display: none; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; }
.card.table-wrap { padding: 6px 8px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; color: var(--faint); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(255, 255, 255, .02); }
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: center; font-variant-numeric: tabular-nums; }
td.acciones { text-align: right; white-space: nowrap; }
.team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.crest { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--surface-3); display: grid; place-items: center; font-size: .66rem; font-weight: 800; color: var(--muted); flex-shrink: 0; border: 1px solid var(--border); }

img.crest { object-fit: contain; border-radius: 0; background: transparent; border: 0; }

/* ---------- Resultados: barra de herramientas ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fecha-nav { display: flex; align-items: center; gap: 6px; }
.fecha-nav select { width: auto; min-width: 150px; font-weight: 700; text-align: center; }

/* ---------- Partidos ---------- */
.jornada { margin-bottom: 28px; }
.jornada-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.jornada-head h2 { font-size: 1.2rem; }
.match {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; align-items: center; gap: 10px 14px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--border-strong); border-radius: 12px; margin-bottom: 8px;
  transition: border-color .2s, box-shadow .2s;
}
.match:has(.badge-jugado) { border-left-color: var(--ok); }
.match:has(.badge-pendiente) { border-left-color: var(--warn); }
.match:has(.badge-suspendido) { border-left-color: var(--danger); }
.match .home { justify-content: flex-end; text-align: right; }
.match .team { font-weight: 700; }
.score { display: flex; align-items: center; gap: 6px; }
.score input { width: 54px; height: 46px; text-align: center; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; padding: 4px; }
.match-meta { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.match-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
/* "Guardar" se apaga mientras no haya cambios y se enciende al tocar el marcador */
.match:not(.dirty) .match-actions .btn-primary:not([data-fin]) { background: transparent; border-color: var(--border-strong); color: var(--muted); box-shadow: none; }
.match.dirty { border-color: var(--primary-line); box-shadow: 0 0 0 3px rgba(140, 82, 255, .12); }
.match.dirty .match-actions .btn-primary { animation: latido 1.6s ease-in-out infinite; }
@keyframes latido { 0%, 100% { box-shadow: 0 0 0 0 rgba(140, 82, 255, .55); } 50% { box-shadow: 0 0 0 6px rgba(140, 82, 255, 0); } }
.match.saved { border-color: rgba(52, 211, 153, .6); animation: guardado 1.2s ease-out; }
@keyframes guardado { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .5); } 100% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); } }
@media (prefers-reduced-motion: reduce) { .match.dirty .match-actions .btn-primary, .match.saved { animation: none; } }

/* ---------- Imágenes ---------- */
.img-field { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.img-preview { width: 64px; height: 64px; border-radius: 12px; background: var(--surface-2); border: 1.5px dashed var(--border-strong); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.img-preview.wide { width: 100%; height: auto; aspect-ratio: 4 / 1; }
.img-preview img { width: 100%; height: 100%; object-fit: contain; }
.img-preview span { color: var(--faint); font-size: .72rem; text-align: center; padding: 4px; }
.img-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.img-actions label.btn { margin: 0; color: var(--text); font-size: .8rem; }

/* ---------- Sponsors ---------- */
.sponsor-list { display: grid; gap: 10px; }
.sponsor { display: grid; grid-template-columns: 240px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.sponsor.off { opacity: .55; }
.sponsor-img { aspect-ratio: 4 / 1; background: var(--surface-3); border-radius: 8px; overflow: hidden; }
.sponsor-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sponsor-info { min-width: 0; }
.sponsor-info b { display: block; }
.sponsor-info a { color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.sponsor-actions { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- En vivo ---------- */
.btn-live { background: transparent; color: #fb7185; border-color: rgba(244, 63, 94, .45); }
.btn-live:hover { border-color: var(--live); background: rgba(244, 63, 94, .1); }
.btn-warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(251, 191, 36, .45); }
.match.is-live { border-color: rgba(244, 63, 94, .55); border-left-color: var(--live); background: linear-gradient(90deg, rgba(244, 63, 94, .08), transparent 50%), var(--surface); }
.score.live { gap: 6px; }
.periodos { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 9px; overflow: hidden; }
.periodo-btn { background: var(--surface-2); color: var(--muted); border: 0; border-left: 1px solid var(--border-strong); font: inherit; font-size: .78rem; font-weight: 800; padding: 6px 12px; min-height: 32px; cursor: pointer; }
.periodo-btn:first-child { border-left: 0; }
.periodo-btn:hover { color: var(--text); }
.periodo-btn.on { background: #e11d48; color: #fff; }
.periodo-btn:disabled { opacity: .6; }
.score.live b { font-family: var(--font-head); font-size: 1.7rem; min-width: 32px; text-align: center; font-variant-numeric: tabular-nums; }
.gol-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font-size: 1.2rem; font-weight: 700; cursor: pointer; line-height: 1; touch-action: manipulation; }
.gol-btn.plus { background: var(--primary-soft); border-color: var(--primary-line); color: #d6c4ff; }
.gol-btn:hover { border-color: var(--muted); }
.gol-btn:active { transform: scale(.94); }
.gol-btn:disabled { opacity: .5; }
.jornada.oculta .match { opacity: .6; }
#envivo .gol-btn { width: 46px; height: 46px; font-size: 1.45rem; }
#envivo .score.live b { font-size: 2.1rem; }
.envivo-titulo { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.envivo-titulo + .card.empty { margin-bottom: 8px; }

/* ---------- Sponsors: logos y espacios ---------- */
.sponsor.is-logo { grid-template-columns: 160px minmax(0, 1fr) auto; }
.sponsor.is-logo .sponsor-img { aspect-ratio: 5 / 2; background: #24222b; display: grid; place-items: center; padding: 10px; }
.sponsor.is-logo .sponsor-img img { width: auto; height: auto; max-width: 100%; max-height: 44px; object-fit: contain; filter: grayscale(1); }
.sponsor:not(.is-logo) .sponsor-img { aspect-ratio: 728 / 90; }
#sponsorsBanners .sponsor { grid-template-columns: 340px minmax(0, 1fr) auto; }
.slot-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 8px; font-family: var(--font); font-weight: 800; }
.slot-title:first-child { margin-top: 0; }
.slot-publicite { display: inline-flex; margin: 0 0 10px; }
.ad-slot-preview { border: 2px dashed rgba(140, 82, 255, .35); border-radius: 12px; padding: 14px; display: grid; justify-items: center; gap: 2px; text-align: center; }
.ad-slot-preview span { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.ad-slot-preview b { color: var(--primary); font-family: var(--font-head); }
.ad-slot-preview small { color: var(--muted); }
[data-panel="sponsors"] .card + .card { margin-top: 16px; }

/* ---------- Zonas y playoff ---------- */
.zonas-lista { display: flex; flex-wrap: wrap; gap: 8px; }
.zona-chip { display: flex; align-items: center; gap: 8px; padding: 5px 5px 5px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.zona-select { padding: 6px 30px 6px 10px; min-height: 36px; width: auto; }
tr.clasifica td:first-child { box-shadow: inset 3px 0 0 var(--primary); color: #b794ff; font-weight: 700; }
.clasifica-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--primary); vertical-align: middle; margin-right: 4px; }
.penales { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.penales input { width: 46px; min-height: 32px; padding: 3px 6px; text-align: center; }
.match.tbd { opacity: .65; }
.campeon { display: flex; align-items: center; gap: 10px; padding: 16px 18px; margin-bottom: 18px; border-radius: 14px; background: linear-gradient(90deg, rgba(251, 191, 36, .18), transparent); border: 1px solid rgba(251, 191, 36, .45); font-size: 1.05rem; }
.sponsor.is-vertical { grid-template-columns: 90px minmax(0, 1fr) auto; }
#sponsorsBanners .sponsor.is-vertical { grid-template-columns: 90px minmax(0, 1fr) auto; }
.sponsor.is-vertical .sponsor-img { aspect-ratio: 1 / 2; }
.ad-slot-preview.vertical { max-width: 160px; aspect-ratio: 1 / 2; align-content: center; }
.playoff-config { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }

/* Armado manual del playoff */
.modal.modal-wide { max-width: 640px; max-height: 90vh; overflow-y: auto; }
.modal .field select#mNCruces { display: inline-block; margin-right: 8px; }
@media (min-width: 641px) { .modal.modal-llave { max-width: 980px; } }
.ll-ayuda { margin: 4px 0 10px; }
/* Equipos sin ubicar */
.ll-pool {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; min-height: 52px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2);
  /* Queda a la vista mientras se baja por el cuadro, para poder arrastrar desde ahí */
  position: sticky; top: -24px; z-index: 2; max-height: 34vh; overflow-y: auto; box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .8);
}
.ll-pool.destino, .ll-pool.sobre { border-color: var(--primary); background: var(--primary-soft); }
.ll-chip {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 5px 10px 5px 5px; border-radius: 99px;
  background: var(--surface-3); border: 1px solid var(--border-strong); color: var(--text); font: inherit; font-size: .86rem; font-weight: 600;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.ll-chip:hover { border-color: var(--muted); }
.ll-chip .crest { width: 24px; height: 24px; }
.ll-chip .ll-nombre { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ll-chip small { color: var(--muted); font-weight: 500; font-size: .74rem; white-space: nowrap; }
.ll-chip.elegido { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(140, 82, 255, .25); }
.ll-chip.arrastrando { opacity: .35; }
.ll-ghost { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; margin: 0; box-shadow: 0 14px 30px -8px rgba(0, 0, 0, .8); border-color: var(--primary); cursor: grabbing; }
.ll-quitar { margin-left: auto; padding: 0 2px 0 6px; color: var(--muted); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.ll-quitar:hover { color: var(--danger); }
/* Cuadro: una columna por ronda, los cruces se reparten a lo alto como en una llave */
.ll-cuadro { display: grid; grid-template-columns: repeat(var(--rondas), minmax(210px, 1fr)); gap: 14px; margin-top: 14px; overflow-x: auto; padding-bottom: 6px; }
.ll-ronda { display: flex; flex-direction: column; min-width: 0; }
.ll-ronda h3 { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 8px; }
.ll-lista { display: flex; flex-direction: column; justify-content: space-around; gap: 10px; flex: 1; }
.ll-match { display: grid; gap: 4px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); position: relative; }
.ll-num { font-size: .7rem; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.ll-slot { display: flex; align-items: center; min-height: 40px; padding: 3px; border-radius: 8px; border: 1.5px dashed var(--border-strong); }
.ll-slot.lleno { border-style: solid; border-color: transparent; }
.ll-slot .ll-chip { width: 100%; }
.ll-slot.sobre { border-color: var(--primary); border-style: solid; background: var(--primary-soft); }
.arrastrando-llave .ll-slot:not(.lleno) { border-color: var(--primary-line); }
.ll-vacio { color: var(--faint); font-size: .82rem; padding-left: 8px; }
.ll-futuro { background: transparent; }
.ll-slot.ll-fijo { flex-direction: column; align-items: flex-start; justify-content: center; border: 1px solid var(--border); background: var(--surface-2); padding: 5px 9px; gap: 1px; }
.ll-fijo b { font-size: .82rem; font-weight: 700; }
.ll-fijo small { color: var(--muted); font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
@media (max-width: 640px) {
  /* En el celu las rondas van una debajo de la otra: no hace falta desplazar de costado */
  .ll-cuadro { grid-template-columns: 1fr; overflow-x: visible; }
  /* Una sola fila que se desliza de costado: deslizar de costado mueve la lista, arrastrar hacia abajo lleva el equipo */
  .ll-pool { top: -20px; padding: 8px; gap: 5px; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; max-height: none; overscroll-behavior-x: contain; }
  .ll-pool .ll-chip { flex: none; touch-action: pan-x; }
  .ll-chip { padding: 3px 8px 3px 3px; font-size: .8rem; gap: 5px; }
  .ll-chip .crest { width: 20px; height: 20px; }
  .ll-chip small { font-size: .68rem; }
  .modal-llave .field .btn-sm { margin-top: 6px; }
  .ll-slot .ll-chip small { display: none; }
}

/* ---------- Goles y tarjetas por jugador ---------- */
/* Debajo de cada equipo (las celdas van en la grilla del partido) */
.match-incidencias { display: contents; }
.match-incidencias span { font-size: .8rem; color: var(--muted); }
.match-incidencias .home { grid-column: 1; text-align: right; }
.match-incidencias .visit { grid-column: 3; }
.modal-planilla { max-width: 720px; }
.planilla-marcador { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto minmax(0, 1fr); align-items: center; gap: 8px; margin-bottom: 8px; font-weight: 700; padding: 12px; background: var(--surface-2); border-radius: 12px; }
.planilla-marcador .home { text-align: right; }
.planilla-marcador input { width: 56px; text-align: center; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; padding: 6px; }
.planilla-marcador b { font-family: var(--font-head); font-size: 1.4rem; }
.planilla-penales { text-align: center; font-size: .85rem; color: var(--muted); }
.planilla-penales input { width: 52px; text-align: center; padding: 4px; display: inline-block; }
.planilla-equipo { margin-top: 18px; }
.planilla-equipo h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin-bottom: 6px; flex-wrap: wrap; }
.planilla-equipo .crest { width: 22px; height: 22px; }
.planilla-suma-mal { color: var(--danger); }
.planilla-tabla td { padding: 4px 6px; }
.planilla-tabla th { padding: 6px; }
.planilla-tabla input[type=number] { width: 52px; min-height: 38px; text-align: center; padding: 4px; }
.planilla-tabla input[type=checkbox] { width: 20px; height: 20px; }
@media (max-width: 640px) {
  .planilla-tabla input[type=number] { width: 44px; }
  .planilla-tabla td:first-child, .planilla-tabla th:first-child { display: none; }
  .planilla-tabla th { font-size: .62rem; letter-spacing: .02em; white-space: normal; }
}

/* ---------- Copiar ---------- */
.copy { display: flex; gap: 8px; }
.copy input { font-family: ui-monospace, monospace; font-size: .82rem; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(5, 5, 8, .7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; z-index: 50; animation: aparecer .15s ease-out; }
.modal { width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 18px; padding: 24px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); animation: subir .2s ease-out; }
.modal h2 { margin-bottom: 18px; font-size: 1.25rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
@keyframes aparecer { from { opacity: 0; } }
@keyframes subir { from { opacity: 0; transform: translateY(16px); } }

/* ---------- Toast ---------- */
#toast {
  position: fixed; bottom: calc(22px + var(--bottomnav-h)); left: 50%; transform: translateX(-50%) translateY(20px); background: var(--surface-3);
  border: 1px solid var(--border-strong); padding: 11px 18px; border-radius: 12px; font-weight: 700; opacity: 0; transition: .2s; z-index: 60;
  pointer-events: none; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .8); max-width: calc(100vw - 32px); display: flex; align-items: center; gap: 8px;
}
#toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.error { border-color: var(--danger); color: var(--danger); }
#toast.error::before { background: var(--danger); }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login { width: 100%; max-width: 400px; padding: 32px 28px; }
.login .brand { flex-direction: column; justify-content: center; margin-bottom: 26px; font-size: 1.3rem; text-align: center; gap: 12px; }
.login .brand-mark { width: 56px; height: 56px; font-size: 28px; border-radius: 16px; }
.login .brand small { display: block; font-family: var(--font); font-weight: 600; font-size: .85rem; color: var(--muted); margin-top: 4px; }
.login .btn { min-height: 48px; font-size: 1rem; margin-top: 6px; }
.error-msg { color: var(--danger); font-size: .85rem; min-height: 1.2em; margin: 6px 0 0; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-ico { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 14px; background: var(--surface-2); color: var(--faint); }
.empty-ico .ico { width: 26px; height: 26px; }

.match { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; }
.match .team span { min-width: 0; overflow-wrap: break-word; hyphens: auto; }

/* ---------- Tablas que en el celular se ven como tarjetas ---------- */
@media (max-width: 640px) {
  table.tabla-cards thead { display: none; }
  table.tabla-cards, .tabla-cards tbody, .tabla-cards tr, .tabla-cards td { display: block; }
  .tabla-cards tr { padding: 12px 6px; border-bottom: 1px solid var(--border); }
  .tabla-cards tr:last-child { border-bottom: 0; }
  .tabla-cards td { border: 0; padding: 3px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: right; }
  .tabla-cards td:first-child { padding-bottom: 8px; text-align: left; }
  .tabla-cards td[data-label]::before { content: attr(data-label); color: var(--faint); font-size: .75rem; font-weight: 700; text-align: left; flex: none; }
  .tabla-cards td.acciones { justify-content: flex-start; flex-wrap: wrap; padding-top: 10px; gap: 6px; text-align: left; }
  .tabla-cards td.empty { display: block; text-align: center; }
  .card.table-wrap:has(.tabla-cards) { padding: 4px 14px; }
}

/* ==========================================================================
   Celular
   ========================================================================== */
@media (max-width: 640px) {
  :root { --topbar-h: 56px; }
  body { font-size: 15px; }
  h1 { font-size: 1.45rem; }
  .topbar { padding: 0 12px 0 16px; }
  .brand-text { display: none; }
  .nav-email, .nav-label, .nav-rol, .nav .nav-sep { display: none; }
  .nav a { padding: 8px 10px; }
  .nav a .ico { width: 20px; height: 20px; }
  /* En el celular no va el flotante: se usa el ícono "Ayuda" de arriba, en verde para que se vea */
  .ayuda-flotante { display: none; }
  body:has(.ayuda-flotante) .container { padding-bottom: calc(48px + var(--bottomnav-h)); }
  .nav a.js-soporte { color: #2be38a; }
  .container { padding: 18px 16px calc(48px + var(--bottomnav-h)); }
  .page-head { margin-bottom: 16px; align-items: flex-start; }
  .page-head > .btn, .page-actions .btn { flex: 1; }
  .page-head:has(> .btn-ver-sitio) { flex-wrap: nowrap; }
  .page-head > .btn-ver-sitio { flex: none; width: 44px; padding: 0; margin-top: 2px; }
  .page-actions { width: 100%; }
  .btn-ver-sitio .btn-txt { display: none; }
  .card { padding: 16px; border-radius: 14px; }
  .modal-actions .btn { flex: 1; min-height: 46px; }
  .grid-cards { grid-template-columns: 1fr; gap: 12px; }

  /* Navegación del torneo y del cliente: barra fija abajo, al alcance del pulgar */
  body.con-bottomnav { --bottomnav-h: calc(64px + env(safe-area-inset-bottom)); }
  body.con-bottomnav .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; margin: 0; width: auto; max-width: none; border-radius: 0; border: 0;
    border-top: 1px solid var(--border); background: rgba(16, 15, 22, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); gap: 0; justify-content: space-around; overflow: visible;
  }
  body.con-bottomnav .tab {
    flex: 1 1 0; min-width: 0; flex-direction: column; gap: 3px; padding: 6px 2px; min-height: 52px; font-size: .66rem; font-weight: 700;
    letter-spacing: .01em; border-radius: 10px; position: relative;
  }
  body.con-bottomnav .tab .ico { width: 22px; height: 22px; }
  body.con-bottomnav .tab.active { background: transparent; box-shadow: none; color: #d6c4ff; }
  body.con-bottomnav .tab.active .ico { color: #b794ff; }
  body.con-bottomnav .tab.active::before { content: ""; position: absolute; top: -7px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--primary); }
  body.con-bottomnav .tab .live-dot { display: inline-block; position: absolute; top: 6px; right: calc(50% - 18px); margin: 0; }
  body.con-bottomnav .tab-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

  /* Modales: hoja que sube desde abajo */
  .modal-bg { place-items: end center; padding: 0; }
  .modal, .modal.modal-wide { max-width: none; max-height: 92dvh; border-radius: 20px 20px 0 0; padding: 20px 16px 0; border-bottom: 0; animation: hoja .22s ease-out; }
  .modal::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--border-strong); margin: -8px auto 14px; }
  .modal-actions { position: sticky; bottom: 0; margin: 18px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); }
  @keyframes hoja { from { transform: translateY(40px); opacity: .4; } }

  /* Resultados: fecha a todo el ancho, acciones abajo */
  .toolbar { gap: 10px; }
  .fecha-nav { width: 100%; }
  .fecha-nav select { flex: 1; }
  .toolbar-actions { width: 100%; }
  .toolbar-actions .btn { flex: 1; }
  .jornada-head h2 { font-size: 1.1rem; }

  /* Partido en el celular: como un marcador, un equipo por renglón con su resultado a la derecha */
  .match { grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px; padding: 12px 12px 12px 14px; row-gap: 8px; }
  .match .match-meta { grid-column: 1 / -1; grid-row: 1; gap: 6px 10px; }
  .match .team { grid-column: 1; font-size: .95rem; gap: 10px; }
  .match .team.home { grid-row: 2; flex-direction: row-reverse; justify-content: flex-end; text-align: left; }
  .match .team:not(.home) { grid-row: 4; }
  .match .team span { overflow-wrap: anywhere; }
  .match .crest { width: 26px; height: 26px; }
  .match .score { display: contents; }
  .match .score > .muted { display: none; }
  .match .score input { width: 58px; height: 46px; font-size: 1.3rem; grid-column: 4; }
  .match .score input[name=gl] { grid-row: 2; }
  .match .score input[name=gv] { grid-row: 4; }
  .match .score.live > :nth-child(1) { grid-column: 2; grid-row: 2; }
  .match .score.live > :nth-child(2) { grid-column: 3; grid-row: 2; }
  .match .score.live > :nth-child(3) { grid-column: 4; grid-row: 2; }
  .match .score.live > :nth-child(5) { grid-column: 4; grid-row: 4; }
  .match .score.live > :nth-child(6) { grid-column: 3; grid-row: 4; }
  .match .score.live > :nth-child(7) { grid-column: 2; grid-row: 4; }
  .score.live b { font-size: 1.5rem; min-width: 30px; }
  .gol-btn { width: 40px; height: 40px; }
  #envivo .gol-btn { width: 50px; height: 50px; font-size: 1.6rem; }
  #envivo .score.live b { font-size: 2rem; min-width: 38px; }
  .match-incidencias span { grid-column: 1 / -1 !important; text-align: left !important; padding-left: 36px; margin-top: -6px; }
  .match .match-incidencias .home { grid-row: 3; }
  .match .match-incidencias .visit { grid-row: 5; }
  .match .match-actions { grid-column: 1 / -1; grid-row: 6; justify-content: flex-start; gap: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
  .match .match-actions .btn { min-height: 40px; }
  .match .match-actions .btn-primary { flex: 1 1 100%; order: -1; min-height: 44px; }
  .match:not(.dirty) .match-actions .btn-primary:not([data-fin]) { flex: 0 1 auto; order: 0; min-height: 40px; }
  .match.tbd .score { display: none; }
  .match.tbd .team:not(.home) { grid-row: 3; }
  .match.tbd .match-actions { grid-row: 4; }

  .sponsor, .sponsor.is-logo, #sponsorsBanners .sponsor { grid-template-columns: 1fr; }
  .sponsor-actions { justify-content: flex-start; }
}
@media (max-width: 380px) {
  .match .score input { width: 50px; }
  .gol-btn { width: 36px; height: 36px; }
  #envivo .gol-btn { width: 44px; height: 44px; }
}


/* Cliente: equipos y plantel */
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .75rem; white-space: nowrap; }
.jugador-foto { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--surface-2); display: inline-grid; place-items: center; font-size: .75rem; color: var(--muted); flex: none; }
tr.inactivo td { opacity: .5; }

/* Planillas: botón de imprimir y fotos de la planilla firmada en Resultados */
.fotos-modal { display: grid; gap: 12px; }
.fotos-modal figure { margin: 0; display: grid; gap: 6px; }
.fotos-modal img { width: 100%; border-radius: 8px; border: 1px solid var(--border); background: #fff; }
.fotos-modal figcaption { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); }
.planilla-chip { background: none; border: 0; padding: 0; font: inherit; color: var(--ok); cursor: pointer; text-decoration: underline dotted; }

/* Carga desde el QR de la planilla (pensado para celular) */
.cargar { max-width: 560px; }
.cargar-cab { margin-bottom: 16px; }
.cargar-cab h1 { margin-top: 4px; }
.cargar .card + .card { margin-top: 14px; }
.cargar-marcador { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: stretch; }
.cargar-lado { display: grid; grid-template-rows: 1fr auto; gap: 10px; justify-items: center; text-align: center; min-width: 0; }
.cargar-eq { align-self: start; display: grid; justify-items: center; gap: 6px; font-weight: 700; font-family: var(--font-head); overflow-wrap: anywhere; }
.cargar-eq .crest { width: 44px; height: 44px; }
.cargar-vs { align-self: end; font-size: 1.3rem; color: var(--muted); padding-bottom: 12px; }
.cargar-stepper { display: flex; align-items: center; gap: 4px; }
.cargar-stepper input { width: 54px; height: 52px; text-align: center; font-family: var(--font-head); font-weight: 700; font-size: 1.8rem; padding: 4px; }
.cargar-stepper .gol-btn { width: 36px; height: 40px; font-size: 1.3rem; flex: none; }
.cargar-penales { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; color: var(--muted); font-weight: 600; }
.cargar-penales input { width: 58px; text-align: center; font-weight: 700; font-size: 1.2rem; }
.cargar-aviso { margin: 16px 0 0; padding: 10px 12px; border-radius: 8px; background: rgba(251, 191, 36, .1); border: 1px solid rgba(251, 191, 36, .35); color: var(--warn); font-size: .88rem; }
.cargar-aviso.ok { background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .4); color: var(--ok); }
.btn-grande { width: 100%; padding: 13px 16px; font-size: 1rem; margin-top: 14px; }
.cargar-botones { display: grid; gap: 0; }
.cargar-botones .btn-grande { margin-top: 10px; }
.cargar-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.cargar-foto { margin: 0; display: grid; gap: 4px; }
.cargar-foto a { display: grid; place-items: center; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.cargar-foto img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 400px) {
  .cargar .card { padding: 16px 12px; }
  .cargar-stepper .gol-btn { width: 30px; height: 38px; }
  .cargar-stepper input { width: 46px; font-size: 1.6rem; }
}
.cargar-incidencias { display: grid; gap: 4px; margin-top: 12px; font-size: .85rem; color: var(--muted); }
.cargar-incidencias span:empty { display: none; }

/* Franja "Confirmá tu mail" debajo de la barra de arriba */
.aviso-mail { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 12px auto 0; max-width: 1100px; padding: 10px 14px; border-radius: 10px; font-size: .88rem;
  background: var(--warn-soft); border: 1px solid rgba(251, 191, 36, .35); color: var(--warn); }
.aviso-mail b { color: inherit; word-break: break-all; }
@media (max-width: 1140px) { .aviso-mail { margin: 12px 16px 0; } }

/* Diseño del sitio: colores, logo y vista previa */
.diseno-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; margin-top: 8px; }
@media (max-width: 760px) { .diseno-grid { grid-template-columns: 1fr; } }
.color-campo { display: flex; gap: 8px; align-items: center; max-width: 240px; }
.color-campo input[type=color] { width: 48px; height: 42px; padding: 3px; border-radius: 10px; flex-shrink: 0; cursor: pointer; }
.color-campo input:not([type=color]) { font-family: ui-monospace, monospace; text-transform: lowercase; }
.paletas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.paleta { display: flex; width: 44px; height: 30px; border-radius: 8px; overflow: hidden; border: 2px solid var(--border); cursor: pointer; padding: 0; background: none; }
.paleta span { flex: 1; }
.paleta span + span { flex: .45; }
.paleta.on { border-color: var(--text); }
.preview-sitio { --c1: #21508e; --c2: #de3c35; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #0b0e13; margin-top: 6px; font-size: .85rem; }
.ps-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: linear-gradient(180deg, var(--c1), color-mix(in srgb, var(--c1) 55%, #000)); border-bottom: 4px solid var(--c2); }
.ps-logo { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; overflow: hidden; background: rgba(255,255,255,.12); color: #fff; font-weight: 700; flex-shrink: 0; }
.ps-logo img { width: 100%; height: 100%; object-fit: contain; }
.ps-nombre { color: #fff; font-weight: 800; font-style: italic; text-transform: uppercase; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-pill { background: var(--c2); color: var(--c2-texto, #fff); border-radius: 8px; padding: 4px 10px; font-weight: 700; text-transform: uppercase; font-size: .75rem; }
.ps-body { padding: 12px 14px; }
.ps-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.ps-tabs span { padding: 5px 10px; border-radius: 8px; border: 2px solid #263247; color: #9aa4b5; font-weight: 700; font-size: .75rem; text-transform: uppercase; font-style: italic; }
.ps-tabs span.on { background: linear-gradient(180deg, var(--c1), color-mix(in srgb, var(--c1) 55%, #000)); border-color: var(--c2); color: #fff; }
.preview-sitio table { width: 100%; border-collapse: collapse; background: #141a24; border-radius: 10px; overflow: hidden; }
.preview-sitio th { background: color-mix(in srgb, var(--c1) 45%, #0b0e13); color: #c9d6ee; border-bottom: 2px solid var(--c2); text-align: left; padding: 7px 10px; font-size: .75rem; }
.preview-sitio td { padding: 7px 10px; color: #eef1f6; border-top: 1px solid #263247; }
.diseno-sub { font-size: .95rem; margin: 22px 0 6px; }
.redes-campos { display: grid; gap: 8px; }
.red-campo { display: flex; align-items: center; gap: 8px; }
.red-campo .red-ico { --red-fondo: var(--surface-2); width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); flex-shrink: 0; }
.red-campo .red-ico svg { width: 18px; height: 18px; }
.red-campo input { flex: 1; min-width: 0; }
.ps-redes { display: inline-flex; gap: 6px; }
.ps-redes span { --red-fondo: var(--c1); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--c1); color: #fff; }
.ps-redes svg { width: 12px; height: 12px; }
.ps-pie { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; background: #070a0e; border-top: 4px solid var(--c1); color: #fff; font-weight: 700; font-style: italic; text-transform: uppercase; font-size: .78rem; }
.contacto-switch { margin-top: 4px; border-top: 0; }
.contacto-campos { display: grid; gap: 10px; margin-top: 8px; }
.contacto-campos textarea { resize: vertical; min-height: 70px; }
.contacto-preview-col { position: sticky; top: 90px; }
@media (max-width: 760px) { .contacto-preview-col { position: static; } }
.ps-contacto { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #141a24; border: 1px solid #263247; color: #eef1f6; }
.ps-contacto h4 { margin: 0 0 8px; font-size: .85rem; font-style: italic; text-transform: uppercase; }
.ps-contacto ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ps-contacto li { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .78rem; overflow-wrap: anywhere; }
.ps-contacto .pc-ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c1) 35%, transparent); color: #fff; }
.ps-contacto .pc-ico svg { width: 12px; height: 12px; }
.ps-contacto p { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid #263247; color: #9aa4b5; font-size: .75rem; white-space: pre-line; overflow-wrap: anywhere; }
.ps-contacto ul:empty + p { margin-top: 0; padding-top: 0; border-top: 0; }
.ps-contacto-off { margin-top: 12px; padding: 14px 12px; border-radius: 10px; border: 2px dashed #263247; color: #9aa4b5; text-align: center; font-size: .78rem; }

/* Sponsors: listas a la izquierda y vista previa del sitio a la derecha (fija al bajar) */
.sponsors-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 16px; align-items: start; }
.sponsors-grid > div > .card + .card { margin-top: 16px; }
.sponsors-preview { position: sticky; top: 84px; }
.card + .sponsors-grid { margin-top: 16px; }
/* Con la vista previa al lado la columna es más angosta: en los banners horizontales los botones van abajo */
.sponsors-grid .sponsor:not(.is-logo):not(.is-vertical) { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
.sponsors-grid .sponsor:not(.is-logo):not(.is-vertical) .sponsor-actions { grid-column: 1 / -1; }
@media (max-width: 960px) { .sponsors-grid { grid-template-columns: 1fr; } .sponsors-preview { position: static; } }
.ps-sponsors .ps-strip { background: #070a0e; padding: 8px 12px; border-bottom: 1px solid #263247; }
.ps-sponsors .ps-strip small { display: block; color: #9aa4b5; font-weight: 700; text-transform: uppercase; font-size: .62rem; letter-spacing: .06em; margin-bottom: 6px; text-align: center; }
.ps-logos { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; }
.ps-logos img { height: 26px; max-width: 70px; object-fit: contain; }
.ps-sponsors .ps-body { display: grid; gap: 10px; }
.ps-main { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start; }
.ps-ad { position: relative; aspect-ratio: 728 / 90; border-radius: 6px; overflow: hidden; background: #141a24; }
.ps-ad.vertical { aspect-ratio: 300 / 600; width: 72px; }
.ps-ad img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ps-ad.ps-libre { display: grid; place-content: center; text-align: center; border: 1px dashed #3a4760; background: #0f141c; color: #c9d6ee; line-height: 1.1; }
.ps-ad.ps-libre span { font-size: .55rem; text-transform: uppercase; color: #6f7b8f; letter-spacing: .06em; }
.ps-ad.ps-libre b { font-size: .75rem; }
.ps-ad.vertical.ps-libre b { font-size: .65rem; }
.ps-rota { position: absolute; right: 4px; bottom: 3px; background: rgba(0,0,0,.6); color: #fff; font-size: .6rem; padding: 1px 5px; border-radius: 4px; }
.prueba-aviso { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--primary) 12%, transparent); border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent); }
.badge.badge-prueba { background: color-mix(in srgb, var(--primary) 18%, transparent); color: var(--primary); }
.sponsors-prueba .sponsor { border-style: dashed; }

/* ---------- Pegar lista de jugadores ---------- */
.modal.modal-pegar { max-width: 780px; }
.modal-pegar textarea { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; line-height: 1.5; resize: vertical; min-height: 150px; }
.modal-pegar .pl-formatos { margin: 6px 0 0; }
.pl-formato { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 8px; border: 1px solid var(--primary-line); border-radius: var(--radius-sm); overflow: hidden; }
.pl-formato span { padding: 8px 10px; font-weight: 800; font-size: .85rem; background: var(--primary-soft); color: #d9c9ff; }
.pl-formato span + span { border-left: 1px solid var(--primary-line); }
.pl-formato span.opcional { background: var(--surface-2); color: var(--text); }
.pl-formato i { display: block; font-style: normal; font-weight: 600; font-size: .7rem; color: var(--muted); }
.pl-preview:not(:empty) { margin-top: 16px; display: grid; gap: 12px; }
.pl-resumen { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-chip { padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.pl-chip.ok { color: var(--ok); background: var(--ok-soft); border-color: rgba(52, 211, 153, .3); }
.pl-chip.nuevo { color: #c9b0ff; background: var(--primary-soft); border-color: var(--primary-line); }
.pl-chip.warn { color: var(--warn); background: var(--warn-soft); border-color: rgba(251, 191, 36, .3); }
.pl-chip.mal { color: var(--danger); background: var(--danger-soft); border-color: rgba(255, 110, 132, .3); }
.pl-grupo { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.pl-grupo-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; background: var(--surface-2); }
.pl-grupo-head .crest { width: 26px; height: 26px; font-size: .65rem; }
.pl-grupo-head .small { margin-left: auto; }
.pl-equipos { list-style: none; margin: 0; padding: 4px 0; }
.pl-equipos li { display: flex; align-items: center; gap: 10px; padding: 6px 12px; font-size: .9rem; }
.pl-equipos li .crest { width: 24px; height: 24px; font-size: .6rem; flex: none; }
.pl-equipos li .badge { margin-left: auto; }
.pl-equipos li.pl-existe span:not(.badge), .pl-equipos li.pl-repetido span:not(.badge) { color: var(--faint); text-decoration: line-through; }
.pl-tabla { width: 100%; font-size: .86rem; }
.pl-tabla th, .pl-tabla td { padding: 6px 10px; }
.pl-tabla th { font-size: .68rem; }
.pl-estado { text-align: right; white-space: nowrap; }
.pl-estado .small { display: block; margin-top: 2px; white-space: normal; }
.pl-existe td, .pl-repetido td { color: var(--faint); }
.pl-existe td:not(.pl-estado), .pl-repetido td:not(.pl-estado) { text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .25); }
.badge-pl-nuevo { color: var(--ok); background: var(--ok-soft); border-color: rgba(52, 211, 153, .3); }
.pl-grupo-head .badge-pl-nuevo { color: #c9b0ff; background: var(--primary-soft); border-color: var(--primary-line); }
.badge-pl-repetido { color: var(--warn); background: var(--warn-soft); border-color: rgba(251, 191, 36, .3); }
.badge-pl-error { color: var(--danger); background: var(--danger-soft); border-color: rgba(255, 110, 132, .3); }
.botones { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .pl-tabla th:nth-child(4), .pl-tabla td:nth-child(4) { display: none; }
  .pl-tabla th, .pl-tabla td { padding: 6px; }
}
.modal-pegar .modal-actions { position: sticky; bottom: -24px; margin: 18px -24px -24px; padding: 14px 24px; background: var(--surface); border-top: 1px solid var(--border); }
@media (max-width: 640px) { .modal-pegar .modal-actions { bottom: 0; margin: 18px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); } }

/* ---------- Esferita con los colores del equipo (cuando no tiene escudo) ---------- */
.crest.crest-paleta {
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 38%),
    radial-gradient(circle at 70% 78%, rgba(0, 0, 0, .28), rgba(0, 0, 0, 0) 55%),
    linear-gradient(135deg, var(--c1) 0 50%, var(--c2) 50% 100%);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, .25);
}
.colores-campo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.colores-campo .crest { width: 44px; height: 44px; }
.colores-campo .crest.vacia { background: var(--surface-3); box-shadow: none; border: 1px dashed var(--border-strong); }
.color-pick { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; font-size: .85rem; color: var(--muted); cursor: pointer; }
.color-pick input[type=color] { width: 44px; height: 38px; padding: 3px; border-radius: 10px; cursor: pointer; }
.paleta-mini { display: inline-flex; border-radius: 999px; overflow: hidden; border: 1px solid var(--border-strong); }
.paleta-mini i { display: block; width: 16px; height: 16px; }

/* Planillas con QR en el plan Gratis: etiqueta en el botón y explicación con ejemplo */
.tag-completo { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; font-size: .68rem; font-weight: 700; letter-spacing: .02em;
                color: #c9b0ff; background: var(--primary-soft); border: 1px solid var(--primary-line); vertical-align: middle; }
.modal-planillas-gratis { max-width: 540px; }
.modal-planillas-gratis h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.pasos-planilla { margin: 12px 0; padding-left: 20px; line-height: 1.5; }
.pasos-planilla li { margin: 6px 0; }
.modal-planillas-gratis .modal-actions { flex-wrap: wrap; }

/* Listado de clientes (superusuario): ordenar por nombre o fecha de registro */
.orden-clientes { display: flex; align-items: center; gap: 8px; margin: -8px 0 14px; flex-wrap: wrap; }
.orden-clientes label { margin: 0 0 0 auto; }
.orden-clientes #buscar { flex: 1 1 220px; max-width: 320px; min-height: 38px; padding-top: 6px; padding-bottom: 6px; }

/* Listado compacto: una fila por cliente */
.cl-lista { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.cl-fila {
  display: grid; grid-template-columns: minmax(0, 1fr) 370px 92px 128px 128px 18px; align-items: center; gap: 12px;
  padding: 8px 14px; border-top: 1px solid var(--border); text-decoration: none; font-size: .88rem;
}
.cl-fila:first-child { border-top: 0; }
a.cl-fila:hover { background: var(--surface-2); }
.cl-head { padding-top: 9px; padding-bottom: 9px; background: var(--surface-2); color: var(--faint); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.cl-nombre { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cl-nombre .cliente-logo { width: 32px; height: 32px; border-radius: 9px; font-size: .78rem; }
.cl-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.cl-txt b, .cl-txt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-txt small { color: var(--muted); font-size: .78rem; }
.cl-plan { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cl-plan .badge { font-size: .7rem; padding: 1px 8px; }
.cl-plan .btn-sm { min-height: 26px; padding: 2px 10px; font-size: .75rem; }
.cl-auto { font-size: .7rem; color: var(--faint); }
.badge-ayuda { color: var(--warn); background: var(--warn-soft); border-color: rgba(251, 191, 36, .45); font-weight: 700; }
.cl-plan .btn-wa { display: inline-flex; align-items: center; gap: 5px; color: #25d366; border-color: rgba(37, 211, 102, .45); background: rgba(37, 211, 102, .1); }
.cl-plan .btn-wa.btn-ghost { background: none; border-color: var(--border); color: var(--muted); }
.orden-clientes .ayuda-filtro { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 0 8px; cursor: pointer; white-space: nowrap; }
.ayuda-filtro input { width: auto; min-height: 0; margin: 0; }
.cl-head > span { white-space: nowrap; }
.cl-dato { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cl-num { text-align: right; }
.cl-fila .torneo-ir .ico { width: 16px; height: 16px; }
@media (max-width: 960px) {
  .cl-fila.cl-head { display: none; }
  .cl-fila { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; position: relative; padding: 10px 40px 10px 54px; }
  .cl-nombre { flex: 1 1 100%; margin-left: -42px; }
  .cl-anio { display: none; }
  .cl-dato { font-size: .78rem; }
  .cl-dato::before { content: attr(data-label) " "; color: var(--faint); }
  .cl-num { text-align: left; }
  .cl-fila > .torneo-ir { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
}

/* Primeros pasos: guía de la liga recién creada (pestaña Torneos) */
.pasos { margin-bottom: 18px; border-color: var(--primary-line); background: linear-gradient(180deg, var(--primary-soft), transparent 70%), var(--surface); }
.pasos-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pasos-head h2 { margin: 0; }
.pasos-head p { margin: 4px 0 12px; }
.pasos-lista { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.paso { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid transparent; }
.paso.actual { background: var(--surface-2, rgba(255, 255, 255, .03)); border-color: var(--border); }
.paso-num { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; border: 1px solid var(--border-strong); color: var(--muted); }
.paso.actual .paso-num { border-color: var(--primary); color: var(--text); background: var(--primary-soft); }
.paso.hecho .paso-num { border-color: transparent; background: var(--ok-soft); color: var(--ok); }
.paso.hecho .paso-num .ico { width: 16px; height: 16px; }
.paso-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.paso.hecho .paso-txt b { color: var(--muted); font-weight: 600; text-decoration: line-through; text-decoration-color: var(--faint); }
.paso.omitido .paso-num { border-style: dashed; color: var(--faint); }
.paso.omitido .paso-txt b { color: var(--muted); font-weight: 600; }
.paso-botones { flex: none; display: flex; gap: 6px; }
@media (max-width: 640px) {
  .paso { flex-wrap: wrap; }
  .paso-botones { width: calc(100% - 40px); margin-left: 40px; }
  .paso-botones .btn { flex: 1; }
  .paso.omitido { flex-wrap: nowrap; }
  .paso.omitido .paso-botones { width: auto; margin-left: 0; }
}

/* Compartir el sitio */
.page-head > .btn-compartir { margin-left: auto; }
.page-head > .btn-compartir + .btn-ver-sitio { margin-left: -8px; }
.compartir-acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.compartir-acciones .btn { flex: 1; justify-content: center; }
.btn-whatsapp { background: #25d366; border-color: #25d366; color: #06210f; font-weight: 700; }
.btn-whatsapp:hover { background: #2be38a; border-color: #2be38a; color: #06210f; }

/* Nuevo torneo: formatos rápidos */
.modal-nuevo-torneo .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.btn-link { background: none; border: 0; padding: 0; color: #c9b0ff; font: inherit; font-weight: 700; cursor: pointer; box-shadow: none; min-height: 0; }
.btn-link:hover { text-decoration: underline; }
.formatos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.formato {
  position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 12px; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); transition: border-color .15s, background .15s;
}
.formato:hover { border-color: var(--border-strong); }
.formato input { position: absolute; opacity: 0; pointer-events: none; }
.formato:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary-line) inset; }
.formato:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.formato-dibujo { width: 30px; height: 30px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.formato:has(input:checked) .formato-dibujo { color: #c9b0ff; }
.formato b { display: block; font-size: .95rem; }
.formato small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; margin-top: 2px; }
.formato-opciones { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin: -2px 0 14px; padding: 12px; border-radius: var(--radius-sm); border: 1px dashed var(--border-strong); }
.formato-opciones .field { margin: 0; }
.formato-opciones select { width: auto; }
.formato-opciones .check { min-height: 40px; }
.formato-resumen { margin: 0 0 4px; padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(43, 227, 138, .1); border: 1px solid rgba(43, 227, 138, .35); font-size: .88rem; }
.formato-resumen.mal { background: var(--danger-soft); border-color: rgba(255, 110, 132, .35); }
.formato-resumen:empty { display: none; }
@media (max-width: 520px) { .formatos { grid-template-columns: 1fr; } }
.modal-nuevo-torneo .formato-resumen { margin-bottom: 14px; }
@media (min-width: 521px) { .checks.checks-2 { grid-template-columns: 1fr 1fr; } }

/* Torneo de eliminación directa: solo la llave (sin tabla, fechas ni zonas) */
body.es-eliminacion .solo-liga { display: none !important; }
body:not(.es-eliminacion) .solo-elim { display: none !important; }

/* Formato del torneo en la cabecera (se cambia desde ahí) */
.chip-formato {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; min-height: 0; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: inherit; font-size: .82rem; font-weight: 700;
  box-shadow: none; cursor: default;
}
button.chip-formato { cursor: pointer; }
button.chip-formato:hover { border-color: var(--primary); background: var(--primary-soft); }
.chip-formato-ico { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: #c9b0ff; }
.chip-formato-cambiar { color: #c9b0ff; font-weight: 600; padding-left: 6px; margin-left: 2px; border-left: 1px solid var(--border-strong); }
.formatos.formatos-1 { grid-template-columns: 1fr; }

/* ---------- Partido: menú "⋯" con las acciones secundarias ---------- */
.menu-mas { position: relative; }
.menu-mas > summary { list-style: none; cursor: pointer; }
.menu-mas > summary::-webkit-details-marker { display: none; }
.menu-mas > summary .ico { margin: 0; }
.menu-mas[open] > summary { background: var(--surface-2); color: var(--text); }
.menu-mas-lista { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 270px; padding: 6px; display: grid; gap: 2px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: 0 14px 34px rgba(0, 0, 0, .45); }
.menu-mas-lista > button, .menu-mas-lista > a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px;
  background: none; color: var(--text); font: inherit; font-size: .9rem; text-align: left; text-decoration: none; cursor: pointer; }
.menu-mas-lista > button:hover, .menu-mas-lista > a:hover { background: var(--surface-2); }
.menu-mas-lista .ico { width: 18px; height: 18px; color: var(--muted); flex: none; }
.menu-mas-lista .tag-completo { margin-left: auto; }
.meta-ico { display: inline-flex; align-items: center; gap: 5px; }
.meta-ico .ico, .planilla-chip .ico { width: 14px; height: 14px; }
.tag-completo:has(.ico) { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.tag-completo .ico { width: 11px; height: 11px; }
.jornada-head .btn .ico { width: 15px; height: 15px; }
@media (max-width: 640px) {
  .match .match-actions .menu-mas { margin-left: auto; }
  .match .match-actions .menu-mas > summary { min-height: 40px; min-width: 44px; }
  /* En el celular abre para arriba: abajo está la barra de pestañas */
  .menu-mas-lista { min-width: 260px; top: auto; bottom: calc(100% + 6px); }
}

/* ---------- Cliente: "Mi sitio" junta Diseño, Sponsors, Contacto, Cargadores y Ajustes en el celular ---------- */
.tab-misitio, [data-panel="misitio"] .section-title-sm { display: none; }
.misitio-lista { display: grid; gap: 10px; }
.misitio-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; color: var(--text); font: inherit; }
.misitio-item b { display: block; font-size: 1rem; }
.misitio-item small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.misitio-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: #c9b0ff; flex: none; }
.misitio-ico .ico { width: 22px; height: 22px; }
@media (max-width: 640px) {
  body.con-bottomnav .tab-agrupada { display: none; }
  body.con-bottomnav .tab-misitio { display: flex; }
  body.con-bottomnav .tab-misitio.en-grupo { color: #d6c4ff; }
  body.con-bottomnav .tab-misitio.en-grupo .ico { color: #b794ff; }
  body.con-bottomnav .tab-misitio.en-grupo::before { content: ""; position: absolute; top: -7px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--primary); }
  [data-panel="misitio"] .section-title-sm { display: block; font-size: 1.2rem; margin: 0 0 12px; }
}

/* ---------- Resultados: "Guardar fecha" (aparece con 2 o más partidos tocados) ---------- */
.match.con-error { border-color: rgba(255, 110, 132, .7); box-shadow: 0 0 0 3px rgba(255, 110, 132, .15); }
.guardar-fecha { position: sticky; bottom: calc(14px + var(--bottomnav-h)); z-index: 20; margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 16px; border-radius: 14px; background: var(--surface-3); border: 1px solid var(--primary-line); box-shadow: 0 12px 30px rgba(0, 0, 0, .45); }
.guardar-fecha > span { font-weight: 600; font-size: .9rem; }
.guardar-fecha .btn .ico { width: 17px; height: 17px; }
@media (max-width: 640px) { .guardar-fecha .btn { flex: none; min-height: 44px; } }

/* ---------- Página del delegado (/delegado/<código>): carga del plantel sin usuario ---------- */
.delegado { max-width: 720px; }
.delegado-logo { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; }
.brand-text-on { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.delegado-ejemplo { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 16px; border-radius: 12px;
  background: var(--primary-soft); border: 1px solid var(--primary-line); color: #d6c4ff; font-size: .9rem; }
.delegado-ejemplo .ico { flex: none; margin-top: 1px; }
.delegado-cab { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 4px 0 18px; }
.delegado-cab .crest { width: 52px; height: 52px; font-size: 1rem; }
.delegado-cab h1 { font-size: 1.45rem; margin: 2px 0 0; }
.delegado-cab .badge { margin-left: auto; }
.delegado-form h2, .delegado-lista h2 { font-size: 1.05rem; margin: 0 0 12px; }
.delegado-campos { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 10px; }
.delegado-campos .field { margin: 0; }
.delegado-botones { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.delegado-cerrada { color: var(--warn); }
.delegado-lista { margin-top: 14px; }
.delegado-lista-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.delegado-jugadores { list-style: none; margin: 0; padding: 0; }
.delegado-jugadores li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.delegado-jugadores li.editando { background: var(--primary-soft); margin: 0 -10px; padding: 10px; border-radius: 10px; }
.delegado-num { min-width: 28px; text-align: center; color: var(--muted); }
.delegado-nombre { flex: 1; min-width: 0; font-weight: 600; }
.delegado-nombre small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; margin-top: 1px; }
.delegado-acciones { display: flex; gap: 2px; }
.delegado-acciones .btn-borrar { color: var(--danger); }
.delegado-pie { text-align: center; margin: 18px 0 30px; }
@media (max-width: 640px) {
  .delegado-campos { grid-template-columns: 1fr 1fr; }
  .delegado-campos .field:first-child { grid-column: 1 / -1; }
  .delegado-botones .btn { flex: 1; min-height: 46px; }
  .delegado-cab .badge { margin-left: 0; }
  .delegado-acciones { flex-direction: column; align-items: flex-end; }
}

/* Panel: inscripción online de planteles (pestaña Equipos) */
.inscripcion-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.inscripcion-card .inscripcion-txt { flex: 1 1 280px; }
.inscripcion-card .inscripcion-txt > b { display: block; margin-bottom: 2px; }
.badge-delegado { font-size: .66rem; padding: 2px 7px; color: #c9b0ff; background: var(--primary-soft); border: 1px solid var(--primary-line); border-radius: 999px; font-weight: 700; margin-left: 6px; vertical-align: 1px; }
.link-delegado { display: flex; gap: 8px; }
.link-delegado input { flex: 1; min-width: 0; font-family: ui-monospace, monospace; font-size: .85rem; }

/* ==========================================================================
   Menú lateral
   En la compu (≥ 1000 px) queda fijo a la izquierda y reemplaza a la barra de arriba y a las pestañas de la liga.
   En tablet y celular se abre con ☰ desde la barra de arriba (en el celular siguen las pestañas abajo).
   ========================================================================== */
:root { --sidebar-w: 256px; }
.menu-btn { display: grid; place-items: center; width: 42px; height: 42px; margin-left: -8px; border: 0; border-radius: 10px;
  background: none; color: var(--text); cursor: pointer; flex: none; }
.menu-btn:hover { background: var(--surface-2); }
.menu-btn .ico { width: 22px; height: 22px; }
.topbar { justify-content: flex-start; }
.topbar .nav { margin-left: auto; }

.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 60; width: var(--sidebar-w); display: flex; flex-direction: column;
  background: #100f16; border-right: 1px solid var(--border); overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(-100%); transition: transform .22s ease; visibility: hidden;
}
body.menu-abierto .sidebar { transform: none; visibility: visible; box-shadow: 20px 0 50px rgba(0, 0, 0, .5); }
.sb-fondo { position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .55); opacity: 0; pointer-events: none; transition: opacity .2s; }
body.menu-abierto .sb-fondo { opacity: 1; pointer-events: auto; }
.sb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 14px 12px 18px; }
.sb-head .brand-text { display: grid; }
.sb-cerrar { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.sb-nav { display: grid; gap: 2px; padding: 4px 10px 10px; }
.sb-grupo { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 14px 10px 6px; }
.sb-item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--muted);
  font-weight: 600; font-size: .92rem; min-height: 40px; position: relative; }
.sb-item:hover { background: var(--surface-2); color: var(--text); }
.sb-item.active { background: var(--primary-soft); color: #e4d8ff; }
.sb-item.active .ico { color: #b794ff; }
.sb-item.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.sb-sub { display: grid; gap: 1px; margin: 0 0 4px 21px; padding-left: 12px; border-left: 1px solid var(--border); }
.sb-sub a { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: .85rem;
  font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-sub a:hover { color: var(--text); background: var(--surface-2); }
.sb-sub a.active { color: #e4d8ff; background: var(--surface-3); }
.sb-sub .sb-nuevo { color: #b794ff; }
.sb-sub .ico { width: 14px; height: 14px; }
.sb-liga { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; padding: 10px; border-radius: 12px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); }
.sb-liga b { display: block; font-size: .92rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sb-liga small { color: var(--muted); font-size: .74rem; font-weight: 600; }
.sb-liga-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; overflow: hidden;
  background: var(--primary-soft); border: 1px solid var(--primary-line); color: #d6c4ff; font-weight: 800; font-size: .8rem; }
.sb-liga-ico img { width: 100%; height: 100%; object-fit: contain; }
.sb-pie { margin-top: auto; padding: 10px; display: grid; gap: 4px; border-top: 1px solid var(--border); }
.sb-tutorial { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; text-decoration: none; margin-bottom: 4px;
  background: linear-gradient(135deg, rgba(140, 82, 255, .22), rgba(43, 227, 138, .10)); border: 1px solid var(--primary-line); }
.sb-tutorial .ico { width: 30px; height: 30px; padding: 8px; border-radius: 50%; background: var(--primary); color: #fff; fill: #fff; stroke-width: 0; flex: none; }
.sb-tutorial b { display: block; font-size: .86rem; line-height: 1.2; }
.sb-tutorial small { color: var(--muted); font-size: .74rem; }
.sb-pie .sb-item.js-soporte .ico { color: #2be38a; }
.sb-user { display: flex; align-items: center; gap: 4px; }
.sb-cuenta { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; padding: 8px; border-radius: 10px; text-decoration: none; }
.sb-cuenta:hover, .sb-cuenta.active { background: var(--surface-2); }
.sb-email { display: grid; min-width: 0; font-size: .8rem; line-height: 1.25; }
.sb-email, .sb-email small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-email small { color: var(--faint); font-weight: 600; font-size: .7rem; }
.sb-salir { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--muted); }
.sb-salir:hover { background: var(--surface-2); color: var(--text); }

@media (min-width: 1000px) {
  body.con-sidebar { padding-left: var(--sidebar-w); }
  body.con-sidebar .sidebar { transform: none; visibility: visible; transition: none; }
  body.con-sidebar .topbar, body.con-sidebar .sb-fondo, .sb-cerrar { display: none; }
  /* Las pestañas de la liga ya están en el menú */
  body.con-sidebar .tabs[data-sidebar] { display: none; }
  body.con-sidebar .aviso-mail { margin: 16px 24px 0; max-width: none; }
}
@media (max-width: 640px) {
  .topbar .brand-text { display: grid; }
  .topbar .brand-text small { display: none; }
  .topbar .brand-mark { width: 30px; height: 30px; font-size: 15px; }
  .sidebar { width: min(86vw, 300px); }
  .sb-item { min-height: 46px; font-size: .98rem; }
  .sb-sub a { padding: 9px 10px; font-size: .92rem; }
}
@media (prefers-reduced-motion: reduce) { .sidebar, .sb-fondo { transition: none; } }
@media print { .sidebar, .sb-fondo { display: none !important; } body.con-sidebar { padding-left: 0; } }

/* ---------- Tutorial "Creá tu primer torneo" (js/tutorial.js) ---------- */
.modal.modal-tutorial { max-width: 560px; }
.modal-tutorial h2 { font-size: 1.35rem; margin-bottom: 6px; }
.tut-sub { margin: 0 0 16px; }
.tut-progreso { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.tut-progreso i { width: 34px; height: 5px; border-radius: 5px; background: var(--surface-3); }
.tut-progreso i.hecho { background: var(--primary-dim); }
.tut-progreso i.actual { background: var(--primary); box-shadow: 0 0 10px rgba(140, 82, 255, .6); }
.tut-progreso span { margin-left: 6px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.tut-hola { text-align: center; padding: 8px 4px 0; }
.tut-hola .muted { max-width: 420px; margin: 8px auto; }
.tut-hola-ico { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; margin-bottom: 14px; color: #fff;
  background: linear-gradient(135deg, #a274ff, #6b34f0); box-shadow: 0 12px 30px -10px rgba(140, 82, 255, .8); }
.tut-hola-ico.ok { background: linear-gradient(135deg, #2be38a, #14a866); box-shadow: 0 12px 30px -10px rgba(43, 227, 138, .7); }
.tut-hola-ico .ico { width: 32px; height: 32px; }
.tut-resumen { list-style: none; padding: 0; margin: 18px auto 4px; display: grid; gap: 8px; max-width: 380px; text-align: left; }
.tut-resumen li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.tut-resumen li > span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 800; font-size: .85rem;
  background: var(--primary-soft); color: #d6c4ff; border: 1px solid var(--primary-line); }
.tut-resumen b { display: block; font-size: .95rem; }
.tut-resumen small { color: var(--muted); font-size: .8rem; }
.tut-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 8px; }
.tut-chips button.chip { cursor: pointer; border: 1px solid var(--border); font: 600 .8rem var(--font); padding: 5px 11px; color: var(--text); }
.tut-chips button.chip:hover { border-color: var(--primary-line); background: var(--primary-soft); }
.chip.chip-eq { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; color: var(--text); font-size: .8rem; }
.chip-eq .crest { width: 18px; height: 18px; font-size: .5rem; }
.tut-equipos .tut-cuenta { font-size: .88rem; margin: -4px 0 8px; color: var(--ok); }
.tut-equipos .tut-cuenta.mal { color: var(--warn); }
.tut-ayuda { margin: 4px 0 0; }
.modal-tutorial textarea { width: 100%; resize: vertical; min-height: 90px; font-family: inherit; }
.modal-tutorial .formatos { grid-template-columns: 1fr; margin-bottom: 12px; }
.modal-tutorial .formato-opciones { margin-bottom: 10px; }
.tut-acciones .btn .ico { width: 16px; height: 16px; }
.tut-acciones .btn-primary { min-width: 150px; }
.tut-creando { text-align: center; padding: 40px 0 48px; }
.spinner { display: inline-block; width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--surface-3); border-top-color: var(--primary);
  animation: girar .8s linear infinite; margin-bottom: 14px; }
@keyframes girar { to { transform: rotate(360deg); } }
@media (max-width: 640px) {
  .modal.modal-tutorial { max-height: 94dvh; }
  .modal-tutorial h2 { font-size: 1.2rem; }
}

/* ---------- Recorrido guiado (tourGuiado en app.js) ---------- */
.tour-capa { position: fixed; inset: 0; z-index: 90; }
.tour-foco { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(5, 5, 10, .72), 0 0 0 3px var(--primary);
  transition: all .25s ease; pointer-events: none; }
.tour-globo { position: fixed; width: min(330px, calc(100vw - 24px)); padding: 14px 16px 12px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--primary-line); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .8); }
.tour-globo > b { display: block; font-family: var(--font-head); font-size: 1.02rem; margin: 2px 0 4px; }
.tour-globo p { margin: 0 0 12px; color: var(--muted); font-size: .9rem; }
.tour-num { font-size: .72rem; font-weight: 800; color: #b794ff; letter-spacing: .04em; text-transform: uppercase; }
.tour-botones { display: flex; justify-content: flex-end; gap: 8px; }
@media (prefers-reduced-motion: reduce) { .tour-foco { transition: none; } .spinner { animation-duration: 2s; } }

/* ---------- Clientes (superusuario): embudo de las ligas registradas solas ---------- */
.embudo { margin: 0 0 16px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.embudo:empty { display: none; }
.embudo-tit { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.embudo-pasos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.embudo-paso { position: relative; display: grid; padding: 10px 12px 14px; border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.embudo-paso b { font-family: var(--font-head); font-size: 1.4rem; line-height: 1.1; }
.embudo-paso span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.embudo-paso small { position: absolute; top: 10px; right: 12px; font-weight: 800; color: #b794ff; font-size: .78rem; }
.embudo-paso i { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--primary); }
@media (max-width: 760px) { .embudo-pasos { grid-template-columns: 1fr 1fr; } }
