/* ==========================================================================
   Paylab — sistema visual
   Tema claro por defecto; oscuro con [data-theme="dark"].
   Identidad: degradé índigo #2E3192 → cian #00AEEF.
   ========================================================================== */
:root {
  --brand-1: #2e3192;
  --brand-2: #00aeef;
  --grad: linear-gradient(120deg, var(--brand-1) 0%, #1b6fd0 55%, var(--brand-2) 100%);
  --bg: #f3f6fc;
  --panel: #ffffff;
  --sunk: #edf1f9;
  --hover: #f4f7fd;
  --line: #e1e7f2;
  --line-2: #cdd6e7;
  --t1: #0e1538;
  --t2: #4a5378;
  --t3: #8890ad;
  --accent: #1f5fd6;
  --accent-soft: color-mix(in srgb, var(--accent) 10%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 35%, transparent);
  --on-accent: #ffffff;
  --pos: #15803d; --pos-soft: #e8f5ec;
  --neg: #c2410c; --neg-soft: #fcefe7;
  --bad: #b42318; --bad-soft: #fdecea;
  --warn: #a16207; --warn-soft: #fbf3dc;
  --info: #2952a3; --info-soft: #eaf0fb;
  /* Semáforo de objetivos (validado para daltonismo; siempre va con su nombre al lado) */
  --sem-v: #16834a; --sem-a: #b88600; --sem-r: #d0352a;
  --c1: var(--accent); --c2: #00aeef; --c3: #2e3192; --c4: #b9468b; --c5: #d9822b; --c6: #6b5bd6; --c7: #12a17f; --c8: #8a6d55;
  --grid: #eaeff7;
  --glow: rgba(0, 174, 239, .18);
  --shadow: 0 1px 0 rgba(14, 21, 56, .03), 0 1px 3px rgba(14, 21, 56, .05);
  --shadow-lg: 0 16px 44px -14px rgba(14, 21, 56, .32);
  --radius: 14px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #060a1c;
  --panel: #0c1230;
  --sunk: #111a3d;
  --hover: #101839;
  --line: #1b2552;
  --line-2: #27336a;
  --t1: #e9edff;
  --t2: #a3abd3;
  --t3: #6c76a6;
  --accent: #2bb6f2;
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --on-accent: #04122a;
  --pos: #4ade80; --pos-soft: rgba(74, 222, 128, .1);
  --neg: #fb923c; --neg-soft: rgba(251, 146, 60, .1);
  --bad: #f87171; --bad-soft: rgba(248, 113, 113, .1);
  --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .1);
  --info: #7aa2f7; --info-soft: rgba(122, 162, 247, .12);
  --sem-v: #1f9a72; --sem-a: #bf8a0a; --sem-r: #e2466f;
  --c2: #5b8cff; --c3: #8b8ff0; --c4: #e07ab5; --c5: #f0a04b; --c6: #9d8ff5; --c7: #4ade9b; --c8: #c4a585;
  --grid: #141c42;
  --glow: rgba(0, 174, 239, .28);
  --shadow: 0 0 0 1px rgba(0, 0, 0, .25);
  --shadow-lg: 0 20px 50px -10px rgba(0, 0, 0, .75);
  color-scheme: dark;
}

* { -webkit-font-smoothing: antialiased; }
html, body { background: var(--bg); color: var(--t1); }
body { background-image: radial-gradient(1100px 520px at 105% -12%, color-mix(in srgb, var(--brand-2) 13%, transparent), transparent 70%), radial-gradient(900px 480px at -12% -8%, color-mix(in srgb, var(--brand-1) 11%, transparent), transparent 70%); background-attachment: fixed; background-repeat: no-repeat; }
body { font-family: Geist, Inter, system-ui, -apple-system, sans-serif; font-size: 14px; letter-spacing: -.005em; }
.num, .tbl td, .kpi .val { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.mono { font-family: "Geist Mono", ui-monospace, monospace; }
::selection { background: var(--accent-soft); }

/* texto */
.t1 { color: var(--t1); } .t2 { color: var(--t2); } .t3 { color: var(--t3); }
.t-accent { color: var(--accent); } .t-pos { color: var(--pos); } .t-bad { color: var(--bad); } .t-warn { color: var(--warn); }
.eyebrow { font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--t3); }
.h1 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--t1); }
.h2 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--t1); }
a.link { color: var(--accent); } a.link:hover { text-decoration: underline; }

/* superficies */
.panel { background: var(--panel); }
.sunk { background: var(--sunk); }
.bd { border-color: var(--line); }
.hair-b { border-bottom: 1px solid var(--line); }
.hair-t { border-top: 1px solid var(--line); }
.hair-r { border-right: 1px solid var(--line); }
.divide > * + * { border-top: 1px solid var(--line); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 56px; }
.card-link { transition: border-color .15s, transform .15s; }
.card-link:hover { border-color: var(--line-2); transform: translateY(-1px); }

