/* Luiggi HQ — estilo A · Sala de mando */
:root {
  --bg: #07080d;
  --ink: #eef1f8;
  --muted: #9aa3b8;
  --dim: #8b93a7;
  --line: rgba(255,255,255,.08);
  --soft: rgba(255,255,255,.05);
  --glass: rgba(255,255,255,.045);
  --glass-strong: rgba(255,255,255,.08);
  --indigo: #6366f1;
  --pink: #ec4899;
  --cyan: #0ea5e9;
  --brand: linear-gradient(135deg, #6366f1, #ec4899);
  /* estados */
  --st-idea: #94a3b8;
  --st-planificado: #67e8f9;
  --st-en_curso: #3b82f6;
  --st-bloqueado: #ef4444;
  --st-revision: #f59e0b;
  --st-terminado: #22c55e;
  --st-facturado: #a855f7;
  --st-archivado: #64748b;
  --ok: #22c55e; --warn: #f59e0b; --bad: #ef4444;
  --radius: 20px;
  --font: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --rail-w: 76px;
  --bar-h: 68px;
}
* { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.45;
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 2px; }
[hidden] { display: none !important; }

/* Luces difusas de fondo */
.aurora {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(79,70,229,.45), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(236,72,153,.28), transparent 55%),
    radial-gradient(700px 600px at 60% 120%, rgba(14,165,233,.25), transparent 60%),
    var(--bg);
}

