/* ── Dispatch Board (Syncfusion zone accordion) ── */
.db-board {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.35rem 0.5rem 0.35rem;
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    background:
        radial-gradient(1200px 400px at 0% 0%, rgba(14, 116, 144, 0.08), transparent 60%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.dispatch-board-alert {
    margin: 0;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.dispatch-board-alert--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.dispatch-board-alert--success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.dispatch-board-alert--info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.dispatch-board-alert button {
    border: none;
    background: transparent;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    padding: 0 0.25rem;
    font-size: 1.1rem;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
}

/* ── Toolbar ── */
.db-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    flex-shrink: 0;
}

.db-toolbar__title-block {
    min-width: 0;
    flex: 1 1 auto;
    width: 100%;
}

.db-toolbar__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
}

.db-toolbar__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    min-width: 0;
}

.db-tabs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.55rem;
    padding: 0.2rem;
    width: 100%;
    max-width: 100%;
    border-radius: 10px;
    background: rgba(3, 20, 46, 0.06);
    border: 1px solid rgba(3, 20, 46, 0.08);
}

.db-search {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.55rem;
    width: min(420px, 100%);
    padding: 0.35rem 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
}

.db-search--inline {
    margin-top: 0;
    margin-left: 0.15rem;
    flex: 0 1 240px;
    width: 240px;
    min-width: 160px;
    max-width: 280px;
    height: 32px;
    padding: 0.15rem 0.45rem;
    border-color: rgba(3, 20, 46, 0.12);
}

.db-search--inline .db-search__input {
    font-size: 0.8rem;
}

.db-toolbar__new-log {
    flex-shrink: 0;
    white-space: nowrap;
}

.db-search__icon {
    color: #64748b;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.db-search__input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #0f172a;
    font-size: 0.88rem;
    line-height: 1.3;
}

.db-search__input::placeholder {
    color: #94a3b8;
}

.db-search__clear {
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 0.15rem;
    cursor: pointer;
}

.db-search__clear:hover {
    color: #0f172a;
}

.mobile-layout .db-search:not(.db-search--inline),
.db-board--compact .db-search:not(.db-search--inline) {
    width: 100%;
    max-width: 100%;
}

.mobile-layout .db-search--inline,
.db-board--compact .db-search--inline {
    flex: 0 1 180px;
    min-width: 140px;
    max-width: 220px;
    width: 180px;
}

.db-tab {
    border: 0;
    background: transparent;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 0.4rem 0.95rem;
    min-height: 34px;
    border-radius: 8px;
    cursor: pointer;
    transition:
        background 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease;
}

.db-tab:hover:not(:disabled):not(.db-tab--active) {
    background: rgba(255, 255, 255, 0.7);
    color: #03142E;
}

.db-tab--active {
    background: #03142E;
    color: #fff;
    box-shadow: 0 2px 6px rgba(3, 20, 46, 0.22);
}

.db-tab:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.db-zones-panel {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-height: 0;
    height: 100%;
    flex: 1;
}

.db-accordion-wrap--zones {
    flex: 1 1 0;
    min-height: 0;
    width: 100%;
}

.db-zones-card {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(3, 20, 46, 0.1);
    box-shadow: 0 1px 3px rgba(3, 20, 46, 0.06);
    overflow: hidden;
}

.db-zones-card__header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid rgba(3, 20, 46, 0.08);
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.db-zones-card__title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #03142E;
    letter-spacing: -0.01em;
}

.db-zones-card__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.db-zones-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(3, 20, 46, 0.12);
    background: #fff;
    color: #03142E;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.db-zones-card__btn:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: rgba(3, 20, 46, 0.22);
}

.db-zones-card__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.db-zones-card__btn .spin {
    animation: db-spin 0.8s linear infinite;
}

.db-zones-card__body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.db-zones-grid {
    height: 100% !important;
}

/* Responsive grid type: large desktop 0.90 / ≤1919 0.80 / tablet 0.70 / phone 0.60 */
.db-zones-grid .e-gridheader .e-headercell,
.db-zones-grid .e-gridheader .e-headercell .e-headercelldiv,
.db-zones-grid .e-gridheader .e-headercell .e-headertext,
.db-zones-grid .e-rowcell,
.db-zones-grid .e-rowcell .e-ellipsistooltip {
    font-size: 0.90rem !important;
    line-height: 1.3 !important;
}

.db-zones-grid .e-gridheader .e-headercell,
.db-zones-grid .e-gridheader .e-headercell .e-headercelldiv,
.db-zones-grid .e-gridheader .e-headercell .e-headertext {
    font-weight: 800 !important;
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    text-overflow: unset !important;
    height: auto !important;
}

.db-zones-grid .e-rowcell,
.db-zones-grid .e-rowcell .e-ellipsistooltip {
    font-weight: 400 !important;
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    text-overflow: unset !important;
    height: auto !important;
}

.db-zones-grid .e-gridheader .e-columnheader .e-headercell {
    padding: 0.35rem 0.4rem !important;
    vertical-align: bottom;
}

@media (max-width: 1919px) {
    .db-zones-grid .e-gridheader .e-headercell,
    .db-zones-grid .e-gridheader .e-headercell .e-headercelldiv,
    .db-zones-grid .e-gridheader .e-headercell .e-headertext,
    .db-zones-grid .e-rowcell,
    .db-zones-grid .e-rowcell .e-ellipsistooltip {
        font-size: 0.80rem !important;
    }

    .db-zones-stop {
        font-size: 0.80rem;
    }
}

.tablet-layout .db-zones-grid .e-gridheader .e-headercell,
.tablet-layout .db-zones-grid .e-gridheader .e-headercell .e-headercelldiv,
.tablet-layout .db-zones-grid .e-gridheader .e-headercell .e-headertext,
.tablet-layout .db-zones-grid .e-rowcell,
.tablet-layout .db-zones-grid .e-rowcell .e-ellipsistooltip {
    font-size: 0.70rem !important;
}

.tablet-layout .db-zones-stop {
    font-size: 0.70rem;
    min-width: 1.25rem;
    height: 1.25rem;
}

.mobile-layout .db-zones-grid .e-gridheader .e-headercell,
.mobile-layout .db-zones-grid .e-gridheader .e-headercell .e-headercelldiv,
.mobile-layout .db-zones-grid .e-gridheader .e-headercell .e-headertext,
.mobile-layout .db-zones-grid .e-rowcell,
.mobile-layout .db-zones-grid .e-rowcell .e-ellipsistooltip {
    font-size: 0.60rem !important;
}

.mobile-layout .db-zones-stop {
    font-size: 0.60rem;
    min-width: 1.1rem;
    height: 1.1rem;
}

@media (max-width: 1024px) {
    .db-zones-grid .e-gridheader .e-headercell,
    .db-zones-grid .e-gridheader .e-headercell .e-headercelldiv,
    .db-zones-grid .e-gridheader .e-headercell .e-headertext,
    .db-zones-grid .e-rowcell,
    .db-zones-grid .e-rowcell .e-ellipsistooltip {
        font-size: 0.70rem !important;
    }

    .db-zones-stop {
        font-size: 0.70rem;
        min-width: 1.25rem;
        height: 1.25rem;
    }
}

