﻿

/* =========================================================================
       100% BULLETPROOF CSS: DATATABLES VIEW COLUMNS (COLVIS)
       ========================================================================= */

/* Main View Button */
.dt-button.buttons-colvis {
    background: #fff !important;
    background-image: none !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-dark) !important;
    border-radius: 6px !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

    .dt-button.buttons-colvis:hover {
        background: #f9fafb !important;
    }

/* Hide background dimmer */
.dt-button-background {
    display: none !important;
}

/* The Dropdown Panel */
.dt-button-collection {
    position: absolute !important;
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    padding: 0 !important;
    width: 220px !important;
    margin-top: 5px !important;
    z-index: 99999 !important; /* Force to top */
    overflow: hidden !important;
}

    /* "Toggle columns" Heading */
    .dt-button-collection::before {
        content: 'Toggle columns';
        display: block;
        padding: 15px 20px 10px 20px;
        font-size: 13px;
        font-weight: 700;
        color: var(--text-dark);
        border-bottom: 1px solid #f3f4f6;
        background: #fff;
    }

    /* Target the exact internal wrapper DataTables creates */
    .dt-button-collection > div {
        padding: 5px 0 10px 0 !important;
        background: #fff !important;
    }

    /* The Toggle Items inside the dropdown */
    .dt-button-collection .dt-button.buttons-columnVisibility {
        position: relative !important;
        background: #ffffff !important;
        background-image: none !important;
        border: none !important;
        border-radius: 0 !important;
        color: #4b5563 !important;
        padding: 8px 20px 8px 45px !important; /* Space for checkmark */
        margin: 0 !important;
        box-shadow: none !important;
        text-align: left !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        text-transform: capitalize !important;
        transition: background 0.2s ease !important;
        display: block !important;
        width: 100% !important;
        outline: none !important;
    }

        /* Span inside button */
        .dt-button-collection .dt-button.buttons-columnVisibility span {
            color: inherit !important;
            background: transparent !important;
        }

        /* Hover effect */
        .dt-button-collection .dt-button.buttons-columnVisibility:hover {
            background-color: #f9fafb !important;
            background-image: none !important;
            color: var(--text-dark) !important;
        }

        /* Active (Checked) state */
        .dt-button-collection .dt-button.buttons-columnVisibility.active {
            background-color: #ffffff !important;
            background-image: none !important;
            box-shadow: none !important;
            color: var(--text-dark) !important;
        }

            .dt-button-collection .dt-button.buttons-columnVisibility.active:hover {
                background-color: #f9fafb !important;
            }

            /* The Checkmark Icon (Left side) */
            .dt-button-collection .dt-button.buttons-columnVisibility.active::before {
                content: '\f00c';
                font-family: "Font Awesome 6 Free";
                font-weight: 900;
                position: absolute;
                left: 20px;
                top: 50%;
                transform: translateY(-50%);
                color: var(--text-dark) !important;
                font-size: 12px;
            }

        /* Remove Metronic's default right-side checkmark */
        .dt-button-collection .dt-button.buttons-columnVisibility::after {
            display: none !important;
        }

/* =========================================================
       RIGHT SIDE PANEL (OFFCANVAS) CSS
       ========================================================= */
.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(17, 24, 39, 0.4);
    z-index: 1040;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

    .panel-overlay.show {
        visibility: visible;
        opacity: 1;
    }

.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(17, 24, 39, 0.4);
    z-index: 1040;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

/* Panel Width Increased to 850px */
.side-panel {
    position: fixed;
    top: 0;
    right: -850px;
    width: 850px;
    height: 100vh;
    background: #fff;
    z-index: 1050;
    transition: right 0.3s ease-in-out;
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

    .side-panel.open {
        right: 0;
    }

.panel-header {
    padding: 24px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: #f9fafb;
}

.panel-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.panel-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.close-btn {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    font-size: 16px;
}

    .close-btn:hover {
        background: #fca5a5;
        color: #b91c1c;
    }

.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

/* Form Alignment Fixed: Labels on top, Inputs below */
.panel-form-group {
    margin-bottom: 20px;
    display: block;
}

.panel-label {
    display: block;
    width: 100%;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.panel-input-area {
    width: 100%;
}

.form-control {
    border-radius: 6px;
    padding: 10px 15px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    width: 100%;
    transition: 0.2s;
}

    .form-control:focus {
        border-color: var(--cyan-active);
        outline: none;
        box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    }

.panel-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
    background: #f9fafb;
}

.btn-panel-cancel {
    background: #e5e7eb;
    color: #374151;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    padding: 12px;
    width: 50%;
    transition: 0.2s;
    cursor: pointer;
}

    .btn-panel-cancel:hover {
        background: #d1d5db;
    }

.btn-panel-save {
    background: #000;
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    padding: 12px;
    width: 50%;
    transition: 0.2s;
    cursor: pointer;
}

    .btn-panel-save:hover {
        background: #1f2937;
    }

@media (max-width: 900px) {
    .side-panel {
        width: 100%;
        right: -100%;
    }
}





/* =========================================================
       1. VARIABLES & BASE STYLING
       ========================================================= */
:root {
    --app-bg: #f3f4f6;
    --border-color: #e5e7eb;
    --text-dark: #111827;
    --text-muted: #6b7280;
    --cyan-active: #0ea5e9;
    --green-active: #10b981;
    --pink-active: #ec4899; /* For Category Filter Active State */
    --pink-light: #fdf2f8;
}

body {
    background-color: var(--app-bg);
}

/* --- Page Header Styling --- */
.page-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin: 4px 0 0 0;
    font-weight: 500;
}

/* Top Buttons */
.btn-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    gap: 6px;
    margin-left: 8px;
    cursor: pointer;
}

.btn-export {
    background: #fff;
    border-color: var(--border-color);
    color: var(--text-dark);
}

    .btn-export:hover {
        background: #f9fafb;
        border-color: #d1d5db;
    }

.btn-add {
    background: #000;
    color: #fff;
}

    .btn-add:hover {
        background: #1f2937;
        color: #fff;
    }

/* =========================================================
       2. MAIN CARD & TOOLBAR
       ========================================================= */
.ui-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-top: 20px;
    overflow: hidden;
}

.table-toolbar {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e1e2d;
}

.search-box {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
    background: #f9fafb;
    width: 250px;
    transition: all 0.2s;
}

    .search-box:focus-within {
        border-color: var(--cyan-active);
        background: #fff;
        box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    }

    .search-box i {
        color: var(--text-muted);
        font-size: 14px;
    }

    .search-box input {
        border: none;
        outline: none;
        padding: 4px 8px;
        font-size: 13px;
        width: 100%;
        background: transparent;
    }

/* =========================================================
       3. CUSTOM FILTER DROPDOWN (Category Filter)
       ========================================================= */
.custom-filter-dropdown {
    position: relative;
    padding-left: 10px;
}

.filter-btn {
    background: #fff;
    border: 1px dashed var(--border-color);
    color: var(--text-dark);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    outline: none;
    transition: all 0.2s ease;
}

    .filter-btn i {
        color: var(--text-muted);
    }

    .filter-btn:hover {
        border-color: #d1d5db;
        background: #f9fafb;
    }

.filter-dropdown-menu {
    position: absolute;
    top: 115%;
    left: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 240px;
    display: none;
    z-index: 1000;
    padding: 10px 0;
}

    .filter-dropdown-menu.show {
        display: block;
    }

.filter-search {
    padding: 0 15px 10px 15px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
}

    .filter-search i {
        color: #9ca3af;
        font-size: 13px;
        margin-right: 8px;
    }

    .filter-search input {
        border: none;
        outline: none;
        font-size: 13px;
        width: 100%;
    }

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 250px;
    overflow-y: auto;
}

    .filter-list li {
        padding: 10px 15px;
        font-size: 13px;
        color: #4b5563;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 10px;
        transition: 0.2s;
    }

        .filter-list li i {
            font-size: 14px;
            color: #d1d5db;
            transition: 0.2s;
        }

        .filter-list li:hover {
            background: #f9fafb;
        }

        /* Active State for Filter List */
        .filter-list li.active {
            color: var(--pink-active);
            background: var(--pink-light);
            font-weight: 500;
        }

            .filter-list li.active i {
                color: var(--pink-active);
            }

    /* Custom Scrollbar for Filter List */
    .filter-list::-webkit-scrollbar {
        width: 4px;
    }

    .filter-list::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 4px;
    }

