h1:focus {
    outline: none;
}

:root {
    color-scheme: light;
    font-family: Inter, "Segoe UI", sans-serif;
    color: #172033;
    background: #f4f6f9;
    --imas-navy: #002F73;
    --imas-navy-dark: #001B47;
    --imas-blue: #038CCD;
    --imas-blue-tint: #E3F3FC;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at top right, rgba(3, 140, 205, 0.12), transparent 28rem),
        #f4f6f9;
}

a {
    color: inherit;
}

.page-shell {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 4rem 0;
}

.hero-panel,
.table-panel,
.state-panel {
    border: 1px solid #dfe5ec;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1rem 3rem rgba(23, 32, 51, 0.08);
}

.hero-panel {
    max-width: 780px;
    padding: clamp(2rem, 6vw, 5rem);
}

.section-divider {
    border: none;
    border-top: 1px solid #dfe5ec;
    margin: 3rem 0 2rem;
}

.hero-panel-compact {
    padding: 1.25rem clamp(1.25rem, 4vw, 2rem);
}

.hero-panel-compact .hero-actions {
    margin-top: 0;
}

.eyebrow {
    margin: 0 0 0.75rem;
    color: var(--imas-blue);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 1rem;
    color: #111827;
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    line-height: 1;
    letter-spacing: -0.045em;
}

h2 {
    color: #172033;
}

.page-lead {
    max-width: 680px;
    margin-bottom: 0;
    color: #5b6473;
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.hero-actions-end {
    justify-content: flex-end;
}

.hero-actions-center {
    justify-content: center;
    margin-bottom: 2rem;
}

.header-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.primary-action {
    display: inline-flex;
    min-height: 2.9rem;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.15rem;
    border: none;
    border-radius: 0.75rem;
    color: #fff;
    background: var(--imas-navy);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 160ms ease, transform 160ms ease;
}

.primary-action:hover {
    background: var(--imas-navy-dark);
    transform: translateY(-1px);
}

.version-label {
    color: #6b7280;
    font-size: 0.9rem;
}

.page-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.header-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.header-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    flex-shrink: 0;
}

.back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 2.25rem;
    padding: 0.8rem 1.6rem;
    border: 2px solid var(--imas-navy);
    border-radius: 0.88rem;
    color: var(--imas-navy);
    font-weight: 700;
    font-size: 1.48rem;
    text-decoration: none;
}

.back-link:hover,
.back-link:active {
    background: var(--imas-navy);
    color: #fff;
}

.row-action-link {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border: 1.5px solid var(--imas-navy);
    border-radius: 0.6rem;
    color: var(--imas-navy);
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.row-action-link:hover,
.row-action-link:active {
    background: var(--imas-navy);
    color: #fff;
}

.tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #dfe5ec;
}

