:root {
    --sidebar-bg: #17162f;
    --sidebar-hover: #29264b;
    --primary: #6c57dc;
    --primary-dark: #5744c1;
    --body-bg: #f5f6fb;
    --text-dark: #25243e;
    --text-muted: #8a8b9d;
    --border: #ececf2;
    --white: #ffffff;
    --success: #27a763;
    --warning: #e99b3e;
    --danger: #d9534f;
    --info: #438ce2;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--body-bg);
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

a {
    text-decoration: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

/* ==========================
   SIDEBAR
========================== */

.sidebar {
    width: 255px;
    height: 100vh;
    background: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: transform .3s ease;
}

.sidebar-brand {
    height: 78px;
    min-height: 78px;
    display: flex;
    align-items: center;
    padding: 0 25px;
    gap: 12px;
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.sidebar-brand:hover {
    color: #fff;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.sidebar-menu {
    padding: 22px 14px 15px;
    flex: 1;
}

.menu-heading {
    color: #77758f;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    padding: 0 13px;
    margin: 21px 0 10px;
    text-transform: uppercase;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 13px;
    margin-bottom: 5px;
    color: #aaa8c0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: .2s;
}

.menu-link i {
    font-size: 17px;
}

.menu-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.menu-link.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 5px 15px rgba(108, 87, 220, .25);
}

.logout-link:hover {
    background: rgba(217, 83, 79, .15);
    color: #ff9995;
}

.sidebar-bottom {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, .07);
}

.sidebar-version {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #aaa8c0;
}

.version-dot {
    width: 7px;
    height: 7px;
    background: #36c77a;
    border-radius: 50%;
}

.version-number {
    margin-left: auto;
    color: #77758f;
}

/* ==========================
   MAIN CONTENT
========================== */

.main-content {
    margin-left: 255px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    padding: 30px;
    flex: 1;
}

/* ==========================
   TOPBAR
========================== */

.topbar {
    height: 78px;
    min-height: 78px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 900;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
}

.topbar-left {
    gap: 15px;
}

.page-title {
    font-size: 19px;
    font-weight: 700;
    margin: 0;
}

.breadcrumb-text {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.topbar-right {
    gap: 20px;
}

.topbar-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 12px;
}

.topbar-divider {
    width: 1px;
    height: 35px;
    background: var(--border);
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--text-dark);
}

.admin-profile:hover {
    color: var(--primary);
}

.admin-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #eeeaff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
}

.admin-details strong {
    display: block;
    font-size: 12px;
}

.admin-details span {
    font-size: 11px;
    color: var(--text-muted);
}

.profile-chevron {
    color: var(--text-muted);
    font-size: 11px;
}

.mobile-toggle {
    display: none;
    border: none;
    background: none;
    font-size: 23px;
    color: var(--text-dark);
}

/* ==========================
   FOOTER
========================== */

.admin-footer {
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 11px;
    border-top: 1px solid var(--border);
    background: #fff;
}

.footer-version {
    color: var(--primary);
    font-weight: 700;
    margin-left: 5px;
}

/* ==========================
   GENERAL PANELS
========================== */

.panel,
.content-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    height: 100%;
}

.panel-header,
.content-card-header {
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.panel-header h5,
.content-card-header h5 {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
}

.panel-body,
.content-card-body {
    padding: 22px;
}

/* ==========================
   BUTTONS
========================== */

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

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

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

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

/* ==========================
   TABLES
========================== */

.table {
    margin: 0;
    white-space: nowrap;
}

.table th {
    background: #fafafe;
    color: #88899b;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 16px;
    font-size: 12px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f1f5;
}

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

.table tbody tr:hover {
    background: #fafaff;
}

/* ==========================
   STATUS BADGES
========================== */

.custom-badge,
.badge {
    display: inline-block;
    padding: 6px 9px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
}

.badge-pending,
.badge-warning {
    background: #fff3df;
    color: #d28b24;
}

.badge-approved,
.badge-delivered,
.badge-success {
    background: #e4f7eb;
    color: #23985a;
}

.badge-in_transit,
.badge-confirmed,
.badge-primary {
    background: #e6efff;
    color: #427cce;
}

.badge-processing,
.badge-partially_paid,
.badge-info {
    background: #f0edff;
    color: #725bd1;
}

.badge-rejected,
.badge-cancelled,
.badge-failed_delivery,
.badge-danger {
    background: #ffe8e8;
    color: #d24c4c;
}

.badge-out_for_delivery {
    background: #fff1df;
    color: #d28b24;
}

.badge-secondary {
    background: #eeeef2;
    color: #6b6b7a;
}

/* ==========================
   FORMS
========================== */

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: #41415a;
    margin-bottom: 8px;
}

.form-control,
.form-select {
    min-height: 44px;
    border: 1px solid #e4e5ed;
    border-radius: 8px;
    padding: 10px 13px;
    font-size: 13px;
}

textarea.form-control {
    min-height: 100px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 87, 220, .12);
}

/* ==========================
   EMPTY STATES
========================== */

.empty-state {
    text-align: center;
    padding: 35px 15px;
    color: #9999a9;
    font-size: 12px;
}

.empty-state i {
    display: block;
    font-size: 30px;
    margin-bottom: 10px;
    color: #c3c3d0;
}

/* ==========================
   SIDEBAR OVERLAY
========================== */

.sidebar-overlay {
    display: none;
}



/* ==========================================
   SHIPMENT MANAGEMENT
========================================== */

.shipments-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.shipments-heading h2 {
    font-size: 23px;
    font-weight: 750;
    margin-bottom: 6px;
}

.shipments-heading p,
.shipments-panel-subtitle {
    color: var(--text-muted);
    font-size: 12px;
    margin: 0;
}

.create-shipment-button {
    border-radius: 8px;
    padding: 11px 16px;
    font-size: 12px;
    font-weight: 650;
}