/* layout */
.sidebar { --panel: #111a47; --sunk: rgba(255, 255, 255, .08); --hover: rgba(255, 255, 255, .06); --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .16); --t1: #eef1ff; --t2: #aab3dc; --t3: #6e78ad; --accent: #38c6ff; --bg: #0b1238;
  background: radial-gradient(420px 260px at 0% 100%, rgba(0, 174, 239, .22), transparent 70%), linear-gradient(180deg, #0b1238 0%, #121a52 100%); border-right: 1px solid rgba(255, 255, 255, .06); color: var(--t1); }
.sidebar kbd { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .12); color: var(--t2); }
.topbar { background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); position: sticky; }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--grad); opacity: .85; }
.nav-sec { font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--t3); padding: 14px 10px 6px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--t2); font-weight: 450; }
.nav-link svg { width: 17px; height: 17px; color: var(--t3); }
.nav-link:hover { background: var(--hover); color: var(--t1); }
.nav-link.active { background: linear-gradient(90deg, rgba(56, 198, 255, .18), rgba(56, 198, 255, .04)); color: var(--t1); font-weight: 550; box-shadow: inset 2px 0 0 var(--accent); }
.nav-link.active svg { color: var(--accent); }
.nav-count { margin-left: auto; font-size: 11px; color: var(--t3); font-variant-numeric: tabular-nums; }
.topnav a { padding: 6px 12px; border-radius: 8px; color: var(--t2); font-weight: 500; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.topnav a svg { width: 16px; height: 16px; }
.topnav a:hover { color: var(--t1); background: var(--hover); }
.topnav a.active { color: #fff; background: var(--grad); box-shadow: 0 4px 14px -6px var(--glow); }
.topnav a.active svg { color: #fff; }

/* controles */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 9px; font-size: 13px; font-weight: 500; color: var(--t1); background: var(--panel); border: 1px solid var(--line-2); transition: background .12s, border-color .12s; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: .55; cursor: default; }
.btn svg { width: 15px; height: 15px; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-icon { width: 34px; padding: 0; }
.btn-primary { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 18px -8px var(--glow); }
.btn-primary:hover { background: var(--grad); filter: brightness(1.08); }
.btn-accent { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-accent:hover { filter: brightness(1.08); background: var(--accent); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--t2); }
.btn-ghost:hover { background: var(--hover); color: var(--t1); }
.btn-danger { color: var(--bad); }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--sunk); border: 1px solid var(--line); border-radius: 10px; }
.seg button { height: 28px; padding: 0 11px; border-radius: 7px; font-size: 12.5px; font-weight: 500; color: var(--t2); white-space: nowrap; }
.seg button:hover { color: var(--t1); }
.seg button.on { background: var(--panel); color: var(--t1); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.input, .select { width: 100%; height: 36px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 9px; padding: 0 11px; font-size: 13.5px; color: var(--t1); }
textarea.input { height: auto; padding: 9px 11px; line-height: 1.45; }
.input::placeholder { color: var(--t3); }
.input:focus, .select:focus, .btn:focus-visible, .seg button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent-line); }
.select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238d8d95' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.select-sm { height: 30px; font-size: 12.5px; width: auto; }
input[type=date].input::-webkit-calendar-picker-indicator { opacity: .5; }
input[type=color] { width: 44px; height: 36px; padding: 3px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel); }
label.field { display: block; }
label.field.hidden { display: none; }
label.field > span { display: block; font-size: 12px; color: var(--t2); margin-bottom: 5px; font-weight: 500; }
.check { width: 16px; height: 16px; accent-color: var(--accent); }

