@font-face { font-family: Outfit; font-weight: 400; font-display: swap; src: url(fuentes/outfit-400.woff2) format('woff2'); }
@font-face { font-family: Outfit; font-weight: 500; font-display: swap; src: url(fuentes/outfit-500.woff2) format('woff2'); }
@font-face { font-family: Outfit; font-weight: 600; font-display: swap; src: url(fuentes/outfit-600.woff2) format('woff2'); }
@font-face { font-family: Outfit; font-weight: 700; font-display: swap; src: url(fuentes/outfit-700.woff2) format('woff2'); }
@font-face { font-family: Mono; font-weight: 500; font-display: swap; src: url(fuentes/jbmono-500.woff2) format('woff2'); }

/* ── Tokens (los nombres de pager.css incluidos) ───────────────────────── */
:root {
  --bg: #0b0a12; --surface: rgba(24, 21, 38, .72); --card: rgba(34, 30, 52, .78); --hover: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .09); --line-2: rgba(255, 255, 255, .18);
  --ink: #f2f0fa; --muted: #a29fb8; --faint: #6f6b88;
  --accent: #7c5cff; --accent-2: #ff5c9a; --accent-ink: #fff; --accent-ring: rgba(124, 92, 255, .38);
  --ok: #2fd18b; --warn: #ffb547; --bad: #ff5d6c; --info: #55b7ff;
  --blob1: #5b3cff; --blob2: #ff3d8b; --blob3: #00c2ff;
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, .7);
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
  --r: 16px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f2fb; --surface: rgba(255, 255, 255, .78); --card: rgba(255, 255, 255, .92); --hover: rgba(20, 10, 60, .05);
    --line: rgba(20, 10, 60, .1); --line-2: rgba(20, 10, 60, .2);
    --ink: #17142a; --muted: #5d5878; --faint: #8f8aa8;
    --accent: #6a46ff; --accent-ring: rgba(106, 70, 255, .3);
    --ok: #10a86a; --warn: #c97a00; --bad: #e03247; --info: #1a8de0;
    --blob1: #b8a6ff; --blob2: #ffb3d1; --blob3: #a6e6ff;
    --shadow: 0 18px 44px -20px rgba(40, 20, 100, .35);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 400 15px/1.45 Outfit, system-ui, sans-serif; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.mono { font-family: Mono, ui-monospace, monospace; font-size: .86em; }
.muted { color: var(--muted); }

/* Fondo animado: tres manchas que derivan despacio */
#fondo { position: fixed; inset: 0; z-index: -1; overflow: hidden; filter: blur(80px) saturate(1.2); opacity: .55; }
#fondo i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; animation: deriva 26s ease-in-out infinite alternate; }
#fondo i:nth-child(1) { background: var(--blob1); left: -12vmax; top: -14vmax; }
#fondo i:nth-child(2) { background: var(--blob2); right: -16vmax; top: 20vh; animation-duration: 32s; animation-delay: -8s; opacity: .7; }
#fondo i:nth-child(3) { background: var(--blob3); left: 25vw; bottom: -26vmax; animation-duration: 38s; animation-delay: -15s; opacity: .5; }
@keyframes deriva { to { transform: translate(8vmax, 6vmax) scale(1.15); } }

