/* RadioAX — sistema visual (docs/manual_de_marca.md + docs/experiencia_panel.md)
 * Mobile-first. Modo oscuro por defecto; claro para oficina/proyector.
 * Regla de color: el ambar SOLO significa "comercial". */

:root {
  --ground: #0B0F14;      /* Grafito Cabina */
  --surface: #141A22;     /* Panel */
  --surface-hi: #1D2530;  /* Panel Alto */
  --edge: #2A3441;        /* Filo */
  --edge-soft: #1F2833;
  --primary: #2E6BFF;     /* Azul Senal */
  --primary-lit: #5B8CFF; /* Azul Dial */
  --accent: #FFB020;      /* Ambar Anuncio */
  --accent-deep: #D98A00;
  --ok: #25D07D;          /* Verde Aire */
  --alert: #FF4D4D;       /* Rojo Emergencia */
  --warn: #FFD84D;        /* Amarillo Cautela */
  --ink: #F2F5F9;         /* Blanco Cabina */
  --ink-mid: #8A97A8;     /* Gris Dial */
  --ink-dim: #5A6675;     /* Gris Sombra */
  --text: var(--ink);
  /* Colores del logo (manual de marca, seccion 2). Son propios a proposito:
     la marca blanca de un cliente puede cambiar --primary, pero el tacometro
     siempre es Azul Senal, la zona roja y la X siempre Ambar Anuncio. */
  --logo-tacho: #2E6BFF;
  --logo-ink: #F2F5F9;
  --logo-amber: #FFB020;
  --display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 6px;
  --tap: 44px;            /* Ley de Fitts: minimo tocable */
  --nav-h: 64px;
  --bar-h: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
:root[data-theme="light"] {
  --ground: #F6F8FB; --surface: #FFFFFF; --surface-hi: #F4F7FB; --edge: #DDE4ED;
  --edge-soft: #E8EDF4; --primary: #1B4FD8; --primary-lit: #2E6BFF; --accent: #B87400;
  --accent-deep: #8A5700; --ok: #0F8A52; --alert: #C62828; --warn: #A87A00;
  --ink: #111823; --ink-mid: #5A6675; --ink-dim: #8A97A8;
  --logo-tacho: #1B4FD8; --logo-ink: #111823; --logo-amber: #B87400;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { height: 100%; }
body {
  margin: 0; min-height: 100%;
  background: var(--ground); color: var(--ink);
  font: 15px/1.5 var(--body);
  font-variant-numeric: tabular-nums;
  overscroll-behavior-y: none;
}
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 26px; line-height: 1.15; }
h2 { font-size: 20px; line-height: 1.25; }
h3 { font-family: var(--body); font-size: 16px; font-weight: 600; }
p { margin: 0; }
a { color: var(--primary-lit); }
.hidden { display: none !important; }
.muted { color: var(--ink-mid); }
.dim { color: var(--ink-dim); }
.small { font-size: 13px; }
.micro { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--ink-dim); }
.money, .amber { color: var(--accent); }
.ok { color: var(--ok); }
.alert { color: var(--alert); }
.num { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Marca ---------- */
.lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.lockup .isotipo { display: block; height: 28px; width: auto; flex: none; }
.lockup .word { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: .07em; color: var(--ink); line-height: 1; }
.lockup .word b { color: var(--accent); font-weight: 700; }
.lockup-lg { gap: 14px; }
.lockup-lg .isotipo { height: 44px; }
.lockup-lg .word { font-size: 30px; }

/* ---------- Controles ---------- */
button, .btn {
  font: inherit; font-weight: 600; cursor: pointer; color: var(--ink);
  background: var(--surface-hi); border: 1px solid var(--edge); border-radius: var(--radius);
  min-height: var(--tap); padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; transition: background .12s, border-color .12s, transform .06s;
}
button:hover, .btn:hover { border-color: var(--primary-lit); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: default; }
button.primary, .btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
button.primary:hover { background: var(--primary-lit); border-color: var(--primary-lit); }
button.commercial { background: var(--accent); border-color: var(--accent); color: #0B0F14; }
button.commercial:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
button.ghost { background: transparent; border-color: transparent; color: var(--ink-mid); }
button.ghost:hover { color: var(--ink); background: var(--surface-hi); border-color: var(--edge); }
button.danger { color: var(--alert); border-color: color-mix(in srgb, var(--alert) 40%, var(--edge)); }
button.sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
button.icon { width: var(--tap); padding: 0; }
button.block { width: 100%; }
button.rec[data-rec="1"] { background: var(--alert); border-color: var(--alert); color: #fff; }

label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-mid); }
label.field .q { font-weight: 400; color: var(--ink-dim); }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--ground);
  border: 1px solid var(--edge); border-radius: var(--radius);
  min-height: var(--tap); padding: 10px 12px; width: 100%;
}
input[type="file"] { padding: 8px; }
input[type="range"] { min-height: 0; padding: 0; accent-color: var(--primary); height: 32px; background: transparent; border: 0; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: 2px solid var(--primary-lit); outline-offset: 1px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.checks { display: flex; gap: 6px; flex-wrap: wrap; }
.checks label { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--surface); font-size: 13px; cursor: pointer; }
.checks input { width: auto; min-height: 0; margin: 0; accent-color: var(--primary); }
.checks label:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, var(--surface)); }