/* =========================================================
       4. MODERN TABLE STYLING
       ========================================================= */
.ui-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

    .ui-table th {
        background: #f9fafb;
        color: #6b7280;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 14px 20px;
        border-bottom: 1px solid var(--border-color);
        border-top: none;
    }

    .ui-table td {
        padding: 16px 20px;
        vertical-align: middle;
        color: var(--text-dark);
        font-size: 14px;
        border-bottom: 1px solid var(--border-color);
        font-weight: 500;
    }

    .ui-table tbody tr:hover {
        background-color: #f9fafb;
    }

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    margin: 0;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: .4s;
    border-radius: 34px;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 16px;
        width: 16px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }

input:checked + .slider {
    background-color: var(--green-active);
}

    input:checked + .slider:before {
        transform: translateX(18px);
    }

/* Action Dropdown (3 Dots) */
.action-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
}

    .action-btn:hover {
        background: #f3f4f6;
        color: var(--text-dark);
    }

.dropdown-menu-actions {
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-radius: 8px;
    padding: 8px 0;
}

.dropdown-item-action {
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

    .dropdown-item-action:hover {
        background: #f9fafb;
    }

/* =========================================================
       5. DATATABLES VIEW COLUMNS (COLVIS) DROPDOWN
       ========================================================= */
button.dt-button.buttons-colvis {
    background: #fff !important;
    background-image: none !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-dark) !important;
    border-radius: 6px !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
}

    button.dt-button.buttons-colvis:hover {
        background: #f9fafb !important;
    }

div.dt-button-background {
    display: none !important;
}

div.dt-button-collection {
    position: absolute !important;
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    padding: 8px !important;
    width: 220px !important;
    margin-top: 5px !important;
    z-index: 9999 !important;
}

    div.dt-button-collection button.dt-button, div.dt-button-collection button.dt-button:active, div.dt-button-collection button.dt-button:focus {
        position: relative !important;
        background: #ffffff !important;
        background-image: none !important;
        border: none !important;
        border-radius: 6px !important;
        color: #374151 !important;
        padding: 10px 15px !important;
        margin-bottom: 2px !important;
        box-shadow: none !important;
        text-align: left !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        transition: all 0.2s ease !important;
        display: block !important;
        width: 100% !important;
        outline: none !important;
    }

        div.dt-button-collection button.dt-button span {
            color: #374151 !important;
            background: transparent !important;
        }

        div.dt-button-collection button.dt-button:hover {
            background-color: #f3f4f6 !important;
            background-image: none !important;
        }

            div.dt-button-collection button.dt-button:hover span {
                color: #111827 !important;
            }

        div.dt-button-collection button.dt-button.active {
            background-color: #f0fdfa !important;
            background-image: none !important;
            box-shadow: none !important;
        }

            div.dt-button-collection button.dt-button.active span {
                color: var(--cyan-active) !important;
                font-weight: 600 !important;
            }

            div.dt-button-collection button.dt-button.active::after {
                content: '\f00c';
                font-family: "Font Awesome 6 Free";
                font-weight: 900;
                position: absolute;
                right: 15px;
                top: 50%;
                transform: translateY(-50%);
                color: var(--cyan-active);
            }

/* =========================================================
       6. RIGHT SIDE PANEL (OFFCANVAS) CSS
       ========================================================= */
.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(17, 24, 39, 0.4);
    z-index: 1040;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.side-panel {
    position: fixed;
    top: 0;
    right: -850px;
    width: 850px;
    height: 100vh;
    background: #fff;
    z-index: 1050;
    transition: right 0.3s ease-in-out;
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.panel-form-group {
    display: block;
    margin-bottom: 20px;
}

.custom-filter-dropdown {
    position: relative;
    flex-shrink: 0;
}

/* =========================================================
       3. CUSTOM FILTER DROPDOWNS
       ========================================================= */
.custom-filter-dropdown {
    position: relative;
    flex-shrink: 0;
}

.filter-btn {
    background: #fff;
    border: 1px dashed var(--border-color);
    color: var(--text-dark);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    outline: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-list li.active {
    color: var(--cyan-active);
    background: #f0fdfa;
    font-weight: 600;
}

    .filter-list li.active i {
        color: var(--cyan-active);
    }

.filter-list::-webkit-scrollbar {
    width: 4px;
}


/* Invoice Buttons */
.icon-btn {
    background: transparent;
    border: none;
    font-size: 15px;
    color: #6b7280;
    margin: 0 4px;
    cursor: pointer;
    transition: 0.2s;
}

    .icon-btn:hover {
        color: var(--cyan-active);
        transform: scale(1.1);
    }


/* Datatable View Columns Button */
button.dt-button.buttons-colvis {
    background: #fff !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-dark) !important;
    border-radius: 6px !important;
    padding: 5px 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    box-shadow: none !important;
}

div.dt-button-collection {
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
    padding: 0 !important;
    width: 220px !important;
    z-index: 9999 !important;
}

    div.dt-button-collection button.dt-button {
        text-align: left !important;
        font-size: 13px !important;
        padding: 8px 20px 8px 45px !important;
        border-radius: 0 !important;
    }

        div.dt-button-collection button.dt-button.active::before {
            content: '\f00c';
            font-family: "Font Awesome 6 Free";
            font-weight: 900;
            position: absolute;
            left: 20px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--cyan-active);
            font-size: 12px;
        }

.ui-table th {
    background: #f9fafb;
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.ui-table td {
    padding: 15px 20px;
    vertical-align: middle;
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
}

/* Mockup Badges */
.status-badge {
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    min-width: 80px;
    text-align: center;
}

.badge-delivered {
    background-color: #d1fae5;
    color: #047857;
}

.badge-pending {
    background-color: #ffedd5;
    color: #c2410c;
}

.badge-processing {
    background-color: #e0f2fe;
    color: #0369a1;
}

.badge-default {
    background-color: #f3f4f6;
    color: #374151;
}

/* Action Select Dropdown */
.action-select {
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    outline: none;
    transition: 0.2s;
}

    .action-select:focus {
        border-color: var(--cyan-active);
        box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.1);
    }

/* Datepicker CSS override to prevent squishing */
.datetimepicker {
    padding: 15px !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    background: #fff !important;
    border: 1px solid var(--border-color) !important;
    z-index: 10000 !important;
    min-width: 280px !important;
}

    .datetimepicker table th, .datetimepicker table td {
        padding: 8px 5px !important;
        text-align: center !important;
        border: none !important;
        font-size: 13px !important;
        vertical-align: middle !important;
        border-radius: 6px !important;
    }

    .datetimepicker table tbody td.active {
        background-color: var(--cyan-active) !important;
        color: #fff !important;
        font-weight: bold !important;
        box-shadow: 0 2px 5px rgba(14, 165, 233, 0.3) !important;
    }

/* =========================================================
       6. DATEPICKER CSS FIX
       ========================================================= */
.datetimepicker, .datepicker, .datepicker-dropdown {
    padding: 15px !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    background: #fff !important;
    border: 1px solid var(--border-color) !important;
    z-index: 10000 !important;
    min-width: 280px !important;
}

    .datetimepicker table, .datepicker table {
        width: 100% !important;
        margin: 0 !important;
        border-collapse: collapse !important;
    }

        .datetimepicker table th, .datetimepicker table td, .datepicker table th, .datepicker table td {
            padding: 8px 5px !important;
            text-align: center !important;
            border: none !important;
            background: transparent !important;
            font-size: 13px !important;
            color: var(--text-dark) !important;
            vertical-align: middle !important;
            border-radius: 6px !important;
        }

        .datetimepicker table thead tr:first-child th {
            font-size: 14px !important;
            font-weight: bold !important;
            padding-bottom: 15px !important;
        }

        .datetimepicker table thead tr:nth-child(2) th, .datepicker table thead tr:nth-child(2) th {
            font-weight: 700 !important;
            color: #6b7280 !important;
            font-size: 12px !important;
            padding-bottom: 10px !important;
        }

        .datetimepicker table tbody td:hover, .datepicker table tbody td:hover {
            background-color: #f3f4f6 !important;
            cursor: pointer !important;
        }

        .datetimepicker table tbody td.active, .datepicker table tbody td.active, .datetimepicker table tbody td.active:hover, .datepicker table tbody td.active:hover {
            background-color: var(--cyan-active) !important;
            color: #fff !important;
            font-weight: bold !important;
            box-shadow: 0 2px 5px rgba(14, 165, 233, 0.3) !important;
            border-radius: 6px !important;
        }

    .datetimepicker .switch {
        display: none !important;
    }

/* =========================================================
       2. MAIN CARD & DARK TOOLBAR (Matched with Image)
       ========================================================= */
.ui-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-top: 20px;
    overflow: hidden;
}