/* ── Controles ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); cursor: pointer; font-weight: 600;
  white-space: nowrap; transition: transform .25s var(--spring), background .2s, border-color .2s, box-shadow .25s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover:not(:disabled) { background: var(--hover); border-color: var(--line-2); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: scale(.96); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible, .campo:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
.btn.pri { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--accent-2))); border-color: transparent; color: #fff; box-shadow: 0 8px 24px -10px var(--accent); }
.btn.pri:hover:not(:disabled) { box-shadow: 0 12px 30px -10px var(--accent); background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 40%, var(--accent-2))); }
.btn.ok { background: var(--ok); border-color: transparent; color: #04140c; }
.btn.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); border-color: color-mix(in srgb, var(--warn) 50%, transparent); color: var(--warn); }
.btn.peligro { color: var(--bad); }
.btn.fantasma { background: transparent; border-color: transparent; }
.btn.chico { height: 32px; padding: 0 11px; font-size: .86rem; border-radius: 10px; }
.btn.icono { width: 40px; padding: 0; }
.btn svg { width: 18px; height: 18px; flex: none; }

.campo {
  width: 100%; height: 42px; padding: 0 13px; border: 1px solid var(--line-2); border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 55%, transparent); transition: border-color .2s, box-shadow .2s;
}
textarea.campo { height: auto; min-height: 74px; padding: 10px 13px; resize: vertical; }
select.campo { padding-right: 30px; }
.etq { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
.fila { display: flex; gap: 12px; flex-wrap: wrap; }
.fila > * { flex: 1 1 160px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.pildora {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 99px; font-size: .78rem;
  font-weight: 600; white-space: nowrap; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c);
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); transition: background .4s, color .4s, border-color .4s;
}
.pildora::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.e-revision { --c: var(--info); } .e-cambios { --c: var(--warn); } .e-aprobado { --c: var(--ok); }
.e-revision::before { animation: latido 1.8s ease-in-out infinite; }
@keyframes latido { 50% { opacity: .35; transform: scale(.7); } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: var(--shadow); }

/* ── Barra superior ────────────────────────────────────────────────────── */
#barra {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px max(16px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line); animation: bajar .5s var(--ease);
}
@keyframes bajar { from { transform: translateY(-100%); } }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; text-decoration: none; margin-right: 6px; }
.logo b { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.logo b svg { width: 18px; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 7px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; transition: background .2s, color .2s; }
.nav a:hover { color: var(--ink); background: var(--hover); }
.nav a.on { color: var(--ink); background: var(--hover); }
.esp { flex: 1; }
.campana { position: relative; }
.campana .n {
  position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent-2);
  color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; animation: brotar .4s var(--spring);
}
.campana.sacude svg { animation: sacudir .8s var(--ease); transform-origin: 50% 10%; }
@keyframes sacudir { 15% { transform: rotate(18deg); } 30% { transform: rotate(-15deg); } 45% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
@keyframes brotar { from { transform: scale(0); } }
.yo { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .8rem; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); flex: none; }
.yo small { display: block; color: var(--muted); font-size: .72rem; line-height: 1; }
.yo span { line-height: 1.15; font-weight: 600; font-size: .88rem; }

/* Menús desplegables (avisos, usuario) */
.menu {
  position: fixed; z-index: 40; min-width: 220px; max-width: calc(100vw - 24px); padding: 6px; border-radius: 14px; background: var(--card);
  border: 1px solid var(--line-2); box-shadow: var(--shadow); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transform-origin: top right; animation: abrirMenu .22s var(--spring);
}
@keyframes abrirMenu { from { opacity: 0; transform: scale(.9) translateY(-6px); } }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 9px; background: none; text-align: left; cursor: pointer; text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--hover); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; }
.avisos { width: min(380px, calc(100vw - 38px)); max-height: 70vh; overflow: auto; }
.menu .aviso { display: block; overflow-wrap: anywhere; }
.aviso { display: block; padding: 10px; border-radius: 10px; text-decoration: none; position: relative; }
.aviso:hover { background: var(--hover); }
.aviso.nuevo { padding-left: 22px; }
.aviso.nuevo::before { content: ''; position: absolute; left: 8px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); }
.aviso small { display: block; color: var(--faint); font-size: .74rem; margin-top: 2px; }

/* ── Vistas ────────────────────────────────────────────────────────────── */
#vista { max-width: 1320px; margin: 0 auto; padding: 22px 16px 60px; outline: none; }
.entra { animation: entrar .5s var(--ease) both; }
@keyframes entrar { from { opacity: 0; transform: translateY(14px); } }
::view-transition-old(root) { animation: .18s ease both desvanecer; }
::view-transition-new(root) { animation: .32s var(--ease) both aparecer; }
@keyframes desvanecer { to { opacity: 0; } }
@keyframes aparecer { from { opacity: 0; transform: translateY(10px); } }

