/* Plataforma comercial Netix · identidad sitio web: negro tinta, blanco, acento morado Netix, Onest en negrita y mayúsculas */
:root {
  --bg: #f4f4f5;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --ink: #020014;
  --ink-2: #3f3f46;
  --ink-3: #71717a;
  --line: #e4e4e7;
  --accent: #8224e3;
  --accent-ink: #ffffff;
  --accent-soft: #f1e8fd;
  --side: #09090b;
  --side-ink: #a1a1aa;
  --side-active: #18181b;
  --side-line: #27272a;
  --st-disponible: #15803d;
  --st-disponible-bg: #e3f4e8;
  --st-bloqueada: #52525b;
  --st-bloqueada-bg: #e9e9ec;
  --st-reservada: #b45309;
  --st-reservada-bg: #fcefd9;
  --st-vendida: #1d4ed8;
  --st-vendida-bg: #e2e9fb;
  --bad: #b91c1c;
  --bad-bg: #fbe4e4;
  --demo: #0e7490;
  --demo-bg: #dff3f8;
  --font-ui: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-num: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Jost", "Onest", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --r: 8px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090b; --surface: #131316; --surface-2: #18181b; --ink: #fafafa; --ink-2: #d4d4d8; --ink-3: #a1a1aa;
    --line: #27272a; --accent: #b07cf2; --accent-ink: #0b0014; --accent-soft: #261638; --side: #000000; --side-ink: #a1a1aa;
    --side-active: #18181b; --side-line: #27272a;
    --st-disponible: #6ee7a0; --st-disponible-bg: #12301f; --st-bloqueada: #b4b4bd; --st-bloqueada-bg: #26262b;
    --st-reservada: #f6b562; --st-reservada-bg: #3a2810; --st-vendida: #93b4f8; --st-vendida-bg: #17264a;
    --bad: #f69a9a; --bad-bg: #3b1616; --demo: #67d3ea; --demo-bg: #0f2f38;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font-ui); }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: 12.5px; }

/* --- login --- */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(100%, 380px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 26px; width: auto; display: block; }
.brand span { font-family: var(--font-display); font-size: 11px; text-transform: uppercase; letter-spacing: .22em; color: var(--ink-3); padding-top: 4px; }
.login .brand img { height: 32px; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font: inherit; font-size: 12.5px; background: none; border: 0; color: var(--ink-3, #71717a); cursor: pointer; padding: 4px 6px; }
.login-remember { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; }
.login-remember input { width: auto; margin: 0; }
.login-actions { justify-content: space-between; align-items: center; }
.link-btn { font: inherit; font-size: 13px; background: none; border: 0; padding: 0; color: var(--ink-3, #71717a); text-decoration: underline; cursor: pointer; }
.brand img.logo-dark { display: none; }
@media (prefers-color-scheme: dark) { .login .brand img.logo-light { display: none; } .login .brand img.logo-dark { display: block; } }

/* --- shell --- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100%; }
.side { background: var(--side); color: var(--side-ink); padding: 20px 12px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand span { color: var(--side-ink); }
.side label { font-family: var(--font-display); font-size: 11px; text-transform: uppercase; letter-spacing: .16em; color: #71717a; padding: 0 8px; }
.side select { width: 100%; background: var(--side-active); border: 1px solid var(--side-line); color: #fff; border-radius: 6px; padding: 8px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { color: var(--side-ink); text-decoration: none; padding: 7px 10px; border-radius: 6px; display: flex; justify-content: space-between; gap: 8px; }
.nav a:hover { background: var(--side-active); color: #fff; }
.nav a.on { background: var(--side-active); color: #fff; box-shadow: inset 3px 0 0 #8224e3; }
.nav .count { font-size: 11px; background: var(--side-line); color: #fff; border-radius: 99px; padding: 0 7px; line-height: 18px; align-self: center; }
.nav .soon { font-size: 10px; color: #71717a; align-self: center; }
.side .me { margin-top: auto; font-size: 12px; border-top: 1px solid var(--side-line); padding: 12px 8px 0; display: flex; flex-direction: column; gap: 6px; }
.side .me button { background: none; border: 1px solid var(--side-line); color: var(--side-ink); border-radius: 6px; padding: 5px 8px; cursor: pointer; align-self: flex-start; }

.main { min-width: 0; padding: 24px max(16px, 2.5vw) 48px; display: flex; flex-direction: column; gap: 20px; }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.head h1 { margin: 0; font-family: var(--font-ui); font-weight: 700; font-size: 26px; line-height: 1.15; text-transform: uppercase; letter-spacing: .01em; text-wrap: balance; }
.head .sub { color: var(--ink-3); font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; }
.demo-banner { background: repeating-linear-gradient(135deg, var(--demo-bg), var(--demo-bg) 10px, transparent 10px, transparent 20px); border: 1px solid var(--demo); color: var(--demo); border-radius: var(--r); padding: 8px 12px; font-weight: 500; }
.note { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; color: var(--ink-2); font-size: 13px; }
.note.warn { border-color: var(--st-reservada); background: var(--st-reservada-bg); color: var(--ink); }

/* --- KPIs --- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi .l { font-family: var(--font-display); font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.kpi .v { font-family: var(--font-num); font-weight: 700; font-size: 30px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 12px; color: var(--ink-3); }
.kpi.st-disponible { box-shadow: inset 0 3px 0 var(--st-disponible); }
.kpi.st-bloqueada { box-shadow: inset 0 3px 0 var(--st-bloqueada); }
.kpi.st-reservada { box-shadow: inset 0 3px 0 var(--st-reservada); }
.kpi.st-vendida { box-shadow: inset 0 3px 0 var(--st-vendida); }

.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card h2 { margin: 0; font-size: 15px; font-weight: 700; }
.card .hint { margin: -8px 0 0; color: var(--ink-3); font-size: 12.5px; }
.empty { color: var(--ink-3); font-size: 13px; padding: 8px 0; }

/* --- bar of statuses --- */
.stackbar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--line); }
.stackbar > div { height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.bg-disponible { background: var(--st-disponible); }
.bg-bloqueada { background: var(--st-bloqueada); }
.bg-reservada { background: var(--st-reservada); }
.bg-vendida { background: var(--st-vendida); }

/* --- stacking plan --- */
.plan { display: flex; flex-direction: column; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.plan-row { display: grid; grid-template-columns: 54px 1fr; gap: 8px; align-items: stretch; }
.plan-row .lv { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; }
.plan-cells { display: flex; gap: 4px; flex-wrap: nowrap; }
.cell { min-width: 62px; flex: 1 0 62px; border-radius: 5px; padding: 6px 6px 5px; border: 1px solid transparent; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 1px; }
.cell b { font-family: var(--font-mono); font-weight: 500; font-size: 12px; }
.cell span { font-size: 11px; opacity: .85; }
.cell.disponible { background: var(--st-disponible-bg); color: var(--st-disponible); border-color: color-mix(in srgb, var(--st-disponible) 30%, transparent); }
.cell.bloqueada { background: var(--st-bloqueada-bg); color: var(--st-bloqueada); }
.cell.reservada { background: var(--st-reservada-bg); color: var(--st-reservada); }
.cell.vendida { background: var(--st-vendida-bg); color: var(--st-vendida); }
.cell:hover { border-color: currentColor; }

/* --- pills --- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 99px; font-size: 12px; white-space: nowrap; border: 1px solid var(--line); color: var(--ink-2); background: var(--surface); }
.pill.disponible, .pill.aprobada, .pill.publicado, .pill.leído, .pill.cierre { color: var(--st-disponible); background: var(--st-disponible-bg); border-color: transparent; }
.pill.bloqueada, .pill.cancelada, .pill.perdido, .pill.cancelado, .pill.rechazada { color: var(--st-bloqueada); background: var(--st-bloqueada-bg); border-color: transparent; }
.pill.reservada, .pill.solicitada, .pill.pendiente, .pill.aprobado, .pill.reserva { color: var(--st-reservada); background: var(--st-reservada-bg); border-color: transparent; }
.pill.vendida, .pill.convertida, .pill.contrato { color: var(--st-vendida); background: var(--st-vendida-bg); border-color: transparent; }
.pill.bad { color: var(--bad); background: var(--bad-bg); border-color: transparent; }
.pill.demo { color: var(--demo); background: var(--demo-bg); border-color: transparent; font-weight: 500; letter-spacing: .04em; font-size: 10.5px; text-transform: uppercase; }
.pill.vis { font-size: 11px; }

/* --- tables --- */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar .grow { flex: 1; }
input[type=search], input[type=text], input[type=email], input[type=date], input[type=number], input[type=password], select, textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; min-width: 0; }
textarea { width: 100%; min-height: 70px; }
.tbl-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: 12px; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); position: sticky; top: 0; }
td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
td.r, th.r { text-align: right; }
.muted { color: var(--ink-3); }

.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 7px 12px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--surface); font-weight: 600; }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 3px 9px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* --- drawer / modal --- */
.overlay { position: fixed; inset: 0; background: rgb(2 0 20 / .45); display: flex; justify-content: flex-end; z-index: 20; }
.drawer { width: min(560px, 100%); height: 100%; background: var(--surface); overflow-y: auto; padding: 22px 22px 40px; display: flex; flex-direction: column; gap: 16px; box-shadow: -10px 0 30px rgb(0 0 0 / .15); }
.drawer h2 { margin: 0; font-family: var(--font-ui); font-weight: 700; font-size: 22px; text-transform: uppercase; }
.drawer .x { align-self: flex-end; }
.dl { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 13px; margin: 0; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.form { display: flex; flex-direction: column; gap: 10px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-2); }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.form .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.msg { font-size: 13px; padding: 8px 10px; border-radius: 6px; }
.msg.err { background: var(--bad-bg); color: var(--bad); }
.msg.ok { background: var(--st-disponible-bg); color: var(--st-disponible); }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.timeline li { border-left: 2px solid var(--line); padding-left: 10px; }
.timeline .t { font-size: 11.5px; color: var(--ink-3); }

.pipeline { display: flex; gap: 4px; flex-wrap: wrap; }
.stage { flex: 1 1 90px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; cursor: pointer; text-align: left; }
.stage .n { font-family: var(--font-num); font-weight: 700; font-size: 22px; display: block; line-height: 1.1; }
.stage .s { font-size: 11.5px; color: var(--ink-3); }
.stage.on { border-color: var(--accent); background: var(--accent-soft); }

