/*
 * Panel Cxpro · diseño de la plantilla (tokens/base/components en assets/tpl/)
 * Aquí: piezas propias del panel, todas con las variables del tema para que funcionen
 * en claro, oscuro y con cualquier color.
 */

/* ───── Alias: los nombres que usaba el panel apuntan a los del tema ───── */
:root {
    --card: var(--surface);
    --card2: var(--surface-2);
    --elev: var(--icon-idle);
    --line: var(--border);
    --ok: var(--good);
    --brand: var(--accent);
    --dim: var(--muted);
}
a { text-decoration: none; }
p a, small a, .flash a, .muted a { color: var(--accent); }
input, select, textarea { max-width: 100%; }
td { overflow-wrap: break-word; }
.small { font-size: 12.5px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
i[data-icon] { font-style: normal; display: inline-flex; }

/* ───── Barra superior: avisos y tema (de plantilla.css) ───── */
.alerts-pop, .theme-pop {
    position: absolute; right: 0; top: calc(100% + 10px); z-index: 40;
    width: 340px; max-width: calc(100vw - 24px); padding: 14px; border-radius: 16px;
    border: 1px solid var(--border); background: var(--surface);
    box-shadow: 0 20px 50px -14px rgb(0 0 0 / .55);
    display: flex; flex-direction: column; gap: 10px;
    animation: pop-in .15s ease-out;
}
.theme-pop { width: 330px; gap: 12px; }
.alerts-pop[hidden], .theme-pop[hidden] { display: none; }
.alerts-pop > strong, .theme-pop > strong { font-size: 13px; }
.al { display: flex; gap: 10px; padding: 10px 6px 4px; border-top: 1px solid var(--border); color: var(--text); border-radius: 8px; }
.al:hover { background: var(--surface-2); }
.al i { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--info); }
.al.warn i { background: var(--warn); } .al.bad i { background: var(--bad); }
.al b { font-size: 13.5px; }
.al p { margin: 2px 0 6px; font-size: 12.5px; color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12); }
.swatches button.on { border-color: var(--text); }
.seg-tabs.two { grid-template-columns: 1fr 1fr; }
#theme-ico { display: inline-flex; }
.square svg, .burger svg { width: 19px; height: 19px; }
.burger svg { width: 24px; height: 24px; stroke-width: 2.3; }
.more-btn svg { stroke-width: 2.4; }
.logo.img img { background: transparent; }
/* el logo es blanco: en el tema claro va sobre una placa oscura */
[data-theme='light'] .logo.img { background: #141416; padding: 4px 10px; border-radius: 10px; }
[data-theme='light'] .logo.img img { height: 28px; }
[data-theme='light'] .login-brand img { background: #141416; padding: 8px 14px; border-radius: 14px; box-sizing: content-box; }
@media (max-width: 640px) { .alerts-pop, .theme-pop { position: fixed; top: calc(var(--topbar-h) + 8px); right: 12px; left: 12px; width: auto; max-width: none; } }

/* ───── Menú lateral ───── */
.nav-btn svg { width: 17px; height: 17px; }
.chev svg { width: 14px; height: 14px; stroke-width: 2.4; }
.nav-btn[aria-expanded='true'] .chev { transform: rotate(90deg); }
.nav-btn .count, .sub-btn .count { margin-left: 4px; background: var(--bad); color: #fff; }
.nav-btn[aria-expanded='true'] .g-count { display: none; }
.logout { margin-top: auto; }
.sidebar .logout { flex: none; }
/* menú contraído en PC (se recuerda en este navegador) */
@media (min-width: 901px) {
    html.menu-mini .sidebar { flex-basis: 76px; width: 76px; }
    html.menu-mini .sidebar .lbl, html.menu-mini .sidebar .subwrap, html.menu-mini .sidebar .chev { display: none; }
    html.menu-mini .sidebar .nav-btn { justify-content: center; }
    html.menu-mini .sidebar .nav-btn { position: relative; }
    /* con el menú chico, un punto rojo si el grupo tiene avisos */
    html.menu-mini .sidebar .nav-btn:has(.g-count)::after { content: ''; position: absolute; top: 6px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
}
@media (max-width: 900px) {
    /* Menú abierto en el celular: la página de atrás no se mueve; el menú tiene su propio scroll */
    html.menu-open { overflow: hidden; overscroll-behavior: none; }
    html.menu-open .sidebar { touch-action: pan-y; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
    .backdrop.toggled { touch-action: none; }
}
/* Barra fina arriba mientras carga una sección (navegación sin recargar) */
#cx-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 9999; background: var(--accent); box-shadow: 0 0 8px var(--accent); opacity: 0; pointer-events: none; }
#cx-bar.go { opacity: 1; width: 75%; transition: width 6s cubic-bezier(.08,.6,.2,1), opacity .1s; }
#cx-bar.done { opacity: 0; width: 100%; transition: width .2s ease, opacity .3s ease .15s; }
.main .page { animation: cx-in .18s ease-out; }
@keyframes cx-in { from { opacity: .4; } }

/* ───── Página ───── */
.main { width: 100%; }
.page > .page-head .actions .btn { gap: 8px; }
.page > .page-head .actions .btn svg { width: 17px; height: 17px; }
/* la separación entre bloques la da .page (gap); se ignoran los márgenes sueltos */
.page > .card, .page > .grid, .page > form, .page > .flash, .page > .hostbar { margin-top: 0 !important; margin-bottom: 0 !important; }
.page > form { display: flex; flex-direction: column; gap: 18px; }
.card + .card, .card + .grid, .grid + .card, .grid + .grid, form > .card + .card { margin-top: 18px; }
.page > .card + .card, .page > .grid + .card, .page > .card + .grid, .page > .grid + .grid, .page > form > .card + .card { margin-top: 0; }

/* ───── Rejillas y tarjetas ───── */
.grid { display: grid; gap: 16px; }
.grid > *, .card { min-width: 0; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g2 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.card h2 { font-size: 15.5px; margin: 0 0 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card h2 > svg { width: 18px; height: 18px; color: var(--accent); }
.card h2 small { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 13px; font-family: var(--font); }
.card h2 small a { color: var(--accent); }
.card > p.muted.small:first-of-type { line-height: 1.5; }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.stat b { font-family: var(--font-head); font-size: 28px; font-weight: 600; letter-spacing: -.01em; }
.stat span { color: var(--muted); font-size: 13px; }
.ic.v { background: var(--accent-soft); color: var(--accent); }
.ic.g { background: var(--good-soft); color: var(--good); }
.ic.o { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.ic.b { background: color-mix(in srgb, var(--info) 15%, transparent); color: var(--info); }
.mono { font-family: var(--font-mono); font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; word-break: break-all; display: inline-block; }
td.mono, .xt td.mono { background: none; border: 0; padding: 12px 14px; display: table-cell; }
.list { display: flex; flex-direction: column; }
.list .it { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list .it:last-child { border-bottom: 0; }
.list .it .dot, .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin: 7px 0 0; flex: none; display: inline-block; }
.empty { text-align: center; color: var(--muted); padding: 36px 10px; }

/* ───── Etiquetas (suaves, con el color de cada estado) ───── */
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 6px; background: var(--surface-2); color: var(--muted); white-space: nowrap; letter-spacing: .02em; border: 1px solid var(--border); }
.tag.ok { background: var(--good-soft); color: var(--good); border-color: color-mix(in srgb, var(--good) 30%, transparent); }
.tag.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.tag.bad { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.tag.info { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.tag.v { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.tag svg { width: 11px; height: 11px; vertical-align: -1px; fill: currentColor; stroke: none; }

/* ───── Botones: .btn = principal (color del tema) · .ghost = normal · .danger = rojo ───── */
.btn { gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--radius); background: var(--accent); border: 1px solid var(--accent); color: var(--on-accent); transition: filter .15s, border-color .15s, background .15s; }
.btn:hover { filter: brightness(1.07); border-color: var(--accent); }
.btn svg { width: 17px; height: 17px; }
.btn.ghost { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.btn.ghost:hover { filter: none; border-color: var(--accent); color: var(--accent); }
.btn.danger { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 40%, transparent); color: var(--bad); }
.btn.danger:hover { background: var(--bad); color: #fff; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.sm svg { width: 16px; height: 16px; }
.btn .muted { color: inherit; opacity: .7; }
/* en el banner todos los botones con el fondo de la tarjeta */
.page > .page-head .actions .btn { background: var(--surface); border-color: transparent; color: var(--text); }
.acts { display: flex; gap: 6px; justify-content: flex-end; }
.acts form { margin: 0; }
/* botón de ícono (lo arma app.js en las tablas, también se puede escribir a mano) */
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn { text-decoration: none; }

/* ───── Formularios ───── */
label.f { display: block; margin-bottom: 16px; }
label.f > span, .f .lbl, .imgf .lbl { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
label.f > small, label.f small.muted { display: block; margin-top: 5px; font-size: 12px; }
input[type=text], input[type=number], input[type=password], input[type=url], input[type=email], input[type=search], input[type=date], input[type=datetime-local], input[type=time], select, textarea {
    width: 100%; min-height: 42px; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 0 12px; font: inherit; font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
select { padding-right: 34px; appearance: none; -webkit-appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b8f98' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; }
select option { background: var(--surface); color: var(--text); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:not([type=checkbox]):not([type=radio]):hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=color] { width: 56px; height: 42px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); padding: 4px; cursor: pointer; }
input[type=datetime-local], input[type=date], input[type=time] { color-scheme: inherit; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }

/* ───── Configuración: pestañas, opciones e interruptores ───── */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; padding: 5px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.tabs button, .tabs .tabl { background: transparent; color: var(--muted); border: 0; border-radius: 9px; padding: 9px 14px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
.tabs button:hover, .tabs .tabl:hover { color: var(--text); background: var(--surface-2); }
.tabs button.on, .tabs .tabl.on { background: var(--accent); color: var(--on-accent); }
.sect { display: none; } .sect.on { display: block; }
.opt { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.opt:last-child { border-bottom: 0; }
.opt .lbl { flex: 1; min-width: 0; } .opt .lbl b { display: block; font-weight: 600; font-size: 14px; } .opt .lbl small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.opt .ctl { width: 300px; max-width: 50%; display: flex; justify-content: flex-end; }
/* interruptor (switch) */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; vertical-align: middle; }
.switch input { opacity: 0 !important; width: 0 !important; height: 0 !important; position: absolute; border: 0 !important; box-shadow: none !important; margin: 0; padding: 0; }
.switch input::before { display: none; }
.switch input:disabled + span { opacity: .5; cursor: not-allowed; }
input[type=file] { font: inherit; font-size: 13px; color: var(--muted); max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; font-size: 13px; margin-right: 10px; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; }
input[type=file]::file-selector-button:hover { border-color: var(--accent); color: var(--accent); }
.switch span { position: absolute; inset: 0; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); border-radius: 30px; transition: .2s; cursor: pointer; }
.switch span:before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: var(--muted); border-radius: 50%; transition: .2s cubic-bezier(.3, 1.3, .5, 1); box-shadow: 0 1px 3px rgb(0 0 0 / .3); }
.switch input:checked + span { background: var(--accent); box-shadow: none; }
.switch input:checked + span:before { transform: translateX(20px); background: #fff; }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.savebar { position: sticky; bottom: 12px; z-index: 5; margin-top: 18px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; box-shadow: 0 12px 30px -16px rgb(0 0 0 / .6); }
.savebar label { flex: 1; min-width: 240px; color: var(--muted); font-size: 13.5px; display: flex; gap: 10px; align-items: center; }

/* ───── Avisos dentro de la página ───── */
.flash { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; display: flex; gap: 10px; align-items: center; font-size: 13.5px; font-weight: 500; }
.flash svg { width: 18px; height: 18px; flex: none; }
.flash.ok { background: var(--good-soft); color: var(--good); border: 1px solid color-mix(in srgb, var(--good) 30%, transparent); }
.flash.bad { background: var(--bad-soft); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); }
.flash.warn { background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.flash.info { background: color-mix(in srgb, var(--info) 12%, transparent); color: var(--info); border: 1px solid color-mix(in srgb, var(--info) 30%, transparent); }

/* ───── Vista previa como en el teléfono (notificaciones, anuncios, eventos) ─────
   Imita la app: siempre oscura, en cualquier tema del panel */
.phone { background: #000; border-radius: 28px; padding: 18px 14px; border: 1px solid var(--border); color: #f5f5f7; }
.pv { background: #1c1c1e; border-radius: 18px; overflow: hidden; }
.pv img { width: 100%; height: 150px; object-fit: cover; display: block; background: #2c2c2e; }
.pv .tx { padding: 14px 16px; }
.pv .tx b { display: block; font-size: 16px; margin-bottom: 4px; }
.pv .tx p { margin: 0; color: #d1d1d6; font-size: 14px; white-space: pre-line; }
.pv .tx .k { margin-bottom: 8px; }
.pv .bt, .adbox .bt { margin-top: 12px; background: #fff; color: #000; border-radius: 12px; text-align: center; padding: 10px; font-weight: 600; font-size: 14px; }
.bt2 { margin-top: 8px; background: #2c2c2e; color: #fff; border-radius: 12px; text-align: center; padding: 10px; font-weight: 600; font-size: 14px; }

/* ───── Lista en 2 líneas (se usa en algunas tarjetas) ───── */
.only-mob { display: none; }
.li-row { display: flex; gap: 10px; align-items: center; padding: 12px 0 4px; }
.li-main { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.li-main .l1, .li-main .l2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-main .l2 { margin-top: 2px; }
.li-acts { display: flex; gap: 6px; flex-wrap: wrap; padding: 6px 0 12px; border-bottom: 1px solid var(--border); }
.li-acts form { display: inline; margin: 0; }
.only-mob > .li-row:last-child { border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.bl-row { border-bottom: 1px solid var(--border); padding: 10px 0; }
.bl-row:last-child { border-bottom: 0; }

/* ───── Tablas: las arma app.js con el estilo XUI (buscador, páginas y tarjetas en el celular) ───── */
.card .xt { margin: 4px -20px -18px; border: 0; border-top: 1px solid var(--border); border-radius: 0 0 var(--radius-lg) var(--radius-lg); background: transparent; }
.card .xt:not(:last-child) { margin-bottom: 14px; border-bottom: 1px solid var(--border); border-radius: 0; }
.card > .xt:first-child { margin-top: -18px; border-top: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.xt .xt-toolbar { padding: 12px 16px; }
.xt .xt-search input { min-height: 38px; padding-left: 34px; }
.grid > .card, .grid > div { margin-top: 0; }
.xt .xt-footer:empty { display: none; }
.xt td { white-space: normal; }
.xt td.nw, .xt td.xt-acts { white-space: nowrap; }
.xt th { white-space: nowrap; }
.xt th:first-child, .xt td:first-child { padding-left: 20px; }
.xt th:last-child, .xt td:last-child { padding-right: 20px; }
.xt td.xt-acts form { display: inline-flex; margin: 0; }
.xt .xt-actions { align-items: center; flex-wrap: nowrap; }
.xt tr.xt-hide { display: none !important; }
.xt .xt-v-inline { display: contents; }
tr.off td { opacity: .5; }
tr.off td.xt-acts { opacity: 1; }
/* tablas sin armar (por si el JS no carga) */
table { width: 100%; border-collapse: collapse; }
@media (min-width: 641px) {
    .xt td { text-align: left; }
    .xt th { text-align: left; }
    .xt th.xt-acts-h { text-align: right; }
    .xt td.xt-acts { text-align: right; }
    .xt td.xt-acts .xt-actions { justify-content: flex-end; }
}
@media (max-width: 640px) {
    .card .xt { margin-left: -16px; margin-right: -16px; }
    .xt.cards .hide-m { display: flex !important; }
    .xt.cards td:empty, .xt.cards td.xt-blank { display: none !important; }
    .xt.cards.list td .xt-v > br { display: none; }
    .xt.cards.list td .xt-v > br + * { margin-left: 4px; }
}

/* ───── Campos de imagen, buscador del catálogo, selección ───── */
.sticky { position: sticky; top: calc(var(--topbar-h) + 16px); align-self: start; }
.imgf { margin-bottom: 16px; }
.imgrow { display: flex; gap: 12px; align-items: flex-start; }
.imgrow .thumb { width: 64px; height: 64px; border-radius: 12px; background: var(--surface-2) center/cover no-repeat; border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted); flex: none; }
.imgrow .imgin { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.imgrow .upl { cursor: pointer; }
.mini { width: 46px; height: 46px; border-radius: 10px; background: var(--surface-2) center/cover no-repeat; }
.mini.wide { width: 64px; height: 36px; border-radius: 8px; }
.poster { width: 38px; height: 56px; border-radius: 8px; background: var(--surface-2) center/cover no-repeat; }
.searchbox { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 12px; transition: border-color .15s, box-shadow .15s; }
.searchbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.searchbox input { background: transparent; border: 0 !important; padding-left: 0; box-shadow: none !important; }
.searchbox svg { color: var(--muted); width: 17px; height: 17px; }
.results { display: flex; flex-direction: column; gap: 4px; max-height: 280px; overflow-y: auto; margin: 6px 0 12px; border: 1px solid var(--border); border-radius: var(--radius); padding: 4px; background: var(--surface); }
.results:empty { display: none; }
.results .r { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; cursor: pointer; }
.results .r:hover { background: var(--surface-2); }
.results .r .ri { width: 34px; height: 48px; border-radius: 6px; background: var(--surface-2) center/cover no-repeat; flex: none; }
.results .r .ri.ch { width: 48px; height: 34px; background-size: contain; }
.results .r small { color: var(--muted); display: block; }
.results .msg { color: var(--muted); font-size: 13px; padding: 8px; }
.picked { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 12px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px; margin-bottom: 14px; gap: 2px; }
.seg label { cursor: pointer; } .seg input { display: none; }
.seg span { display: block; padding: 7px 16px; border-radius: 7px; color: var(--muted); font-weight: 600; font-size: 13.5px; }
.seg input:checked + span { background: var(--accent); color: var(--on-accent); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks.col { flex-direction: column; }
.checks label { cursor: pointer; } .checks input { display: none; }
.checks span { display: inline-block; padding: 7px 13px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 13.5px; font-weight: 500; border: 1px solid var(--border); transition: .15s; }
.checks span:hover { border-color: var(--muted); }
.checks input:checked + span { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 600; }
details.pop { position: relative; }
details.pop summary { list-style: none; cursor: pointer; }
details.pop summary::-webkit-details-marker { display: none; }
details.pop .popbox { position: absolute; z-index: 5; top: 100%; left: 0; margin-top: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 16px 40px rgb(0 0 0 / .35); }
.chk { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 16px; cursor: pointer; }
.chk input { margin-top: 1px; }

/* ───── Anuncios ───── */
.adpv { padding: 26px 18px; min-height: 360px; display: grid; place-items: center; border-radius: 18px; background: linear-gradient(#000c, #000c), repeating-linear-gradient(45deg, #222 0 12px, #1a1a1a 12px 24px); }
.adbox { position: relative; width: 100%; max-width: 280px; }
.adbox img { width: 100%; border-radius: 16px; display: block; }
.adbox .empty { border: 2px dashed #3a3a3e; border-radius: 16px; padding: 70px 10px; color: #8e8e93; }
.adbox .adx { position: absolute; top: -10px; right: -10px; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.adgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.adcard { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.adcard.off { opacity: .55; }
.adcard .adimg { aspect-ratio: 4/3; background: var(--icon-idle) center/cover no-repeat; }
.adcard .adbody { padding: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.adcard .adbody > div:first-child { width: 100%; }

/* ───── Eventos ───── */
.evpv { background: #1c1c1e; color: #f5f5f7; border-radius: 18px; overflow: hidden; }
.evpv .evimg { aspect-ratio: 16/9; background: #2c2c2e center/cover no-repeat; }
.evpv .evbody { padding: 14px 16px; }
.evpv .teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 10px 0; }
.evpv .team { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.evpv .team .logo { width: 46px; height: 46px; border-radius: 50%; background: #2c2c2e center/contain no-repeat; display: block; }
.evpv .vs { text-align: center; } .evpv .vs span { display: block; font-size: 20px; font-weight: 700; } .evpv .vs small { color: #8e8e93; }
.evpv .evch { display: flex; align-items: center; gap: 8px; color: #8e8e93; font-size: 13.5px; border-top: 1px solid #ffffff14; padding-top: 10px; }
.evpv .evch svg { width: 16px; height: 16px; }

/* ───── Video en notificaciones ───── */
.pvv { position: relative; aspect-ratio: 16 / 9; background: #000 center / cover no-repeat; }
.pvv video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pvv .pvplay { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; }
.pvv .pvplay svg { width: 18px; height: 18px; fill: #fff; stroke: none; margin-left: 2px; }
.pvv .pvyt { position: absolute; left: 8px; top: 8px; background: #ff0033; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.vthumb svg { width: 20px; height: 20px; }
.vthumb.on { background: var(--accent); color: var(--on-accent); }
.vthumb.on svg { fill: currentColor; stroke: none; }

/* ───── Actualizaciones ───── */
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 26px 16px; border: 1.5px dashed var(--border); border-radius: 16px; cursor: pointer; margin-bottom: 14px; transition: .15s; }
.drop:hover, .drop.hover { border-color: var(--accent); background: var(--accent-soft); }
.drop.on { border-style: solid; border-color: var(--good); background: var(--good-soft); }
.drop .dic svg { width: 34px; height: 34px; stroke: var(--accent); }
.drop.on .dic svg { stroke: var(--good); }
.prog { margin-bottom: 14px; }
.prog .bar { height: 8px; border-radius: 6px; background: var(--surface-2); overflow: hidden; margin-bottom: 6px; }
.prog .bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 6px; transition: width .2s; }
.vcur { padding: 12px 0; border-bottom: 1px solid var(--border); }
.vcur:last-of-type { border-bottom: 0; }
.vbig { font-family: var(--font-head); font-size: 22px; font-weight: 600; margin: 2px 0; }
.vuse { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--border); }

/* ───── Servidores: selector de servidor ───── */
.hostbar { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; margin-bottom: 16px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.hostbar > span { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; }
.hostbar svg { width: 15px; height: 15px; }
.hostbar .hb-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; }
.hostbar .hb-ic svg { width: 20px; height: 20px; stroke: var(--accent); }
.hostbar .hb-tx { flex: 1; min-width: 0; }
.hostbar .hb-tx small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.hostbar .btn { flex: none; }
.hb-sel { position: relative; display: inline-flex; align-items: center; max-width: 100%; }
.hb-sel select { appearance: none; -webkit-appearance: none; background: transparent; border: 0; min-height: 0; color: var(--text); font: inherit; font-size: 16px; font-weight: 600; padding: 2px 26px 2px 0; cursor: pointer; max-width: 100%; text-overflow: ellipsis; box-shadow: none !important; background-image: none; }
.hb-sel svg { position: absolute; right: 2px; width: 16px; height: 16px; pointer-events: none; }
.hostpill { padding: 7px 14px; border-radius: 999px; background: var(--surface-2); font-size: 13.5px; font-weight: 500; transition: .15s; }
.hostpill small { opacity: .6; margin-left: 4px; }
.hostpill.on { background: var(--accent); color: var(--on-accent); }
.hostpill.off { opacity: .5; }
.tag.hosttag { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; }
.tag.hosttag svg { width: 11px; height: 11px; fill: none; stroke: currentColor; }
td .small svg { width: 13px; height: 13px; vertical-align: -2px; }
@media (max-width: 600px) { .hostbar .btn { display: none; } }
/* vista previa del inicio de sesión de la app (siempre oscura, como la app) */
.loginpv { max-width: 260px; margin: 0 auto; color: #f5f5f7; }
.loginpv .lp-in, .loginpv .lp-sel { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; border-radius: 12px; background: #141415; border: 1px solid #ffffff1a; color: #8e8e93; font-size: 13px; margin-bottom: 9px; }
.loginpv .lp-sel { color: #fff; }
.loginpv .lp-sel span { flex: 1; }
.loginpv svg { width: 15px; height: 15px; }
.loginpv .lp-bt { height: 42px; border-radius: 12px; background: #fff; color: #000; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13.5px; margin-top: 4px; }

/* ───── Errores de la app ───── */
details.crash { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; background: var(--surface-2); }
details.crash summary { cursor: pointer; list-style: none; }
details.crash pre { white-space: pre-wrap; word-break: break-word; font-family: var(--font-mono); font-size: 11.5px; color: var(--bad); background: var(--bg); border: 1px solid var(--border); padding: 12px; border-radius: 10px; margin: 10px 0 0; max-height: 420px; overflow: auto; }
.crash-first { color: var(--bad); margin-top: 2px; }

/* ───── Carrusel del inicio ───── */
.hero-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-mode { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); cursor: pointer; position: relative; transition: border-color .15s; }
.hero-mode input { position: absolute; opacity: 0; pointer-events: none; }
.hero-mode.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: var(--accent-soft); }
.hero-mode:hover { border-color: var(--muted); }
.hero-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.hero-item { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.hero-item.off { opacity: .5; }
.hero-thumb { aspect-ratio: 9 / 10; background: var(--icon-idle) center/cover no-repeat; }
.hero-meta { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.hero-acts { display: flex; gap: 4px; flex-wrap: wrap; }
.hero-acts form { margin: 0; }
.hero-acts-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.hero-acts-pick label { display: flex; flex-direction: column; gap: 2px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); cursor: pointer; font-size: 13.5px; }
.hero-acts-pick label input { display: none; }
.hero-acts-pick label small { color: var(--muted); font-size: 11.5px; }
.hero-acts-pick label.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: var(--accent-soft); }

/* ───── Avisos flotantes (toasts) y ventanas ───── */
.sn-toast { pointer-events: auto; }
.sn .ring > svg:not(.arc) { width: 16px; height: 16px; stroke-width: 3; }
.sn .ring .bar { transition: stroke-dashoffset linear; }
.sn-toast.leave { opacity: 0; transform: translateY(12px) scale(.98); }
.modal.confirm .mbody { padding-top: 22px; padding-bottom: 6px; }
.modal.confirm .cf { display: flex; gap: 16px; align-items: flex-start; }
.modal.confirm .cf-ic { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--info) 15%, transparent); color: var(--info); }
.modal.confirm .cf-ic.warning { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.modal.confirm .cf-ic.danger { background: var(--bad-soft); color: var(--bad); }
.modal.confirm .cf-ic.success { background: var(--good-soft); color: var(--good); }
.modal.confirm .cf-ic svg { width: 22px; height: 22px; }
.modal.confirm .cf h3 { font-size: 17px; margin: 2px 0 6px; line-height: 1.35; }
.modal.confirm .cf p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.modal > footer .btn { min-width: 110px; }
.modal > footer .btn.bad { background: var(--bad); border-color: var(--bad); color: #fff; }
body.sw-open { overflow: hidden; }
/* buscador del panel (Ctrl K) */
.qres { display: flex; flex-direction: column; gap: 4px; min-height: 60px; }
.qhit { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; color: var(--text); text-decoration: none; }
.qhit:hover, .qhit.on { background: var(--surface-2); }
.qhit .qi { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.qhit .qi svg { width: 17px; height: 17px; }
.qhit small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }

/* ───── Celular ───── */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 980px) { .g2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
    .opt { flex-wrap: wrap; } .opt .ctl { width: 100%; max-width: 100%; justify-content: flex-start; }
    .row2 { grid-template-columns: minmax(0, 1fr); }
    .hide-m { display: none; }
    .sticky { position: static; }
    .imgrow .thumb { width: 52px; height: 52px; }
    .hero-modes { grid-template-columns: 1fr; }
    .hero-acts-pick { grid-template-columns: 1fr 1fr; }
    .card { padding: 16px; }
    .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .tabs button { flex: none; }
}
@media (max-width: 640px) { .g4 { gap: 10px; } .g4 .stat b { font-size: 24px; } .g4 .card.stat { padding: 14px; } }
@media (max-width: 330px) { .g4 { grid-template-columns: minmax(0, 1fr); } }

/* ───── Página de entrada (login) ───── */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px;
    background: radial-gradient(900px 480px at 50% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent), var(--bg); }
.login-box { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 30px 28px 26px; box-shadow: 0 30px 60px -30px rgb(0 0 0 / .6); animation: modal-in .3s cubic-bezier(.2, .9, .3, 1.1); }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 22px; text-align: center; }
.login-brand img { height: 52px; }
.login-brand h1 { font-size: 20px; margin-top: 8px; }
.login-brand p { margin: 0; color: var(--muted); font-size: 13.5px; }
.login-box .btn { width: 100%; min-height: 46px; margin-top: 6px; font-size: 15px; }
.login-box .pwrap { position: relative; }
.login-box .pwrap input { padding-right: 44px; }
.login-box .pwrap button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.login-box .pwrap button:hover { color: var(--text); background: var(--surface-2); }
.login-box .pwrap svg { width: 18px; height: 18px; }
.login-foot { margin-top: 18px; text-align: center; color: var(--muted); font-size: 12px; }

/* ───── Formularios de «agregar» en ventana ───── */
.grid.g2.one { grid-template-columns: minmax(0, 1fr); }
.page > .page-head .actions .btn-primary svg { width: 18px; height: 18px; }
.mform-modal > .mbody { gap: 16px; }
.mform-modal .mf-main { border: 0; padding: 0; background: transparent; border-radius: 0; }
.mform-modal .mf-main > h2:first-child { display: none; }
.mform-modal .mf-main > p.muted.small:first-of-type { margin-top: 0 !important; }
.mform-modal .card:not(.mf-main) { background: var(--surface-2); padding: 16px; }
.mform-modal .card.sticky { position: sticky; top: 0; }
.mform-modal .grid.g2 { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.mform-modal form > .btn[type=submit], .mform-modal form > button.btn:last-child { min-height: 44px; padding: 0 22px; }
.mform-modal .mbody > .grid { margin: 0; }
@media (max-width: 860px) { .mform-modal .grid.g2 { grid-template-columns: minmax(0, 1fr); } .mform-modal .card.sticky { position: static; } }

/* ───── Vista de las listas: botón y tarjetas también en la computadora ───── */
.seg-tabs.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.xt .xt-tools .xt-tool svg { width: 16px; height: 16px; }
.xt.force-cards thead { display: none; }
.xt.force-cards .xt-scroll { overflow: visible; }
.xt.force-cards table, .xt.force-cards tbody { display: block; width: 100%; }
.xt.force-cards tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; padding: 14px 16px; }
.xt.force-cards tbody tr { display: flex; flex-direction: column; gap: 0; padding: 6px 14px 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); box-shadow: 0 6px 16px -14px rgb(0 0 0 / .6); }
.xt.force-cards tbody tr:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.xt.force-cards td { display: flex !important; align-items: center; justify-content: space-between; gap: 14px; min-height: 30px; padding: 5px 0 !important; border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); text-align: right; white-space: normal; font-size: 13px; }
.xt.force-cards td::before { content: attr(data-label); flex-shrink: 0; max-width: 45%; text-align: left; color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.xt.force-cards td .xt-v { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 2px 8px; min-width: 0; }
.xt.force-cards td .xt-v > br { display: none; }
.xt.force-cards tr > td:first-child { font-size: 14px; font-weight: 600; }
.xt.force-cards td.xt-acts { border-bottom: 0; justify-content: flex-end; padding-top: 10px !important; margin-top: auto; }
.xt.force-cards td.xt-acts::before { display: none; }
.xt.force-cards td.xt-acts .xt-actions { flex-wrap: wrap; justify-content: flex-end; }
.xt.force-cards td:has(+ td.xt-acts) { border-bottom: 0; }
.xt.force-cards td.xt-blank, .xt.force-cards td:empty { display: none !important; }
.xt.force-cards .hide-m { display: flex !important; }
/* tabla también en el celular: se desliza hacia los costados */
@media (max-width: 640px) {
    .xt.force-table .xt-scroll { overflow-x: auto; }
    .xt.force-table td { white-space: nowrap; }
    .xt.force-table th:first-child, .xt.force-table td:first-child { padding-left: 16px; }
    .xt.force-cards tbody { grid-template-columns: minmax(0, 1fr); padding: 10px 12px 12px; gap: 10px; }
}
@media (min-width: 641px) { .xt .xt-fbtn { display: none; } }

/* ───── Selectores modernos (sx-*, de la plantilla) ───── */
.sx { position: relative; display: block; width: 100%; min-width: 0; }
.sx.sx-inline { display: inline-block; width: auto; vertical-align: middle; }
.sx .sx-trigger { width: 100%; font: inherit; font-size: 14px; }
.sx.sx-inline .sx-trigger { width: auto; }
.sx.sx-sm .sx-trigger { min-height: 38px; min-width: 76px; font-size: 13px; border-radius: 8px; padding: 0 8px 0 10px; }
.sx-trigger:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.opt .ctl .sx { width: 100%; }
.sx-pop { min-width: 160px; }
.sx-opt svg { flex: none; color: var(--accent); }
.sx-opt span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-search svg { flex: none; }
.sx-list { scrollbar-width: thin; }
/* selector del servidor (barra «Estás editando el contenido de»): sin caja */
.hb-sel > svg { display: none; }
.hb-sel .sx-trigger { min-height: 0; padding: 2px 2px 2px 0; border: 0; background: transparent; font-size: 16px; font-weight: 600; gap: 6px; box-shadow: none !important; }
.hb-sel .sx-trigger:hover .sx-caret { color: var(--accent); }
.mform-modal .sx-trigger { background: var(--surface-2); }

/* celular: el botón tarjetas/lista queda a la vista, junto al buscador */
.xt .xt-view-m { display: none; }
@media (max-width: 640px) {
    .xt .xt-view-m { display: inline-grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; }
    .xt .xt-tools [data-tool=view] { display: none; }
    .xt .xt-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .xt-right { gap: 8px; }
}

/* ───── Temas de temporada: vista previa (imita el inicio de la app, siempre oscuro) ───── */
.fxpv { position: relative; width: 100%; max-width: 270px; aspect-ratio: 9 / 16; margin: 0 auto 12px; border-radius: 26px; overflow: hidden; background: #0b0b0d; border: 3px solid #2a2b30; }
.fxpv-ui { position: absolute; inset: 0; padding: 14px; }
.fxpv-hero { height: 40%; border-radius: 14px; background: linear-gradient(160deg, #3a1a1a, #14202e 60%, #0b0b0d); margin-bottom: 12px; }
.fxpv-row { display: flex; gap: 8px; margin-bottom: 12px; }
.fxpv-row i { flex: 1; aspect-ratio: 2 / 3; border-radius: 8px; background: #1d1e22; }
.fxpv-anim { position: absolute; inset: 0; pointer-events: none; }
.fxpv-anim svg { display: block; }
.fxpv-greet { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); max-width: 88%; padding: 6px 14px; border-radius: 999px; background: rgb(0 0 0 / .55); color: #fff; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; backdrop-filter: blur(6px); }
.fxpv-err { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: #8e8e93; font-size: 13px; text-align: center; padding: 20px; }
.mform-modal .fxpv { max-width: 300px; }

/* ---------- Eventos: buscar partidos (API-Football) */
.fb-modal .mbody { padding-top: 6px; }
.fb-tools { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.fb-days { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fb-days .chip { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 999px; padding: 7px 14px; font-weight: 600; cursor: pointer; }
.fb-days .chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-fg, #0a0a0b); }
.fb-days input[type=date] { width: auto; padding: 7px 10px; }
.fb-onlyfav { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.fb-onlyfav input { width: auto; }
.fb-list { max-height: 58vh; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.fb-msg { padding: 28px 16px; text-align: center; color: var(--muted); }
.fb-msg.bad { color: var(--bad, #ef4444); }
.fb-league + .fb-league { border-top: 1px solid var(--border); }
.fb-lh { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface-2); position: sticky; top: 0; z-index: 1; }
.fb-lh > div { flex: 1; min-width: 0; }
.fb-lh b { display: block; font-size: 14px; }
.fb-lh small { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 5px; }
.fb-lg { width: 28px; height: 28px; background: center/contain no-repeat; flex: none; }
.fb-flag { width: 16px; height: 11px; background: center/cover no-repeat; border-radius: 2px; display: inline-block; }
.fb-star { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 8px; fill: none; }
.fb-star:hover { background: var(--surface); color: var(--text); }
.fb-star.on { color: #fbbf24; }
.fb-star.on svg { fill: #fbbf24; }
.fb-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; }
.fb-row + .fb-row { border-top: 1px solid var(--border); }
.fb-row:hover { background: var(--surface-2); }
.fb-time { width: 92px; flex: none; display: flex; flex-direction: column; gap: 2px; }
.fb-time b { font-size: 15px; }
.fb-st { font-size: 11px; font-weight: 600; color: var(--muted); }
.fb-st.live { color: #ef4444; }
.fb-st.off { color: #f59e0b; }
.fb-teams { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.fb-team { display: flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-team span { width: 20px; height: 20px; background: center/contain no-repeat; flex: none; }
.fb-row .btn[disabled] { opacity: .4; cursor: not-allowed; }
.fb-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.fb-foot a { text-decoration: underline; }
.fb-key { padding: 22px; max-width: 560px; }
.fb-key h3 { margin: 0 0 8px; }
.fb-key ol { margin: 0 0 14px; padding-left: 18px; line-height: 1.7; }
.fb-key a { text-decoration: underline; }
.fb-keyrow { display: flex; gap: 8px; margin-bottom: 8px; }
.fb-keyrow input { flex: 1; }
@media (max-width: 640px) {
    .fb-time { width: 70px; }
    .fb-row .btn span, .fb-row .btn { font-size: 12.5px; }
}

/* ---------- Servidores: diagnóstico */
.xd-msg { padding: 24px; text-align: center; color: var(--muted); }
.xd-msg.bad { color: var(--bad, #ef4444); }
.xd-step { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; background: var(--surface); }
.xd-step.bad { border-color: rgba(239, 68, 68, .45); }
.xd-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.xd-url { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: var(--muted); word-break: break-all; margin-bottom: 6px; }
.xd-err { color: var(--bad, #ef4444); font-weight: 600; margin: 6px 0; }
.xd-sum { margin: 6px 0; }
.xd-step pre { white-space: pre-wrap; word-break: break-all; max-height: 260px; overflow: auto; background: var(--surface-2); border-radius: 8px; padding: 10px; font-size: 12px; margin: 6px 0 0; }
.xd-step details summary { cursor: pointer; font-size: 13px; color: var(--accent); margin-top: 6px; }
.xd-actions { display: flex; justify-content: flex-end; }

/* ---------- Servidores: la cuenta de prueba se prueba sola */
.xt-status { font-size: 13px; margin: 8px 0 4px; padding: 0; border-radius: 8px; line-height: 1.5; }
.xt-status:empty { display: none; }
.xt-status.wait, .xt-status.ok, .xt-status.bad, .xt-status.warn { padding: 8px 12px; }
.xt-status.wait { background: var(--surface-2); color: var(--muted); }
.xt-status.ok { background: rgba(34, 197, 94, .12); color: #4ade80; }
.xt-status.warn { background: rgba(245, 158, 11, .12); color: #fbbf24; }
.xt-status.bad { background: rgba(239, 68, 68, .12); color: #f87171; }
.xt-status .bad { color: #f87171; }

/* ---------- Eventos: logo de la liga */
.evleague { display: flex; align-items: center; gap: 7px; }
.evlg { width: 22px; height: 22px; background: center/contain no-repeat; flex: none; display: inline-block; }
.evlg.sm { width: 16px; height: 16px; vertical-align: -3px; margin-right: 5px; }
.evlist-lg { display: flex; align-items: center; }

/* ---------- Eventos: varios servidores, cada uno con su canal */
.evhosts { display: flex; flex-direction: column; gap: 8px; }
.evhost { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.evhost.on { border-color: var(--accent); }
.evhost-h { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; margin: 0; }
.evhost-h input { width: auto; }
.evhost-b { padding: 0 12px 12px; }
.evhost:not(.on) .evhost-b { display: none; }
.evhost .results { margin-bottom: 0; }
/* ---------- Buscar partidos: marcador en vivo */
.fb-live { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); font-size: 13.5px; }
.fb-live label { display: flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; }
.fb-live label input { width: auto; }
.fb-live input[type=number] { width: 64px; padding: 5px 8px; display: inline-block; }
.fb-live small { flex-basis: 100%; color: var(--muted); }

/* ---------- Eventos: varios canales por servidor */
.chlist { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chlist:empty { display: none; }
.chip-ch { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; }
.chip-ch small { color: var(--muted); font-size: 11px; }
.chip-ch .chx { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; border-radius: 50%; }
.chip-ch .chx:hover { color: var(--bad, #ef4444); }
.chempty { margin: 0 0 8px; }
.chadd { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 6px; }
@media (max-width: 640px) { .chadd { grid-template-columns: 1fr 1fr; } .chadd .chplus { grid-column: span 2; } }
/* ---------- Buscar partidos: marcar varios */
.fb-chk { width: 18px !important; height: 18px; flex: none; cursor: pointer; accent-color: var(--accent); }
.fb-chk-sp { width: 18px; flex: none; }
.fb-row.sel { background: var(--accent-soft, rgba(255,255,255,.06)); }
.fb-added { flex: none; }
.fb-bulk { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 10px 12px; border-radius: var(--radius); background: var(--accent-soft, rgba(255,255,255,.06)); border: 1px solid var(--accent); font-size: 13.5px; flex-wrap: wrap; }
.fb-bulk[hidden] { display: none; }
/* Buscar partidos · Hub de partidos */
.fb-featchip svg { width: 14px; height: 14px; vertical-align: -2px; fill: currentColor; }
.fb-hubstar { color: var(--accent); display: inline-flex; margin-right: 4px; }
.fb-hubstar svg { width: 15px; height: 15px; fill: currentColor; }
.fb-src { display: grid; gap: 10px; margin: 6px 0 14px; }
.fb-srcopt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.fb-srcopt:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.fb-srcopt input { margin-top: 3px; accent-color: var(--accent); }
.fb-srcopt small { display: block; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.fb-srcbox .fb-keyrow { margin-bottom: 8px; }
.fb-srcbox[hidden] { display: none; }
@media (max-width: 600px) {
  .fb-row .fb-added { display: none; }
  .fb-row.added .fb-time::after { content: 'Ya agregado'; display: block; margin-top: 3px; font-size: 10.5px; font-weight: 600; color: var(--good); white-space: nowrap; }
}
/* Categorías de canales */
.lc-acts { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lc-acts form { display: contents; }
.lc-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.lc-tools .searchbox { flex: 1; min-width: 200px; }
.lc-list { display: flex; flex-direction: column; gap: 6px; }
.lc-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.lc-row.off { opacity: .55; }
.lc-row.off .lc-name { text-decoration: line-through; }
.lc-row.drag { box-shadow: 0 8px 24px rgba(0,0,0,.35); border-color: var(--accent); position: relative; z-index: 2; opacity: 1; }
.lc-grip { cursor: grab; color: var(--muted); display: grid; place-items: center; touch-action: none; padding: 4px; }
.lc-row.drag .lc-grip { cursor: grabbing; }
.lc-n { width: 26px; text-align: right; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.lc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lc-name { width: 100%; padding: 7px 10px !important; font-weight: 600; }
.lc-move { display: flex; gap: 4px; }
.lc-move .btn { padding: 6px 8px; }
.lc-save { position: sticky; bottom: 10px; z-index: 5; display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 14px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.lc-save.dirty { border-color: var(--accent); }
.lc-save.dirty #lc-dirty { color: var(--accent); }
@media (max-width: 600px) { .lc-n { display: none; } .lc-move { flex-direction: column; } .lc-move .btn { padding: 3px 6px; } .lc-row { gap: 6px; padding: 8px; } }
/* Mis categorías */
.cc-card.off { opacity: .7; }
.cc-meta { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 10px; }
.cc-item { align-items: center; gap: 12px; }
.cc-item.off { opacity: .5; }
.cc-th { width: 46px; height: 64px; flex: none; border-radius: 8px; background: var(--surface-2) center/cover no-repeat; border: 1px solid var(--border); }
.cc-th.ch { width: 56px; height: 40px; background-size: contain; background-color: #0003; }
.cc-url { display: inline-block; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.l2 svg { width: 13px; height: 13px; vertical-align: -2px; }
.ci-seg span svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 4px; }
.ci-grid { align-items: start; }
.ci-host { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: var(--surface-2); }
.ci-hh { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.ci-pick { flex: 1; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono-in { font-family: var(--font-mono); font-size: 12.5px; }
.cc-hosts { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 0 26px; }
@media (max-width: 600px) { .cc-url { max-width: 170px; } .cc-item .lc-acts .btn { padding: 6px 8px; } }
body.lc-dragging { user-select: none; -webkit-user-select: none; }
@media (max-width: 600px) {
  .cc-item { flex-wrap: wrap; }
  .cc-item .li-main { flex: 1 1 calc(100% - 70px); }
  .cc-item .lc-acts { width: 100%; justify-content: flex-end; }
}
/* Categorías de un equipo */
.dc-h { font-size: 14px; margin: 0 0 8px; font-family: var(--font-head); }
.dc-grid .chk { margin-bottom: 6px; }
.dc-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; background: var(--surface-2); }
.dc-row[hidden] { display: none; }
/* Solo estos equipos */
.cc-to .chk { margin-bottom: 6px; }
.cc-devs { margin: 4px 0 10px 26px; }
.dev-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dev-chips .chip-ch button { background: none; border: 0; color: inherit; cursor: pointer; font-size: 16px; line-height: 1; margin-left: 4px; padding: 0 2px; }
.ci-extra { margin-top: 10px; align-items: end; }
#gifts .lc-acts .btn svg { width: 15px; height: 15px; }