.shipment-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 19px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 11px;
    min-height: 100px;
}

.shipment-stat-icon {
    width: 43px;
    height: 43px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    font-size: 19px;
}

.icon-purple {
    background: #f0edff;
    color: #6c57dc;
}

.icon-orange {
    background: #fff3e5;
    color: #e99b3e;
}

.icon-blue {
    background: #eaf2ff;
    color: #438ce2;
}

.icon-green {
    background: #e6f7ed;
    color: #27a763;
}

.shipment-stat-label {
    color: var(--text-muted);
    font-size: 11px;
    margin-bottom: 5px;
}

.shipment-stat-value {
    font-size: 22px;
    font-weight: 750;
    color: var(--text-dark);
}

.shipments-panel {
    overflow: hidden;
    height: auto;
}

.shipments-panel-header {
    padding: 20px 22px;
}

.shipments-panel-header h5 {
    margin-bottom: 5px;
}

.shipments-total-label {
    color: var(--text-muted);
    font-size: 11px;
}

.shipments-filter-area {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.shipments-filter-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.shipment-search {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.shipment-search i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #9999aa;
}

.shipment-search input {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px 9px 38px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    font-size: 12px;
}

.shipment-filter-select {
    min-width: 175px;
}

.shipment-filter-select .form-select {
    min-height: 42px;
    font-size: 12px;
}

.shipment-filter-button,
.shipment-reset-button {
    min-height: 42px;
    font-size: 12px;
    border-radius: 8px;
}

.shipments-table {
    min-width: 900px;
}

.shipment-tracking-number {
    color: var(--primary);
    font-size: 12px;
    font-weight: 750;
}

.shipment-record-id,
.shipment-person-contact,
.shipment-amount-due {
    color: var(--text-muted);
    font-size: 10px;
    margin-top: 5px;
}

.shipment-person-name {
    color: var(--text-dark);
    font-weight: 650;
    font-size: 12px;
}

.shipment-amount {
    font-size: 12px;
    font-weight: 750;
}

.shipments-pagination {
    padding: 17px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border);
}

.pagination-information {
    color: var(--text-muted);
    font-size: 11px;
}

.pagination-information strong {
    color: var(--text-dark);
}

.shipments-pagination .page-link {
    color: var(--primary);
    border-color: var(--border);
    font-size: 12px;
}

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

.shipment-modal-content,
.create-shipment-modal {
    border: 0;
    border-radius: 13px;
    overflow: hidden;
}

.shipment-modal-content .modal-header,
.create-shipment-modal .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.shipment-modal-content .modal-title,
.create-shipment-modal .modal-title {
    color: var(--text-dark);
    font-size: 17px;
    font-weight: 750;
}

.modal-shipment-number {
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    margin-top: 5px;
}

.shipment-modal-content .modal-body {
    padding: 24px;
}

.shipment-detail-section {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.shipment-detail-section:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.shipment-detail-section h6 {
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 750;
    margin-bottom: 17px;
}

.shipment-detail-section h6 i {
    color: var(--primary);
}

.shipment-detail-section label {
    display: block;
    color: var(--text-muted);
    font-size: 10px;
    margin-bottom: 5px;
}

.shipment-detail-section p {
    color: var(--text-dark);
    font-size: 12px;
    font-weight: 550;
    margin: 0;
    overflow-wrap: anywhere;
}

.shipment-modal-content .modal-footer {
    padding: 15px 24px;
    border-top: 1px solid var(--border);
}

/* Create shipment modal */

.create-shipment-modal .modal-body {
    padding: 24px;
}

.create-form-section {
    padding-bottom: 23px;
    margin-bottom: 23px;
    border-bottom: 1px solid var(--border);
}

.create-form-section h6 {
    font-size: 13px;
    font-weight: 750;
    color: var(--text-dark);
    margin-bottom: 18px;
}

.create-form-section h6 i {
    color: var(--primary);
}

.create-form-section .form-label {
    font-size: 11px;
}

.create-form-section .form-control,
.create-form-section .form-select {
    font-size: 12px;
}

.create-form-section textarea.form-control {
    min-height: 75px;
}

.pricing-information {
    padding: 12px 14px;
    border-radius: 8px;
    background: #f4f2ff;
    color: #655a9c;
    font-size: 11px;
    line-height: 1.6;
}

.shipment-initial-status {
    padding: 13px;
    border-radius: 8px;
    background: #fafafe;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    color: #66667a;
    font-size: 11px;
}

.create-shipment-modal .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

.create-shipment-modal .modal-footer .btn {
    font-size: 12px;
    border-radius: 8px;
    padding: 10px 17px;
}

@media (max-width: 767px) {
    .shipments-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .shipments-filter-form {
        align-items: stretch;
        flex-direction: column;
    }

    .shipment-search,
    .shipment-filter-select {
        width: 100%;
    }

    .shipments-pagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .create-shipment-modal .modal-body {
        padding: 17px;
    }

    .shipment-initial-status {
        align-items: flex-start;
    }
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.page-eyebrow {
    display: block;
    color: #7968d8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    margin-bottom: 7px;
}

.page-heading h1 {
    font-size: 25px;
    font-weight: 750;
    color: #202039;
    margin: 0 0 6px;
}

.page-heading p {
    color: #85859a;
    margin: 0;
    font-size: 13px;
}

.shipment-form-card {
    padding: 24px;
    margin-bottom: 22px;
}

.shipment-form-card .panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 22px;
}

.shipment-form-card .panel-header h5,
.shipment-summary-card h5 {
    color: #202039;
    font-size: 16px;
    font-weight: 750;
    margin: 0 0 5px;
}

.shipment-form-card .panel-header p {
    color: #9292a4;
    font-size: 12px;
    margin: 0;
}

.form-section-icon {
    width: 39px;
    height: 39px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #f0edff;
    color: #6c57dc;
    font-size: 17px;
}

.shipment-form-card .form-label,
.shipment-summary-card .form-label {
    color: #48485d;
    font-size: 12px;
    font-weight: 650;
    margin-bottom: 7px;
}

.shipment-form-card .form-control,
.shipment-form-card .form-select,
.shipment-summary-card .form-control {
    min-height: 43px;
    border: 1px solid #e8e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #35354b;
    box-shadow: none;
}

.shipment-form-card textarea.form-control {
    min-height: auto;
}

.shipment-form-card .form-control:focus,
.shipment-form-card .form-select:focus,
.shipment-summary-card .form-control:focus {
    border-color: #8b7be5;
    box-shadow: 0 0 0 3px rgba(108, 87, 220, 0.09);
}

.shipment-form-card small {
    display: block;
    margin-top: 6px;
    font-size: 11px;
}

.shipment-summary-card {
    position: sticky;
    top: 95px;
    padding: 24px;
}

.shipment-summary-card>p {
    font-size: 12px;
    margin-top: 7px;
    margin-bottom: 22px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #66667a;
    font-size: 12px;
}

.summary-line .badge {
    font-size: 10px;
    font-weight: 700;
    padding: 7px 9px;
}

.summary-note {
    padding: 12px;
    border-radius: 8px;
    background: #f6f4ff;
    color: #6b6295;
    font-size: 11px;
    line-height: 1.7;
}

.shipment-summary-card .btn-primary {
    background: #6c57dc;
    border-color: #6c57dc;
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    font-weight: 650;
}

.shipment-summary-card .btn-primary:hover {
    background: #5944c4;
    border-color: #5944c4;
}

.shipment-summary-card .btn-light {
    border-radius: 8px;
    padding: 11px;
    font-size: 13px;
}

@media (max-width: 767px) {
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .shipment-form-card,
    .shipment-summary-card {
        padding: 18px;
    }

    .shipment-summary-card {
        position: static;
    }
}


/* =====================================
   COURIER REQUESTS PAGE
===================================== */

.requests-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.requests-heading h2 {
    font-size: 21px;
    font-weight: 800;
    margin-bottom: 7px;
    color: var(--text-dark);
}

.requests-heading p {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
}

.requests-heading-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #eeeaff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}


/* =====================================
   REQUEST STATISTICS
===================================== */

.request-stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 19px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: .2s;
}

