/* Trucks App Styles */

/* Line items table - ensure proper alignment */
.lineitems table {
  table-layout: auto;
  width: 100%;
}

.lineitems thead th,
.lineitems tbody td {
  vertical-align: top;
  padding: 0.5rem;
}

/* Ensure rows display properly */
.lineitems thead tr,
.lineitems tbody tr {
  display: table-row;
}

.lineitems thead th,
.lineitems tbody td {
  display: table-cell;
}

/* Constrain textarea in line items - prevent auto-expand from breaking layout */
.lineitems .bf-li-description {
  min-height: 38px;
  max-height: 80px;
  resize: vertical;
  overflow-y: auto;
  width: 100%;
}

/* Hide mobile field labels - use table headers instead */
.lineitems .d-block.d-md-none {
  display: none !important;
}

/* Hide add button on all rows except the last one */
.lineitems tbody tr .add-row {
  visibility: hidden;
}

.lineitems tbody tr:last-child .add-row {
  visibility: visible;
}

/* Email status reload indicator */
.reload-indicator {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--bs-secondary);
}

.reload-indicator.reloading {
    color: var(--bs-primary);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.reload-indicator.reloading i {
    animation: spin 1s linear infinite;
}

/* Dark mode support for reload indicator */
[data-bs-theme="dark"] .reload-indicator {
    color: var(--bs-secondary);
}

[data-bs-theme="dark"] .reload-indicator.reloading {
    color: var(--bs-info);
}

/* Pill container with outline border */
.pill {
    border: 2px solid #dee2e6;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    background-color: #fff;
}

/* Dark mode support for pills */
[data-bs-theme="dark"] .pill {
    border-color: #495057;
    background-color: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}

/* VIN display styling - prevent overflow and make responsive */
.vin-background {
    background-color: #f8f9fa;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

[data-bs-theme="dark"] .vin-background {
    background-color: #343a40;
    border-color: #495057;
}

/* VIN container — single line, auto-shrink to fit the available width.
 * Uses container query units (cqi) so the font size scales with the actual
 * column width, not the viewport. Falls back to vw on browsers without
 * container query support. */
.vin-display {
    container-type: inline-size;
    width: 100%;
}

.vin-display .vin-line {
    white-space: nowrap;
    line-height: 1.3;
    /* Monospace chars are ~0.6em wide. "VIN : " (6) + 17-char VIN = 23 chars.
     * Target ~95% container fill → font-size ≈ container_width / 14.
     * 8cqi gives a slightly taller fit (it's an upper bound — `nowrap` keeps
     * it from overflowing if the container is narrower than expected). */
    font-size: clamp(1rem, 7.0cqi, 3rem);
}

/* Fallback for browsers without container query support.
 * col-md-4 is ~1/3 of viewport on md+, so ~2.25vw approximates 7.0cqi. */
@supports not (container-type: inline-size) {
    .vin-display .vin-line {
        font-size: clamp(1rem, 2.25vw, 3rem);
    }
}

/* Truck navigation buttons (prev/next truck) */
.truck-nav-link {
    display: inline-block;
    padding: 6px 12px;
    background-color: #f8f9fa;
    color: #6c757d;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
    font-weight: 400;
}

.truck-nav-link:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.truck-nav-link:active {
    transform: translateY(0);
    box-shadow: none;
}

[data-bs-theme="dark"] .truck-nav-link {
    background-color: #343a40;
    border-color: #495057;
    color: #adb5bd;
}

[data-bs-theme="dark"] .truck-nav-link:hover {
    background-color: #495057;
    border-color: #6c757d;
    color: #dee2e6;
}

/* Truck location assignment page specific styles */
.location-select {
    min-width: 200px;
}

.update-location-btn {
    min-width: 40px;
}

/* Photo Grid Styles - for job photo uploads */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.photo-card {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.photo-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.photo-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.photo-card img:hover {
    opacity: 0.9;
}

.photo-card .p-2,
.photo-card .p-4 {
    background-color: #f8f9fa;
}

/* Dark mode support for photo grid */
[data-bs-theme="dark"] .photo-card {
    background-color: var(--bs-dark);
    border-color: #495057;
}

[data-bs-theme="dark"] .photo-card .p-2,
[data-bs-theme="dark"] .photo-card .p-4 {
    background-color: #343a40;
}

[data-bs-theme="dark"] .photo-card .bg-body-secondary {
    background-color: #343a40 !important;
}

/* HEIC loading spinner */
.heic-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 240px;
    background-color: #f8f9fa;
}

[data-bs-theme="dark"] .heic-loading {
    background-color: #343a40;
}

/* Clickable photo cursor */
.clickable-photo {
    cursor: pointer;
}

/* Responsive photo grid - smaller screens */
@media (max-width: 576px) {
    .photo-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .photo-card img {
        height: 200px;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1025px) {
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* Bulk Upload Styles */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area * {
    text-align: center;
}

.upload-area h5,
.upload-area p,
.upload-area small,
.upload-area i {
    display: block;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.upload-area:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.upload-area.dragover {
    border-color: #007bff;
    background: #e3f2fd;
}

.file-preview {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: white;
}

.file-preview img {
    max-width: 60px;
    max-height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.priority-star {
    color: #ffc107;
    font-size: 1.2rem;
}

/* Dark mode support for bulk upload */
[data-bs-theme="dark"] .upload-area {
    border-color: #495057;
    background: #343a40;
    color: var(--bs-light);
}

[data-bs-theme="dark"] .upload-area:hover {
    border-color: #0d6efd;
    background: #2c3e50;
}

[data-bs-theme="dark"] .upload-area.dragover {
    border-color: #0d6efd;
    background: #34495e;
}

[data-bs-theme="dark"] .file-preview {
    border-color: #495057;
    background: #2d3748;
    color: var(--bs-light);
}

/* Single Photo Upload Styles */
.category-preview {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f8f9fa;
}

.category-preview.priority {
    border-color: #ffc107;
    background: #fffdf5;
}

.category-preview.has-photo {
    border-color: #28a745;
    background: #f8fff9;
}

.image-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Dark mode support for single photo upload */
[data-bs-theme="dark"] .category-preview {
    border-color: #495057;
    background: #343a40;
    color: var(--bs-light);
}

[data-bs-theme="dark"] .category-preview.priority {
    border-color: #ffc107;
    background: #3d3a2f;
}

[data-bs-theme="dark"] .category-preview.has-photo {
    border-color: #28a745;
    background: #2d3d2f;
}

[data-bs-theme="dark"] .image-preview {
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Compact Inspection Success Alert */
.inspection-success-compact {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
}

.inspection-success-compact .inspection-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
}

.inspection-success-compact .metric-item {
    white-space: nowrap;
}

.inspection-success-compact .issues-compact {
    font-size: 0.85rem;
}

.inspection-success-compact .btn-close {
    padding: 0.25rem;
    font-size: 0.7rem;
}

/* Dark mode support */
[data-bs-theme="dark"] .inspection-success-compact {
    background-color: #1e4620;
    border-color: #2d6930;
    color: #d4edda;
}

[data-bs-theme="dark"] .inspection-success-compact .badge {
    background-color: #ffc107 !important;
    color: #000 !important;
}

/* HTML5 Validation Styles for Weekly Inspection Forms */
/* Only show validation styles when field has .is-invalid or .is-valid class (added by JavaScript after blur) */
.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid {
    border-color: #198754;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-valid:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

/* Dark mode validation styles */
[data-bs-theme="dark"] .form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23ea868f'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23ea868f' stroke='none'/%3e%3c/svg%3e");
}

[data-bs-theme="dark"] .form-control.is-valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2375b798' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
}

/* Hide Django error messages in weekly inspection forms - using HTML5 validation instead */
#witireForm-condition-fieldset .errorlist,
#wibrakeForm-condition-fieldset .errorlist {
    display: none;
}

/* Inspection Success Page - Visual Data Display */
.inspection-data-block {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    font-size: 0.85rem;
}

.tire-brake-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.condition-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    border: 2px solid transparent;
}

.badge-red {
    background-color: #dc3545;
    color: white;
    border-color: #b02a37;
}

.badge-orange {
    background-color: #fd7e14;
    color: white;
    border-color: #dc6502;
}

.badge-green {
    background-color: #198754;
    color: white;
    border-color: #146c43;
}

/* Dark mode support for inspection data display */
[data-bs-theme="dark"] .inspection-data-block {
    background: rgba(0, 0, 0, 0.3);
    color: var(--bs-light);
}

[data-bs-theme="dark"] .badge-red {
    background-color: #dc3545;
    border-color: #ea868f;
}

[data-bs-theme="dark"] .badge-orange {
    background-color: #fd7e14;
    border-color: #fd9843;
}

[data-bs-theme="dark"] .badge-green {
    background-color: #198754;
    border-color: #75b798;
}

/* Axle-by-axle display */
.axle-display {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.axle-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.axle-label {
    font-weight: 600;
    min-width: 60px;
    font-size: 0.8rem;
}

.tire-positions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Hide tire checkboxes and their labels - controlled via JavaScript buttons */
.tire-checkbox-input {
    display: none;
}

/* Hide the entire tires container (contains label + checkbox) */
.tires {
    display: none;
}

.axle-divider {
    color: #6c757d;
    font-weight: bold;
    margin: 0 0.2rem;
}

[data-bs-theme="dark"] .axle-divider {
    color: #adb5bd;
}

/* Inspection grid layout for axle-by-axle display */
.inspection-grid-header {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 1rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 0.5rem;
}

.inspection-grid-row {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.inspection-grid-row:last-child {
    border-bottom: none;
}

.tire-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.tire-side {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.brake-section {
    display: flex;
    gap: 0.4rem;
    justify-content: flex-start;
    align-items: center;
}

/* Dark mode support for grid layout */
[data-bs-theme="dark"] .inspection-grid-header {
    border-bottom-color: #495057;
}

[data-bs-theme="dark"] .inspection-grid-row {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

/* Brake Configuration Page - Coupling Icons */
.coupling-icon, [class*="coupling-icon-"] {
    transition: all 0.3s ease;
    color: #198754;
}

.fa-unlink {
    color: #6c757d;
}

.form-check-input:checked ~ .form-check-label .coupling-icon,
.form-check-input:checked ~ .form-check-label [class*="coupling-icon-"] {
    color: #198754;
}

.form-check-input:not(:checked) ~ .form-check-label .coupling-icon,
.form-check-input:not(:checked) ~ .form-check-label [class*="coupling-icon-"] {
    color: #6c757d;
}

/* VIN Character Boxes */
.vin-char-boxes {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0;
    justify-content: flex-start;
    padding: 6px;
    background-color: #fff;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.vin-box {
    flex: 0 0 auto;
    width: 38px;
    height: 52px;
    border-right: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    background-color: #fff;
    color: #212529;
    transition: all 0.2s ease;
    position: relative;
    box-sizing: border-box;
}

.vin-box:last-child {
    border-right: none;
}

/* Empty box shows position number */
.vin-box:empty::after {
    content: attr(data-position);
    font-size: 1.2rem;
    color: #adb5bd;
    font-weight: 400;
}

/* Filled box */
.vin-box.filled {
    background-color: #f8f9fa;
    color: #212529;
}

/* Position 10 (model year) - special highlight */
.vin-box-year {
    background-color: #fff8dd;
}

.vin-box-year.filled {
    background-color: #fff3cd;
}

/* Invalid character */
.vin-box.invalid {
    background-color: #f8d7da;
    color: #dc3545;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

/* Dark mode support for VIN boxes */
[data-bs-theme="dark"] .vin-char-boxes {
    background-color: #212529;
    border-color: #495057;
}

[data-bs-theme="dark"] .vin-box {
    background-color: #212529;
    border-right-color: #495057;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .vin-box:empty::after {
    color: #6c757d;
}

[data-bs-theme="dark"] .vin-box.filled {
    background-color: #2d3748;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .vin-box-year {
    background-color: #3d3a2f;
}

[data-bs-theme="dark"] .vin-box-year.filled {
    background-color: #4a4420;
}

[data-bs-theme="dark"] .vin-box.invalid {
    background-color: #5a1f25;
    color: #ea868f;
}

/* Responsive - smaller boxes and scrollable on mobile */
@media (max-width: 768px) {
    .vin-box {
        min-width: 35px;
        max-width: 40px;
        height: 50px;
        font-size: 1.2rem;
    }

    .vin-box:empty::after {
        font-size: 1.2rem;
    }

    .vin-char-boxes {
        padding: 8px;
        justify-content: flex-start;
    }
}

@media (max-width: 576px) {
    .vin-box {
        min-width: 30px;
        max-width: 35px;
        height: 45px;
        font-size: 1rem;
    }

    .vin-box:empty::after {
        font-size: 1rem;
    }
}

/* Axle configuration photo - dark mode support */
.axle-config-photo {
    border-radius: 4px;
}

/* In dark mode, add a subtle background and border to images */
[data-bs-theme="dark"] .axle-config-photo {
    background-color: #fff;
    padding: 4px;
    border: 1px solid #495057;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Truck photo card - dark mode support */
.truck-photo-card {
    transition: transform 0.2s;
}

.truck-photo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .truck-photo-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Photo upload placeholder - dark mode support */
.truck-photo-placeholder {
    border: 2px dashed #dee2e6;
}

[data-bs-theme="dark"] .truck-photo-placeholder {
    border-color: #495057;
}

.photo-upload-prompt {
    background: #f8f9fa;
    transition: background-color 0.2s;
}

.photo-upload-prompt:hover {
    background: #e9ecef;
}

[data-bs-theme="dark"] .photo-upload-prompt {
    background: #343a40;
}

[data-bs-theme="dark"] .photo-upload-prompt:hover {
    background: #495057;
}

/* ==========================================
   FLEET OVERVIEW PAGE STYLES
   ========================================== */

/* Fleet Overview Table Styling */
#trucks-fleet-table {
    border: none;
}

#trucks-fleet-table td:nth-child(1),
#trucks-fleet-table th:nth-child(1) {
    background-color: white;
    border: none;
}

[data-bs-theme="dark"] #trucks-fleet-table td:nth-child(1),
[data-bs-theme="dark"] #trucks-fleet-table th:nth-child(1) {
    background-color: var(--bs-dark);
}

#trucks-fleet-table td {
    padding-bottom: 0.25rem;
    padding-top: 0.25rem;
}

#trucks-fleet-table .no-border-th {
    border: none;
}

/* Fleet Overview Year/Make/Model Column */
.fleet-overview-year-make-model {
    font-size: 9px;
    color: darkgray;
}

[data-bs-theme="dark"] .fleet-overview-year-make-model {
    color: #adb5bd;
}

/* Info Section Column with Recent Indicators */
.info-section {
    min-width: 100px;
}

.col-no-padding {
    padding: 0 !important;
}

/* Recent Activity Indicators (colored circles) */
.recent-ohr-fleet-overview,
.recent-job-fleet-overview,
.recent-issue-fleet-overview {
    border-radius: 5px;
    display: block;
    width: 10px;
    height: 10px;
    margin: 2px auto;
}

.recent-ohr-fleet-overview {
    border: 2px solid yellowgreen;
    background: yellowgreen;
}

.recent-job-fleet-overview {
    border: 2px solid #007bff;
    background: #007bff;
}

.recent-issue-fleet-overview {
    border: 2px solid #8B0FCF;
    background: #8B0FCF;
}

/* PM Delta Color Coding */
#trucks-fleet-table td[data-delta-pm-days='noentry'] {
    background: lightgrey;
}

#trucks-fleet-table .pm-bundle [data-delta-pm-days='-1'],
#trucks-fleet-table .pm-bundle [data-delta-pm-mileage='-1'],
#trucks-fleet-table .pm-bundle [data-delta-pm-hours='-1'],
#trucks-fleet-table .pm-bundle [data-delta-pm-percentage='-1'] {
    background: red;
    border-radius: 10px;
}

#trucks-fleet-table .pm-bundle [data-delta-pm-days='0'],
#trucks-fleet-table .pm-bundle [data-delta-pm-mileage='0'],
#trucks-fleet-table .pm-bundle [data-delta-pm-hours='0'],
#trucks-fleet-table .pm-bundle [data-delta-pm-percentage='0'] {
    /* No background color for "good" status */
}

#trucks-fleet-table .pm-bundle [data-delta-pm-days='1'],
#trucks-fleet-table .pm-bundle [data-delta-pm-mileage='1'],
#trucks-fleet-table .pm-bundle [data-delta-pm-hours='1'],
#trucks-fleet-table .pm-bundle [data-delta-pm-percentage='1'] {
    background: lightsalmon;
    border-radius: 10px;
}

