@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
  --chart-primary:    #2563eb;
  --chart-success:    #10b981;
  --chart-warning:    #f59e0b;
  --chart-title:      #1a202c;
  --chart-axis:       #334155;
  --chart-axis-light: #475569;
  --chart-grid:       #e2e8f0;
  --chart-border:     #cbd5e1;
  --chart-container-bg: #ffffff;
  --chart-shadow:     0 4px 12px rgba(0, 0, 0, 0.08);
  --chart-radius:     12px;
  --chart-bar-radius: 4px;
  --chart-font:       'Poppins', sans-serif;
}

.chart-container {
  font-family: var(--chart-font);
  background: var(--chart-container-bg);
  border-radius: var(--chart-radius);
  box-shadow: var(--chart-shadow);
  padding: 16px;
}

.chart-title {
  color: var(--chart-title);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.chart-data-label {
  font-weight: 700;
  font-size: 11px;
  color: #334155;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.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;
}

/* ========================= */
/* Mobile Layout */
/* ========================= */
.mobile-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    overflow-x: hidden;
    background: #f5f5f7;
    box-sizing: border-box;
}

/* ========================= */
/* Header */
/* ========================= */
.mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    z-index: 999;
}

.header-left {
    display: flex;
    align-items: center;
    min-width: 50px;
}

.header-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.header-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    letter-spacing: -0.5px;
}

.header-right {
    min-width: 50px;
}

/* ========================= */
/* Mobile Body */
/* ========================= */
.mobile-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-top: 0;
    padding-bottom: 110px;
    scroll-behavior: smooth;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

    /* Smooth scrollbar for webkit browsers */
    .mobile-body::-webkit-scrollbar {
        width: 6px;
    }

    .mobile-body::-webkit-scrollbar-track {
        background: transparent;
    }

    .mobile-body::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 3px;
    }

        .mobile-body::-webkit-scrollbar-thumb:hover {
            background: #9ca3af;
        }

/* ========================================
   Chart shell — edge-to-edge on mobile,
   inset on larger screens
   ======================================== */
.chart-shell {
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
}

/* Break out of card padding on mobile so the chart hits the screen edges.
   Set --card-padding on your card wrapper (defaults to 16px). */
@media (max-width: 767px) {
    .chart-shell {
        margin-left: calc(-1 * var(--card-padding, 16px));
        margin-right: calc(-1 * var(--card-padding, 16px));
        width: calc(100% + (2 * var(--card-padding, 16px)));
    }
}

/* ========================================
   Universal Syncfusion chart text styling
   (axis labels, axis titles, data labels)
   ======================================== */

/* Axis tick labels — let Syncfusion control text-anchor per axis type.
   Do NOT force text-anchor here; it breaks bar chart category label alignment. */
.e-chart svg text[id*='AxisLabel'],
.e-chart svg text[id*='axis-label'],
.e-chart .e-axis-label {
    font-size: 11px !important;
    font-weight: 600 !important;
    fill: #334155 !important;
}

    .e-chart svg text[id*='AxisLabel'] tspan,
    .e-chart svg text[id*='axis-label'] tspan {
        font-size: 11px !important;
    }

/* Axis titles */
.e-chart svg text[id*='AxisTitle'],
.e-chart svg text[id*='axis-title'],
.e-chart .e-axis-title {
    font-size: 11px !important;
    font-weight: 600 !important;
    fill: #475569 !important;
}

/* Data labels outside bars */
.e-chart .e-datalabel text,
.e-chart svg .e-datalabel text,
.e-chart svg text[id*='DataLabel'],
.e-chart svg text[id*='data-label'] {
    font-size: 11px !important;
    font-weight: 700 !important;
    fill: #334155 !important;
}

    .e-chart svg text[id*='DataLabel'] tspan,
    .e-chart svg text[id*='data-label'] tspan {
        font-size: 11px !important;
    }

/* Make every chart truly fluid */
.e-chart,
.e-chart svg,
.sales-summary-chart.e-chart,
.sales-summary-chart .e-chart,
.sales-summary-chart svg {
    width: 100% !important;
    overflow: visible !important; /* allow outer data labels to render */
}


/* ========================= */
/* Navigation Bar */
/* ========================= */
.mobile-nav-bar {
        position: fixed;
        bottom: 40px;
        left: 0;
        right: 0;
        height: 70px;
        background: #ffffff;
        border-top: 1px solid #e5e7eb;
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 1000;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    }

/* Navigation Items */
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    text-decoration: none;
    cursor: pointer;
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    background: none;
    padding: 0;
    gap: 4px;
}

    .nav-item i {
        font-size: 20px;
        transition: all 0.2s ease;
    }

    .nav-item .nav-label {
        font-size: 11px;
        letter-spacing: 0.3px;
    }

    .nav-item:hover {
        color: #2563eb;
        background: rgba(37, 99, 235, 0.05);
    }

    .nav-item.active {
        color: #2563eb;
        font-weight: 600;
    }

        .nav-item.active i {
            transform: scale(1.1);
        }

    /* Center nav item styling */
    .nav-item.nav-center {
        position: relative;
    }

        .nav-item.nav-center i {
            font-size: 24px;
            color: #2563eb;
        }

        .nav-item.nav-center:hover {
            background: rgba(37, 99, 235, 0.05);
            color: #2563eb;
        }

            .nav-item.nav-center:hover i {
                transform: scale(1.15) rotate(-10deg);
            }

        .nav-item.nav-center.active {
            color: #2563eb;
            font-weight: 600;
        }

            .nav-item.nav-center.active i {
                transform: scale(1.2) rotate(-10deg);
            }


/* ========================= */
/* Footer */
/* ========================= */
.mobile-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 999;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.footer-left,
.footer-right {
    display: flex;
    align-items: center;
}

.footer-text {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

/* ========================= */
/* Splash Page */
/* ========================= */
.splash-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #03142E;
    color: white;
}

.splash-content {
    text-align: center;
    animation: fadeIn 0.5s ease-in;
}

.splash-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 24px;
    animation: slideDown 0.6s ease-out;
}

.splash-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 40px;
    letter-spacing: -1px;
    animation: slideDown 0.6s ease-out 0.1s both;
}

.splash-spinner {
    animation: slideDown 0.6s ease-out 0.2s both;
}

    .splash-spinner .spinner-border {
        width: 3rem;
        height: 3rem;
        border-width: 0.3rem;
        border-color: rgba(255, 255, 255, 0.25);
        border-right-color: white;
    }

.splash-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.5px;
    font-weight: 500;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ============================================================================
   CUSTOMER RATING REPORTS - ENTERPRISE STYLESHEET
   Mobile: 10px base font | Desktop: 12px base font
   ============================================================================ */

/* ============================================================================
   ROOT & RESPONSIVE SETTINGS
   ============================================================================ */

:root {
    --color-success: #10b981;
    --color-info: #3b82f6;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-dark-gray: #1f2937;
    --color-light-gray: #f3f4f6;
    --color-border: #e5e7eb;
    --color-text: #374151;
    --color-heading: #111827;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Mobile-first: Base 10px font size */
@media (max-width: 768px) {
    html {
        font-size: 62.5%; /* 10px */
    }
}

/* Desktop: 12px font size */
@media (min-width: 769px) {
    html {
        font-size: 75%; /* 12px */
    }
}

/* ============================================================================
   GLOBAL STYLES
   ============================================================================ */

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: var(--color-text);
    background-color: #fafafa;
    margin: 0;
    padding: 0;
}

