body {
    background-color: #f6f7f9;
    color: #1f2933;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-navbar {
    background: #202b34;
    min-height: 66px;
    --grl-nav-accent: #0b827a;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.app-navbar .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #bdc8cd;
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: 0.84rem 0.5rem 0.71rem !important;
    white-space: nowrap;
    font-size: 0.91rem;
    font-weight: 600;
    transition: color 150ms ease, border-color 150ms ease;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link.active,
.app-navbar .nav-link[aria-expanded="true"] {
    color: #fff;
    background: transparent;
    border-bottom-color: var(--grl-nav-accent);
    box-shadow: none;
}

.app-navbar .nav-link > i { display: none; }

.app-navbar .workspace-nav-link {
    display: inline-flex;
    align-items: center;
    color: #bdc8cd;
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: 0.84rem 0.5rem 0.71rem !important;
    font-size: 0.91rem;
    font-weight: 600;
    letter-spacing: normal;
    box-shadow: none;
}

.app-navbar .workspace-nav-link:hover,
.app-navbar .workspace-nav-link:focus,
.app-navbar .workspace-nav-link.active,
.app-navbar .workspace-nav-link[aria-expanded="true"] {
    color: #fff;
    background: transparent;
    border-bottom-color: var(--grl-nav-accent);
    box-shadow: none;
}

.app-navbar .dropdown-menu {
    border-color: #dfe5e8;
    border-radius: 0.35rem;
    box-shadow: 0 0.75rem 1.75rem rgba(13, 32, 42, 0.15);
}

.dispatch-mega-menu {
    --dispatch-menu-text: #202e38;
    width: min(360px, calc(100vw - 1rem));
    max-height: calc(100vh - 86px);
    padding: 0.45rem;
    overflow-x: hidden;
    overflow-y: auto;
    color: var(--dispatch-menu-text);
    background: #fff;
    border: 1px solid #dfe5e8 !important;
    border-radius: 0.35rem;
}

.dispatch-mega-heading {
    padding: 0.5rem 0.6rem 0.4rem;
    color: #63727d;
    background: transparent;
}

.dispatch-mega-heading strong { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.dispatch-mega-grid { display: block; padding: 0; }

.dispatch-menu-card {
    position: relative;
    min-width: 0;
    margin: 0;
    padding: 0.45rem 0.6rem;
    color: var(--dispatch-menu-text);
    text-decoration: none;
    background: transparent;
    border: 0;
    border-radius: 0.25rem;
    box-shadow: none;
}

a.dispatch-menu-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.65rem;
    min-height: 0;
    margin-bottom: 0.12rem;
}

.dispatch-menu-card:hover,
.dispatch-menu-card:focus-within,
.dispatch-menu-card.is-current {
    color: var(--dispatch-menu-text);
    background: #edf6f5;
    box-shadow: none;
    transform: none;
}

.dispatch-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.4rem;
    flex: 0 0 1.15rem;
    color: #71818a;
    background: transparent;
    border-radius: 0;
    font-size: 1rem;
}

