html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}


/* =====================================================
   LOGIN
   ===================================================== */

.cw-login-page {
    min-height: 78vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10vh;
}

.cw-login-card {
    width: 100%;
    max-width: 430px;
    padding: 32px 36px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.cw-login-logo {
    text-align: center;
    margin-bottom: 20px;
}

    .cw-login-logo img {
        display: block;
        width: 340px;
        max-width: 100%;
        height: auto;
        margin: 0 auto;
    }

.cw-login-title {
    text-align: center;
    margin-bottom: 28px;
    font-weight: 600;
}


.cw-app-layout {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: #f8f9fa;
}


/* =====================================================
   SIDEBAR
   ===================================================== */

.cw-sidebar {
    width: 255px;
    min-width: 255px;
    min-height: 100vh;
    background: #ffffff;
    border-right: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cw-icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.cw-sidebar-brand-area {
    min-height: 76px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e7ebef;
    flex-shrink: 0;
}

.cw-sidebar-brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    color: #172033;
    text-decoration: none;
}

.cw-sidebar-logo {
    display: block;
    width: 174px;
    height: 54px;
    object-fit: contain;
    object-position: left center;
}

.cw-sidebar-company {
    padding: 12px 16px 13px;
    display: grid;
    gap: 6px;
    border-bottom: 1px solid #e7ebef;
    background: #fbfcfd;
    flex-shrink: 0;
}

.cw-sidebar-company-label {
    color: #75808b;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cw-company-link {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    color: #212529;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.25;
}

    .cw-company-link:hover {
        color: #0d6efd;
    }

    .cw-company-link span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.cw-company-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cw-company-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    padding-top: 2px;
}

.cw-company-action-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #5d6874;
    font-size: 0.75rem;
    text-decoration: none;
}

.cw-company-action-link:hover {
    color: #0d6efd;
}


/* =====================================================
   MENU
   ===================================================== */

.cw-menu-section-title {
    padding: 22px 20px 6px 20px;
    font-size: 12px;
    font-weight: 700;
    color: #6c757d;
    letter-spacing: 0.08em;
}

.cw-sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    padding: 8px 10px 16px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd3dc transparent;
}

.cw-menu-link {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 2px;
    color: #212529;
    text-decoration: none;
    border-radius: 6px;
}

    .cw-menu-link:hover {
        color: #0d6efd;
        background: #f1f4f8;
    }

.cw-menu-link.cw-active,
.cw-submenu-link.cw-active {
    color: #0b5ed7;
    background: #eaf3ff;
    font-weight: 600;
    box-shadow: inset 3px 0 0 #0d6efd;
}

.cw-menu-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cw-sidebar-bottom {
    border-top: 1px solid #e1e6eb;
    background: #ffffff;
    flex-shrink: 0;
}

.cw-sidebar-account {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    padding: 13px 15px 11px;
}

.cw-sidebar-user-avatar {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    color: #315f88;
    background: #eaf3f8;
}

.cw-sidebar-user-avatar svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cw-sidebar-user-identity {
    display: grid;
    min-width: 0;
    align-content: center;
    line-height: 1.25;
}

.cw-sidebar-user-identity strong,
.cw-sidebar-user-identity span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cw-sidebar-user-identity strong {
    color: #26313c;
    font-size: 0.86rem;
}

.cw-sidebar-user-identity span {
    margin-top: 2px;
    color: #77818c;
    font-size: 0.72rem;
}

.cw-sidebar-account form {
    grid-column: 1 / -1;
    margin: 0;
}

.cw-sidebar-logout {
    display: flex;
    width: 100%;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid #d5dbe1;
    border-radius: 6px;
    color: #4f5964;
    background: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
}

.cw-sidebar-logout:hover,
.cw-sidebar-logout:focus-visible {
    color: #0b5ed7;
    border-color: #aac7e7;
    background: #f3f8fd;
}

.cw-sidebar-footer {
    padding: 8px 15px 10px;
    border-top: 1px solid #eef1f4;
    color: #929aa3;
    font-size: 0.68rem;
    letter-spacing: 0.02em;
    text-align: center;
}

/* Delivery reports */
.cw-report-entry {
    display: flex;
    min-height: 118px;
    flex-direction: column;
    justify-content: center;
    gap: .35rem;
    padding: 1.25rem;
    border: 1px solid #dbe3ec;
    border-radius: .8rem;
    color: #1f2937;
    background: #fff;
    text-decoration: none;
    box-shadow: 0 .15rem .45rem rgba(15, 23, 42, .04);
}

.cw-report-entry:hover {
    border-color: #8eb4db;
    color: #0d5b9e;
    transform: translateY(-1px);
}

.cw-report-entry span,
.cw-report-company-meta,
.cw-report-generated,
.cw-report-note { color: #64748b; }

.cw-report-document {
    padding: 1.25rem;
    border: 1px solid #dbe3ec;
    border-radius: .6rem;
    background: #fff;
}

.cw-report-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: .7rem;
    border-bottom: 2px solid #1e5c8f;
}

.cw-report-company { font-size: 1.2rem; font-weight: 700; }
.cw-report-logo { width: auto; max-width: 140px; height: 42px; object-fit: contain; }
.cw-report-title { margin: 1rem 0; font-size: 1.55rem; }
.cw-report-fields { margin-bottom: .9rem; }
.cw-report-fields h2 {
    margin-bottom: .4rem;
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #475569;
}

.cw-report-field-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .5rem;
}

.cw-report-field-grid > div {
    padding: .55rem .7rem;
    border: 1px solid #e2e8f0;
    border-radius: .35rem;
    background: #f8fafc;
}

.cw-report-field-grid span,
.cw-report-field-grid strong { display: block; }
.cw-report-field-grid span {
    margin-bottom: .15rem;
    font-size: .72rem;
    color: #64748b;
}

