/* Cotizador Selva Banquetería — prototipo. El verde #377970 es el de su planilla. */
:root {
  --verde: #377970;
  --verde-osc: #285a53;
  --verde-claro: #e7f1ee;
  --verde-medio: #c9e0da;
  --fondo: #f5f6f3;
  --papel: #ffffff;
  --tinta: #1c2826;
  --suave: #5c6c69;
  --borde: #dde4e1;
  --rojo: #b3261e;
  --azul: #2f5f9e;
  --ambar: #8a5a00;
  --radio: 14px;
  --sombra: 0 1px 2px rgb(0 0 0 / .05), 0 4px 16px rgb(0 0 0 / .05);
  font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  color: var(--tinta);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html { background: var(--fondo); }
body { margin: 0; background: var(--fondo); font-size: 17px; line-height: 1.45; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: .2em 0 .6em; }
h2 { font-size: 1.15rem; margin: 1.4em 0 .6em; }
h3 { font-size: 1rem; margin: 1.2em 0 .5em; }
a { color: var(--verde-osc); }
svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.suave { color: var(--suave); font-size: .93rem; }
.rojo { color: var(--rojo); }

/* ---------- Controles ---------- */
input, textarea, select {
  font: inherit; color: inherit; width: 100%; padding: .6em .75em; border: 1.5px solid var(--borde);
  border-radius: 10px; background: var(--papel); min-height: 46px;
}
textarea { resize: vertical; min-height: 0; line-height: 1.35; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--verde); box-shadow: 0 0 0 3px var(--verde-medio); }
input[type="checkbox"] { width: 22px; height: 22px; min-height: 0; accent-color: var(--verde); margin: 0; }
label { display: flex; flex-direction: column; gap: .35em; font-weight: 500; font-size: .95rem; }
.lbl { display: flex; align-items: center; gap: .45em; }
label.check { flex-direction: row; align-items: center; gap: .6em; font-weight: 400; cursor: pointer; }
.n { text-align: right; font-variant-numeric: tabular-nums; }

