/* Estudio: solo alias del sistema de diseño SW (themes.css). Sin colores propios. */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg-app);
  background-color: var(--bg-page);
  color: var(--text-primary);
  font: var(--body-size) / var(--body-leading) var(--font-body);
  display: flex;
  flex-direction: column;
}
a { color: var(--text-link); text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }

.icon { width: var(--icon-sm); height: var(--icon-sm); fill: none; stroke: currentColor; stroke-width: var(--icon-stroke, 2); stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon.lg { width: var(--icon-xl); height: var(--icon-xl); }

.top {
  display: flex; align-items: center; gap: var(--space-6);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-soft);
}
.brand { display: flex; align-items: center; gap: var(--space-2); color: var(--text-primary); font-weight: var(--heading-weight); }
.top nav { display: flex; gap: var(--space-1); }
.user { margin-inline-start: auto; display: flex; align-items: center; gap: var(--space-3); }
.btn.small { height: var(--control-h-sm); padding: 0 var(--space-3); }
.top nav a { white-space: nowrap; padding: var(--space-1-5) var(--space-3); border-radius: var(--radius-nav-item); color: var(--text-secondary); }
.top nav a:hover { background: var(--surface-soft); }
.top nav a.active { background: var(--accent-fill); color: var(--accent-text); }

.layout { flex: 1; min-height: 0; display: flex; margin: var(--space-3); border: 1px solid var(--border-soft); border-radius: var(--radius-panel); background: var(--surface-card); overflow: hidden; }
.list { width: 360px; min-width: 280px; border-inline-end: 1px solid var(--border-soft); display: flex; flex-direction: column; }
.list-head { padding: var(--space-4); border-bottom: 1px solid var(--border-soft); display: flex; flex-direction: column; gap: var(--space-3); }
h1 { font-size: var(--text-lg); font-weight: var(--heading-weight); margin: 0; }
h2 { font-size: var(--text-xl); font-weight: var(--heading-weight); line-height: 1.25; margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: var(--space-1-5); }
.chip { height: 28px; padding: 0 var(--space-2-5); border-radius: var(--radius-chip); border: 0; background: var(--surface-muted); color: var(--text-secondary); font-size: var(--text-xs); font-weight: 600; cursor: pointer; }
.chip.on { background: var(--accent-fill); color: var(--accent-text); }

.scripts { flex: 1; overflow-y: auto; }
.row { width: 100%; text-align: start; padding: var(--space-4); border: 0; border-bottom: 1px solid var(--border-soft); background: none; display: flex; flex-direction: column; gap: var(--space-1-5); cursor: pointer; }
.row:hover { background: var(--surface-soft); }
.row.on { background: var(--accent-soft); }
.row-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; }
.row-title { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 var(--space-2); border-radius: var(--radius-chip); font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge.accent { background: var(--accent-fill); color: var(--accent-text); }
.badge.highlight { background: var(--highlight-soft); color: var(--highlight); }
.badge.muted { background: var(--surface-muted); color: var(--text-secondary); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }

.detail { flex: 1; min-width: 0; overflow-y: auto; }
.empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); color: var(--text-subtle); text-align: center; padding: var(--space-6); }
.detail-head { padding: var(--space-6) var(--space-6) 0; display: flex; flex-direction: column; gap: var(--space-2); }
.notes { border: 1px solid var(--border-default); background: var(--warning-soft); border-radius: var(--radius-control); padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-1); }
.detail-body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--space-6); padding: var(--space-6); }
.col { display: flex; flex-direction: column; gap: var(--space-4); }

