/* ============================================
   BELL NOTIFICATIONS PREMIUM
   Ultimate UI/UX with Glassmorphism & Neumorphism
   ============================================ */

/* CSS Variables & Design Tokens */
:root {
    /* Light Mode Palette */
    --bn-bg-primary: #ffffff;
    --bn-bg-secondary: #f8fafc;
    --bn-bg-tertiary: #f1f5f9;
    --bn-bg-elevated: #ffffff;
    --bn-bg-overlay: rgba(15, 23, 42, 0.7);

    --bn-text-primary: #0f172a;
    --bn-text-secondary: #475569;
    --bn-text-tertiary: #94a3b8;
    --bn-text-muted: #64748b;

    --bn-border-subtle: #e2e8f0;
    --bn-border-default: #cbd5e1;
    --bn-border-strong: #94a3b8;

    /* Brand Colors */
    --bn-accent: #ff6b35;
    --bn-accent-hover: #f55a2a;
    --bn-accent-light: #fff5f3;
    --bn-accent-gradient: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);

    --bn-success: #10b981;
    --bn-success-light: #d1fae5;
    --bn-warning: #f59e0b;
    --bn-warning-light: #fef3c7;
    --bn-danger: #ef4444;
    --bn-danger-light: #fee2e2;
    --bn-info: #3b82f6;
    --bn-info-light: #dbeafe;

    /* Elevation */
    --bn-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --bn-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --bn-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --bn-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --bn-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --bn-shadow-glow: 0 0 0 3px rgba(255, 107, 53, 0.2);
    --bn-shadow-accent: 0 4px 14px rgba(255, 107, 53, 0.35);

    /* Glassmorphism */
    --bn-glass-bg: rgba(255, 255, 255, 0.85);
    --bn-glass-border: rgba(255, 255, 255, 0.3);
    --bn-glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);

    /* Spacing */
    --bn-space-xs: 4px;
    --bn-space-sm: 8px;
    --bn-space-md: 16px;
    --bn-space-lg: 24px;
    --bn-space-xl: 32px;

    /* Border Radius */
    --bn-radius-sm: 6px;
    --bn-radius-md: 10px;
    --bn-radius-lg: 16px;
    --bn-radius-xl: 24px;
    --bn-radius-full: 9999px;

    /* Transitions */
    --bn-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --bn-transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --bn-transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --bn-transition-spring: 400ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --bn-transition-bounce: 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Typography */
    --bn-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --bn-font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

/* Dark Mode */
[data-theme="dark"] {
    --bn-bg-primary: #0f172a;
    --bn-bg-secondary: #1e293b;
    --bn-bg-tertiary: #334155;
    --bn-bg-elevated: #1e293b;
    --bn-bg-overlay: rgba(0, 0, 0, 0.85);

    --bn-text-primary: #f8fafc;
    --bn-text-secondary: #cbd5e1;
    --bn-text-tertiary: #64748b;
    --bn-text-muted: #94a3b8;

    --bn-border-subtle: #334155;
    --bn-border-default: #475569;
    --bn-border-strong: #64748b;

    --bn-accent-light: rgba(255, 107, 53, 0.15);

    --bn-success-light: rgba(16, 185, 129, 0.15);
    --bn-warning-light: rgba(245, 158, 11, 0.15);
    --bn-danger-light: rgba(239, 68, 68, 0.15);
    --bn-info-light: rgba(59, 130, 246, 0.15);

    --bn-glass-bg: rgba(30, 41, 59, 0.9);
    --bn-glass-border: rgba(255, 255, 255, 0.05);
    --bn-glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Core Reset */
.bn-app {
    font-family: var(--bn-font-sans);
    color: var(--bn-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   TRIGGER BUTTON - Neumorphic Design
   ============================================ */

.bn-trigger {
    position: fixed;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--bn-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: transform var(--bn-transition-spring);
}

.bn-position-top-right .bn-trigger {top: 24px;right: 24px;margin-top: 20px;}
.bn-position-top-left .bn-trigger { top: 24px; left: 24px; }
.bn-position-bottom-right .bn-trigger {bottom: 120px;right: 24px;}
.bn-position-bottom-left .bn-trigger { bottom: 24px; left: 24px; }

.bn-trigger-bg {
    position: absolute;
    inset: 0;
    background: var(--bn-bg-elevated);
    border-radius: var(--bn-radius-full);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 1px var(--bn-border-subtle),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all var(--bn-transition-base);
}

.bn-trigger:hover {
    transform: scale(1.08) translateY(-2px);
}

.bn-trigger:hover .bn-trigger-bg {
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px var(--bn-border-default),
        0 0 20px rgba(255, 107, 53, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.bn-trigger:active {
    transform: scale(0.95);
}

.bn-trigger svg {
    width: 24px;
    height: 24px;
    color: var(--bn-text-primary);
    z-index: 2;
    transition: transform var(--bn-transition-base);
}

.bn-trigger:hover svg {
    transform: rotate(12deg);
}

/* Glow Effect for Unread */
.bn-trigger-glow {
    position: absolute;
    inset: -4px;
    border-radius: var(--bn-radius-full);
    background: var(--bn-accent-gradient);
    opacity: 0;
    filter: blur(12px);
    transition: opacity var(--bn-transition-base);
    z-index: 0;
}

.bn-has-unread .bn-trigger-glow {
    opacity: 0.4;
    animation: bn-pulse-glow 2s ease-in-out infinite;
}

@keyframes bn-pulse-glow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

/* Counter Badge */
.bn-counter {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--bn-accent-gradient);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--bn-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bn-bg-primary);
    box-shadow: var(--bn-shadow-sm);
    z-index: 3;
    animation: bn-badge-appear 0.5s var(--bn-transition-spring);
}

@keyframes bn-badge-appear {
    0% { transform: scale(0) rotate(-45deg); }
    50% { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(1) rotate(0); }
}

/* ============================================
   BACKDROP
   ============================================ */

.bn-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    opacity: 0;
    visibility: hidden;
    transition: all var(--bn-transition-base);
    z-index: 9998;
    pointer-events: none;
}

.bn-backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ============================================
   PANEL - Fixed Container Design
   ============================================ */

.bn-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 440px;
    height: 100vh;
    background: var(--bn-bg-primary);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-left: 1px solid var(--bn-border-subtle);
    box-shadow: -4px 0 25px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform var(--bn-transition-slow);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: none;
}

.bn-panel.active {
    transform: translateX(0);
    pointer-events: auto;
}

/* Ensure panel doesn't overflow on smaller screens */
@media (max-height: 700px) {
    .bn-panel {
        height: 100vh !important;
    }
}

/* Admin bar adjustment */
.admin-bar .bn-panel {
    top: 32px;
    height: calc(100vh - 32px);
}

@media (prefers-reduced-motion: reduce) {
    .bn-panel { transition: none; }
}

/* ============================================
   PANEL HEADER
   ============================================ */

.bn-panel-header {
    padding: 20px 16px 12px 16px;
    background: var(--bn-bg-primary);
    border-bottom: 1px solid var(--bn-border-subtle);
    z-index: 10;
    flex-shrink: 0;
}

.bn-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.bn-header-title {
    display: flex;
    align-items: center;
    gap: var(--bn-space-sm);
}

.bn-panel-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: var(--bn-text-primary);
    letter-spacing: -0.02em;
}

