/**
 * Navbar User Block V2
 * Redesign du bloc utilisateur dans la navbar (frontend uniquement)
 */

/* ==========================================================================
   User block container
   ========================================================================== */
.nb-user-block {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

/* ==========================================================================
   Icon buttons (notification bell)
   ========================================================================== */
.nb-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    color: rgba(255, 255, 255, 0.65);
    padding: 0;
    font-size: 17px;
}

.nb-icon-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* Badge positionné en haut à gauche du user trigger */
.nb-user-trigger .nb-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--dh-danger, #ef4444);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #000060;
    font-family: 'JetBrains Mono', monospace;
    animation: nbPulse 2s ease infinite;
    padding: 0 3px;
    z-index: 2;
}

@keyframes nbPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ==========================================================================
   Divider
   ========================================================================== */
.nb-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 4px;
}

/* ==========================================================================
   User trigger
   ========================================================================== */
.nb-user-wrap {
    position: relative;
}

.nb-notif-wrap {
    position: relative;
}

.nb-user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 4px 4px;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    position: relative;
}

.nb-user-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.nb-user-trigger.open {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Avatar */
.nb-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a7cff, #7c5cff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.15);
    position: relative;
    font-family: 'DM Sans', sans-serif;
}

/* Avatar avec image */
.nb-avatar-img {
    padding: 0;
    overflow: hidden;
}

.nb-avatar-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.nb-avatar-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--dh-success, #22c55e);
    border: 2px solid #000060;
}

/* User meta (name + clock) */
.nb-user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.nb-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    font-family: 'DM Sans', sans-serif;
}

.nb-user-clock {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.45);
    display: flex;
    align-items: center;
    gap: 4px;
}

.nb-tz-flag {
    font-size: 11px;
}

.nb-tz-name {
    color: #fff;
    opacity: 0.85;
}

/* Chevron */
.nb-chevron {
    color: #fff;
    transition: transform 0.3s ease;
    margin-left: 2px;
    font-size: 12px;
}

.nb-user-trigger.open .nb-chevron {
    transform: rotate(180deg);
}

/* ==========================================================================
   Dropdown panels (shared)
   ========================================================================== */
.nb-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--dh-surface, #ffffff);
    border: 1px solid var(--dh-border-light, #eef1f6);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(30, 42, 74, 0.15);
    z-index: 1060;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.nb-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* ==========================================================================
   Notification dropdown
   ========================================================================== */
.nb-notif-dropdown {
    width: 360px;
}

.nb-notif-header {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--dh-border-light, #eef1f6);
}

.nb-notif-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--dh-text-primary, #1a2138);
    font-family: 'DM Sans', sans-serif;
}

