/*
 * AirValencia admin theme layer.
 *
 * Loaded after Metronic's style.bundle.css (see KT_THEME_ASSETS.global.css in
 * config/settings.php). Rules here override Metronic CSS variables first and only
 * then style shared components (.av-*). Page-level <style> blocks should not be
 * needed; add a token or a component here instead.
 *
 * Palette is derived from the AirValencia logo (#0080c0 / #00a0e0).
 */

/* ------------------------------------------------------------------ tokens */
:root,
[data-bs-theme=light] {
    --av-brand: #0b6fb8;
    --av-brand-rgb: 11, 111, 184;
    --av-brand-active: #095c99;
    --av-brand-light: #e8f2fb;
    /* Booking table header strip; the same in dark mode (white text keeps ~5:1 contrast). */
    --av-table-head-bg: #0b6fb8;
    --av-accent: #00a3e0;
    --av-accent-rgb: 0, 163, 224;
    --av-ink: #0f1b2d;
    --av-muted: #6b7a90;
    --av-surface: #ffffff;
    --av-surface-2: #f8fafc;
    --av-app-bg: #f3f5f9;
    --av-line: #e8ecf2;
    --av-radius: 0.75rem;
    --av-radius-sm: 0.5rem;
    --av-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
    --av-shadow-lg: 0 8px 24px rgba(16, 24, 40, 0.08);
    --av-sidebar-bg: #0f1b2d;
    --av-sidebar-line: rgba(255, 255, 255, 0.06);
    --av-sidebar-text: #c4ccd8;
    --av-sidebar-muted: #66758c;
    --av-sidebar-icon: #8896aa;
    --av-sidebar-hover: rgba(255, 255, 255, 0.05);
    --av-sidebar-active: rgba(0, 163, 224, 0.16);

    --bs-primary: var(--av-brand);
    --bs-primary-rgb: var(--av-brand-rgb);
    --bs-primary-active: var(--av-brand-active);
    --bs-primary-light: var(--av-brand-light);
    --bs-primary-inverse: #ffffff;
    --bs-text-primary: var(--av-brand);
    --bs-primary-bg-subtle: var(--av-brand-light);
    --bs-primary-border-subtle: #b9d7f0;
    --bs-primary-text-emphasis: #08497a;
    --bs-link-color: var(--av-brand);
    --bs-link-color-rgb: var(--av-brand-rgb);
    --bs-link-hover-color: var(--av-brand-active);
    --bs-link-hover-color-rgb: 9, 92, 153;
    --bs-heading-color: var(--av-ink);
    --bs-border-color: var(--av-line);
    --bs-app-bg-color: var(--av-app-bg);
    --bs-app-header-base-bg-color: var(--av-surface);
    --bs-app-header-minimize-bg-color: var(--av-surface);
    --bs-app-toolbar-base-bg-color: transparent;
    --bs-app-toolbar-base-box-shadow: none;
    --bs-app-toolbar-base-border-top: 0;
    --bs-card-box-shadow: var(--av-shadow);
    --bs-menu-link-color-active: var(--av-brand);
    --bs-menu-link-color-here: var(--av-brand);
    --bs-menu-link-color-hover: var(--av-brand);
    --bs-menu-link-color-show: var(--av-brand);
}

[data-bs-theme=dark] {
    --av-brand: #3b9be0;
    --av-brand-rgb: 59, 155, 224;
    --av-brand-active: #5aaeea;
    --av-brand-light: #13283d;
    --av-ink: #f1f4f8;
    --av-muted: #8b98ab;
    --av-surface: #151b24;
    --av-surface-2: #1a212c;
    --av-app-bg: #0e131a;
    --av-line: #252e3b;
    --av-shadow: none;
    --av-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
    --av-sidebar-bg: #0b1119;

    --bs-primary: var(--av-brand);
    --bs-primary-rgb: var(--av-brand-rgb);
    --bs-primary-active: var(--av-brand-active);
    --bs-primary-light: var(--av-brand-light);
    --bs-text-primary: var(--av-brand);
    --bs-link-color: var(--av-brand);
    --bs-link-color-rgb: var(--av-brand-rgb);
    --bs-link-hover-color: var(--av-brand-active);
    --bs-border-color: var(--av-line);
    --bs-app-bg-color: var(--av-app-bg);
    --bs-app-header-base-bg-color: var(--av-surface);
    --bs-app-header-minimize-bg-color: var(--av-surface);
    --bs-app-toolbar-base-bg-color: transparent;
    --bs-app-toolbar-base-border-top: 0;
    --bs-body-bg: var(--av-surface);
    --bs-card-box-shadow: none;
    --bs-menu-link-color-active: var(--av-brand);
    --bs-menu-link-bg-color-active: var(--av-brand-light);
    --bs-menu-link-bg-color-hover: var(--av-surface-2);
}

