/* =========================================================
   Global Themeable Stylesheet
   - Uses CSS variables so colors can be overridden at runtime
   - Include this file first, then include /theme.css after it
   ========================================================= */

:root {
    /* Base tokens (can be overridden by /theme.css) */
    --primary-color: #129990;
    --primaryLight-color: #6CCCCB;
    --white: #fff;
    --light-gray: #eef1f4;
    --black-color: #212B36;
    /* Derived helpers (avoid hard-coded hex elsewhere) */
    /* primary */
    --primary-rgb: 18,153,144; /* rgb of --primary-color */
    --primary-05: rgba(var(--primary-rgb), .05);
    --primary-10: rgba(var(--primary-rgb), .10);
    --primary-15: rgba(var(--primary-rgb), .15);
    --primary-20: rgba(var(--primary-rgb), .20);
    --primary-30: rgba(var(--primary-rgb), .30);
    /* primaryLight */
    --primaryLight-rgb: 108,204,203; /* rgb of --primaryLight-color */
    --primaryLight-05: rgba(var(--primaryLight-rgb), .05);
    --primaryLight-10: rgba(var(--primaryLight-rgb), .10);
    --primaryLight-15: rgba(var(--primaryLight-rgb), .15);
    --primaryLight-20: rgba(var(--primaryLight-rgb), .20);
    /* Common shadows */
    --shadow-primary-soft: 1px 2px 5px 0 rgba(var(--primaryLight-rgb), .75);
}

@font-face {
    font-family: 'Cairo Regular';
    src: url('../fonts/Cairo-Regular.eot');
    src: url('../fonts/Cairo-Regular.eot?#iefix') format('embedded-opentype'), url('../fonts/Cairo-Regular.woff2') format('woff2'), url('../fonts/Cairo-Regular.woff') format('woff'), url('../fonts/Cairo-Regular.ttf') format('truetype'), url('../fonts/Cairo-Regular.svg#Cairo-Regular') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'icomoon';
    src: url('../icons/fonts/icomoon.eot?rxc6eg');
    src: url('../icons/fonts/icomoon.eot?rxc6eg#iefix') format('embedded-opentype'), url('../icons/fonts/icomoon.ttf?rxc6eg') format('truetype'), url('../icons/fonts/icomoon.woff?rxc6eg') format('woff'), url('../icons/fonts/icomoon.svg?rxc6eg#icomoon') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

body {
    overflow-x: hidden;
    font-family: 'Cairo Regular';
    background-color: var(--light-gray);
}

html[lang="ar"] body {
    direction: rtl;
    text-align: right;
}

html[lang="en"] body {
    direction: ltr;
    text-align: left;
}

    html[lang="en"] body ::placeholder,
    html[lang="en"] body .nav-item .nav-link {
        text-align: left !important;
    }

    html[lang="en"] body i.icon-arrow-left2,
    html[lang="en"] body .dataTables_wrapper .dataTables_paginate.paging_simple_numbers .paginate_button i {
        transform: rotate(180deg);
        display: inline-block;
    }

    html[lang="en"] body table thead th:first-child {
        border-top-left-radius: 10px;
        border-bottom-left-radius: 10px;
        border-top-right-radius: inherit;
        border-bottom-right-radius: inherit;
    }

    html[lang="en"] body table thead th:last-child {
        border-top-left-radius: inherit;
        border-bottom-left-radius: inherit;
        border-top-right-radius: 10px;
        border-bottom-right-radius: 10px;
    }

    html[lang="en"] body .custom-tab > .nav-item:not(:last-child)::after {
        right: -60px;
        left: inherit;
    }

    html[lang="en"] body .justify-content-start {
        justify-content: flex-end !important;
    }

    html[lang="en"] body .notification-dropdown {
        left: inherit !important;
        right: 0;
    }

    html[lang="en"] body .breadcrumb-item + .breadcrumb-item::before {
        float: left !important;
        padding-right: 10px;
        padding-left: 10px;
    }

/* ============================
   Improved Dark Mode Styling
=============================== */

body.dark-mode {
    --primary-color: #0a3d3a;
    --primaryLight-color: #2a4d4c;
    --white: #1e1e1e;
    --light-gray: #2c2c2c;
    --black-color: #f1f1f1;
    /* recompute helpers for dark (approximate) */
    --primary-rgb: 10,61,58;
    --primaryLight-rgb: 42,77,76;
    background-color: var(--white);
    color: var(--black-color);
}

    /* Base Components */
    body.dark-mode .card,
    body.dark-mode .box,
    body.dark-mode .dropdown-menu,
    body.dark-mode .form-control,
    body.dark-mode .input-group-text {
        background-color: #292d32;
        color: var(--black-color) !important;
        border-color: #444;
    }

    /* Sidebar */
    body.dark-mode .sidebar,
    body.dark-mode .bg-white {
        background-color: #292D32 !important;
        color: #fff;
    }

    body.dark-mode .nav-pills .nav-link.active,
    body.dark-mode .nav-pills .show > .nav-link {
        background-color: #1e1e1e !important;
    }

    /* Buttons */
    body.dark-mode .btn-primary {
        border-color: #fff;
    }

        body.dark-mode .btn-primary:hover {
            background-color: var(--primary-color);
            border-color: #fff;
        }

    body.dark-mode .btn-outline-primary {
        background-color: var(--light-gray);
        border-color: var(--primaryLight-color);
        color: var(--black-color);
    }

    body.dark-mode .form-check.form-switch.bg-white {
        background-color: #919191 !important;
    }

    body.dark-mode .breadcrumb-item a {
        color: #cbcbcb !important;
    }

    body.dark-mode .card-custom small,
    body.dark-mode .breadcrumb-item.active,
    body.dark-mode .breadcrumb-item + .breadcrumb-item::before,
    body.dark-mode .box .details,
    body.dark-mode .box .details i {
        color: #fff !important;
    }

    body.dark-mode .text-success {
        color: #111 !important;
    }

    body.dark-mode .dropdown-userProfile a span small,
    body.dark-mode .btn-outline-light {
        color: #fff !important;
    }

    body.dark-mode .table-condensed tbody th,
    body.dark-mode .table-condensed tbody td {
        border: 1px solid !important;
    }

    body.dark-mode .daterangepicker td.active,
    .daterangepicker td.active:hover,
    body.dark-mode .applyBtn,
    body.dark-mode .btn-primary,
    body.dark-mode .btn-outline-secondary,
    body.dark-mode .custom-tab .nav-link.active {
        background-color: #474a4e !important;
        color: #fff !important;
    }

    body.dark-mode .custom-tab .nav-link {
        background-color: #2c2c2c;
    }

    body.dark-mode .card-collpase-custom.active {
        background-color: #717171;
    }

    body.dark-mode .custom-tab .nav-link.active {
        box-shadow: 1px 4px 5px 0px rgb(226 226 226 / 75%);
    }

    body.dark-mode .custom-tab > .nav-item:not(:last-child)::after {
        background-color: #ffffff;
    }

    body.dark-mode .check-icon,
    body.dark-mode .icon-circle,
    body.dark-mode .btn-outline-link,
    body.dark-mode .side-labels {
        color: #fff;
    }

.daterangepicker td.active,
.daterangepicker td.active:hover {
    background-color: var(--primary-color);
}

/* Forms */
body.dark-mode .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--primaryLight-rgb), .30);
}