.field { display: flex; flex-direction: column; gap: var(--space-1-5); }
.label { font-size: 11px; font-weight: var(--label-weight); text-transform: uppercase; letter-spacing: var(--label-tracking); color: var(--text-subtle); }
.hint { font-size: var(--text-xs); color: var(--text-subtle); }
input, textarea, select { width: 100%; border-radius: var(--radius-input); background: var(--surface-input); border: 1px solid var(--border-default); padding: var(--space-2-5) var(--space-3); }
textarea { resize: vertical; line-height: 1.55; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
:disabled { opacity: 0.6; cursor: not-allowed; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.grid2.narrow { grid-template-columns: 1fr 120px; }

.actions { display: flex; flex-wrap: wrap; gap: var(--space-2-5); align-items: center; }
.actions.end { align-items: flex-end; }
.grow { flex: 1; min-width: 220px; }
.btn { height: var(--control-h); padding: 0 var(--space-4); border-radius: var(--radius-button); border: 1px solid var(--border-default); background: var(--surface-muted); font-weight: var(--button-weight); display: inline-flex; align-items: center; gap: var(--space-1-5); cursor: pointer; }
.btn:hover:not(:disabled) { border-color: var(--border-strong); }
.btn.primary { background: var(--accent-solid); border-color: var(--accent-solid); color: var(--text-on-accent); font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn.ghost { background: none; }

.card { border: 1px solid var(--border-default); border-radius: var(--radius-card); padding: var(--card-pad); display: flex; flex-direction: column; gap: var(--space-3); }
.card.tight { padding: var(--space-2-5); gap: var(--space-1); border-radius: var(--radius-control); }
.source { color: var(--text-primary); }
.source:hover { border-color: var(--border-strong); }
.source .strong { display: inline-flex; align-items: center; gap: var(--space-1-5); }
.video { width: 100%; max-width: 320px; border-radius: var(--radius-card); border: 1px solid var(--border-default); }
.facts { margin: 0; padding-inline-start: var(--space-5); display: flex; flex-direction: column; gap: var(--space-1); }

.small { font-size: var(--text-xs); }
.strong { font-weight: 600; }
.muted { color: var(--text-secondary); }
.accent { color: var(--accent-text); }
.warn { color: var(--attention); }
.danger { color: var(--danger); }
.pad { padding: var(--space-4); margin: 0; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.toast { position: fixed; bottom: var(--space-4); left: 50%; transform: translateX(-50%); padding: var(--space-2-5) var(--space-4); border-radius: var(--radius-control); background: var(--surface-raised); border: 1px solid var(--border-default); box-shadow: var(--shadow-md); max-width: calc(100vw - 32px); }
.toast.ok { border-color: var(--border-strong); }
.toast.error { border-color: var(--danger); color: var(--danger); }

@media (max-width: 900px) {
  .layout { flex-direction: column; margin: 0; border-radius: 0; border: 0; }
  .list { width: 100%; max-height: 40vh; border-inline-end: 0; border-bottom: 1px solid var(--border-soft); }
  .detail-body { grid-template-columns: 1fr; padding: var(--space-4); }
  .detail-head { padding: var(--space-4) var(--space-4) 0; }
  .grid2 { grid-template-columns: 1fr; }
}

/* Login */
body.center { align-items: center; justify-content: center; padding: var(--space-4); }
.login { width: 100%; max-width: 360px; background: var(--surface-card); box-shadow: var(--shadow-md); gap: var(--space-4); }
.login .brand { justify-content: center; font-size: var(--text-lg); }
.login .btn { justify-content: center; }

/* Bandeja */
.count:not(:empty) { display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; margin-inline-start: 4px; align-items: center; justify-content: center; border-radius: var(--radius-chip); background: var(--highlight); color: var(--text-on-highlight); font-size: 11px; font-weight: 700; }
.row-badges { display: inline-flex; gap: var(--space-1); }
.preview { width: 100%; max-width: 360px; border-radius: var(--radius-card); border: 1px solid var(--border-default); }
details > summary { cursor: pointer; }
details[open] > summary { margin-bottom: var(--space-3); }

/* Páginas de configuración (Fuentes, Actividad) */
.page { flex: 1; overflow-y: auto; padding: var(--space-6) max(var(--space-6), calc((100% - 1120px) / 2)); display: flex; flex-direction: column; gap: var(--space-5); width: 100%; }
.page-head h1 { font-size: var(--text-2xl); }
.page-head p { margin: var(--space-1) 0 0; }
.block { background: var(--surface-card); }
.block h2 { font-size: var(--text-lg); }
.block > summary { display: flex; align-items: center; gap: var(--space-1-5); list-style: none; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: start; font-size: 11px; font-weight: var(--label-weight); text-transform: uppercase; letter-spacing: var(--label-tracking); color: var(--text-subtle); padding: var(--space-2); border-bottom: 1px solid var(--border-default); }
.table td { padding: var(--space-3) var(--space-2); border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.table .num { font-family: var(--font-numeric); }
.url { display: block; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-subtle); }
.row-actions { display: flex; gap: var(--space-1); flex-wrap: wrap; justify-content: flex-end; }
.check { display: flex; align-items: center; gap: var(--space-2); }
.check input { width: auto; }
.preview-feed { border: 1px dashed var(--border-default); border-radius: var(--radius-control); padding: var(--space-3); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--space-3); }
.stat { display: flex; flex-direction: column; gap: 2px; padding: var(--space-3); border-radius: var(--radius-control); background: var(--surface-soft); }
.stat strong { font-size: var(--text-xl); font-family: var(--font-numeric); }
.log { display: flex; flex-direction: column; }
.log-row { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-2-5) 0; border-bottom: 1px solid var(--border-soft); }
.log-row .when { min-width: 130px; }
.log-row .badge { flex: none; }
.more { align-self: center; margin-top: var(--space-3); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.col.tight { gap: var(--space-2); }
h3.label { margin: var(--space-4) 0 var(--space-2); }
.story { width: min(760px, calc(100vw - 32px)); max-height: 85vh; border: 1px solid var(--border-default); border-radius: var(--radius-panel); background: var(--surface-raised); color: var(--text-primary); padding: var(--space-6); box-shadow: var(--shadow-lg); }
.story::backdrop { background: var(--scrim); }
.story .close { float: right; }
@media (max-width: 900px) {
  .page { padding: var(--space-4); }
  .log-row { flex-wrap: wrap; }
  .log-row .when { min-width: 0; width: 100%; }
  .top { flex-wrap: wrap; gap: var(--space-2); }
}

/* Medio y Presentadores */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.brand-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--space-6); align-items: start; }
input[type="color"] { height: var(--control-h); padding: 4px; cursor: pointer; }
.brand-preview { position: relative; aspect-ratio: 4 / 5; max-width: 280px; border-radius: var(--radius-control); padding: 18px 16px; display: flex; flex-direction: column; justify-content: center; gap: 8px; overflow: hidden; font-family: Inter, var(--font-sans); }
.brand-preview .bar { position: absolute; top: 0; left: 0; right: 0; height: 6px; }
.brand-preview .outlet { position: absolute; top: 22px; left: 16px; font-size: 11px; font-weight: 700; }
.brand-preview strong { font-size: 22px; line-height: 1.15; }
.brand-preview .src { position: absolute; bottom: 14px; left: 16px; font-size: 10px; }
.sticky-actions { position: sticky; bottom: 0; padding: var(--space-3) 0; background: linear-gradient(transparent, var(--bg-page) 40%); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--space-4); }
.presenter-head { display: flex; gap: var(--space-4); align-items: center; }
.avatar { width: 72px; height: 72px; border-radius: var(--radius-full); object-fit: cover; object-position: top; border: 2px solid var(--border-default); flex: none; }
.avatar.empty { display: flex; align-items: center; justify-content: center; font-size: var(--text-2xl); font-weight: 700; background: var(--surface-muted); }
@media (max-width: 900px) {
  .grid3, .brand-row { grid-template-columns: 1fr; }
}

