/* Módulo Compras (bills, gastos, pagos, cheques, 1099, antigüedad). Todo con prefijo cc- porque esta hoja se carga en todas las páginas. */
.cc-rojo{color:var(--malo)}
.cc-filtros{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:flex-end;margin-bottom:12px}
.cc-filtros label{display:flex;flex-direction:column;gap:2px;font-size:13px;color:var(--suave);min-width:200px;max-width:100%}
.cc-filtros label>select,.cc-filtros label>input{flex:none;width:100%}
.cc-kpis .kpi{display:flex;flex-direction:column;gap:2px;margin:0}.cc-kpis .kpi>.suave:first-child{font-size:13px}
.cc-mes{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.cc-mes b{min-width:140px;text-align:center}
.cc-check{display:flex!important;flex-direction:row!important;align-items:center;gap:8px}
.cc-check input{width:auto}
.cc-pie-izq{text-align:left}
.cc-total{font-variant-numeric:tabular-nums}
.cc-pagar input.cc-pago{max-width:130px;margin-left:auto}
.cc-pagar td:first-child,.cc-pagar th:first-child{width:36px}
.cc-pagar input[type=checkbox]{width:20px;height:20px}

/* Celular: cada renglón de bill o gasto es una tarjeta con campos de ancho completo; botones de 44 px. */
@media(max-width:600px){
  .cc-renglones thead{display:none}
  .cc-renglones,.cc-renglones tbody{display:block;width:100%}
  .cc-renglones tbody tr{display:grid;grid-template-columns:1fr 44px;gap:8px;padding:10px;margin-bottom:10px;border:1px solid var(--borde);border-radius:var(--radio);background:var(--panel)}
  .cc-renglones tbody td{display:block;padding:0!important;border:0}
  .cc-renglones tbody td.cc-r-cuenta{grid-column:1}
  .cc-renglones tbody td.cc-r-quitar{grid-column:2;grid-row:1}
  .cc-renglones tbody td.cc-r-memo,.cc-renglones tbody td.cc-r-obra,.cc-renglones tbody td.cc-r-clase,.cc-renglones tbody td.cc-r-monto{grid-column:1/-1}
  .cc-renglones select,.cc-renglones input{width:100%;min-height:44px;font-size:16px}
  .cc-renglones input.monto{text-align:right}
  .cc-renglones .btn.chico{min-height:44px;min-width:44px;justify-content:center}
  .cc-renglones tfoot,.cc-renglones tfoot tr{display:flex;width:100%;justify-content:space-between;align-items:center}
  .cc-renglones tfoot td{display:block;border:0}
  .cc-renglones tfoot td:empty{display:none}
  .cc-renglones tfoot .btn.chico{min-height:44px;padding:8px 14px;font-size:14px}
  .cc-pagar input.cc-pago{min-height:44px;font-size:16px;max-width:110px}
  .cc-mes .btn.chico{min-height:44px;min-width:44px}
  .cc-filtros label{flex:none;width:100%}
  .cc-kpis{grid-template-columns:1fr 1fr;gap:10px}.cc-kpis .kpi{padding:12px}.cc-kpis .kpi .cifra{font-size:19px}
  /* En las páginas de Compras (marcadas con .cc-modulo), botones y campos de 44 px y letra de 16 px (Safari no hace zoom). */
  body:has(.cc-modulo) main :is(.btn,input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select):not(.arriba *){min-height:44px}
  body:has(.cc-modulo) main :is(input:not([type=checkbox]):not([type=radio]),select):not(.arriba *){font-size:16px}
  body:has(.cc-modulo) main .btn:not(.arriba *){justify-content:center}
}

/* Cheque: hoja carta con el cheque arriba (3.5 in) y dos talones. En pantalla se ve como una hoja. */
@page cheque{size:letter;margin:0}
.cc-hoja{background:#fff;color:#000;max-width:8.5in;margin:0 auto 18px;border:1px solid var(--borde);border-radius:6px;font-size:13px;overflow:hidden}
.cc-cheque{padding:.35in .45in .25in;display:flex;flex-direction:column;gap:14px;border-bottom:1px dashed #9aa5bd}
.cc-ch-arriba{display:flex;justify-content:space-between;gap:12px}
.cc-ch-emp,.cc-ch-dir{display:flex;flex-direction:column;line-height:1.35}
.cc-ch-num{display:flex;flex-direction:column;align-items:flex-end;gap:10px;text-align:right}
.cc-ch-num>b{font-size:15px}
.cc-ch-rot{font-size:9px;font-weight:700;letter-spacing:.04em;line-height:1.1}
.cc-ch-pagar{display:flex;align-items:flex-end;gap:10px}
.cc-ch-quien{flex:1;border-bottom:1px solid #000;font-size:15px;padding:0 4px 2px;min-width:0;overflow-wrap:anywhere}
.cc-ch-monto{border:1px solid #000;padding:4px 10px;font-weight:700;font-size:15px;white-space:nowrap}
.cc-ch-letras{display:flex;align-items:flex-end;gap:8px}
.cc-ch-palabras{flex:1;display:flex;align-items:flex-end;gap:6px;border-bottom:1px solid #000;padding:0 4px 2px;min-width:0;overflow-wrap:anywhere}
/* Relleno para que nadie agregue texto después del monto en letras. */
.cc-ch-palabras::after{content:"";flex:1 0 16px;border-bottom:2px dotted #000;margin-bottom:5px}
.cc-ch-abajo{display:flex;justify-content:space-between;align-items:flex-end;gap:16px}
.cc-ch-firma{display:flex;flex-direction:column;gap:22px;width:48%}
.cc-ch-memo{border-bottom:1px solid #000;padding-bottom:2px;overflow-wrap:anywhere}
.cc-ch-linea{border-top:1px solid #000;padding-top:2px;font-size:9px;font-weight:700;text-align:center}
.cc-talon{padding:.3in .45in;border-bottom:1px dashed #9aa5bd}
.cc-talon:last-child{border-bottom:0}
.cc-talon-cab{display:flex;justify-content:space-between;gap:12px;margin-bottom:6px}
.cc-talon-tabla{width:100%;border-collapse:collapse;margin-top:6px}
.cc-talon-tabla td{padding:3px 4px;border-bottom:1px solid #e3e3e3}
.cc-talon-tabla td.num{text-align:right;font-variant-numeric:tabular-nums}
.cc-talon-tabla tfoot td{border-bottom:0;padding-top:6px}
.cc-talon-memo{margin-top:6px;color:#333}
@media(max-width:600px){
  .cc-hoja{font-size:11px}
  .cc-cheque,.cc-talon{padding:14px}
  .cc-ch-arriba,.cc-ch-abajo{flex-direction:column;align-items:stretch}
  .cc-ch-num{flex-direction:row;justify-content:space-between;align-items:center}
  .cc-ch-pagar{flex-wrap:wrap}
  .cc-ch-quien{flex:1 1 100%;order:2}
  .cc-ch-firma{width:100%}
}
@media print{
  .cc-hoja{font-family:Arial,Helvetica,sans-serif;page:cheque;break-after:page;max-width:none;width:8.5in;height:11in;margin:0;border:0;border-radius:0;display:flex;flex-direction:column}
  .cc-hoja:last-of-type{break-after:auto}
  .cc-cheque{height:3.5in;box-sizing:border-box;border-bottom:0}
  .cc-talon{height:3.75in;box-sizing:border-box;border-bottom:0;overflow:hidden}
}