/* -------------------------------------------------------------------- base */
body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: inherit;
    letter-spacing: -0.01em;
}

/* -------------------------------------------------------------------- shell */
.app-header {
    border-bottom: 1px solid var(--av-line);
    box-shadow: none !important; /* Metronic's sticky header adds a shadow inline on scroll */
}

[data-kt-app-layout=dark-sidebar] .app-sidebar {
    background-color: var(--av-sidebar-bg);
}

[data-kt-app-layout=dark-sidebar] .app-sidebar .app-sidebar-logo {
    border-bottom: 1px solid var(--av-sidebar-line);
}

[data-kt-app-layout=dark-sidebar] .app-sidebar .menu > .menu-item .menu-heading {
    color: var(--av-sidebar-muted) !important;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}

[data-kt-app-layout=dark-sidebar] .app-sidebar .menu .menu-item .menu-link {
    border-radius: var(--av-radius-sm);
    margin: 1px 0;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

[data-kt-app-layout=dark-sidebar] .app-sidebar .menu > .menu-item .menu-link,
[data-kt-app-layout=dark-sidebar] .app-sidebar .menu > .menu-item .menu-link .menu-title {
    color: var(--av-sidebar-text);
    font-weight: 500;
}

[data-kt-app-layout=dark-sidebar] .app-sidebar .menu > .menu-item .menu-link .menu-icon,
[data-kt-app-layout=dark-sidebar] .app-sidebar .menu > .menu-item .menu-link .menu-icon i {
    color: var(--av-sidebar-icon);
}

[data-kt-app-layout=dark-sidebar] .app-sidebar .menu > .menu-item .menu-sub .menu-item .menu-link .menu-title {
    color: #9aa6b8;
    font-weight: 500;
}

[data-kt-app-layout=dark-sidebar] .app-sidebar .menu .menu-item .menu-link:hover:not(.active) {
    background-color: var(--av-sidebar-hover);
}

[data-kt-app-layout=dark-sidebar] .app-sidebar .menu .menu-item .menu-link:hover:not(.active) .menu-title,
[data-kt-app-layout=dark-sidebar] .app-sidebar .menu .menu-item .menu-link:hover:not(.active) .menu-icon i {
    color: #ffffff !important;
}

[data-kt-app-layout=dark-sidebar] .app-sidebar .menu > .menu-item .menu-link.active,
[data-kt-app-layout=dark-sidebar] .app-sidebar .menu > .menu-item .menu-sub .menu-item .menu-link.active {
    background-color: var(--av-sidebar-active);
    box-shadow: inset 3px 0 0 var(--av-accent);
}

[data-kt-app-layout=dark-sidebar] .app-sidebar .menu > .menu-item .menu-link.active .menu-title,
[data-kt-app-layout=dark-sidebar] .app-sidebar .menu > .menu-item .menu-sub .menu-item .menu-link.active .menu-title,
[data-kt-app-layout=dark-sidebar] .app-sidebar .menu > .menu-item .menu-link.active .menu-icon i {
    color: #ffffff !important;
}

[data-kt-app-layout=dark-sidebar] .app-sidebar .menu > .menu-item.here > .menu-link .menu-title,
[data-kt-app-layout=dark-sidebar] .app-sidebar .menu > .menu-item.show > .menu-link .menu-title {
    color: #ffffff;
}

[data-kt-app-layout=dark-sidebar] .app-sidebar .menu > .menu-item.here > .menu-link .menu-icon i,
[data-kt-app-layout=dark-sidebar] .app-sidebar .menu > .menu-item.show > .menu-link .menu-icon i {
    color: var(--av-accent);
}

.app-sidebar-toggle {
    background-color: var(--av-surface) !important;
    border: 1px solid var(--av-line) !important;
    box-shadow: var(--av-shadow) !important;
}

.app-footer {
    border-top: 1px solid var(--av-line);
}

.av-balance-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: var(--av-brand-light);
    color: var(--av-ink);
    font-size: 0.85rem;
    white-space: nowrap;
}