@media (max-width: 768px) {
    .db-zones-grid .e-gridheader .e-headercell,
    .db-zones-grid .e-gridheader .e-headercell .e-headercelldiv,
    .db-zones-grid .e-gridheader .e-headercell .e-headertext,
    .db-zones-grid .e-rowcell,
    .db-zones-grid .e-rowcell .e-ellipsistooltip {
        font-size: 0.60rem !important;
    }

    .db-zones-stop {
        font-size: 0.60rem;
        min-width: 1.1rem;
        height: 1.1rem;
    }
}

.db-zones-stop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 0.90rem;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
}

.db-zones-search {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid rgba(3, 20, 46, 0.08);
    background: #f8fafc;
}

.db-zones-search__icon {
    color: #64748b;
    font-size: 0.95rem;
}

.db-zones-search__native {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid rgba(3, 20, 46, 0.14);
    border-radius: 8px;
    padding: 0.4rem 0.65rem;
    font-size: 0.85rem;
    background: #fff;
    color: #03142E;
    outline: none;
}

.db-zones-search__native:focus {
    border-color: rgba(15, 76, 117, 0.45);
    box-shadow: 0 0 0 2px rgba(15, 76, 117, 0.12);
}

.db-zones-search__clear-sel {
    flex-shrink: 0;
    border: 1px solid rgba(3, 20, 46, 0.14);
    background: #fff;
    color: #03142E;
    border-radius: 8px;
    padding: 0.3rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}

.db-zones-cards {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.55rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    height: 100%;
    min-height: 0;
}

.db-zones-cust {
    display: flex;
    align-items: stretch;
    gap: 0.45rem;
    padding: 0.65rem 0.7rem;
    border-radius: 12px;
    border: 1px solid rgba(3, 20, 46, 0.1);
    background: #fff;
    box-shadow: 0 1px 2px rgba(3, 20, 46, 0.05);
}

.db-zones-cust--selected {
    border-color: rgba(255, 102, 0, 0.45);
    background: rgba(255, 102, 0, 0.06);
}

.db-zones-cust--focused {
    box-shadow:
        inset 3px 0 0 #ff6600,
        0 0 0 2px rgba(255, 102, 0, 0.18);
}

.db-zones-cust__check {
    display: flex;
    align-items: flex-start;
    padding-top: 0.15rem;
    margin: 0;
    cursor: pointer;
}

.db-zones-cust__check input {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: #ff6600;
    cursor: pointer;
}

.db-zones-cust__main {
    flex: 1 1 auto;
    min-width: 0;
    cursor: pointer;
}

.db-zones-cust__top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.25rem;
}

.db-zones-cust__name {
    font-weight: 800;
    color: #03142E;
    font-size: 0.88rem;
    line-height: 1.25;
}

.db-zones-cust__badge {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 0.12rem 0.4rem;
}

.db-zones-cust__badge--ok {
    background: #dcfce7;
    color: #166534;
}

.db-zones-cust__badge--miss {
    background: #fee2e2;
    color: #991b1b;
}

.db-zones-cust__addr {
    font-size: 0.8rem;
    color: #334155;
    line-height: 1.35;
    word-break: break-word;
}

.db-zones-cust__meta {
    margin-top: 0.28rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.35rem;
}

.db-zones-cust__actions {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex-shrink: 0;
}

.db-zones-cust__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(3, 20, 46, 0.12);
    background: #fff;
    color: #0f4c75;
    cursor: pointer;
}

.db-zones-cust__action:hover {
    background: #f1f5f9;
    border-color: rgba(3, 20, 46, 0.22);
}

.tablet-layout .db-zones-cust__name {
    font-size: 0.8rem;
}

.tablet-layout .db-zones-cust__addr {
    font-size: 0.72rem;
}

.tablet-layout .db-zones-cust__meta {
    font-size: 0.66rem;
}

.mobile-layout .db-zones-cust__name {
    font-size: 0.78rem;
}

.mobile-layout .db-zones-cust__addr {
    font-size: 0.7rem;
}

.mobile-layout .db-zones-cust__meta {
    font-size: 0.64rem;
}

.db-zones-grid .db-zones-row--focused td,
.db-zones-grid tr.db-zones-row--focused td {
    background: rgba(255, 102, 0, 0.16) !important;
    box-shadow: inset 3px 0 0 #ff6600;
}

.db-zones-map-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #0f4c75;
    cursor: pointer;
}

.db-zones-map-btn:hover {
    background: rgba(15, 76, 117, 0.1);
    color: #03142E;
}

.db-zones-group {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    color: #03142E;
}

.db-zones-group__label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.65;
}

.db-zones-group__value {
    font-weight: 800;
}

.db-zones-group__count {
    font-size: 0.78rem;
    font-weight: 700;
    opacity: 0.7;
}

.db-toolbar__refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    flex-shrink: 0;
}

.db-toolbar__drivers,
.db-toolbar__icon-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.25rem;
    flex-shrink: 0;
    gap: 0.3rem;
}

.db-toolbar__icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    min-height: 32px;
    height: 32px;
    padding: 0;
    flex-shrink: 0;
}

.db-toolbar__refresh:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.db-toolbar__refresh:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.db-toolbar__refresh .spin {
    display: inline-block;
    animation: db-spin 0.8s linear infinite;
}

@keyframes db-spin {
    to { transform: rotate(360deg); }
}

.db-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.55rem;
}

.db-ship-card__refs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    opacity: 0.85;
}

.db-toolbar__actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 44px;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
}

/* ── Main layout: 60% left (accordion|assembly 50/50) / 40% map ── */
.db-main {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    overflow: hidden;
}

.db-left {
    flex: 0 0 60%;
    max-width: 60%;
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: stretch;
    gap: 0.65rem;
    overflow: hidden;
}

.db-accordion-wrap {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    height: auto;
    align-self: stretch;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.db-accordion-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: 1rem;
}

.db-assembly-pane {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    min-height: 0;
    height: auto;
    align-self: stretch;
}

.db-assembly-pane--embedded {
    flex: none;
    width: 100%;
    height: auto;
    min-height: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    position: static;
    box-shadow: none;
}

.db-assembly-pane--embedded .db-assembly-pane__body {
    padding: 0;
    overflow: visible;
}

.db-assembly-pane__header {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.55rem 0.8rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1rem;
    font-weight: 800;
    color: #001f3f;
    flex-shrink: 0;
    background: #fff;
}

.db-assembly-pane__subtitle {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.db-assembly-pane__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.65rem 0.7rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    background: #f1f5f9;
}

.db-assembly-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 120px;
    padding: 1rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
}

.db-assembly-empty--error {
    color: #991b1b;
}

