/*CUSTOMER DETAILS*/
/* ============================================
   CUSTOMER SELECT2 - WIDER DROPDOWN ONLY
   ============================================ */

/* Make dropdown wider than the input */
.select2-container--default .select2-dropdown {
    min-width: 300px !important; /* Adjust this value as needed */
    width: auto !important;
max-width: 350px !important;
}

/* For customer select specifically - dropdown wider */
#sales-customer + .select2-container .select2-dropdown {
    min-width: 300px !important; /* Adjust this value as needed */
    width: auto !important;
max-width: 350px !important;
}

/* Keep the input (selection box) at normal width */
#sales-customer + .select2-container {
    width: 100% !important; /* This keeps the input at its container width */
}

/* If you want dropdown to be positioned nicely */
.select2-container--default .select2-dropdown {
    position: absolute !important;
    left: 0 !important;
    /* If the dropdown goes off-screen to the right, you can use: */
    /* right: 0 !important; */
    /* left: auto !important; */
}

/* Optional: Add some padding to dropdown options for better readability */
.select2-dropdown .customer-option {
    padding: 8px 12px !important;
}



.customer-details-section {
    border: 1px solid #e0e6ed;
    border-radius: 6px;
    padding: 6px 8px;
    background: #fafffe;
    margin-bottom: 8px;
    width: 100%;
}

/* ============================================
   CUSTOMER SELECT2 - INCREASED HEIGHT ONLY
   ============================================ */
/* ============================================
   CUSTOMER SELECT - FOCUS STYLING
   ============================================ */

/* Force all text to white when highlighted */
.select2-container--default .select2-results__option--highlighted .customer-option {
    color: #FFFFFF !important;
}

.select2-container--default .select2-results__option--highlighted .customer-option * {
    color: #FFFFFF !important;
}

/* Specifically target the customer name */
.select2-container--default .select2-results__option--highlighted .customer-name {
    color: #FFFFFF !important;
}

/* Specifically target the customer address */
.select2-container--default .select2-results__option--highlighted .customer-address {
    color: #FFFFFF !important;
}

/* Target any span inside customer-option */
.select2-container--default .select2-results__option--highlighted .customer-option span {
    color: #FFFFFF !important;
}

/* Target any div inside customer-option */
.select2-container--default .select2-results__option--highlighted .customer-option div {
    color: #FFFFFF !important;
}

/* Override inline styles on address */
.select2-container--default .select2-results__option--highlighted .customer-address[style*="color"] {
    color: #FFFFFF !important;
}

/* Also handle the membership text */
.select2-container--default .select2-results__option--highlighted .customer-name span {
    color: #FFFFFF !important;
}

/* Background color for highlighted option */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: #6B5B4E !important;
    color: #FFFFFF !important;
}

   
/* Increase height for customer select only */
#sales-customer + .select2-container .select2-selection--single {
    min-height: 36px !important;
    height: auto !important;
    border: 1px solid #d1d5db !important;
    border-radius: 4px !important;
    padding: 2px 0 !important;
}

#sales-customer + .select2-container .select2-selection__rendered {
    line-height: 1.3 !important;
    font-size: 11px !important;
    padding: 4px 8px !important;
    color: #2C3E50 !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    min-height: 28px !important;
}

#sales-customer + .select2-container .select2-selection__arrow {
    height: 100% !important;
    min-height: 36px !important;
    top: 0 !important;
}

/* Reduce padding in the selection display */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 4px 8px !important;
    line-height: 1.3 !important;
}

/* For the dropdown options - reduce padding */
.select2-results__option .customer-option {
    padding: 4px 8px !important;
}

.select2-results__option .customer-option .customer-name {
    font-size: 12px !important;
    line-height: 1.2 !important;
    margin-bottom: 1px !important;
}

.select2-results__option .customer-option .customer-address {
    font-size: 9px !important;
    line-height: 1.2 !important;
    color: #6c757d !important;
}