.cw-report-table { font-size: .76rem; white-space: pre-line; }
.cw-report-table thead th { color: #fff; background: #1e5c8f; }
.cw-report-secondary td { color: #64748b; background: #f8fafc; }
.cw-report-note { margin: .8rem 0 0; font-size: .78rem; }
.cw-report-preview-body { margin: 0; background: #e9eef4; }
.cw-report-preview-shell { max-width: 1600px; margin: 0 auto; padding: 1rem; }
.cw-report-preview-actions {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    margin-bottom: .75rem;
}

@media (max-width: 991.98px) {
    .cw-report-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media print {
    @page { size: auto; margin: 10mm; }
    .cw-report-preview-body,
    .cw-report-preview-shell { margin: 0; padding: 0; background: #fff; }
    .cw-report-document { padding: 0; border: 0; border-radius: 0; }
    .cw-report-field-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .cw-report-table-wrap { overflow: visible !important; }
    .cw-report-table { font-size: 7pt; }
    .cw-report-table thead { display: table-header-group; }
    .cw-report-table tr { break-inside: avoid; }
}


/* =====================================================
   MENU GROUP
   ===================================================== */

.cw-menu-group-button {
    width: 100%;
    margin-top: 8px;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: #212529;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    cursor: pointer;
}

.cw-menu-group-label {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

    .cw-menu-group-button:hover {
        color: #0d6efd;
        background: #f1f4f8;
    }

.cw-menu-group-button.cw-active {
    color: #0b5ed7;
    background: #f5f8fb;
    font-weight: 600;
}

.cw-menu-arrow {
    font-size: 13px;
    transition: transform 0.2s ease;
}

.cw-menu-group-button[aria-expanded="true"] .cw-menu-arrow {
    transform: rotate(180deg);
}


/* =====================================================
   SUBMENU
   ===================================================== */

.cw-submenu {
    padding: 3px 0 5px 16px;
}

.cw-submenu-link {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    margin: 1px 0;
    color: #495057;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
}

.cw-submenu-link .cw-menu-icon {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
}

    .cw-submenu-link:hover {
        color: #0d6efd;
        background: #f1f4f8;
    }


/* =====================================================
   MAIN AREA
   ===================================================== */

.cw-main-area {
    flex: 1;
    min-width: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


/* =====================================================
   TOP BAR
   ===================================================== */

.cw-topbar {
    height: 76px;
    min-height: 76px;
    padding: 0 28px;
    background: #ffffff;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    z-index: 100;
}

.cw-topbar-spacer {
    flex: 1;
}

.cw-topbar-user {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    white-space: nowrap;
}

    .cw-topbar-user ul {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 18px;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none;
    }

    .cw-topbar-user li {
        display: flex !important;
        align-items: center;
        margin: 0 !important;
        padding: 0 !important;
    }

    .cw-topbar-user form {
        display: flex;
        align-items: center;
        margin: 0;
    }


/* =====================================================
   CONTENT
   ===================================================== */

.cw-content {
    flex: 1;
    min-width: 0;
    min-height: 0;
    width: 100%;
    padding: 28px 32px;
    overflow-y: auto;
    overflow-x: auto;
}


/* =====================================================
   FOOTER
   ===================================================== */

.cw-footer {
    padding: 14px 32px;
    color: #6c757d;
    border-top: 1px solid #dee2e6;
    background: #ffffff;
    font-size: 14px;
    flex-shrink: 0;
}


/* =====================================================
   TABLET
   ===================================================== */

@media (max-width: 991px) {

    .cw-sidebar {
        width: 210px;
        min-width: 210px;
    }

    .cw-content {
        padding: 22px;
    }

    .cw-topbar {
        padding: 0 22px;
    }
}


/* =====================================================
   CLIENT CARDS - SCREEN COLUMN WIDTHS
   ===================================================== */

.cw-status-client {
    width: 52%;
}

.cw-status-amount {
    width: 16%;
}

.cw-card-date {
    width: 14%;
}

.cw-card-description {
    width: 44%;
}

.cw-card-amount {
    width: 14%;
}

/* =====================================================
   IMPORTS PAGE
   ===================================================== */

.cw-import-page {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cw-import-fixed {
    flex: 0 0 auto;
}

.cw-import-table-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.cw-import-table-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #ffffff;
}

/* =====================================================
   SPECIFICATIONS PAGE
   ===================================================== */

.cw-spec-page {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cw-spec-fixed {
    flex: 0 0 auto;
}

.cw-spec-table-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.cw-spec-footer {
    flex: 0 0 auto;
    padding-top: 12px;
}

/* Кај овие страници скрола само табелата. */
.cw-content:has(.cw-spec-page),
.cw-content:has(.cw-import-page) {
    overflow: hidden;
}

.cw-spec-table-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #ffffff;
}

/* =====================================================
   PRINT HEADER
   ===================================================== */
.cw-print-header {
    display: none;
}

/* =====================================================
   SPECIFICATION SUMMARY CARDS
   ===================================================== */

.cw-summary-card {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 12px;
    white-space: nowrap;
}

.cw-summary-icon {
    flex: 0 0 auto;
    font-size: 19px;
    line-height: 1;
    color: #0d6efd;
}

.cw-summary-label {
    font-size: 14px;
    color: #495057;
}

.cw-summary-value {
    margin-left: auto;
    font-size: 18px;
    line-height: 1;
    font-weight: 700;
}

/* =====================================================
   DELIVERY PREPARATION
   ===================================================== */

.cw-delivery-page {
    min-width: 0;
}

.cw-delivery-stat {
    display: flex;
    min-height: 78px;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.75rem;
}

.cw-delivery-stat span {
    color: #6c757d;
    font-size: 0.75rem;
    line-height: 1.1;
}

.cw-delivery-stat strong {
    font-size: 1.05rem;
}

.cw-delivery-summary-scroll {
    max-height: 230px;
    overflow-y: auto;
}

.cw-delivery-spec-scroll {
    max-height: 480px;
    overflow: auto;
}

.cw-delivery-client-scroll {
    max-height: 360px;
    overflow: auto;
}

.cw-delivery-spec-scroll thead th,
.cw-delivery-client-scroll thead th,
.cw-delivery-summary-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8f9fa;
}

.cw-delivery-amount-input {
    min-width: 120px;
    max-width: 150px;
}

/* =====================================================
   DELIVERY DASHBOARD
   ===================================================== */

.cw-delivery-dashboard-page {
    min-width: 0;
}

.cw-dashboard-refresh-time {
    margin-bottom: 1rem;
    color: #6c757d;
    font-size: 0.82rem;
    text-align: right;
}

.cw-dashboard-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.cw-dashboard-section-head h3 {
    margin: 0;
    font-size: 1.15rem;
}

.cw-dashboard-section-head span,
.cw-dashboard-card-title span,
.cw-dashboard-route-summary-main span,
.cw-dashboard-route-meta span,
.cw-dashboard-metric-grid span,
.cw-dashboard-route-cash-row span,
.cw-dashboard-cash-totals span,
.cw-dashboard-cash-detail-summary span {
    color: #6c757d;
    font-size: 0.78rem;
}

.cw-dashboard-cash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.75rem;
}

.cw-dashboard-cash-card,
.cw-dashboard-route-card,
.cw-dashboard-cash-detail-summary {
    border: 1px solid #dee2e6;
    border-radius: 0.65rem;
    background: #fff;
    box-shadow: 0 0.15rem 0.4rem rgba(31, 41, 55, 0.05);
}

.cw-dashboard-cash-card {
    padding: 0.9rem;
    border-left-width: 0.35rem;
}

.cw-dashboard-cash-card.has-outstanding {
    border-left-color: #fd7e14;
}

.cw-dashboard-cash-card.is-settled {
    border-left-color: #198754;
}

.cw-dashboard-card-title,
.cw-dashboard-route-summary-main,
.cw-dashboard-route-summary-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.cw-dashboard-card-title > div,
.cw-dashboard-route-summary-main > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.cw-dashboard-cash-totals {
    display: grid;
    gap: 0.45rem;
    margin-top: 0.8rem;
}

.cw-dashboard-cash-totals > div,
.cw-dashboard-cash-detail-summary > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.cw-dashboard-outstanding {
    padding-top: 0.45rem;
    border-top: 1px solid #dee2e6;
}

.cw-dashboard-outstanding strong {
    color: #b45309;
    font-size: 1.15rem;
}

.cw-dashboard-route-list {
    display: grid;
    gap: 0.8rem;
}

.cw-dashboard-route-card {
    overflow: hidden;
}

.cw-dashboard-route-card > summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    padding: 0.9rem 1rem;
    cursor: pointer;
    list-style: none;
}

.cw-dashboard-route-card > summary::-webkit-details-marker {
    display: none;
}

.cw-dashboard-route-summary-progress {
    min-width: 135px;
}

.cw-dashboard-route-body {
    padding: 1rem;
    border-top: 1px solid #e9ecef;
    background: #fbfcfd;
}

.cw-dashboard-route-meta,
.cw-dashboard-metric-grid,
.cw-dashboard-route-cash-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

.cw-dashboard-route-meta > div,
.cw-dashboard-metric-grid > div,
.cw-dashboard-route-cash-row > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.65rem;
    border: 1px solid #e9ecef;
    border-radius: 0.45rem;
    background: #fff;
}

.cw-dashboard-route-cities {
    grid-column: span 2;
}

.cw-dashboard-metric-grid,
.cw-dashboard-route-cash-row {
    margin-top: 0.65rem;
}

.cw-dashboard-metric-grid small {
    color: #6c757d;
}

.cw-dashboard-completed-list .cw-dashboard-route-card {
    opacity: 0.94;
}

.cw-dashboard-cash-detail-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 1rem;
}

@media (max-width: 991.98px) {
    .cw-dashboard-route-meta,
    .cw-dashboard-metric-grid,
    .cw-dashboard-route-cash-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .cw-dashboard-refresh-time {
        text-align: left;
    }

    .cw-dashboard-route-card > summary,
    .cw-dashboard-route-meta,
    .cw-dashboard-metric-grid,
    .cw-dashboard-route-cash-row,
    .cw-dashboard-cash-detail-summary {
        grid-template-columns: 1fr;
    }

    .cw-dashboard-route-summary-progress {
        justify-content: flex-start;
    }

    .cw-dashboard-route-cities {
        grid-column: auto;
    }
}

/* =====================================================
   DRIVER DELIVERY - MOBILE FIRST
   ===================================================== */

.cw-driver-page {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    color: #1f2937;
}

.cw-driver-page h1 {
    margin: 0;
    font-size: clamp(1.55rem, 6vw, 2.2rem);
    line-height: 1.15;
}

.cw-driver-page h2 {
    margin: 0;
    font-size: 1.15rem;
}

.cw-driver-page-head,
.cw-driver-route-header,
.cw-driver-section-head,
.cw-driver-route-card-head,
.cw-driver-stop-heading,
.cw-driver-progress-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cw-driver-page-head {
    align-items: flex-start;
    margin-bottom: 22px;
}

.cw-driver-eyebrow {
    margin-bottom: 4px;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cw-driver-muted {
    color: #6b7280;
}

.cw-driver-touch-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.cw-driver-section {
    margin-top: 28px;
}

.cw-driver-section-head {
    margin-bottom: 12px;
}

.cw-driver-section-head > span,
.cw-driver-section-head > a {
    color: #6b7280;
    font-size: 0.9rem;
}

.cw-driver-route-grid,
.cw-driver-stop-list,
.cw-driver-spec-list {
    display: grid;
    gap: 14px;
}

.cw-driver-route-card,
.cw-driver-stop-card,
.cw-driver-contact-card,
.cw-driver-detail-section,
.cw-driver-progress-panel {
    border: 1px solid #dfe3e8;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(31, 41, 55, 0.05);
}

.cw-driver-route-card {
    padding: 16px;
}

.cw-driver-card-title {
    font-size: 1.25rem !important;
}

.cw-driver-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.cw-topbar-context {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    white-space: nowrap;
}

.cw-driver-badge-ready {
    color: #0a4a85;
    background: #e5f1ff;
}

.cw-driver-badge-progress {
    color: #725000;
    background: #fff3cd;
}

.cw-driver-badge-completed {
    color: #17603a;
    background: #e4f5eb;
}

.cw-driver-badge-cancelled {
    color: #6b7280;
    background: #eef0f2;
}

.cw-driver-badge-neutral {
    color: #46505c;
    background: #eef0f2;
}

.cw-driver-route-facts,
.cw-driver-stop-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin: 16px 0;
    color: #52606d;
    font-size: 0.9rem;
}

.cw-driver-progress-row {
    margin-bottom: 7px;
    color: #52606d;
    font-size: 0.84rem;
}

.cw-driver-progress {
    height: 8px;
    margin-bottom: 16px;
    background: #edf0f3;
}

.cw-driver-progress .progress-bar {
    background: #2b6cb0;
}

.cw-driver-route-card > .cw-driver-touch-button {
    width: 100%;
}

.cw-driver-empty {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    padding: 22px 18px;
    border: 1px dashed #bbc3cc;
    border-radius: 12px;
    color: #52606d;
    background: #fff;
}

.cw-driver-empty strong {
    color: #1f2937;
    font-size: 1rem;
}

.cw-driver-unavailable {
    max-width: 620px;
    margin: 30px auto;
}

.cw-driver-unavailable .cw-driver-touch-button {
    margin-top: 8px;
}

.cw-driver-filter {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid #dfe3e8;
    border-radius: 12px;
    background: #fff;
}

.cw-driver-filter label {
    font-weight: 600;
}

.cw-driver-filter .form-control {
    min-height: 44px;
}

.cw-driver-back-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-bottom: 12px;
    color: #355b82;
    font-weight: 600;
    text-decoration: none;
}

.cw-driver-route-header {
    align-items: flex-start;
    margin-bottom: 16px;
}

.cw-driver-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin-bottom: 14px;
    border: 1px solid #dfe3e8;
    border-radius: 12px;
    background: #dfe3e8;
}

