/* ===========================================
   Layout: Header, Nav, Content, Grids
   =========================================== */

/* ── Shell ───────────────────────────────── */
.dashboard-shell {
    min-height: 100vh;
}

.masthead,
.command-bar,
.nav-surface,
.content-shell {
    width: min(100%, var(--masthead-max));
    margin: 0 auto;
}

/* ── Header / Masthead ───────────────────── */
.app-header {
    background: var(--gradient-header);
    border: 1px solid var(--border-subtle);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: var(--sp-8);
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--sp-8);
    box-shadow: var(--shadow-raised);
}

.app-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--f1-red) 0%, rgba(225, 6, 0, 0.45) 58%, transparent 100%);
}

.header-left {
    flex: 1;
    min-width: 0;
}

.header-brow {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary) !important;
    margin-bottom: var(--sp-2);
}

.header-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary) !important;
    margin: 0;
    line-height: 1.05;
    text-transform: uppercase;
}

.header-title .accent {
    color: var(--f1-red) !important;
    text-shadow: 0 0 20px rgba(225, 6, 0, 0.22);
}

.header-subtitle {
    font-size: var(--text-sm);
    color: var(--text-secondary) !important;
    margin-top: var(--sp-3);
    max-width: 720px;
}

.header-summary {
    flex: 0 0 360px;
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
    align-items: flex-start;
}

.header-note {
    color: var(--text-secondary) !important;
    font-size: var(--text-sm);
    line-height: 1.65;
}

.masthead-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
}

.masthead-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-medium);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary) !important;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.masthead-chip-hot {
    border-color: rgba(225, 6, 0, 0.35);
    background: rgba(225, 6, 0, 0.12);
    color: var(--text-primary) !important;
}

/* ── Command Surface ─────────────────────── */
.command-bar {
    margin-top: var(--sp-4);
    background: rgba(21, 24, 33, 0.88);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--sp-5);
    padding: var(--sp-5) var(--sp-6);
    backdrop-filter: blur(12px);
}

.command-left {
    flex: 1;
    min-width: 0;
}

.command-eyebrow {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted) !important;
    margin-bottom: var(--sp-2);
}

.command-copy {
    color: var(--text-secondary) !important;
    font-size: var(--text-sm);
    max-width: 640px;
}

.command-right {
    display: flex;
    align-items: flex-end;
    gap: var(--sp-4);
    flex-wrap: wrap;
    justify-content: flex-end;
}

.command-control {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    min-width: 220px;
}

.command-label {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary) !important;
}

.command-action-group {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    min-height: 42px;
}

/* ── Navigation Surface ──────────────────── */
.nav-surface {
    margin-top: var(--sp-4);
    padding: 0 var(--sp-2);
}

/* ── Content Area ────────────────────────── */
.content-shell {
    padding: var(--sp-6) 0 var(--sp-10);
}

.content-area {
    width: min(100%, var(--content-max));
    margin: 0 auto;
}

.page-loader {
    width: 100%;
}

/* ── Page Header ─────────────────────────── */
.page-section {
    display: flex;
    flex-direction: column;
    gap: var(--sp-6);
}

.page-header {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}

.section-heading {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
}

.title-accent {
    width: 4px;
    min-height: 40px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--f1-red) 0%, rgba(225, 6, 0, 0.35) 100%);
    flex-shrink: 0;
}

.section-copy {
    min-width: 0;
}

.section-title {
    font-size: var(--text-display);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-primary) !important;
}

.section-subtitle {
    margin-top: var(--sp-2);
    color: var(--text-secondary) !important;
    font-size: var(--text-sm);
    max-width: 760px;
}

.page-briefing {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    padding: var(--sp-4);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    background: linear-gradient(180deg, rgba(31, 36, 54, 0.72), rgba(21, 24, 33, 0.92));
}

.briefing-chip {
    min-width: 150px;
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.02);
}

.briefing-chip-label {
    display: block;
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text-muted) !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--sp-1);
}

.briefing-chip-value {
    display: block;
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-primary) !important;
}

/* ── Four-Column Grid ────────────────────── */
.four-col-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-4);
}

.four-col {
    flex: 1 1 25%;
    min-width: 0;
}

/* ── Team Detail Grid ────────────────────── */
.team-detail-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-5);
}

.team-left-col {
    flex: 0 0 320px;
    min-width: 280px;
}

.team-right-col {
    flex: 1;
    min-width: 0;
}

.team-right-stack {
    display: flex;
    flex-direction: column;
    gap: var(--sp-5);
}

/* ── Scrollable Tables ───────────────────── */
.scrollable-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
