
.login-screen-bg-img {
    background-image: url("../img/sample/misc/auth-bg.png");
}

.login-screen-bg-color {
    background: #06425E;
}

/*== To handle dropdown clear button issue ===*/
/*.select2-container--bootstrap5 .select2-selection__clear {*/
/*    -webkit-mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='var%28--kt-gray-700%29'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e");*/
/*    mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e")*/
/*}*/

.max-h-700px {
    max-height: 700px;
}

.vh-85 {
    height: 85vh !important;
}

.max-h-550px {
    max-height: 550px;
}

.max-h-500px {
    max-height: 500px;
}

.max-h-450px {
    max-height: 450px;
}

.max-h-400px {
    max-height: 400px;
}

.max-h-350px {
    max-height: 350px;
}

.max-h-300px {
    max-height: 300px;
}

.max-h-250px {
    max-height: 250px;
}

.max-h-200px {
    max-height: 200px;
}

.max-h-150px {
    max-height: 150px;
}

.h-110px {
    height: 110px !important;
}

@media (min-width: 992px) {
    .app-content {
        padding-top: 18px;
        padding-bottom: 18px;

    }
}

:root, [data-bs-theme=light] {
    --bs-loading-indicator: #F9F9F9;
    --bs-loading-indicator-gradiant : #e5e5e5;
}

[data-bs-theme=dark] {
    --bs-loading-indicator: #15171C;
    --bs-loading-indicator-gradiant : #0F1014;
}

/*p {*/
/*    margin-top: unset;*/
/*    margin-bottom: unset !important;*/
/*}*/

.ml-auto {
    margin-left: auto;
}

/*============= Begin::Required Field ============*/
.validation-message {
    margin-top: 5px;
    color: #f1416c;
}

.invalid {
    border: 1px solid #FFE2E5 !important;
}

.required-filed:after {
    content: " *";
    font-weight: bold;
    color: #f1416c;
}

.validation-errors {
    background-color: #ffe2e5;
    border-color: transparent;
    color: #f1416c;
    padding: .75rem 1.25rem;
    border-radius: 5px;
    /*display: flex;*/
}

.validation-errors > li {
    /*margin-top: 1rem;*/
    margin-left: 1.5rem;
}

/*============= End::Required Field ============*/

.mb--10px {
    margin-bottom: -10px !important;
}

.timeline-label:before {
    left: 2px;
}

/* ============== begin:: page sizes ===============================*/

.a4-page {
    width: 210mm;
    min-height: 297mm;
}

.a4-page-height {
    min-height: 297mm;
}

.a4-page-width {
    width: 210mm;
}

@media (max-width: 768px) {
    .a4-page {
        width: 100%;
        height: auto;
        padding: 10px;
    }

    .a4-page-height {
        height: auto;
    }

    .a4-page-width {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .a4-page {
        padding: 5px;
    }
}

/* VLZ-1122: the printable invoice's frame is a flex item of InvoiceLayout; min-width: 0 stops it growing to the
   page's content width, so the page below can be capped at the content area instead of overflowing off its left. */
.invoice-page-frame {
    min-width: 0;
    max-width: 100%;
}

/* VLZ-1122: an invoice with structured lines prints on A4 landscape (InvoiceLineTable.NeedsLandscapePage) */
.a4-landscape-page {
    width: 297mm;
    /* Never wider than the content area (a laptop with the sidebar open); the line table scrolls inside it. */
    max-width: 100%;
    min-height: 210mm;
}

@media (max-width: 768px) {
    .a4-landscape-page {
        width: 100%;
        height: auto;
        padding: 10px;
    }
}

@media (max-width: 576px) {
    .a4-landscape-page {
        padding: 5px;
    }
}

.a5-page {
    width: 148mm;
    min-height: 210mm;
}

.a5-page-height {
    min-height: 210mm;
}

.a5-page-width {
    width: 148mm;
}

@media (max-width: 768px) {
    .a5-page {
        width: 100%;
        height: auto;
        padding: 10px;
    }

    .a5-page-height {
        height: auto;
    }

    .a5-page-width {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .a5-page {
        padding: 5px;
    }
}

.a5-page-landscape {
    width: 210mm;
    min-height: 148mm;
}

.a5-page-landscape-height {
    min-height: 148mm;
}

.a5-page-landscape-width {
    width: 210mm;
}

@media (max-width: 768px) {
    .a5-page-landscape {
        width: 100%;
        height: auto;
        padding: 10px;
    }

    .a5-page-landscape-height {
        height: auto;
    }

    .a5-page-landscape-width {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .a5-page-landscape {
        padding: 5px;
    }
}

/* ============== end:: page sizes ===============================*/

.text-color-veloz {
    color: #054158;
}

.w-80 {
    width: 80% !important;
}

.w-90 {
    width: 90% !important;
}

.form-control-solid {
    border: 1px solid var(--bs-gray-300)!important;
}

.form-select-solid {
    border: 1px solid var(--bs-gray-300) !important;
}

/* =============== start::line with arrow =============================*/
.line-with-arrow {
    position: relative;
    height: 2px; /* Line thickness */
    width: 200px; /* Line length */
    background-color: #E1E3EA;
}

.line-with-arrow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: #E1E3EA;
    border-radius: 50%; /* Circle */
}

.line-with-arrow::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%) rotate(45deg); /* Rotating to create an arrow */
    width: 8px;
    height: 8px;
    border-right: 2px solid #E1E3EA;
    border-top: 2px solid #E1E3EA;
}

/* =============== end::line with arrow =============================*/

/* ============ begin::file-upload ===================================*/
/* Container for file upload button */
.file-upload {
    position: relative;
    display: inline-block;
    overflow: hidden;
    cursor: pointer;
}

/* Actual hidden file input */
.file-upload input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

/* Button styles */
/*.file-upload button {*/
/*    padding: 10px 20px;*/
/*    background-color: #4CAF50; !* green *!*/
/*    color: white;*/
/*    border: none;*/
/*    border-radius: 4px;*/
/*    font-size: 16px;*/
/*    cursor: pointer;*/
/*    transition: background-color 0.3s ease;*/
/*}*/

/* Button hover effect */
/*.file-upload button:hover {*/
/*    background-color: #45a049;*/
/*}*/
/* ============ end::file-upload ===================================*/

.test-item {
    border: 2px solid red;
    border-radius: 10px;
}

/*================ being::loading ====================================*/

/* HTML: <div class="loader"></div> */
.loader-bar {
    width: 120px;
    height: 20px;
    background:
            linear-gradient(to right, var(--bs-loading-indicator) 8%, var(--bs-loading-indicator-gradiant) 18%, var(--bs-loading-indicator) 33%),
            var(--bs-loading-indicator);
    background-size:300% 100%;
    animation: l1 1s infinite linear;
}
@keyframes l1 {
    0% {background-position: right}
}

.linear-background {
    animation-duration: 1s;
    animation-fill-mode: forwards;
    animation-iteration-count: infinite;
    animation-name: placeHolderShimmer;
    animation-timing-function: linear;
    background:
            linear-gradient(to right, var(--bs-loading-indicator) 8%, var(--bs-loading-indicator-gradiant) 18%, var(--bs-loading-indicator) 33%),
            var(--bs-loading-indicator);
    background-size: 1000px 104px;
    /*height: 338px;*/
    position: relative;
    overflow: hidden;
}

