/* PANEL ZAGROŻEŃ - STAN ALARMOWY */
.panel-box.threat-alarm {
    border: 2px solid var(--accent-red);
    border-left: 6px solid var(--accent-red);
    background: linear-gradient(135deg, rgba(248, 81, 73, 0.16), var(--bg-panel));
    animation: pulseBorder 1.8s infinite;
}

@keyframes pulseBorder {
    0% { box-shadow: 0 0 0 0 rgba(248, 81, 73, 0.45); }
    70% { box-shadow: 0 0 0 10px rgba(248, 81, 73, 0); }
    100% { box-shadow: 0 0 0 0 rgba(248, 81, 73, 0); }
}

.status-pill.alarm {
    background: var(--accent-red);
    color: #ffffff;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

/* LISTA INCYDENTÓW W PANELU ZAGROŻEŃ */
.threat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    background: rgba(248, 81, 73, 0.12);
    border: 1px solid rgba(248, 81, 73, 0.45);
    border-radius: 6px;
    padding: 0.45rem 0.65rem;
    margin-bottom: 0.45rem;
    font-size: 0.84rem;
}

.threat-item.resolved {
    background: rgba(63, 185, 80, 0.08);
    border-color: rgba(63, 185, 80, 0.3);
    color: var(--text-muted);
}

.btn-resolve {
    background-color: var(--accent-red);
    color: #ffffff;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.btn-resolve:hover {
    filter: brightness(1.15);
}

/* STANOWISKO BIURKOWE NFC (13,56 MHz) */
.nfc-reader-box {
    margin-top: 0.55rem;
    padding: 0.65rem 0.8rem;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.nfc-student-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.nfc-student-info .nfc-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-blue);
    font-weight: 700;
}

.nfc-student-info .nfc-name {
    font-size: 0.95rem;
    font-weight: 700;
}

.nfc-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.btn-nfc-in {
    background-color: var(--accent-green);
    color: #0d1117;
    border: none;
}

.btn-nfc-out {
    background-color: var(--accent-blue);
    color: #0d1117;
    border: none;
}

.btn-nfc-remote {
    background-color: rgba(210, 153, 34, 0.2);
    color: var(--accent-yellow);
    border: 1px solid var(--accent-yellow);
}

.btn-tts {
    background-color: rgba(163, 113, 247, 0.2);
    color: #d2a8ff;
    border: 1px solid #a371f7;
}

/* WYSKAKUJĄCE OKNO ALERTU (MODAL) */
.alert-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 1rem;
}

.alert-modal-overlay.active {
    display: flex;
}

.alert-modal-card {
    background-color: var(--bg-panel);
    border: 3px solid var(--accent-red);
    border-radius: 12px;
    max-width: 480px;
    width: 100%;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 12px 40px rgba(248, 81, 73, 0.45);
}

.alert-modal-card h3 {
    color: var(--accent-red);
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
}

.alert-modal-card p {
    font-size: 0.95rem;
    margin-bottom: 1.1rem;
}