.bn-unread-count {
    background: var(--bn-accent-gradient);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--bn-radius-full);
    animation: bn-fade-in 0.3s ease;
}

.bn-header-actions {
    display: flex;
    gap: 8px;
}

.bn-btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bn-bg-secondary);
    border-radius: var(--bn-radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bn-text-secondary);
    transition: all var(--bn-transition-fast);
    position: relative;
}

.bn-btn-icon:hover {
    background: var(--bn-bg-tertiary);
    color: var(--bn-text-primary);
    transform: translateY(-1px);
}

.bn-btn-icon:active {
    transform: scale(0.95);
}

.bn-btn-icon svg {
    width: 18px;
    height: 18px;
}

/* Search Bar */
.bn-search-bar {
    display: none;
    margin-bottom: 12px;
    transition: all var(--bn-transition-fast);
}

.bn-search-bar.active {
    display: block;
}

.bn-search-bar svg {
    width: 16px;
    height: 16px;
    color: var(--bn-text-tertiary);
    flex-shrink: 0;
}

.bn-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: var(--bn-text-primary);
    font-family: inherit;
}

.bn-search-input::placeholder {
    color: var(--bn-text-tertiary);
}

.bn-search-clear {
    background: none;
    border: none;
    padding: var(--bn-space-xs);
    cursor: pointer;
    color: var(--bn-text-tertiary);
    display: none;
}

.bn-search-clear.visible {
    display: flex;
}

.bn-search-clear:hover {
    color: var(--bn-text-secondary);
}

/* Filters */
.bn-filters {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 0;
    margin-top: 8px;
}

.bn-filters::-webkit-scrollbar {
    display: none;
}

.bn-filter {
    padding: 8px 16px;
    border: 1px solid var(--bn-border-subtle);
    background: transparent;
    color: var(--bn-text-secondary);
    border-radius: var(--bn-radius-full);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--bn-transition-fast);
    font-family: inherit;
    flex-shrink: 0;
}

.bn-filter:hover {
    border-color: var(--bn-border-default);
    color: var(--bn-text-primary);
    background: var(--bn-bg-secondary);
}

.bn-filter.active {

    color: var(--bn-bg-primary);

}

/* ============================================
   CONTENT AREA
   ============================================ */

.bn-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--bn-bg-secondary);
    scroll-behavior: smooth;
    min-height: 0;
}

.bn-content::-webkit-scrollbar {
    width: 6px;
}

.bn-content::-webkit-scrollbar-track {
    background: transparent;
}

.bn-content::-webkit-scrollbar-thumb {
    background: var(--bn-border-default);
    border-radius: var(--bn-radius-full);
}

.bn-content::-webkit-scrollbar-thumb:hover {
    background: var(--bn-text-tertiary);
}

/* ============================================
   SKELETON LOADING - Shimmer Effect
   ============================================ */

.bn-skeleton-list {
    display: flex;
    flex-direction: column;
    gap: var(--bn-space-md);
}

.bn-skeleton-card {
    background: var(--bn-bg-primary);
    border-radius: var(--bn-radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--bn-shadow-sm);
}

.bn-skeleton-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    transform: translateX(-100%);
    animation: bn-shimmer 1.5s infinite;
}

@keyframes bn-shimmer {
    100% { transform: translateX(100%); }
}

.bn-skeleton-img {
    height: 160px;
    background: var(--bn-bg-tertiary);
}

.bn-skeleton-body {
    padding: var(--bn-space-md);
}

.bn-skeleton-line {
    height: 12px;
    background: var(--bn-bg-tertiary);
    border-radius: var(--bn-radius-sm);
    margin-bottom: var(--bn-space-sm);
}

.bn-skeleton-badge { width: 80px; height: 20px; border-radius: var(--bn-radius-full); }
.bn-skeleton-title { width: 70%; height: 20px; }
.bn-skeleton-text { width: 90%; height: 12px; }

/* ============================================
   NOTIFICATION CARDS - Interactive Design
   ============================================ */

.bn-group-header {
    display: flex;
    align-items: center;
    gap: var(--bn-space-sm);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bn-text-tertiary);
    font-weight: 700;
    margin: var(--bn-space-lg) 0 var(--bn-space-md);
    padding: 0 var(--bn-space-sm);
}

.bn-group-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--bn-border-subtle);
}

.bn-group-header:first-child {
    margin-top: 0;
}

/* Card Base */
.bn-notification {
    background: var(--bn-bg-primary);
    border-radius: var(--bn-radius-lg);
    overflow: hidden;
    box-shadow:
        var(--bn-shadow-sm),
        0 0 0 1px var(--bn-border-subtle);
    transition: all var(--bn-transition-base);
    cursor: pointer;
    position: relative;
    margin-bottom: var(--bn-space-md);
    animation: bn-card-enter 0.5s var(--bn-transition-spring) backwards;
}