.av-balance-pill .ki-duotone {
    color: var(--av-brand);
}

/* Colour logo on the dark sidebar when the brand has no white variant. */
.av-logo-chip {
    padding: 4px 8px;
    border-radius: var(--av-radius-sm);
    background: #fff;
    height: 36px !important;
}

[data-kt-app-layout=dark-sidebar] .app-sidebar .app-sidebar-logo img.app-sidebar-logo-default {
    max-width: 160px;
    object-fit: contain;
}

/* ----------------------------------------------------------------- toolbar */
.app-toolbar .page-heading {
    color: var(--av-ink) !important;
    font-size: 1.35rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.015em;
}

.app-toolbar .breadcrumb {
    font-size: 0.85rem;
}

.app-toolbar .breadcrumb .breadcrumb-item,
.app-toolbar .breadcrumb .breadcrumb-item a {
    color: var(--av-muted);
    font-style: normal;
}

.app-toolbar .breadcrumb .breadcrumb-item.active,
.app-toolbar .breadcrumb .breadcrumb-item:last-child {
    color: var(--av-ink);
}

/* ------------------------------------------------------------------- cards */
.card {
    border-radius: var(--av-radius);
    border: 1px solid var(--av-line);
}

.card > .card-header {
    min-height: 64px;
    border-bottom-color: var(--av-line);
}

/* Standard list/section card header (replaces per-view p-5/p-6/pt-6 variants). */
.card > .card-header.av-card-header {
    flex-wrap: wrap;
    gap: 0.75rem;
    min-height: 70px;
    padding: 1rem 1.75rem;
    border-bottom: 1px solid var(--av-line);
}

.card > .card-header .card-title,
.card > .card-header .card-title h2,
.card > .card-header .card-title h3 {
    color: var(--av-ink);
    font-size: 1.05rem;
    font-weight: 600;
}

/* ------------------------------------------------------------------ tables */
/* Out-ranks Metronic's `.table:not(.table-bordered) th { ...: inherit }`. */
.card .table > thead > tr > th,
.modal .table > thead > tr > th {
    color: var(--av-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Invoice previews print white headers on the brand colour. */
.card .invoice-box .table > thead > tr > th,
.modal .invoice-box .table > thead > tr > th,
.card .invoice-container .table > thead > tr > th,
.card .invoice-container table th {
    color: #fff;
}

.table.table-row-dashed > tbody > tr,
.table.table-row-bordered > tbody > tr {
    border-bottom-color: var(--av-line);
}

.table-hover > tbody > tr:hover > * {
    --bs-table-bg-state: var(--av-surface-2);
}

/*
 * DataTables are configured in ~100 app/DataTables classes with every mix of
 * fs-6..fs-9, gy-2..gy-8, bordered and striped. Normalise them here so all lists
 * read the same; the selectors out-rank Metronic's !important font utilities.
 */
.card table.dataTable {
    font-size: 0.875rem !important;
    color: var(--bs-gray-800);
}

.card table.dataTable > thead > tr > th {
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--av-line) !important;
    background-color: var(--av-surface-2);
    font-size: 0.72rem !important;
}

.card table.dataTable > tbody > tr > td {
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
    vertical-align: middle;
}

.card table.dataTable > tbody > tr {
    border-bottom: 1px solid var(--av-line) !important;
}

.card table.dataTable.table-bordered > :not(caption) > * > * {
    border-color: var(--av-line);
}

.card table.dataTable > tbody > tr:hover > td {
    --bs-table-bg-state: var(--av-surface-2);
}

.card table.dataTable > thead > tr > th:first-child,
.card table.dataTable > tbody > tr > td:first-child {
    padding-left: 0.85rem;
}

/* Tighter cells for the dense booking lists (set per column in the DataTable classes). */
.custom-padding {
    padding-left: 5px !important;
    padding-right: 5px !important;
}

/* Stacked cells: a main value with a smaller muted line under it (booking lists). */
.av-cell-sub {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--av-muted);
    white-space: nowrap;
}

