/* =========================================================
   Vehicle Production & Trade - self-contained feature stylesheet.
   Extends the dashboard design tokens (dashboard.css).
   Two rows x two columns of charts.
   ========================================================= */

.vpt-shell {
    --vpt-chart-h: clamp(200px, 32vh, 340px);
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    grid-template-areas: "nav main";
    height: 100vh;
    overflow: hidden;
}

.vpt-main {
    grid-area: main;
    min-width: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: var(--gutter);
    scrollbar-width: thin;
    scrollbar-color: var(--border-panel) transparent;
}

    .vpt-main::-webkit-scrollbar {
 width: 8px;
    }

    .vpt-main::-webkit-scrollbar-thumb {
        background: var(--border-panel);
        border-radius: 4px;
    }

.vpt-page-head {
    margin: 0;
    flex: 0 0 auto;
}

.vpt-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gutter);
    flex: 0 0 auto;
}

.vpt-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.vpt-card-title {
    margin: 0 0 8px;
    font-size: var(--fs-card-title);
    font-weight: 500;
    color: var(--text-hi);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.vpt-card-sub {
    margin: -4px 0 8px;
    font-size: var(--fs-meta);
    color: var(--text-lo);
}

.vpt-chart {
    width: 100%;
    height: var(--vpt-chart-h);
}

.vpt-empty {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-lo);
}

.vpt-source {
    font-size: var(--fs-meta);
    color: var(--text-lo);
    border-top: 1px solid var(--border-panel);
    margin: 0;
    padding-top: 6px;
    flex: 0 0 auto;
}

.vpt-loading {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    background: rgba(7, 9, 15, .78);
    color: var(--text-mid);
    font-size: 13px;
    font-weight: 600;
    transition: opacity .2s ease;
}

.vpt-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@media (max-width: 1023px) {
    .vpt-shell {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "nav" "main";
        height: auto;
        overflow: visible;
    }

    .vpt-main {
        overflow: visible;
        height: auto;
    }

    .vpt-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-height: 920px) {
    .vpt-shell {
        --vpt-chart-h: clamp(170px, 27vh, 260px);
    }

    .vpt-card {
        padding: 8px 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vpt-loading {
        transition: none;
    }
}