@keyframes placeHolderShimmer{
    0%{
        background-position: -468px 0
    }
    100%{
        background-position: 468px 0
    }
}


/*================ being::loading ====================================*/

.trip-dashboard {
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    height: calc(100vh - 60px);
    overflow-y: auto;
    border-right: 1px solid #dee2e6;
}

/* Content panel */
.content-panel {
    height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 1rem;
}

/* Boat column */
.boat-column .card-body {
    max-height: 500px;
    overflow-y: auto;
}

/* Drag and drop styles */
.ticket-item {
    cursor: move;
    transition: background-color 0.2s;
}

.ticket-item:hover {
    background-color: #f8f9fa;
}

.ticket-item.dragging {
    opacity: 0.5;
}

.tickets-container {
    max-height: 200px;
    overflow-y: auto;
}

/* Unassigned bookings */
.unassigned-booking {
    border-left: 4px solid #ffc107;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .trip-dashboard {
        flex-direction: column !important;
    }

    .sidebar {
        width: 100% !important;
        height: auto;
        max-height: 40vh;
    }

    .content-panel {
        height: auto;
    }
}

.trip-stop-hover-effect {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.trip-stop-hover-effect:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

/*================== begin::loading spinner ============================*/

.blazor-load-progress {
    width: 200px;
    height: 10px;
    background-color: #f0f0f0;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

/* Scoped to the loader (VLZ-1119). Unscoped, this rule hijacked Bootstrap's .progress-bar app-wide: every
   progress bar outside a .blazor-load-progress (e.g. Batch Invoice step 2's Progress tile) ignored its own
   width and drew full. */
.blazor-load-progress .progress-bar {
    height: 100%;
    background-color: #1B84FF;
    border-radius: 10px;
    width: var(--blazor-load-percentage) !important;
    transition: width 0.05s ease;
}

.blazor-load-progress .progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 9px;
    font-weight: bold;
    color: #333;
}

.blazor-load-progress .progress-text::after {
    content: var(--blazor-load-percentage-text) !important;
}

.theme-light-show,
.theme-dark-show {
    display: none !important;
}

[data-bs-theme="light"] .theme-light-show,
html:not([data-bs-theme]) .theme-light-show {
    display: inline !important;
}

[data-bs-theme="dark"] .theme-dark-show {
    display: inline !important;
}

/*=================== end::loading spinner ============================*/


/*=================== begin::trip management ============================*/

/* Trip Management: make the Unassigned bookings card fit within the viewport without overflow */
/*
   Approach:
   1) Make the right column (that directly contains the card) a sticky container with a top offset
      equal to the page header/toolbars. Constrain its height to the remaining viewport.
   2) Make the card fill that container (height: 100%) and handle internal scrolling only.

   You can tune the offset via --tm-header-offset if your header height changes.
*/

/* Sticky right column scoped only when it contains the target card (uses :has support) */
.col-12.col-lg-2:has(> #unassigned-bookings-card) {
    /* Header/toolbars offset – adjust if needed */
    --tm-header-offset: 132px;
    position: sticky;
    top: var(--tm-header-offset);
    height: calc(100dvh - var(--tm-header-offset));
    max-height: calc(100dvh - var(--tm-header-offset));
    display: flex;
    flex-direction: column;
    min-height: 0; /* allow inner flex children to size properly */
}

/* On small screens let it be auto-height (stacked layout) */
@media (max-width: 991.98px) {
    .col-12.col-lg-2:has(> #unassigned-bookings-card) {
        position: static;
        top: auto;
        height: auto;
        max-height: none;
    }
}

#unassigned-bookings-card {
    height: 100%; /* fill the sticky column */
    max-height: 100%;
    display: flex;
    flex-direction: column;
    /* Prevent extra space from Bootstrap's mb-3 on this specific card */
    margin-bottom: 0 !important;
    overflow: hidden; /* internal areas manage their own scrolling */
}

#unassigned-bookings-card .card-header {
    flex: 0 0 auto;
}

#unassigned-bookings-card .card-body {
    flex: 1 1 auto; /* take remaining height */
    min-height: 0;  /* allow inner scroll to size correctly */
    display: flex;
    flex-direction: column;
}

/* Ensure the inner list scrolls to fill available space */
#unassigned-bookings-card .hover-scroll-y {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto !important;
    max-height: none; /* allow it to grow within the card-body */
}

/* Override capped height inside this card so it can truly fill */
#unassigned-bookings-card .max-h-500px {
    max-height: none;
    height: 100%;
}

/*================ trip for selected days ======================*/
.col-12.col-lg-2:has(> #trips-for-day) {
    /* Header/toolbars offset – adjust if needed */
    --tm-header-offset: 132px;
    position: sticky;
    top: var(--tm-header-offset);
    height: calc(100dvh - var(--tm-header-offset));
    max-height: calc(100dvh - var(--tm-header-offset));
    display: flex;
    flex-direction: column;
    min-height: 0; /* allow inner flex children to size properly */
}

/* On small screens let it be auto-height (stacked layout) */
@media (max-width: 991.98px) {
    .col-12.col-lg-2:has(> #trips-for-day) {
        position: static;
        top: auto;
        height: auto;
        max-height: none;
    }
}

#trips-for-day {
    height: 100%; /* fill the sticky column */
    max-height: 100%;
    display: flex;
    flex-direction: column;
    /* Prevent extra space from Bootstrap's mb-3 on this specific card */
    margin-bottom: 0 !important;
    overflow: hidden; /* internal areas manage their own scrolling */
}

#trips-for-day .card-header {
    flex: 0 0 auto;
}

#trips-for-day .card-body {
    flex: 1 1 auto; /* take remaining height */
    min-height: 0;  /* allow inner scroll to size correctly */
    display: flex;
    flex-direction: column;
}

/* Ensure the inner list scrolls to fill available space */
#trips-for-day .hover-scroll-y {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto !important;
    max-height: none; /* allow it to grow within the card-body */
}

/* Override capped height inside this card so it can truly fill */
#trips-for-day .max-h-500px {
    max-height: none;
    height: 100%;
}


/*=================== end::trip management ============================*/

/* Trip Management: "Boats at this segment" full-viewport overlay. */

/* Unassigned bookings becomes the left rail.
   !important overrides the Bootstrap .col-lg-2 width/flex/max-width the element
   keeps while expanded, so left/width govern instead of the grid column. */
