/* ── Toast notifications ──────────────────── */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    background: #323232;
    color: #fff;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    max-width: 360px;
    animation: toast-in .25s ease;
    pointer-events: auto;
}
.toast.success { background: #1b5e20; }
.toast.error   { background: #b71c1c; }
.toast.warning { background: #e65100; }
@keyframes toast-in {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-msg  { flex: 1; }
.toast-close { font-size: 18px; opacity: .7; cursor: pointer; }

/* ── Unread badge (tab title / favicon) ───── */
/* updated via JS — no CSS needed */

/* ── New message popup (admin) ────────────── */
#new-msg-popup {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: var(--z-modal);
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 12px 16px;
    display: none;
    gap: 10px;
    align-items: center;
    max-width: 320px;
    cursor: pointer;
    animation: slide-in .3s ease;
    border-left: 4px solid var(--color-primary);
}
#new-msg-popup.show { display: flex; }
@keyframes slide-in {
    from { transform: translateX(40px); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
.popup-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--color-primary-light);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-primary);
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
}
.popup-content { flex: 1; min-width: 0; }
.popup-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.popup-text {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.popup-close {
    font-size: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
    padding: 4px;
}

/* ── Install PWA banner ───────────────────── */
#install-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0; right: 0;
    background: var(--color-primary);
    color: #fff;
    padding: 14px 20px;
    align-items: center;
    gap: 12px;
    z-index: var(--z-toast);
    box-shadow: 0 -4px 12px rgba(0,0,0,.2);
}
#install-banner.show { display: flex; }
#install-banner p { flex: 1; font-size: 14px; }
#btn-install { background: #fff; color: var(--color-primary); padding: 8px 18px; border-radius: var(--radius-full); font-size: 13px; font-weight: 600; }
#btn-install-dismiss { opacity: .75; font-size: 22px; }

