/* =========================================================
   WFMS Notification Center — right-side full panel
   ========================================================= */
.topbar .notification-bell-wrap {
    position: relative;
}

.topbar .notification-bell-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease;
}

.topbar .notification-bell-btn:hover,
.topbar .notification-bell-btn:focus,
.topbar .notification-bell-btn.is-open {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
    outline: none;
}

.topbar .notification-bell-btn i {
    font-size: 1.15rem;
    line-height: 1;
}

.topbar .notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e11d48;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border: 2px solid #0274be;
    box-shadow: 0 2px 6px rgba(225, 29, 72, 0.35);
    display: none;
}

.topbar .notification-badge.show {
    display: inline-block;
    animation: nBadgePop .25s ease;
}

@keyframes nBadgePop {
    from { transform: scale(.6); opacity: .4; }
    to { transform: scale(1); opacity: 1; }
}

/* Overlay + right drawer */
.notification-overlay {
    position: fixed;
    inset: 0;
    z-index: 1080;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s ease;
}

.notification-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.notification-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1085;
    display: flex;
    flex-direction: column;
    width: min(420px, 100vw);
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 0;
    border-left: 1px solid #e2e8f0;
    border-radius: 0;
    box-shadow: -12px 0 40px rgba(15, 23, 42, 0.16);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .26s cubic-bezier(.22, 1, .36, 1), visibility .26s;
}

.notification-panel.is-open {
    transform: translateX(0);
    visibility: visible;
}

.notification-panel .notification-dropdown-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    padding: 18px 18px 14px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid #eef2f7;
}

.notification-panel .notification-header-copy .title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0f172a;
}

.notification-panel .notification-header-copy .subtitle {
    margin: 3px 0 0;
    font-size: 0.75rem;
    color: #64748b;
}

.notification-panel .notification-header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    padding-top: 2px;
}

.notification-panel .notification-unread-pill {
    display: none;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.7rem;
    font-weight: 700;
}

.notification-panel .notification-unread-pill.show {
    display: inline-flex;
}

.notification-panel .notification-mark-all {
    height: 28px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #0274be;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.notification-panel .notification-mark-all:hover:not(:disabled) {
    background: #f0f7fc;
    border-color: #b9d7ef;
}

.notification-panel .notification-mark-all:disabled {
    color: #94a3b8;
    border-color: #e8eef5;
    background: #f8fafc;
    cursor: default;
}

.notification-panel .notification-dismiss-all {
    height: 28px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid #f1d4d4;
    background: #fff;
    color: #be123c;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.notification-panel .notification-dismiss-all:hover:not(:disabled) {
    background: #fff1f2;
    border-color: #fecdd3;
}

.notification-panel .notification-dismiss-all:disabled {
    color: #94a3b8;
    border-color: #e8eef5;
    background: #f8fafc;
    cursor: default;
}

.notification-panel .notification-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #475569;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.notification-panel .notification-close-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.notification-panel .notification-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    margin: 0;
    padding: 8px;
    list-style: none;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.notification-panel .notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-panel .notification-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.notification-panel .notification-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 12px 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background .15s ease;
}

.notification-panel .notification-item + .notification-item,
.notification-panel .notification-list > li + li .notification-item {
    margin-top: 2px;
}

.notification-panel .notification-item:hover {
    background: #f8fafc;
}

.notification-panel .notification-item.unread {
    background: #f0f7fc;
    box-shadow: inset 3px 0 0 #0274be;
}

.notification-panel .notification-item.unread:hover {
    background: #e8f3fb;
}

.notification-panel .n-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    flex-shrink: 0;
    font-size: 1rem;
}

.notification-panel .n-icon.type-info {
    background: #eff6ff;
    color: #2563eb;
}

.notification-panel .n-icon.type-alert {
    background: #fff7ed;
    color: #ea580c;
}

.notification-panel .n-icon.type-escalation {
    background: #fef2f2;
    color: #dc2626;
}

.notification-panel .n-icon.type-success {
    background: #ecfdf5;
    color: #059669;
}

.notification-panel .n-icon.type-demo {
    background: #f1f5f9;
    color: #475569;
}

.notification-panel .n-body {
    flex: 1;
    min-width: 0;
}

