/* Imnove · Producción de videos
   Colores del Brand Book: Navy #1E2235 · Azul Marca #3D52D5 · Azul Claro #6B7FFF · Off-White #F4F6FF · Gris Azulado #8A8FA8 · Gris Claro #D1D5E8
   Tipografía de interfaz: Outfit (títulos y cifras) + Figtree (texto) */

:root {
  --navy: #1e2235;
  --navy-2: #252a40;
  --navy-3: #30365a;
  --bg: #f4f6ff;
  --surface: #ffffff;
  --surface-2: #f8f9fe;
  --line: #e4e7f4;
  --line-2: #d1d5e8;
  --ink: #1e2235;
  --ink-2: #4b5173;
  --mute: #8a8fa8;
  --brand: #3d52d5;
  --brand-hi: #3245c4;
  --brand-lt: #6b7fff;
  --brand-soft: #eef0ff;
  --brand-ring: rgba(61, 82, 213, 0.18);

  /* Etapas del video: color de texto / fondo suave */
  --st-pendiente: #7c8199;   --bg-pendiente: #f0f1f6;
  --st-grabando: #d93a4b;    --bg-grabando: #fdecee;
  --st-editando: #0e8f86;    --bg-editando: #e2f5f3;
  --st-grabado: #0b84c6;     --bg-grabado: #e5f3fb;
  --st-en_revision: #c27400; --bg-en_revision: #fff3dc;
  --st-corregir: #dc2f4b;    --bg-corregir: #fdebee;
  --st-aprobado: #10995a;    --bg-aprobado: #e3f6ec;
  --st-publicado: #3d52d5;   --bg-publicado: #eef0ff;

  /* Estado del cliente (insignias sólidas, como en tu referencia) */
  --cs-sin_iniciar: #8a8fa8;
  --cs-en_produccion: #3d52d5;
  --cs-en_revision: #9b51e0;
  --cs-completado: #2fb36b;

  --r: 12px;
  --r-lg: 16px;
  --sh-1: 0 1px 2px rgba(30, 34, 53, 0.05), 0 1px 1px rgba(30, 34, 53, 0.03);
  --sh-2: 0 1px 2px rgba(30, 34, 53, 0.04), 0 10px 28px -14px rgba(30, 34, 53, 0.18);
  --sh-3: 0 2px 4px rgba(30, 34, 53, 0.05), 0 24px 48px -20px rgba(30, 34, 53, 0.28);
  --display: 'Outfit', 'Figtree', system-ui, sans-serif;
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.tnum, .num { font-variant-numeric: tabular-nums; }
.num { font-family: var(--display); }
.muted { color: var(--mute); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--brand-soft); color: var(--brand-hi); }

