.player-portal-page.is-compact-workspace {
    --portal-workspace-border:
        rgba(148, 163, 184, 0.13);
    --portal-workspace-surface:
        rgba(6, 17, 29, 0.97);
    --portal-workspace-surface-raised:
        rgba(12, 29, 47, 0.95);
    --portal-workspace-muted:
        #8297aa;
}

.player-portal-page.is-compact-workspace
.player-portal-original-hero {
    display: none;
}

.player-portal-page.is-compact-workspace {
    padding-top: 0;
}

.player-portal-compact-account {
    display: grid;
    grid-template-columns:
        minmax(220px, 0.85fr)
        minmax(440px, 1.55fr)
        minmax(220px, 0.8fr);
    gap: 14px;
    align-items: center;
    margin: 0;
    padding: 12px 18px;
    border-top:
        1px solid var(--portal-workspace-border);
    border-bottom:
        1px solid var(--portal-workspace-border);
    background:
        linear-gradient(
            90deg,
            rgba(11, 29, 47, 0.98),
            rgba(7, 20, 34, 0.98)
        );
}

.player-portal-compact-identity {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3px 10px;
    align-items: center;
    min-width: 0;
}

.player-portal-compact-label {
    grid-column: 1 / -1;
    color: #e6b85d;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.095em;
    text-transform: uppercase;
}

.player-portal-compact-identity > strong {
    min-width: 0;
    overflow: hidden;
    color: #eef7fc;
    font-size: 1.12rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-portal-compact-badges {
    display: flex;
    gap: 6px;
    align-items: center;
}

.player-portal-compact-badges span {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    padding: 0 7px;
    border:
        1px solid rgba(101, 216, 239, 0.15);
    border-radius: 999px;
    color: #a9bfd0;
    background:
        rgba(101, 216, 239, 0.055);
    font-size: 0.62rem;
    font-weight: 800;
}

.player-portal-compact-metrics {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(90px, 1fr));
    gap: 7px;
}

.player-portal-compact-metrics > div {
    min-width: 0;
    padding: 8px 10px;
    border:
        1px solid rgba(148, 163, 184, 0.1);
    border-radius: 9px;
    background:
        rgba(148, 163, 184, 0.035);
}