.request-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(30, 30, 60, .05);
}

.request-stat-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.request-stat-icon.icon-purple {
    background: #eeeaff;
    color: #715ce0;
}

.request-stat-icon.icon-orange {
    background: #fff1df;
    color: #e99b3e;
}

.request-stat-icon.icon-green {
    background: #e5f8ed;
    color: #27a763;
}

.request-stat-icon.icon-red {
    background: #ffe8e8;
    color: #d9534f;
}

.request-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.request-stat-value {
    font-size: 23px;
    font-weight: 800;
    color: var(--text-dark);
}


/* =====================================
   REQUEST PANEL
===================================== */

.requests-panel {
    overflow: hidden;
}

.requests-panel-header {
    flex-wrap: wrap;
}

.requests-panel-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin: 6px 0 0;
}

.requests-total-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    background: #f0edff;
    padding: 8px 12px;
    border-radius: 6px;
}


/* =====================================
   SEARCH AND FILTERS
===================================== */

.requests-filter-area {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.requests-filter-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.request-search {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.request-search i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #9999a9;
    font-size: 14px;
}

.request-search input {
    width: 100%;
    height: 42px;
    border: 1px solid #e4e5ed;
    border-radius: 8px;
    padding: 10px 12px 10px 38px;
    font-size: 12px;
    outline: none;
}

.request-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 87, 220, .1);
}

.request-status-filter {
    width: 190px;
}

.request-status-filter .form-select {
    height: 42px;
    min-height: 42px;
    font-size: 12px;
}

.filter-button,
.reset-button {
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}


/* =====================================
   REQUEST TABLE
===================================== */

.requests-table th {
    padding: 15px 16px;
}

.requests-table td {
    padding: 16px;
}

.request-number {
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.request-id {
    color: #9999a9;
    font-size: 10px;
    margin-top: 5px;
}

.request-person-name {
    color: #44445a;
    font-size: 12px;
    font-weight: 600;
}

.request-person-contact {
    color: #9999a9;
    font-size: 10px;
    margin-top: 5px;
}

.pickup-method {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 600;
    padding: 7px 9px;
    border-radius: 6px;
    white-space: nowrap;
}

.pickup-home {
    background: #eeeaff;
    color: #715ce0;
}

.pickup-office {
    background: #e6f1ff;
    color: #438ce2;
}

.view-request-button {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}


/* =====================================
   REQUEST MODAL
===================================== */

.request-modal-content {
    border: none;
    border-radius: 13px;
    overflow: hidden;
}

.request-modal-content .modal-header {
    padding: 22px 25px;
    border-bottom: 1px solid var(--border);
}

.request-modal-content .modal-title {
    font-size: 16px;
    font-weight: 800;
}

.modal-request-number {
    font-size: 11px;
    color: var(--primary);
    font-weight: 700;
    margin-top: 5px;
}

.request-modal-content .modal-body {
    padding: 25px;
}

.request-detail-section {
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--border);
}

.request-detail-section h6,
.request-review-form h6 {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 18px;
    color: var(--text-dark);
}

.request-detail-section h6 i {
    color: var(--primary);
}

.request-detail-section label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.request-detail-section p {
    font-size: 12px;
    font-weight: 600;
    color: #45455b;
    margin: 0;
    overflow-wrap: anywhere;
}

.request-detail-section .request-description {
    font-weight: 400;
    line-height: 1.7;
}

.request-review-form {
    background: #faf9ff;
    border: 1px solid #e9e5ff;
    border-radius: 10px;
    padding: 20px;
}

