/* Product card styling */
.product-card {
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #eee;
    overflow: hidden;
}

/* ... existing styles ... */

/* Fixed Bottom Totals Bar - Updated Design */
.fixed-bottom-totals {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2c3e50 0%, #1a2530 100%);
    color: white;
    padding: 12px 0;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.2);
    z-index: 1030;
    transition: all 0.3s ease;
    transform: translateY(0);
    border-top: 3px solid #4e73df;
}

.fixed-bottom-totals.hidden {
    transform: translateY(100%);
}

.totals-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.total-item {
    display: flex;
    flex-direction: column;
    padding: 0 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    min-width: 100px;
    text-align: center;
}

.total-item:last-of-type {
    border-right: none;
}

.total-label {
    font-size: 0.7rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.total-value {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.grand-total {
    background: rgba(78, 115, 223, 0.3);
    padding: 8px 15px;
    border-radius: 8px;
    margin-left: 10px;
    min-width: 140px;
}

.grand-total .total-value {
    font-size: 1.5rem;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-checkout {
    background-color: #f39c12;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-checkout:hover {
    background-color: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

.btn-complete-sale {
    background-color: #2ecc71;
    border: none;
    color: white;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-complete-sale:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

/* Add padding to body to prevent content from being hidden behind the fixed bar */
body {
    padding-bottom: 80px;
}
/* Updated Button Styles */
.action-buttons {
    display: flex;
    gap: 12px;
}

.btn-checkout, .btn-complete-sale {
    border: none;
    color: white;
    font-weight: 600;
    padding: 0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 48px;
    min-width: 150px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
}

.btn-text {
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.btn-checkout {
    background-color: #3498db;
}

.btn-checkout .btn-icon {
    background-color: rgba(0, 0, 0, 0.1);
}

.btn-checkout:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
}

.btn-complete-sale {
    background-color: #2ecc71;
}

.btn-complete-sale .btn-icon {
    background-color: rgba(0, 0, 0, 0.1);
}

.btn-complete-sale:hover {
    background-color: #27ae60;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
}

/* Payment Modal Styles */
.payment-methods {
    margin-bottom: 20px;
}

.payment-method-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
}

.payment-method-card:hover {
    border-color: #4e73df;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.payment-method-card.active {
    border-color: #4e73df;
    background-color: rgba(78, 115, 223, 0.05);
}

.payment-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.payment-name {
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}
.payment-method-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.payment-method-badge i {
    margin-right: 4px;
    width: 14px;
    height: 14px;
}

.payment-method-badge.cash {
    background-color: rgba(46, 204, 113, 0.15);
    color: #27ae60;
}

.payment-method-badge.card {
    background-color: rgba(52, 152, 219, 0.15);
    color: #2980b9;
}

.payment-method-badge.bank {
    background-color: rgba(41, 128, 185, 0.15);
    color: #2471a3;
}

.payment-method-badge.mobile {
    background-color: rgba(243, 156, 18, 0.15);
    color: #e67e22;
}

.payment-action-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.payment-action-btn i {
    width: 16px;
    height: 16px;
}

#paymentMethodsTable tbody tr {
    transition: all 0.2s;
}

#paymentMethodsTable tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Payment Progress Styles */
.progress {
    background-color: #e9ecef;
    overflow: hidden;
    border-radius: 10px;
}

.progress-bar {
    transition: width 0.5s ease;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .totals-container {
        flex-direction: column;
        gap: 15px;
    }

    .action-buttons {
        width: 100%;
    }

    .btn-checkout, .btn-complete-sale {
        flex: 1;
    }

    .total-item {
        border-right: none;
        padding: 5px 10px;
    }

    .fixed-bottom-totals {
        padding: 15px 0;
    }

    body {
        padding-bottom: 140px;
    }
}

/* Pulse animation for the complete sale button */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(46, 204, 113, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .totals-container {
        flex-direction: column;
        gap: 15px;
    }

    .action-buttons {
        width: 100%;
    }

    .btn-checkout, .btn-complete-sale {
        flex: 1;
        justify-content: center;
    }

    .total-item {
        border-right: none;
        padding: 5px 10px;
    }

    .fixed-bottom-totals {
        padding: 15px 0;
    }

    body {
        padding-bottom: 140px;
    }
}

/* ... rest of your existing styles ... */
.fullpage-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.fullpage-loader.active {
    opacity: 1;
    visibility: visible;
}

.fullpage-loader-content {
    text-align: center;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-width: 90%;
    width: 300px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 3px solid rgba(78, 115, 223, 0.1);
    border-radius: 50%;
    border-top-color: #4e73df;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.fullpage-loader-text {
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

body.loading {
    overflow: hidden;
    pointer-events: none;
}

body.loading > *:not(.fullpage-loader) {
    filter: blur(3px);
    pointer-events: none;
}

.product-card {
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #eee;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
    cursor: pointer;
}

.product-img {
    height: 120px;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    color: white;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Product Dropdown Styling */
.product-dropdown {
    position: absolute;
    width: calc(100% - 2rem);
    max-height: 250px;
    overflow-y: auto;
    background-color: white;
    z-index: 1000;
    margin-top: 5px;
    display: none;
    border-radius: 0.5rem;
}

.product-dropdown-header {
    padding: 8px 12px;
    background-color: #f8f9fa;
    font-weight: 500;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.product-dropdown-divider {
    height: 1px;
    background-color: #e9ecef;
    margin: 0;
}

.product-suggestions {
    padding: 0;
}

.product-suggestion-item {
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
}

.product-suggestion-item:hover {
    background-color: #f8f9fa;
}

.product-suggestion-item:last-child {
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.product-suggestion-img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 12px;
}

.product-suggestion-info {
    flex: 1;
}

.product-suggestion-name {
    font-weight: 500;
    margin-bottom: 2px;
    font-size: 0.9rem;
}

.product-suggestion-details {
    display: flex;
    font-size: 0.75rem;
    color: #6c757d;
}

.product-suggestion-id {
    margin-right: 8px;
}

.product-suggestion-price {
    font-weight: 600;
    color: #4e73df;
}

.product-suggestion-stock {
    margin-left: auto;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

.stock-available {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.stock-low {
    background-color: #fff8e1;
    color: #f57f17;
}

.stock-out {
    background-color: #ffebee;
    color: #c62828;
}

/* Cart table styling */
#cartTable {
    border-collapse: separate;
    border-spacing: 0;
}

/* Rest of your existing styles... */
    /* Variant card styling */
    .variant-card {
    transition: all 0.2s ease;
    cursor: pointer;
}

.variant-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
}

.variant-card.selected {
    border: 2px solid #4e73df !important;
    box-shadow: 0 5px 15px rgba(78,115,223,0.2) !important;
}

.variant-img-container {
    width: 60px;
    height: 60px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.variant-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.variant-container {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
}
.product-title {
    color: #4e73df;
    font-weight: 600;
}
.variant-card {
    transition: all 0.2s ease;
    cursor: pointer;
}
.variant-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
}
.variant-card.selected {
    border: 2px solid #4e73df !important;
    box-shadow: 0 5px 15px rgba(78,115,223,0.2) !important;
}
.variant-img-container {
    width: 50px;
    height: 50px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f3f9;
    border-radius: 0.25rem;
}
.variant-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.color-swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
}
.cursor-pointer {
    cursor: pointer;
}
/* Custom styling for the sales ledger page */
.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: transparent;
    border: none;
    color: #6c757d;
    transition: all 0.2s;
}

.btn-icon:hover {
    background-color: rgba(108, 117, 125, 0.1);
    color: #495057;
}

.badge {
    font-weight: 500;
    font-size: 0.75rem;
}

.bg-success-subtle {
    background-color: rgba(25, 135, 84, 0.1);
}

.bg-warning-subtle {
    background-color: rgba(255, 193, 7, 0.1);
}

.bg-danger-subtle {
    background-color: rgba(220, 53, 69, 0.1);
}

.text-success {
    color: #198754 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.table > :not(caption) > * > * {
    padding: 0.75rem 0.5rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
}

.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}


/* Existing styles */

    /* Customer dropdown styles */
    .customer-dropdown {
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        display: none;
    }

    .customer-item {
        cursor: pointer;
        padding: 8px 12px;
        transition: background-color 0.2s;
    }

    .customer-item:hover {
        background-color: #f8f9fa;
    }

    /* Fix for Select2 in input groups */
    .input-group .select2-container {
        flex: 1 1 auto;
        width: 1% !important;
    }

    /* Other existing styles */
    .select2-container .select2-selection--single {
        height: 38px !important;
    }
    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 36px !important;
    }
    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 36px !important;
    }
    .select2-container--default .select2-selection--single {
        border-color: #ced4da !important;
    }
    .card {
        border: none;
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
        border-radius: 0.5rem;
        transition: all 0.3s ease;
    }
    .card:hover {
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }
    .card-header {
        background-color: #fff;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    .form-control:focus, .form-select:focus {
        border-color: #80bdff;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }
    .input-group-text {
        background-color: #f8f9fa;
    }
    .table th {
        font-weight: 600;
        color: #495057;
    }
    .badge-return {
        background-color: #dc3545;
        color: white;
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
        border-radius: 0.25rem;
    }
    .return-reason {
        background-color: #f8f9fa;
        border-radius: 0.375rem;
        padding: 1rem;
        margin-bottom: 1rem;
    }
    #loading-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        display: flex;
        justify-content: center;
        align-items: center;
        display: none;
    }
    .spinner {
        width: 40px;
        height: 40px;
        border: 4px solid #f3f3f3;
        border-top: 4px solid #3498db;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    .btn-return {
        background-color: #dc3545;
        color: white;
        border: none;
        transition: all 0.3s;
    }
    .btn-return:hover {
        background-color: #c82333;
        color: white;
    }
    .product-item {
        border-left: 3px solid #dc3545;
        padding-left: 0.5rem;
    }
    .return-summary {
        background-color: #f8f9fa;
        border-radius: 0.375rem;
        padding: 1.5rem;
    }
    .return-summary h5 {
        border-bottom: 1px solid #dee2e6;
        padding-bottom: 0.75rem;
        margin-bottom: 1rem;
    }

    .form-control:focus,.form-select:focus {
        box-shadow: none;
    }
.select2-container .select2-selection--single {
        height: 38px !important;
    }
    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 36px !important;
    }
    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 36px !important;
    }
    .select2-container--default .select2-selection--single {
        border-color: #ced4da !important;
    }
    .card {
        border: none;
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
        border-radius: 0.5rem;
        transition: all 0.3s ease;
    }
    .card:hover {
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }
    .card-header {
        background-color: #fff;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    .form-control:focus, .form-select:focus {
        border-color: #80bdff;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }
    .input-group-text {
        background-color: #f8f9fa;
    }
    .table th {
        font-weight: 600;
        color: #495057;
    }
    #loading-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        display: flex;
        justify-content: center;
        align-items: center;
        display: none;
    }
    .spinner {
        width: 40px;
        height: 40px;
        border: 4px solid #f3f3f3;
        border-top: 4px solid #3498db;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    .btn-return {
        background-color: #6c5ce7;
        color: white;
        border: none;
        transition: all 0.3s;
    }
    .btn-return:hover {
        background-color: #5b4bc9;
        color: white;
    }
    .product-item {
        border-left: 3px solid #6c5ce7;
        padding-left: 0.5rem;
    }
    .return-summary {
        background-color: #f8f9fa;
        border-radius: 0.375rem;
        padding: 1.5rem;
    }
    .return-summary h5 {
        border-bottom: 1px solid #dee2e6;
        padding-bottom: 0.75rem;
        margin-bottom: 1rem;
    }
    .badge-warehouse {
        background-color: #6c5ce7;
        color: white;
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
        border-radius: 0.25rem;
    }
    .product-search-container {
        position: relative;
    }
    .product-dropdown {
        position: absolute;
        width: 100%;
        max-height: 250px;
        overflow-y: auto;
        background: white;
        border: 1px solid #ced4da;
        border-radius: 0 0 0.375rem 0.375rem;
        z-index: 1000;
        display: none;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    .product-item-dropdown {
        padding: 10px 15px;
        border-bottom: 1px solid #f0f0f0;
        cursor: pointer;
    }
    .product-item-dropdown:hover {
        background-color: #f8f9fa;
    }
    .quantity-input {
        width: 100px;
    }
    .step-container {
        display: flex;
        justify-content: space-between;
        margin-bottom: 2rem;
    }
    .step {
        flex: 1;
        text-align: center;
        padding: 1rem;
        position: relative;
    }
    .step:not(:last-child):after {
        content: '';
        position: absolute;
        top: 50%;
        right: 0;
        width: 100%;
        height: 2px;
        background-color: #e9ecef;
        z-index: -1;
    }
    .step-number {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background-color: #e9ecef;
        color: #6c757d;
        font-weight: bold;
        margin-bottom: 0.5rem;
    }
    .step.active .step-number {
        background-color: #6c5ce7;
        color: white;
    }
    .step-title {
        font-weight: 600;
        color: #495057;
    }
    .step.active .step-title {
        color: #6c5ce7;
    }
    .product-card {
        border-radius: 0.5rem;
        overflow: hidden;
        transition: all 0.3s;
        margin-bottom: 1rem;
    }
    .product-card:hover {
        transform: translateY(-5px);
    }
    .product-card .card-body {
        padding: 1rem;
    }
    .product-image {
        height: 120px;
        background-color: #f8f9fa;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .product-image i {
        font-size: 3rem;
        color: #adb5bd;
    }
    .product-title {
        font-weight: 600;
        margin-bottom: 0.5rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .product-meta {
        display: flex;
        justify-content: space-between;
        color: #6c757d;
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }
 /* Select2 Styles */
 .select2-container .select2-selection--single {
    height: 38px !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
}
.select2-container--default .select2-selection--single {
    border-color: #ced4da !important;
}

/* Step Indicator */
.step-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}
.step-container::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e9ecef;
    z-index: 0;
}
.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
}
.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
}
.step.active .step-number {
    background-color: #0d6efd;
    color: white;
}
.step-title {
    font-size: 0.875rem;
    color: #6c757d;
    text-align: center;
}
.step.active .step-title {
    color: #0d6efd;
    font-weight: 600;
}

