.page-staff {
    display: block;
    flex: 1 0 auto;
    min-height: calc(100vh - 4rem);
    height: auto;
    padding: 0;
    width: 100%;
    background:
        radial-gradient(circle at top, rgba(122, 12, 24, 0.08), transparent 30%),
        #18161b;
}

.page-staff,
.page-staff button,
.page-staff input,
.page-staff select,
.page-staff textarea,
.page-staff p,
.page-staff dd,
.page-staff dt,
.page-staff span,
.page-staff small {
    font-family: "Jost", sans-serif;
}

.page-staff h1::before,
.page-staff h1::after,
.page-staff h2::before,
.page-staff h2::after,
.page-staff h3::before,
.page-staff h3::after,
.page-staff h4::before,
.page-staff h4::after,
.page-staff h5::before,
.page-staff h5::after,
.page-staff h6::before,
.page-staff h6::after,
.page-staff p::before,
.page-staff p::after,
.page-staff dt::before,
.page-staff dt::after,
.page-staff .type-h1::before,
.page-staff .type-h1::after,
.page-staff .type-h2::before,
.page-staff .type-h2::after,
.page-staff .type-h3::before,
.page-staff .type-h3::after,
.page-staff .type-h4::before,
.page-staff .type-h4::after,
.page-staff .type-h5::before,
.page-staff .type-h5::after,
.page-staff .type-h6::before,
.page-staff .type-h6::after,
.page-staff .type-body::before,
.page-staff .type-body::after {
    content: none;
    display: none;
}

.staff-shell {
    width: min(1500px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.5rem 0 2rem;
    display: grid;
    gap: 1rem;
}

.staff-panel {
    padding: 1.2rem;
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(43, 34, 40, 0.98), rgba(32, 26, 31, 0.98));
    border: 1px solid #3a262d;
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    box-shadow: 0 0.85rem 2rem rgba(0, 0, 0, 0.18);
}

.staff-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.25rem;
}

.staff-title-wrap {
    display: grid;
    gap: 0.45rem;
    max-width: 48rem;
}

.staff-kicker {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    color: #d898a2;
}

.staff-panel h1 {
    font-size: clamp(2.35rem, 3.5vw, 3.55rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
    margin: 0;
}

.staff-lead {
    color: #d6c8cc;
    font-size: 1rem;
    line-height: 1.45;
    margin: 0;
}

.staff-hero-actions,
.staff-inline-actions,
.staff-section-header {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.staff-hero-actions {
    align-self: center;
}

.staff-panel-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.staff-panel-header h3,
.staff-section-header h3 {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.1;
}

.staff-panel p,
.staff-panel dd,
.staff-panel label,
.staff-panel input,
.staff-panel select,
.staff-panel textarea {
    font-size: 0.95rem;
    line-height: 1.35;
}

.staff-panel p,
.staff-panel dd,
.staff-panel dt,
.staff-panel h1,
.staff-panel h2,
.staff-panel h3,
.staff-panel h4,
.staff-panel h5,
.staff-panel h6 {
    margin: 0;
}

.staff-muted {
    color: #c4b7bc;
}

.staff-dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
    gap: 1rem;
    align-items: start;
}

.staff-main-column,
.staff-rail {
    display: grid;
    gap: 1rem;
}

.staff-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.staff-stat {
    padding: 1rem 1.05rem;
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #3a2c33;
    display: grid;
    gap: 0.35rem;
}

.staff-stat span {
    color: #c4b7bc;
    font-size: 0.84rem;
}

.staff-stat strong {
    font-size: 2rem;
    line-height: 1;
}

.staff-details {
    display: grid;
    gap: 0.8rem;
}

.staff-details div {
    display: grid;
    gap: 0.15rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #35262d;
}

.staff-details div:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.staff-details dt {
    opacity: 0.78;
    font-size: 0.76rem;
    letter-spacing: 0.14em;
}

.staff-card-list {
    display: grid;
    gap: 0.85rem;
}

.staff-card {
    padding: 1rem;
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #3a2d34;
    display: grid;
    gap: 0.9rem;
}

.staff-card-topline {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
}

.staff-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.62rem;
    border-radius: 999px;
    background: rgba(122, 12, 24, 0.22);
    color: #ffd7dc;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.staff-chip-muted {
    background: rgba(255, 255, 255, 0.07);
    color: #d8ccd0;
}

.staff-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.staff-profile-row,
.staff-meta-row,
.staff-access-row {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
}

.staff-meta-row strong,
.staff-profile-row strong,
.staff-access-row strong {
    font-size: 1rem;
    line-height: 1.2;
}

.staff-meta-row span,
.staff-access-row p,
.staff-profile-row p {
    color: #c4b7bc;
    margin: 0;
}

.staff-empty {
    padding: 0.9rem 1rem;
    border-radius: 0.85rem;
    border: 1px dashed #44333b;
    color: #c7bbc0;
    background: rgba(255, 255, 255, 0.02);
}

.staff-split-layout {
    display: grid;
    grid-template-columns: minmax(17rem, 22rem) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.staff-sidebar {
    max-height: calc(100vh - 8.5rem);
    overflow: auto;
    position: sticky;
    top: 1rem;
}

.staff-list {
    display: grid;
    gap: 0.55rem;
}

.staff-list-item {
    width: 100%;
    border: 1px solid #3a2d34;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    color: var(--color-on-background);
    padding: 0.9rem;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    cursor: pointer;
}

.staff-list-item.active {
    background: linear-gradient(180deg, rgba(122, 12, 24, 0.52), rgba(96, 10, 21, 0.7));
    border-color: #9c3240;
    color: #fff7f8;
}

.staff-list-item strong {
    font-size: 0.98rem;
}

.staff-rank {
    min-width: 3rem;
    color: #c0b1b7;
}

.staff-list-item.active .staff-rank {
    color: rgba(255, 255, 255, 0.86);
}

.staff-list-copy {
    display: grid;
    gap: 0.18rem;
}

.staff-list-copy small {
    color: color-mix(in srgb, currentColor 68%, transparent);
}

.staff-records {
    display: grid;
    gap: 0.9rem;
    padding-top: 0.35rem;
    border-top: 1px solid #382930;
}

.staff-full-width {
    grid-column: 1 / -1;
}

.staff-access-list {
    display: grid;
    gap: 0.8rem;
}

.staff-access-row {
    padding: 0.9rem 1rem;
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #3a2d34;
}

.staff-access-user {
    display: grid;
    gap: 0.1rem;
}

.staff-editor-form {
    gap: 0.8rem;
}

.staff-editor-header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
}

.staff-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.staff-queue-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.staff-history-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.btn-secondary {
    background: #3a2d34;
    color: var(--color-on-background);
    box-shadow: none;
}

@media screen and (max-width: 1180px) {
    .staff-dashboard-layout,
    .staff-split-layout,
    .staff-queue-layout,
    .staff-history-grid,
    .staff-stat-grid,
    .staff-card-grid,
    .staff-editor-grid {
        grid-template-columns: 1fr;
    }

    .staff-sidebar {
        position: static;
        max-height: none;
    }
}

@media screen and (max-width: 900px) {
    .staff-shell {
        width: min(100%, calc(100% - 1rem));
        padding: 1rem 0 1.5rem;
    }

    .staff-panel {
        padding: 1rem;
    }

    .staff-hero,
    .staff-panel-header,
    .staff-editor-header,
    .staff-profile-row,
    .staff-meta-row,
    .staff-access-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .staff-hero-actions,
    .staff-inline-actions {
        width: 100%;
    }
}