.request-review-form textarea {
    background: #fff;
}

.request-review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.request-review-actions .btn {
    font-size: 12px;
    font-weight: 600;
}


/* =====================================
   PAGINATION
===================================== */

.requests-pagination {
    padding: 18px 22px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.pagination-information {
    font-size: 11px;
    color: var(--text-muted);
}

.pagination-information strong {
    color: var(--text-dark);
}

.requests-pagination .page-link {
    border: 1px solid var(--border);
    color: #66667b;
    font-size: 11px;
    padding: 8px 11px;
}

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

.requests-pagination .page-item.disabled .page-link {
    color: #c5c5ce;
}


/* =====================================
   RESPONSIVE REQUESTS PAGE
===================================== */

@media(max-width: 767px) {

    .requests-heading {
        margin-bottom: 20px;
    }

    .requests-heading h2 {
        font-size: 19px;
    }

    .requests-filter-form {
        flex-wrap: wrap;
    }

    .request-search {
        flex: 1 1 100%;
    }

    .request-status-filter {
        flex: 1;
        width: auto;
        min-width: 150px;
    }

    .requests-filter-area {
        padding: 15px;
    }

    .requests-pagination {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    .request-modal-content .modal-body {
        padding: 18px;
    }

    .request-review-actions {
        flex-direction: column;
    }

    .request-review-actions .btn {
        width: 100%;
    }
}

/* =====================================
   SHIPMENT MANAGEMENT
===================================== */

.shipments-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 25px;
}

.shipments-heading h2 {
    font-size: 21px;
    font-weight: 800;
    margin-bottom: 7px;
}

.shipments-heading p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.create-shipment-button {
    padding: 11px 17px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}


/* =====================================
   STATISTICS CARDS
===================================== */

.shipment-stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 19px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: .2s;
}

.shipment-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(30, 30, 60, .05);
}

.shipment-stat-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.shipment-stat-icon.icon-purple {
    background: #eeeaff;
    color: #715ce0;
}

.shipment-stat-icon.icon-orange {
    background: #fff1df;
    color: #e99b3e;
}

.shipment-stat-icon.icon-blue {
    background: #e5f1ff;
    color: #438ce2;
}

.shipment-stat-icon.icon-green {
    background: #e5f8ed;
    color: #27a763;
}

.shipment-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.shipment-stat-value {
    font-size: 23px;
    font-weight: 800;
    color: var(--text-dark);
}


/* =====================================
   SHIPMENT PANEL
===================================== */

.shipments-panel {
    overflow: hidden;
}

.shipments-panel-header {
    flex-wrap: wrap;
}

.shipments-panel-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin: 6px 0 0;
}

.shipments-total-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    background: #f0edff;
    padding: 8px 12px;
    border-radius: 6px;
}


/* =====================================
   SEARCH AND FILTERS
===================================== */

.shipments-filter-area {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.shipments-filter-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shipment-search {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.shipment-search i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #9999a9;
}

.shipment-search input {
    width: 100%;
    height: 42px;
    border: 1px solid #e4e5ed;
    border-radius: 8px;
    padding: 10px 12px 10px 38px;
    font-size: 12px;
    outline: none;
}

.shipment-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 87, 220, .1);
}

.shipment-filter-select {
    width: 185px;
}

.shipment-filter-select .form-select {
    height: 42px;
    min-height: 42px;
    font-size: 12px;
}

.shipment-filter-button,
.shipment-reset-button {
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}


/* =====================================
   SHIPMENT TABLE
===================================== */

.shipments-table th {
    padding: 15px 16px;
}

.shipments-table td {
    padding: 16px;
}

.shipment-tracking-number {
    font-size: 12px;
    color: var(--primary);
    font-weight: 700;
}

.shipment-record-id {
    color: #9999a9;
    font-size: 10px;
    margin-top: 5px;
}

.shipment-person-name {
    color: #44445a;
    font-size: 12px;
    font-weight: 600;
}

.shipment-person-contact {
    color: #9999a9;
    font-size: 10px;
    margin-top: 5px;
}

.shipment-amount {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dark);
}

.shipment-amount-due {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 5px;
}


/* =====================================
   SHIPMENT DETAIL MODAL
===================================== */

.shipment-modal-content {
    border: none;
    border-radius: 13px;
    overflow: hidden;
}

.shipment-modal-content .modal-header {
    padding: 22px 25px;
    border-bottom: 1px solid var(--border);
}

.shipment-modal-content .modal-title {
    font-size: 16px;
    font-weight: 800;
}

.modal-shipment-number {
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    margin-top: 5px;
}

.shipment-modal-content .modal-body {
    padding: 25px;
}

.shipment-detail-section {
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--border);
}

.shipment-detail-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.shipment-detail-section h6 {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 18px;
    color: var(--text-dark);
}

.shipment-detail-section h6 i {
    color: var(--primary);
}

.shipment-detail-section label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.shipment-detail-section p {
    font-size: 12px;
    font-weight: 600;
    color: #45455b;
    margin: 0;
    overflow-wrap: anywhere;
    line-height: 1.7;
}

.shipment-modal-content .modal-footer {
    border-top: 1px solid var(--border);
    padding: 16px 25px;
}

.shipment-modal-content .modal-footer .btn {
    font-size: 12px;
    font-weight: 600;
}


/* =====================================
   PAGINATION
===================================== */