/* Toolbar Inputs */
.tb-input-box {
    background: #fff;
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s;
}

    .tb-input-box i {
        color: var(--text-muted);
        margin-right: 8px;
        font-size: 13px;
    }

    .tb-input-box input {
        border: none;
        outline: none;
        width: 100%;
        font-size: 13px;
        background: transparent;
    }

.search-wrap {
    flex: 1;
    min-width: 200px;
}

.date-wrap {
    width: 140px;
}

.date-search-btn {
    background: #e5e7eb;
    color: #374151;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
}

    .date-search-btn:hover {
        background: #d1d5db;
    }


/* =========================================================
       6. DATEPICKER CSS FIX (100% WORKING HEADER & ARROWS)
       ========================================================= */
.datetimepicker, .datepicker, .datepicker-dropdown {
    padding: 15px !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    background: #fff !important;
    border: 1px solid var(--border-color) !important;
    z-index: 10000 !important;
    min-width: 280px !important;
}

    /* FIX: Show the Header Switch (Month/Year) that got hidden by global .switch */
    .datetimepicker .switch {
        display: table-cell !important;
        width: auto !important;
        height: auto !important;
        position: static !important;
        opacity: 1 !important;
        font-size: 14px !important;
        font-weight: bold !important;
        cursor: pointer !important;
    }

    /* FIX: Force FontAwesome Arrows for Next/Prev */
    .datetimepicker table thead th.prev, .datetimepicker table thead th.next {
        font-family: "Font Awesome 6 Free" !important;
        font-weight: 900 !important;
        cursor: pointer !important;
        font-size: 14px !important;
    }

        .datetimepicker table thead th.prev::before {
            content: '\f053';
        }
        /* Left Arrow */
        .datetimepicker table thead th.next::before {
            content: '\f054';
        }
        /* Right Arrow */
        .datetimepicker table thead th.prev span, .datetimepicker table thead th.next span {
            display: none !important;
        }

    /* Table Header Days (Su, Mo, Tu...) */
    .datetimepicker table thead tr:nth-child(2) th, .datepicker table thead tr:nth-child(2) th {
        font-weight: 700 !important;
        color: #6b7280 !important;
        font-size: 12px !important;
        padding-bottom: 10px !important;
        border-bottom: 1px solid #f3f4f6 !important;
    }

@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}


/* =========================================================
       8. INVOICE CONTENT STYLING (INSIDE PANEL)
       ========================================================= */
.invoice-card {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.inv-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 20px;
}

.inv-company-info {
    text-align: right;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
}

.inv-company-logo {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

    .inv-company-logo i {
        color: #10b981;
    }

.inv-details-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.inv-col-title {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.inv-col-value {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    line-height: 1.5;
}

.inv-to-text {
    text-align: right;
}

/* Invoice Table */
.inv-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

    .inv-table th {
        background: #f9fafb;
        color: #6b7280;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        padding: 12px 15px;
        border-bottom: 1px solid #e5e7eb;
        text-align: left;
    }

    .inv-table td {
        padding: 12px 15px;
        font-size: 13px;
        font-weight: 600;
        color: #111827;
        border-bottom: 1px solid #e5e7eb;
    }

        .inv-table th.text-right, .inv-table td.text-right {
            text-align: right;
        }

        .inv-table th.text-center, .inv-table td.text-center {
            text-align: center;
        }

        .inv-table td.text-red {
            color: #ef4444;
        }

/* Summary Box */
.inv-summary-box {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    border: 1px solid #f1f5f9;
}

.inv-summary-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

    .inv-summary-item .label {
        font-size: 11px;
        font-weight: 700;
        color: #6b7280;
        text-transform: uppercase;
    }

    .inv-summary-item .value {
        font-size: 14px;
        font-weight: 600;
        color: #374151;
    }

    .inv-summary-item.total .value {
        color: #ef4444;
        font-size: 20px;
        font-weight: 800;
    }

/* Tracking Box */
.inv-tracking-box {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #f1f5f9;
}

.inv-tracking-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.inv-track-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.inv-track-card {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.inv-track-label {
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 6px;
}

.inv-track-val {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
}

    .inv-track-val.green {
        color: #10b981;
    }

.inv-badge-light {
    background: #d1fae5;
    color: #047857;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    display: inline-block;
}

.btn-panel-print {
    background: var(--text-dark);
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    transition: 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .btn-panel-print:hover {
        background: #000;
    }

/* =========================================================
       7. RIGHT SIDE PANEL (OFFCANVAS) CSS FOR INVOICE
       ========================================================= */
.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(17, 24, 39, 0.4);
    z-index: 1040;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.side-panel {
    position: fixed;
    top: 0;
    right: -900px;
    width: 900px;
    height: 100vh;
    background: #f3f4f6;
    z-index: 1050;
    transition: right 0.3s ease-in-out;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
}

.panel-header {
    padding: 24px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: #fff;
}

.panel-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.panel-subtitle {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
    background: #fff;
    justify-content: flex-end;
}

.btn-panel-cancel {
    background: #e5e7eb;
    color: #374151;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    transition: 0.2s;
    cursor: pointer;
}

/* =========================================================
   MISSING CSS MERGED FROM VIEW CSS
   ========================================================= */
.badge-cancelled {
    background-color: #fee2e2;
    color: #b91c1c;
}

.datetimepicker .switch, .datepicker .switch {
    display: table-cell !important;
    width: auto !important;
    height: auto !important;
    position: static !important;
    opacity: 1 !important;
    font-size: 14px !important;
    font-weight: bold !important;
    cursor: pointer !important;
}

    .datetimepicker .switch:hover, .datepicker .switch:hover {
        background: #f3f4f6 !important;
    }

.datetimepicker table tbody td.active, .datetimepicker table tbody td.active:hover {
    background-color: var(--cyan-active) !important;
    color: #fff !important;
    font-weight: bold !important;
    box-shadow: 0 2px 5px rgba(14, 165, 233, 0.3) !important;
}

.datetimepicker table thead th.next::before, .datepicker table thead th.next::before {
    content: '\f054';
}

.datetimepicker table thead th.prev, .datetimepicker table thead th.next, .datepicker table thead th.prev, .datepicker table thead th.next {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    cursor: pointer !important;
    font-size: 14px !important;
    display: table-cell !important;
}

    .datetimepicker table thead th.prev::before, .datepicker table thead th.prev::before {
        content: '\f053';
    }




/* Partner Card */
.partner-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

    .partner-card h3 {
        margin: 0 0 20px 0;
        font-size: 16px;
        font-weight: 700;
        color: #111827;
        display: flex;
        align-items: center;
        gap: 8px;
    }

.partner-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.partner-avatar {
    width: 50px;
    height: 50px;
    background: #d1fae5;
    color: #047857;
    font-weight: 700;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.partner-info h5 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.partner-info p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 5px;
}

.vehicle-badge {
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 15px;
    width: 100%;
    box-sizing: border-box;
}

.rating-wrap {
    font-size: 14px;
    color: #374151;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .rating-wrap i {
        color: #fbbf24;
    }

    .rating-wrap span {
        color: #9ca3af;
        font-weight: 400;
        font-size: 13px;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* SUMMARY CARDS (Main View) */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
    margin-top: 20px;
}

.sum-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.sum-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

    .sum-icon.blue {
        background: #eff6ff;
        color: #3b82f6;
    }

    .sum-icon.green {
        background: #d1fae5;
        color: #10b981;
    }

    .sum-icon.orange {
        background: #ffedd5;
        color: #f97316;
    }

.sum-details span {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}

.sum-details h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--text-dark);
}

.btn-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    gap: 6px;
}

.btn-add {
    background: var(--green-active);
    color: #fff;
}

/* TABLE CSS */
.ui-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 30px;
}



.tb-input-box {
    background: #f9fafb;
    display: flex;
    align-items: center;
    padding: 8px 15px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    width: 280px;
}