/* ================= Estructura ================= */
.shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh;
  background: var(--navy); color: #fff;
  display: flex; flex-direction: column; padding: 24px 16px 18px;
}
.side .brand { padding: 4px 10px 28px; display: flex; justify-content: center; }
.side .brand img { height: 50px; width: auto; display: block; }
.nav-label { color: rgba(255, 255, 255, 0.4); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 8px 12px 8px; text-align: center; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 18px; }
.nav { display: grid; gap: 3px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px;
  height: 42px; padding: 0 12px; border-radius: 10px;
  color: rgba(255, 255, 255, 0.68); font-weight: 500; text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav a svg { width: 19px; height: 19px; flex: none; transition: transform 0.25s var(--spring); }
.nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav a:hover svg { transform: scale(1.08); }
.nav a.on { background: var(--brand); color: #fff; font-weight: 600; }
.nav .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: #fff; color: var(--brand); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.nav a:not(.on) .count { background: var(--brand-lt); color: #fff; }

.side .sys { margin-top: auto; border-radius: var(--r); padding: 14px; display: grid; gap: 10px; background: rgba(255, 255, 255, 0.05); }
.sys .row { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: rgba(255, 255, 255, 0.85); }
.sys .row b { margin-left: auto; font-weight: 500; font-size: 12.5px; color: rgba(255, 255, 255, 0.5); }
.led { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--mute); position: relative; }
.led.ok { background: #34d08a; }
.led.ok::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid #34d08a; opacity: 0; animation: ping 2.4s var(--ease) infinite; }
.led.bad { background: #ff6b81; }
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.7; } 80%, 100% { transform: scale(1.8); opacity: 0; } }
.side .me { display: flex; align-items: center; gap: 10px; padding: 16px 6px 0; }
.side .me img { width: 36px; height: 36px; border-radius: 50%; }
.side .me div { line-height: 1.25; min-width: 0; }
.side .me b { font-size: 14px; display: block; font-weight: 600; }
.side .me small { color: rgba(255, 255, 255, 0.5); font-size: 12.5px; }
.side .me button { margin-left: auto; color: rgba(255, 255, 255, 0.7); }
.side .me button:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap;
  padding: 34px 40px 10px;
}
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--mute); margin-bottom: 6px; }
.crumbs a { color: var(--brand); }
.crumbs span.sep { opacity: 0.6; }
.top h1 { font-size: 30px; line-height: 1.15; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.top h1 .code { font-weight: 400; color: var(--mute); font-size: 0.8em; }
.top .sub { color: var(--mute); font-size: 14px; margin-top: 4px; font-style: italic; }
.top .sp { flex: 1; }
.top .acts { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.page { padding: 18px 40px 80px; width: 100%; max-width: 1500px; }
.mobile-bar { display: none; }

/* Transición entre páginas */
.enter { animation: pageIn 0.42s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } }
.stagger > * { animation: rise 0.5s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ================= Botones ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 14.5px; cursor: pointer; white-space: nowrap; text-decoration: none;
  box-shadow: var(--sh-1);
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.12s var(--ease);
}
.btn:hover { border-color: #b9bfdc; text-decoration: none; box-shadow: var(--sh-2); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-hi); border-color: var(--brand-hi); }
.btn.approve { background: #12a15f; border-color: #12a15f; color: #fff; }
.btn.approve:hover { background: #0f8a51; }
.btn.reject { color: #c8243f; border-color: #f4c3cc; }
.btn.reject:hover { background: #fff5f7; border-color: #ec9aa8; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn.ghost:hover { background: rgba(30, 34, 53, 0.05); color: var(--ink); box-shadow: none; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 9px; }
.btn.icon { width: 40px; padding: 0; }
.btn.icon.sm { width: 34px; }
.btn.pill { border-radius: 999px; padding: 0 20px; letter-spacing: 0.06em; font-size: 13px; text-transform: uppercase; color: var(--ink-2); }

.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 12px; background: #e9ecf8; }
.seg button { height: 32px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font-weight: 600; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: background 0.2s var(--ease), color 0.2s, box-shadow 0.2s; }
.seg button svg { width: 16px; height: 16px; }
.seg .on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }

.month { display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: 0 4px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--sh-1); }
.month b { min-width: 132px; text-align: center; font-size: 14.5px; font-weight: 600; }
.month button { width: 32px; height: 32px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; transition: background 0.15s; }
.month button:hover:not(:disabled) { background: var(--brand-soft); color: var(--brand); }
.month button:disabled { opacity: 0.3; cursor: default; }
.month svg { width: 16px; height: 16px; }

/* ================= Superficies ================= */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.card-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card-h h3 { font-size: 17px; display: flex; align-items: center; gap: 9px; }
.card-h .sp { flex: 1; }
.card-b { padding: 22px; }
.spark { width: 15px; height: 15px; color: var(--brand); flex: none; }
.section-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 38px 0 16px; }
.section-h h2 { font-size: 21px; display: flex; align-items: center; gap: 10px; }
.section-h .sp { flex: 1; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12.5px; font-weight: 700; background: #e9ecf8; color: var(--ink-2); }
.pill.brand { background: var(--brand); color: #fff; }
.badge { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 7px; font-size: 13px; font-weight: 600; color: #fff; background: var(--cs, var(--mute)); white-space: nowrap; }
.badge.lg { height: 28px; font-size: 13.5px; }

/* ================= Hero (medidor sonrisa) ================= */
.overview { display: grid; grid-template-columns: minmax(340px, 5fr) 7fr; gap: 20px; }
.hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 26px 28px 22px;
  background: var(--navy); color: #fff; display: flex; flex-direction: column; box-shadow: var(--sh-3);
}
.hero::before { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; right: -150px; top: -190px; background: var(--navy-2); }
.hero::after { content: ''; position: absolute; width: 220px; height: 220px; border-radius: 50%; left: -90px; bottom: -130px; background: rgba(61, 82, 213, 0.45); }
.hero > * { position: relative; z-index: 1; }
.hero .eyebrow { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand-lt); }
.hero .eyebrow .spark { color: var(--brand-lt); }
.hero h2 { font-size: 26px; line-height: 1.2; margin-top: 10px; color: #fff; }
.hero h2 span { color: rgba(255, 255, 255, 0.6); font-weight: 400; }
.smile { position: relative; margin: 14px auto 0; width: min(100%, 360px); }
.smile svg { width: 100%; height: auto; display: block; overflow: visible; }
.smile .arc-fg { animation: draw 1.4s var(--ease) 0.15s both; }
.smile .tip { animation: tipIn 0.6s var(--spring) 1.2s both; transform-box: fill-box; }
@keyframes draw { from { stroke-dasharray: 0 100; } }
@keyframes tipIn { from { opacity: 0; } }
.smile .pct { position: absolute; left: 0; right: 0; top: 4%; text-align: center; }
.smile .pct b { display: block; font-family: var(--display); font-size: 60px; font-weight: 600; line-height: 1; letter-spacing: -0.04em; }
.smile .pct small { font-size: 14px; color: rgba(255, 255, 255, 0.72); }
.hero .foot { display: flex; gap: 28px; margin-top: auto; padding-top: 6px; }
.hero .foot div { display: grid; }
.hero .foot b { font-family: var(--display); font-size: 24px; font-weight: 600; line-height: 1.1; }
.hero .foot small { font-size: 13px; color: rgba(255, 255, 255, 0.62); }

/* ================= Flujo de etapas ================= */
.pipeline { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.pipeline .head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pipeline .head h3 { font-size: 18px; display: flex; align-items: center; gap: 9px; }
.pipeline .head .muted { font-size: 14px; }
.stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; flex: 1; }
.stage .n { font-size: 32px; }
.danger-zone { border-color: #f4c3cc; }
.stage {
  position: relative; border-radius: 14px; padding: 16px 16px 14px; background: var(--surface-2); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 2px; min-height: 122px; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
}
.stage:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: var(--line-2); background: var(--surface); }
.stage .k { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.stage .k i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.stage .n { font-family: var(--display); font-size: 36px; font-weight: 600; line-height: 1.1; margin-top: 6px; letter-spacing: -0.03em; }
.stage .d { font-size: 13px; color: var(--mute); }
.stage .step { position: absolute; right: 14px; top: 15px; font-size: 12px; font-weight: 600; color: var(--mute); }

/* ================= Barras de progreso ================= */
.prog { display: flex; align-items: center; gap: 12px; }
.prog .track { flex: 1; height: 8px; border-radius: 99px; background: #e9ecf6; overflow: hidden; display: flex; }
.prog .track i { height: 100%; width: 0; transition: width 1.1s var(--ease); }
.prog .track i:first-child { border-radius: 99px 0 0 99px; }
.prog .val { font-family: var(--display); font-weight: 600; font-size: 15px; min-width: 42px; text-align: right; }
.prog.thin .track { height: 6px; }
.bar-fill { background: linear-gradient(90deg, var(--brand), var(--brand-lt)); border-radius: 99px !important; }

/* ================= Tarjetas de cliente (estilo proyectos) ================= */
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.filters .sp { flex: 1; }
.search { position: relative; }
.search svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--mute); pointer-events: none; }
.search input { height: 40px; width: 260px; padding: 0 14px 0 38px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); outline: none; box-shadow: var(--sh-1); transition: border-color 0.15s, box-shadow 0.15s; }
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }

.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; }
.project {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s;
}
.project:hover { transform: translateY(-4px); box-shadow: var(--sh-3); border-color: var(--line-2); }
.project .ph { display: flex; align-items: center; gap: 12px; padding: 18px 18px 16px 20px; border-bottom: 1px solid var(--line); }
.project .ph h3 { font-family: var(--font); font-size: 16px; font-weight: 600; letter-spacing: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project .ph h3 a { color: var(--ink); }
.project .ph h3 .code { color: var(--mute); font-weight: 400; }
.project .ph .btn { margin-left: auto; }
.project .pb { padding: 18px 20px 6px; display: grid; gap: 12px; }
.project .desc { color: var(--ink-2); font-size: 15px; }
.project .desc b { color: var(--ink); font-weight: 600; }
.project .cycle { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2); }
.project .cycle svg { width: 15px; height: 15px; color: var(--mute); }
.due { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--bg-pendiente); color: var(--ink-2); }
.due.soon { background: var(--bg-en_revision); color: var(--st-en_revision); }
.due.late { background: var(--bg-corregir); color: var(--st-corregir); }
.date-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.date-row input.input { width: auto; min-width: 170px; }
.project .counters { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: 12px 8px 18px; }
.project .counters div { display: grid; gap: 2px; }
.project .counters b { font-family: var(--display); font-size: 24px; font-weight: 600; line-height: 1.15; }
.project .counters small { font-size: 13px; color: var(--mute); line-height: 1.3; }
.project .pf { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.project .pf .when { margin-left: auto; font-size: 13px; color: var(--mute); }
.avatars { display: flex; align-items: center; }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: #fff; background: var(--hue, var(--brand)); border: 2px solid var(--surface); margin-left: -9px; flex: none; }
.av:first-child { margin-left: 0; }
.av.av-none { background: #e3e6f1; color: var(--mute); }
.av.lg { width: 48px; height: 48px; font-size: 16px; }

/* Menú contextual (⋮) */
.menu-wrap { position: relative; margin-left: auto; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-3); transform-origin: top right; animation: menuIn 0.18s var(--ease); }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: transparent; border-radius: 8px; color: var(--ink); text-align: left; cursor: pointer; font-size: 14px; text-decoration: none; }
.menu a:hover, .menu button:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.menu svg { width: 16px; height: 16px; color: var(--mute); }
.menu a:hover svg, .menu button:hover svg { color: var(--brand); }
@keyframes menuIn { from { opacity: 0; transform: scale(0.95) translateY(-4px); } }

/* ================= Tabla ================= */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--mute); text-transform: uppercase; letter-spacing: 0.08em; padding: 13px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
th:first-child { border-top-left-radius: var(--r-lg); }
th:last-child { border-top-right-radius: var(--r-lg); }
td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: var(--surface-2); }
tbody tr.sel-row { background: var(--brand-soft); }
th.n, td.n { text-align: right; font-variant-numeric: tabular-nums; }
td.name { white-space: nowrap; font-weight: 600; }
td.name a { color: var(--ink); display: inline-flex; align-items: center; gap: 12px; }
td.name .av { width: 32px; height: 32px; font-size: 12px; margin: 0; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.linkcell { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; font-size: 13.5px; }
.faltan { font-weight: 700; color: var(--st-corregir); }
.faltan.zero { color: var(--st-aprobado); }

/* ================= Estado de video (chip) ================= */
.chip { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px 0 9px; border-radius: 13px; font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--c); background: var(--cb); }
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.s-pendiente { --c: var(--st-pendiente); --cb: var(--bg-pendiente); }
.s-grabando { --c: var(--st-grabando); --cb: var(--bg-grabando); }
.s-editando { --c: var(--st-editando); --cb: var(--bg-editando); }
.s-grabado { --c: var(--st-grabado); --cb: var(--bg-grabado); }
.s-en_revision { --c: var(--st-en_revision); --cb: var(--bg-en_revision); }
.s-corregir { --c: var(--st-corregir); --cb: var(--bg-corregir); }
.s-aprobado { --c: var(--st-aprobado); --cb: var(--bg-aprobado); }
.s-publicado { --c: var(--st-publicado); --cb: var(--bg-publicado); }

