/* ==================================================================
   COFER - Estilos generales
   Colores institucionales: azul #003068 / rojo #c9262b
   ================================================================== */
:root{
  --rail-w: 88px;
  --panel-w: 264px;
  --top-h: 60px;

  --navy: #003068;
  --navy-2: #0b3f7c;
  --navy-3: #164b8a;
  --red: #c9262b;
  --red-dark: #a81f24;

  --rail-bg: var(--navy);
  --rail-fg: #b8c8de;

  --accent: var(--navy);
  --accent-soft: #e7eef7;
  --border: #e1e6ed;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --text: #1b2533;
  --muted: #687586;

  --ok-bg: #e7f5ec;  --ok-fg: #1d6b3a;
  --err-bg: #fdecec; --err-fg: #a81f24;
  --info-bg: #e7eef7; --info-fg: #003068;
}
*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
}
svg.ic{ width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.muted{ color: var(--muted); }

/* ---------- Barra lateral de íconos ---------- */
.rail{
  position: fixed; inset: 0 auto 0 0;
  width: var(--rail-w);
  background: var(--rail-bg);
  display: flex; flex-direction: column;
  z-index: 30;
  transition: transform .2s ease;
}
.rail-logo{
  height: var(--top-h); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.rail-logo img{
  width: 42px; height: 42px; border-radius: 50%;
  background: #fff; object-fit: contain; padding: 2px;
}
.rail-nav{ flex: 1; overflow-y: auto; padding: 8px 0; display: flex; flex-direction: column; gap: 2px; }
.rail-bottom{ padding: 8px 0 12px; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-direction: column; gap: 2px; }

.rail-item{
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  margin: 0 8px; padding: 10px 4px 9px;
  border-radius: 10px;
  color: var(--rail-fg);
  text-align: center; text-decoration: none;
  position: relative;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.rail-item .lbl{ font-size: 11px; line-height: 1.2; font-weight: 500; }
.rail-item:hover{ background: var(--navy-2); color: #fff; }
.rail-item.open{ background: var(--navy-3); color: #fff; }
.rail-item.active{ background: var(--red); color: #fff; }
.rail-item.active::before{
  content: ""; position: absolute; left: -8px; top: 12px; bottom: 12px;
  width: 3px; border-radius: 0 3px 3px 0; background: #fff;
}
.rail-item:focus-visible{ outline: 2px solid #fff; outline-offset: -2px; }

/* ---------- Panel de submenú ---------- */
.panel{
  position: fixed; top: 0; bottom: 0; left: var(--rail-w);
  width: var(--panel-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  box-shadow: 6px 0 24px rgba(0,48,104,.12);
  display: flex; flex-direction: column;
  z-index: 25;
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform .2s ease, visibility .2s;
}
.panel.show{ transform: translateX(0); visibility: visible; }
.app.pinned .panel{ box-shadow: none; }
.no-anim, .no-anim *{ transition: none !important; }

.panel-head{
  height: var(--top-h); flex-shrink: 0;
  display: flex; align-items: center; gap: 6px;
  padding: 0 10px 0 18px;
  border-bottom: 1px solid var(--border);
}
.panel-head h2{ margin: 0; font-size: 16px; font-weight: 600; flex: 1; color: var(--navy); }
.icon-btn{
  appearance: none; border: 0; background: transparent; cursor: pointer;
  width: 34px; height: 34px; border-radius: 8px;
  display: grid; place-items: center; color: var(--muted);
}
.icon-btn svg.ic{ width: 18px; height: 18px; }
.icon-btn:hover{ background: var(--bg); color: var(--text); }
.icon-btn.on{ color: var(--red); background: var(--err-bg); }

.panel-body{ flex: 1; overflow-y: auto; padding: 10px 10px 20px; }
.grp-title{
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px;
  color: var(--muted); margin: 16px 10px 6px;
}
.grp-title:first-child{ margin-top: 6px; }
.sub-link{
  display: block; padding: 9px 10px 9px 12px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-size: 14px;
  position: relative;
}
.sub-link:hover{ background: var(--bg); }
.sub-link.active{ background: var(--accent-soft); color: var(--navy); font-weight: 600; }
.sub-link.active::before{
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 3px; background: var(--red);
}

.sub-head{
  font-size: 13px; font-weight: 600; color: var(--navy);
  padding: 9px 10px 4px 12px;
}
.sub-group{
  margin: 0 0 4px 14px; padding-left: 4px;
  border-left: 1px solid var(--border);
}
.sub-group .sub-link{ font-size: 13.5px; padding-top: 7px; padding-bottom: 7px; }

/* ---------- Barra superior ---------- */
.topbar{
  position: fixed; top: 0; right: 0; left: var(--rail-w);
  height: var(--top-h);
  background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; padding: 0 20px;
  z-index: 10;
  transition: left .2s ease;
}
.hamb{ display: none; }
.crumbs{ flex: 1; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs b{ color: var(--text); font-weight: 600; }
.user{
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  padding: 4px 6px 4px 10px; border-radius: 10px;
}
.user:hover{ background: var(--bg); }
.user-txt{ display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.user .name{ font-size: 14px; font-weight: 600; }
.user .role{ font-size: 12px; color: var(--muted); }
.avatar{
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy); color: #fff; font-weight: 600; font-size: 13px;
  display: grid; place-items: center;
}

/* ---------- Contenido ---------- */
.main{
  margin-left: var(--rail-w);
  padding: calc(var(--top-h) + 24px) 24px 24px;
  min-height: 100%;
  transition: margin-left .2s ease;
}
.app.pinned .main{ margin-left: calc(var(--rail-w) + var(--panel-w)); }
.app.pinned .topbar{ left: calc(var(--rail-w) + var(--panel-w)); }

.card{
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 24px; max-width: 960px; margin-bottom: 16px;
}
.card-narrow{ max-width: 460px; }
.card h1{ margin: 0 0 8px; font-size: 22px; color: var(--navy); }
.card p{ margin: 0 0 16px; }
.card p:last-child{ margin-bottom: 0; }

.backdrop{ position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 20; display: none; }

/* ---------- Formularios ---------- */
.field{ display: block; margin-bottom: 16px; }
.field > span{ display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea{
  width: 100%; padding: 10px 12px;
  font: inherit; color: var(--text);
  border: 1px solid #cdd5df; border-radius: 8px; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus{
  outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(0,48,104,.15);
}
.field small{ display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }

.btn{
  appearance: none; border: 1px solid transparent; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 14px;
  padding: 10px 18px; border-radius: 8px;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-primary{ background: var(--navy); color: #fff; }
.btn-primary:hover{ background: var(--navy-2); }
.btn-danger{ background: var(--red); color: #fff; }
.btn-danger:hover{ background: var(--red-dark); }
.btn-block{ width: 100%; }

.alert{ padding: 11px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; max-width: 960px; }
.alert-ok{ background: var(--ok-bg); color: var(--ok-fg); }
.alert-error{ background: var(--err-bg); color: var(--err-fg); }
.alert-info{ background: var(--info-bg); color: var(--info-fg); }

/* ---------- Login ---------- */
.login-page{
  display: flex; align-items: center; justify-content: center;
  min-height: 100%; padding: 24px 16px;
  background: linear-gradient(160deg, var(--navy) 0%, #0d2a52 60%, #1a1f3a 100%);
}
.login-box{
  width: 100%; max-width: 380px;
  background: var(--surface); border-radius: 16px;
  padding: 32px 28px 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  border-top: 4px solid var(--red);
}
.login-brand{ display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.login-brand img{ width: 56px; height: 56px; border-radius: 50%; object-fit: contain; }
.login-name{ font-size: 22px; font-weight: 700; color: var(--navy); letter-spacing: .5px; }
.login-desc{ font-size: 13px; color: var(--muted); line-height: 1.3; }
.login-foot{ margin: 18px 0 0; font-size: 12px; color: var(--muted); text-align: center; }

/* ---------- Celular / pantallas chicas ---------- */
@media (max-width: 768px){
  .rail{ transform: translateX(-100%); }
  .app.nav-open .rail{ transform: translateX(0); }
  .app.nav-open .backdrop{ display: block; }
  .panel{ width: min(var(--panel-w), calc(100vw - var(--rail-w))); }
  .topbar, .app.pinned .topbar{ left: 0; padding: 0 12px; }
  .main, .app.pinned .main{ margin-left: 0; padding: calc(var(--top-h) + 16px) 16px 16px; }
  .hamb{ display: grid; }
  .pin-btn{ display: none; }
  .user-txt{ display: none; }
}

/* ==================================================================
   Fichas, pestañas, listados (ABM)
   ================================================================== */
.card-wide{ max-width: 1200px; }
.btn-ghost{ background: var(--surface); color: var(--navy); border-color: #cdd5df; }
.btn-ghost:hover{ background: var(--bg); }
.btn-danger-text{ color: var(--red); }
.btn.is-disabled{ opacity: .4; pointer-events: none; }
.badge{
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--navy); font-size: 12px; font-weight: 600;
}
.mono{ font-variant-numeric: tabular-nums; }
.req{ color: var(--red); }

/* --- Ficha --- */
.ficha{ max-width: 1100px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.ficha-head{
  display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; justify-content: space-between;
  padding: 20px 24px 16px;
}
.ficha-head h1{ margin: 2px 0 6px; font-size: 22px; color: var(--navy); }
.ficha-sub{ font-size: 13px; color: var(--muted); }
.acciones{ display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acciones form{ margin: 0; }
.ficha > .alert{ margin: 0 24px 16px; }
.ficha-foot{
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 24px; border-top: 1px solid var(--border);
  position: sticky; bottom: 0; background: var(--surface); border-radius: 0 0 12px 12px;
}

/* --- Pestañas --- */
.tabs{
  display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: thin;
}
.tab{
  appearance: none; border: 0; background: transparent; cursor: pointer; font: inherit;
  padding: 12px 14px; font-size: 14px; font-weight: 500; color: var(--muted);
  border-bottom: 3px solid transparent; white-space: nowrap; margin-bottom: -1px;
}
.tab:hover{ color: var(--navy); }
.tab[aria-selected="true"]{ color: var(--navy); font-weight: 600; border-bottom-color: var(--red); }
.tab:focus-visible{ outline: 2px solid var(--navy); outline-offset: -2px; border-radius: 6px 6px 0 0; }
.tab.has-error{ color: var(--red); }
.tab-mark{
  display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700; margin-left: 4px;
}
.tab-panel{ padding: 8px 24px 20px; }

/* --- Secciones y grilla de campos --- */
.sec{ border: 0; padding: 0; margin: 16px 0 6px; min-width: 0; }
.sec legend{
  padding: 0; margin-bottom: 12px; font-size: 12px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--muted);
}
.grid{ display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 16px; }
.fld{ margin-bottom: 12px; min-width: 0; }
.w-s{ grid-column: span 1; } .w-m{ grid-column: span 2; } .w-l{ grid-column: span 3; } .w-xl{ grid-column: 1 / -1; }
.fld-label{ display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.fld input[type=text], .fld input[type=email], .fld input[type=password], .fld input[type=month], .fld input[type=date], .fld select{
  width: 100%; padding: 9px 11px; font: inherit; color: var(--text);
  border: 1px solid #cdd5df; border-radius: 8px; background: #fff;
}
.fld input:focus, .fld select:focus{ outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(0,48,104,.15); }
.fld input:disabled, .fld select:disabled{ background: var(--bg); color: var(--muted); }
.fld input.upper{ text-transform: uppercase; }
.fld small{ display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.fld .fld-error{ color: var(--err-fg); font-weight: 500; }
.fld.has-error input, .fld.has-error select{ border-color: var(--red); }
.fld-val{
  padding: 9px 0 6px; border-bottom: 1px solid var(--border); min-height: 38px;
  overflow-wrap: anywhere;
}
.radios{ display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 6px 0; }
.radios label, .fld-check label{ display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.fld-check{ margin-bottom: 4px; }
.fld-check.sub{ padding-left: 28px; }
.fld.is-disabled{ opacity: .55; }
input[type=checkbox], input[type=radio]{ width: 17px; height: 17px; accent-color: var(--navy); margin: 0; }

/* --- Listado --- */
.toolbar{ display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.buscador{ display: flex; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 260px; }
.buscador input[type=search]{ flex: 1; min-width: 200px; }
.buscador input, .buscador select{
  padding: 9px 11px; font: inherit; border: 1px solid #cdd5df; border-radius: 8px; background: #fff;
}
.resumen{ margin: 8px 0 12px; font-size: 13px; }
.vacio{ padding: 24px 0; color: var(--muted); text-align: center; }
.tabla-wrap{ overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.tabla{ width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th{
  text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
  color: var(--muted); background: var(--bg); padding: 10px 12px; white-space: nowrap;
}
.tabla th a{ color: inherit; text-decoration: none; }
.tabla th a.ord{ color: var(--navy); }
.tabla th a.ord::after{ content: " ↓"; }
.tabla td{ padding: 10px 12px; border-top: 1px solid var(--border); }
.tabla td a{ color: var(--navy); text-decoration: none; font-weight: 500; }
.tabla tbody tr[data-editar]{ cursor: pointer; user-select: none; }
.tabla td.nombre{ font-weight: 500; color: var(--navy); }
.tabla tbody tr.sel td.nombre, .tabla tbody tr:focus td.nombre{ color: #fff; }
.tabla tbody tr{ transition: background .1s; }
.tabla tbody tr:hover{ background: #dbe6f3; }
.tabla tbody tr:hover td:first-child,
.tabla tbody tr:focus td:first-child,
.tabla tbody tr.sel td:first-child{ box-shadow: inset 4px 0 0 var(--red); }
/* Fila seleccionada (la última consultada o la marcada con el teclado) */
.tabla tbody tr.sel,
.tabla tbody tr:focus{ background: var(--navy); outline: none; }
.tabla tbody tr.sel td, .tabla tbody tr.sel td a,
.tabla tbody tr:focus td, .tabla tbody tr:focus td a{ color: #fff; }
.tabla tbody tr.sel .btn-ghost, .tabla tbody tr:focus .btn-ghost{ background: #fff; color: var(--navy); border-color: #fff; }
.tabla tbody tr.sel .btn-danger-text, .tabla tbody tr:focus .btn-danger-text{ color: var(--red); }
.col-acc{ width: 1%; white-space: nowrap; text-align: right; }
.fila-acc{ display: flex; gap: 6px; justify-content: flex-end; }
.fila-acc form{ margin: 0; }
.btn-sm{ padding: 5px 10px; font-size: 13px; }
.sr-only{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.paginacion{ display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 16px; }

@media (max-width: 900px){
  .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .w-l{ grid-column: 1 / -1; }
  .col-opt{ display: none; }
}
@media (max-width: 560px){
  .grid{ grid-template-columns: minmax(0, 1fr); }
  .w-s, .w-m, .w-l{ grid-column: 1 / -1; }
  .ficha-head, .tab-panel, .ficha-foot{ padding-left: 16px; padding-right: 16px; }
}

/* --- Impresión de ficha --- */
.print-page{ background: #fff; padding: 24px; max-width: 900px; margin: 0 auto; }
.print-bar{ text-align: right; margin-bottom: 12px; }
.print-head{ display: flex; gap: 12px; align-items: center; font-size: 13px; border-bottom: 2px solid var(--navy); padding-bottom: 10px; }
.print-head img{ width: 44px; height: 44px; }
.print-page h1{ font-size: 20px; color: var(--navy); margin: 16px 0 4px; }
.print-page h1 small{ display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.print-tabs .tabs{ display: none; }
.print-tabs .tab-panel{ padding: 0; }
.print-tabs .fld-val{ padding: 4px 0; min-height: 0; }
.print-tabs .fld{ margin-bottom: 6px; }
@media print{
  .no-print{ display: none !important; }
  .print-page{ padding: 0; }
  .sec{ break-inside: avoid; }
}

/* Listados para imprimir */
.tabla-print{ margin-top: 12px; font-size: 13px; }
.tabla-print th{ background: #fff; border-bottom: 2px solid var(--navy); color: var(--navy); }
.tabla-print td{ padding: 6px 10px; }
.tabla-print tbody tr:hover{ background: none; }
@media print{ .tabla-print thead{ display: table-header-group; } .tabla-print tr{ break-inside: avoid; } }
.fld input.num{ text-align: right; max-width: 160px; }

/* --- Grilla editable (Nomenclador) --- */
.tabla-edit td{ padding: 6px 10px; vertical-align: middle; }
.tabla-edit tbody tr:hover{ background: #f2f6fb; }
.tabla-edit tbody tr:hover td:first-child{ box-shadow: inset 4px 0 0 var(--red); }
.tabla-edit tbody tr:focus-within{ background: #dbe6f3; }
.tabla-edit label{ cursor: pointer; }
.tabla-edit input{ padding: 6px 8px; font: inherit; border: 1px solid #cdd5df; border-radius: 6px; background: #fff; }
.tabla-edit input:focus{ outline: 2px solid var(--navy); outline-offset: 0; border-color: var(--navy); }
.tabla-edit input.mayus{ text-transform: uppercase; }
.tabla-edit input.w-cod{ width: 14ch; }
.tabla-edit input.w-fac{ width: 5ch; }
.tabla-edit input.num{ width: 13ch; text-align: right; }
.tabla-edit tr.has-error input{ border-color: var(--red); }
.tabla-edit .fld-error{ color: var(--err-fg); font-weight: 500; font-size: 13px; margin-top: 2px; }
.tabla-edit tr.falta td{ color: var(--muted); }
.tabla th.num, .tabla td.num{ text-align: right; }
.tag{ display: inline-block; margin-left: 6px; padding: 1px 7px; font-size: 11px; border-radius: 999px; background: #fdecea; color: var(--red); vertical-align: middle; }
.print-grupo{ margin-top: 18px; break-inside: auto; }
.print-grupo h2{ font-size: 15px; color: var(--navy); margin: 0; }
.print-grupo h2 small{ color: var(--muted); font-weight: 400; margin-left: 6px; }

/* --- Escala de retenciones --- */
.ayuda-escala{ font-size: 13px; margin: 0 0 10px; }
.tabla-edit input.w-porc{ width: 8ch; }
.tabla th.grupo{ text-align: center; color: var(--navy); border-bottom: 1px solid var(--border); }
.sec.has-error legend{ color: var(--red); }
.print-sub{ font-size: 15px; color: var(--navy); margin: 18px 0 0; }
fieldset.sec{ min-width: 0; }   /* deja que las tablas anchas scrolleen dentro del recuadro */
.tabla-wrap{ position: relative; }   /* los textos ocultos de accesibilidad no estiran la página */

/* --- Grabación de órdenes --- */
.fld-val.total{ font-weight: 700; color: var(--navy); }
.buscador select{ min-width: 150px; }

/* --- Presentación / anulación de órdenes --- */
h2.sub{ font-size: 15px; color: var(--navy); margin: 22px 0 10px; }
.ficha-head.flat{ padding: 0 0 14px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
form.confirmar{ margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
form.confirmar p{ flex-basis: 100%; margin: 0; font-size: 13px; }
form.confirmar .grid{ flex-basis: 100%; }
.tabla tfoot td, .tabla tr.total td{ font-weight: 700; color: var(--navy); border-top: 2px solid var(--navy); }
.tabla-print tr.subgrupo td{ font-weight: 600; background: #f2f6fb; }
.tabla-print tr.subtotal td{ font-style: italic; border-top: 1px solid var(--border); }
.print-total{ text-align: right; font-size: 15px; margin-top: 14px; }
h2.sub.primero{ margin-top: 0; }

/* --- Débitos de obras sociales --- */
.tabla-edit input[type=checkbox]{ width: 18px; height: 18px; padding: 0; vertical-align: middle; }
.tabla-edit tbody tr.marcada{ background: #fdf3e1; }
.tabla-edit tbody tr.marcada td{ color: var(--text, #1d2533); }
.tabla-edit td .fld-error{ display: block; }

/* --- Liquidación --- */
.liq-resumen{ display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.liq-resumen > div{ flex: 1 1 160px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.liq-resumen span{ display: block; font-size: 12px; color: var(--muted); }
.liq-resumen strong{ font-size: 17px; color: var(--navy); }
.liq-resumen .liq-pct{ border-color: var(--navy); background: #eef3f9; }
.liq-resumen .liq-alerta{ border-color: var(--red); background: #fdecea; }
.liq-resumen .liq-alerta strong{ color: var(--red); }

/* --- Pago --- */
.tabla tr.pag-ojo td{ background: #fdf3e1; }

/* --- Informes --- */
.inf-cabecera{ display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 10px; }
.inf-cabecera h2.sub{ margin: 0; }
.inf-cabecera .acciones-inline{ display: flex; gap: 8px; flex-wrap: wrap; }
.inf-ficha{ border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; break-inside: avoid; }
.inf-ficha h3{ margin: 0 0 6px; font-size: 15px; color: var(--navy); }
.inf-ficha dl{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 16px; margin: 0; font-size: 13px; }
.inf-ficha dl div{ min-width: 0; }
.inf-ficha dt{ color: var(--muted); font-size: 11px; }
.inf-ficha dd{ margin: 0 0 4px; overflow-wrap: anywhere; }
@media (max-width: 640px){ .inf-ficha dl{ grid-template-columns: 1fr; } }

/* --- Constancias de retención (una por hoja) --- */
.constancia{ border: 1px solid #333; padding: 18px 22px; margin: 0 0 24px; font-size: 13px; line-height: 1.5; break-after: page; page-break-after: always; }
.constancia:last-of-type{ break-after: auto; page-break-after: auto; }
.constancia h3{ font-size: 12px; letter-spacing: .04em; background: #eee; padding: 3px 8px; margin: 14px 0 6px; }
.constancia p{ margin: 2px 8px; }
.cons-head{ display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 10px; align-items: center; border-bottom: 2px solid #333; padding-bottom: 10px; }
.cons-ente{ font-size: 11px; font-weight: 700; }
.cons-titulo{ text-align: center; font-size: 16px; font-weight: 700; }
.cons-nro{ text-align: right; }
.cons-impuesto{ text-align: center; font-weight: 600; margin: 8px 0 !important; }
.cons-firma{ margin: 48px 8px 0 auto; width: 260px; text-align: center; font-size: 12px; }
.cons-linea{ border-top: 1px solid #333; margin-bottom: 4px; }

/* --- Comprobantes / detalle de liquidación (un profesional por hoja al imprimir) --- */
.liqcomp-prof{ margin-bottom: 26px; }
.liqcomp-tit{ font-size: 15px; color: var(--navy); margin: 14px 0 4px; }
.liqcomp-tit small{ font-weight: 400; color: var(--muted); }
.liqcomp-totales{ margin-top: 8px; }
@media print{ .liqcomp-prof + .liqcomp-prof{ break-before: page; page-break-before: always; } }
.cons-ente img{ max-width: 170px; max-height: 60px; display: block; margin-bottom: 4px; }

/* --- Certificaciones (documento de una hoja) --- */
.carta-marco{ background: #eef1f5; padding: 18px; border-radius: 10px; }
.carta{ background: #fff; max-width: 780px; margin: 0 auto; padding: 36px 48px; font-size: 14px; line-height: 1.6; color: #111; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.print-page .carta{ box-shadow: none; padding: 0; max-width: none; }
.carta-membrete{ display: grid; grid-template-columns: 80px 1fr auto; gap: 14px; align-items: center; border-bottom: 2px solid #333; padding-bottom: 10px; margin-bottom: 28px; }
.carta-membrete img{ width: 80px; height: auto; align-self: start; }
.carta-sigla{ font-size: 24px; font-weight: 700; letter-spacing: .02em; }
.carta-colegio{ font-weight: 600; }
.carta-dom{ text-align: right; font-size: 12px; }
.carta-fecha{ text-align: right; margin: 0 0 22px; }
.carta-dest{ margin: 0 0 22px; }
.carta-intro{ margin: 0 0 14px; }
.carta-destacado{ text-align: center; font-weight: 700; font-size: 15px; margin: 0 0 18px; }
.carta-destacado.carta-izq{ text-align: left; margin-left: 40px; }
.carta-texto{ text-align: justify; margin: 0 0 14px; }
.carta-firma{ margin: 70px 0 0 auto; width: 260px; text-align: center; font-size: 13px; }
.sol-head{ text-align: center; margin-bottom: 18px; position: relative; min-height: 80px; }
.sol-logo{ position: absolute; left: 0; top: 0; width: 80px; height: auto; }
.sol-head h2{ font-size: 17px; margin: 6px 0 0; }
.sol-sangria{ text-indent: 2.5em; }
.sol-sec{ border: 1px solid #666; border-radius: 4px; padding: 6px 12px 10px; margin: 0 0 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.sol-sec legend{ font-size: 12px; font-weight: 700; padding: 0 6px; }
.sol-dato{ display: flex; gap: 6px; font-size: 13px; border-bottom: 1px dotted #999; min-height: 22px; }
.sol-dato span{ color: #444; white-space: nowrap; }
.sol-dato.sol-ancho{ grid-column: 1 / -1; }
.sol-firma{ margin: 40px 0 18px auto; width: 240px; text-align: center; font-size: 13px; }
.sol-acuerdo{ display: block; font-size: 13px; }
.sol-acuerdo p{ margin: 6px 0; }
.sol-colegio{ text-align: center; margin-top: 14px !important; }
.sol-firmas{ display: flex; justify-content: space-around; margin-top: 46px; text-align: center; }
.sol-firmas > div{ width: 200px; }
@media print{ .print-page{ max-width: none; } .carta{ font-size: 13px; } }
.fila-checks{ display: flex; flex-wrap: wrap; gap: 8px 22px; padding-top: 6px; }
.fila-checks label{ display: flex; align-items: center; gap: 6px; font-weight: 400; }
.carta-chica .carta-texto{ font-size: 13px; margin-bottom: 10px; }
.carta-cita{ padding-left: 18px; }
.tag-plain{ background: #eef1f5; color: #445; }
.tag-ok{ background: var(--ok-bg); color: var(--ok-fg); }
.tag-err{ background: var(--err-bg); color: var(--err-fg); }
.envio-prev{ margin-top: 4px; }
.envio-prev summary{ cursor: pointer; color: var(--navy); font-size: 12px; }
.envio-prev pre{ white-space: pre-wrap; font-size: 12px; background: #f6f7f9; border: 1px solid #e3e6ea; border-radius: 6px; padding: 10px; margin: 6px 0 0; max-width: 820px; }
.envio-asunto{ font-size: 12px; margin-top: 6px; }
.envio-link{ display: inline-block; margin: 4px 12px 0 0; font-size: 12px; color: var(--navy); }