#trucks-fleet-table .pm-bundle [data-delta-pm-days='2'],
#trucks-fleet-table .pm-bundle [data-delta-pm-mileage='2'],
#trucks-fleet-table .pm-bundle [data-delta-pm-hours='2'],
#trucks-fleet-table .pm-bundle [data-delta-pm-percentage='2'] {
    background: orange;
    border-radius: 10px;
}

#trucks-fleet-table .pm-bundle [data-delta-pm-days='3'],
#trucks-fleet-table .pm-bundle [data-delta-pm-mileage='3'],
#trucks-fleet-table .pm-bundle [data-delta-pm-hours='3'],
#trucks-fleet-table .pm-bundle [data-delta-pm-percentage='3'] {
    /* Reserved for future use */
}

/* PM Bundle Styling */
#trucks-fleet-table .last-pm {
    min-width: 140px;
}

#trucks-fleet-table .pm-bundle-header {
    margin-top: 2px;
}

/* Weekly Inspection Color Coding */
#trucks-fleet-table .weekly-inspection[data-delta-days] {
    border-radius: 10px;
    padding: 4px;
}

/* Oval Section Legend Indicators */
.oval-section div div[data-ten-condition='noentry'] {
    background: lightgrey;
}

.oval-section div div[data-ten-condition='-2'] {
    background: red;
}