.ui-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

    .ui-table th {
        background: #f9fafb;
        color: #6b7280;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        padding: 15px 20px;
        border-bottom: 1px solid var(--border-color);
        white-space: nowrap;
    }

    .ui-table td {
        padding: 15px 20px;
        vertical-align: middle;
        color: var(--text-dark);
        font-size: 14px;
        font-weight: 500;
        border-bottom: 1px solid var(--border-color);
    }

.user-profile-td {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #6b7280;
}

.user-info .name {
    font-weight: 700;
    color: #111827;
    font-size: 14px;
    display: block;
}

.user-info .sub-text {
    color: #9ca3af;
    font-size: 12px;
    display: block;
}

.badge-avail {
    background: #d1fae5;
    color: #047857;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-ondel {
    background: #eff6ff;
    color: #3b82f6;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-offline {
    background: #f3f4f6;
    color: #4b5563;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.icon-btn {
    background: transparent;
    border: none;
    font-size: 16px;
    color: #6b7280;
    margin: 0 5px;
    cursor: pointer;
    transition: 0.2s;
}

    .icon-btn.delete:hover {
        color: #ef4444;
    }

/* =========================================================
       NEW: PROFILE DETAILS VIEW (IMAGE 1 MATCH)
       ========================================================= */
#profileContainer {
    display: none;
    animation: fadeIn 0.4s ease;
}


.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
}

    .back-btn:hover {
        color: #111827;
    }

/* Top Section Grid */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 30px;
}

.prof-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.prof-header {
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

    .prof-header img {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        object-fit: cover;
    }

    .prof-header h2 {
        margin: 0 0 5px 0;
        font-size: 18px;
        font-weight: 800;
        color: #111827;
    }

.rating-wrap {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

    .rating-wrap span {
        color: #9ca3af;
        font-weight: 400;
    }

.prof-badge {
    background: #dcfce7;
    color: #16a34a;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    display: inline-block;
}

.prof-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .prof-list li {
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: 14px;
        font-weight: 500;
        color: #111827;
        margin-bottom: 15px;
    }

        .prof-list li:last-child {
            margin-bottom: 0;
        }

        .prof-list li i {
            color: #9ca3af;
            width: 16px;
            text-align: center;
        }

/* 6 Stats Grid */
.prof-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.p-stat-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.p-stat-icon {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-bottom: 15px;
}

.p-stat-title {
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 5px;
}

.p-stat-val {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    margin: 0;
}

/* Colors for Stats */
.ic-blue {
    background: #eff6ff;
    color: #3b82f6;
}

.ic-green {
    background: #dcfce7;
    color: #10b981;
}

.ic-red {
    background: #fee2e2;
    color: #ef4444;
}

.ic-yellow {
    background: #fef3c7;
    color: #f59e0b;
}

.ic-purple {
    background: #f3e8ff;
    color: #a855f7;
}

/* =========================================================
       NEW: ASSIGNED ORDERS DATA TABLE STYLING (IMAGE 2 MATCH)
       ========================================================= */
.pill-badge {
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
    letter-spacing: 0.5px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.st-processing {
    background: #ec4899;
    color: #fff;
}
/* Pink */
.st-pending {
    background: #f97316;
    color: #fff;
}
/* Orange */
.st-out {
    background: #d1fae5;
    color: #047857;
}
/* Light Green */

.track-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    border: 1px solid transparent;
    background: transparent;
}

.tr-confirmed {
    border-color: #10b981;
    color: #10b981;
}

.tr-placed {
    border-color: #10b981;
    color: #10b981;
    opacity: 0.7;
}

.tr-way {
    border-color: #10b981;
    color: #10b981;
}

/* Side Panel CSS (Same as before) */
.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(17, 24, 39, 0.4);
    z-index: 1040;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.side-panel {
    position: fixed;
    top: 0;
    right: -750px;
    width: 750px;
    height: 100vh;
    background: #fff;
    z-index: 1050;
    transition: right 0.3s ease-in-out;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
}


/* SUMMARY CARDS */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
    margin-top: 20px;
}

.sum-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.sum-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

    .sum-icon.blue {
        background: #eff6ff;
        color: #3b82f6;
    }

    .sum-icon.green {
        background: #d1fae5;
        color: #10b981;
    }

    .sum-icon.orange {
        background: #ffedd5;
        color: #f97316;
    }

.sum-details span {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}

.sum-details h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--text-dark);
}

.btn-top {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s;
    cursor: pointer;
    border: none;
    gap: 6px;
}

.btn-add {
    background: var(--green-active);
    color: #fff;
}

    .btn-add:hover {
        background: #059669;
    }

/* TABLE CSS */
.ui-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 30px;
}

.table-toolbar {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    background: #fff;
}

.tb-input-box {
    background: #f9fafb;
    display: flex;
    align-items: center;
    padding: 8px 15px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    width: 280px;
}

    .tb-input-box i {
        color: var(--text-muted);
        margin-right: 10px;
    }

    .tb-input-box input {
        border: none;
        outline: none;
        width: 100%;
        font-size: 13px;
        background: transparent;
    }

.ui-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

    .ui-table th {
        background: #f9fafb;
        color: #6b7280;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        padding: 15px 20px;
        border-bottom: 1px solid var(--border-color);
        white-space: nowrap;
    }

    .ui-table td {
        padding: 15px 20px;
        vertical-align: middle;
        color: var(--text-dark);
        font-size: 14px;
        font-weight: 500;
        border-bottom: 1px solid var(--border-color);
    }

.user-profile-td {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #6b7280;
}

.user-info .name {
    font-weight: 700;
    color: #111827;
    font-size: 14px;
    display: block;
}

.user-info .sub-text {
    color: #9ca3af;
    font-size: 12px;
    display: block;
}

.badge-avail {
    background: #d1fae5;
    color: #047857;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-ondel {
    background: #eff6ff;
    color: #3b82f6;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-offline {
    background: #f3f4f6;
    color: #4b5563;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.rating-star {
    color: #f59e0b;
    font-size: 13px;
    margin-right: 4px;
}

.rating-text {
    color: #111827;
    font-weight: 700;
}

.rating-count {
    color: #9ca3af;
    font-size: 12px;
    font-weight: 500;
}

/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    margin: 0;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ef4444;
    transition: .4s;
    border-radius: 34px;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 14px;
        width: 14px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }

input:checked + .slider {
    background-color: #10b981;
}

    input:checked + .slider:before {
        transform: translateX(16px);
    }

.icon-btn {
    background: transparent;
    border: none;
    font-size: 16px;
    color: #6b7280;
    margin: 0 5px;
    cursor: pointer;
    transition: 0.2s;
}

    .icon-btn:hover {
        color: var(--cyan-active);
        transform: scale(1.1);
    }

    .icon-btn.delete:hover {
        color: #ef4444;
    }

/* =========================================================
       ADD/EDIT SIDE PANEL FORM CSS
       ========================================================= */
.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(17, 24, 39, 0.4);
    z-index: 1040;
    visibility: hidden;
    opacity: 0;
    transition: 0.3s;
}

    .panel-overlay.show {
        visibility: visible;
        opacity: 1;
    }

.side-panel {
    position: fixed;
    top: 0;
    right: -750px;
    width: 750px;
    height: 100vh;
    background: #fff;
    z-index: 1050;
    transition: right 0.3s ease-in-out;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
}

    .side-panel.open {
        right: 0;
    }

.panel-header {
    padding: 24px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.panel-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.close-btn {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.form-group-row {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.form-label {
    width: 160px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    flex-shrink: 0;
}

.form-control {
    flex: 1;
    border: 1px solid #d1d5db;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: #f9fafb;
}

/* Upload Box */
.upload-box {
    flex: 1;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    background: #f9fafb;
    cursor: pointer;
    position: relative;
}

    .upload-box input[type="file"] {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
    }

.img-preview-container {
    margin-top: 15px;
    display: none;
    position: relative;
    width: 80px;
    height: 80px;
}

    .img-preview-container img {
        width: 100%;
        height: 100%;
        border-radius: 8px;
        object-fit: cover;
        border: 1px solid #d1d5db;
    }

.remove-img {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
}

.panel-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: #f9fafb;
}

.btn-cancel {
    background: #e5e7eb;
    color: #374151;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    cursor: pointer;
}

.btn-save {
    background: var(--green-active);
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    cursor: pointer;
}

/* =========================================================
       PROFILE DETAILS VIEW
       ========================================================= */
#profileContainer {
    display: none;
    animation: fadeIn 0.4s ease;
}


.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
}

    .back-btn:hover {
        color: #111827;
    }