.notification-panel .n-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.notification-panel .n-title {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-panel .notification-item.unread .n-title {
    font-weight: 700;
}

.notification-panel .n-time {
    flex-shrink: 0;
    font-size: 0.7rem;
    color: #94a3b8;
    white-space: nowrap;
    padding-top: 1px;
}

.notification-panel .n-meta-right {
    display: inline-flex;
    align-items: flex-start;
    gap: 4px;
    flex-shrink: 0;
}

.notification-panel .n-dismiss {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-top: -2px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity .15s ease, background .15s ease, color .15s ease;
}

.notification-panel .notification-item:hover .n-dismiss,
.notification-panel .n-dismiss:focus {
    opacity: 1;
}

.notification-panel .n-dismiss:hover {
    background: #fff1f2;
    color: #be123c;
}

.notification-panel .n-message {
    margin: 0;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.notification-panel .n-message.is-collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
}

.notification-panel .n-message.is-expanded {
    display: block;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 2px;
}

.notification-panel .n-message-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 4px 0 8px;
}

.notification-panel .n-toggle,
.notification-panel .n-view-full {
    border: 0;
    background: none;
    padding: 0;
    font-size: 0.72rem;
    font-weight: 600;
    color: #0274be;
    cursor: pointer;
    line-height: 1.2;
}

.notification-panel .n-toggle:hover,
.notification-panel .n-view-full:hover {
    text-decoration: underline;
    color: #015a94;
}

.notification-panel .n-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.notification-panel .n-type {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.notification-panel .n-status {
    font-size: 0.68rem;
    font-weight: 600;
    color: #94a3b8;
}

.notification-panel .notification-item.unread .n-status {
    color: #0274be;
}

.notification-panel .notification-empty,
.notification-panel .notification-loading,
.notification-panel .notification-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 220px;
    padding: 42px 20px;
    text-align: center;
    color: #64748b;
}

.notification-panel .notification-coming-soon {
    min-height: calc(100vh - 90px);
    min-height: calc(100dvh - 90px);
}

.notification-panel .notification-coming-soon i {
    font-size: 2rem;
    color: #0274be;
    opacity: 0.85;
}

.notification-panel .notification-empty i,
.notification-panel .notification-error i {
    font-size: 1.75rem;
    color: #94a3b8;
}

.notification-panel .notification-empty .empty-title,
.notification-panel .notification-error .empty-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #334155;
}

.notification-panel .notification-empty .empty-text,
.notification-panel .notification-error .empty-text {
    margin: 0;
    font-size: 0.78rem;
    color: #94a3b8;
    max-width: 240px;
}

.notification-panel .notification-skeleton {
    padding: 10px 12px;
}

.notification-panel .n-skel-row {
    display: flex;
    gap: 12px;
    padding: 10px 6px;
}

.notification-panel .n-skel-avatar,
.notification-panel .n-skel-line {
    background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 37%, #eef2f7 63%);
    background-size: 400% 100%;
    animation: nShimmer 1.2s ease infinite;
    border-radius: 8px;
}

.notification-panel .n-skel-avatar {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    flex-shrink: 0;
}

.notification-panel .n-skel-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 2px;
}

.notification-panel .n-skel-line {
    height: 10px;
}

.notification-panel .n-skel-line.w-70 { width: 70%; }
.notification-panel .n-skel-line.w-90 { width: 90%; }
.notification-panel .n-skel-line.w-40 { width: 40%; }

@keyframes nShimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

.notification-panel .notification-dropdown-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-shrink: 0;
    padding: 12px 16px;
    border-top: 1px solid #eef2f7;
    background: #f8fafc;
}

.notification-panel .notification-footer-hint {
    margin: 0;
    font-size: 0.7rem;
    color: #94a3b8;
}

.notification-panel .notification-refresh-hint {
    margin: 0;
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 600;
}

.notification-detail-modal .modal-header {
    align-items: flex-start;
    border-bottom-color: #e2e8f0;
}

.notification-detail-modal .modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    word-break: break-word;
}

.notification-detail-type {
    margin: 0;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0274be;
}

.notification-detail-time {
    margin: 0 0 12px;
    font-size: 0.78rem;
    color: #94a3b8;
}

.notification-detail-message {
    font-size: 0.92rem;
    color: #334155;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: min(55vh, 420px);
    overflow-y: auto;
}

body.notification-panel-open {
    overflow: hidden;
}

@media (max-width: 576px) {
    .notification-panel {
        width: 100vw;
    }

    .notification-panel .notification-dropdown-header {
        padding: 14px;
    }

    .notification-panel .notification-mark-all {
        padding: 0 8px;
        font-size: 0.68rem;
    }
}