.oval-section div div[data-ten-condition='-1'] {
    background: grey;
    min-height: 13px;
}

.oval-section div div[data-ten-condition='0'] {
    background: lightgreen;
}

.oval-section div div[data-ten-condition='1'] {
    background: lightsalmon;
}

.oval-section div div[data-ten-condition='2'] {
    background: orange;
}

.oval-section div div[data-ten-condition='3'] {
    background: red;
}

/* Tire and Brake Condition Sections */
#trucks-fleet-table #tire-condition-section {
    min-width: 150px;
    vertical-align: middle;
}

#trucks-fleet-table #brake-condition-section {
    min-width: 100px;
    vertical-align: middle;
}

/* Fleet Overview - Tire Condition Display Component Overrides */
#trucks-fleet-table .tire-condition-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#trucks-fleet-table .tire-condition-grid {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: center;
}

#trucks-fleet-table .tire-axle-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

#trucks-fleet-table .tire-axle-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.125rem;
}

#trucks-fleet-table .tire-positions {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}

#trucks-fleet-table .tire-value {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

/* Tire Condition Color Classes for Fleet Overview */
#trucks-fleet-table .tire-condition-excellent {
    background: #d4edda !important;
    border-color: #c3e6cb !important;
    color: #155724 !important;
}

#trucks-fleet-table .tire-condition-good {
    background: #d1ecf1 !important;
    border-color: #bee5eb !important;
    color: #0c5460 !important;
}

#trucks-fleet-table .tire-condition-warning {
    background: #fff3cd !important;
    border-color: #ffeaa7 !important;
    color: #856404 !important;
}

#trucks-fleet-table .tire-condition-critical {
    background: #f8d7da !important;
    border-color: #f5c6cb !important;
    color: #721c24 !important;
}

#trucks-fleet-table .tire-condition-new {
    background: #e2e3e5 !important;
    border-color: #d6d8db !important;
    color: #383d41 !important;
}

#trucks-fleet-table .tire-condition-retread {
    background: #cfe2ff !important;
    border-color: #b6d4fe !important;
    color: #084298 !important;
}

#trucks-fleet-table .tire-condition-unknown {
    background: #f8f9fa !important;
    border-color: #dee2e6 !important;
    color: #6c757d !important;
}

#trucks-fleet-table .tire-axle-separator {
    width: 80%;
    height: 1px;
    background: #dee2e6;
    margin: 0.125rem 0;
}

#trucks-fleet-table .tire-condition-meta {
    font-size: 0.65rem;
    color: #6c757d;
    margin-top: 0.25rem;
    text-align: center;
    line-height: 1.2;
}

#trucks-fleet-table .tire-inspection-date {
    font-size: 0.65rem;
}

/* Brake Condition Display in Fleet Overview */
#trucks-fleet-table .brake-condition-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#trucks-fleet-table .brake-positions {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    justify-content: center;
}

#trucks-fleet-table .brake-value {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

/* Brake Condition Color Classes for Fleet Overview */
#trucks-fleet-table .brake-condition-excellent {
    background: #d4edda !important;
    border-color: #c3e6cb !important;
    color: #155724 !important;
}

#trucks-fleet-table .brake-condition-good {
    background: #d1ecf1 !important;
    border-color: #bee5eb !important;
    color: #0c5460 !important;
}

#trucks-fleet-table .brake-condition-warning {
    background: #fff3cd !important;
    border-color: #ffeaa7 !important;
    color: #856404 !important;
}

#trucks-fleet-table .brake-condition-critical {
    background: #f8d7da !important;
    border-color: #f5c6cb !important;
    color: #721c24 !important;
}

#trucks-fleet-table .brake-condition-unknown {
    background: #e2e3e5 !important;
    border-color: #d6d8db !important;
    color: #383d41 !important;
}

/* Legacy oval section styles for old tire/brake display */
#trucks-fleet-table #tire-condition-section div div,
#trucks-fleet-table #brake-condition-section div div {
    display: inline-block;
    border-radius: 10px;
    padding: 4px;
}

#tire-condition-header,
#brake-condition-header {
    font-size: 8pt;
}

/* Info Section Tire/Brake Condition Display */
#info-tire-condition div {
    display: inline-block;
}

#info-tire-condition div div,
#info-brake-condition div div {
    display: inline-block;
    border-radius: 10px;
    padding: 4px;
}

/* Fleet Overview Legend Styling */
.col-header {
    margin-top: 10px;
}

.row-header {
    margin-top: 10px;
}

.small-date {
    font-size: 14px;
    color: darkgray;
}

[data-bs-theme="dark"] .small-date {
    color: #adb5bd;
}

/* Dark Mode Support for Fleet Overview */
[data-bs-theme="dark"] #trucks-fleet-table td[data-delta-pm-days='noentry'] {
    background: #495057;
}

[data-bs-theme="dark"] #trucks-fleet-table .pm-bundle [data-delta-pm-days='-1'],
[data-bs-theme="dark"] #trucks-fleet-table .pm-bundle [data-delta-pm-mileage='-1'],
[data-bs-theme="dark"] #trucks-fleet-table .pm-bundle [data-delta-pm-hours='-1'],
[data-bs-theme="dark"] #trucks-fleet-table .pm-bundle [data-delta-pm-percentage='-1'] {
    background: #dc3545;
}

[data-bs-theme="dark"] #trucks-fleet-table .pm-bundle [data-delta-pm-days='1'],
[data-bs-theme="dark"] #trucks-fleet-table .pm-bundle [data-delta-pm-mileage='1'],
[data-bs-theme="dark"] #trucks-fleet-table .pm-bundle [data-delta-pm-hours='1'],
[data-bs-theme="dark"] #trucks-fleet-table .pm-bundle [data-delta-pm-percentage='1'] {
    background: #fd7e14;
}