.boats-overlay-rail {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    width: 340px !important;
    max-width: none !important;
    margin: 0 !important;
    z-index: 1045;
    background: var(--bs-body-bg, #fff);
    overflow: auto;
    padding: 12px;
    /* box-shadow: 0 0 24px rgba(0, 0, 0, 0.2); */
}

/* Boats panel fills the rest of the viewport.
   width:auto is required so left:340px + right:0 govern the width; without it the
   element keeps Bootstrap's .col-lg-9 width:75% and leaves a gap on the right. */
.boats-overlay-main {
    position: fixed !important;
    top: var(--tm-overlay-top, 0px);
    left: 340px;
    right: 0;
    bottom: 0;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    z-index: 1045;
    background: var(--bs-body-bg, #fff);
    overflow: auto;
    padding: 12px;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.2);
}

/* When expanded, the boats strip uses the full overlay height instead of 550px. */
/* 96px ≈ overlay padding + card header/toolbar height above the strip. */
.boats-overlay-main .max-h-550px {
    max-height: calc(100vh - 96px) !important;
}

/* When expanded, the selected-trip details card becomes a fixed strip across the top
   of the boats area (right of the rail). Its measured height feeds --tm-overlay-top so
   the boats panel starts just below it. Capped so many wrapped stop pills scroll. */
.trip-details-overlay-top {
    position: fixed !important;
    top: 0;
    left: 340px;
    right: 0;
    z-index: 1046;
    max-height: 45vh;
    overflow: auto;
    background: var(--bs-body-bg, #fff);
    padding: 8px 12px;
    /* box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15); */
}

/* Top horizontal scrollbar proxy, synced to the boats strip below it. */
.boats-scroll-proxy {
    overflow-x: auto;
    overflow-y: hidden;
    height: 14px;
}

/* =================== Boat stop coverage matrix (BoatStopCoverageModal) =================== */
/* Theme-aware via Metronic --bs-* vars so it adapts to light/dark. */
.boat-coverage__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.boat-coverage__hint {
    margin: 0;
    font-size: 0.8rem;
    color: var(--bs-gray-500);
    flex: 1 1 260px;
}

/* Segmented Basic / Advanced control */
.boat-coverage__segmented {
    display: inline-flex;
    padding: 3px;
    border-radius: 8px;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-gray-200);
}
.boat-coverage__segmented button {
    border: 0;
    background: transparent;
    color: var(--bs-gray-600);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 5px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color .12s ease, color .12s ease;
}
.boat-coverage__segmented button:hover { color: var(--bs-gray-800); }
.boat-coverage__segmented button.is-active {
    background: var(--bs-body-bg);
    color: var(--bs-primary);
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

/* Scroll frame */
.boat-coverage__scroll {
    max-height: 62vh;
    overflow: auto;
    border: 1px solid var(--bs-gray-200);
    border-radius: 10px;
    /* Shrink-wrap the table and centre it: few boats → compact frame; many → full width + scroll. */
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
}

.boat-coverage__table {
    border-collapse: separate;
    border-spacing: 0;
    /* Size to content so one or two boats don't balloon the columns. The frame
       (.boat-coverage__scroll) shrink-wraps this and scrolls when boats overflow. */
    width: auto;
    font-size: 0.82rem;
    color: var(--bs-gray-800);
}
.boat-coverage__table th,
.boat-coverage__table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--bs-gray-200);
    background: var(--bs-body-bg);
    vertical-align: middle;
}
.boat-coverage__table tbody tr:last-child th,
.boat-coverage__table tbody tr:last-child td { border-bottom: 0; }
.boat-coverage__table tbody tr:hover td,
.boat-coverage__table tbody tr:hover th { background: var(--bs-gray-100); }

/* Sticky header row */
.boat-coverage__table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bs-gray-100);
    border-bottom: 2px solid var(--bs-gray-300);
    text-align: center;
    white-space: nowrap;
}

/* Sticky first column (stop) — stays put on horizontal scroll */
.boat-coverage__table .cc-stop {
    position: sticky;
    left: 0;
    z-index: 1;
    text-align: left;
    min-width: 190px;
}
.boat-coverage__table thead th.cc-stop {
    z-index: 3; /* top-left corner sits above both sticky axes */
    text-align: left;
}
.boat-coverage__table tbody tr:hover th.cc-stop { background: var(--bs-gray-100); }

.cc-time { text-align: center; color: var(--bs-gray-600); white-space: nowrap; }

/* Stop cell: order chip + name */
.cc-stop-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px; height: 20px;
    margin-right: 8px;
    border-radius: 6px;
    background: var(--bs-gray-200);
    color: var(--bs-gray-700);
    font-size: 0.7rem;
    font-weight: 700;
}
.cc-stop-name { font-weight: 600; }

/* Boat columns */
.cc-boat { text-align: center; min-width: 96px; }
.boat-coverage__table.is-advanced .cc-boat { min-width: 132px; }
.cc-band { background: var(--bs-gray-100) !important; }        /* subtle column banding */
.boat-coverage__table tbody tr:hover td.cc-band { background: var(--bs-gray-200) !important; }
.cc-boat-name { font-weight: 700; color: var(--bs-gray-800); }
.cc-boat-seats { font-size: 0.72rem; color: var(--bs-gray-500); font-weight: 500; margin-top: 1px; }

.cc-selectall {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 6px 0 0;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--bs-gray-600);
    cursor: pointer;
}

/* Advanced: Embark / Disembark caption row, aligned with the two checkboxes below */
.cc-subhead {
    display: flex;
    margin-top: 8px;
    border-top: 1px dashed var(--bs-gray-300);
    padding-top: 5px;
}
.cc-subhead span {
    flex: 1;
    text-align: center;
    font-size: 0.66rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--bs-gray-500);
}
.cc-pair { display: flex; }
/* Each half flexes to fill its side and centres its checkbox/dash — so Embark/Disembark
   line up under their captions regardless of how wide the boat column gets. */
.cc-half { flex: 1; display: flex; align-items: center; justify-content: center; }

/* Checkboxes: a touch larger, centered, primary when checked */
/* Force native, compact checkboxes across the matrix. Metronic's .form-check-input renders
   oversized, box-like (no .form-check wrapper) here — reading like empty text inputs. Native
   appearance + accent-color is crisp and consistent at grid density. Covers the cell checks and
   the per-boat "All" header checkbox. */
.boat-coverage input[type="checkbox"] {
    -webkit-appearance: auto !important;
    appearance: auto !important;
    width: 15px !important;
    height: 15px !important;
    min-height: 0 !important;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    border: initial;
    border-radius: 0;
    background: none !important;
    box-shadow: none !important;
    accent-color: var(--bs-primary);
    cursor: pointer;
    vertical-align: middle;
}

/* Not-applicable cell */
.cc-na {
    display: inline-block;
    color: var(--bs-gray-400);
    user-select: none;
}

/* VLZ-816: staged (not yet applied) cell. The per-cell save spinner that used to live here is
   gone with save-on-tick — nothing is in flight per cell any more, so the pending signal is a
   highlight on the cell plus the footer's count. */
.cc-staged {
    background: var(--bs-warning-light) !important;
    box-shadow: inset 3px 0 0 var(--bs-warning);
}
.boat-coverage__table tbody tr:hover td.cc-staged { background: var(--bs-warning-light) !important; }

/* VLZ-816 Rule 4: per-stop "All boats" column. Tinted and rule-bounded so it reads as a control
   strip rather than another boat, and sits beside the sticky stop column so it survives
   horizontal scroll of the boat columns. */
.cc-rowall {
    text-align: center;
    min-width: 74px;
    background: var(--bs-primary-light) !important;
    border-left: 1px solid var(--bs-gray-200);
    border-right: 1px solid var(--bs-gray-200);
}
.boat-coverage__table.is-advanced .cc-rowall { min-width: 108px; }
.boat-coverage__table tbody tr:hover td.cc-rowall { background: var(--bs-primary-light) !important; }
.cc-rowall-lbl {
    display: block;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--bs-primary);
}