.shipments-pagination {
    padding: 18px 22px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.shipments-pagination .page-link {
    border: 1px solid var(--border);
    color: #66667b;
    font-size: 11px;
    padding: 8px 11px;
}

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


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

@media(max-width: 1100px) {

    .shipments-filter-form {
        flex-wrap: wrap;
    }

    .shipment-search {
        flex: 1 1 100%;
    }

    .shipment-filter-select {
        flex: 1;
        width: auto;
        min-width: 150px;
    }

}

@media(max-width: 767px) {

    .shipments-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .shipments-heading h2 {
        font-size: 19px;
    }

    .create-shipment-button {
        width: 100%;
        justify-content: center;
    }

    .shipments-filter-area {
        padding: 15px;
    }

    .shipments-pagination {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    .shipment-modal-content .modal-body {
        padding: 18px;
    }

}

@media(max-width: 480px) {

    .shipment-stat-card {
        padding: 14px;
        gap: 10px;
    }

    .shipment-stat-icon {
        width: 38px;
        height: 38px;
        min-width: 38px;
        font-size: 17px;
    }

    .shipment-stat-value {
        font-size: 20px;
    }

}


/* ==========================================
   CREATE SHIPMENT MODAL - SCROLL FIX
========================================== */

#createShipmentModal {
    overflow-x: hidden;
    overflow-y: auto;
}

#createShipmentModal .modal-dialog {
    width: calc(100% - 30px);
    max-width: 1100px;
    height: calc(100vh - 30px);
    margin: 15px auto;
}

#createShipmentModal .modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
    border-radius: 13px;
}

#createShipmentModal form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

#createShipmentModal .modal-header {
    flex: 0 0 auto;
    background: #fff;
    z-index: 2;
}

#createShipmentModal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto !important;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 24px;
}

#createShipmentModal .modal-footer {
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 15px 24px;
}

#createShipmentModal .create-form-section {
    flex-shrink: 0;
}

@media (max-width: 767px) {
    #createShipmentModal .modal-dialog {
        width: 100%;
        height: 100%;
        max-width: 100%;
        margin: 0;
    }

    #createShipmentModal .modal-content {
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    #createShipmentModal .modal-body {
        padding: 17px;
    }

    #createShipmentModal .modal-footer {
        padding: 12px;
    }

    #createShipmentModal .modal-footer .btn {
        flex: 1;
    }
}



/* ==========================================
   SERVICES MANAGEMENT
   Uses the same design system as Shipments
========================================== */

/* Page heading */

.services-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.services-heading h2 {
    font-size: 23px;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.services-heading p {
    color: var(--text-muted);
    font-size: 12px;
    margin: 0;
}

/* Services table */

.services-table {
    min-width: 850px;
}

.service-name {
    color: var(--text-dark);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 5px;
}

.service-description {
    color: var(--text-muted);
    font-size: 10px;
    max-width: 280px;
    white-space: normal;
    line-height: 1.5;
}

.service-price {
    color: var(--text-dark);
    font-size: 12px;
    font-weight: 750;
}

/* Action buttons */

.service-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 7px;
    flex-wrap: nowrap;
}

.service-actions .btn {
    font-size: 11px;
    font-weight: 600;
    border-radius: 7px;
    white-space: nowrap;
}

/* Add and edit service modals */

.service-modal-content {
    border: none;
    border-radius: 13px;
    overflow: hidden;
}

.service-modal-content .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.service-modal-content .modal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
}

.service-modal-content .modal-header small {
    display: block;
    color: var(--text-muted);
    margin-top: 5px;
    font-size: 11px;
}

.service-modal-content .modal-body {
    padding: 24px;
}

.service-modal-content .form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 7px;
}

.service-modal-content .form-control,
.service-modal-content .form-select {
    min-height: 43px;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 12px;
    color: var(--text-dark);
}

.service-modal-content textarea.form-control {
    min-height: 90px;
    resize: vertical;
}

.service-modal-content .form-control:focus,
.service-modal-content .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 87, 220, .12);
}

.service-modal-content .modal-footer {
    padding: 15px 24px;
    border-top: 1px solid var(--border);
}

.service-modal-content .modal-footer .btn {
    min-height: 39px;
    font-size: 12px;
    border-radius: 7px;
}

/* Responsive layout */

@media (max-width: 767px) {

    .services-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .services-heading .btn {
        width: 100%;
    }

    .service-actions {
        justify-content: flex-start;
    }

    .service-modal-content .modal-body {
        padding: 18px;
    }

    .service-modal-content .modal-header,
    .service-modal-content .modal-footer {
        padding: 15px 18px;
    }

}



/* ==========================================
   PRICING RATES MANAGEMENT
   Matches the Shipments Management design
========================================== */

/* Pricing table */

.pricing-service-name {
    color: var(--text-dark);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.pricing-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 7px;
    flex-wrap: nowrap;
}

.pricing-actions .btn {
    font-size: 11px;
    font-weight: 600;
    border-radius: 7px;
    white-space: nowrap;
}

/* Pricing modal */

.pricing-modal-content {
    border: none;
    border-radius: 13px;
    overflow: hidden;
}

.pricing-modal-content .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.pricing-modal-content .modal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
}

.pricing-modal-content .modal-header small {
    display: block;
    color: var(--text-muted);
    margin-top: 5px;
    font-size: 11px;
}

.pricing-modal-content .modal-body {
    padding: 24px;
}

.pricing-modal-content .form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 7px;
}

.pricing-modal-content .form-control,
.pricing-modal-content .form-select {
    min-height: 43px;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 12px;
    color: var(--text-dark);
}

.pricing-modal-content .form-control:focus,
.pricing-modal-content .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 87, 220, .12);
}

.pricing-modal-content .form-text {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 5px;
}

.pricing-modal-content .modal-footer {
    padding: 15px 24px;
    border-top: 1px solid var(--border);
}

.pricing-modal-content .modal-footer .btn {
    min-height: 39px;
    font-size: 12px;
    border-radius: 7px;
}

/* Form section headings */

.pricing-form-section-title {
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dark);
    padding-bottom: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.pricing-form-section-title i {
    color: var(--primary);
    font-size: 15px;
}

/* Responsive layout */

