/* SGE — Cuadres generados (F2) */
.sge-cq-tabs { display: flex; gap: 6px; margin: 4px 0 18px; border-bottom: 2px solid #e5e7eb; }
.sge-cq-tab {
  background: none; border: none; padding: 10px 18px; font-weight: 600; font-size: 14px;
  color: #6b7280; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.sge-cq-tab.active { color: #2e7d32; border-bottom-color: #2e7d32; }

.sge-cq-panel { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 16px; margin-bottom: 18px; }
.sge-cq-panel h3 { margin: 0 0 12px; font-size: 16px; }
.sge-cq-filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.sge-cq-filtros label { font-size: 13px; color: #555; display: flex; gap: 6px; align-items: center; }
.sge-cq-filtros select, .sge-cq-filtros input { padding: 7px 10px; border: 1px solid #d1d5db; border-radius: 6px; }

#sge-admin-view .sge-cq-panel .sge-btn-primary,
#sge-cq-modal .sge-btn-primary,
#sge-cq-modal .sge-btn-danger {
  border: none; border-radius: 6px; padding: 7px 12px; font-weight: 600; cursor: pointer; color: #fff;
}
#sge-admin-view .sge-cq-panel .sge-btn-primary, #sge-cq-modal .sge-btn-primary { background: #2e7d32; }
#sge-cq-modal .sge-btn-danger { background: #c62828; }

.sge-cq-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sge-cq-table th { background: #f3f4f6; text-align: left; padding: 8px; font-weight: 600; white-space: nowrap; }
.sge-cq-table td { padding: 8px; border-top: 1px solid #eef0f2; vertical-align: top; }
.sge-cq-scroll { overflow-x: auto; }
.sge-cq-acciones { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.sge-cq-vacio { color: #6b7280; font-style: italic; }
.sge-cq-nota { font-size: 12px; color: #6b7280; margin-top: 6px; }
.sge-cq-motivo { font-size: 12px; color: #8d6e00; margin-top: 2px; }
.sge-cq-dest { font-size: 11px; color: #6b7280; }
.sge-cq-warn { color: #b26a00; font-size: 12px; cursor: help; }
.sge-cq-pos { color: #c62828; font-weight: 600; }
.sge-cq-neg { color: #2e7d32; font-weight: 600; }

.sge-cq-saldo { font-weight: 700; white-space: nowrap; }
.sge-cq-saldo.debe  { color: #c62828; }
.sge-cq-saldo.favor { color: #2e7d32; }
.sge-cq-saldo.cero  { color: #1565c0; }

.sge-cq-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.sge-cq-badge.pend  { background: #ffebee; color: #c62828; }
.sge-cq-badge.parc  { background: #fff8e1; color: #8d6e00; }
.sge-cq-badge.pag   { background: #e8f5e9; color: #2e7d32; }
.sge-cq-badge.verif { background: #e3f2fd; color: #1565c0; }

.sge-cq-modal { position: fixed; inset: 0; z-index: 99999; }
.sge-cq-modal.hidden { display: none; }
.sge-cq-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.sge-cq-modal-box {
  position: relative; background: #fff; border-radius: 12px; padding: 22px;
  width: min(1100px, 94vw); max-height: 90vh; overflow-y: auto; margin: 5vh auto;
}
.sge-cq-modal-close { position: absolute; top: 10px; right: 12px; border: none; background: none; font-size: 20px; cursor: pointer; }
.sge-cq-modal-box h3 { margin: 0 0 4px; }
.sge-cq-modal-box h4 { margin: 18px 0 8px; }
.sge-cq-det-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sge-cq-kpis { display: flex; gap: 18px; }
.sge-cq-kpis div { display: flex; flex-direction: column; font-size: 14px; }
.sge-cq-kpis span { font-size: 11px; color: #6b7280; text-transform: uppercase; }
.sge-cq-conf { margin-top: 10px; padding: 8px 12px; border-radius: 6px; }
.sge-cq-conf.conforme { background: #e8f5e9; }
.sge-cq-conf.novedad  { background: #fff8e1; }
.sge-cq-pago-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #f9fafb; padding: 12px; border-radius: 8px; margin-top: 12px; }
.sge-cq-pago-form h4 { width: 100%; margin: 0 0 4px; }
.sge-cq-pago-form select, .sge-cq-pago-form input[type=number], .sge-cq-pago-form input[type=text] { padding: 7px 10px; border: 1px solid #d1d5db; border-radius: 6px; }

/* SGE — Inventario (F4) */
.sge-inv-open { background: #eef6ee; border: 1px solid #c8e6c9; border-radius: 6px; padding: 4px 8px; cursor: pointer; margin-right: 4px; }
#sge-inv-modal .sge-btn-primary { border: none; border-radius: 6px; padding: 6px 10px; font-weight: 600; cursor: pointer; color: #fff; background: #2e7d32; }
.sge-inv-btn { border: 1px solid #d1d5db; background: #fff; border-radius: 6px; padding: 6px 9px; font-size: 12px; font-weight: 600; cursor: pointer; }
.sge-inv-btn:hover { background: #f3f4f6; }
.sge-inv-picker { border: 1px dashed #c8e6c9; background: #f6fbf6; border-radius: 8px; padding: 10px; margin-bottom: 10px; }
.sge-inv-picker:empty { display: none; }
.sge-inv-pk-title { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.sge-inv-pk-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; border-bottom: 1px solid #e8efe8; }
.sge-inv-pk-row small { color: #6b7280; display: block; }
.sge-inv-pk-row input { width: 70px; padding: 5px; border: 1px solid #d1d5db; border-radius: 6px; text-align: center; }
.sge-inv-pk-total { font-size: 12px; color: #2e7d32; margin-top: 6px; }
