.ncd-section { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 16px; margin-bottom: 10px; min-width: 0; }
.ncd-section-title { font-size: 0.82rem; font-weight: 700; color: #1e293b; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; padding-bottom: 6px; border-bottom: 1px solid #f1f5f9; }
.ncd-section-title > i { font-size: 0.8rem; color: #1A4480; }

.modal-body:has(.ncd-modal-form) { padding: 12px 22px 14px; overflow: hidden; display: flex; flex-direction: column; }
.ncd-modal-form { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; min-width: 0; overflow-y: auto; overflow-x: hidden; }

.ncd-detalle-table-wrap { overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 6px; max-height: 250px; }

.ncd-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 12px; }
.ncd-grid-4 { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 6px 12px; }
.ncd-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ncd-field label { font-size: 0.65rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.3px; }
.ncd-field-span-2 { grid-column: span 2; }
.ncd-field-span-3 { grid-column: span 3; }
.ncd-field-proveedor { grid-column: span 2; }
.ncd-input { width: 100%; min-width: 0; box-sizing: border-box; padding: 7px 10px; border: 1px solid #d1d5db; border-radius: 5px; font-size: 0.78rem; font-family: 'Plus Jakarta Sans', sans-serif; background: #fff; color: #1e293b; transition: border-color 0.15s; }
.ncd-input:focus { border-color: #3b82f6 !important; box-shadow: 0 0 0 3px rgba(59,130,246,0.12) !important; outline: none !important; }
.ncd-input[readonly] { background: #f1f5f9; color: #64748b; cursor: default; }
.ncd-text-upper { text-transform: uppercase; }
.ncd-text-upper::placeholder { text-transform: none; }

.ncd-input-group { display: flex; gap: 6px; align-items: stretch; }
.ncd-input-group .ncd-input { flex: 1; }
.ncd-input-group .ncd-btn-search { flex-shrink: 0; white-space: nowrap; padding: 0 14px; background: #1A4480; color: #fff; border: none; border-radius: 5px; font-size: 0.75rem; font-weight: 600; cursor: pointer; font-family: 'Plus Jakarta Sans', sans-serif; display: flex; align-items: center; gap: 5px; transition: background 0.15s; }
.ncd-input-group .ncd-btn-search:hover { background: #0f2b52; }

.ncd-count { font-weight: 400; font-size: 0.8rem; color: #94a3b8; margin-left: auto; }

/* Estandar sistema: Excel = verde #059669 | Imprimir = azul #1A4480 */
.ncd-detalle-btn { background: none; border: none; color: #1A4480; cursor: pointer; padding: 4px 6px; font-size: 0.8rem; border-radius: 4px; transition: all 0.15s; }
.ncd-detalle-btn:hover { background: #eef2ff; }
.ncd-detalle-btn.ncd-excel-btn { color: #059669; }
.ncd-detalle-btn.ncd-excel-btn:hover { background: #ecfdf5; }

.ncd-detalle-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.ncd-detalle-table thead th { padding: 6px 8px; background: #1A4480; color: #fff; font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; position: sticky !important; top: 0; z-index: 1; text-align: center; }
.ncd-detalle-table thead tr th:first-child { border-radius: 6px 0 0 0; }
.ncd-detalle-table thead tr th:last-child { border-radius: 0 6px 0 0; }
.ncd-detalle-table tbody td { padding: 6px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; font-size: 0.7rem; color: #334155; }
.ncd-detalle-table tbody td:nth-child(4),
.ncd-detalle-table tbody td:nth-child(5),
.ncd-detalle-table tbody td:nth-child(6),
.ncd-detalle-table tbody td:nth-child(7) { text-align: right; }
.ncd-detalle-table tbody td:nth-child(8) { text-align: center; }

.ncd-detalle-toolbar { display: flex; align-items: flex-end; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.ncd-field-art { flex: 1; min-width: 200px; }
.ncd-field-qty { width: 110px; }
.ncd-field-price { width: 130px; }
.ncd-field-pct { width: 80px; }
.ncd-btn-add { padding: 7px 16px; background: #1A4480; color: #fff; border: none; border-radius: 5px; font-size: 0.78rem; font-weight: 600; cursor: pointer; font-family: 'Plus Jakarta Sans', sans-serif; display: flex; align-items: center; gap: 5px; transition: background 0.15s; white-space: nowrap; }
.ncd-btn-add:hover { background: #0f2b52; }

.ncd-inp { width: 100%; border: 1px solid #e2e8f0; background: #fff; text-align: right; font-size: 0.78rem; font-family: 'Plus Jakarta Sans', sans-serif; color: #334155; padding: 5px 6px; border-radius: 3px; box-sizing: border-box; }
.ncd-inp:focus { border-color: #3b82f6 !important; outline: none !important; background: #f0f7ff; }

.ncd-btn-del { background: none; border: none; color: #94a3b8; cursor: pointer; padding: 4px 6px; font-size: 0.75rem; border-radius: 3px; transition: all 0.15s; }
.ncd-btn-del:hover { color: #ef4444; background: #fef2f2; }

.ncd-totales-wrap { display: flex; justify-content: flex-end; margin-top: 8px; }
.ncd-totales-resultado { display: flex; flex-direction: column; gap: 3px; align-items: flex-end; min-width: 260px; }
.ncd-total-row { display: flex; align-items: center; gap: 10px; font-size: 0.75rem; font-weight: 600; color: #334155; }
.ncd-total-row label { font-size: 0.68rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.3px; min-width: 100px; text-align: right; }
.ncd-total-row-final { font-size: 0.75rem; font-weight: 700; color: #1A4480; padding-top: 4px; border-top: 2px solid #1A4480; }
.ncd-total-val { min-width: 130px; font-size: 0.75rem; font-weight: 600; text-align: right; color: #334155; }
.ncd-total-val-final { color: #1A4480; }
.ncd-total-input { width: 130px; padding: 4px 8px; font-size: 0.78rem; font-weight: 700; text-align: right; color: #1A4480; border: 1px solid #cbd5e1; border-radius: 6px; font-family: inherit; outline: none; }

.ncd-autocomplete-dd { position: fixed; z-index: 100000; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 8px 24px rgba(15,23,42,0.15); max-height: 320px; overflow-y: auto; display: none; }
.ncd-dd-empty { padding: 10px; color: #94a3b8; font-size: 0.78rem; text-align: center; }
.ncd-dd-item { padding: 6px 12px; cursor: pointer; border-bottom: 1px solid #f1f5f9; transition: background 0.1s; }
.ncd-dd-item:last-child { border-bottom: none; }
.ncd-dd-item:hover { background: #f0f7ff; }
.ncd-dd-item-row { display: flex; align-items: center; gap: 8px; }
.ncd-dd-item-main { font-size: 0.7rem; font-weight: 600; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ncd-dd-item-sub { font-size: 0.68rem; color: #64748b; margin-top: 1px; }
.ncd-dd-art-cod { font-weight: 700; color: #1A4480; font-size: 0.7rem; }
.ncd-dd-art-nom { font-weight: 500; color: #334155; font-size: 0.7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.ncd-dd-art-und { font-size: 0.68rem; color: #94a3b8; flex-shrink: 0; }

.ncd-art-cod { font-weight: 700; color: #1e293b; font-size: 0.7rem; }

#pageNotasCreditoDebito .prov-tabla-wrap { border: 1px solid var(--gris-200); border-radius: 8px; background: var(--blanco); box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
#pageNotasCreditoDebito .prov-tabla { width: 100%; border-collapse: collapse; }
#pageNotasCreditoDebito .prov-tabla th { position: sticky !important; top: 0; z-index: 999; }
#pageNotasCreditoDebito .prov-tabla tbody { position: relative; z-index: 1; }
#pageNotasCreditoDebito .prov-tabla thead th { padding: 10px 10px; text-align: center; font-size: 0.72rem; font-weight: 700; color: var(--blanco); text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; background: var(--azul-500); border-bottom: 2px solid var(--azul-700); }
#pageNotasCreditoDebito .prov-tabla tbody td { padding: 1px 8px; font-size: 0.7rem; line-height: 1.2; color: var(--gris-700); border-bottom: 1px solid var(--gris-100); }
#pageNotasCreditoDebito .prov-tabla tbody tr:hover { background: rgba(37,99,160,0.08); }