.select2-results__option .customer-option .customer-membership {
    font-size: 8px !important;
    line-height: 1.2 !important;
}

/* ============================================
   CUSTOMER DROPDOWN OPTIONS - MULTI-LINE DISPLAY
   ============================================ */

/* Style for customer dropdown items - multi-line with reduced gaps */
.select2-results .customer-option {
    padding: 6px 10px !important;
    border-bottom: 1px solid #f0f0f0 !important;
    cursor: pointer !important;
}

.select2-results .customer-option:last-child {
    border-bottom: none !important;
}

/* Customer name - bold, first line */
.select2-results .customer-option .customer-name {
    font-weight: 600 !important;
    font-size: 12px !important;
    color: #2C3E50 !important;
    display: block !important;
    line-height: 1.3 !important;
    margin-bottom: 2px !important;
}

/* Customer membership - small, second line (replacing address) */
.select2-results .customer-option .customer-membership {
    font-weight: 500 !important;
    font-size: 9px !important;
    color: #02b0f5 !important;
    display: block !important;
    line-height: 1.2 !important;
    padding-left: 2px !important;
    letter-spacing: 0.3px !important;
}

/* ============================================
   SELECT2 OPTIONS - REDUCED LINE HEIGHT
   ============================================ */

.select2-container--default .select2-results__option {
    padding: 4px 10px !important;
    color: #2C3E50 !important;
    border-bottom: 1px solid #F5F0EB !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    font-weight: 400 !important;
    font-size: 10px !important;
    line-height: 1.3 !important;
}

/* Hover state for any option */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: #6B5B4E !important;
    color: #FFFFFF !important;
    font-weight: 500 !important;
}

.select2-container--default .select2-results__option--highlighted .customer-option .customer-name {
    color: #FFFFFF !important;
}

.select2-container--default .select2-results__option--highlighted .customer-option .customer-membership {
    color: #E8D5B5 !important;
}

/* Selected state */
.select2-container--default .select2-results__option[aria-selected=true] {
    background: #F5F0EB !important;
    color: #2C3E50 !important;
    font-weight: 600 !important;
}

/* ============================================
   ALL OTHER SELECT2 STYLES (KEEP EXISTING)
   ============================================ */

/* Select2 Container */
.select2-container {
    width: 100% !important;
    display: block !important;
}

/* Select2 Selection Box - Default */
.select2-container--default .select2-selection--single {
    height: 24px !important;
    padding: 0 !important;
    border: 1px solid #D4C9BC !important;
    border-radius: 2px !important;
    background: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    transition: all 0.2s ease !important;
}

/* Default Select2 rendered text */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 22px !important;
    padding: 0 8px !important;
    color: #2C3E50 !important;
    flex: 1 !important;
    font-weight: 400 !important;
    transition: all 0.2s ease !important;
    font-size: 10px !important;
}

/* ... rest of your existing CSS ... */










/*BUSINESS SUMMARY*/
  .sort-indicator {
    margin-left: 5px;
    font-size: 0.8em;
}

  .business-summary-table th,
.business-summary-table td {
    vertical-align: middle;
    padding: 8px 10px;
}

.business-summary-table thead th {
    background-color: #f8f9fa !important;
    font-weight: 600 !important;
    border-bottom: 2px solid #dee2e6;
}

.business-summary-table tfoot td {
    background-color: #e9ecef !important;
    font-weight: bold !important;
    border-top: 2px solid #dee2e6;
}

.business-summary-print-area {
    font-family: Arial, sans-serif;
    background: white;
}

#business-summary-content {
    background: white;
}

















/* View Invoice Modal Styling */

#viewInvoiceModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#viewInvoiceModal .modal-header .close {
    margin-left: auto;
    order: 2;
}

.invoice-details-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.invoice-details-section h6 {
    color: #007bff;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.invoice-details-section h6 i {
    margin-right: 8px;
}