/* Acceso */
.acceso { min-height: calc(100vh - 80px); display: grid; place-items: center; }
.acceso .panel { width: min(400px, 100%); padding: 30px 26px; animation: tarjeta .7s var(--spring) both; }
@keyframes tarjeta { from { opacity: 0; transform: translateY(30px) scale(.94); } }
.acceso h1 { margin: 14px 0 4px; font-size: 1.6rem; letter-spacing: -.02em; }
.acceso p { margin: 0 0 22px; color: var(--muted); }
.acceso form > * + * { margin-top: 14px; }
.acceso .logo b { width: 46px; height: 46px; border-radius: 14px; animation: girar 1s var(--spring) .15s both; }
.acceso .logo b svg { width: 26px; }
@keyframes girar { from { transform: rotate(-120deg) scale(.3); opacity: 0; } }
.temblor { animation: temblar .45s; }
@keyframes temblar { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* Tablero */
.cabeza { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.cabeza h1 { margin: 0; font-size: 1.7rem; letter-spacing: -.02em; }
.cabeza p { margin: 2px 0 0; color: var(--muted); }
.filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px; margin-bottom: 14px; }
.filtros .buscar { flex: 1 1 220px; position: relative; }
.filtros .buscar svg { position: absolute; left: 12px; top: 12px; width: 18px; color: var(--faint); }
.filtros .buscar .campo { padding-left: 38px; }
.filtros select.campo, .filtros input[type=date] { width: auto; flex: 0 1 auto; }
.fechas { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .85rem; }

.pestanas { position: relative; display: inline-flex; padding: 4px; border-radius: 13px; background: color-mix(in srgb, var(--bg) 55%, transparent); border: 1px solid var(--line); max-width: 100%; }
.pestanas button { position: relative; z-index: 1; border: 0; background: none; padding: 7px 12px; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--muted); white-space: nowrap; transition: color .25s; }
.pestanas button.on { color: var(--ink); }
.pestanas button i { font-style: normal; font-size: .75rem; margin-left: 5px; padding: 1px 6px; border-radius: 8px; background: var(--hover); }
.pestanas .indicador { position: absolute; z-index: 0; top: 4px; height: calc(100% - 8px); border-radius: 9px; background: var(--card); box-shadow: 0 2px 10px rgba(0,0,0,.25); transition: left .38s var(--spring), top .38s var(--spring), width .38s var(--spring), height .38s var(--spring); }

.rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; padding: 16px; }
.tarjeta {
  display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: var(--card); border: 1px solid var(--line);
  text-decoration: none; transition: transform .35s var(--spring), box-shadow .3s, border-color .3s;
  animation: entrar .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms);
}
.rejilla.pg-settled .tarjeta { animation: none; }
.tarjeta:hover { transform: translateY(-5px); box-shadow: 0 22px 40px -20px rgba(0,0,0,.6); border-color: var(--line-2); }
.mini { position: relative; aspect-ratio: 9 / 13; background: #000 center / cover; overflow: hidden; }
.mini img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); display: block; }
.tarjeta:hover .mini img { transform: scale(1.06); }
.mini .sin { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); }
.mini .dur, .mini .ver { position: absolute; bottom: 8px; padding: 2px 7px; border-radius: 7px; font-size: .74rem; font-weight: 600; background: rgba(0,0,0,.65); color: #fff; backdrop-filter: blur(6px); }
.mini .dur { right: 8px; } .mini .ver { left: 8px; }
.mini .pildora { position: absolute; top: 8px; left: 8px; backdrop-filter: blur(8px); background: color-mix(in srgb, var(--c) 30%, rgba(0,0,0,.55)); color: #fff; }
.tarjeta .info { padding: 10px 12px 12px; }
.tarjeta h3 { margin: 0; font-size: .98rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tarjeta .meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; color: var(--muted); font-size: .8rem; }
.vacio { padding: 50px 20px; text-align: center; color: var(--muted); }
.vacio svg { width: 54px; height: 54px; opacity: .5; animation: flotar 3s ease-in-out infinite; }
@keyframes flotar { 50% { transform: translateY(-8px); } }
.esqueleto { border-radius: 14px; aspect-ratio: 9 / 15; background: linear-gradient(100deg, var(--card) 40%, var(--hover) 50%, var(--card) 60%) 0 0 / 300% 100%; animation: brillo 1.4s linear infinite; }
@keyframes brillo { to { background-position: -150% 0; } }
.lista { overflow: hidden; }
.pager { background: transparent; }

/* Revisión */
.revision { display: grid; grid-template-columns: minmax(280px, 440px) 1fr; gap: 20px; align-items: start; }
.reproductor { position: sticky; top: 76px; }
.telefonos { display: flex; gap: 12px; justify-content: center; }
/* Alto y ancho exactos los pone ajustarReproductor() (app.js) según la forma real del vídeo: sin barras negras. */
.telefono { position: relative; flex: none; width: 100%; aspect-ratio: 9 / 16; border-radius: 26px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--line-2), var(--shadow); animation: tarjeta .7s var(--spring) both; }
.telefono video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.telefono .etiqueta { position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: .78rem; font-weight: 700; }
.versiones { display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.versiones button.v { min-width: 40px; height: 32px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); cursor: pointer; font-weight: 700; transition: all .25s var(--spring); }
.versiones button.v.on { background: var(--accent); border-color: var(--accent); color: #fff; transform: scale(1.08); }
.lado > * + * { margin-top: 16px; }
/* min-width: 0 para que el título largo (una sola línea) se recorte en vez de ensanchar la columna */
.lado, .decision, .hilo { min-width: 0; }
.cab { display: flex; align-items: flex-start; gap: 8px; margin: -4px 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.cab h1 { flex: 1; min-width: 0; margin: 0; font-size: .95rem; line-height: 1.3; overflow-wrap: anywhere; }
.volver { flex: none; width: 32px; height: 32px; margin: -6px 0 -6px -6px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); transition: background .2s, color .2s, transform .25s var(--spring); }
.volver:hover { background: var(--hover); color: var(--ink); transform: translateX(-2px); }
.volver svg { width: 20px; height: 20px; }
.decision { padding: 18px 20px; }
.decision h2, .hilo h2 { margin: 0 0 12px; font-size: 1rem; }
.acciones { display: flex; gap: 10px; flex-wrap: wrap; }
.acciones .btn { flex: 1 1 150px; height: 46px; }

/* Grabadora */
.grabadora { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--bg) 50%, transparent); border: 1px solid var(--line); margin: 14px 0 10px; }
.mic { position: relative; width: 58px; height: 58px; border-radius: 50%; border: 0; flex: none; cursor: pointer; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 10px 24px -8px var(--accent-2); transition: transform .3s var(--spring); }
.mic:hover { transform: scale(1.07); }
.mic:active { transform: scale(.94); }
.mic svg { width: 24px; height: 24px; position: relative; z-index: 1; }
.mic.grabando { background: var(--bad); box-shadow: 0 0 0 0 var(--bad); }
.mic.grabando::before, .mic.grabando::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--bad); animation: onda 1.6s var(--ease) infinite; }
.mic.grabando::after { animation-delay: .8s; }
@keyframes onda { to { transform: scale(1.8); opacity: 0; } }
.mic:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.grabadora canvas { flex: 1 1 0; width: 0; height: 46px; min-width: 0; display: block; }
.grabadora .tiempo { font-family: Mono, monospace; font-size: .9rem; color: var(--muted); min-width: 44px; text-align: right; }
.grabadora .ayuda { flex: 1; color: var(--muted); font-size: .9rem; }
.escribir { display: flex; gap: 8px; align-items: flex-end; }
.escribir textarea { min-height: 44px; height: 44px; }