.db-assembly-group {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.db-assembly-group__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #03142E 0%, #001f3f 55%, #0f4c75 100%);
    border-bottom: 1px solid #001f3f;
    font-size: 0.85rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.db-assembly-group__count {
    font-size: 0.8rem;
    font-weight: 800;
    color: #ffb080;
    white-space: nowrap;
}

.db-assembly-group__count--done {
    color: #86efac;
}

.db-assembly-item {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.db-assembly-item:last-child {
    border-bottom: none;
}

.db-assembly-item--done {
    background: #ecfdf5;
}

.db-assembly-item--empty {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    padding: 0.75rem;
}

.db-assembly-item__icon {
    margin-top: 0.15rem;
    font-size: 1.1rem;
    color: #0f172a;
    flex-shrink: 0;
}

.db-assembly-item--done .db-assembly-item__icon {
    color: #15803d;
}

.db-assembly-item__body {
    min-width: 0;
    flex: 1;
}

.db-assembly-item__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.15rem;
}

.db-assembly-item__top-main {
    min-width: 0;
    flex: 1;
}

.db-assembly-item__invoice {
    font-size: 0.78rem;
    font-weight: 800;
    color: #0369a1;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.db-assembly-item__sku {
    font-size: 0.92rem;
    font-weight: 800;
    color: #001f3f;
    word-break: break-word;
    line-height: 1.3;
}

.db-assembly-item__done-by {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.05rem;
    flex-shrink: 0;
    max-width: 42%;
    text-align: right;
    line-height: 1.2;
    margin-top: 0;
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
}

.db-assembly-item__done-at {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    white-space: nowrap;
}

.db-assembly-item__done-user {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.db-assembly-item__desc {
    font-size: 0.84rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 0.15rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.db-assembly-item__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    font-weight: 800;
    color: #0f172a;
}

/* ── Zone filter chips (pinned above scrollable list) ── */
.db-zone-filter {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
    background:
        linear-gradient(135deg, #03142E 0%, #001f3f 42%, #0f4c75 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 8px 18px rgba(0, 31, 63, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.db-zone-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}

.db-board-sort {
    flex: 0 0 auto;
    min-width: 7.25rem;
    max-width: 9.5rem;
    height: 36px;
    padding: 0 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    outline: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.db-board-sort:hover:not(:disabled),
.db-board-sort:focus-visible {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.45);
}

.db-board-sort:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.db-board-sort option {
    color: #0f172a;
    background: #fff;
}

.mobile-layout .db-zone-filter,
.db-board--compact.db-board--phone .db-zone-filter {
    flex-wrap: wrap;
    justify-content: stretch;
}

.mobile-layout .db-board-sort,
.db-board--compact.db-board--phone .db-board-sort {
    width: 100%;
    max-width: none;
}

.db-zone-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    min-height: 36px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    backdrop-filter: blur(6px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    transition:
        background 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease,
        transform 0.16s ease,
        box-shadow 0.16s ease;
}

.db-zone-chip:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.db-zone-chip--active {
    background: #ff6600;
    border-color: #ff6600;
    color: #fff;
    box-shadow:
        0 0 0 2px rgba(255, 102, 0, 0.28),
        0 4px 10px rgba(255, 102, 0, 0.35);
}

.db-zone-chip--active:hover {
    background: #ff771a;
    border-color: #ff771a;
    transform: translateY(-1px);
}

.db-zone-chip .chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.22);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.db-zone-chip--active .chip-count {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
}

.db-badge--open {
    background: #dcfce7;
    color: #166534;
}

.db-badge--locked {
    background: #ede9fe;
    color: #6d28d9;
}

.db-badge--assembly {
    background: #7f1d1d;
    color: #fff;
}

.db-badge--dispatch {
    background: #14532d;
    color: #fff;
}

.db-badge--on-delivery {
    background: #1d4ed8;
    color: #fff;
}

.db-badge--route-started {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.db-badge--delivered {
    background: #15803d;
    color: #fff;
}

/* ── Zone accordion (outer) ── */
.db-acc-zones.e-accordion {
    border: none;
    background: transparent;
}

.db-acc-zones .e-acrdn-item {
    margin-bottom: 0.45rem;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.db-acc-zones .e-acrdn-item.e-item-active > .e-acrdn-header {
    background: #eff6ff !important;
    border-bottom: 1px solid #dbeafe;
}

.db-acc-zone-item--unassigned.e-acrdn-item {
    border-color: #fde68a !important;
    background: #fffbeb;
}

.db-acc-zone-item--unassigned.e-acrdn-item.e-item-active > .e-acrdn-header {
    background: #fef3c7 !important;
}

.db-acc-zones .e-acrdn-header {
    padding: 0.55rem 0.85rem !important;
    min-height: 48px;
}

.db-acc-zones .e-acrdn-header .e-toggle-icon {
    color: #64748b;
}

.db-acc-zones .e-acrdn-panel,
.db-acc-zones .e-acrdn-panel > .e-content,
.db-acc-zones .e-acrdn-panel .e-content {
    padding: 0 !important;
    margin: 0 !important;
}

.db-acc-zone-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding-right: 0.35rem;
}

.db-acc-zone-header__title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
}

.db-acc-zone-header__title .bi {
    color: #0284c7;
}

.db-acc-zone-header__count {
    font-size: 0.8rem;
    font-weight: 700;
    color: #166534;
    white-space: nowrap;
}

.db-acc-zone-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.35rem 0 0.45rem;
}

.db-acc-zone-body--loose {
    margin-top: 0.45rem;
    padding-top: 0.55rem;
    border-top: 1px dashed #cbd5e1;
}

.db-acc-loose-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.15rem;
}

.db-acc-empty {
    padding: 0.85rem 0.5rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
}

.db-acc-empty--board {
    padding: 2rem 1rem;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
}

/* ── Dispatch log cards (replaces inner log accordion) ── */
.db-log-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.15rem 0 0.25rem;
}

.db-log-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.db-log-card--locked {
    border-color: #c4b5fd;
    background: #faf5ff;
}

.db-log-card--selected {
    border-color: #93c5fd;
}

.db-log-card__header {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    container-type: inline-size;
    container-name: db-log-card-header;
}

.db-log-card--selected > .db-log-card__header {
    background: #f0f9ff;
}

.db-log-card--locked > .db-log-card__header {
    background: #f5f3ff;
}

.db-log-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.55rem 0.55rem 0.65rem;
}

/* Header: title, then meta+actions, then timestamp */
.db-log-card__header-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    width: 100%;
    min-width: 0;
}

.db-log-card__header-row--selected .db-log-card__id {
    color: #0369a1;
}

.db-log-card__labels-wrap {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    min-width: 0;
}

.db-log-card__labels {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    min-width: 0;
    width: 100%;
    margin: 0;
    padding: 0.05rem 0.1rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: inherit;
    line-height: 1.25;
}

.db-log-card__labels--title,
.db-log-card__labels--meta,
.db-log-card__labels--time {
    width: auto;
    max-width: 100%;
}

