/* =====================================================================
   CRM GARCHA · componentes propios del CRM (se carga después de app.css)
   ===================================================================== */
/* Tamaño base de cualquier icono; :where() no suma especificidad, así cada componente puede ajustarlo. */
:where(svg[aria-hidden="true"]) { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex: none; }
.barra .acciones-barra { display: flex; align-items: center; gap: 8px; }
.aviso-reinicio { display: flex; gap: 10px; align-items: center; padding: 10px 24px; background: var(--warn-soft); color: var(--warn-ink); border-bottom: 1px solid #f3d58a; font-size: 13.5px; font-weight: 600; }
.aviso-reinicio svg { width: 18px; height: 18px; flex: none; }
/* En pantallas chicas las columnas pueden encoger por debajo de su contenido (evita que la página se desborde). */
@media (max-width: 1000px) { .rejilla.k3, .rejilla.k2, .rejilla.k21, .rejilla.k12 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .form.dos { grid-template-columns: minmax(0, 1fr); } }

/* Búsqueda global */
.buscador { position: relative; width: min(420px, 38vw); }
.buscador input { padding-left: 36px; background: var(--steel-50); }
.buscador > svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--tx-mute); pointer-events: none; }
.resultados {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-lg); max-height: 70vh; overflow-y: auto; z-index: 60; padding: 6px 0; min-width: 340px;
}
.resultados .grupo-res { font-family: var(--f-display); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--tx-mute); padding: 8px 14px 4px; }
.resultados a { display: flex; gap: 10px; align-items: baseline; padding: 7px 14px; color: var(--tx); text-decoration: none; }
.resultados a:hover, .resultados a.activo { background: var(--brand-soft); text-decoration: none; }
.resultados a .sec { color: var(--tx-mute); font-size: 12px; margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.resultados .nada { padding: 14px; color: var(--tx-mute); font-size: 13px; }
@media (max-width: 960px) { .buscador { width: auto; flex: 1; } .barra h1 { display: none; } }

/* Autocompletar (cuentas, productos) */
.auto { position: relative; }
.auto-lista {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; min-width: 320px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--sh-md); z-index: 120; max-height: 320px; overflow-y: auto;
}
.auto-lista button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 12px; cursor: pointer; font-size: 13px; line-height: 1.3; }
.auto-lista button:hover, .auto-lista button.activo { background: var(--brand-soft); }
.auto-lista button small { display: block; color: var(--tx-mute); font-size: 11.5px; }
.auto-lista .nada { padding: 10px 12px; color: var(--tx-mute); font-size: 13px; }
.seleccionado { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 11px; border: 1px solid var(--steel-200); border-radius: var(--r); background: var(--steel-50); font-weight: 600; min-width: 0; }
.seleccionado span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seleccionado > svg { width: 16px; height: 16px; color: var(--tx-mute); }

/* Ficha de cuenta */
.ficha-cab { display: flex; gap: 18px; align-items: flex-start; padding: 20px; flex-wrap: wrap; }
.ficha-cab .avatar { width: 58px; height: 58px; border-radius: var(--r-lg); background: var(--steel-900); color: var(--brand); display: flex; align-items: center; justify-content: center; font-family: var(--f-display); font-weight: 700; font-size: 22px; flex: none; }
.ficha-cab .titulo { flex: 1; min-width: 240px; }
.ficha-cab h2 { font-family: var(--f-display); font-size: 28px; font-weight: 700; letter-spacing: .01em; text-transform: uppercase; line-height: 1.05; }
.ficha-cab .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ficha-cab .meta { display: flex; gap: 4px 18px; flex-wrap: wrap; color: var(--tx-soft); font-size: 13px; margin-top: 8px; }
.ficha-cab .meta b { color: var(--tx); font-weight: 600; }
.ficha-cab .meta svg { width: 14px; height: 14px; vertical-align: -2px; }
.ficha-cab .botones { display: flex; gap: 8px; flex-wrap: wrap; }
.datos-ficha { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 22px; font-size: 13.5px; }
.datos-ficha div span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--tx-mute); margin-bottom: 2px; }
.datos-ficha div b { font-weight: 500; overflow-wrap: anywhere; white-space: pre-line; }
.contacto-tarjeta { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.contacto-tarjeta .nom { font-weight: 700; font-size: 14px; }
.contacto-tarjeta .acc { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.contactos-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }

/* Línea de tiempo de actividades */
.linea-tiempo { display: flex; flex-direction: column; }
.evento { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--steel-100); align-items: start; }
.evento:last-child { border-bottom: 0; }
.evento .ico-ev { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--steel-100); color: var(--steel-600); }
.evento .ico-ev svg { width: 17px; height: 17px; }
.evento.planeada .ico-ev { background: var(--brand-soft); color: var(--brand-ink); }
.evento.vencida .ico-ev { background: var(--crit-soft); color: var(--crit-ink); }
.evento.cancelada { opacity: .6; }
.evento .tit { font-weight: 600; }
.evento .det { color: var(--tx-soft); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 2px; }
.evento .txt { font-size: 13px; margin-top: 6px; white-space: pre-line; color: var(--tx); }
.evento .txt.res { border-left: 3px solid var(--ok); padding-left: 8px; }
.evento .acc { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .evento { grid-template-columns: 34px 1fr; } .evento .acc { grid-column: 2; justify-content: flex-start; } }