/* Hilo de notas e historial */
.hilo { padding: 18px 20px; }
.ocultas { margin: -4px 0 4px; }
.hilo-modal .nota:first-child { border-top: 0; }
/* Escritorio: la revisión ocupa justo la ventana, sin scroll de página (app.js pone .fija en <html>). */
@media (min-width: 901px) {
  html.fija, html.fija body { overflow: hidden; height: 100%; }
  html.fija #vista { height: calc(100dvh - var(--barra, 61px)); padding-bottom: 18px; }
  html.fija #vista > .entra, html.fija .revision { height: 100%; }
  html.fija .lado { display: flex; flex-direction: column; height: 100%; min-height: 0; }
  html.fija .lado > * + * { margin-top: 16px; }
  html.fija .decision { flex: none; }
  html.fija .hilo { flex: 1 1 auto; min-height: 0; overflow: hidden; }
}
.nota { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); animation: entrar .45s var(--ease) both; }
.nota:first-of-type { border-top: 0; }
.nota .cuerpo { flex: 1; min-width: 0; }
.nota .quien { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; font-size: .85rem; }
.nota .quien b { font-size: .92rem; }
.nota .quien small { color: var(--faint); }
.nota p { margin: 5px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.nota audio { width: 100%; height: 36px; margin-top: 8px; }
.nota.gerente .avatar { background: linear-gradient(135deg, #ff9a3c, var(--accent-2)); }
.salto { border: 0; padding: 2px 8px; border-radius: 7px; cursor: pointer; font-family: Mono, monospace; font-size: .76rem; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); transition: background .2s; }
.salto:hover { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.transcribiendo { display: inline-flex; gap: 4px; align-items: center; color: var(--muted); font-size: .88rem; margin-top: 6px; }
.transcribiendo i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: puntos 1.2s infinite; }
.transcribiendo i:nth-child(2) { animation-delay: .15s; } .transcribiendo i:nth-child(3) { animation-delay: .3s; }
@keyframes puntos { 40% { transform: translateY(-5px); opacity: 1; } 0%, 80%, 100% { opacity: .35; } }
.error-t { color: var(--bad); font-size: .85rem; }
.borrar-nota { margin-left: auto; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 9px; background: none; color: var(--faint); cursor: pointer; transition: color .2s, background .2s, transform .25s var(--spring); }
.borrar-nota:hover { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); transform: scale(1.08); }
.borrar-nota svg { width: 17px; height: 17px; }
.nota.sale { animation: salirNota .28s ease both; }
@keyframes salirNota { to { opacity: 0; transform: translateX(16px); } }
.evento { display: flex; gap: 10px; align-items: center; padding: 7px 0; color: var(--muted); font-size: .85rem; border-top: 1px dashed var(--line); }
.evento .punto { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--hover); flex: none; font-size: .78rem; }
.vtag { font-size: .72rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--hover); color: var(--muted); }