.outlet-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); flex-wrap: wrap; }
.new-outlet { position: relative; }
.new-outlet > summary { list-style: none; }
.new-outlet[open] > .card { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: min(420px, 90vw); background: var(--surface-raised); box-shadow: var(--shadow-md); }
.avatar-new { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap; }

.networks { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-3); }
.network { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: var(--space-3); border-radius: var(--radius-control); background: var(--surface-soft); }

/* Cómo funciona */
.steps { margin: 0; padding-inline-start: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.steps p { margin: var(--space-1) 0 0; }
.plain { margin: 0; padding-inline-start: var(--space-5); display: flex; flex-direction: column; gap: var(--space-1-5); }
.glossary { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-4); }
.glossary dt { font-weight: 600; }
.glossary dd { margin: 0; color: var(--text-secondary); }
@media (max-width: 640px) { .glossary { grid-template-columns: 1fr; } .glossary dd { margin-bottom: var(--space-2); } }

/* Inicio y Ajustes */
.missions { flex: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-3); }
.mission { flex-direction: row; align-items: center; gap: var(--space-3); padding: var(--space-4); color: var(--text-primary); background: var(--surface-card); }
.mission:hover { border-color: var(--accent-solid); }
.mission:hover .mission-go { color: var(--accent-text); transform: translateX(2px); }
.mission-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.mission-text strong { font-size: var(--text-md, 1rem); }
.mission-icon { flex: none; display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: var(--radius-control); background: var(--accent-fill); color: var(--accent-text); }
.mission-go { font-size: 22px; color: var(--text-subtle); transition: transform .15s; }
.home-panels { flex: none; align-items: start; }
.mini-list { display: flex; flex-direction: column; }
.mini-row { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-1); border-bottom: 1px solid var(--border-soft); color: var(--text-primary); border-radius: 6px; }
.mini-row:last-child { border-bottom: 0; }
.mini-row:hover { background: var(--surface-soft); }
.mini-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-sm, .875rem); }
.nowrap { white-space: nowrap; }
.back { align-self: flex-start; }

