/* ===================== 站内信：角标 + 抽屉（Web 端，设计 §6.1.2） ===================== */

/* ── 资料区铃铛按钮（含未读角标）── */
.notif-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    transition: background 0.15s ease;
}
.notif-bell:hover {
    background: rgba(0, 0, 0, 0.06);
}
.notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: #e8453c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
    pointer-events: none;
}

/* ── 遮罩 ── */
.notif-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1000;
}

/* ── 右侧抽屉 ── */
.notif-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 360px;
    max-width: 86vw;
    height: 100%;
    background: #fff;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
}
.notif-drawer.open {
    transform: translateX(0);
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}
.notif-header-title {
    font-size: 16px;
    font-weight: 700;
    color: #222;
}
.notif-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.notif-all-read,
.notif-close {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    color: #4E79A7;
    padding: 4px 6px;
    border-radius: 6px;
}
.notif-all-read:hover,
.notif-close:hover {
    background: rgba(0, 0, 0, 0.05);
}
.notif-close {
    font-size: 16px;
    color: #888;
}

/* ── 列表 ── */
.notif-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}
.notif-item {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #f4f4f4;
    cursor: pointer;
    transition: background 0.12s ease;
}
.notif-item:hover {
    background: #f8fafc;
}
.notif-item.unread {
    background: #eef5ff;
}
.notif-item.unread:hover {
    background: #e3eeff;
}
.notif-icon {
    flex-shrink: 0;
    font-size: 18px;
    line-height: 1.4;
}
.notif-body {
    flex: 1;
    min-width: 0;
}
.notif-title {
    font-size: 14px;
    color: #222;
    line-height: 1.4;
}
.notif-preview {
    margin-top: 3px;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.notif-time {
    margin-top: 4px;
    font-size: 12px;
    color: #aaa;
}
.notif-empty {
    padding: 40px 16px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* ── 移动端：抽屉近乎全宽 ── */
@media (max-width: 480px) {
    .notif-drawer {
        width: 100%;
        max-width: 100%;
    }
}