.cw-driver-summary > div,
.cw-driver-delivery-summary > div,
.cw-driver-money-grid > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    padding: 13px;
    background: #fff;
}

.cw-driver-summary span,
.cw-driver-delivery-summary span,
.cw-driver-money-grid span,
.cw-driver-contact-card span,
.cw-driver-spec-list span {
    color: #6b7280;
    font-size: 0.78rem;
}

.cw-driver-summary strong,
.cw-driver-delivery-summary strong,
.cw-driver-money-grid strong {
    overflow-wrap: anywhere;
    font-size: 1.05rem;
}

.cw-driver-progress-panel {
    padding: 14px;
    margin-bottom: 14px;
}

.cw-driver-progress-panel .cw-driver-progress {
    margin-bottom: 0;
}

.cw-driver-note {
    margin: 12px 0;
    padding: 13px 14px;
    border-left: 4px solid #8ba7c2;
    border-radius: 6px;
    background: #f3f6f9;
    overflow-wrap: anywhere;
}

.cw-driver-stop-card {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
}

.cw-driver-stop-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    background: #355b82;
    font-weight: 800;
}

.cw-driver-stop-number-large {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
}

.cw-driver-stop-main {
    min-width: 0;
}

.cw-driver-stop-heading {
    align-items: flex-start;
}