.invoice-items-table {
    font-size: 13px;
}

.invoice-items-table th {
    background-color: #e9ecef;
}

.invoice-summary {
    background: #f1f3f5;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.invoice-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.invoice-total {
    font-size: 18px;
    font-weight: bold;
    color: #28a745;
    border-top: 2px solid #dee2e6;
    padding-top: 10px;
    margin-top: 10px;
}

#viewInvoiceModal .modal-header .close {
    background: transparent;
    border: none;
    font-size: 28px;
    font-weight: bold;
    opacity: 0.8;
    padding: 0;
    margin: 0;
    line-height: 1;
}

#viewInvoiceModal .modal-header .close:hover {
    opacity: 1;
}












/* ============================================
   SALES INVOICE SECTION - COMPLETE CSS
   ============================================ */

/* ==================== LAYOUT & STRUCTURE ==================== */
.content-section { padding: 0; margin: 0; }
.card { border: none; box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15); margin-bottom: 1.5rem; border-radius: 0.35rem; }
.card-header { background-color: #f8f9fc; border-bottom: 1px solid #e3e6f0; padding: 0.75rem 1.25rem; }
.card-body { padding: 0.25rem; }

/* ==================== FORM ELEMENTS ==================== */
.form-label { font-weight: 600; color: #5a5c69; margin-bottom: 0.3rem; font-size: 0.85rem; }
.form-control, .form-select { border: 1px solid #d1d3e2; border-radius: 0.35rem; font-size: 0.85rem; padding: 0.375rem 0.75rem; transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; }
.form-control:focus, .form-select:focus { border-color: #4e73df; box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25); outline: none; }
.form-control-sm { padding: 0.25rem 0.5rem; font-size: 0.8rem; }
.form-control[readonly] { background-color: #f8f9fa; border-color: #e9ecef; color: #6c757d; }
.customer-details-section { border: 1px solid #e0e6ed; border-radius: 8px; padding: 1.5rem; background-color: #f6ffff; box-shadow: 0 2px 4px rgba(0,0,0,0.05); margin-bottom: 1.5rem; }
.address-field { background-color: #ffffff; border: 1px solid #cbd5e1; resize: vertical; min-height: 80px; }
.info-field { background-color: #f1f5f9; border: 1px solid #cbd5e1; color: #475569; font-weight: 500; }

















/* ==================== ACTION BUTTONS SECTION ==================== */
.action-buttons .btn { font-weight: 600; border: none; padding: 8px 16px; border-radius: 20px; transition: all 0.3s ease; }
.action-buttons .btn-primary { background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%); color: #1565c0; }
.action-buttons .btn-success { background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%); color: #2e7d32; }
.action-buttons .btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }

/* ==================== BARCODE SCANNER ==================== */
.barcode-section .input-group { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); border-radius: 8px; overflow: hidden; max-width: 350px; }
.barcode-section .input-group-text { font-weight: 600; border: none; background: linear-gradient(135deg, #8B0000 0%, #B22222 100%); color: white; }
.barcode-section .form-control { border: 1px solid #e0e0e0; border-left: none; border-right: none; }

/* ==================== TOTALS & PAYMENT SECTION ==================== */
.totals-card { background: white; border: 1px solid #dee2e6; border-radius: 6px; padding: 1rem; margin-bottom: 1rem; }
.totals-table { margin: 0; font-size: 0.85rem; width: 100%; }
.totals-table th { background-color: #f8f9fa; font-weight: 600; color: #495057; padding: 8px 4px; border: 1px solid #dee2e6; text-align: center; }
.totals-table td { padding: 10px 4px; border: 1px solid #dee2e6; color: #333; text-align: center; }
.totals-table .bg-light { background-color: #e9ecef !important; font-weight: bold; }
.amount-words { font-style: italic; border-top: 1px dashed #dee2e6; padding-top: 0.5rem; text-align: center; color: #6c757d; font-size: 0.85rem; }
.payment-section .bg-dark { background-color: #343a40 !important; color: white !important; border-color: #343a40; }

/* ==================== ACTION BUTTONS (Bottom) ==================== */
.actions-section .btn { font-size: 0.9rem; padding: 6px 12px; margin: 2px; }
.btn-success { background-color: #1cc88a; border-color: #1cc88a; }
.btn-success:hover { background-color: #17a673; border-color: #169b6b; }
.btn-warning { background-color: #f6c23e; border-color: #f6c23e; color: #fff; }
.btn-warning:hover { background-color: #f4b619; border-color: #f4b619; }
.btn-info { background-color: #36b9cc; border-color: #36b9cc; }
.btn-info:hover { background-color: #2c9faf; border-color: #2a96a5; }

/* ==================== SHORTCUT KEYS ==================== */
.shortcut-keys .card { background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); border-radius: 10px; border: none; }
.shortcut-keys .badge { background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%); color: #4a5568; font-weight: 600; padding: 6px 10px; border-radius: 20px; font-size: 0.75rem; }

/* ==================== DESCRIPTION SUGGESTIONS ==================== */
.description-suggestions { display: none; position: fixed !important; background: white; border: 1px solid #ddd; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); max-height: 200px; overflow-y: auto; z-index: 10050 !important; padding: 5px 0; font-size: 14px; }
.suggestion-item { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid #f0f0f0; transition: background-color 0.2s; font-size: 13px; }
.suggestion-item:hover { background-color: #f8f9fa; }
.suggestion-item:last-child { border-bottom: none; }
#sales-items-container td { position: static !important; overflow: visible !important; }

/* ==================== SALES RECORDS SECTION ==================== */
#sales-records-table { font-size: 0.85rem; }
#sales-records-table th { white-space: nowrap; background-color: #f8f9fa; font-weight: 600; }
#sales-records-table td, #sales-records-table th { padding: 0.5rem; vertical-align: middle; }
#sales-records-table .btn-sm { padding: 0.25rem 0.5rem; font-size: 0.75rem; }
.card.border-left-primary { border-left: 0.25rem solid #4e73df !important; }
.card.border-left-success { border-left: 0.25rem solid #1cc88a !important; }
.card.border-left-warning { border-left: 0.25rem solid #f6c23e !important; }

/* ==================== PRINT STYLES ==================== */
@media print {
    .no-print, .btn, .shortcut-keys, .card-header .btn { display: none !important; }
    .card { border: none !important; box-shadow: none !important; }
    .card-body { padding: 0 !important; }
    * { color: #000 !important; background-color: #fff !important; }
    table { border: 1px solid #000 !important; }
    th, td { border: 1px solid #000 !important; background-color: #fff !important; color: #000 !important; }
    input, textarea, select { border: 1px solid #000 !important; background-color: #fff !important; color: #000 !important; }
    .totals-card { border: 1px solid #000 !important; }
}

/* ==================== UTILITY CLASSES ==================== */
.text-end { text-align: right !important; }
.text-center { text-align: center !important; }
.text-start { text-align: left !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.rounded { border-radius: 0.25rem !important; }
.rounded-pill { border-radius: 50rem !important; }
.shadow-sm { box-shadow: 0 .125rem .25rem rgba(0,0,0,.075) !important; }
.shadow { box-shadow: 0 .15rem 1.75rem 0 rgba(58,59,69,.15) !important; }

/* ==================== LOADING SPINNER ==================== */
#loading-spinner { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 9999; display: flex; justify-content: center; align-items: center; }
.spinner-border { width: 3rem; height: 3rem; border: 0.25em solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spinner-border .75s linear infinite; }
@keyframes spinner-border { to { transform: rotate(360deg); } }











/*=======================================================================================================*/






/*ITEMS DATA LIST STYLING*/
/* ============================================
   SELECT2 - PROFESSIONAL DARK BROWN/ASH THEME
   ============================================ */

/* 
   Color Palette:
   - Primary Dark: #2C3E50 (Dark blue-ash)
   - Secondary: #3D5166 (Medium ash)
   - Accent: #8B7355 (Dark brown)
   - Hover: #6B5B4E (Warm brown)
   - Light: #F5F0EB (Warm ash background)
   - Border: #D4C9BC (Soft brown-gray)
   - Sky Blue: #4A90D9 (Dark sky blue for selected items)
*/
/* Select2 Container */
.select2-container {
    width: 100% !important;
    display: block !important;
}

/* Select2 Selection Box */
.select2-container--default .select2-selection--single {
    height: 24px !important;
    padding: 0 !important;
    border: 1px solid #D4C9BC !important;
    border-radius: 2px !important;
    background: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    transition: all 0.2s ease !important;
}

/* REDUCED FONT SIZE FOR SELECT2 */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 22px !important;
    padding: 0 8px !important;
    color: #2C3E50 !important;
    flex: 1 !important;
    font-weight: 400 !important;
    transition: all 0.2s ease !important;
    font-size: 13px !important; /* ADDED: Smaller font size */
}

/* Hover state */
.select2-container--default .select2-selection--single:hover {
    border-color: #8B7355 !important;
}

/* Focus state - Professional Dark Brown/Ash */
.select2-container--default .select2-selection--single:focus,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #8B7355 !important;
    box-shadow: 0 0 0 0.2rem rgba(139, 115, 85, 0.2) !important;
    outline: none !important;
}

/* Focus state - bold text */
.select2-container--default.select2-container--focus .select2-selection--single .select2-selection__rendered {
    font-weight: 600 !important;
    color: #2C3E50 !important;
}

/* Bold on focus */
.select2-container--default.select2-container--focus .select2-selection--single .select2-selection__rendered {
    font-weight: 600 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 22px !important;
    width: 20px !important;
    position: relative !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #8B7355 transparent transparent transparent !important;
    border-width: 4px 4px 0 4px !important;
    margin-top: -2px !important;
}

/* ============================================
   HIDE CLEAR BUTTON (X)
   ============================================ */

.select2-container--default .select2-selection--single .select2-selection__clear {
    display: none !important;
}

/* ============================================
   SELECT2 DROPDOWN - PROFESSIONAL THEME
   ============================================ */

.select2-dropdown {
    border: 1px solid #D4C9BC !important;
    border-radius: 4px !important;
    background: #FFFFFF !important;
    box-shadow: 0 4px 16px rgba(44, 62, 50, 0.12) !important;
    z-index: 9999999 !important;
}

/* Search input */
.select2-container--default .select2-dropdown .select2-search--dropdown {
    padding: 4px 8px !important;
    background: #F5F0EB !important;
    border-bottom: 1px solid #D4C9BC !important;
}

.select2-container--default .select2-dropdown .select2-search--dropdown .select2-search__field {
    height: 28px !important;
    border: 1px solid #D4C9BC !important;
    border-radius: 2px !important;
    padding: 0 8px !important;
    background: #ffffff !important;
    color: #2C3E50 !important;
    font-size: 13px !important; /* ADDED: Smaller font size for search */
}

/* Search input - focus */
.select2-container--default .select2-dropdown .select2-search--dropdown .select2-search__field:focus {
    border-color: #8B7355 !important;
    box-shadow: 0 0 0 0.2rem rgba(139, 115, 85, 0.15) !important;
    outline: none !important;
}

/* Search input placeholder */
.select2-container--default .select2-search--dropdown .select2-search__field::placeholder {
    color: #8B7355 !important;
    opacity: 0.7 !important;
}

/* ============================================
   SELECT2 RESULTS - PROFESSIONAL
   ============================================ */

.select2-container--default .select2-results > .select2-results__options {
    max-height: 200px !important;
    padding: 4px 0 !important;
}

.select2-container--default .select2-results__option {
    padding: 6px 12px !important;
    color: #2C3E50 !important;
    border-bottom: 1px solid #F5F0EB !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    font-weight: 400 !important;
    font-size: 13px !important; /* ADDED: Smaller font size for options */
}

.select2-container--default .select2-results__option:last-child {
    border-bottom: none !important;
}

/* Hover state - Dark Brown */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: #6B5B4E !important;
    color: #FFFFFF !important;
    font-weight: 500 !important;
}

/* Selected state - Ash Brown */
.select2-container--default .select2-results__option[aria-selected=true] {
    background: #F5F0EB !important;
    color: #2C3E50 !important;
    font-weight: 600 !important;
}

/* Selected + highlighted */
.select2-container--default .select2-results__option[aria-selected=true].select2-results__option--highlighted {
    background: #6B5B4E !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
}

/* ============================================
   SELECT2 - FOCUSED INPUT
   ============================================ */

/* When Select2 is focused - make text semi-bold */
.select2-container--default.select2-container--focus .select2-selection--single .select2-selection__rendered {
    font-weight: 600 !important;
}

/* When dropdown is open - brown border */
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #8B7355 !important;
    box-shadow: 0 0 0 0.2rem rgba(139, 115, 85, 0.2) !important;
}

/* ============================================
   SELECT2 IN TABLE - COMPACT
   ============================================ */

/* Ensure Select2 fits in table cells */
#sales-items-table td .select2-container {
    width: 100% !important;
    min-width: 80px !important;
}

#sales-items-table td .select2-container--default .select2-selection--single {
    height: 24px !important;
    min-height: 24px !important;
}

#sales-items-table td .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 0 4px !important;
    font-size: 13px !important; /* ADDED: Table Select2 font size */
}

/* ============================================
   SELECTED ITEM NAME - DARK SKY BLUE
/* ============================================
   SELECTED PRODUCT NAME - BOLD SKY BLUE
   ============================================ */

/* Selected product name in the table - Bold Sky Blue */
#sales-items-table .product-name-select2 + .select2-container .select2-selection__rendered {
    color: #004f6e !important;
    font-weight: 500 !important; /* BOLD */
    font-size: 14px !important; /* REDUCED: From 13px to 12px */
}

/* When focused - keep sky blue and bold */
#sales-items-table .product-name-select2 + .select2-container.select2-container--focus .select2-selection__rendered {
    color: #004f6e !important;
    font-weight: 500 !important; /* BOLD */
    font-size: 14px !important; /* REDUCED: From 13px to 12px */
}

/* Alternate selector - after selection */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #004f6e !important;
    font-weight: 500 !important; /* BOLD */
    font-size: 13px !important; /* ADDED: Consistent font size */
}

/* When placeholder (no selection) - keep it gray (not bold) */
.select2-container--default .select2-selection--single .select2-selection__rendered[title] {
    color: #004f6e !important;
    font-weight: 700 !important; /* BOLD when selected */
}

/* Placeholder text - gray (NOT bold) */
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #6c757d !important;
    font-weight: 400 !important; /* Normal weight for placeholder */
    font-size: 13px !important; /* ADDED: Consistent placeholder size */
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .select2-container--default .select2-selection--single {
        height: 20px !important;
    }
    
    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 18px !important;
        font-size: 9px !important; /* Even smaller on mobile */
    }
    
    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 18px !important;
    }
    
    .select2-container--default .select2-results__option {
        padding: 4px 8px !important;
        font-size: 9px !important; /* Smaller on mobile */
    }
}

/* ============================================
   SELECT2 LOADING & NO RESULTS
   ============================================ */

.select2-container--default .select2-results__option.loading-results {
    color: #8B7355 !important;
    font-style: italic !important;
    font-size: 10px !important;
}

.select2-container--default .select2-results__option.select2-results__message {
    color: #8B7355 !important;
    font-style: italic !important;
    font-size: 10px !important;
}

/* ============================================
   DISABLED STATE
   ============================================ */

.select2-container--default .select2-selection--single.select2-selection--disabled {
    background: #F5F0EB !important;
    cursor: not-allowed !important;
}

.select2-container--default .select2-selection--single.select2-selection--disabled .select2-selection__rendered {
    color: #8B7355 !important;
    opacity: 0.6 !important;
    font-size: 10px !important;
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

.select2-results__options::-webkit-scrollbar {
    width: 4px !important;
}

.select2-results__options::-webkit-scrollbar-track {
    background: #F5F0EB !important;
    border-radius: 2px !important;
}

.select2-results__options::-webkit-scrollbar-thumb {
    background: #D4C9BC !important;
    border-radius: 2px !important;
}

.select2-results__options::-webkit-scrollbar-thumb:hover {
    background: #8B7355 !important;
}

/* ============================================
   OPTIONAL: CUSTOM ARROW
   ============================================ */

/* Custom arrow color */
.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #8B7355 transparent transparent transparent !important;
}

/* Arrow on hover */
.select2-container--default .select2-selection--single:hover .select2-selection__arrow b {
    border-color: #6B5B4E transparent transparent transparent !important;
}

/* Arrow on focus/open */
.select2-container--default.select2-container--focus .select2-selection--single .select2-selection__arrow b {
    border-color: #8B7355 transparent transparent transparent !important;
}

/* When dropdown is open - arrow up */
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #8B7355 transparent !important;
    border-width: 0 4px 4px 4px !important;
}





















/*ITEM SECTION*/

/*FREEZE THE ITEM SECTION HEADER*/









/* ============================================
   SALES INVOICE - MODERN EXCEL-LIKE DESIGN
   ============================================ */

/* Main container - remove extra padding */
#sales-invoice .container-fluid {
    padding: 0 !important;
    max-width: 100% !important;
}

/* Compact header section */
.sales-header-section {
    background: #f8f9fa;
    padding: 6px 8px !important;
    border-radius: 4px;
    margin-bottom: 6px;
    border: 1px solid #dee2e6;
}

.sales-header-section .form-group {
    margin-bottom: 4px !important;
}

.sales-header-section label {
    font-size: 0.7rem !important;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1px !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.sales-header-section .form-control,
.sales-header-section .form-control-sm {
    height: 28px !important;
    font-size: 0.75rem !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
    border: 1px solid #ced4da;
}

/* Items section - compact table */
.items-section {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
}

/* Table header - Excel style */
#sales-items-table thead th {
    background: #2C3E50 !important;
    color: #E8D5B7 !important;
    font-size: 0.8rem !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 4px !important;
    border: 1px solid #3D5166 !important;
    text-align: center;
    white-space: nowrap;
    height: 28px;
}

#sales-items-table thead th:first-child {
    width: 4%;
    min-width: 30px;
}

#sales-items-table thead th:nth-child(2) {
    width: 22%;
    min-width: 120px;
    text-align: left;
}

#sales-items-table thead th:nth-child(3) {
    width: 8%;
    min-width: 60px;
}

#sales-items-table thead th:nth-child(4) {
    width: 6%;
    min-width: 50px;
}

#sales-items-table thead th:nth-child(5) {
    width: 10%;
    min-width: 70px;
}

#sales-items-table thead th:nth-child(6) {
    width: 8%;
    min-width: 60px;
}

#sales-items-table thead th:nth-child(7) {
    width: 7%;
    min-width: 55px;
}

#sales-items-table thead th:nth-child(8) {
    width: 7%;
    min-width: 55px;
}

#sales-items-table thead th:nth-child(9) {
    width: 10%;
    min-width: 70px;
}

#sales-items-table thead th:last-child {
    width: 4%;
    min-width: 35px;
}

/* Table body - compact rows */
#sales-items-table tbody td {
    padding: 2px 3px !important;
    font-size: 0.9rem !important;
      vertical-align: top !important;
    border: 1px solid #e9ecef !important;
    height: 28px;
}

#sales-items-table tbody tr {
    transition: background 0.15s;
    border-bottom: 2px solid #596570 !important;
    border-right: 2px solid #596570 !important;
    border-left: 2px solid #596570 !important;
}



#sales-items-table tbody tr:hover {
    background: #f8f9fa !important;
}

#sales-items-table tbody tr:nth-child(even) {
    background: #fcfcfc;
}

/* Inputs inside table - compact */
#sales-items-table .form-control-sm {
    height: 24px !important;
    font-size: 0.9rem !important;
    padding: 1px 4px !important;
    border-radius: 2px !important;
    border: 1px solid #dee2e6;
    background: #fff;
}

#sales-items-table .form-control-sm:focus {
    border-color: #2C3E50;
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.15);
}

