.vehicle-page {
    display: grid;
    gap: 18px;
}

.vehicle-document-filter-panel {
    padding: 12px;
}

.vehicle-document-category-filter {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-left: auto;
}

.vehicle-document-category-filter label {
    color: var(--ui-text-muted);
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.vehicle-document-category-filter .ui-filter-input {
    width: min(260px, 40vw);
}

.ui-table-subtitle {
    display: block;
    margin-top: 3px;
    color: var(--ui-text-muted);
    font-size: 9px;
}

.document-validity-status.is-expired {
    color: #9f2d2d;
    border-color: #efb5b5;
    background: #fff0f0;
}

.document-validity-status.is-expiring {
    color: #8a5b00;
    border-color: #ecd292;
    background: #fff8df;
}

.document-validity-status.is-valid {
    color: #23633d;
    border-color: #acd6ba;
    background: #eef9f1;
}

@media (max-width: 900px) {
    .vehicle-document-category-filter {
        flex-wrap: wrap;
        width: 100%;
        margin-left: 0;
    }

    .vehicle-document-category-filter .ui-filter-input {
        flex: 1 1 220px;
        width: auto;
    }
}

.vehicle-list-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.vehicle-list-card {
    display: grid;
    min-width: 0;
    overflow: hidden;
    color: #203f4d;
    text-decoration: none;
}

.vehicle-list-card:hover {
    border-color: var(--tenant-primary, #e85a32);
    box-shadow: 0 9px 24px rgb(18 48 64 / 10%);
}

.vehicle-list-card-header {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid #e2eaed;
    background: #fbfcfd;
}

.vehicle-list-card-icon,
.vehicle-identity-icon {
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(145deg, #174f69, #347f91);
}

.vehicle-list-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
}

.vehicle-list-card-photo {
    display: block;
    width: 48px;
    height: 48px;
    border: 1px solid #d4e0e5;
    border-radius: 10px;
    background: #eef3f5;
    object-fit: cover;
}

.vehicle-list-card-icon svg {
    width: 27px;
    height: 27px;
}

.vehicle-list-card-title {
    min-width: 0;
}

.vehicle-list-card-title strong,
.vehicle-list-card-title small {
    display: block;
}

.vehicle-list-card-title strong {
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vehicle-list-card-title small {
    margin-top: 3px;
    color: #6f828c;
    font-size: 11px;
}

.vehicle-list-card-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
    padding: 16px 18px 18px;
}

.vehicle-list-card-body div {
    min-width: 0;
}

.vehicle-list-card-body span,
.vehicle-stat-grid span,
.vehicle-data-grid dt {
    display: block;
    color: #758790;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.vehicle-list-card-body strong {
    display: block;
    margin-top: 4px;
    overflow-wrap: anywhere;
    font-size: 13px;
}

.vehicle-record-heading {
    margin-bottom: 18px;
}

.vehicle-record-layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.vehicle-profile-sidebar {
    display: grid;
    position: sticky;
    top: 78px;
    gap: 14px;
}

.vehicle-identity-card,
.vehicle-side-card,
.vehicle-detail-card,
.vehicle-stat-grid article {
    border: 1px solid #d8e2e7;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 5px 20px rgb(18 48 64 / 6%);
}

.vehicle-identity-card {
    overflow: hidden;
}

.vehicle-identity-icon {
    min-height: 210px;
}

.vehicle-identity-photo {
    display: block;
    width: 100%;
    height: 210px;
    background: #eef3f5;
    object-fit: cover;
}

.vehicle-identity-icon svg {
    width: 92px;
    height: 92px;
    opacity: 0.92;
}

.vehicle-identity-content {
    padding: 18px;
    text-align: center;
}

.vehicle-identity-content h2 {
    margin: 11px 0 5px;
    color: #163b4e;
    font-size: 23px;
}

.vehicle-identity-content p {
    margin: 5px 0;
    color: #687d87;
    font-size: 13px;
}

.vehicle-identity-content .vehicle-call-sign {
    color: #236b82;
    font-size: 15px;
    font-weight: 750;
}

.vehicle-photo-action {
    display: flex;
    justify-content: center;
    margin-top: 13px;
}

.vehicle-photo-preview {
    margin: 1rem 0;
}

.vehicle-photo-preview img {
    display: block;
    width: min(100%, 640px);
    max-height: 440px;
    border: 1px solid #d4e0e5;
    border-radius: 10px;
    background: #eef3f5;
    object-fit: contain;
}

.vehicle-side-card {
    padding: 16px;
}

.vehicle-side-card h3 {
    margin: 0 0 12px;
    color: #174f69;
    font-size: 14px;
}

.vehicle-section-nav {
    display: grid;
    gap: 5px;
}

.vehicle-section-nav a {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 6px;
    color: #274754;
    background: #f3f7f8;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}

.vehicle-section-nav a:hover {
    color: #ffffff;
    background: #246b82;
}

.vehicle-section-nav span {
    min-width: 24px;
    padding: 1px 6px;
    border-radius: 999px;
    color: #315363;
    background: #ffffff;
    font-size: 10px;
    text-align: center;
}

.vehicle-record-content {
    display: grid;
    min-width: 0;
    gap: 15px;
}

.vehicle-stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(110px, 1fr));
    gap: 12px;
}

.vehicle-stat-grid article {
    padding: 15px;
}

.vehicle-stat-grid strong {
    display: block;
    margin-top: 8px;
    color: #174f69;
    font-size: 22px;
}

.vehicle-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    align-items: start;
}