.cw-driver-stop-heading h3 {
    margin: 0 0 3px;
    font-size: 1.08rem;
    overflow-wrap: anywhere;
}

.cw-driver-stop-next {
    border-color: #5d8fbd;
    box-shadow: 0 0 0 2px rgba(65, 120, 170, 0.12);
}

.cw-driver-next-label {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 8px;
    border-radius: 5px;
    color: #174a73;
    background: #e9f3fb;
    font-size: 0.78rem;
    font-weight: 700;
}

.cw-driver-stop-finished {
    background: #fbfcfc;
}

.cw-driver-stop-cancelled {
    opacity: 0.72;
    background: #f6f7f8;
}

.cw-driver-address {
    margin-top: 10px;
    overflow-wrap: anywhere;
}

.cw-driver-stop-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.cw-driver-stop-badges span {
    padding: 4px 8px;
    border-radius: 999px;
    color: #334e68;
    background: #eaf0f5;
    font-size: 0.76rem;
    font-weight: 700;
}

.cw-driver-stop-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.cw-driver-stop-actions .btn:only-child {
    grid-column: 1 / -1;
}

.cw-driver-stop-detail-head {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin-bottom: 18px;
}

.cw-driver-stop-detail-head .cw-driver-badge {
    margin-top: 8px;
}

.cw-driver-contact-card {
    display: grid;
    gap: 1px;
    overflow: hidden;
    margin-bottom: 14px;
    background: #dfe3e8;
}

.cw-driver-contact-card > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    background: #fff;
}

.cw-driver-phone {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #0d6efd;
    font-size: 1.05rem;
    font-weight: 700;
}

.cw-driver-detail-section {
    margin-top: 18px;
    padding: 15px;
}

.cw-driver-delivery-summary,
.cw-driver-money-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin-top: 12px;
    border: 1px solid #dfe3e8;
    border-radius: 9px;
    background: #dfe3e8;
}

.cw-driver-spec-list {
    margin-top: 12px;
}

.cw-driver-spec-list article {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 13px;
    border: 1px solid #e2e6ea;
    border-radius: 9px;
    background: #fafbfc;
}