[data-bs-theme="dark"] #trucks-fleet-table .pm-bundle [data-delta-pm-days='2'],
[data-bs-theme="dark"] #trucks-fleet-table .pm-bundle [data-delta-pm-mileage='2'],
[data-bs-theme="dark"] #trucks-fleet-table .pm-bundle [data-delta-pm-hours='2'],
[data-bs-theme="dark"] #trucks-fleet-table .pm-bundle [data-delta-pm-percentage='2'] {
    background: #ff8800;
}

[data-bs-theme="dark"] .oval-section div div[data-ten-condition='noentry'] {
    background: #495057;
}

[data-bs-theme="dark"] .oval-section div div[data-ten-condition='0'] {
    background: #198754;
}

[data-bs-theme="dark"] .oval-section div div[data-ten-condition='1'] {
    background: #fd7e14;
}

[data-bs-theme="dark"] .oval-section div div[data-ten-condition='2'] {
    background: #ff8800;
}

/* Dark Mode - Tire/Brake Display Component */
[data-bs-theme="dark"] #trucks-fleet-table .tire-axle-label,
[data-bs-theme="dark"] #trucks-fleet-table .tire-condition-meta {
    color: #adb5bd;
}

[data-bs-theme="dark"] #trucks-fleet-table .tire-value,
[data-bs-theme="dark"] #trucks-fleet-table .brake-value {
    border-color: #495057;
    background: #343a40;
    color: #f8f9fa;
}

[data-bs-theme="dark"] #trucks-fleet-table .tire-axle-separator {
    background: #495057;
}

/* Dark Mode - Tire Condition Classes Override */
[data-bs-theme="dark"] #trucks-fleet-table .tire-condition-excellent {
    background: #1e4620 !important;
    border-color: #2d6930 !important;
    color: #d4edda !important;
}

[data-bs-theme="dark"] #trucks-fleet-table .tire-condition-good {
    background: #0c5460 !important;
    border-color: #17a2b8 !important;
    color: #d1ecf1 !important;
}

[data-bs-theme="dark"] #trucks-fleet-table .tire-condition-warning {
    background: #856404 !important;
    border-color: #d39e00 !important;
    color: #fff3cd !important;
}

[data-bs-theme="dark"] #trucks-fleet-table .tire-condition-critical {
    background: #721c24 !important;
    border-color: #dc3545 !important;
    color: #f8d7da !important;
}

[data-bs-theme="dark"] #trucks-fleet-table .tire-condition-new {
    background: #383d41 !important;
    border-color: #495057 !important;
    color: #e2e3e5 !important;
}

[data-bs-theme="dark"] #trucks-fleet-table .tire-condition-retread {
    background: #084298 !important;
    border-color: #0d6efd !important;
    color: #cfe2ff !important;
}

[data-bs-theme="dark"] #trucks-fleet-table .tire-condition-unknown {
    background: #343a40 !important;
    border-color: #495057 !important;
    color: #adb5bd !important;
}

/* Dark Mode - Brake Condition Classes Override */
[data-bs-theme="dark"] #trucks-fleet-table .brake-condition-excellent {
    background: #1e4620 !important;
    border-color: #2d6930 !important;
    color: #d4edda !important;
}

[data-bs-theme="dark"] #trucks-fleet-table .brake-condition-good {
    background: #0c5460 !important;
    border-color: #17a2b8 !important;
    color: #d1ecf1 !important;
}

[data-bs-theme="dark"] #trucks-fleet-table .brake-condition-warning {
    background: #856404 !important;
    border-color: #d39e00 !important;
    color: #fff3cd !important;
}

[data-bs-theme="dark"] #trucks-fleet-table .brake-condition-critical {
    background: #721c24 !important;
    border-color: #dc3545 !important;
    color: #f8d7da !important;
}

[data-bs-theme="dark"] #trucks-fleet-table .brake-condition-unknown {
    background: #383d41 !important;
    border-color: #495057 !important;
    color: #e2e3e5 !important;
}

/* ==========================================
   TIRE CONDITION DISPLAY STYLES
   ========================================== */