/* Tablero de oportunidades (kanban) */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.columna { background: var(--steel-100); border-radius: var(--r-lg); display: flex; flex-direction: column; min-height: 200px; max-height: calc(100vh - 250px); }
.columna .cab-col { padding: 12px 14px 10px; border-bottom: 1px solid var(--steel-200); }
.columna .cab-col h3 { font-family: var(--f-display); font-size: 17px; text-transform: uppercase; letter-spacing: .04em; display: flex; justify-content: space-between; gap: 8px; }
.columna .cab-col .suma { font-size: 12.5px; color: var(--tx-soft); margin-top: 2px; }
.columna .cuerpo-col { padding: 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1; }
.columna.encima { outline: 2px dashed var(--brand); outline-offset: -4px; background: #fffbe6; }
.tarjeta-opp { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; cursor: grab; box-shadow: var(--sh-sm); display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.tarjeta-opp:hover { border-color: var(--steel-400); }
.tarjeta-opp.arrastrando { opacity: .4; }
.tarjeta-opp .nom { font-weight: 600; line-height: 1.25; }
.tarjeta-opp .cta { color: var(--tx-soft); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tarjeta-opp .pie { display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.tarjeta-opp .imp { font-weight: 700; font-variant-numeric: tabular-nums; }
.columna .mas-col { text-align: center; font-size: 12.5px; color: var(--tx-soft); padding: 4px; }

/* Agenda */
.agenda-dia { font-family: var(--f-display); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--tx-soft); padding: 10px 18px 6px; background: var(--steel-50); border-bottom: 1px solid var(--line); }
.agenda-dia.rojo { color: var(--crit-ink); }

/* Editor de cotización */
.cot-cab { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cot-cab .dos { grid-column: span 2; }
.cot-cab .cuatro { grid-column: 1 / -1; }
@media (max-width: 1000px) { .cot-cab { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .cot-cab { grid-template-columns: minmax(0, 1fr); }
  .cot-cab .dos { grid-column: auto; }
}
table.partidas { width: 100%; border-collapse: collapse; font-size: 13px; }
.partidas th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--tx-soft); padding: 8px 6px; border-bottom: 1px solid var(--line); background: var(--steel-50); white-space: nowrap; }
.partidas td { padding: 6px; border-bottom: 1px solid var(--steel-100); vertical-align: top; }
.partidas input, .partidas select { height: 34px; font-size: 13px; padding: 0 8px; }
.partidas textarea { font-size: 13px; padding: 6px 8px; min-height: 34px; }
.partidas .n { width: 30px; color: var(--tx-mute); text-align: center; padding-top: 14px; }
.partidas .c-cant { width: 86px; }
.partidas .c-uni { width: 92px; }
.partidas .c-pre { width: 116px; }
.partidas .c-desc { width: 74px; }
.partidas .c-iva { width: 78px; }
.partidas .c-imp { width: 120px; text-align: right; font-weight: 600; padding-top: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.partidas .c-acc { width: 100px; white-space: nowrap; padding-top: 8px; }
.partidas td.c-imp { padding-right: 10px; }
.partidas .pista { font-size: 11.5px; color: var(--tx-mute); margin-top: 3px; }
.partidas .pista button { border: 0; background: none; padding: 0; color: var(--info-ink); cursor: pointer; font-size: 11.5px; }
.tabla-partidas { overflow-x: auto; }
.tabla-partidas table { min-width: 860px; }
.cot-pie { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
@media (max-width: 900px) { .cot-pie { grid-template-columns: minmax(0, 1fr); } }
.totales { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; font-size: 14px; padding: 16px 18px; }
.totales .num { font-weight: 600; }
.totales .tot { font-size: 20px; font-weight: 700; border-top: 2px solid var(--ink); padding-top: 8px; }
.barra-fija { position: sticky; bottom: 0; background: rgba(244, 246, 248, .96); backdrop-filter: blur(4px); border-top: 1px solid var(--line); padding: 12px 0; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; z-index: 20; margin-top: 18px; }
.barra-fija .izq { margin-right: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (max-width: 600px) { .barra-fija .izq { display: none; } .barra-fija .btn { flex: 1 1 auto; } }

/* Alertas: campana con contador, contador en el menú y barra de cobertura */
.campana { position: relative; }
.campana .globo, .lateral nav a .globo {
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--crit); color: #fff;
  font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.campana .globo { position: absolute; top: -5px; right: -5px; border: 2px solid #fff; }
.lateral nav a .globo { margin-left: auto; }
.globo.oculto { display: none; }
.cobertura { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cobertura .pista { flex: 1 1 220px; height: 12px; border-radius: 6px; background: var(--steel-100); overflow: hidden; }
.cobertura .relleno { height: 100%; border-radius: 6px; }
.cobertura .cifra { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mini-barra { display: inline-flex; align-items: center; gap: 8px; min-width: 150px; }
.mini-barra .pista { flex: 1; height: 8px; border-radius: 4px; background: var(--steel-100); overflow: hidden; }
.mini-barra .pista, .mini-barra .relleno { display: block; }
.mini-barra .relleno { height: 100%; }
.acciones-rapidas { display: flex; gap: 4px; flex-wrap: nowrap; justify-content: flex-end; align-items: center; }
.resumen-dia { display: grid; gap: 10px; }
.resumen-dia a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); color: var(--tx); text-decoration: none; }
.resumen-dia a:hover { border-color: var(--steel-400); background: var(--steel-50); text-decoration: none; }
.resumen-dia a b { font-size: 22px; min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.resumen-dia a svg { width: 22px; height: 22px; color: var(--steel-600); }

/* Requerimientos: tarjetas con semáforo, conversación y panel de integraciones */
.req-lista { display: flex; flex-direction: column; gap: 10px; }
.req { display: grid; grid-template-columns: 6px 40px minmax(0, 1fr) auto; gap: 0 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); overflow: hidden; }
.req .barra-sem { background: var(--ok); }
.req.riesgo .barra-sem { background: var(--warn); }
.req.vencido .barra-sem { background: var(--crit); }
.req.cerrado .barra-sem { background: var(--steel-200); }
.req .ico-canal { align-self: start; margin-top: 14px; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--steel-100); color: var(--steel-700); }
.req .ico-canal svg { width: 19px; height: 19px; }
.req .ico-canal.whatsapp { background: #e3f7e9; color: #128c4b; }
.req .ico-canal.correo { background: var(--info-soft); color: var(--info-ink); }
.req .centro { padding: 12px 0; min-width: 0; }
.req .quien { font-weight: 700; font-size: 14.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.req .quien a { color: inherit; }
.req .texto-req { color: var(--tx); font-size: 13.5px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.req .meta-req { display: flex; gap: 4px 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--tx-soft); margin-top: 6px; align-items: center; }
.req .lado-der { padding: 12px 14px 12px 0; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; justify-content: center; }
.req .lado-der .acciones-rapidas { flex-wrap: wrap; }
@media (max-width: 760px) { .req { grid-template-columns: 6px 36px minmax(0, 1fr); } .req .lado-der { grid-column: 2 / -1; align-items: flex-start; padding: 0 14px 12px 0; } }
.conversacion { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; background: var(--steel-50); }
.burbuja { background: #fff; border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: 10px 14px; max-width: 760px; box-shadow: var(--sh-sm); }
.burbuja .cab-burbuja { font-size: 12px; color: var(--tx-mute); margin-bottom: 4px; display: flex; gap: 10px; flex-wrap: wrap; }
.burbuja .cuerpo-burbuja { white-space: pre-line; font-size: 13.5px; overflow-wrap: anywhere; }
.burbuja.whatsapp { border-color: #c5ead2; background: #f4fbf6; }
.reloj-grande { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--r-lg); background: var(--ok-soft); color: var(--ok-ink); }
.reloj-grande.riesgo { background: var(--warn-soft); color: var(--warn-ink); }
.reloj-grande.vencido { background: var(--crit-soft); color: var(--crit-ink); }
.reloj-grande.cerrado { background: var(--steel-100); color: var(--tx-soft); }
.reloj-grande svg { width: 28px; height: 28px; }
.reloj-grande b { font-size: 24px; display: block; line-height: 1.1; }
.integracion { border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
.integracion > .cab { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.integracion > .cab h2 { font-family: var(--f-display); font-size: 18px; text-transform: uppercase; letter-spacing: .03em; flex: 1; }
.integracion > .cab svg { width: 22px; height: 22px; }
.integracion > .cuerpo { padding: 18px; }
.copiable { display: flex; gap: 6px; }
.copiable input { font-family: var(--f-mono); font-size: 12.5px; background: var(--steel-50); }
.pasos { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13.5px; }

/* Calendario de actividades */
.cal-barra { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-nav { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.cal-nav h2 { font-family: var(--f-display); font-size: 24px; text-transform: uppercase; letter-spacing: .03em; margin-left: 8px; white-space: nowrap; }
.cal-leyenda { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cal-persona { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 18px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; color: var(--tx-soft); }
.cal-persona:hover { border-color: var(--steel-400); }
.cal-persona i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.cal-persona b { color: var(--tx); font-weight: 600; }
.cal-persona .venc { color: var(--crit-ink); font-weight: 600; }
.cal-mes { overflow: hidden; }
.cal-cab, .cal-rejilla { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-cab div { padding: 8px 10px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--tx-soft); background: var(--steel-50); border-bottom: 1px solid var(--line); }
.cal-dia { min-height: 118px; padding: 6px; border-right: 1px solid var(--steel-100); border-bottom: 1px solid var(--steel-100); display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; }
.cal-dia:nth-child(7n) { border-right: 0; }
.cal-dia:hover { background: #fafbfc; }
.cal-dia.fuera { background: var(--steel-50); }
.cal-dia.fuera .num { color: var(--tx-mute); }
.cal-dia .num { font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; padding: 0 2px 2px; }
.cal-dia .cuantas { font-size: 11px; color: var(--tx-mute); font-weight: 500; }
.cal-dia.hoy .num > :first-child, .cal-dia.hoy .num { color: var(--tx); }
.cal-dia.hoy { box-shadow: inset 0 3px 0 var(--brand); background: #fffdf2; }
.cal-dia .mas { font-size: 11.5px; color: var(--info-ink); font-weight: 600; padding: 0 4px; }
.cal-ev {
  display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0; text-align: left; border: 0; cursor: pointer;
  background: #fff; border-left: 4px solid var(--color); border-radius: 3px; padding: 2px 5px; font-size: 11.5px; line-height: 1.35;
  box-shadow: 0 0 0 1px var(--steel-100);
}
.cal-ev:hover { box-shadow: 0 0 0 1px var(--steel-400); }
.cal-ev svg { width: 12px; height: 12px; flex: none; color: var(--tx-soft); }
.cal-ev .ini { font-size: 9.5px; font-weight: 700; color: var(--tx-soft); background: var(--steel-100); border-radius: 3px; padding: 0 3px; flex: none; }
.cal-ev .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tx); }
.cal-ev.hecha { background: var(--steel-50); }
.cal-ev.hecha .txt { color: var(--tx-soft); }
.cal-ev.hecha svg { color: var(--ok); }
.cal-ev.vencida .txt, .cal-ev.vencida svg { color: var(--crit-ink); }
.cal-semana { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: start; }
.cal-col { background: var(--steel-100); border-radius: var(--r-lg); min-width: 0; }
.cal-col.hoy { box-shadow: inset 0 3px 0 var(--brand); background: #fff8d9; }
.cal-col-cab { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--steel-200); }
.cal-col-cab span { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--tx-soft); font-weight: 600; }
.cal-col-cab b { font-size: 18px; flex: 1; }
.cal-col-cuerpo { padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 120px; }
.cal-col .cal-ev { flex-wrap: wrap; padding: 6px 8px; font-size: 12.5px; align-items: flex-start; }
.cal-col .cal-ev .txt { white-space: normal; }
.cal-col .cal-ev .sub { width: 100%; padding-left: 0; color: var(--tx-mute); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-col .vacio-dia { text-align: center; color: var(--tx-mute); padding: 18px 0; }
@media (max-width: 1100px) { .cal-semana { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .cal-semana { grid-template-columns: minmax(0, 1fr); }
  .cal-dia { min-height: 64px; padding: 4px; }
  .cal-dia .cal-ev { padding: 0; height: 6px; border-left-width: 0; background: var(--color); box-shadow: none; }
  .cal-dia .cal-ev > * { display: none; }
  .cal-barra { flex-direction: column; align-items: stretch; gap: 6px; }
  .cal-nav h2 { font-size: 19px; }
  .cal-persona { text-align: left; flex-wrap: wrap; row-gap: 2px; }
}

/* Selección masiva */
.barra-masiva { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; background: var(--brand-soft); border-bottom: 1px solid var(--line); font-size: 13px; }
.barra-masiva select, .barra-masiva input { width: auto; height: 32px; }

/* ============================ COTIZACIÓN IMPRIMIBLE (formato Grupo Garcha) ============================ */
.doc-cot { --navy: #1C2738; background: #fff; max-width: 1040px; margin: 0 auto; border: 1px solid var(--line); box-shadow: var(--sh-sm); font-size: 12px; color: #1d232b; }
.doc-cot .franja { height: 10px; background: var(--navy); }
.doc-cot .enc { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding: 22px 30px 16px; border-bottom: 4px solid var(--brand); }
.doc-cot .enc img { height: 64px; width: auto; }
.doc-cot .enc h1 { font-family: var(--f-body); font-size: 26px; font-weight: 700; color: var(--navy); letter-spacing: .01em; margin-bottom: 8px; }
.doc-cot .enc dl { display: grid; grid-template-columns: auto auto; gap: 3px 22px; margin: 0; font-size: 11.5px; }
.doc-cot .enc dt { font-size: 9.5px; font-weight: 700; color: #6b7684; text-transform: uppercase; letter-spacing: .05em; padding-top: 2px; }
.doc-cot .enc dd { margin: 0; font-weight: 600; }
.doc-cot .partes { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; padding: 16px 30px; border-bottom: 1px solid #e3e6ea; }
.doc-cot .partes .etq { font-size: 9.5px; font-weight: 700; color: #6b7684; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.doc-cot .partes .nom { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.doc-cot .partes div { line-height: 1.45; }
.doc-cot .asunto { padding: 12px 30px 0; font-size: 12.5px; }
.doc-cot table { width: calc(100% - 60px); margin: 14px 30px 0; border-collapse: collapse; }
.doc-cot thead th { background: var(--navy); color: #fff; font-size: 10.5px; font-weight: 700; padding: 9px 8px; text-align: left; }
.doc-cot thead th.der, .doc-cot td.der { text-align: right; }
.doc-cot thead th.cen, .doc-cot td.cen { text-align: center; }
.doc-cot tbody td { padding: 8px; border-bottom: 1px solid #e3e6ea; vertical-align: top; font-variant-numeric: tabular-nums; }
.doc-cot tbody tr:nth-child(even) td { background: #f7f8fa; }
.doc-cot tbody td .com { color: #6b7684; font-size: 10.5px; margin-top: 2px; white-space: pre-line; }
.doc-cot tbody td.fuerte { font-weight: 700; }
.doc-cot tr { break-inside: avoid; page-break-inside: avoid; }
.doc-cot .cierre { display: grid; grid-template-columns: 1fr 360px; gap: 30px; padding: 18px 30px 6px; align-items: start; break-inside: avoid; }
.doc-cot .cierre h3 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.doc-cot .cierre ul { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 5px; }
.doc-cot .cierre li { display: flex; gap: 8px; line-height: 1.4; }
.doc-cot .cierre li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-600); flex: none; margin-top: 5px; }
.doc-cot .cierre .obs { white-space: pre-line; margin-bottom: 14px; line-height: 1.45; }
.doc-cot .caja-tot { display: grid; grid-template-columns: 1fr auto; font-size: 12px; }
.doc-cot .caja-tot > div { padding: 6px 12px; border-bottom: 1px solid #e3e6ea; }
.doc-cot .caja-tot .e { text-align: right; font-weight: 700; }
.doc-cot .caja-tot .v { text-align: right; font-variant-numeric: tabular-nums; min-width: 130px; }
.doc-cot .caja-tot .total { background: var(--navy); color: #fff; font-size: 15px; font-weight: 700; border-bottom: 4px solid var(--brand); padding: 10px 12px; }
.doc-cot .caja-tot .tc { grid-column: 1 / -1; text-align: right; font-size: 10.5px; color: #6b7684; border: 0; }
.doc-cot .gracias { padding: 14px 30px 0; font-style: italic; color: #6b7684; font-size: 11.5px; }
.doc-cot .firma { padding: 34px 30px 18px 60px; break-inside: avoid; }
.doc-cot .firma .linea { width: 300px; border-top: 1px solid #1d232b; margin-bottom: 8px; }
.doc-cot .firma b { display: block; font-size: 12.5px; }
.doc-cot .firma .contacto { color: #2a5db0; }
.doc-cot .pie-doc { background: var(--navy); color: #fff; font-size: 10px; font-weight: 700; padding: 9px 30px; letter-spacing: .02em; }
@media (max-width: 760px) { .doc-cot .partes, .doc-cot .cierre { grid-template-columns: 1fr; } .doc-cot .enc { flex-direction: column; } .doc-cot table { font-size: 11px; } }

/* ---------- Matriz de productos ---------- */
/* Celda: símbolo + color (el símbolo hace que no dependa solo del color). */
.mx-cel {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 5px;
  font-size: 13px; font-weight: 700; line-height: 1; border: 1px solid transparent; padding: 0; font-family: var(--f-body);
}
button.mx-cel { cursor: pointer; transition: transform .1s var(--ease), box-shadow .1s var(--ease); }
button.mx-cel:hover, button.mx-cel:focus-visible { transform: scale(1.15); box-shadow: 0 0 0 2px var(--steel-950); outline: none; }
.mx-cel.vendido { background: var(--ok); color: #fff; }
.mx-cel.oportunidad { background: var(--crit-soft); color: var(--crit-ink); border-color: var(--crit); }
.mx-cel.inactivo { background: var(--warn-soft); color: var(--warn-ink); border-color: var(--warn); }
.mx-cel.cotizado { background: var(--info-soft); color: var(--info-ink); border-color: #9cc0ea; }
.mx-cel.sin { background: var(--surface); border: 1px dashed var(--steel-300); }
.mx-cel.no_usa { background: var(--steel-100); color: var(--tx-mute); }
.mx-cel.en_proceso { background: var(--brand); color: var(--on-brand); font-size: 15px; }
.mx-cel.perdida { background: var(--surface); color: var(--crit-ink); border-color: var(--crit); border-style: dashed; }

/* Oportunidad de una línea: fase + importe. */
.mx-opp { display: inline-flex; align-items: center; gap: 6px; color: inherit; white-space: nowrap; }
.mx-opp:hover { text-decoration: none; }
.mx-opp:hover .chip { box-shadow: 0 0 0 1px currentColor; }
.mx-opp .num { font-size: 12.5px; font-weight: 600; }
.btn.mx-btn-crear { color: var(--crit-ink); border-color: var(--crit); background: var(--crit-soft); }
.mx-opp-linea { font-size: 11px; font-weight: 600; color: var(--info-ink); text-transform: uppercase; letter-spacing: .03em; }
.mx-aviso-lev { margin-bottom: 18px; align-items: center; }
.mx-aviso-lev > div { flex: 1; }

/* Levantamiento de productos: Sí / No / ? por línea. */
.mx-lev { max-height: 56vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--r); }
/* Anchos fijos: así el editor de productos (renglón de abajo de cada línea) usa todo el ancho sin desbordar. */
.mx-lev > .tabla { table-layout: fixed; }
.mx-lev > .tabla > thead th:nth-child(1) { width: 34%; }
.mx-lev > .tabla > thead th:nth-child(2) { width: 140px; }
.mx-lev .mx-lev-linea input { width: 100%; min-width: 0; }
.mx-lev .tabla td { padding: 6px 10px; }
.mx-lev .tabla td:first-child { min-width: 190px; }
.mx-lev .tabla td:first-child .chip { margin-top: 3px; height: 19px; font-size: 11px; }
.mx-seg { display: inline-flex; border: 1px solid var(--steel-300); border-radius: var(--r); overflow: hidden; }
.mx-seg button { border: 0; background: var(--surface); padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; color: var(--tx-soft); cursor: pointer; min-width: 40px; }
.mx-seg button + button { border-left: 1px solid var(--steel-300); }
.mx-seg button:hover { background: var(--steel-50); color: var(--tx); }
.mx-seg button.activo { background: var(--steel-700); color: #fff; }
.mx-seg button.activo.si { background: var(--ok); }
.mx-seg button.activo.no { background: var(--steel-400); }
.mx-crear { justify-content: center; font-size: 13px; }
.mx-lev-pie { display: flex; gap: 6px 20px; flex-wrap: wrap; font-size: 13px; color: var(--tx-soft); }
.mx-chip-btn { border: 0; cursor: pointer; font-family: inherit; }

/* Productos que usa el cliente: lista compacta en tablas y editor (levantamiento y ventana de la línea). */
.mx-usa { font-size: 12.5px; line-height: 1.45; max-width: 250px; }
.mx-usa > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-usa-ok { color: var(--ok-ink); font-weight: 700; }
.mx-editor { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
/* Cada producto: renglón 1 = producto, marca y quitar; renglón 2 = consumo, precio, proveedor y valor. */
.mx-ed-item {
  display: grid; gap: 6px 10px; padding: 10px 10px 8px; border-bottom: 1px solid var(--steel-100); align-items: start;
  grid-template-columns: 170px 120px minmax(0, 1fr) 100px 32px;
  grid-template-areas: "prod prod prod marca quitar" "cant precio prov valor quitar" "ct ct ct proy proy";
}
/* Contratipo: nuestro producto equivalente al que usa el cliente, con el precio que le daríamos. */
.mx-ed-ct { grid-area: ct; min-width: 0; background: var(--steel-50); border-radius: var(--r); padding: 6px 8px; }
.mx-ed-ct.es-nuestro .mx-ed-campo { display: none; }
.mx-ed-proy { grid-area: proy; align-self: center; text-align: right; }
.mx-ct-info { font-size: 12px; color: var(--tx-soft); margin-top: 4px; display: flex; gap: 6px 10px; align-items: center; flex-wrap: wrap; min-height: 16px; }
.mx-ct-info .btn.chico { height: 24px; padding: 0 8px; font-size: 12px; }
.mx-ct-ok { color: var(--ok-ink); font-weight: 600; }
.mx-ct-ok svg { width: 12px; height: 12px; vertical-align: -2px; }
.mx-ct-falta { color: var(--warn-ink); font-weight: 600; }
.mx-ct-precio { color: var(--info-ink); font-weight: 600; }
.mx-ct-usa { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; background: var(--steel-50); border-radius: var(--r); padding: 10px 12px; }
.mx-ct-usa span { display: block; font-size: 11px; color: var(--tx-mute); text-transform: uppercase; letter-spacing: .04em; }
.mx-ct-usa b { font-size: 13.5px; overflow-wrap: anywhere; }
.mx-ct-opciones { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.mx-ct-op { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 7px 10px; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 2px; }
.mx-ct-op:hover { border-color: var(--brand); background: var(--brand-soft); }
.mx-ct-op b { font-size: 12.5px; }
.mx-ct-op small { font-size: 11.5px; color: var(--tx-mute); }
/* Vista por producto de la cuenta */
.mx-vistas { display: inline-flex; gap: 4px; padding-right: 8px; margin-right: 4px; border-right: 1px solid var(--line); }
.mx-prod b { display: block; }
.mx-marca { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--steel-700); background: var(--steel-100); border-radius: 3px; padding: 0 6px; }
.mx-oferta { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; max-width: 340px; }
.mx-oferta .chico { color: var(--tx-soft); }
.tabla tr.mx-fila-sin-ct td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.tabla tr.mx-fila-ok td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.mx-acciones { display: flex; gap: 6px; flex-wrap: wrap; }
/* Proyecto de un producto: usa hoy → le ofrecemos */
.mx-vs { display: grid; grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr); gap: 10px; align-items: stretch; }
.mx-vs-lado { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; }
.mx-vs-lado:last-child { border-color: var(--brand); background: #fffdf2; }
.mx-vs-tit { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--tx-mute); font-weight: 700; margin-bottom: 4px; }
.mx-vs-nombre { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.mx-vs-datos { display: grid; gap: 4px; margin-top: 8px; font-size: 13px; }
.mx-vs-datos span { color: var(--tx-mute); margin-right: 6px; }
.mx-vs-flecha { display: flex; align-items: center; justify-content: center; color: var(--steel-400); }
.mx-vs-acciones { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
@media (max-width: 700px) { .mx-vs { grid-template-columns: minmax(0, 1fr); } .mx-vs-flecha { transform: rotate(90deg); } .mx-ct-usa { grid-template-columns: 1fr 1fr; } }
.mx-ed-prod { grid-area: prod; min-width: 0; }
.mx-ed-marca { grid-area: marca; }
.mx-ed-quitar { grid-area: quitar; padding-top: 18px; }
.mx-ed-cant { grid-area: cant; }
.mx-ed-precio { grid-area: precio; }
.mx-ed-prov { grid-area: prov; min-width: 0; }
.mx-ed-valor { grid-area: valor; text-align: right; font-size: 13px; }
.mx-ed-valor span, .mx-ed-campo > span { display: block; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--tx-mute); margin-bottom: 3px; }
.mx-ed-valor b { display: block; padding-top: 6px; }
.mx-ed-campo { display: block; margin: 0; }
.mx-ed-item > * { min-width: 0; }
.mx-ed-item input, .mx-ed-item select { height: 32px; padding: 4px 8px; font-size: 13px; width: 100%; min-width: 0; }
.mx-ed-cu { display: flex; gap: 4px; }
.mx-ed-cu input { width: 72px; flex: none; }
.mx-ed-cu select { flex: 1; min-width: 0; padding-right: 2px; }
.mx-pista { font-size: 11.5px; color: var(--tx-mute); margin-top: 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-height: 16px; }
.mx-pista svg { width: 12px; height: 12px; vertical-align: -2px; }
.mx-pista .chip { height: 18px; font-size: 11px; }
.mx-ed-vacia { color: var(--tx-mute); font-size: 12.5px; padding: 12px; }
@media (max-width: 700px) {
  .mx-ed-item { grid-template-columns: 1fr 1fr 32px; grid-template-areas: "prod prod quitar" "marca cant cant" "precio prov prov" "valor valor valor" "ct ct ct" "proy proy proy"; }
}
.mx-ed-pie { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 8px 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--tx-soft); flex-wrap: wrap; }
.mx-lev-prod > td { background: var(--steel-50); padding: 4px 10px 12px 28px !important; }
.mx-lev-linea td { border-bottom: 0; }
.mx-link-lev { border: 0; background: none; color: var(--tx-mute); cursor: pointer; font: inherit; padding: 2px 6px; }
.mx-link-lev:hover { color: var(--tx); text-decoration: underline; }

.mx-leyenda { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 12.5px; color: var(--tx-soft); margin-top: 12px; }
.mx-leyenda > span { display: inline-flex; align-items: center; gap: 6px; }
.mx-leyenda .mx-cel { width: 20px; height: 20px; font-size: 11px; }

.mx-filtros { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mx-num { margin-left: 6px; font-size: 11px; opacity: .75; font-weight: 700; }
.mx-uso { min-width: 118px; padding: 4px 6px; font-size: 13px; }
.mx-situacion { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.mx-sub { font-family: var(--f-display); text-transform: uppercase; font-size: 16px; margin: 4px 0 -6px; letter-spacing: .02em; }

/* Matriz de la cartera: encabezado y primera columna fijos al desplazarse. */
.mx-wrap { overflow: auto; max-height: calc(100vh - 230px); min-height: 240px; }
.mx-tabla { font-size: 13px; width: auto; min-width: 100%; }
.mx-tabla th, .mx-tabla td { white-space: nowrap; }
.mx-tabla thead th { z-index: 2; vertical-align: bottom; }
.mx-tabla .mx-cuenta { position: sticky; left: 0; background: var(--surface); z-index: 1; width: 250px; min-width: 250px; max-width: 250px; box-shadow: 1px 0 0 var(--line); padding-top: 6px; padding-bottom: 6px; }
.mx-tabla td.mx-cuenta > * { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-tabla thead .mx-cuenta { background: var(--steel-50); z-index: 3; }
.mx-tabla tfoot .mx-cuenta { background: var(--steel-50); }
.mx-tabla .mx-dato { padding-left: 10px; padding-right: 10px; }
.mx-tabla th.mx-col { padding: 6px 2px; text-align: center; width: 34px; min-width: 34px; }
.mx-col-btn {
  writing-mode: vertical-rl; transform: rotate(180deg); background: none; border: 0; cursor: pointer; padding: 4px 2px;
  font: inherit; color: inherit; text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; max-height: 130px; border-radius: 3px;
}
.mx-col-btn:hover { color: var(--tx); background: var(--steel-100); }
.mx-tabla td.mx-td { padding: 4px 3px; text-align: center; }
.mx-tabla .enfocada { background: var(--brand-soft) !important; }
.mx-tabla th.enfocada .mx-col-btn { color: var(--tx); }
.mx-tabla tbody tr:hover td.mx-cuenta { background: #fafbfc; }
.mx-tabla tfoot td { position: sticky; bottom: 0; z-index: 1; }
.mx-tabla tfoot .mx-cuenta { z-index: 2; }
.mx-tabla td.mx-pen { font-size: 11.5px; font-weight: 700; color: var(--tx-soft); padding: 8px 2px; }
.mx-cob { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--tx-soft); }
.barra-cob { width: 40px; height: 6px; border-radius: 3px; background: var(--steel-100); overflow: hidden; }
.barra-cob i { display: block; height: 100%; background: var(--ok); }

/* ---------- Pipeline: resumen arriba del tablero ---------- */
.pp-resumen { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.pp-dato { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); color: inherit; }
.pp-dato span { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--tx-soft); }
.pp-dato b { font-size: 24px; letter-spacing: -.01em; }
.pp-dato small { font-size: 12px; color: var(--tx-mute); }
.pp-dato.marca { border-top: 3px solid var(--brand); }
.pp-dato.aviso { background: var(--warn-soft); border-color: #f2d48a; }
.pp-dato.aviso b, .pp-dato.aviso span { color: var(--warn-ink); }
a.pp-dato:hover { text-decoration: none; box-shadow: var(--sh-sm); }

/* ---------- Mi tablero ---------- */
.mt-cab { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px 24px; flex-wrap: wrap; margin-bottom: 18px; }
.mt-cab h2 { margin: 0; font-family: var(--f-display); text-transform: uppercase; font-size: 30px; letter-spacing: .01em; line-height: 1.1; }
.mt-cab-der { display: flex; gap: 10px 14px; align-items: flex-end; flex-wrap: wrap; }
.mt-cab-der .campo { min-width: 210px; }
.mt-mes { display: flex; align-items: center; gap: 2px; height: 38px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 0 2px; }
.mt-mes b { min-width: 128px; text-align: center; font-size: 14px; text-transform: capitalize; }
.mt-rapidos { display: flex; gap: 8px; }
.mt-etq { font-size: 13px; font-weight: 600; color: var(--tx-soft); text-transform: uppercase; letter-spacing: .04em; }
.mt-sub { font-family: var(--f-display); text-transform: uppercase; font-size: 16px; margin: 20px 0 8px; letter-spacing: .02em; }
.txt-ok { color: var(--ok-ink); }
.txt-mal { color: var(--crit-ink); }
.mt-link { border: 0; background: none; padding: 0; color: var(--info-ink); cursor: pointer; font: inherit; }
.mt-link:hover { text-decoration: underline; }

/* 1. ¿Cómo voy? */
.mt-hero { display: grid; grid-template-columns: minmax(0, 1fr) 320px; border-top: 4px solid var(--brand); }
.mt-hero-main { padding: 22px 26px; display: flex; flex-direction: column; gap: 10px; }
.mt-hero-lado { padding: 22px 22px; border-left: 1px solid var(--line); background: var(--steel-50); display: flex; flex-direction: column; gap: 12px; }
.mt-grande { font-size: 52px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.mt-de { font-size: 22px; font-weight: 500; color: var(--tx-mute); letter-spacing: 0; }
.mt-barra { position: relative; height: 16px; border-radius: 8px; background: var(--steel-100); margin: 20px 0 4px; }
.mt-barra.chica { height: 9px; margin: 0 0 4px; }
.mt-barra-fill { height: 100%; border-radius: 8px; background: var(--steel-400); transition: width .4s var(--ease); min-width: 4px; }
.mt-barra-fill.ok { background: var(--ok); }
.mt-barra-fill.aviso { background: var(--warn); }
.mt-barra-fill.mal { background: var(--crit); }
.mt-barra-fill.neutro { background: var(--steel-400); }
.mt-barra-marca { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--steel-950); }
.mt-barra-marca span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--tx-soft); }
.mt-semaforo { font-size: 16px; font-weight: 650; padding: 8px 12px; border-radius: var(--r); }
.mt-semaforo.ok { background: var(--ok-soft); color: var(--ok-ink); }
.mt-semaforo.aviso { background: var(--warn-soft); color: var(--warn-ink); }
.mt-semaforo.mal { background: var(--crit-soft); color: var(--crit-ink); }
.mt-sinmeta { font-size: 13.5px; color: var(--tx-soft); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mt-frases { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.mt-pie-hero { display: flex; gap: 6px 22px; flex-wrap: wrap; font-size: 13px; color: var(--tx-soft); padding-top: 6px; border-top: 1px solid var(--steel-100); }
.mt-fila3 { display: grid; grid-template-columns: 34px 52px 1fr; align-items: center; gap: 8px; font-size: 13.5px; color: var(--tx-soft); }
.mt-fila3 b { font-size: 24px; color: var(--tx); text-align: right; }
.mt-fila3-ic { width: 34px; height: 34px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; }
.mt-fila3-ic svg { width: 17px; height: 17px; color: var(--steel-600); }
.mt-decada { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13.5px; }
.mt-diez { display: flex; gap: 4px; }
.mt-diez i { flex: 1; height: 22px; border-radius: 4px; background: var(--steel-200); }
.mt-diez i.si { background: var(--ok); }

/* 2. ¿Qué me toca hoy? */
.mt-todo { display: flex; flex-direction: column; }
.mt-item { display: grid; grid-template-columns: 44px 70px minmax(0, 1fr) 28px; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--steel-100); color: inherit; border-left: 5px solid transparent; }
.mt-item:last-child { border-bottom: 0; }
.mt-item:hover { background: #fafbfc; text-decoration: none; }
.mt-item:hover .mt-item-ir { transform: translateX(3px); color: var(--tx); }
.mt-item.rojo { border-left-color: var(--crit); }
.mt-item.amarillo { border-left-color: var(--warn); }
.mt-item.azul { border-left-color: #9cc0ea; }
.mt-item-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--steel-100); }
.mt-item.rojo .mt-item-ic { background: var(--crit-soft); color: var(--crit-ink); }
.mt-item.amarillo .mt-item-ic { background: var(--warn-soft); color: var(--warn-ink); }
.mt-item.azul .mt-item-ic { background: var(--info-soft); color: var(--info-ink); }
.mt-item-ic svg { width: 21px; height: 21px; }
.mt-item-n { font-size: 30px; font-weight: 700; text-align: right; letter-spacing: -.01em; }
.mt-item.rojo .mt-item-n { color: var(--crit-ink); }
.mt-item-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mt-item-txt b { font-size: 15.5px; }
.mt-item-txt span { font-size: 13px; color: var(--tx-soft); }
.mt-item-ir { color: var(--tx-mute); transition: transform .15s var(--ease); }
.mt-item-ir svg { width: 20px; height: 20px; }
.mt-aldia { display: flex; gap: 14px; align-items: center; padding: 22px; font-size: 15px; color: var(--ok-ink); background: var(--ok-soft); margin: 14px; border-radius: var(--r); }
.mt-aldia svg { width: 30px; height: 30px; flex: none; }

/* 3. Pipeline */
.mt-cab-pipe { display: flex; gap: 8px 20px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--tx-soft); margin-left: auto; }
.mt-cab-pipe b { color: var(--tx); font-size: 16px; }
.mt-embudo { display: flex; align-items: stretch; gap: 4px; flex-wrap: wrap; }
.mt-fase { flex: 1 1 130px; display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-radius: var(--r-lg); color: inherit; background: var(--steel-50); border: 1px solid var(--line); min-width: 130px; }
.mt-fase:hover { text-decoration: none; border-color: var(--steel-400); box-shadow: var(--sh-sm); }
.mt-fase b { font-size: 22px; letter-spacing: -.01em; }
.mt-fase-nom { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--tx-soft); display: flex; align-items: center; gap: 4px; }
.mt-fase-nom svg { width: 14px; height: 14px; }
.mt-fase-n { font-size: 12.5px; color: var(--tx-mute); }
.mt-fase.f0 { border-top: 4px solid #c9d6e3; }
.mt-fase.f1 { border-top: 4px solid #9cc0ea; }
.mt-fase.f2 { border-top: 4px solid #5d97d8; }
.mt-fase.f3 { border-top: 4px solid var(--brand); }
.mt-flecha { display: flex; align-items: center; color: var(--steel-300); }
.mt-flecha svg { width: 18px; height: 18px; }
.mt-cierres { display: flex; gap: 8px; flex: 1 1 280px; margin-left: 14px; }
.mt-fase.ganada { background: var(--ok-soft); border-color: #bfe5bf; }
.mt-fase.ganada .mt-fase-nom, .mt-fase.ganada b { color: var(--ok-ink); }
.mt-fase.perdida b { color: var(--tx-soft); }
.mt-nota { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 10px 12px; border-radius: var(--r); background: var(--warn-soft); color: var(--warn-ink); font-size: 13.5px; }
.mt-nota svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.mt-lista { display: flex; flex-direction: column; }
.mt-lista-fila { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 14px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--steel-100); color: inherit; }
.tarjeta > .mt-lista .mt-lista-fila { padding: 11px 20px; }
.mt-lista-fila:last-child { border-bottom: 0; }
.mt-lista-fila:hover { background: #fafbfc; text-decoration: none; }
.mt-lista-txt { display: flex; flex-direction: column; min-width: 0; }
.mt-lista-txt b, .mt-lista-txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-lista-txt span { font-size: 12.5px; color: var(--tx-mute); }
.mt-vacio { padding: 16px 4px; color: var(--tx-mute); font-size: 13.5px; }
.tarjeta > .mt-vacio { padding: 18px 20px; }
.mt-mini { width: 70px; height: 7px; border-radius: 4px; background: var(--steel-100); overflow: hidden; }
.mt-mini i { display: block; height: 100%; background: var(--ok); }
.mt-pie-tarjeta { padding: 12px 20px; border-top: 1px solid var(--line); font-size: 13px; }

/* Equipo */
.mt-equipo { display: flex; flex-direction: column; }
.mt-vend { display: grid; grid-template-columns: 180px minmax(200px, 1fr) 130px 130px 130px; gap: 16px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--steel-100); }
.mt-vend:last-child { border-bottom: 0; }
.mt-vend-nom { font-weight: 600; }
.mt-vend-barra { min-width: 0; }
.mt-vend-dato { display: flex; flex-direction: column; font-size: 13.5px; }
.mt-vend-dato span { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--tx-mute); }
.mt-metas { display: flex; flex-direction: column; gap: 8px; }
.mt-meta-fila { display: grid; grid-template-columns: 1fr 160px; gap: 12px; align-items: center; font-size: 14px; }
@media (max-width: 1100px) {
  .mt-hero { grid-template-columns: 1fr; }
  .mt-hero-lado { border-left: 0; border-top: 1px solid var(--line); }
  .mt-vend { grid-template-columns: 1fr 1fr; }
  .mt-cierres { margin-left: 0; }
}
@media (max-width: 640px) {
  .mt-grande { font-size: 40px; }
  .mt-item { grid-template-columns: 36px 52px minmax(0, 1fr); padding: 12px 14px; }
  .mt-item-ir { display: none; }
  .mt-flecha { display: none; }
  .mt-lista-fila { grid-template-columns: minmax(0, 1fr) auto; }
}

/* ============================ MENÚ: PROCESO DE VENTA ============================ */
.lateral nav a.paso .paso-n {
  position: relative; width: 20px; height: 20px; flex: none; border-radius: 50%; border: 2px solid #6f7e8f;
  color: #C9D3DD; font: 700 11px/16px var(--f-body); text-align: center;
}
/* Línea que une los pasos: se ve como un solo proceso. */
.lateral nav a.paso:has(+ a.paso) .paso-n::after {
  content: ''; position: absolute; left: 50%; top: 100%; width: 2px; height: 22px; margin-left: -1px; background: #3A4959;
}
.lateral nav a.paso:hover .paso-n { border-color: #fff; color: #fff; }
.lateral nav a.paso.activo .paso-n { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }

/* ============================ POST VENTA ============================ */
.pv-proceso { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; margin-bottom: 10px; }
.pv-flecha { display: flex; align-items: center; color: var(--steel-300); }
.pv-flecha svg { width: 18px; height: 18px; }
.pv-relacion { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.pv-kpi {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; min-width: 0; color: var(--tx);
  background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--steel-200); border-radius: var(--r-lg); box-shadow: var(--sh-sm);
}
a.pv-kpi:hover { text-decoration: none; border-color: var(--steel-300); }
.pv-kpi-n { font-size: 24px; font-weight: 650; display: flex; align-items: center; gap: 8px; line-height: 1.2; white-space: nowrap; }
.pv-kpi-n svg { width: 20px; height: 20px; color: var(--tx-mute); flex: none; }
.pv-kpi-etq { font-weight: 600; font-size: 13.5px; }
.pv-kpi-sub { font-size: 12px; color: var(--tx-mute); }
.pv-kpi.amarillo { border-top-color: var(--warn); }
.pv-kpi.rojo { border-top-color: var(--crit); }
.pv-kpi.rojo .pv-kpi-sub { color: var(--crit-ink); font-weight: 600; }
.pv-kpi.azul { border-top-color: var(--serie-1); }
.pv-calidad { font-size: 13px; color: var(--tx-soft); gap: 3px; }
.pv-calidad b { color: var(--tx); }
.pestanas .pv-cuenta { margin-left: 6px; background: var(--steel-100); border-radius: 10px; padding: 0 7px; font-size: 12px; font-weight: 600; color: var(--tx); }
@media (max-width: 1100px) {
  .pv-proceso { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pv-flecha { display: none; }
  .pv-relacion { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Avance compacto de una venta (4 puntos unidos) */
.pv-avance { display: flex; gap: 4px; }
.pv-punto { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 46px; position: relative; }
.pv-punto i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--steel-200); background: #fff; display: grid; place-items: center; position: relative; z-index: 1; }
.pv-punto i svg { width: 11px; height: 11px; stroke-width: 3; }
.pv-punto small { font-size: 10.5px; color: var(--tx-mute); white-space: nowrap; }
.pv-punto + .pv-punto::before { content: ''; position: absolute; top: 8px; left: -18px; width: 32px; height: 2px; background: var(--steel-200); }
.pv-punto.hecho i { background: var(--ok); border-color: var(--ok); color: #fff; }
.pv-punto.hecho + .pv-punto.hecho::before { background: var(--ok); }
.pv-punto.actual i { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.pv-punto.actual small { color: var(--tx); font-weight: 600; }
.pv-punto.atrasado i { border-color: var(--crit); background: var(--crit-soft); }
.pv-punto.atrasado small { color: var(--crit-ink); font-weight: 600; }
.pv-chips { display: flex; flex-wrap: wrap; gap: 4px; max-width: 280px; }
.pv-rojo { color: var(--crit-ink); }
.tabla tr.pv-fila-roja td:first-child { box-shadow: inset 3px 0 0 var(--crit); }
.pv-nuevo { color: var(--brand-ink); }
.pv-msj { display: flex; gap: 8px; align-items: center; }
.pv-msj svg { width: 18px; height: 18px; color: var(--tx-mute); flex: none; }
.pv-acciones { display: flex; gap: 6px; flex-wrap: wrap; }
.pv-prods { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 360px; }

/* Pasos de la venta */
.pv-pasos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pv-paso { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.pv-paso-cab { display: flex; align-items: center; gap: 8px; }
.pv-paso-cab > svg { width: 18px; height: 18px; color: var(--tx-mute); flex: none; }
.pv-paso-n { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--steel-200); display: grid; place-items: center; font-weight: 700; font-size: 12px; color: var(--tx-soft); flex: none; }
.pv-paso-n svg { width: 13px; height: 13px; stroke-width: 3; }
.pv-paso-det { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--tx-soft); flex: 1; align-items: flex-start; }
.pv-paso-det b { color: var(--tx); }
.pv-paso.hecho { background: #fbfdfb; border-color: #cfe9cf; }
.pv-paso.hecho .pv-paso-n { background: var(--ok); border-color: var(--ok); color: #fff; }
.pv-paso.actual { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.pv-paso.actual .pv-paso-n { border-color: var(--brand); background: var(--brand); color: var(--on-brand); }
.pv-paso.atrasado { border-color: var(--crit); box-shadow: 0 0 0 3px var(--crit-soft); }
@media (max-width: 1100px) { .pv-pasos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pv-pasos { grid-template-columns: minmax(0, 1fr); } }

.pv-satisf { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.pv-estrellas { display: flex; gap: 2px; }
.pv-estrella { background: none; border: 0; padding: 2px; cursor: pointer; color: var(--steel-300); line-height: 0; }
.pv-estrella svg { width: 26px; height: 26px; }
.pv-estrella.llena { color: #f5b301; }
.pv-estrella.llena svg { fill: currentColor; }
.pv-estrella:disabled { cursor: default; }
.pv-estrellas:hover .pv-estrella:not(:disabled) { color: #f5b301; }
.pv-estrellas .pv-estrella:not(:disabled):hover ~ .pv-estrella { color: var(--steel-300); }
.pv-comentario { font-style: italic; color: var(--tx-soft); }

/* Mensajes al cliente */
.pv-mensajes { display: flex; flex-direction: column; }
.pv-mensaje { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); }
.pv-mensaje:first-child { border-top: 0; }
.pv-mensaje-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--steel-100); color: var(--tx-soft); }
.pv-mensaje-ic svg { width: 18px; height: 18px; }
.pv-mensaje-txt { display: flex; flex-direction: column; font-size: 13px; color: var(--tx-soft); }
.pv-mensaje-txt b { color: var(--tx); font-size: 14px; }
.pv-mensaje.enviado .pv-mensaje-ic { background: var(--ok-soft); color: var(--ok-ink); }
.pv-mensaje.pendiente .pv-mensaje-ic { background: var(--warn-soft); color: var(--warn-ink); }
.pv-mensaje.pendiente .pv-mensaje-txt span { color: var(--warn-ink); font-weight: 600; }
.pv-mensaje.no_aplica, .pv-mensaje.vencido, .pv-mensaje.omitido { opacity: .7; }
.pv-burbuja { background: #e7f8e4; border-radius: 10px; padding: 10px 12px; white-space: pre-line; font-size: 13.5px; }
.pv-botones { display: flex; gap: 8px; flex-wrap: wrap; }
.pv-confirma { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--brand-soft); border-radius: var(--r); padding: 10px 12px; }
.pv-beneficios > div { display: flex; flex-direction: column; gap: 4px; }
.pv-beneficios svg { width: 15px; height: 15px; vertical-align: -2px; }

/* Documentos */
.pv-docs { display: flex; flex-direction: column; }
.pv-doc { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--line); }
.pv-doc:first-child { border-top: 0; }
.pv-doc > svg { width: 20px; height: 20px; color: var(--tx-mute); }
.pv-doc-txt { display: flex; flex-direction: column; min-width: 0; }
.pv-doc-txt a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-doc-txt span { font-size: 12px; color: var(--tx-mute); }
.pv-subir { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--steel-50); }
.pv-subir select { width: auto; flex: 0 1 auto; }
.pv-subir input[type=file] { flex: 1 1 160px; min-width: 0; font-size: 12.5px; }

/* Incidencias */
.pv-incidencias { display: flex; flex-direction: column; }
.pv-incidencia { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.pv-incidencia:first-child { border-top: 0; }
.pv-incidencia.abierta { background: #fffafa; }
.pv-inc-cab { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pv-inc-cab .btn { margin-left: auto; }

/* Datos de la venta */
.pv-datos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.pv-dato span { display: block; font-size: 12px; color: var(--tx-mute); }
.pv-dato b { font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }

/* Promociones */
.pv-promos { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.pv-promo .cuerpo { display: flex; flex-direction: column; gap: 8px; }
.pv-promo.vigente { border-top: 3px solid var(--brand); }
.pv-promo-cab { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.pv-promo-cab h3 { font-size: 16px; }
.pv-promo-num { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; background: var(--steel-50); border-radius: var(--r); padding: 10px; }
.pv-promo-num b { display: block; font-size: 17px; }
.pv-promo-num span { font-size: 11.5px; color: var(--tx-mute); }
.pv-promo-aviso { align-items: center; }
.pv-promo-aviso .btn { margin-left: auto; flex: none; }

/* ============================ LISTAS DE PRECIOS ============================ */
.pr-barra { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.pr-listas-resumen { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; flex: 1 1 300px; }
.pr-acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.pr-calc .num { color: var(--tx-soft); font-style: italic; }
.pr-listas { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.pr-lista { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.pr-lista.base { border-top: 3px solid var(--brand); }
.pr-lista-cab { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pr-rangos { display: flex; flex-direction: column; gap: 6px; }
.pr-rango { display: grid; grid-template-columns: auto 80px auto minmax(0, 1fr) 30px; gap: 6px; align-items: center; }
.pr-rango input { height: 34px; }
.pr-tipos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; font-size: 13px; }
.pr-escalas { display: flex; gap: 16px; flex-wrap: wrap; }
.pr-escalas span { display: flex; flex-direction: column; }
.pr-escalas small { font-size: 11px; color: var(--tx-mute); }
.pr-tit { font-family: var(--f-display); text-transform: uppercase; font-size: 16px; margin-bottom: 8px; }
.pr-pie { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.pr-mapeo { overflow: auto; border: 1px solid var(--line); border-radius: var(--r); max-height: 420px; }
.pr-mapeo th { vertical-align: top; min-width: 180px; background: var(--steel-50); position: static; }
.pr-mapeo td { font-size: 12.5px; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.pr-col { display: flex; flex-direction: column; gap: 6px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.pr-col-tit { font-weight: 700; color: var(--tx); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.pr-col select, .pr-col input { height: 32px; font-size: 12.5px; }
.pr-extra { display: flex; flex-direction: column; gap: 4px; }
.pr-extra input { width: 70px; }
.pr-cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.pr-cifra { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.pr-cifra b { display: block; font-size: 20px; }
.pr-cifra span { font-size: 12px; color: var(--tx-mute); }
.pr-cifra.aviso { border-color: var(--warn); background: var(--warn-soft); }
/* Cotizador: precio abajo del mínimo autorizado */
.partidas tr.bajo-minimo .c-pre input { border-color: var(--crit); background: var(--crit-soft); }
.partidas .aviso-min { font-size: 11px; color: var(--crit-ink); font-weight: 600; line-height: 1.2; margin-top: 2px; }
.partidas .aviso-min:empty { display: none; }

/* ============================ APP EN EL CELULAR ============================ */
.tabbar { display: none; }
.hoja-nuevo { display: grid; gap: 8px; }
.hoja-nuevo button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); font: inherit; font-size: 15.5px; font-weight: 600; color: var(--tx); cursor: pointer; text-align: left; }
.hoja-nuevo button:hover, .hoja-nuevo button:active { border-color: var(--brand); background: var(--brand-soft); }
.hoja-nuevo svg { width: 22px; height: 22px; color: var(--tx-soft); flex: none; }
.instalar-pasos { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 15px; }
.app-celular { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.app-celular img { width: 56px; height: 56px; border-radius: 12px; flex: none; }
.app-celular > div { flex: 1 1 240px; }
.instalar-aviso {
  position: fixed; left: 12px; right: 12px; bottom: 16px; z-index: 150; display: flex; gap: 12px; align-items: center;
  background: var(--steel-950); color: #EBF0F5; border-radius: 14px; padding: 12px 12px 12px 14px; box-shadow: var(--sh-lg); animation: entra .25s var(--ease);
}
.instalar-aviso img { width: 44px; height: 44px; border-radius: 10px; flex: none; }
.instalar-aviso > div { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; }
.instalar-aviso > div span { color: var(--steel-300); }
.instalar-aviso .btn.fantasma { color: #C9D3DD; }
body:has(.barra-fija) .instalar-aviso { display: none; }
@media (max-width: 960px) {
  :root { --tabbar: calc(60px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: var(--tabbar); padding-bottom: env(safe-area-inset-bottom); background: var(--steel-950); border-top: 1px solid #000;
  }
  .tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0;
    color: #8796a7; font: inherit; font-size: 11px; font-weight: 600; background: none; border: 0; cursor: pointer; text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
  }
  .tab svg { width: 22px; height: 22px; }
  .tab.activo { color: #fff; }
  .tab.activo svg { color: var(--brand); }
  .tab-nuevo-c { width: 46px; height: 46px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; margin-top: -20px; box-shadow: 0 4px 14px rgba(0, 0, 0, .4); border: 3px solid var(--steel-950); }
  .tab-nuevo-c svg { width: 24px; height: 24px; color: var(--on-brand); }
  .principal { padding-bottom: var(--tabbar); }
  .barra .nuevo-barra { display: none; }
  .barra-fija { bottom: var(--tabbar); }
  .toasts { left: 12px; right: 12px; bottom: calc(var(--tabbar) + 12px); max-width: none; }
  .instalar-aviso { bottom: calc(var(--tabbar) + 12px); }
  /* En iPhone, letra de 16 px en los campos evita que la pantalla haga zoom al escribir. */
  input, select, textarea { font-size: 16px; }
  .lateral { padding-top: env(safe-area-inset-top); }
}

@media print {
  @page { size: letter; margin: 9mm; }
  body { background: #fff; font-size: 12px; }
  .app { display: block; }
  .lateral, .barra, .no-print, .toasts, .barra-doc, .barra-fija { display: none !important; }
  #vista { padding: 0; max-width: none; }
  .hoja, .doc-cot { border: 0; box-shadow: none; max-width: none; }
  .doc-cot { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tarjeta { box-shadow: none; break-inside: avoid; }
  .tabla th { position: static; }
  a { color: inherit; }
}