.cw-driver-spec-list article > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.cw-driver-money-grid .cw-driver-money-highlight {
    grid-column: 1 / -1;
    color: #174a73;
    background: #e9f3fb;
}

.cw-driver-money-highlight strong {
    font-size: 1.18rem;
}

.cw-driver-operation-panel {
    display: grid;
    gap: 14px;
    margin: 14px 0;
    padding: 16px;
    border: 1px solid #b9d3ea;
    border-radius: 12px;
    background: #eef6fd;
}

.cw-driver-operation-panel > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cw-driver-operation-panel > div > strong {
    font-size: 1.05rem;
}

.cw-driver-operation-panel > div > span {
    color: #52606d;
}

.cw-driver-operation-panel form,
.cw-driver-operation-panel .cw-driver-touch-button {
    width: 100%;
}

.cw-driver-operation-progress {
    border-color: #f0cf70;
    background: #fff8df;
}

.cw-driver-operation-complete {
    border-color: #9fd0b5;
    background: #ebf8f0;
}

.cw-driver-completed-at {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0;
    padding: 13px 14px;
    border: 1px solid #a9d5bb;
    border-radius: 9px;
    color: #17603a;
    background: #edf9f2;
}

.cw-driver-stop-date {
    margin-top: 9px;
    color: #17603a;
    font-size: 0.9rem;
}

.cw-driver-stop-operations {
    position: sticky;
    bottom: 8px;
    z-index: 10;
    display: grid;
    gap: 12px;
    margin-top: 20px;
    padding: 14px;
    border: 1px solid #cbd3dc;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -4px 18px rgba(31, 41, 55, 0.12);
}

.cw-driver-stop-operations form,
.cw-driver-stop-operations .cw-driver-touch-button {
    width: 100%;
}

.cw-driver-success-form,
.cw-driver-delivery-date-field {
    display: grid;
    gap: 8px;
}

.cw-driver-delivery-date-field label {
    font-weight: 700;
}

.cw-driver-delivery-date-field .form-control {
    min-height: 44px;
}

.cw-driver-failure-form {
    display: grid;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #e2e6ea;
}

.cw-driver-failure-form label {
    font-weight: 700;
}

.cw-driver-failure-form textarea {
    min-height: 88px;
    resize: vertical;
}

.cw-driver-stop-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
}

.cw-driver-stop-navigation .cw-driver-touch-button {
    width: 100%;
}

.cw-driver-operation-cash {
    border-color: #a8dfc0;
    background: #effbf4;
}

.cw-driver-cash-button {
    width: 100%;
    margin-top: 16px;
}

.cw-driver-cash-outstanding {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 16px 0;
    padding: 16px;
    border: 1px solid #a8dfc0;
    border-radius: 12px;
    background: #effbf4;
}

.cw-driver-cash-form,
.cw-driver-client-search {
    display: grid;
    gap: 18px;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid #dfe3e8;
    border-radius: 14px;
    background: #fff;
}

.cw-driver-cash-form label,
.cw-driver-client-search label {
    display: block;
    margin-bottom: 7px;
    font-weight: 700;
}

.cw-driver-amount-input {
    min-height: 56px;
    font-size: 1.35rem;
    font-weight: 700;
}

.cw-driver-cash-confirmation {
    display: grid;
    gap: 4px;
    padding: 16px;
    border: 2px solid #198754;
    border-radius: 12px;
    background: #f4fff8;
    text-align: center;
}

.cw-driver-cash-confirmation strong {
    font-size: 1.16rem;
}

.cw-driver-cash-history,
.cw-driver-client-results {
    display: grid;
    gap: 10px;
}

.cw-driver-cash-history article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e2e6ea;
    border-radius: 10px;
}

.cw-driver-cash-history article > div {
    display: grid;
    gap: 2px;
}

.cw-driver-client-results article {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid #dfe3e8;
    border-radius: 14px;
    background: #fff;
}

.cw-driver-client-results h2 {
    margin: 0 0 4px;
    font-size: 1.1rem;
}

.cw-driver-client-results article > div:first-child {
    display: grid;
    gap: 3px;
}

.cw-driver-client-balance {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 9px;
    background: #f3f5f7;
}

.cw-driver-route-dashboard,
.cw-driver-stop-quick-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin-bottom: 14px;
    border: 1px solid #dfe3e8;
    border-radius: 12px;
    background: #dfe3e8;
}

.cw-driver-route-dashboard > div,
.cw-driver-stop-quick-facts > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    padding: 12px;
    background: #fff;
}

.cw-driver-route-dashboard .cw-driver-route-dashboard-primary {
    grid-column: 1 / -1;
    color: #174a73;
    background: #e9f3fb;
}

.cw-driver-route-dashboard span,
.cw-driver-stop-quick-facts span {
    color: #6b7280;
    font-size: 0.76rem;
}

.cw-driver-route-dashboard strong,
.cw-driver-stop-quick-facts strong {
    overflow-wrap: anywhere;
}

.cw-driver-next-client {
    display: grid;
    gap: 13px;
    margin: 16px 0;
    padding: 18px;
    border: 2px solid #4d85b4;
    border-radius: 14px;
    background: #f2f8fd;
    box-shadow: 0 4px 14px rgba(35, 88, 132, 0.1);
}

.cw-driver-next-client-label {
    color: #174a73;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cw-driver-next-client-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.cw-driver-next-client-head > div {
    min-width: 0;
}

.cw-driver-next-client-head h2 {
    overflow-wrap: anywhere;
    font-size: 1.3rem;
}

.cw-driver-next-client-head span:not(.cw-driver-badge) {
    color: #52606d;
}

.cw-driver-next-client-facts,
.cw-driver-city-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.cw-driver-next-client-facts span,
.cw-driver-city-facts span {
    padding: 5px 8px;
    border-radius: 7px;
    color: #405261;
    background: rgba(255, 255, 255, 0.82);
    font-size: 0.82rem;
}

.cw-driver-next-client-actions {
    display: grid;
    gap: 8px;
}