/* Horizontal line separator between notifications */
.bn-notification + .bn-notification {
    position: relative;
}

.bn-notification + .bn-notification::before {
    content: '';
    position: absolute;
    top: -8px;
    /* left: 50%; */
    transform: translateX(-50%);
    width: 90%;
    height: 1px;
    background: var(--bn-border-subtle);
    opacity: 0.7;
}

.bn-notification:nth-child(1) { animation-delay: 0.05s; }
.bn-notification:nth-child(2) { animation-delay: 0.1s; }
.bn-notification:nth-child(3) { animation-delay: 0.15s; }
.bn-notification:nth-child(4) { animation-delay: 0.2s; }
.bn-notification:nth-child(5) { animation-delay: 0.25s; }

@keyframes bn-card-enter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.bn-notification:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 
        var(--bn-shadow-lg),
        0 0 0 1px var(--bn-border-default);
}

.bn-notification:active {
    transform: scale(0.99);
}

/* Unread State */
.bn-notification.unread {
    background: linear-gradient(135deg, var(--bn-bg-primary) 0%, var(--bn-accent-light) 100%);
}

.bn-notification.unread::before {
    content: '';
    position: absolute;
    top: 16px;
    right: 16px;
    width: 8px;
    height: 8px;
    background: var(--bn-accent);
    border-radius: var(--bn-radius-full);
    box-shadow: 0 0 0 2px var(--bn-bg-primary);
    z-index: 2;
}

/* Pinned State */
.bn-notification.pinned {
    order: -1;
}

.bn-notification.pinned::after {
    content: 'PINNED';
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--bn-text-primary);
    color: var(--bn-bg-primary);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
    padding: 4px 8px;
    border-radius: var(--bn-radius-sm);
    z-index: 2;
}

/* Image Section */
.bn-notification-image-wrap {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.bn-notification-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--bn-transition-slow);
}

.bn-notification:hover .bn-notification-image {
    transform: scale(1.08);
}

/* Urgency Badge */
.bn-urgency-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: var(--bn-radius-md);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2;
}

.bn-urgency-badge.urgent {
    background: rgba(239, 68, 68, 0.9);
    color: white;
    animation: bn-urgent-pulse 2s infinite;
}

.bn-urgency-badge.soon {
    background: rgba(245, 158, 11, 0.9);
    color: white;
}

.bn-urgency-badge.normal {
    background: rgba(59, 130, 246, 0.9);
    color: white;
}

@keyframes bn-urgent-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* Content Section */
.bn-notification-content {
    padding: var(--bn-space-md);
}

.bn-notification-meta {
    display: flex;
    align-items: center;
    gap: var(--bn-space-sm);
    margin-bottom: var(--bn-space-sm);
}

.bn-notification-time {
    font-size: 12px;
    color: var(--bn-text-tertiary);
    font-weight: 500;
}

.bn-notification-category {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    background: var(--bn-bg-tertiary);
    color: var(--bn-text-secondary);
    border-radius: var(--bn-radius-sm);
}

.bn-notification-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--bn-text-primary);
    line-height: 1.4;
    margin: 0 0 var(--bn-space-sm) 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bn-notification-excerpt {
    font-size: 14px;
    color: var(--bn-text-secondary);
    line-height: 1.6;
    margin: 0 0 var(--bn-space-md) 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Progress Bar for urgency */
.bn-urgency-bar {
    height: 3px;
    background: var(--bn-bg-tertiary);
    border-radius: var(--bn-radius-full);
    margin-bottom: var(--bn-space-md);
    overflow: hidden;
}

.bn-urgency-bar-fill {
    height: 100%;
    background: var(--bn-accent-gradient);
    border-radius: var(--bn-radius-full);
    transition: width 0.3s ease;
}

/* Countdown */
.bn-countdown {
    display: flex;
    gap: var(--bn-space-xs);
    margin-bottom: var(--bn-space-md);
}

.bn-countdown-segment {
    flex: 1;
    text-align: center;
    padding: var(--bn-space-sm);
    background: var(--bn-bg-secondary);
    border-radius: var(--bn-radius-md);
    border: 1px solid var(--bn-border-subtle);
}

.bn-countdown-value {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--bn-text-primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    font-family: var(--bn-font-mono);
}

.bn-countdown-unit {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bn-text-tertiary);
    margin-top: 2px;
}

/* Actions */
.bn-notification-actions {
    display: flex;
    gap: var(--bn-space-sm);
}

.bn-btn-primary {
    flex: 1;
    padding: 10px 16px;
    background: var(--bn-accent-gradient);
    color: white;
    border: none;
    border-radius: var(--bn-radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--bn-transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.bn-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--bn-shadow-accent);
    color: white;
}

