/* Contabilízate — cuaderno de cuadritos, limpio y muy legible */
:root {
  --q: 20px;                 /* lado del cuadrito */
  --papel: #FFFEFA;
  --cuadro: #D2E0EE;
  --margen: #F2B8B8;
  --tinta: #1B2A4A;          /* boli azul marino */
  --tinta-2: #55657E;
  --rojo: #C73E3E;           /* boli rojo para errores */
  --rojo-fondo: #FDECEC;
  --verde: #23784A;
  --verde-fondo: #E4F4EA;
  --fosforito: #FFF3A3;
  --mesa: #EEF0F3;
  --linea: #C9D6E4;

  --letra: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --mano: "Kalam", "Segoe Print", cursive;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--letra); font-size: 1rem; line-height: 1.45; color: var(--tinta); background: var(--mesa); }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--tinta); }
svg { flex: none; }
:focus-visible { outline: 3px solid #E0A400; outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 99; padding: 10px 14px; border-radius: 8px; background: var(--tinta); color: #fff; }
.skip:focus { top: 12px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Barra superior ---------- */
.barra {
  position: sticky; top: 0; z-index: 30;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  padding: 10px clamp(12px, 3vw, 28px); background: var(--tinta); color: #fff;
}
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--mano); font-weight: 700; font-size: 1.5rem; line-height: 1; }
.logo svg { width: 34px; height: 34px; fill: #FFFEFA; stroke: #9DB7D4; stroke-width: 2; stroke-linecap: round; }
.logo svg .logo__t { stroke: #FF8A8A; stroke-width: 2.6; }
.barra__cuaderno { position: relative; display: flex; align-items: center; gap: 6px; flex: 1 1 220px; min-width: 0; }
.barra__cuaderno select {
  flex: 1; min-width: 0; max-width: 360px; min-height: 40px; padding: 6px 30px 6px 12px;
  border-radius: 10px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.1); color: #fff; font-weight: 700;
}
.barra__cuaderno select option { color: var(--tinta); }
.barra__acciones { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.barra :focus-visible { outline-color: var(--fosforito); }

.bt {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 14px; border-radius: 10px; border: 1.5px solid var(--linea);
  background: #fff; color: var(--tinta); font-weight: 700; cursor: pointer; text-decoration: none;
  transition: background-color .15s, border-color .15s;
}
.bt:hover { border-color: var(--tinta); }
.bt svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bt--tinta { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.bt--tinta:hover { background: #0F1B33; }
.barra .bt--tinta { background: #fff; color: var(--tinta); border-color: #fff; }
.bt--icono { min-width: 40px; padding: 0; background: transparent; border-color: rgba(255,255,255,.25); color: #fff; }
.bt--icono svg { fill: currentColor; stroke: none; }
.bt--suave { border-style: dashed; background: transparent; }
.bt--peq { min-height: 34px; padding: 4px 10px; font-size: .9rem; }
.bt--rojo { color: var(--rojo); }

.menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 260px; padding: 6px; border-radius: 12px; background: #fff; color: var(--tinta); box-shadow: 0 16px 40px -12px rgba(0,0,0,.35); }
.menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-radius: 8px; background: none; cursor: pointer; font-weight: 600; }
.menu button:hover, .menu button:focus-visible { background: var(--mesa); outline: none; }
.menu hr { border: 0; border-top: 1px solid var(--linea); margin: 4px 0; }
.menu__peligro { color: var(--rojo); }

.interruptor { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: .92rem; min-height: 40px; }
.interruptor input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.interruptor__pista { position: relative; width: 40px; height: 22px; border-radius: 999px; background: rgba(255,255,255,.3); transition: background-color .2s; }
.interruptor__pista::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.interruptor input:checked + .interruptor__pista { background: #5FBF86; }
.interruptor input:checked + .interruptor__pista::after { transform: translateX(18px); }
.interruptor input:focus-visible + .interruptor__pista { outline: 3px solid var(--fosforito); outline-offset: 2px; }
@media (max-width: 640px) { .interruptor__txt { font-size: .85rem; } .barra .bt--tinta { padding: 8px 10px; } }

/* ---------- Pestañas ---------- */
.pestanas { position: sticky; top: 60px; z-index: 20; background: var(--mesa); padding: 12px clamp(8px, 3vw, 28px) 0; overflow-x: auto; scrollbar-width: none; }
.pestanas::-webkit-scrollbar { display: none; }
.pestanas__in { display: flex; gap: 4px; max-width: 1080px; margin: 0 auto; }
.pestana {
  flex: none; padding: 10px 16px 9px; border: 0; border-radius: 12px 12px 0 0; cursor: pointer;
  font-family: var(--mano); font-weight: 700; font-size: 1.08rem; color: var(--tinta); white-space: nowrap;
  opacity: .78; transform: translateY(4px); transition: transform .15s var(--ease), opacity .15s;
}
.pestana:hover { opacity: 1; transform: translateY(1px); }
.pestana[aria-selected="true"] { opacity: 1; transform: none; box-shadow: 0 -3px 0 inset rgba(0,0,0,.06); }
.pestana--1 { background: #FCE7A8; } .pestana--2 { background: #CFE8D8; } .pestana--3 { background: #D6E4F7; } .pestana--4 { background: #F6D6D6; } .pestana--5 { background: #E6DAF4; }

/* ---------- La hoja ---------- */
.mesa { padding: 0 clamp(8px, 3vw, 28px) 48px; }
.hoja {
  position: relative; max-width: 1080px; margin: 0 auto; min-height: 70vh;
  padding: calc(var(--q) * 1.5) clamp(14px, 3vw, 36px) calc(var(--q) * 3) clamp(28px, 7vw, 84px);
  background-color: var(--papel);
  background-image: linear-gradient(var(--cuadro) 1px, transparent 1px), linear-gradient(90deg, var(--cuadro) 1px, transparent 1px);
  background-size: var(--q) var(--q);
  border-radius: 0 12px 12px 12px;
  box-shadow: 0 1px 2px rgba(27,42,74,.08), 0 18px 40px -26px rgba(27,42,74,.45);
}
.hoja::before { content: ""; position: absolute; top: 0; bottom: 0; left: clamp(18px, 5vw, 60px); width: 2px; background: var(--margen); }
.hoja:focus { outline: none; }
@media (max-width: 560px) { .hoja::before { display: none; } .hoja { padding-left: 12px; padding-right: 12px; } }

.hoja__cab { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin-bottom: calc(var(--q) * 1); }
.hoja__t { font-family: var(--mano); font-weight: 700; font-size: clamp(1.7rem, 4vw, 2.2rem); line-height: 1.1; }
.hoja__sub { color: var(--tinta-2); font-weight: 600; }
.hoja__intro { max-width: 70ch; color: var(--tinta-2); margin-bottom: var(--q); }

/* ---------- Libro diario ---------- */
.diario__cols {
  display: grid; grid-template-columns: var(--col-imp) minmax(0, 1fr) var(--col-imp) 36px; gap: 0 10px;
  font-weight: 700; font-size: .85rem; letter-spacing: .02em; color: var(--tinta-2);
  border-bottom: 2px solid var(--tinta); padding-bottom: 4px; position: sticky; top: 112px; background: var(--papel); z-index: 5;
}
.diario { --col-imp: 118px; }
.diario__cols span:first-child, .diario__cols span:nth-child(3) { text-align: right; }
@media (max-width: 640px) {
  .diario { --col-imp: 1fr; }
  .diario__cols { display: none; }
  .diario .asiento__cab { flex-wrap: wrap; gap: 4px 8px; }
  .diario .asiento__cab::before, .diario .asiento__cab::after { display: none; }
  .asiento__fecha { width: 140px; }
  .diario .asiento__acc { margin-left: auto; }
  .diario .linea { grid-template-columns: 1fr 1fr 32px; grid-template-areas: "cta cta quitar" "debe haber ."; gap: 0 8px; padding: 4px 0; border-bottom: 1px dashed var(--linea); }
  .diario .linea--haber .imp[data-campo="debe"], .diario .linea--debe .imp[data-campo="haber"] { opacity: .55; }
  .imp::placeholder { color: #B5C0CE !important; }
  .diario .asiento__pie { grid-template-columns: 1fr 1fr; grid-template-areas: "d h" "mas mas"; }
  .asiento__pie > .num:first-child { grid-area: d; }
  .asiento__pie > .num:nth-child(3) { grid-area: h; }
  .asiento__pie > .asiento__mas { grid-area: mas; padding: 4px 0; }
  .asiento__pie > span:last-child { display: none; }
}

.asiento { margin-top: calc(var(--q) * 1.5); }
.asiento__cab { display: flex; align-items: center; gap: 10px; min-height: calc(var(--q) * 2); }
.asiento__cab::before, .asiento__cab::after { content: ""; flex: 1; border-top: 1.5px dashed var(--tinta-2); opacity: .55; }
.asiento__cab::before { flex: 0 0 18px; }
.asiento__n { font-family: var(--mano); font-weight: 700; font-size: 1.2rem; }
.asiento__fecha { width: 150px; min-height: 34px; padding: 2px 6px; border: 1.5px solid transparent; border-radius: 6px; background: rgba(255,255,255,.7); font-weight: 700; }
.asiento__fecha:hover { border-color: var(--linea); }
.asiento__tipo { padding: 1px 8px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--tinta); color: #fff; }
.asiento__tipo--apertura { background: #2F6EBA; } .asiento__tipo--regularizacion { background: #8A55C2; } .asiento__tipo--cierre { background: #B04A4A; }
.asiento__acc { display: flex; gap: 2px; }
.asiento__acc button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--tinta-2); cursor: pointer; }
.asiento__acc button:hover { background: var(--mesa); color: var(--tinta); }
.asiento__acc svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.asiento__concepto { display: block; width: 100%; min-height: var(--q); margin: 2px 0 4px; padding: 0 4px; border: 0; border-bottom: 1.5px dotted transparent; background: transparent; font-style: italic; color: var(--tinta-2); }
.asiento__concepto:hover, .asiento__concepto:focus { border-bottom-color: var(--linea); outline: none; }
.asiento__concepto::placeholder { color: #9AA7B8; }

.linea { display: grid; grid-template-columns: var(--col-imp) minmax(0, 1fr) var(--col-imp) 36px; grid-template-areas: "debe cta haber quitar"; gap: 0 10px; align-items: center; min-height: calc(var(--q) * 2); }
.linea .cta { grid-area: cta; }
.linea .imp[data-campo="debe"] { grid-area: debe; }
.linea .imp[data-campo="haber"] { grid-area: haber; }
.linea .quitar { grid-area: quitar; }
.linea:focus-within { background: linear-gradient(transparent 20%, rgba(255, 243, 163, .55) 20%, rgba(255, 243, 163, .55) 85%, transparent 85%); }
.imp {
  width: 100%; min-height: 36px; padding: 2px 6px; text-align: right; border: 1.5px solid transparent; border-radius: 6px;
  background: transparent; font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums;
}
.imp:hover { border-color: var(--linea); background: rgba(255,255,255,.6); }
.imp:focus { border-color: var(--tinta); background: #fff; outline: none; }
.imp::placeholder { color: transparent; }
.linea:hover .imp::placeholder, .imp:focus::placeholder { color: #B5C0CE; }

.cta { position: relative; min-width: 0; }
.cta__in {
  width: 100%; min-height: 36px; padding: 2px 6px; border: 1.5px solid transparent; border-radius: 6px; background: transparent;
  font-size: 1rem; text-overflow: ellipsis;
}
.cta__in:hover { border-color: var(--linea); background: rgba(255,255,255,.6); }
.cta__in:focus { border-color: var(--tinta); background: #fff; outline: none; }
.cta__in::placeholder { color: #A9B4C3; }
.linea--haber .cta { padding-left: calc(var(--q) * 1.6); }
.linea--haber .cta::before { content: "a"; position: absolute; left: 4px; top: 50%; transform: translateY(-50%); font-family: var(--mano); font-weight: 700; font-size: 1.15rem; color: var(--rojo); }
.cta__cod { font-weight: 700; }
.cta--mal .cta__in { color: var(--rojo); }

.lista {
  position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 25; max-height: 300px; overflow: auto;
  margin: 0; padding: 4px; list-style: none; border-radius: 10px; background: #fff; border: 1.5px solid var(--tinta);
  box-shadow: 0 18px 40px -16px rgba(27,42,74,.45);
}
.lista li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.lista li[aria-selected="true"], .lista li:hover { background: var(--fosforito); }
.lista b { font-variant-numeric: tabular-nums; }
.lista__vacia { color: var(--tinta-2); font-style: italic; cursor: default !important; background: none !important; }

.quitar { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #A0ACBC; cursor: pointer; }
.quitar:hover { color: var(--rojo); background: var(--rojo-fondo); }
.quitar svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

.asiento__pie { display: grid; grid-template-columns: var(--col-imp) minmax(0, 1fr) var(--col-imp) 36px; gap: 0 10px; align-items: center; min-height: calc(var(--q) * 2); border-top: 1.5px solid var(--tinta); }
.asiento__pie .num { text-align: right; padding-right: 8px; font-weight: 700; }
.asiento__pie .num.dif { color: var(--rojo); }
.asiento__mas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.asiento__estado { font-size: .9rem; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.asiento__estado--ok { color: var(--verde); }
.asiento__estado--mal { color: var(--rojo); }
.avisos { margin: 6px 0 0; padding: 8px 12px 8px 30px; border-radius: 8px; background: var(--rojo-fondo); color: var(--rojo); font-weight: 600; font-size: .92rem; border-left: 4px solid var(--rojo); }
.avisos li + li { margin-top: 2px; }
.asiento--mal .asiento__pie { border-top-color: var(--rojo); }

.diario__fin { display: flex; flex-wrap: wrap; gap: 10px; margin-top: calc(var(--q) * 2); }
.vacio { padding: calc(var(--q) * 2) var(--q); text-align: center; color: var(--tinta-2); }
.vacio strong { display: block; font-family: var(--mano); font-size: 1.5rem; color: var(--tinta); margin-bottom: 6px; }

/* ---------- Libro mayor (cuentas en T) ---------- */
.mayor { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: calc(var(--q) * 1.5) calc(var(--q) * 1.5); }
.t { break-inside: avoid; }
.t__nom { text-align: center; font-weight: 700; padding-bottom: 4px; }
.t__nom b { font-variant-numeric: tabular-nums; }
.t__cuerpo { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--tinta); }
.t__lado { padding: 4px 8px 6px; min-height: calc(var(--q) * 2); }
.t__lado--d { border-right: 2px solid var(--tinta); }
.t__dh { display: flex; justify-content: space-between; font-size: .72rem; font-weight: 700; color: var(--tinta-2); margin-bottom: 2px; }
.t__mov { display: flex; justify-content: space-between; gap: 6px; line-height: var(--q); min-height: var(--q); font-variant-numeric: tabular-nums; }
.t__mov small { color: var(--tinta-2); font-size: .72rem; }
.t__suma { display: flex; justify-content: space-between; border-top: 1px solid var(--tinta); margin-top: 4px; padding-top: 2px; font-weight: 700; font-variant-numeric: tabular-nums; }
.t__saldo { text-align: center; margin-top: 4px; font-size: .92rem; font-weight: 700; }
.t__saldo--d { color: #2F6EBA; } .t__saldo--a { color: #8A55C2; } .t__saldo--0 { color: var(--tinta-2); }
.filtro { min-height: 40px; padding: 6px 12px; border-radius: 10px; border: 1.5px solid var(--linea); background: #fff; width: min(100%, 300px); }

/* ---------- Tablas (sumas y saldos, balance) ---------- */
.tabla-wrap { overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; background: rgba(255,254,250,.85); }
.tabla th, .tabla td { padding: 0 10px; height: calc(var(--q) * 1.5); text-align: right; white-space: nowrap; border-bottom: 1px solid var(--cuadro); }
.tabla th:first-child, .tabla td:first-child, .tabla th:nth-child(2), .tabla td:nth-child(2) { text-align: left; }
.tabla td:nth-child(2) { white-space: normal; min-width: 200px; }
.tabla thead th { border-bottom: 2px solid var(--tinta); font-size: .85rem; color: var(--tinta-2); }
.tabla tfoot td, .tabla tfoot th { border-top: 2px solid var(--tinta); font-weight: 700; }
.ok { color: var(--verde); font-weight: 700; }
.mal { color: var(--rojo); font-weight: 700; }

/* ---------- Regularización y cierre ---------- */
.pasos { display: grid; gap: calc(var(--q) * 1.5); }
.paso { padding: var(--q); border-radius: 12px; background: rgba(255,254,250,.92); border: 1.5px solid var(--linea); }
.paso h3 { font-family: var(--mano); font-size: 1.35rem; display: flex; align-items: center; gap: 10px; }
.paso__n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--tinta); color: #fff; font-family: var(--letra); font-size: .95rem; }
.paso p { margin-top: 6px; color: var(--tinta-2); max-width: 72ch; }
.paso__ok { color: var(--verde); font-weight: 700; }
.check { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.check li { display: flex; gap: 8px; align-items: flex-start; }
.check li::before { content: "○"; font-weight: 700; color: var(--tinta-2); }
.check li.hecho::before { content: "✓"; color: var(--verde); }
.vista-asiento { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px dashed var(--linea); }
.va { display: grid; grid-template-columns: 110px minmax(0, 1fr) 110px; gap: 0 10px; line-height: 1.9; font-variant-numeric: tabular-nums; }
.va span:first-child, .va span:last-child { text-align: right; font-weight: 700; }
.va--h span:nth-child(2) { padding-left: 24px; }
.va--h span:nth-child(2)::before { content: "a "; color: var(--rojo); font-family: var(--mano); font-weight: 700; }
.acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------- Balance de situación ---------- */
.balance { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--q) * 1.5); }
@media (max-width: 820px) { .balance { grid-template-columns: 1fr; } }
.balance__col h3 { font-family: var(--mano); font-size: 1.4rem; border-bottom: 2px solid var(--tinta); padding-bottom: 4px; }
.bl-sec { margin-top: 10px; }
.bl-sec__t { display: flex; justify-content: space-between; font-weight: 700; padding: 4px 0; border-bottom: 1px solid var(--linea); }
.bl-par { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0 3px 14px; }
.bl-par details summary { cursor: pointer; list-style: none; }
.bl-par details summary::-webkit-details-marker { display: none; }
.bl-par details summary::before { content: "▸ "; color: var(--tinta-2); }
.bl-par details[open] summary::before { content: "▾ "; }
.bl-cta { display: flex; justify-content: space-between; gap: 12px; padding: 1px 0 1px 22px; font-size: .9rem; color: var(--tinta-2); }
.bl-total { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 6px; border-top: 3px double var(--tinta); font-weight: 700; font-size: 1.1rem; }
.estado { margin-top: var(--q); padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.estado--ok { background: var(--verde-fondo); color: var(--verde); }
.estado--mal { background: var(--rojo-fondo); color: var(--rojo); }
.estado--info { background: #EAF1FB; color: #2F5C9A; }

/* ---------- Diálogos y avisos ---------- */
.dlg { width: min(440px, calc(100vw - 24px)); padding: 0; border: 0; border-radius: 16px; color: var(--tinta); box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); }
.dlg::backdrop { background: rgba(27,42,74,.45); }
.dlg__in { padding: 20px; display: grid; gap: 14px; }
.dlg h2 { font-family: var(--mano); font-size: 1.6rem; }
.dlg__pie { display: flex; justify-content: flex-end; gap: 8px; }
.campo { display: grid; gap: 4px; font-weight: 700; }
.campo input { min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--linea); font-weight: 400; }
.campo input:focus { border-color: var(--tinta); outline: none; }
.opciones { margin: 0; padding: 0; border: 0; display: grid; gap: 6px; }
.opciones legend { font-weight: 700; margin-bottom: 4px; }
.opciones label { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.opciones input { width: 18px; height: 18px; accent-color: var(--tinta); }
.nota { color: var(--tinta-2); font-size: .92rem; }
.aviso-flotante { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 24px); padding: 12px 18px; border-radius: 12px; background: var(--tinta); color: #fff; font-weight: 700; box-shadow: 0 16px 40px -12px rgba(0,0,0,.5); }

.pie { max-width: 1080px; margin: 0 auto; padding: 0 clamp(8px, 3vw, 28px) 40px; color: var(--tinta-2); font-size: .9rem; display: grid; gap: 4px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- Impresión / PDF ---------- */
.impresion { display: none; }
@media print {
  @page { margin: 14mm 12mm; }
  body { background: #fff; }
  body > *:not(.impresion) { display: none !important; }
  .impresion { display: block !important; color: #000; font-size: 10.5pt; }
  .impresion.con-cuadritos .imp-hoja { background-image: linear-gradient(#E3ECF5 1px, transparent 1px), linear-gradient(90deg, #E3ECF5 1px, transparent 1px); background-size: 5mm 5mm; }
  .imp-hoja { break-after: page; padding: 2mm 0; }
  .imp-hoja:last-child { break-after: auto; }
  .imp-t { font-family: var(--mano); font-size: 18pt; margin-bottom: 2mm; }
  .imp-sub { font-size: 10pt; color: #333; margin-bottom: 4mm; }
  .imp-asiento { break-inside: avoid; margin-bottom: 3mm; }
  .imp-asiento__cab { display: flex; align-items: center; gap: 3mm; font-weight: 700; }
  .imp-asiento__cab::before, .imp-asiento__cab::after { content: ""; flex: 1; border-top: 1px dashed #555; }
  .imp-asiento__cab::before { flex: 0 0 6mm; }
  .imp-concepto { font-style: italic; color: #333; font-size: 9.5pt; }
  .imp-l { display: grid; grid-template-columns: 26mm 1fr 26mm; gap: 0 3mm; line-height: 1.55; font-variant-numeric: tabular-nums; }
  .imp-l span:first-child, .imp-l span:last-child { text-align: right; }
  .imp-l--h span:nth-child(2) { padding-left: 7mm; }
  .imp-l--h span:nth-child(2)::before { content: "a "; font-family: var(--mano); font-weight: 700; }
  .imp-tot { border-top: 1px solid #000; font-weight: 700; }
  .impresion .mayor { grid-template-columns: repeat(2, 1fr); gap: 5mm 8mm; }
  .impresion .t { break-inside: avoid; }
  .impresion .tabla { background: none; }
  .impresion .tabla th, .impresion .tabla td { height: auto; padding: 1mm 2mm; border-bottom: 0.5px solid #bbb; }
  .impresion .balance { grid-template-columns: 1fr 1fr; gap: 8mm; }
  .impresion .bl-par details summary::before { content: ""; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* En el móvil la barra no se queda fija (ocupa varias filas) y las pestañas se pegan arriba */
@media (max-width: 640px) {
  .barra { position: static; }
  .pestanas { top: 0; }
}