.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius); padding: 3px; gap: 3px; }
.seg button { min-height: 36px; padding: 0 14px; border: 0; background: transparent; color: var(--ink-mid); font-size: 13px; }
.seg button[aria-pressed="true"] { background: var(--primary); color: #fff; }
.seg.commercial button[aria-pressed="true"] { background: var(--accent); color: #0B0F14; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 999px; white-space: nowrap; background: var(--surface-hi); color: var(--ink-mid); letter-spacing: .04em; text-transform: uppercase; }
.pill.on { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.pill.off { background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--warn); }
.pill.down { background: color-mix(in srgb, var(--alert) 18%, transparent); color: var(--alert); }
.pill.pace { background: color-mix(in srgb, var(--primary) 18%, transparent); color: var(--primary-lit); }
.pill.ad { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.dot.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

/* ---------- Superficies ---------- */
.card { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius); padding: 16px; }
.card.commercial { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.card.tight { padding: 12px; }
.card h2, .card h3 { margin-bottom: 4px; }
.rows { border: 1px solid var(--edge); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.rows .rh { padding: 10px 14px; background: var(--ground); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-dim); font-weight: 600; border-bottom: 1px solid var(--edge); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rows .r { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--edge-soft); min-height: 56px; }
.rows .r:last-child { border-bottom: 0; }
.rows .r.tap { cursor: pointer; }
.rows .r.tap:hover { background: var(--surface-hi); }
.rows .r .nm { flex: 1; min-width: 0; }
.rows .r .nm b { display: block; font-weight: 600; }
.rows .r .nm span { font-size: 13px; color: var(--ink-mid); display: block; }
.kpis { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius); padding: 14px; min-height: 92px; }
.kpi .n { font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1.05; }
.kpi .l { font-size: 12px; color: var(--ink-mid); margin-top: 6px; line-height: 1.35; }
.kpi.ok .n { color: var(--ok); }
.kpi.money .n { color: var(--accent); }
.kpi.alert .n { color: var(--alert); }
.grid { display: grid; gap: 12px; }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cover { width: 56px; height: 56px; border-radius: 6px; flex: none; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 18px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.cover.lg { width: 100%; aspect-ratio: 16/9; height: auto; font-size: 28px; border-radius: 6px 6px 0 0; }
.cover.sm { width: 40px; height: 40px; font-size: 14px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim); font-weight: 600; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--edge); }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--edge-soft); vertical-align: middle; }
.table .n { text-align: right; }
.table tfoot td { border-top: 1px solid var(--edge); border-bottom: 0; font-weight: 700; }
.scrollx { overflow-x: auto; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--surface); }
.bar { height: 6px; background: var(--surface-hi); border-radius: 3px; overflow: hidden; min-width: 80px; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.bar.blue > i { background: var(--primary); }
.empty { text-align: center; padding: 36px 20px; color: var(--ink-mid); border: 1px dashed var(--edge); border-radius: var(--radius); }
.empty b { display: block; color: var(--ink); margin-bottom: 6px; font-size: 16px; }
.empty button { margin-top: 14px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--edge); margin-bottom: 14px; overflow-x: auto; }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--ink-mid); padding: 0 14px; min-height: 42px; white-space: nowrap; }
.tabs button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--primary); }
.tabs.commercial button[aria-pressed="true"] { border-bottom-color: var(--accent); color: var(--accent); }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 18px 0 10px; }
.section-head:first-child { margin-top: 0; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(900px 500px at 50% -10%, #17233a, var(--ground)); }
.login-card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; }
.login-card .error { color: var(--alert); min-height: 20px; font-size: 13px; }
.login-card .hint { font-size: 12px; color: var(--ink-dim); }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-rows: auto 1fr; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; background: color-mix(in srgb, var(--ground) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--edge-soft); min-height: 56px; }
.topbar h1 { font-size: 20px; }
.topbar .right { display: flex; gap: 6px; align-items: center; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-hi); border: 1px solid var(--edge); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--ink-mid); }
.view { padding: 16px 16px calc(var(--bar-h) + var(--nav-h) + var(--safe-b) + 24px); max-width: 1100px; width: 100%; margin: 0 auto; }
.sidebar { display: none; }
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--edge); height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); }
.bottomnav button { border: 0; border-radius: 0; background: transparent; color: var(--ink-mid); flex-direction: column; gap: 3px; font-size: 11px; font-weight: 600; padding: 0 4px; }
.bottomnav button svg { width: 22px; height: 22px; }
.bottomnav button[aria-pressed="true"] { color: var(--ink); }
.bottomnav button.ads { color: var(--accent); }
.storebar { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 29; background: var(--surface-hi); border-top: 1px solid var(--edge); padding: 8px 12px; min-height: var(--bar-h); display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; }
.storebar .loc { display: flex; align-items: center; gap: 8px; min-width: 0; }
.storebar select { min-height: 36px; padding: 4px 28px 4px 8px; width: auto; max-width: 48vw; font-weight: 600; background: var(--surface); }
.storebar .np { font-size: 13px; min-width: 0; }
.storebar .np b { display: block; font-weight: 600; }
.storebar .np .next { color: var(--accent); font-weight: 600; font-size: 12px; }
.storebar .status { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.storebar .controls { display: flex; align-items: center; gap: 4px; }
.storebar .controls input[type="range"] { width: 90px; display: none; }
.storebar .vol { font-size: 12px; color: var(--ink-mid); min-width: 34px; text-align: right; }
.app.manager .bottomnav { display: none; }
.app.manager .view { padding-bottom: 24px; }
.app.manager .storebar { display: none; }

@media (min-width: 900px) {
  .app { grid-template-columns: 220px 1fr; grid-template-rows: auto 1fr; }
  .sidebar { display: flex; flex-direction: column; gap: 4px; grid-row: 1 / span 2; padding: 18px 12px; border-right: 1px solid var(--edge); background: var(--ground); position: sticky; top: 0; height: 100vh; }
  .sidebar .brand { padding: 4px 8px 18px; }
  .sidebar nav { display: flex; flex-direction: column; gap: 3px; }
  .sidebar nav button { justify-content: flex-start; border: 0; background: transparent; color: var(--ink-mid); padding: 0 12px; font-weight: 500; }
  .sidebar nav button svg { width: 18px; height: 18px; }
  .sidebar nav button:hover { color: var(--ink); background: var(--surface-hi); }
  .sidebar nav button[aria-pressed="true"] { background: color-mix(in srgb, var(--primary) 18%, transparent); color: var(--ink); }
  .sidebar nav button.ads { color: var(--accent); }
  .sidebar nav button.ads[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 15%, transparent); }
  .sidebar .sep { flex: 1; }
  .sidebar .foot { font-size: 12px; color: var(--ink-dim); padding: 0 12px; }
  .topbar { grid-column: 2; }
  .view { grid-column: 2; padding: 24px 28px calc(var(--bar-h) + 28px); }
  .bottomnav { display: none; }
  .storebar { left: 220px; bottom: 0; grid-template-columns: minmax(200px, 1.2fr) 2fr auto; padding: 10px 20px; }
  .storebar select { max-width: 260px; }
  .storebar .controls input[type="range"] { display: block; }
  .app.manager { grid-template-columns: 1fr; }
  .app.manager .sidebar { display: none; }
  .app.manager .topbar, .app.manager .view { grid-column: 1; }
}