.profile-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 30px;
}

.prof-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.prof-header {
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

    .prof-header img {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        object-fit: cover;
    }

    .prof-header h2 {
        margin: 0 0 5px 0;
        font-size: 18px;
        font-weight: 800;
        color: #111827;
    }

.prof-badge {
    background: #dcfce7;
    color: #16a34a;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-block;
}

.prof-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .prof-list li {
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: 14px;
        font-weight: 500;
        color: #111827;
        margin-bottom: 15px;
    }

.prof-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.p-stat-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.p-stat-icon {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-bottom: 15px;
}

.p-stat-title {
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 5px;
}

.p-stat-val {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    margin: 0;
}

.ic-blue {
    background: #eff6ff;
    color: #3b82f6;
}

.ic-green {
    background: #dcfce7;
    color: #10b981;
}

.ic-red {
    background: #fee2e2;
    color: #ef4444;
}

.ic-yellow {
    background: #fef3c7;
    color: #f59e0b;
}

.ic-purple {
    background: #f3e8ff;
    color: #a855f7;
}

/* Assigned Orders Data Table Badges */
.pill-badge {
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.st-processing {
    background: #ec4899;
    color: #fff;
}

.st-pending {
    background: #f97316;
    color: #fff;
}

.st-out {
    background: #d1fae5;
    color: #047857;
}

.track-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    border: 1px solid transparent;
    background: transparent;
}

.tr-confirmed {
    border-color: #10b981;
    color: #10b981;
}

.tr-placed {
    border-color: #10b981;
    color: #10b981;
    opacity: 0.7;
}

.tr-way {
    border-color: #10b981;
    color: #10b981;
}
/* =========================================================
       8. INVOICE CONTENT STYLING
       ========================================================= */
.invoice-card {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.inv-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 20px;
}

.inv-company-info {
    text-align: right;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
}

.inv-company-logo {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

    .inv-company-logo i {
        color: #10b981;
    }

.inv-details-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.inv-col-title {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.inv-col-value {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    line-height: 1.5;
}

.inv-to-text {
    text-align: right;
}

.inv-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

    .inv-table th {
        background: #f9fafb;
        color: #6b7280;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        padding: 12px 15px;
        border-bottom: 1px solid #e5e7eb;
        text-align: left;
    }

    .inv-table td {
        padding: 12px 15px;
        font-size: 13px;
        font-weight: 600;
        color: #111827;
        border-bottom: 1px solid #e5e7eb;
    }

        .inv-table th.text-right, .inv-table td.text-right {
            text-align: right;
        }

        .inv-table th.text-center, .inv-table td.text-center {
            text-align: center;
        }

        .inv-table td.text-red {
            color: #ef4444;
        }

.inv-summary-box {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    border: 1px solid #f1f5f9;
}

.inv-summary-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

    .inv-summary-item .label {
        font-size: 11px;
        font-weight: 700;
        color: #6b7280;
        text-transform: uppercase;
    }

    .inv-summary-item .value {
        font-size: 14px;
        font-weight: 600;
        color: #374151;
    }

    .inv-summary-item.total .value {
        color: #ef4444;
        font-size: 20px;
        font-weight: 800;
    }



/* =========================================================
       7. SIDE PANELS CSS (INVOICE & HISTORY)
       ========================================================= */
.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(17, 24, 39, 0.4);
    z-index: 1040;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

    .panel-overlay.show {
        visibility: visible;
        opacity: 1;
    }

.side-panel {
    position: fixed;
    top: 0;
    right: -900px;
    width: 900px;
    height: 100vh;
    background: #f3f4f6;
    z-index: 1050;
    transition: right 0.3s ease-in-out;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
}

    .side-panel.history-panel {
        width: 600px;
        right: -600px;
        background: #fff;
    }

    .side-panel.open {
        right: 0;
    }

.panel-header {
    padding: 24px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.panel-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.panel-subtitle {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-btn-side {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    font-size: 16px;
}

    .close-btn-side:hover {
        background: #fca5a5;
        color: #b91c1c;
    }

.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.panel-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
    background: #fff;
    justify-content: flex-end;
}

.btn-panel-cancel {
    background: #e5e7eb;
    color: #374151;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    transition: 0.2s;
    cursor: pointer;
}

    .btn-panel-cancel:hover {
        background: #d1d5db;
    }

.btn-panel-print {
    background: var(--text-dark);
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    transition: 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .btn-panel-print:hover {
        background: #000;
    }


/* =========================================================
       6. DELIVERY BOY ASSIGNMENT CSS (PERFECTLY MATCHED)
       ========================================================= */
.btn-assign-new {
    background: #dcfce7;
    color: #047857;
    border: 1px solid #10b981;
    border-radius: 4px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

    .btn-assign-new:hover {
        background: #10b981;
        color: #fff;
    }

.assigned-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.assigned-name {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
}

.assigned-phone {
    font-size: 11px;
    color: #9ca3af;
    font-family: monospace;
    letter-spacing: 0.5px;
}

.btn-unassign {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-top: 3px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: 0.2s;
}

    .btn-unassign:hover {
        text-decoration: underline;
        color: #b91c1c;
    }

/* Assign Modal Styles */
.assign-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(17,24,39,0.5);
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
}

.assign-modal {
    background: #fff;
    width: 100%;
    max-width: 550px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 25px 30px;
    position: relative;
    animation: popIn 0.3s ease;
}


.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 18px;
    color: #9ca3af;
    cursor: pointer;
    border: none;
    background: transparent;
}

.modal-header-assign {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 15px;
}

.modal-title-wrap {
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

    .modal-title-wrap h3 {
        margin: 0;
        font-size: 18px;
        font-weight: 800;
        color: #111827;
        display: flex;
        align-items: center;
        gap: 8px;
    }

.select-badge {
    background: #eff6ff;
    color: #3b82f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.title-subtext {
    font-size: 13px;
    color: #6b7280;
}

.order-badge-gray {
    background: #f3f4f6;
    color: #374151;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
}

.dboy-search {
    position: relative;
    margin-bottom: 20px;
}

    .dboy-search i {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: #9ca3af;
    }

    .dboy-search input {
        width: 100%;
        padding: 12px 15px 12px 40px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        outline: none;
        font-size: 14px;
        box-sizing: border-box;
        transition: 0.2s;
    }

        .dboy-search input:focus {
            border-color: #10b981;
        }

.dboy-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    padding-right: 5px;
}

    .dboy-list::-webkit-scrollbar {
        width: 4px;
    }

    .dboy-list::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 4px;
    }

.dboy-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

    .dboy-item:hover {
        border-color: #10b981;
        background: #f9fafb;
    }

    .dboy-item.selected {
        background: #f0fdfa;
        border-color: #10b981;
    }

.dboy-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dboy-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #fed7aa;
    color: #b45309;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    object-fit: cover;
}

.dboy-info h4 {
    margin: 0 0 2px 0;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.dboy-info p {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}

.dboy-right {
    text-align: right;
}

.db-rating {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2px;
}

    .db-rating i {
        color: #fbbf24;
    }

.db-status {
    font-size: 12px;
    font-weight: 700;
    text-transform: lowercase;
}

    .db-status.free {
        color: #10b981;
    }

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    border-top: 1px solid #f3f4f6;
    padding-top: 20px;
}

.btn-mdl-cancel {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 10px 25px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

    .btn-mdl-cancel:hover {
        background: #f3f4f6;
    }

.btn-mdl-assign {
    background: #10b981;
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    opacity: 0.5;
    pointer-events: none;
    transition: 0.2s;
}

    .btn-mdl-assign.active {
        opacity: 1;
        pointer-events: auto;
    }

        .btn-mdl-assign.active:hover {
            background: #059669;
        }



/* =========================================================
       2. MAIN CARD & TOOLBAR
       ========================================================= */
.ui-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-top: 20px;
    overflow: hidden;
}

.table-toolbar {
    background: #1e1e2d;
    padding: 15px 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
}

.tb-input-box {
    background: #fff;
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s;
}

    .tb-input-box i {
        color: var(--text-muted);
        margin-right: 8px;
        font-size: 13px;
    }

    .tb-input-box input {
        border: none;
        outline: none;
        width: 100%;
        font-size: 13px;
        background: transparent;
    }

.search-wrap {
    flex: 1;
    min-width: 200px;
}

.date-wrap {
    width: 140px;
}

.date-search-btn {
    background: #e5e7eb;
    color: #374151;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
}

    .date-search-btn:hover {
        background: #d1d5db;
    }

/* =========================================================
       3. CUSTOM FILTER DROPDOWNS
       ========================================================= */
.custom-filter-dropdown {
    position: relative;
    flex-shrink: 0;
}

.filter-btn {
    background: #fff;
    color: var(--text-dark);
    border-radius: 20px;
    padding: 6px 15px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    outline: none;
    border: none;
    transition: all 0.2s ease;
}

    .filter-btn:hover {
        background: #f3f4f6;
    }

.filter-dropdown-menu {
    position: absolute;
    top: 115%;
    left: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 200px;
    display: none;
    z-index: 1000;
    padding: 10px 0;
}

    .filter-dropdown-menu.show {
        display: block;
    }

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 250px;
    overflow-y: auto;
}

    .filter-list li {
        padding: 10px 15px;
        font-size: 13px;
        color: #4b5563;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 10px;
        transition: 0.2s;
    }

        .filter-list li:hover {
            background: #f9fafb;
        }

        .filter-list li.active {
            color: var(--cyan-active);
            background: #f0fdfa;
            font-weight: 600;
        }

            .filter-list li.active i {
                color: var(--cyan-active);
            }

/* =========================================================
       4. MODERN TABLE STYLING & BADGES
       ========================================================= */
.ui-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

    .ui-table th {
        background: #f9fafb;
        color: #6b7280;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 15px 20px;
        border-bottom: 1px solid var(--border-color);
        white-space: nowrap;
        border-top: none;
    }

    .ui-table td {
        padding: 15px 20px;
        vertical-align: middle;
        color: var(--text-dark);
        font-size: 13px;
        font-weight: 500;
        border-bottom: 1px solid var(--border-color);
    }

    .ui-table tbody tr:hover {
        background-color: #f9fafb;
    }

.status-badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    min-width: 90px;
    text-align: center;
}