body.dark-mode .form-check-input {
    background-color: #2a4d4c;
    border-color: #888;
}

    body.dark-mode .form-check-input:checked {
        background-color: var(--primary-color);
        border-color: var(--primary-color);
    }

/* Nav & Tabs */
body.dark-mode .nav-item .nav-link {
    color: var(--black-color);
}

body.dark-mode .nav-pills .nav-link.active,
body.dark-mode .nav-pills .show > .nav-link {
    background-color: var(--primaryLight-color);
}

/* Tables */
body.dark-mode table.dataTable,
body.dark-mode table {
    background-color: var(--white);
    color: var(--black-color);
}

    body.dark-mode table.dataTable thead th,
    body.dark-mode table thead th {
        background-color: #1e1e1e !important;
        color: var(--black-color) !important;
    }

    body.dark-mode table.dataTable tbody td,
    body.dark-mode table tbody td,
    body.dark-mode .table > :not(caption) > * > * {
        border-color: #333 !important;
        background: #7e7e7e;
        color: #fff;
    }

/* DataTables Controls */
body.dark-mode .dataTables_wrapper .dataTables_filter input,
body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button {
    background-color: var(--light-gray);
    color: var(--black-color);
    border-color: #444;
}

    body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button.current {
        background-color: var(--primaryLight-color);
        color: var(--white);
    }

/* Dropdowns */
body.dark-mode .dropdown-menu {
    background-color: var(--white);
}

body.dark-mode .dropdown-item {
    color: var(--black-color);
}

    body.dark-mode .dropdown-item:hover,
    body.dark-mode .dropdown-item.active {
        background-color: #474a4e;
        color: #fff;
    }

/* Flatpickr Calendar */
body.dark-mode .flatpickr-calendar {
    background: #2c2c2c;
    color: #fff;
}

body.dark-mode .flatpickr-day {
    color: #ccc;
}

    body.dark-mode .flatpickr-day.today {
        border: 1px solid var(--primaryLight-color);
    }

    body.dark-mode .flatpickr-day.selected,
    body.dark-mode .flatpickr-day.startRange,
    body.dark-mode .flatpickr-day.endRange {
        background-color: var(--primaryLight-color);
        color: var(--white);
    }

/* Modals */
body.dark-mode .modal-content {
    background-color: var(--white);
    color: var(--black-color);
}

