.compras-page #modalCompra .modal-dialog{max-width:min(1220px,calc(100% - 24px))}.compras-page #modalCompra .modal-content{max-height:calc(100vh - 24px);border:0;border-radius:20px;overflow:hidden}.compras-page #modalCompra .modal-header{padding:15px 22px;background:linear-gradient(120deg,#0b1020,#153852);color:#fff;border:0}.compras-page #modalCompra .modal-header small{color:#20d7f1;font-size:9px;font-weight:800;letter-spacing:.12em}.compras-page #modalCompra .modal-header h5{margin:3px 0 0;color:#fff}.compra-cerrar{display:grid;place-items:center;width:36px;height:36px;padding:0;border:1px solid #ffffff38;border-radius:50%;background:#ffffff14;color:#fff}.compra-cerrar.claro{background:#eef2f7;color:#34435b;border:0}.compras-page #modalCompra .modal-body{padding:14px 22px}.compra-tabs{margin-bottom:12px}.compra-tabs .nav-link{padding:9px 17px;color:#66758d;font-weight:700}.compra-tabs .nav-link.active{color:#4f57e7}.compra-tabs .badge{margin-left:5px;background:#eceeff;color:#5058dc}.compra-bloque{padding:13px 16px;margin-bottom:12px;border:1px solid #e1e6ef;border-radius:13px;background:#f9faff}.compra-bloque h6{margin:0 0 10px;color:#27364f}.compra-bloque label,.compras-page #modalCompra>label{margin-bottom:4px;font-size:12px;font-weight:650;color:#39475e}.compra-cabecera-grid{display:grid;grid-template-columns:170px minmax(260px,1fr) 170px 100px 120px;gap:10px;align-items:end}.compra-producto-grid{display:grid;grid-template-columns:minmax(300px,1fr) 130px 160px 140px 130px;gap:10px;align-items:end}.compra-pago-grid{display:grid;grid-template-columns:145px minmax(150px,1fr) minmax(190px,1.2fr) 140px minmax(160px,1fr) 145px;gap:10px;align-items:end}.compra-selector{display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;background:#fff}.compra-selector span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.compra-selector i{color:#718096}.compra-detalle th,.compra-detalle td{padding:8px 10px;font-size:12px}.compra-detalle .btn,.pagosCompra .btn{display:grid;place-items:center;width:32px;height:32px;padding:0;border-radius:9px}.compra-total{display:flex;align-items:center;justify-content:flex-end;gap:14px;padding:11px 15px;margin:7px 0 10px;border-radius:11px;background:#f0f3ff;color:#55647b}.compra-total strong{font-size:20px;color:#26354d}.compra-resumen{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:14px}.compra-resumen>div{padding:14px;border:1px solid #e1e7f0;border-radius:13px;background:#f8faff;color:#68778e;font-size:11px}.compra-resumen strong{display:block;margin-top:6px;color:#26354c;font-size:20px}.compra-resumen .saldo{background:#fff6e8;border-color:#ffd9aa}.compra-resumen .saldo strong{color:#ae6100}.compra-nota{display:flex;gap:9px;padding:12px;border-radius:11px;background:#eef4ff;color:#526580;font-size:12px}.compra-drop{display:flex;min-height:130px;flex-direction:column;align-items:center;justify-content:center;border:2px dashed #ccd5e4;border-radius:14px;background:#fff;color:#62718a;cursor:pointer}.compra-drop i{margin-bottom:8px;color:#5962f2;font-size:30px}.compra-drop strong{color:#31405a}.compra-drop span{font-size:11px}.compra-documentos{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.compra-doc{display:grid;grid-template-columns:42px minmax(0,1fr) 32px;align-items:center;gap:10px;padding:11px;border:1px solid #e0e6ef;border-radius:12px;background:#fff}.compra-doc>i{display:grid;place-items:center;width:42px;height:42px;border-radius:10px;background:#eef0ff;color:#5962ef}.compra-doc strong,.compra-doc small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.compra-doc small{color:#7c899c}.compra-doc button{display:grid;place-items:center;width:30px;height:30px;padding:0;border:0;border-radius:8px;background:#fff0f3;color:#d23b58}.compra-selector-modal{z-index:1085}.compra-selector-modal .modal-dialog{max-width:650px}.compra-selector-modal .modal-content{border:0;border-radius:18px;overflow:hidden}.compra-selector-modal .modal-header{padding:15px 18px}.compra-selector-modal .modal-header h5{margin:0;color:#1e2d44}.compra-busqueda{display:flex;align-items:center;gap:10px;padding:0 13px;border:1px solid #ccd5e3;border-radius:11px}.compra-busqueda:focus-within{border-color:#5962f2;box-shadow:0 0 0 3px #5962f21f}.compra-busqueda input{width:100%;height:44px;border:0;outline:0}.compra-busqueda i{color:#7a879a}.compra-opciones{max-height:430px;margin-top:10px;overflow:auto}.compra-opcion{display:flex;flex-direction:column;gap:3px;width:100%;padding:11px 10px;text-align:left;border:0;border-bottom:1px solid #edf0f5;background:#fff;color:#293850}.compra-opcion:hover{background:#f1f4ff}.compra-opcion small{color:#738198}.bootstrap-datetimepicker-widget{z-index:1095!important}.compras-page #modalCompra .modal-footer{padding:10px 22px}.compra-vacio{text-align:center;color:#7b8799;padding:25px}
@media(max-width:991px){.compra-cabecera-grid{grid-template-columns:repeat(2,1fr)}.compra-cabecera-grid .selector-ancho{grid-column:span 2}.compra-producto-grid,.compra-pago-grid{grid-template-columns:repeat(2,1fr)}.compra-producto-grid .selector-ancho{grid-column:span 2}.compra-documentos{grid-template-columns:repeat(2,1fr)}}
@media(max-width:575px){.compras-page #modalCompra .modal-dialog{margin:6px;max-width:calc(100% - 12px)}.compras-page #modalCompra .modal-body{padding:10px 12px}.compra-cabecera-grid,.compra-producto-grid,.compra-pago-grid,.compra-resumen,.compra-documentos{grid-template-columns:1fr}.compra-cabecera-grid .selector-ancho,.compra-producto-grid .selector-ancho{grid-column:auto}.compra-tabs .nav-link{padding:8px;font-size:11px}.compra-tabs .nav-link i{display:none}}
.compra-selector-modal .modal-header{background:linear-gradient(120deg,#10182b,#20334d)}
.compra-selector-modal .modal-header h5{color:#fff!important;font-weight:700}
.compra-selector-modal .modal-header .compra-cerrar{color:#fff}
#pickerCompra input,#pickerPagoCompra input{cursor:pointer;background:#fff}
#abrirMedioPago,#abrirCuentaPago{height:42px;color:#25344b;background:#fff}
.compra-tabs .nav-link:disabled,.compra-tabs .nav-link.disabled{opacity:.45;cursor:not-allowed;background:#eef1f6;color:#8995a8}
.compras-page #modalCompra .input-groupicon{position:relative;display:flex;align-items:center;width:100%}
.compras-page #modalCompra .input-groupicon .form-control{width:100%;height:42px;padding-right:45px;border:1px solid #dbe3ef;border-radius:11px;background:#fff;color:#263750}
.compras-page #modalCompra .input-groupicon .addonset{position:absolute;top:50%;right:5px;z-index:10;display:flex;width:34px;height:34px;align-items:center;justify-content:center;padding:0;transform:translateY(-50%);border:0;border-radius:9px;background:#edf0ff;color:#5c68ef;cursor:pointer}
.compras-page .bootstrap-datetimepicker-widget.dropdown-menu{z-index:1120!important;width:320px!important;max-width:calc(100vw - 40px);padding:12px;border:1px solid #dce4f0;border-radius:16px;background:#fff;box-shadow:0 20px 48px rgba(23,39,68,.2)}
.compras-page .bootstrap-datetimepicker-widget table{margin:0}
.compras-page .bootstrap-datetimepicker-widget table th{height:34px;color:#53627a;font-size:12px;font-weight:800}
.compras-page .bootstrap-datetimepicker-widget table td{height:34px;border-radius:9px;color:#33415a;font-size:12px}
.compras-page .bootstrap-datetimepicker-widget table td.day:hover,.compras-page .bootstrap-datetimepicker-widget table th.picker-switch:hover,.compras-page .bootstrap-datetimepicker-widget table th.next:hover,.compras-page .bootstrap-datetimepicker-widget table th.prev:hover{background:#eef1ff;color:#4057db}
.compras-page .bootstrap-datetimepicker-widget table td.active,.compras-page .bootstrap-datetimepicker-widget table td.active:hover{color:#fff;background:linear-gradient(135deg,#3478f6,#7457f7);text-shadow:none}
.compras-page .bootstrap-datetimepicker-widget table td.today:before{border-bottom-color:#5268e7}

/* Compra compacta: conserva visibles los controles y limita solo el detalle. */
.compras-page #modalCompra .modal-dialog{max-width:min(1180px,calc(100% - 24px))}
.compras-page #modalCompra .modal-header{padding:11px 20px}
.compras-page #modalCompra .modal-header h5{margin-top:1px;font-size:17px}
.compras-page #modalCompra .modal-header small{font-size:8px}
.compras-page #modalCompra .modal-body{padding:10px 18px 8px}
.compras-page #modalCompra .compra-tabs{margin-bottom:8px}
.compras-page #modalCompra .compra-tabs .nav-link{padding:7px 14px;font-size:12px}
.compras-page #modalCompra .compra-bloque{padding:9px 13px;margin-bottom:8px;border-radius:12px}
.compras-page #modalCompra .compra-bloque h6{margin-bottom:7px;font-size:16px}
.compras-page #modalCompra .compra-bloque label{margin-bottom:3px;font-size:10px}
.compras-page #modalCompra .compra-cabecera-grid,.compras-page #modalCompra .compra-producto-grid{gap:8px}
.compras-page #modalCompra .form-control,.compras-page #modalCompra .form-select,.compras-page #modalCompra .compra-selector{min-height:38px;height:38px;padding-top:6px;padding-bottom:6px;font-size:13px}
.compras-page #modalCompra .input-groupicon .form-control{height:38px}
.compras-page #modalCompra .input-groupicon .addonset{width:30px;height:30px}
.compras-page #modalCompra #compraDetalle>.table-responsive{max-height:230px;margin-top:2px;overflow-y:auto;border:1px solid #edf0f5;border-radius:10px}
.compras-page #modalCompra #compraDetalle>.table-responsive table{margin-bottom:0}
.compras-page #modalCompra #compraDetalle>.table-responsive thead th{position:sticky;top:0;z-index:2;padding:7px 9px;background:#f2f4f8}
.compras-page #modalCompra .compra-detalle td{padding:7px 9px;vertical-align:middle;line-height:1.25}
.compras-page #modalCompra .compra-detalle td:last-child,.compras-page #modalCompra .compra-detalle th:last-child{text-align:center!important}
.compras-page #modalCompra .compra-detalle td:last-child .btn{display:flex!important;align-items:center!important;justify-content:center!important;margin:0 auto;width:32px;height:32px;padding:0!important}
.compras-page #modalCompra .compra-detalle td:last-child .btn i{display:block;margin:0!important;line-height:1;text-align:center}
.compras-page #modalCompra .compra-total{padding:8px 13px;margin:6px 0}
.compras-page #modalCompra .compra-total strong{font-size:18px}
.compras-page #modalCompra #com_observacion{height:48px!important;min-height:48px!important}
.compras-page #modalCompra .modal-footer{padding:8px 18px}
.compras-page #modalCompra .modal-footer .btn{min-height:40px;padding:8px 18px}
