.teacher-queue-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 1180px;
    margin: 0 auto;
    padding-bottom: 28px;
}

.teacher-queue-header,
.teacher-queue-card,
.teacher-queue-empty,
.teacher-queue-error {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.14), transparent 34%),
        radial-gradient(circle at 100% 0, rgba(59, 130, 246, 0.10), transparent 30%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.97), rgba(2, 6, 23, 0.96));
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.30);
}

.teacher-queue-header::before,
.teacher-queue-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.55), transparent);
}

.teacher-queue-header {
    padding: 26px;
}

.teacher-queue-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: #7dd3fc;
    background: rgba(14, 165, 233, 0.10);
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.14em;
    padding: 7px 10px;
    text-transform: uppercase;
}

.teacher-queue-title {
    color: #f8fafc;
    font-size: 32px;
    font-weight: 950;
    letter-spacing: -0.04em;
    margin-top: 14px;
}

.teacher-queue-subtitle {
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1.65;
    margin-top: 9px;
    max-width: 900px;
}

.teacher-queue-summary,
.teacher-queue-grid {
    display: grid;
    gap: 12px;
}

.teacher-queue-summary {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    margin-top: 22px;
}

.teacher-queue-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 20px 24px 8px;
}

.teacher-queue-kv {
    background: rgba(2, 6, 23, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    padding: 14px 15px;
}

.teacher-queue-label {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.teacher-queue-value {
    color: #f8fafc;
    font-size: 17px;
    font-weight: 900;
    margin-top: 7px;
    overflow-wrap: anywhere;
}

.teacher-queue-card {
    padding: 0;
}

.teacher-queue-card-header {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 18px;
    align-items: start;
    padding: 24px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.teacher-queue-ip {
    color: #f8fafc;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 29px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.teacher-queue-reason {
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1.55;
    margin-top: 7px;
}

.teacher-queue-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    max-width: 540px;
}

.teacher-queue-badge {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    padding: 8px 11px;
    font-size: 11px;
    font-weight: 900;
    background: rgba(30, 41, 59, 0.76);
    color: #e2e8f0;
    white-space: nowrap;
}

.teacher-queue-badge.safe {
    background: rgba(22, 163, 74, 0.16);
    border-color: rgba(34, 197, 94, 0.26);
    color: #86efac;
}

.teacher-queue-badge.warn {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.28);
    color: #fcd34d;
}

.teacher-queue-badge.danger {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.28);
    color: #fca5a5;
}

.teacher-queue-section-title {
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.10em;
    margin: 20px 24px 10px;
    text-transform: uppercase;
}

.teacher-queue-list {
    color: #cbd5e1;
    background: rgba(2, 6, 23, 0.42);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    line-height: 1.58;
    margin: 0 24px;
    padding: 15px 18px 15px 34px;
}

.teacher-queue-list li + li {
    margin-top: 6px;
}

.teacher-queue-note {
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.66);
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 14px;
    line-height: 1.58;
    margin-top: 20px;
    padding: 16px 24px;
}

.teacher-queue-empty,
.teacher-queue-error {
    color: #cbd5e1;
    padding: 28px;
    line-height: 1.6;
}

.teacher-queue-empty::before,
.teacher-queue-error::before {
    display: block;
    color: #f8fafc;
    font-size: 20px;
    font-weight: 950;
    letter-spacing: -0.02em;
    margin-bottom: 7px;
}

.teacher-queue-empty::before {
    content: "Queue clear";
}

.teacher-queue-error {
    border-color: rgba(239, 68, 68, 0.32);
    color: #fecaca;
}

.teacher-queue-error::before {
    content: "Teacher Queue unavailable";
}

@media (max-width: 1200px) {
    .teacher-queue-summary,
    .teacher-queue-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .teacher-queue-card-header {
        grid-template-columns: 1fr;
    }

    .teacher-queue-badges {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .teacher-queue-header,
    .teacher-queue-card-header,
    .teacher-queue-empty,
    .teacher-queue-error {
        border-radius: 18px;
    }

    .teacher-queue-summary,
    .teacher-queue-grid {
        grid-template-columns: 1fr;
    }

    .teacher-queue-title {
        font-size: 26px;
    }

    .teacher-queue-ip {
        font-size: 23px;
    }
}

.teacher-queue-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 20px 24px 0;
}

.teacher-queue-action-button {
    border: 1px solid rgba(56, 189, 248, 0.32);
    border-radius: 12px;
    background: rgba(14, 165, 233, 0.16);
    color: #e0f2fe;
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
    padding: 10px 14px;
}

.teacher-queue-action-button:hover:not(:disabled) {
    border-color: rgba(125, 211, 252, 0.58);
    background: rgba(14, 165, 233, 0.24);
}

.teacher-queue-action-button.secondary {
    background: rgba(30, 41, 59, 0.84);
    border-color: rgba(148, 163, 184, 0.22);
    color: #e2e8f0;
}

.teacher-queue-action-button.locked,
.teacher-queue-action-button:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.teacher-queue-action-note {
    color: #94a3b8;
    font-size: 13px;
}

.teacher-queue-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(10px);
}

.teacher-queue-modal {
    width: min(760px, 100%);
    max-height: 92vh;
    overflow: auto;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.14), transparent 36%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.98));
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 22px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}

.teacher-queue-modal-header,
.teacher-queue-modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 22px 24px;
}

.teacher-queue-modal-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.teacher-queue-modal-title {
    color: #f8fafc;
    font-size: 24px;
    font-weight: 950;
    margin-top: 12px;
}

.teacher-queue-modal-close {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.teacher-queue-modal-body {
    padding: 22px 24px;
}

.teacher-queue-modal-target {
    display: grid;
    gap: 6px;
    margin-bottom: 18px;
}

.teacher-queue-modal-target span,
.teacher-queue-confirm-label {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.teacher-queue-modal-target strong {
    color: #f8fafc;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 27px;
}

.teacher-queue-preflight-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.teacher-queue-preflight-check {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 15px;
    background: rgba(2, 6, 23, 0.48);
    padding: 13px 14px;
}

.teacher-queue-preflight-check span {
    display: block;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.teacher-queue-preflight-check strong {
    display: block;
    color: #f8fafc;
    margin-top: 7px;
    overflow-wrap: anywhere;
}

.teacher-queue-preflight-check.safe strong {
    color: #86efac;
}

.teacher-queue-preflight-check.warn strong {
    color: #fcd34d;
}

.teacher-queue-command-preview {
    margin-top: 18px;
}

.teacher-queue-command-preview code {
    display: block;
    overflow-x: auto;
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    color: #e2e8f0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    margin-top: 10px;
    padding: 14px;
}

.teacher-queue-confirm-label {
    display: block;
    margin-top: 18px;
}

.teacher-queue-confirm-input {
    width: 100%;
    box-sizing: border-box;
    margin-top: 9px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 13px;
    background: rgba(2, 6, 23, 0.62);
    color: #f8fafc;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 16px;
    padding: 12px 13px;
}

.teacher-queue-intent-state,
.teacher-queue-modal-context {
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.55;
    margin-top: 10px;
}

.teacher-queue-intent-state.matched {
    color: #86efac;
}

.teacher-queue-modal-actions {
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

@media (max-width: 760px) {
    .teacher-queue-actions,
    .teacher-queue-modal-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .teacher-queue-preflight-grid {
        grid-template-columns: 1fr;
    }

    .teacher-queue-action-button {
        width: 100%;
    }
}