body.dark-mode .modal-title {
    color: var(--primaryLight-color);
}

/* Inputs, Placeholder */
body.dark-mode input,
body.dark-mode textarea {
    background-color: var(--white);
    color: var(--black-color);
    border-color: #444;
}

body.dark-mode ::placeholder {
    color: #aaa !important;
}

/* Custom Cards */
body.dark-mode .card-custom {
    box-shadow: 1px 2px 5px 0px rgba(255, 255, 255, 0.15);
    background-color: var(--white);
}

/* Custom Alerts or Badges */
body.dark-mode .alert-list span {
    background: #444;
    color: var(--black-color);
}

body.dark-mode .upload-wrapper {
    background: #292d32;
}

    body.dark-mode .upload-wrapper .upload-box {
        background-color: #b6b6b6;
    }

body.dark-mode .text-muted,
body.dark-mode .text-secondary {
    color: #fff !important;
}

/* Buttons */
.btn-primary {
    background-color: var(--primaryLight-color);
    border-color: var(--primaryLight-color);
    color: var(--white) !important;
}

    .btn-primary:hover {
        background-color: var(--primary-color);
        border-color: var(--primary-color);
    }

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary-light {
    background-color: var(--primary-10) !important;
}

.btn-outline-primary {
    background-color: var(--light-gray);
    color: var(--primary-color);
    border: 1px solid var(--primaryLight-color);
    transition: all 1s;
}

    .btn-outline-primary:hover {
        background-color: var(--primaryLight-color);
        border: 1px solid var(--primaryLight-color);
    }

.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Sidebar */
.sidebar {
    transition: all 0.3s ease-in-out;
    overflow-x: hidden;
    background-color: var(--primary-color);
    font-size: 14px;
    z-index: 99999;
}

    .sidebar.collapsed {
        width: 80px !important;
    }

        .sidebar.collapsed .dropdown-toggle::after {
            display: none;
        }

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
}

.max-100 {
    max-width: 100px;
}

.max-150 {
    max-width: 150px;
}
.max-200 {
    max-width: 200px;
}
.nav-item .nav-link {
    color: var(--white);
    font-size: 12px;
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    background-color: rgba(var(--primary-rgb), .37);
}

.nav-pills .nav-link svg {
    width: 16px;
    margin: 0 0 0 5px;
}

.nav-pills .nav-link i {
    margin: 0 0 0 5px;
    font-size: 14px;
}

.rotate-180 {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

.search-comp span {
    background-color: var(--white);
    border: 0;
}

.search-comp input {
    border: 0;
}

.dropdown-userProfile {
    margin: 0 10px;
}

    .dropdown-userProfile a span {
        color: var(--black-color);
        font-size: 12px;
    }

        .dropdown-userProfile a span small {
            font-size: 10px;
        }

.btn-notification {
    background-color: var(--primaryLight-color);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 1s;
    font-size: 14px;
    border: 1px solid #dee2e6 !important;
}

    .btn-notification:hover {
        background-color: var(--primary-color);
        color: var(--white);
    }

.card-custom {
    box-shadow: var(--shadow-primary-soft);
    -webkit-box-shadow: var(--shadow-primary-soft);
    -moz-box-shadow: var(--shadow-primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    margin: 1rem 0;
    border: 0;
    min-height: 100px;
    color: var(--primary-color);
    border-radius: 10px;
    background-image: url(../img/bg-card.png);
    background-repeat: no-repeat;
    background-position: right;
}

.box {
    background-color: var(--white);
    border: 0;
    padding: 15px;
    border-radius: 10px;
    height: 100%;
    overflow-x: auto;
}

    .box.bg-1 {
        background-color: #034A62;
    }

    .box.bg-2 {
        background-color: #2C79AC;
    }

    .box.bg-3 {
        background-color: var(--primary-color);
    }

    .box .details {
        display: flex;
        align-items: center;
        color: var(--white);
    }

        .box .details i {
            min-width: 45px;
            min-height: 45px;
            width: 45px;
            height: 45px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            margin: 0 0 0 5px;
            background-color: var(--white);
            border: 1px solid #ced4da;
            color: var(--primary-color);
        }

        .box .details span {
            font-size: 15px;
        }

    .box .tab-content .tab-pane .dropdown button {
        height: 50px;
    }

.card-custom strong {
    font-size: 18px;
}

.card-custom small {
    color: #00A806;
    margin: 0 1rem;
}

.daterange .input-group {
    border-radius: 15px;
    overflow: hidden;
    border: 0;
}

    .daterange .input-group .input-group-text {
        border: 0;
        background: var(--white);
    }

    .daterange .input-group input {
        border: 0;
    }

.filter-dropdown {
    color: var(--white);
    background-color: var(--primary-color);
    border-radius: 15px;
    border: 0;
}

    .filter-dropdown:focus {
        color: var(--black-color);
        background-color: var(--primary-color);
    }

    .filter-dropdown:hover, .filter-dropdown:active {
        background-color: var(--primary-color);
        border: 0;
    }

.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
}

#map {
    height: 750px;
    width: 100%;
}