.av-cell-sub--wrap {
    white-space: normal;
}

/* Paid / unpaid pill beside the booking-status pill: bold strong text on the light tint of the same colour. */
.av-pay {
    font-weight: 700;
}

.av-pay--paid {
    color: var(--bs-success-active);
    background: var(--bs-success-light);
}

.av-pay--unpaid {
    color: var(--bs-danger-active);
    background: var(--bs-danger-light);
}

.av-wrap-cell {
    min-width: 10rem;
    max-width: 15rem;
    white-space: normal;
}

.av-pax + .av-pax {
    margin-top: 0.35rem;
}

.av-pax-rest > .av-pax:first-child {
    margin-top: 0.35rem;
}

.av-pax-toggle {
    display: inline-block;
    margin-top: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--av-brand);
}

/* All-bookings table: keep the booking id and the actions in view while scrolling sideways. */
.av-booking-table > thead > tr > th:first-child,
.av-booking-table > tbody > tr > td:first-child,
.av-booking-table > thead > tr > th:last-child,
.av-booking-table > tbody > tr > td:last-child {
    position: sticky;
    z-index: 1;
    background: var(--av-surface);
}

.av-booking-table > thead > tr > th:first-child,
.av-booking-table > tbody > tr > td:first-child {
    left: 0;
}

.av-booking-table > thead > tr > th:last-child,
.av-booking-table > tbody > tr > td:last-child {
    right: 0;
}

/* Small copy-to-clipboard button placed after a value (e.g. a PNR). */
.av-copy {
    padding: 0 0 0 0.3rem;
    border: 0;
    background: none;
    line-height: 1;
    vertical-align: middle;
    color: var(--av-muted);
    cursor: pointer;
}

.av-copy i {
    font-size: 0.95rem;
    color: inherit;
}

.av-copy:hover,
.av-copy:focus-visible {
    color: var(--av-brand);
}

.av-copy.is-copied {
    color: var(--bs-success);
}

/*
 * Card rows: each booking is its own rounded, bordered card on the app background.
 * DataTables already sets border-collapse: separate; the gap between rows is the border spacing.
 */
.card-body:has(> .table-responsive .av-booking-table) {
    background: var(--av-app-bg);
    border-radius: 0 0 var(--av-radius) var(--av-radius);
}

.table.dataTable.av-booking-table {
    border-spacing: 0 0.5rem;
}

/*
 * Header: a slim brand-blue strip with the cards' rounded ends; opaque, so the sticky header cells cover scrolled ones.
 * Prefixed with .card to out-rank the generic `.card table.dataTable > thead > tr > th` (grey background, !important rule line).
 */