@media (max-width: 767px) {

    .pricing-actions {
        justify-content: flex-start;
    }

    .pricing-modal-content .modal-header {
        padding: 16px 18px;
    }

    .pricing-modal-content .modal-body {
        padding: 18px;
    }

    .pricing-modal-content .modal-footer {
        padding: 12px 18px;
    }

}


/* =========================================
   SHARED ADMIN MODAL STYLING
========================================= */

/* Modal backdrop */
.modal-backdrop.show {
    opacity: 0.55;
    backdrop-filter: blur(3px);
}

/* Modal positioning */
.modal-dialog {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* Modal width */
.modal-dialog.modal-lg {
    max-width: 850px;
}

.modal-dialog.modal-xl {
    max-width: 950px;
}

/* Modal container */
.modal-content {
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 18px 55px rgba(23, 22, 47, 0.16);
}

/* Modal header */
.modal-header {
    padding: 22px 26px;
    background: #ffffff;
    border-bottom: 1px solid #edf0f5;
}

.modal-header .modal-title {
    color: #20213d;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.modal-header .btn-close {
    opacity: 0.55;
    transition: all 0.2s ease;
}

.modal-header .btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

/* Modal body */
.modal-body {
    padding: 26px;
    color: #45465f;
    font-size: 14px;
}

/* Detail labels */
.modal-body .detail-label,
.modal-body .form-label {
    display: block;
    margin-bottom: 6px;
    color: #77798b;
    font-size: 13px;
    font-weight: 500;
}

/* Detail values */
.modal-body .detail-value {
    color: #242541;
    font-size: 15px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* Improve default modal grid spacing */
.modal-body .row {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.25rem;
}

/* Form fields inside modals */
.modal-body .form-control,
.modal-body .form-select {
    min-height: 43px;
    border: 1px solid #e2e5ed;
    border-radius: 8px;
    padding: 10px 13px;
    color: #292a45;
    font-size: 14px;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-body textarea.form-control {
    min-height: 110px;
}

.modal-body .form-control:focus,
.modal-body .form-select:focus {
    border-color: #6c57dc;
    box-shadow: 0 0 0 3px rgba(108, 87, 220, 0.10);
}

/* Modal footer */
.modal-footer {
    padding: 16px 26px;
    background: #fafbfe;
    border-top: 1px solid #edf0f5;
    gap: 10px;
}

/* Modal buttons */
.modal-footer .btn {
    min-height: 40px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.modal-footer .btn-primary {
    background: #6c57dc;
    border-color: #6c57dc;
}

.modal-footer .btn-primary:hover {
    background: #5744c1;
    border-color: #5744c1;
    transform: translateY(-1px);
}

.modal-footer .btn-secondary {
    background: #eef0f5;
    border-color: #eef0f5;
    color: #45465f;
}

.modal-footer .btn-secondary:hover {
    background: #e2e5ed;
    border-color: #e2e5ed;
    color: #292a45;
}

/* Modal separators */
.modal-body hr {
    border-color: #e9ebf1;
    opacity: 1;
    margin: 20px 0;
}

/* Responsive modal styling */
@media (max-width: 767px) {

    .modal-dialog,
    .modal-dialog.modal-lg,
    .modal-dialog.modal-xl {
        margin: 12px;
        max-width: none;
    }

    .modal-header {
        padding: 18px;
    }

    .modal-body {
        padding: 18px;
    }

    .modal-footer {
        padding: 14px 18px;
    }

    .modal-header .modal-title {
        font-size: 17px;
    }

    .modal-body .row {
        --bs-gutter-y: 1rem;
    }
}



/* ==========================================
   REPORTS PAGE - LAYOUT AND COMPONENT FIX
========================================== */

.reports-page {
    width: 100%;
    padding-bottom: 35px;
    color: var(--text-dark);
}

.reports-page * {
    box-sizing: border-box;
}

.reports-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.reports-heading h2 {
    font-size: 23px;
    font-weight: 800;
    margin: 5px 0 7px;
    color: var(--text-dark);
}

.reports-heading p {
    color: var(--text-muted);
    font-size: 12px;
    margin: 0;
}

.reports-eyebrow,
.reports-chart-kicker {
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #7968d8;
}

.reports-heading .btn {
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
}

/* FILTER CARD */

.reports-filter-card,
.reports-chart-card,
.reports-table-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(30, 30, 60, .035);
}

.reports-filter-card {
    padding: 21px;
    margin-bottom: 20px;
}

.reports-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.reports-section-heading h5,
.reports-chart-header h5,
.reports-table-header h5 {
    font-size: 14px;
    font-weight: 750;
    color: var(--text-dark);
    margin: 0 0 6px;
}

.reports-section-heading p,
.reports-chart-header p,
.reports-table-header p {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
}

.reports-section-heading>i {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #f0edff;
    color: var(--primary);
    font-size: 17px;
}

.reports-filter-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr auto;
    gap: 13px;
    align-items: end;
}

.reports-filter-form>div {
    min-width: 0;
}

.reports-filter-form label {
    display: block;
    font-size: 11px;
    font-weight: 650;
    color: #48485d;
    margin-bottom: 7px;
}

.reports-filter-form .form-control,
.reports-filter-form .form-select {
    width: 100%;
    height: 43px;
    min-height: 43px;
    border: 1px solid #e5e5ee;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 12px;
    color: #45455b;
    background-color: #fff;
    box-shadow: none;
}

.reports-filter-form .form-control:focus,
.reports-filter-form .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 87, 220, .1);
}

.reports-filter-actions {
    display: flex;
    gap: 7px;
}

.reports-filter-actions .btn {
    height: 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}

/* KPI CARDS */

.reports-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.reports-kpi-card {
    --kpi-color: #7058dc;
    --kpi-tint: #f0edff;

    position: relative;
    overflow: hidden;
    min-width: 0;
    min-height: 125px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 11px;
    box-shadow: 0 3px 12px rgba(30, 30, 60, .03);
}