.truck-icon {
    width: 32px;
    height: 32px;
}

.vanInfo {
    position: absolute;
    bottom: 50px;
    z-index: 999;
    left: 0;
    right: 0;
    margin: auto;
    width: 90%;
    height: initial !important;
    transition: all 0.3s ease;
}

.radial-chart {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: conic-gradient(var(--primary-color) 0% 20%, #F3F3F3 0% 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.radial-chart-inner {
    width: 60px;
    height: 60px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.value {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary-color);
}

.unit {
    font-size: 10px;
    color: #6c757d;
}

.legend-label {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #72767C;
    margin-top: 5%;
}

.cars-list {
    max-height: 750px;
    overflow-x: hidden;
    overflow-y: auto;
}

    .cars-list .card.active {
        box-shadow: var(--shadow-primary-soft);
        -webkit-box-shadow: var(--shadow-primary-soft);
        -moz-box-shadow: var(--shadow-primary-soft);
    }

    .cars-list .box label {
        font-size: 22px;
    }

        .cars-list .box label small {
            font-size: 12px;
        }

    .cars-list .box .title {
        color: #72767C;
        font-size: 16px;
    }

        .cars-list .box .title .sub-title {
            color: #6c757d;
            font-size: 12px;
        }

.route-container {
    position: relative;
    padding-left: 40px;
}

.dotted-line-full {
    position: absolute;
    top: 10px;
    bottom: 40px;
    right: 6px;
    width: 2px;
    background: repeating-linear-gradient(to bottom,#ccc 0,#ccc 4px,transparent 4px,transparent 8px);
    z-index: 0;
}

.location-item {
    padding-right: 30px;
}

.dot {
    position: absolute;
    top: 4px;
    right: -8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 10px;
    z-index: 2;
}

.dot-gray {
    background-color: #0B192C;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.dot-blue {
    background-color: #2C79AC;
    box-shadow: 0 0 10px rgba(182, 223, 223, 0.6);
}

.location {
    font-size: 18px;
}

    .location span {
        color: #666;
        font-size: 14px;
    }

.mapVanInfo-nav .nav-item .nav-link {
    border: 0;
    color: var(--black-color);
}

    .mapVanInfo-nav .nav-item .nav-link.active {
        color: #2C79AC;
        font-weight: bold;
        border-bottom: 2px solid;
    }

.tabsContent-map ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .tabsContent-map ul li {
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
    }

        .tabsContent-map ul li label {
            color: #818CA2;
            margin: 0 0 0 1rem;
            min-width: 180px;
        }

        .tabsContent-map ul li:last-child {
            border-bottom: 0;
        }

.map-full-width #carsSection {
    display: none !important;
}

.map-full-width #mapSection {
    width: 100% !important;
    flex: 0 0 100%;
    max-width: 100%;
}

.map-full-width #map {
    height: 80vh;
}

.cardAlerts-desc {
    border-radius: 5px;
    width: 150px;
    margin: 10px 0;
}

    .cardAlerts-desc strong {
        margin: 0 10px;
    }

    .cardAlerts-desc .bg-01 {
        background-color: rgba(7,95,198,.10);
        padding: 8px;
        width: 35px;
        height: 35px;
        color: #163C67;
    }

    .cardAlerts-desc .bg-02 {
        background-color: var(--primary-10);
        padding: 8px;
        width: 35px;
        height: 35px;
        color: var(--primary-color);
    }

    .cardAlerts-desc .bg-03 {
        background-color: rgba(11,25,44,.10);
        padding: 8px;
        width: 35px;
        height: 35px;
        color: #0B192C;
    }

    .cardAlerts-desc .bg-04 {
        background-color: var(--primary-10);
        padding: 8px;
        width: 35px;
        height: 35px;
        color: #2C79AC;
    }

.chart-wrapper {
    max-width: 400px;
    margin: auto;
    text-align: center;
    position: relative;
}

.center-label {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 22px;
    color: #000;
    font-weight: bold;
}

.center-subtitle {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    color: #555;
}

.side-labels {
    display: flex;
    justify-content: space-between;
    margin-top: -20px;
    font-size: 14px;
    color: #444;
    font-weight: 500;
}

    .side-labels div {
        text-align: center;
    }

    .side-labels .value {
        font-size: 18px;
        color: var(--primary-color);
        font-weight: bold;
    }

.alert-list li {
    margin-bottom: 1rem;
}

.alert-list span {
    width: 30px;
    height: 30px;
    background-color: #5169801A;
    color: var(--black-color);
    display: inline-block;
    border-radius: 5px;
    padding: 2px;
}

    .alert-list span.active {
        background: var(--primary-10);
        color: var(--primary-color);
    }