/* Product Card */
.product-card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}
.product-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}
.product-image {
    height: 120px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #adb5bd;
}
.product-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: #6c757d;
}
.quantity-input {
    max-width: 120px;
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    display: none;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Product Dropdown */
.product-dropdown {
    position: absolute;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 0 0 0.375rem 0.375rem;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Invoice Card */
.invoice-card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}
.invoice-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}
.invoice-card.selected {
    border-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.05);
}
.invoice-header {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}
.invoice-body {
    padding: 1rem;
}
.invoice-footer {
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
    display: flex;
    justify-content: space-between;
}
.payment-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}
.payment-header {
    background: #f8f9fa;
    border-radius: 10px 10px 0 0;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}
.customer-info {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 20px;
}
.amount-input {
    font-size: 24px;
    height: 50px;
}
.payment-method-card {
    cursor: pointer;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
}
.payment-method-card.active {
    border-color: #0d6efd;
    background: #f8f9fa;
}
.payment-method-card i {
    font-size: 24px;
    margin-bottom: 10px;
}
.filter-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}
.filter-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 10px 10px 0 0;
}
.payment-status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.status-paid {
    background: #d1fae5;
    color: #059669;
}
.status-partial {
    background: #fef3c7;
    color: #d97706;
}
.product-info {
    position: relative;
    overflow: hidden;
}
.purchase-price {
    position: absolute;
    right: -100%;
    top: 0;
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    transition: right 0.3s ease;
    border: 1px solid #dee2e6;
}
.show-price {
    right: 0;
}
.price-toggle {
    cursor: pointer;
    color: #6c757d;
    margin-left: 5px;
}
.price-toggle:hover {
    color: #495057;
}
.filter-row {
    background: #f8f9fa;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    margin-bottom: 20px;
}
.stock-table th {
    white-space: nowrap;
    background: #f8f9fa;
}
.stock-table td {
    vertical-align: middle;
}
.imei-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.imei-badge {
    display: inline-block;
    padding: 2px 8px;
    margin: 2px;
    background: #e9ecef;
    border-radius: 3px;
    font-size: 12px;
}
.quantity-cell {
    font-family: 'Courier New', monospace;
    text-align: right;
}
.filter-card {
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.date-input-container {
    position: relative;
}

.date-input-container .form-control {
    padding-right: 40px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    height: 42px;
}

.date-input-container .calendar-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

.badge-method {
    background-color: #edf2ff;
    color: #3b82f6;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 5px;
}



.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background-color: #0dcaf0;
    color: white !important;
    margin: 0 2px;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Select2 custom styling */
.select2-container--classic .select2-selection--single {
    height: 42px !important;
    border-radius: 6px !important;
    border: 1px solid #dee2e6 !important;
}

.select2-container--classic .select2-selection--single .select2-selection__rendered {
    line-height: 42px !important;
    padding-left: 15px !important;
}

.select2-container--classic .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
}