.nb-notif-mark-read {
    font-size: 12px;
    font-weight: 500;
    color: var(--dh-accent, #4a7cff);
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    text-decoration: none;
}

.nb-notif-mark-read:hover {
    text-decoration: underline;
    color: var(--dh-accent, #4a7cff);
}

.nb-notif-list {
    max-height: 320px;
    overflow-y: auto;
}

.nb-notif-item {
    padding: 12px 18px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-bottom: 1px solid var(--dh-border-light, #eef1f6);
    transition: background 0.15s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.nb-notif-item:last-child {
    border-bottom: none;
}

.nb-notif-item:hover {
    background: var(--dh-surface-hover, #f1f4f9);
    text-decoration: none;
    color: inherit;
}

.nb-notif-item.unread {
    background: var(--dh-accent-light, #e8efff);
}

.nb-notif-item.unread:hover {
    background: #dce6ff;
}

.nb-notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dh-accent, #4a7cff);
    flex-shrink: 0;
    margin-top: 5px;
}

.nb-notif-item:not(.unread) .nb-notif-dot {
    background: transparent;
}

.nb-notif-content {
    flex: 1;
    min-width: 0;
}

.nb-notif-text {
    font-size: 13px;
    color: var(--dh-text-primary, #1a2138);
    line-height: 1.4;
    font-family: 'DM Sans', sans-serif;
}

.nb-notif-text strong {
    font-weight: 600;
}

.nb-notif-time {
    font-size: 11px;
    color: var(--dh-text-muted, #8c95ad);
    font-family: 'JetBrains Mono', monospace;
    margin-top: 3px;
}

.nb-notif-footer {
    padding: 10px 18px;
    border-top: 1px solid var(--dh-border-light, #eef1f6);
    text-align: center;
}

.nb-notif-footer a {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--dh-accent, #4a7cff);
    text-decoration: none;
    font-family: 'DM Sans', sans-serif;
}

.nb-notif-footer a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   User dropdown
   ========================================================================== */
.nb-user-dropdown {
    width: 300px;
}

/* Header */
.nb-dd-header {
    padding: 18px 18px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--dh-border-light, #eef1f6);
}

.nb-dd-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a7cff, #7c5cff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    font-family: 'DM Sans', sans-serif;
}

/* Avatar dropdown avec image */
.nb-dd-avatar-img {
    padding: 0;
    overflow: hidden;
}

.nb-dd-avatar-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.nb-dd-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--dh-text-primary, #1a2138);
    font-family: 'DM Sans', sans-serif;
}

.nb-dd-role {
    font-size: 12px;
    color: var(--dh-text-muted, #8c95ad);
    margin-top: 1px;
    font-family: 'DM Sans', sans-serif;
}

/* Timezone */
.nb-dd-tz-section {
    padding: 12px 18px;
    border-bottom: 1px solid var(--dh-border-light, #eef1f6);
}

.nb-dd-tz-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--dh-text-muted, #8c95ad);
    margin-bottom: 8px;
    font-family: 'DM Sans', sans-serif;
}

.nb-tz-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.nb-tz-option {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--dh-text-secondary, #5c6785);
    background: var(--dh-surface-muted, #f8f9fc);
    border: 1px solid var(--dh-border-light, #eef1f6);
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'DM Sans', sans-serif;
}

.nb-tz-option:hover {
    background: var(--dh-surface-hover, #f1f4f9);
    border-color: var(--dh-border, #e5e9f0);
    color: var(--dh-text-primary, #1a2138);
}

.nb-tz-option.active {
    background: var(--dh-accent-light, #e8efff);
    border-color: rgba(74, 124, 255, 0.2);
    color: var(--dh-accent, #4a7cff);
    font-weight: 600;
}

.nb-tz-option .nb-tz-flag {
    font-size: 13px;
}

/* Menu links */
.nb-dd-links {
    padding: 6px;
}

.nb-dd-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--dh-text-secondary, #5c6785);
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.nb-dd-link:hover {
    background: var(--dh-surface-hover, #f1f4f9);
    color: var(--dh-text-primary, #1a2138);
    text-decoration: none;
}

.nb-dd-link-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
    font-size: 15px;
}

.nb-dd-link:hover .nb-dd-link-icon {
    transform: scale(1.05);
}

.nb-dd-link-icon.blue {
    background: var(--dh-accent-light, #e8efff);
    color: var(--dh-accent, #4a7cff);
}

.nb-dd-link-icon.amber {
    background: var(--dh-warning-bg, #fffbeb);
    color: var(--dh-warning, #f59e0b);
}

.nb-dd-link-icon.purple {
    background: var(--dh-purple-bg, #f5f3ff);
    color: var(--dh-purple, #8b5cf6);
}

.nb-dd-link-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    background: var(--dh-danger, #ef4444);
    color: #fff;
    margin-left: auto;
}

/* Footer / Logout */
.nb-dd-footer {
    padding: 6px;
    border-top: 1px solid var(--dh-border-light, #eef1f6);
}

.nb-dd-link.logout {
    color: var(--dh-danger, #ef4444);
}

.nb-dd-link.logout:hover {
    background: var(--dh-danger-bg, #fef2f2);
}

.nb-dd-link.logout .nb-dd-link-icon {
    background: var(--dh-danger-bg, #fef2f2);
    color: var(--dh-danger, #ef4444);
}

/* ==========================================================================
   Help icon V2 (intgr dans le user block)
   ========================================================================== */
.nb-help-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #4ade80;
    text-decoration: none;
    font-size: 18px;
    padding: 0;
}

.nb-help-btn:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
    color: #86efac;
}

/* ==========================================================================
   Notification Offcanvas V2
   ========================================================================== */

/* Override Bootstrap offcanvas width */
#offcanvasNotify.nb-offcanvas-notif {
    width: 420px;
    border-left: none;
    box-shadow: -8px 0 40px rgba(30, 42, 74, 0.12);
}

#offcanvasPrefNotif.nb-offcanvas-pref {
    width: 50vw;
    border-left: none;
    box-shadow: -8px 0 40px rgba(30, 42, 74, 0.12);
}

/* ── Offcanvas Header V2 ── */
.nb-oc-header {
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--dh-border-light, #eef1f6);
    flex-shrink: 0;
}

.nb-oc-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nb-oc-header-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--dh-radius-sm, 10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.nb-oc-header-icon.amber {
    background: var(--dh-warning-bg, #fffbeb);
    color: var(--dh-warning, #f59e0b);
}

.nb-oc-header-icon.purple {
    background: var(--dh-purple-bg, #f5f3ff);
    color: var(--dh-purple, #8b5cf6);
}

.nb-oc-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dh-text-primary, #1a2138);
    font-family: 'DM Sans', sans-serif;
}

.nb-oc-subtitle {
    font-size: 12px;
    color: var(--dh-text-muted, #8c95ad);
    margin-top: 1px;
    font-family: 'DM Sans', sans-serif;
}

.nb-oc-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nb-oc-mark-all {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--dh-success-bg, #f0fdf4);
    border: 1px solid rgba(34, 197, 94, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--dh-success, #22c55e);
    padding: 0;
    font-size: 17px;
    text-decoration: none;
}

.nb-oc-mark-all:hover {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
    border-color: rgba(34, 197, 94, 0.35);
    text-decoration: none;
}

.nb-oc-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--dh-surface-muted, #f8f9fc);
    border: 1px solid var(--dh-border-light, #eef1f6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--dh-text-muted, #8c95ad);
    padding: 0;
    font-size: 16px;
}

.nb-oc-close:hover {
    background: var(--dh-surface-hover, #f1f4f9);
    color: var(--dh-text-primary, #1a2138);
    border-color: var(--dh-border, #e5e9f0);
}

/* ── Notification actions bar ── */
.nb-notif-actions {
    padding: 12px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--dh-border-light, #eef1f6);
}

.nb-notif-filter-pills {
    display: flex;
    gap: 4px;
}

.nb-notif-filter {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    color: var(--dh-text-muted, #8c95ad);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.nb-notif-filter:hover {
    color: var(--dh-text-primary, #1a2138);
    background: var(--dh-surface-hover, #f1f4f9);
}

.nb-notif-filter.active {
    color: var(--dh-accent, #4a7cff);
    background: var(--dh-accent-light, #e8efff);
    border-color: rgba(74, 124, 255, 0.12);
    font-weight: 600;
}

.nb-notif-filter .nb-filter-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    margin-left: 4px;
    opacity: 0.7;
}

.nb-notif-mark-btn {
    font-size: 12px;
    font-weight: 500;
    color: var(--dh-accent, #4a7cff);
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.15s ease;
    text-decoration: none;
}

.nb-notif-mark-btn:hover {
    background: var(--dh-accent-light, #e8efff);
    color: var(--dh-accent, #4a7cff);
}

/* ── Category/time separator ── */
.nb-notif-category {
    padding: 10px 22px 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--dh-text-muted, #8c95ad);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'DM Sans', sans-serif;
}

.nb-notif-category::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--dh-border-light, #eef1f6);
}

/* ── Notification items ── */
.nb-notif-item {
    padding: 14px 22px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-bottom: 1px solid var(--dh-border-light, #eef1f6);
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
}

.nb-notif-item:last-child {
    border-bottom: none;
}

.nb-notif-item:hover {
    background: var(--dh-surface-hover, #f1f4f9);
}

.nb-notif-item.nb-unread {
    background: #f4f7ff;
}

.nb-notif-item.nb-unread:hover {
    background: var(--dh-accent-light, #e8efff);
}

/* Unread dot */
.nb-notif-unread-dot {
    position: absolute;
    top: 18px;
    left: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--dh-accent, #4a7cff);
}

.nb-notif-item:not(.nb-unread) .nb-notif-unread-dot {
    display: none;
}

/* Type-based icons */
.nb-notif-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.nb-notif-item-icon.nb-icon-status {
    background: #eff6ff;
    color: #3b82f6;
}

.nb-notif-item-icon.nb-icon-comment {
    background: var(--dh-success-bg, #f0fdf4);
    color: var(--dh-success, #22c55e);
}

.nb-notif-item-icon.nb-icon-assign {
    background: var(--dh-warning-bg, #fffbeb);
    color: var(--dh-warning, #f59e0b);
}

.nb-notif-item-icon.nb-icon-priority {
    background: var(--dh-danger-bg, #fef2f2);
    color: var(--dh-danger, #ef4444);
}

.nb-notif-item-icon.nb-icon-system {
    background: var(--dh-purple-bg, #f5f3ff);
    color: var(--dh-purple, #8b5cf6);
}

.nb-notif-item-icon.nb-icon-default {
    background: var(--dh-surface-muted, #f8f9fc);
    color: var(--dh-text-muted, #8c95ad);
}

/* Item content */
.nb-notif-item-content {
    flex: 1;
    min-width: 0;
}

.nb-notif-item-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--dh-text-primary, #1a2138);
    line-height: 1.4;
    font-family: 'DM Sans', sans-serif;
}

.nb-notif-item-title strong {
    font-weight: 700;
}

.nb-notif-item-title .nb-ticket-ref {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--dh-accent, #4a7cff);
    font-weight: 600;
}

/* Expand toggle */
.nb-notif-item-expand {
    font-size: 11px;
    color: var(--dh-accent, #4a7cff);
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    padding: 0;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.nb-notif-item-expand:hover {
    opacity: 0.8;
}

.nb-notif-item-expand i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.nb-notif-item-expand.expanded i {
    transform: rotate(180deg);
}

/* Detail (long_message) */
.nb-notif-item-detail {
    font-size: 12px;
    color: var(--dh-text-secondary, #5c6785);
    margin-top: 4px;
    line-height: 1.5;
}

/* Meta (time + view link) */
.nb-notif-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.nb-notif-item-time {
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--dh-text-muted, #8c95ad);
}

.nb-notif-item-view {
    font-size: 11px;
    color: var(--dh-accent, #4a7cff);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 3px;
}

.nb-notif-item-view:hover {
    text-decoration: underline;
    color: var(--dh-accent, #4a7cff);
}

.nb-notif-item-view::before {
    content: '·';
    color: var(--dh-border, #e5e9f0);
    margin-right: 3px;
}

/* ── Offcanvas body scrollbar ── */
.nb-offcanvas-notif .offcanvas-body,
.nb-offcanvas-pref .offcanvas-body {
    padding: 0;
}

.nb-offcanvas-notif .offcanvas-body::-webkit-scrollbar,
.nb-offcanvas-pref .offcanvas-body::-webkit-scrollbar {
    width: 5px;
}

.nb-offcanvas-notif .offcanvas-body::-webkit-scrollbar-track,
.nb-offcanvas-pref .offcanvas-body::-webkit-scrollbar-track {
    background: transparent;
}

.nb-offcanvas-notif .offcanvas-body::-webkit-scrollbar-thumb,
.nb-offcanvas-pref .offcanvas-body::-webkit-scrollbar-thumb {
    background: var(--dh-border, #e5e9f0);
    border-radius: 10px;
}

/* ── Offcanvas Footer V2 ── */
.nb-oc-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--dh-border-light, #eef1f6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: var(--dh-surface, #ffffff);
}

.nb-notif-footer-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--dh-accent, #4a7cff);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'DM Sans', sans-serif;
}

.nb-notif-footer-link:hover {
    text-decoration: underline;
    color: var(--dh-accent, #4a7cff);
}

.nb-notif-footer-settings {
    font-size: 12px;
    font-weight: 500;
    color: var(--dh-text-muted, #8c95ad);
    background: none;
    border: 1px solid var(--dh-border-light, #eef1f6);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.nb-notif-footer-settings:hover {
    background: var(--dh-surface-hover, #f1f4f9);
    border-color: var(--dh-border, #e5e9f0);
    color: var(--dh-text-primary, #1a2138);
}

/* ── Empty state ── */
.nb-notif-empty {
    padding: 60px 30px;
    text-align: center;
}

.nb-notif-empty i {
    font-size: 48px;
    color: var(--dh-border, #e5e9f0);
    margin-bottom: 16px;
}

.nb-notif-empty-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--dh-text-primary, #1a2138);
    font-family: 'DM Sans', sans-serif;
}

.nb-notif-empty-desc {
    font-size: 13px;
    color: var(--dh-text-muted, #8c95ad);
    margin-top: 6px;
}

/* ── Mark-as-read button V2 (replaces V1 btn-group) ── */
.nb-notif-item .nb-mark-read-btn {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--dh-border-light, #eef1f6);
    background: transparent;
    color: var(--dh-text-muted, #8c95ad);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.15s ease;
    padding: 0;
    font-size: 14px;
}

.nb-notif-item:hover .nb-mark-read-btn {
    opacity: 1;
}

.nb-mark-read-btn:hover {
    background: var(--dh-success-bg, #f0fdf4);
    color: var(--dh-success, #22c55e);
    border-color: var(--dh-success, #22c55e);
}

/* ==========================================================================
   Preferences Offcanvas V2
   ========================================================================== */

/* ── Pref info box ── */
.nb-pref-info {
    margin: 16px 22px 0;
    padding: 12px 16px;
    background: #f4f7ff;
    border: 1px solid rgba(74, 124, 255, 0.1);
    border-radius: var(--dh-radius-sm, 10px);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12.5px;
    color: var(--dh-text-secondary, #5c6785);
    line-height: 1.5;
    font-family: 'DM Sans', sans-serif;
}

.nb-pref-info i {
    color: var(--dh-accent, #4a7cff);
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ── Pref body AJAX container ── */
.nb-pref-body {
    padding: 16px 22px;
}

.nb-pref-body .table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    border: 1px solid var(--dh-border-light, #eef1f6);
    border-radius: var(--dh-radius-sm, 10px);
    overflow: hidden;
    width: 100%;
    margin-bottom: 0;
}

.nb-pref-body .table thead th {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dh-text-muted, #8c95ad);
    padding: 12px 14px;
    background: var(--dh-surface-muted, #f8f9fc);
    border-bottom: 1px solid var(--dh-border-light, #eef1f6);
    text-align: center;
    white-space: nowrap;
}

.nb-pref-body .table thead th:first-child {
    text-align: left;
    min-width: 220px;
}

.nb-pref-body .table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--dh-border-light, #eef1f6);
    vertical-align: middle;
    text-align: center;
}

.nb-pref-body .table tbody tr:last-child td {
    border-bottom: none;
}

.nb-pref-body .table tbody tr {
    transition: background 0.1s ease;
}

.nb-pref-body .table tbody tr:hover {
    background: var(--dh-surface-hover, #f1f4f9);
}

.nb-pref-body .table tbody td:first-child {
    text-align: left;
    font-weight: 500;
    color: var(--dh-text-primary, #1a2138);
}

/* ── Footer buttons ── */
.nb-pref-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--dh-border-light, #eef1f6);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    background: var(--dh-surface, #ffffff);
}

.nb-btn-ghost {
    padding: 8px 18px;
    border-radius: var(--dh-radius-sm, 10px);
    font-size: 13px;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    background: none;
    color: var(--dh-text-secondary, #5c6785);
    border: 1px solid var(--dh-border, #e5e9f0);
    cursor: pointer;
    transition: all 0.15s ease;
}

.nb-btn-ghost:hover {
    background: var(--dh-surface-hover, #f1f4f9);
    color: var(--dh-text-primary, #1a2138);
}

.nb-btn-success {
    padding: 8px 22px;
    border-radius: var(--dh-radius-sm, 10px);
    font-size: 13px;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    background: var(--dh-success, #22c55e);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nb-btn-success:hover {
    background: #1aad50;
    transform: translateY(-1px);
    box-shadow: var(--dh-shadow-md, 0 4px 16px rgba(30, 42, 74, 0.06));
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 991.98px) {
    .nb-user-block {
        gap: 6px;
    }

    .nb-notif-dropdown {
        width: 300px;
        right: -60px;
    }

    .nb-user-dropdown {
        width: 280px;
    }
}

@media (max-width: 991.98px) {
    #offcanvasPrefNotif.nb-offcanvas-pref {
        width: 100%;
    }
}

@media (max-width: 768px) {
    #offcanvasNotify.nb-offcanvas-notif {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .nb-notif-dropdown {
        position: fixed;
        left: 10px;
        right: 10px;
        width: auto;
        top: 56px;
    }

    .nb-user-dropdown {
        position: fixed;
        left: 10px;
        right: 10px;
        width: auto;
        top: 56px;
    }

    .nb-notif-filter-pills {
        flex-wrap: wrap;
    }

    .nb-notif-actions {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}