.bn-btn-ghost {
    padding: 10px;
    border: 1px solid var(--bn-border-subtle);
    background: transparent;
    color: var(--bn-text-secondary);
    border-radius: var(--bn-radius-md);
    cursor: pointer;
    transition: all var(--bn-transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bn-btn-ghost:hover {
    border-color: var(--bn-border-default);
    background: var(--bn-bg-secondary);
    color: var(--bn-text-primary);
}

.bn-notification-actions svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.bn-state-empty {
    text-align: center;
    padding: 60px var(--bn-space-md);
}

.bn-empty-graphic {
    width: 100px;
    height: 100px;
    margin: 0 auto var(--bn-space-lg);
    background: var(--bn-bg-tertiary);
    border-radius: var(--bn-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.bn-empty-graphic::before {
    content: '';
    position: absolute;
    inset: -10px;
    border: 2px dashed var(--bn-border-subtle);
    border-radius: var(--bn-radius-full);
    animation: bn-rotate-slow 20s linear infinite;
}

@keyframes bn-rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.bn-empty-graphic svg {
    width: 48px;
    height: 48px;
    color: var(--bn-text-tertiary);
}

.bn-state-empty h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--bn-text-primary);
    margin: 0 0 var(--bn-space-sm) 0;
}

.bn-state-empty p {
    font-size: 14px;
    color: var(--bn-text-secondary);
    margin: 0;
}

/* ============================================
   LOAD MORE
   ============================================ */

.bn-load-more {
    padding: var(--bn-space-md);
    text-align: center;
}

.bn-btn-load {
    padding: 12px 24px;
    background: transparent;
    border: 1px solid var(--bn-border-default);
    color: var(--bn-text-secondary);
    border-radius: var(--bn-radius-full);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--bn-transition-fast);
    font-family: inherit;
}

.bn-btn-load:hover {
    background: var(--bn-bg-primary);
    border-color: var(--bn-border-strong);
    color: var(--bn-text-primary);
}

/* ============================================
   PANEL FOOTER
   ============================================ */

.bn-panel-footer {
    padding: 12px 16px;
    background: var(--bn-bg-primary);
    border-top: 1px solid var(--bn-border-subtle);
    flex-shrink: 0;
}

.bn-footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bn-btn-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: var(--bn-text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: color var(--bn-transition-fast);
    font-family: inherit;
}

.bn-btn-text:hover {
    color: var(--bn-accent);
}

.bn-btn-text:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bn-btn-text svg {
    width: 14px;
    height: 14px;
}

/* ============================================
   SETTINGS MODAL
   ============================================ */

.bn-settings-modal {
    position: absolute;
    inset: 0;
    background: var(--bn-bg-primary);
    z-index: 20;
    display: flex;
    flex-direction: column;
}

.bn-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--bn-space-md);
    border-bottom: 1px solid var(--bn-border-subtle);
}

.bn-settings-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.bn-settings-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--bn-space-md);
}

.bn-setting-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--bn-space-md) 0;
    border-bottom: 1px solid var(--bn-border-subtle);
}

.bn-setting-info {
    flex: 1;
}

.bn-setting-label {
    display: block;
    font-weight: 600;
    color: var(--bn-text-primary);
    margin-bottom: 2px;
}

.bn-setting-desc {
    display: block;
    font-size: 13px;
    color: var(--bn-text-muted);
}

/* Toggle Switch */
.bn-toggle {
    position: relative;
    width: 48px;
    height: 26px;
    cursor: pointer;
    flex-shrink: 0;
}

.bn-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.bn-toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--bn-bg-tertiary);
    border-radius: var(--bn-radius-full);
    transition: background var(--bn-transition-fast);
    border: 1px solid var(--bn-border-subtle);
}

.bn-toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: var(--bn-radius-full);
    box-shadow: var(--bn-shadow-sm);
    transition: transform var(--bn-transition-fast);
}

.bn-toggle input:checked + .bn-toggle-slider {
    background: var(--bn-accent);
    border-color: var(--bn-accent);
}

.bn-toggle input:checked + .bn-toggle-slider::before {
    transform: translateX(22px);
}

/* Keyboard Shortcuts Section */
.bn-keyboard-shortcuts {
    flex-direction: column;
    gap: var(--bn-space-md);
}

.bn-shortcuts-list {
    display: grid;
    gap: var(--bn-space-sm);
    margin-top: var(--bn-space-sm);
}

.bn-shortcut {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--bn-text-secondary);
}

