/* ═══════════════════════════════════════════════════════════════
   NOTIFICATION CENTER — Phase 12
   ═══════════════════════════════════════════════════════════════ */

.nav-notification-btn {
    position: relative;
    background: var(--bg-secondary);
    border: none;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    transition: color 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-notification-btn:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 999px;
    padding: 0 4px;
}

/* ── Notification Panel ─────────────────────────────────────── */

.notification-panel {
    position: fixed;
    top: 60px;
    right: var(--space-md);
    width: 380px;
    max-height: 480px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.notification-panel.show {
    display: flex;
    animation: notif-panel-in 0.18s ease-out;
}

@keyframes notif-panel-in {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.notification-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--border-light);
}

.notification-panel-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.notification-panel-body {
    overflow-y: auto;
    padding: 4px;
    flex: 1;
}

/* ── Notification Card ─────────────────────────────────────── */

.notification-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
}

.notification-card + .notification-card {
    margin-top: 2px;
}

.notification-card:hover {
    background: var(--bg-secondary);
}

.notification-card.read {
    opacity: 0.5;
}

/* Unread dot */
.notification-card:not(.read)::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 20px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

/* Icon */
.notification-card-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-card-icon svg {
    width: 16px;
    height: 16px;
}

.urgency-high .notification-card-icon {
    background: rgba(255, 59, 48, 0.1);
    color: var(--danger);
}

.urgency-medium .notification-card-icon {
    background: rgba(255, 149, 0, 0.1);
    color: var(--warning);
}

.urgency-low .notification-card-icon {
    background: rgba(0, 113, 227, 0.1);
    color: var(--primary);
}

/* Body */
.notification-card-body {
    flex: 1;
    min-width: 0;
}

.notification-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.notification-card-message {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.35;
}

.notification-card-time {
    font-size: 11px;
    color: var(--text-tertiary);
    white-space: nowrap;
    flex-shrink: 0;
}

.notification-card-detail {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.35;
    margin-top: 3px;
}

/* Dismiss button — hover only */
.notification-card-dismiss {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    background: var(--bg-secondary);
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    border-radius: 50%;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
}

.notification-card:hover .notification-card-dismiss {
    opacity: 1;
}

.notification-card-dismiss:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

/* ── Empty State ───────────────────────────────────────────── */

.notification-empty {
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    color: var(--text-secondary);
}

.notification-empty-icon {
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.notification-empty-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.notification-empty-sub {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ── Mobile ────────────────────────────────────────────────── */

@media (max-width: 480px) {
    .notification-panel {
        top: 52px;
        left: var(--space-xs);
        right: var(--space-xs);
        width: auto;
        max-height: 60vh;
    }
}

/* ── Dark mode overrides ───────────────────────────────────── */

[data-theme="dark"] .notification-panel {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .notification-card:hover {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .urgency-high .notification-card-icon {
    background: rgba(255, 59, 48, 0.15);
}

[data-theme="dark"] .urgency-medium .notification-card-icon {
    background: rgba(255, 149, 0, 0.15);
}

[data-theme="dark"] .urgency-low .notification-card-icon {
    background: rgba(0, 113, 227, 0.15);
}

[data-theme="dark"] .notification-card-dismiss {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .notification-card-dismiss:hover {
    background: #4a4a4c;
}