.db-log-card__labels--meta {
    flex: 1 1 auto;
    min-width: 0;
}

.db-log-card__labels:hover {
    background: rgba(14, 165, 233, 0.08);
}

.db-log-card__header-row--selected .db-log-card__labels {
    background: rgba(14, 165, 233, 0.1);
}

.db-log-card__meta-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    min-width: 0;
    width: 100%;
}

.db-log-card__map-btn.db-acc-icon-btn {
    display: inline-flex !important;
    flex-shrink: 0;
    margin-top: 0;
}

.db-log-card__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.db-log-card__id {
    font-weight: 800;
    font-size: 1.1rem;
    color: #0f172a;
    white-space: nowrap;
}

.db-log-card__status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.4rem;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
    white-space: nowrap;
}

.db-log-card__meta {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.db-log-card__meta strong {
    font-weight: 800;
}

.db-log-card__timestamp {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.db-log-card__controls {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    min-width: 0;
    flex-shrink: 0;
}

.db-acc-driver {
    width: 160px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* On Delivery header: title left, map/driver/print pinned right */
.db-od-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    min-width: 0;
    width: 100%;
}

.db-od-header-top .db-log-card__labels--title {
    flex: 1 1 auto;
    min-width: 0;
}

.db-od-controls {
    flex-shrink: 0;
    margin-left: auto;
}

.db-od-driver-select {
    width: 100%;
    min-height: 36px;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    border-color: #cbd5e1;
    background-color: #fff;
}

.db-od-driver-select:disabled {
    background-color: #f1f5f9;
    color: #0f172a;
    opacity: 1;
}

.mobile-layout .db-od-driver-select {
    font-size: 0.95rem;
    font-weight: 800;
}

.db-acc-driver .e-input-group,
.db-acc-driver .e-ddl,
.db-acc-driver .e-input-group.e-control-wrapper {
    min-height: 36px !important;
    height: 36px !important;
    margin: 0 !important;
}

.db-acc-driver .e-input-group input.e-input,
.db-acc-driver .e-ddl .e-input {
    height: 34px !important;
    min-height: 34px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.db-acc-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    cursor: pointer;
    flex-shrink: 0;
}

.db-acc-icon-btn:hover:not(:disabled) {
    background: #f8fafc;
}

.db-acc-icon-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.db-acc-icon-btn--question {
    border-color: #0284c7;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 1.1rem;
    font-weight: 800;
}

.db-acc-icon-btn--question:hover:not(:disabled) {
    background: #bae6fd;
    border-color: #0284c7;
}

.db-acc-icon-btn--map {
    border-color: #0f766e;
    background: #ccfbf1;
    color: #0f766e;
}

.db-acc-icon-btn--map:hover:not(:disabled) {
    background: #99f6e4;
    border-color: #0f766e;
}

.db-acc-icon-btn--directions {
    border-color: #c2410c;
    background: #ffedd5;
    color: #c2410c;
}

.db-acc-icon-btn--directions:hover:not(:disabled) {
    background: #fed7aa;
    border-color: #c2410c;
}

.db-log-card__directions-btn.db-acc-icon-btn {
    display: inline-flex;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.db-acc-icon-btn--danger {
    color: #b91c1c;
}

.db-acc-icon-btn--danger:hover:not(:disabled) {
    background: #fef2f2;
}

.db-acc-lock {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    height: 36px;
    color: #0f172a;
    cursor: pointer;
    padding: 0 0.25rem;
    flex-shrink: 0;
    white-space: nowrap;
    margin-bottom: 0;
}

.db-acc-lock__caption {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    color: #0f172a;
}

.db-acc-lock__control {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    height: 36px;
}

.db-acc-lock__choice {
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    line-height: 1;
    min-width: 1.55rem;
    text-align: center;
}

.db-acc-lock__choice--active {
    color: #0f172a;
    font-weight: 800;
}

.db-acc-lock .form-check-input {
    width: 3.25rem;
    height: 1.45rem;
    margin: 0;
    cursor: pointer;
}

.db-acc-lock .form-check-input:checked {
    background-color: #7c3aed;
    border-color: #7c3aed;
}

.db-acc-dispatch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    font-weight: 700;
    flex-shrink: 0;
}

.db-acc-dispatch-btn:disabled {
    opacity: 0.45;
}

.db-od-delivered-btn {
    flex-shrink: 0;
    font-weight: 700;
    white-space: nowrap;
    min-height: 36px;
    padding: 0 0.75rem;
}

/* ── Invoice chips ── */
.db-inv-chip {
    display: flex;
    align-items: stretch;
    gap: 0.45rem;
    border: 1px solid #e2e8f0;
    border-left-width: 4px;
    border-radius: 0;
    background: #fff;
    padding: 0.65rem 0.45rem 0.65rem 0.35rem;
    min-height: 7.25rem;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}

.db-inv-chip__grip {
    flex: 0 0 auto;
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    margin: -0.35rem 0 -0.35rem -0.15rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #94a3b8;
    cursor: grab;
    touch-action: none;
}

.db-inv-chip__grip:hover {
    color: #475569;
    background: #f1f5f9;
}

.db-inv-chip__grip:active {
    cursor: grabbing;
}

.db-inv-chip--dragging {
    opacity: 0.45;
}

.db-inv-chip--drag-over {
    border-color: #ea580c;
    box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.22);
    background: #fff7ed;
}

.db-inv-chip:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.db-inv-chip--selected {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.db-inv-chip--assembly {
    border-left-color: #7f1d1d;
}

.db-inv-chip--dispatch {
    border-left-color: #14532d;
}

.db-inv-chip--on-delivery {
    border-left-color: #1d4ed8;
}

.db-inv-chip--delivered {
    border-left-color: #15803d;
    opacity: 0.92;
}

.db-inv-chip__delivered-at {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
}

.db-acc-zone-header__split {
    font-weight: 600;
    color: #64748b;
}

.db-inv-chip__main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.db-inv-chip__client-row {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    min-width: 0;
}

.db-inv-chip__stop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    margin-top: 0.05rem;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
}

.db-inv-chip__rating {
    appearance: none;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    min-width: 1.55rem;
    min-height: 1.55rem;
    margin-top: 0.05rem;
    padding: 0;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.db-inv-chip__rating:hover {
    transform: scale(1.08);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16);
}

.db-inv-chip__rating--5 {
    background: #166534;
    color: #fff;
}

.db-inv-chip__rating--4 {
    background: #15803d;
    color: #fff;
}

.db-inv-chip__rating--3 {
    background: #ca8a04;
    color: #fff;
}

.db-inv-chip__rating--2 {
    background: #ea580c;
    color: #fff;
}

.db-inv-chip__rating--1 {
    background: #dc2626;
    color: #fff;
}

.db-inv-chip__rating--0 {
    background: #e2e8f0;
    color: #64748b;
}

.db-inv-chip__client {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
    flex: 1;
}

.db-inv-chip__address {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.db-inv-chip__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.1rem;
}

.db-inv-chip__invoice {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.db-inv-chip__invoice-link {
    border: none;
    background: transparent;
    color: #002245;
    cursor: pointer;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 0;
    line-height: inherit;
    white-space: nowrap;
}

.db-inv-chip__invoice-link:hover {
    color: #003366;
}

.db-inv-chip__side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.55rem;
    flex-shrink: 0;
}

.db-inv-chip__status {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 0.4rem;
}

.db-inv-chip__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.db-inv-chip__pct {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.25rem;
    padding: 0.3rem 0.65rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 800;
}

.db-inv-chip__elapsed {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.db-inv-chip__actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    flex-shrink: 0;
}

.db-assembly--low {
    background-color: #7f1d1d;
    color: #fff;
}

.db-assembly--mid {
    background-color: #b45309;
    color: #fff;
}

.db-assembly--high {
    background-color: #166534;
    color: #fff;
}

/* ── Touch buttons / icon buttons ── */
.db-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    cursor: pointer;
    font-size: 0.95rem;
}