.alert-list strong {
    min-width: 80px;
}

    .alert-list strong small {
        font-size: 12px;
    }

table button.btn-dark {
    font-size: 12px;
}

/* Header row */
table thead tr {
    background-color: transparent;
}

.table > tbody {
    font-size: 12px;
}

/* Apply background + color to each header cell */
table thead th {
    background-color: var(--primary-10) !important;
    color: var(--black-color) !important;
    border: none !important;
}

    /* RTL rounded corners */
    table thead th:first-child {
        border-top-right-radius: 10px;
        border-bottom-right-radius: 10px;
    }

    table thead th:last-child {
        border-top-left-radius: 10px;
        border-bottom-left-radius: 10px;
    }

/* Remove borders in tbody */
table tbody th, table tbody td {
    border: none !important;
}

/* Prevent full border collapse */
table {
    border-collapse: separate !important;
    border-spacing: 0;
}

.leaflet-popup-content {
    width: 500px !important;
}

.leaflet-popup.custom-van-popup {
    margin-bottom: 10px;
}

.leaflet-popup-content-wrapper {
    border-radius: 10px;
    padding: 8px;
}

.view-alerts-desc small {
    color: rgb(129, 129, 129);
}

.view-alerts-desc strong {
    font-size: 12px;
    margin: 5px 0;
}

.form-check-input {
    border-color: #0B192C !important;
}

    .form-check-input:focus {
        box-shadow: 0 0 0 .25rem rgba(var(--primaryLight-rgb), .29);
    }

    .form-check-input:checked {
        background-color: var(--primary-color);
        border-color: var(--primary-color) !important;
    }

.modal-title {
    color: var(--primary-color);
    font-weight: bold;
}

.form-switch {
    padding-left: 4.5em;
    border-radius: 10px;
    padding-right: 2.5rem;
}

.list-area-management > li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.list-area-management strong small {
    font-size: 12px;
}

.area-color {
    width: 35px;
    height: 35px;
    border: 1px solid #eee;
    border-radius: 50%;
}

    .area-color.bg-01 {
        background-color: #00A806;
    }

    .area-color.bg-02 {
        background-color: #a82400;
    }

    .area-color.bg-03 {
        background-color: #001ca8;
    }

.form-control {
    text-align: right;
    height: 50px;
}

.slide-up {
    animation: slideUp 0.4s ease forwards;
}

.slide-down {
    animation: slideDown 0.4s ease forwards;
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.required {
    color: var(--primary-color);
}

.form-switch-custom {
    padding: 0 !important;
}

    .form-switch-custom .form-check-input {
        width: 4em !important;
        height: 2rem !important;
    }

.custom-tab {
    justify-content: center;
    margin-bottom: 2rem;
    border: 0;
}

    .custom-tab > .nav-item {
        position: relative;
        margin-bottom: 1rem;
    }

.h-52 {
    height: 52px;
}

.custom-tab > .nav-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -60px;
    width: 120px;
    height: 4px;
    background-color: var(--primary-color);
    transform: translateY(-50%);
    z-index: 0;
}

html[dir="rtl"] .custom-tab > .nav-item:not(:last-child)::after {
    left: -60px;
    right: auto;
}

.custom-tab .nav-link {
    border: 0;
    border-radius: 20px;
    width: 250px;
    margin: 0 3rem;
    background-color: var(--white);
    color: #ccc;
    padding: 20px;
    position: relative;
    z-index: 2;
    font-size: 14px;
}

    .custom-tab .nav-link.active {
        background-color: var(--primary-color);
        color: var(--white);
        box-shadow: 1px 4px 5px 0 rgba(var(--primaryLight-rgb), .75);
    }

.tab-line {
    position: absolute;
    top: 50%;
    left: 45%;
    width: 11%;
    height: 4px;
    background-color: rgba(var(--primaryLight-rgb), .75);
    z-index: 1;
    transform: translateY(-50%);
    border-radius: 2px;
}

.check-icon {
    font-size: 14px;
    color: var(--primaryLight-color);
    margin: 0 10px;
    width: 25px;
    height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid;
}

.icon-circle {
    padding: 10px;
    border-radius: 50%;
    color: var(--primary-color);
}

.card-collpase-custom {
    padding: 10px;
}

    .card-collpase-custom strong {
        min-width: 200px;
    }

    .card-collpase-custom.active {
        background-color: #ecf2f7;
        border-radius: 10px;
    }

.icon-circle-up {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

.upload-wrapper {
    background: #fff;
    border-radius: 1rem;
    border: 1px dashed #ced4da;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.upload-box {
    border: 2px dashed #dee2e6;
    padding: 1rem;
    border-radius: 1rem;
    background-color: #f9f9f9;
    transition: 0.3s ease;
    cursor: pointer;
}

    .upload-box:hover {
        background-color: #f1f3f5;
        border-color: var(--primary-color);
    }

    .upload-box.drag-active {
        background-color: #e7f1ff;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.1);
    }

.file-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    padding: 0.75rem;
    background-color: #fff;
    position: relative;
}

    .file-preview img {
        width: 60px;
        height: 60px;
        object-fit: cover;
        border-radius: 0.5rem;
    }