.badge-delivered {
    background-color: #d1fae5;
    color: #047857;
}

.badge-pending {
    background-color: #ffedd5;
    color: #c2410c;
}

.badge-processing {
    background-color: #fce7f3;
    color: #be185d;
}
/* Pinkish for processing to match image */
.badge-cancelled {
    background-color: #fee2e2;
    color: #b91c1c;
}

.badge-default {
    background-color: #e0f2fe;
    color: #0369a1;
}
/* Light blue for out for delivery */

.action-select {
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    outline: none;
    transition: 0.2s;
    min-width: 110px;
}

    .action-select:focus {
        border-color: var(--cyan-active);
        box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.1);
        background: #fff;
    }

.icon-btn {
    background: transparent;
    border: none;
    font-size: 16px;
    color: #6b7280;
    margin: 0 4px;
    cursor: pointer;
    transition: 0.2s;
}

    .icon-btn:hover {
        color: var(--text-dark);
        transform: scale(1.1);
    }

.icon-btn-history {
    background: #facc15;
    color: #111827;
    border: none;
    font-size: 13px;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    margin-left: 4px;
    box-shadow: 0 2px 5px rgba(250, 204, 21, 0.3);
}

    .icon-btn-history:hover {
        background: #eab308;
        transform: scale(1.05);
    }

/* =========================================================
       5. DATATABLES VIEW COLUMNS & DATEPICKER (Merged)
       ========================================================= */
.dt-button.buttons-colvis {
    background: #fff !important;
    background-image: none !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-dark) !important;
    border-radius: 6px !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

    .dt-button.buttons-colvis:hover {
        background: #f9fafb !important;
    }

.dt-button-background {
    display: none !important;
}

.dt-button-collection {
    position: absolute !important;
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    padding: 0 !important;
    width: 220px !important;
    margin-top: 5px !important;
    z-index: 99999 !important;
    overflow: hidden !important;
}

    .dt-button-collection::before {
        content: 'Toggle columns';
        display: block;
        padding: 15px 20px 10px 20px;
        font-size: 13px;
        font-weight: 700;
        color: var(--text-dark);
        border-bottom: 1px solid #f3f4f6;
        background: #fff;
    }

    .dt-button-collection > div {
        padding: 5px 0 10px 0 !important;
        background: #fff !important;
    }

    .dt-button-collection .dt-button.buttons-columnVisibility {
        position: relative !important;
        background: #ffffff !important;
        border: none !important;
        border-radius: 0 !important;
        color: #4b5563 !important;
        padding: 8px 20px 8px 45px !important;
        margin: 0 !important;
        text-align: left !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        text-transform: capitalize !important;
        display: block !important;
        width: 100% !important;
        outline: none !important;
    }

        .dt-button-collection .dt-button.buttons-columnVisibility span {
            color: inherit !important;
            background: transparent !important;
        }

        .dt-button-collection .dt-button.buttons-columnVisibility:hover {
            background-color: #f9fafb !important;
            color: var(--text-dark) !important;
        }

        .dt-button-collection .dt-button.buttons-columnVisibility.active {
            background-color: #ffffff !important;
            color: var(--text-dark) !important;
        }

            .dt-button-collection .dt-button.buttons-columnVisibility.active::before {
                content: '\f00c';
                font-family: "Font Awesome 6 Free";
                font-weight: 900;
                position: absolute;
                left: 20px;
                top: 50%;
                transform: translateY(-50%);
                color: var(--text-dark) !important;
                font-size: 12px;
            }

        .dt-button-collection .dt-button.buttons-columnVisibility::after {
            display: none !important;
        }

.datetimepicker, .datepicker, .datepicker-dropdown {
    padding: 15px !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    background: #fff !important;
    border: 1px solid var(--border-color) !important;
    z-index: 10000 !important;
    min-width: 280px !important;
}

    .datetimepicker table, .datepicker table {
        width: 100% !important;
        margin: 0 !important;
        border-collapse: collapse !important;
    }

        .datetimepicker table th, .datetimepicker table td {
            padding: 8px 5px !important;
            text-align: center !important;
            border: none !important;
            background: transparent !important;
            font-size: 13px !important;
            color: var(--text-dark) !important;
            vertical-align: middle !important;
            border-radius: 6px !important;
        }

    .datetimepicker .switch, .datepicker .switch {
        display: table-cell !important;
        width: auto !important;
        height: auto !important;
        position: static !important;
        opacity: 1 !important;
        font-size: 14px !important;
        font-weight: bold !important;
        cursor: pointer !important;
    }

    .datetimepicker table thead th.prev, .datetimepicker table thead th.next {
        font-family: "Font Awesome 6 Free" !important;
        font-weight: 900 !important;
        cursor: pointer !important;
        font-size: 14px !important;
        display: table-cell !important;
    }

        .datetimepicker table thead th.prev::before {
            content: '\f053';
        }

        .datetimepicker table thead th.next::before {
            content: '\f054';
        }

    .datetimepicker table tbody td.active {
        background-color: var(--cyan-active) !important;
        color: #fff !important;
        font-weight: bold !important;
        box-shadow: 0 2px 5px rgba(14, 165, 233, 0.3) !important;
    }



.btn-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    gap: 6px;
    margin-left: 8px;
    cursor: pointer;
}

.btn-export {
    background: #fff;
    border-color: var(--border-color);
    color: var(--text-dark);
}

    .btn-export:hover {
        background: #f9fafb;
        border-color: #d1d5db;
    }


/* =========================================================
       1. VARIABLES & BASE STYLING
       ========================================================= */
:root {
    --app-bg: #f3f4f6;
    --border-color: #e5e7eb;
    --text-dark: #111827;
    --text-muted: #6b7280;
    --cyan-active: #0ea5e9;
    --green-active: #10b981;
}

body {
    background-color: var(--app-bg);
}

.page-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin: 4px 0 0 0;
    font-weight: 500;
}

.btn-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    gap: 6px;
    margin-left: 8px;
    cursor: pointer;
}

.btn-export {
    background: #fff;
    border-color: var(--border-color);
    color: var(--text-dark);
}

    .btn-export:hover {
        background: #f9fafb;
        border-color: #d1d5db;
    }

/* =========================================================
       2. MAIN CARD & TOOLBAR
       ========================================================= */
.ui-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-top: 20px;
    overflow: hidden;
}

.table-toolbar {
    background: #1e1e2d;
    padding: 15px 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
}

.tb-input-box {
    background: #fff;
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s;
}

    .tb-input-box i {
        color: var(--text-muted);
        margin-right: 8px;
        font-size: 13px;
    }

    .tb-input-box input {
        border: none;
        outline: none;
        width: 100%;
        font-size: 13px;
        background: transparent;
    }

