/* ==========================================================================
   GLOBAL TYPOGRAPHY & SPACING
   ========================================================================== */

.custom_zoom {
    zoom: 1.1;
    font-size: 14px !important;
}

/* ==========================================================================
   CARD COMPONENT
   ========================================================================== */

.card-custom {
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid #edf2f7;
}

.card-header {
    border-bottom: 1px solid #edf2f7;
    background: #fff;
    border-radius: 1rem 1rem 0 0 !important;
}

.card-footer {
    border-top: 1px solid #edf2f7;
    background: #fafbfd;
}

/* Card label typography */
.card-label {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #1a2333 !important;
    letter-spacing: -0.01em;
}

/* ==========================================================================
   MODERN DATA TABLES
   ========================================================================== */

/* Base table */
.table-modern,
.data_table,
.bookings_listing,
.customer_listing {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

/* Header row */
.table-modern thead tr,
.data_table thead tr,
.bookings_listing thead tr,
.customer_listing thead tr {
    background: #f7f9fc;
}

.table-modern thead th,
.data_table thead th,
.bookings_listing thead th,
.customer_listing thead th {
    background: #f7f9fc !important;
    color: #5e6e82 !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    padding: 0.85rem 1rem !important;
    border-bottom: 2px solid #e8edf3 !important;
    border-top: none !important;
    white-space: nowrap;
}

/* First/last th radius */
.table-bordered thead tr th:first-child {
    border-radius: 0 !important;
}

/* Body rows */
.table-modern tbody tr,
.data_table tbody tr,
.bookings_listing tbody tr,
.customer_listing tbody tr {
    transition: background 0.12s ease;
}

.table-modern tbody tr:hover,
.data_table tbody tr:hover,
.bookings_listing tbody tr:hover,
.customer_listing tbody tr:hover {
    background: #f5f8ff !important;
}

.table-modern tbody td,
.data_table tbody td,
.bookings_listing tbody td,
.customer_listing tbody td {
    padding: 0.8rem 1rem !important;
    font-size: 0.88rem !important;
    color: #2d3748 !important;
    border-bottom: 1px solid #edf2f7 !important;
    border-top: none !important;
    vertical-align: middle !important;
}

/* Override for bordered tables used in reports */
.table-bordered, .table-bordered th, .table-bordered td {
    border: 1px solid #e8edf3;
}

/* Stripe effect (odd rows) */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: #fafbfd;
}

/* DataTables wrapper improvements */
.dataTables_wrapper {
    padding: 0 !important;
}

.dataTables_wrapper .dataTables_filter {
    margin-bottom: 0.75rem;
}

div.dataTables_wrapper div.dataTables_filter input {
    width: 280px !important;
    border-radius: 0.5rem !important;
    border: 1px solid #dde3ee !important;
    padding: 0.45rem 0.85rem !important;
    font-size: 0.875rem !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

div.dataTables_wrapper div.dataTables_filter input:focus {
    border-color: #1a73e8 !important;
    box-shadow: 0 0 0 3px rgba(26,115,232,0.12) !important;
    outline: none;
}

div.dataTables_wrapper div.dataTables_length select {
    border-radius: 0.4rem !important;
    border: 1px solid #dde3ee !important;
    padding: 0.35rem 0.6rem !important;
    font-size: 0.875rem !important;
}

.dataTables_wrapper .dataTable {
    border-radius: 0.65rem;
    overflow: hidden;
}

.dataTables_wrapper .dataTables_info {
    font-size: 0.82rem !important;
    color: #718096 !important;
    padding-top: 0.6rem !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 0.4rem !important;
    font-size: 0.82rem !important;
    padding: 0.3rem 0.65rem !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #1a73e8 !important;
    border-color: #1a73e8 !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
    background: #e8f0ff !important;
    border-color: #aac4f6 !important;
    color: #1558c0 !important;
}

/* ==========================================================================
   STATUS BADGES — used in tables & cards
   ========================================================================== */

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.65rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: capitalize;
    white-space: nowrap;
}