/* VLZ-877: the grid master ("every boat at every stop") lives in this column's header. In
   Advanced it is a cc-pair sitting under the Embark/Disembark captions, so it needs the gap the
   body cells — each in a row of their own — don't. */
.boat-coverage__table thead .cc-rowall .cc-pair { margin-top: 5px; }

/* VLZ-816 Rule 3: legend for the indeterminate ("partly served") cell state in Basic view. */
.cc-legend {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.76rem;
    color: var(--bs-gray-600);
}
.cc-legend input { flex: 0 0 auto; margin-top: 2px; }

.cc-status { margin-top: 0.75rem; }

/* Zero-coverage advisory (Rule 5). Informational, not an error — never blocks Apply. */
.cc-warn {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-top: 0.75rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--bs-warning);
    border-radius: 8px;
    background: var(--bs-warning-light);
    font-size: 0.82rem;
    color: var(--bs-gray-800);
}
.cc-warn i { color: var(--bs-warning); flex: 0 0 auto; margin-top: 1px; }
.cc-warn__hint { margin-top: 3px; font-size: 0.76rem; color: var(--bs-gray-600); }

/* Apply / Cancel footer */
.cc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.9rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--bs-gray-200);
    border-radius: 8px;
    background: var(--bs-gray-100);
}
.cc-pending { font-size: 0.82rem; color: var(--bs-gray-800); }
.cc-pending__hint { color: var(--bs-gray-600); }
.cc-actions { display: inline-flex; gap: 0.5rem; }

/* =================== Boat controls summary cards =================== */
.boat-summary {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
    padding: .65rem .8rem;
    border: 1px solid var(--bs-gray-200);
    border-left: 3px solid var(--bs-gray-300);
    border-radius: 10px;
    margin-bottom: .5rem;
    background: var(--bs-body-bg);
    transition: box-shadow .12s ease, border-color .12s ease;
}
.boat-summary:hover { box-shadow: 0 2px 10px rgba(0,0,0,.07); }
.boat-summary.is-active { border-left-color: var(--bs-success); }
.boat-summary.is-inactive { border-left-color: var(--bs-gray-300); }

.boat-summary__main { min-width: 0; }
.boat-summary__head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.boat-summary__name { font-weight: 700; font-size: .84rem; color: var(--bs-gray-800); }

.boat-summary__status { display: inline-flex; align-items: center; gap: 5px; font-size: .7rem; font-weight: 600; white-space: nowrap; }
.boat-summary__status .dot { width: 7px; height: 7px; border-radius: 50%; }
.boat-summary__status.is-active { color: var(--bs-success); }
.boat-summary__status.is-active .dot { background: var(--bs-success); }
.boat-summary__status.is-inactive { color: var(--bs-gray-500); }
.boat-summary__status.is-inactive .dot { background: var(--bs-gray-400); }

.boat-summary__meta { display: flex; align-items: center; gap: .5rem; margin-top: 5px; flex-wrap: wrap; }
.boat-summary__coverage {
    font-size: .68rem;
    font-weight: 600;
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), .1);
    padding: 2px 9px;
    border-radius: 20px;
    white-space: nowrap;
}
.boat-summary__cap { font-size: .7rem; color: var(--bs-gray-500); }

/* Capacity control: its own divided group; label on top, input + sync on one row. */
.boat-summary__capedit {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: .55rem;
    border-top: 1px solid var(--bs-gray-200);
}
.boat-summary__caplabel { font-size: .66rem; color: var(--bs-gray-500); white-space: nowrap; }
.boat-summary__caprow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.boat-summary__capinput {
    width: 54px;
    height: 28px;
    text-align: center;
    font-size: .8rem;
    font-weight: 600;
    color: var(--bs-gray-800);
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-gray-300);
    border-radius: 7px;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.boat-summary__capinput:focus {
    outline: 0;
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .15);
}
.boat-summary__sync {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .68rem; color: var(--bs-gray-600);
    white-space: nowrap; cursor: pointer; margin: 0;
}
.boat-summary__syncbox {
    width: 14px !important;
    height: 14px !important;
    margin: 0;
    cursor: pointer;
}


/* =================== Manifest V2 (/manifest-v2) =================== */
/* Three-column manifest workspace: overview rail, booking board, booking details.
   Everything is scoped under .mfv2 so the classic /manifest page is untouched, and colours come
   from Metronic --bs-* vars so the page follows the light/dark theme. */