.tab-nav-item {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #5b6473;
    font-weight: 650;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.tab-nav-item:hover {
    color: var(--imas-blue);
}

.tab-nav-item-active {
    color: var(--imas-navy);
    border-bottom-color: var(--imas-navy);
}

.tab-nav-item-disabled,
.tab-nav-item-disabled:hover {
    color: #b6bdc9;
    cursor: not-allowed;
}

.count-pill {
    flex: 0 0 auto;
    padding: 0.65rem 0.95rem;
    border-radius: 999px;
    color: var(--imas-navy);
    background: var(--imas-blue-tint);
    font-weight: 750;
}

.state-panel {
    padding: 2rem;
    color: #5b6473;
}

.state-panel > :last-child {
    margin-bottom: 0;
}

.state-panel-error {
    border-color: #f3c7c7;
    color: #842029;
    background: #fff5f5;
}

.table-panel {
    overflow: hidden;
}

.hero-actions + .table-panel {
    margin-top: 1.5rem;
}

.vehicles-table {
    width: 100%;
    border-collapse: collapse;
}

.vehicles-table th,
.vehicles-table td {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid #e8ecf1;
    text-align: left;
    vertical-align: middle;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.file-link-name {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

.vehicles-table th {
    color: #6b7280;
    background: #f8fafc;
    font-size: 0.75rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.vehicles-table tbody tr:last-child td {
    border-bottom: 0;
}

.vehicles-table tbody tr:hover {
    background: #fbfcfd;
}

.license-plate {
    display: inline-flex;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    gap: 0.15em;
    height: 2.4rem;
    aspect-ratio: 1588 / 356;
    padding: 0 12%;
    background-image: url(/images/TARGA.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    font-family: Consolas, monospace;
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: 0.04em;
    color: #111827;
}

.vehicle-model {
    display: block;
    margin-top: 0.2rem;
    color: #6b7280;
}

.vehicle-name {
    display: block;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 750;
    white-space: nowrap;
}

.status-badge-lg {
    padding: 0.5rem 1rem;
    font-size: 1.15rem;
}

.status-available {
    color: #12633d;
    background: #dcf5e7;
}

.status-reserved,
.status-maintenance {
    color: #75520a;
    background: #fff1c7;
}

.status-in-use {
    color: #15508a;
    background: #dceeff;
}

.status-out-of-service,
.status-decommissioned,
.status-unknown {
    color: #5f6672;
    background: #e9edf2;
}

.status-assigned {
    color: #4c3d99;
    background: #ece7fb;
}

.assignment-empty {
    color: #9aa1ac;
}

.status-open,
.status-awaiting-parts {
    color: #75520a;
    background: #fff1c7;
}

.status-planned,
.status-in-progress {
    color: #15508a;
    background: #dceeff;
}

.status-completed {
    color: #12633d;
    background: #dcf5e7;
}

.status-invoiced {
    color: #0f6b66;
    background: #d9f5f2;
}

.status-cancelled {
    color: #5f6672;
    background: #e9edf2;
}

@media (max-width: 700px) {
    .page-shell {
        width: min(100% - 1.25rem, 1120px);
        padding: 2rem 0;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 1.25rem;
    }

    .header-photo {
        align-self: stretch;
        justify-content: flex-start;
    }

    .vehicle-photo-header {
        width: 12rem;
        height: 8rem;
    }

    .vehicle-photo-header svg {
        width: 5.5rem;
    }

    .back-link {
        margin-bottom: 1.5rem;
    }

    .table-panel {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    /* Un .table-panel dentro un .hero-panel eredita il padding laterale
       del pannello (2rem), che assottiglia troppo la colonna valore delle
       card mobili e fa uscire dallo schermo contenuti a larghezza fissa
       come la targa. Annulla quel padding solo per la tabella. */
    .hero-panel > .table-panel {
        margin: 0 -2rem;
        width: calc(100% + 4rem);
    }

    .vehicles-table,
    .vehicles-table tbody,
    .vehicles-table tr,
    .vehicles-table td {
        display: block;
        width: 100%;
    }

    .vehicles-table thead {
        display: none;
    }

    .vehicles-table tr {
        margin-bottom: 0.8rem;
        padding: 0.55rem 1rem;
        border: 1px solid #dfe5ec;
        border-radius: 1rem;
        background: #fff;
        box-shadow: 0 0.5rem 1.5rem rgba(23, 32, 51, 0.06);
    }

    .vehicles-table td {
        display: grid;
        grid-template-columns: minmax(7.5rem, 40%) 1fr;
        align-items: center;
        gap: 1rem;
        padding: 0.7rem 0;
        border-bottom: 1px solid #edf0f4;
        text-align: right;
        overflow-wrap: anywhere;
    }

    .vehicles-table td.table-cell-stack {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 0.3rem;
        text-align: left;
    }

    .vehicles-table td:last-child {
        border-bottom: 0;
    }

    .vehicles-table td::before {
        content: attr(data-label);
        color: #6b7280;
        font-size: 0.72rem;
        font-weight: 750;
        letter-spacing: 0.07em;
        text-align: left;
        text-transform: uppercase;
    }

    .vehicle-name {
        text-align: right;
    }

    .license-plate {
        justify-self: end;
    }
}

/* Sotto ~360px la targa (larghezza fissa, vincolata da aspect-ratio) non
   entra piÃ¹ nella colonna valore delle card mobili, anche dopo il fix
   sopra: nessun testo va tagliato, si riduce solo il badge stesso. */
@media (max-width: 360px) {
    .license-plate {
        height: 2rem;
        font-size: 1.35rem;
    }
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.deadline-value-urgent {
    color: #e50000;
    font-weight: 700;
}

.deadline-overdue-icon {
    display: inline-block;
    margin-right: 0.35rem;
    animation: deadline-pulse 1.4s ease-in-out infinite;
}

@keyframes deadline-pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.deadline-compact-list {
    display: flex;
    flex-direction: column;
}

.deadline-compact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #e5e9f0;
}

.deadline-compact-row:last-child {
    border-bottom: none;
}

.coverage-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.05rem;
}

.coverage-option input[type="checkbox"] {
    width: 1.35rem;
    height: 1.35rem;
    accent-color: var(--imas-blue);
    flex-shrink: 0;
}

.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;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 420px;
    margin-top: 1.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.form-field label {
    color: #172033;
    font-weight: 650;
    font-size: 0.9rem;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.6rem;
    background: #fff;
    color: inherit;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
}

.form-field textarea {
    resize: vertical;
    min-height: 2.75rem;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: 2px solid var(--imas-blue);
    outline-offset: 1px;
}

.form-field-span-full {
    grid-column: 1 / -1;
}

.form-field .read-only-field {
    width: 100%;
    margin: 0;
    padding: 0.7rem 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.6rem;
    background: #f1f5f9;
    color: #475569;
    font-size: 1rem;
    box-sizing: border-box;
    overflow-wrap: break-word;
}

.autocomplete-wrapper {
    position: relative;
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 20;
    margin: 0.25rem 0 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 0.6rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 260px;
    overflow-y: auto;
}

.autocomplete-result-item {
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
}

.autocomplete-result-item:last-child {
    border-bottom: none;
}

.autocomplete-result-item:hover {
    background: var(--imas-blue-tint);
}

.autocomplete-result-empty {
    cursor: default;
    color: #64748b;
}

.autocomplete-result-empty:hover {
    background: none;
}

.autocomplete-linked-note {
    margin: 0;
    font-size: 0.8rem;
    color: #12633d;
}

.hero-panel-wide {
    max-width: 960px;
}

.home-greeting h1 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.home-greeting .eyebrow {
    font-size: 1.1rem;
}

.hero-panel-full {
    max-width: none;
}

.hero-panel-full .page-lead {
    max-width: none;
}

.page-shell.page-shell-wide {
    width: min(1600px, calc(100% - 2rem));
}

.form-section-title {
    margin: 2rem 0 1rem;
    color: #172033;
    font-size: 1.1rem;
}

.form-section-title:first-of-type {
    margin-top: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.page-shell-wide .form-grid {
    grid-template-columns: repeat(6, 1fr);
}

@media (max-width: 1200px) {
    .page-shell-wide .form-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 700px) {
    .page-shell-wide .form-grid {
        grid-template-columns: 1fr;
    }
}

.page-shell-wide.supplier-detail-page .form-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-error {
    padding: 0.85rem 1rem;
    border: 1px solid #f3c7c7;
    border-radius: 0.75rem;
    color: #842029;
    background: #fff5f5;
}

.submit-action {
    display: inline-flex;
    min-height: 2.9rem;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.15rem;
    border: none;
    border-radius: 0.75rem;
    color: #fff;
    background: var(--imas-navy);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 160ms ease, transform 160ms ease;
}

.submit-action:hover:not(:disabled) {
    background: var(--imas-navy-dark);
    transform: translateY(-1px);
}

.submit-action:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.role-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.4rem;
}

.role-option {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.6rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

.action-success {
    padding: 0.85rem 1rem;
    border: 1px solid #bfe6c9;
    border-radius: 0.75rem;
    color: #12633d;
    background: #eafaf0;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
    margin: 1.5rem 0;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.vehicle-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.vehicle-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 9rem;
    border: 1px solid #dfe5ec;
    border-radius: 1rem;
    background: #f1f5f9;
    color: #94a3b8;
}

.vehicle-photo-placeholder svg {
    width: 5.5rem;
    height: auto;
}

img.vehicle-photo-placeholder {
    object-fit: cover;
}

.vehicle-photo-header {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 18rem;
    height: 12rem;
    border: 1px solid #dfe5ec;
    border-radius: 1rem;
    background: #f1f5f9;
    color: #94a3b8;
}

.vehicle-photo-header svg {
    width: 8rem;
    height: auto;
}

img.vehicle-photo-header {
    object-fit: cover;
}

.vehicle-photo-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}

.vehicle-photo-upload-caption {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--imas-blue);
}

.visually-hidden-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.vehicle-picker {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.vehicle-picker-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 4px solid #dfe5ec;
    border-radius: 1rem;
    background: #fff;
    cursor: pointer;
    text-align: left;
}

.vehicle-picker-card-selected {
    border-color: var(--imas-blue);
}

/* Il pallino resta nel DOM per semantica/accessibilitÃ  del radio group
   (l'intera card lo attiva tramite <label>), ma la selezione si vede
   solo dal bordo sopra: un indicatore a dimensione fissa in un angolo
   non si scalava bene con lo schermo. */
.vehicle-picker-radio {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
}

.vehicle-picker-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 4.5rem;
    height: 3.5rem;
    border: 1px solid #dfe5ec;
    border-radius: 0.75rem;
    background: #f1f5f9;
    color: #94a3b8;
}

.vehicle-picker-photo svg {
    width: 2.6rem;
    height: auto;
}

.vehicle-picker-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding-right: 1.5rem;
}

.vehicle-picker-name {
    color: #172033;
}

.vehicle-card-body .eyebrow {
    margin-bottom: 0.35rem;
}

.period-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.period-pill {
    display: inline-flex;
    align-items: center;
    border: none;
    border-radius: 999px;
    padding: 0.4rem 1rem;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    color: #5b6473;
    background: #f0f2f5;
    cursor: pointer;
}

.period-pill-active {
    color: #fff;
    background: var(--imas-navy);
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.kpi-grid-4col {
    grid-template-columns: repeat(4, 1fr);
}

.kpi-grid-5col {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 720px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.kpi-tile {
    border-radius: 0.85rem;
    padding: 1rem 1.1rem;
    background: #f8fafc;
}

.kpi-tile-accent {
    background: var(--imas-blue-tint);
}

.kpi-tile-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #172033;
    white-space: nowrap;
}

.kpi-tile-accent .kpi-tile-value {
    color: var(--imas-navy);
}

.kpi-tile-label {
    margin-top: 0.3rem;
    font-size: 0.72rem;
    color: #6b7280;
}

.kpi-grid-5col .kpi-tile-value {
    font-size: 1.05rem;
}

.kpi-tile-fuel {
    background: var(--imas-blue-tint);
}

.kpi-tile-fuel .kpi-tile-value {
    color: var(--imas-navy);
}

.kpi-tile-maintenance {
    background: #dcf5e7;
}

.kpi-tile-maintenance .kpi-tile-value {
    color: #12633d;
}

.kpi-tile-lifetime {
    background: linear-gradient(135deg, #f1f3f6, #e2e6ec);
}

.kpi-group-label {
    margin-bottom: 0.4rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.kpi-group-divider {
    border: none;
    border-top: 1px solid #eef1f5;
    margin: 1.5rem 0 0.75rem;
}

.kpi-static-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    border-top: 1px solid #eef1f5;
    padding-top: 1.25rem;
    margin-top: 1.5rem;
}

.kpi-static-group {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding-right: 2rem;
    border-right: 1px solid #eef1f5;
}

.kpi-static-item-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #172033;
    white-space: nowrap;
}

.kpi-static-item-label {
    font-size: 0.72rem;
    color: #6b7280;
}

.kpi-distribution {
    flex: 1;
    min-width: 260px;
}

.kpi-distribution-bar {
    display: flex;
    height: 0.65rem;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.kpi-distribution-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.72rem;
    color: #5b6473;
}

.kpi-footnote {
    margin-top: 1.25rem;
    font-size: 0.68rem;
    color: #9aa1ac;
}

.mileage-value {
    color: #172033;
    font-size: 1.35rem;
    font-weight: 700;
    white-space: nowrap;
}

.booking-range {
    color: #172033;
    font-size: 1.05rem;
    font-weight: 700;
}