/* tabs */
.tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.tab { height: 30px; padding: 0 11px; border-radius: 8px; font-size: 12.5px; font-weight: 500; color: var(--t2); }
.tab:hover { color: var(--t1); background: var(--hover); }
.tab.active { color: var(--t1); background: var(--sunk); }
.utabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.utabs button, .utabs a { padding: 12px 0; font-size: 13px; font-weight: 500; color: var(--t3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.utabs button:hover, .utabs a:hover { color: var(--t1); }
.utabs button.active, .utabs a.active { color: var(--t1); border-color: var(--t1); }

/* pills / deltas */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 500; white-space: nowrap; background: var(--sunk); color: var(--t2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill.plain::before { display: none; }
.pill.green { background: var(--pos-soft); color: var(--pos); }
.pill.red { background: var(--bad-soft); color: var(--bad); }
.pill.amber { background: var(--warn-soft); color: var(--warn); }
.pill.blue { background: var(--info-soft); color: var(--info); }
.pill.gray { background: var(--sunk); color: var(--t3); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 550; font-variant-numeric: tabular-nums; }
.delta svg { width: 12px; height: 12px; }
.delta.up { color: var(--pos); } .delta.down { color: var(--neg); } .delta.flat { color: var(--t3); }

/* KPI */
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px 12px; box-shadow: var(--shadow); position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 118px; }
.kpi .lbl { font-size: 12.5px; color: var(--t2); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi .val { font-size: 26px; font-weight: 600; letter-spacing: -.03em; color: var(--t1); margin-top: 6px; line-height: 1.1; }
.kpi .foot { display: flex; align-items: flex-end; gap: 8px; margin-top: auto; padding-top: 8px; min-height: 30px; }
.kpi .foot .vs { font-size: 11.5px; color: var(--t3); }
.kpi .spark { margin-left: auto; width: 46%; max-width: 130px; height: 30px; }
.kpi-row { display: grid; gap: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.kpi-row > .kpi { border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; border-radius: 0; box-shadow: none; }
.thumb-wrap .pill { background: var(--panel); box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.hero-num { font-size: 40px; font-weight: 600; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }

/* live */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--t3); flex: none; }
.live-on .live-dot, .live-dot.on { background: var(--pos); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pos) 55%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.ticker { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ticker > div { padding: 16px 18px; }
.ticker > div + div { border-left: 1px solid var(--line); }
@media (max-width: 640px) { .ticker > div + div { border-left: 0; border-top: 1px solid var(--line); } }
.flash { animation: flash 1.2s ease; }
@keyframes flash { 0% { background: var(--accent-soft); } 100% { background: transparent; } }

/* tablas */
.tbl { width: 100%; font-size: 13px; border-collapse: separate; border-spacing: 0; }
.tbl th { position: sticky; top: 0; z-index: 1; background: var(--panel); text-align: right; font-weight: 500; font-size: 12px; color: var(--t3); padding: 10px 14px; white-space: nowrap; cursor: pointer; user-select: none; border-bottom: 1px solid var(--line); }
.tbl th:hover, .tbl th.sorted { color: var(--t1); }
.tbl th:first-child, .tbl td:first-child { text-align: left; padding-left: 18px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 18px; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; color: var(--t1); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--hover); }
.tbl tr.clickable { cursor: pointer; }
.tbl tfoot td { font-weight: 600; background: var(--sunk); border-top: 1px solid var(--line); border-bottom: 0; }
.tbl .sub { font-size: 11.5px; color: var(--t3); }
.bar { height: 4px; border-radius: 4px; background: var(--sunk); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

/* skeleton */
.sk { background: linear-gradient(90deg, var(--sunk) 25%, var(--hover) 37%, var(--sunk) 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: var(--radius); }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* media */
.thumb { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; background: var(--sunk); display: block; }
.thumb-ph { aspect-ratio: 1 / 1; background: repeating-linear-gradient(45deg, var(--sunk), var(--sunk) 8px, var(--hover) 8px, var(--hover) 16px); display: grid; place-items: center; color: var(--t3); font-size: 12px; }
.avatar { border-radius: 999px; object-fit: cover; background: var(--sunk); flex: none; }
.mono-avatar { display: grid; place-items: center; border-radius: 10px; font-weight: 600; color: var(--on-accent); flex: none; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.scroll-x { overflow-x: auto; }

/* timeline de trabajo */
.tl { position: relative; }
.tl-item { display: grid; grid-template-columns: 22px 1fr; gap: 14px; position: relative; padding-bottom: 22px; }
.tl-item::before { content: ""; position: absolute; left: 10px; top: 24px; bottom: 0; width: 1px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line-2); margin-top: 1px; }
.tl-dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--t3); }
.tl-dot.en_curso i { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tl-dot.hecho { background: var(--pos); border-color: var(--pos); }
.tl-dot.hecho i { display: none; }
.tl-dot.hecho svg { width: 12px; height: 12px; color: #fff; }
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1024px) { .kanban { grid-template-columns: 1fr; } }

/* toasts / modal / palette */
.toast { background: var(--t1); color: var(--bg); border-radius: 10px; padding: 11px 14px; font-size: 13px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: flex-start; }
.toast.error { background: var(--bad); color: #fff; }
.overlay { position: fixed; inset: 0; z-index: 60; background: color-mix(in srgb, #000 40%, transparent); backdrop-filter: blur(2px); overflow-y: auto; padding: 16px; }
.modal-card { max-width: 900px; margin: 6vh auto; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); }
.modal-card.sm { max-width: 520px; }
.modal-card.lg { max-width: 680px; }
.palette { max-width: 600px; margin: 12vh auto 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; }
.palette input { width: 100%; height: 52px; padding: 0 18px; font-size: 15px; background: transparent; color: var(--t1); border-bottom: 1px solid var(--line); outline: none; }
.palette li { display: flex; align-items: center; gap: 10px; padding: 9px 14px; margin: 2px 6px; border-radius: 8px; cursor: pointer; color: var(--t2); }
.palette li svg { width: 16px; height: 16px; color: var(--t3); }
.palette li.sel { background: var(--sunk); color: var(--t1); }
kbd { font-family: "Geist Mono", monospace; font-size: 11px; padding: 1px 5px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--t3); background: var(--panel); }

/* impresión (reporte PDF) */
@media print {
  @page { size: A4; margin: 14mm; }
  :root, [data-theme="dark"] { --bg: #fff; --panel: #fff; --sunk: #f4f4f2; --line: #e5e5e0; --t1: #111; --t2: #444; --t3: #777; --shadow: none; color-scheme: light; }
  .no-print, #sidebar, header.topbar, #toasts { display: none !important; }
  #shell { padding: 0 !important; }
  main { padding: 0 !important; max-width: none !important; }
  .card, .kpi, .kpi-row { break-inside: avoid; box-shadow: none; }
  .print-break { break-before: page; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ==========================================================================
   Reportes en formato presentación 16:9 (estilo PayLab: azul marino + celeste)
   Siempre en claro, igual en pantalla y en el PDF.
   ========================================================================== */
.deck { display: flex; flex-direction: column; gap: 28px; }
.slide {
  --navy: #1d2862; --sky: #29a8e0; --soft: #e9f3fa; --muted: #5a6582; --line: #d6e2ee;
  position: relative; width: 100%; aspect-ratio: 16 / 9; background: #fff; color: var(--navy);
  border-radius: 14px; overflow: hidden; container-type: inline-size; box-shadow: 0 10px 40px -18px rgba(20, 30, 60, .45);
  font-family: Geist, Inter, system-ui, sans-serif; color-scheme: light;
}
.slide .s-top { position: absolute; inset: 0 0 auto 0; height: 1.3cqw; background: var(--sky); }
.slide .s-title { position: absolute; left: 5cqw; top: 3.4cqw; right: 30cqw; font-size: 3.5cqw; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.slide .s-sub { font-size: 1.55cqw; color: #2b3550; font-weight: 400; line-height: 1.35; flex: none; }
.slide .s-logo { position: absolute; right: 5cqw; top: 3.2cqw; height: 4.8cqw; max-width: 17cqw; object-fit: contain; }
.slide .s-logo-txt { position: absolute; right: 5cqw; top: 3.8cqw; font-size: 2.4cqw; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.slide .s-body { position: absolute; left: 5cqw; right: 5cqw; top: 10.6cqw; bottom: 6.4cqw; display: flex; flex-direction: column; gap: 1.6cqw; }
.slide .s-foot { position: absolute; left: 5cqw; right: 8cqw; bottom: 2.3cqw; font-size: 1.2cqw; color: var(--muted); display: flex; }
.slide .s-foot span:last-child { margin-left: auto; }
.slide .s-row { display: flex; gap: 1.8cqw; flex: 1; min-height: 0; }
.slide .s-col { display: flex; flex-direction: column; gap: 1cqw; min-height: 0; }
.slide .s-card { background: var(--soft); border-radius: 1.2cqw; padding: 1.6cqw 2cqw; }
.slide .s-card h4 { font-size: 1.7cqw; font-weight: 700; margin-bottom: .8cqw; }
.slide .s-card p, .slide .s-card .ed { font-size: 1.5cqw; line-height: 1.45; color: #23304f; }
.slide .s-kpi { background: var(--soft); border-radius: 1.2cqw; padding: 1cqw 2cqw; flex: 1 1 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.slide .s-kpi b { font-size: 2.6cqw; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.slide .s-kpi span { font-size: 1.4cqw; color: #2b3550; margin-top: .2cqw; }
.slide .s-banner { background: var(--navy); color: #fff; border-radius: 1.2cqw; padding: 1.3cqw 2.6cqw; font-size: 1.45cqw; line-height: 1.5; flex: none; }
.slide .s-banner b, .slide .s-banner .ed-strong { font-weight: 700; }
.slide .s-chart { position: relative; flex: 1; min-height: 0; }
.slide .s-chart-title { text-align: center; font-size: 1.55cqw; color: #2b3550; margin-bottom: .6cqw; }
.slide table.s-tbl { width: 100%; border-collapse: separate; border-spacing: .22cqw; font-size: 1.38cqw; font-variant-numeric: tabular-nums; flex: none; }
.slide .s-tbl th { background: var(--navy); color: #fff; font-weight: 600; padding: .8cqw 1.2cqw; text-align: center; }
.slide .s-tbl th:first-child, .slide .s-tbl td:first-child { text-align: left; font-weight: 700; }
.slide .s-tbl td { background: var(--soft); padding: .6cqw 1.2cqw; text-align: center; }
.slide .s-tbl.dense { font-size: 1.2cqw; }
.slide .s-tbl.dense td { padding: .38cqw 1cqw; }
.slide .s-tbl.dense th { padding: .55cqw 1cqw; }
.slide .s-tbl td.hl { color: var(--sky); font-weight: 700; }
.slide .s-tbl tr.tot td { background: var(--navy); color: #fff; font-weight: 700; }
.slide .s-tbl tr.tot-sky td { background: var(--sky); color: var(--navy); font-weight: 700; }
.slide .s-num { width: 3.6cqw; height: 3.6cqw; border-radius: 50%; background: var(--sky); color: var(--navy); display: grid; place-items: center; font-weight: 700; font-size: 1.6cqw; flex: none; }
.slide .s-up { color: #2e9c6a; } .slide .s-down { color: #d1495b; }
.slide.cover { background: var(--navy); color: #fff; }
.slide.cover .s-top { display: none; }
.slide.cover .s-bottom { position: absolute; inset: auto 0 0 0; height: 3cqw; background: var(--sky); }
.slide.cover .c-logo { position: absolute; right: 5cqw; top: 5cqw; width: 26cqw; height: 10cqw; background: #fff; display: grid; place-items: center; padding: 1.2cqw 2cqw; }
.slide.cover .c-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.slide.cover .c-logo span { font-size: 3cqw; font-weight: 800; color: var(--navy); }
.slide.cover .c-title { position: absolute; left: 6cqw; right: 6cqw; top: 33%; font-size: 5.2cqw; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.slide.cover .c-sub { position: absolute; left: 6cqw; top: 63%; font-size: 2.3cqw; color: #8fd0f0; }
.slide.cover .c-note { position: absolute; left: 6cqw; top: 72%; font-size: 1.6cqw; color: #e6ecf7; }
.slide .ed[contenteditable="true"] { outline: 1px dashed transparent; border-radius: .4cqw; transition: outline-color .15s; cursor: text; }
.slide .ed[contenteditable="true"]:hover { outline-color: rgba(41, 168, 224, .7); }
.slide .ed[contenteditable="true"]:focus { outline: 2px solid var(--sky); outline-offset: 2px; }
.slide input.s-in { width: 7cqw; text-align: center; font: inherit; font-weight: 700; background: #fff; border: 1px solid var(--line); border-radius: .5cqw; padding: .2cqw .4cqw; color: var(--navy); }
.slide .s-brandrow { display: grid; grid-template-columns: 12cqw 1fr 13cqw; gap: 1.6cqw; align-items: center; background: var(--soft); border-radius: 1.2cqw; padding: 1cqw 2cqw; }
.slide .s-metric { background: #fff; border: 1px solid var(--line); border-radius: .6cqw; padding: .6cqw 1cqw; }
.slide .s-metric small { display: block; font-size: 1cqw; color: var(--muted); }
.slide .s-metric b { font-size: 1.6cqw; font-variant-numeric: tabular-nums; }
.slide .s-metric em { font-style: normal; font-size: 1cqw; margin-left: .4cqw; }

@media print {
  @page { size: 13.333in 7.5in; margin: 0; }
  .deck { gap: 0; }
  .slide { width: 13.333in; height: 7.5in; aspect-ratio: auto; border-radius: 0; box-shadow: none; break-after: page; page-break-after: always; }
  .slide .ed[contenteditable="true"] { outline: none !important; }
  body.printing-deck #view > *:not(.deck) { display: none !important; }
  body.printing-deck #shell, body.printing-deck #shell > div, body.printing-deck main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  body.printing-deck #status-line { display: none !important; }
}

/* Plan por objetivos */
.tbl tr.row-win td { background: color-mix(in srgb, var(--pos) 6%, transparent); }
.tbl tr.row-win td:first-child { box-shadow: inset 3px 0 0 var(--pos); }
.win-card { border: 1px solid color-mix(in srgb, var(--pos) 30%, transparent); background: var(--pos-soft); border-radius: 12px; padding: 12px 14px; }
.win-ic { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--pos); color: #fff; }

/* Biblioteca de anuncios */
.kw-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--t1); font-size: 12.5px; transition: border-color .15s, background .15s; }
.kw-chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.kw-chip svg { color: var(--t3); }
.ref-card { display: flex; flex-direction: column; overflow: hidden; }
.ref-thumb { aspect-ratio: 4 / 5; background: var(--sunk); display: grid; place-items: center; overflow: hidden; }
.ref-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ref-hook { border-left: 3px solid var(--accent); padding-left: 10px; font-size: 13px; color: var(--t1); }

/* Creativos que más traccionan */
.rank-badge { display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 8px; border-radius: 8px; background: var(--panel); color: var(--t1); font-weight: 600; font-size: 12px; box-shadow: var(--shadow); }
.rank-badge.gold { background: var(--accent); color: var(--on-accent); }
.top-spark .spark { width: 100%; height: 100%; }
#brand-list > *, #brand-list .grid > * { min-width: 0; }
#brand-list .card > .flex:first-child { flex-wrap: wrap; }
.lib-grid > * { min-width: 0; }
.split-banner { border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); background: var(--warn-soft); border-radius: 12px; padding: 14px 16px; }
.sheet-tbl thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
.sheet-tbl td { white-space: nowrap; }
.bulk-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 8px; width: min(640px, calc(100vw - 32px)); padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); font-size: 13px; color: var(--t1); }
.bulk-bar.hidden { display: none; }
/* Barra de marcas (portal de clientes con varias marcas) */
.brand-bar { position: sticky; top: 64px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; margin: 0 0 20px; border-radius: 14px; background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line); box-shadow: var(--shadow); }
.brand-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--t2); background: var(--sunk); border: 1px solid transparent; transition: all .15s; }
.brand-chip::before { content: ''; width: 8px; height: 8px; border-radius: 999px; background: var(--bc); }
.brand-chip:hover { color: var(--t1); border-color: var(--line-2); }
.brand-chip.on { background: var(--bc); color: #fff; }
.brand-chip.on::before { background: #fff; }
.camp-pick { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }

/* Paylab: marca, barra de marcas global y detalles tecnológicos */
.pl-word { font-weight: 700; letter-spacing: -.035em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="dark"] .pl-word, .sidebar .pl-word { background: linear-gradient(120deg, #8f95ff, #38c6ff); -webkit-background-clip: text; background-clip: text; }
.pl-logo { display: inline-flex; align-items: center; gap: 9px; }
.pl-logo img.pl-custom { height: 30px; width: auto; max-width: 160px; object-fit: contain; }
.kpi-row, .card { position: relative; }
.kpi-row::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad); z-index: 1; opacity: .9; }
.card-link:hover { border-color: var(--accent-line); box-shadow: 0 10px 30px -16px var(--glow); }
.brand-strip { display: flex; align-items: center; gap: 6px; padding: 8px 0 10px; overflow-x: auto; scrollbar-width: none; }
.brand-strip::-webkit-scrollbar { display: none; }
.brand-strip .lbl { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--t3); margin-right: 4px; white-space: nowrap; }
.brand-strip .brand-chip { flex: none; cursor: pointer; height: 34px; }
.brand-strip .brand-chip.on { background: var(--grad); color: #fff; box-shadow: 0 6px 16px -8px var(--glow); }
.brand-strip .brand-chip.on::before { background: #fff; box-shadow: 0 0 0 2px var(--bc); }
.brand-strip .brand-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.brand-chip.busy { opacity: .65; }

/* Grupos, empresas y marcas */
.brand-strip .brand-chip.company { font-weight: 600; }
.brand-strip .brand-chip.in { background: color-mix(in srgb, var(--bc) 16%, transparent); color: var(--t1); border-color: color-mix(in srgb, var(--bc) 45%, transparent); }
.strip-sep { flex: none; width: 1px; height: 22px; margin: 0 6px; background: var(--line-2); }
.group-box { padding: 16px; border-radius: 18px; border: 1px dashed color-mix(in srgb, var(--gc) 45%, var(--line-2)); background: color-mix(in srgb, var(--gc) 4%, transparent); }
.kind-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kind-opt { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--sunk); cursor: pointer; transition: border-color .15s, background .15s; }
.kind-opt input { position: absolute; opacity: 0; pointer-events: none; }
.kind-opt b { font-size: 13.5px; color: var(--t1); }
.kind-opt span { font-size: 11.5px; line-height: 1.35; color: var(--t3); }
.kind-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.kind-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 520px) { .kind-pick { grid-template-columns: 1fr; } }
.dup-box { padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); font-size: 13px; }
.pick-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pick-row:last-of-type { border-bottom: 0; }
.pick-row input:disabled + * { opacity: .6; }
.uv-tree { display: flex; flex-direction: column; gap: 8px; }

/* Objetivos: semáforo */
.light-dot { display: inline-block; flex: none; border-radius: 999px; background: var(--line-2); vertical-align: middle; }
.light-dot.verde { background: var(--sem-v); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sem-v) 22%, transparent); }
.light-dot.amarillo { background: var(--sem-a); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sem-a) 22%, transparent); }
.light-dot.rojo { background: var(--sem-r); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sem-r) 22%, transparent); }
.goal-bar { position: relative; height: 8px; border-radius: 999px; background: var(--sunk); overflow: hidden; }
.goal-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--t3); }
.goal-bar i.verde { background: var(--sem-v); }
.goal-bar i.amarillo { background: var(--sem-a); }
.goal-bar i.rojo { background: var(--sem-r); }

/* Semáforo grande, medidores y tarjetas */
.goal-hero { position: relative; overflow: hidden; gap: 28px; padding: 22px 26px; }
.goal-hero::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(520px 220px at 0% 50%, color-mix(in srgb, var(--hc, var(--t3)) 16%, transparent), transparent 70%); }
.goal-hero.verde { --hc: var(--sem-v); } .goal-hero.amarillo { --hc: var(--sem-a); } .goal-hero.rojo { --hc: var(--sem-r); }
.goal-hero > * { position: relative; }
.goal-hero-gauge { width: 260px; max-width: 100%; flex: none; }
.goal-hero-text { flex: 1 1 260px; min-width: 0; }
#pace-pick { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.goal-hero-state { font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; color: var(--t1); margin: 2px 0 6px; }
.tlight { flex: none; display: flex; flex-direction: column; gap: 9px; padding: 11px; border-radius: 22px; background: #0d1330; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), 0 10px 26px -12px rgba(0, 0, 0, .55); }
.tlight i { width: 38px; height: 38px; border-radius: 999px; opacity: .18; transition: opacity .3s, box-shadow .3s; }
.tlight i.rojo { background: var(--sem-r); } .tlight i.amarillo { background: var(--sem-a); } .tlight i.verde { background: var(--sem-v); }
.tlight i.on { opacity: 1; box-shadow: 0 0 22px 2px currentColor, inset 0 -5px 10px rgba(0, 0, 0, .25), inset 0 4px 8px rgba(255, 255, 255, .35); }
.tlight i.rojo.on { color: var(--sem-r); } .tlight i.amarillo.on { color: var(--sem-a); } .tlight i.verde.on { color: var(--sem-v); }
.gauge { display: block; width: 100%; height: auto; }
.gauge .g-track { fill: none; stroke: var(--sunk); stroke-width: 14; stroke-linecap: round; }
.gauge .g-val { fill: none; stroke: var(--t3); stroke-width: 14; stroke-linecap: round; }
.gauge .g-val.verde { stroke: var(--sem-v); } .gauge .g-val.amarillo { stroke: var(--sem-a); } .gauge .g-val.rojo { stroke: var(--sem-r); }
.gauge .g-tick { stroke: var(--t1); stroke-width: 3; stroke-linecap: round; opacity: .7; }
.gauge .g-num { text-anchor: middle; font-size: 30px; font-weight: 700; fill: var(--t1); font-variant-numeric: tabular-nums; }
.gauge.big .g-num { font-size: 34px; }
.gauge .g-sub { text-anchor: middle; font-size: 11px; fill: var(--t3); }
.gauge-card { padding: 16px 18px 14px; border-top: 3px solid var(--line-2); }
.gauge-card.verde { border-top-color: var(--sem-v); } .gauge-card.amarillo { border-top-color: var(--sem-a); } .gauge-card.rojo { border-top-color: var(--sem-r); }
.gauge-card .gauge { max-width: 210px; margin: 6px auto 0; }
.gauge-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--t2); white-space: nowrap; }
@media (max-width: 640px) { .goal-hero { gap: 16px; padding: 18px; justify-content: center; } .tlight i { width: 26px; height: 26px; } .goal-hero-gauge { width: calc(100% - 90px); max-width: 220px; } .goal-hero-state { font-size: 24px; } }
.goal-bar b { position: absolute; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: var(--t1); opacity: .55; }
.goal-bar.empty { opacity: .5; }
.goal-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 18px 20px; }
.light-pill { gap: 6px; }
.goals-tbl td { vertical-align: middle; }
.goal-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; }
.goal-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 4px 10px; border-radius: 999px; background: var(--sunk); font-size: 12.5px; color: var(--t2); }
.goal-chip b { color: var(--t1); font-weight: 600; }
.tlight.sm { flex-direction: row; gap: 5px; padding: 6px 8px; border-radius: 999px; }
.tlight.sm i { width: 14px; height: 14px; }
.tlight.sm i.on { box-shadow: 0 0 10px 1px currentColor; }
.goal-strip.rojo { box-shadow: inset 4px 0 0 var(--sem-r); }
.goal-strip.amarillo { box-shadow: inset 4px 0 0 var(--sem-a); }
.goal-strip.verde { box-shadow: inset 4px 0 0 var(--sem-v); }
.subnav { margin-bottom: -4px; }
.subnav a.active { border-color: var(--accent); }
/* Seguridad */
.sec-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 18px; }
.sec-row > span:first-child { flex: none; margin-top: 1px; }
.sec-card.bad { box-shadow: inset 4px 0 0 var(--sem-r); }
.sec-card.warn { box-shadow: inset 4px 0 0 var(--sem-a); }
.sec-card.ok { box-shadow: inset 4px 0 0 var(--sem-v); }
.totp-qr { padding: 10px; border-radius: 14px; background: #fff; line-height: 0; }
.totp-qr svg { width: 200px; height: 200px; display: block; }
/* Ayudas "?" */
.help-tip { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 2px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--t3); font-size: 10px; font-weight: 600; line-height: 1; cursor: help; vertical-align: 1px; text-transform: none; letter-spacing: 0; }
.help-tip:hover, .help-tip:focus-visible { color: var(--t1); border-color: var(--t2); outline: none; }
.tip-pop { position: fixed; z-index: 90; max-width: 280px; padding: 8px 11px; border-radius: 10px; background: var(--t1); color: var(--bg); font-size: 12.5px; line-height: 1.45; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .45); pointer-events: none; }
/* Aviso de planilla sin cargar (portal) */
.notice-load { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-left: 4px solid var(--sem-a); }
.notice-load.err { border-left-color: var(--sem-r); }
.notice-load > svg { color: var(--sem-a); flex: none; }
.notice-load.err > svg { color: var(--sem-r); }
/* Para revisar hoy y puesta en marcha */
.inbox-group + .inbox-group { border-top: 1px solid var(--line); }
.inbox-h { display: flex; align-items: center; gap: 8px; padding: 12px 18px 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--t2); }
.inbox-row { display: flex; align-items: center; gap: 14px; padding: 10px 18px 10px 36px; }
.inbox-row + .inbox-row { border-top: 1px dashed var(--line); }
.inbox-group.alta .inbox-row { box-shadow: inset 3px 0 0 var(--sem-r); }
.inbox-group.media .inbox-row { box-shadow: inset 3px 0 0 var(--sem-a); }
.inbox-more { display: block; width: 100%; padding: 10px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 500; color: var(--accent); }
.inbox-more:hover { background: var(--hover); }
.inbox-ok { display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-size: 13px; color: var(--t2); }
.inbox-ok > svg { color: var(--sem-v); flex: none; }
.setup-step { display: flex; align-items: center; gap: 12px; padding: 10px 18px; }
.setup-step + .setup-step { border-top: 1px solid var(--line); }
.setup-mark { width: 20px; height: 20px; flex: none; border-radius: 999px; border: 1.5px dashed var(--line-2); display: grid; place-items: center; }
.setup-step.ok .setup-mark { border: 0; background: var(--sem-v); color: #fff; }
.setup-step.ok .t1 { color: var(--t2); }
.setup-meter { width: 120px; height: 6px; border-radius: 999px; background: var(--sunk); overflow: hidden; }
.setup-meter i { display: block; height: 100%; border-radius: 999px; background: var(--sem-v); }
@media (max-width: 640px) {
  .inbox-row { flex-wrap: wrap; padding-left: 18px; }
  .inbox-row .btn { margin-left: auto; }
  .setup-meter { width: 72px; }
}
.camp-groups { display: flex; flex-direction: column; gap: 10px; max-height: 260px; overflow-y: auto; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.uv-kids { margin: 6px 0 2px 5px; padding-left: 14px; border-left: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 6px; }
.auth-hero { background: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px) 0 0 / 36px 36px, linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px) 0 0 / 36px 36px, radial-gradient(700px 420px at 100% 0%, rgba(0, 174, 239, .35), transparent 65%), radial-gradient(600px 400px at 0% 100%, rgba(46, 49, 146, .55), transparent 70%), linear-gradient(160deg, #0a1036 0%, #141c5a 100%); color: #eef1ff; }
.auth-hero .t2 { color: #b3bbe3; } .auth-hero .t3, .auth-hero .eyebrow { color: #7f89bf; }
[data-theme="dark"] .pl-logo img[src$="paylab-mark.svg"] { content: url(paylab-mark-light.svg); }