/* Product name input - datalist style */
.product-name-input {
    width: 100% !important;
    min-width: 100px !important;
    font-weight: 500 !important;
}

.product-name-input:focus {
    background-color: #2C3E50 !important;
    color: #E8D5B7 !important;
    border-color: #3D5166 !important;
}

/* Quantity with +/- buttons */
.qty-wrapper {
    display: flex;
    align-items: center;
    gap: 2px;
}

.qty-wrapper .qty-btn {
    width: 18px;
    height: 20px;
    padding: 0 !important;
    font-size: 0.5rem !important;
    border-radius: 2px !important;
    line-height: 1;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
}

.qty-wrapper .qty-btn:hover {
    background: #e9ecef;
}

.qty-wrapper .qty-input {
    width: 50px !important;
    min-width: 40px !important;
    max-width: 70px !important;
    text-align: center;
}


/* Datalist dropdown styling */
input::-webkit-calendar-picker-indicator {
    opacity: 0.5;
    padding: 2px;
    cursor: pointer;
}

input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Description suggestions */
.description-suggestions {
    background: #2C3E50 !important;
    color: #E8D5B7 !important;
    border: 1px solid #3D5166 !important;
    border-radius: 4px;
    max-height: 150px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 4px 10px !important;
    cursor: pointer;
    font-size: 0.7rem;
    border-bottom: 1px solid #3D5166;
}