.btn, .btn-sec {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; font: inherit; font-weight: 700;
  border-radius: 999px; padding: .7em 1.3em; min-height: 48px; cursor: pointer; text-decoration: none; border: 1.5px solid transparent;
}
.btn { background: var(--verde); color: #fff; }
.btn:hover { background: var(--verde-osc); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-sec { background: var(--papel); color: var(--verde-osc); border-color: var(--verde-medio); }
.btn-sec:hover { background: var(--verde-claro); }
.enlace { background: none; border: 0; padding: .4em 0; font: inherit; color: var(--verde-osc); font-weight: 600; cursor: pointer; display: inline-flex; gap: .4em; align-items: center; text-decoration: none; }
.enlace:hover { text-decoration: underline; }
.icono { background: none; border: 0; color: var(--suave); width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: inline-grid; place-items: center; flex: none; }
.icono:hover { background: #f3e3e2; color: var(--rojo); }

.ayuda { display: inline-block; position: relative; vertical-align: middle; font-weight: 400; }
.ayuda summary { list-style: none; width: 22px; height: 22px; border-radius: 50%; background: var(--verde-claro); color: var(--verde-osc); font-size: .8rem; font-weight: 700; display: grid; place-items: center; cursor: pointer; }
.ayuda summary::-webkit-details-marker { display: none; }
.ayuda p { position: absolute; z-index: 5; top: 28px; left: -10px; width: 260px; margin: 0; padding: .7em .9em; background: var(--tinta); color: #fff; border-radius: 10px; font-size: .88rem; line-height: 1.4; }

/* ---------- Marco ---------- */
.cinta { background: #fff4d6; color: var(--ambar); text-align: center; font-size: .85rem; padding: .35em 1em; }
.barra { display: flex; align-items: center; justify-content: space-between; gap: 1em; padding: .5em 1.5em; background: var(--papel); border-bottom: 1px solid var(--borde); position: sticky; top: 0; z-index: 10; }
.marca { display: flex; align-items: center; gap: .6em; text-decoration: none; color: var(--tinta); font-weight: 700; }
.marca img { height: 48px; width: auto; mix-blend-mode: multiply; }
.barra nav { display: flex; gap: .25em; }
.barra nav a { display: flex; align-items: center; gap: .45em; padding: .55em .9em; border-radius: 999px; text-decoration: none; color: var(--suave); font-weight: 500; }
.barra nav a:hover { background: var(--fondo); color: var(--tinta); }
.barra nav a.activo { background: var(--verde-claro); color: var(--verde-osc); }
.contenido { max-width: 1180px; margin: 0 auto; padding: 1.5em 1.5em 4em; }

/* ---------- Entrar ---------- */
.entrar { max-width: 420px; margin: 6vh auto; padding: 2em; background: var(--papel); border-radius: var(--radio); box-shadow: var(--sombra); text-align: center; }
.entrar img { width: 200px; mix-blend-mode: multiply; }
.entrar form { text-align: left; }
.pila { display: flex; flex-direction: column; gap: .75em; }

/* ---------- Inicio ---------- */
.saludo { font-size: 2rem; }
.aviso { display: flex; align-items: center; justify-content: space-between; gap: 1em; flex-wrap: wrap; background: var(--verde-claro); border: 1px solid var(--verde-medio); border-radius: var(--radio); padding: .9em 1.1em; margin-bottom: .8em; }
.aviso.ok { background: #e8f5ea; border-color: #bfe0c4; }
.aviso.suave-aviso { background: var(--papel); border-color: var(--borde); }
.grandes { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 1em; margin: 1.2em 0 1.5em; }
.grande { display: flex; flex-direction: column; align-items: flex-start; gap: .3em; padding: 1.4em 1.4em 1.2em; border-radius: var(--radio); background: var(--papel); border: 1.5px solid var(--borde); color: var(--tinta); text-decoration: none; font: inherit; text-align: left; cursor: pointer; box-shadow: var(--sombra); }
.grande svg { width: 34px; height: 34px; color: var(--verde); margin-bottom: .4em; }
.grande b { font-size: 1.25rem; }
.grande small { color: var(--suave); }
.grande:hover { border-color: var(--verde); }
.grande.principal { background: var(--verde); color: #fff; border-color: var(--verde); }
.grande.principal svg, .grande.principal small { color: #e2f0ec; }
.grande.principal:hover { background: var(--verde-osc); }
.dos-col { display: grid; grid-template-columns: 1fr 280px; gap: 1.5em; align-items: start; }
.dos-col h2 { margin-top: 0; }
.video { display: flex; flex-direction: column; gap: .3em; padding: 1.2em; border-radius: var(--radio); border: 1.5px dashed var(--verde-medio); color: var(--suave); }
.video svg { width: 30px; height: 30px; color: var(--verde); }
.video b { color: var(--tinta); }

/* ---------- Listas de cotizaciones ---------- */
.lista { display: flex; flex-direction: column; gap: .5em; }
.fila { display: grid; grid-template-columns: 70px 1fr auto auto; align-items: center; gap: 1em; padding: .85em 1.1em; background: var(--papel); border: 1px solid var(--borde); border-radius: 12px; text-decoration: none; color: inherit; }
.fila:hover { border-color: var(--verde); }
.fila-num { font-weight: 700; color: var(--verde-osc); font-variant-numeric: tabular-nums; }
.fila-main { display: flex; flex-direction: column; min-width: 0; }
.fila-main b, .fila-main small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila-main small { color: var(--suave); }
.fila-total { font-weight: 700; font-variant-numeric: tabular-nums; }
.chip { display: inline-block; padding: .2em .75em; border-radius: 999px; font-size: .82rem; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.chip-borrador { background: #eceeed; color: #555f5d; }
.chip-enviada { background: #e3ecf8; color: var(--azul); }
.chip-aceptada { background: #e2f3e4; color: #1f6b2c; }
.chip-rechazada { background: #f8e4e2; color: var(--rojo); }
.chip-archivada { background: #e9e6e1; color: #6a6258; }

/* ---------- Asistente ---------- */
.asistente { max-width: 1100px; margin: 0 auto; }
.asis-cab { display: flex; flex-direction: column; gap: .5em; margin-bottom: 1em; }
.pasos { display: flex; gap: .4em; list-style: none; padding: 0; margin: 0; }
.pasos li { flex: 1; }
.pasos li > a, .pasos li > span { display: flex; align-items: center; gap: .5em; padding: .55em .7em; border-radius: 10px; text-decoration: none; color: var(--suave); border-bottom: 3px solid var(--borde); font-weight: 500; }
.pasos li.hecho > a { color: var(--verde-osc); border-bottom-color: var(--verde-medio); }
.pasos li.activo > a, .pasos li.activo > span { color: var(--tinta); border-bottom-color: var(--verde); font-weight: 700; }
.paso-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--fondo); border: 1.5px solid var(--borde); font-size: .85rem; }
.pasos li.hecho .paso-n { background: var(--verde-claro); border-color: var(--verde-medio); }
.pasos li.activo .paso-n { background: var(--verde); border-color: var(--verde); color: #fff; }
.paso-cuerpo { background: var(--papel); border-radius: var(--radio); box-shadow: var(--sombra); padding: 1.6em 1.8em 2em; min-height: 340px; }
.paso-barra { position: sticky; bottom: 0; display: flex; align-items: center; gap: 1em; padding: .9em 0; background: linear-gradient(transparent, var(--fondo) 30%); }
.paso-barra .btn { margin-left: auto; }
.guardado { color: var(--suave); font-size: .88rem; display: inline-flex; align-items: center; gap: .3em; }
.guardado svg { color: var(--verde); }
.falta { color: var(--rojo); font-weight: 600; font-size: .93rem; }
.bajada { color: var(--suave); margin-top: -.3em; }
.etiqueta { display: inline-block; background: #fff4d6; color: var(--ambar); font-size: .8rem; font-weight: 700; padding: .15em .6em; border-radius: 6px; margin-left: .3em; }

.grande-input { font-size: 1.05rem; max-width: 620px; }
.grande-input input { font-size: 1.15rem; padding: .8em 1em; }
.sugerencias { display: flex; flex-direction: column; gap: .45em; max-width: 620px; margin-top: 1em; }
.sug { display: flex; align-items: center; justify-content: space-between; gap: .8em; padding: .8em 1em; border: 1.5px solid var(--borde); background: var(--papel); border-radius: 12px; cursor: pointer; font: inherit; text-align: left; }
.sug:hover, .sug:focus { border-color: var(--verde); background: var(--verde-claro); outline: none; }
.sug small { color: var(--suave); }
.sug-nuevo { justify-content: flex-start; color: var(--verde-osc); border-style: dashed; }
.tarjeta-cliente { max-width: 620px; display: flex; flex-direction: column; gap: 1em; }
.mas-datos summary { cursor: pointer; color: var(--verde-osc); font-weight: 600; padding: .3em 0; }
.mas-datos .grilla-2 { margin-top: .8em; }
.grilla-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1em 1.2em; }
.grilla-2 .ancho { grid-column: 1 / -1; }
.formulario { max-width: 760px; }
.formulario label.check { align-self: end; min-height: 46px; }
.grande-n { font-size: 1.3rem; font-weight: 700; max-width: 180px; }

/* Paso 3: bloques */
.bloque { border: 1.5px solid var(--borde); border-radius: var(--radio); padding: .8em 1em 1em; margin-bottom: 1em; }
.bloque-cab { display: flex; gap: .5em; align-items: center; }
.bloque-titulo { font-weight: 700; font-size: 1.05rem; border-color: transparent; background: var(--fondo); }
.bloque-lineas { list-style: none; padding: 0; margin: .6em 0; }
.bloque-lineas li { display: grid; grid-template-columns: 1fr auto auto 40px; gap: 1em; align-items: center; padding: .35em 0 .35em .4em; border-bottom: 1px solid var(--fondo); }
.bloque-lineas small { color: var(--suave); font-variant-numeric: tabular-nums; }
.bloque-lineas b { font-variant-numeric: tabular-nums; }
.bloque-lineas .vacio { display: block; color: var(--suave); font-style: italic; border: 0; }
.bloque-acc { display: flex; gap: .6em; flex-wrap: wrap; }
.agregar-bloque { width: 100%; border-style: dashed; }
.picker { margin-top: 1em; background: var(--fondo); border-radius: 12px; padding: 1em; }
.picker-cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6em; }
.tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .8em; }
.tarjeta { display: flex; flex-direction: column; gap: .25em; align-items: flex-start; text-align: left; padding: 1em 1.1em; background: var(--papel); border: 1.5px solid var(--borde); border-radius: 12px; cursor: pointer; font: inherit; color: inherit; text-decoration: none; }
.tarjeta:hover { border-color: var(--verde); }
.tarjeta small { color: var(--suave); }
.tarjeta span { margin-top: .3em; color: var(--verde-osc); font-weight: 600; font-size: .92rem; }
.tarjeta-nueva { border-style: dashed; justify-content: center; align-items: center; color: var(--verde-osc); min-height: 110px; }

/* Paso 4: revisar */
.revisar { display: grid; grid-template-columns: 1fr 300px; gap: 1.5em; align-items: start; }
.rev-bloque h3 { display: flex; justify-content: space-between; background: var(--verde-claro); color: var(--verde-osc); padding: .5em .8em; border-radius: 10px; margin-top: 0; }
.rev-bloque { margin-bottom: 1.4em; }
.tabla-lineas { width: 100%; border-collapse: collapse; }
.tabla-lineas th { text-align: left; font-size: .8rem; color: var(--suave); font-weight: 600; padding: 0 .3em .3em; }
.tabla-lineas th.n { text-align: right; }
.tabla-lineas td { padding: .25em .3em; vertical-align: top; }
.tabla-lineas td:nth-child(1) { width: 24%; }
.tabla-lineas td:nth-child(3) { width: 80px; }
.tabla-lineas td:nth-child(4) { width: 120px; }
.tabla-lineas td:nth-child(6) { width: 40px; }
.tabla-lineas input, .tabla-lineas textarea { min-height: 40px; padding: .45em .6em; font-size: .95rem; }
.total-linea { padding-top: .75em !important; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.totales { position: sticky; top: 90px; background: var(--fondo); border-radius: var(--radio); padding: 1.1em; display: flex; flex-direction: column; gap: .8em; }
.con-sufijo { display: flex; align-items: center; gap: .5em; font-weight: 400; }
.con-sufijo input { max-width: 90px; }
.cuentas { border-top: 1px solid var(--borde); padding-top: .6em; font-variant-numeric: tabular-nums; }
.cuentas div { display: flex; justify-content: space-between; padding: .15em 0; color: var(--suave); }
.cuentas .total { color: var(--tinta); font-size: 1.35rem; font-weight: 700; border-top: 2px solid var(--verde); margin-top: .4em; padding-top: .4em; }
.rev-extra { border-top: 1px solid var(--borde); padding-top: .5em; }

/* Paso 5 y Ver */
.listo, .ver { display: grid; grid-template-columns: 320px 1fr; gap: 1.8em; align-items: start; }
.listo-lado, .ver-lado { display: flex; flex-direction: column; gap: .8em; align-items: stretch; }
.ver-lado h1 { margin-bottom: 0; display: flex; align-items: center; gap: .5em; flex-wrap: wrap; }
.ver-sub { margin: 0; color: var(--suave); }
.btn-pdf { font-size: 1.15rem; min-height: 60px; }
.segmento { display: flex; background: var(--fondo); border: 1px solid var(--borde); border-radius: 999px; padding: 4px; }
.segmento button { flex: 1; font: inherit; font-weight: 600; font-size: .92rem; border: 0; background: none; border-radius: 999px; padding: .55em .8em; cursor: pointer; color: var(--suave); }
.segmento button.activo { background: var(--papel); color: var(--verde-osc); box-shadow: var(--sombra); }
.datos { display: grid; grid-template-columns: auto 1fr; gap: .35em 1em; margin: .4em 0; }
.datos dt { color: var(--suave); font-size: .9rem; }
.datos dd { margin: 0; }
.grande-dd { font-size: 1.4rem; font-weight: 700; }
.estados { display: flex; gap: .4em; flex-wrap: wrap; }
.chip-btn { font: inherit; font-weight: 700; font-size: .9rem; border-radius: 999px; padding: .5em 1em; border: 1.5px solid var(--borde); background: var(--papel); cursor: pointer; color: var(--suave); }
.chip-btn.activo.chip-enviada { background: #e3ecf8; color: var(--azul); border-color: #b8cbea; }
.chip-btn.activo.chip-aceptada { background: #e2f3e4; color: #1f6b2c; border-color: #b4dcb9; }
.chip-btn.activo.chip-rechazada { background: #f8e4e2; color: var(--rojo); border-color: #ebbab5; }
.acciones { display: flex; flex-wrap: wrap; gap: .5em; }
.ver-lado .acciones .btn, .ver-lado .acciones .btn-sec { flex: 1 1 140px; }
.historial { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.historial li { padding: .3em 0; border-bottom: 1px solid var(--borde); }
.historial span { color: var(--suave); margin-right: .4em; }

/* ---------- Buscar, servicios, ajustes ---------- */
.filtros { display: grid; grid-template-columns: 1fr 200px 220px; gap: .6em; margin-bottom: 1em; }
.filtros input { font-size: 1.1rem; }
.archivados { margin-top: 2em; }
.archivados summary { cursor: pointer; color: var(--suave); font-weight: 600; margin-bottom: .8em; }
.srv { max-width: 820px; display: flex; flex-direction: column; gap: 1em; }
.titulo-input { font-size: 1.6rem; font-weight: 700; border-color: transparent; background: transparent; padding-left: 0; }
.titulo-input:focus { padding-left: .5em; }
.srv-linea { display: grid; grid-template-columns: 1fr 1fr 1fr 40px; gap: .8em; align-items: end; background: var(--papel); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1em; }
.srv-linea .ancho { grid-column: 1 / 4; }
.srv-linea > .icono { grid-column: 4; grid-row: 1; align-self: start; }
.seccion { background: var(--papel); border-radius: var(--radio); padding: 1.2em 1.4em; margin-bottom: 1em; box-shadow: var(--sombra); }
.seccion h2 { margin-top: 0; }
.seccion.prototipo { background: #fffaf0; box-shadow: none; border: 1px dashed #e6cf98; }
.fila-input { display: flex; gap: .4em; align-items: center; }

/* ---------- Aviso flotante y modal ---------- */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; visibility: hidden; pointer-events: none; background: var(--tinta); color: #fff; padding: .8em 1.1em; border-radius: 12px; display: flex; gap: 1em; align-items: center; z-index: 50; transition: transform .25s, opacity .25s, visibility .25s; max-width: calc(100% - 32px); box-shadow: 0 8px 30px rgb(0 0 0 / .25); }
#toast.ver { transform: translate(-50%, 0); opacity: 1; visibility: visible; pointer-events: auto; }
#toast button { background: none; border: 1.5px solid #fff6; color: #fff; font: inherit; font-weight: 700; border-radius: 999px; padding: .35em .9em; cursor: pointer; white-space: nowrap; }
dialog { border: 0; border-radius: var(--radio); padding: 1.6em; max-width: 420px; width: calc(100% - 32px); box-shadow: 0 20px 60px rgb(0 0 0 / .3); }
dialog::backdrop { background: rgb(20 30 28 / .45); }
dialog h2 { margin: 0; }

/* ---------- Vista previa del PDF ---------- */
.vista { position: relative; overflow: hidden; border-radius: 6px; box-shadow: 0 2px 6px rgb(0 0 0 / .08), 0 12px 40px rgb(0 0 0 / .08); background: #fff; }
.vista > .hoja { position: absolute; top: 0; left: 0; transform-origin: top left; }

/* ---------- Hoja A4 (794 px = 21 cm a 96 ppp). Común a los dos diseños ---------- */
.hoja { width: 794px; background: #fff; color: #1a1a1a; }
.hoja table { border-collapse: collapse; }

/* Diseño "Como tu Excel" */
.hx { padding: 36px 30px 40px; font-family: 'Bahnschrift', 'Segoe UI', Arial, sans-serif; font-size: 12.5px; font-weight: 300; }
.hx-cab { display: grid; grid-template-columns: 1fr 200px 1fr; align-items: end; gap: 10px; margin-bottom: 18px; }
.hx-emp { line-height: 1.6; }
.hx-logo { width: 190px; justify-self: center; }
.hx-num { justify-self: end; }
.hx-num td { padding: 2px 6px; text-align: right; }
.hx-num .hx-caja { border: 1px solid #c9c9c9; min-width: 105px; text-align: center; }
.hx-banda { background: #377970; color: #fff; padding: 8px 6px; font-weight: 500; font-size: 13.5px; text-transform: uppercase; border-top: 1.5px solid #1a1a1a; }
.hx-banda-chica { padding: 4px 6px; text-transform: none; border-top: 1.5px solid #1a1a1a; }
.hx-cli { padding: 8px 6px 14px; line-height: 1.65; }
.hx-tabla { width: 100%; border-top: 1.5px solid #1a1a1a; }
.hx-tabla th { background: #377970; color: #fff; text-align: left; padding: 5px 6px; font-weight: 500; }
.hx-tabla th:nth-child(1) { width: 24%; }
.hx-tabla th:nth-child(3) { width: 7%; }
.hx-tabla th:nth-child(4), .hx-tabla th:nth-child(5) { width: 13%; }
.hx-tabla td { padding: 4px 6px; border-bottom: 1px solid #e4e4e4; vertical-align: top; }
.hx-tabla td:nth-child(2) { border-left: 1px solid #333; border-right: 1px solid #333; }
.hx-tabla td:nth-child(4) { border-left: 1px solid #333; }
.hx-tabla td:nth-child(5) { border-left: 1px solid #333; }
.hx-det { text-align: center; line-height: 1.55; }
.hx-n { text-align: right; white-space: nowrap; }
.hx-gris { background: #f2f2f2; }
.hx-evento td:first-child { line-height: 1.55; padding-top: 10px; padding-bottom: 10px; }
.hx-bloque td:first-child { font-weight: 600; padding-top: 10px; }
.hx-relleno td { height: 26px; }
.hx-pie { display: grid; grid-template-columns: 1fr 250px; gap: 0 14px; align-items: start; }
.hx-com { border: 1.5px solid #1a1a1a; border-top: 0; min-height: 110px; line-height: 1.6; }
.hx-com > div:not(.hx-banda) { padding: 0 6px; }
.hx-tot { width: 100%; border: 1.5px solid #1a1a1a; border-top: 0; }
.hx-tot td { padding: 4px 6px; border-bottom: 1px solid #1a1a1a; }
.hx-tot td:last-child { text-align: right; border-left: 1px solid #1a1a1a; }
.hx-total td { font-weight: 700; font-size: 14px; }
.hx-total td:last-child { background: #a7b3d8; }

/* Diseño nuevo */
.hn { padding: 44px 48px 36px; font-family: 'DM Sans', 'Segoe UI', Arial, sans-serif; font-size: 12.5px; color: #1f2b29; }
.hn-cab { display: flex; justify-content: space-between; align-items: center; border-bottom: 3px solid #377970; padding-bottom: 14px; }
.hn-logo { width: 165px; }
.hn-titulo { text-align: right; }
.hn-eti { text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 700; color: #377970; }
.hn-num { font-size: 30px; font-weight: 700; line-height: 1.1; margin: 2px 0 8px; }
.hn-fechas { display: flex; flex-direction: column; gap: 2px; }
.hn-fechas span { color: #6b7a77; margin-right: 6px; }
.hn-datos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0 22px; }
.hn-caja { background: #f1f7f5; border-radius: 10px; padding: 14px 16px; }
.hn-grande { font-size: 16px; font-weight: 700; margin: 3px 0 6px; }
.hn-fila { display: flex; gap: 8px; padding: 1px 0; }
.hn-fila span { color: #6b7a77; min-width: 64px; }
.hn-fila b { font-weight: 500; }
.hn-tabla { width: 100%; }
.hn-tabla th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #6b7a77; padding: 6px 8px; border-bottom: 1.5px solid #c9dcd7; }
.hn-tabla th.hn-n { text-align: right; }
.hn-tabla td { padding: 8px; border-bottom: 1px solid #e7eeec; vertical-align: top; }
.hn-tabla td:nth-child(1) { width: 58%; }
.hn-bloque td { background: #377970; color: #fff; font-weight: 700; padding: 6px 8px; border: 0; }
.hn-det { color: #5b6a67; font-size: 11.5px; line-height: 1.5; margin-top: 3px; }
.hn-n { text-align: right; white-space: nowrap; }
.hn-pie { display: grid; grid-template-columns: 1fr 260px; gap: 24px; margin-top: 22px; align-items: start; }
.hn-com ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.7; }
.hn-com li::marker { color: #377970; }
.hn-tot div { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid #e7eeec; }
.hn-tot div span:first-child { color: #6b7a77; }
.hn-total { background: #377970; color: #fff; border-radius: 8px; padding: 10px 12px !important; margin-top: 8px; font-size: 17px; font-weight: 700; border: 0 !important; }
.hn-total span:first-child { color: #fff !important; }
.hn-final { margin-top: 34px; padding-top: 10px; border-top: 1px solid #e7eeec; text-align: center; color: #6b7a77; font-size: 10.5px; }

/* ---------- Tablet y celular ---------- */
@media (max-width: 960px) {
  .revisar, .listo, .ver { grid-template-columns: 1fr; }
  .totales { position: static; }
  .dos-col { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .contenido { padding: 1em 16px 6em; }
  .barra { padding: .4em 16px; }
  .marca img { height: 40px; }
  .marca span { display: none; }
  .barra nav { position: fixed; bottom: 0; left: 0; right: 0; background: var(--papel); border-top: 1px solid var(--borde); justify-content: space-around; padding: .3em .3em calc(.3em + env(safe-area-inset-bottom)); z-index: 20; }
  .barra nav a { flex-direction: column; gap: .1em; font-size: .75rem; padding: .4em .5em; }
  .barra nav a svg { width: 22px; height: 22px; }
  .grandes { grid-template-columns: 1fr; }
  .grande { flex-direction: row; align-items: center; flex-wrap: wrap; column-gap: .8em; padding: 1em 1.1em; }
  .grande svg { margin: 0; width: 28px; height: 28px; }
  .grande small { flex-basis: 100%; }
  .fila { grid-template-columns: 1fr auto; gap: .2em .8em; }
  .fila-num { grid-column: 1; font-size: .85rem; }
  .fila-main { grid-column: 1; grid-row: 2; }
  .fila-total { grid-column: 2; grid-row: 2; text-align: right; }
  .fila .chip { grid-column: 2; grid-row: 1; justify-self: end; }
  .pasos li > a span:last-child, .pasos li > span span:last-child { display: none; }
  .pasos li.activo > a span:last-child, .pasos li.activo > span span:last-child { display: inline; }
  .pasos li { flex: none; }
  .pasos li.activo { flex: 1; }
  .paso-cuerpo { padding: 1.2em 1em 1.5em; }
  .paso-barra { bottom: 58px; flex-wrap: wrap; gap: .5em; }
  .guardado { display: none; }
  .grilla-2, .filtros { grid-template-columns: 1fr; }
  .bloque-lineas li { grid-template-columns: 1fr auto 40px; }
  .bloque-lineas li small { grid-column: 1; grid-row: 2; }
  .bloque-lineas li b { grid-column: 2; grid-row: 1 / 3; }
  .bloque-lineas li .icono { grid-row: 1 / 3; }
  .tabla-lineas thead { display: none; }
  .tabla-lineas tr { display: grid; grid-template-columns: 1fr 1fr 40px; gap: .3em .5em; padding: .6em 0; border-bottom: 1px solid var(--borde); }
  .tabla-lineas td { width: auto !important; padding: 0; }
  .tabla-lineas td:nth-child(1), .tabla-lineas td:nth-child(2) { grid-column: 1 / 3; }
  .tabla-lineas td:nth-child(1) { grid-row: 1; }
  .tabla-lineas td:nth-child(2) { grid-row: 2; }
  .tabla-lineas td:nth-child(3) { grid-column: 1; grid-row: 3; }
  .tabla-lineas td:nth-child(4) { grid-column: 2; grid-row: 3; }
  .tabla-lineas td:nth-child(6) { grid-column: 3; grid-row: 1; }
  .tabla-lineas td:nth-child(5) { grid-column: 1 / 3; grid-row: 4; text-align: right; padding-top: 0 !important; }
  .tabla-lineas td[data-et]::before { content: attr(data-et); display: block; font-size: .75rem; color: var(--suave); }
  .srv-linea { grid-template-columns: 1fr 40px; }
  .srv-linea .ancho, .srv-linea label { grid-column: 1; }
  .srv-linea > .icono { grid-column: 2; }
  #toast { bottom: 76px; }
}

/* ---------- Imprimir (solo si no cargó la librería del PDF) ---------- */
#zona-impresion { display: none; }
@media print {
  @page { size: A4; margin: 0; }
  body > *:not(#zona-impresion) { display: none !important; }
  #zona-impresion { display: block; }
  .hoja { width: 210mm; }
}