.badge-status--active,
.badge-active   { background: #d5f9e5; color: #1a7a44; }

.badge-status--inactive,
.badge-inactive { background: #fff0f0; color: #c0392b; }

.badge-status--booked          { background: #e0e0e0; color: #3a3a3a; }
.badge-status--parked          { background: #cce4ff; color: #0d4a8a; }
.badge-status--requested       { background: #ffd5ce; color: #8b1a0e; }
.badge-status--driver_assigned { background: #fef3b0; color: #5a4500; }
.badge-status--arrived         { background: #c2f0d8; color: #0d5c32; }
.badge-status--delivered       { background: #d6f5e3; color: #0d4d28; }

/* ==========================================================================
   ACTION BUTTONS — table rows
   ========================================================================== */

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 0.4rem;
    font-size: 0.78rem;
    transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
    margin-right: 2px;
}

.btn-action:hover {
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.btn-action--view  { background: #dce8ff; color: #1558c0; }
.btn-action--view:hover  { background: #1558c0; color: #fff; }

.btn-action--edit  { background: #fff0c0; color: #7a4800; }
.btn-action--edit:hover  { background: #c96a00; color: #fff; }

.btn-action--delete { background: #ffe4e4; color: #9b1c1c; }
.btn-action--delete:hover { background: #9b1c1c; color: #fff; }

/* ==========================================================================
   FORM CONTROLS
   ========================================================================== */

.form-control {
    border: 1px solid #dde3ee;
    border-radius: 0.5rem !important;
    padding: 0.5rem 0.85rem !important;
    font-size: 0.875rem !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    color: #2d3748;
}

.form-control:focus {
    border-color: #1a73e8 !important;
    box-shadow: 0 0 0 3px rgba(26,115,232,0.12) !important;
    outline: none;
}

.form-label {
    font-weight: 600 !important;
    font-size: 0.83rem !important;
    color: #4a5568 !important;
    margin-bottom: 0.35rem !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Validation states */
label.invalid {
    width: 100% !important;
    margin-top: 0.4rem !important;
    font-size: 0.8rem !important;
    font-weight: 400 !important;
    color: #e53e3e !important;
}

input.invalid, select.invalid, textarea.invalid, .select2-container.invalid {
    border: 1px solid #e53e3e !important;
    border-radius: 0.5rem;
    padding-right: calc(1.5em + 1.3rem);
    background-image: url('../images/invalid.svg');
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.325rem) center;
    background-size: calc(0.75em + 0.65rem) calc(0.75em + 0.65rem);
}

select.invalid, select.is-invalid {
    background-position: right 1.5rem center !important;
}

/* File input */
input[type="file"] {
    padding: 0.40rem 0.70rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.select2-container .select2-search__field {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    border: 1px solid #dde3ee !important;
    border-radius: 0.5rem !important;
    height: 40px !important;
    padding-top: 5px !important;
}

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #1a73e8 !important;
    box-shadow: 0 0 0 3px rgba(26,115,232,0.12) !important;
}

/* DataTables length select — restore native arrow, strip any custom SVG background */
div.dataTables_wrapper div.dataTables_length select,
div.dataTables_wrapper div.dataTables_length select.form-control {
    -webkit-appearance: auto !important;
    -moz-appearance: auto !important;
    appearance: auto !important;
    background-image: none !important;
    background-color: #fff !important;
    padding: 0.3rem 0.5rem !important;
    height: 34px !important;
    min-width: 60px;
    width: auto !important;
    border-radius: 0.4rem !important;
    border: 1px solid #dde3ee !important;
    font-size: 0.875rem !important;
    color: #2d3748 !important;
    cursor: pointer;
    display: inline-block !important;
}

/* Datepicker */
.datepicker-days .disabled {
    cursor: not-allowed !important;
}

.datepicker table tr td.disabled, .datepicker table tr td.disabled:hover {
    background: #ffeded !important;
}

/* ==========================================================================
   MODERN SIDEBAR — EXPANDED
   ========================================================================== */

.aside-menu .menu-nav {
    padding: 12px 0 80px 0 !important;
}

/* Expanded: items have horizontal margin so the pill doesn't touch the edges */
body:not(.aside-minimize) .aside-menu .menu-nav > .menu-item > .menu-link {
    border-radius: 0.5rem;
    margin: 1px 10px;
    transition: background 0.15s ease;
}

body:not(.aside-minimize) .aside-menu .menu-nav > .menu-item.menu-item-active > .menu-link {
    background: linear-gradient(90deg, #1a73e8, #3a8ff5) !important;
    box-shadow: 0 3px 12px rgba(26, 115, 232, 0.3);
}

body:not(.aside-minimize) .aside-menu .menu-nav > .menu-item.menu-item-active > .menu-link .menu-text {
    color: #fff !important;
    font-weight: 600;
}

body:not(.aside-minimize) .aside-menu .menu-nav > .menu-item.menu-item-active > .menu-link i {
    color: rgba(255, 255, 255, 0.85) !important;
}

body:not(.aside-minimize) .aside-menu .menu-nav > .menu-item > .menu-link:hover:not(.menu-toggle) {
    background: rgba(26, 115, 232, 0.08) !important;
}

/* Parent toggle open state (expanded only) */
body:not(.aside-minimize) .aside-menu .menu-nav > .menu-item.menu-item-submenu.menu-item-open > .menu-link {
    background: rgba(26, 115, 232, 0.1) !important;
    box-shadow: none !important;
}

body:not(.aside-minimize) .aside-menu .menu-nav > .menu-item.menu-item-submenu.menu-item-open > .menu-link .menu-text {
    color: #a8c8ff !important;
    font-weight: 600;
}

body:not(.aside-minimize) .aside-menu .menu-nav > .menu-item.menu-item-submenu.menu-item-open > .menu-link i {
    color: #a8c8ff !important;
}

/* ==========================================================================
   MODERN SIDEBAR — MINIMIZED (icon-only)
   ========================================================================== */

/* Reset our margin overrides so the theme's icon centering works correctly */
.aside-minimize .aside-menu .menu-nav > .menu-item > .menu-link {
    margin: 1px 6px !important;
    border-radius: 0.65rem !important;
    justify-content: center !important;
    padding: 0 !important;
    transition: background 0.15s ease;
}

/* Active icon pill in minimized state */
.aside-minimize .aside-menu .menu-nav > .menu-item.menu-item-active > .menu-link {
    background: linear-gradient(135deg, #1a73e8, #3a8ff5) !important;
    box-shadow: 0 3px 10px rgba(26, 115, 232, 0.35) !important;
}

/* Icon colour inside active pill */
.aside-minimize .aside-menu .menu-nav > .menu-item.menu-item-active > .menu-link i,
.aside-minimize .aside-menu .menu-nav > .menu-item.menu-item-active > .menu-link .svg-icon svg g [fill] {
    color: #fff !important;
    fill: #fff !important;
}

/* Hover in minimized state */
.aside-minimize .aside-menu .menu-nav > .menu-item > .menu-link:hover {
    background: rgba(26, 115, 232, 0.12) !important;
}

/* Ensure all icons are properly centred in minimized mode */
.aside-minimize .aside-menu .menu-nav > .menu-item > .menu-link .menu-icon {
    margin: 0 !important;
    width: 100% !important;
    justify-content: center !important;
    display: flex !important;
    align-items: center !important;
}

/* Icon sizing */
.aside-minimize .aside-menu .menu-nav > .menu-item > .menu-link i {
    font-size: 1.15rem !important;
    margin: 0 !important;
    line-height: 1;
}

/* Submenu items */
.menu-subnav .menu-item .menu-link {
    border-radius: 0.4rem !important;
    margin: 1px 10px 1px 18px !important;
    padding: 0.48rem 0.75rem !important;
    transition: background 0.12s ease;
    position: relative;
}

/* Hide the "—" dash bullet entirely; left-border accent is used instead */
.menu-subnav .menu-item .menu-link .menu-bullet,
.menu-subnav .menu-item .menu-link .menu-bullet-line,
.menu-subnav .menu-item .menu-link i.menu-bullet {
    display: none !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Soft left-border indicator for active submenu item */
.menu-subnav .menu-item.menu-item-active > .menu-link {
    background: rgba(26, 115, 232, 0.12) !important;
    border-left: 3px solid #1a73e8 !important;
    padding-left: 0.6rem !important;
}

.menu-subnav .menu-item > .menu-link:hover {
    background: rgba(26, 115, 232, 0.07) !important;
}

/* Merged: base text style + fill space left by removed bullet */
.menu-subnav .menu-item .menu-link .menu-text {
    font-size: 0.855rem !important;
    color: rgba(255, 255, 255, 0.72) !important;
    font-weight: 400;
    padding-left: 0.25rem;
}

.menu-subnav .menu-item.menu-item-active > .menu-link .menu-text {
    color: #fff !important;
    font-weight: 600;
}

/* Submenu container itself — tighter indent */
.menu-submenu .menu-subnav {
    padding: 4px 0 8px 0 !important;
}

.menu-link {
    align-items: center !important;
}

/* Sidebar brand / logo */
.brand {
    height: auto !important;
    min-height: 80px;
    padding: 1rem !important;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

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

.header-org-badge {
    display: inline-flex;
    align-items: center;
    background: #f0f4ff;
    color: #1558c0;
    border: 1px solid #c7d8fb;
    border-radius: 0.5rem;
    padding: 0.3rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
    max-width: 220px;
    overflow: hidden;
}

.header-org-badge span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-org-badge:hover {
    background: #dce8ff;
    border-color: #1558c0;
    text-decoration: none;
    color: #1558c0;
}

.topbar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a73e8, #4295f5);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.lh-1 { line-height: 1 !important; }

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

.footer-modern {
    border-top: 1px solid #edf2f7;
}

.footer-logo {
    max-height: 36px;
    max-width: 120px;
    object-fit: contain;
    opacity: 0.85;
}

.footer-company-name {
    font-size: 0.95rem;
    font-weight: 600 !important;
}

.footer-address {
    font-size: 0.78rem;
    margin-top: 2px;
}

.footer-link {
    font-size: 0.82rem;
    color: #5a6a7a;
    text-decoration: none;
    transition: color 0.15s ease;
    white-space: nowrap;
}

.footer-link:hover {
    color: #1a73e8;
    text-decoration: none;
}

/* ==========================================================================
   MODERN USER PROFILE PANEL
   ========================================================================== */

.user-panel-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a73e8, #4295f5);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 1px;
}

.user-panel-role-badge {
    display: inline-block;
    background: #f0f4ff;
    color: #1558c0;
    border-radius: 0.35rem;
    padding: 0.15rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

#kt_quick_user .navi-item .navi-link {
    border-radius: 0.5rem;
    padding: 0.6rem 0.75rem;
    transition: background 0.15s ease;
}

#kt_quick_user .navi-item .navi-link:hover {
    background: #f5f8ff;
}

#kt_quick_user .navi-arrow {
    display: flex;
    align-items: center;
}

/* ==========================================================================
   MODERN STAT CARDS
   ========================================================================== */

.stat-card {
    display: flex;
    align-items: center;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: #fff;
    min-height: 100px;
}

.stat-card-link {
    display: block;
    text-decoration: none !important;
    color: inherit;
}

.stat-card-link:focus {
    outline: none;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}

.stat-card-link:focus .stat-card,
.stat-card-link:focus-visible .stat-card {
    transform: translateY(-3px);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45), 0 8px 28px rgba(0, 0, 0, 0.14);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

.stat-card__icon {
    font-size: 1.6rem;
    width: 56px;
    height: 56px;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.30);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 1.25rem;
    /* colour inherited from .stat-card which sets color: #fff */
}

.stat-card__icon i {
    color: #fff !important;
    line-height: 1;
}

.stat-card__body {
    flex: 1;
}

.stat-card__value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
    color: #fff;
}

.stat-card__label {
    font-size: 0.825rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.88);
}

/* Stat card colour variants */
.stat-card--blue   { background: linear-gradient(135deg, #1a73e8, #4295f5); }
.stat-card--green  { background: linear-gradient(135deg, #1e8c5e, #26c87b); }
.stat-card--orange { background: linear-gradient(135deg, #e67e22, #f39c12); }
.stat-card--purple { background: linear-gradient(135deg, #7c3aed, #a366f5); }
.stat-card--teal   { background: linear-gradient(135deg, #0e9183, #14c4b0); }
.stat-card--indigo { background: linear-gradient(135deg, #3949ab, #5c6bc0); }
.stat-card--red    { background: linear-gradient(135deg, #d32f2f, #f44336); }
.stat-card--yellow { background: linear-gradient(135deg, #b8860b, #d4a017); }

/* ==========================================================================
   CONTROL PANEL — TOOLBAR
   ========================================================================== */

.control-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    background: #fff;
    border-radius: 0.85rem;
    padding: 0.85rem 1.25rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    margin-bottom: 1.25rem;
}

.control-toolbar__left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.control-toolbar__logo {
    max-height: 40px;
    max-width: 130px;
    object-fit: contain;
}

.control-onboarded-badge {
    display: inline-flex;
    align-items: center;
    background: #f0f4ff;
    border: 1px solid #c7d8fb;
    border-radius: 0.5rem;
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

.control-toolbar__search {
    flex: 1 1 260px;
    min-width: 220px;
}

.control-search-wrap {
    position: relative;
}

.control-search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 0.85rem;
    pointer-events: none;
}

.control-search-input {
    padding-left: 2.4rem !important;
    border-radius: 0.6rem !important;
    border-color: #dde3ee !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.control-search-input:focus {
    border-color: #1a73e8 !important;
    box-shadow: 0 0 0 3px rgba(26,115,232,0.12) !important;
}

.control-toolbar__actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* ==========================================================================
   CONTROL PANEL — LEGEND
   ========================================================================== */

.control-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem 1.1rem;
}

.control-legend__item {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: #5a6a7a;
    font-weight: 500;
}

.control-legend__dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 0.4rem;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.1);
}

/* ==========================================================================
   CONTROL PANEL — STATUS GROUP HEADER
   ========================================================================== */

.control-status-group__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.6rem;
    width: fit-content;
}

.control-status-group__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.control-status-group__count {
    background: rgba(0,0,0,0.12);
    border-radius: 20px;
    padding: 0 0.45rem;
    font-size: 0.72rem;
}

/* Per-status group header colours */
.status-header--booked          { background: #e0e0e0; color: #2a2a2a; }
.status-header--booked          .control-status-group__dot { background: #8e9899; }

.status-header--parked          { background: #cce4ff; color: #0d4a8a; }
.status-header--parked          .control-status-group__dot { background: #6aaee8; }

.status-header--requested       { background: #ffd5ce; color: #7a1208; }
.status-header--requested       .control-status-group__dot { background: #c0392b; }

.status-header--driver_assigned { background: #fef0b0; color: #4a3500; }
.status-header--driver_assigned .control-status-group__dot { background: #c8a000; }

.status-header--arrived         { background: #c2f0d8; color: #0d5c32; }
.status-header--arrived         .control-status-group__dot { background: #16a85a; }

/* ==========================================================================
   CONTROL PANEL — TICKET CARDS
   ========================================================================== */

.control-tickets-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding-bottom: 0.5rem;
}

.control-ticket {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 96px;
    min-height: 88px;
    border-radius: 0.75rem;
    padding: 0.6rem 0.4rem;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 2px solid transparent;
}

.control-ticket:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.13);
    text-decoration: none !important;
}

/* Per-status ticket colours */
.status-ticket--booked          { background: #e8e9ea; border-color: #c8cacc; }
.status-ticket--parked          { background: #dceeff; border-color: #b3d4f7; }
.status-ticket--requested       { background: #ffe0db; border-color: #fbb3a8; }
.status-ticket--driver_assigned { background: #fefbd8; border-color: #f0e87a; }
.status-ticket--arrived         { background: #d5f9e5; border-color: #82edac; }

.control-ticket__number {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1a2333;
    line-height: 1.1;
    text-align: center;
}

.control-ticket__duration {
    font-size: 0.7rem;
    color: #5a6a7a;
    margin-top: 0.3rem;
    text-align: center;
}

.control-ticket__unpaid {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #b91c1c;
    color: #fff;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(185,28,28,0.4);
}

.control-ticket__duplicate-badge {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    background: #b91c1c;
    color: #fff;
    font-size: 0.58rem;
    font-weight: 700;
    border-radius: 3px;
    padding: 1px 5px;
    letter-spacing: 0.5px;
}

.control-ticket--duplicate {
    border-color: #e53e3e !important;
    box-shadow: 0 0 0 2px rgba(229,62,62,0.25);
}

/* Empty state */
.control-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    width: 100%;
}

/* ==========================================================================
   CONTROL PANEL — MODAL
   ========================================================================== */

.control-modal-content {
    border-radius: 1rem;
    overflow: hidden;
    border: none;
}

.control-modal-header {
    background: linear-gradient(135deg, #1a2333, #2d3f5c);
    padding: 1rem 1.5rem;
    border-bottom: none;
}

.control-modal-ticket-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.22);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    border-radius: 0.5rem;
    padding: 0.4rem 1rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.control-modal-close {
    color: rgba(255,255,255,0.7) !important;
    opacity: 1 !important;
    transition: color 0.15s ease;
}

.control-modal-close:hover {
    color: #fff !important;
}

/* ==========================================================================
   CONTROL PANEL — DETAIL LAYOUT
   ========================================================================== */

.control-detail-wrap {
    display: flex;
    gap: 0;
    min-height: 400px;
}

.control-detail-actions {
    width: 340px;
    flex-shrink: 0;
    padding: 1.5rem;
    border-right: 1px solid #edf2f7;
    background: #fafbfd;
}

.control-detail-info {
    flex: 1;
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    max-height: 75vh;
}

/* Info cards inside detail */
.control-info-card {
    border: 1px solid #e8ecf1;
    border-radius: 0.65rem;
    overflow: hidden;
}

.control-info-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    background: #f7f9fc;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    color: #2d3748;
    -webkit-user-select: none;
    user-select: none;
    transition: background 0.15s ease;
}

.control-info-card__header:hover {
    background: #edf2f7;
}

.control-info-card__arrow {
    font-size: 0.7rem;
    color: #a0aec0;
    transition: transform 0.2s ease;
}

.control-info-card__header[aria-expanded="true"] .control-info-card__arrow {
    transform: rotate(180deg);
}

.control-info-card__body {
    padding: 0.25rem 0;
}

.control-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #f0f4f8;
    font-size: 0.84rem;
}

.control-info-row:last-child {
    border-bottom: none;
}

.control-info-row__label {
    color: #718096;
    font-weight: 500;
    flex-shrink: 0;
    margin-right: 1rem;
}

.control-info-row__value {
    color: #2d3748;
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

/* Status pill inside detail */
.control-status-pill {
    display: inline-block;
    border-radius: 20px;
    padding: 0.2rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: capitalize;
}

.control-status-pill--booked          { background: #e0e0e0; color: #2a2a2a; }
.control-status-pill--parked          { background: #cce4ff; color: #0d4a8a; }
.control-status-pill--requested       { background: #ffd5ce; color: #7a1208; }
.control-status-pill--driver_assigned { background: #fef0b0; color: #4a3500; }
.control-status-pill--arrived         { background: #c2f0d8; color: #0d5c32; }
.control-status-pill--delivered       { background: #d6f5e3; color: #0a4a26; }

/* ==========================================================================
   STATUS COLOR SWATCHES (Control Panel blocks)
   ========================================================================== */

.status_booked          { color: transparent; background-color: #b2babb; }
.status_parked          { color: transparent; background-color: #c9dbf8; }
.status_requested       { color: transparent; background-color: #fb3e18; }
.status_driver_assigned { color: transparent; background-color: #f4fb18; }
.status_arrived         { color: transparent; background-color: #18fb58; }

/* ==========================================================================
   MISC / UTILITY
   ========================================================================== */

.hidden { display: none; }

.not-allowed { cursor: not-allowed; }

.arabic_text {
    letter-spacing: 2px;
    font-family: 'Amiri', sans-serif;
}

.product_listing td {
    vertical-align: middle !important;
}

/* FullCalendar overrides */
.fc-unthemed .fc-event.fc-start .fc-content:before,
.fc-unthemed .fc-event-dot.fc-start .fc-content:before {
    display: none;
}

.fc-unthemed .fc-event .fc-content,
.fc-unthemed .fc-event-dot .fc-content {
    padding: 0.25rem 0.5rem;
}

.fc-unthemed .fc-event .fc-title,
.fc-unthemed .fc-event-dot .fc-title {
    font-weight: 500;
    font-size: 12px;
}

/* Aside minimize */
.aside-minimize .brand .brand-logo span {
    display: none;
}

/* Swal */
.swal2-container .swal2-html-container {
    max-height: 350px;
}

/* Layout */
.header-fixed.subheader-fixed.subheader-enabled .wrapper {
    padding-top: 100px;
}

/* Logo positioning */
.logo {
    position: absolute;
    left: 25px;
    top: 25px;
    z-index: 9;
}

/* Booking detail list */
.booking_detail_html .list-group-item span {
    font-weight: 500 !important;
}

/* Individual inventory small rows */
.individual_inventory_html td {
    padding: 0.25rem 0.75rem !important;
    vertical-align: middle !important;
}

.individual_inventory_html .form-control {
    height: 30px;
    margin: 2px 0;
}

/* Driver dashboard */
.driver_dashboard_row .action {
    display: flex;
    flex-direction: column;
    justify-content: center;
    vertical-align: top;
    text-align: center;
    background: white;
    border-radius: 50%;
    width: 140px;
    height: 140px;
    margin: 10px;
    padding: 10px;
    font-size: 16px;
}

/* Cashier dashboard */
.cashier_dashboard_row .blocks {
    display: flex;
    flex-flow: row wrap;
    justify-content: left;
}

.cashier_dashboard_row .block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    vertical-align: top;
    text-align: center;
    color: black;
    width: 90px;
    height: 90px;
    margin: 5px;
    padding: 5px;
    font-size: 14px;
    position: relative;
}

.cashier_dashboard_row .ticket_warning {
    position: absolute;
    top: -5px;
    right: -5px;
}

/* Page title breadcrumb / subheader */
.subheader-separator {
    display: inline-block;
    width: 1px;
    height: 16px;
    background: #dde3ee;
    margin: 0 0.6rem;
    vertical-align: middle;
}

/* ==========================================================================
   PRINT
   ========================================================================== */

@media print {
    .hide_print {
        display: none !important;
    }
}

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

@media (max-width: 768px) {
    .logo {
        display: block !important;
    }

    div.dataTables_wrapper div.dataTables_length,
    div.dataTables_wrapper div.dataTables_filter,
    div.dataTables_wrapper div.dataTables_info,
    div.dataTables_paginate {
        text-align: left !important;
        margin-top: 0.5rem !important;
    }

    .pagination {
        justify-content: flex-start !important;
    }

    .control-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .control-toolbar__actions {
        justify-content: flex-start;
    }

    .control-detail-wrap {
        flex-direction: column;
    }

    .control-detail-actions {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #edf2f7;
    }

    .control-detail-info {
        max-height: none;
    }

    .control-ticket {
        width: 82px;
        min-height: 76px;
    }

    .stat-card__value {
        font-size: 1.6rem;
    }

    .card-label {
        font-size: 0.95rem !important;
    }
}

/* ==========================================================================
   CUSTOMER CAR CARDS — check-in form
   ========================================================================== */

.car-card {
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    border-color: #e2e8f0 !important;
    background-color: #fff;
}

.car-card:hover {
    border-color: #1a73e8 !important;
    background-color: #f0f7ff;
}

.car-card--selected {
    border-color: #1a73e8 !important;
    background-color: #e8f0fe;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.25);
}

.car-card--new {
    border-color: #cbd5e0 !important;
    background-color: #fafafa;
}

.car-card--new:hover {
    border-color: #1a73e8 !important;
    background-color: #f0f7ff;
}
