/* Control room — VS Cargo vehicle management */

.page-cr-vehicles {
    gap: 1.25rem;
}

.page-cr-vehicles .cr-vehicles-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    padding: 1.35rem 1.5rem;
    border: 1px solid color-mix(in srgb, var(--vs-accent) 20%, var(--vs-border));
    border-radius: 1.1rem;
    box-shadow: var(--vs-shadow);
    background:
        radial-gradient(ellipse 120% 90% at 100% 0%, color-mix(in srgb, var(--vs-accent) 12%, transparent), transparent 55%),
        linear-gradient(145deg, color-mix(in srgb, var(--vs-accent) 8%, var(--vs-bg-card)), var(--vs-bg-card));
}

.page-cr-vehicles .cr-vehicles-hero__main {
    display: grid;
    gap: 0.85rem;
    flex: 1 1 20rem;
}

.page-cr-vehicles .cr-vehicles-hero__intro {
    display: flex;
    align-items: flex-start;
    gap: 0.95rem;
}

.page-cr-vehicles .cr-vehicles-hero__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 0.95rem;
    background: color-mix(in srgb, var(--vs-accent) 14%, var(--vs-bg-muted));
    color: var(--vs-accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.page-cr-vehicles .cr-vehicles-hero__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.75rem;
}

.page-cr-vehicles .cr-vehicles-hero__badge {
    background: color-mix(in srgb, var(--vs-accent) 12%, transparent);
    color: var(--vs-accent);
    border-color: color-mix(in srgb, var(--vs-accent) 28%, transparent);
}

.page-cr-vehicles .cr-vehicles-hero__stats {
    margin-top: 0;
}

.page-cr-vehicles .cr-vehicles-hero__stat--accent {
    border-color: color-mix(in srgb, var(--vs-accent) 32%, var(--vs-border));
    background: color-mix(in srgb, var(--vs-accent) 10%, var(--vs-surface));
    color: var(--vs-accent);
}

.page-cr-vehicles .cr-vehicles-hero__stat--accent strong {
    color: var(--vs-accent);
}

.page-cr-vehicles .cr-vehicles-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.page-cr-vehicles .cr-vehicles-panel {
    display: grid;
    gap: 1rem;
    padding: 1.15rem 1.25rem 1.35rem;
    border: 1px solid var(--vs-border);
    border-radius: 1.1rem;
    background: var(--vs-bg-card);
    box-shadow: var(--vs-shadow);
}

.page-cr-vehicles .cr-vehicles-panel__intro {
    display: grid;
    gap: 0.35rem;
}

.page-cr-vehicles .cr-vehicles-panel__eyebrow {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--vs-accent);
}

.page-cr-vehicles .cr-vehicles-panel__intro h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--vs-text);
}

.page-cr-vehicles .cr-vehicles-panel__copy {
    margin: 0;
    max-width: 42rem;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--vs-text-muted);
}

.page-cr-vehicles .cr-vehicles-toolbar {
    margin-top: 0.15rem;
}

.page-cr-vehicles .cr-vehicles-empty {
    text-align: center;
    padding: 2.75rem 1.5rem 3rem;
}

.page-cr-vehicles .cr-vehicles-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.75rem;
    height: 3.75rem;
    margin-bottom: 1rem;
    border-radius: 1.1rem;
    background: color-mix(in srgb, var(--vs-accent) 12%, transparent);
    color: var(--vs-accent);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.page-cr-vehicles .cr-vehicles-empty h3 {
    margin: 0 0 0.45rem;
    font-size: 1.1rem;
}

.page-cr-vehicles .cr-vehicles-empty p {
    margin: 0 auto 1rem;
    max-width: 28rem;
    color: var(--vs-text-muted);
    line-height: 1.5;
}

.page-cr-vehicles .cr-vehicles-empty__hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.82rem;
    color: color-mix(in srgb, var(--vs-text-muted) 88%, transparent);
}

.page-cr-vehicles .cr-vehicles-table-wrap {
    border: 1px solid color-mix(in srgb, var(--vs-accent) 10%, var(--vs-border));
    border-radius: 0.95rem;
    overflow: hidden;
}