.cw-driver-city-list {
    display: grid;
    gap: 20px;
}

.cw-driver-city-group {
    display: grid;
    gap: 13px;
    min-width: 0;
    padding: 15px;
    border: 1px solid #ccd4dc;
    border-radius: 14px;
    background: #f7f9fb;
}

.cw-driver-city-current {
    border-color: #d9b948;
    background: #fffaf0;
    box-shadow: 0 0 0 2px rgba(217, 185, 72, 0.13);
}

.cw-driver-city-completed {
    border-color: #a9d5bb;
    background: #f5fbf7;
}

.cw-driver-city-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.cw-driver-city-header > div {
    min-width: 0;
}

.cw-driver-city-header h2 {
    overflow-wrap: anywhere;
    font-size: 1.3rem;
}

.cw-driver-city-location {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 11px 12px;
    border: 1px dashed #aeb8c2;
    border-radius: 9px;
    color: #52606d;
    background: rgba(255, 255, 255, 0.75);
}

.cw-driver-city-location span {
    font-size: 0.78rem;
    font-weight: 700;
}

.cw-driver-city-location strong {
    overflow-wrap: anywhere;
    text-align: right;
    font-size: 0.85rem;
}

.cw-driver-city-group .cw-driver-stop-list {
    gap: 10px;
}

.cw-driver-stop-quick-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cw-driver-address-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #0d6efd;
    font-weight: 700;
}

.cw-driver-next-pending-button {
    width: 100%;
    margin-top: 10px;
}

.cw-driver-completion-summary {
    display: grid;
    gap: 5px;
    margin: 14px 0;
    padding: 16px;
    border: 1px solid #9fd0b5;
    border-radius: 12px;
    color: #17603a;
    background: #ebf8f0;
}

.cw-driver-client-route-message {
    padding: 10px 12px;
    border-left: 4px solid #8ba7c2;
    border-radius: 6px;
    color: #405261;
    background: #f3f6f9;
    font-size: 0.88rem;
}

.cw-driver-client-route-existing {
    border-left-color: #4d85b4;
    background: #e9f3fb;
}

.cw-driver-page form[aria-busy="true"] {
    opacity: 0.82;
}

.cw-driver-page form[aria-busy="true"] button[type="submit"] {
    cursor: wait;
}

.cw-driver-connection-error {
    margin-bottom: 0;
}

.cw-driver-gps-status {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: .75rem 0 1rem;
    padding: .75rem 1rem;
    border: 1px solid #dbe4ee;
    border-radius: .8rem;
    background: #f8fafc;
}

.cw-driver-gps-status > div {
    display: grid;
    gap: .1rem;
}

.cw-driver-gps-status small {
    color: #64748b;
}

.cw-driver-gps-dot {
    width: .8rem;
    height: .8rem;
    flex: 0 0 .8rem;
    border-radius: 50%;
    background: #94a3b8;
}

.cw-driver-gps-status[data-gps-state="active"] .cw-driver-gps-dot {
    background: #22c55e;
    box-shadow: 0 0 0 .25rem rgba(34, 197, 94, .16);
}

.cw-driver-gps-status[data-gps-state="denied"] .cw-driver-gps-dot,
.cw-driver-gps-status[data-gps-state="unavailable"] .cw-driver-gps-dot {
    background: #f59e0b;
}

.cw-driver-location-panel,
.cw-driver-location-select,
.cw-driver-location-capture {
    display: grid;
    gap: .7rem;
}

