/* ========== 通知中心样式 ========== */
/* 主卡片、工具栏、Tab 等壳样式由 panel-common.css 提供，此处保留通知专属样式 */

/* 通知图标按钮 */
.notification-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border: none;
    font-size: 18px;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.notification-wrapper:hover {
    background: rgba(0, 0, 0, 0.05);
}

.notification-wrapper svg {
    width: 20px;
    height: 20px;
    color: #666;
}

.notification-badge {
    position: absolute;
    top: 0px;
    /* 左锚定：位数增多时徽章向右延展（右锚定会向左挤，数字显得居中/偏左） */
    left: 18px;
    right: auto;
    min-width: 16px;
    height: 16px;
    padding: 0 5px;
    box-sizing: border-box;
    background: #ff4d4f;
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 通知下拉面板 */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 25px;
    width: 380px;
    max-height: 520px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    flex-direction: column;
}

.notification-dropdown.show {
    display: flex;
}

/* 通知头部 */
.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e9ecef;
}

.notification-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.notification-actions {
    display: flex;
    gap: 8px;
}

.notification-actions a {
    font-size: 12px;
    color: #1890ff;
    cursor: pointer;
}

.notification-actions a:hover {
    color: #40a9ff;
}

/* 通知内容区 */
.notification-body {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

/* 通知列表 */
.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    border-bottom: 1px solid #dddddd;
    cursor: pointer;
    transition: background-color 0.2s;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #fff2f0;
}

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

/* 统计卡片背景色 */
.bg-info { background: #e6f7ff !important; color: #1890ff !important; }
.bg-danger { background: #fff2f0 !important; color: #ff4d4f !important; }

/* 卡片头部操作按钮 */
.card-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.card-header-actions .btn svg {
    flex-shrink: 0;
}

/* 通知列表样式 - 页面专用 */
.notification-list-item {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.notification-list-item:hover {
    background: #f8f9fa;
}

.notification-list-item.unread {
    background: #fff2f0;
}

.notification-list-item.unread:hover {
    background: #ffebe8;
}

.notification-list-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 14px;
}

.notification-list-content {
    flex: 1;
    min-width: 0;
}

.notification-list-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

.notification-list-text {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 6px;
}

.notification-list-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-list-meta .type-tag {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
}

.notification-list-meta .type-tag.ticket {
    background: #e6f7ff;
    color: #1890ff;
}

.notification-list-meta .type-tag.system {
    background: #fff7e6;
    color: #fa8c16;
}

.notification-list-meta .type-tag.account {
    background: #f6ffed;
    color: #52c41a;
}

.notification-list-dot {
    width: 8px;
    height: 8px;
    background: #ff4d4f;
    border-radius: 50%;
    flex-shrink: 0;
    margin-left: auto;
}

.notification-item.read {
    opacity: 0.7;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 12px;
}

.notification-item.unread .notification-icon {
    background: #fff2f0;
    color: #ff4d4f;
}

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

.notification-title {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.notification-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    justify-content: space-between;
}

.notification-text {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-all;
}

.notification-time {
    font-size: 11px;
    color: #999;
    flex-shrink: 0;
    text-align: right;
    white-space: nowrap; /* 防容器异常压缩时时间逐字竖排 */
}

.notification-dot {
    width: 8px;
    height: 8px;
    background: #ff4d4f;
    border-radius: 50%;
    flex-shrink: 0;
    margin-left: 8px;
    margin-top: 4px;
}

/* 通知状态 */
.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #999;
}

.notification-empty svg,
.notification-empty i {
    margin-bottom: 12px;
    opacity: 0.5;
}

.notification-empty p {
    margin: 0;
    font-size: 13px;
}

/* 通知类型标签 */
.notification-type-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 400;
    line-height: 1;
    padding: 3px 6px;
    margin-right: 6px;
    border-radius: 3px;
    background: #e8f4ff;
    color: #1890ff;
    vertical-align: 1px;
    white-space: nowrap; /* 防容器异常压缩时标签文字逐字竖排 */
}

/* 通知列表表格（表格化改造后）：未读行浅红底，沿用卡片流的未读视觉；
   特异性 (0,2,3)/(0,3,3) 压过 stk-table 的行 hover 底色 */
.stk-table tbody tr.tr-unread td {
    background: #fff2f0;
}

.stk-table tbody tr.tr-unread:hover td {
    background: #ffebe8;
}

.notification-item.read .notification-type-tag {
    background: #f5f5f5;
    color: #999;
}

.notification-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #999;
}

/* 未读提示 */
#notificationEmpty {
    font-size: 12px;
    color: #ff4d4f;
    padding: 0 16px 8px;
}

/* 滚动条样式 */
.notification-body::-webkit-scrollbar {
    width: 4px;
}

.notification-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.notification-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}