:root {
  --bg: #101113; --side: #0C0D0F; --panel: #17181B; --row: #1D1F23; --line: #2A2D33; --line2: #22252A; --ctl: #3A3D44;
  --tx: #EDEDEF; --tx2: #D5D6DA; --mut: #A1A4AB; --faint: #8A8E97;
  --acc: #C8F04A; --acc2: #DDF78A; --blue: #6AA7FF; --amber: #F2B544; --green: #7BD88F; --red: #FF7A7A;
  --mono: 'Geist Mono', ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--tx); font-family: 'Geist', system-ui, sans-serif; }
a { color: var(--acc); } a:hover { color: var(--acc2); }
.app { min-height: 100vh; display: flex; flex-wrap: wrap; align-items: stretch; }

/* menú lateral */
.side { flex: 1 1 240px; max-width: 300px; padding: 24px 16px; background: var(--side); border-right: 1px solid var(--line2);
  display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.logo { display: flex; align-items: center; gap: 10px; padding: 0 8px; text-decoration: none; color: var(--tx); }
.logo b { font-weight: 600; font-size: 16px; display: block; } .logo small { font-size: 12px; color: var(--faint); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 42px; border-radius: 10px;
  text-decoration: none; font-size: 14px; font-weight: 500; color: var(--mut); }
.nav a:hover { background: #16171A; color: var(--tx); }
.nav a.on { background: var(--row); color: var(--tx); }
.nav a .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.nav a span.l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav .sec { padding: 16px 12px 6px; font-size: 12px; color: var(--faint); letter-spacing: .06em; text-transform: uppercase; }
.badge { font-size: 11px; color: #101113; background: var(--amber); border-radius: 999px; padding: 2px 7px; font-weight: 600; }
.badge.blue { background: var(--blue); } .badge.red { background: var(--red); }
.sidefoot { margin-top: auto; padding: 12px; border: 1px solid var(--line2); border-radius: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; text-decoration: none; color: var(--tx); }
.sidefoot:hover { border-color: var(--ctl); color: var(--tx); }
.sidefoot .m { font-size: 12px; color: var(--faint); font-family: var(--mono); }

/* contenido */
main { flex: 999 1 560px; min-width: 0; padding: 32px clamp(16px, 3vw, 44px) 64px; display: flex; flex-direction: column; gap: 24px; }
header.top { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; }
header.top .crumb { font-size: 13px; color: var(--faint); font-family: var(--mono); }
header.top .crumb a { color: var(--faint); text-decoration: none; } header.top .crumb a:hover { color: var(--tx); }
h1 { margin: 6px 0 0; font-size: 34px; line-height: 1.1; font-weight: 600; letter-spacing: -.02em; }
header.top p { margin: 6px 0 0; font-size: 15px; color: var(--mut); max-width: 700px; line-height: 1.5; }
.acts { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
h2 { margin: 0; font-size: 18px; font-weight: 600; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel .sub { margin: 0; font-size: 13px; color: var(--faint); line-height: 1.45; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.cols > * { flex: 1 1 420px; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--row); min-width: 0; }
.muted { color: var(--mut); } .faint { color: var(--faint); } .mono { font-family: var(--mono); }
.small { font-size: 13px; } .tiny { font-size: 12px; }
.pill { font-size: 12px; padding: 4px 9px; border-radius: 999px; background: var(--row); color: var(--tx2); white-space: nowrap; }
.pill.ok { color: var(--green); } .pill.warn { color: var(--amber); } .pill.bad { color: var(--red); } .pill.run { color: var(--blue); }
.st { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.st i { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }

/* botones y formularios */
.btn { font: inherit; font-size: 14px; font-weight: 600; padding: 10px 16px; min-height: 42px; border-radius: 10px; border: 0;
  background: var(--acc); color: #101113; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { background: var(--acc2); color: #101113; }
.btn.s { background: transparent; color: var(--tx); border: 1px solid var(--ctl); font-weight: 500; }
.btn.s:hover { border-color: #5A5E66; background: #16171A; color: var(--tx); }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.btn.danger { background: transparent; border: 1px solid #5a2f2f; color: var(--red); }
.btn[disabled] { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; font-size: 14px; color: var(--tx); background: var(--bg); border: 1px solid var(--ctl);
  border-radius: 10px; padding: 10px 12px; min-height: 42px; width: 100%; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--acc); outline-offset: 0; border-color: transparent; }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--mut); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; accent-color: var(--acc); }
input[type=color] { padding: 2px; width: 44px; height: 42px; flex: none; }
.chk { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; min-height: 84px;
  border: 1px dashed #4A4D55; border-radius: 12px; cursor: pointer; text-align: center; color: var(--mut); font-size: 14px; position: relative; }
.drop:hover { border-color: var(--acc); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop b { color: var(--tx); font-weight: 500; }

/* tablas */
.tbl { overflow-x: auto; padding: 0; }
.tbl table { width: 100%; border-collapse: collapse; min-width: 760px; }
.tbl th { text-align: left; font-size: 12px; color: var(--faint); letter-spacing: .04em; text-transform: uppercase; font-weight: 500; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--line2); font-size: 14px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: #1A1B1F; }

/* etapas */
.steps { display: flex; gap: 3px; min-width: 150px; }
.steps span { flex: 1; height: 6px; border-radius: 3px; background: var(--ctl); }
.steps span.d { background: var(--green); } .steps span.r { background: var(--blue); } .steps span.w { background: var(--amber); } .steps span.e { background: var(--red); }
.bar { display: flex; gap: 3px; } .bar span { height: 8px; border-radius: 4px; }

/* marca */
.sw { display: flex; gap: 6px; } .sw span { flex: 1; height: 34px; border-radius: 8px; border: 1px solid transparent; }
.sw span.empty { border: 1px dashed #4A4D55; }

/* revisión */
.rev { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.player { flex: 0 1 380px; min-width: 260px; }
.player video { width: 100%; aspect-ratio: 9 / 16; background: #000; border-radius: 14px; display: block; }
.player .ph { width: 100%; aspect-ratio: 9 / 16; border-radius: 14px; background: var(--row); display: flex; align-items: center; justify-content: center; color: var(--faint); text-align: center; padding: 24px; font-size: 14px; }
.revside { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.score { display: grid; grid-template-columns: 120px 1fr 28px; gap: 10px; align-items: center; font-size: 13px; }
.score .t { height: 8px; border-radius: 4px; background: var(--ctl); overflow: hidden; } .score .t i { display: block; height: 100%; border-radius: 4px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.thumbs a img { width: 100%; border-radius: 8px; display: block; border: 1px solid var(--line); }
.ev { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; }
.ev div { font-size: 13px; display: grid; grid-template-columns: 54px 1fr; gap: 10px; }
.ev time { color: var(--faint); font-family: var(--mono); font-size: 12px; }
pre.log { margin: 0; max-height: 320px; overflow: auto; font-size: 12px; font-family: var(--mono); color: var(--mut); white-space: pre-wrap; background: var(--bg); border-radius: 10px; padding: 12px; }
details summary { cursor: pointer; font-size: 14px; color: var(--mut); }
.note { padding: 12px 14px; border-radius: 10px; font-size: 14px; line-height: 1.45; }
.note.ok { background: #1D2414; color: #DDF78A; } .note.warn { background: #2A2314; color: #F5D38A; } .note.bad { background: #2A1717; color: #FFB3B3; } .note.info { background: #15202E; color: #B9D4FF; }
.copy { white-space: pre-wrap; font-size: 13px; line-height: 1.5; color: var(--tx2); max-height: 220px; overflow: auto; }

#toast { position: fixed; right: 20px; bottom: 20px; max-width: 420px; padding: 12px 16px; border-radius: 12px; background: #24272D; border: 1px solid var(--ctl); font-size: 14px; display: none; z-index: 9; }
#toast.bad { border-color: #7a3a3a; color: #FFB3B3; }
.empty { padding: 28px; text-align: center; color: var(--faint); font-size: 14px; }

@media (max-width: 760px) {
  .side { position: static; height: auto; max-width: none; flex-basis: 100%; }
  h1 { font-size: 28px; }
}

/* ejemplos */
.chip-ej { font-size: 11px; font-weight: 600; color: #B9D4FF; border: 1px dashed #4D6A94; border-radius: 999px; padding: 2px 8px; vertical-align: middle; white-space: nowrap; }

/* cola de revisión */
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.rc { padding: 12px; gap: 10px; }
.rc-v { position: relative; display: block; border-radius: 10px; overflow: hidden; background: #000; }
.rc-v video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; display: block; pointer-events: none; }
.rc-n { position: absolute; top: 8px; left: 8px; font-size: 12px; font-weight: 600; font-family: var(--mono); background: rgba(16,17,19,.85); padding: 3px 8px; border-radius: 999px; }
.rc .btn { width: 100%; }

/* reproductor de la revisión */
.vtabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.vtabs button { font: inherit; font-size: 13px; font-weight: 600; padding: 7px 12px; min-height: 34px; border-radius: 999px; border: 1px solid var(--ctl); background: transparent; color: var(--mut); cursor: pointer; }
.vtabs button.on { background: var(--acc); border-color: var(--acc); color: #101113; }
.tl { position: relative; height: 26px; margin-top: 10px; border-radius: 8px; background: var(--row); cursor: pointer; }
.tl-ph { position: absolute; top: 3px; bottom: 3px; width: 2px; background: var(--tx); left: 0; border-radius: 1px; pointer-events: none; }
.tl-m { position: absolute; top: 4px; width: 12px; height: 18px; margin-left: -6px; border-radius: 4px; border: 2px solid var(--bg); cursor: pointer; padding: 0; }
.tl-m.warn { background: var(--amber); } .tl-m.run { background: var(--blue); } .tl-m.ok { background: var(--green); }
.tl-m:hover, .tl-m:focus-visible { transform: scale(1.25); outline: none; }
.player video#player { max-height: 66vh; object-fit: contain; }

/* tu revisión */
.tu { border-color: #4A4420; box-shadow: inset 3px 0 0 var(--amber); }
.addc { display: flex; flex-direction: column; gap: 8px; }
.corr { align-items: flex-start; }
.corr .tc { font: inherit; font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--acc); background: #101113; border: 1px solid var(--ctl); border-radius: 8px; padding: 4px 8px; cursor: pointer; flex: none; min-width: 64px; }
.corr .tc[disabled] { color: var(--faint); cursor: default; }

/* formatos entregados */
.fmts { display: grid; grid-template-columns: 0.56fr 1fr 1.78fr; gap: 12px; align-items: end; }
.fmt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fmt video { width: 100%; background: #000; border-radius: 8px; display: block; }
.fph { width: 100%; border-radius: 8px; border: 1px dashed #4A4D55; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 12px; color: var(--faint); padding: 8px; }
@media (max-width: 760px) { .fmts { grid-template-columns: 1fr; } }

/* propuestas de captura (web / PDF) */
.prop { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.psw { display: flex; flex-wrap: wrap; gap: 8px; }
.psw span { display: flex; flex-direction: column; gap: 3px; width: 92px; font-size: 11px; }
.psw i { display: block; height: 34px; border-radius: 8px; border: 1px solid var(--line); }
.psw b { font-weight: 500; } .psw em { font-style: normal; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pimg { display: flex; flex-direction: column; gap: 6px; }
.pimg img { background: repeating-conic-gradient(#2A2D33 0 25%, #1D1F23 0 50%) 0 0 / 16px 16px; object-fit: contain; aspect-ratio: 4 / 3; }

/* explorador de Drive */
.explorer { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; border: 1px solid var(--ctl); background: var(--panel); max-height: 420px; overflow-y: auto; }

/* VSL (16:9) */
.player.wide { flex: 1 1 720px; max-width: 980px; }
.player.wide video#player { aspect-ratio: 16 / 9; max-height: none; }
.rc-v.h video { aspect-ratio: 16 / 9; }

/* biblioteca de animaciones */
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.bib img { width: 100%; border-radius: 10px; display: block; border: 1px solid var(--line); }

/* material de cada video */
.mat { display: flex; flex-direction: column; gap: 14px; }
.mat .cols > * { flex: 1 1 300px; display: flex; flex-direction: column; gap: 8px; }

/* cuadro de correcciones: más grande para leer bien lo que escribís */
.addc textarea { min-height: 104px; font-size: 15px; line-height: 1.45; resize: vertical; }

/* acceso de revisor: mira todo y marca correcciones; lo demás no se muestra (el servidor también lo bloquea) */
body.ro [data-a]:not([data-a^="corr-"]):not([data-a="seek"]):not([data-a="ver"]) { display: none !important; }
body.ro input[type=file], body.ro .drop, body.ro a[href$="/nueva"], body.ro a.btn[href*="/branding"], body.ro a.btn[href*="/carpetas"],
body.ro a.sidefoot[href="#/ajustes"], body.ro .mat { display: none !important; }
.rofoot { margin: 10px 8px 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line2); font-size: 12px; line-height: 1.45; color: var(--muted, #9aa0a6); }
.rofoot b { display: block; color: var(--acc); font-size: 12px; margin-bottom: 2px; }
