/* ==================== 通知中心样式 ==================== */

.uap-notifications-container {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.uap-notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--uap-border, #e5e7eb);
}

.uap-notifications-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--uap-text, #374151);
}

.uap-mark-all-read-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid var(--uap-border, #e5e7eb);
    border-radius: 20px;
    color: var(--uap-text-light, #6b7280);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.uap-mark-all-read-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: var(--uap-text, #374151);
}

.uap-mark-all-read-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.uap-mark-all-read-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* 通知分类 Tab */
.uap-notifications-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--uap-border, #e5e7eb);
    background: #f9fafb;
}

.uap-notification-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 20px;
    color: var(--uap-text-light, #6b7280);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.uap-notification-tab:hover {
    background: #fff;
    color: var(--uap-text, #374151);
}

.uap-notification-tab.active {
    background: var(--uap-action-bg, #4f46e5);
    color: #fff;
}

.uap-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

.uap-notification-tab.active .uap-tab-badge {
    background: rgba(255, 255, 255, 0.3);
}

/* 通知列表 */
.uap-notifications-list {
    min-height: 200px;
}

.uap-notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--uap-border, #e5e7eb);
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

.uap-notification-item:last-child {
    border-bottom: none;
}

.uap-notification-item:hover {
    background: #f9fafb;
}

.uap-notification-item.unread {
    background: #f0f7ff;
}

.uap-notification-item.unread:hover {
    background: #e8f2ff;
}

/* 未读标记点 */
.uap-notification-dot {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--uap-action-bg, #4f46e5);
    border-radius: 50%;
}

/* 通知头像 */
.uap-notification-avatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uap-notification-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.uap-notification-avatar-system {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.uap-notification-avatar-system svg {
    width: 22px;
    height: 22px;
}

/* 通知内容 */
.uap-notification-content {
    flex: 1;
    min-width: 0;
}

.uap-notification-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--uap-text, #374151);
    word-wrap: break-word;
}

.uap-notification-actor {
    font-weight: 600;
    color: var(--uap-text, #374151);
    text-decoration: none;
}

.uap-notification-actor:hover {
    color: var(--uap-action-bg, #4f46e5);
    text-decoration: underline;
}

.uap-notification-action {
    color: var(--uap-text-light, #6b7280);
}

.uap-notification-object {
    color: var(--uap-text, #374151);
    text-decoration: none;
    font-weight: 500;
}

.uap-notification-object:hover {
    color: var(--uap-action-bg, #4f46e5);
}

.uap-notification-extra {
    display: block;
    margin-top: 4px;
    padding: 8px 12px;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 13px;
    color: var(--uap-text-light, #6b7280);
}

.uap-notification-time {
    margin-top: 4px;
    font-size: 12px;
    color: #9ca3af;
}

/* 空状态 */
.uap-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #9ca3af;
    text-align: center;
}

.uap-empty-icon {
    margin-bottom: 16px;
    opacity: 0.5;
}

.uap-empty-icon svg {
    width: 48px;
    height: 48px;
}

.uap-empty-state p {
    margin: 0;
    font-size: 14px;
}

/* 加载状态 */
.uap-notifications-list .uap-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--uap-text-light, #6b7280);
    font-size: 14px;
}

/* 分页 */
.uap-notifications-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid var(--uap-border, #e5e7eb);
}

.uap-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    background: #fff;
    border: 1px solid var(--uap-border, #e5e7eb);
    border-radius: 6px;
    color: var(--uap-text, #374151);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.uap-page-btn:hover,
.uap-page-btn:focus {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: var(--uap-action-bg, #4f46e5);
}

.uap-page-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    background: var(--uap-action-bg, #4f46e5);
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

.uap-page-dots {
    color: var(--uap-text-light, #6b7280);
    font-size: 13px;
}

/* 通知中心响应式 */
@media (max-width: 640px) {
    .uap-notifications-header {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .uap-mark-all-read-btn {
        width: 100%;
        justify-content: center;
    }

    .uap-notifications-tabs {
        padding: 10px 16px;
        gap: 2px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .uap-notification-tab {
        padding: 6px 12px;
        font-size: 13px;
        white-space: nowrap;
    }

    .uap-notification-item {
        padding: 14px 16px;
        gap: 10px;
    }

    .uap-notification-dot {
        left: 6px;
    }

    .uap-notification-avatar {
        width: 40px;
        height: 40px;
    }

    .uap-notification-text {
        font-size: 13px;
    }

    .uap-notifications-pagination {
        padding: 12px 16px;
    }

    .uap-empty-state {
        padding: 40px 16px;
    }
}

/* ==================== 顶部导航通知图标 ==================== */

.uap-header-notification {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.uap-header-notification-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--uap-text, #374151);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.uap-header-notification-btn:hover {
    background: #f3f4f6;
    color: var(--uap-action-bg, #4f46e5);
}

.uap-header-notification-btn svg {
    width: 22px;
    height: 22px;
}

.uap-header-notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #ef4444;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.uap-header-notification-badge:empty {
    display: none;
}