/* Crear vídeo */
.step h2 { display: flex; align-items: center; gap: var(--space-2); }
.step .num { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent-solid); color: var(--text-on-accent); font-size: var(--text-xs); }
.step.off { opacity: .45; pointer-events: none; }
.create { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--space-4); align-items: start; }
.create-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.btn.wide { width: 100%; justify-content: center; }
.picks { display: flex; flex-direction: column; gap: var(--space-1-5); max-height: min(560px, calc(100vh - 260px)); overflow-y: auto; margin: 0 calc(-1 * var(--space-1)); padding: 0 var(--space-1); }
.picks.people { flex-direction: row; flex-wrap: wrap; max-height: none; }
.pick { text-align: start; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2-5) var(--space-3); border: 1px solid var(--border-default); border-radius: var(--radius-control); background: none; cursor: pointer; }
.pick:hover { border-color: var(--border-strong); }
.pick.on { border-color: var(--accent-solid); background: var(--accent-soft); }
.pick-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.score { flex: none; min-width: 34px; height: 26px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-chip); background: var(--surface-muted); font-family: var(--font-numeric); font-size: var(--text-xs); font-weight: 600; color: var(--text-secondary); }
.score.hot { background: var(--accent-fill); color: var(--accent-text); }
.picks.people { display: grid; grid-template-columns: repeat(2, 1fr); }
.pick.person { flex-direction: column; justify-content: center; gap: var(--space-2); padding: var(--space-3); }
.pick.person .avatar { width: 64px; height: 64px; }
.tracks { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--space-3); }
@media (max-width: 900px) { .create { grid-template-columns: 1fr; } .create-side { position: static; } }
.track { padding: var(--space-3); border: 1px solid var(--border-soft); border-radius: var(--radius-control); display: flex; flex-direction: column; gap: var(--space-2); }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; font-size: 11px; }
.stepper li { padding-top: 6px; border-top: 4px solid var(--surface-muted); color: var(--text-subtle); }
.stepper li.done { border-color: var(--accent-solid); color: var(--text-secondary); }
.stepper li.now { border-color: var(--highlight); color: var(--text-primary); font-weight: 600; }

/* Publicar a mano */
.manual { border-color: var(--accent-solid); }
.decide { gap: var(--space-3); }