.player-portal-compact-metrics span {
    display: block;
    overflow: hidden;
    color: var(--portal-workspace-muted);
    font-size: 0.55rem;
    font-weight: 850;
    letter-spacing: 0.045em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.player-portal-compact-metrics strong {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: #edf7fc;
    font-size: 0.86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-portal-compact-state {
    display: flex;
    justify-content: flex-end;
    color: var(--portal-workspace-muted);
    font-size: 0.64rem;
    line-height: 1.45;
    text-align: right;
}

.player-portal-page.is-compact-workspace
[data-player-portal-tab] {
    min-height: 38px;
}

.player-portal-page.is-compact-workspace
.player-portal-workspace-panel {
    padding-top: 18px;
}

.player-portal-page.is-compact-workspace
[data-player-portal-panel="vehicles"] {
    min-height:
        calc(100vh - 250px);
}

.player-portal-vehicles-workspace {
    display: grid;
    grid-template-columns:
        minmax(620px, 1.65fr)
        minmax(360px, 0.85fr);
    gap: 10px;
    height:
        calc(100vh - 295px);
    min-height: 570px;
    margin-top: 12px;
}

.player-portal-vehicle-list-pane,
.player-portal-vehicle-detail-pane {
    min-width: 0;
    overflow: hidden;
    border:
        1px solid var(--portal-workspace-border);
    border-radius: 13px;
    background:
        var(--portal-workspace-surface);
}

.player-portal-vehicle-list-pane {
    display: flex;
    flex-direction: column;
}

.player-portal-workspace-controls {
    position: relative;
    z-index: 8;
    flex: 0 0 auto;
    margin: 0;
    padding: 10px;
    border-bottom:
        1px solid var(--portal-workspace-border);
    background:
        rgba(9, 23, 38, 0.985);
}

.player-portal-vehicle-list-pane
.player-vehicle-filter-status {
    flex: 0 0 auto;
    margin: 0;
    padding: 6px 12px;
    border-bottom:
        1px solid rgba(148, 163, 184, 0.08);
    background:
        rgba(7, 19, 32, 0.98);
}

.player-portal-vehicle-table-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    scrollbar-color:
        rgba(101, 216, 239, 0.28)
        rgba(148, 163, 184, 0.04);
    scrollbar-width: thin;
}

.player-portal-vehicle-table-scroll
.player-portal-table-wrap {
    min-width: 1120px;
    overflow: visible;
}

.player-portal-vehicle-table-scroll table {
    margin: 0;
    border: 0;
    border-radius: 0;
}

.player-portal-vehicle-table-scroll thead {
    position: sticky;
    z-index: 7;
    top: 0;
}

.player-portal-vehicle-table-scroll thead th {
    background:
        #10263c;
    box-shadow:
        0 1px 0 rgba(148, 163, 184, 0.13);
}

.player-portal-vehicle-table-scroll tbody tr {
    transition:
        background-color 110ms ease;
}

.player-portal-vehicle-table-scroll tbody tr:hover {
    background:
        rgba(101, 216, 239, 0.045);
}

.player-portal-vehicle-detail-pane {
    position: relative;
    overflow: auto;
    scrollbar-color:
        rgba(239, 185, 87, 0.28)
        rgba(148, 163, 184, 0.04);
    scrollbar-width: thin;
}

.player-portal-vehicle-detail-empty {
    display: grid;
    min-height: 100%;
    place-content: center;
    justify-items: center;
    padding: 34px;
    color: var(--portal-workspace-muted);
    text-align: center;
}

.player-portal-vehicle-detail-empty[hidden] {
    display: none;
}

.player-portal-vehicle-detail-empty-icon {
    display: grid;
    width: 70px;
    height: 70px;
    margin-bottom: 16px;
    place-items: center;
    border:
        1px solid rgba(239, 185, 87, 0.24);
    border-radius: 18px;
    color: #eabf69;
    background:
        radial-gradient(
            circle,
            rgba(239, 185, 87, 0.13),
            rgba(239, 185, 87, 0.025)
        );
    font-size: 1.15rem;
    font-weight: 950;
    letter-spacing: 0.08em;
}

.player-portal-vehicle-detail-empty strong {
    color: #eaf5fb;
    font-size: 1rem;
}

.player-portal-vehicle-detail-empty p {
    max-width: 330px;
    margin: 8px 0 0;
    font-size: 0.72rem;
    line-height: 1.6;
}

.player-portal-workspace-detail {
    min-height: 100%;
    margin: 0;
    padding: 16px;
    border: 0;
    border-radius: 0;
    background:
        linear-gradient(
            160deg,
            rgba(10, 28, 45, 0.98),
            rgba(5, 15, 26, 0.99)
        );
}

.player-portal-workspace-detail[hidden] {
    display: none;
}

.player-portal-workspace-detail
.player-vehicle-detail-header {
    position: sticky;
    z-index: 6;
    top: -16px;
    margin:
        -16px
        -16px
        0;
    padding:
        16px
        16px
        12px;
    border-bottom:
        1px solid var(--portal-workspace-border);
    background:
        rgba(7, 20, 34, 0.985);
    backdrop-filter: blur(8px);
}

.player-portal-workspace-detail
.player-vehicle-detail-header h2 {
    font-size:
        clamp(1.35rem, 2vw, 1.9rem);
}

.player-portal-workspace-detail
.player-vehicle-detail-tabs {
    position: sticky;
    z-index: 5;
    top: 76px;
    margin:
        0
        -16px
        14px;
    border-width:
        0 0 1px;
    border-radius: 0;
    background:
        rgba(8, 22, 37, 0.985);
}

.player-portal-workspace-detail
.player-vehicle-detail-kpis,
.player-portal-workspace-detail
.player-vehicle-combat-grid {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
}

.player-portal-workspace-detail
.player-vehicle-pillar-grid {
    grid-template-columns: 1fr;
}

.player-portal-workspace-detail
.player-vehicle-detail-kpis article,
.player-portal-workspace-detail
.player-vehicle-combat-grid article {
    padding: 12px;
}

.player-portal-workspace-detail
.player-vehicle-detail-kpis strong,
.player-portal-workspace-detail
.player-vehicle-combat-grid strong {
    font-size: 1.22rem;
}

.player-portal-workspace-detail
.player-vehicle-detail-chart-panel {
    padding: 12px;
}

.player-portal-workspace-detail
.player-vehicle-trend-chart {
    min-height: 220px;
}

.player-portal-workspace-detail
.player-vehicle-trend-chart svg {
    min-width: 620px;
    height: 220px;
}

.player-portal-workspace-detail
.player-portal-table-wrap {
    overflow: auto;
}

.player-portal-page.is-compact-workspace
.player-portal-overview-grid {
    gap: 8px;
}

.player-portal-page.is-compact-workspace
.player-portal-overview-grid article {
    min-height: auto;
    padding: 13px;
}

@media (max-width: 1280px) {
    .player-portal-compact-account {
        grid-template-columns:
            minmax(210px, 0.8fr)
            minmax(380px, 1.4fr);
    }

    .player-portal-compact-state {
        display: none;
    }

    .player-portal-vehicles-workspace {
        grid-template-columns:
            minmax(560px, 1.45fr)
            minmax(330px, 0.8fr);
    }
}

@media (max-width: 980px) {
    .player-portal-compact-account {
        grid-template-columns: 1fr;
    }

    .player-portal-compact-metrics {
        grid-template-columns:
            repeat(4, minmax(70px, 1fr));
    }

    .player-portal-vehicles-workspace {
        display: block;
        height: auto;
        min-height: 0;
    }

    .player-portal-vehicle-list-pane {
        height:
            calc(100vh - 300px);
        min-height: 540px;
    }

    .player-portal-vehicle-detail-pane {
        position: fixed;
        z-index: 500;
        inset:
            74px
            10px
            10px;
        display: none;
        border-color:
            rgba(101, 216, 239, 0.28);
        box-shadow:
            0 24px 80px rgba(0, 0, 0, 0.58);
    }

    .player-portal-vehicles-workspace.has-open-detail
    .player-portal-vehicle-detail-pane {
        display: block;
    }
}

@media (max-width: 680px) {
    .player-portal-compact-account {
        padding:
            10px
            12px;
    }

    .player-portal-compact-metrics {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .player-portal-vehicle-list-pane {
        height:
            calc(100vh - 270px);
        min-height: 480px;
    }

    .player-portal-vehicle-detail-pane {
        inset:
            62px
            4px
            4px;
        border-radius: 9px;
    }

    .player-portal-workspace-detail
    .player-vehicle-detail-kpis,
    .player-portal-workspace-detail
    .player-vehicle-combat-grid {
        grid-template-columns: 1fr;
    }
}