.shell { position: relative; z-index: 1; display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.shell.no-nav { grid-template-columns: minmax(0, 1fr); }
.shell.no-nav .rail { display: none; }

/* Barra lateral */
.rail {
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 0;
  background: rgba(255,255,255,.03); border-right: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.logo {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  font-weight: 900; font-size: 15px; letter-spacing: -.02em; color: #fff;
  background: var(--brand); box-shadow: 0 8px 30px rgba(99,102,241,.5);
}
.rail .logo { margin-bottom: 14px; }
.nav-item {
  position: relative; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  color: var(--dim); text-decoration: none; background: none; border: 0; cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}
.nav-item svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item span { position: absolute; left: 56px; padding: 5px 10px; border-radius: 8px; background: #151826; border: 1px solid var(--line); font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--ink); opacity: 0; pointer-events: none; transform: translateX(-4px); transition: .15s; z-index: 5; }
.nav-item:hover, .nav-item:focus-visible { color: #fff; background: rgba(255,255,255,.06); }
.nav-item:hover span, .nav-item:focus-visible span { opacity: 1; transform: none; }
.nav-item.on { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 0 24px rgba(99,102,241,.35); }
.nav-item.on::before { content: ''; position: absolute; left: -16px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--brand); }
.rail .spacer { flex: 1; }
/* Escritorio: menú por encima del contenido (etiqueta opaca al pasar) y desplegable con ☰ */
@media (min-width: 768px) {
  .rail { z-index: 35; }
  .nav-item span { background: #1b1f30; box-shadow: 0 10px 30px rgba(0,0,0,.55); }
  .rail .logo { margin-bottom: 4px; }
  .nav-toggle { margin-bottom: 8px; }
  .rail.open { width: 236px; gap: 4px; padding: 22px 14px; align-items: stretch; background: #0c0e17; border-right-color: var(--line); box-shadow: 0 0 0 100vmax rgba(3,4,8,.55), 20px 0 60px rgba(0,0,0,.6); overflow-y: auto; }
  .rail.open .logo { margin-left: 1px; }
  .rail.open .nav-item { width: 100%; height: 44px; flex: none; display: flex; align-items: center; justify-content: flex-start; gap: 14px; padding: 0 11px; }
  .rail.open .nav-item svg { flex: none; }
  .rail.open .nav-item span { position: static; opacity: 1; transform: none; background: none; border: 0; box-shadow: none; padding: 0; font-size: 14px; font-weight: 650; }
  .rail.open .nav-item.on::before { left: -14px; }
  .rail.open .nav-badge { position: static; margin-left: auto; box-shadow: none; }
}

.main { min-width: 0; padding: 26px 28px 48px; }
.main:focus { outline: none; }

/* Cabeceras */
.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.top h2, .section-head h2 { margin: 0; font-size: clamp(26px, 4.4vw, 38px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.top h2 em, .section-head h2 em { font-style: normal; background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub, .phrase { margin-top: 8px; font-size: 14px; color: var(--muted); }
.section-head { margin-bottom: 20px; }
.clock { text-align: right; }
.clock .t { font: 700 clamp(30px, 5vw, 42px)/1 var(--mono); letter-spacing: -.02em; background: linear-gradient(90deg, #fff, #a5b4fc); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.clock .d { font-size: 13px; margin-top: 8px; color: var(--muted); }

/* Cristal */
.glass, .card {
  position: relative; border-radius: var(--radius); padding: 18px; min-width: 0;
  background: var(--glass); border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.glass h3, .card h3 { margin: 0 0 14px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.glass h3 a, .card h3 a { font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); text-decoration: none; white-space: nowrap; }
.glass h3 a:hover { color: #fff; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-12 { grid-column: 1 / -1; }

/* KPIs */
.kpi { padding: 18px 18px 16px; overflow: hidden; }
.kpi small { display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: rgba(238,241,248,.72); }
.kpi strong { display: block; font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -.03em; margin-top: 8px; font-variant-numeric: tabular-nums; line-height: 1.1; overflow-wrap: anywhere; }
.kpi .delta { font-size: 12px; font-weight: 600; margin-top: 6px; color: var(--muted); }
.kpi::after { content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--glow, transparent); filter: blur(28px); opacity: .55; pointer-events: none; }
.kpi--1 { --glow: #6366f1; } .kpi--1 strong { color: #fff; }
.kpi--2 { --glow: #3b82f6; } .kpi--2 strong { color: #93c5fd; }
.kpi--3 { --glow: #ec4899; } .kpi--3 strong { color: #f9a8d4; }
.kpi--4 { --glow: #f59e0b; } .kpi--4 strong { color: #fcd34d; }
.kpi--5 { --glow: #10b981; } .kpi--5 strong { color: #6ee7b7; }
.kpi--6 { --glow: #64748b; } .kpi--6 strong { color: #cbd5e1; }
.kpi--alert { --glow: #ef4444; border-color: rgba(239,68,68,.45); } .kpi--alert strong { color: #fca5a5; }
.kpi-link { text-decoration: none; color: inherit; }
.kpi-link:hover, .kpi-link:focus-visible { border-color: rgba(255,255,255,.28); }
.fin-notes h3 { margin-bottom: 8px; }
.fin-note-row { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3); margin-bottom: 8px; text-decoration: none; color: inherit; min-height: 48px; }
.fin-note-row.over { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.4); }
.fin-note-row .ico { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.1); font-weight: 800; }
.fin-note-row b, .fin-note-row small { display: block; overflow-wrap: anywhere; }
.fin-note-row small { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* Listas de Inicio */
.ev { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; align-items: start; }
.ev:last-child { border: 0; padding-bottom: 0; }
.ev:hover b { color: #fff; }
.ev .h { font: 700 12.5px var(--mono); color: #a5b4fc; padding-top: 2px; }
.ev .h.late { color: #fca5a5; }
.ev b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev span.d { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; margin-bottom: 8px; background: var(--soft); min-width: 0; text-decoration: none; transition: background .2s; }
.lead:hover { background: var(--glass-strong); }
.lead:last-child { margin-bottom: 0; }
.lead .av { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; background: var(--brand); color: #fff; }
.lead .tx { min-width: 0; flex: 1; }
.lead b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead .tx span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; flex: none; }

.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; color: var(--ok); background: var(--ok); animation: pulse 1.6s infinite; vertical-align: middle; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Píldoras de estado */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.pill--idea { --c: var(--st-idea); } .pill--planificado { --c: var(--st-planificado); } .pill--en_curso { --c: #60a5fa; }
.pill--bloqueado { --c: #f87171; } .pill--revision { --c: #fbbf24; } .pill--terminado { --c: #4ade80; }
.pill--facturado { --c: #c084fc; } .pill--archivado { --c: var(--st-archivado); }

/* Tablero (resumen y base para Proyectos / Captación) */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.col { border-radius: 14px; padding: 10px; background: rgba(255,255,255,.04); min-width: 0; }
.col h4 { margin: 0 0 8px; font-size: 12px; font-weight: 800; display: flex; justify-content: space-between; gap: 8px; color: var(--c, var(--ink)); }
.card.pc, .col .card { border-radius: 11px; padding: 10px 12px; margin-bottom: 7px; font-size: 13px; font-weight: 650; background: rgba(255,255,255,.07); border: 0; border-left: 3px solid var(--c, #3b82f6); backdrop-filter: none; -webkit-backdrop-filter: none; }

.chips { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.chip { border-radius: 14px; padding: 10px 8px; background: color-mix(in srgb, var(--c) 10%, transparent); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); text-align: center; text-decoration: none; transition: transform .2s, background .2s; min-width: 0; }
.chip:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--c) 18%, transparent); }
.chip strong { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--c); line-height: 1.1; }
.chip small { display: block; margin-top: 2px; font-size: 11px; font-weight: 700; color: var(--muted); overflow-wrap: anywhere; line-height: 1.2; }
.active-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.proj { display: block; text-decoration: none; padding: 12px 14px; border-radius: 14px; background: var(--soft); border-left: 3px solid var(--st-en_curso); min-width: 0; transition: background .2s, transform .2s; }
.proj:hover { background: var(--glass-strong); transform: translateY(-1px); }
.proj b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 4px; border-radius: 4px; background: rgba(255,255,255,.12); margin-top: 10px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--brand); }

/* Panel lateral (fichas) */
.side-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%); z-index: 40; padding: 22px; overflow-y: auto; background: rgba(10,12,20,.97); border-left: 1px solid var(--line); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: -30px 0 80px rgba(0,0,0,.5); animation: slide .25s ease-out; }
@keyframes slide { from { transform: translateX(30px); } }

/* Pestañas */
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--soft); overflow-x: auto; max-width: 100%; scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; }
.tab, .tabs button { border: 0; background: none; padding: 8px 14px; border-radius: 10px; font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button.on, .tab.on { background: rgba(255,255,255,.12); color: #fff; }

/* Botones y formularios */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 13px; border: 0; cursor: pointer; font-weight: 800; font-size: 14px; color: #fff; background: var(--brand); box-shadow: 0 8px 28px rgba(99,102,241,.4); text-decoration: none; transition: transform .15s, box-shadow .2s, opacity .2s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 34px rgba(99,102,241,.55); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn--ghost { background: var(--soft); box-shadow: none; border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--glass-strong); box-shadow: none; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.input { width: 100%; min-height: 46px; padding: 0 14px; border-radius: 13px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--ink); font: inherit; font-size: 16px; }
.input:focus { outline: none; border-color: #818cf8; box-shadow: 0 0 0 3px rgba(99,102,241,.3); }

/* Estado vacío */
.empty { text-align: center; padding: 26px 14px; border-radius: 14px; border: 1px dashed rgba(255,255,255,.14); background: rgba(255,255,255,.02); }
.empty .ico { width: 42px; height: 42px; margin: 0 auto 10px; border-radius: 13px; display: grid; place-items: center; background: var(--soft); color: #a5b4fc; font-size: 20px; }
.empty b { display: block; font-size: 15px; }
.empty p { margin: 6px auto 0; max-width: 340px; font-size: 13px; color: var(--muted); }
.empty .btn { margin-top: 14px; min-height: 38px; padding: 0 16px; font-size: 13px; }

/* Aviso */
.toasts { position: fixed; z-index: 100; left: 50%; bottom: calc(var(--bar-h) + 18px); transform: translateX(-50%); display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast { padding: 12px 18px; border-radius: 14px; background: rgba(20,23,36,.95); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 16px 40px rgba(0,0,0,.5); font-weight: 600; font-size: 14px; animation: rise .3s both; }
.toast.err { border-color: rgba(239,68,68,.6); }

/* Entrada de tarjetas */
.rise { animation: rise .55s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.skeleton { height: 14px; border-radius: 7px; background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.12), rgba(255,255,255,.05)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Login */
.login { min-height: calc(100dvh - 0px); display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(400px, 100%); padding: 32px 28px; text-align: center; border-radius: 26px; box-shadow: 0 40px 100px rgba(0,0,0,.5), 0 0 80px rgba(99,102,241,.18); }
.login-card .logo { width: 64px; height: 64px; border-radius: 20px; font-size: 22px; margin: 0 auto 18px; animation: glow 3.5s ease-in-out infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 8px 30px rgba(99,102,241,.5); } 50% { box-shadow: 0 8px 50px rgba(236,72,153,.7); } }
.login-card h1 { margin: 0; font-size: 30px; font-weight: 900; letter-spacing: -.03em; }
.login-card p { margin: 6px 0 24px; color: var(--muted); font-size: 14px; }
.login-card form { text-align: left; }
.login-card .btn { width: 100%; margin-top: 4px; }
.form-err { min-height: 20px; margin: 0 0 10px; font-size: 13px; font-weight: 600; color: #fca5a5; }


/* Clientes */
.cl { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.cl-list { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding-right: 20px; border-right: 1px solid var(--line); }
.cl-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cl-head h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.cl-head .btn { min-height: 38px; padding: 0 14px; font-size: 13px; }
.cl-list .phrase { margin: 0 0 4px; font-size: 12.5px; }
.cl-list .input[type=search] { min-height: 42px; }
.fchips { display: flex; gap: 6px; flex-wrap: wrap; }
.fchips button { border: 0; cursor: pointer; font-size: 12px; font-weight: 700; padding: 6px 12px; min-height: 32px; border-radius: 99px; background: rgba(255,255,255,.06); color: var(--muted); }
.fchips button.on { background: #fff; color: #07080d; }
.cl-rows { display: flex; flex-direction: column; gap: 4px; }
.cl-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; border: 1px solid transparent; text-decoration: none; min-width: 0; transition: background .2s; }
.cl-row:hover { background: rgba(255,255,255,.04); }
.cl-row.on { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); box-shadow: inset 3px 0 0 var(--c); }
.cl-row .av, .dh .av { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; background: var(--c); flex: none; }
.cl-row .tx { min-width: 0; }
.cl-row b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-row .tx span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-row em { font-style: normal; font: 700 12px var(--mono); text-align: right; color: #cbd2e1; white-space: nowrap; }
.cl-row em small { display: block; color: #7c8498; font: 600 10.5px var(--font); }
.cl-detail { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.back { display: none; align-self: flex-start; font-weight: 700; font-size: 14px; color: var(--muted); text-decoration: none; padding: 6px 0; min-height: 36px; }
.dh { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.dh .av { width: 62px; height: 62px; border-radius: 18px; font-size: 20px; font-weight: 900; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.dh-tx { min-width: 0; flex: 1 1 220px; }
.dh h3 { margin: 0; font-size: clamp(22px, 3vw, 28px); font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; line-height: 1.15; }
.dh p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.tag { display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: rgba(245,158,11,.15); color: #fcd34d; margin-right: 6px; }
.act { display: flex; gap: 8px; flex-wrap: wrap; }
.act button { border: 0; cursor: pointer; font-size: 13px; padding: 0 14px; min-height: 44px; border-radius: 12px; background: rgba(255,255,255,.08); font-weight: 700; }
.act button:hover { background: rgba(255,255,255,.14); }
.act button.wa { background: #16a34a; }
.cl-detail .tabs { align-self: flex-start; }
.cl-content { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.kps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kp small { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.kp strong { display: block; font-size: clamp(20px, 2.4vw, 26px); font-weight: 800; margin-top: 6px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.cl-two { display: grid; grid-template-columns: 1.1fr 1fr; gap: 12px; align-items: start; }
.pr { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); margin-bottom: 8px; font-size: 13.5px; border-left: 3px solid var(--k); text-decoration: none; min-width: 0; }
.pr:hover { background: rgba(255,255,255,.08); }
.pr b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pr span { font: 700 12px var(--mono); color: #cbd2e1; flex: none; }
.tl { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.tl:last-child { border: 0; }
.tl b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.tl small { display: block; color: var(--dim); font-size: 11.5px; margin-top: 2px; overflow-wrap: anywhere; }
.tl em { font-style: normal; font: 700 12px var(--mono); color: #93c5fd; white-space: nowrap; }
.data { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; font-size: 13px; }
.data > div { min-width: 0; overflow-wrap: anywhere; }
.data span { color: var(--dim); display: block; font-size: 11.5px; }
.data .wide { grid-column: 1 / -1; }
.cl-form h3 { margin-bottom: 12px; }
.cl-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.check { display: flex; align-items: center; gap: 8px; min-height: 46px; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); font-weight: 600; }
.check input { width: 20px; height: 20px; }
select.input { appearance: auto; }
textarea.input { resize: vertical; }
@media (max-width: 1100px) { .cl { grid-template-columns: 290px minmax(0, 1fr); gap: 14px; } .cl-list { padding-right: 14px; } .cl-two { grid-template-columns: 1fr; } .kps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .cl { grid-template-columns: minmax(0, 1fr); }
  .cl-list { padding-right: 0; border-right: 0; }
  .cl.has-sel .cl-list { display: none; }
  .cl:not(.has-sel) .cl-detail { display: none; }
  .back { display: inline-flex; align-items: center; }
  .cl-fields, .data { grid-template-columns: 1fr; }
  .cl-detail .tabs { align-self: stretch; }
  .act { width: 100%; } .act button { flex: 1 1 auto; }
}


/* Proyectos */
.board--pj { grid-auto-columns: minmax(250px, 1fr); align-items: start; margin-top: 14px; padding-bottom: 12px; }
.board--pj .col h4 { text-transform: none; font-size: 13px; }
.col .count { font: 700 12px var(--mono); color: var(--muted); }
.col-items { min-height: 56px; display: flex; flex-direction: column; gap: 7px; border-radius: 10px; }
.col-items .card.pc { margin: 0; cursor: grab; display: block; user-select: none; -webkit-user-select: none; touch-action: pan-x pan-y; }
.card.pj .nm { display: block; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; font-weight: 700; }
.pj .cover { display: block; width: 100%; height: 84px; object-fit: cover; border-radius: 8px; margin-bottom: 8px; }
.pj .meta-line { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; min-width: 0; }
.pj .meta-line span { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj .pcl { color: var(--ink); background: color-mix(in srgb, var(--c) 22%, transparent); }
.pj .pcl.dim { color: var(--muted); background: rgba(255,255,255,.06); }
.pj .br { color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.pj .blk { margin-top: 7px; font-size: 12px; font-weight: 600; color: #fca5a5; overflow-wrap: anywhere; }
.pj .foot { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.pj .foot .bar { flex: 1; margin-top: 0; }
.pj .foot span { font: 700 11px var(--mono); color: var(--muted); white-space: nowrap; }
.drag-ghost { opacity: .35; }
.sortable-fallback { opacity: .9; box-shadow: 0 18px 40px rgba(0,0,0,.5); border-radius: 11px; z-index: 60; }
.pj-add { display: flex; gap: 10px; margin-bottom: 14px; }
.pj-add .input { flex: 1; }
.ideas { padding: 6px 14px; margin-bottom: 4px; }
.ideas-toggle { width: 100%; min-height: 44px; display: flex; justify-content: space-between; align-items: center; background: none; border: 0; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--ink); }
.ideas-body { padding: 4px 0 12px; display: grid; gap: 10px; }
.idea-add { display: flex; gap: 10px; }
.idea-add .input { flex: 1; min-width: 0; }
.idea { padding: 12px; border-radius: 13px; background: var(--soft); }
.idea p { margin: 0 0 10px; font-size: 14px; overflow-wrap: anywhere; }
.idea-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.idea-btns .btn { min-height: 38px; padding: 0 14px; font-size: 13px; }
.scrim { position: fixed; inset: 0; z-index: 35; background: rgba(3,4,8,.7); }
.pj-panel { width: min(520px, 100%); }
.pj-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.pj-h { min-width: 0; }
.pj-h small { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pj-title { margin: 4px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; line-height: 1.2; }
.pj-top .close { min-height: 44px; min-width: 44px; padding: 0; flex: none; }
.ps { padding: 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); margin-bottom: 14px; }
.ps h4 { margin: 0 0 12px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; color: #cbd2e1; }
.ps .two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.ps .two > * { min-width: 0; }
.ps textarea.input { padding: 12px 14px; }
.folder-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.folder { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 99px; font: 600 12px var(--mono); background: rgba(255,255,255,.08); max-width: 100%; overflow-wrap: anywhere; }
.folder button { width: 28px; height: 28px; border: 0; border-radius: 50%; cursor: pointer; background: rgba(255,255,255,.1); }
.folder-add { display: flex; gap: 8px; }
.folder-add .input { flex: 1; min-width: 0; }
.folder-add .btn { min-height: 46px; padding: 0 14px; font-size: 13px; }
.hint { font-size: 12.5px; color: var(--muted); margin: 0 0 10px; }
@media (max-width: 767px) {
  .board--pj { grid-auto-columns: 78%; max-width: 100%; scroll-snap-type: x proximity; }
  .board--pj .col { scroll-snap-align: start; }
  .ps .two { grid-template-columns: 1fr; }
  .side-panel.pj-panel { width: 100%; padding: 16px; }
}


/* Captación y Horas */
.head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.head-row .section-head { flex: 1 1 260px; min-width: 0; }
.head-row > .btn { min-height: 40px; padding: 0 18px; font-size: 13px; }
.kps--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 14px; }
.kps--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px 0; }
.kp.card { padding: 14px 16px; }
.board--deals { grid-auto-columns: minmax(185px, 1fr); align-items: start; padding-bottom: 12px; }
.board--deals .col h4 { text-transform: none; font-size: 13px; }
.dl .nm { display: block; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; font-weight: 700; }
.dl .sv { margin-top: 3px; font-size: 12.5px; color: var(--muted); font-weight: 500; overflow-wrap: anywhere; }
.dl .meta-line { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; min-width: 0; }
.dl .meta-line span { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.07); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl .val { font-family: var(--mono); color: #86efac; }
.dl .nc.late { color: #fca5a5; background: rgba(239,68,68,.15); }
.dl-link { display: inline-block; margin-top: 9px; font-size: 12.5px; font-weight: 700; color: #a5b4fc; text-decoration: none; }
.dl-conv { margin-top: 9px; min-height: 38px; padding: 0 12px; font-size: 12.5px; width: 100%; }
.modal-wrap { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(3,4,8,.75); }
.modal { width: min(460px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 22px; background: rgba(14,16,26,.98); backdrop-filter: none; -webkit-backdrop-filter: none; }
.modal h3 { text-transform: none; letter-spacing: 0; font-size: 18px; }
.modal .btn--ghost.danger { color: #fca5a5; margin-top: 4px; }
.tray { margin-bottom: 14px; border-color: rgba(245,158,11,.35); }
.un-row { display: grid; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.un-tx { min-width: 0; }
.un-tx b { display: block; font-size: 14px; overflow-wrap: anywhere; }
.un-tx small, .hr-tx small { display: block; color: var(--dim); font-size: 12px; margin-top: 2px; overflow-wrap: anywhere; }
.un-act { display: flex; gap: 8px; min-width: 0; }
.un-act select { flex: 1; min-width: 0; }
.un-act .btn { flex: none; }
.hr-filters { padding: 14px 16px; }
.hr-fields { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 12px; margin-top: 12px; }
.hr-fields .field { margin-bottom: 0; min-width: 0; }
.hr-fields .input { min-width: 0; max-width: 100%; padding: 0 10px; }
.hrs .day + .day { margin-top: 16px; }
.hrs .day h4 { margin: 0 0 6px; display: flex; justify-content: space-between; gap: 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: #cbd2e1; }
.hr-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto 44px; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.hr-time { font: 600 12px var(--mono); color: var(--dim); }
.hr-tx b { display: block; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.hr-n { text-align: right; }
.hr-n strong { display: block; font: 700 13px var(--mono); white-space: nowrap; }
.hr-n small { color: var(--dim); font-size: 11.5px; }
.hr-edit { min-height: 44px; min-width: 44px; padding: 0; }
.bdg { display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 99px; background: rgba(255,255,255,.08); }
.kp-hint { display: block; margin-top: 2px; font-size: 11px; color: var(--dim); }
.vc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 14px; }
.vc-chips:empty { display: none; }
.vc-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; max-width: 100%; border-radius: 99px; background: rgba(255,255,255,.06); border: 1px solid var(--line); color: inherit; text-decoration: none; font-size: 13px; }
.vc-chip i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.vc-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-chip b { flex: none; font: 700 12.5px var(--mono); }
.vc-chip:hover { border-color: var(--c); }
.bdg--gift { background: rgba(245,158,11,.18); color: #fcd34d; }
@media (max-width: 767px) {
  .board--deals { grid-auto-columns: 78%; max-width: 100%; scroll-snap-type: x proximity; }
  .board--deals .col { scroll-snap-align: start; }
  .kps--3 { grid-template-columns: 1fr; }
  .kps--3 .kp.card { display: flex; justify-content: space-between; align-items: baseline; }
  .kps--3 .kp strong { margin: 0; }
  .hr-fields { grid-template-columns: 1fr 1fr; }
  .hr-fields .field:first-child { grid-column: 1 / -1; }
  .hr-row { grid-template-columns: minmax(0, 1fr) auto 44px; }
  .hr-time { display: none; }
}

/* Tablet */
@media (max-width: 1100px) {
  .span-3 { grid-column: span 6; } .span-4, .span-5, .span-6, .span-7 { grid-column: 1 / -1; }
}
/* Móvil: barra inferior */
@media (max-width: 767px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail {
    position: fixed; z-index: 30; top: auto; left: 0; right: 0; bottom: 0; height: auto;
    flex-direction: row; justify-content: space-around; align-items: stretch; gap: 0;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); min-height: var(--bar-h);
    border-right: 0; border-top: 1px solid rgba(255,255,255,.1); background: rgba(10,12,20,.88);
  }
  .rail .logo, .rail .spacer, .rail .logout, .rail .nav-toggle { display: none; }
  .nav-item { flex: 1; width: auto; height: auto; min-height: 52px; flex-direction: column; gap: 3px; border-radius: 12px; }
  .nav-item span { position: static; opacity: 1; transform: none; background: none; border: 0; padding: 0; font-size: 10.5px; font-weight: 700; }
  .nav-item.on::before { left: 30%; right: 30%; top: -7px; bottom: auto; width: auto; height: 3px; }
  .main { padding: 18px 16px calc(var(--bar-h) + 40px); }
  .top { align-items: flex-start; }
  .clock { text-align: left; }
  .grid { gap: 12px; }
  .span-3 { grid-column: span 6; }
  .kpi { padding: 14px; }
  .kpi small { font-size: 11px; }
  .chips { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .side-panel { width: 100%; }
  .toasts { bottom: calc(var(--bar-h) + 18px); }
}
@media (max-width: 380px) { .span-3 { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* H2: Captación (origen, formularios, resumen) y Gastos */
.head-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.head-btns .btn { min-height: 40px; padding: 0 18px; font-size: 13px; }
.dl .org { color: #67e8f9; background: rgba(103,232,249,.12); border: 1px solid rgba(103,232,249,.3); box-shadow: 0 0 10px rgba(103,232,249,.12); }
.lead-info { display: grid; gap: 6px; padding: 12px; margin-bottom: 14px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); font-size: 13px; }
.lead-info span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--dim); }
.lead-info div { min-width: 0; overflow-wrap: anywhere; }
.lead-info a { color: #a5b4fc; }
.stats-card { margin-top: 18px; }
.stats-card h3 { margin: 0 0 10px; }
.stats-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 52px; gap: 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.stats-row b { overflow-wrap: anywhere; }
.stats-row span { color: var(--muted); white-space: nowrap; }
.stats-row em { font: 700 13px var(--mono); font-style: normal; color: #86efac; text-align: right; }
.modal--wide { width: min(560px, 100%); }
.form-row { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 6px; min-width: 0; }
.form-row.off { opacity: .6; }
.form-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.form-top b { overflow-wrap: anywhere; }
.fstate { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.07); color: var(--muted); white-space: nowrap; }
.fstate.on { color: #86efac; background: rgba(34,197,94,.14); }
.form-nums, .form-orig { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.form-url small { display: block; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.form-url code { display: block; font: 12px var(--mono); color: #cbd2e1; overflow-wrap: anywhere; word-break: break-all; user-select: all; }
.form-row .row-btns, .modal .row-btns { flex-wrap: wrap; }
.form-new { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.form-new h4 { margin: 0 0 10px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #cbd2e1; }
.exp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 40px; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.exp-tx { min-width: 0; }
.exp-tx b { display: block; font-size: 14px; overflow-wrap: anywhere; }
.exp-tx small { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--dim); font-size: 12px; margin-top: 2px; }
.exp-ic { color: var(--muted); }
.exp-row strong { font: 700 13px var(--mono); white-space: nowrap; padding-top: 2px; }
.exp-del { min-height: 40px; min-width: 40px; padding: 0; }
.exp-due { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.exp-tag { font-size: 11.5px; font-weight: 800; padding: 3px 10px; border-radius: 99px; color: #fcd34d; background: rgba(245,158,11,.16); border: 1px solid rgba(245,158,11,.4); }
.exp-due .btn { min-height: 36px; padding: 0 14px; font-size: 12.5px; }
.exp-add { display: grid; gap: 10px; margin-top: 12px; }
.exp-add .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.exp-add .two > * { min-width: 0; }
.exp-checks { display: flex; gap: 18px; flex-wrap: wrap; }
.exp-note { margin: 8px 2px 14px; color: #fcd34d; }

/* H2: Inicio, Mis sistemas y Música */
.grid--mid, .grid--board { margin-top: 16px; }
.ev--renewal .renew-ico { font-style: normal; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 7px; border-radius: 6px; font-size: 13px; line-height: 1; color: #fcd34d; background: rgba(245,158,11,.14); box-shadow: 0 0 10px rgba(245,158,11,.25); vertical-align: -2px; }
.lead .tx span.src { margin-top: 2px; font-size: 11px; font-weight: 700; color: #67e8f9; }
.btn--sm { min-height: 34px; padding: 0 14px; font-size: 12px; border-radius: 11px; }
.sys-card h3 .head-btns { gap: 6px; }
.sys-list { display: grid; gap: 8px; }
.sys { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto 32px; gap: 12px; align-items: center; padding: 11px 12px; border-radius: 14px; background: var(--soft); border: 1px solid transparent; }
.sys b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sys-tx { min-width: 0; }
.sys-tx span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sys em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.sys-dot { --c: #64748b; width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.sys--green .sys-dot { --c: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.18), 0 0 14px 2px rgba(34,197,94,.7); }
.sys--amber .sys-dot { --c: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.18), 0 0 14px 2px rgba(245,158,11,.7); }
.sys--red .sys-dot { --c: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.2), 0 0 16px 3px rgba(239,68,68,.8); }
.sys--red { border-color: rgba(239,68,68,.3); background: rgba(239,68,68,.07); }
.sys--off, .sys--unknown { opacity: .75; }
.music-card { overflow: hidden; }
.music-card::before { content: ''; position: absolute; inset: auto -40px -60px auto; width: 240px; height: 240px; border-radius: 50%; background: conic-gradient(from 200deg, #4f46e5, #ec4899, #0ea5e9, #4f46e5); filter: blur(60px); opacity: .22; pointer-events: none; }
.music-title { display: inline-flex; align-items: center; gap: 10px; }
.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; }
.eq i { width: 3px; height: 6px; border-radius: 2px; background: linear-gradient(#a5b4fc, #ec4899); }
@media (prefers-reduced-motion: no-preference) {
  .eq i { animation: eq 1s infinite ease-in-out; }
  .eq i:nth-child(2) { animation-delay: .2s; } .eq i:nth-child(3) { animation-delay: .4s; } .eq i:nth-child(4) { animation-delay: .1s; } .eq i:nth-child(5) { animation-delay: .3s; }
}
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }
.music-body { position: relative; display: grid; gap: 12px; }
.spotify-slot { width: 100%; height: 152px; border-radius: 14px; background: rgba(255,255,255,.04); }

/* Reproductor persistente (player.js): sobre el hueco en Inicio, acoplado en el resto */
#hq-player { position: fixed; z-index: 20; left: 0; top: 0; width: 0; height: 0; border-radius: 14px; }
#hq-player.off { visibility: hidden; pointer-events: none; }
#hq-player .pl-media, #hq-player .pl-media > div { width: 100%; height: 100%; }
#hq-player iframe { display: block; width: 100%; height: 100%; max-width: 100%; border: 0; border-radius: 14px; background: rgba(255,255,255,.04); color-scheme: normal; }
#hq-player .pl-close, #hq-player .pl-home { display: none; }
#hq-player.dock {
  left: calc(100% - 380px); top: calc(100% - 100px); width: 360px; height: 80px;
  background: rgba(14,16,26,.85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 0 0 1px rgba(129,140,248,.55), 0 0 22px rgba(99,102,241,.4), 0 14px 40px rgba(0,0,0,.55);
}
#hq-player.dock .pl-close {
  display: grid; place-items: center; position: absolute; top: -12px; right: 10px; width: 26px; height: 26px; padding: 0;
  border-radius: 50%; border: 1px solid rgba(129,140,248,.6); background: rgba(14,16,26,.95); color: #fff; font-size: 12px; line-height: 1; cursor: pointer;
}
#hq-player.dock .pl-close:hover { background: #1b1f33; }
#hq-player.dock .pl-home {
  display: block; position: absolute; top: -12px; left: 12px; padding: 3px 10px; border-radius: 99px; text-decoration: none;
  border: 1px solid rgba(129,140,248,.6); background: rgba(14,16,26,.95); color: #fff; font-size: 11px; font-weight: 700;
}
@media (max-width: 767px) {
  #hq-player.dock { left: 8px; width: calc(100% - 16px); top: calc(100% - var(--bar-h) - env(safe-area-inset-bottom) - 96px); }
}
@media (prefers-reduced-motion: no-preference) {
  #hq-player.moving { transition: left .4s cubic-bezier(.2,.8,.2,1), top .4s cubic-bezier(.2,.8,.2,1), width .4s cubic-bezier(.2,.8,.2,1), height .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s; }
}
body.has-dock .toasts { bottom: calc(var(--bar-h) + 118px); }
@media (min-width: 768px) { body.has-dock .toasts { bottom: 118px; } }
.music-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.spotify-btn { background: linear-gradient(135deg, #1db954, #12853c); box-shadow: 0 8px 28px rgba(29,185,84,.35); }
.spotify-btn:hover { box-shadow: 0 12px 34px rgba(29,185,84,.5); }
.link-btn { background: none; border: 0; padding: 6px 0; color: var(--muted); font: inherit; font-size: 12.5px; text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--ink); }
.music-form .hint { margin-bottom: 8px; }
.music-form .music-row { display: flex; gap: 8px; flex-wrap: wrap; }
.music-form .music-row .input { flex: 1 1 220px; min-width: 0; }
.music-form .form-err { margin: 6px 0 0; min-height: 0; }
@media (max-width: 1100px) { .grid--mid .span-5, .grid--mid .span-7 { grid-column: 1 / -1; } }
.sys-card h3 { flex-wrap: wrap; }
.sys-card h3 .head-btns .btn { min-height: 34px; padding: 0 12px; font-size: 12px; border-radius: 11px; text-transform: none; letter-spacing: 0; color: #fff; }

.sys-del { min-width: 32px; min-height: 32px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; opacity: .6; }
.sys-del:hover, .sys-del:focus-visible { opacity: 1; color: #fca5a5; background: rgba(239,68,68,.12); }
body.has-dock .main { padding-bottom: 150px; }
@media (max-width: 767px) { body.has-dock .main { padding-bottom: calc(var(--bar-h) + 150px); } }

/* Finanzas */
.fin-tabs { margin: 4px 0 16px; scrollbar-width: none; } .fin-tabs::-webkit-scrollbar { display: none; }
.fin-tabs .tab { text-decoration: none; display: inline-flex; align-items: center; min-height: 36px; }
.fin-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.fin-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-width: 0; }
.fin-bar > .input { width: auto; min-width: 130px; }
.fin-bar-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.fin-bar .btn { min-height: 40px; padding: 0 16px; font-size: 13px; }
.fin-note { padding: 10px 14px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); margin: 0; }
.inv-rows { display: flex; flex-direction: column; }
.inv-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; text-align: left; width: 100%; padding: 12px 6px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; cursor: pointer; min-height: 56px; }
.inv-row:hover { background: var(--soft); }
.inv-num { font: 700 13px var(--mono); }
.inv-cl b, .inv-cl small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-cl small { font-size: 12px; color: var(--muted); }
.inv-amt { font-weight: 800; font-variant-numeric: tabular-nums; }
.fchip { display: inline-block; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.fchip--draft { --c: #94a3b8; } .fchip--issued { --c: #60a5fa; } .fchip--paid { --c: #4ade80; } .fchip--over { --c: #f87171; }
.fin-panel { z-index: 45; }
.fin-ph { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.fin-ph h3 { margin: 0; font-size: 20px; text-transform: none; letter-spacing: 0; }
.fin-ph-r { display: flex; gap: 8px; align-items: center; }
.fin-ph-r .btn { min-height: 36px; padding: 0 12px; box-shadow: none; }
.fin-warn { padding: 10px 14px; border-radius: 12px; font-size: 13px; font-weight: 600; background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.35); color: #fcd34d; margin-bottom: 12px; }
.fin-warn--soft { margin-bottom: 0; }
.fin-lines { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.fin-line { display: grid; gap: 8px; padding: 10px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); }
.fin-line.ro { grid-template-columns: minmax(0, 1fr) auto; }
.fin-line.ro small { grid-column: 1 / -1; color: var(--muted); }
.fin-line-n { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.fin-line-n label { flex: 1 1 80px; min-width: 0; }
.fin-line-n small { display: block; font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 3px; }
.fin-x { min-height: 46px; padding: 0 14px; flex: none; box-shadow: none; }
.fin-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.fin-totals { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--soft); margin: 12px 0; }
.fin-totals > div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.fin-totals .tot { font-size: 17px; font-weight: 800; border-top: 1px solid var(--line); padding-top: 8px; }
.fin-del { color: #fca5a5; }
.exp-group h3 .count { font: 700 12px var(--mono); color: var(--muted); letter-spacing: 0; text-transform: none; }
.exp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.exp-tx b, .exp-tx small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exp-tx small, .exp-n small { font-size: 12px; color: var(--muted); }
.exp-n { text-align: right; } .exp-n strong { display: block; font-variant-numeric: tabular-nums; }
.exp-ded { min-height: 36px; font-size: 12px; white-space: nowrap; }
.exp-act { display: flex; gap: 6px; }
.exp-act .btn { min-height: 36px; padding: 0 12px; font-size: 12px; box-shadow: none; }
.exp-photo { position: relative; cursor: pointer; overflow: hidden; width: 100%; }
.exp-file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.fin-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fin-kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.fin-kv span { color: var(--muted); } .fin-kv.strong { border-bottom: 0; font-size: 17px; } .fin-kv.strong span { color: var(--ink); font-weight: 700; }
.mbars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; height: 170px; }
.mbar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; gap: 4px; }
.mbar i { display: block; width: 100%; max-width: 28px; min-height: 2px; border-radius: 6px 6px 2px 2px; background: var(--brand); }
.mbar small { font-size: 10px; color: var(--muted); } .mbar-v { font-size: 9px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: clip; white-space: nowrap; }
.tbl-wrap { overflow-x: auto; max-width: 100%; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 6px 10px 6px 0; white-space: nowrap; }
.tbl td { padding: 9px 10px 9px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.light { display: inline-block; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
@media (max-width: 767px) {
  .fin-two { grid-template-columns: 1fr; }
  .fin-grid2 { grid-template-columns: 1fr; }
  .inv-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .inv-num { grid-column: 1; } .inv-cl { grid-column: 1; } .inv-amt { grid-column: 2; grid-row: 1; text-align: right; } .inv-row .fchip { grid-column: 2; grid-row: 2; justify-self: end; }
  .exp-row { grid-template-columns: minmax(0, 1fr) auto; }
  .exp-ded, .exp-act { grid-column: 1 / -1; }
  .fin-bar-btns { margin-left: 0; width: 100%; } .fin-bar-btns .btn { flex: 1 1 auto; }
  .mbars { gap: 3px; } .mbar-v { display: none; }
}

/* Facturar pendiente (asistente), Cobro y Rentabilidad */
.act button.bill { background: #4f46e5; }
.wiz-panel { z-index: 55; width: min(560px, 100%); display: flex; flex-direction: column; }
.wiz-scrim { z-index: 54; }
.wiz-body { flex: 1; min-width: 0; }
.wiz-proj h4 { text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--ink); }
.wiz-sub { margin-bottom: 12px; } .wiz-sub small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.wiz-sub .input { margin-bottom: 8px; }
.wiz-line { min-height: 20px; font-size: 14px; } .wiz-live { font-variant-numeric: tabular-nums; }
.wiz-picks { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.wiz-pick { display: flex; align-items: center; gap: 10px; padding: 8px 4px; min-height: 44px; font-size: 13px; }
.wiz-pick span { flex: 1; min-width: 0; overflow-wrap: anywhere; } .wiz-pick b { font-variant-numeric: tabular-nums; }
.wiz-foot { position: sticky; bottom: -22px; margin: 8px -22px -22px; padding: 12px 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: rgba(10,12,20,.98); border-top: 1px solid var(--line); }
.wiz-sum span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.wiz-total { font-size: 22px; font-variant-numeric: tabular-nums; }
.cobro-box .field[hidden] { display: none; }
.budget { margin: 4px 0 14px; } .budget-h { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; } .budget-h span { color: var(--muted); }
.bar--billed i { background: #10b981; } .bar--budget i { background: #6366f1; } .bar--budget.warn i { background: #f59e0b; } .bar--budget.over i { background: #ef4444; }
.bar[role=progressbar] { height: 8px; }
.ms-title { display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.ms-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ms-tx b, .ms-tx small { display: block; overflow-wrap: anywhere; } .ms-tx small { font-size: 12px; color: var(--muted); }
.ms-add { display: grid; gap: 8px; margin: 10px 0 14px; } .ms-add .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rent-top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.rent-eph { display: block; font-size: 24px; font-variant-numeric: tabular-nums; } .rent-top small { color: var(--muted); font-size: 12px; }
.rent-top .light { width: 18px; height: 18px; flex: none; }
.light--green { background: #22c55e; color: #22c55e; } .light--amber { background: #f59e0b; color: #f59e0b; } .light--red { background: #ef4444; color: #ef4444; } .light--grey { background: #64748b; color: #64748b; }
.rent-kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 14px; margin-bottom: 12px; } .rent-kv span { color: var(--muted); }
@media (max-width: 767px) { .wiz-panel { width: 100%; padding: 16px; } .wiz-foot { margin: 8px -16px -16px; padding: 12px 16px; bottom: -16px; } }

/* H4: Calendario */
:root {
  --cal-cita: #38bdf8; --cal-google: #cbd5e1; --cal-factura: #f59e0b; --cal-renovacion: #a78bfa;
  --cal-fiscal: #ef4444; --cal-proyecto: #22c55e; --cal-lead: #22d3ee; --cal-cuota: #f472b6;
}
.cal-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.cal-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex: 1 1 320px; min-width: 0; }
.cal-nav { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cal-nav strong { margin-left: 8px; font-size: 15px; white-space: nowrap; }
.cal-sync { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cal-dot { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.cal-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.cal-dot.ok { --c: var(--ok); } .cal-dot.bad { --c: var(--bad); }
.cal-pend { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--warn); }
.cal-pend svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.cal-legend span::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 3px; background: var(--c); box-shadow: 0 0 8px var(--c); }

.cal-ev { display: flex; align-items: baseline; gap: 5px; min-width: 0; max-width: 100%; margin: 0; padding: 3px 8px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 18%, #0b0d16); color: var(--ink); font: inherit; font-size: 12px; text-align: left; cursor: pointer; overflow: hidden; box-shadow: 0 0 12px color-mix(in srgb, var(--c) 18%, transparent); }
.cal-ev b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev small { font: 700 10.5px var(--mono); color: var(--c); flex: none; }
.cal-ev.auto { cursor: default; } .cal-ev.auto[type=button] { cursor: pointer; }
.cal-clock { font-style: normal; flex: none; }
.cal-week { min-width: 0; }
.cal-heads, .cal-cols { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); }
.cal-heads > div { text-align: center; padding: 4px 0 8px; border-left: 1px solid var(--line); }
.cal-heads small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--dim); }
.cal-heads b { font-size: 18px; }
.cal-heads .today b { display: inline-grid; place-items: center; min-width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; }
.cal-allrow { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 0; padding: 6px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-allrow > span { font-size: 10px; font-weight: 700; color: var(--dim); text-transform: uppercase; align-self: start; padding-top: 4px; }
.cal-allday { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px 2px; }
.cal-scroll { max-height: 640px; overflow-y: auto; }
.cal-cols { position: relative; height: calc(var(--hours) * var(--hpx)); background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hpx) - 1px), var(--line) calc(var(--hpx) - 1px), var(--line) var(--hpx)); }
.cal-gutter { position: relative; }
.cal-gutter span { position: absolute; right: 8px; transform: translateY(-7px); font: 10.5px var(--mono); color: var(--dim); }
.cal-gutter span:first-child { transform: none; }
.cal-col { position: relative; border-left: 1px solid var(--line); min-width: 0; }
.cal-col.today { background: rgba(99,102,241,.07); }
.cal-col .cal-ev.timed { position: absolute; flex-direction: column; align-items: flex-start; gap: 0; padding: 2px 6px; }
.cal-col .cal-ev.timed b { max-width: 100%; }
/* Citas cortas (< 45 min): hora y título en una sola línea para que el título se vea. */
.cal-col .cal-ev.timed.short { flex-direction: row; align-items: baseline; gap: 5px; }
.cal-col .cal-ev.timed.short b { min-width: 0; }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--pink); box-shadow: 0 0 8px var(--pink); z-index: 2; pointer-events: none; }

.cal-list { display: grid; gap: 18px; }
.cal-day h4 { margin: 0 0 6px; font-size: 13px; color: var(--muted); letter-spacing: .02em; }
.cal-row { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 2px 10px; width: 100%; text-align: left; margin: 0; padding: 10px 12px; border: 0; border-left: 3px solid var(--c); border-radius: 10px; background: color-mix(in srgb, var(--c) 10%, transparent); color: var(--ink); font: inherit; cursor: pointer; }
.cal-row + .cal-row { margin-top: 6px; }
.cal-row.auto { cursor: default; } .cal-row.auto[type=button] { cursor: pointer; }
.cal-row .cal-t { font: 700 12px var(--mono); color: var(--c); padding-top: 2px; }
.cal-row b { font-size: 14px; overflow-wrap: anywhere; }
.cal-row small { grid-column: 2; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.cal-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.cal-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; }
.modal .check { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 14px; }
@media (max-width: 899px) { .cal-sync { width: 100%; } }
@media (max-width: 560px) { .cal-two, .cal-links { grid-template-columns: 1fr; } }
@media (max-width: 767px) { .nav-item { min-width: 0; } .nav-item span { font-size: 9.5px; letter-spacing: -.02em; } }

/* ---- Inventario (H5) ---- */
.inv-kpis { margin-bottom: 18px; }
.inv-tabs { margin-bottom: 16px; }
.inv-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.inv-bar .input { width: auto; min-width: 170px; flex: 1 1 170px; max-width: 260px; }
.inv-list { display: grid; gap: 8px; }
.inv-row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; width: 100%; text-align: left; color: inherit; font: inherit; padding: 12px 16px; cursor: pointer; border-radius: 16px; }
.inv-row:hover { border-color: rgba(255,255,255,.22); }
.inv-row.is-off { opacity: .55; }
.inv-name b, .inv-cost, .inv-mi b, .inv-rv-main b { font-weight: 700; }
.inv-name, .inv-mi span, .inv-rv-main { min-width: 0; }
.inv-name b, .inv-name small, .inv-mi b, .inv-mi small, .inv-rv-main b, .inv-rv-main small, .inv-alt b, .inv-alt small { display: block; overflow-wrap: anywhere; }
.inv-name small, .inv-cost small, .inv-mi small, .inv-rv-main small, .inv-alt small { color: var(--muted); font-size: 12px; font-weight: 500; }
.inv-cost { text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.inv-cost small { display: block; }
.inv-dot { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.18); flex: none; display: inline-block; }
.inv-dot--red { background: var(--bad); box-shadow: 0 0 10px var(--bad); }
.inv-dot--amber { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.inv-dot--green { background: var(--ok); box-shadow: 0 0 8px rgba(34,197,94,.7); }
.inv-st { --c: #94a3b8; } .inv-st--to_cancel { --c: #f59e0b; } .inv-st--cancelled { --c: #64748b; } .inv-st--review { --c: #60a5fa; }
.inv-review { margin-bottom: 16px; border-color: rgba(96,165,250,.4); }
.inv-rv { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.inv-rv-main { background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; padding: 0; flex: 1 1 200px; }
.inv-rv .row-btns { margin-top: 0; }
.inv-rv .btn { min-height: 38px; padding: 0 16px; font-size: 13px; }
.inv-ai-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.inv-ai h3 a { color: inherit; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.inv-bal { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.inv-bal small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 8px; letter-spacing: 0; }
.inv-bal.low { color: #fca5a5; }
.inv-bars { display: grid; gap: 8px; margin: 12px 0; }
.inv-bar-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); }
.inv-bar-row .bar { margin-top: 0; height: 8px; }
.inv-bar-row b { color: var(--ink); font-variant-numeric: tabular-nums; }
.inv-err { color: #fca5a5; font-size: 13px; font-weight: 600; margin: 8px 0; overflow-wrap: anywhere; }
.inv-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.inv-month h3 span { color: var(--muted); font-weight: 700; letter-spacing: 0; text-transform: none; font-size: 12px; }
.inv-mi { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); color: inherit; font: inherit; padding: 9px 0; cursor: pointer; }
.inv-two { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.inv-md { font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.inv-md p { margin: 0 0 10px; } .inv-md ul { margin: 0 0 10px; padding-left: 20px; } .inv-md strong { color: #fff; }
.inv-panel { width: min(540px, 100%); }
.inv-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.inv-form .field { min-width: 0; }
.inv-panel .danger { color: #fca5a5; }
.inv-sec { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.inv-sec h4 { margin: 0 0 10px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.inv-chart svg { width: 100%; height: 90px; display: block; }
.inv-chart-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--dim); }
.inv-alt { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.inv-alt .btn { min-height: 34px; padding: 0 12px; font-size: 12px; flex: none; }
.inv-alt-add, .inv-two-in { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.inv-alt-add .input, .inv-two-in .input { min-width: 0; }
.inv-alt-add .btn { grid-column: 1 / -1; }
.inv-two-in + .btn { margin-top: 10px; }
@media (max-width: 1100px) { .inv-two { grid-template-columns: 1fr; } }
@media (max-width: 767px) {
  .inv-row { grid-template-columns: 14px minmax(0, 1fr) auto; }
  .inv-row .fchip { grid-column: 2 / -1; justify-self: start; }
  .inv-panel { width: 100%; padding: 16px; }
  .inv-form { grid-template-columns: 1fr; }
  .inv-bar .input { max-width: none; }
}

/* ---------------------------- Auditorías (H6) ---------------------------- */
.act a { display: inline-flex; align-items: center; text-decoration: none; font-size: 13px; padding: 0 14px; min-height: 44px; border-radius: 12px; background: rgba(255,255,255,.08); font-weight: 700; }
.act a.bill { background: #4f46e5; }
.aud-warn { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(245,158,11,.45); background: rgba(245,158,11,.12); color: #fcd34d; font-weight: 600; font-size: 14px; }
.aud-set { margin-top: 14px; }
.aud-set-row { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.aud-set-row .field { margin-bottom: 0; min-width: 0; }
.aud-set-btn { align-self: end; }
.aud-kpis { margin-top: 14px; }
.aud-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.aud-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(0, 190px) auto; gap: 14px; align-items: center; padding: 12px 16px; text-decoration: none; color: var(--ink); min-height: 64px; }
.aud-row:hover { border-color: rgba(255,255,255,.25); }
.aud-name b, .aud-name small, .aud-owner { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aud-name small, .aud-owner { font-size: 12px; color: var(--muted); }
.aud-flags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.aud-open { font-size: 12px; font-weight: 700; color: #86efac; }
.aud-score { display: inline-grid; place-items: center; min-width: 44px; height: 44px; border-radius: 14px; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; background: var(--soft); border: 1px solid var(--line); }
.aud-score.is-hi { color: #86efac; border-color: rgba(34,197,94,.4); } .aud-score.is-mid { color: #fcd34d; border-color: rgba(245,158,11,.4); } .aud-score.is-lo { color: #fca5a5; border-color: rgba(239,68,68,.4); } .aud-score.is-na { color: var(--dim); }
.aud-wiz { display: grid; gap: 14px; max-width: 760px; }
.aud-search { display: flex; gap: 10px; align-items: center; }
.aud-search .input { flex: 1; min-width: 0; }
.aud-cands { display: grid; gap: 8px; }
.aud-cand { display: grid; gap: 2px; text-align: left; padding: 14px 16px; cursor: pointer; color: var(--ink); font: inherit; width: 100%; }
.aud-cand:hover:not(:disabled) { border-color: #818cf8; }
.aud-cand.is-closed { opacity: .5; cursor: not-allowed; } .aud-cand.is-on { border-color: #818cf8; cursor: default; }
.aud-cand small { color: var(--muted); } .aud-cand span { font-size: 13px; font-weight: 700; color: #fcd34d; }
.aud-comp { display: block; padding: 6px 0; }
.aud-title { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.aud-title h3 { margin: 0; text-transform: none; letter-spacing: 0; font-size: 22px; overflow-wrap: anywhere; }
.aud-running, .aud-failed { margin-top: 14px; text-align: center; display: grid; gap: 8px; justify-items: center; }
.aud-failed { text-align: left; justify-items: start; border-color: rgba(239,68,68,.4); }
.aud-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: #818cf8; animation: aud-turn 1s linear infinite; }
@keyframes aud-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .aud-spin { animation: none; } }
.aud-detail { display: grid; gap: 14px; margin-top: 14px; min-width: 0; }
.aud-bar-act { display: flex; flex-wrap: wrap; gap: 8px; }
.aud-bar-act .btn { min-height: 40px; padding: 0 16px; font-size: 13px; }
.aud-info { margin: 0; }
.aud-scores { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.aud-sc { display: grid; gap: 6px; justify-items: start; }
.aud-sc small { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.aud-bar { display: block; width: 100%; height: 6px; border-radius: 6px; background: var(--soft); overflow: hidden; }
.aud-bar u { display: block; height: 100%; background: var(--brand); }
.aud-figs { display: grid; gap: 12px; }
.aud-fig { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; }
.aud-fig > b { flex: 0 0 90px; }
.aud-fig span { font-weight: 700; font-variant-numeric: tabular-nums; } .aud-fig span small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }
.aud-nodata { color: #fcd34d; font-weight: 600; }
.aud-cmp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 90px; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: center; }
.aud-cmp-row em { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.aud-cmp-row b { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); } .aud-cmp-row b.up { color: #4ade80; } .aud-cmp-row b.down { color: #f87171; }
.aud-doc { display: grid; gap: 18px; }
.aud-doc-hint { margin: 0; font-size: 12px; color: var(--muted); }
.aud-sec h4 { margin: 0 0 8px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: #a5b4fc; }
.aud-sec small { display: block; margin: 8px 0 2px; color: var(--muted); font-size: 12px; font-weight: 700; }
.aud-ed { padding: 6px 8px; margin: -6px -8px; border-radius: 8px; outline: none; white-space: pre-wrap; overflow-wrap: anywhere; min-height: 1.4em; line-height: 1.5; cursor: text; }
.aud-ed:hover { background: rgba(255,255,255,.04); } .aud-ed:focus { background: rgba(99,102,241,.14); box-shadow: 0 0 0 2px rgba(99,102,241,.45); }
.aud-first { font-weight: 700; font-size: 16px; }
.aud-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.aud-good small { color: #86efac; } .aud-bad small { color: #fca5a5; }
.aud-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.aud-list li { display: flex; gap: 8px; align-items: flex-start; padding-left: 14px; position: relative; }
.aud-list li::before { content: ''; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: #818cf8; }
.aud-list li.aud-add { padding-left: 0; } .aud-list li.aud-add::before { display: none; }
.aud-list li > .aud-ed { flex: 1; min-width: 0; }
.aud-x { flex: none; width: 28px; height: 28px; border: 0; border-radius: 8px; background: none; color: var(--dim); cursor: pointer; font-size: 18px; line-height: 1; }
.aud-x:hover { background: rgba(239,68,68,.18); color: #fca5a5; }
.aud-month { padding: 10px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.aud-panel h3 { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.aud-panel h3 .btn { text-transform: none; letter-spacing: 0; color: #fff; }
.aud-prow { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.aud-prow b, .aud-prow small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .aud-prow small { color: var(--muted); font-size: 12px; }
.aud-sched { margin: 14px 0 0; }
.aud-arch h4 { margin: 8px 0 10px; }
@media (max-width: 767px) {
  .aud-set-row { grid-template-columns: minmax(0, 1fr); }
  .aud-row { grid-template-columns: 44px minmax(0, 1fr) auto; row-gap: 4px; }
  .aud-owner { grid-column: 2; grid-row: 2; } .aud-flags { grid-column: 3; grid-row: 1 / span 2; flex-direction: column; align-items: flex-end; gap: 4px; }
  .aud-search { flex-wrap: wrap; } .aud-search .btn { width: 100%; }
  .aud-scores { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aud-two { grid-template-columns: minmax(0, 1fr); }
  .aud-cmp-row { grid-template-columns: minmax(0, 1fr) auto; } .aud-cmp-row b { grid-column: 2; }
  .aud-bar-act .btn { flex: 1 1 calc(50% - 8px); }
}
/* Barra móvil estrecha: solo iconos; el ítem activo muestra su etiqueta en una pastilla encima */
@media (max-width: 420px) {
  .rail { padding-left: 0; padding-right: 0; }
  .nav-item { min-width: 0; min-height: 52px; justify-content: center; position: relative; }
  .nav-item span { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); opacity: 0; pointer-events: none; white-space: nowrap; padding: 4px 10px; border-radius: 8px; background: #151826; border: 1px solid var(--line); font-size: 10.5px; letter-spacing: 0; }
  .nav-item.on span { opacity: 1; }
  .rail a.nav-item:first-of-type span { left: 4px; transform: none; }
  .rail a.nav-item:last-of-type span { left: auto; right: 4px; transform: none; }
  .nav-item svg { width: 24px; height: 24px; }
}
.aud-err { margin: 2px 0 0; font-size: 12.5px; font-weight: 600; color: #fca5a5; }
.aud-bad-in { border-color: rgba(239,68,68,.7); }

/* ---- Documentos (H7) ---- */
.docs { display: grid; gap: 12px; min-width: 0; }
.dg-top { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.dg-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: 1 1 260px; min-width: 0; }
.dg-filters .input { width: auto; min-height: 38px; font-size: 13px; max-width: 100%; }
.dg-trash { border: 1px solid var(--line); background: var(--soft); color: var(--muted); border-radius: 99px; min-height: 38px; padding: 0 14px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.dg-trash.on { background: #fff; color: #07080d; }
.dz { display: grid; gap: 2px; text-align: center; padding: 18px 14px; border-radius: 14px; border: 1px dashed rgba(255,255,255,.2); background: rgba(255,255,255,.02); cursor: pointer; transition: .15s; }
.dz small { color: var(--muted); font-size: 12px; }
.dz:hover, .dz.over, .dz:focus-visible { border-color: #818cf8; background: rgba(99,102,241,.12); outline: none; }
.dq { display: grid; gap: 6px; }
.dq-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 8px 12px; border-radius: 12px; background: var(--soft); font-size: 13px; }
.dq-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dq-row small { color: var(--muted); text-align: right; }
.dq-bar { grid-column: 1 / -1; height: 5px; border-radius: 5px; background: rgba(255,255,255,.08); overflow: hidden; order: 3; }
.dq-bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .15s; }
.dq-row.ok small { color: var(--ok); } .dq-row.err small { color: #fca5a5; }
.dg { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.dg > .empty { grid-column: 1 / -1; }
.dc { display: grid; grid-template-rows: auto auto; text-align: left; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); color: var(--ink); font: inherit; cursor: pointer; overflow: hidden; min-width: 0; transition: transform .15s, border-color .15s; }
.dc:hover { transform: translateY(-2px); border-color: #818cf8; }
.dc.is-trash { opacity: .7; }
.dc-th { aspect-ratio: 4 / 3; display: grid; place-items: center; align-content: center; gap: 6px; background: rgba(255,255,255,.04); overflow: hidden; font-size: 12px; color: var(--muted); text-align: center; }
.dc-th img { width: 100%; height: 100%; object-fit: cover; }
.dc-ico { font-size: 38px; }
.dc-fail { color: #fca5a5; font-size: 26px; }
.dc-fail small { font-size: 11px; }
.dc-tx { padding: 8px 10px 10px; min-width: 0; }
.dc-tx b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-tx small { display: block; color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.15); border-top-color: #818cf8; animation: dcspin 1s linear infinite; display: inline-block; }
@keyframes dcspin { to { transform: rotate(360deg); } }
.dg-auto h4 { margin: 4px 0 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #cbd2e1; }
.dg-auto h4 .tag { margin-left: 4px; }
.dg-a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 12px; margin-bottom: 6px; border-radius: 12px; background: var(--soft); color: var(--ink); text-decoration: none; font-size: 13px; }
.dg-a b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dg-a small { color: var(--muted); }
.dg--search { margin-top: 10px; }
.dg--search .dc-th { aspect-ratio: 16 / 10; }
.ps .dg { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.ps .dz { padding: 12px; }

.dv-wrap { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(3,4,8,.88); }
.dv { position: relative; width: min(1100px, 100%); height: min(760px, 100%); display: grid; grid-template-rows: auto minmax(0, 1fr); padding: 0; overflow: hidden; background: rgba(14,16,26,.98); }
.dv-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.dv-title { min-width: 0; flex: 1 1 200px; } .dv-title b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-title small { color: var(--muted); font-size: 12px; }
.dv-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.dv-stage { display: grid; place-items: center; min-height: 0; padding: 12px; overflow: hidden; }
.dv-media { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
.dv-msg { display: grid; gap: 12px; justify-items: center; text-align: center; color: var(--muted); max-width: 360px; }
.dv-msg small { font-size: 12.5px; } .dv-big { font-size: 56px; }
.dv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; border-radius: 12px; background: rgba(255,255,255,.1); color: #fff; font-size: 28px; cursor: pointer; z-index: 2; }
.dv-prev { left: 8px; } .dv-next { right: 8px; } .dv-nav:hover { background: rgba(255,255,255,.2); }
body.dv-open { overflow: hidden; }
@media (max-width: 767px) {
  .dg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dv-wrap { padding: 0; } .dv { height: 100%; border-radius: 0; }
  .dv-nav { width: 38px; height: 54px; }
}

.sys-store { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.sys-store .warn { color: #fbbf24; font-weight: 700; }

/* ---- Accesos (cofre) y Portal (H7) ---- */
.vt-status { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.vt-status b { display: block; font-size: 15px; } .vt-status small { color: var(--muted); font-size: 12.5px; }
.vt-status.is-open { border-color: rgba(34,197,94,.35); }
.vt-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.vt-tools { display: grid; gap: 10px; margin-bottom: 12px; }
.vt-rows { display: grid; gap: 8px; }
.vt-item { display: flex; gap: 12px; align-items: center; width: 100%; min-height: 56px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.vt-item:hover { background: var(--glass-strong); }
.vt-main { flex: 1; min-width: 0; display: grid; }
.vt-main b, .vt-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .vt-main small { color: var(--muted); font-size: 12.5px; }
.vt-seen { color: var(--dim); font-size: 11.5px; white-space: nowrap; }
.vt-panel { width: min(500px, 100%); }
.vt-locked { display: grid; gap: 10px; justify-items: start; padding: 18px; border-radius: 16px; border: 1px dashed rgba(255,255,255,.18); }
.vt-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.vt-row > small { display: block; margin-bottom: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.vt-val { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.vt-text { min-width: 0; overflow-wrap: anywhere; font-size: 15px; }
.vt-mono { font-family: var(--mono); }
.vt-pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.vt-code { font: 800 30px/1 var(--mono); letter-spacing: .08em; font-variant-numeric: tabular-nums; color: #fff; }
.vt-left { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.vt-track { height: 4px; margin-top: 6px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.vt-bar { display: block; height: 100%; background: var(--brand); transition: width 1s linear; }
.vt-warn { margin: 10px 0; padding: 10px 12px; border-radius: 12px; background: rgba(245,158,11,.12); color: #fcd34d; font-size: 13px; }
.vt-err { margin: 6px 0 0; min-height: 0; color: #fca5a5; font-size: 13px; font-weight: 600; }
.vt-gen { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: -6px 0 14px; }
.vt-gen .check { min-height: 34px; font-size: 13px; } .vt-gen input[type=range] { width: 120px; }
.vt-loss { padding: 10px 12px; border-radius: 12px; background: rgba(245,158,11,.12); color: #fcd34d; font-weight: 600; font-size: 13.5px; }
.vt-wizard { max-width: 520px; } .vt-wizard h3 { text-transform: none; letter-spacing: 0; font-size: 18px; }
.vt-imp { max-height: 40vh; overflow-y: auto; display: grid; gap: 6px; margin: 8px 0; }
.vt-imp-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--soft); cursor: pointer; }
.vt-imp-row input { width: 20px; height: 20px; flex: none; }
.vt-imp-row span { min-width: 0; display: grid; } .vt-imp-row b, .vt-imp-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .vt-imp-row small { color: var(--muted); font-size: 12px; }
.vt--panel > h3 { margin-bottom: 10px; }
.vt-link { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 14px 0; padding: 10px 12px; border-radius: 12px; background: var(--soft); font-size: 13.5px; }
.portal-card .portal-url { font-family: var(--mono); font-size: 13px; }
.portal-card .danger { color: #fca5a5; }
.aud-portal { margin: 6px 0 10px; }
@media (max-width: 767px) {
  .vt-panel { width: 100%; padding: 16px; }
  .vt-status .vt-acts .btn { flex: 1 1 auto; }
  .vt-seen { display: none; }
}

/* ===== H8: Redes ===== */
.social-tabs { margin-bottom: 16px; width: fit-content; }
.social-tabs .tab { text-decoration: none; display: inline-flex; align-items: center; }
.social-warn { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; font-size: 13px; font-weight: 600; background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.4); color: #fcd34d; }
.social-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.social-bar .hint { flex: 1 1 260px; margin: 0; }
.social-bar select.input { width: auto; min-width: 170px; flex: 0 1 220px; }
.social-bar > .btn:last-child { margin-left: auto; }
.social-weeknav { display: flex; align-items: center; gap: 8px; }
.social-weeknav b { display: grid; text-align: center; min-width: 130px; font-size: 15px; }
.social-weeknav b small { font-weight: 600; color: var(--muted); font-size: 12px; }
.social-weeknav .btn--sm { min-width: 44px; min-height: 44px; }
.social-pbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; margin-bottom: 14px; border-radius: 14px; background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.35); }
.social-pbar b { color: #fcd34d; font-size: 18px; }
.social-plan { margin: 0 0 14px; }

/* Semana: lista por día en móvil, 7 columnas en ordenador */
.social-week { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.social-week > .empty { grid-column: 1 / -1; }
.social-day { min-width: 0; }
.social-day h4 { margin: 0 0 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.social-day h4 span { color: var(--ink); }
.social-day.is-today h4 span { color: #a5b4fc; }
.social-day--empty { display: none; }
.social-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 8px; margin-bottom: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--soft); text-decoration: none; color: inherit; min-height: 64px; transition: border-color .15s, transform .15s; }
.social-card:hover, .social-card.on { border-color: #818cf8; transform: translateY(-1px); }
.social-th { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.05); display: grid; place-items: center; min-width: 0; }
.social-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.social-th-ico { font-size: 24px; }
.social-ct { min-width: 0; display: grid; gap: 3px; align-content: start; }
.social-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; min-width: 0; }
.social-meta b { font: 700 12.5px var(--mono); }
.social-meta em { font-style: normal; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.social-cap { font-size: 12.5px; color: rgba(238,241,248,.85); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.social-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.social-tags small { font-size: 11px; font-weight: 700; color: var(--muted); }
.social-flag { font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 99px; background: rgba(239,68,68,.16); color: #fca5a5 !important; }
.social-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--c); box-shadow: 0 0 8px var(--c); }
.social-dot--draft { --c: #f59e0b; } .social-dot--approved { --c: #3b82f6; } .social-dot--scheduled { --c: #22d3ee; }
.social-dot--published { --c: #22c55e; } .social-dot--failed { --c: #ef4444; } .social-dot--rejected { --c: #94a3b8; box-shadow: none; }
@media (min-width: 900px) {
  .social-week { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: start; }
  .social-day--empty { display: block; }
  .social-day { padding: 8px; border-radius: 14px; background: rgba(255,255,255,.025); border: 1px solid var(--line); min-height: 160px; }
  .social-day.is-today { border-color: rgba(129,140,248,.5); }
  .social-card { grid-template-columns: minmax(0, 1fr); padding: 6px; gap: 6px; }
  .social-th { aspect-ratio: 4 / 3; }
}

/* Ficha: panel lateral en ordenador, hoja inferior en móvil */
.social-scrim { z-index: 54; }
.social-panel { z-index: 55; width: min(520px, 100%); display: flex; flex-direction: column; padding: 0; }
.social-phead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 10px; }
.social-phead h3 { margin: 0 0 6px; text-transform: none; letter-spacing: 0; font-size: 17px; }
.social-st { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.social-pbody { flex: 1; overflow-y: auto; padding: 4px 20px 12px; min-height: 0; }
.social-pfoot { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(10,12,20,.98); }
.social-pfoot .btn { flex: 1 1 auto; min-height: 44px; }
.social-pfoot .btn--ghost.danger { color: #fca5a5; }
.social-err { margin: 0; padding: 0 20px 8px; font-size: 13px; font-weight: 600; color: #fca5a5; }
.social-err:empty { display: none; }
.social-errbox { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; font-size: 13px; font-weight: 600; background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.45); color: #fca5a5; overflow-wrap: anywhere; }
.social-why, .social-lead { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.social-ta { min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
.social-count { display: block; text-align: right; font: 600 12px var(--mono); color: var(--muted); margin-top: 4px; }
.social-count.over { color: #fca5a5; }
.social-media { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.social-mi { position: relative; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.06); display: grid; place-items: center; }
.social-mi img { width: 100%; height: 100%; object-fit: cover; }
.social-mx { position: absolute; top: 3px; right: 3px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; cursor: pointer; font-size: 12px; }
.social-add { width: 84px; height: 84px; border-radius: 12px; border: 1px dashed rgba(255,255,255,.3); background: none; color: var(--muted); cursor: pointer; font-weight: 700; font-size: 13px; }
.social-add:hover { color: #fff; border-color: #818cf8; }
.social-flag-row { flex-basis: 100%; margin: 0; font-size: 13px; font-weight: 600; color: #fcd34d; }
.social-lib { margin-top: 10px; padding: 10px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); }
.social-lib-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.social-lib-top b { flex: 1; font-size: 13px; }
.social-lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 6px; max-height: 220px; overflow-y: auto; }
.social-lib-it { aspect-ratio: 1; padding: 0; border-radius: 10px; border: 2px solid transparent; overflow: hidden; background: rgba(255,255,255,.06); cursor: pointer; display: grid; place-items: center; }
.social-lib-it img { width: 100%; height: 100%; object-fit: cover; }
.social-lib-it.on { border-color: #818cf8; box-shadow: 0 0 0 2px rgba(129,140,248,.4); }
@media (max-width: 767px) {
  .social-panel { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 90dvh; border-left: 0; border-top: 1px solid var(--line); border-radius: 22px 22px 0 0; animation: rise .25s both; }
}

/* Interruptor «Para redes» y similares */
.social-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; cursor: pointer; min-height: 36px; color: var(--ink); }
.social-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.social-switch i { position: relative; width: 38px; height: 22px; border-radius: 99px; background: rgba(255,255,255,.18); transition: background .2s; flex: none; }
.social-switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.social-switch input:checked + i { background: #6366f1; }
.social-switch input:checked + i::after { transform: translateX(16px); }
.social-switch input:focus-visible + i { outline: 2px solid #a5b4fc; outline-offset: 2px; }
.social-switch input:disabled + i { opacity: .5; }
.dc-cell { display: grid; gap: 4px; min-width: 0; }
.dc-cell .social-switch { font-size: 12px; min-height: 30px; padding-left: 4px; }

/* Métricas */
.social-mc h3 small, .social-acc h3 small { font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
.social-mc { margin-bottom: 16px; }
.social-kps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.social-kp { padding: 10px 12px; border-radius: 14px; background: var(--soft); min-width: 0; }
.social-kp small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.social-kp strong { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.social-kp em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.social-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.social-charts figure { margin: 0; min-width: 0; }
.social-charts figcaption { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.social-key { width: 12px; height: 4px; border-radius: 2px; display: inline-block; }
.social-chart { width: 100%; height: auto; display: block; }
.social-ax { fill: #9aa3b8; font: 11px var(--font); font-variant-numeric: tabular-nums; }
.social-val { fill: #eef1f8; font: 700 12px var(--font); font-variant-numeric: tabular-nums; }
.social-val--s { font-size: 10.5px; fill: #c7cde0; }
.social-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.social-h4 { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.social-trow { display: grid; grid-template-columns: 22px 52px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.social-trow:last-child { border: 0; }
.social-trow:hover b { color: #fff; }
.social-rank { font: 800 14px var(--mono); color: #a5b4fc; text-align: center; }
.social-th--s { width: 52px; height: 52px; aspect-ratio: auto; }
.social-tx b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.social-tx small { display: block; font-size: 12px; color: var(--muted); }
@media (max-width: 899px) { .social-charts { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .social-kps { grid-template-columns: 1fr; } .social-kp { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; } .social-kp strong { order: 2; } .social-kp em { display: none; } }

/* Informes y cuentas */
.social-reps { display: grid; gap: 14px; }
.social-rep { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.social-rep:last-child { border: 0; padding-bottom: 0; }
.social-rep-h { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.social-rep-h small, .social-noan { color: var(--muted); font-size: 12px; }
.social-rep-a { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.social-an summary { cursor: pointer; font-size: 13px; font-weight: 700; color: #a5b4fc; min-height: 32px; display: flex; align-items: center; }
.social-an p { margin: 6px 0 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; color: rgba(238,241,248,.9); }
.social-accs { display: grid; gap: 14px; }
.social-accf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; align-items: end; }
.social-accf > .social-switch { grid-column: 1 / -1; margin-bottom: 12px; }
.social-accf .social-wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .social-accf { grid-template-columns: 1fr; } }
.social-mc h3 > span, .social-acc h3 > span { text-transform: none; letter-spacing: 0; font-size: 15px; }

/* ===== Conversaciones (H10) ===== */
.nav-badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--bad); color: #fff; font: 800 11px/18px var(--font); font-style: normal; text-align: center; box-shadow: 0 0 0 2px #0b0d16; pointer-events: none; }
@media (max-width: 767px) { .nav-badge { top: 2px; right: calc(50% - 22px); } }

.cv { display: grid; grid-template-columns: 340px minmax(0, 1fr) 320px; gap: 14px; height: calc(100dvh - 170px); min-height: 420px; }
.cv-pane { padding: 0; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.cv-list { padding: 12px; gap: 10px; }
.cv-search { min-height: 42px; }
.cv-filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cv .fchip { border: 0; cursor: pointer; font-size: 12px; font-weight: 700; padding: 6px 12px; min-height: 32px; border-radius: 99px; background: rgba(255,255,255,.06); color: var(--muted); }
.cv .fchip.on { background: #fff; color: #07080d; }
.cv-chsel { min-height: 32px; width: auto; max-width: 100%; padding: 0 8px; font-size: 12px; border-radius: 99px; }
.cv-items { flex: 1; overflow-y: auto; min-height: 0; display: grid; gap: 6px; align-content: start; }
.cv-item { display: flex; gap: 10px; padding: 10px; border-radius: 14px; text-decoration: none; background: var(--soft); min-width: 0; border: 1px solid transparent; }
.cv-item:hover { background: var(--glass-strong); }
.cv-item.on { border-color: rgba(129,140,248,.6); background: rgba(99,102,241,.14); }
.cv-tx { min-width: 0; flex: 1; }
.cv-l1 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.cv-l1 b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-item.unread .cv-l1 b { color: #fff; }
.cv-l1 em { font-style: normal; font-size: 11px; color: var(--muted); flex: none; }
.cv-l2 { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.cv-l3 { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.cv-ch { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: #475569; }
.cv-ch--whatsapp { background: #16a34a; } .cv-ch--instagram { background: linear-gradient(135deg, #f59e0b, #ec4899, #8b5cf6); } .cv-ch--facebook { background: #2563eb; }
.cv-ch--voz { background: #0ea5e9; } .cv-ch--web { background: #6366f1; } .cv-ch--formulario { background: #64748b; }
.cv-brand { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.08); color: var(--muted); }
.cv-brand--trattoria { background: rgba(245,158,11,.16); color: #fbbf24; } .cv-brand--agencia { background: rgba(99,102,241,.2); color: #a5b4fc; }
.cv-st { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.cv-st--tetoca { color: #fca5a5; } .cv-st--pausa { color: #fcd34d; } .cv-st--agente { color: #86efac; }
.cv-unread { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--indigo); color: #fff; font: 800 11px/18px var(--font); text-align: center; }

.cv-chat { padding: 0; }
.cv-head { padding: 12px 14px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; flex: none; }
.cv-head-top { display: flex; gap: 10px; align-items: center; min-width: 0; }
.cv-htx { min-width: 0; flex: 1; }
.cv-htx b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-htx span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-head-ctl { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cv-back, .cv-ficha-btn { display: none; min-height: 40px; padding: 0 14px; }
.cv-switch { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px 0 6px; border-radius: 99px; border: 1px solid var(--line); background: rgba(255,255,255,.06); cursor: pointer; font-weight: 700; font-size: 13px; }
.cv-switch i { width: 34px; height: 20px; border-radius: 99px; background: #64748b; position: relative; transition: background .2s; }
.cv-switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.cv-switch.on i { background: var(--ok); } .cv-switch.on i::after { transform: translateX(14px); }
.cv-resume { min-height: 40px; padding: 0 14px; }
.cv-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.cv-day { align-self: center; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: capitalize; margin: 6px 0; }
.cv-sys { align-self: center; font-size: 12px; color: var(--muted); font-style: italic; text-align: center; max-width: 90%; overflow-wrap: anywhere; }
.cv-b { max-width: min(78%, 560px); padding: 9px 12px; border-radius: 16px; font-size: 14px; background: var(--glass-strong); min-width: 0; }
.cv-btxt { white-space: pre-wrap; overflow-wrap: anywhere; }
.cv-bmeta { font-size: 11px; color: var(--muted); margin-top: 4px; }
.cv-b--cli { align-self: flex-start; border-bottom-left-radius: 5px; }
.cv-b--agente { align-self: flex-end; border-bottom-right-radius: 5px; background: rgba(148,163,184,.2); }
.cv-b--luiggi { align-self: flex-end; border-bottom-right-radius: 5px; background: var(--brand); color: #fff; }
.cv-b--luiggi .cv-bmeta { color: rgba(255,255,255,.8); }
.cv-b.failed { outline: 1px solid rgba(239,68,68,.7); }
.cv-err { color: #fca5a5; }
.cv-b--luiggi .cv-err { color: #fff; font-weight: 700; }
.cv-retry { min-height: 36px; padding: 0 14px; margin-top: 8px; }
.cv-media { display: inline-block; margin-top: 6px; font-size: 12px; color: #a5b4fc; }
.cv-voz { align-self: stretch; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: rgba(255,255,255,.03); display: flex; flex-direction: column; gap: 8px; }
.cv-voz > summary { cursor: pointer; font-weight: 700; font-size: 13px; min-height: 28px; }
.cv-voz[open] > summary { margin-bottom: 8px; }
.cv-voz > .cv-b { margin-bottom: 8px; }
.cv-compose { flex: none; padding: 12px 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.cv-hint { font-size: 12px; color: var(--muted); }
.cv-ta { min-height: 64px; padding: 10px 14px; resize: vertical; max-height: 160px; line-height: 1.4; }
.cv-sendrow { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.cv-ficha { padding: 14px; gap: 12px; overflow-y: auto; }
.cv-fempty { color: var(--muted); font-size: 13px; text-align: center; padding: 20px 8px; }
.cv-fhead { display: flex; gap: 12px; align-items: center; min-width: 0; }
.cv-fhead .av { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; background: var(--brand); color: #fff; flex: none; }
.cv-fhead b, .cv-fhead span { display: block; overflow-wrap: anywhere; }
.cv-fhead span { font-size: 12px; color: var(--muted); }
.cv-fcard { border-radius: 14px; padding: 12px; background: var(--soft); display: grid; gap: 8px; min-width: 0; }
.cv-fcard h4 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.cv-row small { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cv-row span { display: block; font-size: 14px; overflow-wrap: anywhere; }
.cv-sub { font-size: 12.5px; color: var(--muted); }
.cv-mt { margin-top: 6px; min-height: 40px; }
.cv-sum { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.cv-slots { display: grid; gap: 6px; }
.cv-slot { min-height: 44px; justify-content: flex-start; text-transform: capitalize; }
.cv-other { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.cv-other .input { font-size: 14px; }
.cv-discard { min-height: 40px; }
.cv-sug { display: grid; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.cv-sug:first-of-type { border: 0; padding-top: 0; }
.cv-sugbtn { display: flex; gap: 6px; } .cv-sugbtn .btn { min-height: 40px; padding: 0 16px; }

/* Menos de 1024 px: un panel a la vez (lista -> chat -> ficha) */
@media (max-width: 1023px) {
  .cv { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 190px); }
  .cv--list .cv-chat, .cv--list .cv-ficha, .cv--chat .cv-list, .cv--chat .cv-ficha, .cv--ficha .cv-list, .cv--ficha .cv-chat { display: none; }
  .cv-back, .cv-ficha-btn { display: inline-flex; }
  .cv-root:has(.cv--chat) .section-head, .cv-root:has(.cv--ficha) .section-head { display: none; }
  .cv--chat, .cv--ficha { height: calc(100dvh - var(--bar-h) - 80px); }
  .cv-b { max-width: 88%; }
}
@media (max-width: 767px) {
  .cv { height: calc(100dvh - var(--bar-h) - 190px); }
  .cv--chat, .cv--ficha { height: calc(100dvh - var(--bar-h) - 70px); }
}
.cv-needs:empty { display: none; }

/* ---- Ventas (H11): propuestas, catálogo, embudo ---- */
.sv-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 16px; }
.sv-chip { display: inline-flex; align-items: center; border: 1px solid var(--line); cursor: pointer; font-size: 13px; font-weight: 700; padding: 6px 14px; min-height: 36px; border-radius: 99px; background: var(--soft); color: var(--muted); text-decoration: none; }
.sv-chip.on { background: #fff; color: #07080d; border-color: #fff; }
span.sv-chip { cursor: default; min-height: 30px; padding: 4px 12px; }
.sv-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.sv-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.sv-item { display: grid; gap: 6px; text-decoration: none; color: inherit; padding: 16px; }
.sv-item:hover { background: var(--glass-strong); }
.sv-i1 { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sv-i2 { color: var(--ink); font-size: 14px; overflow-wrap: anywhere; }
.sv-i3 { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.sv-back { margin-bottom: 12px; }
.sv-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.sv-title h2 { margin: 0; font-size: 22px; }
.sv-link { color: #a5b4fc; font-size: 13px; }
.sv-card { padding: 16px; margin-bottom: 14px; }
.sv-card h3 { margin: 0 0 8px; font-size: 16px; }
.sv-card h4 { margin: 18px 0 8px; font-size: 14px; }
.sv-h3 { margin: 22px 0 10px; font-size: 16px; }
.sv-warn { margin-bottom: 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(245,158,11,.5); background: rgba(245,158,11,.12); color: #fde68a; font-size: 14px; }
.sv-warn ul { margin: 6px 0 0; padding-left: 18px; }
.sv-two { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
.sv-two > * { min-width: 0; }
.sv-lines { display: grid; gap: 10px; margin: 10px 0; }
.sv-line { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--soft); }
.sv-line .sv-d { grid-column: 1 / -1; }
.sv-line .sv-lt { align-self: center; text-align: right; }
.sv-line .sv-x { min-height: 46px; }
.sv-line .input[aria-invalid="true"] { border-color: var(--bad); }
.sv-totals { display: grid; gap: 8px; margin-top: 14px; }
.sv-totals > div { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 12px; border-radius: 12px; background: var(--soft); }
.sv-totals small { grid-column: 1 / -1; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-size: 11px; font-weight: 700; }
.sv-totals span { color: var(--muted); font-size: 13px; }
.sv-totals b { font-size: 17px; }
.sv-actions { display: flex; gap: 10px; flex-wrap: wrap; position: sticky; bottom: calc(var(--bar-h) + 8px); padding: 10px; border-radius: 16px; background: rgba(12,14,22,.92); border: 1px solid var(--line); backdrop-filter: blur(10px); z-index: 5; }
.sv-actions .btn { flex: 1 1 130px; }
.sv-steps { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.sv-linkrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.sv-linkrow code { flex: 1 1 200px; min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--soft); overflow-wrap: anywhere; font-size: 12px; }
.sv-accept dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.sv-accept dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.sv-accept dd { margin: 0; overflow-wrap: anywhere; }
.sv-ro { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sv-ro span:nth-child(2) { color: var(--muted); font-size: 12px; grid-row: 2; }
.sv-ro b { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.sv-prod.off { opacity: .6; }
.sv-cat { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); align-items: start; }
.sv-cat .sv-card { margin-bottom: 0; }
.sv-sw { margin: 6px 0; }
.sv-funnel { padding: 16px; margin-bottom: 16px; }
.sv-fh { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sv-fh h3 { margin: 0; }
.sv-month { display: flex; align-items: center; gap: 8px; }
.sv-month .btn { min-height: 36px; padding: 0 12px; }
.sv-kps { display: grid; gap: 8px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sv-kp { padding: 10px; border-radius: 12px; background: var(--soft); display: grid; gap: 2px; }
.sv-kp small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.sv-kp strong { font-size: 17px; overflow-wrap: anywhere; }
.sv-chan { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.sv-pv { margin: 10px 0 0; padding: 8px 12px; border-radius: 12px; background: rgba(100,116,139,.18); font-size: 13px; }
.sv-fee { margin-top: 8px; }
.cv-tag { color: #a5b4fc; font-style: italic; }
@media (min-width: 720px) {
  .sv-two { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sv-line { grid-template-columns: 2fr 130px 80px 120px 110px 46px; align-items: center; }
  .sv-line .sv-d { grid-column: auto; }
  .sv-actions { position: static; background: none; border: 0; padding: 0; backdrop-filter: none; }
}
@media (max-width: 480px) { .sv-kps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Radar de Captación (H12) */
.rd-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.rd-list { display: grid; gap: 8px; margin: 10px 0; }
.rd-row { display: grid; gap: 8px 12px; grid-template-columns: 1fr; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--soft); align-items: center; }
.rd-row.off { opacity: .45; }
.rd-name { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.rd-name small, .rd-meta { color: var(--muted); font-size: 12px; }
.rd-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.rd-ex { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; min-height: 36px; cursor: pointer; }
.rd-btn { min-height: 36px; padding: 0 14px; font-size: 13px; text-decoration: none; display: inline-flex; align-items: center; }
.rd-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.rd-why { color: #fde68a; font-size: 13px; overflow-wrap: anywhere; }
.rd-batch { padding: 10px 0; border-bottom: 1px solid var(--line); }
.rd-batch summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.rd-batch .sv-chan { margin: 0; }
.rd-mini { grid-template-columns: 1fr auto; }
.rd-mini .rd-why { grid-column: 1 / -1; }
.rd-set summary { cursor: pointer; margin-bottom: 8px; }
@media (min-width: 720px) {
  .rd-row { grid-template-columns: 90px minmax(160px, 1.4fr) 1.6fr auto; }
  .rd-rev { grid-template-columns: minmax(160px, 1fr) 1.4fr auto; }
  .rd-mini { grid-template-columns: 1fr auto 1.2fr; }
  .rd-mini .rd-why { grid-column: auto; }
}
@media (max-width: 560px) { .sv-kps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rd-bf { flex-basis: 100%; color: var(--muted); font-size: 12px; }
