/* Real-Time Notification Bell Dropdown (Admin & Frontend Dual-Theme) */
.nw-bell-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    position: relative;
}

.nw-bell-sound-btn,
.nw-bell-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid #E2E8F0;
    background: #F8FAFC;
    color: #334155;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.nw-bell-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nw-bell-menu.hidden {
    display: none !important;
}

.nw-bell-sound-btn:hover,
.nw-bell-trigger:hover {
    border-color: rgba(56, 189, 248, 0.55);
    color: #0284C7;
}

body.theme-ocean-dark:not([data-mode="light"]) .nw-bell-sound-btn,
body.theme-ocean-dark:not([data-mode="light"]) .nw-bell-trigger {
    color: #E2E8F0;
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(34, 211, 238, 0.24);
}

.nw-bell-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: #EF4444;
    color: #FFFFFF;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 19px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.45);
}

.nw-bell-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 350px;
    max-width: calc(100vw - 24px);
    background: #FFFFFF;
    color: #0F172A;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
    z-index: 1200;
    overflow: hidden;
}

@media (max-width: 640px) {
    .nw-bell-wrap {
        gap: 0.25rem;
    }

    .nw-bell-sound-btn,
    .nw-bell-trigger {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        font-size: 0.8rem;
    }

    .nw-bell-badge {
        top: -4px;
        right: -4px;
        min-width: 16px;
        height: 16px;
        font-size: 0.62rem;
        line-height: 16px;
    }

    .nw-bell-menu {
        position: fixed;
        top: 66px;
        left: 0.75rem;
        right: 0.75rem;
        width: auto;
        max-width: none;
    }
}

html:not([data-mode="light"]) body.theme-ocean-dark .nw-bell-menu {
    background: #0F172A;
    color: #F8FAFC;
    border-color: rgba(56, 189, 248, 0.25);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}

.nw-bell-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.nw-bell-head-title {
    font-size: 0.9rem;
    display: block;
}

.nw-bell-head-sub {
    font-size: 0.74rem;
    color: #64748B;
}

.nw-bell-head-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.nw-bell-action-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: #0284C7;
    cursor: pointer;
}

.nw-bell-action-link:hover {
    text-decoration: underline;
}

.nw-bell-list {
    max-height: 340px;
    overflow-y: auto;
}

.nw-bell-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #64748B;
    font-size: 0.82rem;
}

.nw-bell-empty i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.55;
}

.nw-bell-item {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.78rem 1rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    transition: background 0.15s ease;
}

.nw-bell-item:hover {
    background: rgba(56, 189, 248, 0.08);
}

.nw-bell-item.is-unread {
    background: rgba(14, 165, 233, 0.06);
}

.nw-bell-item-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.nw-bell-item-icon.tone-primary { background: rgba(37, 99, 235, 0.14); color: #2563EB; }
.nw-bell-item-icon.tone-info    { background: rgba(2, 132, 199, 0.14); color: #0284C7; }
.nw-bell-item-icon.tone-success { background: rgba(5, 150, 105, 0.14); color: #059669; }
.nw-bell-item-icon.tone-warning { background: rgba(217, 119, 6, 0.15); color: #D97706; }
.nw-bell-item-icon.tone-danger  { background: rgba(220, 38, 38, 0.14); color: #DC2626; }

.nw-bell-item-body {
    flex: 1;
    min-width: 0;
}

.nw-bell-item-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}

.nw-bell-item-top strong {
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nw-bell-item-top span {
    font-size: 0.68rem;
    color: #64748B;
    white-space: nowrap;
}

.nw-bell-item-msg {
    font-size: 0.77rem;
    color: #64748B;
    line-height: 1.38;
}

html:not([data-mode="light"]) body.theme-ocean-dark .nw-bell-item-msg,
html:not([data-mode="light"]) body.theme-ocean-dark .nw-bell-head-sub,
html:not([data-mode="light"]) body.theme-ocean-dark .nw-bell-item-top span {
    color: #94A3B8;
}

.nw-bell-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0284C7;
    margin-top: 6px;
    flex-shrink: 0;
}

.nw-bell-menu-foot {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    text-align: center;
}

.nw-bell-view-all {
    display: block;
    padding: 0.7rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #0284C7;
    text-decoration: none;
}

.nw-bell-view-all:hover {
    background: rgba(14, 165, 233, 0.08);
}

@keyframes nwBellRing {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(15deg); }
    40% { transform: rotate(-15deg); }
    60% { transform: rotate(10deg); }
    80% { transform: rotate(-10deg); }
}

.nw-bell-ringing {
    animation: nwBellRing 0.8s ease;
}

.nw-otp-input {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.45rem;
}

/* Global Email Wrapper Live Preview & Template Editor */
.nw-email-code-editor {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8rem;
    line-height: 1.55;
}

.nw-shortcode-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.nw-shortcode-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    border: 1px solid #CBD5E1;
    background: #F8FAFC;
    color: #0284C7;
    font-size: 0.74rem;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    cursor: pointer;
    transition: all 0.15s ease;
}

.nw-shortcode-chip:hover {
    background: #0284C7;
    border-color: #0284C7;
    color: #FFFFFF;
}

.nw-preview-sticky {
    position: sticky;
    top: 84px;
}

.nw-device-toolbar {
    display: inline-flex;
    background: #F1F5F9;
    padding: 0.25rem;
    border-radius: 10px;
    gap: 0.25rem;
}

.nw-device-btn {
    border: none;
    background: transparent;
    color: #475569;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
}

.nw-device-btn.active {
    background: #FFFFFF;
    color: #0284C7;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

.nw-device-stage {
    background: #E2E8F0;
    border: 1px solid #CBD5E1;
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    justify-content: center;
    min-height: 540px;
}

.nw-device-frame {
    width: 100%;
    max-width: 100%;
    background: #FFFFFF;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    transition: max-width 0.25s ease;
}

.nw-device-frame.device-tablet {
    max-width: 560px;
}

.nw-device-frame.device-mobile {
    max-width: 375px;
}

.nw-preview-iframe {
    width: 100%;
    height: 520px;
    border: 0;
    display: block;
}

.nw-color-picker-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nw-color-swatch {
    width: 44px;
    height: 40px;
    padding: 2px;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    background: #FFFFFF;
    cursor: pointer;
}

.admin-btn[data-admin-tab].active {
    background: #2563EB;
    color: #FFFFFF;
    border-color: #2563EB;
}
