/* YoSePlayer Admin — tema oscuro. Sin frameworks. */
:root {
    --bg: #0b0d14; --panel: #131722; --panel-2: #1a1f2e; --line: #262c3d; --line-soft: #1e2433;
    --text: #e6e9f2; --muted: #8b93a7; --accent: #7c5cff; --accent-2: #5b8cff;
    --green: #2ecc8f; --red: #ff5d6c; --yellow: #f5b83d; --blue: #4aa8ff;
    --radius: 12px; --radius-sm: 8px; --shadow: 0 12px 40px rgba(0, 0, 0, .45);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { margin: 0; text-wrap: balance; }
code { font-family: var(--mono); font-size: .92em; background: var(--panel-2); padding: 1px 6px; border-radius: 5px; }
[hidden] { display: none !important; }

/* Estructura */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 232px; flex: none; background: var(--panel); border-right: 1px solid var(--line-soft); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 24px; border-bottom: 1px solid var(--line-soft); background: rgba(11, 13, 20, .85); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.page-title { font-size: 18px; font-weight: 650; }
.content { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--text); padding: 4px 10px 18px; }
.brand:hover { text-decoration: none; }
.brand small { color: var(--muted); font-weight: 500; font-size: 12px; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.brand-lg { font-size: 20px; padding: 0 0 8px; justify-content: center; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 500; }
.nav-link:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.nav-link.active { background: rgba(124, 92, 255, .16); color: #fff; }
.nav-link > span:not(.nav-badge) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-badge { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #e5484d; color: #fff; font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center; }
.nav-group-head { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.nav-group-head.has-active { color: var(--text); }
.nav-chevron { width: 15px; height: 15px; flex: none; opacity: .6; transition: transform .2s; }
.nav-group.open .nav-chevron { transform: rotate(90deg); }
.nav-group.open .nav-group-head .nav-badge { display: none; }
.nav-group-items { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .2s ease; }
.nav-group-items > * { min-height: 0; }
.nav-group.open .nav-group-items { grid-template-rows: 1fr; }
.nav-group-items { overflow: hidden; }
.nav-group-items-inner { display: flex; flex-direction: column; gap: 2px; padding: 2px 0 4px; }
.nav-sub { padding-left: 22px; font-size: 13.5px; }
.nav-sub .icon { width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) { .nav-group-items, .nav-chevron { transition: none; } }
.icon { width: 18px; height: 18px; flex: none; }
.menu-toggle { display: none; }

/* Controles */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #3a4260; background: #20263a; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #8d70ff; border-color: #8d70ff; }
.btn-danger { background: rgba(255, 93, 108, .14); border-color: rgba(255, 93, 108, .4); color: var(--red); }
.btn-danger:hover { background: rgba(255, 93, 108, .24); border-color: var(--red); }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-block { width: 100%; padding: 10px; }
.icon-btn { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; font-size: 18px; }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.dot { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.input { width: 100%; padding: 8px 11px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #0f1320; color: var(--text); font: inherit; }
.input:focus, .btn:focus-visible, .icon-btn:focus-visible, .tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.input::placeholder { color: #5d657a; }
textarea.input { min-height: 80px; resize: vertical; }
select.input { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
input[type="date"].input, input[type="datetime-local"].input { color-scheme: dark; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 12.5px; color: var(--muted); font-weight: 550; }
.field small { color: var(--muted); font-size: 12px; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.form { display: flex; flex-direction: column; gap: 13px; }

/* Barra de filtros */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.toolbar .input { width: auto; min-width: 150px; }
.toolbar input[type="search"] { min-width: 260px; flex: 1 1 260px; max-width: 420px; }
.toolbar .spacer { flex: 1; }
.inline-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; white-space: nowrap; }

/* Tarjetas y tablas */
.card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 18px; }
.card-flush { padding: 0; overflow: hidden; }
.card-title { font-size: 14px; font-weight: 650; margin-bottom: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head .card-title { margin: 0; }
.card-note { margin: 0 16px 10px; font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-top { align-items: start; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.stat { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px; display: block; color: inherit; }
a.stat:hover { border-color: var(--line); text-decoration: none; }
.stat-label { color: var(--muted); font-size: 12.5px; font-weight: 550; }
.stat-value { font-size: 28px; font-weight: 700; line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-sub { color: var(--muted); font-size: 12.5px; }
.stat-warn .stat-value { color: var(--yellow); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; background: var(--panel); }
td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, .02); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.actions { text-align: right; white-space: nowrap; width: 1%; }
td.actions .btn-group { flex-wrap: nowrap; justify-content: flex-end; align-items: center; gap: 6px; }
.cell-main { font-weight: 600; color: var(--text); }
.cell-sub { color: var(--muted); font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.empty { padding: 34px 16px; text-align: center; color: var(--muted); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 13px; }
.pager-btns { display: flex; gap: 6px; }
.mini-table td { padding: 8px 4px; }
.mini-table td:last-child { text-align: right; }

/* Etiquetas */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: rgba(139, 147, 167, .16); color: var(--muted); }
.badge-green { background: rgba(46, 204, 143, .14); color: var(--green); }
.badge-red { background: rgba(255, 93, 108, .14); color: var(--red); }
.badge-yellow { background: rgba(245, 184, 61, .14); color: var(--yellow); }
.badge-blue { background: rgba(74, 168, 255, .14); color: var(--blue); }
.badge-purple { background: rgba(124, 92, 255, .18); color: #b3a1ff; }

/* Menús desplegables */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 190px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 5px; z-index: 40; text-align: left; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-wide { min-width: 290px; }
.dropdown-item { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; white-space: nowrap; }
.dropdown-wide .dropdown-item { white-space: normal; }
.dropdown-item:hover { background: rgba(255, 255, 255, .06); text-decoration: none; }
.dropdown-item.danger { color: var(--red); }
.dropdown-empty { padding: 10px; color: var(--muted); }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line-soft); background: var(--panel); color: var(--text); cursor: pointer; font: inherit; }
.user-chip-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.user-chip-text small { color: var(--muted); font-size: 11px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); font-weight: 700; font-size: 13px; color: #fff; }

/* Modales */
.modal-backdrop { position: fixed; inset: 0; background: rgba(4, 6, 12, .7); display: grid; place-items: center; padding: 18px; z-index: 100; overflow-y: auto; }
.modal { width: 100%; max-width: 520px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 1100px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.modal-head h2 { font-size: 16px; }
.modal-body { padding: 18px; display: flex; flex-direction: column; gap: 13px; max-height: 70vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line-soft); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.secret-box { font-family: var(--mono); font-size: 15px; padding: 12px; border-radius: var(--radius-sm); background: #0f1320; border: 1px dashed var(--line); word-break: break-all; user-select: all; }
.code-list { font-family: var(--mono); font-size: 13px; min-height: 220px; white-space: pre; }
.suggest { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.suggest button { display: block; width: 100%; padding: 7px 10px; background: #0f1320; border: 0; border-bottom: 1px solid var(--line-soft); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.suggest button:hover { background: var(--panel-2); }

/* Avisos */
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; max-width: min(380px, calc(100vw - 36px)); }
.toast { padding: 11px 14px; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--green); box-shadow: var(--shadow); }
.toast-error { border-left-color: var(--red); }
.alert { padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13.5px; }
.alert-danger { background: rgba(255, 93, 108, .12); color: var(--red); border: 1px solid rgba(255, 93, 108, .3); }
.alert-warn { background: rgba(245, 184, 61, .1); color: var(--yellow); border: 1px solid rgba(245, 184, 61, .3); }
.hint { color: var(--muted); font-size: 13px; margin: 0; max-width: 90ch; }
.back-link { color: var(--muted); font-size: 13px; }
.plain-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }

/* Pestañas */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-soft); }
.tab { padding: 9px 14px; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
[data-panel] { display: flex; flex-direction: column; gap: 16px; }

/* Gráfico de barras del dashboard */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 18px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; height: 100%; min-width: 0; }
.chart-bar { width: 100%; max-width: 30px; min-height: 2px; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
.chart-val { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chart-day { font-size: 10.5px; color: var(--muted); }

/* Ficha de usuario */
.detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.detail-head h2 { font-size: 20px; }
.detail-head .spacer { flex: 1; }
.btn-group { display: flex; flex-wrap: wrap; gap: 8px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 7px 12px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* Login */
.login-body { display: grid; place-items: center; padding: 20px; background: radial-gradient(900px 500px at 50% -10%, rgba(124, 92, 255, .22), transparent), var(--bg); }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 16px; padding: 30px; display: flex; flex-direction: column; gap: 15px; box-shadow: var(--shadow); }

@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
    .sidebar { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
    .sidebar.open { transform: none; box-shadow: var(--shadow); }
    .menu-toggle { display: grid; }
    .content { padding: 16px; }
    .topbar { padding: 12px 16px; }
    .user-chip-text { display: none; }
    .form-row { grid-template-columns: 1fr; }
    .toolbar .input, .toolbar input[type="search"] { flex: 1 1 100%; max-width: none; }
    .kv { grid-template-columns: 1fr; gap: 2px; }
    .kv dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.content-stack { display: flex; flex-direction: column; gap: 16px; }
.card.card-head { border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; margin: 0; padding: 14px 16px; background: none; }
.card .card-head:last-child { margin: 14px 0 0; }

/* Catálogo */
.poster { width: 38px; height: 57px; border-radius: 5px; object-fit: cover; background: var(--panel-2); display: block; flex: none; }
.poster-lg { width: 110px; height: 165px; border-radius: 8px; }
.poster-empty { display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.title-head { display: flex; gap: 16px; align-items: flex-start; }
.tmdb-form { grid-template-columns: 1fr 110px auto; }
.tmdb-results { display: flex; flex-direction: column; gap: 6px; }
.tmdb-row { display: flex; gap: 12px; align-items: flex-start; padding: 8px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: #0f1320; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.tmdb-row:hover { border-color: var(--accent); }

/* Soporte */
.thread { display: flex; flex-direction: column; gap: 10px; }
.msg { padding: 10px 12px; border-radius: var(--radius-sm); background: #0f1320; border: 1px solid var(--line-soft); max-width: 88%; }
.msg-admin { align-self: flex-end; background: rgba(124, 92, 255, .12); border-color: rgba(124, 92, 255, .3); }
.msg-meta { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Canales: logos */
.channel-logo { width: 44px; height: 44px; border-radius: 6px; object-fit: contain; background: var(--panel-2); display: block; flex: none; }
.channel-logo-lg { width: 110px; height: 110px; border-radius: 8px; }
.channel-form { display: grid; gap: 14px; }

/* Canales: cabecera de sección (lista principal / todos los canales) */
.section-head { display: flex; align-items: center; gap: 10px; margin: 22px 0 10px; }
.section-head h2 { font-size: 16px; margin: 0; }
.section-head .spacer { flex: 1; }
/* Canales: buscador para reunir canales del catálogo en una entrada de la lista principal */
.pick-list { max-height: 46vh; overflow-y: auto; border: 1px solid var(--border, rgba(255,255,255,0.1)); border-radius: 10px; padding: 4px; margin: 4px 0 8px; }
.pick-row { display: flex; align-items: flex-start; gap: 12px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.pick-row:hover { background: rgba(255,255,255,0.05); }
.pick-row input[type="checkbox"] { margin-top: 3px; width: 16px; height: 16px; flex: none; }
.pick-text { flex: 1; min-width: 0; }
.pick-off { opacity: 0.55; cursor: default; }
.pick-item { display: block; width: 100%; text-align: left; background: none; border: 0; color: inherit; font: inherit; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.pick-item:hover, .pick-item:focus { background: rgba(255,255,255,0.06); outline: none; }
.input.input-sm { padding: 4px 8px; font-size: 13px; min-width: 130px; }
.toolbar-inset { padding: 0 16px 12px; }
.meta-job { display: grid; gap: 4px; font-size: 14px; }
.text-warn { color: var(--yellow); }
.import-list { max-height: 58vh; overflow-y: auto; display: grid; gap: 6px; margin: 8px 0; }
.import-row { border: 1px solid var(--border, rgba(255,255,255,0.1)); border-radius: 10px; padding: 6px 8px; }
.import-head { display: flex; gap: 10px; align-items: baseline; padding: 2px 4px 4px; }
.import-head strong { min-width: 34px; color: var(--muted); }
.import-missing { opacity: 0.6; }
.pick-maybe { opacity: 0.85; }
.import-hide-missing .import-missing { display: none; }
.bulk-bar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--border, rgba(255,255,255,0.08)); flex-wrap: wrap; }
.check-col { width: 1%; }

/* Tráiler en la ficha del catálogo */
.trailer-box { display: flex; gap: 12px; align-items: center; margin: 10px 0; }
.trailer-thumb { width: 160px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; display: block; }
.trailer-actions { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.trailer-icon { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600;
    background: rgba(255, 60, 60, .16); color: #ff7a7a; text-decoration: none; vertical-align: middle; }
.trailer-icon:hover { background: rgba(255, 60, 60, .28); color: #ffa3a3; }
.trailer-icon span { font-size: 10px; letter-spacing: .02em; }
.field[hidden] { display: none !important; }

/* Sincronización del catálogo en marcha (cabecera) */
.sync-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 17px; background: var(--panel-2); border: 1px solid var(--line);
  color: var(--text); font-size: 13px; text-decoration: none; white-space: nowrap; }
.sync-chip[hidden] { display: none !important; }
.sync-chip:hover { border-color: var(--accent); }
.sync-chip-text { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.sync-chip-pct { font-variant-numeric: tabular-nums; color: var(--muted); }
.sync-chip-bar { width: 70px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.sync-chip-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 3px; transition: width .6s ease; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.18); border-top-color: var(--accent); animation: sync-spin .8s linear infinite; flex: none; }
@keyframes sync-spin { to { transform: rotate(360deg); } }
@media (max-width: 720px) { .sync-chip-text, .sync-chip-bar { display: none; } }

/* Deportes: competiciones con su logo y escudos en la tabla */
.sports-comps { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 10px; }
.sports-comp { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.sports-comp img, .sports-comp-nologo { width: 36px; height: 36px; object-fit: contain; display: grid; place-items: center; font-size: 22px; flex: none; }
.sports-comp-text { flex: 1; min-width: 0; }
.sports-match { display: inline-flex; align-items: center; gap: 6px; }
.sports-match img { width: 20px; height: 20px; object-fit: contain; }
.section-title { font-size: 16px; margin: 22px 0 10px; }

/* Canales: revisar la agrupación de un canal */
.review-name { display: flex; align-items: flex-end; gap: 10px; margin: 10px 0 14px; }
.review-name .field { flex: 1; margin: 0; }
.review-name .btn { flex: none; }
.review-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; white-space: nowrap; }

/* Idiomas: visible u oculto por tipo (películas, series, canales) */
.lang-type-cell { display: inline-flex; align-items: center; gap: 8px; }
.lang-type-cell .num { min-width: 48px; text-align: right; }
.lang-type { border: 1px solid transparent; border-radius: 999px; padding: 2px 10px; font-size: 12px; cursor: pointer; background: transparent; color: inherit; }
.lang-type.is-on { border-color: rgba(46, 204, 143, .4); color: var(--green); }
.lang-type.is-off { border-color: rgba(255, 93, 108, .4); color: var(--red); background: rgba(255, 93, 108, .1); }
.lang-type:hover { filter: brightness(1.2); }

/* Catálogo: otros nombres de la misma obra unidos a la ficha */
.merged-box { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.merged-box .hint { margin: 4px 0 8px; }
.merged-list { list-style: none; margin: 0 0 8px; padding: 0; }
.merged-list li { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.merged-list li .btn { margin-left: auto; }

/* Pagos: referencia con botón de copiar */
.ref-chip { display: inline-flex; align-items: center; gap: 8px; }
.ref-chip .mono { font-weight: 600; letter-spacing: .03em; }
.pay-total { font-weight: 600; }

/* Proveedores: añadir dominios uno a uno */
.domain-add { display: flex; gap: 8px; flex-wrap: wrap; }
.domain-add .input { flex: 1 1 260px; }
.domain-missing { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); }
.domain-missing .muted { flex: 1 1 260px; overflow-wrap: anywhere; }
.warn-text { color: var(--yellow); }

/* Versiones de las apps */
.platform-head { align-items: flex-start; }
.platform-head .card-title { margin: 0 0 4px; }
.platform-code { font-size: 12px; font-weight: 400; }
.platform-link { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; word-break: break-all; }
.version-notes { display: block; max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Configuración: cuadros por tema a pantalla completa, con barra de guardar fija abajo */
.settings-page { display: flex; flex-direction: column; gap: 16px; }
.settings-grid { columns: 3 420px; column-gap: 16px; }
.settings-group { break-inside: avoid; margin-bottom: 16px; }
.settings-group .card-title { margin-bottom: 2px; }
.settings-group-text { margin-bottom: 14px; font-size: 12.5px; }
.settings-group .field .hint { font-size: 12px; }
.settings-group .is-changed > span:first-child, .settings-group .is-changed .check > span { color: var(--accent, #7c5cff); }
.settings-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px;
    background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: 0 -6px 18px rgba(0, 0, 0, .25); }
.settings-bar .spacer { flex: 1; }
.settings-dirty { color: var(--text) !important; font-weight: 600; }
@media (max-width: 600px) { .settings-bar #settings-state:not(.settings-dirty) { display: none; } .settings-bar { padding: 10px 12px; } }

/* Mensajes de la web */
.contact-meta { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 16px; }
.contact-meta dt { color: var(--muted); }
.contact-meta dd { margin: 0; word-break: break-all; }
.contact-message { white-space: pre-wrap; word-break: break-word; padding: 14px 16px; border-radius: 8px; background: var(--panel-2); line-height: 1.5; max-height: 50vh; overflow: auto; }
.contact-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* Radio */
.radio-logo { width: 36px; height: 36px; border-radius: 8px; object-fit: contain; background: #fff1; display: inline-grid; place-items: center; }
.radio-logo-empty { font-size: 18px; }
.stats-inline { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; }
.row-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.error-text { color: var(--red); }

/* Carpetas del servidor */
.folders-save { position: sticky; bottom: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; margin-top: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.45); z-index: 5; }
.folders-save .grow { flex: 1; }
.folder-row.off td { color: var(--muted); }
.folder-row td:first-child { width: 36px; }
.folder-row-click { cursor: pointer; }
.folder-row-click:hover td { background: var(--line-soft); }
#f-server { max-width: 320px; }
#f-show { max-width: 220px; }
#f-tabs { padding: 0 12px; }
.folders-pending, .folders-banner { margin-bottom: 12px; }

/* Tienda de la web */
.small { font-size: 12.5px; }
.text-warn { color: var(--yellow); font-weight: 650; }
.copy-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 10px; border: 1px dashed var(--line); border-radius: var(--radius-sm); margin: 6px 0 10px; }
.copy-line .mono { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.shop-thumb { display: block; width: 64px; height: 48px; object-fit: cover; border-radius: 6px; background: var(--line-soft); }
.shop-thumb-empty { display: grid; place-items: center; color: var(--muted); }
.shop-images { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 10px; }
.shop-image { margin: 0; width: 132px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 6px; }
.shop-image img { display: block; width: 120px; height: 90px; object-fit: cover; border-radius: 4px; }
.shop-image figcaption { display: flex; gap: 2px; align-items: center; margin-top: 4px; min-height: 26px; }
.shop-image figcaption .badge { margin-right: auto; }
.variants-table { width: 100%; border-collapse: collapse; }
.variants-table th { text-align: left; font-size: 12px; color: var(--muted); padding: 4px; }
.variants-table td { padding: 3px 4px; }
.variants-table .input { min-width: 70px; padding: 6px 8px; }
.variants-table td.center { text-align: center; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
#shop-settings .card { display: grid; gap: 10px; align-content: start; }