/* Tire Condition Display Styles */
.tire-condition-display {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tire-condition-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tire-axle-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tire-axle-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c757d;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tire-positions {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  justify-content: center;
}

.tire-position {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.tire-value {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid #dee2e6;
  background: #f8f9fa;
  transition: all 0.2s ease;
}

.tire-label {
  font-size: 0.6rem;
  color: #6c757d;
  margin-top: 0.25rem;
  text-align: center;
  line-height: 1.2;
}

.tire-axle-separator {
  width: 100%;
  height: 1px;
  background: #dee2e6;
  margin: 0.25rem 0;
}

/* Size variations */
.tire-condition-small .tire-value {
  width: 24px;
  height: 24px;
  font-size: 0.7rem;
}

.tire-condition-normal .tire-value {
  width: 32px;
  height: 32px;
  font-size: 0.8rem;
}

.tire-condition-large .tire-value {
  width: 48px;
  height: 48px;
  font-size: 1rem;
}

/* Condition-based colors */
.tire-condition-excellent {
  background: #d4edda !important;
  border-color: #c3e6cb !important;
  color: #155724 !important;
}

.tire-condition-good {
  background: #d1ecf1 !important;
  border-color: #bee5eb !important;
  color: #0c5460 !important;
}

.tire-condition-warning {
  background: #fff3cd !important;
  border-color: #ffeaa7 !important;
  color: #856404 !important;
}

.tire-condition-critical {
  background: #f8d7da !important;
  border-color: #f5c6cb !important;
  color: #721c24 !important;
}

.tire-condition-new {
  background: #e2e3e5 !important;
  border-color: #d6d8db !important;
  color: #383d41 !important;
}

.tire-condition-retread {
  background: #cfe2ff !important;
  border-color: #b6d4fe !important;
  color: #084298 !important;
}

.tire-condition-unknown {
  background: #f8f9fa !important;
  border-color: #dee2e6 !important;
  color: #6c757d !important;
}

/* Meta information */
.tire-condition-meta {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: #6c757d;
}

.tire-inspector {
  margin-top: 0.125rem;
}

.legacy-data-indicator {
  color: #ff9800;
  font-weight: bold;
  margin-left: 0.25rem;
  cursor: help;
}

/* Empty state */
.tire-condition-empty {
  text-align: center;
  padding: 1rem;
  color: #6c757d;
}

.tire-empty-message {
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.tire-empty-action {
  margin-top: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .tire-condition-normal .tire-value {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  .tire-condition-large .tire-value {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }

  .tire-positions {
    gap: 0.125rem;
  }
}

/* Special layout for dually configurations */
.tire-axle-group[data-axle="Rear"] .tire-positions {
  flex-wrap: wrap;
  max-width: 200px;
}

.tire-axle-group[data-axle="Rear"] .tire-position.tire-driver {
  order: 1;
}

.tire-axle-group[data-axle="Rear"] .tire-position.tire-passenger {
  order: 2;
}

/* Hover effects */
.tire-value:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Print styles */
@media print {
  .tire-condition-display {
    break-inside: avoid;
  }

  .tire-value {
    border: 1px solid #000 !important;
    background: #fff !important;
    color: #000 !important;
  }
}

/* ==========================================
   BRAKE CONDITION DISPLAY STYLES
   ========================================== */

/* Brake Condition Display Styles */
.brake-condition-display {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.4;
}

.brake-condition-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.brake-axle-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.brake-axle-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #495057;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.brake-positions {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.brake-position {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
}

.brake-value {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid #dee2e6;
  background: #f8f9fa;
  transition: all 0.2s ease;
}

.brake-label {
  font-size: 0.6rem;
  color: #6c757d;
  margin-top: 0.25rem;
  text-align: center;
  line-height: 1.2;
}

.brake-axle-separator {
  width: 100%;
  height: 1px;
  background: #dee2e6;
  margin: 0.25rem 0;
}

/* Size variations */
.brake-condition-small .brake-value {
  width: 24px;
  height: 24px;
  font-size: 0.7rem;
}

.brake-condition-normal .brake-value {
  width: 32px;
  height: 32px;
  font-size: 0.8rem;
}

.brake-condition-large .brake-value {
  width: 48px;
  height: 48px;
  font-size: 1rem;
}

/* Condition-based colors */
.brake-condition-excellent {
  background: #d4edda !important;
  border-color: #c3e6cb !important;
  color: #155724 !important;
}

.brake-condition-good {
  background: #d1ecf1 !important;
  border-color: #bee5eb !important;
  color: #0c5460 !important;
}

.brake-condition-warning {
  background: #fff3cd !important;
  border-color: #ffeaa7 !important;
  color: #856404 !important;
}

.brake-condition-critical {
  background: #f8d7da !important;
  border-color: #f5c6cb !important;
  color: #721c24 !important;
}

.brake-condition-unknown {
  background: #e2e3e5 !important;
  border-color: #d6d8db !important;
  color: #383d41 !important;
}

/* Meta information */
.brake-condition-meta {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: #6c757d;
}

.brake-inspector {
  margin-top: 0.125rem;
}

/* Empty state */
.brake-condition-empty {
  text-align: center;
  padding: 1rem;
  color: #6c757d;
}

.brake-empty-message {
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.brake-empty-action {
  margin-top: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .brake-condition-normal .brake-value {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  .brake-condition-large .brake-value {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }

  .brake-positions {
    gap: 0.125rem;
  }
}

/* Hover effects */
.brake-value:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Print styles */
@media print {
  .brake-condition-display {
    break-inside: avoid;
  }

  .brake-value {
    border: 1px solid #000 !important;
    background: #fff !important;
    color: #000 !important;
  }
}

/* ==========================================
   CLEAN HARBOR PM FORM STYLES
   ========================================== */

/* Quick Actions Card - Dark mode support */
[data-bs-theme="dark"] .card.bg-light {
    background-color: #343a40 !important;
    border-color: #495057;
}

[data-bs-theme="dark"] .card.bg-light .card-header {
    background-color: #2d3748 !important;
    border-bottom-color: #495057;
    color: var(--bs-light);
}

[data-bs-theme="dark"] .card.bg-light .card-body {
    background-color: #343a40 !important;
    color: var(--bs-light);
}

/* Form section buttons - dark mode */
[data-bs-theme="dark"] .btn-outline-secondary {
    color: var(--bs-light);
    border-color: #6c757d;
}

[data-bs-theme="dark"] .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: var(--bs-light);
}

[data-bs-theme="dark"] .btn-outline-secondary:active,
[data-bs-theme="dark"] .btn-outline-secondary.active {
    background-color: #495057;
    border-color: #495057;
    color: var(--bs-light);
}

/* Form labels - dark mode */
[data-bs-theme="dark"] .form-label {
    color: var(--bs-light);
}

/* Section headings - dark mode */
[data-bs-theme="dark"] h3 {
    color: var(--bs-light);
}

/* Clean Harbor PM Form - Table headers dark mode */
[data-bs-theme="dark"] .table-secondary {
    --bs-table-bg: #495057;
    --bs-table-color: #f8f9fa;
    background-color: #495057 !important;
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .table-secondary th {
    background-color: #495057 !important;
    color: #f8f9fa !important;
    border-color: #6c757d !important;
}

/* ==========================================
   QUICK ACTION INDICATOR DOTS
   Visual indicators showing which questions are
   controlled by quick action buttons at the top
   ========================================== */

/* Indicator dot base styles */
.qa-indicator {
    display: inline-flex;
    gap: 3px;
    margin-left: 6px;
    vertical-align: middle;
}

.qa-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    vertical-align: middle;
}

/* DOT Inspection form - Air Compressor indicator */
.qa-dot-air { background-color: #17a2b8; }  /* Cyan - Air Compressor */

/* DOT Inspection form - Coupler indicators */
.qa-dot-coupler { background-color: #6c757d; }  /* Grey - No Coupler */
.qa-dot-hitch { background-color: #28a745; }    /* Green - Hitch/Pintle */
.qa-dot-eye { background-color: #fd7e14; }      /* Orange - Draw/Towbar Eye */
.qa-dot-fifth { background-color: #6f42c1; }    /* Purple - 5th Wheel */

/* Clean Harbor PM form - Transmission indicators */
.qa-dot-auto { background-color: #0d6efd; }     /* Blue - Automatic */
.qa-dot-manual { background-color: #fd7e14; }   /* Orange - Manual */

/* Clean Harbor PM form - Axle indicators */
.qa-dot-1axle { background-color: #6c757d; }    /* Grey - 1 Axle */
.qa-dot-2axle { background-color: #198754; }    /* Green - 2 Axles */
.qa-dot-3axle { background-color: #ffc107; }    /* Yellow - 3 Axles */
.qa-dot-4axle { background-color: #6f42c1; }    /* Purple - 4 Axles */

/* Clean Harbor PM form - 5th Wheel indicator */
.qa-dot-5thwheel { background-color: #20c997; } /* Teal - 5th Wheel */

/* Legend styles for quick action indicators */
.qa-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    margin-top: 10px;
}

.qa-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Dark mode support for legend */
[data-bs-theme="dark"] .qa-legend {
    background-color: #343a40;
}

/* ==========================================
   PURPLE BUTTON FOR DOT INSPECTION "REPAIRED"
   ========================================== */

/* Purple outline button - used for "Repaired" status in DOT inspections */
.btn-outline-purple {
    color: #6f42c1;
    border-color: #6f42c1;
    background-color: transparent;
}

.btn-outline-purple:hover {
    color: #fff;
    background-color: #6f42c1;
    border-color: #6f42c1;
}

.btn-outline-purple:focus,
.btn-outline-purple.focus {
    box-shadow: 0 0 0 0.25rem rgba(111, 66, 193, 0.5);
}

.btn-outline-purple:active,
.btn-outline-purple.active,
.btn-check:checked + .btn-outline-purple {
    color: #fff;
    background-color: #6f42c1;
    border-color: #6f42c1;
}

.btn-outline-purple:disabled,
.btn-outline-purple.disabled {
    color: #6f42c1;
    background-color: transparent;
}

/* Dark mode support for purple button */
[data-bs-theme="dark"] .btn-outline-purple {
    color: #a78bfa;
    border-color: #a78bfa;
}

[data-bs-theme="dark"] .btn-outline-purple:hover {
    color: #fff;
    background-color: #7c3aed;
    border-color: #7c3aed;
}

[data-bs-theme="dark"] .btn-check:checked + .btn-outline-purple {
    color: #fff;
    background-color: #7c3aed;
    border-color: #7c3aed;
}

/* ==========================================
   DOT INSPECTION FORM - DARK MODE
   Comprehensive dark mode for the DOT inspection
   form page. Bootstrap 5.1.3 does NOT natively
   support data-bs-theme="dark", so all overrides
   must be explicit with !important where needed.
   ========================================== */

/* --- 1. Page-level text: headings, labels, body --- */

/* Override Bootstrap body color for the DOT page in dark mode */
[data-bs-theme="dark"] .dot-inspection-page {
    --bs-body-color: #f8f9fa;
    --bs-body-color-rgb: 248, 249, 250;
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .dot-inspection-page > .row h1,
[data-bs-theme="dark"] .dot-inspection-page > .row h3,
[data-bs-theme="dark"] .dot-inspection-page > .row h5,
[data-bs-theme="dark"] .dot-inspection-page > .row div,
[data-bs-theme="dark"] .dot-inspection-page > .row span,
[data-bs-theme="dark"] .dot-inspection-page > .row small,
[data-bs-theme="dark"] .dot-inspection-page #dot-inspection-form,
[data-bs-theme="dark"] .dot-inspection-page #dot-inspection-form h3,
[data-bs-theme="dark"] .dot-inspection-page #dot-inspection-form h6,
[data-bs-theme="dark"] .dot-inspection-page #dot-inspection-form div,
[data-bs-theme="dark"] .dot-inspection-page #dot-inspection-form span,
[data-bs-theme="dark"] .dot-inspection-page #dot-inspection-form p,
[data-bs-theme="dark"] .dot-inspection-page #dot-inspection-form label,
[data-bs-theme="dark"] .dot-inspection-page #dot-inspection-form strong,
[data-bs-theme="dark"] .dot-inspection-page #dot-inspection-form small {
    color: #f8f9fa !important;
}

/* Form labels from questions.html snippet */
[data-bs-theme="dark"] #dot-inspection-form label,
[data-bs-theme="dark"] #dot-inspection-form .form-label,
[data-bs-theme="dark"] #dot-inspection-form .form-label.fw-semibold,
[data-bs-theme="dark"] #dot-inspection-form .form-control-label {
    color: #f8f9fa !important;
}

/* --- 2. "Link to Job/RO" card --- */

/* Card border */
[data-bs-theme="dark"] .card.border-info {
    border-color: #3d8b9e !important;
}

/* Card header: muted teal instead of bright cyan */
[data-bs-theme="dark"] .card.border-info .card-header.bg-info {
    background-color: #1a5c6e !important;
    border-bottom-color: #3d8b9e !important;
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .card.border-info .card-header.bg-info h6 {
    color: #f8f9fa !important;
}

/* Card body: dark background */
[data-bs-theme="dark"] .card.border-info .card-body {
    background-color: var(--mst-card-bg, #2b3035) !important;
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .card.border-info .card-body label {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .dot-inspection-page .card.border-info .card-body .form-text.text-muted {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .dot-inspection-page .card.border-info .card-body small.text-muted {
    color: #9ca3af !important;
}

/* --- 3. Quick Actions card (bg-light) --- */

/* Already handled by .card.bg-light rules above (lines ~1858) */
/* Re-enforce for the DOT form context */
[data-bs-theme="dark"] #dot-inspection-form ~ .card.bg-light,
[data-bs-theme="dark"] .card.bg-light {
    background-color: var(--mst-bg-secondary, #343a40) !important;
    border-color: var(--mst-border-color, #495057) !important;
}

[data-bs-theme="dark"] .card.bg-light .card-header {
    background-color: #2d3748 !important;
    border-bottom-color: var(--mst-border-color, #495057) !important;
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .card.bg-light .card-header h5 {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .card.bg-light .card-body {
    background-color: var(--mst-bg-secondary, #343a40) !important;
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .card.bg-light .card-body .form-label {
    color: #f8f9fa !important;
}

/* --- 4. Grey text helper --- */

[data-bs-theme="dark"] .grey-text,
[data-bs-theme="dark"] .gray-text {
    color: #adb5bd !important;
}

/* --- 5. Form inputs (date, number, text, select) --- */

/* Inside .pm-form context */
[data-bs-theme="dark"] .pm-form .form-control,
[data-bs-theme="dark"] .pm-form .form-select,
[data-bs-theme="dark"] .pm-form input[type="text"],
[data-bs-theme="dark"] .pm-form input[type="date"],
[data-bs-theme="dark"] .pm-form input[type="number"],
[data-bs-theme="dark"] .pm-form input[type="email"],
[data-bs-theme="dark"] .pm-form input[type="tel"],
[data-bs-theme="dark"] .pm-form textarea,
[data-bs-theme="dark"] .pm-form select {
    background-color: var(--mst-bg-secondary, #343a40) !important;
    color: #f8f9fa !important;
    border-color: var(--mst-border-color, #495057) !important;
}

[data-bs-theme="dark"] .pm-form .form-control:focus,
[data-bs-theme="dark"] .pm-form .form-select:focus,
[data-bs-theme="dark"] .pm-form input:focus,
[data-bs-theme="dark"] .pm-form textarea:focus,
[data-bs-theme="dark"] .pm-form select:focus {
    background-color: #3d4349 !important;
    color: #f8f9fa !important;
    border-color: #6c757d !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

/* Date and number input calendar/spinner icons - make visible in dark mode */
[data-bs-theme="dark"] .pm-form input[type="date"]::-webkit-calendar-picker-indicator,
[data-bs-theme="dark"] .pm-form input[type="number"]::-webkit-inner-spin-button {
    filter: invert(1);
}

/* Placeholder text */
[data-bs-theme="dark"] .pm-form .form-control::placeholder,
[data-bs-theme="dark"] .pm-form input::placeholder {
    color: #6c757d !important;
}

/* Text muted inside the form */
[data-bs-theme="dark"] .dot-inspection-page .pm-form .text-muted,
[data-bs-theme="dark"] .dot-inspection-page #dot-inspection-form .text-muted,
[data-bs-theme="dark"] .dot-inspection-page .text-muted {
    color: #9ca3af !important;
}

/* --- 6. "Pass" section buttons (btn-outline-success) --- */

[data-bs-theme="dark"] .btn-outline-success {
    color: #51cf66 !important;
    border-color: #51cf66 !important;
}

[data-bs-theme="dark"] .btn-outline-success:hover {
    color: #fff !important;
    background-color: #2b8a3e !important;
    border-color: #2b8a3e !important;
}

[data-bs-theme="dark"] .btn-outline-success:active,
[data-bs-theme="dark"] .btn-outline-success.active {
    color: #fff !important;
    background-color: #237032 !important;
    border-color: #237032 !important;
}

/* --- 7. Radio button group (OK / Defect / Repaired / N/A) --- */

/* The btn-check + label pattern from questions.html */
/* btn-outline-success (OK) */
[data-bs-theme="dark"] .btn-group .btn-check + .btn-outline-success {
    color: #51cf66 !important;
    border-color: #51cf66 !important;
}

[data-bs-theme="dark"] .btn-group .btn-check:checked + .btn-outline-success {
    color: #fff !important;
    background-color: #2b8a3e !important;
    border-color: #2b8a3e !important;
}

/* btn-outline-danger (Defect) */
[data-bs-theme="dark"] .btn-group .btn-check + .btn-outline-danger {
    color: #ff6b6b !important;
    border-color: #ff6b6b !important;
}

[data-bs-theme="dark"] .btn-group .btn-check:checked + .btn-outline-danger {
    color: #fff !important;
    background-color: #c92a2a !important;
    border-color: #c92a2a !important;
}

/* btn-outline-secondary (N/A) */
[data-bs-theme="dark"] .btn-group .btn-check + .btn-outline-secondary {
    color: #adb5bd !important;
    border-color: #6c757d !important;
}

[data-bs-theme="dark"] .btn-group .btn-check:checked + .btn-outline-secondary {
    color: #fff !important;
    background-color: #495057 !important;
    border-color: #495057 !important;
}

/* --- 8. Pill container (Inspector Name) --- */

[data-bs-theme="dark"] .pill {
    border-color: var(--mst-border-color, #495057) !important;
    background-color: var(--mst-bg-primary, #212529) !important;
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .pill label,
[data-bs-theme="dark"] .pill .form-control-label {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .pill .form-control,
[data-bs-theme="dark"] .pill input[type="text"] {
    background-color: var(--mst-bg-secondary, #343a40) !important;
    color: #f8f9fa !important;
    border-color: var(--mst-border-color, #495057) !important;
}

/* --- 9. Reset and Submit buttons --- */

[data-bs-theme="dark"] .btn-outline-danger {
    color: #ff6b6b !important;
    border-color: #ff6b6b !important;
}

[data-bs-theme="dark"] .btn-outline-danger:hover {
    color: #fff !important;
    background-color: #c92a2a !important;
    border-color: #c92a2a !important;
}

[data-bs-theme="dark"] .btn-primary {
    color: #fff !important;
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

[data-bs-theme="dark"] .btn-primary:hover {
    color: #fff !important;
    background-color: #0b5ed7 !important;
    border-color: #0a58ca !important;
}

[data-bs-theme="dark"] .btn-primary:disabled,
[data-bs-theme="dark"] .btn-primary.disabled {
    color: #fff !important;
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    opacity: 0.65;
}

/* btn-outline-primary (Pass All button) */
[data-bs-theme="dark"] .btn-outline-primary {
    color: #6ea8fe !important;
    border-color: #6ea8fe !important;
}

[data-bs-theme="dark"] .btn-outline-primary:hover {
    color: #fff !important;
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

/* --- 10. Horizontal rules --- */

[data-bs-theme="dark"] .container hr {
    border-color: var(--mst-border-color, #495057) !important;
    opacity: 0.5;
}

/* --- 11. Links inside the form area --- */

[data-bs-theme="dark"] .container a:not(.btn):not(.nav-link):not(.navbar-brand) {
    color: #6ea8fe;
}

[data-bs-theme="dark"] .container a:not(.btn):not(.nav-link):not(.navbar-brand):hover {
    color: #9ec5fe;
}

/* --- 12. Alert boxes (missing legal info warning) --- */

[data-bs-theme="dark"] .dot-inspection-page .alert-warning {
    background-color: #332701 !important;
    border-color: #664d03 !important;
    color: #ffda6a !important;
}

[data-bs-theme="dark"] .dot-inspection-page .alert-warning p,
[data-bs-theme="dark"] .dot-inspection-page .alert-warning li,
[data-bs-theme="dark"] .dot-inspection-page .alert-warning strong,
[data-bs-theme="dark"] .dot-inspection-page .alert-warning small,
[data-bs-theme="dark"] .dot-inspection-page .alert-warning span,
[data-bs-theme="dark"] .dot-inspection-page .alert-warning div {
    color: #ffda6a !important;
}

[data-bs-theme="dark"] .dot-inspection-page .alert-warning h5,
[data-bs-theme="dark"] .dot-inspection-page .alert-warning .alert-heading {
    color: #ffda6a !important;
}

[data-bs-theme="dark"] .dot-inspection-page .alert-warning .alert-link,
[data-bs-theme="dark"] .dot-inspection-page .alert-warning a {
    color: #ffcd39 !important;
}

/* --- 13. Form help text --- */

[data-bs-theme="dark"] .form-text {
    color: #9ca3af !important;
}

/* ── Fleet Overview dark mode ── */

/* Nav tabs */
[data-bs-theme="dark"] .nav-tabs .nav-link {
    color: var(--mst-text-secondary, #adb5bd);
}

[data-bs-theme="dark"] .nav-tabs .nav-link.active {
    background-color: var(--mst-card-bg, #2b3035);
    border-color: var(--mst-border-color, #495057);
    color: var(--mst-text-primary, #f8f9fa);
}

[data-bs-theme="dark"] .nav-tabs .nav-link:hover:not(.active) {
    border-color: var(--mst-border-color, #495057);
    color: var(--mst-text-primary, #f8f9fa);
}

/* Table header cells with tr-th-white-background class */
[data-bs-theme="dark"] .tr-th-white-background {
    background-color: var(--mst-bg-secondary, #343a40) !important;
    color: var(--mst-text-primary, #f8f9fa) !important;
}

/* Fleet location separator rows */
[data-bs-theme="dark"] .fleet-location-tr {
    background-color: var(--mst-bg-secondary, #343a40) !important;
}

[data-bs-theme="dark"] .fleet-location-td {
    background-color: var(--mst-bg-secondary, #343a40) !important;
}

[data-bs-theme="dark"] .fleet-location-td h1 {
    color: var(--mst-text-primary, #f8f9fa) !important;
}

/* Table links inside fleet overview */
[data-bs-theme="dark"] #trucks-fleet-table a:not(.btn) {
    color: #6ea8fe;
}

[data-bs-theme="dark"] #trucks-fleet-table a:not(.btn):hover {
    color: #9ec5fe;
}

/* Inactive trucks tab heading */
[data-bs-theme="dark"] #inactive-trucks-tab h1,
[data-bs-theme="dark"] #inactive-trucks-tab h3 {
    color: var(--mst-text-primary, #f8f9fa);
}

/* Equipment tab heading */
[data-bs-theme="dark"] #equipment-tab h3 {
    color: var(--mst-text-primary, #f8f9fa);
}

/* Account jobs tab - "New Account Job" link inside btn */
[data-bs-theme="dark"] #account-jobs-tab .btn-outline-primary a {
    color: inherit;
    text-decoration: none;
}

/* Horizontal rules in fleet overview */
[data-bs-theme="dark"] .container-fluid hr {
    border-color: var(--mst-border-color, #495057) !important;
    opacity: 0.5;
}

/* Fleet table — force all cell text light in dark mode */
[data-bs-theme="dark"] #trucks-fleet-table td,
[data-bs-theme="dark"] #trucks-fleet-table th,
[data-bs-theme="dark"] #trucks-fleet-table td div,
[data-bs-theme="dark"] #trucks-fleet-table th div,
[data-bs-theme="dark"] #trucks-fleet-table td span,
[data-bs-theme="dark"] #trucks-fleet-table th span {
    color: var(--mst-text-primary, #f8f9fa);
}

/* Keep OEM year/make/model muted */
[data-bs-theme="dark"] #trucks-fleet-table .fleet-overview-year-make-model {
    color: #adb5bd !important;
}

/* Tire/brake axle labels */
[data-bs-theme="dark"] #trucks-fleet-table .tire-axle-label,
[data-bs-theme="dark"] #trucks-fleet-table .tire-condition-meta,
[data-bs-theme="dark"] #trucks-fleet-table .tire-inspection-date {
    color: #adb5bd !important;
}

/* Tire/brake separators */
[data-bs-theme="dark"] .tire-axle-separator,
[data-bs-theme="dark"] .brake-axle-separator {
    background: var(--mst-border-color, #495057) !important;
}

/* PM delta no-entry */
[data-bs-theme="dark"] #trucks-fleet-table td[data-delta-pm-days='noentry'] {
    background: #495057 !important;
}

/* Table header column legend indicators — keep grey-text readable */
[data-bs-theme="dark"] #trucks-fleet-table .grey-text {
    color: #adb5bd !important;
}

/* Fleet overview table — dark mode table body */
[data-bs-theme="dark"] #trucks-fleet-table {
    --bs-table-bg: #212529;
    --bs-table-striped-bg: #2c3034;
    --bs-table-hover-bg: #323539;
    color: #f8f9fa;
}

[data-bs-theme="dark"] #trucks-fleet-table thead {
    border-bottom-color: #495057;
}

/* Nav tabs on fleet overview */
[data-bs-theme="dark"] .tabbable .nav-tabs {
    border-bottom-color: #495057;
}

[data-bs-theme="dark"] .tabbable .nav-tabs .nav-link {
    color: #adb5bd;
}

[data-bs-theme="dark"] .tabbable .nav-tabs .nav-link:hover {
    color: #f8f9fa;
    border-color: #495057 #495057 transparent;
}

[data-bs-theme="dark"] .tabbable .nav-tabs .nav-link.active {
    color: #f8f9fa;
    background-color: #212529;
    border-color: #495057 #495057 #212529;
}

[data-bs-theme="dark"] .tabbable .nav-tabs .nav-link h5 {
    color: inherit;
}

/* Pill container dark mode */
[data-bs-theme="dark"] .pill {
    background-color: #212529;
}

/* Caption text */
[data-bs-theme="dark"] #trucks-fleet-table caption {
    color: #adb5bd;
}

/* DOT column data-delta-days coloring in dark mode */
[data-bs-theme="dark"] #trucks-fleet-table td[data-delta-days='0'] {
    background-color: #dc3545 !important;
    color: #fff !important;
}

[data-bs-theme="dark"] #trucks-fleet-table td[data-delta-days='1'] {
    background-color: #fd7e14 !important;
    color: #fff !important;
}

[data-bs-theme="dark"] #trucks-fleet-table td[data-delta-days='2'] {
    background-color: #ff8800 !important;
    color: #fff !important;
}

/* Weekly inspection dark mode colors */
[data-bs-theme="dark"] #trucks-fleet-table .weekly-inspection[data-delta-days='0'] {
    background-color: #dc3545 !important;
    color: #fff !important;
}

[data-bs-theme="dark"] #trucks-fleet-table .weekly-inspection[data-delta-days='1'] {
    background-color: #fd7e14 !important;
    color: #fff !important;
}

[data-bs-theme="dark"] #trucks-fleet-table .weekly-inspection[data-delta-days='2'] {
    background-color: #ff8800 !important;
    color: #fff !important;
}

/* Inactive trucks tab dark mode */
[data-bs-theme="dark"] #inactive-trucks-tab .btn-outline-info {
    color: #6edff6;
    border-color: #6edff6;
}

[data-bs-theme="dark"] #inactive-trucks-tab .btn-outline-info a {
    color: inherit;
    text-decoration: none;
}

[data-bs-theme="dark"] #inactive-trucks-tab .btn-outline-info:hover {
    background-color: rgba(110, 223, 246, 0.1);
}

/* "Not Yet Provided" and disabled text */
[data-bs-theme="dark"] #trucks-fleet-table .disabled {
    color: #6c757d !important;
}

/* Oval section legend indicators dark mode */
[data-bs-theme="dark"] .oval-section div div[data-ten-condition='-1'] {
    background: #6c757d;
}

[data-bs-theme="dark"] .oval-section div div[data-ten-condition='3'] {
    background: #dc3545;
}

/* Tire/brake condition header abbreviations */
[data-bs-theme="dark"] #tire-condition-header,
[data-bs-theme="dark"] #brake-condition-header {
    color: #adb5bd;
}

/* ============================================================
   Truck-shaped tire layout (2026-05-19)
   Used by tire_truck_layout.html on the tire-job page (live recap)
   and the tire-job success page (static recap).
   ============================================================ */
.truck-layout {
    max-width: 360px;
    margin: 0.5rem auto;
    padding: 0.5rem;
    background-color: rgba(0, 0, 0, 0.04);
    border-radius: 0.75rem;
    border: 1px solid var(--bs-border-color);
    text-align: center;
}
[data-bs-theme="dark"] .truck-layout {
    background-color: rgba(255, 255, 255, 0.06);
}
.truck-layout-compact { max-width: 360px; padding: 0.35rem; }
.truck-layout-front, .truck-layout-rear {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
    margin: 0.15rem 0;
    letter-spacing: 0.03em;
}
.truck-axle { margin: 0.15rem 0; }
.truck-axle-name {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
    margin-bottom: 0.1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.truck-axle-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.15rem;
}
.truck-axle-side {
    display: flex;
    gap: 0.15rem;
}
.truck-body {
    width: 70px;
    height: 52px;
    background: repeating-linear-gradient(
        45deg,
        rgba(108, 117, 125, 0.25),
        rgba(108, 117, 125, 0.25) 5px,
        rgba(108, 117, 125, 0.08) 5px,
        rgba(108, 117, 125, 0.08) 10px
    );
    border-radius: 0.4rem;
    border: 1px solid var(--bs-border-color);
}
.truck-layout-compact .truck-body { width: 56px; height: 44px; }
[data-bs-theme="dark"] .truck-body {
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.18),
        rgba(255, 255, 255, 0.18) 5px,
        rgba(255, 255, 255, 0.05) 5px,
        rgba(255, 255, 255, 0.05) 10px
    );
}
.truck-wheel {
    width: 52px;
    height: 52px;
    border-radius: 0.75rem;
    border: 2px solid rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
/* Neutral fill only when no action is set (or when the wheel is empty). */
.truck-wheel:not([class*="truck-wheel-action-"]) {
    background-color: rgba(255, 255, 255, 0.85);
    color: #212529;
}
.truck-layout-compact .truck-wheel { width: 44px; height: 44px; border-radius: 0.7rem; }
[data-bs-theme="dark"] .truck-wheel.truck-wheel-empty,
[data-bs-theme="dark"] .truck-wheel:not([class*="truck-wheel-action-"]) {
    background-color: rgba(255, 255, 255, 0.12);
    color: #f8f9fa;
    border-color: rgba(255, 255, 255, 0.35);
}
.truck-wheel-empty { opacity: 0.5; }
.truck-wheel-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}
.truck-wheel-tread {
    font-size: 1.1rem;
    font-weight: 700;
    color: inherit;
}
.truck-layout-compact .truck-wheel-tread { font-size: 0.95rem; }
.truck-wheel-tread-unit {
    display: none; /* compact: omit "/32" to keep the cell short */
}
.truck-wheel-action {
    font-size: 1.1rem;
    font-weight: 800;
    color: inherit;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1;
}
.truck-layout-compact .truck-wheel-action { font-size: 0.95rem; }
/* Force the inner letter to a high-contrast color per action so it's visible
   against the filled wheel. */
.truck-wheel-action-new .truck-wheel-action { color: #fff !important; }
.truck-wheel-action-retread .truck-wheel-action { color: #052c4c !important; }
.truck-wheel-action-plug .truck-wheel-action { color: #533f03 !important; }
.truck-wheel-action-patch .truck-wheel-action { color: #fff !important; }
.truck-wheel-action-replace .truck-wheel-action { color: #fff !important; }
.truck-wheel-empty-mark { color: var(--bs-secondary-color); font-size: 0.9rem; }
.truck-wheel-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 0.6rem;
    padding: 0.12em 0.35em;
    line-height: 1;
    /* Override the per-action bg- color: invert the badge so it pops against
       the colored wheel fill. */
    background-color: #fff !important;
    color: #212529 !important;
    border: 1px solid rgba(0,0,0,0.15);
}
[data-bs-theme="dark"] .truck-wheel-badge {
    background-color: #212529 !important;
    color: #f8f9fa !important;
    border-color: rgba(255,255,255,0.2);
}
/* Per-action: fill the whole wheel with the action color.
   Force high-contrast text color on the inner so the tread number stays
   readable even when the wheel inherits the page's body text color. */
.truck-wheel-action-new {
    background-color: var(--bs-success);
    border-color: var(--bs-success);
}
.truck-wheel-action-new,
.truck-wheel-action-new .truck-wheel-tread,
.truck-wheel-action-new .truck-wheel-tread-unit { color: #fff; }

.truck-wheel-action-retread {
    background-color: var(--bs-info);
    border-color: var(--bs-info);
}
.truck-wheel-action-retread,
.truck-wheel-action-retread .truck-wheel-tread,
.truck-wheel-action-retread .truck-wheel-tread-unit { color: #052c4c; }

.truck-wheel-action-plug {
    background-color: var(--bs-warning);
    border-color: var(--bs-warning);
}
.truck-wheel-action-plug,
.truck-wheel-action-plug .truck-wheel-tread,
.truck-wheel-action-plug .truck-wheel-tread-unit { color: #533f03; }

.truck-wheel-action-patch {
    background-color: var(--bs-secondary);
    border-color: var(--bs-secondary);
}
.truck-wheel-action-patch,
.truck-wheel-action-patch .truck-wheel-tread,
.truck-wheel-action-patch .truck-wheel-tread-unit { color: #fff; }

.truck-wheel-action-replace {
    background-color: #6f42c1;
    border-color: #6f42c1;
}
.truck-wheel-action-replace,
.truck-wheel-action-replace .truck-wheel-tread,
.truck-wheel-action-replace .truck-wheel-tread-unit { color: #fff; }
/* Purple badge — Bootstrap doesn't ship bg-purple */
.truck-wheel .badge.bg-purple { background-color: #6f42c1; color: #fff; }
