/* ── Header notification bell (admin / reseller / user dashboard) ── */
.notif-bell { position: relative; font-size: 1rem; }
.notif-bell.active { color: var(--primary, #E56F32); background: var(--primary-dim, rgba(229,111,50,0.08)); }
.notif-badge {
    position: absolute; top: 2px; right: 1px;
    min-width: 17px; height: 17px; padding: 0 4px;
    border-radius: 9px; background: var(--danger, #f43f5e); color: #fff;
    font-size: 0.62rem; font-weight: 700; line-height: 17px; text-align: center;
    box-shadow: 0 0 0 2px var(--bg2, #fff);
    pointer-events: none;
}
.notif-badge[hidden] { display: none; }
.notif-bell.ring { animation: notif-ring 0.9s ease; }
@keyframes notif-ring {
    0%, 100% { transform: rotate(0); }
    15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); }
    45% { transform: rotate(9deg); }  60% { transform: rotate(-6deg); }
    75% { transform: rotate(3deg); }
}

.notif-panel {
    position: fixed; z-index: 2000;
    /* Sizes match routedns.io .rd-notify-dropdown */
    width: 360px; max-width: calc(100vw - 24px);
    max-height: min(420px, 70vh);
    display: flex; flex-direction: column;
    background: var(--bg2, #fff); color: var(--text, #0f172a);
    border: 1px solid var(--border, rgba(0,0,0,0.08));
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(15,23,42,0.16), 0 2px 6px rgba(15,23,42,0.06);
    overflow: hidden;
    opacity: 0; transform: translateY(-6px); pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
}
.notif-panel.open { opacity: 1; transform: translateY(0); pointer-events: auto; }

.notif-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 12px 14px 8px;
}
.notif-head h4 { margin: 0; font-size: 0.875rem; font-weight: 700; }
.notif-link-btn {
    background: none; border: none; padding: 4px 8px; border-radius: 6px;
    color: var(--primary, #E56F32); font-size: 0.75rem; font-weight: 600; cursor: pointer;
}
.notif-link-btn:hover { background: var(--primary-dim, rgba(229,111,50,0.08)); }
.notif-link-btn:disabled { color: var(--text3, #94a3b8); cursor: default; background: none; }

.notif-tabs { display: flex; gap: 6px; padding: 0 14px 10px; border-bottom: 1px solid var(--border, rgba(0,0,0,0.06)); }
.notif-tab {
    background: var(--bg3, #f1f5f9); border: none; border-radius: 999px;
    padding: 4px 12px; font-size: 0.75rem; font-weight: 600; cursor: pointer;
    color: var(--text2, #475569);
}
.notif-tab.active { background: var(--primary, #E56F32); color: #fff; }

.notif-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.notif-item {
    position: relative; display: flex; gap: 10px; align-items: flex-start;
    padding: 12px 32px 12px 14px; cursor: pointer;
    border-bottom: 1px solid var(--border, rgba(0,0,0,0.05));
    transition: background 0.15s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg3, #f8fafc); }
.notif-item.unread { background: rgba(229,111,50,0.05); }
.notif-item.unread:hover { background: rgba(229,111,50,0.09); }
.notif-ico {
    flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px;
    display: grid; place-items: center; font-size: 0.85rem;
    background: rgba(229,111,50,0.12);
}
.notif-item.t-warning .notif-ico { background: rgba(245,158,11,0.15); }
.notif-item.t-danger  .notif-ico { background: rgba(244,63,94,0.13); }
.notif-item.t-success .notif-ico { background: rgba(16,185,129,0.14); }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 0.8125rem; font-weight: 600; line-height: 1.35; }
.notif-item.unread .notif-title { font-weight: 700; }
.notif-msg { margin-top: 3px; font-size: 0.75rem; color: var(--text2, #475569); line-height: 1.4; word-wrap: break-word;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-time { margin-top: 4px; font-size: 0.6875rem; color: var(--text3, #94a3b8); }
.notif-dot {
    position: absolute; top: 18px; right: 14px; width: 8px; height: 8px;
    border-radius: 50%; background: var(--primary, #E56F32);
}
.notif-del {
    position: absolute; bottom: 8px; right: 8px;
    background: none; border: none; cursor: pointer; padding: 2px 5px; border-radius: 6px;
    color: var(--text3, #94a3b8); font-size: 0.8rem; opacity: 0; transition: opacity 0.15s;
}
.notif-item:hover .notif-del { opacity: 1; }
.notif-del:hover { color: var(--danger, #f43f5e); background: rgba(244,63,94,0.08); }
@media (hover: none) { .notif-del { opacity: 1; } }

.notif-empty { padding: 28px 16px; text-align: center; color: var(--text3, #94a3b8); font-size: 0.875rem; }
.notif-empty .big { display: none; }

.notif-foot {
    display: flex; justify-content: center; padding: 8px;
    border-top: 1px solid var(--border, rgba(0,0,0,0.06));
}
/* Admin: "Clear all" on the left, "Send Notification" on the right. */
.notif-foot:has(#notif-send) { justify-content: space-between; padding: 8px 12px; }

/* Admin "Send Notification" modal: New / Sent History tabs */
.sn-tabs { padding: 0 0 12px; margin-bottom: 16px; }
.sn-history-list { max-height: 420px; overflow-y: auto; overscroll-behavior: contain; }
.sn-history-item {
    display: flex; gap: 12px; align-items: flex-start; padding: 12px 0;
    border-bottom: 1px solid var(--border, rgba(0,0,0,0.06));
}
.sn-history-item:last-child { border-bottom: none; }
.sn-history-ico {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px;
    display: grid; place-items: center; background: rgba(229,111,50,0.12);
}
.sn-history-body { flex: 1; min-width: 0; }
.sn-history-title { font-size: 0.86rem; font-weight: 600; }
.sn-history-msg { margin-top: 3px; font-size: 0.8rem; color: var(--text2, #475569); line-height: 1.45; word-wrap: break-word; white-space: pre-line; }
.sn-history-meta {
    margin-top: 5px; font-size: 0.72rem; color: var(--text3, #94a3b8);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sn-history-item .btn { flex-shrink: 0; white-space: nowrap; }
.sn-history-empty { padding: 36px 8px; text-align: center; color: var(--text3, #94a3b8); font-size: 0.84rem; }
@media (max-width: 480px) {
    .sn-history-item { flex-wrap: wrap; }
    .sn-history-item .btn { margin-left: 46px; }
}

@media (max-width: 480px) {
    .notif-panel { left: 12px !important; right: 12px !important; width: auto; max-width: none; max-height: min(70vh, calc(100dvh - 140px)); }
}