.file-meta {
    display: flex;
    width: 80%;
    justify-content: space-between;
    align-items: center;
}

.pointer {
    cursor: pointer;
}

.remove-btn {
    align-self: flex-start;
    position: absolute;
    left: -10px;
    top: -14px;
    background-color: #d5e3f1;
    color: #fff !important;
    border-radius: 50%;
    padding: .75rem;
    font-size: 14px;
}

::placeholder {
    font-size: 12px;
    color: #b1b6b1 !important;
}

.form-control:focus {
    border-color: var(--primaryLight-color);
    box-shadow: 0 0 0 .25rem rgba(var(--primary-rgb), .23);
}

.custom-checkBox {
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 5px 5px 0 10px;
    display: flex;
    align-items: center;
    height: 50px;
}

/* Datepicker */
.custom-datepicker .form-control {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 14px;
    color: #333;
    transition: all 0.2s ease-in-out;
}

.custom-datepicker .input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.custom-datepicker .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .2);
}

.custom-datepicker .input-group-text {
    border: none;
    background-color: #fff;
    color: var(--primary-color);
    font-size: 18px;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem 0 0 0.5rem;
    border: 1px solid #dee2e6;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

/* Flatpickr calendar modern theme */
.flatpickr-calendar {
    font-family: 'Segoe UI', sans-serif;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
    border: none;
}

.flatpickr-months .flatpickr-month {
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 12px 12px 0 0;
}

.flatpickr-weekday {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 13px;
}

.flatpickr-day {
    border-radius: 8px;
    transition: background 0.2s ease-in-out, color 0.2s;
}

    .flatpickr-day:hover {
        background: var(--primary-10);
        color: var(--primary-color);
    }

    .flatpickr-day.today {
        border: 1px solid var(--primary-color);
    }

    .flatpickr-day.selected,
    .flatpickr-day.startRange,
    .flatpickr-day.endRange {
        background-color: var(--primary-color);
        color: var(--white);
    }

/* DataTable Styling */
table.dataTable thead tr {
    background-color: transparent;
}

.dataTable tbody {
    font-size: 12px;
}

table.dataTable thead th {
    background-color: var(--primary-10) !important;
    color: #000 !important;
    border: none !important;
}

    table.dataTable thead th:first-child {
        border-top-right-radius: 10px;
        border-bottom-right-radius: 10px;
    }

    table.dataTable thead th:last-child {
        border-top-left-radius: 10px;
        border-bottom-left-radius: 10px;
    }

table.dataTable tbody td, table.dataTable tbody th {
    border: none !important;
}

table.dataTable {
    border-collapse: separate !important;
    border-spacing: 0;
    background-color: var(--white);
}

.dataTables_wrapper .dataTables_filter input {
    border-radius: 6px !important;
    padding: 4px 8px !important;
    border: 1px solid #ccc !important;
    margin-right: 8px !important;
}

    .dataTables_wrapper .dataTables_filter input:focus-visible {
        outline: none !important;
    }

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 4px 10px !important;
    border-radius: 6px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    margin: 0 2px;
}