.card .table.av-booking-table > thead > tr > th {
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
    border: 0;
    border-bottom: 0 !important;
    background: var(--av-table-head-bg);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.table.av-booking-table > thead > tr > th:first-child {
    border-radius: var(--av-radius-sm) 0 0 var(--av-radius-sm);
}

.table.av-booking-table > thead > tr > th:last-child {
    border-radius: 0 var(--av-radius-sm) var(--av-radius-sm) 0;
}

/* Breathing room at the card edges; .custom-padding (5px) is !important, so this has to be too. */
.table.av-booking-table > * > tr > :first-child {
    padding-left: 0.85rem !important;
}

.table.av-booking-table > * > tr > :last-child {
    padding-right: 0.85rem !important;
}

/* DataTables draws the sort arrows at right: 10px of a sortable header; keep its label clear of them. */
.table.av-booking-table > thead > tr > th:is(.sorting, .sorting_asc, .sorting_desc) {
    padding-right: 1.65rem !important;
}

.table.av-booking-table > tbody > tr > td {
    background: var(--av-surface);
    border-top: 1px solid var(--av-line);
    border-bottom: 1px solid var(--av-line);
    transition: border-color 0.15s ease;
}

.table.av-booking-table > tbody > tr > td:first-child {
    border-left: 1px solid var(--av-line);
    border-radius: var(--av-radius-sm) 0 0 var(--av-radius-sm);
}

.table.av-booking-table > tbody > tr > td:last-child {
    border-right: 1px solid var(--av-line);
    border-radius: 0 var(--av-radius-sm) var(--av-radius-sm) 0;
}

.table.av-booking-table > tbody > tr:hover > td {
    border-color: rgba(var(--av-brand-rgb), 0.45);
}

/* Action icons sized like the copy icons, in a compact button that tints on hover. */
.av-booking-table .action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: var(--av-radius-sm);
    color: var(--av-muted);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.av-booking-table .action-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.av-booking-table .action-icon.sync-icon {
    color: var(--bs-success);
}

.av-booking-table .action-icon:hover,
.av-booking-table .action-icon:focus-visible {
    background: rgba(var(--av-brand-rgb), 0.1);
    color: var(--av-brand);
}

/* Show the "Processing..." loader near the top of long tables instead of mid-page. */
.card .dataTables_wrapper .dataTables_processing {
    top: 3.5rem !important;
    margin-top: 0 !important;
    transform: translateX(-50%) !important;
    z-index: 5;
    padding: 0.6rem 1.25rem !important;
    border: 1px solid var(--av-line);
    border-radius: var(--av-radius-sm) !important;
    background: var(--av-surface) !important;
    box-shadow: var(--av-shadow-lg) !important;
}

.dataTables_wrapper .dataTables_length select {
    border-radius: var(--av-radius-sm);
}

.dataTables_wrapper .pagination .page-item.active .page-link {
    background-color: var(--av-brand);
}

/* Line tabs: Metronic underlines the active tab but leaves its text grey; colour it too. */
.nav-line-tabs .nav-item .nav-link.active {
    color: var(--av-brand);
}

/* ----------------------------------------------------------- form controls */
.btn {
    border-radius: var(--av-radius-sm);
    font-weight: 500;
}

.form-control,
.form-select {
    border-radius: var(--av-radius-sm);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(var(--av-brand-rgb), 0.55);
    box-shadow: 0 0 0 3px rgba(var(--av-brand-rgb), 0.12);
}

.form-label {
    color: var(--av-ink);
    font-weight: 500;
}

.select2-container--bootstrap5 .select2-selection {
    border-radius: var(--av-radius-sm);
}

/* ------------------------------------------------------------------ badges */
.badge {
    font-weight: 600;
    border-radius: 999px;
    padding: 0.4em 0.75em;
}

/* -------------------------------------------------------------- components
 * Styles for resources/views/components/ui/*.blade.php.
 */
.av-stat-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.25rem 1.35rem;
    background: var(--av-surface);
    border: 1px solid var(--av-line);
    border-radius: var(--av-radius);
    box-shadow: var(--av-shadow);
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.av-stat-card--link:hover {
    border-color: rgba(var(--av-brand-rgb), 0.35);
    box-shadow: var(--av-shadow-lg);
    transform: translateY(-2px);
    color: inherit;
}

.av-stat-card__title {
    color: var(--av-muted);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.35;
}

.av-stat-card__icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.av-stat-card__value {
    margin-top: auto;
    padding-top: 0.75rem;
    color: var(--av-ink);
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.av-stat-card__subtitle {
    margin-top: 0.35rem;
    color: var(--av-muted);
    font-size: 0.8rem;
}

.av-status-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2.25rem;
    border-top: 1px solid var(--av-line);
    border-bottom: 1px solid var(--av-line);
    background: var(--av-surface-2);
}

.av-status-tabs__label {
    margin-right: 0.25rem;
    color: var(--av-muted);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.av-status-tab {
    --av-tab: var(--bs-primary);
    --av-tab-rgb: var(--bs-primary-rgb);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--av-line);
    border-radius: 999px;
    background: var(--av-surface);
    color: var(--bs-gray-700);
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.av-status-tab .ki-duotone {
    color: var(--av-tab);
}

.av-status-tab:hover {
    border-color: rgba(var(--av-tab-rgb), 0.45);
    color: var(--av-tab);
}

.av-status-tab.active {
    border-color: var(--av-tab);
    background: var(--av-tab);
    color: #fff;
}

.av-status-tab.active .ki-duotone {
    color: #fff;
}

.av-status-tab--success { --av-tab: var(--bs-success); --av-tab-rgb: var(--bs-success-rgb); }
.av-status-tab--warning { --av-tab: #d99a00; --av-tab-rgb: 217, 154, 0; }
.av-status-tab--danger  { --av-tab: var(--bs-danger); --av-tab-rgb: var(--bs-danger-rgb); }
.av-status-tab--info    { --av-tab: var(--av-accent); --av-tab-rgb: var(--av-accent-rgb); }
.av-status-tab--dark    { --av-tab: var(--av-ink); --av-tab-rgb: 15, 27, 45; }

@media (max-width: 767.98px) {
    .av-status-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0.75rem 1rem;
    }

    .av-status-tabs__label {
        display: none;
    }
}

.av-table-card > .card-header {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.av-kv {
    display: grid;
    gap: 0.6rem;
    padding: 1rem 1.1rem;
    border-radius: var(--av-radius-sm);
    background: var(--av-surface-2);
}

.av-kv > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.92rem;
}

.av-kv > div > span:first-child {
    color: var(--av-muted);
}

.av-kv > div > span:last-child {
    color: var(--av-ink);
    font-weight: 600;
}

/* Bordered section inside a detail page (booking details, passengers, journey...). */
.av-panel {
    margin-bottom: 1.25rem;
    border: 1px solid var(--av-line);
    border-radius: var(--av-radius);
    overflow: hidden;
}

.av-panel > .card {
    border: 0;
    box-shadow: none;
}

.av-panel h4 {
    margin: 0;
    color: var(--av-ink);
    font-size: 1rem;
    font-weight: 600;
}

/* Action-only header: hide it when no action rendered. */
.card > .card-header.av-card-header--actions:not(:has(.btn, .badge, a)) {
    display: none;
}

.av-section-title {
    margin: 0;
    color: var(--av-ink);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Preview tile for an uploaded image (logos, banners); --dark shows white artwork. */
.av-image-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 9rem;
    padding: 1rem;
    border: 1px dashed var(--av-line);
    border-radius: var(--av-radius-sm);
    background: var(--av-surface-2);
    overflow: hidden;
}

.av-image-tile img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.av-image-tile--dark {
    border-style: solid;
    background: var(--av-sidebar-bg);
}

/*
 * Logo preview: the file at its exact size, never enlarged. Only a file larger than the box
 * (over 100px high, the height uploads are stored at, or wider than the column) is shrunk to fit.
 */
.av-image-tile--logo {
    height: auto;
}

.av-image-tile--logo img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100px;
}

/* Banner preview: a wide strip, cropped like the hero on the site, instead of a thumbnail. */
.av-image-tile--banner {
    height: auto;
    min-height: 9rem;
    padding: 0;
}

.av-image-tile--banner img {
    width: 100%;
    height: 14rem;
    max-height: none;
    object-fit: cover;
}

.av-image-tile__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: var(--av-muted);
    font-size: 0.8rem;
}