.search-wrap {
    flex: 1;
    min-width: 200px;
}

.date-wrap {
    width: 140px;
}

.date-search-btn {
    background: #e5e7eb;
    color: #374151;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
}

    .date-search-btn:hover {
        background: #d1d5db;
    }

/* =========================================================
       3. CUSTOM FILTER DROPDOWNS
       ========================================================= */
.custom-filter-dropdown {
    position: relative;
    flex-shrink: 0;
}

.filter-btn {
    background: #fff;
    color: var(--text-dark);
    border-radius: 20px;
    padding: 6px 15px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    outline: none;
    border: none;
    transition: all 0.2s ease;
}

    .filter-btn:hover {
        background: #f3f4f6;
    }

.filter-dropdown-menu {
    position: absolute;
    top: 115%;
    left: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 200px;
    display: none;
    z-index: 1000;
    padding: 10px 0;
}

    .filter-dropdown-menu.show {
        display: block;
    }

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 250px;
    overflow-y: auto;
}

    .filter-list li {
        padding: 10px 15px;
        font-size: 13px;
        color: #4b5563;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 10px;
        transition: 0.2s;
    }

        .filter-list li:hover {
            background: #f9fafb;
        }

        .filter-list li.active {
            color: var(--cyan-active);
            background: #f0fdfa;
            font-weight: 600;
        }

            .filter-list li.active i {
                color: var(--cyan-active);
            }

/* =========================================================
       4. MODERN TABLE STYLING & BADGES
       ========================================================= */
.ui-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

    .ui-table th {
        background: #f9fafb;
        color: #6b7280;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 15px 20px;
        border-bottom: 1px solid var(--border-color);
        white-space: nowrap;
        border-top: none;
    }

    .ui-table td {
        padding: 15px 20px;
        vertical-align: middle;
        color: var(--text-dark);
        font-size: 13px;
        font-weight: 500;
        border-bottom: 1px solid var(--border-color);
    }

    .ui-table tbody tr:hover {
        background-color: #f9fafb;
    }

.status-badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    min-width: 90px;
    text-align: center;
}

.badge-delivered {
    background-color: #d1fae5;
    color: #047857;
}

.badge-pending {
    background-color: #ffedd5;
    color: #c2410c;
}

.badge-processing {
    background-color: #fce7f3;
    color: #be185d;
}
/* Pinkish for processing to match image */
.badge-cancelled {
    background-color: #fee2e2;
    color: #b91c1c;
}

.badge-default {
    background-color: #e0f2fe;
    color: #0369a1;
}
/* Light blue for out for delivery */

.action-select {
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    outline: none;
    transition: 0.2s;
    min-width: 110px;
}

    .action-select:focus {
        border-color: var(--cyan-active);
        box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.1);
        background: #fff;
    }

.icon-btn {
    background: transparent;
    border: none;
    font-size: 16px;
    color: #6b7280;
    margin: 0 4px;
    cursor: pointer;
    transition: 0.2s;
}

    .icon-btn:hover {
        color: var(--text-dark);
        transform: scale(1.1);
    }

.icon-btn-history {
    background: #facc15;
    color: #111827;
    border: none;
    font-size: 13px;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    margin-left: 4px;
    box-shadow: 0 2px 5px rgba(250, 204, 21, 0.3);
}

    .icon-btn-history:hover {
        background: #eab308;
        transform: scale(1.05);
    }

/* =========================================================
       5. DATATABLES VIEW COLUMNS & DATEPICKER (Merged)
       ========================================================= */
.dt-button.buttons-colvis {
    background: #fff !important;
    background-image: none !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-dark) !important;
    border-radius: 6px !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

    .dt-button.buttons-colvis:hover {
        background: #f9fafb !important;
    }

.dt-button-background {
    display: none !important;
}

.dt-button-collection {
    position: absolute !important;
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    padding: 0 !important;
    width: 220px !important;
    margin-top: 5px !important;
    z-index: 99999 !important;
    overflow: hidden !important;
}

    .dt-button-collection::before {
        content: 'Toggle columns';
        display: block;
        padding: 15px 20px 10px 20px;
        font-size: 13px;
        font-weight: 700;
        color: var(--text-dark);
        border-bottom: 1px solid #f3f4f6;
        background: #fff;
    }

    .dt-button-collection > div {
        padding: 5px 0 10px 0 !important;
        background: #fff !important;
    }

    .dt-button-collection .dt-button.buttons-columnVisibility {
        position: relative !important;
        background: #ffffff !important;
        border: none !important;
        border-radius: 0 !important;
        color: #4b5563 !important;
        padding: 8px 20px 8px 45px !important;
        margin: 0 !important;
        text-align: left !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        text-transform: capitalize !important;
        display: block !important;
        width: 100% !important;
        outline: none !important;
    }

        .dt-button-collection .dt-button.buttons-columnVisibility span {
            color: inherit !important;
            background: transparent !important;
        }

        .dt-button-collection .dt-button.buttons-columnVisibility:hover {
            background-color: #f9fafb !important;
            color: var(--text-dark) !important;
        }

        .dt-button-collection .dt-button.buttons-columnVisibility.active {
            background-color: #ffffff !important;
            color: var(--text-dark) !important;
        }

            .dt-button-collection .dt-button.buttons-columnVisibility.active::before {
                content: '\f00c';
                font-family: "Font Awesome 6 Free";
                font-weight: 900;
                position: absolute;
                left: 20px;
                top: 50%;
                transform: translateY(-50%);
                color: var(--text-dark) !important;
                font-size: 12px;
            }

        .dt-button-collection .dt-button.buttons-columnVisibility::after {
            display: none !important;
        }

.datetimepicker, .datepicker, .datepicker-dropdown {
    padding: 15px !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    background: #fff !important;
    border: 1px solid var(--border-color) !important;
    z-index: 10000 !important;
    min-width: 280px !important;
}

    .datetimepicker table, .datepicker table {
        width: 100% !important;
        margin: 0 !important;
        border-collapse: collapse !important;
    }

        .datetimepicker table th, .datetimepicker table td {
            padding: 8px 5px !important;
            text-align: center !important;
            border: none !important;
            background: transparent !important;
            font-size: 13px !important;
            color: var(--text-dark) !important;
            vertical-align: middle !important;
            border-radius: 6px !important;
        }

    .datetimepicker .switch, .datepicker .switch {
        display: table-cell !important;
        width: auto !important;
        height: auto !important;
        position: static !important;
        opacity: 1 !important;
        font-size: 14px !important;
        font-weight: bold !important;
        cursor: pointer !important;
    }

    .datetimepicker table thead th.prev, .datetimepicker table thead th.next {
        font-family: "Font Awesome 6 Free" !important;
        font-weight: 900 !important;
        cursor: pointer !important;
        font-size: 14px !important;
        display: table-cell !important;
    }

        .datetimepicker table thead th.prev::before {
            content: '\f053';
        }

        .datetimepicker table thead th.next::before {
            content: '\f054';
        }

    .datetimepicker table tbody td.active {
        background-color: var(--cyan-active) !important;
        color: #fff !important;
        font-weight: bold !important;
        box-shadow: 0 2px 5px rgba(14, 165, 233, 0.3) !important;
    }

/* =========================================================
       6. DELIVERY BOY ASSIGNMENT CSS (PERFECTLY MATCHED)
       ========================================================= */
.btn-assign-new {
    background: #dcfce7;
    color: #047857;
    border: 1px solid #10b981;
    border-radius: 4px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

    .btn-assign-new:hover {
        background: #10b981;
        color: #fff;
    }

.assigned-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.assigned-name {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
}

.assigned-phone {
    font-size: 11px;
    color: #9ca3af;
    font-family: monospace;
    letter-spacing: 0.5px;
}

.btn-unassign {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-top: 3px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: 0.2s;
}

    .btn-unassign:hover {
        text-decoration: underline;
        color: #b91c1c;
    }

/* Assign Modal Styles */
.assign-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(17,24,39,0.5);
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
}

.assign-modal {
    background: #fff;
    width: 100%;
    max-width: 550px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 25px 30px;
    position: relative;
    animation: popIn 0.3s ease;
}


.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 18px;
    color: #9ca3af;
    cursor: pointer;
    border: none;
    background: transparent;
}