.mfv2 {
    --mfv2-header-offset: 132px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.mfv2-overview { width: 240px; flex: 0 0 240px; }
.mfv2-board { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.mfv2-details { width: 300px; flex: 0 0 300px; }

/* Both rails stay in view while the long booking board scrolls. */
@media (min-width: 1200px) {
    .mfv2-overview,
    .mfv2-details {
        position: sticky;
        top: var(--mfv2-header-offset);
        max-height: calc(100dvh - var(--mfv2-header-offset) - 16px);
        overflow-y: auto;
    }
}

@media (max-width: 1199.98px) {
    .mfv2 { flex-wrap: wrap; }
    .mfv2-overview { flex: 1 1 260px; }
    .mfv2-details { flex: 1 1 280px; }
    .mfv2-board { flex: 1 1 100%; order: 3; }
}

/* --- shared type --- */
.mfv2-label {
    color: var(--bs-gray-500);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mfv2-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    color: var(--bs-gray-600);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.mfv2-heading b {
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 6px;
    background: var(--bs-gray-100);
    font-size: 0.7rem;
}

/* Stacked label + sub-labels inside a grid cell; min-width:0 keeps text-truncate working. */
.mfv2-stack {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* --- overview rail --- */
.mfv2-date-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 7px 0 6px;
}
/* The date field flexes; the day steppers keep their square footprint on a 240px rail. */
.mfv2-date-row .form-control { flex: 1 1 auto; min-width: 0; text-align: center; }
.mfv2-date-step { flex: 0 0 auto; width: 28px; height: 28px; }

.mfv2-progress {
    padding: 11px;
    border: 1px solid var(--bs-border-color);
    border-radius: 9px;
}
.mfv2-track {
    height: 5px;
    margin: 9px 0 7px;
    border-radius: 5px;
    background: var(--bs-gray-200);
    overflow: hidden;
}
.mfv2-track span {
    display: block;
    height: 100%;
    border-radius: 5px;
    background: var(--bs-primary);
    transition: width 0.2s ease;
}

.mfv2-metrics { margin: 12px 0 18px; }
.mfv2-metric {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 2px;
}
.mfv2-metric-icon {
    width: 27px;
    height: 27px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 7px;
    font-size: 0.85rem;
}

.mfv2-trips { display: grid; gap: 7px; }
.mfv2-trip {
    padding: 9px 10px;
    border: 1px solid var(--bs-border-color);
    border-radius: 9px;
    background: var(--bs-card-bg);
    cursor: pointer;
    transition: border-color 0.12s ease, background-color 0.12s ease;
}
.mfv2-trip:hover,
.mfv2-trip.is-active {
    border-color: var(--bs-primary);
    background: var(--bs-primary-light);
}

/* --- board toolbar --- */
.mfv2-toolbar {
    padding: 13px 15px 10px;
    border-bottom: 1px solid var(--bs-border-color);
}
.mfv2-toolbar-top {
    display: flex;
    align-items: center;
    gap: 11px;
    flex-wrap: wrap;
}
.mfv2-search { min-width: 190px; }

.mfv2-tabs {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* Plain-CSS dropdown — toggled by Blazor state, so no Metronic menu JS is involved. */
.mfv2-boat-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    z-index: 30;
    min-width: 210px;
    padding: 7px;
}
.mfv2-boat-menu .dropdown-item { border-radius: 6px; cursor: pointer; }

.mfv2-spin { display: inline-block; animation: mfv2-spin 0.55s linear infinite; }
@keyframes mfv2-spin { to { transform: rotate(360deg); } }

/* --- booking board --- */
.mfv2-table-area {
    padding: 12px;
}

.mfv2-group {
    margin-bottom: 12px;
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    background: var(--bs-card-bg);
    overflow: hidden;
}
.mfv2-group:last-child { margin-bottom: 0; }

.mfv2-group-head {
    display: grid;
    grid-template-columns: 20px 16px minmax(140px, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bs-primary-light);
    border-bottom: 1px solid var(--bs-border-color);
    cursor: pointer;
}
.mfv2-group-name {
    color: var(--bs-primary);
    font-size: 0.9rem;
    font-weight: 600;
}

.mfv2-thead,
.mfv2-row {
    display: grid;
    grid-template-columns: 20px minmax(100px, 0.9fr) 76px minmax(200px, 1.75fr) minmax(78px, 0.62fr) minmax(132px, 1.1fr);
    align-items: center;
    gap: 8px;
}
.mfv2-thead {
    padding: 8px 14px;
    background: var(--bs-gray-100);
    border-bottom: 1px solid var(--bs-border-color);
    color: var(--bs-gray-500);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.mfv2-row {
    position: relative;
    min-height: 68px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--bs-gray-200);
    cursor: pointer;
}
.mfv2-row:last-child { border-bottom: 0; }
.mfv2-row:hover,
.mfv2-row.is-active { background: var(--bs-primary-light); }
.mfv2-row.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--bs-primary);
}

.mfv2-breakdown {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.mfv2-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Passenger-type chip (T / L / E) shown next to the contact name. */
.mfv2-type {
    display: inline-grid;
    place-items: center;
    flex: none;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 5px;
    font-size: 0.62rem;
    font-style: normal;
    font-weight: 600;
    line-height: 1;
}
.mfv2-type-tourist { color: var(--bs-primary); background: var(--bs-primary-light); }
.mfv2-type-local { color: var(--bs-success); background: var(--bs-success-light); }
.mfv2-type-expat { color: var(--bs-info); background: var(--bs-info-light); }
.mfv2-type-other { color: var(--bs-gray-700); background: var(--bs-gray-200); }

/* --- details rail --- */
.mfv2-panel-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.mfv2-route {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
    margin: 16px 0 12px;
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    overflow: hidden;
}
.mfv2-route > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 13px 12px;
    background: var(--bs-gray-100);
}
.mfv2-route > div:first-child { align-items: flex-start; padding-right: 4px; }
.mfv2-route > div:last-child { align-items: flex-end; padding-left: 4px; text-align: right; }
.mfv2-route > div > span {
    color: var(--bs-gray-500);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.mfv2-route > div > strong {
    max-width: 100%;
    color: var(--bs-gray-900);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.35;
}
.mfv2-route-line {
    align-self: center;
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--bs-primary);
    border-radius: 8px;
    background: var(--bs-primary-light);
    color: var(--bs-primary);
    box-shadow: 0 0 0 5px var(--bs-card-bg);
}
.mfv2-route::before {
    content: "";
    position: absolute;
    left: 25%;
    right: 25%;
    top: 50%;
    height: 1px;
    background: var(--bs-border-color);
}

.mfv2-customer {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 0 13px;
    border-bottom: 1px solid var(--bs-border-color);
}

.mfv2-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin: 13px 0;
}
.mfv2-stats > div {
    padding: 9px 3px;
    text-align: center;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}
.mfv2-stats strong { display: block; color: var(--bs-gray-900); font-size: 1.05rem; font-weight: 600; }
.mfv2-stats span { color: var(--bs-gray-500); font-size: 0.68rem; }

.mfv2-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.mfv2-actions-stacked { grid-template-columns: 1fr; }
.mfv2-action-wide { grid-column: 1 / -1; }
.mfv2-actions .btn { padding: 0.5rem 0.4rem; font-size: 0.72rem; }

.mfv2-ticket-list { display: grid; gap: 7px; }
.mfv2-ticket {
    padding: 10px;
    border: 1px solid var(--bs-border-color);
    border-radius: 9px;
}

.mfv2-selected-list { display: grid; }
.mfv2-selected-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 8px 0;
    border-bottom: 1px solid var(--bs-border-color);
}

/* --- shared empty state --- */
.mfv2-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    padding: 2rem 1rem;
    text-align: center;
}

/* --- guided empty states + inline hints --- */
.mfv2-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 11px;
    border: 1px dashed var(--bs-border-color);
    border-radius: 9px;
    background: var(--bs-gray-100);
}
.mfv2-hint-warning {
    border-style: solid;
    border-color: var(--bs-warning);
    background: var(--bs-warning-light);
}