.bn-key {
    background: var(--bn-bg-tertiary);
    border: 1px solid var(--bn-border-default);
    border-radius: var(--bn-radius-sm);
    padding: 4px 8px;
    font-family: var(--bn-font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--bn-text-primary);
    box-shadow: 0 2px 0 var(--bn-border-default);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.bn-toast-container {
    position: fixed;
    top: 90px;
    right: 24px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: var(--bn-space-sm);
    pointer-events: none;
}

.bn-toast {
    background: var(--bn-bg-primary);
    border: 1px solid var(--bn-border-subtle);
    border-radius: var(--bn-radius-md);
    padding: 14px 18px;
    box-shadow: var(--bn-shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: all;
    animation: bn-toast-in 0.4s var(--bn-transition-spring);
    min-width: 280px;
    max-width: 360px;
}

@keyframes bn-toast-in {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.bn-toast.success {
    border-left: 3px solid var(--bn-success);
}

.bn-toast-icon {
    width: 20px;
    height: 20px;
    color: var(--bn-success);
    flex-shrink: 0;
}

.bn-toast-message {
    flex: 1;
    font-size: 14px;
    color: var(--bn-text-primary);
    font-weight: 500;
}

/* ============================================
   HEADER EMBEDDED STYLES (APPSUMO STYLE)
   ============================================ */

.bn-header-embedded {
    position: relative;
    z-index: 9999;
}

.bn-header-embedded .bn-trigger {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bn-bg-elevated);
    border: 1px solid var(--bn-border-subtle);
    box-shadow: var(--bn-shadow-sm);
    transition: all var(--bn-transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.bn-header-embedded .bn-trigger:hover {
    background: var(--bn-bg-secondary);
    border-color: var(--bn-accent);
    box-shadow: var(--bn-shadow-glow);
    transform: scale(1.05);
}

.bn-header-embedded .bn-trigger .bn-icon {
    width: 20px;
    height: 20px;
    color: var(--bn-text-secondary);
}

.bn-header-embedded .bn-trigger.bn-has-unread .bn-icon {
    color: var(--bn-accent);
}

.bn-header-embedded .bn-counter {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--bn-accent);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.bn-header-embedded .bn-trigger-glow,
.bn-header-embedded .bn-trigger-bg {
    display: none;
}

/* Header position variations */
.bn-position-top-right {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10001;
}

.bn-position-top-left {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 10001;
}

.bn-position-bottom-right {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10001;
}

.bn-position-bottom-left {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 10001;
}

/* Hide notification titles in slider panel and archive */
.bn-notifications-list[data-hide-titles="true"] .bn-notif-card .bn-notif-content h4 {
    display: none !important;
}

.bn-notifications-list[data-hide-titles="true"] .bn-notif-card .bn-notif-content .bn-notif-text {
    padding-top: 0 !important;
}

/* Archive page - hide titles */
.bn-archive-list[data-hide-titles="true"] .bn-archive-card h3 {
    display: none !important;
}

/* ============================================
   GUEST USER INDICATOR
   ============================================ */

.bn-guest-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--bn-bg-tertiary);
    border-radius: var(--bn-radius-full);
    font-size: 11px;
    color: var(--bn-text-muted);
    margin-left: 8px;
}

.bn-guest-badge svg {
    width: 12px;
    height: 12px;
}

/* ============================================
   COMPACT MODE FOR HEADER INTEGRATION
   ============================================ */

.bn-compact .bn-notif-card {
    padding: 12px 16px;
}

.bn-compact .bn-notif-img {
    width: 36px;
    height: 36px;
}

.bn-compact .bn-notif-badge {
    font-size: 10px;
    padding: 2px 8px;
}

.bn-compact .bn-notif-text {
    font-size: 13px;
    line-height: 1.5;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 640px) {
    .bn-panel {
        width: 100%;
        max-width: 100%;
    }

    .bn-trigger {
        width: 48px;
        height: 48px;
    }

    .bn-trigger svg {
        width: 22px;
        height: 22px;
    }

    .bn-notification-image-wrap {
        height: 160px;
    }

    .bn-toast-container {
        left: 16px;
        right: 16px;
        top: auto;
        bottom: 80px;
    }

    .bn-toast {
        max-width: 100%;
    }
}

/* Dark mode specific adjustments */
[data-theme="dark"] .bn-skeleton-shine {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .bn-backdrop {
        backdrop-filter: none;
    }
}

/* Focus visible */
.bn-trigger:focus-visible,
.bn-btn-icon:focus-visible,
.bn-filter:focus-visible,
.bn-btn-primary:focus-visible,
.bn-btn-ghost:focus-visible {
    outline: 2px solid var(--bn-accent);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --bn-border-subtle: #000;
        --bn-border-default: #000;
        --bn-glass-bg: #fff;
    }

    [data-theme="dark"] {
        --bn-border-subtle: #fff;
        --bn-border-default: #fff;
        --bn-glass-bg: #000;
    }
}


/* ============================================
   FILTER FUNCTIONALITY - FIXED
   ============================================ */

/* Filter States */
.bn-notifications-list[data-filter="unread"] .bn-notification.read,
.bn-notifications-list[data-filter="pinned"] .bn-notification:not(.pinned),
.bn-notifications-list[data-filter="last-call"] .bn-notification:not([data-urgency="urgent"]):not([data-urgency="soon"]) {
    display: none !important;
}

/* Active Filter Indicator Animation */
.bn-filter {
    position: relative;
    overflow: hidden;
}

.bn-filter::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bn-accent);
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: -1;
    border-radius: var(--bn-radius-full);
}

.bn-filter.active::before {
    opacity: 1;
    transform: scaleX(1);
}

/* Filter Badge Counts */
.bn-filter[data-count]::after {
    content: attr(data-count);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    background: var(--bn-accent);
    color: white;
    border-radius: var(--bn-radius-full);
    font-size: 10px;
    font-weight: 700;
    margin-left: 6px;
    animation: bn-pop-in 0.3s var(--bn-transition-spring);
}

@keyframes bn-pop-in {
    0% { transform: scale(0); }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Empty State for Filters */
.bn-content.filter-empty::after {
    content: attr(data-empty-message);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--bn-text-secondary);
    font-size: 14px;
    text-align: center;
}

/* Smooth filter transitions */
.bn-notification {
    transition: all 0.3s ease, opacity 0.2s ease, transform 0.3s ease;
}

.bn-notification.filter-hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Search Results Header */
.bn-search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bn-bg-tertiary);
    border-radius: var(--bn-radius-md);
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--bn-text-secondary);
}

.bn-search-results-header strong {
    color: var(--bn-text-primary);
}

.bn-clear-search {
    background: none;
    border: none;
    color: var(--bn-accent);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--bn-radius-sm);
    transition: background 0.2s;
}

.bn-clear-search:hover {
    background: var(--bn-accent-light);
}

/* ============================================
   ADDITIONAL FIXES FOR FILTERS
   ============================================ */

/* Ensure filter buttons are clickable */
.bn-filter {
    position: relative;
    z-index: 1;
    cursor: pointer;
    user-select: none;
}

/* Active filter highlight in dropdown */
.bn-filter-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bn-bg-primary);
    border: 1px solid var(--bn-border-subtle);
    border-radius: var(--bn-radius-md);
    box-shadow: var(--bn-shadow-lg);
    z-index: 100;
    margin-top: 8px;
    overflow: hidden;
}

.bn-filter-dropdown.active {
    display: block;
}

.bn-filter-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bn-filter-option:hover {
    background: var(--bn-bg-secondary);
}

.bn-filter-option.active {
    background: var(--bn-accent-light);
    color: var(--bn-accent);
    font-weight: 600;
}

/* Missing Toggle Switch Styles */
.bn-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.bn-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.bn-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bn-bg-tertiary);
    border: 1px solid var(--bn-border-subtle);
    transition: .4s;
    border-radius: 34px;
}

.bn-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.bn-toggle input:checked + .bn-toggle-slider {
    background-color: var(--bn-accent);
    border-color: var(--bn-accent);
}

.bn-toggle input:checked + .bn-toggle-slider:before {
    transform: translateX(22px);
}

/* Fix search bar visibility */
.bn-search-bar {
    /* display: none; */
    align-items: center;
    gap: 8px;
    /* padding: 10px 14px; */
    /* background: var(--bn-bg-secondary); */
    /* border: 1px solid var(--bn-border-subtle); */
    /* border-radius: var(--bn-radius-md); */
    /* margin-bottom: 16px; */
}

.bn-search-bar.active {
    display: flex;
}

.bn-search-bar svg {
    width: 16px;
    height: 16px;
    color: var(--bn-text-tertiary);
    flex-shrink: 0;
}