.cw-driver-location-select,
.cw-driver-location-capture {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.cw-driver-selected-location {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cw-driver-selected-location > div,
.cw-driver-city-location-links {
    display: grid;
    gap: .2rem;
}

.cw-driver-selected-location span,
.cw-driver-location-capture small {
    color: #64748b;
}

.cw-dashboard-live-map-section {
    margin: 1rem 0 1.5rem;
}

.cw-dashboard-live-map {
    min-height: 420px;
    border: 1px solid #dbe4ee;
    border-radius: .85rem;
    overflow: hidden;
    background: #eef2f7;
}

.cw-dashboard-gps-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: .75rem;
    margin-top: .8rem;
}

.cw-dashboard-gps-card {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem 1rem;
    border: 1px solid #dbe4ee;
    border-left: .3rem solid #94a3b8;
    border-radius: .7rem;
    background: #fff;
}

.cw-dashboard-gps-card.is-current { border-left-color: #22c55e; }
.cw-dashboard-gps-card.is-stale { border-left-color: #f59e0b; }

.cw-dashboard-gps-card > div {
    display: grid;
    align-content: start;
    gap: .15rem;
}

.cw-dashboard-gps-card > div:last-child {
    text-align: right;
}

.cw-dashboard-gps-card span,
.cw-dashboard-gps-card small {
    color: #64748b;
}

.cw-dashboard-gps-state {
    font-weight: 700;
}

.cw-dashboard-undelivered-list {
    display: grid;
    gap: 0.9rem;
}

.cw-dashboard-undelivered-card {
    padding: 1rem;
    border: 1px solid #fecaca;
    border-left: 5px solid #dc2626;
    border-radius: 0.75rem;
    background: #fff;
}

.cw-dashboard-undelivered-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.cw-dashboard-undelivered-grid > div {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.cw-dashboard-undelivered-grid span,
.cw-dashboard-close-panel span,
.cw-dashboard-closed-audit span {
    color: #64748b;
    font-size: 0.82rem;
}

.cw-dashboard-reassign-form {
    display: grid;
    grid-template-columns: minmax(13rem, 1fr) auto;
    align-items: end;
    gap: 0.4rem;
    flex: 1 1 28rem;
}

.cw-dashboard-reassign-form label {
    grid-column: 1 / -1;
    font-size: 0.82rem;
    font-weight: 600;
}

.cw-dashboard-close-panel,
.cw-dashboard-closed-audit {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.9rem;
    border-radius: 0.65rem;
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

.cw-dashboard-closed-audit {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.cw-dashboard-close-confirm {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.88rem;
}

@media (max-width: 900px) {
    .cw-dashboard-undelivered-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .cw-dashboard-undelivered-grid,
    .cw-dashboard-reassign-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .cw-driver-selected-location,
    .cw-dashboard-gps-card {
        align-items: stretch;
        flex-direction: column;
    }

    .cw-dashboard-live-map {
        min-height: 340px;
    }

    .cw-dashboard-gps-card > div:last-child {
        text-align: left;
    }
}

@media (max-width: 430px) {
    .cw-driver-city-group {
        padding: 12px;
    }

    .cw-driver-city-header,
    .cw-driver-next-client-head,
    .cw-driver-city-location {
        align-items: flex-start;
        flex-direction: column;
    }

    .cw-driver-city-location strong {
        text-align: left;
    }

    .cw-driver-stop-actions {
        grid-template-columns: 1fr;
    }

    .cw-driver-stop-actions .btn,
    .cw-driver-next-client-actions .btn {
        width: 100%;
    }

    .cw-driver-stop-quick-facts {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) {
    .cw-driver-route-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cw-driver-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cw-driver-route-facts {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .cw-driver-filter {
        grid-template-columns: auto minmax(190px, 260px) auto auto;
        align-items: end;
    }

    .cw-driver-filter label {
        align-self: center;
    }

    .cw-driver-stop-card {
        grid-template-columns: 48px minmax(0, 1fr);
        padding: 18px;
    }

    .cw-driver-stop-facts {
        grid-template-columns: repeat(3, max-content);
    }

    .cw-driver-stop-actions {
        display: flex;
        justify-content: flex-end;
    }

    .cw-driver-stop-actions .cw-driver-touch-button {
        min-width: 130px;
    }

    .cw-driver-contact-card {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cw-driver-money-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cw-driver-cash-form,
    .cw-driver-client-search {
        max-width: 760px;
    }

    .cw-driver-client-results {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cw-driver-operation-panel {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    .cw-driver-operation-panel form,
    .cw-driver-operation-panel .cw-driver-touch-button {
        width: auto;
        min-width: 220px;
    }

    .cw-driver-route-dashboard {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .cw-driver-route-dashboard .cw-driver-route-dashboard-primary {
        grid-column: span 2;
    }

    .cw-driver-next-client-actions {
        grid-template-columns: repeat(2, minmax(0, max-content));
        justify-content: end;
    }

    .cw-driver-stop-operations {
        position: static;
        grid-template-columns: minmax(180px, 0.7fr) minmax(280px, 1.3fr);
        align-items: end;
    }

    .cw-driver-failure-form {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        padding-top: 0;
        padding-left: 14px;
        border-top: 0;
        border-left: 1px solid #e2e6ea;
    }

    .cw-driver-failure-form label {
        grid-column: 1 / -1;
    }

    .cw-driver-failure-form textarea {
        min-height: 72px;
    }
}

/* =====================================================
   DRIVER ROLE SHELL
   ===================================================== */

.cw-driver-shell .cw-driver-sidebar {
    width: 220px;
    min-width: 220px;
}

.cw-driver-sidebar-brand-area {
    min-height: 68px;
    padding-top: 7px;
    padding-bottom: 7px;
}

.cw-driver-sidebar-company {
    min-height: auto;
    padding: 11px 15px 12px;
}

.cw-driver-brand,
.cw-driver-topbar-brand {
    text-decoration: none;
}

.cw-driver-brand:hover,
.cw-driver-topbar-brand:hover {
    color: #0d6efd;
}

.cw-driver-drawer-header {
    min-height: 58px;
    padding: 6px 12px 6px 16px;
    border-bottom: 1px solid #dee2e6;
}

.cw-driver-drawer-header .cw-sidebar-logo {
    width: 142px;
    height: 45px;
}

.cw-driver-drawer-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0;
}

.cw-driver-sidebar-nav {
    flex: 1;
    padding: 14px 12px;
}

.cw-driver-shell .cw-menu-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 11px 14px;
    font-size: 1rem;
}

.cw-driver-nav-user {
    padding: 13px 15px 11px;
}

.cw-driver-nav-identity {
    display: grid;
    min-width: 0;
}

.cw-driver-nav-identity strong,
.cw-driver-topbar-identity strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cw-driver-nav-identity span,
.cw-driver-topbar-identity span {
    color: #6c757d;
    font-size: 0.78rem;
}

.cw-driver-logout-button {
    width: 100%;
    min-height: 40px;
    font-weight: 600;
}

.cw-driver-topbar {
    height: 60px;
    min-height: 60px;
    padding: 0 18px;
}

.cw-driver-topbar-identity {
    display: grid;
    min-width: 0;
    max-width: min(46vw, 280px);
    margin-left: auto;
    text-align: right;
}

.cw-driver-topbar-logo {
    display: block;
    width: 112px;
    height: 42px;
    object-fit: contain;
    object-position: left center;
}

.cw-driver-menu-button {
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
}

.cw-driver-menu-button:hover,
.cw-driver-menu-button:focus-visible {
    background: #eef3f8;
}

.cw-driver-menu-button span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: #172033;
}

.cw-driver-shell .cw-content {
    overflow-x: hidden;
}

.cw-driver-shell .cw-footer {
    padding: 8px 18px;
    font-size: 0.78rem;
}

@media (min-width: 992px) {
    .cw-driver-shell .cw-driver-sidebar {
        position: static;
        height: 100vh;
        background: #ffffff !important;
        visibility: visible;
        transform: none;
    }

    .cw-driver-shell .cw-driver-drawer-header {
        display: none;
    }

    .cw-driver-shell .cw-driver-drawer-body {
        flex: 1 1 auto;
        flex-direction: column;
        overflow-y: auto;
        background: #ffffff !important;
    }
}

@media (max-width: 991.98px) {
    .cw-app-layout.cw-driver-shell {
        display: block;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: hidden;
    }

    .cw-driver-shell .cw-driver-sidebar {
        width: min(86vw, 310px);
        min-width: 0;
        height: 100vh;
        height: 100dvh;
        border-right: 1px solid #dee2e6;
    }

    .cw-driver-shell .cw-driver-sidebar-brand-area {
        display: none;
    }

    .cw-driver-shell .cw-main-area {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

    .cw-driver-shell .cw-driver-topbar {
        justify-content: flex-start;
        gap: 10px;
        padding: 0 12px;
    }

    .cw-driver-shell .cw-driver-topbar-brand {
        min-width: 0;
        font-size: 1.05rem;
    }

    .cw-driver-shell .cw-driver-topbar-identity {
        max-width: 42vw;
    }

    .cw-driver-shell .cw-content {
        width: 100%;
        min-width: 0;
        min-height: 0;
        padding: 16px 14px 22px;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
    }

    .cw-driver-shell .cw-footer {
        padding: 6px 14px;
        text-align: center;
    }
}

@media (max-width: 430px) {
    .cw-driver-shell .cw-content {
        padding-right: 12px;
        padding-left: 12px;
    }

    .cw-driver-shell .cw-driver-topbar-identity {
        max-width: 38vw;
    }
}

/* =====================================================
   PRINT
   ===================================================== */

@media print {

    @page {
        size: A4 portrait;
        margin: 14mm;
    }

    html,
    body {
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        color: #000000 !important;
    }


    /* =================================================
       HIDE APPLICATION UI
       ================================================= */

    .cw-sidebar,
    .cw-topbar,
    .cw-footer,
    .cw-no-print,
    header,
    footer,
    nav {
        display: none !important;
    }


    /* =================================================
       FULL PRINT WIDTH
       ================================================= */

    .cw-app-layout,
    .cw-main-area,
    .cw-content,
    main,
    .container,
    .container-fluid {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
    }


    /* =================================================
       REPORT HEADER
       ================================================= */

    .cw-print-header {
        display: block !important;
        position: relative;
        margin: 0 0 16px 0;
        padding: 0;
        min-height: 55px;
    }

    .cw-print-company {
        position: absolute;
        top: 0;
        right: 0;
        max-width: 55%;
        text-align: right;
        font-size: 18px !important;
        line-height: 1.2;
        font-weight: 700 !important;
    }

    .cw-print-header h2 {
        margin: 0 0 8px 0;
        padding: 0;
        font-size: 18px !important;
        line-height: 1.2;
        font-weight: 700 !important;
    }

    .cw-print-client {
        margin: 0 0 4px 0;
        font-size: 12px;
        line-height: 1.25;
    }

    .cw-print-date {
        margin: 0;
        font-size: 12px;
        line-height: 1.25;
    }


    /* =================================================
       TABLE
       ================================================= */

    .table-responsive {
        width: 100% !important;
        overflow: visible !important;
    }

    .cw-print-table {
        width: 100% !important;
        table-layout: fixed !important;
        border-collapse: collapse !important;
        margin: 0 !important;
        font-size: 11px !important;
        line-height: 1.15 !important;
    }

        .cw-print-table th,
        .cw-print-table td {
            border: 1px solid #000000 !important;
            padding: 3px 5px !important;
            height: auto !important;
            min-height: 0 !important;
            vertical-align: middle !important;
            background: #ffffff !important;
            color: #000000 !important;
        }

        .cw-print-table th {
            font-weight: 700 !important;
        }

        .cw-print-table td {
            white-space: normal !important;
            overflow-wrap: break-word;
            word-break: normal;
        }

        .cw-print-table tfoot td {
            font-weight: 700 !important;
            border-top: 2px solid #000000 !important;
        }

    .cw-client-link {
        color: #000000 !important;
        text-decoration: none !important;
    }

    .cw-print-table tr {
        height: auto !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }


    /* =================================================
       СОСТОЈБА
       ================================================= */

    .cw-status-client {
        width: 55% !important;
    }

    .cw-status-amount {
        width: 15% !important;
    }


    /* =================================================
       КАРТИЦА
       ================================================= */

    .cw-card-date {
        width: 13% !important;
    }

    .cw-card-description {
        width: 48% !important;
    }

    .cw-card-amount {
        width: 13% !important;
    }
}
/* Delivery client notifications */
.cw-notification-channel-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

.cw-notification-channel {
    display: flex;
    min-height: 5.75rem;
    flex-direction: column;
    justify-content: center;
    gap: .25rem;
    padding: .9rem 1rem;
    border: 1px solid #d7dee8;
    border-radius: .8rem;
    color: inherit;
    text-decoration: none;
    background: #fff;
}

.cw-notification-channel-active {
    border: 2px solid #198754;
    background: #f0fbf5;
}

.cw-notification-channel-disabled {
    color: #6c757d;
    background: #f6f7f9;
}

.cw-notification-channel span,
.cw-notification-channel small {
    overflow-wrap: anywhere;
}

.cw-notification-message-preview,
.cw-notification-history-message {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.cw-notification-message-preview {
    padding: 1rem;
    border-left: 4px solid #198754;
    border-radius: .35rem;
    background: #f6f8fa;
    font-size: 1.02rem;
    line-height: 1.55;
}

.cw-notification-send-form {
    display: grid;
    gap: 1rem;
}

.cw-notification-confirm {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .9rem;
    border: 1px solid #ffc107;
    border-radius: .65rem;
    background: #fff8dd;
}

.cw-notification-confirm input {
    margin-top: .25rem;
}

.cw-notification-history-message {
    min-width: 18rem;
    max-width: 34rem;
    padding: .65rem 0;
}

@media (max-width: 767.98px) {
    .cw-notification-channel-grid {
        grid-template-columns: 1fr;
    }
}