/* ============================================================================
   HTML VIEWER CONTAINER
   ============================================================================ */

.html-viewer-container {
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: var(--color-text);
    line-height: 1.6;
}

    .html-viewer-container table {
        width: 100%;
        border-collapse: collapse;
    }

/* ============================================================================
   CONTAINER & LAYOUT
   ============================================================================ */

.rating-container,
.supplies-container {
    background: white;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.section {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border);
}

    .section:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

/* ============================================================================
   RATING HEADER & SCORE DISPLAY
   ============================================================================ */

.rating-header {
    font-size: 1.75rem;
    font-weight: 700;
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    border-left: 4px solid;
    margin-bottom: var(--spacing-lg);
    background-color: var(--color-light-gray);
}

.rating-1 {
    color: var(--color-danger);
    border-left-color: var(--color-danger);
}

.rating-2 {
    color: #ff6b35;
    border-left-color: #ff6b35;
}

.rating-3 {
    color: var(--color-warning);
    border-left-color: var(--color-warning);
}

.rating-4 {
    color: var(--color-info);
    border-left-color: var(--color-info);
}

.rating-5 {
    color: var(--color-success);
    border-left-color: var(--color-success);
}

/* ============================================================================
   SECTION TITLES
   ============================================================================ */

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-heading);
    margin: 0 0 var(--spacing-md) 0;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: var(--spacing-sm);
}

/* ============================================================================
   DATA TABLES - RESPONSIVE & SLICK STYLING
   ============================================================================ */

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.4rem;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

    .data-table thead {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        border-bottom: 2px solid #1a252f;
    }

    .data-table th {
        padding: var(--spacing-md);
        font-weight: 700;
        color: #ffffff;
        text-align: left;
        letter-spacing: 0.5px;
        font-size: 1.4rem;
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }

        .data-table th.currency {
            text-align: right;
        }

        .data-table th.score {
            text-align: center;
        }

    .data-table td {
        padding: var(--spacing-md);
        border-bottom: 1px solid #d0d7de;
        color: #1a1a1a;
        font-size: 1.4rem;
        font-weight: 500;
        background-color: #f8f9fa;
        text-align: left;
    }

        .data-table td.currency {
            text-align: right;
            padding-right: 1.5rem;
        }

        .data-table td.score {
            text-align: center;
        }

    .data-table tbody tr {
        transition: all 0.2s ease;
    }

        .data-table tbody tr:hover {
            background-color: #e8eef5;
            box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.1);
        }

        .data-table tbody tr:last-child td {
            border-bottom: none;
        }

        /* Alternating row colors with darker backgrounds */
        .data-table tbody tr:nth-child(odd) {
            background-color: #f0f2f5;
        }

        .data-table tbody tr:nth-child(even) {
            background-color: #e8eef5;
        }

            .data-table tbody tr:nth-child(even):hover {
                background-color: #dce4f0;
            }

/* ============================================================================
   SCORE BREAKDOWN TABLE - CENTER ALIGNED
   ============================================================================ */

.score-breakdown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.4rem;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

    .score-breakdown-table thead {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        border-bottom: 2px solid #1a252f;
    }

    .score-breakdown-table th {
        padding: var(--spacing-md);
        font-weight: 700;
        color: #ffffff;
        text-align: center;
        letter-spacing: 0.5px;
        font-size: 1.4rem;
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }

        .score-breakdown-table th:first-child {
            text-align: left;
        }

    .score-breakdown-table td {
        padding: var(--spacing-md);
        border-bottom: 1px solid #d0d7de;
        color: #1a1a1a;
        font-size: 1.4rem;
        font-weight: 500;
        background-color: #f8f9fa;
        text-align: center;
    }

        .score-breakdown-table td:first-child {
            text-align: left;
        }

    .score-breakdown-table tbody tr {
        transition: all 0.2s ease;
    }

        .score-breakdown-table tbody tr:hover {
            background-color: #e8eef5;
            box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.1);
        }

        .score-breakdown-table tbody tr:last-child td {
            border-bottom: none;
        }

        .score-breakdown-table tbody tr:nth-child(odd) {
            background-color: #f0f2f5;
        }

        .score-breakdown-table tbody tr:nth-child(even) {
            background-color: #e8eef5;
        }

/* ============================================================================
   PRODUCTS/SUPPLIES TABLE - RIGHT ALIGNED
   ============================================================================ */

.products-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.4rem;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

    .products-table thead {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        border-bottom: 2px solid #1a252f;
    }

    .products-table th {
        padding: var(--spacing-md);
        font-weight: 700;
        color: #ffffff;
        text-align: right;
        letter-spacing: 0.5px;
        font-size: 1.4rem;
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        padding-right: 1.5rem;
    }

        .products-table th:first-child {
            text-align: left;
            padding-left: 1.5rem;
            padding-right: var(--spacing-md);
        }

    .products-table td {
        padding: var(--spacing-md);
        border-bottom: 1px solid #d0d7de;
        color: #1a1a1a;
        font-size: 1.4rem;
        font-weight: 500;
        background-color: #f8f9fa;
        text-align: right;
        padding-right: 1.5rem;
    }

        .products-table td:first-child {
            text-align: left;
            padding-left: 1.5rem;
            padding-right: var(--spacing-md);
        }

    .products-table tbody tr {
        transition: all 0.2s ease;
    }

        .products-table tbody tr:hover {
            background-color: #e8eef5;
            box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.1);
        }

        .products-table tbody tr:last-child td {
            border-bottom: none;
        }

        .products-table tbody tr:nth-child(odd) {
            background-color: #f0f2f5;
        }

        .products-table tbody tr:nth-child(even) {
            background-color: #e8eef5;
        }