/* The day -> trip -> booking funnel, repeated in each empty state. */
.mfv2-steps {
    list-style: none;
    display: grid;
    gap: 10px;
    width: 100%;
    max-width: 360px;
    margin: 18px 0 0;
    padding: 0;
    text-align: start;
}
.mfv2-step {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    opacity: 0.5;
}
.mfv2-step.is-current,
.mfv2-step.is-done { opacity: 1; }
.mfv2-step > i {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bs-gray-200);
    color: var(--bs-gray-700);
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 600;
}
.mfv2-step.is-current > i { background: var(--bs-primary); color: var(--bs-primary-inverse, #fff); }
.mfv2-step.is-done > i { background: var(--bs-success); color: var(--bs-success-inverse, #fff); }

/* --- board header: the selected trip's context above the toolbar --- */
.mfv2-board-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 15px;
    border-bottom: 1px solid var(--bs-border-color);
}
/* =================== end::Manifest V2 =================== */


/* =================== Daily Finances V2 (/payments/payments-dashboard-v2) =================== */
/* Finance workspace: metric row, tab strip, payment-method grid and the expandable transaction
   table. Everything is scoped under .fdv2 so the classic /payments/payments-dashboard is untouched,
   and colours come from Metronic --bs-* vars so the page follows the light/dark theme. */

.fdv2 {
    --fdv2-header-offset: 132px;
    display: flex;
    align-items: flex-start;
}

/* The page-header controls render outside .fdv2 (they go through SectionContent), so this rule is
   deliberately unscoped. DateOnlyPicker emits a bare .form-control, which is width:100% and would
   otherwise eat the whole row and push the buttons onto a second line. */
.fdv2-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}
/* Date field plus its two day-steppers, held closer together than the header's own gap. */
.fdv2-date-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.fdv2-date-row .form-control {
    flex: 0 0 auto;
    width: 150px;
    text-align: center;
}
.fdv2-date-step {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
}

/* --- per-trip split: sticky rail beside the workspace --- */
.fdv2-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 14px;
    width: 100%;
}

.fdv2-workspace { min-width: 0; }

@media (min-width: 1200px) {
    .fdv2-rail {
        position: sticky;
        top: var(--fdv2-header-offset);
        max-height: calc(100dvh - var(--fdv2-header-offset) - 16px);
        overflow-y: auto;
    }
}

@media (max-width: 1199.98px) {
    .fdv2-layout { grid-template-columns: minmax(0, 1fr); }
}

/* --- shared type --- */
.fdv2-label {
    color: var(--bs-gray-500);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Stacked label + sub-label; min-width:0 keeps text-truncate working inside a flex row. */
.fdv2-stack {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* --- trip rail --- */
.fdv2-rail-group { border-top: 1px solid var(--bs-border-color); }
.fdv2-rail-group:first-of-type { border-top: 0; }

.fdv2-rail-date {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 2px;
    border: 0;
    background: transparent;
    color: var(--bs-gray-600);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-align: start;
    text-transform: uppercase;
}
.fdv2-rail-date:hover { color: var(--bs-primary); }

.fdv2-trip {
    padding: 10px 11px;
    margin-bottom: 7px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: var(--bs-gray-100);
    cursor: pointer;
}
.fdv2-trip:hover { border-color: var(--bs-primary); }
.fdv2-trip.is-active {
    border-color: var(--bs-primary);
    background: var(--bs-primary-light);
}

/* --- scope banner above the per-trip workspace --- */
.fdv2-banner {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    padding: 10px 14px;
    margin-bottom: 14px;
    border: 1px solid var(--bs-primary);
    border-radius: 9px;
    background: var(--bs-primary-light);
    color: var(--bs-primary);
}

/* --- metric row --- */
.fdv2-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

@media (max-width: 1199.98px) {
    .fdv2-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .fdv2-metrics { grid-template-columns: minmax(0, 1fr); }
}

.fdv2-metric { min-width: 0; }

/* --- tab strip --- */
/* flex-direction is spelled out because Metronic's .card stacks its children in a column. */
.fdv2-tabs {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 22px;
    flex-wrap: wrap;
    padding: 0 18px;
    margin-bottom: 14px;
}

.fdv2-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    padding: 16px 2px;
    border: 0;
    background: transparent;
    color: var(--bs-gray-600);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}
.fdv2-tab:hover { color: var(--bs-primary); }
.fdv2-tab.is-active { color: var(--bs-primary); }
.fdv2-tab.is-active::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--bs-primary);
}

/* --- panels --- */
.fdv2-panel { margin-bottom: 14px; }

.fdv2-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

/* --- payment-method cards --- */
.fdv2-method-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 1199.98px) {
    .fdv2-method-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .fdv2-method-grid { grid-template-columns: minmax(0, 1fr); }
}

.fdv2-method {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--bs-border-color);
    border-radius: 10px;
}

.fdv2-currency {
    padding: 10px;
    margin-top: 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--bs-gray-100);
    cursor: pointer;
}
.fdv2-currency:hover { border-color: var(--bs-primary); }
.fdv2-currency.is-active {
    border-color: var(--bs-primary);
    background: var(--bs-primary-light);
}

/* The reconciliation block that opens under the method grid. */
.fdv2-detail-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--bs-border-color);
}

/* --- toolbar --- */
.fdv2-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.fdv2-search { min-width: 220px; }

.fdv2-switch {
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--bs-border-color);
    border-radius: 6px;
    gap: 7px;
    margin: 0;
    cursor: pointer;
}

/* Menus are absolutely positioned by Bootstrap only once shown; anchor them to their trigger. */
.fdv2-menu {
    position: absolute;
    inset: 100% auto auto 0;
    z-index: 105;
    max-height: 260px;
    min-width: 200px;
    overflow-y: auto;
}

.fdv2-groupby {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    padding: 6px 8px;
    margin-bottom: 12px;
    border: 1px solid var(--bs-border-color);
    border-radius: 9px;
    background: var(--bs-gray-100);
}

/* --- transaction table --- */
.fdv2-table {
    border: 1px solid var(--bs-border-color);
    border-radius: 9px;
}

.fdv2-table > table { margin-bottom: 0; }

.fdv2-table thead th {
    background: var(--bs-gray-100);
    letter-spacing: 0.045em;
}

/* Metronic strips the outer padding off edge cells (.table:not(.table-bordered) th/td:first-child),
   which leaves the expander and the amount column flush against the table's own border. This table
   sits in a bordered box, so give those edges their gutter back — the selector carries one extra
   class so it outranks the theme rule without reaching for !important. The expanded-ticket row is
   excluded, so its panel keeps managing its own margins. */
.fdv2-table .table:not(.table-bordered) tr:not(.fdv2-detail-row) > *:first-child { padding-left: 14px; }
.fdv2-table .table:not(.table-bordered) tr:not(.fdv2-detail-row) > *:last-child { padding-right: 14px; }

.fdv2-row { cursor: pointer; }
.fdv2-row:hover > td { background: var(--bs-gray-100); }

.fdv2-expand-mark {
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    border-radius: 6px;
    background: var(--bs-gray-200);
    color: var(--bs-gray-700);
}

.fdv2-expander { width: 25px; height: 25px; }

.fdv2-group-row > td {
    background: var(--bs-primary-light);
    color: var(--bs-primary);
}

.fdv2-table-total {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    padding: 12px 14px;
    border-top: 1px solid var(--bs-border-color);
    background: var(--bs-gray-100);
}

/* --- expanded passenger tickets --- */
.fdv2-detail-row > td { padding: 0; background: var(--bs-gray-100); }

.fdv2-detail {
    margin: 10px 12px 14px;
    padding: 14px;
    border: 1px solid var(--bs-border-color);
    border-radius: 10px;
    background: var(--bs-body-bg);
}

.fdv2-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--bs-border-color);
}

.fdv2-ticket-head,
.fdv2-ticket {
    display: grid;
    grid-template-columns: minmax(170px, 1.35fr) minmax(140px, 1fr) minmax(140px, 0.8fr) minmax(90px, 0.5fr);
    align-items: center;
    gap: 14px;
}

.fdv2-ticket-head {
    padding: 0 12px 5px;
    color: var(--bs-gray-500);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.fdv2-ticket {
    padding: 9px 12px;
    margin-bottom: 7px;
    border-radius: 8px;
    background: var(--bs-gray-100);
}

@media (max-width: 991.98px) {
    .fdv2-ticket-head { display: none; }
    .fdv2-ticket { grid-template-columns: minmax(0, 1fr); }
    .fdv2-ticket > .text-end { text-align: start !important; }
}

/* --- passenger-type chip (T / L / E) --- */
.fdv2-type {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 20px;
    height: 18px;
    border-radius: 5px;
    font-size: 0.62rem;
    font-weight: 700;
}
.fdv2-type-local { background: var(--bs-primary-light); color: var(--bs-primary); }
.fdv2-type-tourist { background: var(--bs-success-light); color: var(--bs-success); }
.fdv2-type-expat { background: var(--bs-warning-light); color: var(--bs-warning); }
.fdv2-type-other { background: var(--bs-gray-200); color: var(--bs-gray-700); }

/* --- ticket-mix cards --- */
.fdv2-ticket-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 767.98px) {
    .fdv2-ticket-grid { grid-template-columns: minmax(0, 1fr); }
}