/* Thumbnails of uploaded images, each with an optional remove button. */
.av-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.av-gallery:empty {
    display: none;
}

.av-gallery__item {
    position: relative;
    width: 6.5rem;
    height: 6.5rem;
    border: 1px solid var(--av-line);
    border-radius: var(--av-radius-sm);
    overflow: hidden;
}

.av-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--av-surface-2);
}

.av-gallery__item.is-missing img {
    visibility: hidden;
}

.av-gallery__item.is-missing::after {
    content: "Missing file";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: var(--av-surface-2);
    color: var(--av-muted);
    font-size: 0.75rem;
    text-align: center;
}

.av-gallery__remove {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 27, 45, 0.7);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
}

.av-gallery__remove:hover,
.av-gallery__remove:focus-visible {
    background: var(--bs-danger);
}

/* Save bar that stays in view at the bottom of long settings forms. */
.av-save-bar {
    position: sticky;
    bottom: 1rem;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    border: 1px solid var(--av-line);
    border-radius: var(--av-radius);
    background: var(--av-surface);
    box-shadow: var(--av-shadow-lg);
}

/* --------------------------------------------------------------- dashboard */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    background: #dcfce7;
    color: #16a34a;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a34a;
    animation: av-pulse-dot 1.5s ease-in-out infinite;
}