.page-cr-vehicles .cr-vehicles-table thead th {
    background: color-mix(in srgb, var(--vs-accent) 5%, var(--vs-bg-muted));
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.page-cr-vehicles .cr-vehicles-table tbody tr:hover {
    background: color-mix(in srgb, var(--vs-accent) 4%, var(--vs-bg-card));
}

.page-cr-vehicles .cr-vehicles-fleet-no {
    display: inline-flex;
    padding: 0.14rem 0.55rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--vs-accent) 12%, var(--vs-bg-muted));
    color: var(--vs-accent);
    font-size: 0.82rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.page-cr-vehicles .cr-vehicles-registration {
    font-weight: 600;
    letter-spacing: 0.02em;
}

.page-cr-vehicles .cr-vehicles-country {
    display: inline-flex;
    padding: 0.12rem 0.48rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--vs-text-muted) 8%, var(--vs-bg-muted));
    color: var(--vs-text);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.page-cr-vehicles .cr-vehicles-status {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.58rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.page-cr-vehicles .cr-vehicles-status.is-active,
.page-cr-vehicles .cr-vehicles-status.is-available {
    background: color-mix(in srgb, #059669 14%, var(--vs-bg-muted));
    color: #047857;
}

.page-cr-vehicles .cr-vehicles-status.is-in-use,
.page-cr-vehicles .cr-vehicles-status.is-assigned {
    background: color-mix(in srgb, #0284c7 14%, var(--vs-bg-muted));
    color: #0369a1;
}

.page-cr-vehicles .cr-vehicles-status.is-maintenance,
.page-cr-vehicles .cr-vehicles-status.is-repair {
    background: color-mix(in srgb, #d97706 14%, var(--vs-bg-muted));
    color: #b45309;
}

.page-cr-vehicles .cr-vehicles-status.is-inactive,
.page-cr-vehicles .cr-vehicles-status.is-decommissioned {
    background: color-mix(in srgb, #64748b 14%, var(--vs-bg-muted));
    color: #475569;
}

.page-cr-vehicles .cr-vehicles-status.is-neutral {
    background: color-mix(in srgb, var(--vs-accent) 10%, var(--vs-bg-muted));
    color: var(--vs-text-muted);
}

.page-cr-vehicles .cr-vehicles-fuel {
    display: inline-flex;
    padding: 0.12rem 0.48rem;
    border-radius: 999px;
    background: color-mix(in srgb, #0891b2 10%, var(--vs-bg-muted));
    color: #0e7490;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.page-cr-vehicles .cr-vehicles-mileage {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--vs-text);
}

.page-cr-vehicles .cr-vehicles-location {
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-cr-vehicles .cr-vehicles-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1rem;
    padding: 0.95rem 1.25rem 0.35rem;
}

.page-cr-vehicles .cr-vehicles-pagination__btn {
    padding: 0.45rem 0.95rem;
    border: 1px solid var(--vs-border);
    border-radius: 999px;
    background: var(--vs-bg-card);
    color: var(--vs-text);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.page-cr-vehicles .cr-vehicles-pagination__btn:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--vs-accent) 40%, var(--vs-border));
    background: color-mix(in srgb, var(--vs-accent) 6%, var(--vs-bg-card));
}

.page-cr-vehicles .cr-vehicles-pagination__btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.page-cr-vehicles .cr-vehicles-pagination__status {
    font-size: 0.86rem;
    color: var(--vs-text-muted);
}

@media (max-width: 720px) {
    .page-cr-vehicles .cr-vehicles-hero__actions {
        width: 100%;
    }

    .page-cr-vehicles .cr-vehicles-hero__actions .vs-btn,
    .page-cr-vehicles .cr-vehicles-hero__actions .mgr-add-btn {
        flex: 1;
        justify-content: center;
    }
}

/* VS vehicle create/edit modal — matches control-room create / requisition modal shell */
.cr-vs-vehicle-modal .mgr-modal-dialog--wide {
    max-width: min(920px, calc(100vw - 2rem));
}

.cr-vs-vehicle-modal .tc-portal-modal__field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cr-vs-vehicle-modal__field-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.cr-vs-vehicle-modal__info {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--vs-accent) 35%, var(--vs-border));
    background: color-mix(in srgb, var(--vs-accent) 8%, var(--vs-bg-card));
    color: var(--vs-accent);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    cursor: help;
    flex-shrink: 0;
}

.cr-vs-vehicle-modal .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 640px) {
    .cr-vs-vehicle-modal .tc-portal-modal__field-grid {
        grid-template-columns: 1fr;
    }

    .cr-vs-vehicle-modal .tc-portal-modal__field-grid--span-2 {
        grid-column: auto;
    }
}