.fdv2-ticket-card {
    padding: 16px;
    border: 1px solid var(--bs-border-color);
    border-radius: 10px;
}

.fdv2-ticket-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 8px 0;
    border-top: 1px dashed var(--bs-border-color);
}

/* --- shared empty state --- */
.fdv2-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    padding: 2rem 1rem;
    text-align: center;
}
/* =================== end::Daily Finances V2 =================== */

/* =================== begin::Trip Management Wizard =================== */
/* Only what Metronic has no equivalent for: the step bar, the coverage matrix's sticky columns,
   the assignment board's two-pane layout, and the selectable trip/boat cards. Everything else on
   the wizard pages uses stock .card / .btn / .badge / .form-check / .table classes.
   Colours come from Metronic's CSS variables so the wizard follows the active theme. */

/* Metronic pins `i.bi` to a fixed 13px AND to `color: var(--bs-text-muted)`, so a Bootstrap-icon
   glyph inherits neither the font-size nor the colour of the badge it sits in. Every tick the wizard
   draws inside a coloured disc therefore has to be sized and coloured on the <i> itself — without
   this they render as ~13px grey specks on the disc's fill instead of white ticks. */
/* px, not rem: Metronic's root font-size is 13px, so rem values here land far smaller than they read. */
.tmw-step-num > i,
.tmw-selected-check > i,
.tmw-boat-check > i {
    font-size: 15px;
    font-weight: 700;
}

/* `inherit`, not a literal white: each disc already declares its own foreground, and the unselected
   boat tick has to follow its card rather than a hard-coded colour. */
.tmw-step-num > i,
.tmw-selected-check > i,
.tmw-boat-check > i,
.tmw-success-icon > i {
    color: inherit;
}

/* --- step bar --- */
.tmw-stepbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 1.25rem;
}

.tmw-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-align: start;
    background: var(--bs-card-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.625rem;
    /* The bar is a progress indicator first: a step you cannot reach yet should not read as
       disabled-grey, it should read as "not yet". Full opacity, muted text. */
    opacity: 1;
}

.tmw-step:disabled {
    cursor: default;
}

.tmw-step-num {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bs-gray-200);
    color: var(--bs-gray-600);
    font-size: 0.85rem;
    font-weight: 700;
}

.tmw-step-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tmw-step-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bs-gray-700);
    line-height: 1.3;
}

.tmw-step-desc {
    font-size: 0.75rem;
    color: var(--bs-gray-500);
}

.tmw-step-active {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 1px var(--bs-primary);
}

.tmw-step-active .tmw-step-num {
    background: var(--bs-primary);
    color: #fff;
}

.tmw-step-active .tmw-step-title {
    color: var(--bs-gray-900);
}

.tmw-step-done .tmw-step-num {
    background: var(--bs-success);
    color: #fff;
}

.tmw-step-done:not(:disabled):hover {
    border-color: var(--bs-success);
}

/* --- stage --- */
.tmw-stage {
    min-height: 60vh;
}

.tmw-stage-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.tmw-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--bs-primary);
}

.tmw-stage-title {
    margin: 0.25rem 0 0.35rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--bs-gray-900);
}

.tmw-stage-desc {
    margin: 0;
    font-size: 0.8rem;
    color: var(--bs-gray-600);
}

.tmw-section-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.tmw-section-title h3 {
    margin: 0 0 0.15rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--bs-gray-900);
}

.tmw-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid var(--bs-border-color);
}

.tmw-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 2rem 1rem;
    text-align: center;
}

/* --- step 1: trip cards --- */
/* Capped track + justify-content:start. A plain 1fr track leaves empty auto-fill columns on a wide
   screen (4 trips, 7 tracks), and auto-fit stretches a lone card across the whole page; capping the
   max keeps cards a readable width and packs them from the left in both cases. */
.tmw-trip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 330px));
    justify-content: start;
    gap: 12px;
}

.tmw-trip {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px;
    text-align: start;
    background: var(--bs-card-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.625rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tmw-trip:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 0.25rem 0.75rem rgb(0 0 0 / 6%);
}

.tmw-trip-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--bs-gray-900);
}

.tmw-trip-time {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bs-primary);
    line-height: 1.2;
}

.tmw-trip-route {
    font-size: 0.75rem;
    color: var(--bs-gray-600);
}

.tmw-trip-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--bs-border-color);
    font-size: 0.75rem;
}

.tmw-selected-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: var(--bs-primary-light);
    border: 1px solid var(--bs-primary);
    border-radius: 0.625rem;
}

.tmw-selected-check {
    display: grid;
    place-items: center;
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bs-success);
    color: #fff;
}

/* --- step 1: trip summary with neighbour peeks --- */
.tmw-overview {
    display: grid;
    grid-template-columns: minmax(150px, 0.55fr) minmax(0, 2.4fr) minmax(150px, 0.55fr);
    gap: 12px;
    align-items: stretch;
}

@media (max-width: 1199.98px) {
    .tmw-overview { grid-template-columns: minmax(0, 1fr); }
}

.tmw-peek {
    display: flex;
    flex-direction: column;
    /* The peek column is as tall as the summary card beside it. Centring keeps its three lines of
       text in the middle rather than stranded above a large empty panel. */
    justify-content: center;
    padding: 12px;
    background: var(--bs-gray-100);
    border: 1px dashed var(--bs-border-color);
    border-radius: 0.625rem;
}

.tmw-peek-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bs-gray-500);
}

.tmw-peek-btn {
    padding: 8px 0 0;
    text-align: start;
    background: none;
    border: 0;
}

.tmw-peek-btn:hover .fw-bold {
    color: var(--bs-primary) !important;
}

.tmw-peek-empty {
    opacity: 0.7;
}

.tmw-util {
    min-width: 220px;
}

/* Shared utilisation/load meter - step 1's trip summary and step 3's boat columns. */
.tmw-bar {
    height: 6px;
    border-radius: 99px;
    background: var(--bs-gray-200);
    overflow: hidden;
}

.tmw-bar > span {
    display: block;
    height: 100%;
    border-radius: 99px;
    transition: width 0.2s ease;
}

/* --- step 1: boat cards --- */
.tmw-boat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 285px));
    justify-content: start;
    gap: 12px;
}

.tmw-boat {
    position: relative;
    padding: 14px;
    background: var(--bs-card-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.625rem;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.tmw-boat:hover {
    border-color: var(--bs-primary);
}

.tmw-boat-on {
    border-color: var(--bs-primary);
    background: var(--bs-primary-light);
}

.tmw-boat-check {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 1px solid var(--bs-border-color);
    border-radius: 5px;
    background: var(--bs-card-bg);
    color: #fff;
    font-size: 0.7rem;
}

.tmw-boat-on .tmw-boat-check {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
}

/* --- step 2: coverage matrix --- */
.tmw-toggle {
    display: inline-flex;
    padding: 3px;
    background: var(--bs-gray-100);
    border-radius: 0.475rem;
}

.tmw-toggle > button {
    padding: 5px 12px;
    background: transparent;
    border: 0;
    border-radius: 0.375rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--bs-gray-600);
}

.tmw-toggle > button.tmw-toggle-on {
    background: var(--bs-card-bg);
    color: var(--bs-gray-900);
    box-shadow: 0 1px 3px rgb(0 0 0 / 8%);
}

/* The matrix scrolls sideways once there are more than a few boats; the stop and time columns stay
   pinned so a tick is never orphaned from the stop it belongs to. */
.tmw-matrix-wrap {
    max-height: 460px;
    overflow: auto;
}

.tmw-matrix thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bs-card-bg);
}

