.notification-bell-btn {
    position: relative;
    color: #3f6ad8;
    padding: 5px;
    display: inline-block;
}

.notification-bell-btn:hover {
    color: #2955c8;
    text-decoration: none;
}

/* Bell ringing/shaking animation when there are unread notifications */
.notification-bell-btn .bell-ringing,
.notification-bell-btn.has-unread i.fa-bell {
    display: inline-block;
    transform-origin: top center;
    animation: bell-shake 2.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
    color: #ea580c; /* Deep Ripe Orange */
    filter: drop-shadow(0 2px 5px rgba(234, 88, 12, 0.4));
}

@keyframes bell-shake {
    0% { transform: rotate(0); }
    4% { transform: rotate(18deg); }
    8% { transform: rotate(-18deg); }
    12% { transform: rotate(14deg); }
    16% { transform: rotate(-14deg); }
    20% { transform: rotate(10deg); }
    24% { transform: rotate(-8deg); }
    28% { transform: rotate(5deg); }
    32% { transform: rotate(-3deg); }
    36% { transform: rotate(1deg); }
    40% { transform: rotate(0); }
    100% { transform: rotate(0); }
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -9px;
    min-width: 16px;
    height: 18px;
    border-radius: 50%;
    background: #d92550;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 2px solid #fff;
    line-height: 1;
    z-index: 2;
}

.notification-badge.has-alert::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: rgba(217, 37, 80, 0.28);
    z-index: -1;
    animation: notification-ping 1.8s ease-out infinite;
}

@keyframes notification-ping {
    0% {
        transform: scale(0.9);
        opacity: 0.8;
    }

    70% {
        transform: scale(1.85);
        opacity: 0;
    }

    100% {
        transform: scale(1.85);
        opacity: 0;
    }
}

/* Notifications Dropdown Styling */
.notifications-dropdown-menu {
    width: 380px;
    padding: 0;
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    margin-top: 10px !important;
    z-index: 1050 !important;
}

/* Ensure fixed header navbar stays above all page content when scrolling */
.fixed-header .app-header {
    z-index: 9999 !important;
    position: fixed !important;
    top: 0;
    width: 100%;
    pointer-events: auto !important;
}

.app-header__content, .app-header__logo, .app-header__menu {
    pointer-events: auto !important;
}

/* Ensure dropdowns within the header are also prioritized */
.app-header .dropdown-menu {
    z-index: 10000 !important;
}

/* Prevent main content area and footer from overlapping the fixed header */
.app-main {
    position: relative;
    z-index: 1 !important;
}

/* Fix for ArchitectUI: Ensure the outer wrapper doesn't create a stacking context that hides the header */
.app-main__outer {
    position: relative;
    z-index: 1 !important;
    transform: none !important; /* Remove any transforms that might create new stacking contexts */
}

.app-wrapper-footer {
    z-index: 1 !important;
}

.app-sidebar {
    z-index: 1020 !important;
}

/* Fix click coordinate mismatch caused by zoom:90% on body.
    zoom on body shifts pointer event coordinates vs visual position.
    Override to zoom:1 and use transform instead for visual scaling. */
html, body {
    -moz-transform: none !important;
    zoom: 1 !important;
}

.notifications-header {
    background: #f8f9fa;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-header h6 {
    margin: 0;
    font-weight: 700;
    color: #333;
}

.notifications-body {
    max-height: 350px;
    overflow-y: auto;
    padding: 8px 0;
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f1f1;
    transition: background 0.2s;
    display: block;
    text-decoration: none !important;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: #f8faff;
}

.notification-item.unread {
    background: #f0f4ff;
}

.notification-title {
    font-weight: 700;
    color: #25304a;
    margin-bottom: 2px;
    font-size: 14px;
}

.notification-text {
    color: #5d6a82;
    font-size: 13px;
    margin-bottom: 6px;
    line-height: 1.4;
}

.notification-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-time {
    color: #999;
    font-size: 11px;
}

.mark-as-read-btn {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
}

.notifications-footer {
    padding: 10px;
    text-align: center;
    border-top: 1px solid #eee;
    background: #fff;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.view-all-btn {
    font-weight: 700;
    font-size: 12px;
    color: #3f6ad8;
}

/* Global Theme Overrides to ensure Dark Blue consistency */
:root {
    --primary: #213368;
}

.bg-primary {
    background-color: #213368 !important;
}

.text-primary {
    color: #213368 !important;
}

.btn-primary {
    background-color: #213368 !important;
    border-color: #213368 !important;
}

.btn-outline-primary {
    color: #213368 !important;
    border-color: #213368 !important;
}

.btn-outline-primary:hover {
    background-color: #213368 !important;
    color: #fff !important;
}

.app-header-title {
    display: flex;
    align-items: center;
    min-height: 42px;
    margin-right: 18px;
    padding-right: 18px;
    border-right: 1px solid rgba(33, 51, 104, 0.12);
}

.app-header-title__text {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #213368;
    line-height: 1.2;
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    .app-header-title {
        display: none;
    }
}

/* Sidebar heading specifically */
.app-sidebar__heading {
    color: #213368 !important;
    opacity: 0.8;
}

/* Header Logo exact styling matching Laravel */
.app-header__logo .logo-src,
.logo-src {
    background-image: url('/images/logo-inverse.png') !important;
    background-repeat: no-repeat !important;
    background-position: left center !important;
    background-size: contain !important;
    width: 140px !important;
    height: 42px !important;
}