@keyframes av-pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

/* Applied by the dashboard script when a live update changes a value. */
.card-flash-anim {
    animation: av-card-flash 0.8s ease-out;
}

@keyframes av-card-flash {
    0% { box-shadow: 0 0 0 0 rgba(var(--av-brand-rgb), 0.35); }
    100% { box-shadow: 0 0 0 10px rgba(var(--av-brand-rgb), 0); }
}

.count-pop-anim {
    display: inline-block;
    animation: av-count-pop 0.5s ease-out;
}

@keyframes av-count-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.2); color: var(--av-brand); }
    100% { transform: scale(1); }
}

/* --------------------------------------------------------------- dark mode
 * Third-party widgets and printable boxes that hard-code light colours.
 */
[data-bs-theme=dark] .invoice-box {
    background: var(--av-surface) !important; /* views set #fff inline in <style> */
    border-color: var(--av-line) !important;
    color: var(--bs-gray-800);
}

[data-bs-theme=dark] .invoice-box .invoice-title,
[data-bs-theme=dark] .invoice-box label,
[data-bs-theme=dark] .invoice-box strong {
    color: var(--av-ink);
}

[data-bs-theme=dark] .ck.ck-editor {
    --ck-color-base-background: var(--av-surface);
    --ck-color-base-foreground: var(--av-surface-2);
    --ck-color-base-border: var(--av-line);
    --ck-color-base-text: var(--av-ink);
    --ck-color-text: var(--av-ink);
    --ck-color-toolbar-background: var(--av-surface-2);
    --ck-color-toolbar-border: var(--av-line);
    --ck-color-button-default-hover-background: var(--av-app-bg);
    --ck-color-button-on-background: var(--av-brand-light);
    --ck-color-dropdown-panel-background: var(--av-surface);
    --ck-color-dropdown-panel-border: var(--av-line);
    --ck-color-list-background: var(--av-surface);
    --ck-color-list-button-hover-background: var(--av-surface-2);
    --ck-color-input-background: var(--av-surface);
    --ck-color-input-text: var(--av-ink);
    --ck-color-panel-background: var(--av-surface);
    --ck-color-panel-border: var(--av-line);
}

[data-bs-theme=dark] .ck.ck-editor .ck-editor__editable {
    background: var(--av-surface);
    color: var(--av-ink);
}

/* -------------------------------------------------------------------- auth */
.av-auth {
    background: var(--av-surface);
}

.av-auth-aside {
    position: relative;
    width: 44%;
    max-width: 640px;
    padding: 3rem;
    color: #fff;
    background-size: cover;
    background-position: center;
}

.av-auth-aside::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(15, 27, 45, 0.88) 0%, rgba(11, 111, 184, 0.72) 100%);
}

.av-auth-aside > * {
    position: relative;
}

.av-auth-aside-logo {
    height: 40px;
    width: auto;
    align-self: flex-start;
}