.tmw-matrix .tmw-matrix-stop,
.tmw-matrix .tmw-matrix-time {
    position: sticky;
    z-index: 1;
    background: var(--bs-card-bg);
}

.tmw-matrix .tmw-matrix-stop {
    inset-inline-start: 0;
    /* Absorbs the table's slack, so a single boat gets a normal-width lane instead of a 600px one
       with a lone checkbox adrift in it. Under pressure from several boats it collapses back to
       min-width, which is exactly the 190px the time column's sticky offset below assumes. */
    width: 100%;
    min-width: 190px;
}

/* The column is pinned to the SCROLL CONTAINER's edge, not to the table's cell padding, so without
   this the stop names sit hard against the card border and the leading "1." reads as clipped.
   Metronic zeroes exactly this cell (`.table:not(.table-bordered) td:first-child`) — right for a
   flush-left table, wrong for one whose first column is sticky — so the selector carries the extra
   `.table` to outrank it on specificity rather than reaching for !important. The padding sits inside
   the 190px border-box min-width above, so the time column's sticky offset is unaffected. */
.tmw-matrix.table th.tmw-matrix-stop,
.tmw-matrix.table td.tmw-matrix-stop {
    padding-inline-start: 12px;
}

.tmw-matrix .tmw-matrix-time {
    inset-inline-start: 190px;
    width: 1%;
    min-width: 110px;
}

.tmw-matrix thead .tmw-matrix-stop,
.tmw-matrix thead .tmw-matrix-time {
    z-index: 3;
}

/* Full width, with every non-boat column pinned to its own content (width:1% is the CSS idiom for
   "as narrow as the content allows"). All the slack therefore lands on the boat columns and is split
   between them, so one selected boat gets one wide lane instead of the table hugging its content and
   leaving most of the card empty. Once enough boats are selected their min-widths overflow and the
   wrapper above scrolls, which is when the sticky stop/time columns earn their keep. */
.tmw-matrix {
    width: 100%;
}

.tmw-matrix .tmw-matrix-flow {
    width: 1%;
    min-width: 130px;
    white-space: nowrap;
}

.tmw-matrix .tmw-matrix-boat {
    /* No width, so this is what absorbs the slack. min-width stops the two advanced checkboxes
       reflowing the table when the mode is switched. */
    min-width: 170px;
    border-inline-start: 1px dashed var(--bs-gray-300);
}

/* Every tick in a boat column sits behind a label of a different length — "Select all",
   "Board only", "Disembark only", "Board + disembark", "Skipped". Centring each label on its own
   staggers the boxes, because a longer label pushes its own box further left. Giving them all one
   width centres the BLOCK instead, so the boxes land on a single vertical line and the column
   reads as a column. Wide enough for the longest label ("Board + disembark") without wrapping. */
.tmw-matrix .tmw-matrix-boat label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 150px;
    text-align: start;
    white-space: nowrap;
}

/* The boxes themselves must not shrink, or a long label steals from them and breaks the same line. */
.tmw-matrix .tmw-matrix-boat label .form-check-input {
    flex: 0 0 auto;
    margin: 0;
}

/* Boarding / off-boarding counts, sized so a stop's activity reads at a glance next to its ticks. */
.tmw-flow-on,
.tmw-flow-off {
    display: inline-block;
    min-width: 34px;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.tmw-flow-on {
    background: var(--bs-success-light);
    color: var(--bs-success);
}

.tmw-flow-off {
    margin-inline-start: 4px;
    background: var(--bs-danger-light);
    color: var(--bs-danger);
}

.tmw-matrix-pair {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

/* A stop with passengers that no boat serves is the one thing blocking Next - mark the row, not just
   the footer alert. */
.tmw-matrix-gap .tmw-matrix-stop,
.tmw-matrix-gap .tmw-matrix-time,
.tmw-matrix-gap td {
    background: var(--bs-danger-light);
}

/* A stop nobody boards or leaves at: greyed rather than flagged, because unticking it is a
   legitimate choice and an unserved one must not read as an error. */
.tmw-matrix-idle .tmw-matrix-stop,
.tmw-matrix-idle .tmw-matrix-time,
.tmw-matrix-idle td {
    background: var(--bs-gray-100);
}

.tmw-menu-option {
    display: flex;
    flex-direction: column;
    gap: 1px;
    width: 100%;
    padding: 8px 14px;
    text-align: start;
    background: none;
    border: 0;
}

.tmw-menu-option:hover {
    background: var(--bs-gray-100);
}

.tmw-menu-switch {
    display: flex;
    align-items: flex-start;
    padding: 8px 14px;
    margin: 0;
    cursor: pointer;
}

/* --- step 3: assignment board --- */
.tmw-board {
    display: grid;
    grid-template-columns: minmax(260px, 0.85fr) minmax(0, 3fr);
    gap: 12px;
    align-items: start;
}

@media (max-width: 991.98px) {
    .tmw-board { grid-template-columns: minmax(0, 1fr); }
}

.tmw-boat-columns {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(265px, 420px));
    justify-content: start;
    gap: 12px;
}

.tmw-queue {
    min-height: 220px;
    max-height: 560px;
}

.tmw-bucket {
    min-height: 180px;
    max-height: 420px;
}

.tmw-boat-col {
    /* Keeps every column the same height regardless of how many cards it holds, so the drop targets
       stay aligned while dragging. */
    height: 100%;
}

.tmw-booking {
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tmw-booking:hover {
    box-shadow: 0 0.25rem 0.75rem rgb(0 0 0 / 8%);
}

.tmw-drag-handle {
    flex: none;
    color: var(--bs-gray-400);
    cursor: grab;
    line-height: 1;
}

.tmw-drag-handle:active {
    cursor: grabbing;
}

/* A region whose controls are mid-write. Dimmed and click-through rather than each control being
   individually disabled: the matrix and the boat grid are made of dozens of inputs, and a `disabled`
   on every one of them would also strip their labels' contrast. */
.tmw-busy {
    opacity: 0.55;
    pointer-events: none;
}

.tmw-messages {
    max-height: 220px;
}

.tmw-message {
    padding: 7px 0;
    border-bottom: 1px dashed var(--bs-border-color);
    font-size: 0.78rem;
    color: var(--bs-gray-700);
}

.tmw-message:last-child {
    border-bottom: 0;
}

/* --- step 3: success --- */
.tmw-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 380px;
    padding: 2rem 1rem;
    text-align: center;
}

.tmw-success-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 1.25rem;
    border-radius: 50%;
    background: var(--bs-success);
    color: #fff;
    line-height: 1;
}

.tmw-success-icon > i {
    font-size: 30px;
}

.tmw-success-icon-sm {
    width: 40px;
    height: 40px;
    margin-bottom: 0.5rem;
}

.tmw-success-icon-sm > i {
    font-size: 18px;
}
/* =================== end::Trip Management Wizard =================== */