/* ---------- Pantalla de tienda (encargado) ---------- */
.store { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.store .head .who { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-dim); font-weight: 600; }
.store .head .loc { font-family: var(--display); font-weight: 600; font-size: 24px; }
.store .live { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.np-card .track { font-size: 18px; font-weight: 600; margin-top: 4px; }
.np-card .artist { font-size: 14px; color: var(--ink-mid); }
.np-card .prog { height: 3px; background: var(--edge); border-radius: 2px; margin-top: 12px; overflow: hidden; }
.np-card .prog i { display: block; height: 100%; width: 0; background: var(--primary); transition: width 1s linear; }
.next-ad { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 13%, transparent); border: 1px solid var(--accent-deep); display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--accent); font-weight: 600; font-size: 13px; }
.next-ad .c { font-weight: 700; font-size: 15px; }
.pace { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.pace button { flex-direction: column; gap: 2px; min-height: 58px; color: var(--ink-mid); background: var(--surface); }
.pace button .n { font-size: 14px; font-weight: 600; }
.pace button .b { font-size: 11px; color: var(--ink-dim); }
.pace button[aria-pressed="true"] { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 16%, var(--surface)); color: var(--ink); }
.pace button[aria-pressed="true"] .b { color: var(--primary-lit); }
.pace-note { font-size: 12px; color: var(--ink-dim); margin-top: 8px; line-height: 1.45; min-height: 34px; }
.pace-note b { color: var(--ink-mid); }
.mic { min-height: 56px; font-size: 15px; width: 100%; }
.mic-note { font-size: 12px; color: var(--ink-dim); margin-top: 8px; line-height: 1.45; }
.transport { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.transport button { min-height: 50px; }
.volume .row { font-size: 12px; color: var(--ink-dim); justify-content: space-between; margin-bottom: 2px; }
.queue { list-style: none; margin: 0; padding: 0; }
.queue li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--edge-soft); font-size: 14px; }
.queue li:last-child { border-bottom: 0; }
.queue li .t { min-width: 0; }
.queue li .t span { color: var(--ink-mid); font-size: 12px; display: block; }
.queue li.ad .t b { color: var(--accent); }

