/* Colores del menú y del ingreso según el ambiente de la base, como la 2.0: azul en Producción, café en Pruebas (Utils/Tema.cs). */
:root { --menu: #12233A; --menu-hover: #1B3350; --menu-texto: #CFD8E3; --menu-tenue: #8B97A8; --menu-riel: #7DC0FF; }
.amb-pruebas { --menu: #5C2D08; --menu-hover: #7A3E0C; --menu-texto: #FAE2C8; --menu-tenue: #E8B07A; --menu-riel: #FFB870; }
.amb-pruebas .mud-drawer { background-color: var(--menu) !important; color: var(--menu-texto) !important; }
.amb-pruebas .mud-drawer .mud-nav-link, .amb-pruebas .mud-drawer .mud-nav-link-icon { color: var(--menu-texto) !important; }
.chip-ambiente { display: inline-block; border-radius: 10px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.chip-ambiente.pruebas { background: #FFFFFF; color: #B45309; }
.chip-ambiente.produccion { background: #1E6B3A; color: #FFFFFF; }
html, body { font-family: "Segoe UI", Inter, system-ui, sans-serif; background: #F3F5F8; color: #1B2430; }
.cargando { display: grid; place-items: center; height: 100vh; color: #5C6470; font-size: 18px; }
#blazor-error-ui { background: #FCEBEA; color: #B3261E; bottom: 0; display: none; left: 0; padding: .6rem 1.25rem; position: fixed; width: 100%; z-index: 2000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
.cifra { font-size: 28px; font-weight: 600; line-height: 1.2; }
.mono { font-family: "Cascadia Mono", Consolas, monospace; font-size: 12px; color: #5C6470; }
.franja-pruebas { background: #FFF3BF; border-bottom: 1px solid #F4E0A1; color: #7A3E06; font-size: 12.5px; font-weight: 600; padding: 6px 16px; }
.visor-pdf { width: 100%; height: calc(100vh - 170px); border: 0; border-radius: 8px; background: white; }
.lista-docs .mud-list-item.seleccionado { background: #E6EFF6; }
.fila-lista { cursor: pointer; padding: 10px 8px; border-radius: 6px; border-bottom: 1px solid #E2E7EC; }
.fila-lista:hover { background: #F6F9FC; }
.fila-lista.elegida { background: #E6EFF6; box-shadow: inset 3px 0 0 #0F5C8C; }
.corta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Como la 2.0 (Principal y Tema) ---------- */
.encabezado-20 { height: 64px; background: #FFFFFF; border-bottom: 1px solid #E2E7EC; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; }
.titulo-20 { font-size: 21px; font-weight: 600; color: #1B2430; }
.avatar-20 { width: 36px; height: 36px; border-radius: 50%; background: #EAF3FB; color: #0C5CA2; font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.grupo-menu { color: var(--menu-tenue); font-size: 11.5px; font-weight: 600; padding: 14px 8px 4px; }
.menu-20 .mud-nav-link { min-height: 32px; padding: 4px 8px; border-radius: 6px; margin: 1px 0; font-size: 14px; }
.menu-20 .mud-nav-link:hover { background: var(--menu-hover) !important; color: white; }
.menu-20 .mud-nav-link.active { background: var(--menu-hover) !important; color: white !important; box-shadow: inset 3px 0 0 var(--menu-riel); font-weight: 600; }
.menu-20 .mud-nav-link .mud-nav-link-icon { font-size: 18px; margin-right: 10px; }
.nuevo-documento { height: 38px; border: 1px solid var(--menu); }
.mud-paper-outlined { border-color: #DCE1E7 !important; border-radius: 12px !important; }
.mud-button-root { border-radius: 8px; }
.mud-button-outlined { border-color: #C3CCD6 !important; color: #1B2430; background: #FFFFFF; }
.mud-input-outlined .mud-input-outlined-border { border-color: #C3CCD6; border-radius: 8px; }
.mud-simple-table thead th, .mud-table-head .mud-table-cell { background: #F7F9FB; color: #5B6675; font-weight: 600; font-size: 12px; }
.boton-lista { margin-bottom: 10px; height: 40px; }

/* ---------- Facturación como FrmFacturacion de la 2.0 ---------- */
.fac-barra { background: #FFFFFF; border: 1px solid #DCE1E7; border-radius: 12px; padding: 12px 18px; display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.fac-titulo { font-size: 20px; font-weight: 600; }
.fac-sub { color: #5B6675; font-size: 13px; }
.fac-cuerpo { display: grid; grid-template-columns: 260px minmax(0, 1fr) 285px; gap: 14px; align-items: start; }
.fac-tarjeta { background: #FFFFFF; border: 1px solid #DCE1E7; border-radius: 12px; }
.fac-cab { padding: 12px 14px 10px; border-bottom: 1px solid #E8ECF1; }
.fac-h { font-size: 15px; font-weight: 600; }
.fac-pie { padding: 9px 14px; border-top: 1px solid #E8ECF1; color: #5B6675; font-size: 12px; display: flex; justify-content: space-between; gap: 8px; }
.fac-docs { max-height: calc(100vh - 360px); overflow: auto; }
.fac-doc { cursor: pointer; padding: 9px 14px; border-bottom: 1px solid #EEF1F5; }
.fac-doc:hover { background: #F6F9FC; }
.fac-doc.elegida { background: #E6EFF6; box-shadow: inset 3px 0 0 #0F5C8C; }
.fac-pill { border: 1px solid #C3CCD6; background: #FFFFFF; border-radius: 6px; padding: 3px 9px; font-size: 12.5px; cursor: pointer; color: #1B2430; }
.fac-pill.activo { background: #0F5C8C; border-color: #0F5C8C; color: #FFFFFF; }
.fac-etq { font-size: 13px; font-weight: 600; margin-bottom: 5px; color: #1B2430; }
.fac-enc { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) 170px 150px; column-gap: 12px; padding: 14px 16px 12px; }
.fac-seg { display: grid; grid-template-columns: 1fr 1fr; height: 40px; }
.fac-seg button { border: 1px solid #C3CCD6; background: #FFFFFF; font: inherit; font-size: 13.5px; cursor: pointer; color: #1B2430; }
.fac-seg button:first-child { border-radius: 8px 0 0 8px; }
.fac-seg button:last-child { border-radius: 0 8px 8px 0; border-left: 0; }
.fac-seg button.activo { background: #0F5C8C; border-color: #0F5C8C; color: #FFFFFF; font-weight: 600; }
.fac-seg button:disabled { cursor: default; opacity: .7; }
.fac-orden { border: 1px solid #C3CCD6; border-radius: 8px; height: 116px; display: flex; flex-direction: column; background: #FFFFFF; }
.fac-orden-titulo { display: flex; align-items: center; border-bottom: 1px solid #DCE1E7; padding: 0 10px; height: 32px; gap: 8px; }
.fac-orden input, .fac-orden textarea { border: 0; outline: 0; font: inherit; background: transparent; color: #1B2430; }
.fac-orden input { flex: 1; font-weight: 600; font-size: 14px; }
.fac-orden textarea { flex: 1; resize: none; padding: 6px 10px; font-size: 14px; }
.fac-campo { width: 100%; height: 40px; border: 1px solid #C3CCD6; border-radius: 8px; padding: 0 10px; font: inherit; font-size: 14px; color: #1B2430; background: #FFFFFF; }
.fac-campo:read-only { background: #F7F9FB; color: #5B6675; }
.fac-campo.der { text-align: right; }
textarea.fac-campo { height: auto; padding: 8px 10px; resize: none; line-height: 19px; display: block; }
.fac-ficha { grid-column: 1 / -1; margin-top: 10px; background: #F5F8FB; border: 1px solid #E1E8F0; padding: 8px 12px; font-size: 12.5px; color: #5B6675; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fac-nota { font-size: 12px; color: #5B6675; margin-top: 8px; }
.fac-nota.anterior { color: #B45309; }
.fac-col { display: grid; grid-template-columns: 22px 50px minmax(0, 1fr) 82px 66px 88px 86px 28px; column-gap: 6px; padding: 0 12px; }
.fac-col-cab { background: #F7F9FB; height: 34px; align-items: center; font-size: 12px; font-weight: 600; color: #5B6675; }
.fac-captura { background: #F2F7FC; border-bottom: 1px solid #D3E2F0; padding-top: 9px; padding-bottom: 6px; align-items: start; }
.fac-linea { min-height: 40px; align-items: center; border-bottom: 1px solid #EEF1F5; font-size: 14px; cursor: default; }
.fac-linea.edicion { background: #E6EFF6; }
.fac-linea .desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 6px 0; line-height: 19px; max-height: 38px; }
.der { text-align: right; }
.tenue { color: #5B6675; }
.fac-restantes { font-size: 11px; color: #5B6675; text-align: right; margin-top: 3px; }
.fac-restantes.poco { color: #B45309; }
.fac-restantes.agotado { color: #B3261E; }
.fac-badge { display: inline-block; font-size: 11.5px; font-weight: 600; border-radius: 10px; padding: 2px 8px; background: #E6EFF6; color: #0F5C8C; }
.fac-badge.ok { background: #E6F4EA; color: #1E7B34; }
.fac-quitar { border: 0; background: transparent; cursor: pointer; color: #8B97A8; font-size: 14px; }
.fac-agregar { width: 100%; max-width: 36px; height: 34px; border: 0; border-radius: 8px; background: #0F5C8C; color: #FFFFFF; font-size: 20px; cursor: pointer; }
.fac-agregar:disabled { background: #C3CCD6; }
.fac-resumen { padding: 14px 18px 12px; margin-bottom: 14px; }
.fac-resumen .fila { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.fac-total { font-size: 29px; font-weight: 700; color: #0F5C8C; text-align: right; }
.fac-aviso { border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; background: #FFF4E5; color: #8A4B00; font-size: 12.5px; white-space: pre-line; }
.fac-aviso b { display: block; font-size: 13.5px; margin-bottom: 3px; }
.fac-aviso.listo { background: #E6F4EA; color: #1E7B34; }
.fac-aviso.error { background: #FCEBEA; color: #B3261E; }
.fac-aviso.neutro { background: #EEF1F5; color: #5B6675; }
.fac-principal { width: 100%; height: 50px; font-size: 15px !important; font-weight: 600 !important; margin-bottom: 10px; }

.fac-enc > * { min-width: 0; }
@media (min-width: 1800px) { .fac-cuerpo { grid-template-columns: 290px minmax(0, 1fr) 310px; } .fac-col { grid-template-columns: 30px 58px minmax(0, 1fr) 88px 74px 94px 96px 36px; column-gap: 8px; padding: 0 14px; } }

/* ---------- Inicio como Principal.Tablero de la 2.0 ---------- */
.ini-barra { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ini-seg button { border: 1px solid #C3CCD6; background: #FFFFFF; height: 32px; min-width: 70px; font: inherit; font-size: 13.5px; cursor: pointer; color: #1B2430; }
.ini-seg button:first-child { border-radius: 8px 0 0 8px; }
.ini-seg button:last-child { border-radius: 0 8px 8px 0; border-left: 0; }
.ini-seg button.activo { background: #0F5C8C; border-color: #0F5C8C; color: #FFFFFF; font-weight: 600; }
.ini-flecha { width: 32px; height: 32px; border: 1px solid #C3CCD6; border-radius: 8px; background: #FFFFFF; cursor: pointer; font-size: 14px; color: #1B2430; }
.ini-flecha:disabled { color: #C3CCD6; cursor: default; }
.ini-mes { width: 150px; text-align: center; font-size: 16px; font-weight: 600; }
.ini-aviso { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 14px; border: 1px solid #F4E0A1; background: #FFF4E5; border-radius: 8px; margin-bottom: 6px; color: #8A4B00; }
.ini-aviso.error { border-color: #F2C6C2; background: #FCEBEA; color: #B3261E; }
.ini-aviso .det { color: #1B2430; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ini-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.ini-kpi { background: #FFFFFF; border: 1px solid #DCE1E7; border-radius: 10px; padding: 12px 16px; height: 118px; display: flex; flex-direction: column; justify-content: space-between; }
.ini-kpi.pulsable { cursor: pointer; }
.ini-kpi.pulsable:hover { border-color: #0F5C8C; }
.ini-kpi.aviso { background: #FFF4E5; border-color: #F4E0A1; }
.ini-kpi.aviso .t, .ini-kpi.aviso .d { color: #8A4B00; }
.ini-kpi.marcado { border: 2px solid #8A4B00; }
.ini-kpi .t { font-size: 13px; font-weight: 600; color: #5B6675; }
.ini-kpi .v { font-size: 29px; font-weight: 600; line-height: 1.15; }
.ini-kpi .s { font-size: 17px; color: #5B6675; }
.ini-kpi .d { font-size: 12px; color: #5B6675; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ini-kpi .d a { color: #0F5C8C; cursor: pointer; }
.ini-mini { display: flex; align-items: flex-end; gap: 1px; height: 26px; width: 120px; }
.ini-mini span { flex: 1; background: #DCE1E7; }
.ini-mini span.v { background: #0F5C8C; }
.ini-avance { height: 6px; border-radius: 3px; background: #EEF1F5; overflow: hidden; }
.ini-avance div { height: 100%; background: #1E6B3A; border-radius: 3px; }
.ini-cuerpo { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; align-items: start; }
.ini-docs-barra { height: 54px; padding: 0 14px; border-bottom: 1px solid #DCE1E7; display: flex; align-items: center; gap: 8px; }
.ini-chip { height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid #F4E0A1; background: #FFF4E5; color: #8A4B00; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.ini-boton { height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid #C3CCD6; background: #FFFFFF; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; color: #1B2430; }
.ini-boton.primario { background: #0F5C8C; border-color: #0F5C8C; color: #FFFFFF; }
.ini-boton:disabled { opacity: .55; cursor: default; }
.ini-tabla { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ini-tabla th { background: #F7F9FB; height: 32px; font-size: 12px; font-weight: 600; color: #5B6675; text-align: left; padding: 0 12px; }
.ini-tabla td { height: 54px; padding: 0 12px; border-bottom: 1px solid #EEF1F5; vertical-align: middle; overflow: hidden; }
.ini-tabla tr:hover td { background: #F6F9FC; }
.ini-tabla .l2 { font-size: 12px; color: #5B6675; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ini-tabla .l1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ini-sigla { background: #E6EFF6; color: #0A3F61; font-size: 11px; font-weight: 700; border-radius: 4px; padding: 1px 5px; margin-right: 6px; }
.ini-pildora { font-size: 12px; font-weight: 600; border-radius: 4px; padding: 3px 6px; background: #FFF4E5; color: #8A4B00; }
.ini-pildora.ok { background: #EAF5EE; color: #1E6B3A; }
.ini-pildora.error { background: #FCEBEA; color: #B3261E; }
.ini-pildora.neutro { background: #EEF1F5; color: #5B6675; }
.ini-tabla tr.anulado td { color: #8B97A8; }
.ini-pie { height: 32px; background: #F7F9FB; padding: 0 14px; display: flex; align-items: center; font-size: 12px; color: #5B6675; border-radius: 0 0 12px 12px; }
.ini-lado .fac-tarjeta { padding: 12px 16px; margin-bottom: 14px; }
.ini-estado { height: 44px; border-bottom: 1px solid #EEF1F5; display: flex; flex-direction: column; justify-content: center; }
.ini-estado .t { font-size: 12px; color: #5B6675; }
.ini-estado .x { font-weight: 600; }
.ini-estado .x.ok { color: #1E6B3A; } .ini-estado .x.error { color: #B3261E; } .ini-estado .x.aviso { color: #8A4B00; } .ini-estado .x.neutro { color: #5B6675; }
.ini-barras { height: 90px; display: flex; align-items: flex-end; gap: 2px; position: relative; }
.ini-barras span { flex: 1; background: #DCE1E7; border-radius: 2px; }
.ini-barras span.v { background: #0F5C8C; }
.ini-barras span.v:hover { background: #0A3F61; }
.ini-dias { display: flex; gap: 2px; margin-top: 4px; font-size: 11px; color: #5B6675; }
.ini-dias span { flex: 1; text-align: center; overflow: visible; white-space: nowrap; }
.ini-dias span.hoy { color: #0F5C8C; font-weight: 600; }
.ini-tipo { margin-bottom: 12px; }
.ini-tipo .fila { display: flex; gap: 4px; align-items: baseline; }
.ini-tipo .barra { height: 6px; border-radius: 3px; background: #EEF1F5; margin-top: 4px; overflow: hidden; }
.ini-tipo .barra div { height: 100%; border-radius: 3px; background: #0F5C8C; }
.ini-tipo .barra div.nota { background: #B3261E; }

/* ---------- Clientes como FrmClientesVenta de la 2.0 ---------- */
.cli-cuerpo { display: grid; grid-template-columns: 356px minmax(0, 1fr); gap: 16px; align-items: start; }
.cli-lista { max-height: calc(100vh - 330px); overflow: auto; }
.cli-fila { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 14px; cursor: pointer; border-bottom: 1px solid #EEF0F3; }
.cli-fila:hover { background: #F6F9FC; }
.cli-fila.elegida { background: #E8F0F7; }
.cli-avatar { width: 36px; height: 36px; border-radius: 50%; background: #EEF0F3; color: #3D4A5C; font-weight: 700; font-size: 12.5px; display: grid; place-items: center; flex: none; }
.cli-fila.elegida .cli-avatar { background: #0F5C8C; color: #FFFFFF; }
.cli-nit { font-family: "Cascadia Mono", Consolas, monospace; font-size: 12px; color: #5B6675; }
.cli-tipo { font-size: 11px; font-weight: 600; border-radius: 4px; padding: 1px 5px; background: #E1ECF5; color: #0F4A73; }
.cli-tipo.factura { background: #EDE7F6; color: #4A2E83; }
.cli-tipo.exportacion { background: #FFF1E0; color: #8A4A00; }
.cli-pill { border: 1px solid #C3CCD6; background: #FFFFFF; border-radius: 6px; padding: 3px 10px; font-size: 12.5px; cursor: pointer; margin: 0 6px 6px 0; color: #1B2430; }
.cli-pill.activo { background: #0F5C8C; border-color: #0F5C8C; color: #FFFFFF; }
.cli-ficha { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.cli-cab { height: 78px; padding: 0 24px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid #DCE1E7; }
.cli-cab .grande { width: 44px; height: 44px; font-size: 15px; background: #E6EFF6; color: #0F5C8C; }
.cli-form { padding: 20px 24px 24px; max-height: calc(100vh - 290px); overflow: auto; }
.cli-seccion { font-size: 12px; font-weight: 700; color: #0F5C8C; margin: 14px 0 10px; letter-spacing: .3px; }
.cli-seccion:first-child { margin-top: 4px; }
.cli-rej { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 16px; row-gap: 12px; margin-bottom: 12px; }
.cli-etq { font-size: 12.5px; font-weight: 600; color: #3D4A5C; margin-bottom: 6px; }
.cli-etq .ob { color: #B3261E; } .cli-etq .nota { color: #5B6675; font-weight: 400; }
.cli-ayuda { font-size: 12px; color: #5B6675; margin-top: 6px; }
.cli-ayuda.aviso { color: #8A4B00; } .cli-ayuda.ok { color: #1E6B3A; }
.cli-casilla { display: flex; gap: 8px; align-items: center; height: 40px; font-size: 14px; }
.cli-req { background: #FAFBFC; border-left: 1px solid #DCE1E7; padding: 18px; max-height: calc(100vh - 290px); overflow: auto; border-radius: 0 0 12px 0; }
.cli-req .item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid #EEF1F5; }
.cli-circulo { width: 20px; height: 20px; border-radius: 50%; background: #B45309; color: #FFFFFF; font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; }
.cli-circulo.listo { background: #1E6B3A; }
.cli-emite { background: #0F5C8C; color: #FFFFFF; font-size: 10px; font-weight: 700; border-radius: 4px; padding: 1px 5px; margin-left: 6px; }
.cli-mod { background: #FFFFFF; border: 1px solid #DCE1E7; border-radius: 8px; padding: 10px 12px; margin-top: 18px; }

/* Notas de crédito: # · Cant. · Concepto · Código · Precio · Monto · IVA 13 % */
.fac-col.nc-col { grid-template-columns: 22px 50px minmax(0, 1fr) 96px 84px 88px 80px 28px; }
@media (min-width: 1800px) { .fac-col.nc-col { grid-template-columns: 30px 58px minmax(0, 1fr) 112px 92px 96px 86px 36px; } }

/* ---------- Evento de retorno como FrmEventoRetorno de la 2.0 ---------- */
.ret-plazo { border: 1px solid #DCE1E7; background: #F7F9FB; color: #5B6675; border-radius: 12px; padding: 10px 14px; font-weight: 600; white-space: pre-line; display: flex; align-items: center; min-height: 62px; }
.ret-plazo.ok { background: #EAF5EE; border-color: #B2D8BE; color: #1E6B3A; }
.ret-plazo.aviso { background: #FFF4E5; border-color: #F4E0A1; color: #8A4B00; }
.ret-plazo.error { background: #FCEBEA; border-color: #F0B4AC; color: #B3261E; }
.ret-col { display: grid; grid-template-columns: minmax(0, 1fr) 95px 105px 100px 100px 115px 110px; column-gap: 8px; padding: 0 16px; align-items: center; }
.ret-linea { min-height: 44px; padding-top: 6px; padding-bottom: 6px; border-bottom: 1px solid #EEF1F5; font-size: 14px; }
.ret-devolver { background: #E6EFF6; font-weight: 600; height: 34px; }
.ret-devolver:disabled { background: #F7F9FB; }

/* ---------- Consultas MH (invalidaciones y retornos) como la 2.0 ---------- */
.cons-filtros { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.cons-tabla td { height: 40px; }
.cons-tabla tr { cursor: pointer; }
.cons-tabla tr.elegida td { background: #E6EFF6; }
.cons-pie { display: flex; align-items: center; gap: 10px; background: #FFFFFF; border: 1px solid #DCE1E7; border-radius: 12px; padding: 10px 16px; margin-top: 12px; }

/* ---------- Emisión programada (Facturación) y pestañas de Inicio ---------- */
.fac-programar { border: 1px solid #E3E7ED; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.ini-pestanas { display: flex; gap: 22px; padding: 0 14px; border-bottom: 1px solid #E3E7ED; }
.ini-pestana { background: none; border: 0; border-bottom: 3px solid transparent; height: 44px; padding: 0 4px; font: inherit; font-size: 15px; font-weight: 600; color: #5B6675; cursor: pointer; }
.ini-pestana.activa { border-bottom-color: #1565C0; color: #1B2430; }
.ini-pestana.alerta { color: #B3261E; }
.ini-resultado { font-size: 12px; color: #5B6675; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ini-resultado.error { color: #B3261E; }
/* Comprobante de retención (FrmRetenciones de la 2.0): # · tipo · número · fecha · sujeto · retenido · observación; filas con error en rojo. */
.fac-col.ret-col { grid-template-columns: 34px 40px minmax(0, 3fr) 84px 84px 80px minmax(0, 2fr); }
@media (min-width: 1800px) { .fac-col.ret-col { grid-template-columns: 44px 52px minmax(0, 3fr) 100px 96px 92px minmax(0, 2fr); } }
.fac-linea.ret-error { background: #FCEBEA; color: #B3261E; }
.ret-aviso { color: #A15C00; }
.ret-clase { display: grid; grid-template-columns: 1fr 1fr; }
.ret-clase button { height: 36px; border: 1px solid #C3CCD6; background: #FFFFFF; color: #1B2430; font: inherit; font-size: 13.5px; cursor: pointer; }
.ret-clase button:first-child { border-radius: 8px 0 0 8px; }
.ret-clase button:last-child { border-radius: 0 8px 8px 0; border-left: 0; }
.ret-clase button.activo { background: #0F5C8C; border-color: #0F5C8C; color: #FFFFFF; font-weight: 600; }
.ret-clase button:disabled { cursor: default; opacity: .65; }
.fac-badge.error { background: #FCEBEA; color: #B3261E; }
/* Etiqueta del correo al cliente en los DTE programados: resalta del texto del resultado. */
.ini-correo { display: inline-flex; align-items: center; gap: 5px; border-radius: 9px; padding: 1px 8px 1px 7px; margin-bottom: 3px;
              font-size: 11.5px; font-weight: 600; background: #FFF4E5; color: #7A3E06; }
.ini-correo.ok { background: #EAF5EE; color: #1E6B3A; }
.ini-correo.info { background: #E6EFF6; color: #0F5C8C; }
.ini-correo-icono { font-size: 12px; line-height: 1; }
/* Confirmaciones con el icono de su notificación */
.dlg-titulo { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 600; color: #1B2430; }
.dlg-icono { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.dlg-icono.pregunta { background: #E6EFF6; color: #0F5C8C; }
.dlg-icono.advertencia { background: #FFF4E5; color: #B45309; }
.dlg-icono.exito { background: #EAF5EE; color: #1E6B3A; }
.dlg-texto { font-size: 14.5px; color: #1B2430; white-space: pre-line; padding-left: 52px; }
/* Invalidar documento (FrmInvalidarDocumento de la 2.0) */
.inv-cuerpo { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 14px; margin-bottom: 14px; }
.inv-col { display: grid; grid-template-columns: 60px 80px minmax(0, 1fr) 100px 110px 56px; column-gap: 8px; padding: 0 14px; align-items: center; }
.inv-col .der { text-align: right; padding-right: 10px; }
.inv-lista { max-height: calc(100vh - 420px); min-height: 200px; overflow: auto; }
.inv-fila { min-height: 38px; border-bottom: 1px solid #EEF1F4; font-size: 14px; cursor: pointer; }
.inv-fila:hover { background: #F6F9FC; }
.inv-fila.elegida { background: #E6EFF6; box-shadow: inset 3px 0 0 #0F5C8C; }
.inv-fila.pendiente { color: #A15C00; }
.inv-datos { padding: 14px 18px; display: flex; flex-direction: column; gap: 4px; }
.inv-etq { margin: 12px 0 4px; }
.inv-pie { display: flex; align-items: center; gap: 16px; padding: 12px 16px; }
.inv-boton { width: 250px; height: 44px; border: 0; border-radius: 8px; background: #B42318; color: #FFFFFF; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.inv-boton:hover:not(:disabled) { background: #961C12; }
.inv-boton:disabled { background: #EEF1F4; color: #8A96A3; cursor: default; }
.inv-ambiente { border-radius: 12px; padding: 4px 12px; font-size: 12px; font-weight: 600; color: #FFFFFF; background: #1E6B3A; }
.inv-ambiente.pruebas { background: #B45309; }

/* ---------- Bitácora de correos (por documento) ---------- */
.bit-cabecera { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.bit-titulo { margin: 0; font-size: 26px; line-height: 32px; font-weight: 600; letter-spacing: -0.01em; }
.bit-sub { margin: 2px 0 0; font-size: 12.5px; color: #5B6675; }
.bit-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.bit-pruebas { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 4px; background: #FFF4E5; color: #7A3E06; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; }
.bit-grupo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bit-rotulo { font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; color: #5B6675; }
.bit-boton { height: 38px; padding: 0 14px; border: 1px solid #C3CCD6; border-radius: 6px; background: #FFFFFF; color: #1B2430; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.bit-boton:hover:not(:disabled) { background: #F3F5F8; }
.bit-boton:disabled { opacity: .5; cursor: default; }
.bit-cifras { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.bit-cifra { background: #FFFFFF; border: 1px solid #DCE1E7; border-radius: 8px; padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.bit-numero { font-size: 22px; line-height: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bit-filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; background: #FFFFFF; border: 1px solid #DCE1E7; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.bit-pildoras { display: flex; flex-wrap: wrap; gap: 6px; }
.bit-pildora { height: 34px; padding: 0 14px; border-radius: 17px; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; background: #FFFFFF; color: #1B2430; border: 1px solid #C3CCD6; }
.bit-pildora.activa { background: #0F5C8C; color: #FFFFFF; border-color: #0F5C8C; }
.bit-cuenta { font-variant-numeric: tabular-nums; opacity: .85; }
.bit-buscar { flex: 1 1 260px; min-width: 0; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid #C3CCD6; border-radius: 6px; background: #FFFFFF; box-sizing: border-box; }
.bit-buscar input { flex: 1; min-width: 0; border: 0; outline: none; font-size: 14px; background: transparent; font-family: inherit; }
.bit-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.bit-fechas { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: #5B6675; }
.bit-fechas label { display: flex; align-items: center; gap: 6px; }
.bit-fechas input[type=date] { height: 34px; padding: 0 8px; border: 1px solid #C3CCD6; border-radius: 6px; font-size: 13px; color: #1B2430; background: #FFFFFF; font-family: inherit; }
.bit-mios { color: #1B2430; font-size: 13px; }
.bit-mios input { width: 16px; height: 16px; accent-color: #0F5C8C; }
.bit-cuerpo { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; }
.bit-lista { flex: 999 1 560px; min-width: 0; background: #FFFFFF; border: 1px solid #DCE1E7; border-radius: 8px; overflow: hidden; }
.bit-filas { max-height: calc(100vh - 380px); min-height: 220px; overflow: auto; }
.bit-fila { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.4fr) minmax(0, 1fr) 128px; gap: 12px; align-items: center; width: 100%; min-width: 640px; padding: 11px 16px; border: 0; border-bottom: 1px solid #EEF1F4; background: #FFFFFF; text-align: left; font: inherit; font-size: 14px; line-height: 20px; color: #1B2430; cursor: pointer; }
.bit-fila:hover { background: #F7F9FB; }
.bit-fila.elegida { background: #E6EFF6; box-shadow: inset 3px 0 0 #0F5C8C; }
.bit-fila:focus-visible, .bit-pildora:focus-visible, .bit-boton:focus-visible { outline: 2px solid #0F5C8C; outline-offset: 2px; }
.bit-encabezado { cursor: default; background: #F7F9FB; border-bottom: 1px solid #DCE1E7; padding: 9px 16px; font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; color: #5B6675; }
.bit-encabezado:hover { background: #F7F9FB; }
.bit-fila .der, .bit-encabezado .der { text-align: right; align-items: flex-end; }
.bit-col { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bit-linea { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bit-sigla { font-family: Consolas, 'Cascadia Mono', monospace; font-size: 11px; color: #5B6675; flex: none; }
.bit-doc { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bit-invalidado { flex: none; padding: 0 6px; border-radius: 4px; background: #EBE9E2; color: #5B6675; font-size: 11px; line-height: 18px; font-weight: 600; text-decoration: line-through; }
.bit-tenue { font-size: 12px; line-height: 16px; color: #5B6675; }
.bit-corta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bit-puntos { display: flex; flex-wrap: wrap; gap: 4px; }
.bit-puntos span { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.bit-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; font-size: 12px; line-height: 16px; font-weight: 600; white-space: nowrap; }
.bit-pie { padding: 9px 16px; border-top: 1px solid #DCE1E7; font-size: 12px; color: #5B6675; }
.bit-vacio { padding: 48px 16px; text-align: center; color: #5B6675; }
.bit-detalle { flex: 1 1 440px; max-width: 100%; min-width: 0; background: #FFFFFF; border: 1px solid #DCE1E7; border-radius: 8px; box-shadow: 0 1px 2px rgba(27,36,48,.06), 0 6px 16px rgba(27,36,48,.06); display: flex; flex-direction: column; }
.bit-bloque { padding: 18px 20px 14px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid #DCE1E7; }
.bit-codigo { font-family: Consolas, 'Cascadia Mono', monospace; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: #E6EFF6; color: #0F5C8C; }
.bit-h2 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 600; }
.bit-h3 { margin: 0; font-size: 14px; line-height: 20px; font-weight: 600; }
.bit-mono { font-family: Consolas, 'Cascadia Mono', monospace; font-size: 12px; }
.bit-tres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid #DCE1E7; }
.bit-tres > div { padding: 10px 16px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid #DCE1E7; }
.bit-tres > div:first-child { padding-left: 20px; }
.bit-tres > div:last-child { border-right: 0; }
.bit-destinos { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 6px 8px; font-size: 13px; line-height: 18px; }
.bit-pila { display: flex; flex-direction: column; overflow-wrap: anywhere; }
.bit-tiempo-cab { padding: 14px 20px 6px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.bit-tiempo-cab > div:first-child { display: flex; flex-direction: column; }
.bit-tiempo { list-style: none; margin: 0; padding: 4px 20px 8px; display: flex; flex-direction: column; }
.bit-tiempo li { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 12px; }
.bit-riel { display: flex; flex-direction: column; align-items: center; }
.bit-nodo { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.bit-via { flex: 1; width: 2px; min-height: 16px; margin: 4px 0; background: #DCE1E7; }
.bit-evento { padding-bottom: 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bit-evento-cab { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.bit-caja { background: #F7F9FB; border: 1px solid #DCE1E7; border-radius: 6px; padding: 10px 12px; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 6px 8px; font-size: 13px; line-height: 18px; }
.bit-caja > .bit-rotulo { line-height: 18px; }
.bit-adjuntos { display: flex; flex-wrap: wrap; gap: 6px; }
.bit-adjuntos span { padding: 0 6px; border-radius: 4px; background: #E6EFF6; color: #0F5C8C; font-size: 11px; line-height: 20px; font-weight: 600; }
.bit-huella { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bit-huella code { font-family: Consolas, 'Cascadia Mono', monospace; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bit-copiar { flex: none; height: 26px; padding: 0 8px; border: 1px solid #C3CCD6; border-radius: 4px; background: #FFFFFF; font-size: 12px; cursor: pointer; }
.bit-botones { margin-top: auto; padding: 14px 20px; border-top: 1px solid #DCE1E7; display: flex; flex-wrap: wrap; gap: 8px; }
.bit-primario { flex: 1 1 160px; height: 40px; border: 0; border-radius: 6px; background: #0F5C8C; color: #FFFFFF; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.bit-primario:hover:not(:disabled) { background: #0A3F61; }
.bit-primario:disabled { opacity: .5; cursor: default; }
@media (max-width: 900px) { .bit-cifras { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Bóveda de firmas (usa también las clases bit-* de la bitácora) */
.bov-pestanas { display: flex; gap: 4px; border-bottom: 1px solid #DCE1E7; margin-bottom: 12px; }
.bov-pestana { height: 44px; padding: 0 14px; border: 0; border-bottom: 3px solid transparent; background: transparent; font: inherit; font-size: 14px; color: #3D4450; cursor: pointer; }
.bov-pestana.activa { border-bottom-color: #0F5C8C; color: #0A3F61; font-weight: 600; }
.bov-pestana:focus-visible { outline: 2px solid #0F5C8C; outline-offset: 2px; }
.bit-fila.bov-fila { grid-template-columns: 130px minmax(0, 1.3fr) minmax(0, 1.4fr) 150px 100px; }
.bit-fila.bov-fila-r { grid-template-columns: 90px minmax(0, 1.5fr) minmax(0, 1.4fr) 96px 140px 96px; min-width: 720px; }
.bov-motivo { padding: 8px 10px; border-radius: 6px; background: #F7E0DA; color: #A3301C; font-size: 13px; overflow-wrap: anywhere; }
.bov-huella { margin-top: 6px; padding: 10px 12px; border: 1px solid #DCE1E7; border-radius: 6px; background: #F7F9FB; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.bov-huella code { font-family: Consolas, 'Cascadia Mono', monospace; font-size: 12.5px; overflow-wrap: anywhere; word-break: break-all; }
.bov-datos { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 8px; font-size: 13px; line-height: 18px; margin-top: 6px; overflow-wrap: anywhere; }
.bov-intento { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 4px; font-size: 12.5px; }
.bov-velo { position: fixed; inset: 0; z-index: 1400; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.bov-dialogo { width: 720px; max-width: 100%; max-height: 100%; overflow: auto; background: #FFFFFF; border-radius: 8px; padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.bov-dialogo-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bov-json { width: 860px; height: 100%; }
.bov-json pre { flex: 1; margin: 0; overflow: auto; padding: 12px; border: 1px solid #DCE1E7; border-radius: 6px; background: #F7F9FB; font-family: Consolas, 'Cascadia Mono', monospace; font-size: 12.5px; }
.bov-resumen { margin: 0; white-space: pre-wrap; font-family: inherit; font-size: 13.5px; line-height: 20px; max-height: 60vh; overflow: auto; }
.bov-entrada { width: 100%; height: 140px; box-sizing: border-box; padding: 8px 10px; border: 1px solid #C3CCD6; border-radius: 6px; font-family: Consolas, 'Cascadia Mono', monospace; font-size: 12px; resize: vertical; }
.bov-resultado { border-radius: 6px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