/* Calendario */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.cal-head h1::first-letter { text-transform: uppercase; }
.legend { display: flex; gap: var(--space-4); flex-wrap: wrap; color: var(--text-secondary); }
.dot::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; background: var(--c); border: 1px dashed transparent; }
.todo { --c: transparent; } .dot.todo::before { border-color: var(--text-subtle); }
.planned { --c: var(--accent-solid); }
.done { --c: var(--surface-muted); }
.error { --c: var(--danger); }
.calendar { flex: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border-soft); border-radius: var(--radius-panel); overflow: hidden; background: var(--surface-card); }
.dow { padding: var(--space-2); font-size: 11px; font-weight: var(--label-weight); text-transform: uppercase; color: var(--text-subtle); border-bottom: 1px solid var(--border-soft); }
.day { min-height: 104px; padding: var(--space-1-5); border-inline-end: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.day.other { background: var(--surface-soft); }
.day.other .day-num { color: var(--text-subtle); }
.day-num { font-size: var(--text-xs); font-weight: 600; }
.day.today .day-num { color: var(--accent-text); }
.day-num .wd { display: none; }
.ev { display: flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 6px; font-size: 11px; color: var(--text-primary); background: var(--c); min-width: 0; border: 1px solid transparent; }
.ev.planned { color: var(--text-on-accent); }
.ev.error { color: #fff; }
.ev.todo { border: 1px dashed var(--border-strong); color: var(--text-secondary); }
.ev .icon { width: 12px; height: 12px; }
.ev-time { font-family: var(--font-numeric); flex: none; }
.ev-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) {
  .calendar { grid-template-columns: 1fr; }
  .dow, .day.empty-day { display: none; }
  .day { min-height: 0; border-inline-end: 0; padding: var(--space-2-5); }
  .day-num .wd { display: inline; }
  .ev { font-size: var(--text-xs); padding: 4px 8px; }
}
@media (max-width: 640px) {
  .top nav { order: 3; width: 100%; overflow-x: auto; }
  .top nav a { padding: var(--space-1-5) var(--space-2); }
}

/* Actividad en tiempo real, cargas y diálogos */
.spinner { display: inline-block; width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid var(--border-default); border-top-color: var(--accent-solid); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 50; pointer-events: none; opacity: 0; transition: opacity .2s;
  background: linear-gradient(90deg, transparent, var(--accent-solid), transparent); background-size: 40% 100%; background-repeat: no-repeat; }
body.busy .progress { opacity: 1; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.activity { position: relative; margin-inline-start: auto; }
.activity + .user { margin-inline-start: var(--space-3); }
.activity-idle { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dot-ok { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-solid); }
.activity-btn { gap: var(--space-2); }
.activity-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: min(360px, 90vw); background: var(--surface-raised); box-shadow: var(--shadow-md); padding: var(--space-2); gap: 0; }
.activity-row { display: flex; gap: var(--space-2-5); align-items: flex-start; padding: var(--space-2); border-radius: 6px; color: var(--text-primary); }
.activity-row:hover { background: var(--surface-soft); }
.activity-row .spinner { margin-top: 2px; }
.loading { flex-direction: row; align-items: center; gap: var(--space-3); }
.loading .spinner { width: 22px; height: 22px; border-width: 3px; }
.toast { display: flex; align-items: center; gap: var(--space-3); }
.toast-action { font-weight: 600; white-space: nowrap; }
.ask { width: min(440px, calc(100vw - 32px)); border: 1px solid var(--border-default); border-radius: var(--radius-panel); background: var(--surface-raised); color: var(--text-primary); padding: var(--space-5); box-shadow: var(--shadow-lg); }
.ask::backdrop { background: var(--scrim); }
.ask-body { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.ask-body p { margin: 0; }
.end-row { justify-content: flex-end; }
@media (max-width: 640px) { .activity-idle { display: none; } }

/* Métricas */
.table.metrics td.num, .num-col { text-align: end; font-family: var(--font-numeric); white-space: nowrap; }
.table .sort { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.clickable { cursor: pointer; }
.clickable:hover td { background: var(--surface-soft); }
.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--border-soft); stroke-width: 1; }
.chart .axis { fill: var(--text-subtle); font-size: 11px; font-family: var(--font-numeric); }
.chart .line { fill: none; stroke: var(--accent-solid); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .cross { stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .dot { fill: var(--accent-solid); stroke: var(--surface-card); stroke-width: 2; }
.chart-tip { position: absolute; top: 0; transform: translateX(-50%); padding: 4px 8px; border-radius: 6px; background: var(--surface-raised); border: 1px solid var(--border-default); box-shadow: var(--shadow-md); font-size: var(--text-xs); white-space: nowrap; pointer-events: none; }

/* Vista previa de subtítulos (Medios › Vídeo) */
.sub-preview { position: relative; width: 180px; aspect-ratio: 9 / 16; border-radius: var(--radius-control); overflow: hidden; display: flex; justify-content: center; padding: 8%;
  background: linear-gradient(160deg, #6b7c8f, #2a3440 60%, #1b222b); }
.sub-preview[data-format="16:9"] { width: 280px; aspect-ratio: 16 / 9; }
.sub-preview[data-format="1:1"] { width: 220px; aspect-ratio: 1; }
.sub-preview[data-format="4:5"] { width: 200px; aspect-ratio: 4 / 5; }
.sub-preview[data-position="bottom"] { align-items: flex-end; padding-bottom: 18%; }
.sub-preview[data-position="middle"] { align-items: center; }
.sub-preview[data-position="top"] { align-items: flex-start; }
.sub-line { font-family: Inter, var(--font-sans); font-weight: 800; font-size: 17px; text-align: center; line-height: 1.2; color: var(--sub-text);
  text-shadow: 0 0 2px var(--sub-outline), 0 0 2px var(--sub-outline), 0 0 3px var(--sub-outline), 0 0 3px var(--sub-outline); }
.sub-line .hl { color: var(--sub-hl); }
.sub-preview.upper .sub-line { text-transform: uppercase; }
.sub-preview.off .sub-line { opacity: .15; }
.field.end { justify-content: flex-end; }
.video-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-6); align-items: start; }
@media (max-width: 900px) { .video-row { grid-template-columns: 1fr; } }

/* Avisos del sistema */
.health { position: relative; }
.health-btn.error { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); font-weight: 600; }
.health-btn.warn { background: var(--warning-soft); border-color: var(--attention); color: var(--attention); font-weight: 600; }
.activity { display: flex; gap: var(--space-2); align-items: center; }
.health-dot { flex: none; width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; }
.health-dot.error { background: var(--danger); }
.health-dot.warn { background: var(--attention); }
.health-panel { border-color: var(--danger); }
.health-panel .activity-row { align-items: center; }
.health-btn { white-space: nowrap; }