.db-icon-btn:hover {
    background: #f1f5f9;
}

.db-inv-chip__actions .db-icon-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    font-size: 1.05rem;
    border: none;
    color: #fff;
}

.db-inv-chip__actions .db-icon-btn--move {
    background: #0284c7;
}

.db-inv-chip__actions .db-icon-btn--move:hover {
    background: #0369a1;
}

.db-inv-chip__actions .db-icon-btn--map {
    background: #0f766e;
}

.db-inv-chip__actions .db-icon-btn--map:hover {
    background: #0d9488;
}

.db-inv-chip__actions .db-icon-btn--proof {
    background: #0f4c75;
}

.db-inv-chip__actions .db-icon-btn--proof:hover {
    background: #1565a0;
}

.db-inv-chip__actions .db-icon-btn--lock {
    background: #dc2626;
}

.db-inv-chip__actions .db-icon-btn--lock:hover {
    background: #b91c1c;
}

/* Assembly ? — tablet/mobile/compact only (desktop uses side panel) */
.db-inv-chip__actions .db-icon-btn--question {
    display: none;
    background: #0369a1;
    font-weight: 800;
}

.db-inv-chip__actions .db-icon-btn--question:hover {
    background: #0284c7;
}

.tablet-layout .db-inv-chip__actions .db-icon-btn--question,
.mobile-layout .db-inv-chip__actions .db-icon-btn--question,
.db-board--compact .db-inv-chip__actions .db-icon-btn--question {
    display: inline-flex;
}

/* ── Map pane (desktop 40%) — map + needs attention stacked 50/50 ── */
.db-map-pane {
    flex: 0 0 calc(40% - 0.75rem);
    max-width: calc(40% - 0.75rem);
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: hidden;
    align-self: stretch;
    margin-top: 0;
    height: auto;
    gap: 0.55rem;
}

.db-map-pane__stack {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.db-map-pane__card {
    flex: 1 1 50%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.db-map-pane__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 700;
    color: #0f172a;
    flex-shrink: 0;
    background: #fff;
}

.db-map-pane__body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.db-map-pane__body .dispatch-map-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #f8fafc;
}

.db-map-pane__card--attention .na-panel {
    border: none;
    border-radius: 0;
    height: 100%;
}

.dispatch-map-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.4rem 0.65rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    flex-shrink: 0;
}

.dispatch-map-count {
    font-size: 0.75rem;
    color: #0f172a;
    font-weight: 700;
    text-align: right;
    max-width: 70%;
}

.dispatch-map-canvas {
    flex: 1;
    min-height: 0;
    width: 100%;
}

/* ── Sheets / dialogs (must beat syncfusion.css .e-dialog { z-index: 3000 !important }) ──
   Without this, the modal overlay sits above the dialog and locks the page. */

.db-sheet-dialog.e-dialog,
.pending-assembly-dialog.e-dialog,
.client-geocoder-dialog.e-dialog,
.confirm-dialog.e-dialog,
.db-assembly-status-dialog.e-dialog,
.db-map-dialog.e-dialog {
    position: fixed !important;
    z-index: 50000 !important;
    max-width: min(520px, calc(100vw - 2rem)) !important;
    width: calc(100vw - 2rem) !important;
    max-height: min(90vh, 720px) !important;
    margin: 0 !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28) !important;
}

.pending-assembly-dialog.e-dialog {
    max-width: min(720px, calc(100vw - 2rem)) !important;
}

.client-geocoder-dialog.e-dialog {
    max-width: min(860px, calc(100vw - 2rem)) !important;
}

.db-assembly-status-dialog.e-dialog {
    max-width: min(560px, calc(100vw - 1.5rem)) !important;
}

.db-map-dialog.e-dialog {
    max-width: min(640px, calc(100vw - 1rem)) !important;
    width: calc(100vw - 1rem) !important;
}

.db-directions-dialog.e-dialog {
    position: fixed !important;
    z-index: 50000 !important;
    max-width: min(1200px, calc(100vw - 1rem)) !important;
    width: calc(100vw - 1rem) !important;
    max-height: min(94vh, 960px) !important;
    margin: 0 !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28) !important;
}

.db-sheet-dialog.e-dialog .e-dlg-content,
.pending-assembly-dialog.e-dialog .e-dlg-content,
.client-geocoder-dialog.e-dialog .e-dlg-content,
.db-assembly-status-dialog.e-dialog .e-dlg-content,
.db-map-dialog.e-dialog .e-dlg-content {
    max-height: min(70vh, 560px) !important;
    overflow-y: auto !important;
}

.db-map-dialog.e-dialog .e-dlg-content {
    overflow: hidden !important;
    padding: 0.5rem !important;
}

.db-directions-dialog.e-dialog .e-dlg-content {
    max-height: min(82vh, 820px) !important;
    overflow: hidden !important;
    padding: 0.5rem !important;
}

/* Overlay siblings — Syncfusion places .e-dlg-overlay next to the dialog */
.e-dlg-overlay:has(+ .db-sheet-dialog),
.e-dlg-overlay:has(+ .pending-assembly-dialog),
.e-dlg-overlay:has(+ .client-geocoder-dialog),
.e-dlg-overlay:has(+ .confirm-dialog),
.e-dlg-overlay:has(+ .db-assembly-status-dialog),
.e-dlg-overlay:has(+ .db-map-dialog),
.e-dlg-overlay:has(+ .db-directions-dialog) {
    z-index: 49990 !important;
    background-color: rgba(15, 23, 42, 0.45) !important;
}

.db-directions-dialog__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
    gap: 0.65rem;
    height: min(76vh, 760px);
    min-height: 360px;
}

.db-directions-dialog__map {
    min-width: 0;
    min-height: 0;
    height: 100%;
}

.db-directions-dialog__map .dispatch-map-panel {
    height: 100%;
    min-height: 280px;
}

.db-directions-dialog__map .dispatch-map-canvas {
    height: calc(100% - 40px) !important;
    min-height: 240px;
}

.db-directions-dialog__side {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    overflow: hidden;
}