.av-auth-aside-title {
    color: #fff;
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.av-auth-aside-text {
    max-width: 380px;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.av-auth-aside-foot {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.av-auth-card {
    max-width: 400px;
}

.av-auth-logo {
    height: 40px;
    width: auto;
}

.av-auth-title {
    color: var(--av-ink);
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

/* --------------------------------------------- legacy markup compatibility
 * A few views still use class names from the retired Metro Lab theme
 * (admin_asset/css/style.css), which no longer loads. These rules give that
 * markup a Metronic look until each view is converted to cards/Bootstrap 5.
 * Delete a rule once grep finds no view using its class.
 */
.widget {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.75rem;
    margin-bottom: 1.25rem;
}

.widget-title {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 1.25rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.widget-title h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--bs-heading-color);
}

.widget-body {
    padding: 1.25rem;
}

.control-group {
    margin-bottom: 1rem;
}

.form-actions {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--bs-border-color);
}

.pull-right {
    float: right;
}

.row-fluid {
    width: 100%;
}

.row-fluid::after {
    content: "";
    display: table;
    clear: both;
}

.table-advance > thead > tr > th,
.table-advance thead th {
    --bs-table-bg: var(--bs-gray-100); /* Bootstrap 5 paints cells via an inset shadow of this variable */
}

.metro-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.metro-nav .metro-nav-block {
    flex: 1 1 180px;
    width: auto !important; /* views set inline widths for the old float grid */
    border-radius: 0.75rem;
    background-size: cover;
}

.metro-nav .metro-nav-block > a {
    display: block;
    padding: 1.25rem;
    color: #fff;
}

.metro-nav .metro-nav-block > a > i {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.85);
}

.metro-nav .metro-nav-block .info {
    float: right;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.metro-nav .metro-nav-block .status {
    margin-top: 1rem;
    font-weight: 500;
    opacity: 0.9;
}

.icon-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.85rem 0.5rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    color: var(--bs-gray-700);
    font-weight: 500;
    text-align: center;
}

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

/* Profile photo uploader on the customer details page (moved from Metro Lab). */
.avatar-upload {
  position: relative;
  max-width: 205px;
  margin: 20px auto;
}
.avatar-upload .avatar-edit {
  position: absolute;
  right: 12px;
  z-index: 1;
  top: 10px;
}
.avatar-upload .avatar-edit input {
  display: none;
}
.avatar-upload .avatar-edit input + label {
  display: inline-block;
  width: 34px;
  height: 34px;
  margin-bottom: 0;
  border-radius: 100%;
  background: #ffffff;
  border: 1px solid transparent;
  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  font-weight: normal;
  transition: all 0.2s ease-in-out;
}
.avatar-upload .avatar-edit input + label:hover {
  background: #f1f1f1;
  border-color: #d6d6d6;
}
.avatar-upload .avatar-edit input + label:after {
  content: "\f303";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #757575;
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  text-align: center;
  margin: auto;
}
.avatar-upload .avatar-preview {
  width: 192px;
  height: 192px;
  position: relative;
  border-radius: 100%;
  border: 6px solid #f8f8f8;
  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);
}
.avatar-upload .avatar-preview > div {
  width: 100%;
  height: 100%;
  border-radius: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.avatar-upload .avatar-preview {
  position: relative;
}

.avatar-upload .avatar-preview .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000b3;
  display: flex;
  justify-content: center;
  align-items: center;
}

.img-error {
  color: #e60c0c;
  font-size: 16px;
}

/*AJAX Loader*/

.lds-spinner {
  color: official;
  display: inline-block;
  position: relative;
  width: 64px;
  height: 64px;
}
.lds-spinner div {
  transform-origin: 32px 32px;
  animation: lds-spinner 1.2s linear infinite;
}
.lds-spinner div:after {
  content: " ";
  display: block;
  position: absolute;
  top: 3px;
  left: 29px;
  width: 5px;
  height: 14px;
  border-radius: 20%;
  background: #fff;
}
.lds-spinner div:nth-child(1) {
  transform: rotate(0deg);
  animation-delay: -1.1s;
}
.lds-spinner div:nth-child(2) {
  transform: rotate(30deg);
  animation-delay: -1s;
}
.lds-spinner div:nth-child(3) {
  transform: rotate(60deg);
  animation-delay: -0.9s;
}
.lds-spinner div:nth-child(4) {
  transform: rotate(90deg);
  animation-delay: -0.8s;
}
.lds-spinner div:nth-child(5) {
  transform: rotate(120deg);
  animation-delay: -0.7s;
}
.lds-spinner div:nth-child(6) {
  transform: rotate(150deg);
  animation-delay: -0.6s;
}
.lds-spinner div:nth-child(7) {
  transform: rotate(180deg);
  animation-delay: -0.5s;
}
.lds-spinner div:nth-child(8) {
  transform: rotate(210deg);
  animation-delay: -0.4s;
}
.lds-spinner div:nth-child(9) {
  transform: rotate(240deg);
  animation-delay: -0.3s;
}
.lds-spinner div:nth-child(10) {
  transform: rotate(270deg);
  animation-delay: -0.2s;
}
.lds-spinner div:nth-child(11) {
  transform: rotate(300deg);
  animation-delay: -0.1s;
}
.lds-spinner div:nth-child(12) {
  transform: rotate(330deg);
  animation-delay: 0s;
}
@keyframes lds-spinner {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
