/* Notification bell, dropdown, list page and toasts. Shared by the CRM (--aim) and the website (--brand). */
.notif { --nb: var(--aim, var(--brand, #0b6e7f)); --nb-soft: var(--aim-soft, var(--brand-soft, #e6f4f6)); position: relative; }
.notif-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem;
             padding: 0; border: 0; border-radius: .75rem; background: transparent; color: inherit; font-size: 1.2rem; }
.notif-btn:hover, .notif-btn:focus-visible, .notif.show .notif-btn { background: var(--nb-soft); color: var(--nb); }
.notif-btn::after { display: none; }
.notif-count { position: absolute; top: .15rem; right: .1rem; min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; border-radius: 999px;
               background: #e5484d; color: #fff; font-size: .68rem; font-weight: 700; line-height: 1.15rem; text-align: center;
               box-shadow: 0 0 0 2px #fff; }
.notif-count[hidden] { display: none; }
.notif-has-new .notif-btn i { animation: notif-ring 1.2s ease 1; transform-origin: 50% 10%; }
@keyframes notif-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } }

.notif-menu { width: min(24rem, calc(100vw - 1.5rem)); padding: 0; border: 1px solid rgba(16, 24, 40, .08); border-radius: 1rem; overflow: hidden;
              box-shadow: 0 18px 48px rgba(16, 24, 40, .16) !important; }
.notif-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .85rem 1rem .7rem; border-bottom: 1px solid rgba(16, 24, 40, .07); }
.notif-head strong { font-size: .95rem; }
.notif-head .btn-link { padding: 0; font-size: .8rem; font-weight: 600; text-decoration: none; color: var(--nb); }
.notif-perm { display: flex; align-items: center; gap: .6rem; margin: .6rem .75rem 0; padding: .6rem .75rem; border-radius: .75rem;
              background: var(--nb-soft); font-size: .8rem; line-height: 1.3; }
.notif-perm[hidden] { display: none; }
.notif-perm i { color: var(--nb); font-size: 1.1rem; }
.notif-perm .btn { margin-left: auto; white-space: nowrap; }
.notif-denied { background: #fff6e5; }
.notif-denied i { color: #b26a00; }
.notif-list { max-height: min(26rem, 60vh); overflow-y: auto; padding: .35rem 0; }
.notif-item, .notif-toast { display: flex; align-items: flex-start; gap: .7rem; padding: .65rem 1rem; color: inherit; text-decoration: none; position: relative; }
.notif-item:hover, .notif-item:focus-visible { background: #f4f8fa; color: inherit; }
.notif-item.unread { background: color-mix(in srgb, var(--nb-soft) 55%, transparent); }
.notif-ic { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; border-radius: .65rem;
            background: var(--nb-soft); color: var(--nb); font-size: 1rem; }
.notif-txt { display: flex; flex-direction: column; min-width: 0; gap: .1rem; flex: 1; }
.notif-txt b { font-size: .85rem; font-weight: 600; line-height: 1.3; }
.notif-body { font-size: .8rem; color: #607080; line-height: 1.35; overflow-wrap: anywhere; }
.notif-time { font-size: .72rem; color: #8494a3; }
.notif-dot { flex-shrink: 0; width: .55rem; height: .55rem; margin-top: .4rem; border-radius: 50%; background: var(--nb); }
.notif-empty { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: 2rem 1rem; text-align: center; color: #607080; font-size: .85rem; }
.notif-empty i { font-size: 1.8rem; color: #b6c3cc; margin-bottom: .3rem; }
.notif-empty b { color: #13293a; }
.notif-foot { display: block; padding: .7rem; text-align: center; font-size: .85rem; font-weight: 600; text-decoration: none; color: var(--nb);
              border-top: 1px solid rgba(16, 24, 40, .07); }
.notif-foot:hover { background: #f4f8fa; }

/* in-page toasts (used when desktop alerts are off, or the tab is in front) */
.notif-toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 1090; display: flex; flex-direction: column; gap: .6rem; width: min(22rem, calc(100vw - 2rem)); }
.notif-toast { --nb: var(--aim, var(--brand, #0b6e7f)); --nb-soft: var(--aim-soft, var(--brand-soft, #e6f4f6));
               background: #fff; border-radius: .9rem; border: 1px solid rgba(16, 24, 40, .08); box-shadow: 0 14px 36px rgba(16, 24, 40, .18);
               animation: notif-in .35s ease both; }
.notif-toast:hover { color: inherit; box-shadow: 0 16px 40px rgba(16, 24, 40, .24); }
.notif-toast.out { animation: notif-out .35s ease both; }
@keyframes notif-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes notif-out { to { opacity: 0; transform: translateY(12px); } }

/* full list page */
.notif-page { max-width: 52rem; }
.notif-page .notif-item { border-radius: .8rem; padding: .85rem 1rem; }
.notif-page .notif-list { max-height: none; padding: .25rem; }
.notif-page .notif-day { padding: .9rem 1rem .3rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8494a3; }

@media (prefers-reduced-motion: reduce) {
    .notif-has-new .notif-btn i, .notif-toast, .notif-toast.out { animation: none; }
}