.db-directions-dialog__section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.7rem 0.75rem;
    overflow: auto;
}

.db-directions-dialog__section--etas {
    flex: 1 1 auto;
    max-height: none;
    height: 100%;
}

.db-directions-dialog__section--summary {
    flex: 0 0 auto;
}

.db-directions-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem 0.75rem;
    margin: 0;
}

.db-directions-meta__row {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.db-directions-meta__row dt {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.db-directions-meta__row dd {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 700;
    color: #0f172a;
    overflow-wrap: anywhere;
}

@media (max-width: 720px) {
    .db-directions-meta {
        grid-template-columns: 1fr;
    }
}

.db-directions-dialog__section-title {
    margin: 0 0 0.55rem;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #475569;
}

.db-directions-dialog__empty {
    padding: 2rem 1rem;
    text-align: center;
    font-weight: 700;
}

.db-directions-dialog__empty--error {
    color: #b91c1c;
}

.db-directions-eta-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.db-directions-eta-list__item {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    padding: 0.7rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.db-directions-eta-list__item:last-child {
    border-bottom: 0;
}

.db-directions-eta-list__badge {
    flex: 0 0 auto;
    min-width: 2.15rem;
    height: 2.15rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    background: #ffedd5;
    color: #c2410c;
    border: 1px solid #fdba74;
}

.db-directions-eta-list__item--depart .db-directions-eta-list__badge,
.db-directions-eta-list__item--return .db-directions-eta-list__badge {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #7dd3fc;
}

.db-directions-eta-list__name {
    font-weight: 700;
    color: #0f172a;
    font-size: 1.05rem;
    line-height: 1.3;
}

.db-directions-eta-list__addr {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 0.15rem;
    line-height: 1.35;
}

.db-directions-eta-list__stamps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    margin-top: 0.55rem;
}

.db-directions-eta-stamp {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
    padding: 0.4rem 0.5rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.db-directions-eta-stamp__label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
}

.db-directions-eta-stamp__value {
    font-size: 0.8rem;
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.db-directions-eta-stamp--planned {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.db-directions-eta-stamp--planned .db-directions-eta-stamp__label {
    color: #475569;
}

.db-directions-eta-stamp--actual {
    background: #ecfdf5;
    border-color: #86efac;
}

.db-directions-eta-stamp--actual .db-directions-eta-stamp__label {
    color: #047857;
}

.db-directions-eta-stamp--actual .db-directions-eta-stamp__value {
    color: #065f46;
}

.db-directions-eta-stamp--pending {
    background: #fff7ed;
    border-color: #fed7aa;
}

.db-directions-eta-stamp--pending .db-directions-eta-stamp__label {
    color: #c2410c;
}

.db-directions-eta-stamp--pending .db-directions-eta-stamp__value {
    color: #9a3412;
}

.db-directions-eta-list__item--done .db-directions-eta-list__badge {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

.db-directions-eta-delta {
    margin-top: 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
}

.db-directions-eta-delta--early {
    background: #ecfdf5;
    border-color: #86efac;
    color: #047857;
}

.db-directions-eta-delta--late {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.db-directions-eta-list__time {
    font-size: 0.98rem;
    font-weight: 700;
    color: #334155;
    margin-top: 0.25rem;
}

.db-directions-eta-list__metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    margin-top: 0.45rem;
}

.db-directions-eta-metric {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    padding: 0.35rem 0.45rem;
    border-radius: 8px;
    border: 1px solid #dbe3ef;
    background: #f1f5f9;
}

.db-directions-eta-metric__label {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
}

.db-directions-eta-metric__value {
    font-size: 0.78rem;
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.db-directions-eta-metric--covered {
    background: #eff6ff;
    border-color: #93c5fd;
}

.db-directions-eta-metric--covered .db-directions-eta-metric__label {
    color: #1d4ed8;
}

.db-directions-eta-metric--covered .db-directions-eta-metric__value {
    color: #1e3a8a;
}

.db-directions-eta-list__leg {
    margin-top: 0.4rem;
    font-weight: 600;
    color: #64748b;
    font-size: 0.78rem;
}

@media (max-width: 420px) {
    .db-directions-eta-list__stamps,
    .db-directions-eta-list__metrics {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .db-directions-dialog__layout {
        grid-template-columns: 1fr;
        height: min(80vh, 780px);
    }

    .db-directions-dialog__map {
        min-height: 240px;
        height: 42%;
    }

    .db-directions-dialog__side {
        height: 58%;
    }
}

.db-turnbyturn-dialog__layout {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    height: min(78vh, 720px);
    min-height: 360px;
}

.db-turnbyturn-dialog__map {
    flex: 0 0 42%;
    min-height: 200px;
}

.db-turnbyturn-dialog__map .dispatch-map-panel {
    height: 100%;
    min-height: 200px;
}

.db-turnbyturn-dialog__map .dispatch-map-canvas {
    height: calc(100% - 40px) !important;
    min-height: 160px;
}

.db-turnbyturn-dialog__steps {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.7rem 0.75rem;
}

.db-turnbyturn-steps .db-directions-steps__instruction {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
}

.db-turnbyturn-steps .db-directions-steps__meta {
    font-size: 0.85rem;
    margin-top: 0.2rem;
}

.db-turnbyturn-steps .db-directions-steps__item {
    padding: 0.65rem 0;
}

.driver-nav-dialog.e-dialog .e-dlg-content {
    padding: 0 !important;
    overflow: hidden !important;
    max-height: min(86vh, 860px) !important;
}

.driver-nav-host {
    height: min(78vh, 760px);
    min-height: 420px;
    background: #0f172a;
}

.driver-nav {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #0b1220;
    color: #fff;
}

.driver-nav__banner {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.9rem 1rem;
    background: linear-gradient(180deg, #002245 0%, #003366 100%);
    border-bottom: 2px solid #FF6600;
    z-index: 2;
}

.driver-nav__banner-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
    background: #FF6600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.45rem;
}

.driver-nav__distance {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.driver-nav__instruction {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 0.15rem;
}

.driver-nav__meta {
    font-size: 0.82rem;
    opacity: 0.85;
    margin-top: 0.25rem;
}

.driver-nav__map {
    flex: 1 1 auto;
    min-height: 240px;
    position: relative;
}

.driver-nav__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    background: #111827;
    border-top: 1px solid rgba(255,255,255,0.08);
    z-index: 2;
}

.driver-nav__dest {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
    font-size: 0.92rem;
    min-width: 0;
}

.driver-nav__dest span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.driver-nav__actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.driver-nav__voice-btn,
.driver-nav__recenter-btn {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.2);
    background: #1f2937;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.driver-nav__voice-btn--off {
    opacity: 0.55;
}

.driver-nav__status {
    position: absolute;
    left: 0.75rem;
    bottom: 4.2rem;
    z-index: 3;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 600;
}

.driver-nav__puck {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    border: 3px solid #fff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.35);
}

/* Fallback when :has() is unavailable — keep overlays under board dialogs */
body > .e-dlg-overlay {
    z-index: 49990 !important;
}

/* ── Sheets content ── */
.db-sheet-summary {
    margin-bottom: 0.85rem;
}

.db-sheet-summary__title {
    font-weight: 800;
    color: #0f172a;
}

.db-sheet-summary__meta {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.15rem;
}

.db-confirm-dispatch__field {
    margin-bottom: 0.9rem;
}

.db-confirm-dispatch__driver {
    font-weight: 700;
    color: #0f172a;
    padding: 0.45rem 0.65rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.db-confirm-dispatch__select {
    width: 100%;
    min-height: 2.35rem;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    padding: 0.4rem 0.65rem;
}

.db-confirm-dispatch__select:focus {
    border-color: #64748b;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.18);
}

.db-confirm-dispatch__hint {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.db-confirm-dispatch__error {
    font-size: 0.78rem;
    color: #b91c1c;
    margin-top: 0.35rem;
}

.db-confirm-dispatch__stops {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.db-confirm-dispatch__stop {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.5rem 0.65rem;
    border-bottom: 1px solid #f1f5f9;
}

.db-confirm-dispatch__stop:last-child {
    border-bottom: none;
}

.db-confirm-dispatch__stop-num {
    flex: 0 0 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.db-confirm-dispatch__stop-name {
    font-weight: 650;
    font-size: 0.85rem;
    color: #0f172a;
}

.db-confirm-dispatch__stop-meta {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 0.1rem;
}

.db-move-groups {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-height: 360px;
    overflow-y: auto;
}

.db-move-group__title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.db-move-option {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 0.35rem;
    cursor: pointer;
    background: #fff;
}

.db-move-option--active {
    border-color: #0ea5e9;
    background: #f0f9ff;
}

.db-move-option__body {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
}

.db-move-option__id {
    font-weight: 800;
    color: #0f172a;
}

.db-move-option__warn {
    color: #b45309;
    font-weight: 700;
}

/* ── Google Maps advanced markers (used by dispatch-maps.js) ── */
.dm-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.28);
    border: 2px solid #fff;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.dm-marker--host {
    width: 32px;
    height: 32px;
    padding: 0;
    background: #0f172a;
    color: #fff;
}

.dm-marker--host i {
    font-size: 14px;
    line-height: 1;
}

.dm-marker--pin {
    width: 28px;
    height: 28px;
    background: #dc2626;
    color: #fff;
}

.dm-marker--active {
    background: #2563eb !important;
    transform: scale(1.12);
    z-index: 2;
}

.dm-marker-num {
    line-height: 1;
}

/* ── Pin info card (Google InfoWindow) ── */
.gm-style .gm-style-iw-c:has(.dm-info-card) {
    padding: 0 !important;
    border-radius: 16px !important;
    background: transparent !important;
    box-shadow:
        0 18px 40px rgba(0, 31, 63, 0.28),
        0 2px 8px rgba(0, 31, 63, 0.18) !important;
    overflow: visible !important;
}

.gm-style .gm-style-iw-d:has(.dm-info-card) {
    overflow: hidden !important;
    max-height: none !important;
}

.gm-style .gm-style-iw-tc:has(+ div .dm-info-card),
.gm-style .gm-style-iw-t:has(+ div .dm-info-card) {
    filter: drop-shadow(0 6px 10px rgba(0, 31, 63, 0.2));
}

.gm-style .gm-style-iw-c:has(.dm-info-card) button.gm-ui-hover-effect {
    top: 8px !important;
    right: 8px !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.16) !important;
    opacity: 1 !important;
}

.gm-style .gm-style-iw-c:has(.dm-info-card) button.gm-ui-hover-effect > span {
    background-color: #fff !important;
    margin: 0 !important;
}

.dm-info-card {
    position: relative;
    width: min(300px, 78vw);
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: #0f172a;
}

.dm-info-card__accent {
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6600 0%, #ff8a33 55%, #001f3f 100%);
}

.dm-info-card__close {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.dm-info-card__close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.dm-info-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 2.6rem 0.7rem 0.9rem;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(255, 102, 0, 0.28), transparent 55%),
        linear-gradient(135deg, #03142E 0%, #001f3f 48%, #0f4c75 100%);
    color: #fff;
}

.dm-info-card__stop {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.dm-info-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: #ff6600;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(255, 102, 0, 0.45);
}

.dm-info-card__badge--dot {
    font-size: 0.55rem;
}

.dm-info-card__eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.dm-info-card__brand {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.88);
}

.dm-info-card__body {
    padding: 0.85rem 0.95rem 0.95rem;
    background:
        linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
}

.dm-info-card__title {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: #001f3f;
    margin-bottom: 0.65rem;
}

.dm-info-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.dm-info-card__meta--empty {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
}

.dm-info-card__row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.82rem;
    line-height: 1.35;
    color: #1e293b;
}

.dm-info-card__row--address {
    font-size: 0.72rem;
    color: #334155;
    align-items: center;
}

.dm-info-card__row--address .dm-info-card__row-text {
    font-weight: 550;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dm-info-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    flex-shrink: 0;
    border-radius: 7px;
    background: rgba(0, 31, 63, 0.08);
    color: #0f4c75;
    font-size: 0.78rem;
}

.dm-info-card__row-text {
    min-width: 0;
    font-weight: 600;
}

.dm-info-card__row-text strong {
    font-weight: 800;
    color: #001f3f;
}

/*
 * Compact dispatch board:
 * - MobileLayout tablet/phone shells (.tablet-layout / .mobile-layout)
 * - Explicit .db-board--compact (set from JS)
 * - Narrow viewport media query (desktop shell resized small)
 * Do NOT rely on viewport width alone — tablet shell is ≤1024px inside wider windows.
 */
.tablet-layout .db-board,
.mobile-layout .db-board,
.db-board--compact {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

/* Tablet: board + map side-by-side 50/50 (assembly stays a dialog) */
.tablet-layout .db-main {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.65rem;
    min-height: 0;
    flex: 1 1 auto;
}

.tablet-layout .db-left {
    display: block;
    flex: 1 1 0;
    max-width: none;
    width: auto;
    min-width: 0;
    min-height: 0;
}

.tablet-layout .db-accordion-wrap {
    flex: 1 1 0;
    width: 100%;
    max-width: none;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tablet-layout .db-map-pane {
    display: flex !important;
    flex: 1 1 0;
    max-width: none;
    width: auto;
    min-width: 0;
    min-height: 0;
    margin-top: 0;
    height: auto;
    align-self: stretch;
}

.tablet-layout .db-board {
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

/* Phone: full-width list, hide map */
.mobile-layout .db-board {
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    padding-bottom: 0.35rem;
}

.mobile-layout .db-toolbar__title {
    font-size: 1rem;
}

.mobile-layout .db-toolbar__title-row {
    gap: 0.4rem;
}

.mobile-layout .db-toolbar__refresh {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
}

.mobile-layout .db-toolbar__drivers,
.mobile-layout .db-toolbar__icon-btn {
    min-width: 28px;
    width: 28px;
    min-height: 28px;
    height: 28px;
    padding: 0;
    justify-content: center;
}

.mobile-layout .db-toolbar__icon-actions {
    gap: 0.25rem;
}

.tablet-layout .db-tabs {
    width: 100%;
    max-width: 100%;
}

.mobile-layout .db-tabs,
.db-board--compact.db-board--phone .db-tabs {
    width: 100%;
    max-width: 100%;
}

.mobile-layout .db-main,
.db-board--compact.db-board--phone .db-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.mobile-layout .db-map-pane,
.db-board--compact.db-board--phone .db-map-pane {
    margin-top: 0;
}

.mobile-layout .db-left {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    max-width: none;
    width: 100%;
    min-height: 0;
    overflow: hidden;
}

.mobile-layout .db-accordion-wrap {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tablet-layout .db-assembly-pane--inline,
.mobile-layout .db-assembly-pane--inline,
.db-board--compact .db-assembly-pane--inline {
    display: none !important;
}

.mobile-layout .db-map-pane {
    display: flex !important;
    flex: 0 0 auto;
    max-width: none;
    width: 100%;
    min-width: 0;
    min-height: 220px;
    max-height: min(42vh, 360px);
    margin-top: 0.45rem;
    height: auto;
    align-self: stretch;
}

.mobile-layout .db-map-pane__stack {
    flex: 1;
    min-height: 0;
}

.mobile-layout .db-map-pane__card--map {
    display: none !important;
}

.mobile-layout .db-map-pane__card--attention {
    flex: 1 1 auto;
    min-height: 0;
}

.tablet-layout .db-acc-zone-body,
.mobile-layout .db-acc-zone-body,
.db-board--compact .db-acc-zone-body {
    padding: 0.3rem 0 0.4rem;
}

.tablet-layout .db-log-card__body,
.mobile-layout .db-log-card__body,
.db-board--compact .db-log-card__body {
    padding: 0.35rem 0.4rem 0.45rem;
    gap: 0.25rem;
}

.tablet-layout .db-log-card__header,
.mobile-layout .db-log-card__header,
.db-board--compact .db-log-card__header {
    padding: 0.5rem 0.55rem;
}

.tablet-layout .db-log-card__timestamp,
.mobile-layout .db-log-card__timestamp,
.db-board--compact .db-log-card__timestamp {
    font-size: 10px;
}

/* Phone: keep meta + actions on one row when possible; wrap only if needed */
.mobile-layout .db-log-card__header-row {
    gap: 0.15rem;
}

.mobile-layout .db-log-card__meta-actions {
    align-items: center;
    flex-wrap: wrap;
    row-gap: 0.3rem;
}

.mobile-layout .db-log-card__labels-wrap {
    width: 100%;
    align-items: center;
}

.mobile-layout .db-log-card__controls {
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 0.35rem;
    margin-left: auto;
}

.mobile-layout .db-acc-driver {
    flex: 0 1 auto;
    width: 7.5rem;
    min-width: 6.75rem;
    max-width: 9rem;
}

.mobile-layout .db-od-header-top {
    flex-wrap: nowrap;
    align-items: center;
}

.mobile-layout .db-od-controls {
    flex-wrap: nowrap;
    gap: 0.25rem;
}

.mobile-layout .db-od-controls .db-acc-driver {
    width: 7.25rem;
    min-width: 6.5rem;
    max-width: 8.5rem;
}

.mobile-layout .db-acc-driver .e-input-group,
.mobile-layout .db-acc-driver .e-ddl,
.mobile-layout .db-acc-driver .e-input-group.e-control-wrapper {
    min-height: 34px !important;
    height: 34px !important;
}

.mobile-layout .db-acc-driver .e-input-group input.e-input,
.mobile-layout .db-acc-driver .e-ddl .e-input {
    height: 32px !important;
    min-height: 32px !important;
    font-size: 0.82rem !important;
}

.mobile-layout .db-acc-icon-btn,
.mobile-layout .db-acc-dispatch-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
}

.mobile-layout .db-acc-lock {
    height: 34px;
    gap: 0.25rem;
    padding: 0 0.15rem;
}

.mobile-layout .db-acc-lock__choice {
    font-size: 0.7rem;
    min-width: 1.35rem;
}

.mobile-layout .db-acc-lock .form-check-input {
    width: 2.85rem;
    height: 1.3rem;
}

.tablet-layout .db-inv-chip,
.mobile-layout .db-inv-chip,
.db-board--compact .db-inv-chip {
    gap: 0.35rem;
    padding: 0.55rem 0.35rem 0.55rem 0.25rem;
}

.tablet-layout .db-inv-chip__badge,
.mobile-layout .db-inv-chip__badge,
.db-board--compact .db-inv-chip__badge {
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
}

.tablet-layout .db-inv-chip__pct,
.mobile-layout .db-inv-chip__pct,
.db-board--compact .db-inv-chip__pct {
    min-width: 2.75rem;
    padding: 0.25rem 0.45rem;
    font-size: 0.9rem;
}

.tablet-layout .db-inv-chip__actions .db-icon-btn,
.mobile-layout .db-inv-chip__actions .db-icon-btn,
.db-board--compact .db-inv-chip__actions .db-icon-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    font-size: 0.95rem;
}

.tablet-layout .mobile-body:has(.db-board),
.mobile-layout .mobile-body:has(.db-board) {
    padding-left: 6px;
    padding-right: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.tablet-layout .mobile-body:has(.db-board) > .page-container,
.mobile-layout .mobile-body:has(.db-board) > .page-container {
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (max-width: 1023.98px) {
    .db-assembly-pane--inline {
        display: none !important;
    }
}

/* Phone only: hide map, stack list full width */
@media (max-width: 767.98px) {
    .db-board {
        padding: 0.4rem 0.35rem 0.5rem;
    }

    .db-main {
        display: flex;
        flex-direction: column;
        min-height: 0;
        flex: 1 1 auto;
        overflow: hidden;
    }

    .db-left {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        max-width: none;
        width: 100%;
        min-height: 0;
        overflow: hidden;
    }

    .db-accordion-wrap {
        flex: 1 1 auto;
        width: 100%;
        max-width: none;
        min-height: 0;
        height: auto;
        max-height: none;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .db-map-pane {
        display: none !important;
    }
}

/* ── Dispatch Delivery Boards Dialog (dashboard) ── */
.ddb-dialog.e-dialog {
    z-index: 20000 !important;
    width: min(980px, calc(100vw - 2rem)) !important;
    max-width: min(980px, calc(100vw - 2rem)) !important;
    height: min(80vh, calc(100vh - 2rem)) !important;
    max-height: min(80vh, calc(100vh - 2rem)) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.ddb-dialog.e-dialog > .e-dlg-header-content {
    flex: 0 0 auto !important;
}

.ddb-dialog.e-dialog > .e-dlg-content {
    flex: 1 1 auto !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
}