.bn-search-input {
    flex: 1;
    padding: 0.5rem 2.5rem;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: var(--bn-text-primary);
    font-family: inherit;
}

.bn-search-input::placeholder {
    color: var(--bn-text-tertiary);
}

.bn-search-clear {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--bn-text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bn-search-clear:hover {
    color: var(--bn-text-primary);
}

/* More dropdown styles */
.bn-more-dropdown {
    background: var(--bn-bg-primary);
    border: 1px solid var(--bn-border-subtle);
    border-radius: 8px;
    box-shadow: var(--bn-shadow-xl);
    padding: 8px 0;
    min-width: 180px;
    z-index: 10001;
}

.bn-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--bn-text-primary);
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}

.bn-dropdown-item:hover {
    background: var(--bn-bg-secondary);
}

.bn-dropdown-item svg {
    width: 16px;
    height: 16px;
    color: var(--bn-text-secondary);
}

/* Selected card state for keyboard nav */
.bn-notification.selected {
    outline: 2px solid var(--bn-accent);
    outline-offset: 2px;
}

/* Toast styles */
.bn-toast {
    background: var(--bn-bg-primary);
    border: 1px solid var(--bn-border-subtle);
    border-radius: var(--bn-radius-md);
    padding: 14px 18px;
    box-shadow: var(--bn-shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: bn-toast-in 0.4s var(--bn-transition-spring);
    min-width: 280px;
    margin-bottom: 8px;
}

@keyframes bn-toast-in {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.bn-toast.success {
    border-left: 3px solid var(--bn-success);
}

.bn-toast-icon {
    width: 20px;
    height: 20px;
    color: var(--bn-success);
    flex-shrink: 0;
}

.bn-toast-message {
    flex: 1;
    font-size: 14px;
    color: var(--bn-text-primary);
    font-weight: 500;
}

/* ============================================
   HEADER EMBEDDED STYLES (APPSUMO STYLE)
   ============================================ */

.bn-header-embedded {
    position: relative;
    z-index: 9999;
}

.bn-header-embedded .bn-trigger {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bn-bg-elevated);
    border: 1px solid var(--bn-border-subtle);
    box-shadow: var(--bn-shadow-sm);
    transition: all var(--bn-transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.bn-header-embedded .bn-trigger:hover {
    background: var(--bn-bg-secondary);
    border-color: var(--bn-accent);
    box-shadow: var(--bn-shadow-glow);
    transform: scale(1.05);
}

.bn-header-embedded .bn-trigger .bn-icon {
    width: 20px;
    height: 20px;
    color: var(--bn-text-secondary);
}

.bn-header-embedded .bn-trigger.bn-has-unread .bn-icon {
    color: var(--bn-accent);
}

.bn-header-embedded .bn-counter {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--bn-accent);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.bn-header-embedded .bn-trigger-glow,
.bn-header-embedded .bn-trigger-bg {
    display: none;
}

/* Header position variations */
.bn-position-top-right {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10001;
}

.bn-position-top-left {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 10001;
}

.bn-position-bottom-right {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10001;
}

.bn-position-bottom-left {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 10001;
}

/* Hide notification titles in slider panel and archive */
.bn-notifications-list[data-hide-titles="true"] .bn-notif-card .bn-notif-content h4 {
    display: none !important;
}

.bn-notifications-list[data-hide-titles="true"] .bn-notif-card .bn-notif-content .bn-notif-text {
    padding-top: 0 !important;
}

/* Archive page - hide titles */
.bn-archive-list[data-hide-titles="true"] .bn-archive-card h3 {
    display: none !important;
}

/* ============================================
   GUEST USER INDICATOR
   ============================================ */

.bn-guest-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--bn-bg-tertiary);
    border-radius: var(--bn-radius-full);
    font-size: 11px;
    color: var(--bn-text-muted);
    margin-left: 8px;
}

.bn-guest-badge svg {
    width: 12px;
    height: 12px;
}

/* ============================================
   COMPACT MODE FOR HEADER INTEGRATION
   ============================================ */

.bn-compact .bn-notif-card {
    padding: 12px 16px;
}

.bn-compact .bn-notif-img {
    width: 36px;
    height: 36px;
}

.bn-compact .bn-notif-badge {
    font-size: 10px;
    padding: 2px 8px;
}

.bn-compact .bn-notif-text {
    font-size: 13px;
    line-height: 1.5;
}

/* Mobile fixes */
@media (max-width: 640px) {
    .bn-panel {
        width: 100%;
    }

    .bn-more-dropdown {
        position: fixed !important;
        top: auto !important;
        bottom: 20px;
        left: 20px;
        right: 20px;
    }
}

/* ============================================
   FIX 2 & 3: Enhanced Search Field & Header Icons
   ============================================ */

/* Search Field with Icons Inside */
.bn-search-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bn-bg-secondary);
    border: 2px solid var(--bn-border-subtle);
    border-radius: var(--bn-radius-md);
    transition: all var(--bn-transition-fast);
}

.bn-search-field-wrapper:focus-within {
    border-color: var(--bn-accent);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

.bn-search-icon-left {
    position: absolute;
    left: 14px;
    color: var(--bn-text-tertiary);
    pointer-events: none;
    z-index: 1;
}

.bn-search-input {
    /* width: 100%; */
    padding: 12px 44px 12px 44px !important;
    /* border: none; */
    /* background: transparent; */
    /* font-size: 15px; */
    /* color: var(--bn-text-primary); */
    /* font-family: inherit; */
    /* outline: none; */
}

.bn-search-input::placeholder {
    color: var(--bn-text-tertiary);
}

.bn-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bn-bg-tertiary);
    border: none;
    border-radius: var(--bn-radius-full);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--bn-text-secondary);
    transition: all var(--bn-transition-fast);
}

.bn-search-clear:hover {
    background: var(--bn-border-default);
    color: var(--bn-text-primary);
}

.bn-search-clear svg {
    width: 14px;
    height: 14px;
}

