/* Área de clientes: lo que no está en site.css / portal.css (copias de la web; si cambian allí, copiarlas aquí). */
.entrada { min-height: 100vh; display: flex; flex-wrap: wrap; background: var(--fondo-suave); }
.entrada__marca { flex: 1 1 420px; background: var(--marino); color: #E8EFF3; padding: 48px; display: flex; flex-direction: column; gap: 28px; }
.entrada__marca h1 { color: #fff; font-size: clamp(28px, 4vw, 40px); }
.entrada__marca ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; color: #C3D0E8; }
.entrada__caja { flex: 1 1 420px; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.entrada__form { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--borde); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.entrada__form h2 { font-size: 26px; }
.entrada__form small { color: var(--texto-3); font-size: 13px; }
.entrada__aviso { padding: 12px 14px; border-radius: 10px; background: var(--fondo-azul); color: var(--marino); font-size: 14px; }
.entrada__aviso.error { background: var(--aviso-fondo); color: var(--aviso); }
.entrada__codigo-pruebas { padding: 10px 14px; border-radius: 10px; background: #FFF4D6; color: #6B4A00; font-size: 13px; }
.entrada .campo input { letter-spacing: normal; }
.entrada input.codigo { font: 700 24px var(--cuerpo); letter-spacing: 8px; text-align: center; }
.p-cab form { display: flex; align-items: center; gap: 8px; }
.p-salir { border: 0; background: transparent; color: var(--azul); font: 600 13px var(--cuerpo); cursor: pointer; padding: 0; min-height: 36px; }
.p-vacio { background: #fff; border: 1px dashed var(--borde-2); border-radius: 10px; padding: 24px; color: var(--texto-3); text-align: center; }
.p-informe-enlace, .p-carpeta-enlace { width: 100%; display: flex; border-radius: 6px; text-decoration: none; color: var(--texto); padding: 6px 10px; }
.p-informe-enlace { min-height: 50px; flex-direction: column; justify-content: center; gap: 2px; }
.p-informe-enlace small { font-size: 11px; color: var(--texto-3); }
.p-carpeta-enlace { min-height: 36px; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; }
.p-informe-enlace[aria-current], .p-carpeta-enlace[aria-current] { background: var(--fondo-azul); color: var(--marino); font-weight: 700; }
.p-cab form { min-width: 0; max-width: 100%; }
.p-cab form label { min-width: 0; }
.p-cab form select { min-width: 0; width: 100%; }
@media (max-width: 560px) {
  .entrada__marca { padding: 32px 20px; }
  .entrada__caja { padding: 24px 16px; }
  .entrada__form { padding: 24px 18px; }
  .entrada input.codigo { letter-spacing: 4px; width: 100%; min-width: 0; }
  .p-cab__izq { width: 100%; }
  .p-cab__izq form { flex: 1 1 0; }
  .p-cab__izq form label { flex: 1 1 0; font-size: 0 !important; gap: 0 !important; } /* se oculta la palabra «Empresa», queda el selector */
  .p-cab__izq form select { font-size: 13px; }
}
.p-chip { white-space: normal; }
.p-gestores--movil { display: none; }
@media (max-width: 760px) {
  .p-menu { align-items: center; }
  .p-menu .p-gestores { display: none; }
  .p-gestores.p-gestores--movil { display: grid; margin-top: 16px; }
}
/* Documentos y envíos (fase 2) */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.d-buscar { display: flex; gap: 8px; margin-bottom: 12px; }
.d-buscar input { flex: 1 1 auto; min-width: 0; min-height: 38px; padding: 0 12px; border: 1px solid var(--borde-2); border-radius: 8px; font: 14px var(--cuerpo); }
.d-cabecera { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.d-ruta { margin: 0; font-size: 13px; color: var(--texto-3); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.d-ruta a { color: var(--azul); font-weight: 600; text-decoration: none; }
.d-zip, .d-bajar { font-size: 12.5px; font-weight: 600; color: var(--azul); text-decoration: none; white-space: nowrap; }
.d-carpetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 14px; }
.d-carpeta { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #fff; border: 1px solid var(--borde); border-radius: 10px; text-decoration: none; color: var(--marino); min-height: 56px; }
.d-carpeta:hover { border-color: var(--azul); }
.d-carpeta svg { flex-shrink: 0; color: var(--azul); }
.d-carpeta span:first-of-type { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.d-carpeta b { font-size: 13.5px; overflow-wrap: anywhere; }
.d-carpeta small { font-size: 11.5px; color: var(--texto-3); }
.d-tabla td a { color: var(--texto); text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.d-tabla td a:hover { color: var(--azul); text-decoration: underline; }
.d-gris, .d-tabla td a.d-gris { color: var(--texto-3); font-weight: 500; font-size: 12px; }
.d-nota { font-size: 12.5px; color: var(--texto-3); margin-top: 12px; }
.d-enviar { display: flex; flex-direction: column; gap: 14px; max-width: 640px; margin-bottom: 16px; }
.d-enviar select, .d-enviar textarea, .d-enviar input[type=file] { width: 100%; font: 14px var(--cuerpo); }
.d-enviar select, .d-enviar textarea { padding: 8px 10px; border: 1px solid var(--borde-2); border-radius: 8px; }
.d-enviar input[type=file] { padding: 14px; border: 2px dashed var(--borde-2); border-radius: 10px; background: var(--fondo-suave); }
.d-enviar small { color: var(--texto-3); font-size: 12.5px; margin-top: -8px; }
.d-enviar .boton { align-self: flex-start; }
.d-aviso { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; }
.d-aviso { background: #EAF1FA; color: #1F4070; }
.d-aviso.ok { background: #E7F4EC; color: #1E5B34; }
.d-aviso.error { background: var(--aviso-fondo); color: var(--aviso); }
@media (max-width: 560px) { .d-tabla th:nth-child(4), .d-tabla td:nth-child(4) { display: none; } }
.d-tabla .p-nuevo { margin-left: 6px; }
.p-tabla { overflow-x: auto; }
@media (max-width: 560px) { .d-tabla--busqueda th:nth-child(2), .d-tabla--busqueda td:nth-child(2) { display: none; } }
.p-main { min-width: 0; }
.p-tabla { position: relative; } /* que los textos solo para lectores de pantalla no se salgan de la tabla */
@media (max-width: 760px) { .p-cuerpo { align-content: flex-start; } } /* el menú no se estira cuando la página es corta */
.d-envios td small { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .d-envios thead { display: none; }
  .d-envios tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--borde); }
  .d-envios td { display: block; padding: 2px 0 !important; border: 0 !important; }
  .d-envios td:nth-child(2) { font-weight: 600; }
}

/* Pendiente de usted (08/11/2026) */
.pe-item { scroll-margin-top: 16px; }
.pe-cab { display: flex; align-items: flex-start; gap: 12px; }
.pe-icono { flex: none; width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--fondo-azul); color: var(--marino); }
.pe-icono--incidencias { background: #E7F4EC; color: #1E5B34; }
.pe-icono--pregunta { background: #FFF1E0; color: #9A3412; }
.pe-titulo { flex: 1; min-width: 0; }
.pe-titulo h2 { margin: 0; }
.pe-titulo small { color: var(--texto-3); overflow-wrap: anywhere; }
.pe-texto { margin: 10px 0 12px; color: var(--texto-2, #3A4853); line-height: 1.5; }
.pe-form .campo textarea { width: 100%; }
.pe-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.pe-enlace { font-size: 13px; color: var(--azul); }
.pe-resumen p { margin: 6px 0 12px; color: var(--texto-3); }

/* ── Impuestos al detalle (08/11/2026) ── */
.i-nota { font-size: 12px; color: var(--texto-3); }
.i-gris { color: var(--texto-3); }
.i-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.i-anios { width: fit-content; display: inline-flex; border: 1px solid var(--borde-2); border-radius: 8px; overflow: hidden; }
.i-anios a { padding: 6px 14px; min-height: 32px; font-size: 13px; font-weight: 600; color: var(--marino); text-decoration: none; }
.i-anios a + a { border-left: 1px solid var(--borde-2); }
.i-anios a[aria-current] { background: var(--marino); color: #fff; }
.i-plazos { list-style: none; margin: 0; padding: 0; display: grid; }
.i-plazo { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--borde); }
.i-plazo:first-child { border-top: 0; }
.i-fecha { flex: none; width: 46px; height: 50px; border-radius: 8px; background: var(--fondo-azul); color: var(--marino); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.i-fecha b { font: 800 18px var(--titulos); }
.i-fecha small { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; }
.i-plazo__txt { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.i-plazo__txt b { font-size: 14px; color: var(--marino); }
.i-plazo__txt small { font-size: 12px; color: var(--texto-3); }
.i-plazo__dcha { flex: none; display: grid; justify-items: end; gap: 4px; }
.i-plazo__dcha b { font: 700 15px var(--titulos); color: var(--marino); }
.i-modelos { display: grid; }
.i-modelo { border-top: 1px solid var(--borde); }
.i-modelo:first-child { border-top: 0; }
.i-modelo > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto 110px 16px; align-items: center; gap: 12px; padding: 10px 0; min-height: 52px; }
.i-modelo > summary::-webkit-details-marker { display: none; }
.i-modelo > summary:hover .i-modelo__txt b { text-decoration: underline; }
.i-modelo > summary:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; border-radius: 6px; }
.i-modelo__cod { font: 800 15px var(--titulos); color: var(--marino); }
.i-modelo__txt { display: grid; gap: 2px; min-width: 0; }
.i-modelo__txt b { font-size: 14px; color: var(--marino); }
.i-modelo__txt small { font-size: 12px; color: var(--texto-3); }
.i-modelo__imp { text-align: right; font: 700 14px var(--titulos); color: var(--marino); font-variant-numeric: tabular-nums; }
.i-chev { color: var(--texto-3); transition: transform .2s ease; }
.i-modelo[open] .i-chev { transform: rotate(180deg); }
.i-modelo__det { padding: 0 0 14px 60px; display: grid; gap: 10px; font-size: 14px; color: var(--texto-2); }
.i-idioma > summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--azul); width: fit-content; }
.i-idioma p { margin-top: 6px; }
.i-datos { display: grid; gap: 4px; margin: 0; }
.i-datos div { display: flex; gap: 8px; flex-wrap: wrap; }
.i-datos dt { font-weight: 600; color: var(--marino); }
.i-datos dd { margin: 0; }
.p-tabla table.i-casillas { max-width: 560px; min-width: 0; }
.p-tabla:has(> .i-casillas) { max-width: 560px; }
.i-casillas .i-grupo th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--texto-3); padding-top: 10px; }
.i-casillas .i-total td { border-top: 1px solid var(--borde-2); }
.i-pdf { width: fit-content; }
@media (max-width: 640px) {
  .i-modelo > summary { grid-template-columns: 40px minmax(0, 1fr) auto; row-gap: 4px; }
  .i-modelo__res { grid-column: 2; grid-row: 2; justify-self: start; }
  .i-modelo__imp { grid-column: 3; grid-row: 1; }
  .i-chev { display: none; }
  .i-modelo__det { padding-left: 0; }
  .i-plazo { align-items: flex-start; flex-wrap: wrap; }
  .i-plazo__txt { flex-basis: calc(100% - 58px); }
  .i-plazo__dcha { margin-left: 58px; display: flex; align-items: center; gap: 10px; }
  .p-tabla table.i-casillas th, .p-tabla table.i-casillas td { padding-left: 10px; padding-right: 10px; }
}
@media (prefers-reduced-motion: reduce) { .i-chev { transition: none; } }

/* ── Personal y nóminas (08/11/2026) ── */
.i-fecha--urge { background: #FFF1E0; color: #9A3412; }
.pn-recibos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 20px; }
.pn-mes h3 { font: 700 13px var(--cuerpo); color: var(--marino); text-transform: capitalize; margin-bottom: 4px; }
.pn-mes ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pn-mes a { font-size: 13px; color: var(--azul); overflow-wrap: anywhere; }
.il { gap: 12px; }
.il h3 { font: 700 13px var(--cuerpo); color: var(--azul); margin-top: 6px; }
.il-lista { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; color: var(--texto-2); }
.p-tabla tfoot tr.total td { border-top: 2px solid var(--borde-2); font-weight: 700; background: #F7F9FC; }
.p-tabla td.num, .p-tabla th.num { white-space: nowrap; }
.p-tabla td .p-chip { white-space: nowrap; }
.pn-mesr { border-top: 1px solid var(--borde); padding: 8px 0; }
.pn-mesr:first-of-type { border-top: 0; }
.pn-mesr > summary { cursor: pointer; display: flex; align-items: baseline; gap: 10px; min-height: 36px; padding: 6px 0; color: var(--marino); }
.pn-acciones { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 6px 0 10px; }
.pn-lista { list-style: none; margin: 0; padding: 0; display: grid; }
.pn-lista li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 0; border-top: 1px solid #EEF1F5; font-size: 14px; }
.pn-nombre { flex: 1 1 200px; font-weight: 600; color: var(--marino); }
.pn-lista a { color: var(--azul); font-weight: 600; }
.pn-lista form { margin: 0; }
.pn-enviar { background: none; border: 1px solid var(--borde-2); border-radius: 6px; padding: 6px 10px; min-height: 34px; font: 600 13px var(--cuerpo); color: var(--marino); cursor: pointer; }
.pn-enviar:hover { background: var(--fondo-azul); }
.pn-enviar:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }

/* ── Retoques del resumen (08/11/2026) ── */
.p-destacado i.neu { background: var(--fondo-azul); color: var(--marino); }
.p-barras > div.parcial span { opacity: .45; }
.p-barras > div.parcial .v, .p-barras > div.parcial .g { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.35) 0 3px, transparent 3px 6px); }

/* ── Contabilidad consultable (08/11/2026) ── */
.c-pestanas { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--borde-2); }
.c-pestanas a { padding: 10px 14px; min-height: 40px; font-size: 14px; font-weight: 600; color: var(--texto-2); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.c-pestanas a:hover { color: var(--marino); }
.c-pestanas a[aria-current] { color: var(--marino); border-bottom-color: var(--azul); }
.c-filtros { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.c-filtros .campo { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--texto-3); }
.c-filtros input, .c-filtros select { min-height: 40px; padding: 0 10px; border: 1px solid var(--borde-2); border-radius: 8px; font: 14px var(--cuerpo); color: var(--marino); background: #fff; min-width: 180px; }
.c-filtros input[type=search] { min-width: 260px; }
.c-nif { display: block; font-size: 11px; color: var(--texto-3); }
.c-saldos { background: #fff; border: 1px solid #E1E6EE; border-radius: 10px; overflow: hidden; font-size: 13px; }
.c-fila { display: grid; grid-template-columns: minmax(0, 1fr) 130px 130px 130px; gap: 10px; padding: 9px 14px; align-items: center; border-top: 1px solid #EEF1F5; }
.c-fila .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.c-cab { background: #F7F9FC; color: var(--texto-3); font-weight: 600; border-top: 0; }
.c-grupo > summary { list-style: none; cursor: pointer; color: var(--marino); }
.c-grupo > summary::-webkit-details-marker { display: none; }
.c-grupo > summary > span:first-child::before { content: "▸"; display: inline-block; width: 16px; color: var(--texto-3); }
.c-grupo[open] > summary > span:first-child::before { content: "▾"; }
.c-cuenta { text-decoration: none; color: var(--texto-2); padding-left: 32px; background: #FBFCFE; }
.c-cuenta:hover { background: var(--fondo-azul); color: var(--marino); }
.c-total { font-weight: 700; background: #F7F9FC; border-top: 2px solid var(--borde-2); color: var(--marino); }
.c-candidatas { list-style: none; margin: 0; padding: 0; columns: 2 260px; }
.c-candidatas li { padding: 4px 0; }
.c-candidatas a { color: var(--azul); }
@media (max-width: 640px) {
  .c-fila { grid-template-columns: minmax(0, 1fr) 110px; }
  .c-fila > :nth-child(2), .c-fila > :nth-child(3) { display: none; }
  .c-filtros input[type=search], .c-filtros select, .c-filtros input { min-width: 0; width: 100%; }
  .c-filtros .campo { flex: 1 1 100%; }
}

/* ── P y G desplegable (08/11/2026) ── */
.py-btn { border: 0; background: none; font: inherit; color: var(--tinta); cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 7px; text-align: left; }
.py-btn::before { content: "▸"; color: var(--texto-3); font-size: 11px; transition: transform .15s ease; }
.py-btn[aria-expanded="true"]::before { transform: rotate(90deg); }
.py-btn[aria-expanded="true"] { font-weight: 700; }
.py-btn:hover { color: var(--t-azul); }
.py-suave { color: var(--texto-2); font-size: 12px; }

/* Condiciones de uso (11/11/2026): una columna de lectura cómoda, el pie con la casilla siempre al final */
.condiciones { max-width: 760px; margin: 0 auto; padding: 32px 16px 48px; display: flex; flex-direction: column; gap: 20px; }
.condiciones__cabecera { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.condiciones__cabecera h1 { font-size: clamp(24px, 3.4vw, 32px); margin: 0 0 4px; }
.condiciones__cabecera p { margin: 0; color: var(--texto-3); }
.condiciones__texto { background: #fff; border: 1px solid var(--borde); border-radius: 16px; padding: 24px 28px; line-height: 1.6; font-size: 15px; }
.condiciones__texto h2 { font-size: 17px; margin: 22px 0 6px; }
.condiciones__texto h2:first-child { margin-top: 0; }
.condiciones__texto ul { padding-left: 22px; }
.condiciones__pie { background: #fff; border: 1px solid var(--borde); border-radius: 16px; padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.condiciones__casilla { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; cursor: pointer; }
.condiciones__casilla input { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.condiciones__botones { display: flex; gap: 12px; flex-wrap: wrap; }
.condiciones__pie small { color: var(--texto-3); font-size: 13px; }
.p-condiciones { font-size: 12px; color: var(--texto-3); padding: 8px 12px; }
/* Panel personalizado */
.p-panel-enlace { max-width: 620px; display: flex; flex-direction: column; gap: 14px; }
.p-panel-enlace .p-btn { align-self: flex-start; }
.condiciones__texto p { margin: 0 0 10px; }

/* Barra de periodo de Contabilidad (11/11/2026) */
.c-periodo { background: #fff; border: 1px solid var(--borde); border-radius: 16px; padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-end; }
.c-periodo .campo { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--texto-3); }
.c-periodo select, .c-periodo input[type=date] { min-height: 36px; border: 1px solid var(--borde-2); border-radius: 8px; padding: 0 10px; font: 600 13.5px var(--cuerpo); color: var(--marino); background: #fff; }
.c-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--borde-2); border-radius: 8px; overflow: hidden; }
.c-seg label { position: relative; cursor: pointer; }
.c-seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.c-seg span { display: block; padding: 7px 12px; min-height: 36px; font-size: 13px; font-weight: 600; color: var(--marino); border-left: 1px solid var(--borde-2); }
.c-seg label:first-child span { border-left: 0; }
.c-seg input:checked + span { background: var(--marino); color: #fff; }
.c-seg input:focus-visible + span { outline: 2px solid var(--azul); outline-offset: -2px; }
.c-resumen-periodo { font-size: 13px; color: var(--texto-2); margin: 0; }
.c-resumen-periodo b { color: var(--marino); }

/* Recibos de nómina por mes (11/11/2026) */
.pn-barra { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; justify-content: space-between; }
.pn-mes { display: flex; gap: 8px; align-items: flex-end; }
.pn-mes .campo { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--texto-3); }
.pn-mes select, .pn-idioma select { min-height: 36px; border: 1px solid var(--borde-2); border-radius: 8px; padding: 0 10px; font: 600 13.5px var(--cuerpo); color: var(--marino); background: #fff; }
.pn-idioma { display: flex; gap: 6px; align-items: center; }
.pn-tabla td { vertical-align: middle; }
.pn-tabla td .p-chip { margin-top: 4px; }
.pn-tabla form { display: inline-flex; }

/* Tesorería: importes mes a mes (11/11/2026) */
.te-meses > summary { cursor: pointer; font-weight: 700; font-size: 13.5px; color: var(--marino); min-height: 32px; padding: 6px 0; }

/* Móvil: el menú en fila se desplaza dentro de su franja; antes ensanchaba toda la página (11/11/2026) */
@media (max-width: 860px) {
  .p-cuerpo { max-width: 100vw; overflow-x: clip; }
  .p-menu { max-width: 100%; min-width: 0; }
  .p-main { min-width: 0; max-width: 100%; }
}

/* Contabilidad analítica (12/11/2026) */
.an { display: flex; flex-direction: column; gap: 16px; }
.an-n { margin-left: 6px; min-width: 19px; padding: 2px 6px; border-radius: 99px; background: var(--t-flama-f); color: var(--t-flama); font-size: 11px; font-weight: 800; }
.an-subida { position: relative; display: flex; gap: 10px; align-items: center; }
.an-drop { position: relative; flex: 1; display: block; border: 2px dashed var(--borde-2); border-radius: 14px; padding: 16px 18px; text-align: center; color: var(--texto-2); font-size: 13.5px; background: #fff; cursor: pointer; }
.an-drop b { color: var(--marino); }
.an-drop input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.an-drop.encima, .an-drop:focus-within { border-color: var(--azul); background: var(--fondo-azul); }
.an-drop.subiendo { opacity: .7; pointer-events: none; }
.an-trabajo { display: grid; grid-template-columns: 270px minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.an-trabajo--dos { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 16px; }
.an-trabajo--lista { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); }
@media (max-width: 1300px) { .an-trabajo { grid-template-columns: 250px minmax(0, 1fr); } .an-trabajo > .an-form { grid-column: 1 / -1; } }
@media (max-width: 860px) { .an-trabajo, .an-trabajo--dos, .an-trabajo--lista { grid-template-columns: 1fr; } }
.an-bandeja { background: #fff; border: 1px solid var(--borde); border-radius: 16px; display: flex; flex-direction: column; max-height: 880px; overflow: hidden; }
.an-filtro { display: flex; gap: 4px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--borde); }
.an-filtro a { border: 1px solid var(--borde-2); border-radius: 99px; padding: 3px 10px; font-size: 11.5px; font-weight: 700; color: var(--marino); text-decoration: none; }
.an-filtro a[aria-current] { background: var(--marino); color: #fff; border-color: var(--marino); }
.an-items { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; }
.an-item { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: start; padding: 9px 12px; border-bottom: 1px solid #EEF1F5; font-size: 12.8px; }
.an-item input { margin-top: 3px; width: 16px; height: 16px; }
.an-item a { text-decoration: none; color: inherit; min-width: 0; }
.an-item a b { display: block; color: var(--tinta); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-item small { color: var(--texto-3); }
.an-item:hover { background: #F6F8FB; }
.an-item[aria-current] { background: var(--fondo-azul); box-shadow: inset 3px 0 0 var(--azul); }
.an-item-vacio { padding: 14px; color: var(--texto-3); font-size: 13px; }
.an-pt { width: 8px; height: 8px; border-radius: 9px; display: inline-block; margin-right: 5px; vertical-align: 1px; background: #C2CAD6; }
.an-pt-clasificada { background: var(--t-teal); } .an-pt-rechazada { background: var(--t-flama); } .an-pt-pendiente { background: #E0A320; }
.an-masivo { padding: 10px 12px; border-top: 1px solid var(--borde); background: #F6F8FB; display: flex; flex-wrap: wrap; gap: 6px; }
.an-mini { border: 1px solid var(--borde-2); background: #fff; border-radius: 8px; padding: 5px 10px; font: 600 12.5px var(--cuerpo); color: var(--marino); cursor: pointer; min-height: 32px; }
.an-mini.no { color: #8A2E12; }
.an-visor { background: #fff; border: 1px solid var(--borde); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; min-height: 640px; }
.an-visor-cab { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--borde); font-size: 13px; }
.an-visor-cab b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-visor iframe { flex: 1; width: 100%; min-height: 600px; border: 0; background: #E9EDF3; }
.an-imagen { flex: 1; background: #E9EDF3; padding: 14px; display: flex; justify-content: center; align-items: flex-start; overflow: auto; }
.an-imagen img { max-width: 100%; height: auto; box-shadow: 0 2px 10px rgba(16, 35, 59, .12); }
.an-form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.an-bloque { background: #fff; border: 1px solid var(--borde); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.an-bloque h3 { margin: 0; font-size: 14.5px; color: var(--marino); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.an-fila { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.an-campo { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--texto-3); min-width: 0; }
.an-campo select, .an-campo input, .an-campo textarea { min-height: 36px; border: 1px solid var(--borde-2); border-radius: 8px; padding: 0 10px; font: 500 13.5px var(--cuerpo); color: var(--tinta); background: #fff; width: 100%; box-sizing: border-box; }
.an-campo textarea { padding: 8px 10px; min-height: 64px; resize: vertical; }
.an-cuenta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 10px; }
@media (max-width: 560px) { .an-cuenta { grid-template-columns: 1fr; } }
.an-reparto { border: 1px solid var(--borde); border-radius: 12px; padding: 10px 12px 12px; display: grid; gap: 10px; margin: 0; }
.an-reparto legend { font-size: 12px; font-weight: 700; color: var(--texto-3); padding: 0 4px; }
.an-modo { display: flex; gap: 16px; font-size: 13.5px; font-weight: 600; color: var(--marino); }
.an-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--texto-2); }
.an-check input { width: 18px; height: 18px; margin-top: 1px; flex: none; }
.an-suma { font-size: 13px; font-weight: 700; color: var(--t-teal); min-height: 1em; }
.an-suma.mal { color: var(--t-flama); }
.an-link { background: none; border: 0; color: var(--azul); font: 700 13px var(--cuerpo); cursor: pointer; padding: 0; text-align: left; }
.an-sugerencia { background: var(--fondo-azul); color: var(--marino); border-radius: 10px; padding: 9px 12px; font-size: 12.8px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.an-sugerencia a { font-weight: 700; white-space: nowrap; }
.an-aviso { background: #FDEDE8; color: #8A2E12; border-radius: 10px; padding: 9px 12px; font-size: 13px; }
.an-botones { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.an-botones.izq { justify-content: flex-start; margin-top: 10px; }
.an-quien { text-align: right; margin: 0; }
.an-estado { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.e-pend { background: #FFF1D6; color: #7A4C00; } .e-apr { background: #DDF2EC; color: #0B5A47; } .e-rech { background: #FDE3DC; color: #8A2E12; }
.e-desp { background: #E3ECF8; color: #1F4070; } .e-cont { background: #E8E2F7; color: #4B2E8A; } .e-borr { background: #EEF0F3; color: #4A5563; }
.an-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.an-tag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: #EEF2F7; color: #334155; }
.an-lista tr[aria-current] td { background: var(--fondo-azul); }
.an-datos { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; font-size: 13px; }
.an-datos dt { color: var(--texto-3); font-weight: 600; } .an-datos dd { margin: 0; }
.an-hist { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--borde-2); display: grid; gap: 10px; font-size: 12.8px; }
.an-hist b { color: var(--marino); }
.an-auto { margin-left: 6px; padding: 1px 7px; border-radius: 99px; background: #FFF1D6; color: #7A4B00; font-size: 11.5px; font-weight: 600; }
.an-tabla-marco { overflow-x: auto; margin: 6px 0 2px; }
.an-tabla { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.an-tabla th { text-align: left; font-weight: 600; color: var(--texto-2, #5b6472); border-bottom: 1px solid var(--borde-2); padding: 4px 8px 4px 0; white-space: nowrap; }
.an-tabla td { padding: 4px 8px 4px 0; border-bottom: 1px solid var(--borde-2); vertical-align: top; }
.an-tabla .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ───────────── Facturador (fase 1: maestros) ───────────── */
.fa { display: grid; gap: 16px; }
.fa .d-aviso ul { margin: 6px 0 0; padding-left: 18px; }
.fa-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.fa-kpi { background: #fff; border: 1px solid var(--borde); border-radius: 16px; padding: 14px 16px; display: grid; gap: 2px; align-content: start; }
.fa-kpi small { color: var(--texto-3); font-size: 12px; font-weight: 600; }
.fa-kpi b { font-size: 24px; color: var(--marino); font-variant-numeric: tabular-nums; }
.fa-kpi span { font-size: 12.5px; color: var(--texto-2); }
.fa-kpi--aviso { background: #FFF7E0; border-color: #F1D98A; }
.fa-kpi--aviso b { font-size: 16px; color: #5A4500; }
.fa-dos { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.fa-tres { display: grid; grid-template-columns: 210px minmax(0, 1.4fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1300px) { .fa-tres { grid-template-columns: 210px minmax(0, 1fr); } .fa-tres > .an-form { grid-column: 1 / -1; } }
@media (max-width: 1100px) { .fa-dos, .fa-tres { grid-template-columns: minmax(0, 1fr); } .fa-tres > .an-form { grid-column: auto; } }
.fa-col { display: grid; gap: 12px; min-width: 0; align-content: start; }
.fa .an-form { min-width: 0; }
.fa-col > .an-filtro { padding: 0; border: 0; }
.fa-barra { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fa-barra--fin { justify-content: flex-end; }
.fa-barra input[type=search] { min-height: 36px; border: 1px solid var(--borde-2); border-radius: 8px; padding: 0 10px; font: 500 13.5px var(--cuerpo); flex: 1; min-width: 160px; background: #fff; color: var(--tinta); }
.fa-lista td { vertical-align: middle; }
.fa-lista td small { color: var(--texto-3); display: block; }
.fa-lista td a { color: var(--tinta); text-decoration: none; }
.fa-lista td a:hover b { text-decoration: underline; }
.fa-lista tr[aria-current] td { background: var(--fondo-azul); }
.fa-lista .num, .fa .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.an-estado--ok { background: #DDF2EC; color: #0B5A47; }
.an-estado--pend { background: #FFF1D6; color: #7A4C00; }
fieldset.an-bloque { min-width: 0; margin: 0; }
fieldset.an-bloque:disabled input, fieldset.an-bloque:disabled select, fieldset.an-bloque:disabled textarea { background: #F6F8FB; color: var(--texto-2); }
.fa-ancho2 { grid-column: span 2; }
@media (max-width: 520px) { .fa-ancho2 { grid-column: auto; } }
.fa-sage { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: #E8E2F7; color: #4B2E8A; white-space: nowrap; }
.fa-comprobado { font-size: 12px; font-weight: 700; color: #0B5A47; min-height: 1em; }
.fa-comprobado.mal, .fa-mal { color: #8A2E12; font-size: 12px; font-weight: 700; }
.fa-antes { order: -1; }
.fa-arbol { display: grid; gap: 2px; }
.fa-arbol a { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 8px; font: 600 13px var(--cuerpo); color: var(--marino); text-decoration: none; }
.fa-arbol a.h { padding-left: 22px; font-weight: 500; }
.fa-arbol a:hover, .fa-arbol a[aria-current] { background: var(--fondo-azul); }
.fa-arbol a span { color: var(--texto-3); font-variant-numeric: tabular-nums; }
.fa-mini { display: flex; gap: 6px; }
.fa-mini input { min-height: 34px; border: 1px solid var(--borde-2); border-radius: 8px; padding: 0 8px; font: 500 13px var(--cuerpo); min-width: 0; flex: 1; }
.fa-simple { margin: 0; padding-left: 18px; font-size: 13px; color: var(--texto-2); }
.fa-mas summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--azul); }
.fa-mas[open] { display: grid; gap: 10px; }
.fa-ejemplo { background: var(--fondo-azul); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--marino); }
.fa-ejemplo b { font-size: 16px; font-variant-numeric: tabular-nums; }
.fa-venc { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; font-variant-numeric: tabular-nums; }
.fa-venc li { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid #EEF1F5; padding: 3px 0; }
.fa-pasos { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; }
.fa-pasos li { display: flex; gap: 10px; align-items: flex-start; }
.fa-pasos i { width: 20px; height: 20px; border-radius: 99px; flex: none; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800; background: #EEF2F7; color: #64748B; }
.fa-pasos .si i { background: #DDF2EC; color: #0B5A47; }
.fa-datos { margin: 0; display: grid; grid-template-columns: minmax(110px, auto) minmax(0, 1fr); gap: 6px 12px; font-size: 13px; }
.fa-datos dt { color: var(--texto-3); font-weight: 600; }
.fa-datos dd { margin: 0; color: var(--tinta); }
.fa-datos small { color: var(--texto-3); }
.fa-traer { list-style: none; margin: 0; padding: 0; max-height: 460px; overflow: auto; display: grid; gap: 2px; }
.fa-traer label { display: flex; gap: 10px; align-items: flex-start; padding: 6px 4px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.fa-traer label:hover { background: #F6F8FB; }
.fa-traer input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.fa-traer small { display: block; color: var(--texto-3); }
.fa-nota-sage { background: #F1ECFB; border: 1px solid #D9CCF3; color: #3B2470; border-radius: 12px; padding: 12px 16px; font-size: 13.5px; line-height: 1.55; }
.fa-rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.fa-arbol a.h2 { padding-left: 36px; } .fa-arbol a.h3 { padding-left: 50px; } .fa-arbol a.h4 { padding-left: 64px; }
.fa-mini { flex-wrap: wrap; } .fa-mini input { flex: 1 1 120px; }

/* ───────────── Facturador (fase 2: facturas) ───────────── */
.fc-ed { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
@media (max-width: 1150px) { .fc-ed { grid-template-columns: minmax(0, 1fr); } }
.fc-marco { overflow-x: auto; }
.fc-lin { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 780px; }
.fc-lin th { text-align: left; font-size: 11.5px; color: var(--texto-3); font-weight: 700; padding: 4px 6px; border-bottom: 1px solid var(--borde); }
.fc-lin td { padding: 4px; border-bottom: 1px solid #EEF1F5; vertical-align: top; }
.fc-lin input, .fc-lin select { width: 100%; min-height: 34px; border: 1px solid var(--borde-2); border-radius: 8px; padding: 0 8px; font: 500 13px var(--cuerpo); box-sizing: border-box; background: #fff; color: var(--tinta); }
.fc-lin .n { text-align: right; font-variant-numeric: tabular-nums; }
.fc-lin .imp { text-align: right; font-weight: 700; padding-top: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fc-lin tr.sup td { background: #FBF7EC; }
.fc-lin tr.sup .an-tag { display: inline-block; margin-top: 7px; background: #F1E4BD; color: #5A4500; }
.fc-c1 { width: 92px; } .fc-c2 { width: 56px; } .fc-c3 { width: 86px; } .fc-c4 { width: 98px; }
.fc-lin input, .fc-lin select { padding: 0 6px; }
.fc-botones .boton:disabled { opacity: .5; cursor: default; }
.fc-raya { display: block; padding: 8px; color: var(--texto-3); }
.fc-mas { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.fc-izq { align-self: flex-start; }
.fc-tot { display: grid; gap: 5px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.fc-tot div { display: flex; justify-content: space-between; gap: 10px; }
.fc-tot div b, .fc-tot div span:last-child { white-space: nowrap; }
.fc-tot .g { border-top: 1px solid var(--borde); padding-top: 8px; margin-top: 4px; font-size: 17px; font-weight: 800; color: var(--marino); }
.fc-cli { background: var(--fondo-azul); border-radius: 10px; padding: 10px 12px; font-size: 12.8px; color: var(--marino); line-height: 1.5; }
.fc-exp { background: #FFF7E0; border: 1px solid #F1D98A; border-radius: 14px; padding: 14px 16px; display: grid; gap: 10px; font-size: 13.5px; color: #4A3900; }
.fc-faltan { background: #FDEDE8; border-color: #F3C9BC; }
.fc-faltan h3, .fc-faltan .fa-simple { color: #8A2E12; }
.fc-reg { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; font-weight: 500; word-break: break-all; color: #334155; background: #F4F6FA; border-radius: 8px; padding: 8px 10px; }
.fc-dato { color: var(--tinta); font-size: 13.5px; }
.fc-nota { font-size: 12.5px; color: var(--texto-3); margin: 0; }
.fc-centro { align-items: center; text-align: center; }
.fc-qr { display: grid; justify-items: center; gap: 2px; font-size: 11px; color: var(--tinta); }
.fc-qr svg { width: 132px; height: 132px; background: #fff; }
.fc-botones { display: grid; gap: 8px; }
.fc-botones .boton, .fc-botones form .boton { width: 100%; justify-content: center; text-align: center; box-sizing: border-box; }
.fc-botones form { display: grid; }
.fc-descartar { color: #8A2E12; text-align: center; padding: 6px 0; }
.fc-volver { font-size: 13px; font-weight: 700; color: var(--azul); text-decoration: none; }
.fc-sinborde { border: 0; }
/* Facturador, fase 5: rectificativas, tickets y anulación */
.fc-leyenda { font-size: 15px; font-weight: 800; color: var(--marino); padding: 0; margin-bottom: 4px; }
.fc-opciones { display: grid; gap: 8px; }
.fc-opcion { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 12px; border: 1.5px solid var(--borde); border-radius: 12px; cursor: pointer; font-size: 13.5px; color: var(--tinta); }
.fc-opcion input { width: 18px; height: 18px; margin-top: 1px; }
.fc-opcion small { display: block; font-size: 12px; color: var(--texto-3); margin-top: 2px; font-weight: 500; }
.fc-opcion:has(input:checked) { border-color: var(--azul); background: var(--fondo-azul); }
.fc-opcion:has(input:focus-visible) { outline: 2px solid var(--azul); outline-offset: 2px; }
.fc-requisitos { background: #FFF7E0; border-radius: 10px; padding: 10px 12px; color: #4A3900; }
.fc-rapidos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.fc-rapido { display: grid; gap: 2px; min-height: 52px; padding: 8px 10px; border: 1.5px solid var(--borde); border-radius: 12px; background: var(--surface); font: 700 13px var(--cuerpo); color: var(--marino); text-align: center; cursor: pointer; }
.fc-rapido small { font-weight: 500; font-size: 11.5px; color: var(--texto-3); }
.fc-rapido:hover { border-color: var(--azul); }
.fc-limite { height: 6px; border-radius: 99px; background: var(--borde); overflow: hidden; margin-top: 4px; }
.fc-limite span { display: block; height: 100%; background: #1E7A5A; border-radius: 99px; }
.fc-limite.pasa span { background: #B4441D; }
.fc-anular { background: #FFF7E0; border: 1px solid #F1D98A; margin-bottom: 16px; color: #4A3900; font-size: 13.5px; }
.fc-anular p, .fc-anular ol { margin: 0; }
.boton.fc-peligro { background: #8A2E12; border-color: #8A2E12; }

/* Facturador, fase 6: secciones, opcionales, fotos, presupuestos y recurrentes */
.fc-lin tr.fc-sec td { background: #EEF3FA; }
.fc-lin tr.fc-sub td { background: #F6F8FB; }
.fc-lin tr.fc-sec input[name=l_desc], .fc-lin tr.fc-sub input[name=l_desc] { font-weight: 800; color: var(--marino); background: transparent; border-color: transparent; width: calc(100% - 40px); }
.fc-lin tr.fc-sec input[name=l_desc]:focus, .fc-lin tr.fc-sub input[name=l_desc]:focus { border-color: var(--azul); background: #fff; }
.fc-lin tr.fc-sub td:nth-child(2) { padding-left: 18px; }
.fc-num { font-weight: 800; color: var(--marino); margin-right: 6px; font-size: 12px; }
.fc-lin tr.fc-st .imp { padding-top: 4px; }
.fc-lin:has(.fc-mini) .fc-c1 { width: 118px; }
.fc-lin tr.fc-st td { font-weight: 700; color: #334155; text-align: right; border-bottom: 1px solid var(--borde); }
.fc-lin tr.opc td input, .fc-lin tr.opc td select { color: #6B7280; background: #FFFBF0; }
.fc-c0, .fc-mover { width: 18px; } .fc-mover { white-space: nowrap; padding-left: 0 !important; padding-right: 0 !important; }
.fc-mover .fc-flecha { display: block; padding: 1px 2px; }
.fc-lin { min-width: 700px; }
.fc-flecha { border: 0; background: none; color: #94A3B8; cursor: pointer; padding: 0 2px; font-size: 12px; line-height: 1; }
.fc-flecha:hover { color: var(--azul); }
.fc-pro { display: flex; gap: 4px; align-items: center; }
.fc-mini { width: 28px; height: 28px; object-fit: cover; border-radius: 6px; flex: none; }
.fc-imagenes { margin-left: auto; }
.fa-foto { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.fa-foto img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--borde); }
.pr-barra { height: 8px; border-radius: 9px; background: #EEF1F5; overflow: hidden; }
.pr-barra i { display: block; height: 100%; background: #0E7A8E; }
.pr-hilo { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 12.5px; }
.pr-hilo li { display: grid; grid-template-columns: 10px 1fr; gap: 8px; }
.pr-hilo li::before { content: ""; width: 8px; height: 8px; border-radius: 9px; background: var(--azul); margin-top: 5px; }
.pr-hilo small { display: block; color: var(--texto-3); }
.pr-ver { display: flex; justify-content: space-between; gap: 8px; border: 1px solid var(--borde-2); border-radius: 10px; padding: 7px 10px; font-size: 12.5px; }
.pr-ver.act { border-color: var(--azul); background: var(--fondo-azul); }
.fa-sub { display: block; font-size: 11.5px; color: var(--texto-3); font-weight: 500; margin-top: 1px; }
.pr-firma { display: block; max-width: 260px; width: 100%; border: 1px dashed var(--borde-2); border-radius: 10px; background: #fff; }
.fc-ver td { vertical-align: middle; }
.fc-ver input { max-width: 110px; }
/* Página pública del presupuesto (sin el marco del área) */
.pp { max-width: 1120px; margin: 0 auto; padding: 18px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 14px; font-size: 14px; }
.pp-aviso { justify-self: start; background: #FFF4DB; color: #7A4B00; border-radius: 99px; padding: 3px 12px; font-size: 12px; font-weight: 700; }
.pp-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pp-cab small { display: block; color: var(--texto-3); font-size: 12px; }
.pp-cab b { font-size: 18px; color: var(--marino); }
.pp-rejilla { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
@media (max-width: 900px) { .pp-rejilla { grid-template-columns: minmax(0, 1fr); } }
.pp-caja { background: #fff; border: 1px solid var(--borde); border-radius: 16px; padding: 18px 20px; display: grid; gap: 12px; min-width: 0; }
.pp-centro { max-width: 560px; justify-self: center; text-align: center; margin-top: 40px; }
.pp-titulo { display: flex; justify-content: space-between; gap: 10px; align-items: start; flex-wrap: wrap; }
.pp h1 { font-size: 21px; margin: 0; color: var(--marino); }
.pp h2 { font-size: 15px; margin: 0 0 4px; color: var(--marino); }
.pp-sub { color: var(--texto-3); font-size: 12.5px; margin: 0; }
.pp-para { margin: 0; }
.pp-tabla { overflow-x: auto; }
.pp-lin { width: 100%; border-collapse: collapse; font-size: 13px; }
.pp-lin th { text-align: left; font-size: 11.5px; color: var(--texto-3); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--borde); }
.pp-lin td { padding: 7px 8px; border-bottom: 1px solid #EEF1F5; vertical-align: top; }
.pp-lin .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pp-lin tr.pp-sec td { background: #EEF3FA; font-weight: 800; color: var(--marino); }
.pp-lin tr.pp-subs td { background: #F6F8FB; font-weight: 700; color: var(--marino); padding-left: 18px; }
.pp-lin tr.pp-st td { text-align: right; font-weight: 700; color: #334155; }
.pp-lin tr.pp-opc td { color: #5B6675; background: #FFFBF0; }
.pp-elige { display: flex; gap: 8px; align-items: start; cursor: pointer; }
.pp-elige input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.pp-tot { justify-self: end; min-width: 260px; display: grid; gap: 3px; font-size: 13px; }
.pp-tot div { display: flex; justify-content: space-between; gap: 18px; }
.pp-tot .g { font-size: 18px; font-weight: 800; color: var(--marino); border-top: 1px solid var(--borde); padding-top: 6px; margin-top: 3px; }
.pp-cond p { white-space: pre-line; margin: 0; color: #334155; }
.pp-lado { position: sticky; top: 14px; }
.pp-form { display: grid; gap: 10px; }
.pp-lienzo { display: block; width: 100%; height: 150px; border: 1px dashed var(--borde-2); border-radius: 10px; background: #FBFCFE; touch-action: none; cursor: crosshair; }
.pp-lienzo.mal { border-color: #B42318; background: #FFF6F5; }
.pp-firma-pie { display: flex; justify-content: space-between; font-size: 12px; color: var(--texto-3); margin-top: 4px; }
.pp-rechazo summary { cursor: pointer; color: var(--texto-3); font-size: 13px; }
.pp-pie { color: var(--texto-3); font-size: 11.5px; text-align: center; }
.re-tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.re-tarjeta { border: 1px solid var(--borde); border-radius: 12px; background: #fff; padding: 11px 13px; display: grid; gap: 3px; font-size: 12.5px; text-decoration: none; color: inherit; }
.re-tarjeta b { color: var(--marino); }
.re-tarjeta .p { font-size: 17px; font-weight: 800; color: var(--marino); font-variant-numeric: tabular-nums; }
.re-tarjeta small { color: var(--texto-3); }
.re-tarjeta[aria-current] { border-color: var(--azul); background: var(--fondo-azul); }

/* ── Vista compacta del Facturador y de los paneles de trabajo (Dani, 13/11/2026): bastante más densa que el resto. Solo en pantallas
   grandes; en el móvil siguen los tamaños táctiles. ── */
@media (min-width: 861px) {
  .an-tabs button { min-height: 32px; padding: 6px 11px; font-size: 12.8px; }
  .an-form { gap: 10px; }
  .an-bloque { padding: 11px 13px; gap: 8px; border-radius: 12px; }
  .an-bloque h3 { font-size: 13.3px; }
  .an-fila { gap: 8px; }
  .an-campo { font-size: 11.3px; gap: 3px; }
  .an-campo select, .an-campo input, .an-campo textarea { min-height: 29px; font-size: 12.4px; padding: 0 8px; }
  .an-campo textarea { padding: 6px 8px; min-height: 48px; }
  .an-check { font-size: 12.5px; }
  .an-mini { min-height: 28px; padding: 3px 9px; font-size: 12px; }
  .fc-lin { font-size: 12.2px; }
  .fc-lin th { font-size: 10.8px; padding: 3px 5px; }
  .fc-lin td { padding: 2px 3px; }
  .fc-lin input, .fc-lin select { min-height: 28px; font-size: 12.2px; padding: 0 6px; }
  .fc-lin .imp { padding-top: 7px; }
  .fc-tot { font-size: 12.6px; gap: 4px; }
  .fc-tot .g { font-size: 15px; }
  .fc-cli, .fc-nota { font-size: 12.2px; }
  .fa-lista td, .fa-lista th { padding-top: 5px; padding-bottom: 5px; }
  .fc-opcion { padding: 7px 10px; font-size: 12.8px; }
  .fc-rapido { min-height: 44px; font-size: 12.3px; }
  .an-estado { font-size: 11px; }
}

/* ── Facturador, fase 7: pedidos, albaranes y stock ── */
.al-mini { display: inline-block; width: 54px; height: 6px; vertical-align: middle; margin-right: 6px; }
.al-movil { max-width: 520px; margin: 0 auto; display: grid; gap: 12px; }
.al-movil .pp-form { background: #fff; border: 1px solid #E4E8EE; border-radius: 16px; padding: 18px; }
.al-movil h2 { margin: 0; font-size: 18px; }
.al-lineas { display: grid; gap: 0; border-top: 1px solid #EEF1F5; margin: 4px 0 6px; }
.al-lineas div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #EEF1F5; font-size: 14px; }
.al-lineas b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.al-movil .boton { min-height: 48px; }

/* ── Facturador: ticket de 80 mm ── */
.fa-80 { font-size: 11px; font-weight: 700; color: var(--t-azul, #2F64A8); text-decoration: none; border: 1px solid currentColor; border-radius: 6px; padding: 0 5px; margin-left: 2px; }
.fa-logo { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.fa-logo .muestra { width: 150px; height: 60px; border: 1px dashed #D5DBE3; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #fff; overflow: hidden; }
.fa-logo .muestra img { max-width: 140px; max-height: 52px; }
.fa-ticket fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

/* ── Editor de conceptos v2 (maqueta aprobada: artifact 4rN9TN8icRdLDpe35SUrD7): compacto, filas que se arrastran, menú ⋮, totales por sección ── */
.fc-lin2 { font-size: 12px; min-width: 640px; table-layout: fixed; }
.fc-lin2 .fc-c1 { width: 70px; } .fc-lin2 .fc-c2 { width: 46px; } .fc-lin2 .fc-c3 { width: 76px; } .fc-lin2 .fc-c4 { width: 72px; }
.fc-lin2 th.fc-c0 { width: 18px; } .fc-lin2 th.fc-c0:last-child { width: 24px; }
.fc-lin2:has(.fc-mini) .fc-c1 { width: 96px; }
.fc-lin2 th { font-size: 10.5px; padding: 3px 4px; font-weight: 600; }
.fc-lin2 td { padding: 1px 3px; vertical-align: middle; border-bottom-color: #EEF1F5; }
.fc-lin2 input, .fc-lin2 select, .fc-lin2 textarea { min-height: 26px; font: 500 12px var(--cuerpo); border: 1px solid transparent; border-radius: 5px; padding: 0 5px; background: transparent; color: var(--tinta); width: 100%; box-sizing: border-box; }
.fc-lin2 input:hover, .fc-lin2 select:hover, .fc-lin2 textarea:hover { border-color: var(--borde-2); }
.fc-lin2 input:focus, .fc-lin2 select:focus, .fc-lin2 textarea:focus { outline: none; border-color: var(--azul); background: #fff; }
.fc-lin2 .imp { padding-top: 0; font-weight: 600; font-size: 12px; line-height: 1.2; }
.fc-lin2 .fc-c0 { width: 18px; }
.fc-asa { width: 18px; padding: 0 !important; text-align: center; }
.fc-agarre { display: inline-block; cursor: grab; color: #9AA5B1; font-size: 12px; letter-spacing: -2px; padding: 4px 3px; border-radius: 4px; user-select: none; line-height: 1; }
.fc-agarre:hover, .fc-agarre:focus-visible { color: var(--azul); background: #EEF2F8; outline: none; }
.fc-agarre:active { cursor: grabbing; }
.fc-acc { width: 24px; padding: 0 !important; text-align: center; }
.fc-menu-b { width: 22px; height: 22px; border: 0; background: transparent; color: #5B6675; cursor: pointer; font-size: 15px; line-height: 1; border-radius: 5px; }
.fc-menu-b:hover, .fc-menu-b:focus-visible { background: #EEF2F8; outline: none; }
.fc-lin2 tr.fc-sec td { background: #E9EEF6; }
.fc-lin2 tr.fc-sub td { background: #F4F6FA; }
.fc-lin2 tr.fc-sub td:nth-child(2) { padding-left: 3px; }
.fc-lin2 tr.fc-sub .fc-tit { padding-left: 16px; }
.fc-tit { display: flex; align-items: center; gap: 4px; }
.fc-tit input[name=l_desc] { width: auto !important; flex: 1; font-weight: 800 !important; color: var(--marino) !important; font-size: 12.5px !important; }
.fc-lin2 tr.fc-sub .fc-tit input[name=l_desc] { font-size: 12px !important; font-weight: 700 !important; }
.fc-plegar { border: 0; background: transparent; color: var(--marino); cursor: pointer; width: 18px; font-size: 11px; padding: 0; }
.fc-num { font-weight: 800; color: var(--marino); font-size: 12px; white-space: nowrap; }
.fc-num:empty { display: none; }
.fc-totsec { font-weight: 800 !important; color: var(--marino); }
.fc-oculta { background: transparent !important; border: 1px solid #D5DBE3; color: #5B6675 !important; font-size: 10px; white-space: nowrap; }
.fc-desc { display: flex; align-items: center; gap: 4px; }
.fc-etq-opc { font-size: 10px; white-space: nowrap; }
.fc-lin2 tr.opc td input, .fc-lin2 tr.opc td select { color: #8A94A3; background: transparent; }
.fc-lin2 tr.opc [data-fc-importe] { text-decoration: line-through; color: #8A94A3; font-weight: 500; }
.fc-margen { display: block; font-size: 10px; font-weight: 600; color: #0E7A5A; }
.fc-margen:empty { display: none; }
.fc-margen.mal { color: #B42318; }
.fc-lin2 tr.fc-nota-fila td { background: #FBFAF6; }
.fc-lin2 tr.fc-nota-fila textarea { font-style: italic; color: #5B6675; resize: vertical; min-height: 24px; padding: 3px 5px; line-height: 1.35; overflow: hidden; }
.fc-lin2 .fc-mini { width: 22px; height: 22px; border-radius: 4px; }
.fc-lin2 tr.sup .an-tag { margin-top: 0; }
tr.fc-arrastra { opacity: .35; }
tr.fc-dest-arriba td { box-shadow: inset 0 2px 0 var(--azul); }
tr.fc-dest-abajo td { box-shadow: inset 0 -2px 0 var(--azul); }
.fc-menu { position: absolute; z-index: 60; background: #fff; border: 1px solid var(--borde); border-radius: 10px; box-shadow: 0 10px 28px -12px rgba(10, 31, 77, .35); padding: 4px; min-width: 220px; display: grid; }
.fc-menu button { text-align: left; border: 0; background: transparent; font: 500 12.3px var(--cuerpo); color: var(--tinta); padding: 6px 10px; border-radius: 6px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.fc-menu button span { width: 14px; text-align: center; color: #5B6675; }
.fc-menu button:hover, .fc-menu button:focus-visible { background: #EEF2F8; outline: none; }
.fc-menu button.borrar, .fc-menu button.borrar span { color: #B42318; }
.fc-menu hr { border: 0; border-top: 1px solid var(--borde); margin: 3px 0; }
.fc-plantillas { position: relative; }
.fc-plantillas > summary { list-style: none; cursor: pointer; }
.fc-plantillas > summary::-webkit-details-marker { display: none; }
.fc-menu-lista { position: absolute; z-index: 30; top: 100%; left: 0; background: #fff; border: 1px solid var(--borde); border-radius: 10px; box-shadow: 0 10px 28px -12px rgba(10, 31, 77, .35); padding: 4px; min-width: 240px; display: grid; }
.fc-menu-lista button { text-align: left; border: 0; background: transparent; font: 500 12.3px var(--cuerpo); color: var(--tinta); padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.fc-menu-lista button:hover { background: #EEF2F8; }
.fc-menu-lista small { color: #8A94A3; margin-left: 6px; }
.fc-ayuda { font-size: 11px; color: #8A94A3; margin: 4px 0 0; }
.fc-toast { position: fixed; z-index: 70; left: 50%; bottom: max(18px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: #0A1F4D; color: #fff; border-radius: 10px; padding: 8px 14px; display: flex; gap: 14px; align-items: center; font-size: 12.5px; box-shadow: 0 10px 28px -12px rgba(10, 31, 77, .5); }
.fc-toast .an-link { color: #9DC0F0; font-weight: 700; }
[data-fc-totales] .o { color: #5B6675; font-size: 11.5px; }
@media (max-width: 760px) { .fc-agarre { display: none !important; } }
.fc-nota-ver, .pp-nota td { font-style: italic; color: #5B6675; font-size: 12px; }
.fa-plantillas li { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.fa-plantillas small { color: #8A94A3; margin-left: 4px; }

/* ── Contactos (13/11/2026) ── */
.fa-tipo { display: inline-block; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 1px 7px; margin-right: 3px; white-space: nowrap; }
.fa-tipo--cli { background: #E3EEFB; color: #1F4F8F; }
.fa-tipo--pro { background: #F3E9DA; color: #6B4A12; }
.fa-conta { font-size: 11.5px; font-weight: 600; color: #0E7A5A; white-space: nowrap; }
.fa-conta--no { color: #8A5A00; }
.fa-etq { display: inline-block; font-size: 10.5px; font-weight: 600; border: 1px solid #D5DBE3; border-radius: 6px; padding: 0 6px; margin: 1px 2px 1px 0; color: #5B6675; }
.fa-personas { display: grid; gap: 6px; }
.fa-persona { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr) minmax(0,1.3fr) minmax(0,1fr) minmax(0,1fr); gap: 6px; }
.fa-persona input, .fa-persona select { min-height: 30px; font: 500 12.3px var(--cuerpo); border: 1px solid var(--borde-2); border-radius: 8px; padding: 0 8px; min-width: 0; background: #fff; color: var(--tinta); }
@media (max-width: 760px) { .fa-persona { grid-template-columns: minmax(0,1fr); } }
.fa-pedir { justify-self: start; }
.fa-cambio { border: 1px solid #F1D9A6; background: #FFFBF0; }

/* ── Imágenes de referencia del presupuesto ── */
.pr-refs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 12px; }
.pr-ref { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--linea, #e3e7ee); border-radius: 10px; }
.pr-ref img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--fondo, #f4f6f9); }
.pr-ref textarea, .pr-ref-nueva + .an-campo textarea { min-height: 0; }
.pub-refs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pub-refs figure { margin: 0; }
.pub-refs img { width: 100%; max-height: 320px; object-fit: contain; border-radius: 8px; background: #f4f6f9; }
.pub-refs figcaption { font-size: .85rem; margin-top: 6px; }
@media (max-width: 560px) { .pub-refs { grid-template-columns: 1fr; } }

/* ── Facturador: diseño de los documentos ── */
.fa-aviso-diseno { background: var(--t-flama-f, #FCEADD); color: var(--t-flama, #9A3412); border-radius: 10px; padding: 8px 12px; font-size: .9rem; }
.ds-rejilla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 1000px) { .ds-rejilla { grid-template-columns: minmax(0, 1fr); } }
.ds-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ds-col h3 { margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.ds-col h3 .i-nota { font-weight: 500; }
.ds-plantillas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ds-pl { display: flex; flex-direction: column; gap: 4px; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 7px;
  border: 1.5px solid var(--borde, #E7EBF1); border-radius: 12px; background: var(--raised, #F7F9FC); }
.ds-pl[aria-pressed="true"] { border-color: var(--t-azul, #163E73); box-shadow: 0 0 0 3px var(--t-azul-f, #E3EDF9); }
.ds-pl b { font-size: .85rem; display: flex; gap: 6px; align-items: center; } .ds-pl em { font-style: normal; font-size: .75rem; color: var(--texto-3, #5B6B7E); }
.ds-mini { position: relative; height: 58px; border-radius: 6px; background: #fff; border: 1px solid #E5E8EE; overflow: hidden; }
.ds-mini i { position: absolute; display: block; border-radius: 2px; background: #E6E9EE; left: 8px; right: 8px; height: 3px; }
.ds-mini i:nth-child(1) { right: auto; width: 16px; height: 6px; top: 8px; background: var(--c); }
.ds-mini i:nth-child(2) { left: auto; width: 24px; height: 5px; top: 8px; background: var(--c); }
.ds-mini i:nth-child(3) { top: 26px; background: var(--c); } .ds-mini i:nth-child(4) { top: 34px; } .ds-mini i:nth-child(5) { top: 42px; }
.ds-mini--moderna::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--c); }
.ds-mini--moderna i:nth-child(4) { background: color-mix(in srgb, var(--c) 18%, #fff); }
.ds-mini--corporativa::before { content: ""; position: absolute; inset: 0 0 auto; height: 20px; background: var(--c); }
.ds-mini--corporativa i:nth-child(1), .ds-mini--corporativa i:nth-child(2) { background: #fff; z-index: 1; }
.ds-mini--minimalista i:nth-child(1), .ds-mini--minimalista i:nth-child(2), .ds-mini--minimalista i:nth-child(3) { background: #1B2533; }
.ds-colores { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ds-sw { position: relative; width: 30px; height: 30px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px var(--control, #CBD5E1); cursor: pointer; border: 2px solid #fff; }
.ds-sw input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ds-sw:has(input:checked) { box-shadow: 0 0 0 2px var(--tinta, #10233B); }
.ds-sw:has(input:focus-visible) { outline: 2px solid var(--t-azul, #163E73); outline-offset: 3px; }
.ds-libre { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--texto-2, #43566B); margin-left: 4px; }
.ds-libre input[type=color] { width: 32px; height: 30px; border: 0; padding: 0; background: none; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ds-fila { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.ds-et { font-size: .85rem; color: var(--texto-2, #43566B); min-width: 52px; }
.ds-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; border: 1px solid var(--borde, #E7EBF1); background: var(--raised, #F7F9FC); border-radius: 10px; }
.ds-seg label { position: relative; cursor: pointer; }
.ds-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ds-seg span { display: block; padding: 5px 11px; border-radius: 8px; font-size: .85rem; color: var(--texto-2, #43566B); min-height: 30px; line-height: 20px; }
.ds-seg label:has(input:checked) span { background: var(--surface, #fff); color: var(--tinta, #10233B); font-weight: 700; box-shadow: 0 1px 2px rgba(16,35,59,.12); }
.ds-seg label:has(input:focus-visible) span { outline: 2px solid var(--t-azul, #163E73); }
.ds-tam { display: inline-flex; gap: 6px; align-items: center; font-size: .85rem; color: var(--texto-2, #43566B); }
.ds-propia summary, .ds-textos summary { cursor: pointer; font-weight: 700; font-size: .9rem; padding: 4px 0; }
.ds-textos { border-top: 1px solid var(--borde, #E7EBF1); padding-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.ds-textos[open] { padding-bottom: 6px; }
.ds-fijo { background: var(--raised, #F7F9FC); border: 1px dashed var(--control, #CBD5E1); border-radius: 10px; padding: 8px 10px; font-size: .82rem; color: var(--texto-2, #43566B); }
.ds-fijo b { display: block; color: var(--tinta, #10233B); }
.ds-acciones { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.ds-previa { display: inline-flex; gap: 6px; align-items: center; font-size: .9rem; }
.pp-marca { display: flex; align-items: center; gap: 12px; }
.pp-marca img { max-height: 44px; max-width: 160px; object-fit: contain; }
.pp-intro, .pp-despedida { color: var(--texto-2); }
.pp-despedida { color: var(--marino); font-weight: 600; }

/* ── Facturas: tipo de operación, mención y guía (compacto) ── */
.fc-ayuda-op { display: flex; flex-direction: column; gap: 6px; background: var(--raised, #F7F9FC); border-radius: 10px; padding: 8px 10px; font-size: .8rem; color: var(--texto-2, #43566B); }
.fc-ayuda-op p { margin: 0; }
.fc-mencion { border-left: 3px solid var(--t-azul, #163E73); padding-left: 8px; }
.fc-mencion span { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-3, #5B6B7E); }
.fc-guia summary { cursor: pointer; font-weight: 700; color: var(--tinta, #10233B); }
.fc-guia[open] { padding-bottom: 4px; }
.fc-guia-t { width: 100%; border-collapse: collapse; font-size: .75rem; margin-top: 6px; }
.fc-guia-t th { text-align: left; font-size: .68rem; text-transform: uppercase; color: var(--texto-3, #5B6B7E); padding: 3px 4px; border-bottom: 1px solid var(--borde, #E7EBF1); }
.fc-guia-t td { padding: 3px 4px; border-bottom: 1px solid var(--borde, #E7EBF1); vertical-align: top; }
.fc-guia-t td:first-child { font-weight: 600; color: var(--tinta, #10233B); min-width: 160px; }

/* ── Datos de la empresa: ficha de Sage (compacta) ── */
.fs { display: flex; flex-direction: column; gap: 8px; }
.fs-bloque { border-top: 1px solid var(--borde, #E7EBF1); padding-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.fs-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.fs-cab h4 { margin: 2px 0; font-size: .85rem; }
.fs-pedir summary { cursor: pointer; font-size: .78rem; font-weight: 700; color: var(--t-azul, #163E73); }
.fs-pedir[open] { flex-basis: 100%; }
.fs-form { display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; margin-top: 4px; }
.fs-form textarea { flex: 1 1 260px; font: inherit; font-size: .8rem; border: 1px solid var(--control, #CBD5E1); border-radius: 6px; padding: 4px 6px; min-height: 0; }
.fs-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; font-size: .8rem; }
.fs-dl span { display: block; font-size: .68rem; color: var(--texto-3, #5B6B7E); }
.fs-dl .fs-ancho { grid-column: 1 / -1; }
.fs-scroll { overflow-x: auto; }
.fs-t { width: 100%; border-collapse: collapse; font-size: .78rem; }
.fs-t th { text-align: left; font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-3, #5B6B7E); padding: 3px 5px; border-bottom: 1px solid var(--borde, #E7EBF1); }
.fs-t td { padding: 3px 5px; border-bottom: 1px solid var(--borde, #E7EBF1); }

/* Facturas: cabecera compacta en rejilla de 4 columnas (13/11/2026) */
.fc-cab { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; align-items: end; }
.fc-cab .an-campo { min-width: 0; }
.fc-cab select, .fc-cab input { width: 100%; min-width: 0; }
.fc-cab .fcab-2 { grid-column: span 2; }
.fc-cab .fcab-4 { grid-column: 1 / -1; padding: 6px 10px; }
.fc-cab .fc-hueco { display: block; }
@media (max-width: 760px) {
  .fc-cab { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fc-cab .fc-hueco { display: none; }
}
@media (max-width: 420px) {
  .fc-cab { grid-template-columns: minmax(0, 1fr); }
  .fc-cab .fcab-2 { grid-column: auto; }
}

/* Remesas de cobro y órdenes SEPA (13/11/2026, maqueta artifact 6xbKeTwAnQhEkxvDbSq6Ae) */
.rm-cab { justify-content: space-between; }
.rm-cab .fc-nota { flex: 1 1 320px; }
.rm-vistas { padding: 0; border: 0; }
.rm-kpis { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.rm-kpis .p-kpi { padding: 12px 14px; }
.rm-kpis .p-kpi b { font-size: 20px; }
.rm-h { margin: 0; font-size: 14.5px; }
.rm-form, .rm-det, .rm-devol, .rm-orden, .rm-papel { display: grid; gap: 10px; }
.rm-ch { width: 28px; }
.rm-ch input { width: 17px; height: 17px; }
.rm-no td { color: var(--texto-3); }
.rm-enl { margin-left: 6px; font-size: 12.5px; white-space: nowrap; }
.rm-dev { color: #8A2E12; }
.rm-nueva { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; background: var(--fondo-azul, #E8EEF7); border-radius: 12px; padding: 12px 14px; }
.rm-resumen { flex: 1 1 240px; display: grid; gap: 2px; }
.rm-resumen b { color: var(--marino); font-size: 14px; }
.rm-nueva .an-campo { min-width: 150px; }
.rm-titulo { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: flex-start; }
.rm-titulo > div:first-child { flex: 1 1 320px; min-width: 0; }
.rm-pasos { list-style: none; margin: 0; padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 6px 22px; background: var(--fondo, #F4F6FA); border-radius: 10px; font-size: 12.5px; font-weight: 700; color: var(--texto-3); }
.rm-pasos li { display: flex; align-items: center; gap: 6px; }
.rm-pasos li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 2px solid currentColor; flex: none; }
.rm-pasos li.hecho { color: #0B5A47; }
.rm-pasos li.hecho::before { background: currentColor; }
.rm-pasos li.ahora { color: var(--azul, #2F64A8); }
.rm-devuelto { background: #FFF8F6; }
.rm-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; white-space: nowrap; }
.rm-devol { border: 1px solid #F1C9C2; }
.rm-devol .rm-h { color: #8A2E12; }
.rm-rejilla { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; align-items: end; }
.rm-rejilla .rm-2 { grid-column: span 2; }
.rm-fin { display: flex; justify-content: flex-end; }
.rm-hueco, .rm-crece { flex: 1; }
.rm-acreedor { justify-content: space-between; }
.rm-acc { white-space: nowrap; font-size: 12.5px; }
.rm-acc a, .rm-enl { color: var(--azul, #2F64A8); font-weight: 600; }
.rm-vieja td { color: var(--texto-3); font-size: 12px; }
.rm-deudor summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--azul, #2F64A8); padding: 4px 0 8px; }
.rm-anular { justify-content: flex-end; margin-top: -6px; }
@media (max-width: 760px) {
  .rm-rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .rm-rejilla { grid-template-columns: minmax(0, 1fr); }
  .rm-rejilla .rm-2 { grid-column: auto; }
}
/* Página pública de la orden */
.or-marca { display: flex; align-items: center; gap: 12px; }
.or-logo { max-height: 44px; max-width: 120px; object-fit: contain; }
.or-datos { display: grid; gap: 0; margin: 4px 0 12px; }
.or-datos > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--borde); font-size: 13.5px; }
.or-datos dt { color: var(--texto-3); }
.or-datos dd { margin: 0; font-weight: 600; text-align: right; }
.or-iban { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.or-legal { line-height: 1.55; }

/* ── Registro horario (14/11/2026; maqueta: artifact JFRoaQqoJPimFbz1GHRCKU) ──
   Portal del trabajador (.mi, móvil primero), quiosco de la tableta (.qk) y pantallas de la empresa (.rh). */
.mi { max-width: 520px; margin: 0 auto; padding: 14px max(16px, env(safe-area-inset-right, 0px)) 96px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 12px; }
.mi h1 { font-size: 20px; font-weight: 800; margin: 0; }
.mi h2 { font-size: 16px; font-weight: 800; margin: 14px 0 6px; }
.mi-cab { display: flex; align-items: center; gap: 10px; }
.mi-cab > div { flex: 1; min-width: 0; line-height: 1.3; }
.mi-cab small { display: block; color: var(--texto-3); font-size: 12px; }
.mi-av { width: 38px; height: 38px; border-radius: 50%; background: var(--t-azul); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.mi-salir { min-height: 36px; border: 1px solid var(--control); background: var(--surface); border-radius: 10px; padding: 0 12px; font: 600 13px var(--cuerpo); color: var(--texto-2); cursor: pointer; }
.mi-caja { background: var(--surface); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mi-caja--atencion { box-shadow: inset 0 0 0 1px #F1D9A9; }
.mi-fichar { align-items: center; text-align: center; padding: 20px 16px; }
.mi-reloj { font-size: 46px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1; }
.mi-sub { color: var(--texto-3); font-size: 12.5px; margin: 0; }
.mi-nota { color: var(--texto-3); font-size: 11.5px; margin: 0; line-height: 1.45; }
.mi-estado { font-size: 13px; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; color: var(--texto-2); }
.mi-estado::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--control); }
.mi-estado--trabajando { color: var(--t-verde); } .mi-estado--trabajando::before { background: var(--t-verde); }
.mi-estado--enpausa { color: var(--t-arena); } .mi-estado--enpausa::before { background: #C9A227; }
.mi-form { display: flex; flex-direction: column; gap: 10px; width: 100%; text-align: left; }
.mi-donde { border: 0; padding: 4px; margin: 0; display: flex; gap: 4px; background: #F1F4F8; border-radius: 12px; justify-content: center; flex-wrap: wrap; }
.mi-donde legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mi-donde label { position: relative; }
.mi-donde input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.mi-donde span { display: block; padding: 9px 12px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--texto-2); min-height: 18px; }
.mi-donde input:checked + span { background: var(--surface); color: var(--tinta); font-weight: 700; box-shadow: 0 1px 2px rgba(16, 35, 59, .08); }
.mi-donde input:focus-visible + span { outline: 2px solid var(--t-azul); outline-offset: 1px; }
.mi-botones { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.mi-btn { min-height: 46px; border: 0; border-radius: 12px; background: #1F4070; color: #fff; font: 800 14px var(--cuerpo); padding: 0 16px; cursor: pointer; transition: transform .12s cubic-bezier(.23, 1, .32, 1); }
.mi-btn:active { transform: scale(.97); }
.mi-btn:disabled { opacity: .6; }
.mi-btn--sec { background: var(--surface); color: #2F64A8; box-shadow: inset 0 0 0 2px #2F64A8; }
.mi-btn--grande { min-height: 64px; font-size: 16px; border-radius: 14px; }
.mi-enlace { border: 0; background: none; color: #2F64A8; font: 700 12.5px var(--cuerpo); padding: 0; cursor: pointer; text-decoration: underline; }
.mi-fila { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.mi-barra { height: 8px; border-radius: 99px; background: #EEF2F7; overflow: hidden; }
.mi-barra span { display: block; height: 100%; background: #2F64A8; }
.mi-lista { list-style: none; margin: 0; padding: 0; }
.mi-lista li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--regla); font-size: 13px; }
.mi-lista li:last-child { border: 0; }
.mi-lista li span:nth-child(2) { flex: 1; }
.mi-lista b { font-variant-numeric: tabular-nums; }
.mi-punto { width: 9px; height: 9px; border-radius: 50%; background: #2F64A8; flex: none; }
.mi-punto--pausa, .mi-punto--vuelta { background: #C9A227; }
.mi-aviso { background: var(--t-azul-f); color: var(--t-azul); border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.45; }
.mi-aviso a { color: inherit; font-weight: 800; }
.mi-aviso--atencion { background: #FCEFD9; color: #7A4B0E; }
.mi-aviso--mal { background: var(--t-flama-f); color: var(--t-flama); }
.mi-check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.mi-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: #1F4070; }
.mi-campo { display: grid; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--texto-3); }
.mi-campo input, .mi-campo select, .mi-campo textarea { min-height: 42px; border: 1px solid var(--control); border-radius: 10px; padding: 0 10px; font: 500 15px var(--cuerpo); color: var(--tinta); background: var(--surface); box-sizing: border-box; width: 100%; }
.mi-campo textarea { padding: 8px 10px; min-height: 60px; }
.mi-rejilla { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 420px) { .mi-rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mi-tit { align-items: center; }
.mi-meses { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.mi-meses a { min-width: 36px; min-height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--surface); color: var(--tinta); text-decoration: none; font-size: 18px; }
.mi-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mi-kpis > div { background: var(--surface); border-radius: 12px; padding: 10px; display: grid; gap: 1px; }
.mi-kpis small { font-size: 11px; color: var(--texto-3); font-weight: 600; }
.mi-kpis b { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mi-kpis span { font-size: 10.5px; color: var(--texto-3); }
.mi-dias { padding: 4px 14px; gap: 0; }
.mi-dia { border-bottom: 1px solid var(--regla); }
.mi-dia:last-child { border: 0; }
.mi-dia > summary { display: grid; grid-template-columns: 56px 1fr auto; gap: 8px; align-items: center; padding: 10px 0; font-size: 12.5px; cursor: pointer; list-style: none; }
.mi-dia > summary::-webkit-details-marker { display: none; }
.mi-dia > summary b { font-variant-numeric: tabular-nums; }
.mi-dia[open] { padding-bottom: 12px; }
.mi-dia--mal > summary { color: #7A4B0E; }
.mi-dia-f { font-weight: 700; text-transform: capitalize; }
.mi-chip { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--t-azul-f); color: var(--t-azul); white-space: nowrap; }
.mi-chip--atencion { background: #FCEFD9; color: #7A4B0E; }
.mi-chip--bien { background: var(--t-verde-f); color: var(--t-verde); }
.mi-doc ol { padding-left: 18px; display: grid; gap: 6px; font-size: 13px; line-height: 1.5; }
.mi-doc p { font-size: 13px; line-height: 1.55; margin: 0; }
.mi-menu { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom, 0px)); width: min(488px, calc(100% - 32px));
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface); border-radius: 16px; padding: 6px; box-shadow: 0 4px 18px rgba(16, 35, 59, .12); z-index: 5; }
.mi-menu a { text-align: center; padding: 10px 0; font-size: 12.5px; font-weight: 600; color: var(--texto-2); text-decoration: none; border-radius: 10px; }
.mi-menu a[aria-current="page"] { font-weight: 800; color: #1F4070; background: var(--t-azul-f); }

.qk { min-height: 100vh; background: #0A1F4D; color: #fff; padding: 28px max(20px, env(safe-area-inset-right, 0px)) 28px max(20px, env(safe-area-inset-left, 0px)); box-sizing: border-box;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 760px) { .qk { grid-template-columns: 1fr; gap: 20px; } }
.qk h1 { color: #fff; font-size: 22px; margin: 0; }
.qk-sub { color: #B9C6DE; font-size: 15px; font-weight: 600; }
.qk-reloj { font-size: clamp(56px, 10vw, 84px); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.03em; line-height: 1; }
.qk-texto { color: #DCE5F3; font-size: 15px; line-height: 1.5; }
.qk-nota { color: #B9C6DE; font-size: 13px; line-height: 1.5; }
.qk-form { display: grid; gap: 12px; }
.qk-form label { font-size: 15px; font-weight: 700; color: #DCE5F3; display: grid; gap: 6px; }
.qk-form input { min-height: 64px; border: 0; border-radius: 16px; font: 800 30px var(--cuerpo); text-align: center; letter-spacing: .3em; color: #0A1F4D; }
.qk-btn { min-height: 64px; border: 0; border-radius: 16px; background: #2F64A8; color: #fff; font: 800 18px var(--cuerpo); cursor: pointer; transition: transform .12s cubic-bezier(.23, 1, .32, 1); }
.qk-btn:active { transform: scale(.97); }
.qk-btn--pausa { background: #C9A227; color: #16233A; }
.qk-btn--salir { background: #fff; color: #1F4070; }
.qk-aviso { border-radius: 14px; padding: 12px 14px; background: #E3F2EA; color: #0B5A47; font-weight: 700; font-size: 16px; }
.qk-aviso--mal { background: #FCEADD; color: #9A3412; }
.qk-hola { background: #fff; color: #16233A; border-radius: 16px; padding: 16px; display: grid; gap: 12px; }
.qk-hola .qk-botones { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }

.rh-pestanas { display: flex; gap: 4px; flex-wrap: wrap; background: #E9EDF3; border-radius: 12px; padding: 4px; justify-self: start; }
.rh-pestanas a { padding: 8px 14px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--texto-2); text-decoration: none; }
.rh-pestanas a[aria-current="page"] { background: var(--surface); color: var(--tinta); font-weight: 800; }
.rh-tabla { width: 100%; border-collapse: collapse; font-size: 13px; }
.rh-tabla th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--texto-3); padding: 7px 8px; border-bottom: 1px solid var(--borde); white-space: nowrap; }
.rh-tabla td { padding: 8px; border-bottom: 1px solid var(--regla); vertical-align: top; }
.rh-tabla .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rh-tabla tr.rh-mal td { background: #FFF8EB; }
.rh-envoltura { overflow-x: auto; }
.rh-aviso { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--regla); font-size: 13px; line-height: 1.45; }
.rh-aviso:last-child { border: 0; }
.rh-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.rh-form .mi-campo { flex: 1 1 140px; }
.rh-form .mi-campo input, .rh-form .mi-campo select { min-height: 38px; font-size: 13.5px; }
.rh-secreto { background: #0A1F4D; color: #fff; border-radius: 14px; padding: 14px 16px; display: grid; gap: 6px; }
.rh-secreto code { font-size: 26px; font-weight: 800; letter-spacing: .12em; color: #fff; word-break: break-all; }
.rh-secreto code.rh-url { font-size: 13px; letter-spacing: 0; font-weight: 600; }
.rh-secreto small { color: #B9C6DE; }
.rh-ajuste { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--regla); font-size: 13px; line-height: 1.4; }
.rh-ajuste input[type="checkbox"] { width: 18px; height: 18px; margin: 1px 0 0; accent-color: #1F4070; flex: none; }
.rh-ajuste small { display: block; color: var(--texto-3); font-size: 11.5px; }
.rh-form .mi-btn, .rh-form .p-btn { min-height: 38px; }
.portal .qk b, .portal .qk h1, .portal .rh-secreto b { color: inherit; }