/* ---------- Hoja (bottom sheet) ---------- */
.sheet-back { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.sheet { background: var(--surface); border: 1px solid var(--edge); border-radius: 14px 14px 0 0; width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; padding: 14px 16px calc(20px + var(--safe-b)); animation: up .18s ease-out; }
@keyframes up { from { transform: translateY(24px) } to { transform: none } }
.sheet .grip { width: 40px; height: 4px; border-radius: 2px; background: var(--edge); margin: 0 auto 12px; }
.sheet h2 { margin-bottom: 10px; }
.sheet .actions { display: flex; gap: 8px; margin-top: 16px; }
.sheet .actions button { flex: 1; }
@media (min-width: 900px) { .sheet-back { align-items: center; } .sheet { border-radius: 10px; } }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bar-h) + var(--nav-h) + var(--safe-b) + 16px); z-index: 60; background: var(--surface-hi); border: 1px solid var(--primary); color: var(--ink); padding: 11px 16px; border-radius: var(--radius); max-width: min(92vw, 420px); font-size: 14px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.6); }
.toast.err { border-color: var(--alert); }
.toast.ok { border-color: var(--ok); }
.app.manager ~ .toast, .toast.low { bottom: calc(24px + var(--safe-b)); }
@media (min-width: 900px) { .toast { bottom: calc(var(--bar-h) + 20px); } }

/* ---------- Reproductor en navegador ---------- */
.player-screen { min-height: 100vh; display: grid; grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; background: var(--ground); }
/* La pantalla del player no tiene barra lateral: nada va a la columna 2 */
.player-screen > .topbar, .player-screen > .center, .player-screen > .foot { grid-column: 1; }
.player-screen .center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; }
.player-screen .big-iso { width: min(60vw, 320px); }
.player-screen .state { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 7vw, 54px); letter-spacing: .04em; }
.player-screen .state.on { color: var(--ok); }
.player-screen .state.off { color: var(--warn); }
.player-screen .title { font-size: clamp(18px, 4vw, 28px); font-weight: 600; }
.player-screen .sub { color: var(--ink-mid); font-size: 15px; }
.player-screen .foot { padding: 14px 20px calc(14px + var(--safe-b)); border-top: 1px solid var(--edge-soft); display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-dim); flex-wrap: wrap; }
.player-screen .pairbox { max-width: 380px; width: 100%; display: flex; flex-direction: column; gap: 10px; }
.player-screen .pairbox input { text-align: center; font-family: var(--display); font-size: 24px; letter-spacing: .12em; text-transform: uppercase; }
.player-screen .start { min-height: 64px; font-size: 18px; width: min(100%, 380px); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* --- Contenido de pantallas ------------------------------------------- */
.tv-preview { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.tv-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.tv-preview .tv-label { position: absolute; left: 10px; bottom: 8px; z-index: 2; font-size: 11px; padding: 3px 9px; border-radius: 20px; background: rgba(0,0,0,.6); color: #fff; }
.loop-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line, rgba(128,128,128,.2)); }
.loop-item .thumb { position: relative; flex: none; width: 96px; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #000; }
.loop-item .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.loop-item .info { flex: 1; min-width: 0; }
.loop-item .info b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loop-item .info span { font-size: 12px; opacity: .7; }
.loop-item .secs { width: 64px; text-align: center; padding: 6px 4px; }
.loop-item .btns { display: flex; gap: 2px; flex: none; }
.usage { height: 6px; border-radius: 6px; background: rgba(128,128,128,.25); overflow: hidden; margin-top: 6px; }
.usage > i { display: block; height: 100%; background: var(--primary, #2e6bff); }
.rights { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.4; padding: 10px; border-radius: 8px; background: rgba(128,128,128,.12); }
.rights input { margin-top: 3px; flex: none; width: 18px; height: 18px; }
@media (max-width: 560px) {
  .loop-item { flex-wrap: wrap; }
  .loop-item .info { flex-basis: calc(100% - 110px); }
  .loop-item .btns { margin-left: auto; }
}
.vbadge { position: absolute; right: 4px; bottom: 4px; z-index: 2; font-size: 10px; padding: 1px 6px; border-radius: 10px; background: rgba(0,0,0,.7); color: #fff; }