/* Flatpickr custom styling */
.flatpickr-calendar {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important;
}

.flatpickr-day.selected {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

.select2-container {
    width: 100% !important;
}
.select2-container .select2-selection--single {
    height: 38px;
    border: 1px solid #ced4da;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 38px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --success-color: #4cc9f0;
    --warning-color: #f72585;
    --info-color: #560bad;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

#loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--primary-color);
    border-top: 5px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



.page-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    opacity: 0.8;
    font-weight: 300;
}

.filter-card {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.filter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.75rem;
}


.form-control, .select2-container--default .select2-selection--single {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 0.6rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.15);
}

.select2-container--default .select2-selection--single {
    height: auto;
    padding: 0.375rem 0.75rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
}


.report-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.summary-card {
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    transition: all 0.3s ease;
    border: none;
}

.summary-card.sales {
    background: linear-gradient(135deg, #4cc9f0, #4361ee);
    color: white;
}

.summary-card.collection {
    background: linear-gradient(135deg, #7209b7, #560bad);
    color: white;
}

.summary-card.balance {
    background: linear-gradient(135deg, #f72585, #b5179e);
    color: white;
}

.summary-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.summary-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.summary-value {
    font-size: 1.75rem;
    font-weight: 700;
}


.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 1rem;
    color: #495057;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-color: #f0f0f0;
}

.table tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

.badge {
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    border-radius: 6px;
}

.badge-success {
    background-color: rgba(76, 201, 240, 0.15);
    color: var(--success-color);
}

.badge-warning {
    background-color: rgba(247, 37, 133, 0.15);
    color: var(--warning-color);
}

.badge-info {
    background-color: rgba(86, 11, 173, 0.15);
    color: var(--info-color);
}

.flatpickr-input {
    background-color: white !important;
}

.flatpickr-calendar {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    border-radius: 12px !important;
    border: none !important;
}

.select2-dropdown {
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary-color);
}

.pagination {
    justify-content: center;
    margin-top: 1.5rem;
}

.page-link {
    border-radius: 8px;
    margin: 0 3px;
    color: var(--primary-color);
    border: 1px solid #e0e0e0;
    padding: 0.5rem 0.75rem;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-link:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
    border-color: #e0e0e0;
}

.page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #e0e0e0;
}
