.test-vehicle-list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: center;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
}

.test-vehicle-list-row:last-child {
    border-bottom: 0;
}

.test-vehicle-list-row strong,
.test-vehicle-list-row small {
    display: block;
}

.test-vehicle-list-row strong {
    font-size: 0.86rem;
}

.test-vehicle-list-row small {
    margin-top: 0.2rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.test-vehicle-options-summary {
    margin-top: 1rem;
}

.test-vehicle-row-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.test-vehicle-row-actions .btn {
    min-height: 36px;
}

[data-vehicle-pdf-row] .btn { min-height: 44px; }
[data-vehicle-pdf-row] small { overflow-wrap: anywhere; }

.test-vehicle-client-snooze {
    display: inline-flex;
    max-width: 100%;
}

.test-vehicle-client-snooze > .btn {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #92400e;
    font-weight: 800;
}

.test-vehicle-client-snooze.is-open {
    flex: 1 0 100%;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.test-vehicle-client-snooze-panel {
    display: grid;
    flex: 1 0 100%;
    grid-template-columns: 1fr;
    gap: 0.55rem;
    width: min(100%, 25rem);
    padding: 0.7rem;
    border: 1px solid #fcd34d;
    border-radius: 0.75rem;
    background: #fffbeb;
}

.test-vehicle-client-snooze-panel[hidden] {
    display: none;
}

.test-vehicle-client-snooze-panel > strong {
    color: #92400e;
}

.test-vehicle-client-snooze-presets,
.test-vehicle-client-snooze-date-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.test-vehicle-client-snooze-date {
    display: grid;
    gap: 0.3rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
}

.test-vehicle-client-snooze-date .form-input {
    width: 100%;
    min-height: 44px;
}

.test-vehicle-client-row {
    position: relative;
    cursor: pointer;
    transition: background 120ms ease, box-shadow 120ms ease;
}

.test-vehicle-client-row.is-alert-orange {
    background: #fffbeb;
    box-shadow: inset 3px 0 #f59e0b;
}

.test-vehicle-client-row.is-alert-red {
    background: #fef2f2;
    box-shadow: inset 3px 0 #ef4444;
}

.test-vehicle-client-open {
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.test-vehicle-client-title,
.test-vehicle-client-badges {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.test-vehicle-client-title strong {
    min-width: 0;
}

.test-vehicle-client-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
}

.test-vehicle-client-badge.is-option {
    background: #dbeafe;
    color: #1d4ed8;
}

.test-vehicle-client-open::after {
    content: '';
    position: absolute;
    inset: 0;
}

.test-vehicle-client-row .test-vehicle-row-actions {
    position: relative;
    z-index: 1;
}

.test-vehicle-client-open:hover strong,
.test-vehicle-client-open:focus-visible strong {
    color: var(--primary);
}

.test-vehicle-client-open:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
    border-radius: 0.25rem;
}

.test-vehicle-list-row .test-vehicle-client-alert {
    width: fit-content;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: #fef3c7;
    color: #b45309;
    font-weight: 700;
}

.test-vehicle-client-row.is-alert-red .test-vehicle-client-alert {
    background: #fee2e2;
    color: #b91c1c;
}

.test-vehicle-list-row .test-vehicle-client-alert.is-planned {
    background: #e0f2fe;
    color: #0369a1;
}

.test-vehicle-list-row .test-vehicle-client-alert.is-closed {
    background: #e2e8f0;
    color: #475569;
}

.test-vehicle-empty {
    padding: 2rem 1rem;
    color: var(--text-secondary);
    text-align: center;
}

.test-vehicle-rental-info {
    margin-top: 1rem;
}

.test-vehicle-price-row + .test-vehicle-price-row {
    border-top: 1px solid var(--border);
}

.test-vehicle-price-row.is-secondary strong {
    color: var(--text);
    font-size: 1rem;
}

.test-vehicle-search-matches {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
}

.test-vehicle-search-matches span {
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 650;
}

.test-vehicle-advanced {
    margin-top: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.8rem;
    background: var(--surface);
}

.test-vehicle-advanced summary {
    padding: 0.8rem 1rem;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.test-vehicle-span-all {
    grid-column: 1 / -1;
}

.test-vehicle-action-dock {
    position: sticky;
    bottom: 0;
    z-index: 85;
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    margin: auto -1.25rem -2rem;
    padding: 0.72rem 1rem calc(0.72rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.test-vehicle-action-dock .vehicle-detail-actions-buttons {
    display: flex;
    flex: 1 1 auto;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    gap: 0.4rem;
    min-width: 0;
}

.test-vehicle-action-dock .vehicle-actions-row {
    display: contents;
}

.test-vehicle-action-dock .vehicle-detail-actions-buttons > .btn,
.test-vehicle-action-dock .vehicle-actions-row > .btn,
.test-vehicle-action-dock .vehicle-actions-row > .vehicle-actions-more {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
}

.test-vehicle-action-dock .vehicle-detail-actions-buttons > .btn,
.test-vehicle-action-dock .vehicle-actions-row > .btn,
.test-vehicle-action-dock .vehicle-actions-row > .vehicle-actions-more > summary {
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding-inline: 0.4rem;
    font-size: 0.74rem;
    text-align: center;
}

body.pwa-standalone .test-vehicle-dossier {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}

body.pwa-standalone .test-vehicle-action-dock {
    --test-vehicle-actions-bottom: max(env(safe-area-inset-bottom, 0px), 0.75rem);
    --test-vehicle-actions-toggle-height: 44px;
    position: fixed;
    right: 0.75rem;
    bottom: calc(var(--test-vehicle-actions-bottom) + 0.75rem);
    left: auto;
    z-index: 95;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.pwa-standalone .test-vehicle-action-dock .vehicle-detail-actions-toggle {
    display: inline-flex;
    min-height: var(--test-vehicle-actions-toggle-height);
    padding: 0.45rem 0.8rem;
    border-color: rgba(16, 185, 129, 0.55);
    background: rgba(16, 185, 129, 0.2);
    color: #047857;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(10px) saturate(1.25);
    -webkit-backdrop-filter: blur(10px) saturate(1.25);
}

body.pwa-standalone .test-vehicle-action-dock.is-open .vehicle-detail-actions-toggle {
    border-color: var(--success);
    background: var(--success);
    color: #fff;
}

body.pwa-standalone .test-vehicle-action-dock .vehicle-detail-actions-buttons {
    display: none;
    position: fixed;
    right: 0.75rem;
    bottom: calc(var(--test-vehicle-actions-bottom) + var(--test-vehicle-actions-toggle-height) + 0.5rem);
    left: 0.75rem;
    max-height: min(52vh, 420px);
    overflow-y: auto;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.45rem;
    padding: 0.55rem;
    border: 1px solid var(--border);
    border-radius: 0.7rem;
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.2);
}

body.pwa-standalone .test-vehicle-action-dock.is-open .vehicle-detail-actions-buttons {
    display: grid;
}

body.pwa-standalone .test-vehicle-action-dock .vehicle-actions-row {
    display: grid;
}

body.pwa-standalone .test-vehicle-action-dock .vehicle-detail-actions-buttons > .btn,
body.pwa-standalone .test-vehicle-action-dock .vehicle-actions-row > .btn,
body.pwa-standalone .test-vehicle-action-dock .vehicle-actions-row > .vehicle-actions-more,
body.pwa-standalone .test-vehicle-action-dock .vehicle-actions-row > .vehicle-actions-more > summary {
    width: 100%;
    min-height: 44px;
}

body.pwa-standalone .test-vehicle-action-dock .vehicle-detail-actions-buttons > .btn {
    grid-column: 1 / -1;
}

@media (max-width: 980px) {
    #view-vehicles.test-workspace-open .test-vehicle-workspace {
        display: block;
        min-height: calc(100dvh - 8rem);
        border-radius: 0;
        border-inline: 0;
    }

    body.test-workspace-ui #view-vehicles.test-workspace-open {
        padding: 0;
    }

    .test-vehicle-rail {
        display: none;
    }

    .test-vehicle-dossier {
        padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
    }

}

@media (max-width: 720px) {
    body.test-workspace-ui .test-version-bar {
        top: var(--test-workspace-navbar-bottom);
        justify-content: space-between;
        font-size: 0.72rem;
    }

    body.test-workspace-ui .test-version-bar span {
        display: none;
    }

    .test-vehicle-dossier {
        padding: 0.8rem 0.8rem calc(5.5rem + env(safe-area-inset-bottom, 0px));
    }

    .test-vehicle-action-dock {
        margin-inline: -0.8rem;
    }

    body:not(.pwa-standalone) .test-vehicle-action-dock .vehicle-detail-actions-buttons {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body:not(.pwa-standalone) .test-vehicle-action-dock .vehicle-detail-actions-buttons > .btn {
        grid-column: 1 / -1;
    }

    body.test-workspace-ui:not(.pwa-standalone) .test-vehicle-action-dock :is(.btn, summary) {
        min-height: 44px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .test-vehicle-breadcrumb span {
        display: none;
    }

    .test-vehicle-hero {
        display: block;
    }

    .test-vehicle-next-step {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .test-vehicle-next-step strong {
        width: calc(100% - 1.5rem);
    }

    .test-vehicle-tabs {
        margin-inline: -0.8rem;
        padding-inline: 0.8rem;
    }

    .test-vehicle-summary-grid,
    .test-vehicle-section-grid {
        grid-template-columns: 1fr;
    }

    .test-vehicle-main-photo,
    .test-vehicle-photo-stage {
        min-height: 210px;
        height: 210px;
        aspect-ratio: auto;
    }

    .test-vehicle-list-row {
        grid-template-columns: 1fr;
    }

    .test-vehicle-row-actions {
        justify-content: flex-start;
    }

    .test-vehicle-client-snooze > .btn,
    .test-vehicle-client-snooze-panel .btn {
        min-height: 44px;
    }

    .test-vehicle-search-matches {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 420px) {
    .test-vehicle-title-line h1 {
        font-size: 1.35rem;
    }

    .test-vehicle-tab {
        padding-inline: 0.65rem;
    }

    .test-vehicle-kv > div {
        grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
    }
}

@media (min-width: 1501px) {
    html.layout-fluid .test-vehicle-summary-grid {
        grid-template-columns: minmax(0, 520px) minmax(290px, 1fr);
    }
}