.dataTables_wrapper .dataTables_paginate.paging_simple_numbers .paginate_button {
    border: 0 !important;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .dataTables_wrapper .dataTables_paginate.paging_simple_numbers .paginate_button.previous.disabled {
        background-color: inherit !important;
    }

.dataTables_wrapper .dataTables_paginate.paging_simple_numbers a.paginate_button.next,
.dataTables_wrapper .dataTables_paginate.paging_simple_numbers a.paginate_button.previous {
    background: inherit !important;
}

    .dataTables_wrapper .dataTables_paginate.paging_simple_numbers a.paginate_button.next:hover,
    .dataTables_wrapper .dataTables_paginate.paging_simple_numbers a.paginate_button.previous:hover {
        color: var(--primary-color) !important;
    }

.dataTables_wrapper .dataTables_paginate.paging_simple_numbers .paginate_button i {
    font-size: 12px;
}

.dataTables_wrapper .dataTables_paginate.paging_simple_numbers .paginate_button.current {
    background-color: var(--primaryLight-color) !important;
    color: var(--white) !important;
    border: 0 !important;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .dataTables_wrapper .dataTables_paginate.paging_simple_numbers .paginate_button.current:hover {
        color: var(--white) !important;
        background-color: var(--primary-color) !important;
    }

.dataTables_wrapper .dataTables_paginate.paging_simple_numbers .paginate_button:hover {
    color: var(--white) !important;
    background: var(--primary-color) !important;
    border: 0 !important;
    border-radius: 50% !important;
}

table.dataTable.hover > tbody > tr:hover > *,
table.dataTable.display > tbody > tr:hover > *,
table.dataTable.order-column > tbody tr > .sorting_1,
table.dataTable.order-column > tbody tr > .sorting_2,
table.dataTable.order-column > tbody tr > .sorting_3,
table.dataTable.display > tbody tr > .sorting_1,
table.dataTable.display > tbody tr > .sorting_2,
table.dataTable.display > tbody tr > .sorting_3 {
    box-shadow: none !important;
}

table.dataTable tbody tr {
    vertical-align: middle;
}

.breadcrumb-item + .breadcrumb-item {
    padding: 0;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item + .breadcrumb-item::before {
    float: right;
}

.dropdown-item.active, .dropdown-item:active {
    background-color: var(--primary-color);
}

.dropdown-item {
    cursor: pointer;
}

.align-items-inherit {
    align-items: inherit;
}

.badge.text-bg-primary {
    background-color: var(--primaryLight-color) !important;
}

/* Dark toggle */
.dark-toggle-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dark-mode-icon {
    font-size: 14px;
    color: var(--primary-color);
    border: 2px solid var(--primaryLight-color);
    border-radius: 50%;
    padding: 10px;
    transition: all 0.4s ease;
    cursor: pointer;
    background-color: var(--light-gray);
}

    .dark-mode-icon:hover {
        transform: scale(1.1);
    }

body.dark-mode .dark-mode-icon {
    transform: rotate(360deg);
    background-color: #2c2c2c;
    color: #fff;
    border-color: #fff;
}

/* Optional icons (icomoon) */
.icon-sun::before {
    content: "\e8cf";
    font-family: 'icomoon';
    font-weight: 900;
}

.icon-moon::before {
    content: "\e898";
    font-family: 'icomoon';
    font-weight: 900;
}

.see-more-btn {
    background-color: var(--primaryLight-color);
    text-decoration: none;
    color: white;
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
    transition: all 0.3s ease;
}

    .see-more-btn:hover {
        background-color: var(--primary-color);
        color: var(--light-gray);
        box-shadow: 0 6px 15px rgba(67, 56, 202, 0.3);
        transform: translateY(-2px);
    }

    .see-more-btn:active {
        transform: scale(0.98);
    }

.notification-dropdown {
    transition: all 0.3s ease-in-out;
    transform-origin: top right;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

    .notification-dropdown.show {
        max-height: 400px;
        opacity: 1;
    }

.notificationDropdown-body {
    max-height: 350px;
}

.notification-item {
    transition: background-color 0.2s ease;
}

    .notification-item:hover {
        background-color: #f8fafc;
    }

.login-container {
    height: 100%;
}logo-login.svg

.login-image {
    background: url('../img/login-img.webp') no-repeat center center;
    background-size: cover;
    animation: slideInRight 1.2s ease forwards;
    opacity: 0;
}

@keyframes fadeInBody {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(150px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.login-box {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    max-width: 400px;
    width: 100%;
    padding: 30px;
}

    .login-box .img-container img {
        max-width: 100px;
    }

.password-btn {
    position: absolute !important;
    left: 5px;
    top: 10px;
    z-index: 9 !important;
}

    .password-btn i {
        transition: transform 0.3s ease;
        display: inline-block;
    }

        .password-btn i.rotated {
            transform: rotate(180deg);
        }

.card {
    overflow: visible !important;
}

.table {
    overflow: visible !important;
}

.dropdown-menu {
    z-index: 1050 !important;
}

.validation-summary-errors {
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

    .validation-summary-errors ul {
        margin: 0;
        padding-left: 1.25rem;
    }

    .validation-summary-errors li {
        list-style: disc;
    }

#quickAddVehicleModal .form-control,
#quickAddVehicleModal .form-select {
    font-size: 0.8rem;
    height: 30px;
    min-height: 30px;
    padding: 0.2rem 0.8rem;
    line-height: 1.2;
    border-radius: 0.25rem;
}

#quickAddVehicleModal .form-label {
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

#quickAddVehicleModal .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    height: 32px;
    min-height: 32px;
    border-radius: 0.35rem;
}

#quickAddVehicleModal .modal-title {
    font-size: 0.95rem;
    font-weight: 600;
}

#quickAddVehicleModal select.form-select {
    direction: rtl;
    padding-left: 2rem;
    padding-right: 0.5rem;
    background-position: left 0.75rem center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
}

/*New styles for new dashboard page */


/* Collection Cards */
.collection-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.collection-title {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    font-weight: 500;
}

.collection-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
    justify-content: space-around;
    padding-top: 5%;
}

    .collection-stats .stat-item {
        display: flex;
    }

.stat-circle {
    position: relative;
    width: 100px;
    height: 100px;
}

.stat-circle-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
}

.stat-details {
    padding-top: 10%;
}


.stat-center-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(30%, 0%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}


html[lang="ar"] .stat-center-content {
    top: 50%;
    left: 30%;
    transform: translate(-50%, 0%);
}

.stat-percent {
    font-size: 18px;
    font-weight: 700;
    color: #212B36;
}

.stat-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.stat-percentage {
    font-size: 20px;
    font-weight: 700;
    color: #212B36;
    margin: 0;
}

.stat-sublabel {
    font-size: 11px;
    color: #999;
    margin: 0;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #212B36;
    margin-top: 5px;
}

.stat-change {
    font-size: 12px;
    color: #10B981;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.collection-table {
    width: 100%;
    border-collapse: collapse;
}

    .collection-table tr {
        border-bottom: 1px solid #F0F0F0;
    }

        .collection-table tr:last-child {
            border-bottom: none;
        }

    .collection-table td {
        padding: 12px 8px;
        font-size: 14px;
        color: #666;
    }

        .collection-table td:last-child {
            text-align: left;
            color: #212B36;
            font-weight: 500;
        }

.grand-total-row {
    background: linear-gradient(90deg, #129990 0%, #6CCCCB 100%);
    border-radius: 25px;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

    .grand-total-row span {
        color: white;
        font-weight: 600;
        font-size: 14px;
    }


.chart-container {
    background-color: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.chart-title {
    color: var(--black-color);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}


/* Custom ApexCharts tooltip styling */
.apexcharts-tooltip {
    background: #129990 !important;
    border: none !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.apexcharts-tooltip-text {
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 16px !important;
}

.apexcharts-tooltip-title {
    display: none !important;
}


/* Branch Stats */
.branch-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.branch-stat-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.branch-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.branch-name {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.branch-value {
    font-size: 18px;
    font-weight: 600;
    color: #212B36;
    margin: 0;
}


/* Progress Bars for Companies */
.company-progress-item {
    margin-bottom: 20px;
}

.company-name {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.company-percentage {
    font-weight: 600;
    color: var(--primary-color);
}

.progress {
    height: 8px;
    border-radius: 10px;
    background-color: #E8E8E8;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* Source Legend Items */
.source-legend,
.company-progress-container {
    max-height: 250px;
    overflow: auto;
    padding-left: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 8px;
    position: relative;
    padding-right: 40px;
    gap: 10px;
    transition: all 1s ease;
}

    .legend-item:hover {
        background-color: var(--primary-color) !important;
        cursor: pointer;
    }

        .legend-item:hover .legend-label,
        .legend-item:hover .legend-value {
            color: var(--white) !important;
        }

    .legend-item::before {
        content: '';
        width: 6px;
        height: 100%;
        position: absolute;
        left: 0;
        top: 0;
        border-radius: 8px 0 0 8px;
    }

    .legend-item.dark {
        background-color: #ffffff;
        box-shadow: 1px 1px 5px 0px rgba(217, 217, 217, 0.75);
        -webkit-box-shadow: 1px 1px 5px 0px rgba(217, 217, 217, 0.75);
        -moz-box-shadow: 1px 1px 5px 0px rgba(217, 217, 217, 0.75);
    }

        .legend-item.dark::before {
            background-color: #212B36;
        }

    .legend-item.yellow {
        background-color: #ffffff;
        box-shadow: 1px 1px 5px 0px rgba(217, 217, 217, 0.75);
        -webkit-box-shadow: 1px 1px 5px 0px rgba(217, 217, 217, 0.75);
        -moz-box-shadow: 1px 1px 5px 0px rgba(217, 217, 217, 0.75);
    }

        .legend-item.yellow::before {
            background-color: #FFC700;
        }

    .legend-item.orange {
        background-color: #ffffff;
        box-shadow: 1px 1px 5px 0px rgba(217, 217, 217, 0.75);
        -webkit-box-shadow: 1px 1px 5px 0px rgba(217, 217, 217, 0.75);
        -moz-box-shadow: 1px 1px 5px 0px rgba(217, 217, 217, 0.75);
    }

        .legend-item.orange::before {
            background-color: #FF8A00;
        }

    .legend-item.red {
        background-color: #ffffff;
        box-shadow: 1px 1px 5px 0px rgba(217, 217, 217, 0.75);
        -webkit-box-shadow: 1px 1px 5px 0px rgba(217, 217, 217, 0.75);
        -moz-box-shadow: 1px 1px 5px 0px rgba(217, 217, 217, 0.75);
    }

        .legend-item.red::before {
            background-color: #FF4D4D;
        }

.legend-label {
    font-size: 14px;
    color: #666;
    font-weight: 400;
    flex: 1;
}

.legend-value {
    font-size: 14px;
    font-weight: 600;
    color: #212B36;
}


/* Sidebar menu text – keep in one line with ellipsis */
.sidebar .nav-link .menu-text {
    display: inline-block;
    max-width: 180px; /* adjust based on your sidebar width */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