.reports-kpi-card::after {
    content: "";
    position: absolute;
    width: 85px;
    height: 85px;
    right: -28px;
    bottom: -38px;
    border-radius: 50%;
    background: var(--kpi-tint);
    opacity: .7;
}

.reports-kpi-card.kpi-revenue {
    --kpi-color: #7058dc;
    --kpi-tint: #f0edff;
}

.reports-kpi-card.kpi-income {
    --kpi-color: #27a763;
    --kpi-tint: #e5f8ed;
}

.reports-kpi-card.kpi-outstanding {
    --kpi-color: #e99b3e;
    --kpi-tint: #fff3e5;
}

.reports-kpi-card.kpi-shipments {
    --kpi-color: #438ce2;
    --kpi-tint: #eaf2ff;
}

.reports-kpi-card.kpi-delivered {
    --kpi-color: #27a763;
    --kpi-tint: #e5f8ed;
}

.reports-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 13px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
}

.reports-kpi-card .kpi-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 9px;
    background: var(--kpi-tint);
    color: var(--kpi-color);
    font-size: 16px;
}

.reports-kpi-card>strong {
    display: block;
    position: relative;
    z-index: 1;
    color: var(--text-dark);
    font-size: clamp(17px, 1.4vw, 22px);
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reports-kpi-card>small {
    display: block;
    position: relative;
    z-index: 1;
    color: var(--text-muted);
    font-size: 10px;
    margin-top: 7px;
}

/* CHART LAYOUT */

.reports-chart-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.reports-chart-card {
    min-width: 0;
    padding: 21px;
}

.reports-chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.reports-chart-header h5 {
    margin-top: 6px;
}

.reports-chart-header p {
    line-height: 1.6;
}

.reports-chart-symbol {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f0edff;
    color: var(--primary);
    font-size: 17px;
}

.reports-chart-canvas {
    width: 100%;
    height: 290px;
    position: relative;
}

.reports-chart-canvas canvas {
    max-width: 100%;
}

.reports-chart-empty {
    padding: 25px 10px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}

/* PERFORMANCE BARS */

.reports-performance-list {
    padding-top: 5px;
}

.performance-item {
    margin-bottom: 23px;
}

.performance-item-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 9px;
    color: #55556b;
    font-size: 12px;
}

.performance-item-heading strong {
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 750;
}

.performance-track {
    width: 100%;
    height: 9px;
    background: #f0f0f5;
    border-radius: 20px;
    overflow: hidden;
}

.performance-fill {
    display: block;
    height: 100%;
    min-width: 0;
    border-radius: 20px;
    transition: width .3s ease;
}

.performance-fill.fill-green {
    background: #27a763;
}

.performance-fill.fill-orange {
    background: #e99b3e;
}

.performance-fill.fill-red {
    background: #d9534f;
}

.reports-performance-note {
    padding: 12px;
    margin-top: 5px;
    border-radius: 8px;
    background: #f8f7ff;
    color: #77758f;
    font-size: 10px;
    line-height: 1.6;
}

/* LOWER REPORTS SECTION */

.reports-bottom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.reports-status-list {
    padding-top: 5px;
}

.reports-status-row {
    margin-bottom: 17px;
}

.reports-status-row>div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    color: #626278;
    font-size: 11px;
}

.reports-status-row strong {
    color: var(--text-dark);
    font-weight: 750;
}

.reports-status-track {
    width: 100%;
    height: 7px;
    overflow: hidden;
    border-radius: 20px;
    background: #f0f0f5;
}

.reports-status-track span {
    display: block;
    height: 100%;
    border-radius: 20px;
    background: var(--primary);
}

/* COLLECTION SUMMARY */

.collection-total {
    padding: 10px 0 18px;
    color: var(--success);
    font-size: 25px;
    font-weight: 800;
}

.collection-total small {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
}

.collection-track {
    height: 10px;
    overflow: hidden;
    margin-bottom: 19px;
    border-radius: 20px;
    background: #f0f0f5;
}

.collection-track span {
    display: block;
    height: 100%;
    border-radius: 20px;
    background: #27a763;
}

.collection-legend {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 13px;
    color: #66667b;
    font-size: 11px;
}

.collection-legend strong {
    color: var(--text-dark);
    font-size: 11px;
}

.legend-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: 7px;
}

.collected-dot {
    background: #27a763;
}

.due-dot {
    background: #e99b3e;
}

/* RECENT SHIPMENT TABLE */

.reports-table-card {
    overflow: hidden;
}

.reports-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
}

.reports-table-header h5 {
    margin-top: 5px;
}

.reports-table-header .btn {
    border-radius: 7px;
    font-size: 11px;
    font-weight: 600;
}

.reports-data-table {
    min-width: 850px;
    margin: 0;
}

.reports-data-table thead th {
    padding: 14px 16px;
    background: #fafafe;
    border-bottom: 1px solid var(--border);
    color: #88899b;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.reports-data-table tbody td {
    padding: 15px 16px;
    border-bottom: 1px solid #f1f1f5;
    color: #55556b;
    font-size: 11px;
    vertical-align: middle;
}

.reports-data-table tbody tr:last-child td {
    border-bottom: 0;
}

.reports-data-table tbody tr:hover {
    background: #fafaff;
}

.reports-data-table td strong {
    color: var(--text-dark);
    font-size: 11px;
    font-weight: 750;
}

.report-person {
    display: block;
    color: #45455d;
    font-weight: 600;
}

.report-subperson {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 10px;
}

/* RESPONSIVE */

@media (max-width: 1200px) {
    .reports-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .reports-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .reports-filter-actions {
        grid-column: span 2;
    }
}