/* ── Capas: modales y toasts ───────────────────────────────────────────── */
.fondo-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(5, 3, 15, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: aparecerFondo .25s ease both; }
.fondo-modal.sale { animation: desvanecer .2s ease both; }
@keyframes aparecerFondo { from { opacity: 0; } }
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 22px; background: var(--card); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: var(--shadow); animation: tarjeta .5s var(--spring) both; }
.fondo-modal.sale .modal { animation: salirModal .2s ease both; }
@keyframes salirModal { to { opacity: 0; transform: scale(.95) translateY(10px); } }
.modal h2 { margin: 0 0 16px; font-size: 1.25rem; }
.modal form > * + * { margin-top: 14px; }
.modal .pie { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.soltar { position: relative; display: grid; place-items: center; gap: 6px; padding: 26px 16px; text-align: center; border: 2px dashed var(--line-2); border-radius: 16px; cursor: pointer; transition: border-color .25s, background .25s, transform .3s var(--spring); }
.soltar:hover, .soltar.encima { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.soltar.encima { transform: scale(1.02); }
.soltar svg { width: 38px; height: 38px; color: var(--accent); }
.soltar input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.soltar video { width: 90px; aspect-ratio: 9/16; object-fit: cover; border-radius: 10px; background: #000; }
.progreso { display: flex; align-items: center; gap: 14px; }
.anillo { width: 64px; height: 64px; flex: none; transform: rotate(-90deg); }
.anillo circle { fill: none; stroke-width: 6; }
.anillo .pista { stroke: var(--line-2); }
.anillo .valor { stroke: url(#grad); stroke-linecap: round; transition: stroke-dashoffset .3s var(--ease); }

#toasts { position: fixed; z-index: 60; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--shadow); backdrop-filter: blur(16px); animation: subirToast .45s var(--spring) both; font-weight: 500; }
.toast.error { border-color: color-mix(in srgb, var(--bad) 60%, transparent); }
.toast.error::before { content: '!'; width: 20px; height: 20px; border-radius: 50%; background: var(--bad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .8rem; flex: none; }
.toast.ok::before { content: '✓'; width: 20px; height: 20px; border-radius: 50%; background: var(--ok); color: #04140c; display: grid; place-items: center; font-weight: 800; font-size: .8rem; flex: none; }
.toast.sale { animation: bajarToast .3s ease both; }
@keyframes subirToast { from { opacity: 0; transform: translateY(20px) scale(.9); } }
@keyframes bajarToast { to { opacity: 0; transform: translateY(12px) scale(.95); } }
#confeti { position: fixed; inset: 0; z-index: 70; pointer-events: none; }

/* Usuarios */
.tabla { width: 100%; border-collapse: collapse; }
.tabla th, .tabla td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.tabla th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.tabla tbody tr { animation: entrar .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms); transition: background .2s; }
.tabla tbody tr:hover { background: var(--hover); }
.tabla.pg-settled tbody tr { animation: none; }
.persona { display: flex; align-items: center; gap: 10px; }
.persona small { display: block; color: var(--muted); }
.inactivo { opacity: .5; }

/* ── Móvil ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .revision { grid-template-columns: 1fr; }
  .reproductor { position: static; order: 1; }
  .revision { gap: 16px; }
  .lado { display: contents; }
  .decision { order: 2; } .hilo { order: 3; }
}
@media (max-width: 640px) {
  #vista { padding: 16px 16px 50px; }
  #barra .logo span, .yo div { display: none; }
  #barra { gap: 6px; }
  .yo { padding: 4px; }
  .rejilla { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 10px; }
  .filtros select.campo, .filtros .fechas { flex: 1 1 100%; }
  .pestanas { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 100%; }
  .pestanas button { padding: 8px 6px; }
  .fechas input { flex: 1; min-width: 0; }
  .cabeza h1 { font-size: 1.4rem; }
  .cabeza .btn { width: 100%; }
  .tabla .ocultable { display: none; }
  .acciones .btn { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  #fondo i { animation: none; }
}