/* ================= Revisión rápida + actividad ================= */
.duo { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; margin-top: 38px; align-items: start; }
.queue-item { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 22px; border-top: 1px solid var(--line); transition: background 0.15s; }
.queue-item:first-of-type { border-top: 0; }
.queue-item:hover { background: var(--surface-2); }
.queue-item .thumb { width: 48px; height: 48px; border-radius: 12px; background: var(--bg-en_revision); display: grid; place-items: center; color: var(--st-en_revision); }
.queue-item .thumb svg { width: 20px; height: 20px; }
.queue-item b { display: block; font-size: 15px; font-weight: 600; }
.queue-item small { color: var(--mute); font-size: 13px; }
.queue-item .acts { display: flex; gap: 6px; }
.timeline { list-style: none; margin: 0; padding: 12px 22px 18px; }
.timeline li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 9px 0; }
.timeline li::before { content: ''; position: absolute; left: 13.5px; top: 38px; bottom: -9px; width: 1px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--cb, var(--bg-pendiente)); color: var(--c, var(--mute)); }
.timeline .dot svg { width: 13px; height: 13px; }
.timeline .tx { font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.timeline .tx b { color: var(--ink); font-weight: 600; }
.timeline .tm { font-size: 12.5px; color: var(--mute); }

/* ================= Configuración pendiente ================= */
.setup { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid #f3dfb5; box-shadow: var(--sh-1); background-image: linear-gradient(90deg, #fff8ea, #fff 50%); }
.setup img { width: 44px; height: 44px; }
.setup .txt { flex: 1; min-width: 220px; }
.setup h3 { font-size: 16px; }
.setup p { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
.setup .steps { display: flex; gap: 8px; flex-wrap: wrap; }
.setup .step { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-2); font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
.setup .step:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-1px); }
.setup .step .ck { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; }
.setup .step.done { color: var(--mute); }
.setup .step.done .ck { background: var(--st-aprobado); border-color: var(--st-aprobado); color: #fff; }
.setup .step .ck svg { width: 11px; height: 11px; }

/* ================= Detalle del cliente ================= */
.tabs { position: relative; display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 22px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; padding: 12px 14px 14px; color: var(--ink-2); font-weight: 500; white-space: nowrap; text-decoration: none; transition: color 0.2s; display: inline-flex; align-items: center; gap: 8px; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--brand); font-weight: 600; }
.tabs a .pill { height: 20px; font-size: 11.5px; }
.tabs .ink { position: absolute; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); transition: left 0.35s var(--ease), width 0.35s var(--ease); }