.modal-header-assign {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 15px;
}

.modal-title-wrap {
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

    .modal-title-wrap h3 {
        margin: 0;
        font-size: 18px;
        font-weight: 800;
        color: #111827;
        display: flex;
        align-items: center;
        gap: 8px;
    }

.select-badge {
    background: #eff6ff;
    color: #3b82f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.title-subtext {
    font-size: 13px;
    color: #6b7280;
}

.order-badge-gray {
    background: #f3f4f6;
    color: #374151;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
}

.dboy-search {
    position: relative;
    margin-bottom: 20px;
}

    .dboy-search i {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: #9ca3af;
    }

    .dboy-search input {
        width: 100%;
        padding: 12px 15px 12px 40px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        outline: none;
        font-size: 14px;
        box-sizing: border-box;
        transition: 0.2s;
    }

        .dboy-search input:focus {
            border-color: #10b981;
        }

.dboy-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    padding-right: 5px;
}

    .dboy-list::-webkit-scrollbar {
        width: 4px;
    }

    .dboy-list::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 4px;
    }

.dboy-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

    .dboy-item:hover {
        border-color: #10b981;
        background: #f9fafb;
    }

    .dboy-item.selected {
        background: #f0fdfa;
        border-color: #10b981;
    }

.dboy-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dboy-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #fed7aa;
    color: #b45309;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    object-fit: cover;
}

.dboy-info h4 {
    margin: 0 0 2px 0;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.dboy-info p {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}

.dboy-right {
    text-align: right;
}

.db-rating {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2px;
}

    .db-rating i {
        color: #fbbf24;
    }

.db-status {
    font-size: 12px;
    font-weight: 700;
    text-transform: lowercase;
}

    .db-status.free {
        color: #10b981;
    }

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    border-top: 1px solid #f3f4f6;
    padding-top: 20px;
}

.btn-mdl-cancel {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 10px 25px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

    .btn-mdl-cancel:hover {
        background: #f3f4f6;
    }

.btn-mdl-assign {
    background: #10b981;
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    opacity: 0.5;
    pointer-events: none;
    transition: 0.2s;
}

    .btn-mdl-assign.active {
        opacity: 1;
        pointer-events: auto;
    }

        .btn-mdl-assign.active:hover {
            background: #059669;
        }

/* =========================================================
       7. SIDE PANELS CSS (INVOICE & HISTORY)
       ========================================================= */
.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(17, 24, 39, 0.4);
    z-index: 1040;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

    .panel-overlay.show {
        visibility: visible;
        opacity: 1;
    }

.side-panel {
    position: fixed;
    top: 0;
    right: -900px;
    width: 900px;
    height: 100vh;
    background: #f3f4f6;
    z-index: 1050;
    transition: right 0.3s ease-in-out;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
}

    .side-panel.history-panel {
        width: 600px;
        right: -600px;
        background: #fff;
    }

    .side-panel.open {
        right: 0;
    }

.panel-header {
    padding: 24px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.panel-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.panel-subtitle {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-btn-side {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    font-size: 16px;
}

    .close-btn-side:hover {
        background: #fca5a5;
        color: #b91c1c;
    }

.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.panel-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
    background: #fff;
    justify-content: flex-end;
}

.btn-panel-cancel {
    background: #e5e7eb;
    color: #374151;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    transition: 0.2s;
    cursor: pointer;
}

    .btn-panel-cancel:hover {
        background: #d1d5db;
    }

.btn-panel-print {
    background: var(--text-dark);
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    transition: 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .btn-panel-print:hover {
        background: #000;
    }

/* =========================================================
       8. INVOICE CONTENT STYLING
       ========================================================= */
.invoice-card {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.inv-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 20px;
}

.inv-company-info {
    text-align: right;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
}

.inv-company-logo {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

    .inv-company-logo i {
        color: #10b981;
    }

.inv-details-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.inv-col-title {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.inv-col-value {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    line-height: 1.5;
}

.inv-to-text {
    text-align: right;
}

.inv-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

    .inv-table th {
        background: #f9fafb;
        color: #6b7280;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        padding: 12px 15px;
        border-bottom: 1px solid #e5e7eb;
        text-align: left;
    }

    .inv-table td {
        padding: 12px 15px;
        font-size: 13px;
        font-weight: 600;
        color: #111827;
        border-bottom: 1px solid #e5e7eb;
    }

        .inv-table th.text-right, .inv-table td.text-right {
            text-align: right;
        }

        .inv-table th.text-center, .inv-table td.text-center {
            text-align: center;
        }

        .inv-table td.text-red {
            color: #ef4444;
        }

.inv-summary-box {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    border: 1px solid #f1f5f9;
}

.inv-summary-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

    .inv-summary-item .label {
        font-size: 11px;
        font-weight: 700;
        color: #6b7280;
        text-transform: uppercase;
    }

    .inv-summary-item .value {
        font-size: 14px;
        font-weight: 600;
        color: #374151;
    }

    .inv-summary-item.total .value {
        color: #ef4444;
        font-size: 20px;
        font-weight: 800;
    }

/* =========================================================
       9. DELIVERY HISTORY TIMELINE
       ========================================================= */
.hist-summary-card {
    background: #f9fafb;
    border-radius: 8px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    border: 1px solid #f3f4f6;
}

.hist-summary-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .hist-summary-col.right {
        text-align: right;
    }

.hist-s-label {
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
}

.hist-s-val {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.th-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

    .th-list::before {
        content: '';
        position: absolute;
        left: 19px;
        top: 10px;
        bottom: 10px;
        width: 2px;
        background: #e5e7eb;
    }

.th-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    position: relative;
}

    .th-item:last-child {
        margin-bottom: 0;
    }

.th-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: #fff;
    z-index: 2;
    flex-shrink: 0;
}

    .th-icon.cyan {
        background: #e0f2fe;
        color: #0ea5e9;
        border: 2px solid #fff;
        box-shadow: 0 0 0 1.5px #e0f2fe;
    }

    .th-icon.purple {
        background: #f3e8ff;
        color: #a855f7;
        border: 2px solid #fff;
        box-shadow: 0 0 0 1.5px #f3e8ff;
    }

    .th-icon.green {
        background: #dcfce7;
        color: #10b981;
        border: 2px solid #fff;
        box-shadow: 0 0 0 1.5px #dcfce7;
    }

    .th-icon.red {
        background: #fee2e2;
        color: #ef4444;
        border: 2px solid #fff;
        box-shadow: 0 0 0 1.5px #fee2e2;
    }

    .th-icon.gray {
        background: #f3f4f6;
        color: #6b7280;
        border: 2px solid #fff;
        box-shadow: 0 0 0 1.5px #e5e7eb;
    }

.th-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.th-details h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.th-details p {
    margin: 0 0 6px 0;
    font-size: 13px;
    color: #6b7280;
}

.th-user {
    font-size: 12px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 5px;
}

.th-time {
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
    text-align: right;
}
@media (max-width: 1200px) {
    .top-cards-grid {
        grid-template-columns: 1fr 1fr;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .login-card {
        flex-direction: column;
    }

    .login-left {
        display: none; /* Hide image on mobile for better UX */
    }

    .login-right {
        padding: 40px 30px;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        height: 100vh;
        transform: translateX(-100%);
    }

        .sidebar.mobile-open {
            transform: translateX(0);
        }

    .btn-toggle {
        display: block;
    }

    .header-search {
        display: none;
    }
    /* Hide search on mobile */
    .app-content {
        padding: 15px;
    }
}


@media (max-width: 768px) {
    .side-panel {
        width: 100%;
        right: -100%;
    }

    .panel-form-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .panel-label, .panel-input-area {
        width: 100%;
        margin-bottom: 8px;
    }

    .tracking-layout {
        grid-template-columns: 1fr;
    }

    .summary-grid {
        grid-template-columns: 1fr 1fr;
    }

    .login-wrapper {
        padding: 15px;
    }

    .login-card {
        flex-direction: column; /* Stack elements vertically */
        min-height: auto;
    }

    .login-left {
        /* Hide the large image on mobile, or make it a small banner */
        display: none;
        /* Alternative if you want to keep it as a banner:
                height: 200px;
                flex: none; */
    }

    .login-right {
        padding: 40px 25px; /* Reduce padding for smaller screens */
    }

    .login-title {
        font-size: 22px;
        text-align: center; /* Center title on mobile */
    }

    .btn-login {
        padding: 12px;
    }
}