/* Enhanced Header Buttons */
.bn-header-actions {
    display: flex;
    gap: 10px;
}

.bn-btn-icon {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--bn-bg-secondary);
    border-radius: var(--bn-radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bn-text-secondary);
    transition: all var(--bn-transition-fast);
    position: relative;
}

.bn-btn-icon:hover {
    background: var(--bn-bg-tertiary);
    color: var(--bn-text-primary);
    transform: translateY(-2px);
    box-shadow: var(--bn-shadow-md);
}

.bn-btn-icon:active {
    transform: scale(0.95);
}

.bn-btn-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}

/* Tooltip-like title enhancement */
.bn-btn-icon[title] {
    position: relative;
}

/* Remove old styles that conflict */
.bn-search-bar svg.bn-icon-xs {
    display: none;
}

.bn-search-bar > .bn-search-clear {
    display: none;
}

/* ============================================
   FIX 4: Sound Test Button Styling
   ============================================ */

.bn-test-sound-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--bn-bg-tertiary), var(--bn-bg-secondary));
    border: 1px solid var(--bn-border-default);
    border-radius: var(--bn-radius-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--bn-text-secondary);
    cursor: pointer;
    transition: all var(--bn-transition-fast);
    white-space: nowrap;
}

.bn-test-sound-btn:hover {
    background: var(--bn-accent-gradient);
    color: white;
    border-color: var(--bn-accent);
    transform: translateY(-1px);
    box-shadow: var(--bn-shadow-accent);
}

.bn-test-sound-btn:active {
    transform: scale(0.95);
}

/* Fix setting item layout for sound section */
.bn-setting-item {
    flex-wrap: wrap;
    gap: 12px;
}

.bn-setting-item > div:first-child {
    flex: 1;
    min-width: 200px;
}

/* Ensure toggle switches are properly styled */
.bn-toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.bn-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.bn-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bn-bg-tertiary);
    border: 2px solid var(--bn-border-subtle);
    transition: .3s;
    border-radius: 34px;
}

.bn-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.bn-toggle input:checked + .bn-toggle-slider {
    background-color: var(--bn-accent);
    border-color: var(--bn-accent);
}

.bn-toggle input:checked + .bn-toggle-slider:before {
    transform: translateX(24px);
}

/* Fix settings modal display */
.bn-settings-modal {
    background: var(--bn-bg-primary) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* ============================================
   SOUND SELECTOR STYLES
   ============================================ */

.bn-sound-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bn-sound-option {
    padding: 8px 14px;
    background: var(--bn-bg-secondary);
    border: 2px solid var(--bn-border-subtle);
    border-radius: var(--bn-radius-md);
    font-size: 13px;
    color: var(--bn-text-secondary);
    cursor: pointer;
    transition: all var(--bn-transition-fast);
    font-family: inherit;
}

.bn-sound-option:hover {
    background: var(--bn-bg-tertiary);
    border-color: var(--bn-border-default);
    color: var(--bn-text-primary);
    transform: translateY(-1px);
}

.bn-sound-option.active {
    background: var(--bn-accent-light);
    border-color: var(--bn-accent);
    color: var(--bn-accent);
    font-weight: 600;
}

.bn-sound-option:active {
    transform: scale(0.98);
}

.bn-test-sound-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--bn-bg-tertiary), var(--bn-bg-secondary));
    border: 1px solid var(--bn-border-default);
    border-radius: var(--bn-radius-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--bn-text-secondary);
    cursor: pointer;
    transition: all var(--bn-transition-fast);
    white-space: nowrap;
}

.bn-test-sound-btn:hover {
    background: var(--bn-accent-gradient);
    color: white;
    border-color: var(--bn-accent);
    transform: translateY(-1px);
    box-shadow: var(--bn-shadow-accent);
}

.bn-test-sound-btn:active {
    transform: scale(0.95);
}

/* ============================================
   EXTRA SPACING FOR PANEL HEADER
   ============================================ */

/* Add spacing between search bar and filters */
.bn-search-bar {
    margin-bottom: 16px;
}

/* Add spacing between filters and content */
.bn-filters {
    margin-top: 12px;
    padding-bottom: 4px;
}

/* ============================================
   EXTRA SPACING AND HEADER VISIBILITY FIX
   ============================================ */

/* Increase panel header padding for better visibility */
.bn-panel-header {
    padding: 24px 20px 20px 20px !important;
    background: linear-gradient(to bottom, var(--bn-bg-primary) 80%, transparent) !important;
    border-bottom: 1px solid var(--bn-border-subtle) !important;
    /* z-index: 100 !important; */
    position: relative;
    flex-shrink: 0;
}

/* Ensure header-top has proper spacing */
.bn-header-top {
    margin-bottom: 20px !important;
}

/* Add more spacing between search bar and filters */
.bn-search-bar {
    margin-bottom: 20px !important;
}

/* Add more spacing between filters and content area */
.bn-filters {
    margin-top: 16px !important;
    padding-bottom: 8px !important;
}

/* Ensure content area doesn't overlap header */
.bn-content {
    padding: 20px !important;
    flex: 1;
    overflow-y: auto;
    background: var(--bn-bg-secondary);
}

/* Ensure panel has proper flex layout */
.bn-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Ensure panel content area is properly sized */
.bn-panel .bn-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

/* Fix for admin bar overlap */
.admin-bar .bn-panel {
    top: 32px !important;
    height: calc(100vh - 32px) !important;
}

/* Extra top spacing for header area */
.bn-panel-header::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.05), transparent);
    pointer-events: none;
}

/* ============================================
   SEARCH FIELD ICONS - FIXED POSITIONING
   ============================================ */

.bn-search-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bn-bg-secondary);
    border: 2px solid var(--bn-border-subtle);
    border-radius: var(--bn-radius-md);
    transition: all var(--bn-transition-fast);
}