.detail { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.fields { padding: 4px 26px 10px; }
.fieldrow { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.fieldrow:last-child { border-bottom: 0; }
.fieldrow > label, .fieldrow > .lbl { font-size: 13.5px; color: var(--mute); }
.fieldrow .val { font-size: 17px; color: var(--ink); }
.fieldrow input.bare, .fieldrow textarea.bare { width: 100%; border: 0; outline: none; background: transparent; font-size: 17px; padding: 4px 0; color: var(--ink); border-bottom: 1px solid transparent; transition: border-color 0.2s; resize: vertical; }
.fieldrow input.bare:focus, .fieldrow textarea.bare:focus { border-bottom-color: var(--brand); }
.fieldrow textarea.bare { min-height: 60px; line-height: 1.5; }
.save-bar { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 26px 20px; }
.ring-card { padding: 22px; display: grid; gap: 18px; position: sticky; top: 20px; }
.ring { position: relative; width: 168px; height: 168px; margin: 4px auto 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .fg { transition: stroke-dashoffset 1.3s var(--ease); }
.ring .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .c b { font-family: var(--display); font-size: 40px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.ring .c small { display: block; color: var(--mute); font-size: 13px; margin-top: 4px; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mini-grid div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.mini-grid b { display: block; font-family: var(--display); font-size: 22px; font-weight: 600; line-height: 1.15; color: var(--c, var(--ink)); }
.mini-grid small { font-size: 12.5px; color: var(--mute); }

.months { display: flex; gap: 8px; flex-wrap: wrap; }
.months button { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-weight: 600; cursor: pointer; transition: all 0.2s var(--ease); }
.months button:hover { border-color: var(--brand); color: var(--brand); }
.months button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.months button span { opacity: 0.65; margin-left: 4px; font-weight: 500; }
.view-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.view-bar .sp { flex: 1; }

.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: #eceffa; border-radius: 16px; display: flex; flex-direction: column; max-height: 70vh; min-width: 0; }
.col-h { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px; font-weight: 600; font-size: 14px; }
.col-h i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.col-h .pill { margin-left: auto; background: var(--surface); }
.col-b { padding: 2px 10px 12px; display: grid; grid-auto-rows: max-content; gap: 8px; overflow-y: auto; align-content: start; min-height: 0; }
.vcard { text-align: left; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; cursor: pointer; display: grid; gap: 5px; color: inherit; box-shadow: var(--sh-1); transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s; position: relative; overflow: hidden; }
.vcard:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: var(--line-2); }
.vcard .t { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.vcard .t span { margin-left: auto; color: var(--brand); }
.vcard .t span svg { width: 14px; height: 14px; }
.vcard .m { font-size: 12.5px; color: var(--mute); display: flex; align-items: center; gap: 6px; }
.vcard .m svg { width: 13px; height: 13px; }
.col-empty { color: var(--mute); font-size: 13px; padding: 16px 6px; text-align: center; }

.bulk { position: sticky; bottom: 18px; z-index: 15; margin: 16px auto 0; width: fit-content; max-width: 100%; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px 10px 18px; border-radius: 14px; background: var(--navy); color: #fff; box-shadow: var(--sh-3); animation: rise 0.3s var(--spring); }
.bulk b { margin-right: 8px; font-weight: 600; }
.bulk .btn { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.14); color: #fff; box-shadow: none; }
.bulk .btn:hover { background: rgba(255, 255, 255, 0.16); }
.bulk select.input { background-color: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.14); color: #fff; }
.bulk select.input option { color: var(--ink); }
input[type='checkbox'] { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; }

.month-rows { display: grid; }
.month-row { display: grid; grid-template-columns: 170px 1fr auto; gap: 18px; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.month-row:last-child { border-bottom: 0; }
.month-row b { font-weight: 600; }
.month-row small { color: var(--mute); display: block; font-size: 13px; }

/* ================= Revisión (maestro-detalle) ================= */
.review-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 20px; align-items: start; }
.rlist { overflow: hidden; }
.ritem { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; width: 100%; padding: 14px 18px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; color: inherit; transition: background 0.15s; position: relative; }
.ritem:hover { background: var(--surface-2); }
.ritem.on { background: var(--brand-soft); }
.ritem b { display: block; font-size: 15px; font-weight: 600; }
.ritem small { color: var(--mute); font-size: 13px; }
.ritem .av { margin: 0; border-radius: 11px; width: 40px; height: 40px; }
.player { overflow: hidden; position: sticky; top: 20px; }
.player .screen { aspect-ratio: 16 / 9; background: var(--navy); display: grid; place-items: center; position: relative; }
.player .screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .screen .noprev { text-align: center; color: rgba(255, 255, 255, 0.7); padding: 20px; display: grid; justify-items: center; gap: 12px; }
.player .screen .noprev img { width: 64px; }
.player .info { padding: 22px 24px 24px; display: grid; gap: 14px; }
.player .info h3 { font-size: 22px; }
.player .meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--mute); font-size: 14px; }
.player .meta b { color: var(--ink); font-weight: 600; }
.player .lk { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.decide { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; }
.decide textarea.input { grid-column: 1 / -1; min-height: 120px; height: 120px; padding-top: 12px; font-size: 15px; resize: vertical; }
.decide .btn { height: 44px; }
.decide .btn.reject { grid-column: 2; }
.decide .btn.approve { grid-column: 3; }

/* ================= Equipo ================= */
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.person { padding: 22px; display: grid; gap: 16px; align-content: start; transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease); }
.person:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.person .hd { display: flex; align-items: center; gap: 14px; }
.person .av { margin: 0; }
.person h3 { font-family: var(--font); font-size: 16.5px; font-weight: 600; letter-spacing: 0; }
.person .role { font-size: 13.5px; color: var(--mute); }
.person .hd .btn { margin-left: auto; }
.person .nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.person .nums div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.person .nums b { display: block; font-family: var(--display); font-size: 22px; font-weight: 600; line-height: 1.1; }
.person .nums small { font-size: 12.5px; color: var(--mute); }
.tg { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.tg.ok { color: var(--st-aprobado); }
.tg.no { color: var(--st-en_revision); }
.invite { display: flex; gap: 6px; align-items: center; background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 10px; padding: 6px 6px 6px 12px; }
.invite code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 12px; color: var(--ink-2); }

/* ================= Formularios ================= */
.field { display: grid; gap: 7px; }
.field label { font-size: 14px; color: var(--ink-2); font-weight: 600; }
.field .hint { font-size: 13px; color: var(--mute); }
.input {
  height: 42px; width: 100%; padding: 0 13px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface); outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
textarea.input { height: auto; min-height: 92px; padding: 11px 13px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }
select.input { appearance: none; padding-right: 36px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234b5173' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
select.input.auto { width: auto; min-width: 200px; box-shadow: var(--sh-1); }
select.input.sm { height: 34px; width: auto; font-size: 13.5px; border-radius: 9px; min-width: 0; }
.qty-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.qty-pick button { height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); cursor: pointer; font-weight: 600; transition: all 0.15s; }
.qty-pick button:hover, .qty-pick button.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ================= Modal ================= */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(30, 34, 53, 0.45); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fade 0.2s ease; }
.overlay.out { animation: fade 0.16s ease reverse forwards; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: 22px; box-shadow: 0 40px 90px -30px rgba(30, 34, 53, 0.55); animation: pop 0.32s var(--spring); }
.modal .mh { padding: 26px 28px 4px; display: flex; gap: 14px; align-items: flex-start; }
.modal .mh .ic { width: 44px; height: 44px; border-radius: 13px; background: var(--brand-soft); display: grid; place-items: center; flex: none; color: var(--brand); }
.modal .mh .ic svg { width: 21px; height: 21px; }
.modal .mh h3 { font-size: 21px; }
.modal .mh p { margin: 4px 0 0; color: var(--mute); font-size: 14px; }
.modal .mb { padding: 20px 28px; display: grid; gap: 16px; }
.modal .mf { padding: 16px 28px 24px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.96); } }

/* ================= Toasts ================= */
#toasts { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: grid; gap: 10px; }
.toast { display: flex; gap: 12px; align-items: flex-start; background: var(--navy); color: #fff; padding: 13px 18px; border-radius: 14px; box-shadow: var(--sh-3); max-width: 420px; font-size: 14.5px; animation: toastIn 0.4s var(--spring); }
.toast.out { animation: toastOut 0.25s var(--ease) forwards; }
.toast::before { content: ''; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--brand-lt); flex: none; }
.toast.ok::before { background: #34d08a; }
.toast.err::before { background: #ff6b81; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(0.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }

/* ================= Login ================= */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--bg); }
.login .art { position: relative; overflow: hidden; background: var(--navy); color: #fff; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 52px 60px; }
.login .art img.logo { position: relative; width: 190px; height: auto; }
.login .art .circle { position: absolute; border-radius: 50%; }
.login .art .c1 { width: 560px; height: 560px; right: -200px; top: -180px; background: var(--navy-2); animation: float 14s ease-in-out infinite; }
.login .art .c2 { width: 320px; height: 320px; left: -120px; bottom: -140px; background: rgba(61, 82, 213, 0.5); animation: float 11s ease-in-out infinite reverse; }
@keyframes float { 50% { transform: translate(18px, 22px); } }
.login .art blockquote { position: relative; margin: 0; font-family: var(--display); font-size: clamp(34px, 3.6vw, 54px); line-height: 1.05; font-weight: 600; letter-spacing: -0.03em; max-width: 13ch; animation: rise 0.8s var(--ease) both 0.1s; }
.login .art blockquote span { color: var(--brand-lt); }
.login .art small { position: relative; color: rgba(255, 255, 255, 0.5); font-size: 13px; }
.login .form { display: grid; place-items: center; padding: 32px 20px; }
.login form { width: min(380px, 100%); display: grid; gap: 16px; animation: rise 0.6s var(--ease) both 0.2s; }
.login form h1 { font-size: 34px; }
.login form p { margin: -8px 0 6px; color: var(--mute); }
.login .btn { height: 48px; font-size: 16px; }

/* ================= Ajustes ================= */
.settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.settings .card-b { display: grid; gap: 18px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 12px 16px; font-size: 14.5px; margin: 0; }
.kv dt { color: var(--mute); }
.kv dd { margin: 0; word-break: break-word; }
.kv code, .note code { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
.note { font-size: 14px; color: var(--mute); line-height: 1.6; margin: 0; }
.tree { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; line-height: 1.8; white-space: pre; overflow-x: auto; margin: 0; }

/* ================= Vacíos y carga ================= */
.empty { padding: 52px 24px; text-align: center; color: var(--mute); display: grid; justify-items: center; gap: 6px; }
.empty img { width: 64px; margin-bottom: 10px; }
.empty b { color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 19px; }
.empty p { margin: 0; max-width: 46ch; }
.skeleton { display: grid; gap: 20px; }
.skeleton .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.sk { border-radius: 16px; background: linear-gradient(90deg, #e9ecf7 0%, #f4f6fd 40%, #e9ecf7 80%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spin { width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; border-radius: 50%; animation: rot 0.7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ================= Responsive ================= */
@media (max-width: 1280px) {
  .overview { grid-template-columns: 1fr; }
  .detail { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1080px) {
  .duo, .settings, .detail { grid-template-columns: minmax(0, 1fr); }
  .review-layout { grid-template-columns: minmax(0, 1fr); }
  .player, .ring-card { position: static; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .mobile-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 16px 10px; background: var(--navy); }
  .mobile-bar img { height: 32px; margin: 0 auto; }
  .mobile-bar nav { display: flex; gap: 4px; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .mobile-bar nav a { padding: 7px 12px; border-radius: 99px; color: rgba(255, 255, 255, 0.72); white-space: nowrap; font-weight: 500; font-size: 14px; text-decoration: none; }
  .mobile-bar nav a.on { background: var(--brand); color: #fff; }
  .top { padding: 22px 16px 6px; }
  .top h1 { font-size: 24px; }
  .page { padding: 14px 16px 64px; }
  .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage .n { font-size: 30px; }
  .login { grid-template-columns: 1fr; }
  .login .art { min-height: 280px; padding: 32px 24px; }
  .row2, .decide { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }
  .search, .filters select.input.auto { flex: 1 1 100%; }
  .search input { width: 100%; }
  .hero h2 { font-size: 22px; }
  .queue-item { grid-template-columns: auto 1fr; }
  .queue-item .acts { grid-column: 1 / -1; }
  .projects, .team { grid-template-columns: 1fr; }
  .month-row { grid-template-columns: 1fr; gap: 8px; }
  .skeleton .row { grid-template-columns: 1fr; }
}
.av svg { width: 16px; height: 16px; }
.project .pf { margin-top: auto; }
.fieldrow > *, .detail > *, .settings > * { min-width: 0; }
.team > *, .projects > * { min-width: 0; }
.stage .step { display: none; }
@media (max-width: 860px) { .decide .btn.reject, .decide .btn.approve { grid-column: auto; } }