@media (max-width: 900px) {

    .reports-chart-grid,
    .reports-bottom-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .reports-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .reports-heading .btn {
        width: 100%;
        justify-content: center;
    }

    .reports-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .reports-filter-form {
        grid-template-columns: 1fr;
    }

    .reports-filter-actions {
        grid-column: auto;
    }

    .reports-filter-actions .btn {
        flex: 1;
    }

    .reports-chart-card,
    .reports-filter-card {
        padding: 16px;
    }

    .reports-chart-canvas {
        height: 250px;
    }

    .reports-table-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .reports-table-header .btn {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .reports-kpi-card {
        padding: 13px;
    }

    .reports-kpi-card>strong {
        font-size: 16px;
    }

    .reports-kpi-top {
        font-size: 10px;
    }
}




/* =========================================================
   SETTINGS AND PROFILE PAGES
   Additions for admin/settings.php and admin/profile.php
========================================================= */
.admin-page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 24px;
}

.admin-page-heading h2 {
    margin: 0 0 7px;
    color: var(--text-primary, #202033);
    font-size: 1.35rem;
    font-weight: 700;
}

.admin-page-heading p {
    margin: 0;
    color: var(--text-muted, #77778b);
    font-size: .92rem;
}

.admin-page-heading-icon,
.settings-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    color: #6258d8;
    background: #f0efff;
    font-size: 1.25rem;
}

.settings-card {
    margin-bottom: 22px;
    padding: 25px;
    border: 1px solid var(--border-color, #e9e9f0);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(25, 25, 55, .035);
}

.settings-card-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.settings-card-heading h5 {
    margin: 0 0 5px;
    color: var(--text-primary, #202033);
    font-size: 1rem;
    font-weight: 700;
}

.settings-card-heading p {
    margin: 0;
    color: var(--text-muted, #77778b);
    font-size: .84rem;
}

.settings-save-row,
.profile-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0 24px;
}

.settings-save-row>span {
    color: var(--text-muted, #77778b);
    font-size: .84rem;
}

.profile-layout {
    display: grid;
    grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
    align-items: start;
    gap: 22px;
}

.profile-summary-card {
    padding: 28px 22px;
    border: 1px solid var(--border-color, #e9e9f0);
    border-radius: 16px;
    background: #fff;
    text-align: center;
    box-shadow: 0 5px 20px rgba(25, 25, 55, .035);
}

.profile-avatar-large {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    margin: 0 auto 16px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #6258d8, #8b83f0);
    font-size: 2rem;
    font-weight: 700;
}

.profile-summary-card h4 {
    margin: 0 0 5px;
    color: var(--text-primary, #202033);
    font-size: 1.08rem;
    font-weight: 700;
}

.profile-summary-card>p {
    margin: 0 0 14px;
    color: var(--text-muted, #77778b);
    font-size: .85rem;
    overflow-wrap: anywhere;
}

.profile-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 11px;
    border-radius: 30px;
    font-size: .76rem;
    font-weight: 600;
}

.profile-status span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.profile-status.is-active {
    color: #16834a;
    background: #eaf8f0;
}

.profile-status.is-inactive {
    color: #b54747;
    background: #fff0f0;
}

.profile-summary-meta {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color, #eeeef3);
    text-align: left;
}

.profile-summary-meta>div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 9px 0;
}

.profile-summary-meta span {
    color: var(--text-muted, #77778b);
    font-size: .75rem;
}

.profile-summary-meta strong {
    color: var(--text-primary, #202033);
    font-size: .84rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.profile-forms {
    min-width: 0;
}

.profile-form-actions {
    justify-content: flex-end;
    padding: 22px 0 0;
}

@media (max-width: 991px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }

    .profile-summary-card {
        max-width: none;
    }
}

@media (max-width: 575px) {
    .admin-page-heading {
        align-items: flex-start;
    }

    .settings-card {
        padding: 18px;
    }

    .settings-card-heading {
        align-items: flex-start;
    }

    .settings-save-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .settings-save-row .btn {
        width: 100%;
    }
}



/* Admin profile picture upload */
.profile-avatar-large {
    width: 112px;
    height: 112px;
    margin: 0 auto 18px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar-large img,
.profile-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-photo-upload-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-avatar-preview {
    width: 82px;
    height: 82px;
    flex: 0 0 82px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f2f8;
    color: #77758f;
    font-size: 30px;
}

@media (max-width: 575.98px) {
    .profile-photo-upload-row {
        align-items: flex-start;
        flex-direction: column;
    }
}




/* TomTom live location map */
.live-location-map-panel {
    width: 100%;
    overflow: hidden;
}

.live-location-map {
    display: block;
    position: relative;
    width: 100%;
    height: 480px;
    min-height: 480px;
    background: #eef1f5;
    overflow: hidden;
}

.live-location-map .maplibregl-map {
    width: 100%;
    height: 100%;
}

.live-location-map canvas {
    display: block;
}

.live-map-status-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 20px;
}

.live-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    padding: 12px 20px;
}

.live-map-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.live-map-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.live-map-dot.smartphone {
    background: #198754;
}

.live-map-dot.gps-device {
    background: #0d6efd;
}

@media (max-width: 767px) {
    .live-location-map {
        height: 350px;
        min-height: 350px;
    }
}




/* Shipment package image previews */
.shipment-image-preview,
.shipment-image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.shipment-image-preview-item,
.shipment-image-item img {
    width: 120px;
    height: 105px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.shipment-image-item {
    display: block;
    overflow: hidden;
    border-radius: 10px;
}

.shipment-image-item img {
    display: block;
    transition: transform 0.2s ease;
}

.shipment-image-item:hover img {
    transform: scale(1.05);
}

.shipment-package-gallery {
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

.shipment-package-gallery>label {
    font-weight: 600;
    color: #343a40;
}


.shipment-image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.shipment-image-preview-card {
    position: relative;
    width: 110px;
    height: 110px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
}

.shipment-image-preview-item {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.shipment-image-preview-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 25px;
    height: 25px;
    border: none;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    font-size: 20px;
    line-height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}