.bn-search-field-wrapper:focus-within {
    border-color: var(--bn-accent);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

.bn-search-icon-left {
    position: absolute;
    left: 14px;
    color: var(--bn-text-tertiary);
    pointer-events: none;
    z-index: 1;
    width: 18px;
    height: 18px;
}

.bn-search-input {
    /* width: 100%; */
    /* padding: 12px 44px 12px 44px; */
    /* border: none; */
    background: transparent;
    font-size: 15px;
    color: var(--bn-text-primary);
    font-family: inherit;
    outline: none;
}

.bn-search-input::placeholder {
    color: var(--bn-text-tertiary);
}

.bn-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bn-bg-tertiary);
    border: none;
    border-radius: var(--bn-radius-full);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--bn-text-secondary);
    transition: all var(--bn-transition-fast);
}

.bn-search-clear:hover {
    background: var(--bn-border-default);
    color: var(--bn-text-primary);
}

.bn-search-clear svg {
    width: 14px;
    height: 14px;
}

.bn-search-clear.visible {
    display: flex;
}

/* ============================================
   FILTER NAVIGATION STABILITY
   ============================================ */

/* Prevent filter clicks from propagating */
.bn-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
    position: relative;
    z-index: 5;
}

.bn-filters::-webkit-scrollbar {
    display: none;
}

.bn-filter {
    padding: 8px 16px;
    border: 1px solid var(--bn-border-subtle);
    background: transparent;
    color: var(--bn-text-secondary);
    border-radius: var(--bn-radius-full);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--bn-transition-fast);
    font-family: inherit;
    position: relative;
    z-index: 1;
}

.bn-filter:hover {
    border-color: var(--bn-border-default);
    color: var(--bn-text-primary);
    background: var(--bn-bg-secondary);
}

.bn-filter.active {

    color: var(--bn-bg-primary);

}

/* Ensure panel stays open during filter interaction */
.bn-panel.active {
    transform: translateX(0);
}

/* ============================================
   SETTINGS PERSISTENCE IMPROVEMENTS
   ============================================ */

/* Ensure toggle switches persist visually */
.bn-toggle input:checked + .bn-toggle-slider {
    background: var(--bn-accent);
    border-color: var(--bn-accent);
}

.bn-toggle input:checked + .bn-toggle-slider::before {
    transform: translateX(22px);
}

/* Smooth transitions for preference changes */
.bn-setting-item {
    transition: background 0.2s ease;
}

.bn-setting-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Toast notification improvements */
.bn-toast {
    background: var(--bn-bg-primary);
    border: 1px solid var(--bn-border-subtle);
    border-radius: var(--bn-radius-md);
    padding: 14px 18px;
    box-shadow: var(--bn-shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: all;
    animation: bn-toast-in 0.4s var(--bn-transition-spring);
    min-width: 280px;
    max-width: 360px;
}

@keyframes bn-toast-in {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.bn-toast.success {
    border-left: 3px solid var(--bn-success);
}

.bn-toast-icon {
    width: 20px;
    height: 20px;
    color: var(--bn-success);
    flex-shrink: 0;
}

.bn-toast-message {
    flex: 1;
    font-size: 14px;
    color: var(--bn-text-primary);
    font-weight: 500;
}

/* ============================================
   HEADER EMBEDDED STYLES (APPSUMO STYLE)
   ============================================ */

.bn-header-embedded {
    position: relative;
    z-index: 9999;
}

.bn-header-embedded .bn-trigger {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bn-bg-elevated);
    border: 1px solid var(--bn-border-subtle);
    box-shadow: var(--bn-shadow-sm);
    transition: all var(--bn-transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.bn-header-embedded .bn-trigger:hover {
    background: var(--bn-bg-secondary);
    border-color: var(--bn-accent);
    box-shadow: var(--bn-shadow-glow);
    transform: scale(1.05);
}

.bn-header-embedded .bn-trigger .bn-icon {
    width: 20px;
    height: 20px;
    color: var(--bn-text-secondary);
}

.bn-header-embedded .bn-trigger.bn-has-unread .bn-icon {
    color: var(--bn-accent);
}

.bn-header-embedded .bn-counter {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--bn-accent);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.bn-header-embedded .bn-trigger-glow,
.bn-header-embedded .bn-trigger-bg {
    display: none;
}

/* Header position variations */
.bn-position-top-right {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10001;
}

.bn-position-top-left {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 10001;
}

.bn-position-bottom-right {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10001;
}

.bn-position-bottom-left {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 10001;
}

/* Hide notification titles in slider panel and archive */
.bn-notifications-list[data-hide-titles="true"] .bn-notif-card .bn-notif-content h4 {
    display: none !important;
}

.bn-notifications-list[data-hide-titles="true"] .bn-notif-card .bn-notif-content .bn-notif-text {
    padding-top: 0 !important;
}

/* Archive page - hide titles */
.bn-archive-list[data-hide-titles="true"] .bn-archive-card h3 {
    display: none !important;
}

/* ============================================
   GUEST USER INDICATOR
   ============================================ */

.bn-guest-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--bn-bg-tertiary);
    border-radius: var(--bn-radius-full);
    font-size: 11px;
    color: var(--bn-text-muted);
    margin-left: 8px;
}

.bn-guest-badge svg {
    width: 12px;
    height: 12px;
}

/* ============================================
   COMPACT MODE FOR HEADER INTEGRATION
   ============================================ */

.bn-compact .bn-notif-card {
    padding: 12px 16px;
}

.bn-compact .bn-notif-img {
    width: 36px;
    height: 36px;
}

.bn-compact .bn-notif-badge {
    font-size: 10px;
    padding: 2px 8px;
}

.bn-compact .bn-notif-text {
    font-size: 13px;
    line-height: 1.5;
}

/* ============================================
   BELL POSITION STYLES (ADDITIONAL)
   ============================================ */
.bn-position-floating {
    /* Default floating position - same as top-right */
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10001;
}

.bn-position-site-header {
    /* Site header embedded position */
    position: relative;
    z-index: 10001;
}

.bn-position-site-header .bn-trigger {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    margin: 0;
}

#bn-header-bell-container {
    display: inline-block;
    vertical-align: middle;
}