.suggestion-item:hover {
    background: #3D5166 !important;
    color: #fff;
}

/* Remove row button */
.remove-row {
    width: 22px !important;
    height: 22px !important;
    padding: 0 !important;
    font-size: 0.5rem !important;
    border-radius: 2px !important;
    line-height: 1;
}

/* Totals section - compact */
.totals-section {
    background: #f8f9fa;
    padding: 4px 8px !important;
    border-top: 2px solid #2C3E50;
    margin-top: 4px;
}

.totals-section .total-label {
    font-size: 0.65rem !important;
    font-weight: 600;
    color: #495057;
    text-align: right;
    padding-right: 8px;
}

.totals-section .total-value {
    font-size: 0.75rem !important;
    font-weight: 700;
    text-align: right;
    padding-left: 8px;
}

/* Buttons - compact */
.sales-actions .btn {
    padding: 3px 10px !important;
    font-size: 0.65rem !important;
    height: 28px !important;
    border-radius: 3px !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #sales-items-table thead th,
    #sales-items-table tbody td {
        font-size: 0.6rem !important;
        padding: 1px 2px !important;
    }
    
    #sales-items-table .form-control-sm {
        font-size: 0.6rem !important;
        height: 20px !important;
        padding: 0 2px !important;
    }
    
    .sales-header-section .form-control {
        height: 24px !important;
        font-size: 0.65rem !important;
    }
}




