/* =========================================================
   Staff Console — left-side staff controls
   ========================================================= */

.staff-console {
    position: fixed;
    left: 0;
    top: 50%;
    z-index: 1100;

    transform: translateY(-50%);
}

.staff-console__details {
    position: relative;
}

.staff-console__trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    min-width: 52px;
    padding: 12px 10px;

    border: 1px solid rgba(251, 191, 36, 0.32);
    border-left: 0;
    border-radius: 0 12px 12px 0;

    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));

    color: #fde68a;

    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1;

    cursor: pointer;
    list-style: none;

    box-shadow:
        0 12px 32px rgba(2, 6, 23, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);

    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.staff-console__trigger::-webkit-details-marker {
    display: none;
}

.staff-console__trigger:hover {
    border-color: rgba(251, 191, 36, 0.48);
    color: #fffbeb;
}

.staff-console__details[open] .staff-console__trigger {
    border-color: rgba(56, 189, 248, 0.42);
    color: #bae6fd;
}

.staff-console__trigger-badge {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
}

.staff-console__panel {
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;

    width: min(320px, calc(100vw - 80px));
    max-height: calc(100vh - 40px);
    overflow: auto;

    padding: 18px;

    border-radius: 16px;
    border: 1px solid rgba(56, 189, 248, 0.22);

    background:
        linear-gradient(160deg, rgba(15, 23, 42, 0.97), rgba(2, 6, 23, 0.98));

    backdrop-filter: blur(16px);

    box-shadow:
        0 24px 60px rgba(2, 6, 23, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);

    transform: translateY(-50%);
}

.staff-console__title {
    margin: 0 0 10px;

    color: #f8fafc;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.staff-console__section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.staff-console__section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.staff-console__section-title {
    margin: 0 0 10px;

    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.staff-console__mode,
.staff-console__status {
    margin: 0;

    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.5;
}

.staff-console__mode strong,
.staff-console__status strong {
    color: #e2e8f0;
    font-weight: 800;
}

.staff-console__status {
    margin-top: 6px;
    font-size: 12px;
}

.staff-console__scenarios,
.staff-console__links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.staff-console__link {
    display: block;
    padding: 10px 12px;

    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.14);

    background: rgba(15, 23, 42, 0.55);
    color: #e2e8f0;

    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.staff-console__link:hover {
    border-color: rgba(56, 189, 248, 0.28);
    background: rgba(56, 189, 248, 0.1);
    color: #f0f9ff;
}

.staff-console__link.is-active {
    border-color: rgba(56, 189, 248, 0.38);
    background: rgba(56, 189, 248, 0.16);
    color: #bae6fd;
}

.staff-console__note p {
    margin: 0;

    color: #94a3b8;
    font-size: 12px;
    line-height: 1.55;
}

@media (max-width: 760px) {
    .staff-console {
        top: auto;
        bottom: 18px;
        transform: none;
    }

    .staff-console__panel {
        top: auto;
        bottom: calc(100% + 8px);
        left: 0;
        transform: none;
    }

    .staff-console__trigger {
        writing-mode: horizontal-tb;
        text-orientation: mixed;
        border-left: 1px solid rgba(251, 191, 36, 0.32);
        border-radius: 12px;
        min-width: auto;
        padding: 10px 14px;
    }
}

/* =========================================================
   Course dashboard coexistence (UX-F3)
   Only when Staff Console is present; course dashboard only.
   ========================================================= */

@media (min-width: 761px) and (max-width: 1040px) {
    body:has([data-staff-console]) .course-system-page.course-dashboard {
        padding-left: 58px;
    }
}

@media (max-width: 760px) {
    body:has([data-staff-console]) .course-system-page.course-dashboard {
        padding-bottom: 140px;
    }

    body:has([data-staff-console] .staff-console__details[open]) .course-system-page.course-dashboard {
        padding-bottom: min(42vh, 320px);
    }
}