.total-row {
    background: linear-gradient(135deg, var(--color-light-gray) 0%, #f0f1f3 100%);
    border-top: 2px solid var(--color-border);
    border-bottom: 2px solid var(--color-border);
    font-weight: 700;
}

    .total-row td {
        font-weight: 700;
        color: var(--color-heading);
        padding: var(--spacing-md);
    }

/* ============================================================================
   TEXT ALIGNMENT & FORMATTING
   ============================================================================ */

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.font-weight-bold {
    font-weight: 600;
}

/* ============================================================================
   ALIGNMENT OVERRIDES — ensure utility classes win over table defaults
   ============================================================================ */

/* Paint Products & Supplies: right-align headers and values for dollar columns */
.data-table th.text-right,
.data-table td.text-right {
    text-align: right;
}

.data-table th.text-center,
.data-table td.text-center {
    text-align: center;
}

/* Score Breakdown (first section inside .rating-container):
   re-map text-right → center so Score / Max / % columns are centered;
   the Category column has no alignment class so it stays left-aligned */
.rating-container .section:first-child .data-table th.text-right,
.rating-container .section:first-child .data-table td.text-right {
    text-align: center;
}

/* ============================================================================
   CURRENT MONTH HIGHLIGHTING
   ============================================================================ */

.current-month {
    background-color: #fef3c7;
    font-style: italic;
    font-weight: 500;
}

/* ============================================================================
   TREND INDICATORS
   ============================================================================ */

.trend-positive {
    color: var(--color-success);
    font-weight: 600;
}

.trend-negative {
    color: var(--color-danger);
    font-weight: 600;
}

.trend-neutral {
    color: #9ca3af;
    font-weight: 500;
}

/* ============================================================================
   PRODUCT MIX PARAGRAPH
   ============================================================================ */

.product-mix {
    background-color: var(--color-light-gray);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    color: var(--color-text);
    line-height: 1.6;
    margin: 0;
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS FOR MOBILE - KEEP 10px BASE FOR MORE INFO
   ============================================================================ */

@media (max-width: 768px) {
    .rating-container,
    .supplies-container {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-md);
        border-radius: 0.375rem;
    }

    .section {
        margin-bottom: var(--spacing-md);
        padding-bottom: var(--spacing-md);
    }

    .rating-header {
        font-size: 1.4rem;
        padding: var(--spacing-sm);
        margin-bottom: var(--spacing-md);
        border-left: 3px solid;
    }

    .section-title {
        font-size: 1rem;
        margin-bottom: var(--spacing-sm);
        font-weight: 700;
    }

    /* Mobile: 11px font for better readability */
    .data-table {
        font-size: 1.1rem;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
        margin-bottom: var(--spacing-md);
        width: 100%;
        border-collapse: collapse;
    }

        .data-table th {
            padding: 0.5rem;
            font-size: 1.1rem;
            font-weight: 700;
            letter-spacing: 0.3px;
            text-align: left;
            background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
            color: #ffffff;
        }

            .data-table th:first-child {
                text-align: left;
            }

            .data-table th.currency {
                text-align: right;
            }

            .data-table th.score {
                text-align: center;
            }

        .data-table td {
            padding: 0.5rem;
            font-size: 1.1rem;
            font-weight: 500;
            border-bottom: 1px solid #d0d7de;
            text-align: left;
            background-color: #f8f9fa;
            color: #1a1a1a;
        }

            .data-table td:first-child {
                text-align: left;
            }

            .data-table td.currency {
                text-align: right;
                padding-right: 0.75rem;
            }

            .data-table td.score {
                text-align: center;
            }

    /* Mobile: Score Breakdown Table - Center Aligned */
    .score-breakdown-table {
        font-size: 1.1rem;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
        margin-bottom: var(--spacing-md);
        width: 100%;
        border-collapse: collapse;
    }

        .score-breakdown-table th {
            padding: 0.5rem;
            font-size: 1.1rem;
            font-weight: 700;
            letter-spacing: 0.3px;
            text-align: center;
            background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
            color: #ffffff;
        }

            .score-breakdown-table th:first-child {
                text-align: left;
            }

        .score-breakdown-table td {
            padding: 0.5rem;
            font-size: 1.1rem;
            font-weight: 500;
            border-bottom: 1px solid #d0d7de;
            text-align: center;
            background-color: #f8f9fa;
            color: #1a1a1a;
        }

            .score-breakdown-table td:first-child {
                text-align: left;
            }

    /* Mobile: Products/Supplies Table - Right Aligned */
    .products-table {
        font-size: 1.1rem;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
        margin-bottom: var(--spacing-md);
        width: 100%;
        border-collapse: collapse;
    }

        .products-table th {
            padding: 0.5rem;
            font-size: 1.1rem;
            font-weight: 700;
            letter-spacing: 0.3px;
            text-align: right;
            background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
            color: #ffffff;
            padding-right: 0.75rem;
        }

            .products-table th:first-child {
                text-align: left;
                padding-left: 0.75rem;
                padding-right: 0.5rem;
            }

        .products-table td {
            padding: 0.5rem;
            font-size: 1.1rem;
            font-weight: 500;
            border-bottom: 1px solid #d0d7de;
            text-align: right;
            background-color: #f8f9fa;
            color: #1a1a1a;
            padding-right: 0.75rem;
        }

            .products-table td:first-child {
                text-align: left;
                padding-left: 0.75rem;
                padding-right: 0.5rem;
            }

    .data-table tbody tr:hover {
        background-color: #e8eef5 !important;
        box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.15);
    }

    .total-row td {
        padding: 0.5rem;
        font-size: 1.1rem;
        text-align: left;
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        color: #ffffff;
        font-weight: 700;
    }

        .total-row td:first-child {
            text-align: left;
        }

        .total-row td.currency {
            text-align: right;
            padding-right: 0.75rem;
        }

        .total-row td.currency {
            text-align: right;
        }

    .product-mix {
        font-size: 1.1rem;
        padding: var(--spacing-sm);
        line-height: 1.5;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .data-table {
        font-size: 0.95rem;
    }

        .data-table th,
        .data-table td {
            padding: var(--spacing-md);
        }
}

/* Desktop - enhanced styling */
@media (min-width: 1025px) {
    .data-table {
        font-size: 1.4rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

        .data-table th {
            padding: var(--spacing-lg);
            font-size: 1.4rem;
            text-align: left;
        }

            .data-table th.currency {
                text-align: right;
                padding-right: 2rem;
            }

            .data-table th.score {
                text-align: center;
            }

        .data-table td {
            padding: var(--spacing-md);
            font-size: 1.4rem;
            text-align: left;
        }

            .data-table td.currency {
                text-align: right;
                padding-right: 2rem;
            }

            .data-table td.score {
                text-align: center;
            }

        .data-table tbody tr:hover {
            background-color: #e8eef5 !important;
            box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
        }

    .total-row td {
        text-align: left;
        font-size: 1.4rem;
    }

        .total-row td.currency {
            text-align: right;
            padding-right: 2rem;
        }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    .rating-container,
    .supplies-container {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--color-border);
    }

    .data-table {
        page-break-inside: avoid;
        border-collapse: collapse;
    }

        .data-table th,
        .data-table td {
            border: 1px solid var(--color-border);
            padding: var(--spacing-sm);
        }
}

/* Custom Syncfusion Rating Styling */
.custom-rating.e-rating {
    display: inline-flex;
    gap: 1px;
    margin: 0;
    padding: 0;
}

    .custom-rating.e-rating .e-icon {
        font-size: 13px;
        color: #e5e7eb;
        transition: color 0.2s ease;
        margin: 0;
        padding: 0;
        line-height: 1;
    }

        .custom-rating.e-rating .e-icon.e-rating-selected {
            color: #10b981;
            text-shadow: 0 0 2px rgba(16, 185, 129, 0.5);
        }

        .custom-rating.e-rating .e-icon.e-rating-hovered {
            color: #34d399;
        }

/* ═══════════════════════════════════════════════════════════
   Assembly – list cards
   (moved from DispatchPage.razor <style> block so they load
   as a real global stylesheet and are not silently overridden)
═══════════════════════════════════════════════════════════ */
.assembly-card {
    display: flex;
    align-items: flex-start;
    background: #ffffff;
    border-radius: 10px;
    margin: 6px 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.12s;
    min-height: 110px;
}

.assembly-card:active {
    transform: scale(0.985);
    box-shadow: 0 0 2px rgba(0,0,0,0.08);
}

.assembly-card--locked { opacity: 0.65; }

.assembly-card-stat {
    display: flex;
    flex-direction: column;
    width: 78px;
    flex-shrink: 0;
    align-self: stretch;
}

.assembly-stat-count {
    flex: 1 1 auto;
    background: #002245;
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
}

.assembly-stat-split {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 50px;
}

.assembly-stat-split__top,
.assembly-stat-split__bottom {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2px 2px;
}

.assembly-stat-split__top {
    background: #002245;
    color: #ffffff;
}

.assembly-stat-split__bottom {
    background: #0f2d4f;
    color: #ffffff;
}

.assembly-stat-split__count {
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
}

.assembly-stat-split__label {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    opacity: 0.85;
}

.assembly-stat-perc {
    padding: 6px 4px;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
}

.assembly-stat-perc.perc--complete { background: #16a34a; }
.assembly-stat-perc.perc--high     { background: #0ea5e9; }
.assembly-stat-perc.perc--mid      { background: #f59e0b; }
.assembly-stat-perc.perc--low      { background: #ef4444; }

.assembly-stat-lock {
    background: #fef3c7;
    color: #92400e;
    font-size: 13px;
    text-align: center;
    padding: 4px 0;
}

.assembly-card-detail {
    flex: 1 1 auto;
    display: block;
    padding: 10px 12px;
    min-width: 0;
}

.assembly-detail-client {
    font-size: 14px;
    font-weight: 700;
    color: #002245;
    text-align: center;
    margin-bottom: 4px;
    line-height: 1.3;
}

.assembly-detail-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;
}

.assembly-detail-label {
    font-size: 12px;
    font-weight: 600;
    color: #7f1d1d;
    min-width: 84px;
    flex-shrink: 0;
}

.assembly-detail-value {
    font-size: 12px;
    font-weight: 600;
    color: #1f2937;
    flex: 1 1 auto;
    min-width: 0;
}

.assembly-detail-value--invoice {
    color: #1d4ed8;
    font-weight: 700;
}

.assembly-detail-invoice-link {
    background: transparent;
    border: none;
    padding: 0;
    text-align: left;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
    font-weight: inherit;
    font-family: inherit;
}

/* ═══════════════════════════════════════════════════════════
   Dispatch menu page
═══════════════════════════════════════════════════════════ */
.dispatch-page {
    padding: 1rem;
}

.dispatch-header {
    margin-bottom: 1.25rem;
}

.dispatch-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #002245;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.dispatch-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dispatch-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.dispatch-menu-item:hover:not(.disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateX(2px);
}

.dispatch-menu-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dispatch-menu-icon {
    width: 38px;
    height: 38px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.dispatch-menu-icon--assembly { background: #e0f2fe; color: #0369a1; }
.dispatch-menu-icon--paints   { background: #fce7f3; color: #be185d; }
.dispatch-menu-icon--pickups  { background: #dcfce7; color: #15803d; }
.dispatch-menu-icon--returns  { background: #fef3c7; color: #b45309; }
.dispatch-menu-icon--purchase { background: #f3e8ff; color: #7c3aed; }
.dispatch-menu-icon--reports  { background: #e8f5e9; color: #2e7d32; }
.dispatch-menu-icon--receivables { background: #fff7ed; color: #c2410c; }

.dispatch-menu-group-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #0369a1;
    padding: 0.75rem 0.25rem 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.dispatch-menu-group-label--backoffice {
    color: #c2410c;
    margin-top: 0.25rem;
}

.dispatch-menu-group-label--inventory {
    color: #7c3aed;
    margin-top: 0.25rem;
}

.dispatch-menu-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.dispatch-menu-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
}

.dispatch-menu-desc {
    font-size: 0.75rem;
    color: #64748b;
}

.dispatch-menu-chevron {
    color: #cbd5e1;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.dispatch-menu-lock {
    color: #ef4444;
    font-size: 0.85rem;
    flex-shrink: 0;
    opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════
   Dispatch detail – fixed header + scrollable invoice list
═══════════════════════════════════════════════════════════ */
.dispatch-detail-root {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.dispatch-detail-header {
    flex-shrink: 0;
    background: #ffffff;
    z-index: 20;
}

.dispatch-detail-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.delivery-route-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 10px;
}

.delivery-route-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
    border: 1.5px solid transparent;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.delivery-route-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.delivery-route-btn--start {
    background: #FF6600;
    color: #fff;
    border-color: #e65c00;
}

.delivery-route-btn--start:hover:not(:disabled) {
    background: #e65c00;
}

.delivery-route-btn--map {
    background: #002245;
    color: #fff;
    border-color: #001833;
}

.delivery-route-btn--map:hover:not(:disabled) {
    background: #001833;
}

.delivery-route-btn--delivered {
    background: #15803d;
    color: #fff;
    border-color: #166534;
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 15px;
}

.delivery-route-btn--delivered:hover:not(:disabled) {
    background: #166534;
}

.delivery-complete-bar {
    margin: 8px 12px 4px;
    padding: 12px;
    border-radius: 10px;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.delivery-complete-bar__text {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #166534;
    display: flex;
    align-items: center;
    gap: 8px;
}

.delivery-route-started {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #15803d;
}

.delivery-route-started__eta {
    color: #64748b;
    font-weight: 500;
}

.delivery-route-msg {
    margin: 0 12px 8px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    background: #ecfdf5;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.delivery-route-msg--error {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.delivery-start-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 28px 16px;
    padding: 28px 20px;
    text-align: center;
    background: #fff;
    border: 1.5px dashed #cbd5e1;
    border-radius: 12px;
    color: #334155;
}

.delivery-start-prompt i {
    font-size: 2.25rem;
    color: #FF6600;
}

.delivery-start-prompt p {
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
    max-width: 22rem;
}

.delivery-start-prompt strong {
    color: #c2410c;
}

/* ═══════════════════════════════════════════════════════════
   Section header with back button (shared by all sub-pages)
═══════════════════════════════════════════════════════════ */
.dispatch-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 10px 8px;
    background: #ffffff;
    border-bottom: 2px solid #FF6600;
}

.dispatch-back-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #002245;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s;
}

.dispatch-back-btn:hover {
    background: #002245;
    color: #ffffff;
    border-color: #002245;
}

.dispatch-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #002245;
}

/* ═══════════════════════════════════════════════════════════
   Assembly section – toolbar, search, empty state, groups
═══════════════════════════════════════════════════════════ */
.assembly-root {
    display: flex;
    flex-direction: column;
    background: #dce8f5;
    height: 100%;
    overflow: hidden;
}

.assembly-header {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

    .assembly-header .dispatch-section-header,
    .assembly-header .assembly-toolbar {
        position: static;
    }

.assembly-cards-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.assembly-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 56px;
    z-index: 10;
}

.assembly-search-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 0 10px;
    gap: 6px;
    transition: border-color 0.2s;
}

.assembly-search-wrap:focus-within {
    border-color: #002245;
    background: #ffffff;
}

.assembly-search-icon {
    color: #94a3b8;
    font-size: 13px;
    flex-shrink: 0;
}

.assembly-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: #1f2937;
    font-weight: 500;
    padding: 8px 0;
}

.assembly-tabs {
    display: flex;
    gap: 6px;
    padding: 8px 10px 0 10px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.assembly-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    background: transparent;
    border: none;
    border-bottom: 2.5px solid transparent;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.assembly-tab--active {
    color: #002245;
    border-bottom-color: #002245;
}

.assembly-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #eef2f7;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.assembly-tab--active .assembly-tab-count {
    background: #002245;
    color: #ffffff;
}

.assembly-search-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.assembly-search-clear {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    font-size: 16px;
    line-height: 1;
}

.dispatch-count-badge {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #002245;
}

.delivery-header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 0 8px;
    gap: 5px;
    width: 170px;
    transition: border-color 0.2s, background 0.2s;
}

.delivery-header-search:focus-within {
    border-color: #002245;
    background: #ffffff;
}

.delivery-header-search .assembly-search-input {
    font-size: 12px;
    padding: 6px 0;
}

.assembly-refresh-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    color: #002245;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.assembly-refresh-btn:hover,
.assembly-refresh-btn:active {
    background: #002245;
    color: #ffffff;
    border-color: #002245;
}

.assembly-error-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 10px;
    padding: 10px 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.assembly-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    gap: 6px;
    text-align: center;
}

.assembly-empty-icon {
    font-size: 52px;
    color: #93c5fd;
    margin-bottom: 8px;
}

.assembly-empty-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e3a5f;
    margin: 0;
}

.assembly-empty-sub {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.assembly-group-header {
    background: #1a4a8a;
    padding: 10px 14px;
    margin-top: 10px;
}

.assembly-group-label {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    display: block;
}

/* ═══════════════════════════════════════════════════════════
   Walkins – list & payment detail
═══════════════════════════════════════════════════════════ */
.walkin-count-badge {
    background: #002245;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    flex-shrink: 0;
    min-width: 22px;
    text-align: center;
}

.walkin-root {
    display: flex;
    flex-direction: column;
    background: #dce8f5;
    height: 100%;
    overflow: hidden;
}

.walkin-header {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

    .walkin-header .dispatch-section-header,
    .walkin-header .assembly-toolbar {
        position: static;
    }

.walkin-cards-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* ── Card ── */
.dispatch-walkin-card {
    display: flex;
    align-items: flex-start;
    background: #ffffff;
    border-radius: 10px;
    margin: 6px 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.12s;
    min-height: 140px;
}

.dispatch-walkin-card:active {
    transform: scale(0.985);
    box-shadow: 0 0 2px rgba(0,0,0,0.08);
}

.dispatch-walkin-card-stat {
    display: flex;
    flex-direction: column;
    width: 76px;
    flex-shrink: 0;
    align-self: stretch;
    border-radius: 10px 0 0 10px;
}

.walkin-stat-count {
    flex: 1 1 auto;
    background: #002245;
    color: #ffffff;
    font-size: 26px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
}

.walkin-stat-split {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 56px;
    border-radius: 10px 0 0 10px;
    overflow: hidden;
}

.walkin-stat-split__top,
.walkin-stat-split__bottom {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2px 2px;
}

.walkin-stat-split__top {
    background: #002245;
    color: #ffffff;
}

.walkin-stat-split__bottom {
    background: #0f2d4f;
    color: #ffffff;
}

.walkin-stat-split__count {
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.walkin-stat-split__label {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    opacity: 0.85;
}

.walkin-stat-perc {
    padding: 6px 4px;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
}

.walkin-stat-perc.perc--complete { background: #16a34a; }
.walkin-stat-perc.perc--high     { background: #0ea5e9; }
.walkin-stat-perc.perc--mid      { background: #f59e0b; }
.walkin-stat-perc.perc--low      { background: #ef4444; }

.dispatch-walkin-card-detail {
    flex: 1 1 auto;
    display: block;
    padding: 12px 14px;
    min-width: 0;
}

.walkin-detail-name {
    font-size: 15px;
    font-weight: 700;
    color: #002245;
    margin-bottom: 4px;
    line-height: 1.3;
}

.walkin-detail-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;
}

.walkin-label {
    font-size: 12px;
    font-weight: 600;
    color: #7f1d1d;
    min-width: 76px;
    flex-shrink: 0;
}

.walkin-value {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

.walkin-balance {
    color: #1d4ed8;
}

.walkin-elapsed {
    color: #b45309;
}

.walkin-invoice-link {
    background: transparent;
    border: none;
    padding: 0;
    text-align: left;
    cursor: pointer;
    color: #1d4ed8;
    text-decoration: underline;
    font-size: inherit;
    font-weight: inherit;
    font-family: inherit;
}

.dispatch-walkin-card-chevron {
    color: #cbd5e1;
    font-size: 14px;
    align-self: center;
    padding-right: 10px;
    flex-shrink: 0;
}

/* ── Delivery segments (Dispatch page) ── */
.dispatch-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 48px 24px;
    color: #64748b;
    text-align: center;
}

.dispatch-empty-state--compact {
    padding: 24px 16px;
}

.dispatch-status-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 12px 12px;
}

.dispatch-status-chip {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
}

.dispatch-status-chip.active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.dispatch-segment-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.dispatch-segment-status--scheduling { background: #e0f2fe; color: #0369a1; }
.dispatch-segment-status--dispatched { background: #dbeafe; color: #1d4ed8; }
.dispatch-segment-status--en-route { background: #fef3c7; color: #b45309; }
.dispatch-segment-status--completed { background: #dcfce7; color: #15803d; }
.dispatch-segment-status--cancelled { background: #fee2e2; color: #b91c1c; }

.dispatch-segment-driver {
    display: block;
    margin-top: 6px;
    font-weight: 600;
    color: #0f172a;
}

.dispatch-segment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #64748b;
}

.dispatch-segment-times {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
    font-size: 12px;
    color: #475569;
}

.dispatch-segment-detail {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dispatch-segment-detail-header {
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.dispatch-segment-stop {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
}

.dispatch-segment-stop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.dispatch-segment-stop-number {
    font-weight: 700;
    color: #0f172a;
}

.dispatch-segment-stop-status {
    font-size: 12px;
    color: #64748b;
}

.dispatch-segment-stop-client {
    font-weight: 600;
    color: #1e293b;
}

.dispatch-segment-stop-invoice {
    font-size: 13px;
    color: #64748b;
}

/* ── Payment detail form ── */
.walkin-detail-root {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #f4f8fc;
    min-height: calc(100vh - 150px);
    padding-bottom: 24px;
}

.walkin-detail-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.walkin-detail-client {
    font-size: 16px;
    font-weight: 700;
    color: #002245;
    text-align: center;
}

.walkin-detail-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
}

.walkin-detail-meta-item {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.walkin-detail-inv { color: #1d4ed8; }

.walkin-detail-total {
    color: #15803d;
    font-weight: 700;
}

.walkin-detail-note {
    background: #fef9c3;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    color: #92400e;
    display: flex;
    gap: 6px;
    align-items: flex-start;
    margin-top: 4px;
}

.walkin-detail-term {
    font-size: 12px;
    color: #64748b;
    text-align: center;
    margin-top: 2px;
}

.walkin-section-label {
    font-size: 12px;
    font-weight: 700;
    color: #002245;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 14px 4px;
}

.walkin-payment-types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 14px 8px;
}

.walkin-pt-item {
    padding: 8px 14px;
    border-radius: 20px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s;
}

.walkin-pt-item.selected {
    background: #002245;
    color: #ffffff;
    border-color: #002245;
}

.walkin-amount-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 14px 8px;
}

.walkin-balance-label {
    font-size: 13px;
    font-weight: 600;
    color: #1d4ed8;
    white-space: nowrap;
}

.walkin-amount-input {
    flex: 1;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
    font-weight: 700;
    color: #7f1d1d;
    background: #ffffff;
    outline: none;
    min-width: 0;
    transition: border-color 0.2s;
}

.walkin-amount-input:focus {
    border-color: #002245;
}

.walkin-note-input {
    margin: 4px 14px 8px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
    color: #1e293b;
    background: #ffffff;
    outline: none;
    resize: vertical;
    min-height: 70px;
    width: calc(100% - 28px);
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.walkin-note-input:focus {
    border-color: #002245;
}

.walkin-sig-container {
    margin: 4px 14px 8px;
}

.walkin-sig-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.walkin-sig-clear-btn {
    font-size: 12px;
    font-weight: 600;
    color: #ef4444;
    background: none;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.walkin-sig-required {
    color: #ef4444;
}

.walkin-save-btn {
    margin: 8px 14px 0;
    width: calc(100% - 28px);
    padding: 13px;
    background: #002245;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.walkin-save-btn--inline {
    margin: 0;
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 8px;
}

.walkin-save-btn:hover:not(:disabled) {
    background: #1a4a8a;
}

.walkin-save-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════
   Returns section
═══════════════════════════════════════════════════════════ */

/* ── Invoice list ── */
.returns-root {
    display: flex;
    flex-direction: column;
    background: #fef9f0;
    min-height: calc(100vh - 56px);
}

.returns-invoice-card {
    display: flex;
    align-items: flex-start;
    background: #ffffff;
    border-radius: 10px;
    margin: 6px 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.12s;
    min-height: 120px;
}

.returns-invoice-card:active {
    transform: scale(0.985);
    box-shadow: 0 0 2px rgba(0,0,0,0.08);
}

.returns-card-stat {
    width: 70px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #b45309;
    color: #ffffff;
    align-self: stretch;
    gap: 2px;
}

.returns-stat-count {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.returns-stat-label {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.85;
}

.returns-card-detail {
    flex: 1 1 auto;
    display: block;
    padding: 12px 14px;
    min-width: 0;
}

.returns-card-client {
    font-size: 15px;
    font-weight: 700;
    color: #002245;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.returns-card-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 3px;
}

.returns-card-label {
    font-size: 12px;
    font-weight: 600;
    color: #7f1d1d;
    min-width: 72px;
    flex-shrink: 0;
}

.returns-card-value {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

.returns-card-inv {
    color: #1d4ed8;
}

.returns-card-inv-link {
    background: transparent;
    border: none;
    padding: 0;
    text-align: left;
    cursor: pointer;
    font-size: inherit;
    font-weight: inherit;
    font-family: inherit;
    text-decoration: underline;
}

.returns-card-amount {
    color: #15803d;
}

/* ── Product detail view ── */
.returns-detail-root {
    display: flex;
    flex-direction: column;
    background: #fef9f0;
    min-height: calc(100vh - 56px);
    padding-bottom: 24px;
}

.returns-detail-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.returns-detail-client {
    font-size: 16px;
    font-weight: 700;
    color: #002245;
    text-align: center;
}

.returns-detail-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
}

.returns-detail-meta-item {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.returns-detail-inv {
    color: #1d4ed8;
}

.returns-detail-subtitle {
    font-size: 12px;
    color: #b45309;
    font-weight: 600;
    text-align: center;
    margin-top: 2px;
}

/* ── Product card ── */
.returns-product-card {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 10px;
    margin: 4px 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: box-shadow 0.15s, border 0.15s;
    border: 2px solid transparent;
}

.returns-product-card--confirmed {
    border-color: #16a34a;
    background: #f0fdf4;
}

.returns-product-image-wrap {
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
}

.returns-product-image {
    width: 68px;
    height: 68px;
    object-fit: contain;
}

.returns-product-detail {
    flex: 1;
    padding: 10px 10px;
    min-width: 0;
}

.returns-product-sku {
    font-size: 13px;
    font-weight: 700;
    color: #002245;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.returns-product-desc {
    font-size: 12px;
    color: #475569;
    margin-bottom: 5px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.returns-product-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.returns-product-label {
    font-size: 11px;
    font-weight: 600;
    color: #7f1d1d;
    flex-shrink: 0;
}

.returns-product-value {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
}

.returns-product-qty {
    color: #b45309;
}

.returns-product-amount {
    color: #15803d;
}

/* ── Confirm toggle button ── */
.returns-confirm-btn {
    width: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #cbd5e1;
    align-self: stretch;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s;
}

.returns-confirm-btn.confirmed {
    color: #16a34a;
}

/* ── Save button ── */
.returns-save-btn {
    margin: 8px 14px 0;
    width: calc(100% - 28px);
    padding: 13px;
    background: #b45309;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.returns-save-btn:hover:not(:disabled) {
    background: #92400e;
}

.returns-save-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ════════════════════════════════════════════════════════════════════════════
   PURCHASE ORDERS
   ════════════════════════════════════════════════════════════════════════════ */

/* ── List root ── */
.po-list-root {
    display: flex;
    flex-direction: column;
    padding: 0 0 16px;
}

/* ── Refresh button in header ── */
.po-refresh-btn {
    margin-left: auto;
    background: transparent;
    border: none;
    color: #475569;
    font-size: 18px;
    padding: 4px 8px;
    cursor: pointer;
}

/* ── PO list card ── */
.po-card {
    display: flex;
    align-items: flex-start;
    background: #ffffff;
    border-radius: 10px;
    margin: 6px 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.12s;
    min-height: 120px;
}

.po-card:active {
    transform: scale(0.985);
    box-shadow: 0 0 2px rgba(0,0,0,0.08);
}

/* ── Stat column (% received) ── */
.po-card-stat {
    width: 70px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #7c3aed;
    color: #ffffff;
    align-self: stretch;
    gap: 2px;
}

.po-card-stat-perc {
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

.po-card-stat-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.85;
}

/* ── Card detail column ── */
.po-card-detail {
    flex: 1 1 auto;
    display: block;
    padding: 12px 14px;
    min-width: 0;
}

.po-card-vendor {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.po-card-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 3px;
}

.po-card-label {
    font-size: 11px;
    color: #94a3b8;
    flex-shrink: 0;
}

.po-card-value {
    font-size: 12px;
    color: #334155;
    font-weight: 500;
    text-align: right;
}

.po-card-po {
    color: #1d4ed8;
}

.po-card-amount {
    color: #15803d;
}

/* ── Detail root ── */
.po-detail-root {
    display: flex;
    flex-direction: column;
}

/* ── Detail header ── */
.po-detail-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 16px 12px;
    margin-bottom: 6px;
}

.po-detail-vendor {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.po-detail-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.po-detail-meta-item {
    font-size: 12px;
    color: #64748b;
}

.po-detail-po {
    color: #1d4ed8;
    font-weight: 600;
}

.po-detail-subtitle {
    margin-top: 6px;
    font-size: 12px;
    color: #7c3aed;
    font-weight: 600;
}

/* ── Product card ── */
.po-product-card {
    display: flex;
    align-items: flex-start;
    background: #ffffff;
    border-radius: 10px;
    margin: 6px 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.po-product-card--confirmed {
    border-color: #16a34a;
    background: #f0fdf4;
}

.po-product-image-wrap {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    align-self: stretch;
}

.po-product-image {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.po-product-detail {
    flex: 1 1 auto;
    padding: 10px 12px;
    min-width: 0;
}

.po-product-sku {
    font-size: 12px;
    font-weight: 700;
    color: #1d4ed8;
    margin-bottom: 2px;
}

.po-product-desc {
    font-size: 13px;
    color: #0f172a;
    font-weight: 500;
    margin-bottom: 2px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.po-product-category {
    font-size: 11px;
    color: #7c3aed;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.po-product-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 3px;
}

.po-product-label {
    font-size: 11px;
    color: #94a3b8;
    flex-shrink: 0;
}

.po-product-value {
    font-size: 12px;
    color: #334155;
    font-weight: 500;
    text-align: right;
}

.po-product-qty {
    color: #7c3aed;
    font-weight: 700;
}

.po-product-amount {
    color: #15803d;
}

/* ── Confirm toggle ── */
.po-confirm-btn {
    width: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #cbd5e1;
    align-self: stretch;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s;
}

.po-confirm-btn.confirmed {
    color: #16a34a;
}

/* ── Save bar ── */
.po-save-bar {
    padding: 8px 14px 0;
}

.po-save-btn {
    width: 100%;
    padding: 13px;
    background: #7c3aed;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.po-save-btn:hover:not(:disabled) {
    background: #6d28d9;
}

.po-save-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ════════════════════════════════════════════════════════════════════════════
   DELIVERIES (Dispatch tickets for drivers)
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Header refresh button ── */
.dispatch-refresh-btn {
    margin-left: auto;
    background: transparent;
    border: none;
    color: #475569;
    font-size: 18px;
    padding: 4px 8px;
    cursor: pointer;
}

.dispatch-refresh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.spin {
    display: inline-block;
    animation: spin 0.7s linear infinite;
}

/* ── Ticket card stat column ── */
.dispatch-ticket-card {
    min-height: 120px;
}

.dispatch-ticket-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 76px;
    flex-shrink: 0;
    align-self: stretch;
    background: #002245;
    color: #ffffff;
    border-radius: 10px 0 0 10px;
    gap: 2px;
}

.dispatch-ticket-count {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.dispatch-ticket-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.85;
}

/* ── Ticket card detail column ── */
.dispatch-ticket-id {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.01em;
}

.dispatch-ticket-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 0;
    background: #e2e8f0;
    color: #334155;
    flex-shrink: 0;
}

.dispatch-ticket-status--dispatched { background: #dbeafe; color: #1d4ed8; }
.dispatch-ticket-status--en-route { background: #fef3c7; color: #b45309; }
.dispatch-ticket-status--delivered { background: #dcfce7; color: #15803d; }
.dispatch-ticket-status--completed { background: #dcfce7; color: #15803d; }
.dispatch-ticket-status--cancelled { background: #fee2e2; color: #b91c1c; }

.dispatch-ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 11px;
    color: #64748b;
    margin-bottom: 4px;
}

.dispatch-ticket-driver {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.dispatch-ticket-notes {
    font-size: 12px;
    color: #b45309;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 2px;
}

/* ── Ticket card right-side actions ── */
.dispatch-ticket-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    padding-right: 12px;
    flex-shrink: 0;
    align-self: center;
}

.dispatch-ticket-delivered-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #f1f5f9;
    color: #475569;
}

.dispatch-ticket-delivered-count.all-delivered {
    background: #14532d;
    color: #ffffff;
}

.dispatch-ticket-delivered-count.all-delivered i {
    color: #86efac;
}

.dispatch-ticket-close-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 6px;
    background: #14532d;
    color: white;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.dispatch-ticket-close-btn:hover {
    background: #166534;
}

.dispatch-ticket-close-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Ticket detail (bottom sheet) ── */
.dispatch-ticket-detail {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dispatch-ticket-detail-header {
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dispatch-back-btn {
    background: transparent;
    border: none;
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 600;
    padding: 2px 0 2px 2px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    align-self: flex-start;
}

.dispatch-ticket-detail-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #e2e8f0;
    color: #334155;
    align-self: flex-start;
}

.dispatch-ticket-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #64748b;
}

.dispatch-ticket-detail-notes {
    font-size: 13px;
    color: #92400e;
    background: #fef9c3;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 8px 10px;
}

/* ── Invoice card inside ticket detail ── */
.dispatch-ticket-invoice-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ── Proof of Delivery strip (sign-off page inline) ── */
.pod-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 6px 0 8px;
}

.pod-strip-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #bfdbfe;
}

.pod-strip-add {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    border: 2px dashed #93c5fd;
    background: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 600;
    gap: 3px;
    cursor: pointer;
}

.pod-strip-add i { font-size: 18px; }

/* ── Proof of Delivery dialog ── */
.pod-dialog {
    max-width: 480px !important;
    width: min(96vw, 480px) !important;
}

.pod-dialog .e-dlg-content { padding: 12px 14px; }

.pod-view-dialog .e-dlg-content {
    padding: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.pod-dialog-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 15px;
}

.pod-count-badge {
    background: #2563eb;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 999px;
}

.pod-error-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    margin-bottom: 10px;
    cursor: pointer;
}

.pod-pick-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.pod-pick-btn {
    flex: 1 1 120px;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border-radius: 10px;
    border: 2px solid #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
}

.pod-pick-btn--secondary {
    border-color: #64748b;
    background: #f8fafc;
    color: #475569;
}

.pod-hidden-input {
    display: none;
}

.pod-preview-shell {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.pod-preview-img {
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    background: #f1f5f9;
}

.pod-preview-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: #f8fafc;
    font-size: 12px;
    color: #475569;
    gap: 8px;
}

.pod-upload-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.pod-upload-btn:disabled { opacity: 0.5; }

.pod-uploaded-label {
    font-size: 12px;
    font-weight: 700;
    color: #15803d;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pod-images-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 6px;
}

.pod-thumb-wrap {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
}

.pod-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pod-thumb-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
}

.pod-footer {
    display: flex;
    gap: 10px;
    padding: 4px 0;
}

.pod-footer-cancel {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.pod-footer-done {
    flex: 2;
    padding: 10px;
    border-radius: 8px;
    border: none;
    background: #15803d;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pod-footer-done:disabled,
.pod-footer-cancel:disabled { opacity: 0.5; }

/* ── Delivery confirmation panel ── */
.delivery-confirm-panel {
    background: #fffbeb;
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.delivery-confirm-panel-title {
    font-weight: 700;
    font-size: 15px;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 6px;
}

.delivery-confirm-panel-body {
    font-size: 13px;
    color: #1c1917;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #fde68a;
}

.delivery-confirm-panel-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.delivery-confirm-cancel-btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.delivery-confirm-cancel-btn:disabled {
    opacity: 0.5;
}

.delivery-confirm-save-btn {
    flex: 1.5;
    margin: 0;
}

/* ── Delivery accordion ── */
.delivery-accordion.e-accordion {
    border: none;
    background: transparent;
    box-shadow: none;
}

.delivery-accordion .e-acrdn-item {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid #e2e8f0;
}

.delivery-accordion .e-acrdn-header {
    padding: 10px 12px;
}

.delivery-accordion-pending .e-acrdn-header {
    background: #fff7ed;
    border-left: 4px solid #f59e0b;
}

.delivery-accordion-delivered .e-acrdn-header {
    background: #f0fdf4;
    border-left: 4px solid #15803d;
}

.delivery-accordion-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.delivery-accordion-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 14px;
    flex-shrink: 0;
}

.delivery-accordion-icon--pending {
    background: #fef3c7;
    color: #b45309;
}

.delivery-accordion-icon--delivered {
    background: #dcfce7;
    color: #15803d;
}

.delivery-accordion-title {
    font-weight: 700;
    font-size: 14px;
    color: #0f172a;
    flex: 1;
}

.delivery-accordion-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

.delivery-accordion-badge--pending {
    background: #fef3c7;
    color: #b45309;
}

.delivery-accordion-badge--delivered {
    background: #dcfce7;
    color: #15803d;
}

.delivery-accordion-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 8px;
    background: #f8fafc;
}

.dispatch-ticket-invoice-card--delivered {
    opacity: 0.72;
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.dispatch-ticket-invoice-card--clickable {
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.dispatch-ticket-invoice-card--clickable:hover {
    border-color: #002245;
    box-shadow: 0 2px 8px rgba(0,34,69,0.1);
}

.dispatch-ticket-invoice-signoff {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
    font-size: 12px;
    font-weight: 600;
    color: #002245;
}

.dispatch-ticket-invoice-signoff__go {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.dispatch-ticket-invoice-signoff__go i:last-child {
    color: #94a3b8;
}

.delivery-directions-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    border: 1.5px solid #002245;
    background: #fff;
    color: #002245;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.delivery-directions-btn:hover {
    background: #002245;
    color: #fff;
}

.delivery-directions-btn i {
    font-size: 14px;
}

.dispatch-ticket-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.dispatch-ticket-pod-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid #15803d;
    border-radius: 6px;
    background: #dcfce7;
    color: #15803d;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    padding: 0;
    flex-shrink: 0;
}

.dispatch-ticket-pod-icon:hover {
    background: #15803d;
    color: white;
}

.dispatch-ticket-invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.delivery-stop-badge {
    flex: 0 0 auto;
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    line-height: 1;
    background: #ffedd5;
    color: #c2410c;
    border: 1.5px solid #fdba74;
}

.delivery-stop-badge--done {
    background: #dcfce7;
    color: #15803d;
    border-color: #86efac;
}

.dispatch-ticket-customer {
    font-weight: 700;
    color: #0f172a;
    flex: 1 1 auto;
}

.dispatch-ticket-invoice-link {
    background: transparent;
    border: none;
    padding: 0;
    text-align: right;
    cursor: pointer;
    color: #1d4ed8;
    text-decoration: underline;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    flex-shrink: 0;
}

.dispatch-ticket-address {
    font-size: 13px;
    color: #1e293b;
    line-height: 1.4;
}

.dispatch-ticket-phone-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.dispatch-ticket-phone {
    font-size: 13px;
    color: #0f172a;
    font-weight: 500;
}

.dispatch-ticket-invoice-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #1e293b;
    margin-top: 2px;
}

.dispatch-ticket-invoice-meta span:first-child {
    background: #f59e0b;
    color: #1c1a00;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

.dispatch-ticket-terms {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 600;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 999px;
}

.dispatch-ticket-invoice-meta span:last-child {
    color: #15803d;
    font-weight: 700;
}

.dispatch-ticket-invoice-body {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.dispatch-ticket-invoice-left {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.dispatch-ticket-invoice-right {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
    border-left: 1px solid #e2e8f0;
    padding-left: 10px;
}

.dispatch-ticket-invoice-detail {
    font-size: 12px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .dispatch-ticket-customer {
        font-size: 13px;
    }

    .dispatch-ticket-invoice-link {
        font-size: 11px;
    }

    .dispatch-ticket-address {
        font-size: 11px;
    }

    .dispatch-ticket-phone {
        font-size: 11px;
    }

    .dispatch-ticket-invoice-meta {
        font-size: 11px;
    }

    .dispatch-ticket-invoice-meta span:first-child {
        font-size: 10px;
        padding: 1px 6px;
    }

    .dispatch-ticket-invoice-meta span:last-child {
        font-size: 11px;
    }

    .dispatch-ticket-invoice-detail {
        font-size: 10px;
    }

    .dispatch-ticket-invoice-right {
        padding-left: 8px;
    }
}

/* ══════════════════════════════════════════════════
   Reset Password Dialog  (global — SF renders outside component)
══════════════════════════════════════════════════ */
.reset-dialog {
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25) !important;
}

.reset-dialog .e-dlg-header-content {
    background: #03142E;
    padding: 14px 18px;
    border-bottom: none;
}

.reset-dialog .e-dlg-header-content .e-dlg-closeicon-btn {
    color: #fff !important;
    opacity: 0.8;
}

.reset-dialog .e-dlg-header-content .e-dlg-closeicon-btn:hover {
    opacity: 1;
    background: rgba(255,255,255,0.15) !important;
    border-radius: 6px;
}

.reset-dlg-header {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
    font-size: 15px;
    color: #ffffff;
}

.reset-dialog .e-dlg-content {
    padding: 20px 22px 8px !important;
    background: #ffffff;
}

.reset-dialog .e-footer-content {
    padding: 8px 22px 18px !important;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

.reset-dialog .reset-panel-sub {
    font-size: 13px;
    color: #475569;
    margin: 0 0 18px 0;
    line-height: 1.5;
}

.reset-dialog .rdlg-form-group {
    margin-bottom: 14px;
}

.reset-dialog .rdlg-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
    letter-spacing: 0.2px;
}

.reset-dialog .rdlg-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.reset-dialog .rdlg-input-wrap i {
    position: absolute;
    left: 12px;
    color: #03142E;
    font-size: 15px;
    pointer-events: none;
    opacity: 0.5;
}

.reset-dialog .rdlg-input {
    width: 100%;
    padding: 11px 12px 11px 38px;
    font-size: 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    color: #1f2937;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.reset-dialog .rdlg-input:focus {
    outline: none;
    border-color: #03142E;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(3,20,46,0.09);
}

.reset-dialog .rdlg-input:disabled {
    background: #f3f4f6;
    color: #9ca3af;
}

.reset-dialog .rdlg-error {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #991b1b;
    font-size: 13px;
    margin-top: 4px;
    margin-bottom: 10px;
}

.reset-dialog .rdlg-footer {
    display: flex;
    gap: 10px;
    width: 100%;
}

.reset-dialog .reset-cancel-btn {
    flex: 1;
    padding: 11px 10px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
}

.reset-dialog .reset-cancel-btn:hover:not(:disabled) {
    background: #f1f5f9;
}

.reset-dialog .reset-send-btn {
    flex: 2;
    padding: 11px 10px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #03142E 0%, #0f4c75 100%);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: opacity 0.15s;
}

.reset-dialog .reset-send-btn:hover:not(:disabled) {
    opacity: 0.9;
}

.reset-dialog .reset-send-btn:disabled,
.reset-dialog .reset-cancel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.reset-dialog .rdlg-resend {
    text-align: center;
    margin-top: 10px;
}

.reset-dialog .rdlg-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px 0 8px;
    text-align: center;
}

.reset-dialog .rdlg-success i {
    font-size: 44px;
    color: #15803d;
}

.reset-dialog .rdlg-success p {
    margin: 0;
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
}