.dispatch-menu-card strong,
.dispatch-menu-card small { display: block; }
.dispatch-menu-card strong { font-size: 0.96rem; line-height: 1.3; font-weight: 600; }
.dispatch-menu-card small { margin-top: 0.12rem; color: #586b78; font-size: 0.8rem; line-height: 1.35; }
.dispatch-menu-arrow { display: none; }
.dispatch-menu-section-title { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.15rem; }
.dispatch-menu-section-title .dispatch-menu-icon { display: none; }
.dispatch-menu-section-title strong { color: #596c78; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.dispatch-menu-section-title small { display: none; }
.dispatch-menu-card + .dispatch-menu-card { margin-top: 0.1rem; }
.dispatch-menu-card:not(a.dispatch-menu-card) { margin-top: 0.35rem; border-top: 1px solid #e5e9ec; border-radius: 0; padding-top: 0.8rem; }
.dispatch-menu-links { display: grid; gap: 0.05rem; margin-left: 0; }
.dispatch-menu-links a { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.1rem; color: #263742; border-radius: 0.25rem; font-size: 0.9rem; font-weight: 500; line-height: 1.3; text-decoration: none; }
.dispatch-menu-links a i { width: 1.15rem; color: #71818a; text-align: center; }
.dispatch-menu-links a:hover, .dispatch-menu-links a:focus { color: #18342f; background: #edf6f5; }
.dispatch-menu-links form { margin: 0; }
.dispatch-menu-links .dispatch-menu-action { display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.6rem 0.1rem; color: #263742; background: transparent; border: 0; border-radius: 0.25rem; font-size: 0.9rem; font-weight: 500; line-height: 1.3; text-align: left; cursor: pointer; }
.dispatch-menu-links .dispatch-menu-action i { width: 1.15rem; color: #71818a; text-align: center; }
.dispatch-menu-links .dispatch-menu-action:hover, .dispatch-menu-links .dispatch-menu-action:focus { color: #18342f; background: #edf6f5; }

.app-navbar .dropdown-menu-dark {
    --bs-dropdown-color: #202e38;
    --bs-dropdown-bg: #fff;
    --bs-dropdown-border-color: #dfe5e8;
    --bs-dropdown-link-color: #263742;
    --bs-dropdown-link-hover-color: #18342f;
    --bs-dropdown-link-hover-bg: #edf6f5;
    --bs-dropdown-link-active-color: #18342f;
    --bs-dropdown-link-active-bg: #edf6f5;
    --bs-dropdown-divider-bg: #e5e9ec;
    min-width: 14rem;
    padding: 0.4rem;
}

.app-navbar .dropdown-menu-dark .dropdown-item { border-radius: 0.25rem; font-size: 0.9rem; padding: 0.6rem; }
.app-navbar .dropdown-menu-dark .dropdown-item i { color: #71818a; margin-right: 0.3rem; }
.app-navbar .dropdown-menu-dark .dropdown-item.text-warning { color: #9a4a20 !important; }
.app-navbar .customer-workspace-menu { min-width: 18rem; }
#vericlock-profiles { scroll-margin-top: 5rem; }

@media (min-width: 1400px) {
    .dispatch-nav-item, .driver-nav-item, .workspace-mega-nav-item { position: relative; }
    .dispatch-mega-menu { left: 0; transform: none; margin-top: 0 !important; }
    .account-mega-menu { left: auto; right: 0; }
}

@media (max-width: 1399.98px) {
    .app-navbar .navbar-collapse { max-height: calc(100dvh - 76px); overflow-y: auto; overscroll-behavior: contain; }
    .app-navbar .navbar-toggler { min-width: 44px; min-height: 44px; }
    .dispatch-mega-menu { width: min(420px, 100%); max-height: 60vh; margin: 0 0 0.4rem !important; }
    #navContent > .navbar-nav > .nav-item > .nav-link { width: 100%; margin-top: 0; }
    .app-navbar .workspace-nav-link { padding: 0.75rem 0.5rem !important; }
}

@media (max-width: 575.98px) {
    .app-navbar .navbar-collapse { max-height: calc(100dvh - 68px); }
    .dispatch-mega-menu { width: 100%; max-height: 55vh; }
}

.app-main {
    max-width: 1800px;
    margin: 0 auto;
}

.card {
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border-radius: 0.5rem;
}

.page-shell {
    width: 100%;
    margin: 0 auto;
}

.container-sheet-page { max-width: none; }
.sheet-toolbar { display: flex; align-items: end; gap: 1rem; flex-wrap: wrap; padding: 1rem 0; }
.sheet-toolbar .intake-mode-switch { margin-bottom: 0; align-self: flex-end; }
.sheet-toolbar label { font-size: .75rem; font-weight: 600; color: #586574; }
.sheet-toolbar label input { max-width: 7rem; }
.sheet-help { font-size: .8rem; color: #586574; margin: .65rem 0; }
.sheet-scroll { max-height: 62vh; overflow: auto; border: 1px solid #cdd6df; border-radius: 8px; background: white; }
.sheet-place-results { position: fixed; z-index: 2000; background: white; color: #202b35; border: 1px solid #cdd6df; border-radius: 8px; box-shadow: 0 6px 20px #0002; }
.sheet-place-results [role="listbox"] { max-height: 180px; overflow: auto; }
.sheet-place-results [role="option"] { padding: 9px 12px; cursor: pointer; font-size: 14px; border-bottom: 1px solid #edf0f3; }
.sheet-place-results [role="option"]:hover, .sheet-place-results [aria-selected="true"] { background: #e8f0fe; }
.sheet-google-attribution { padding: 8px 12px; font-family: Roboto, sans-serif; font-style: normal; font-weight: 400; font-size: 12px; letter-spacing: normal; white-space: nowrap; color: #5e5e5e; }
.container-entry-sheet { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .82rem; }
.container-entry-sheet th, .container-entry-sheet td { border-right: 1px solid #dee5eb; border-bottom: 1px solid #dee5eb; padding: 0; }
.container-entry-sheet thead th { position: sticky; top: 0; z-index: 2; background: #eef3f7; padding: .7rem .5rem; white-space: nowrap; color: #34495e; font-weight: 600; }
.container-entry-sheet .sheet-row-number { position: sticky; left: 0; z-index: 1; min-width: 36px; text-align: center; background: #eef3f7; color: #738294; }
.container-entry-sheet thead .sheet-row-number { z-index: 3; }
.container-entry-sheet input { display: block; width: 100%; min-width: 110px; border: 0; border-radius: 0; padding: .65rem .5rem; background: transparent; font: inherit; color: #243549; }
.container-entry-sheet [data-column="customer"] input { min-width: 195px; }
.container-entry-sheet [data-column="container_number"] input, .container-entry-sheet [data-column="booking_number"] input { min-width: 155px; }
.container-entry-sheet [data-column="pickup_location"] input, .container-entry-sheet [data-column="dropoff_location"] input { min-width: 165px; }
.container-entry-sheet [data-column="dispatcher_notes"] input { min-width: 180px; }
.container-entry-sheet [data-column="driver"] input { min-width: 220px; }
.container-entry-sheet [data-column="start_location"] input, .container-entry-sheet [data-column="instructions"] input { min-width: 210px; }
.driver-entry-sheet [data-column="driver_classification"] input, .driver-entry-sheet [data-column="name"] input { min-width: 175px; }
.driver-entry-sheet [data-column="address"] input { min-width: 240px; }
.driver-entry-sheet [data-column="email"] input { min-width: 190px; }
.container-entry-sheet [data-driver-info] { text-align: left; min-width: 130px; white-space: nowrap; }
.container-entry-sheet [data-column="scheduled_pickup_time"] input, .container-entry-sheet [data-column="container_size"] input { min-width: 85px; }
.driver-data-tabs { gap: .4rem; overflow-x: auto; flex-wrap: nowrap; padding-bottom: .15rem; }
.driver-data-tabs .nav-link { padding: .65rem 1rem; border: 1px solid var(--bs-border-color); color: var(--bs-secondary-color); font-size: .95rem; font-weight: 600; white-space: nowrap; }
.driver-data-tabs .nav-link.active { border-color: var(--bs-primary); color: #fff; }
.app-main .nav-tabs > .nav-item > .nav-link { padding: .65rem .9rem; font-size: .95rem; }
.container-entry-sheet [data-column="dangerous_goods"] { background: #fff8dc; }
.container-entry-sheet [data-column="dangerous_goods"] input { min-width: 135px; }
.container-entry-sheet tbody tr:nth-child(even) { background: #f8fafc; }
.container-entry-sheet tbody tr:focus-within { background: #eff6ff; }
.container-entry-sheet tbody tr.sheet-existing-duplicate,
.container-entry-sheet tbody tr.sheet-existing-duplicate:nth-child(even) { background: #fff1f0; }
.container-entry-sheet tbody tr.sheet-existing-duplicate .sheet-row-number { min-width: 78px; color: #a1261d; background: #ffe4e1; }
.sheet-existing-label { display: block; margin-top: .15rem; font-size: .58rem; font-weight: 700; line-height: 1.05; text-transform: uppercase; letter-spacing: .02em; }
.container-entry-sheet input:focus { outline: 2px solid #2563eb; outline-offset: -2px; background: #fff; }
.container-entry-sheet .sheet-estimate { padding: .5rem; text-align: right; min-width: 85px; background: #f2f7f5; color: #53665d; font-variant-numeric: tabular-nums; }
.container-entry-sheet .sheet-total { font-weight: 700; }
.container-entry-sheet .sheet-row-actions { white-space: nowrap; padding: .25rem; }
.sheet-row-actions button { border: 0; background: transparent; color: #3368a5; padding: .4rem; }
.sheet-row-actions button:hover { background: #e2ebf5; }
.container-entry-sheet tr.sheet-duplicate [data-column="container_number"] { background: #ffe1df; }
.sheet-save-bar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 1rem; padding: 1rem; background: #fff; border: 1px solid #dbe3eb; border-radius: 8px; z-index: 4; flex-wrap: wrap; box-shadow: 0 -3px 12px #24354908; }

.page-shell-narrow {
    max-width: 1050px;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-kicker {
    color: #6b7280;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.workflow-steps {
    display: flex;
    align-items: center;
    max-width: 850px;
    margin: 0 auto 1.5rem;
    padding: 0.9rem 1.1rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
}

.workflow-step {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #8a94a1;
    min-width: 185px;
    text-decoration: none;
}

.workflow-step > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    border: 1px solid #d7dce2;
    font-weight: 700;
}

.workflow-step strong,
.workflow-step small {
    display: block;
    line-height: 1.2;
}

.workflow-step small {
    margin-top: 0.15rem;
    font-size: 0.75rem;
}

.workflow-step.active {
    color: #0d6efd;
}

.workflow-step.active > span {
    color: #fff;
    border-color: #0d6efd;
    background: #0d6efd;
}

.workflow-step.complete {
    color: #198754;
}

.workflow-step.complete > span {
    color: #fff;
    border-color: #198754;
    background: #198754;
}

.workflow-line {
    height: 1px;
    flex: 1;
    margin: 0 0.9rem;
    background: #dfe3e8;
}

.workflow-line.complete {
    background: #198754;
}

.form-card {
    border: 1px solid #e7eaee;
    box-shadow: 0 0.35rem 1.5rem rgba(31, 41, 51, 0.06);
}

.form-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding-bottom: 0.75rem;
    margin-bottom: 1.1rem;
    border-bottom: 1px solid #edf0f2;
}

.form-card .form-label {
    font-weight: 600;
    color: #374151;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    padding: 1rem 1.5rem;
    background: #fbfcfd;
    border-top: 1px solid #e9ecef;
}

.dashboard-shell {
    max-width: 1600px;
    margin: 0 auto;
}

.owner-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.8rem;
}

.owner-kpi {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    color: #1f2933;
    background: #fff;
    border: 1px solid #e7eaee;
    border-radius: 0.65rem;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.owner-kpi:hover {
    color: #1f2933;
    border-color: #cbd3dc;
    transform: translateY(-1px);
    box-shadow: 0 0.35rem 1rem rgba(31, 41, 51, 0.07);
}

.owner-kpi-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 0.55rem;
    font-size: 1.1rem;
}

.owner-kpi strong,
.owner-kpi small {
    display: block;
}

.owner-kpi strong {
    font-size: 1.45rem;
    line-height: 1.05;
}

.owner-kpi small {
    color: #6b7280;
    margin-top: 0.2rem;
    white-space: nowrap;
}

.owner-kpi-attention {
    border-color: rgba(13, 110, 253, 0.35);
}

.owner-kpi-danger {
    border-color: rgba(220, 53, 69, 0.45);
}

.owner-panel {
    border: 1px solid #e7eaee;
    overflow: hidden;
}

.owner-panel .card-header {
    padding: 1rem 1.15rem;
}

.planning-drag-board {
    background: linear-gradient(180deg, #f8faff 0, #f4f7fb 100%);
    border-color: #dce4ef;
    box-shadow: 0 12px 34px rgba(28, 48, 74, 0.08);
}

.app-main:has(.planning-page-shell) {
    max-width: none;
    padding-top: 1rem !important;
    padding-right: clamp(.6rem, 1.2vw, 1.35rem) !important;
    padding-left: clamp(.6rem, 1.2vw, 1.35rem) !important;
}

.planning-page-shell { max-width: none; }

.planning-workflow-strip {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1.15rem;
    border-top: 1px solid #edf1f5;
    border-bottom: 1px solid #e4eaf1;
    background: #f8fafc;
    color: #536172;
    font-size: 0.78rem;
}

.planning-workflow-strip span { white-space: nowrap; }
.planning-workflow-strip strong {
    display: inline-grid;
    place-items: center;
    width: 1.35rem;
    height: 1.35rem;
    margin-right: 0.2rem;
    border-radius: 50%;
    background: #0d6efd;
    color: #fff;
    font-size: 0.7rem;
}
.planning-workflow-strip > i { color: #aab3bd; }

.planning-board-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 0.65rem;
    padding: 0.85rem 1rem 0;
}

.planning-board-toolbar label { min-width: 165px; color: #667085; font-size: 0.75rem; font-weight: 600; }
.planning-board-toolbar label > span { display: block; margin-bottom: 0.2rem; }
.planning-search { position: relative; flex: 1 1 320px; }
.planning-search i { position: absolute; left: 0.8rem; bottom: 0.7rem; color: #7d8793; z-index: 1; }
.planning-search input { padding-left: 2.35rem; }
.planning-visible-summary { margin-left: auto; padding-bottom: 0.55rem; color: #667085; font-size: 0.78rem; }
.planning-publish-status { min-height: 0; padding: 0 1.15rem; }
.planning-publish-status:not(:empty) { padding-top: 0.75rem; }
.planning-publish-status.is-draft,
.planning-publish-status.is-publishing { color: #7a4b00; }
.planning-publish-status.is-success { color: #146c43; }
.planning-publish-status.is-error { color: #b02a37; font-weight: 600; }

.planning-publish-footer { position: sticky; bottom: 0; z-index: 3; box-shadow: 0 -8px 20px rgba(28, 48, 74, 0.08); }

.planning-lanes {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem;
}

.planning-lane {
    min-width: 0;
    min-height: 178px;
    max-height: 620px;
    border: 1px solid #dfe5ec;
    border-radius: 0.8rem;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.planning-lane.is-drop-target {
    border-color: #0d6efd;
    background: #eef5ff;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
}

.planning-lane.is-unavailable { border-color: #efb6bd; background: #fffafb; }
.planning-lane.is-unavailable .planning-lane-heading { background: #fff1f2; }
.planning-unassigned {
    border-color: #e6bd70;
    box-shadow: 0 4px 14px rgba(43, 55, 72, 0.1);
}
.planning-unassigned .planning-lane-heading { background: #fff8e7; }

.planning-lane-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.8rem 0.85rem;
    border-bottom: 1px solid #edf0f4;
}

.planning-lane-heading strong,
.planning-lane-heading small { display: block; }
.planning-lane-heading small { color: #6b7280; margin-top: 0.15rem; }

.planning-lane-count {
    min-width: 2rem;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: #edf1f5;
    color: #4b5563;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.planning-lane-cards { min-height: 118px; max-height: 555px; padding: 0.65rem; overflow-y: auto; }

.planning-card {
    display: block;
    margin-bottom: 0.6rem;
    padding: 0.7rem;
    border: 1px solid #dfe4ea;
    border-left: 4px solid #0d6efd;
    border-radius: 0.65rem;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 2px 7px rgba(31, 41, 55, 0.07);
}

.planning-time-off-card {
    display: block;
    margin-bottom: 0.6rem;
    padding: 0.7rem;
    border: 1px solid #efb6bd;
    border-left: 4px solid #dc3545;
    border-radius: 0.65rem;
    background: #fff1f2;
    color: inherit;
    box-shadow: 0 2px 7px rgba(31, 41, 55, 0.07);
}

.planning-card[draggable="true"] { cursor: grab; }
.planning-card[draggable="true"]:active { cursor: grabbing; }
.planning-card.is-dragging { opacity: 0.45; }
.planning-card.has-draft-change { border-color: #f0ad2c; border-left-color: #f0ad2c; background: #fff9e9; }
.planning-card.is-locked { border-left-color: #6c757d; background: #f6f7f8; }
.planning-card-needs-details { border-left-color: #adb5bd; }

.planning-card-top { display: flex; gap: 0.35rem; align-items: center; margin-bottom: 0.4rem; }
.planning-drag-handle { margin-left: auto; color: #8a939d; font-size: 1.15rem; }
.planning-card-customer {
    margin-top: 0.15rem;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 700;
}
.planning-route { margin-top: 0.35rem; line-height: 1.3; }

.planning-touch-move {
    display: block;
    margin-top: 0.55rem;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 600;
}

.planning-touch-move select { margin-top: 0.2rem; }
.planning-card-open {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.55rem;
    color: #0b5ed7;
    font-size: 0.76rem;
    font-weight: 700;
    text-decoration: none;
}
.planning-card-open:hover { text-decoration: underline; }
.planning-lock-note { margin-top: 0.55rem; color: #5f6872; font-size: 0.75rem; font-weight: 600; }

.planning-drag-board.is-compact .planning-card { padding: 0.5rem 0.6rem; margin-bottom: 0.4rem; }
.planning-drag-board.is-compact .planning-time-off-card { padding: 0.5rem 0.6rem; margin-bottom: 0.4rem; }
.planning-drag-board.is-compact .planning-route,
.planning-drag-board.is-compact .planning-touch-move,
.planning-drag-board.is-compact .planning-card-open { display: none; }
.planning-drag-board.is-compact .planning-lane-cards { max-height: 470px; }

.planning-support-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.25rem 0 0.65rem;
    padding: 0 0.25rem;
}
.planning-support-heading strong,
.planning-support-heading span { display: block; }
.planning-support-heading span { color: #6b7280; font-size: 0.8rem; }

.planning-support-panel {
    overflow: hidden;
    border: 1px solid #e1e7ee;
    border-radius: 0.75rem;
    background: #fff;
}

.planning-support-panel > summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    background: #fff;
    cursor: pointer;
    list-style: none;
}
.planning-support-panel > summary::-webkit-details-marker { display: none; }
.planning-support-panel > summary::after {
    content: '\F282';
    order: 3;
    color: #667085;
    font-family: bootstrap-icons;
    transition: transform 0.15s ease;
}
.planning-support-panel[open] > summary::after { transform: rotate(180deg); }
.planning-support-panel[open] > summary { border-bottom: 1px solid #e7ebf0; background: #f8fafc; }
.planning-support-panel > summary > span:first-child { display: grid; grid-template-columns: 1.6rem auto; align-items: center; }
.planning-support-panel > summary > span:first-child > i { grid-row: 1 / 3; color: #0d6efd; font-size: 1.1rem; }
.planning-support-panel > summary strong,
.planning-support-panel > summary small { display: block; }
.planning-support-panel > summary small { color: #6b7280; font-size: 0.76rem; font-weight: 400; }

.planning-recommendations-table { max-height: min(70vh, 720px); }
.planning-recommendations-table thead th { position: sticky; top: 0; z-index: 1; }

@media (max-width: 1199.98px) {
    .planning-lanes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
    .planning-lanes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
    .planning-workflow-strip { overflow-x: auto; }
    .planning-board-toolbar { align-items: stretch; }
    .planning-board-toolbar label,
    .planning-search { flex-basis: 100%; }
    .planning-visible-summary { width: 100%; margin-left: 0; }
    .planning-lanes { grid-template-columns: minmax(0, 1fr); }
    .planning-lane,
    .planning-drag-board.is-compact .planning-lane { max-height: none; }
    .planning-lane-cards { max-height: none; }
    .planning-unassigned { box-shadow: none; }
    .planning-card[draggable="true"] { cursor: default; }
    .planning-support-panel > summary small { display: none; }
    .planning-publish-footer .btn { width: 100%; }
}

.owner-list-row {
    padding: 0.9rem 1.15rem;
    border-left: 0;
    border-right: 0;
}

.owner-compact-table td,
.owner-compact-table th {
    padding: 0.75rem 1rem;
}

.owner-compact-table tbody tr {
    cursor: pointer;
}

.empty-panel {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.65rem;
    color: #7b8490;
}

.empty-panel i {
    font-size: 2rem;
}

.min-w-0 {
    min-width: 0;
}

.dispatch-tabs {
    display: inline-flex;
    gap: 0.25rem;
    padding: 0.25rem;
    background: #e9edf2;
    border-radius: 0.65rem;
}

.dispatch-tabs a {
    padding: 0.5rem 0.9rem;
    color: #5d6672;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.48rem;
}

.dispatch-tabs a.active {
    color: #182129;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.trip-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    color: #0d6efd;
    background: #e7f1ff;
    font-weight: 700;
}

.invoice-rate-summary {
    background: #f7f8fa;
    border: 1px solid #e5e8ec;
    border-radius: 0.65rem;
    padding: 0.8rem 0.9rem;
}

.sheet-quick-fill {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 0.65rem;
    padding: 0.75rem;
    border: 1px solid #e1e5ea;
    border-radius: 0.65rem;
    background: #fff;
}

.sheet-paste-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 0.65rem;
    align-items: end;
    padding: 0.9rem;
    border: 2px dashed #9dbce8;
    border-radius: 0.7rem;
    background: #f7faff;
}

.sheet-paste-panel label { grid-column: 1 / -1; }
.sheet-paste-panel label span { display: block; color: #67717d; font-size: 0.82rem; font-weight: 400; }
.sheet-paste-panel textarea { min-height: 76px; resize: vertical; }

.sheet-smart-paste {
    border-color: #78a7e8;
    background: linear-gradient(135deg, #f7faff 0%, #eef6ff 100%);
}

button, .btn {
    touch-action: manipulation;
}

.workflow-step:hover {
    color: #0d6efd;
}

.container-entry-sheet input.sheet-smart-value,
.container-entry-sheet select.sheet-smart-value {
    background: #e8f3ff;
    box-shadow: inset 0 0 0 2px #6ea8fe;
}

@media (max-width: 700px) {
    .sheet-paste-panel { grid-template-columns: 1fr; }
}

.sheet-quick-fill > strong { align-self: center; margin-right: 0.25rem; }
.sheet-quick-fill label { min-width: 190px; font-size: 0.8rem; font-weight: 600; color: #5f6873; }

.intake-mode-switch {
    display: inline-flex;
    gap: 0.25rem;
    padding: 0.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    background: #fff;
}

.intake-mode-switch > a,
.intake-mode-switch > span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 0.55rem;
    color: #5b6570;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.intake-mode-switch > .active {
    color: #fff;
    background: #20262d;
    box-shadow: 0 2px 6px rgba(32, 38, 45, 0.18);
}

.bulk-list-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.bulk-count {
    flex: 0 0 auto;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: #e8f1ff;
    color: #0d6efd;
    font-size: 0.85rem;
    font-weight: 700;
}

.bulk-container-input {
    min-height: 13rem;
    padding: 1rem;
    border-color: #cbd3dc;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    line-height: 1.7;
    resize: vertical;
}

.bulk-container-input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.22rem rgba(13, 110, 253, 0.12);
}

.bulk-review {
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.65rem;
    background: #f7f9fc;
}

.bulk-review summary { cursor: pointer; font-weight: 600; }
.bulk-review ol { max-height: 16rem; overflow: auto; }
.bulk-review li { padding: 0.15rem 0; font-family: monospace; }

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.stat-card {
    transition: transform 0.15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    border-bottom-width: 1px;
}

.entry-row select,
.entry-row input {
    font-size: 0.85rem;
    padding: 0.3rem 0.5rem;
}

.entry-row td {
    vertical-align: middle;
    padding: 0.35rem 0.25rem;
}

.navbar-brand-logo {
    height: 34px;
    width: auto;
    max-width: min(118px, 38vw);
    object-fit: contain;
    display: block;
}

.login-page-logo {
    display: block;
    width: auto;
    max-width: min(240px, 72vw);
    height: auto;
    margin-left: auto;
    margin-right: auto;
    object-fit: contain;
}

.btn-sm {
    font-size: 0.8rem;
}

input[type="time"] {
    min-width: 100px;
}

input[type="number"] {
    min-width: 65px;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15);
}

.browse-hero {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 1rem 1.25rem;
}

.browse-logo {
    width: 170px;
    max-width: 36vw;
    height: auto;
}

.browse-health-score {
    font-size: 2.15rem;
    font-weight: 800;
    line-height: 1;
    color: #be1e2d;
}

.ops-hero-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    text-align: right;
}

.ops-hero-value {
    display: block;
    font-size: 1.9rem;
    line-height: 1;
    font-weight: 800;
    color: #be1e2d;
}

.ops-hero-label {
    display: block;
    font-size: 0.76rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0;
}

.ops-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
}

.ops-kpi {
    min-height: 86px;
    padding: 0.9rem 1rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.ops-kpi-label {
    font-size: 0.74rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0;
    font-weight: 700;
}

.ops-kpi-value {
    margin-top: 0.25rem;
    font-size: 1.75rem;
    line-height: 1.1;
    font-weight: 800;
    color: #212529;
}

.ops-panel .card-header {
    min-height: 48px;
}

.chart-box {
    position: relative;
    width: 100%;
}

.chart-box-lg {
    min-height: 360px;
    height: 42vh;
    max-height: 480px;
}

.chart-box-md {
    min-height: 320px;
    height: 36vh;
    max-height: 420px;
}

.daily-activity-chart-wrap {
    width: 100%;
    min-width: 0;
}

.chart-box-daily-combined {
    width: 100%;
    min-height: 320px;
    height: 38vh;
    max-height: 440px;
}

.chart-interactive-wrap {
    position: relative;
}

.chart-interactive-toolbar {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
}

.chart-interactive-toolbar .btn {
    --bs-btn-padding-y: 0.28rem;
    --bs-btn-padding-x: 0.55rem;
    font-size: 0.8rem;
}

/* Browse: productivity scatter + rank table — shared plot height */
.browse-productivity-row {
    --productivity-chart-h: clamp(280px, 38vh, 420px);
}

.browse-productivity-row .chart-box-productivity {
    width: 100%;
    height: var(--productivity-chart-h);
    min-height: 260px;
    max-height: 420px;
    padding-top: 2.1rem;
}

.browse-productivity-row .ops-rank-scroll {
    height: var(--productivity-chart-h);
    min-height: 260px;
    max-height: 420px;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.browse-productivity-row .rank-panel-body {
    min-height: 0;
}

.browse-productivity-row .ops-rank-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: var(--bs-table-bg, #f8f9fa);
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.06);
}

@media (max-width: 1199.98px) {
    .browse-productivity-row .ops-rank-scroll {
        height: auto;
        max-height: min(480px, 58vh);
    }

    .browse-productivity-row .chart-box-productivity {
        height: clamp(280px, 44vh, 400px);
        max-height: none;
    }
}

.chart-interactive-wrap:fullscreen {
    display: flex;
    flex-direction: column;
    background: #fff;
    padding: 1rem;
    box-sizing: border-box;
}

.chart-interactive-wrap:fullscreen .chart-box-productivity {
    flex: 1;
    min-height: 0;
    height: calc(100vh - 5rem);
    max-height: none;
}

.health-item-stack {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.health-label-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-weight: 700;
}

.health-hint {
    font-size: 0.78rem;
    line-height: 1.35;
    display: block;
    font-weight: 400;
}

.performance-grid,
.mix-list,
.health-list {
    display: grid;
    gap: 0.85rem;
}

.driver-rank-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
}

.rank-badge {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #be1e2d;
    color: #fff;
    font-weight: 700;
}

.rank-badge-sm {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
}

.ops-rank-table td,
.ops-rank-table th {
    white-space: nowrap;
}

.driver-rank-main {
    min-width: 0;
}

.metric-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 999px;
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    border-radius: 999px;
}

.health-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.health-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.scatter-chart {
    width: 100%;
    min-height: 260px;
}

.chart-axis {
    stroke: #212529;
    stroke-width: 1.5;
}

.chart-label,
.driver-dot-label {
    fill: #495057;
    font-size: 11px;
}

.driver-dot {
    fill: rgba(190, 30, 45, 0.72);
    stroke: #8f1721;
    stroke-width: 1.5;
}

.daily-trend {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(34px, 1fr);
    gap: 0.55rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.trend-day {
    min-width: 34px;
}

.trend-bars {
    height: 130px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    border-bottom: 1px solid #ced4da;
}

.trend-bar {
    width: 10px;
    min-height: 2px;
    border-radius: 4px 4px 0 0;
}

.trend-bar.hours {
    background: #0d6efd;
}

.trend-bar.containers {
    background: #198754;
}

.trend-label {
    margin-top: 0.35rem;
    text-align: center;
    font-size: 0.72rem;
    color: #6c757d;
}

.ops-watchlist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.ops-watchlist > div {
    min-height: 74px;
    padding: 0.85rem;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 0.5rem;
    background: #f8f9fa;
}

.ops-watchlist span {
    display: block;
    color: #6c757d;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.ops-watchlist strong {
    display: block;
    margin-top: 0.2rem;
    font-size: 1.55rem;
    line-height: 1;
}

.geotab-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
}

.geotab-kpi-text {
    margin-top: 0.35rem;
    font-size: 1rem;
    line-height: 1.2;
    font-weight: 800;
    color: #212529;
}

.geotab-review-table-wrap {
    max-height: 70vh;
}

.geotab-review-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f8f9fa;
}

.geotab-review-table td,
.geotab-review-table th {
    white-space: nowrap;
}

.geotab-trip-detail-wrap {
    max-height: 420px;
    overflow-y: auto;
}

.ai-summary-box {
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.45;
    background: #f8f9fa;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.5rem;
    padding: 0.9rem;
}

.dispatch-counter {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dispatch-counter:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.3rem 0.8rem rgba(0, 0, 0, 0.08);
}

.dispatch-grid thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8f9fa;
    white-space: nowrap;
}

.dispatch-notes-row td {
    border-top: 0;
}

@media (max-width: 768px) {
    .browse-logo {
        width: 130px;
    }

    .browse-health-score {
        font-size: 1.7rem;
    }

    .ops-hero-metrics {
        width: 100%;
        text-align: left;
    }

    .chart-box-lg,
    .chart-box-md,
    .chart-box-daily-combined {
        height: 340px;
        min-height: 340px;
    }
}

@media (max-width: 1200px) {
    .owner-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ops-kpi-grid,
    .geotab-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-heading > :last-child {
        width: 100%;
    }

    .page-heading .btn {
        flex: 1;
    }

    .owner-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .owner-kpi {
        align-items: flex-start;
        flex-direction: column;
    }

    .owner-kpi small {
        white-space: normal;
    }

    .workflow-steps {
        align-items: flex-start;
    }

    .workflow-step {
        min-width: 0;
        flex: 1;
    }

    .workflow-step small {
        display: none;
    }

    .workflow-line {
        margin-top: 1rem;
    }

    .ops-kpi-grid,
    .geotab-kpi-grid,
    .ops-watchlist {
        grid-template-columns: 1fr;
    }
}
.container-entry-sheet .sheet-date-cell { position: relative; }
.container-entry-sheet .sheet-date-cell > input[data-field] { min-width: 160px; padding-right: 36px; }
.container-entry-sheet .sheet-date-cell > input.sheet-calendar { position: absolute; right: 2px; top: 2px; width: 30px; min-width: 30px; height: calc(100% - 4px); padding: 4px; color: transparent; border: 0; background: transparent; }
.sheet-calendar::-webkit-datetime-edit { display: none; }
.sheet-calendar::-webkit-calendar-picker-indicator { margin: 0; cursor: pointer; }
.dispatch-grid .dispatch-customer { min-width: 160px; max-width: 240px; white-space: normal; overflow-wrap: anywhere; }

/* One-page container dispatch workspace */
.app-main:has(.dispatch-workspace) {
    max-width: none;
    padding-top: .75rem !important;
    padding-right: clamp(.55rem, 1vw, 1.1rem) !important;
    padding-left: clamp(.55rem, 1vw, 1.1rem) !important;
}

.dispatch-workspace {
    width: 100%;
    overflow: hidden;
    border: 1px solid #cfd8e6;
    border-radius: .9rem;
    background: #f3f6fa;
    box-shadow: 0 .5rem 1.8rem rgba(15, 23, 42, .09);
}

.dispatch-workspace-head,
.dispatch-workspace-title,
.dispatch-head-actions,
.dispatch-view-nav,
.dispatch-command-bar,
.dispatch-selection-bar,
.dispatch-booking-bar,
.dispatch-booking-stats {
    display: flex;
    align-items: center;
}

.dispatch-workspace-head {
    justify-content: space-between;
    gap: 1rem;
    min-height: 78px;
    padding: .8rem 1rem;
    background: linear-gradient(118deg, #111d35 0%, #1c3159 58%, #244681 100%);
}

.dispatch-workspace-title { gap: .65rem; }
.dispatch-workspace-title h1 { margin: .05rem 0 0; color: #fff; font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; }
.dispatch-workspace-title p { margin: .12rem 0 0; color: #c9d7ec; font-size: .74rem; }
.dispatch-title-kicker { display: flex; align-items: center; gap: .35rem; color: #91b7f4; font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.dispatch-title-kicker span { width: .45rem; height: .45rem; border-radius: 50%; background: #53d694; box-shadow: 0 0 0 .22rem rgba(83,214,148,.16); }
.dispatch-workspace-icon { display: grid; width: 2.35rem; height: 2.35rem; flex: 0 0 2.35rem; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: .65rem; background: rgba(255,255,255,.1); color: #fff; font-size: 1.08rem; }
.dispatch-head-actions { flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.dispatch-head-actions .btn { border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.08); color: #eef5ff; font-weight: 700; }
.dispatch-head-actions .btn:hover { border-color: #fff; background: #fff; color: #1c3159; }
.dispatch-head-actions .btn-primary { border-color: #5278e8; background: #4169db; color: #fff; }
.dispatch-head-actions .btn-outline-success { border-color: #53d694; color: #8ff0bd; }

.dispatch-entry-launcher { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.7rem 1rem; border-bottom:1px solid #cbd8e7; background:linear-gradient(90deg,#eef6fc,#f8fbfd); }
.dispatch-entry-launcher > div { display:flex; align-items:center; gap:.65rem; min-width:0; }
.dispatch-entry-launcher strong,.dispatch-entry-launcher small { display:block; }
.dispatch-entry-launcher strong { color:#173b59; font-size:.86rem; }
.dispatch-entry-launcher small { margin-top:.08rem; color:#60758a; font-size:.72rem; }
.dispatch-entry-launcher-icon { display:grid; width:2rem; height:2rem; flex:0 0 2rem; place-items:center; border-radius:.55rem; background:#dcecf8; color:#155b88; }
.dispatch-entry-launcher .btn { flex:0 0 auto; font-weight:800; white-space:nowrap; }

.dispatch-view-nav {
    min-width: max-content;
    overflow-x: auto;
    border-bottom: 1px solid #dfe5ee;
    background: #fff;
    scrollbar-width: thin;
}

.dispatch-view-nav a { padding: .72rem 1rem .6rem; border-bottom: .2rem solid transparent; color: #526079; font-size: .78rem; font-weight: 750; text-decoration: none; }
.dispatch-view-nav a:hover { background: #f7f8fb; color: #2744bc; }
.dispatch-view-nav a.active { border-bottom-color: #3453d1; background: #f4f6ff; color: #2744bc; }
.dispatch-view-nav a span { margin-left: .25rem; padding: .08rem .34rem; border-radius: 1rem; background: #e8ecf3; font-size: .66rem; }

.dispatch-metric-strip { display: grid; grid-template-columns: repeat(9, minmax(98px, 1fr)); gap: 1px; overflow-x: auto; padding: .55rem .65rem; border-bottom: 1px solid #dfe5ee; background: #edf2f8; }
.dispatch-nav-refresh { display: flex; align-items: center; gap: .35rem; margin-left: auto; padding: .35rem .55rem; border-left: 1px solid #e1e7ef; background: #f8fafc; }
.dispatch-nav-refresh button { min-height: 1.9rem; padding: .25rem .55rem; border: 1px solid #9bacec; border-radius: .38rem; background: #eef2ff; color: #2946b8; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.dispatch-nav-refresh button:hover { border-color: #3453d1; background: #3453d1; color: #fff; }
.dispatch-nav-refresh button:disabled { opacity: .7; }
.dispatch-nav-refresh small { min-width: 3.2rem; color: #69778c; font-size: .68rem; white-space: nowrap; }
.dispatch-metric { display: flex; min-width: 88px; gap: .4rem; align-items: baseline; padding: .62rem clamp(.48rem, .75vw, .78rem); border: 1px solid #dae2ee; border-radius: .45rem; background: #fff; color: #536074; text-decoration: none; box-shadow: 0 1px 2px rgba(15,23,42,.025); }
.dispatch-metric strong { color: #17233c; font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.dispatch-metric span { white-space: nowrap; font-size: .69rem; font-weight: 750; }
.dispatch-metric:hover,.dispatch-metric.active { border-color: #9aacec; background: #f4f6ff; color: #2744bc; }
.dispatch-metric.active { box-shadow: inset 0 -.18rem #3453d1, 0 2px 6px rgba(52,83,209,.1); }
.dispatch-metric.danger strong,.dispatch-metric.danger span { color: #b42318; }

.dispatch-command-bar { position: relative; flex-wrap: wrap; gap: .45rem; padding: .65rem .7rem; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #d7dee9; background: #fff; }
.dispatch-command-bar input,.dispatch-command-bar select { min-height: 2.18rem; padding: .34rem .58rem; border: 1px solid #c9d3e1; border-radius: .42rem; background: #fff; color: #263247; font-size: .75rem; box-shadow: 0 1px 1px rgba(15,23,42,.02); }
.dispatch-search-box { position: relative; flex: 1 1 300px; }
.dispatch-search-box i { position: absolute; top: 50%; left: .65rem; color: #78869a; transform: translateY(-50%); }
.dispatch-search-box input { width: 100%; padding-left: 1.9rem; }
.dispatch-more-filters { position: relative; }
.dispatch-more-filters summary { min-height: 2.05rem; padding: .35rem .65rem; border: 1px solid #cfd7e3; border-radius: .3rem; background: #fff; color: #354158; font-size: .76rem; font-weight: 700; cursor: pointer; list-style: none; }
.dispatch-more-filters summary::-webkit-details-marker { display: none; }
.dispatch-filter-popover { position: absolute; top: calc(100% + .4rem); right: 0; z-index: 20; display: grid; width: 260px; gap: .55rem; padding: .75rem; border: 1px solid #d4dce8; border-radius: .5rem; background: #fff; box-shadow: 0 .75rem 2rem rgba(15,23,42,.16); }
.dispatch-filter-popover label { color: #5c687b; font-size: .7rem; font-weight: 700; }
.dispatch-filter-popover select { display: block; width: 100%; margin-top: .2rem; }

.dispatch-booking-bar { justify-content: space-between; gap: 1rem; padding: .55rem .75rem; border-bottom: 1px solid #dae1eb; background: #eef3fb; color: #334155; font-size: .74rem; }
.dispatch-booking-bar > div:first-child { display: grid; min-width: 170px; }
.dispatch-booking-bar > div:first-child span,.dispatch-booking-bar small { color: #738096; font-size: .66rem; }
.dispatch-booking-stats { flex: 1; flex-wrap: wrap; gap: .4rem 1rem; }
.dispatch-booking-stats span { white-space: nowrap; }
.dispatch-booking-stats strong { color: #1e3b77; }

.dispatch-selection-bar { gap: .45rem; min-height: 2.7rem; padding: .45rem .7rem; border-top: 1px solid #e5eaf1; border-bottom: 1px solid #cad4e1; background: #f8fafc; color: #536074; font-size: .74rem; }
.dispatch-selection-bar > strong { color: #1f2b40; font-size: .82rem; }
.dispatch-reset-sort { display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .4rem; border-radius: .28rem; color: #3854ca; font-weight: 750; text-decoration: none; }
.dispatch-reset-sort:hover { background: #e9edff; color: #243eac; }
.dispatch-grid-shell { background: #fff; }
.dispatch-grid-scroll { width: 100%; min-height: 0; max-height: none; overflow-x: auto; overflow-y: clip; overscroll-behavior-x: contain; scrollbar-gutter: auto; }
.dispatch-board-table { width: 100%; min-width: 1180px; table-layout: fixed; border-spacing: 0; border-collapse: separate; color: #253047; font-size: .8rem; }
.dispatch-board-table th:nth-child(1) { width: 3%; }
.dispatch-board-table th:nth-child(2) { width: 6%; }
.dispatch-board-table th:nth-child(3) { width: 12%; }
.dispatch-board-table th:nth-child(4) { width: 12%; }
.dispatch-board-table th:nth-child(5) { width: 9%; }
.dispatch-board-table th:nth-child(6) { width: 14%; }
.dispatch-board-table th:nth-child(7) { width: 11%; }
.dispatch-board-table th:nth-child(8) { width: 13%; }
.dispatch-board-table th:nth-child(9) { width: 10%; }
.dispatch-board-table th:nth-child(10) { width: 10%; }
.dispatch-board-table th { position: relative; z-index: 5; height: 2.45rem; padding: .45rem .5rem; border-right: 1px solid #d4dde9; border-bottom: 1px solid #c6d1df; background: linear-gradient(#f3f6fa, #e9eef5); color: #2f3d54; white-space: nowrap; font-size: .68rem; font-weight: 850; letter-spacing: .025em; text-transform: uppercase; }
.dispatch-sort-link { display: inline-flex; align-items: center; gap: .22rem; padding: .18rem .25rem; border-radius: .25rem; color: inherit; line-height: 1.15; text-decoration: none; }
.dispatch-sort-link:hover { background: #dce4f3; color: #263c91; }
.dispatch-sort-link.active { background: #dbe3ff; color: #2947bd; box-shadow: inset 0 0 0 1px #b8c6f5; }
.dispatch-sort-link i { font-size: .77rem; }
.dispatch-split-sort { display: flex; align-items: center; gap: .05rem; }
.dispatch-split-sort .dispatch-sort-link + .dispatch-sort-link { border-left: 1px solid #c7d1de; border-radius: 0 .25rem .25rem 0; }
.dispatch-board-table td { padding: .5rem; border-right: 1px solid #e3e8ef; border-bottom: 1px solid #e1e7ef; background: #fff; vertical-align: middle; overflow-wrap: anywhere; }
.dispatch-board-table tbody tr:nth-child(even) td { background: #fbfcfe; }
.dispatch-board-row:hover td { background: #f5f7ff; }
.dispatch-board-row.is-selected td { background: #e9edff; }
.dispatch-board-row.is-overdue td:first-child { box-shadow: inset .22rem 0 #d92d20; }
.dispatch-board-row.is-due td:first-child { box-shadow: inset .22rem 0 #f59e0b; }
.dispatch-board-row.is-dead-call td { background: #fff5f3; }
.dispatch-board-row.is-dead-call td:first-child { box-shadow: inset .25rem 0 #d92d20; }
.dispatch-board-table td small { display: block; margin-top: .14rem; color: #6f7d91; font-size: .7rem; line-height: 1.3; }
.dispatch-board-table td a { color: #3854ca; font-weight: 700; text-decoration: none; }
.dispatch-board-table td a:hover { text-decoration: underline; }
.dispatch-check { width: 34px; text-align: center; }
.dispatch-order-cell,.dispatch-container-cell,.dispatch-location-cell,.dispatch-driver-cell { min-width: 0; white-space: normal; }
.dispatch-cell-emphasis { color: #344054 !important; font-weight: 700; }
.dispatch-appointment-line { margin-top: .28rem !important; color: #475467 !important; }
.dispatch-appointment-line i { margin-right: .18rem; color: #3453d1; }
.dispatch-priority { display: inline-flex; min-width: 68px; justify-content: center; padding: .24rem .45rem; border-radius: .18rem; color: #fff; font-size: .66rem; font-weight: 900; letter-spacing: .035em; text-transform: uppercase; }
.dispatch-priority.priority-high { background: #f04438; }
.dispatch-priority.priority-normal { background: #35820d; }
.dispatch-status { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; font-weight: 700; }
.dispatch-status i { width: .48rem; height: .48rem; border-radius: 50%; background: #8793a5; }
.dispatch-status.status-assigned i,.dispatch-status.status-scheduled i { background: #3559d6; }
.dispatch-status.status-accepted i { background: #13a3b8; }
.dispatch-status.status-in_progress i,.dispatch-status.status-picked_up i { background: #f59e0b; }
.dispatch-status.status-delivered i { background: #16a34a; }
.dispatch-status.status-dead_call { color: #b42318; }
.dispatch-status.status-dead_call i { background: #d92d20; box-shadow: 0 0 0 .2rem rgba(217,45,32,.12); }
.dispatch-status.status-cancelled i { background: #6b7280; }
.dispatch-quick-driver { display: flex; gap: .25rem; }
.dispatch-quick-driver select { width: calc(100% - 2.15rem); min-width: 0; min-height: 1.85rem; border: 1px solid #cdd5e1; border-radius: .25rem; font-size: .7rem; }
.dispatch-quick-driver button { width: 1.9rem; border: 0; border-radius: .25rem; background: #3453d1; color: #fff; }
.dispatch-row-actions { position: sticky; right: 0; z-index: 2; background: #fff !important; text-align: right; box-shadow: -.35rem 0 .6rem rgba(15,23,42,.06); }
.dispatch-action-group { display: flex; max-width: 8.1rem; margin-left: auto; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .22rem; }
.dispatch-action-group form { margin: 0; }
.dispatch-icon-action { display: inline-grid; width: 1.9rem; height: 1.9rem; padding: 0; place-items: center; border: 1px solid #d7dee9; border-radius: .38rem; background: #fff; color: #344054; font-size: .88rem; line-height: 1; text-decoration: none; transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease; }
.dispatch-icon-action:hover,.dispatch-icon-action:focus-visible { background: #eef2ff; border-color: #8091e8; color: #243b9f; transform: translateY(-1px); }
.dispatch-icon-action.action-progress,.dispatch-icon-action.action-update { border-color: #3453d1; background: #3453d1; color: #fff; }
.dispatch-icon-action.action-message { border-color: #175cd3; background: #1570ef; color: #fff; }
.dispatch-icon-action.action-message:hover,.dispatch-icon-action.action-message:focus-visible { border-color: #1849a9; background: #175cd3; color: #fff; }
.dispatch-icon-action.action-complete { border-color: #15803d; background: #15803d; color: #fff; }
.dispatch-icon-action.action-booking { color: #6941c6; border-color: #d6bbfb; background: #f9f5ff; }
.dispatch-icon-action.action-whatsapp { border-color: #1faa59; background: #25d366; color: #fff; }
.dispatch-icon-action.action-whatsapp:hover,.dispatch-icon-action.action-whatsapp:focus-visible { border-color: #168a47; background: #1faa59; color: #fff; }
.dispatch-icon-action.action-disabled { cursor: not-allowed; opacity: .38; background: #f2f4f7; }
.dispatch-icon-action.action-dead-call,.dispatch-icon-action.action-delete { color: #b42318; }
.dispatch-icon-action.action-cancel { color: #b54708; }
.dispatch-icon-action.action-reopen { color: #027a48; }
.dispatch-action-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: .75rem 0 0; padding: .7rem .85rem; border: 1px solid #e1e6ef; border-radius: .45rem; background: #f8fafc; color: #475467; font-size: .75rem; }
.dispatch-action-legend strong { color: #1d2939; margin-right: .25rem; }
.dispatch-action-legend span { display: inline-flex; align-items: center; gap: .32rem; white-space: nowrap; }
.dispatch-action-legend i { width: 1rem; color: #3453d1; text-align: center; font-size: .85rem; }
.dispatch-action-legend .bi-exclamation-octagon,.dispatch-action-legend .bi-trash3 { color: #b42318; }
.dispatch-action-legend .legend-whatsapp { color: #1faa59; }
.driver-name-with-whatsapp { display: inline-flex; align-items: center; gap: .5rem; }
.driver-whatsapp-link { display: inline-grid; width: 1.7rem; height: 1.7rem; flex: 0 0 1.7rem; place-items: center; border-radius: 50%; background: #25d366; color: #fff; text-decoration: none; box-shadow: 0 1px 2px rgba(16,24,40,.14); }
.driver-whatsapp-link:hover,.driver-whatsapp-link:focus-visible { background: #1faa59; color: #fff; transform: translateY(-1px); }
.driver-whatsapp-link.is-disabled { background: #e4e7ec; color: #98a2b3; cursor: not-allowed; box-shadow: none; }
.dispatch-board-table th:last-child { position: sticky; right: 0; z-index: 7; }
.dispatch-update-cell { min-width: 0; white-space: normal; }
.dispatch-latest-update { display: grid; gap: .12rem; line-height: 1.3; }
.dispatch-latest-update strong { color: #344054; font-size: .68rem; }
.dispatch-latest-update span { display: -webkit-box; overflow: hidden; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.dispatch-latest-update.dead-call strong,.dispatch-latest-update.dead-call span { color: #b42318; }
.dispatch-update-button { margin-top: .3rem; padding: 0; border: 0; background: transparent; color: #3854ca; font-size: .68rem; font-weight: 800; }
.dispatch-update-button:hover { text-decoration: underline; }
.dispatch-empty { display: grid; min-height: 320px; place-items: center; align-content: center; gap: .5rem; color: #718096; }
.dispatch-empty i { font-size: 2rem; color: #3453d1; }

/* Live operations board */
.live-status-dot {
    display: inline-block;
    width: .72rem;
    height: .72rem;
    margin-right: .35rem;
    border-radius: 50%;
    background: #198754;
    box-shadow: 0 0 0 .3rem rgba(25, 135, 84, .14);
    vertical-align: .12rem;
}

.live-board-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(250px, 1fr));
    gap: 1rem;
    align-items: start;
    overflow-x: auto;
    padding-bottom: .75rem;
}

.live-board-lane {
    min-width: 250px;
    overflow: hidden;
    border: 1px solid #dbe4ee;
    border-radius: .9rem;
    background: #f4f7fa;
}

.live-board-lane-header {
    display: flex;
    justify-content: space-between;
    gap: .8rem;
    min-height: 92px;
    padding: 1rem;
    border-top: .28rem solid;
    background: #fff;
}

.live-board-lane-body {
    display: grid;
    gap: .75rem;
    max-height: 68vh;
    overflow-y: auto;
    padding: .75rem;
}

.live-work-card {
    display: block;
    padding: .85rem;
    border: 1px solid #dbe4ee;
    border-radius: .72rem;
    background: #fff;
    color: inherit;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .05);
    transition: transform .15s ease, box-shadow .15s ease;
}

.live-assignment-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: -.2rem 0 1rem; padding: .55rem .7rem; border: 1px solid #dde4ed; border-radius: .6rem; background: #fff; }
.legend-title { margin-right: .25rem; color: #344054; font-size: .74rem; font-weight: 800; }
.live-kind-chip { display: inline-flex; align-items: center; gap: .32rem; padding: .2rem .46rem; border: 1px solid var(--assignment-border, #cbd5e1); border-radius: 1rem; background: var(--assignment-soft, #f1f5f9); color: var(--assignment-dark, #475569); white-space: nowrap; font-size: .66rem; font-weight: 800; }
.live-kind-chip i { width: .45rem; height: .45rem; border-radius: 50%; background: var(--assignment-color, #64748b); }
.kind-import,.live-kind-import { --assignment-color:#2563eb; --assignment-soft:#eaf1ff; --assignment-border:#b9ccff; --assignment-dark:#1849a9; }
.kind-export,.live-kind-export { --assignment-color:#7c3aed; --assignment-soft:#f2ebff; --assignment-border:#d6c1ff; --assignment-dark:#5b21b6; }
.kind-empty_reposition,.live-kind-empty_reposition { --assignment-color:#d97706; --assignment-soft:#fff4dd; --assignment-border:#f5ce8a; --assignment-dark:#92400e; }
.kind-empty_move,.live-kind-empty_move { --assignment-color:#ea580c; --assignment-soft:#fff0e8; --assignment-border:#fdba91; --assignment-dark:#9a3412; }
.kind-reposition,.live-kind-reposition { --assignment-color:#0891b2; --assignment-soft:#e5f7fb; --assignment-border:#9dddea; --assignment-dark:#155e75; }
.kind-combo,.live-kind-combo { --assignment-color:#0f766e; --assignment-soft:#e4f7f4; --assignment-border:#9cded5; --assignment-dark:#115e59; }
.kind-hourly,.live-kind-hourly { --assignment-color:#475569; --assignment-soft:#eef2f6; --assignment-border:#c7d0dc; --assignment-dark:#334155; }
.kind-other,.live-kind-other { --assignment-color:#64748b; --assignment-soft:#f1f5f9; --assignment-border:#cbd5e1; --assignment-dark:#475569; }
.live-work-card[class*="live-kind-"] { border-left: .28rem solid var(--assignment-color); }
.live-work-card[class*="live-kind-"]:hover { box-shadow: 0 8px 18px color-mix(in srgb, var(--assignment-color) 18%, transparent); }

.live-work-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .11);
}

.live-work-card-alert { border-left: .3rem solid #dc3545; }
.live-work-note { padding: .55rem; border-radius: .45rem; background: #f8f9fa; color: #495057; }
.live-board-empty { display: grid; place-items: center; gap: .35rem; min-height: 110px; color: #8a97a6; font-size: .85rem; text-align: center; }
.live-board-empty i { color: #70a984; font-size: 1.35rem; }

@media (max-width: 1399.98px) {
    .dispatch-board-table { min-width: 1080px; font-size: .73rem; }
    .dispatch-board-table .dispatch-priority-column { display: none; }
    .dispatch-board-table th:nth-child(3) { width: 14%; }
    .dispatch-board-table th:nth-child(6) { width: 16%; }
    .dispatch-workspace-title p { display: none; }
    .dispatch-booking-stats { gap: .3rem .65rem; }
    .live-board-grid { grid-template-columns: repeat(5, 270px); }
}

@media (max-width: 1199.98px) {
    .dispatch-workspace-head { padding: .6rem .7rem; }
    .dispatch-view-nav a { padding-right: .72rem; padding-left: .72rem; }
    .dispatch-selection-bar .btn { padding-right: .45rem; padding-left: .45rem; }
    .dispatch-board-table th,.dispatch-board-table td { padding-right: .38rem; padding-left: .38rem; }
    .dispatch-metric strong { font-size: .9rem; }
    .dispatch-metric span { font-size: .68rem; }
}

@media (max-width: 767.98px) {
    .dispatch-workspace-head { align-items: flex-start; flex-direction: column; }
    .dispatch-head-actions { width: 100%; justify-content: flex-start; }
    .dispatch-command-bar { align-items: stretch; }
    .dispatch-command-bar > select,.dispatch-command-bar > input { flex: 1 1 140px; }
    .dispatch-more-filters { flex: 1 1 100%; }
    .dispatch-more-filters summary { width: 100%; }
    .dispatch-filter-popover { position: static; width: 100%; margin-top: .35rem; box-shadow: none; }
    .dispatch-booking-bar { align-items: flex-start; flex-direction: column; }
    .dispatch-nav-refresh { margin-left: 0; border-left: 0; }
    .dispatch-entry-launcher { align-items:stretch; flex-direction:column; }
    .dispatch-entry-launcher .btn { width:100%; }
}

/* Port status connections and dispatch visibility */
.port-status-summary { display:grid; gap:.08rem; margin-top:.35rem; padding:.35rem .42rem; border:1px solid var(--port-border,#cbd5e1); border-left:.25rem solid var(--port-color,#64748b); border-radius:.38rem; background:var(--port-soft,#f8fafc); color:var(--port-dark,#475569); line-height:1.25; }
.port-status-summary > span { display:flex; align-items:center; gap:.3rem; font-size:.7rem; font-weight:800; }
.port-status-summary small { overflow:hidden; text-overflow:ellipsis; font-size:.63rem; white-space:nowrap; }
.port-status-summary .port-hold-text { color:#b42318; font-weight:700; }
.port-state-available { --port-color:#16803c; --port-border:#86d7a0; --port-soft:#eaf8ef; --port-dark:#126b34; }
.port-state-hold { --port-color:#d92d20; --port-border:#f2a7a1; --port-soft:#fff0ef; --port-dark:#a51d15; }
.port-state-pending,.port-state-vessel_due,.port-state-container_pending,.port-state-terminal_unknown { --port-color:#d97706; --port-border:#f3cd8e; --port-soft:#fff7e8; --port-dark:#92400e; }
.port-state-on_terminal { --port-color:#2563eb; --port-border:#a9c2fb; --port-soft:#edf3ff; --port-dark:#1849a9; }
.port-state-outgated { --port-color:#0f766e; --port-border:#95d8cf; --port-soft:#e9f8f5; --port-dark:#115e59; }
.port-state-not_found,.port-state-login_required,.port-state-error { --port-color:#667085; --port-border:#cbd5e1; --port-soft:#f2f4f7; --port-dark:#475467; }
.dispatch-icon-action.action-port-status { color:#155e75; border-color:#9dddea; background:#e5f7fb; }
.port-connections-page { max-width:1320px; margin:0 auto; }
.port-connections-head { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; margin-bottom:1.25rem; padding:1.25rem; border:1px solid #dbe4ee; border-radius:1rem; background:linear-gradient(135deg,#fff,#eef6ff); }
.port-connections-head h1 { margin:.1rem 0 .25rem; font-size:1.7rem; }
.port-connections-head p { max-width:760px; margin:0; color:#667085; }
.port-connection-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.port-connection-card { padding:1.1rem; border:1px solid #dbe4ee; border-radius:.9rem; background:#fff; box-shadow:0 4px 16px rgba(15,23,42,.05); }
.port-connection-card-head,.port-connection-card-head > div { display:flex; align-items:center; justify-content:space-between; gap:.75rem; }
.port-connection-card-head h2 { margin:0; font-size:1.05rem; }
.port-connection-card-head small { color:#667085; }
.port-provider-icon { display:grid; width:2.4rem; height:2.4rem; place-items:center; border-radius:.65rem; background:#eaf1ff; color:#1849a9; font-size:1.05rem; }
.port-connection-state { display:inline-flex; align-items:center; gap:.35rem; padding:.3rem .55rem; border-radius:1rem; background:#f2f4f7; color:#475467; font-size:.7rem; font-weight:800; white-space:nowrap; }
.port-connection-state i { width:.48rem; height:.48rem; border-radius:50%; background:#98a2b3; }
.port-connection-state.state-connected { background:#eaf8ef; color:#126b34; }
.port-connection-state.state-connected i { background:#16803c; }
.port-connection-state.state-credentials_saved { background:#edf3ff; color:#1849a9; }
.port-connection-state.state-credentials_saved i { background:#2563eb; }
.port-connection-capabilities { display:flex; flex-wrap:wrap; gap:.45rem; margin:.9rem 0; }
.port-connection-capabilities span { display:inline-flex; align-items:center; gap:.3rem; padding:.25rem .45rem; border-radius:.35rem; background:#ecfdf3; color:#027a48; font-size:.72rem; font-weight:700; }
.port-connection-capabilities span.pending { background:#f2f4f7; color:#667085; }
.port-connection-form { display:grid; grid-template-columns:1fr 1fr; gap:.75rem; }
.port-connection-form label > span:first-child { display:block; margin-bottom:.28rem; color:#344054; font-size:.76rem; font-weight:700; }
.port-login-step { grid-column:1/-1; padding:.8rem; border:1px solid #dbe4ee; border-radius:.7rem; background:#f8fafc; }
.port-login-step-head { display:flex; align-items:center; justify-content:space-between; gap:.7rem; margin-bottom:.65rem; }
.port-login-step-head strong { display:flex; align-items:center; gap:.45rem; color:#17233c; font-size:.85rem; }
.port-login-step-head strong > span { display:grid; width:1.45rem; height:1.45rem; place-items:center; border-radius:50%; background:#1849a9; color:#fff; font-size:.72rem; }
.port-login-step-head a { font-size:.76rem; font-weight:700; text-decoration:none; }
.port-login-step-fields { display:grid; grid-template-columns:1fr 1fr; gap:.65rem; }
.port-login-order { grid-column:1/-1; display:flex; align-items:flex-start; gap:.55rem; padding:.65rem .75rem; border-left:.25rem solid #2563eb; border-radius:.45rem; background:#edf3ff; color:#1849a9; font-size:.78rem; font-weight:600; }
.port-connection-form .form-switch { grid-column:1/-1; margin:0; }
.port-connection-actions { grid-column:1/-1; display:flex; justify-content:flex-end; gap:.5rem; }
.port-status-key { display:flex; flex-wrap:wrap; align-items:center; gap:.55rem; margin-top:1rem; padding:.8rem 1rem; border:1px solid #dbe4ee; border-radius:.75rem; background:#fff; }
.port-status-key span { padding:.3rem .55rem; border:1px solid var(--port-border); border-left:.25rem solid var(--port-color); border-radius:.35rem; background:var(--port-soft); color:var(--port-dark); font-size:.72rem; font-weight:800; }
.terminal-detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.55rem; }
.terminal-detail-grid > div { min-width:0; padding:.65rem .7rem; border:1px solid #e2e8f0; border-radius:.65rem; background:linear-gradient(145deg,#fff,#f8fafc); }
.terminal-detail-grid span { display:block; color:#64748b; font-size:.72rem; font-weight:700; letter-spacing:.025em; text-transform:uppercase; }
.terminal-detail-grid strong { display:block; margin-top:.15rem; color:#17233c; font-size:.84rem; line-height:1.3; overflow-wrap:anywhere; }
@media (max-width: 900px) { .port-connection-grid { grid-template-columns:1fr; } }
@media (max-width: 600px) { .port-connections-head { flex-direction:column; } .port-connection-form,.terminal-detail-grid,.port-login-step-fields { grid-template-columns:1fr; } .port-connection-form .form-switch,.port-connection-actions,.port-login-step,.port-login-order { grid-column:1; } .port-login-step-head { align-items:flex-start; flex-direction:column; } }

/* Reports centre */
.report-center-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #dbe4ee;
    border-radius: 1rem;
    background: linear-gradient(135deg, #fff 0%, #f4f8fc 100%);
}

.report-section-tabs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .6rem;
    padding: .6rem;
    border: 1px solid #dbe4ee;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.report-section-tabs .nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .7rem;
    min-height: 4.5rem;
    padding: .7rem .8rem;
    border: 1px solid transparent;
    border-radius: .75rem;
    background: #f8fafc;
    color: #334155;
    line-height: 1.3;
    height: 100%;
    text-align: left;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
}

.report-section-tabs .nav-link:hover {
    border-color: #bfd0e3;
    background: #f1f5f9;
    transform: translateY(-1px);
}

.report-section-tabs .nav-link.active {
    border-color: #17365d;
    background: linear-gradient(135deg, #17365d, #244f7d);
    color: #fff;
    box-shadow: 0 7px 18px rgba(23, 54, 93, .22);
}

.report-tab-icon {
    display: inline-grid;
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 2.25rem;
    place-items: center;
    border-radius: .65rem;
    background: #e7eef7;
    color: #17365d;
    font-size: 1.05rem;
}

.report-section-tabs .nav-link.active .report-tab-icon {
    background: rgba(255, 255, 255, .16);
    color: #fff;
}

.report-tab-copy { display: grid; gap: .08rem; min-width: 0; }
.report-tab-copy small { color: #718096; font-size: .65rem; font-weight: 800; letter-spacing: .12em; }
.report-tab-copy strong { font-size: .88rem; font-weight: 750; }
.report-section-tabs .nav-link.active .report-tab-copy small { color: #cfe0f2; }

.report-section-tabs .nav-item { min-width: 0; }

.report-subtab-content {
    padding: 1.25rem;
    border: 1px solid #dbe4ee;
    border-radius: .9rem;
    background: #f8fafc;
}

.report-subtabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .45rem;
    width: 100%;
    padding: .4rem;
    border: 1px solid #dbe4ee;
    border-radius: .85rem;
    background: #fff;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .05);
}

.report-subtabs .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    min-height: 3rem;
    padding: .55rem 1rem;
    border-radius: .55rem;
    color: #475569;
    font-size: .9rem;
    font-weight: 700;
}

.report-subtabs .nav-link.active {
    color: #fff;
    background: #17365d;
}

@media (max-width: 1399.98px) {
    .report-section-tabs { display: flex; overflow-x: auto; flex-wrap: nowrap; }
    .report-section-tabs .nav-item { flex: 0 0 auto; }
    .report-section-tabs .nav-link, .report-subtabs .nav-link { min-height: 44px; white-space: nowrap; }
}

@media (max-width: 991.98px) {
    .report-subtabs { display: flex; overflow-x: auto; flex-wrap: nowrap; }
    .report-subtabs .nav-item { flex: 0 0 auto; }
    .report-subtabs .nav-link { width: auto; }
}

.report-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid #dbe4ee;
    border-left: .3rem solid #17365d;
    border-radius: .85rem;
    background: linear-gradient(135deg, #fff, #f7fafc);
}

.report-section-heading h4 { margin-bottom: .2rem; }
.report-section-heading p { margin: 0; color: #64748b; }
.report-section-kicker { margin-bottom: .2rem; color: #476987; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.report-count { flex: 0 0 auto; padding: .35rem .65rem; border: 1px solid #cbd8e6; border-radius: 999px; background: #fff; color: #47607a; font-size: .75rem; font-weight: 700; }

.report-card {
    border: 1px solid #dbe4ee;
    border-radius: .9rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .045);
    transition: transform .15s ease, box-shadow .15s ease;
}

.report-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 9px 24px rgba(15, 23, 42, .09);
}

.report-card .card-body { padding: 1.25rem; }
.report-card h5 { margin: .85rem 0 .45rem; }
.report-card p { min-height: 3rem; color: #64748b; font-size: .9rem; }
.report-card-icon {
    display: inline-grid;
    width: 2.7rem;
    height: 2.7rem;
    place-items: center;
    border-radius: .75rem;
    font-size: 1.2rem;
}

.report-feature-card { max-width: 760px; }
.report-preview-table-wrap { max-height: 68vh; border-radius: .5rem; }
.report-preview-table { font-size: .78rem; white-space: nowrap; }
.report-preview-table td { min-width: 7rem; padding: .4rem .5rem; }
.report-preview-first-row td {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #17365d !important;
    color: #fff;
    font-weight: 600;
}

@media (max-width: 767.98px) {
    .report-center-header { align-items: flex-start; flex-direction: column; }
    .report-center-header > .d-flex { width: 100%; }
    .report-center-header .btn { flex: 1; }
    .report-section-tabs { display: flex; overflow-x: auto; flex-wrap: nowrap; }
    .report-section-tabs .nav-link { white-space: nowrap; }
    .report-section-heading { flex-direction: column; }
    .report-subtab-content { padding: .85rem; }
}
/* Free-Flow dispatch keeps capacity, pooled containers, and driver assignment visually separate. */
.freeflow-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.freeflow-steps>div{display:grid;grid-template-columns:40px 1fr;column-gap:10px;align-items:center;padding:14px 16px;border:1px solid #d8e1ea;border-radius:12px;background:#f7f9fb;color:#18324a}
.freeflow-steps span{grid-row:1/3;display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:#174f78;color:#fff;font-weight:800}
.freeflow-steps strong{font-size:.92rem}.freeflow-steps small{color:#66788a}
.freeflow-primary-card{border-top:4px solid #174f78}
.freeflow-summary{display:flex;justify-content:space-between;align-items:center;gap:16px;cursor:pointer;list-style:none}
.freeflow-summary::-webkit-details-marker{display:none}
.freeflow-summary>span:first-child{display:flex;flex-direction:column}
.bg-light-subtle{background:#f7f9fb}
.freeflow-edit-table{min-width:1450px}.freeflow-edit-table input{min-width:112px}.freeflow-edit-table input[type="date"]{min-width:140px}.freeflow-edit-table input[name^="slot_vessel_"]{min-width:170px}.freeflow-edit-table input[name^="slot_reservation_"]{min-width:135px}
@media(max-width:767.98px){.freeflow-steps{grid-template-columns:1fr}.freeflow-steps>div{padding:12px}.freeflow-summary{align-items:flex-start;flex-direction:column}}

/* Keep the dropdown in the same reading order as the workspace sidebar. */
.accounting-menu-groups .dispatch-menu-links a{min-height:42px;align-items:center}
.accounting-menu-groups .dispatch-menu-links a.is-active{background:#e9f1fc;color:#1759ad;font-weight:700;border-radius:6px}