.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 9px 16px; border-radius: 8px; z-index: 40; font-size: 13px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .side .me { margin-top: 0; }
  .dl { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .drawer { animation: slide .18s ease-out; }
  @keyframes slide { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
}

/* --- clases de agencia y embudo --- */
.pill.tier { font-weight: 600; }
.pill.tier-a { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.pill.tier-b { border-color: var(--accent); color: var(--accent); }
.pill.tier-c { color: var(--ink-3); border-style: dashed; }
.funnel { display: flex; flex-direction: column; gap: 6px; }
.frow { display: grid; grid-template-columns: 8.5rem 1fr 2.5rem 3rem; gap: 8px; align-items: center; font-size: 12.5px; }
.fbar { height: 14px; background: var(--line); border-radius: 4px; overflow: hidden; }
.fbar > div { height: 100%; background: var(--accent); border-radius: 4px; }
.fn { text-align: right; font-weight: 700; }
.fc { text-align: right; }
td input[type=text], td input[type=date], td select { width: 100%; min-width: 120px; }
.top3 { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.top3 li::marker { font-weight: 700; color: var(--accent); }
.pill.contact-por-contactar { color: var(--st-reservada); background: var(--st-reservada-bg); border-color: transparent; }
.pill.contact-contactado, .pill.contact-en-conversación { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.pill.contact-acuerdo-firmado { color: var(--st-disponible); background: var(--st-disponible-bg); border-color: transparent; }
.pill.contact-descartado { color: var(--ink-3); border-style: dashed; }
.ia-cell { text-align: center; }
.ia-cell input, .ai-toggle input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.ai-toggle { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--accent); border-radius: var(--r); background: var(--accent-soft); font-size: 13px; }
.rec-form summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13px; padding: 4px 0; }
.rec-form[open] { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; }

/* --- pipeline, procesos, guiones --- */
.kanban-wrap { overflow-x: auto; padding-bottom: 6px; }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 10px; min-width: min-content; }
.kcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; }
.kcol header { display: flex; justify-content: space-between; align-items: center; font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .04em; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; font-size: 13px; }
.kcard:hover, .kcard:focus-visible { border-color: var(--accent); }
.kcard select { margin-top: 4px; font-size: 12px; padding: 3px 6px; }
.score { position: relative; height: 16px; background: var(--line); border-radius: 4px; overflow: hidden; }
.score span { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); }
.score em { position: relative; font-style: normal; font-size: 11px; padding-left: 6px; }
.step-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.step-head h2 { flex: 1; }
.code { font-family: var(--font-mono); font-size: 11px; background: var(--ink); color: var(--surface); border-radius: 4px; padding: 1px 6px; }
.pill.auto-automatizado { color: var(--st-disponible); background: var(--st-disponible-bg); border-color: transparent; }
.pill.auto-por-automatizar { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.pill.auto-manual, .pill.auto-no-aplica { color: var(--ink-3); }
.funnel-phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.sec-title { font-size: 15px; margin: 6px 0 0; }
pre.script { white-space: pre-wrap; font-family: var(--font-ui); font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; margin: 0; max-height: 320px; overflow: auto; }

/* --- módulos de operación: avisos, selección masiva, estados de comisiones y cobros --- */
.nav a .count { background: var(--accent); color: var(--accent-ink); border-radius: 99px; font-size: 11px; font-weight: 700; padding: 0 7px; line-height: 18px; }
.nav a .count[hidden] { display: none; }
.bulkbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--r); }
.bulkbar[hidden] { display: none; }
.bulkbar select { max-width: 220px; }
.pill.pagada, .pill.cobro-confirmado { color: var(--st-disponible); background: var(--st-disponible-bg); border-color: transparent; }
.pill.generada, .pill.comprobante-cargado, .pill.pago-reportado, .pill.propuesta, .pill.pendiente-de-condiciones, .pill.por-revisar { color: var(--st-reservada); background: var(--st-reservada-bg); border-color: transparent; }
.pill.anulada, .pill.no-autorizado, .pill.retirado { color: var(--st-bloqueada); background: var(--st-bloqueada-bg); border-color: transparent; }
.sim-out:empty { display: none; }
@media print {
  .side, .btn, form, details, .demo-banner, .toast { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  .card { break-inside: avoid; border: none; padding: 0; }
}

/* --- cronología (línea de tiempo por equipo) --- */
.stack { display: flex; flex-direction: column; gap: 16px; }
.gantt-row { display: grid; grid-template-columns: minmax(240px, 38%) 1fr; gap: 14px; align-items: center; padding: 7px 4px; border-bottom: 1px solid var(--line); }
.gantt-row.click { cursor: pointer; }
.gantt-row.click:hover { background: var(--surface-2); }
.gantt-row .g-info { min-width: 0; font-size: 13px; }
.gantt-row .g-info .muted { font-size: 12px; margin-top: 2px; display: flex; flex-wrap: wrap; gap: 2px 4px; align-items: center; }
.gantt-head { border-bottom: none; padding-bottom: 0; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.g-month { margin: 14px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.track { position: relative; height: 18px; background: var(--surface-2); border-radius: 4px; }
.track.months { background: none; height: 16px; }
.track.months span { position: absolute; font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.track .tick { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.track .today { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); z-index: 1; }
.track .bar { position: absolute; top: 3px; height: 12px; border-radius: 3px; background: var(--ink-3); }
.bar.mkt, .lg.mkt { background: var(--accent); }
.bar.legal, .lg.legal { background: var(--st-vendida); }
.bar.both, .lg.both { background: linear-gradient(90deg, var(--accent) 50%, var(--st-vendida) 50%); }
.bar.other, .lg.other { background: var(--ink-3); }
.bar.late { box-shadow: 0 0 0 2px var(--bad); }
.lg.late { background: var(--surface); box-shadow: inset 0 0 0 2px var(--bad); }
.bar.done, .lg.done { background: var(--st-disponible); }
.bar.cont { background-image: repeating-linear-gradient(90deg, transparent 0 6px, rgb(255 255 255 / .45) 6px 9px); }
.legend .lg { display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
@media (max-width: 860px) { .gantt-row { grid-template-columns: 1fr; gap: 6px; } .gantt-head { display: none; } }
@media print { .gantt-row { break-inside: avoid; } .gantt-head { position: static; } }

/* --- PDF del plan de pago (solo se ve al imprimir) --- */
.print-doc { display: none; }
@media print {
  @page { margin: 16mm; }
  body.printing > *:not(.print-doc) { display: none !important; }
  body.printing { background: #fff; }
  body.printing .print-doc { display: block; color: #111; font: 12.5px/1.5 var(--font-ui); }
  .print-doc header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #111; padding-bottom: 10px; }
  .print-doc header img { height: 26px; }
  .print-doc header div { text-align: right; font-size: 12px; }
  .print-doc h1 { font-size: 22px; text-transform: uppercase; margin: 18px 0 10px; }
  .print-doc .pd-info { display: grid; grid-template-columns: 130px 1fr; gap: 4px 12px; margin: 0 0 14px; }
  .print-doc .pd-info dt { color: #555; }
  .print-doc .pd-info dd { margin: 0; font-weight: 600; }
  .print-doc table { width: 100%; border-collapse: collapse; }
  .print-doc th, .print-doc td { border-bottom: 1px solid #ddd; padding: 4px 6px; text-align: left; }
  .print-doc th { font-size: 11px; text-transform: uppercase; color: #555; }
  .print-doc .r { text-align: right; font-variant-numeric: tabular-nums; }
  .print-doc tr { break-inside: avoid; }
  .print-doc tfoot td { font-weight: 700; border-top: 2px solid #111; border-bottom: none; }
  .print-doc .pd-note { font-size: 11px; color: #444; margin-top: 14px; }
  .print-doc footer { margin-top: 18px; font-size: 11px; color: #555; border-top: 1px solid #ddd; padding-top: 6px; }
}

/* --- metas de agencias --- */
.goalcell { min-width: 74px; }
.gbar { height: 5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 3px; margin-top: 3px; overflow: hidden; }
.gbar i { display: block; height: 100%; }
.gbar.ok i { background: var(--st-disponible); }
.gbar.mid i { background: var(--st-reservada); }
.gbar.low i { background: var(--bad); }
.goal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.goal-grid > div { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.pill.cumplida { color: var(--st-disponible); background: var(--st-disponible-bg); border-color: transparent; }
.pill.en-ritmo { color: var(--st-reservada); background: var(--st-reservada-bg); border-color: transparent; }
.pill.atrasada { color: var(--bad); background: var(--bad-bg); border-color: transparent; }

/* --- ecosistema técnico --- */
.eco-flow { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); padding: 8px; background: var(--surface); }
.eco-map { display: block; width: 100%; min-width: 980px; height: auto; font-family: var(--font-ui); }
.eco-colh { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; fill: var(--ink-3); }
.eco-band { fill: var(--surface-2); stroke: var(--line); }
.eco-bandh { font-size: 10px; font-weight: 700; letter-spacing: .16em; fill: var(--ink-3); }
.eco-edge { fill: none; stroke-width: 1.6; transition: opacity .15s; }
.eco-e-ok { stroke: var(--st-disponible); } .eco-e-mid { stroke: var(--st-reservada); } .eco-e-no { stroke: var(--ink-3); stroke-dasharray: 5 4; }
.eco-ah-ok { fill: var(--st-disponible); } .eco-ah-mid { fill: var(--st-reservada); } .eco-ah-no { fill: var(--ink-3); }
.eco-nd { cursor: pointer; outline: none; }
.eco-nd rect { fill: var(--surface); stroke: var(--line); stroke-width: 1.2; }
.eco-n-ok rect { stroke: var(--st-disponible); }
.eco-n-mid rect { fill: var(--st-reservada-bg); stroke: var(--st-reservada); }
.eco-n-no rect { stroke: var(--ink-3); stroke-dasharray: 4 3; }
.eco-dt { fill: var(--ink-3); } .eco-n-ok .eco-dt { fill: var(--st-disponible); } .eco-n-mid .eco-dt { fill: var(--st-reservada); }
.eco-n-no .eco-dt { fill: none; stroke: var(--ink-3); stroke-dasharray: 2 2; }
.eco-nt { font-size: 12.5px; font-weight: 600; fill: var(--ink); }
.eco-ns { font-size: 10.8px; fill: var(--ink-3); }
.eco-nd:focus-visible rect { stroke-width: 2.6; }
.eco-map.focus .eco-edge { opacity: .1; } .eco-map.focus .eco-nd { opacity: .3; }
.eco-map.focus .eco-edge.hot { opacity: 1; stroke-width: 2.4; } .eco-map.focus .eco-nd.hot { opacity: 1; }
.lg.eco-ok { background: var(--st-disponible); } .lg.eco-mid { background: var(--st-reservada); } .lg.eco-no { background: none; border: 1.5px dashed var(--ink-3); }
.pill.eco-p-ok { color: var(--st-disponible); background: var(--st-disponible-bg); border-color: transparent; }
.pill.eco-p-mid { color: var(--st-reservada); background: var(--st-reservada-bg); border-color: transparent; }
.pill.eco-p-no { color: var(--ink-3); }
tr.eco-grp td { background: var(--surface-2); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { .eco-edge { transition: none; } }
@media print { .eco-flow { overflow: visible; border: none; } .eco-map { min-width: 0; } }

/* --- escribir a una agencia --- */
.contact-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.btn.wa { border-color: #25d366; }
.btn.wa:hover { background: #25d366; border-color: #25d366; color: #052e14; }
.btn.primary.wa { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.logbar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 40; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--accent); border-radius: var(--r); padding: 10px 14px; box-shadow: 0 8px 30px rgb(0 0 0 / .18); max-width: calc(100vw - 32px); }
@media print { .contact-btns, .logbar { display: none !important; } }

/* --- radar --- */
.plan-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.plan-steps li { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.plan-steps li.ps-hecho { background: var(--st-disponible-bg); border-color: transparent; }
.plan-steps li.ps-omitido { opacity: .6; }
.plan-steps .t { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.pill.hecho { color: var(--st-disponible); background: var(--st-disponible-bg); border-color: transparent; }
.pill.omitido { color: var(--st-bloqueada); background: var(--st-bloqueada-bg); border-color: transparent; }
details.card > summary { cursor: pointer; }

/* Lanzamiento: tarjeta del evento y registro en puerta */
.event-card { display: grid; gap: 4px; }
.checkin { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checkin li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.checkin li.in { background: var(--st-disponible-bg); border-color: transparent; }
.checkin .btn.primary { min-width: 92px; min-height: 40px; }
tr.muted td { opacity: .6; }
@media print { .checkin .btn { display: none; } }

/* Tablero de preventa */
.tb-card { display: grid; gap: 10px; align-content: start; }
.tb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tb-head h2 { margin: 0; }
.tb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tb-list li { display: flex; gap: 8px; align-items: baseline; }
.tb-list li strong { min-width: 44px; text-align: right; font-family: var(--font-num); font-size: 18px; }
.tb-list li.tb-bad strong { color: var(--bad); }
.sem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.sem { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: 13px; }
.sem .l { flex: 1; }
.sem .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--bad); }
.sem-en-curso .dot { background: var(--st-reservada); }
.sem-listo .dot { background: var(--st-disponible); }

/* Menú por grupos y pestañas de secciones integradas */
.nav-label { font-family: var(--font-display); font-size: 10.5px; text-transform: uppercase; letter-spacing: .16em; color: #71717a; padding: 12px 10px 4px; }
.nav-group { margin-top: 8px; }
.nav-group > summary { cursor: pointer; list-style: none; font-family: var(--font-display); font-size: 10.5px; text-transform: uppercase; letter-spacing: .16em; color: #71717a; padding: 6px 10px; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after { content: " +"; }
.nav-group[open] > summary::after { content: " −"; }
.nav-group > a { display: flex; }
.subnav { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: -4px 0 4px; }
.subnav a { padding: 7px 12px; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subnav a.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
@media print { .subnav { display: none; } }

/* Competencia: barras de US$/m² */
.pm2-bars { display: grid; gap: 6px; }
.pm2 { display: grid; grid-template-columns: minmax(120px, 210px) 1fr minmax(110px, auto); gap: 10px; align-items: center; cursor: pointer; font-size: 13px; }
.pm2 .track { position: relative; height: 12px; background: var(--line); border-radius: 99px; }
.pm2 .track i { position: absolute; top: 0; bottom: 0; background: var(--ink-3); border-radius: 99px; }
.pm2.own { cursor: default; font-weight: 600; }
.pm2.own .track i { background: var(--accent); }
.pm2 .v { text-align: right; }
@media (max-width: 640px) { .pm2 { grid-template-columns: 1fr; gap: 2px; } .pm2 .v { text-align: left; } }

/* Tablero: comparación con la semana anterior y gráfica de ritmo */
.tb-delta { margin-left: auto; font-size: 12px; color: var(--ink-3); white-space: nowrap; padding-left: 8px; }
.tb-delta.up { color: var(--st-disponible); }
.tb-delta.down { color: var(--bad); }
.kpi .tb-delta { margin-left: 0; padding-left: 0; }
button.sem { cursor: pointer; text-align: left; font: inherit; color: inherit; }
button.sem:hover { border-color: var(--accent); }
.pace-box { display: grid; gap: 8px; }
svg.pace { width: 100%; height: auto; max-height: 240px; }
svg.pace .grid { stroke: var(--line); stroke-width: 1; }
svg.pace .ax { fill: var(--ink-3); font-size: 11px; font-family: var(--font-num, inherit); }
svg.pace .today { stroke: var(--ink-3); stroke-dasharray: 3 3; }
svg.pace .goal { fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-dasharray: 6 4; }
svg.pace .res { fill: none; stroke: var(--st-reservada); stroke-width: 2.5; }
svg.pace .prom { fill: none; stroke: var(--accent); stroke-width: 3; }
svg.pace .prom-dot { fill: var(--accent); }
.pace-box .legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); }
.pace-box .legend i { display: inline-block; width: 18px; height: 0; border-top: 3px solid; vertical-align: middle; margin-right: 6px; }
.lg-prom { border-color: var(--accent); } .lg-res { border-color: var(--st-reservada); } .lg-goal { border-color: var(--ink-3); border-top-style: dashed !important; }
.pace-gap { margin: 0; font-weight: 600; } .pace-gap.bad { color: var(--bad); }

/* --- prospección B2B --- */
.b2b-lines { margin-bottom: 4px; }
.pill.b2b-st { white-space: nowrap; }
.pill.b2b-contactado, .pill.b2b-en-conversación { color: var(--st-vendida); background: var(--st-vendida-bg); border-color: transparent; }
.pill.b2b-reunión-agendada, .pill.b2b-propuesta-enviada, .pill.b2b-negociación { color: var(--st-reservada); background: var(--st-reservada-bg); border-color: transparent; }
.pill.b2b-cliente { color: var(--st-disponible); background: var(--st-disponible-bg); border-color: transparent; }
.pill.b2b-descartado { color: var(--st-bloqueada); background: var(--st-bloqueada-bg); border-color: transparent; }

/* Radar de oportunidades (Mercado RD) */
.radar-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.radar-ctrl { display: flex; gap: 6px; flex-wrap: wrap; }
.radar-ctrl button { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 99px; padding: 3px 12px; font: inherit; font-size: 12.5px; cursor: pointer; }
.radar-ctrl button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.radar-ctrl .radar-play { border-style: dashed; }
.radar-wrap { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 18px; align-items: start; margin-top: 10px; }
@media (max-width: 860px) { .radar-wrap { grid-template-columns: 1fr; } }
.radar-svg { width: 100%; height: auto; overflow: visible; }
.radar-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.radar-axis { stroke: var(--line); stroke-width: 1; }
.radar-label { font-size: 12px; fill: var(--ink-2); font-weight: 600; }
.radar-label.on { fill: var(--accent); }
.radar-ghost { fill: none; stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 4; opacity: .45; }
.radar-ghost.on { opacity: 0; }
.radar-shape { fill: var(--accent); fill-opacity: .2; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.radar-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; transition: r .2s; }
.radar-dot.on { r: 7; fill: var(--accent); }
.radar-beam { fill: var(--accent); opacity: .12; }
.radar-sweep { transform-origin: 170px 170px; animation: radar-spin 6s linear infinite; }
.radar-sweep.still { animation: none; opacity: 0; }
@keyframes radar-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .radar-sweep { animation: none; opacity: 0; } }
.radar-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.radar-seg { text-align: left; font: inherit; font-size: 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ink-3); border-radius: var(--r); padding: 10px 12px; cursor: pointer; display: grid; gap: 4px; }
.radar-seg[data-level="hi"] { border-left-color: var(--st-disponible); }
.radar-seg[data-level="mid"] { border-left-color: var(--st-reservada); }
.radar-seg.on { outline: 2px solid var(--accent); outline-offset: 1px; }
.radar-seg .t { color: var(--ink-3); font-size: 12px; }
.radar-seg-top { display: flex; justify-content: space-between; align-items: baseline; }
.radar-val { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.radar-trend { font-size: 11.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* Oportunidades del momento */
.op-list { display: grid; gap: 10px; margin-top: 10px; }
.op-item { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: grid; gap: 5px; font-size: 13px; background: var(--surface); }
.op-item .t { color: var(--ink-3); font-size: 12px; }
.op-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.op-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.op-netix { background: var(--accent-soft); border-radius: 6px; padding: 6px 8px; }

/* ---------------------------------------------------------------- ERP del Grupo Demo del Este */
.erp-toolbar { align-items: center; }
.erp-toolbar .seg { display: inline-flex; gap: 4px; }
.erp-list { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.kpi .v { overflow-wrap: anywhere; }
.neg { color: var(--bad); }
.mono { font-family: var(--font-mono); font-size: 12px; }
.erp-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.erp-col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.erp-col-h { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.erp-col-h .count { background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 0 8px; font-size: 11px; }
.erp-card { all: unset; box-sizing: border-box; cursor: pointer; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.erp-card:hover, .erp-card:focus-visible { border-color: var(--accent); outline: none; }
.erp-card .muted { font-size: 12px; }
.erp-meter { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.erp-meter i { display: block; height: 100%; background: var(--st-disponible); }
.erp-meter i.over { background: var(--bad); }
.erp-months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 170px; }
.erp-month { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; font-size: 11px; color: var(--ink-3); }
.erp-bars { flex: 1; width: 100%; display: flex; gap: 2px; align-items: flex-end; justify-content: center; }
.erp-bars i { display: block; width: 42%; min-height: 1px; border-radius: 3px 3px 0 0; }
.erp-bars .inc, .legend .erp-inc { background: var(--st-disponible); }
.erp-bars .cost, .legend .erp-cost { background: var(--st-reservada); }
/* Modelo uniforme: semáforos */
.luz { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; }
.luz::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); }
.luz.verde::before { background: var(--st-disponible); }
.luz.amarillo::before { background: var(--st-reservada); }
.luz.rojo::before { background: var(--bad); }
.luz.gris::before { background: var(--line); }
.erp-state { border-radius: var(--r); padding: 12px 14px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.erp-state.normal { background: var(--st-disponible-bg); }
.erp-state.alerta { background: var(--st-reservada-bg); }
.erp-state.crisis, .erp-state.quiebra { background: var(--bad-bg); }
.erp-state h3 { margin: 0; font-size: 14px; }
.kpi-matrix td { vertical-align: top; }
.kpi-cell { display: flex; flex-direction: column; gap: 3px; min-width: 150px; }
.kpi-cell .muted { font-size: 11.5px; }
.spark { display: inline-flex; gap: 3px; }
.luz-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.luz-dot.verde { background: var(--st-disponible); }
.luz-dot.amarillo { background: var(--st-reservada); }
.luz-dot.rojo { background: var(--bad); }
.erp-health { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 4px; font-size: 13px; }
.erp-health li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--line); padding-bottom: 3px; }
.erp-health .luz { font-weight: 500; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.erp-idea { border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; background: var(--surface); font-size: 13px; }
tr.neg td { color: var(--bad); }
.erp-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); margin-bottom: 4px; }
.erp-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--st-disponible); box-shadow: 0 0 0 0 var(--st-disponible); animation: erp-pulse 2s infinite; }
@keyframes erp-pulse { 0% { box-shadow: 0 0 0 0 rgba(46, 160, 67, .5); } 70% { box-shadow: 0 0 0 7px rgba(46, 160, 67, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 160, 67, 0); } }
@media (prefers-reduced-motion: reduce) { .erp-live i { animation: none; } }

/* ERP · DGII, estado de resultados y facturas escaneadas */
.note.bad { border-color: var(--bad); background: var(--bad-bg); color: var(--ink); }
.erp-wide .tbl-wrap { overflow-x: auto; }
.erp-wide table { min-width: 980px; font-size: 12.5px; }
.erp-wide td:first-child { white-space: nowrap; }
tr.erp-sec td { background: var(--bg-2, rgba(0,0,0,.03)); }
tr.erp-total td { border-top: 2px solid var(--line, #ddd); }
details.erp-dgii { border: 1px solid var(--line, #ddd); border-radius: 8px; padding: 8px 10px; }
details.erp-dgii summary { cursor: pointer; font-size: 13px; color: var(--ink-2, inherit); }
details.erp-dgii[open] summary { margin-bottom: 8px; }
.erp-idea h3 { margin: 4px 0 6px; font-size: 15px; }
.erp-idea p { margin: 0 0 6px; font-size: 13px; }
.erp-inbox h3 { margin: 4px 0; font-size: 15px; overflow-wrap: anywhere; }
.erp-inbox p { margin: 0 0 6px; font-size: 13px; }
.mkt-follow { display: flex; gap: 4px; flex-wrap: wrap; }
.mkt-follow .pill { font-size: 11px; padding: 1px 6px; }
.mkt-queue { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.mkt-load { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0 6px; }
.mkt-load i { display: block; height: 100%; background: var(--st-disponible, #15803d); }
.mkt-load i.warn { background: var(--st-reservada, #b45309); }
.mkt-load i.over { background: var(--bad, #b91c1c); }
.erp-course { font-size: 12px; margin: -4px 0 10px; }
.erp-bsc { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.erp-bsc h3 { margin: 0 0 6px; font-size: 14px; }
.erp-funnel { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.erp-funnel > div { flex: 1 1 90px; background: var(--accent-soft, #f1e8fd); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; }
.erp-funnel strong { font-size: 18px; }
.erp-funnel span { font-size: 12px; color: var(--ink-3); }
.erp-alt { border-left: 3px solid var(--line); padding-left: 10px; }

/* ERP · portada tipo lanzador de aplicaciones */
.erp-launch { background: linear-gradient(135deg, #f1ecfb 0%, #eef2f7 55%, #f6f1ff 100%); border-radius: 18px; padding: 22px 18px 8px; }
.erp-apps-sec h2 { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin: 0 6px 12px; }
.erp-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 18px 10px; margin-bottom: 22px; }
.erp-app { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 4px; background: none; border: 0; cursor: pointer;
  color: var(--ink); text-decoration: none; font: inherit; border-radius: 12px; }
.erp-app:hover .erp-app-ico, .erp-app:focus-visible .erp-app-ico { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(30, 27, 75, .16); }
.erp-app-ico { width: 68px; height: 68px; border-radius: 16px; background: #fff; display: grid; place-items: center; box-shadow: 0 1px 3px rgba(30, 27, 75, .12);
  transition: transform .15s, box-shadow .15s; }
.erp-app-ico.txt { color: #fff; font-weight: 700; font-size: 22px; letter-spacing: .02em; }
.erp-app-label { font-size: 13px; text-align: center; line-height: 1.25; max-width: 120px; }
.erp-app-sub { font-size: 11px; color: var(--ink-3); text-align: center; margin-top: -5px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.erp-app-badge { position: absolute; top: 0; left: calc(50% + 22px); background: var(--bad, #e11d48); color: #fff; font-size: 11px; font-weight: 600; border-radius: 99px; padding: 1px 6px; }
.erp-crumbs { font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }
.erp-crumbs a { color: inherit; }
.card.erp-proj-head { display: flex; flex-direction: row; gap: 14px; align-items: center; justify-content: flex-start; text-align: left; }

/* ERP · barra de aplicación y panel de control */
.erp-appbar { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px; margin-bottom: 4px;
  box-shadow: 0 1px 2px rgba(30, 27, 75, .05); position: sticky; top: 0; z-index: 5; }
.erp-appbar-home { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; }
.erp-appbar-home:hover { background: var(--accent-soft, #f1e8fd); }
.erp-dots { display: grid; grid-template-columns: repeat(3, 4px); gap: 3px; }
.erp-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-2); }
.erp-appbar-name { font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; font-size: 15px; }
.erp-appbar-menu { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; }
.erp-appbar-menu a { padding: 7px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; white-space: nowrap; font-size: 13.5px; }
.erp-appbar-menu a:hover { background: var(--surface-2, #fafafa); color: var(--ink); }
.erp-appbar-menu a.on { background: var(--accent-soft, #f1e8fd); color: var(--accent, #8224e3); font-weight: 600; }
.erp-cp h1 { font-size: 22px; }
.erp-crumb { font-size: 13px; color: var(--ink-3); }
.erp-crumb a { color: var(--accent, #8224e3); text-decoration: none; }
/* Recursos humanos */
.hr-kanban { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.hr-card { display: flex; gap: 12px; align-items: flex-start; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; font: inherit; color: var(--ink); }
.hr-card:hover { box-shadow: 0 4px 14px rgba(30, 27, 75, .1); }
.hr-card .erp-app-ico { width: 52px; height: 52px; font-size: 18px; flex: none; }
.hr-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.hr-tree, .hr-tree ul { list-style: none; padding-left: 22px; margin: 0; border-left: 2px solid var(--line); }
.hr-tree { border-left: 0; padding-left: 0; }
.hr-tree li { margin: 8px 0; }
.hr-node { display: inline-flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px 6px 6px; cursor: pointer; font: inherit; color: var(--ink); }
.hr-node .erp-app-ico { width: 36px; height: 36px; font-size: 13px; border-radius: 10px; }
.hr-node small { display: block; color: var(--ink-3); }

/* ERP · CRM, flujograma y actividades */
.crm-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.crm-col { background: var(--surface-2, #fafafa); border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-height: 120px; display: flex; flex-direction: column; gap: 8px; }
.crm-col-head { display: flex; justify-content: space-between; align-items: baseline; text-transform: capitalize; padding: 2px 4px; }
.crm-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.crm-card:hover { box-shadow: 0 4px 12px rgba(30, 27, 75, .1); }
.crm-card.late { border-left: 3px solid var(--bad, #e11d48); }
.crm-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.crm-next { font-size: 12px; color: var(--ink-2); }
.crm-btns { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.crm-btns .btn { padding: 2px 7px; font-size: 11.5px; }
.flow-phase { margin: 14px 0; }
.flow-phase-head { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 8px; }
.flow-phase-head span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent, #8224e3); color: #fff; font-size: 12px; }
.flow-row { display: flex; align-items: stretch; gap: 6px; overflow-x: auto; padding: 8px 2px; }
.flow-step { position: relative; flex: 0 0 210px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 5px;
  color: var(--ink); text-decoration: none; font-size: 12.5px; }
.flow-step:hover { box-shadow: 0 6px 16px rgba(30, 27, 75, .12); }
.flow-n { font-size: 11px; color: var(--ink-3); }
.flow-badge { top: -8px; left: auto; right: -6px; }
.flow-role { align-self: flex-start; border-radius: 99px; padding: 2px 8px; font-size: 11px; font-weight: 600; }
.flow-tool { font-size: 11px; color: var(--accent, #8224e3); }
.flow-arrow { align-self: center; color: var(--ink-3); font-size: 20px; }
.act-item { display: flex; gap: 12px; align-items: center; padding: 10px 4px; border-top: 1px solid var(--line); }
.act-item:first-of-type { border-top: 0; }
.act-item.late strong { color: var(--bad, #e11d48); }
.act-item.today { background: var(--accent-soft, #f1e8fd); border-radius: 8px; }
.act-ico { font-size: 20px; width: 28px; text-align: center; }
.act-item > div:nth-child(2) { flex: 1; }
.act-btns { display: flex; gap: 6px; }

/* ERP · aplicaciones */
.ord-lines { display: flex; flex-direction: column; gap: 6px; }
.ord-head, .ord-row { display: grid; grid-template-columns: 1fr 70px 100px 44px 34px; gap: 6px; align-items: start; }
.ord-row.bom { grid-template-columns: 1fr 110px 34px; }
.ord-head { font-size: 12px; color: var(--ink-3); }
.ord-row > div { display: flex; flex-direction: column; gap: 4px; }
.ord-row input, .ord-row select { width: 100%; }
.pos-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .pos-wrap { grid-template-columns: 1fr; } }
.pos-cart { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 64px; }
.pos-total { font-size: 22px; font-weight: 700; }
.pos-pay { font-size: 17px; padding: 14px; }
.card.jr { padding: 10px 14px; }
.risk-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.risk-item:first-of-type { border-top: 0; }
.risk-item > div { display: flex; flex-direction: column; gap: 3px; }
.card.risk-on { border-color: var(--bad, #e11d48); }

/* formularios de RRHH */
.hrf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.hrf-card { border: 1px solid var(--line, #e3e5e8); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.hrf-card p { margin: 0 0 6px; font-size: 13px; flex: 1; }
label.check { display: flex; align-items: center; gap: 8px; flex-direction: row; }
label.check input { width: auto; margin: 0; }

/* encuestas */
.enc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.enc-card { display: flex; flex-direction: column; gap: 10px; }
.enc-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.enc-kpis { display: flex; gap: 22px; }
.enc-kpis div { display: flex; flex-direction: column; }
.enc-kpis b { font-size: 28px; line-height: 1.1; }
.enc-kpis span { font-size: 12px; color: var(--ink-3, #71717a); }
.enc-nps.disponible b { color: #15803d; } .enc-nps.reservada b { color: #b45309; } .enc-nps.bloqueada b { color: #b91c1c; }
.enc-bar { width: 140px; height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.enc-bar i { display: block; height: 100%; }
.enc-comments { margin: 0; padding-left: 18px; display: grid; gap: 6px; }

/* contratos */
.ktr-doc { background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; font-size: 13px; line-height: 1.55; max-height: 60vh; overflow: auto; }
.ktr-doc p, .ktr-doc li { margin: 0 0 8px; text-align: justify; }
.ktr-doc li { margin-left: 18px; }
.ktr-title { text-align: center; margin: 0 0 12px; }
.ktr-doc h4 { margin: 14px 0 6px; }
.ktr-sec { margin: 18px 0 4px; font-size: 14px; }
.ktr-phase { border-left: 3px solid var(--line); padding-left: 10px; }
.ktr-signer { margin: 6px 0; }
.sigwrap { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.sigpad { width: 100%; max-width: 560px; aspect-ratio: 3 / 1; height: auto; border: 1px dashed #a1a1aa; border-radius: 10px; background: #fff; touch-action: none; cursor: crosshair; }

/* subida de varias facturas */
.erp-drop { border: 2px dashed var(--line); border-radius: 12px; padding: 22px; text-align: center; display: flex; flex-direction: column; gap: 4px; cursor: pointer; margin: 10px 0 16px; color: var(--ink-3, #71717a); }
.erp-drop strong { color: var(--ink, #111); font-size: 15px; }
.erp-drop.on, .erp-drop:hover, .erp-drop:focus-visible { border-color: var(--accent); background: var(--accent-soft, #f3e8ff); }
.erp-bulk { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; max-height: 55vh; overflow: auto; }
.erp-bulk li { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.erp-bulk li span:first-child { overflow-wrap: anywhere; }
.erp-bulk .ok { color: #15803d; } .erp-bulk .err { color: #b91c1c; }
.erp-bulk-bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.erp-bulk-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }

/* ---------------------------------------------------------------- Tutoriales / Onboarding */
.erp-appbar-tuto { margin-left: auto; white-space: nowrap; font-size: 13px; font-weight: 600; text-decoration: none; color: #6b21a8; background: #f3e8ff; border: 1px solid #e9d5ff; border-radius: 999px; padding: 6px 12px; }
.erp-appbar-tuto:hover { background: #e9d5ff; }
.tuto-hero { display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); gap: 16px; background: linear-gradient(135deg, #faf5ff, #fff 60%); border: 1px solid #e9d5ff; border-radius: 16px; padding: 22px; }
.tuto-hero h2 { margin: 2px 0 6px; font-size: 22px; }
.tuto-hero p { margin: 0 0 12px; color: var(--ink-2, #3f3f46); }
.tuto-kicker { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #7e22ce; }
.tuto-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tuto-hero-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-size: 14px; }
.tuto-hero-card p { margin: 2px 0 10px; }
.tuto-prog { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-3, #71717a); }
.tuto-prog-bar { flex: 1; height: 8px; background: #ede9fe; border-radius: 999px; overflow: hidden; min-width: 80px; }
.tuto-prog-bar i { display: block; height: 100%; background: linear-gradient(90deg, #8224e3, #14b8a6); border-radius: 999px; transition: width .3s; }
.tuto-guide-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tuto-guide-head h2 { margin: 0; }
.tuto-step { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 4px; border-top: 1px solid var(--line); }
.tuto-step input { width: 18px; height: 18px; margin: 0; accent-color: #8224e3; cursor: pointer; }
.tuto-step-main { display: flex; flex-direction: column; gap: 2px; text-align: left; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; min-width: 0; }
.tuto-step-main:hover strong { color: #7e22ce; text-decoration: underline; }
.tuto-step-main .muted { font-size: 13px; }
.tuto-step.done strong { text-decoration: line-through; color: var(--ink-3, #71717a); }
.tuto-min { font-size: 12px; color: var(--ink-3, #71717a); white-space: nowrap; }
.tuto-how { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.tuto-tag { display: inline-block; font-size: 11.5px; background: #f4f4f5; border-radius: 999px; padding: 2px 8px; color: #52525b; }
.tuto-guides { display: grid; gap: 10px; }
.tuto-acc summary { cursor: pointer; padding: 2px 0; }
.tuto-g-step { border-top: 1px solid var(--line); padding: 12px 0; }
.tuto-g-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tuto-org { display: grid; gap: 10px; }
.tuto-org-top { display: flex; flex-direction: column; align-items: center; text-align: center; background: #1e1b4b; color: #fff; border-radius: 12px; padding: 12px; text-decoration: none; }
.tuto-org-top span { font-size: 13px; opacity: .8; }
.tuto-org-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tuto-org-col { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.tuto-org-line, .tuto-org-co { display: flex; flex-direction: column; gap: 2px; border-radius: 10px; padding: 10px; text-decoration: none; color: inherit; border: 1px solid var(--line); }
.tuto-org-line { background: #faf5ff; border-color: #e9d5ff; }
.tuto-org-line span { font-size: 12.5px; color: var(--ink-3, #71717a); }
.tuto-org-co { background: #f0fdfa; border-color: #99f6e4; }
.tuto-org-line:hover, .tuto-org-co:hover, .tuto-org-top:hover { filter: brightness(.97); }
.tuto-org-arrow { text-align: center; font-size: 12px; color: var(--ink-3, #71717a); }
.tuto-org-int { display: flex; flex-wrap: wrap; gap: 4px; }
.tuto-svg-wrap { overflow-x: auto; margin: 6px 0; }
.tuto-svg { width: 100%; min-width: 900px; height: auto; display: block; font-family: inherit; }
.tuto-lane { stroke: none; }
.tuto-lane.in { fill: #eff6ff; } .tuto-lane.erp { fill: #faf5ff; } .tuto-lane.out { fill: #f0fdf4; }
.tuto-lane-t { font-size: 12px; font-weight: 700; fill: #52525b; letter-spacing: .04em; text-transform: uppercase; }
.tuto-edge { fill: none; stroke: #94a3b8; stroke-width: 1.6; }
.tuto-node { cursor: pointer; outline: none; }
.tuto-node rect { fill: #fff; stroke-width: 1.6; transition: filter .15s; }
.tuto-node.in rect { stroke: #2563eb; } .tuto-node.erp rect { stroke: #8224e3; } .tuto-node.out rect { stroke: #16a34a; }
.tuto-node:hover rect, .tuto-node:focus rect { filter: drop-shadow(0 4px 8px rgb(0 0 0 / .14)); stroke-width: 2.4; }
.tuto-node-t { font-size: 13px; font-weight: 700; fill: #18181b; }
.tuto-node-s { font-size: 11px; fill: #71717a; }
.tuto-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; }
.tuto-key::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; border: 2px solid; }
.tuto-key.in::before { border-color: #2563eb; background: #eff6ff; } .tuto-key.erp::before { border-color: #8224e3; background: #faf5ff; } .tuto-key.out::before { border-color: #16a34a; background: #f0fdf4; }
.tuto-roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.tuto-role { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.tuto-role p { margin: 6px 0 0; font-size: 14px; }
@media (max-width: 760px) {
  .tuto-hero { grid-template-columns: 1fr; padding: 16px; }
  .tuto-org-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .erp-appbar-tuto { font-size: 12px; padding: 5px 9px; }
}
.tuto-hero-actions a.btn, .tuto-g-step a.btn, .drawer a.btn { text-decoration: none; }

/* Tutorial con pantallazos */
.tuto-shot { flex: none; position: relative; display: block; width: 100%; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 2px 10px rgba(2, 0, 20, .08); }
.tuto-shot.zoom { cursor: zoom-in; }
.tuto-shot.zoom:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tuto-shot img { display: block; width: 100%; height: auto; }
.tuto-mark { position: absolute; border: 3px solid #f2542d; border-radius: 8px; background: rgba(242, 84, 45, .07); pointer-events: none; }
.tuto-mark b { position: absolute; top: -13px; left: -13px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: #f2542d; color: #fff;
  font: 700 13px/24px system-ui, sans-serif; text-align: center; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.tuto-shot:not(.big) .tuto-mark { border-width: 2px; }
.tuto-shot:not(.big) .tuto-mark b { top: -9px; left: -9px; min-width: 17px; height: 17px; font-size: 10.5px; line-height: 17px; padding: 0 4px; }
.tuto-shot-zoom { position: absolute; right: 8px; bottom: 8px; background: rgba(2, 0, 20, .78); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 999px; }
.tuto-marks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.tuto-marks li { display: flex; gap: 8px; align-items: baseline; }
.tuto-marks b { flex: none; min-width: 22px; height: 22px; border-radius: 999px; background: #f2542d; color: #fff; font-size: 12px; line-height: 22px; text-align: center; }
.tuto-g-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tuto-sh { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; }
.tuto-sh-nav { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; display: grid; gap: 12px; padding-right: 4px; }
.tuto-sh-gt { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 4px; }
.tuto-sh-item { display: block; width: 100%; text-align: left; font: inherit; font-size: 13.5px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); cursor: pointer; }
.tuto-sh-item:hover { background: var(--accent-soft); }
.tuto-sh-item.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.tuto-sh-item.done::before { content: "✓ "; color: #16a34a; font-weight: 700; }
.tuto-sh-item.on.done::before { color: #fff; }
.tuto-sh-stage { display: grid; gap: 14px; outline: none; scroll-margin-top: 12px; }
.tuto-sh-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.tuto-sh-head h2 { margin: 2px 0 4px; }
.tuto-sh-head p { margin: 0; }
.tuto-sh-ctl { display: flex; gap: 8px; flex-wrap: wrap; }
.tuto-sh-ctl a.btn { text-decoration: none; }
.tuto-sh-note { font-size: 12.5px; margin: -6px 0 0; }
.tuto-sh-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tuto-sh-cols h3 { margin: 0 0 8px; }
@media (max-width: 900px) {
  .tuto-sh { grid-template-columns: 1fr; }
  .tuto-sh-nav { position: static; max-height: none; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
  .tuto-sh-group { display: flex; gap: 4px; align-items: center; }
  .tuto-sh-gt { display: none; }
  .tuto-sh-item { white-space: nowrap; }
  .tuto-sh-cols { grid-template-columns: 1fr; }
  .tuto-mark b { top: -9px; left: -9px; min-width: 17px; height: 17px; font-size: 10.5px; line-height: 17px; padding: 0 4px; }
}

/* CRM unificado y enlace de registro de clientes */
.crm-origin { align-self: flex-start; font-size: 11px; background: #f1e8fd; color: #6b21a8; border-radius: 999px; padding: 1px 8px; }
.crm-signup input { width: 100%; font: inherit; font-size: 13px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); margin: 4px 0 10px; }
.crm-signup-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.crm-signup-btns a.btn { text-decoration: none; }

/* Estados financieros */
.est-wrap { display: grid; gap: 14px; }
.est-head h2 { margin: 6px 0 2px; }
.est-head p { margin: 0; }
.est-ind { padding-left: 16px; display: inline-block; }
.est-final td { border-top: 2px solid var(--ink); }
.est-ok { margin: -4px 0 0; color: #15803d; font-size: 13.5px; font-weight: 600; }
.est-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 900px) { .est-cols { grid-template-columns: 1fr; } }
@media print {
  .side, .sidebar, .erp-appbar, .subnav, .erp-live, .erp-toolbar, .no-print, .toolbar, .btn, .erp-head-actions { display: none !important; }
  body, .main, #main { background: #fff !important; padding: 0 !important; margin: 0 !important; }
  .shell { display: block !important; }
  .card { box-shadow: none !important; break-inside: avoid; }
  .est-head { break-before: auto; }
}

/* Rutina del día (Hoy) */
.rutina h3{font-size:14px;margin:14px 0 6px}
.rut-lista{list-style:none;margin:6px 0 4px;padding:0}
.rut-item{display:flex;gap:10px;align-items:flex-start;padding:9px 0;border-top:1px solid var(--line,#e5e2dc)}
.rut-item:first-child{border-top:0}
.rut-item>input{width:18px;height:18px;margin-top:2px;flex-shrink:0}
.rut-item.hecho .rut-tit a{text-decoration:line-through;opacity:.6}
.rut-cuerpo{flex:1;min-width:0}
.rut-tit{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.rut-tit a{font-weight:600}
.rut-num{display:inline-flex;width:22px;height:22px;border-radius:50%;align-items:center;justify-content:center;font-size:12px;font-weight:600;border:1px solid currentColor;opacity:.7}
.rut-por{font-size:12px;opacity:.65}
.rut-det{margin-top:6px;font-size:13px}
.rut-det summary{cursor:pointer;opacity:.75}
.rut-det p{margin:6px 0}
.rut-ramas{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:6px}
.rut-si,.rut-no{border-radius:8px;padding:8px 10px;font-size:12.5px;line-height:1.45}
.rut-si{background:#e3f0e7;color:#1f4d2f}
.rut-no{background:#fbe5cf;color:#5e3209}
@media (max-width:700px){.rut-ramas{grid-template-columns:1fr}}

/* Estrategia comercial */
.est-ul{margin:6px 0 0;padding-left:20px;display:grid;gap:6px}
.est-obj{font-size:15px;line-height:1.6;margin:0}

/* ================================================================ Diseño 2026 · estilo Netix OPS + Odoo
   Menú lateral blanco con iconos (plegable), barra de aplicación con «Más», buscador de comandos (Ctrl/⌘ K),
   panel de control con migas, tarjetas redondeadas y botones píldora negros. */
:root { --r: 12px; --side: #ffffff; --side-ink: #3f3f46; --side-active: #09090b; --side-line: #ececee; --shadow-1: 0 1px 2px rgba(9, 9, 11, .04), 0 1px 1px rgba(9, 9, 11, .03); }
@media (prefers-color-scheme: dark) { :root { --side: #0c0c0e; --side-ink: #a1a1aa; --side-active: #fafafa; --side-line: #222226; --shadow-1: none; } }
body { -webkit-font-smoothing: antialiased; }
.ux-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Menú lateral */
.shell { grid-template-columns: 248px 1fr; transition: grid-template-columns .18s ease; }
.side { background: var(--side); color: var(--side-ink); border-right: 1px solid var(--side-line); padding: 18px 12px 14px; gap: 14px; scrollbar-width: thin; }
.side .brand { justify-content: space-between; padding: 0 4px 0 8px; }
.side .brand-link { display: flex; align-items: center; gap: 8px; text-decoration: none; min-width: 0; }
.side .brand img { height: 22px; }
.side .brand span { color: var(--ink-3); }
.side .brand img.logo-dark { display: none; }
@media (prefers-color-scheme: dark) { .side .brand img.logo-light { display: none; } .side .brand img.logo-dark { display: block; } }
.side-toggle { border: 0; background: none; color: var(--ink-3); width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; flex: none; }
.side-toggle:hover { background: var(--bg); color: var(--ink); }
.side-search { display: flex; align-items: center; gap: 8px; width: 100%; border: 1px solid var(--side-line); background: var(--surface-2); color: var(--ink-3); border-radius: 10px; padding: 8px 10px; cursor: pointer; font-size: 13px; text-align: left; }
.side-search span { flex: 1; }
.side-search:hover { border-color: var(--ink-3); color: var(--ink); }
.side-project { display: flex; flex-direction: column; gap: 6px; }
.side label { color: var(--ink-3); font-size: 10.5px; }
.side select { background: var(--surface); border: 1px solid var(--side-line); color: var(--ink); border-radius: 10px; padding: 8px 10px; }
.nav { gap: 1px; }
.nav a { color: var(--side-ink); padding: 7px 10px; border-radius: 10px; align-items: center; justify-content: flex-start; gap: 10px; font-size: 13.5px; font-weight: 500; }
.nav a > span:not(.count) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a .ux-ico { width: 17px; height: 17px; opacity: .8; }
.nav a:hover { background: var(--bg); color: var(--ink); }
.nav a.on { background: var(--side-active); color: var(--side); box-shadow: none; font-weight: 600; }
.nav a.on .ux-ico { opacity: 1; }
.nav-label, .nav-group > summary { color: var(--ink-3); font-size: 10px; letter-spacing: .18em; padding: 14px 10px 4px; }
.nav .count { background: var(--bg); color: var(--ink-2); }
.nav a.on .count { background: rgba(255, 255, 255, .18); color: inherit; }
.side .me { border-top: 1px solid var(--side-line); padding: 12px 4px 0; gap: 4px; }
.me-card { display: flex; align-items: center; gap: 10px; padding: 0 6px 6px; min-width: 0; }
.me-card div { display: flex; flex-direction: column; min-width: 0; }
.me-card strong { color: var(--ink); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-card span { font-size: 11.5px; color: var(--ink-3); }
.side .me a, .side .me button { display: flex; align-items: center; gap: 10px; border: 0; background: none; color: var(--side-ink); padding: 7px 10px; border-radius: 10px; font-size: 13px; text-decoration: none; cursor: pointer; align-self: stretch; text-align: left; }
.side .me a:hover, .side .me button:hover { background: var(--bg); color: var(--ink); }
.ux-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--surface); display: grid; place-items: center; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; border: 0; cursor: pointer; flex: none; }
.ux-avatar.sm { width: 30px; height: 30px; font-size: 11.5px; cursor: default; }

/* Menú plegado: solo iconos */
body.side-min .shell { grid-template-columns: 68px 1fr; }
body.side-min .side { padding: 18px 10px 14px; align-items: center; }
body.side-min .side .brand { flex-direction: column; gap: 10px; padding: 0; }
body.side-min .side .brand img { height: 16px; }
body.side-min .side .brand span, body.side-min .side-project, body.side-min .side-search span, body.side-min .side-search kbd,
body.side-min .nav a > span, body.side-min .side .me a span, body.side-min .side .me button span, body.side-min .me-card div { display: none; }
body.side-min .side-toggle .ux-ico { transform: rotate(180deg); }
body.side-min .side-search { width: 44px; justify-content: center; padding: 9px 0; }
body.side-min .nav { width: 100%; }
body.side-min .nav a { justify-content: center; padding: 9px 0; }
body.side-min .nav-label { font-size: 0; padding: 8px 0 4px; border-top: 1px solid var(--side-line); margin: 6px 8px 0; }
body.side-min .nav-group > summary { font-size: 0; }
body.side-min .side .me { width: 100%; align-items: center; }
body.side-min .side .me a, body.side-min .side .me button { justify-content: center; }
body.side-min .me-card { padding: 0 0 6px; justify-content: center; }

/* Contenido */
.main { gap: 18px; padding-top: 18px; }
.card, .kpi { border-radius: 14px; box-shadow: var(--shadow-1); }
.kpi { padding: 16px 18px; }
.kpi .l { font-size: 10.5px; letter-spacing: .14em; }
.btn { border-radius: 999px; padding: 7px 14px; font-weight: 500; transition: background .12s, border-color .12s, color .12s; }
.btn.sm { padding: 3px 10px; }
.btn.primary { text-transform: none; letter-spacing: .01em; }
.btn.primary:hover { background: #27272a; border-color: #27272a; color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primary:hover { background: #d4d4d8; border-color: #d4d4d8; color: #09090b; } }
.subnav { gap: 6px; border-bottom: 0; margin: 0; }
.subnav a { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; margin: 0; background: var(--surface); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.subnav a.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
table tbody tr:hover td { background: var(--surface-2); }

/* Barra de aplicación (Odoo) */
.erp-appbar { position: sticky; top: 8px; z-index: 20; gap: 10px; border-radius: 14px; padding: 6px 8px; background: var(--surface); box-shadow: 0 1px 3px rgba(9, 9, 11, .06), 0 6px 20px -12px rgba(9, 9, 11, .18); margin-bottom: 0; }
.erp-appbar-home:hover { background: var(--bg); }
.erp-appbar-name { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-right: 1px solid var(--line); border-radius: 0; }
.erp-appbar-menu { flex: 1; min-width: 0; overflow: hidden; align-items: center; }
.erp-appbar-menu > a { font-weight: 500; }
.erp-appbar-menu > a.on { background: var(--ink); color: var(--surface); font-weight: 600; }
.erp-appbar-menu > a:hover:not(.on) { background: var(--bg); }
.erp-appbar-right { display: flex; align-items: center; gap: 6px; flex: none; margin-left: auto; }
.erp-appbar-search { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-3); border-radius: 999px; padding: 6px 10px; cursor: pointer; font-size: 13px; }
.erp-appbar-search:hover { color: var(--ink); border-color: var(--ink-3); }
.erp-appbar-tuto { margin-left: 0; display: flex; align-items: center; gap: 6px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); }
.erp-appbar-tuto:hover { background: var(--bg); color: var(--ink); }
.erp-appbar-tuto .ux-ico { width: 16px; height: 16px; }
kbd { font: 600 10.5px/1 var(--font-ui); color: var(--ink-3); background: var(--bg); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 2px 5px; }
.ux-more { position: relative; flex: none; }
.ux-more[hidden] { display: none; }
.ux-more-btn { border: 0; background: none; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); cursor: pointer; font-size: 13.5px; white-space: nowrap; }
.ux-more-btn:hover, .ux-more.open .ux-more-btn { background: var(--bg); color: var(--ink); }
.ux-more-pop, .ux-user-pop { display: none; position: fixed; z-index: 30; min-width: 220px; max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 16px 40px -12px rgba(9, 9, 11, .28); }
.ux-more.open .ux-more-pop, .ux-user.open .ux-user-pop { display: flex; flex-direction: column; }
.ux-more-pop a { padding: 8px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 13.5px; white-space: nowrap; }
.ux-more-pop a:hover { background: var(--bg); color: var(--ink); }
.ux-user { position: relative; }
.ux-user-pop { right: 0; }
.ux-user-head { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ux-user-head span { font-size: 12px; color: var(--ink-3); }
.ux-user-pop a, .ux-user-pop button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 13.5px; border: 0; background: none; cursor: pointer; text-align: left; }
.ux-user-pop a:hover, .ux-user-pop button:hover { background: var(--bg); color: var(--ink); }
.ux-user-pop button kbd { margin-left: auto; }
.ux-user-pop .danger { color: var(--bad); }

/* Panel de control */
.erp-cp { align-items: flex-end; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow-1); }
.erp-cp-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 420px; }
.erp-cp h1 { font-size: 26px; }
.erp-crumb { font-size: 11px; text-transform: uppercase; letter-spacing: .16em; color: var(--ink-3); font-family: var(--font-display); }
.erp-crumb a { color: var(--ink-3); }
.erp-crumb a:hover { color: var(--ink); }
.erp-cp .sub { align-items: center; }
.erp-live { margin: 0; padding: 2px 9px; border-radius: 999px; background: var(--bg); font-size: 11.5px; }
.erp-cp .erp-toolbar { margin-top: 8px; }
.erp-cp .erp-toolbar select { border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; background: var(--surface); }
.erp-cp-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.erp-cp-actions .btn { padding: 8px 16px; }
.erp-cp-actions .btn.primary { order: -1; }

/* Buscador de comandos */
.ux-pal { position: fixed; inset: 0; z-index: 60; background: rgba(9, 9, 11, .38); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; backdrop-filter: blur(2px); }
.ux-pal-box { width: min(640px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 80px -20px rgba(9, 9, 11, .5); display: flex; flex-direction: column; overflow: hidden; max-height: 72vh; }
.ux-pal-in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.ux-pal-in input { flex: 1; border: 0; outline: 0; background: none; font-size: 16px; color: var(--ink); min-width: 0; }
.ux-pal-in input::-webkit-search-cancel-button { display: none; }
.ux-pal-list { overflow: auto; padding: 6px; display: flex; flex-direction: column; }
.ux-pal-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; color: var(--ink-2); }
.ux-pal-item.on { background: var(--ink); color: var(--surface); }
.ux-pal-label { flex: 0 1 auto; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ux-pal-hint { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.ux-pal-item.on .ux-pal-hint { color: inherit; opacity: .7; }
.ux-pal-kind { margin-left: auto; font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; opacity: .6; flex: none; }
.ux-pal-empty { padding: 18px; color: var(--ink-3); text-align: center; }
.ux-pal-foot { display: flex; gap: 16px; flex-wrap: wrap; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); background: var(--surface-2); }
.ux-pal-foot kbd { margin-right: 2px; }

@media (max-width: 860px) {
  .shell, body.side-min .shell { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--side-line); }
  .side-toggle { display: none; }
  .erp-appbar { top: 0; flex-wrap: wrap; }
  .erp-appbar-search span, .erp-appbar-search kbd, .erp-appbar-tuto span { display: none; }
  .erp-cp { padding: 14px; }
}
@media print { .erp-cp { border: 0; box-shadow: none; padding: 0; } .erp-cp-actions, .erp-live, .ux-pal { display: none !important; } }

/* Organigrama completo del grupo */
.org { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.org-top { display: flex; justify-content: center; }
.org-board { background: var(--ink); color: var(--surface); border-radius: 999px; padding: 8px 18px; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.org-groupwrap { display: grid; grid-template-columns: 1fr minmax(260px, 340px) 1fr; gap: 16px; align-items: center; padding-top: 22px; position: relative; }
.org-groupwrap::before { content: ""; position: absolute; left: 50%; top: 0; height: 22px; border-left: 2px solid var(--line); }
.org-group { background: var(--surface); border: 2px solid var(--ink); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 6px; text-align: center; box-shadow: var(--shadow-1); }
.org-group > strong { font-size: 20px; text-transform: uppercase; letter-spacing: .02em; }
.org-group > span { font-size: 12px; color: var(--ink-3); }
.org-side { font-size: 12.5px; color: var(--ink-2); border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; justify-self: center; min-width: 170px; background: var(--surface-2); }
.org-side ul { margin: 4px 0 0; padding-left: 16px; }
.org-divs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-top: 28px; position: relative; }
.org-divs::before { content: ""; position: absolute; left: 50%; top: 0; height: 14px; border-left: 2px solid var(--line); }
.org-divs::after { content: ""; position: absolute; left: calc(100% / 6); right: calc(100% / 6); top: 14px; border-top: 2px solid var(--line); }
.org-div { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-1); min-width: 0; }
.org-div::before { content: ""; position: absolute; left: 50%; top: -15px; height: 14px; border-left: 2px solid var(--line); }
.org-div-head { display: flex; flex-direction: column; gap: 1px; text-decoration: none; color: var(--ink); background: var(--ink); color: var(--surface); border-radius: 12px; padding: 10px 12px; }
.org-div-head strong { font-size: 15px; text-transform: uppercase; letter-spacing: .03em; }
.org-div-head span { font-size: 12px; opacity: .75; }
.org-div-head small { font-size: 11.5px; opacity: .6; }
.org-div-head:hover { opacity: .92; }
.org-area { display: flex; flex-direction: column; gap: 6px; border-left: 2px solid var(--line); padding-left: 10px; margin-left: 6px; }
.org-area-name { font-family: var(--font-display); font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-3); padding-top: 4px; }
.org-seat { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; cursor: pointer; font: inherit; color: var(--ink); }
.org-seat:hover { border-color: var(--ink-3); box-shadow: 0 4px 14px -8px rgba(9, 9, 11, .25); }
.org-seat.lead { border: 1.5px solid var(--ink); }
.org-seat.filled { background: var(--surface); }
.org-seat:not(.filled) { background: var(--surface-2); }
.org-role { font-weight: 600; font-size: 13px; }
.org-holder { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.org-holder .ux-avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.org-note { font-size: 11.5px; color: var(--ink-3); }
.org-support { margin-top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.org-support .org-div-head { background: var(--ink-2); }
.org-support-areas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .org-divs { grid-template-columns: 1fr; } .org-divs::after, .org-div::before { display: none; } .org-support-areas { grid-template-columns: repeat(2, minmax(0, 1fr)); } .org-groupwrap { grid-template-columns: 1fr; } }
@media print { .org-seat { break-inside: avoid; } .org-div { break-inside: avoid; } }

/* Organigrama · niveles, críticos, ficha del puesto y tablero de RR. HH. */
.org-seat-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.org-level { display: inline-flex; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; border-radius: 999px; padding: 2px 8px; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.org-level.lv-dir { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.org-level.lv-ger { background: #312e81; color: #fff; border-color: #312e81; }
.org-level.lv-jefe { background: #e0e7ff; color: #312e81; border-color: #c7d2fe; }
.org-level.lv-sr { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.org-level.lv-jr { background: #fef9c3; color: #854d0e; border-color: #fde68a; }
.org-level.lv-prov { background: var(--bg); color: var(--ink-3); }
.org-crit { display: inline-flex; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; border-radius: 999px; padding: 2px 8px; background: var(--bad-bg); color: var(--bad); }
.org-seat.crit { box-shadow: inset 3px 0 0 var(--bad); }
.org-mkt { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.org-dr-head { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.org-dr-head h2 { margin: 2px 0 0; font-size: 20px; }
.org-dr-head .org-crit, .org-dr-head .org-level { margin-right: 6px; }
.org-dr-holder { font-weight: 600; }
.org-mission { font-size: 15px; font-weight: 500; margin: 4px 0; }
.org-dr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.org-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.org-pay { display: flex; flex-direction: column; gap: 6px; }
.org-pay-bar { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.org-pay-bar i { flex: 1; height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--line), var(--ink)); }
.org-pay-bar strong { font-size: 18px; }
.org-src { font-size: 12px; color: var(--ink-3); }
.org-critlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.org-critcard { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; border: 1px solid var(--line); border-left: 3px solid var(--bad); border-radius: 12px; padding: 10px 12px; background: var(--surface); cursor: pointer; font: inherit; color: var(--ink); }
.org-critcard:hover { box-shadow: 0 4px 14px -8px rgba(9, 9, 11, .25); }
.org-critcard small { color: var(--ink-3); font-size: 11.5px; }
.hr-two { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.hr-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow: auto; }
.hr-timeline li { display: grid; grid-template-columns: 96px auto 1fr; gap: 10px; align-items: center; font-size: 13px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.hr-tl-date { font-weight: 600; font-variant-numeric: tabular-nums; }
.linkish { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font: inherit; text-align: left; }
tr.click { cursor: pointer; }
@media (max-width: 900px) { .org-dr-grid, .hr-two { grid-template-columns: 1fr; } }

/* Recorrido virtual */
.recorrido-card{padding:0;overflow:hidden}
.recorrido-marco{display:block;width:100%;height:min(78vh,820px);border:0;background:#2c231e}

/* Nix dentro de Netix Comercial */
.nix-fab { position: fixed; right: 20px; bottom: 20px; z-index: 45; display: flex; align-items: center; gap: 10px; border: 0; background: var(--ink); color: var(--surface); border-radius: 999px; padding: 6px 16px 6px 6px; cursor: pointer; font: 600 14px var(--font-ui); box-shadow: 0 14px 34px -12px rgba(9, 9, 11, .55); }
.nix-fab[hidden] { display: none; }
.nix-fab:hover { transform: translateY(-1px); }
.nix-orb { position: relative; width: 38px; height: 38px; flex: none; overflow: hidden; border-radius: 50%; animation: nixF 6s linear infinite; }
.nix-orb.sm { width: 30px; height: 30px; }
.nix-orb i { position: absolute; top: 50%; left: 50%; width: 140%; height: 140%; filter: blur(8px); transform: translate(-50%, -50%); background: conic-gradient(#fffff2 0%, #e6e6e6 25%, #b3b3b3 50%, #4d4d4d 75%, #fffff2 100%); animation: nixG 4s linear infinite; }
@keyframes nixF { 0%, 100% { border-radius: 44% 56% 44% 56%; } 50% { border-radius: 56% 44% 56% 44%; } }
@keyframes nixG { to { transform: translate(-50%, -50%) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .nix-orb, .nix-orb i { animation: none; } }
.nix-panel { position: fixed; right: 20px; bottom: 20px; z-index: 55; width: min(420px, calc(100vw - 40px)); height: min(640px, calc(100dvh - 40px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 80px -24px rgba(9, 9, 11, .5); overflow: hidden; }
.nix-panel[hidden] { display: none; }
.nix-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 10px 14px; border-bottom: 1px solid var(--line); }
.nix-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nix-head strong { font-size: 15px; }
.nix-head small { color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nix-x { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; background: none; color: var(--ink-2); cursor: pointer; font-size: 16px; line-height: 1; flex: none; }
.nix-x:hover { border-color: var(--ink-3); color: var(--ink); }
.nix-tabs { padding: 8px 12px 0; display: flex; gap: 6px; }
.nix-msgs { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.nix-b { max-width: 88%; align-self: flex-start; background: var(--bg); color: var(--ink); border-radius: 14px; border-bottom-left-radius: 4px; padding: 9px 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.45; }
.nix-b.yo { align-self: flex-end; background: var(--ink); color: var(--surface); border-radius: 14px; border-bottom-right-radius: 4px; }
.nix-b a { color: inherit; }
.nix-dots { display: inline-flex; gap: 4px; padding: 3px 0; }
.nix-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: nixP 1.2s infinite; }
.nix-dots i:nth-child(2) { animation-delay: .2s; } .nix-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes nixP { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.nix-ideas { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.nix-ideas[hidden] { display: none; }
.nix-idea { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 11px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; text-align: left; }
.nix-idea:hover { border-color: var(--ink-3); color: var(--ink); }
.nix-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.nix-form textarea { flex: 1; min-width: 0; resize: none; max-height: 120px; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; background: var(--surface-2); font-size: 14px; line-height: 1.35; }
.nix-form textarea:focus { outline: 0; border-color: var(--ink-3); }
.nix-foot { margin: 0; padding: 0 14px 10px; font-size: 11px; color: var(--ink-3); }
@media (max-width: 640px) { .nix-panel { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; border: 0; } .nix-fab-label { display: none; } .nix-fab { padding: 6px; } }
@media print { .nix-fab, .nix-panel { display: none !important; } }
.nix-leads { display: grid; place-items: center; text-decoration: none; font-size: 14px; }

/* Propuestas NETIX: editor y documento para el cliente */
.prop-wrap { display: flex; flex-direction: column; gap: 14px; }
.prop-toolbar { position: sticky; top: 70px; z-index: 6; background: var(--bg); padding: 6px 0; }
.prop-calc { display: flex; flex-wrap: wrap; gap: 10px; }
.prop-calc > div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 120px; }
.prop-calc small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); }
.prop-calc strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.prop-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.prop-body { display: flex; flex-direction: column; gap: 14px; }
.prop-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.prop-f { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-3); }
.prop-f input, .prop-f select, .prop-f textarea, .prop-body textarea, .prop-grid input, .prop-grid select { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: var(--surface); color: var(--ink); font-size: 13.5px; width: 100%; }
.prop-f textarea { grid-column: 1 / -1; }
.prop-form .prop-f:has(textarea) { grid-column: 1 / -1; }
.prop-etapa { gap: 10px; }
.prop-etapa-head, .prop-svc-head { display: flex; gap: 8px; align-items: center; }
.prop-etapa-title { flex: 1; font-weight: 700; font-size: 15px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; text-transform: uppercase; }
.prop-svc { border: 1px solid var(--line); border-left: 4px solid var(--ink); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.prop-svc-title { flex: 1; font-weight: 700; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; text-transform: uppercase; }
.prop-svc-price { width: 140px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; text-align: right; font-variant-numeric: tabular-nums; }
.prop-svc .prop-form { padding: 0; border: 0; }
.prop-grid { width: 100%; border-collapse: collapse; font-size: 13px; }
.prop-grid th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: 4px; }
.prop-grid td { padding: 3px 4px; vertical-align: top; }
.prop-rows { display: flex; flex-direction: column; gap: 8px; overflow-x: auto; }

.prop-doc { background: #fff; color: #000; max-width: 820px; margin: 0 auto; padding: 48px 56px; border: 1px solid var(--line); border-radius: 6px; font: 400 13px/1.55 "Montserrat", var(--font-ui); display: flex; flex-direction: column; gap: 26px; }
.prop-doc section { display: flex; flex-direction: column; gap: 10px; }
.pd-cover { min-height: 420px; justify-content: center; }
.pd-logo { width: 150px; height: auto; }
.pd-cot { font-weight: 700; letter-spacing: .14em; font-size: 12px; margin-top: 18px; }
.pd-info { border-collapse: collapse; margin: 8px 0; }
.pd-info th { text-align: left; font-weight: 700; padding: 3px 18px 3px 0; white-space: nowrap; }
.pd-info td { padding: 3px 0; }
.pd-project { font-size: 26px; text-transform: uppercase; margin: 10px 0 0; letter-spacing: .01em; }
.pd-scope { font-size: 12.5px; }
.pd-etapa { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; border-bottom: 2px solid #000; padding-bottom: 6px; margin: 0; }
.pd-svc { display: flex; flex-direction: column; gap: 8px; break-inside: avoid; }
.pd-bar { background: #000; color: #fff; font-weight: 700; padding: 7px 12px; letter-spacing: .04em; font-size: 12.5px; }
.pd-svc p, .pd-svc ul { margin: 0; text-align: justify; }
.pd-svc ul { padding-left: 20px; }
.pd-ind { padding-left: 14px; }
.pd-mod { align-self: flex-end; display: flex; gap: 18px; border: 1px solid #000; padding: 6px 12px; font-size: 12.5px; }
.pd-title { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; margin: 0; }
.pd-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pd-table th { background: #000; color: #fff; text-align: left; padding: 7px 10px; }
.pd-table td { border-bottom: 1px solid #d9d9d9; padding: 7px 10px; }
.pd-table .r { text-align: right; font-variant-numeric: tabular-nums; }
.pd-sub td { font-weight: 700; }
.pd-total td { font-weight: 700; background: #000; color: #fff; }
.pd-sign td { height: 40px; }
.pd-sign td:first-child { width: 34%; }
.pd-conds { padding-left: 18px; margin: 0; font-size: 11.5px; display: flex; flex-direction: column; gap: 4px; text-align: justify; }
@media print {
  body.print-prop .side, body.print-prop .erp-appbar, body.print-prop .erp-cp, body.print-prop .prop-toolbar, body.print-prop .prop-calc, body.print-prop .prop-tabs, body.print-prop .nix-fab, body.print-prop .toast { display: none !important; }
  body.print-prop .main { padding: 0; }
  body.print-prop .prop-doc { border: 0; padding: 0; max-width: none; }
  body.print-prop .pd-cover { min-height: 90vh; break-after: page; }
  body.print-prop .pd-title { break-before: auto; }
}
.nix-fab { position: fixed; }
.nix-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; border: 2px solid var(--surface); }
.nix-tab-n { margin-left: 6px; background: var(--bad); color: #fff; border-radius: 99px; font-size: 10px; padding: 0 6px; }
.nix-form[hidden] { display: none; }
.nix-rec { border: 1px solid var(--line); border-left: 4px solid var(--ink-3); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; background: var(--surface); }
.nix-rec.p-alta { border-left-color: var(--bad); }
.nix-rec.p-media { border-left-color: var(--st-reservada); }
.nix-rec strong { font-size: 13.5px; line-height: 1.35; }
.nix-rec p { margin: 0; font-size: 12.5px; color: var(--ink-2); }
.nix-rec .btn { align-self: flex-start; text-decoration: none; }
.nix-rec-top { display: flex; justify-content: space-between; gap: 8px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.nix-rec.p-alta .nix-rec-prio { color: var(--bad); font-weight: 700; }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.mod-toggle { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.mod-toggle span { display: flex; flex-direction: column; gap: 2px; }
.mod-toggle small { color: var(--ink-3); font-size: 12px; }

/* Chat del Grupo Demo del Este */
.chat { display: grid; grid-template-columns: 260px 1fr; gap: 0; height: calc(100vh - 48px); min-height: 480px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.chat-list { border-right: 1px solid var(--line); padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; overflow: auto; background: var(--surface-2); }
.chat-sec { font-family: var(--font-display); font-size: 10.5px; text-transform: uppercase; letter-spacing: .16em; color: var(--ink-3); padding: 12px 10px 4px; }
.chat-ch { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-size: 13.5px; }
.chat-ch:hover { background: var(--bg); color: var(--ink); }
.chat-ch.on { background: var(--ink); color: var(--surface); }
.chat-ch.unread .chat-ch-name { font-weight: 700; color: var(--ink); }
.chat-ch.on.unread .chat-ch-name { color: var(--surface); }
.chat-ch-ico { width: 24px; height: 24px; border-radius: 7px; background: var(--bg); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; color: var(--ink-2); }
.chat-ch.on .chat-ch-ico { background: rgba(255, 255, 255, .15); color: var(--surface); }
.chat-ch-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-n { background: var(--ink-2); color: var(--surface); border-radius: 99px; font-size: 11px; font-weight: 700; padding: 0 7px; line-height: 18px; }
.chat-n.mention { background: var(--bad); }
.chat-new { padding: 10px 6px 0; margin-top: auto; }
.chat-new select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px; background: var(--surface); }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-head { display: flex; align-items: baseline; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat-head strong { font-size: 16px; }
.chat-msgs { flex: 1; overflow: auto; padding: 12px 18px; display: flex; flex-direction: column; gap: 2px; }
.chat-day { text-align: center; margin: 12px 0 6px; position: relative; }
.chat-day::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line); }
.chat-day span { position: relative; background: var(--surface); padding: 0 10px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.chat-m { display: flex; gap: 10px; padding: 4px 6px; border-radius: 10px; }
.chat-m:hover { background: var(--surface-2); }
.chat-m.mention { background: #fff7e6; box-shadow: inset 3px 0 0 var(--st-reservada); }
.chat-m.cont { padding-top: 0; }
.chat-av { flex: none; margin-top: 2px; }
.chat-av.ghost { width: 30px; }
.chat-mb { min-width: 0; flex: 1; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-mh { display: flex; gap: 8px; align-items: baseline; }
.chat-mh .muted { font-size: 11.5px; }
.chat-at { background: var(--bg); border-radius: 6px; padding: 0 3px; font-weight: 600; }
.chat-tools { display: none; gap: 10px; margin-left: 8px; font-size: 11.5px; }
.chat-m:hover .chat-tools { display: inline-flex; }
.chat-ed { font-size: 11px; }
.chat-empty { margin: auto; text-align: center; display: flex; flex-direction: column; gap: 4px; color: var(--ink-3); }
.chat-compose { position: relative; border-top: 1px solid var(--line); padding: 10px 14px; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; }
.chat-form textarea { flex: 1; resize: none; max-height: 160px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); font-size: 14px; line-height: 1.4; }
.chat-form textarea:focus { outline: 0; border-color: var(--ink-3); }
.chat-sugg { position: absolute; bottom: 100%; left: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px -12px rgba(9, 9, 11, .3); padding: 4px; display: flex; flex-direction: column; min-width: 180px; }
.chat-sugg[hidden] { display: none; }
.chat-sugg button { border: 0; background: none; text-align: left; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.chat-sugg button:hover { background: var(--bg); }
.erp-appbar-chat { position: relative; display: grid; place-items: center; width: 36px; height: 34px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); }
.erp-appbar-chat:hover { background: var(--bg); color: var(--ink); }
.erp-appbar-chat .chat-badge { position: absolute; top: -5px; right: -6px; min-width: 18px; height: 18px; border-radius: 99px; background: var(--ink-2); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--surface); }
.chat-badge.mention { background: var(--bad) !important; }
.chat-badge[hidden] { display: none !important; }
@media (max-width: 860px) { .chat { grid-template-columns: 1fr; height: auto; } .chat-list { max-height: 220px; border-right: 0; border-bottom: 1px solid var(--line); } .chat-msgs { min-height: 50vh; } }
.chat-compose { padding-right: 130px; }
@media (max-width: 640px) { .chat-compose { padding-right: 70px; } }

/* Radar de oportunidades */
.radar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.radar-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-1); }
.radar-card.past { opacity: .55; }
.radar-card h3 { margin: 0; font-size: 15.5px; line-height: 1.3; }
.radar-card p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.radar-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.radar-place { margin-left: auto; font-size: 12px; color: var(--ink-2); }
.radar-date { font-weight: 600; font-size: 13px; }
.radar-action { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.radar-foot { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-top: auto; font-size: 12px; }

/* Lista de arranque del ERP (20-nov-2026): pasos con avance y botón */
.setup-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.setup-head h2 { margin: 0; }
.setup-count { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.setup-bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0 14px; }
.setup-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }
.setup-group + .setup-group { margin-top: 14px; }
.setup-company { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.setup-step { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.setup-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--st-reservada); flex: none; }
.setup-text { flex: 1; min-width: 0; font-size: 14px; }
.setup-text .muted { font-size: 12.5px; }
.setup-step .btn { flex: none; }

/* Portada del ERP: «Todas las aplicaciones» plegable con buscador (20-nov-2026) */
.erp-all { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.erp-all > summary { cursor: pointer; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); margin: 0 6px 14px; list-style: none; }
.erp-all > summary::-webkit-details-marker { display: none; }
.erp-all > summary::before { content: "▸"; display: inline-block; margin-right: 8px; transition: transform .2s; }
.erp-all[open] > summary::before { transform: rotate(90deg); }
.erp-all-search { width: min(360px, 100%); margin: 0 6px 18px; }
.erp-launch + .setup-card, .setup-card + .erp-launch { margin-top: 16px; }
.setup-more > summary { cursor: pointer; font-size: 13px; color: var(--accent); padding: 10px 0 0; border-top: 1px solid var(--line); }
.setup-more[open] > summary { margin-bottom: 8px; }

/* Formularios en modo simple (20-nov-2026) */
.erp-more { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.erp-more > summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.erp-more[open] > summary { margin-bottom: 8px; }
.erp-more-sum { margin: 0 0 10px; font-size: 12.5px; }
.link-btn { background: none; border: 0; padding: 4px 0 0; color: var(--accent); font: inherit; font-size: 12.5px; cursor: pointer; text-align: left; }
.link-btn:hover { text-decoration: underline; }
.erp-inline-new { border: 1px dashed var(--accent); background: var(--accent-soft); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.erp-inline-new[hidden] { display: none; }

/* Factura con varias líneas */
.erp-lines[hidden]{display:none}
.erp-lines{margin:4px 0 10px}
.erp-lines table{width:100%}
.erp-lines td{padding:3px 4px;vertical-align:middle}
.erp-lines input,.erp-lines select{width:100%;min-width:0}
.erp-lines td:first-child{width:40%}
.erp-lines select{min-width:76px}
.erp-lines td:nth-child(5){white-space:nowrap}

/* Módulo DGII · ventanas de la Oficina Virtual */
.ofv-group{margin:18px 0}
.ofv-group h2{font-size:1.05rem;margin:0 0 8px}
.ofv-win{border:1px solid var(--line,#e5e7eb);border-radius:10px;background:#fff;margin:0 0 8px;padding:0 14px}
.ofv-win>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 0;cursor:pointer;list-style:none}
.ofv-win>summary::-webkit-details-marker{display:none}
.ofv-win>summary::after{content:"›";color:#9ca3af;font-size:1.2rem;transition:transform .15s}
.ofv-win[open]>summary::after{transform:rotate(90deg)}
.ofv-name{font-weight:600;flex:1}
.ofv-win.lvl-no_aplica .ofv-name{color:#9ca3af}
.ofv-dl{display:grid;grid-template-columns:110px 1fr;gap:6px 12px;margin:0 0 10px}
.ofv-dl dt{color:#6b7280;font-size:.85rem}
.ofv-dl dd{margin:0}
.ofv-win .actions{padding-bottom:12px}
.ofv-steps{margin:6px 0 0;padding-left:20px;line-height:1.55}
.ofv-steps li{margin-bottom:4px}
.ofv-sub{font-size:1.05rem;margin:20px 0 8px}
.ofv-review{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:0 12px}
@media (max-width:640px){.ofv-dl{grid-template-columns:1fr}.ofv-dl dt{margin-top:4px}}

/* Gráficas por empresa */
.gr-kpis{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px;margin-bottom:14px}
.gr-kpi{background:#fff;border:1px solid var(--line,#e5e7eb);border-radius:12px;padding:12px 14px}
.gr-kpi-l{font-size:.8rem;color:#6b7280}
.gr-kpi-v{font-size:1.35rem;font-weight:700;margin:2px 0;color:#1e1b4b}
.gr-kpi-s{font-size:.78rem}
.gr-up{color:#047857;font-weight:600}
.gr-down{color:#be123c;font-weight:600}
.gr-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:14px}
.gr-row.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.gr-card{margin:0}
.gr-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:6px}
.gr-head h2{margin:0}
.gr-svg{width:100%;height:auto;display:block}
.gr-grid{stroke:#eef0f3;stroke-width:1}
.gr-base{stroke:#d1d5db;stroke-width:1}
.gr-guide{stroke:#9ca3af;stroke-width:1;stroke-dasharray:3 3}
.gr-ax{font-size:10.5px;fill:#6b7280}
.gr-center{font-size:15px;font-weight:700;fill:#1e1b4b}
.gr-legend{display:flex;gap:14px;font-size:.8rem;color:#4b5563}
.gr-legend span,.gr-tip div{display:flex;align-items:center;gap:6px}
.gr-legend i,.gr-tip i,.gr-cats i{display:inline-block;width:12px;height:3px;border-radius:2px;background:var(--c)}
.gr-legend i.dash,.gr-tip i.dash{background:repeating-linear-gradient(90deg,var(--c) 0 4px,transparent 4px 7px)}
.gr-cats i{width:10px;height:10px;border-radius:3px}
.gr-tip{position:fixed;z-index:9999;display:none;pointer-events:none;background:#1e1b4b;color:#fff;font-size:.8rem;padding:8px 10px;border-radius:8px;box-shadow:0 6px 18px rgba(0,0,0,.18);min-width:150px}
.gr-tip .muted{color:#c7c9d9}
.gr-donut-wrap{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.gr-donut{width:170px;height:170px;flex:none}
.gr-seg:hover{opacity:.85}
.gr-cats{list-style:none;margin:0;padding:0;flex:1;min-width:150px;font-size:.82rem}
.gr-cats li{display:flex;align-items:center;gap:8px;padding:3px 0}
.gr-cats span{flex:1;text-transform:capitalize}
.gr-cxc,.gr-ncf{list-style:none;margin:0;padding:0}
.gr-cxc li{display:grid;grid-template-columns:34px 1fr auto;gap:10px;align-items:center;padding:8px 0;border-bottom:1px solid #f1f2f4;font-size:.85rem}
.gr-cxc li:hover{background:#faf7ff}
.gr-cxc .r{text-align:right}
.gr-av{width:32px;height:32px;border-radius:50%;background:#ede4fb;color:#5b21b6;display:grid;place-items:center;font-size:.72rem;font-weight:700}
.gr-ncf li{padding:8px 0;font-size:.85rem}
.gr-ncf-h{display:flex;justify-content:space-between}
.gr-meter{height:8px;background:#f1f2f4;border-radius:6px;margin:5px 0;overflow:hidden}
.gr-meter i{display:block;height:100%;border-radius:6px}
.gr-empty{padding:30px 0;text-align:center}
.gr-table{margin-top:6px;font-size:.85rem}
.gr-table summary{cursor:pointer;color:#6b7280}
@media (max-width:1100px){.gr-row.three{grid-template-columns:1fr 1fr}}
@media (max-width:820px){.gr-row,.gr-row.three{grid-template-columns:1fr}}
.ofv-guia{border-top:1px dashed #e5e7eb;margin:4px 0 10px;padding-top:8px}
.ofv-guia h4{margin:10px 0 4px;font-size:.88rem;color:#1e1b4b}
.ofv-guia ol,.ofv-guia ul{margin:0;padding-left:20px;line-height:1.5;font-size:.9rem}
.ofv-guia li{margin-bottom:3px}
.ofv-guia p{margin:0 0 4px;font-size:.9rem}
.ofv-ojo li{color:#9a3412}
.ofv-win>summary .pill{margin-left:6px}
.gr-home{display:flex;flex-direction:column;gap:12px}
.gr-home-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.gr-home-head h2{margin:0;font-size:18px}
.gr-home-head .link-btn{margin-left:auto}
.gr-home .gr-kpis,.gr-home .gr-row{margin-bottom:0}
/* Panel lateral largo: que ningún bloque (tablas) se encoja hasta desaparecer (21-nov-2026) */
.drawer > * { flex-shrink: 0; }
/* Paneles como ventanas centradas (21-nov-2026, como los modales de CloudYa): título con ✕ arriba, contenido con
   scroll propio y «Cancelar / Guardar» fijos abajo a la derecha. Se cierran con ✕, Cancelar, Esc o clic fuera. */
.overlay { justify-content: center; align-items: flex-start; padding: 4vh 16px; background: rgb(15 23 42 / .45); overflow: hidden; }
.drawer { --mpad: 24px; width: min(720px, 100%); height: auto; max-height: 92vh; padding: 0 var(--mpad) var(--mpad); gap: 14px;
  border-radius: 16px; border: 1px solid var(--line, rgb(0 0 0 / .08)); box-shadow: 0 30px 80px rgb(0 0 0 / .28), 0 4px 14px rgb(0 0 0 / .08);
  overscroll-behavior: contain; position: relative; }
.drawer > .x { position: sticky; top: 12px; z-index: 3; align-self: flex-end; margin: 12px calc(-1 * var(--mpad) + 12px) -48px 0;
  width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted, #6b7280); font-size: 18px; line-height: 1; cursor: pointer; }
.drawer > .x:hover { background: rgb(0 0 0 / .06); color: var(--ink, #111); }
.drawer > .x:focus-visible { outline: 2px solid var(--accent, #2563eb); outline-offset: 2px; }
.drawer > h2:first-of-type { position: sticky; top: 0; z-index: 2; margin: 0 calc(-1 * var(--mpad)); padding: 18px 64px 14px var(--mpad);
  background: var(--surface); border-bottom: 1px solid var(--line, rgb(0 0 0 / .08)); }
.drawer > .empty:nth-child(2) { margin-top: 56px; }
.drawer .form > .modal-foot { position: sticky; bottom: 0; z-index: 2; justify-content: flex-end; margin: 6px calc(-1 * var(--mpad)) calc(-1 * var(--mpad));
  padding: 12px var(--mpad) var(--mpad); background: var(--surface); border-top: 1px solid var(--line, rgb(0 0 0 / .08)); }
body:has(> .overlay) .nix-fab { display: none; }  /* Nix no tapa «Guardar» mientras hay una ventana abierta */
@media (max-width: 600px) {
  .overlay { padding: 8px; }
  .drawer { --mpad: 16px; max-height: calc(100vh - 16px); border-radius: 14px; }
  .drawer .form > .modal-foot > .btn { flex: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  .overlay { animation: ovIn .15s ease-out; }
  .drawer { animation: modalIn .2s cubic-bezier(.2, .8, .2, 1); }
  @keyframes ovIn { from { opacity: 0; } to { opacity: 1; } }
  @keyframes modalIn { from { transform: translateY(-14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
}

.gr-card td.r{white-space:nowrap}
.gr-kpi-top{display:flex;align-items:center;gap:8px}
.gr-kpi-ico{width:28px;height:28px;border-radius:8px;display:grid;place-items:center;background:color-mix(in srgb,var(--c) 14%,transparent);color:var(--c);flex:none}
.gr-kpi-ico .ux-ico{width:16px;height:16px;stroke:currentColor}
.gr-kpi-v{font-size:1.15rem}
.gr-reports{list-style:none;margin:0;padding:0}
.gr-reports li{display:grid;grid-template-columns:32px 1fr auto;gap:10px;align-items:center;padding:7px 0;border-bottom:1px solid #f1f2f4;font-size:.85rem}
.gr-rep-ico{width:30px;height:30px;border-radius:8px;display:grid;place-items:center;background:#f2f2f7;color:#007aff}
.gr-rep-ico .ux-ico{width:16px;height:16px}
.gr-total{display:flex;justify-content:space-between;padding:10px 0 4px;font-size:.9rem}
.gr-pf{margin-top:6px;font-size:.85rem}
.gr-pf summary{cursor:pointer;color:#6b7280}
/* Factura para Carla (21-nov-2026): empresa que factura, buscador de clientes y barra de imprimir. */
.erp-emisor { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2, rgb(0 0 0 / .04)); }
.erp-emisor strong { font-size: 15px; }
.erp-emisor .link-btn { margin-left: auto; }
.erp-party-search { margin-bottom: 6px; }
.erp-ncf-hint:empty { display: none; }
.erp-ncf-hint { font-size: 12.5px; margin-top: -6px; }
.erp-print-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; justify-content: space-between; }
.erp-print-bar:not(.note) { justify-content: flex-end; }
.note.ok { border-color: var(--st-disponible); background: var(--st-disponible-bg); color: var(--ink); }
/* Estado del RNC y reactivación (21-nov-2026). */
.rnc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.rnc-head h2 { margin: 0 0 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rnc-card.warn { border-left: 4px solid var(--st-reservada); }
.rnc-card.ok { border-left: 4px solid var(--st-disponible); }
.rnc-progress { position: relative; height: 26px; border-radius: 13px; background: var(--surface-2, rgb(0 0 0 / .05)); overflow: hidden; margin: 12px 0; }
.rnc-progress i { position: absolute; inset: 0 auto 0 0; background: var(--st-disponible-bg); border-right: 2px solid var(--st-disponible); }
.rnc-progress span { position: relative; z-index: 1; line-height: 26px; padding: 0 12px; font-size: 13px; font-weight: 600; }
.rnc-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.rnc-steps li { padding: 10px 12px; border: 1px solid var(--line, rgb(0 0 0 / .08)); border-radius: 10px; }
.rnc-steps li p { margin: 4px 0 8px 26px; color: var(--muted); }
.rnc-steps li .actions { margin-left: 26px; }
.rnc-steps li.done { opacity: .6; }
.rnc-steps li.done strong { text-decoration: line-through; }
.rnc-check { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; cursor: pointer; }
.rnc-auto { margin: 16px 0; padding: 14px 16px; border-radius: 12px; background: var(--surface-2, rgb(0 0 0 / .04)); }
.rnc-auto h3 { margin-top: 0; }
.rnc-auto-steps { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; }
.rnc-prompt { white-space: pre-wrap; font-size: 12.5px; max-height: 360px; overflow: auto; padding: 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line, rgb(0 0 0 / .08)); }
/* Aviso de versión nueva (21-nov-2026). */
.app-update { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 16px; border-radius: 12px; background: var(--ink, #111); color: #fff; box-shadow: 0 10px 30px rgb(0 0 0 / .25); font-size: 14px; }
/* Presupuestos y centros de costo por proyecto (21-nov-2026). */
.erp-budget h4 { margin: 14px 0 6px; }
.erp-budget select { margin-top: 6px; max-width: 260px; }
.erp-budget tfoot td { border-top: 2px solid var(--line, rgb(0 0 0 / .12)); }
.erp-cc-meter { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.erp-cc-meter .erp-meter { flex: 1; }
/* Factura: botones de imprimir/enviar y seguimiento de cobro (21-nov-2026). */
.erp-print-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.erp-fu { margin-top: 8px; }
.erp-fu h3 { display: flex; align-items: center; gap: 8px; }
.erp-fu-log li { font-size: 13px; }
/* Facturación electrónica (21-nov-2026). */
.fe-hero { padding: 22px 24px; border-radius: 16px; background: linear-gradient(135deg, var(--surface-2, #f4f7fb), var(--surface, #fff)); border: 1px solid var(--line, rgb(0 0 0 / .08)); margin: 12px 0; }
.fe-hero h2 { margin: 0 0 6px; font-size: 22px; }
.fe-quicks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 14px; }
.fe-quick { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 14px; border: 1px solid var(--line, rgb(0 0 0 / .08)); background: var(--surface); color: inherit; text-decoration: none; }
.fe-quick:hover { border-color: var(--accent, #2563eb); }
.fe-quick p { margin: 0; color: var(--muted); font-size: 13px; flex: 1; }
.fe-ico { font-size: 22px; }
.fe-link { color: var(--accent, #2563eb); font-weight: 600; font-size: 13px; }
.fe-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.fe-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.fe-card-head h2 { margin: 0; }
/* Ventas al estilo CloudYa (21-nov-2026). */
.vta-alert { display: grid; gap: 4px; }
.vta-alert-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.vta-filters label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.vta-note { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; color: var(--muted); }
.vta-menu { position: relative; display: inline-block; }
.vta-menu > summary { list-style: none; cursor: pointer; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line, rgb(0 0 0 / .12)); border-radius: 8px; font-weight: 700; }
.vta-menu > summary::-webkit-details-marker { display: none; }
.vta-pop { position: absolute; right: 0; top: 34px; z-index: 30; min-width: 190px; padding: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line, rgb(0 0 0 / .1)); box-shadow: 0 12px 30px rgb(0 0 0 / .15); display: grid; text-align: left; }
.vta-mi { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: transparent; border-radius: 8px; font: inherit; font-size: 14px; color: inherit; cursor: pointer; text-decoration: none; }
.vta-mi:hover { background: var(--surface-2, rgb(0 0 0 / .05)); }
.vta-mi.pri { color: var(--accent, #2563eb); font-weight: 600; }
.vta-mi.danger { color: #c0392b; }
.vta-pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.small { font-size: 12px; }
/* Logo de la empresa en Configuración (21-nov-2026). */
.co-logo-box { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 12px; background: var(--surface-2, rgb(0 0 0 / .04)); }
.co-logo { height: 48px; max-width: 180px; object-fit: contain; background: #fff; border-radius: 8px; padding: 6px; border: 1px solid var(--line, rgb(0 0 0 / .08)); }

/* ── Celular (23-nov-2026) ─────────────────────────────────────────────────────────────
   Barra superior (logo + tu perfil), barra inferior para el pulgar (Inicio, Buscar, Nix, Chat, Menú) y el menú lateral
   como cajón al estilo de Ajustes del iPhone: perfil arriba, secciones en bloques redondeados, filas de 48 px.
   Campos a 16 px para que el iPhone no haga zoom al escribir. Tablas de listado como tarjetas (movil.js). */
.mbar, .side-backdrop, .tabbar, .side-mhead { display: none; }
.nav-sect { display: contents; }
html { -webkit-text-size-adjust: 100%; }
@media (max-width: 860px) {
  html body { -webkit-tap-highlight-color: transparent; --m-bg: #f2f2f7; --m-group: #ffffff; --m-sep: rgba(60, 60, 67, .14); --m-ink: #111114; --m-ink-3: rgba(60, 60, 67, .6); --m-accent: #007aff; --m-bar: rgba(249, 249, 251, .82); }

  /* Barra superior */
  html .mbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: 0; z-index: 28;
    padding: calc(6px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 6px max(16px, env(safe-area-inset-left));
    background: var(--m-bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: .5px solid var(--m-sep); }
  .mbar-brand { display: flex; align-items: center; height: 44px; }
  .mbar-brand img { height: 21px; display: block; }
  .mbar-brand img.logo-dark { display: none; }
  .mbar-me { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; padding: 0; cursor: pointer; }
  html body .mbar .mbar-me .ux-avatar { width: 32px; height: 32px; font-size: 12px; cursor: pointer; background: linear-gradient(145deg, #8224e3, #4f46e5); color: #fff; }

  /* Barra inferior */
  html .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 29;
    padding: 6px max(6px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    background: var(--m-bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: .5px solid var(--m-sep); }
  .tb-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 50px; border: 0; background: none;
    color: var(--m-ink-3); text-decoration: none; font: 500 10.5px var(--font-ui); cursor: pointer; padding: 0; border-radius: 12px; }
  .tb-item .ux-ico { width: 25px; height: 25px; stroke-width: 1.8; opacity: 1; }
  .tb-item.on { color: var(--m-accent); }
  .tb-item:active { background: rgba(120, 120, 128, .12); }
  .tb-nix .tb-orb { width: 30px; height: 30px; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
  .tb-nix .tb-label { color: var(--m-ink); font-weight: 600; }
  .tb-badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ff3b30; color: #fff;
    font: 700 11px/18px var(--font-ui); text-align: center; box-shadow: 0 0 0 2px var(--m-bar); }
  .tb-badge[hidden] { display: none; }
  html .nix-fab { display: none !important; }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 77; }
  /* Ventanas por encima de las barras */
  html .overlay { z-index: 70; }
  html .nix-panel { z-index: 72; }
  html .ux-pal { z-index: 75; }
  html .app-update { z-index: 76; }

  /* Menú lateral como cajón */
  html .shell .side, html body.side-min .shell .side { position: fixed; top: 0; bottom: 0; left: 0; z-index: 60; width: min(88vw, 360px); height: auto; max-height: none;
    transform: translateX(-104%); transition: transform .28s cubic-bezier(.32, .72, 0, 1); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    display: flex; flex-direction: column; gap: 14px; background: var(--m-bg); color: var(--m-ink); border: 0;
    padding: calc(12px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    box-shadow: 0 0 60px rgba(0, 0, 0, .25); -webkit-backdrop-filter: none; backdrop-filter: none; }
  html body.nav-open .shell .side { transform: none; }
  html .shell .side > * { flex-shrink: 0; }
  html body.nav-open .side-backdrop { display: block; position: fixed; inset: 0; z-index: 58; background: rgba(0, 0, 0, .35); animation: mFade .2s ease; }
  @keyframes mFade { from { opacity: 0; } }
  body.nav-open { overflow: hidden; }
  html .side .brand, html .side .side-toggle { display: none; }
  html .side .side-mhead { display: flex; align-items: center; gap: 12px; }
  .side-profile { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; background: var(--m-group); border-radius: 14px; padding: 12px 14px; }
  html body .side .side-profile .ux-avatar { display: grid; place-items: center;  width: 46px; height: 46px; font-size: 16px; cursor: default; background: linear-gradient(145deg, #8224e3, #4f46e5); color: #fff; }
  .side-profile strong { display: block; font-size: 16.5px; font-weight: 600; color: var(--m-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side-profile > div > span { display: block; font-size: 13px; color: var(--m-ink-3); }
  .side-profile > div { min-width: 0; }
  .side-close { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(120, 120, 128, .16); color: var(--m-ink-3); font-size: 14px; font-weight: 700; cursor: pointer; align-self: flex-start; margin-top: 4px; }
  html .side .side-search { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; border: 0; border-radius: 11px; background: rgba(120, 120, 128, .12); color: var(--m-ink-3); font-size: 16px; padding: 0 12px; }
  html .side .side-search kbd { display: none; }
  html .side .side-project { display: flex; flex-direction: column; gap: 6px; }
  html .side .side-project label { padding: 0 14px; font: 400 12.5px var(--font-ui); letter-spacing: 0; text-transform: uppercase; color: var(--m-ink-3); }
  html .side .side-project select { min-height: 46px; border: 0; border-radius: 12px; background: var(--m-group); color: var(--m-ink); padding: 0 14px; font-weight: 500; }

  /* Secciones y filas */
  html .shell .side .nav { flex-direction: column; flex-wrap: nowrap; gap: 0; }
  html .side .nav-label, html .side .nav-group > summary { font: 400 12.5px var(--font-ui); letter-spacing: 0; text-transform: uppercase; color: var(--m-ink-3); padding: 18px 14px 7px; }
  html .side .nav-group { margin: 0; }
  html .side .nav-group > summary { display: flex; justify-content: space-between; }
  html .side .nav-group > summary::after { content: "Ver"; text-transform: none; color: var(--m-accent); font-size: 14px; }
  html .side .nav-group[open] > summary::after { content: "Ocultar"; }
  .nav-sect { display: flex; flex-direction: column; background: var(--m-group); border-radius: 14px; overflow: hidden; }
  html .shell .side .nav a { position: relative; min-height: 48px; padding: 0 14px; gap: 14px; align-items: center; justify-content: flex-start; border-radius: 0;
    color: var(--m-ink); font-size: 16px; font-weight: 400; box-shadow: none; background: none; }
  html .shell .side .nav a > span:first-of-type { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html .shell .side .nav a::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid rgba(60, 60, 67, .3); border-top: 2px solid rgba(60, 60, 67, .3); transform: rotate(45deg); margin-left: 2px; }
  html .shell .side .nav .nav-sect a + a::before { content: ""; position: absolute; top: 0; right: 0; left: 58px; border-top: .5px solid var(--m-sep); }
  html .shell .side .nav a:active { background: rgba(120, 120, 128, .14); }
  html .shell .side .nav a.on { background: rgba(0, 122, 255, .1); color: var(--m-accent); font-weight: 600; }
  html .shell .side .nav a .ux-ico { width: 30px; height: 30px; padding: 6px; border-radius: 8px; flex: none; }
  html .shell .side .nav a .count { order: 2; margin-left: auto; background: rgba(120, 120, 128, .16); color: var(--m-ink-3); font-size: 13px; line-height: 22px; padding: 0 8px; border-radius: 11px; }
  html .shell .side .nav a .count.chat-badge, html .shell .side .nav a .count#nav-alerts { background: #ff3b30; color: #fff; }

  /* Tu cuenta, al final */
  html .side .me { margin-top: 8px; padding: 0; border: 0; display: flex; flex-direction: column; background: var(--m-group); border-radius: 14px; overflow: hidden; gap: 0; font-size: 16px; }
  html .side .me .me-card { display: none; }
  html .side .me a, html .side .me button { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 14px; margin: 0; border: 0; border-radius: 0; background: none;
    color: var(--m-ink); font-size: 16px; text-decoration: none; align-self: stretch; width: 100%; text-align: left; cursor: pointer; }
  html .side .me a + button { border-top: .5px solid var(--m-sep); }
  html .side .me button { color: #ff3b30; }
  html .side .me .ux-ico { width: 30px; height: 30px; padding: 6px; border-radius: 8px; stroke: #fff; stroke-width: 2; background: #8e8e93; }
  html .side .me a .ux-ico { background: #007aff; }
  html .side .me button .ux-ico { background: #ff3b30; }

  /* Contenido */
  html .main { padding: 14px 14px calc(92px + env(safe-area-inset-bottom)); gap: 14px; }
  html .erp-appbar { position: static; gap: 8px; }
  html .erp-appbar-right { display: none; }
  html .erp-appbar-name span { max-width: 38vw; overflow: hidden; text-overflow: ellipsis; }
  html .head h1, html .erp-cp h1 { font-size: 26px; line-height: 1.15; }
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px !important; }
  .btn, button.btn { min-height: 40px; }
  .login { min-height: 100dvh; }
}
@media (max-width: 860px) and (prefers-color-scheme: dark) {
  html body { --m-bg: #000000; --m-group: #1c1c1e; --m-sep: rgba(84, 84, 88, .55); --m-ink: #f5f5f7; --m-ink-3: rgba(235, 235, 245, .6); --m-accent: #0a84ff; --m-bar: rgba(22, 22, 24, .82); }
  .mbar-brand img.logo-light { display: none; }
  .mbar-brand img.logo-dark { display: block; }
  html .shell .side .nav a::after { border-color: rgba(235, 235, 245, .3); }
  html .shell .side .nav a.on { background: rgba(10, 132, 255, .18); }
}
@media (max-width: 640px) {
  .tbl-wrap:has(> table.tbl-cards) { overflow: visible; background: none; border: 0; border-radius: 0; box-shadow: none; }
  table.tbl-cards, table.tbl-cards tbody, table.tbl-cards tfoot { display: block; width: 100%; }
  table.tbl-cards thead { display: none; }
  table.tbl-cards tr { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin: 0 0 10px; }
  table.tbl-cards tr.tc-full td { display: block; text-align: left; }
  table.tbl-cards td { padding: 4px 0; border: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; display: flow-root; }
  table.tbl-cards td::before { content: attr(data-label); float: left; max-width: 42%; margin-right: 14px; color: var(--ink-3); font-size: 12.5px; font-weight: 400; text-align: left; }
  table.tbl-cards td.tc-nolabel::before, table.tbl-cards tr.tc-full td::before { content: none; }
  table.tbl-cards td:first-child { font-weight: 600; font-size: 15px; padding-bottom: 6px; margin-bottom: 4px; border-bottom: .5px solid var(--line); }
  table.tbl-cards td:empty { display: none; }
  table.tbl-cards td input, table.tbl-cards td select { min-width: 0; max-width: 60%; }
  table.tbl-cards tfoot tr { background: var(--surface-2); }
  table.tbl-cards tr[onclick], table.tbl-cards tr.click, table.tbl-cards tbody tr { cursor: pointer; }
}

/* Íconos en los botones (iconos.js, 23-nov-2026) */
.btn.has-ico { display: inline-flex; align-items: center; justify-content: center; gap: .45em; }
.vta-mi.has-ico { display: flex; align-items: center; gap: 10px; }
.b-ico { width: 1.15em; height: 1.15em; stroke-width: 2; }
.vta-mi .b-ico { width: 18px; height: 18px; opacity: .8; }
.btn.sm .b-ico { width: 1.05em; height: 1.05em; }

/* iPad y pantallas táctiles grandes (23-nov-2026). En vertical (≤ 860 px) se usa la versión de celular con barra inferior;
   en horizontal o en el iPad Pro, la de computadora con áreas táctiles más grandes y campos a 16 px (sin zoom al escribir). */
@media (min-width: 861px) and (pointer: coarse) {
  html .shell { grid-template-columns: 264px 1fr; }
  html .shell .side .nav a { min-height: 42px; padding: 0 10px; font-size: 15px; align-items: center; }
  html .shell .side .nav a .ux-ico { width: 28px; height: 28px; padding: 5px; }
  html .side .nav-group > summary, html .side .nav-label { padding-top: 14px; padding-bottom: 6px; font-size: 12.5px; }
  html .side .side-search, html .side select { min-height: 42px; font-size: 16px; }
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px !important; min-height: 40px; }
  .btn { min-height: 40px; padding-left: 16px; padding-right: 16px; }
  .btn.sm { min-height: 34px; }
  .erp-appbar { padding: 8px 12px; }
  .erp-appbar-menu a { padding: 10px 12px; }
  .vta-mi { padding: 11px 12px; font-size: 15px; }
  td, th { padding-top: 11px; padding-bottom: 11px; }
  .main { padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
  body { -webkit-tap-highlight-color: transparent; }
}
/* iPad en vertical: más aire que en el celular y el cajón del menú un poco más ancho. */
@media (min-width: 700px) and (max-width: 860px) {
  html .main { padding-left: 22px; padding-right: 22px; }
  html .shell .side, html body.side-min .shell .side { width: 380px; }
  html .tabbar { padding-left: max(60px, env(safe-area-inset-left)); padding-right: max(60px, env(safe-area-inset-right)); }
  .tb-item { flex-direction: row; gap: 8px; font-size: 13px; }
}

/* Menú plegado (solo íconos) con las secciones por dirección (23-nov-2026): el título de la sección se vuelve una raya. */
html body.side-min .side .nav-group > summary { font-size: 0 !important; padding: 8px 0 !important; height: 0; overflow: hidden; border-top: 1px solid var(--side-line); margin: 6px 8px; }
html body.side-min .side .nav-group:not([open]) > summary { height: auto; padding: 10px 0 !important; }
html body.side-min .side .nav-label { display: none; }

/* Organización del equipo en Usuarios (24-nov-2026) */
.team-org .team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
.team-org .team-block { border: 1px solid var(--line, #e5e5e5); border-radius: 12px; padding: 12px; }
.team-org .team-top { background: var(--soft, rgba(0,0,0,.025)); }
.team-org .team-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.team-org .team-list { display: flex; flex-wrap: wrap; gap: 6px; }
.team-org .team-chip { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; padding: 7px 10px; border-radius: 10px;
  border: 1px solid var(--line, #e5e5e5); background: var(--card, #fff); font: inherit; font-size: 13px; color: inherit; cursor: pointer; min-height: 44px; }
.team-org span.team-chip { cursor: default; }
.team-org button.team-chip:hover { border-color: currentColor; }
.team-org .team-chip .muted { font-size: 12px; }
@media (max-width: 640px) { .team-org .team-grid { grid-template-columns: 1fr; } .team-org .team-chip { flex: 1 1 100%; } }
.team-org .team-nofin { font-size: 11px; font-weight: 600; color: #8a5a00; background: rgba(255,170,0,.14); border-radius: 6px; padding: 1px 6px; margin-top: 2px; }