.vehicle-detail-card {
    min-width: 0;
    padding: 17px;
    scroll-margin-top: 90px;
}

.vehicle-detail-wide {
    grid-column: 1 / -1;
}

.vehicle-detail-card > header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e1e9ec;
}

.vehicle-detail-card h2 {
    margin: 0;
    color: #174f69;
    font-size: 17px;
}

.vehicle-detail-card header p {
    margin: 4px 0 0;
    color: #71838c;
    font-size: 12px;
}

.vehicle-data-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px 22px;
}

.vehicle-data-grid dl {
    min-width: 0;
    margin: 0;
}

.vehicle-data-grid dd {
    margin: 4px 0 0;
    color: #203f4d;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.vehicle-data-wide {
    grid-column: 1 / -1;
}

.vehicle-record-list,
.vehicle-document-list {
    display: grid;
    gap: 9px;
}

.vehicle-record-list article,
.vehicle-document-list article {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid #e0e8eb;
    border-radius: 7px;
    background: #f8fafb;
}

.vehicle-record-list article > div:first-child,
.vehicle-document-list article > div:first-child {
    min-width: 0;
}

.vehicle-record-list strong,
.vehicle-document-list strong {
    color: #203f4d;
}

.vehicle-record-list p,
.vehicle-document-list p {
    margin: 4px 0 0;
    color: #6d8089;
    font-size: 12px;
}

.vehicle-record-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
    align-items: center;
}

.vehicle-upload-panel {
    margin-bottom: 16px;
    padding: 15px;
    border: 1px solid #dce6e9;
    border-radius: 8px;
    background: #f8fafb;
}

.vehicle-upload-panel h3 {
    margin: 0 0 13px;
    color: #274754;
    font-size: 14px;
}

.vehicle-card-empty {
    margin: 0;
    padding: 18px;
    border: 1px dashed #cbd9df;
    border-radius: 7px;
    color: #70828b;
    background: #f9fbfc;
    text-align: center;
}

@media (max-width: 1180px) {
    .vehicle-list-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vehicle-stat-grid {
        grid-template-columns: repeat(3, minmax(110px, 1fr));
    }
}

@media (max-width: 900px) {
    .vehicle-record-layout {
        grid-template-columns: 1fr;
    }

    .vehicle-profile-sidebar {
        position: static;
        grid-template-columns: minmax(0, 1fr) minmax(240px, 0.7fr);
    }

    .vehicle-identity-card {
        display: grid;
        grid-template-columns: 180px minmax(0, 1fr);
    }

    .vehicle-identity-icon {
        min-height: 180px;
    }

    .vehicle-identity-photo {
        height: 180px;
    }
}

@media (max-width: 680px) {
    .vehicle-list-grid,
    .vehicle-card-grid,
    .vehicle-profile-sidebar,
    .vehicle-identity-card {
        grid-template-columns: 1fr;
    }

    .vehicle-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vehicle-data-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-data-wide,
    .vehicle-detail-wide {
        grid-column: auto;
    }

    .vehicle-record-list article,
    .vehicle-document-list article {
        align-items: flex-start;
    }
}
