/* =========================================================================
   1. 基础样式和全局设置
   ========================================================================== */
:root {
    /* 主题色 - 与home.css保持一致 */
    --primary: #4e54c8;
    --primary-light: #8f94fb;
    --primary-dark: #3a3f9d;
    --secondary: #f8f9fa;
    --text: #333333;
    --text-light: #6c757d;
    
    /* 渐变 */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--primary-light));
    --gradient-card: linear-gradient(to bottom, #ffffff, #f8f9fa);
    
    /* 间距和圆角 */
    --border-radius: 12px;
    --card-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

html {
    transition: background-color 0.3s ease;
}

body {
    background-color: #f5f7fa;
    font-family: inherit;
    padding-top: 0;
    overflow-x: hidden;
    overflow-y: scroll;
    color: #333;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 5px;
}

body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 修复模态框正文偏移问题 - 保持滚动条显示 */
body.modal-open {
    overflow-y: scroll !important;
    padding-right: 0 !important;
}

/* =========================================================================
   2. 布局容器
   ========================================================================== */
.admin-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* 主内容区域 */
.admin-content {
    flex: 1;
    margin-left: 250px;
    padding: 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    /* 隐藏滚动条但保持功能 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE和Edge */
}

/* 为Chrome、Safari和Opera隐藏滚动条 */
.admin-content::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    background: transparent !important;
}

.page-header {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid transparent;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

/* =========================================================================
   3. 侧边栏样式
   ========================================================================== */
/* 左侧边栏 */
.admin-sidebar {
    width: 250px;
    background-color: #fff;
    border-right: 1px solid #e9ecef;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    /* 隐藏滚动条但保持功能 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE和Edge */
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* 为Chrome、Safari和Opera隐藏滚动条 */
.admin-sidebar::-webkit-scrollbar {
    display: none;
}

/* 侧边栏头部 */
.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.sidebar-header i {
    font-size: 1.5rem;
    color: var(--primary);
}

.sidebar-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary);
}

/* 侧边栏菜单 */
.sidebar-menu {
    padding: 1rem 0;
    flex-grow: 1;
}

.menu-item {
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background-color: rgba(78, 84, 200, 0.1);
    color: var(--primary);
}

.menu-item.active {
    border-left-color: var(--primary);
    color: var(--primary);
    background-color: rgba(78, 84, 200, 0.1);
}

.menu-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.menu-title {
    font-size: 0.9rem;
    font-weight: 500;
}

.submenu {
    padding-left: 0.5rem;
}

/* 侧边栏页脚样式 */
.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e9ecef;
    background-color: rgba(248, 249, 250, 0.8);
    margin-top: auto;
    text-align: center;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.sidebar-footer p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.5;
}

.sidebar-footer p:first-child {
    font-weight: 500;
}

/* =========================================================================
   4. 卡片组件样式
   ========================================================================== */
.admin-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.admin-card:hover {
    box-shadow: var(--card-shadow);
}

.admin-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #dee2e6;
    background-color: #fff;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.admin-card-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.admin-card-body {
    padding: 1.25rem;
    overflow: hidden;    /* 隐藏可能出现的额外滚动条 */
}

/* =========================================================================
   5. 表格样式
   ========================================================================== */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}


.admin-table th, .admin-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9rem;
}

.admin-table th.actions-cell,
.admin-table th.checkbox-cell {
    text-align: center;
}

.admin-table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
    font-size: 0.9rem;
    background-color: #ffffff;  /* 默认白色背景 */
}

/* 表格内的表单控件 */
.admin-table td .form-control {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    font-size: 0.875rem;
}

.admin-table td .form-control[readonly] {
    background-color: #e9ecef;
    cursor: default;
}

.admin-table td.checkbox-cell,
.admin-table th.checkbox-cell {
    text-align: center;
    vertical-align: middle;
}

/* 确保复选框在单元格内完美居中 */
.admin-table td.checkbox-cell .custom-checkbox,
.admin-table th.checkbox-cell .custom-checkbox {
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-table td.checkbox-cell input[type="checkbox"],
.admin-table th.checkbox-cell input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.admin-table tr {
    transition: all 0.2s ease;
}

.admin-table tr:hover td {
    background-color: #f8f9fa;
}

.admin-table tr:hover {
    background-color: rgba(78, 84, 200, 0.03);
}

/* 美化操作按钮所在的表格单元格 */
.actions-cell {
    padding: 0.5rem !important;
    min-width: 190px;
}

.admin-table .status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-active {
    background-color: #e6f7e6;
    color: #28a745;
}

.status-inactive {
    background-color: #f8e6e6;
    color: #dc3545;
}

.status-pending {
    background-color: #f8f4e6;
    color: #fd7e14;
}

/* 账户状态样式 */
.account-enabled {
    color: #28a745;
    font-weight: 500;
}

.account-disabled {
    color: #dc3545;
    font-weight: 500;
}

/* =========================================================================
   6. 表格固定列样式
   ========================================================================== */
/**
 * 表格固定列实现方案
 * 这些样式用于实现表格在水平滚动时保持左侧复选框列和右侧操作列固定的效果
 * 适用于：用户管理表格、Cookie管理表格等需要固定列的表格
 * 使用方法：在表格外层的.table-responsive容器上添加.fixed-last-column类
 */

/**
 * 表格容器通用样式（不包含fixed-last-column）
 */
.table-responsive:not(.fixed-last-column) {
    padding: 1.5rem;
    border-radius: 0.5rem;
    background: #fff;
    margin-bottom: 1rem;
}

.table-responsive h5 {
    margin-bottom: 1rem;
    color: #2d3748;
    font-weight: 600;
}

/* h5内部的flex容器占满宽度 */
.table-responsive h5 > div {
    width: 100%;
}

.table-responsive h5 .btn {
    white-space: nowrap;
}

/**
 * 固定列表格容器样式
 * 创建一个相对定位的容器，允许内部元素使用sticky定位
 */
.table-responsive.fixed-last-column {
    position: relative;
    overflow-x: auto;     /* 允许水平滚动 */
    overflow-y: visible;  /* 垂直方向可见，避免出现双滚动条 */
}

/**
 * 确保表格在容器中正确显示
 */
.table-responsive.fixed-last-column table {
    min-width: 100%;      /* 确保表格至少占满容器宽度 */
    margin-bottom: 0;     /* 移除表格底部边距，避免额外滚动条 */
}

/**
 * 固定列通用样式
 * 适用于左侧复选框列和右侧操作列
 * 使用position:sticky使元素在滚动时保持固定
 */
.table-responsive.fixed-last-column th.checkbox-cell,
.table-responsive.fixed-last-column th.actions-cell {
    position: sticky;     /* 固定定位 */
    z-index: 2;           /* 确保在其他单元格之上 */
    opacity: 1;           /* 确保完全不透明 */
}

.table-responsive.fixed-last-column tbody td.checkbox-cell,
.table-responsive.fixed-last-column tbody td.actions-cell {
    position: sticky;     /* 固定定位 */
    z-index: 2;           /* 确保在其他单元格之上 */
    background-color: #ffffff;  /* 奇数行默认白色背景 */
    opacity: 1;           /* 确保完全不透明 */
}

/**
 * 左侧复选框列特有样式
 * 固定在表格左侧边缘，添加右侧阴影效果
 */
.table-responsive.fixed-last-column th.checkbox-cell,
.table-responsive.fixed-last-column td.checkbox-cell {
    left: 0;              /* 固定在左侧 */
    box-shadow: 5px 0 5px -2px rgba(0, 0, 0, 0.1); /* 右侧阴影效果，增强视觉分离 */
}

/**
 * 右侧操作列特有样式
 * 固定在表格右侧边缘，添加左侧阴影效果
 */
.table-responsive.fixed-last-column th.actions-cell,
.table-responsive.fixed-last-column td.actions-cell {
    right: 0;             /* 固定在右侧 */
    box-shadow: -5px 0 5px -2px rgba(0, 0, 0, 0.1); /* 左侧阴影效果，增强视觉分离 */
    min-width: 110px;     /* 确保操作列有足够宽度容纳按钮 */
    text-align: center;   /* 操作按钮居中对齐 */
    padding: 8px;         /* 统一内边距 */
}

/**
 * 行悬停效果处理
 * 确保固定列在行悬停时背景色与其他单元格一致
 */
.table-responsive.fixed-last-column tr:hover td.checkbox-cell,
.table-responsive.fixed-last-column tr:hover td.actions-cell {
    background-color: #f8f9fa !important; /* 与tr:hover背景色一致，保持视觉一致性 */
}

/**
 * 复选框样式
 * 确保复选框在固定单元格中正确显示和居中
 */
.custom-checkbox {
    position: relative;
    z-index: 3;          /* 确保在固定单元格背景之上 */
    display: inline-flex; /* 使用 inline-flex 确保可以居中 */
    align-items: center;  /* 垂直居中 */
    justify-content: center; /* 水平居中 */
}

/* =========================================================================
   7. 按钮样式
   ========================================================================== */
/* 通用按钮样式 */
.admin-btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.admin-btn-primary {
    background-color: #1a73e8;
    color: #fff;
}

.admin-btn-primary:hover {
    background-color: #1766cc;
}

.admin-btn-secondary {
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.admin-btn-secondary:hover {
    background-color: #e9ecef;
}

.admin-btn-danger {
    background-color: #dc3545;
    color: #fff;
}

.admin-btn-danger:hover {
    background-color: #c82333;
}

.admin-btn-success {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}

.admin-btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* 紫色按钮样式 */
.admin-btn-purple {
    color: #fff;
    background-color: #6f42c1;
    border-color: #6f42c1;
}

.admin-btn-purple:hover {
    background-color: #5e35b1;
    border-color: #5829a7;
}

/* 橙色按钮样式 */
.admin-btn-orange {
    color: #fff;
    background-color: #fd7e14;
    border-color: #fd7e14;
}

.admin-btn-orange:hover {
    background-color: #e8710d;
    border-color: #d56a0c;
}

/* 青绿色按钮样式 */
.admin-btn-teal {
    color: #fff;
    background-color: #00a9a1;
    border-color: #00a9a1;
}

.admin-btn-teal:hover {
    background-color: #00908a;
    border-color: #008580;
}

/* 黑色按钮样式 */
.admin-btn-dark {
    color: #fff;
    background-color: #212529;
    border-color: #212529;
}

.admin-btn-dark:hover {
    background-color: #1a1e21;
    border-color: #121416;
}

/* 确保链接按钮在悬停时保持正确的样式 */
a.admin-btn:hover {
    color: #fff !important;
    text-decoration: none !important;
}

/* 表格操作按钮样式 */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    padding-top: 2px;    /* 为悬停效果提供足够空间 */
    padding-bottom: 2px; /* 保持视觉对称性 */
}

.action-btn {
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    border: none;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.action-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.action-btn i {
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.action-btn-view {
    background-color: #f0f7ff;
    color: #0d6efd;
}

.action-btn-view:hover {
    background-color: #e0edfe;
    color: #0a58ca;
}

.action-btn-edit {
    background-color: #f0fdf4;
    color: #28a745;
}

.action-btn-edit:hover {
    background-color: #e0f2e9;
    color: #218838;
}

.action-btn-delete {
    background-color: #fff5f5;
    color: #dc3545;
}

.action-btn-delete:hover {
    background-color: #feebeb;
    color: #c82333;
}

.action-btn-teal {
    background-color: #e6f7f7;
    color: #00a9a1;
}

.action-btn-teal:hover {
    background-color: #d5f0ef;
    color: #008f89;
}

/* 禁用所有按钮的焦点轮廓 */
button:focus, .btn:focus, .action-btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* =========================================================================
   8. 通用分页样式 （用于用户管理、Cookie管理、资源库等）
   ========================================================================== */
.admin-pagination,
#taskPagination,
#cookiePagination,
#userPagination,
#announcementPagination {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    justify-content: flex-end;
}

.admin-pagination .page-item,
#taskPagination .page-item,
#cookiePagination .page-item,
#userPagination .page-item,
#announcementPagination .page-item {
    display: inline-block;
}

.admin-pagination .page-link,
#taskPagination .page-link,
#cookiePagination .page-link,
#userPagination .page-link,
#announcementPagination .page-link {
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    color: #495057;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.admin-pagination .page-link:hover,
#taskPagination .page-link:hover,
#cookiePagination .page-link:hover,
#userPagination .page-link:hover,
#announcementPagination .page-link:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #0056b3;
}

.admin-pagination .active .page-link,
.admin-pagination .page-item.active .page-link,
#taskPagination .active .page-link,
#taskPagination .page-item.active .page-link,
#cookiePagination .active .page-link,
#cookiePagination .page-item.active .page-link,
#userPagination .active .page-link,
#userPagination .page-item.active .page-link,
#announcementPagination .active .page-link,
#announcementPagination .page-item.active .page-link {
    background-color: #1a73e8;
    border-color: #1a73e8;
    color: #fff;
    z-index: 1;
}

.admin-pagination .disabled .page-link,
.admin-pagination .page-item.disabled .page-link,
#taskPagination .disabled .page-link,
#taskPagination .page-item.disabled .page-link,
#cookiePagination .disabled .page-link,
#cookiePagination .page-item.disabled .page-link,
#userPagination .disabled .page-link,
#userPagination .page-item.disabled .page-link,
#announcementPagination .disabled .page-link,
#announcementPagination .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

/* =========================================================================
   9. 概览页统计卡片样式
   ========================================================================== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stats-dashboard {
    margin-top: 10px;
}

/* 现代风格统计卡片 */
.stats-card-modern {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    height: 120px;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    border: 1px solid transparent;
}

.stats-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.stats-card-modern .stats-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    font-size: 24px;
    color: #fff;
    margin-right: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stats-card-modern .stats-content {
    flex: 1;
}

.stats-card-modern .stats-label {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    font-size: 14px;
    margin: 0 0 5px;
}

.stats-card-modern .stats-number {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 5px;
    line-height: 1.2;
}

.stats-card-modern .stats-info {
    display: flex;
    align-items: center;
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    margin: 0;
}

.stats-card-modern .stats-info i {
    margin-right: 5px;
}

.stats-card-modern .stats-info.positive {
    color: #d4f7dc;
}

.stats-card-modern .stats-info.negative {
    color: #ffe5e8;
}

/* 渐变背景样式 */
.blue-gradient {
    background: linear-gradient(45deg, #2196F3, #4FC3F7);
}

.green-gradient {
    background: linear-gradient(45deg, #4CAF50, #8BC34A);
}

.red-gradient {
    background: linear-gradient(45deg, #FF5252, #FF7676);
}

.purple-gradient {
    background: linear-gradient(45deg, #9C27B0, #BA68C8);
}

.orange-gradient {
    background: linear-gradient(45deg, #FF9800, #FFCA28);
}

/* =========================================================================
   10. 系统公告与通知面板样式
   ========================================================================== */
/* 系统公告面板 */
.announcement-panel {
    padding: 0;
}

.announcement-item {
    display: flex;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

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

.announcement-item:hover {
    background-color: #f9f9f9;
}

.announcement-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 15px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.announcement-icon i {
    font-size: 16px;
}

.announcement-content {
    flex: 1;
}

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.announcement-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.announcement-date {
    font-size: 12px;
    color: #999;
}

.announcement-text {
    font-size: 13px;
    line-height: 1.5;
    color: #666;
    margin: 0;
}

.announcement-link {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.announcement-link:hover {
    color: #0a58ca;
    text-decoration: underline;
}

/* 通知面板样式 */
.notification-panel {
    position: relative;
    padding: 0;
}

.notification-item {
    position: relative;
    padding: 16px 20px 16px 60px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

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

.notification-item:hover {
    background-color: #fcfcfc;
}

.notification-item.highlight-item {
    background-color: #f8f9ff;
    border-left: 3px solid #0d6efd;
}

.notification-line {
    position: absolute;
    left: 28px;
    top: 0;
    height: 100%;
    width: 2px;
    background-color: #e9ecef;
    z-index: 1;
}

.notification-item:last-child .notification-line {
    display: none;
}

.notification-dot {
    position: absolute;
    left: 20px;
    top: 24px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.notification-dot i {
    font-size: 10px;
}

.notification-content {
    padding-left: 10px;
}

.notification-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.notification-time {
    font-size: 12px;
    color: #999;
}

.notification-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
}

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

/* 背景色样式 */
.bg-primary {
    background-color: #0d6efd !important;
}

.bg-success {
    background-color: #198754 !important;
}

.bg-warning {
    background-color: #ffc107 !important;
}

.bg-info {
    background-color: #0dcaf0 !important;
}

.bg-danger {
    background-color: #dc3545 !important;
}

/* 状态标签样式 */
.badge {
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    display: inline-block;
    white-space: nowrap;
    border: 1px solid transparent;
}

.badge.bg-info {
    background-color: #0dcaf0 !important;
    color: #fff;
    box-shadow: 0 2px 4px rgba(13, 202, 240, 0.2);
}

.badge.bg-success {
    background-color: #198754 !important;
    color: #fff;
    box-shadow: 0 2px 4px rgba(25, 135, 84, 0.2);
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.2);
}

.badge.bg-danger {
    background-color: #dc3545 !important;
    color: #fff;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

/* 进度条样式 */
.progress {
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    height: 8px;
}

.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    transition: width 0.3s ease;
}

.progress-bar-striped {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    from { background-position: 1rem 0; }
    to { background-position: 0 0; }
}

/* =========================================================================
   12. 个人信息页样式
   ========================================================================== */
.profile-card .profile-header {
    position: relative;
    border-radius: 8px 8px 0 0;
}

.profile-avatar {
    display: inline-block;
    line-height: 0;
}

.profile-avatar i {
    display: inline-block;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.profile-info .info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background-color: rgba(13, 110, 253, 0.1);
    border-radius: 8px;
    color: var(--primary);
}

.profile-info .info-content {
    flex: 1;
}

.profile-info .info-label {
    font-size: 0.8rem;
    font-weight: 500;
}

.profile-info .info-value {
    font-weight: 500;
    color: #333;
}

/* 悬停效果 */
.profile-card .info-item {
    border-radius: 8px;
    padding: 8px;
    transition: all 0.2s ease;
}

.profile-card .info-item:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* 表单样式 */
.form-floating > .form-control:focus ~ label, 
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary);
    opacity: 0.8;
}

.form-floating > .form-control:focus,
.form-floating > .form-control:not(:placeholder-shown) {
    border-color: var(--primary);
}

/* 修改资料和修改密码按钮样式统一 */
#changeProfile,
#changePassword {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 38px;
}

#changeProfile i,
#changePassword i {
    margin-right: 0.25rem !important;
    display: inline-block !important;
}

/* =========================================================================
   13. Cookie相关样式
   ========================================================================== */
/* Cookie选择下拉框样式 */
.form-select option.text-success {
    color: #28a745 !important;
    font-weight: 500;
}

.form-select option.text-danger {
    color: #dc3545 !important;
    opacity: 0.7;
    font-style: italic;
}

.form-select option.text-secondary {
    color: #6c757d !important;
    opacity: 0.7;
    font-style: italic;
}

.form-select option:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
}

/* =========================================================================
   14. 响应式适配样式
   ========================================================================== */
/* 大屏幕适配 */
@media (max-width: 1200px) {
    .account-table {
        min-width: 1200px; /* 确保表格有最小宽度，避免内容挤压 */
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* 在iOS设备上平滑滚动 */
    }
    
    .account-table th,
    .account-table td {
        white-space: nowrap; /* 防止文本换行 */
        padding: 0.75rem; /* 减小内边距 */
    }
}

/* 中等屏幕适配 */
@media (max-width: 992px) {
    .admin-sidebar {
        width: 200px;
    }
    
    .admin-content {
        margin-left: 200px;
    }
    
    .stats-card-modern {
        height: 110px;
    }
    
    .stats-card-modern .stats-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* 系统管理模块样式 */
.system-status-section {
    margin-bottom: 1.5rem;
}

.system-status-section .section-title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #495057;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.status-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.status-card-header {
    background-color: #e9ecef;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #495057;
}

.status-card-body {
    padding: 1rem;
}



/* 公告管理样式 */
.announcement-item {
    display: flex;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.announcement-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.announcement-icon i {
    color: #fff;
    font-size: 1.25rem;
}

.announcement-content {
    flex-grow: 1;
}

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.announcement-title {
    margin: 0;
    font-weight: 600;
}

.announcement-date {
    color: #6c757d;
    font-size: 0.85rem;
}

.announcement-text {
    margin-bottom: 0;
    color: #495057;
}

.announcement-link {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
}

.announcement-link:hover {
    text-decoration: underline;
}

/* =========================================================================
   15. 现代化公告弹窗样式
   ========================================================================== */

/* 自定义公告弹窗容器 */
.custom-popup-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-popup-container.show {
    opacity: 1;
    visibility: visible;
}

/* 弹窗主体 */
.custom-popup {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    display: flex;
    flex-direction: column;
}

.custom-popup-container.show .custom-popup {
    transform: translateY(0);
    opacity: 1;
}

/* 弹窗头部 */
.custom-popup-header {
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-popup-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
}

.custom-popup-title i {
    margin-right: 10px;
    font-size: 1.4rem;
    color: #1a73e8;
}

.custom-popup-close {
    background: none;
    border: none;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.custom-popup-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

/* 弹窗内容区域 */
.custom-popup-content {
    padding: 25px;
    overflow-y: auto;
    max-height: 60vh;
}

/* 弹窗底部 */
.custom-popup-footer {
    padding: 15px 25px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    background-color: #f9f9f9;
}

.custom-popup-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.95rem;
}

.custom-popup-btn-primary {
    background-color: #1a73e8;
    color: white;
}

.custom-popup-btn-primary:hover {
    background-color: #1766cc;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.custom-popup-btn-secondary {
    background-color: #f1f3f4;
    color: #5f6368;
    margin-right: 10px;
}

.custom-popup-btn-secondary:hover {
    background-color: #e8eaed;
}

/* 公告项目样式 */
.custom-announcement-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.custom-announcement-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.custom-announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.custom-announcement-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.custom-announcement-date {
    font-size: 0.85rem;
    color: #888;
}

.custom-announcement-content {
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 公告类型样式 */
.custom-announcement-item.type-info {
    border-left: 4px solid #1a73e8;
    padding-left: 15px;
}

.custom-announcement-item.type-success {
    border-left: 4px solid #34a853;
    padding-left: 15px;
}

.custom-announcement-item.type-warning {
    border-left: 4px solid #fbbc05;
    padding-left: 15px;
}

.custom-announcement-item.type-danger {
    border-left: 4px solid #ea4335;
    padding-left: 15px;
}

.custom-announcement-item.type-primary {
    border-left: 4px solid #9334e6;
    padding-left: 15px;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-announcement-item {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

.custom-announcement-item:nth-child(1) { animation-delay: 0.1s; }
.custom-announcement-item:nth-child(2) { animation-delay: 0.2s; }
.custom-announcement-item:nth-child(3) { animation-delay: 0.3s; }
.custom-announcement-item:nth-child(4) { animation-delay: 0.4s; }
.custom-announcement-item:nth-child(5) { animation-delay: 0.5s; }

/* 响应式调整 */
@media (max-width: 768px) {
    .custom-popup {
        width: 95%;
    }
    
    .custom-popup-header {
        padding: 15px 20px;
    }
    
    .custom-popup-content {
        padding: 20px;
    }
    
    .custom-popup-footer {
        padding: 12px 20px;
    }
    
    .custom-popup-title {
        font-size: 1.1rem;
    }
    
    .custom-announcement-title {
        font-size: 1rem;
    }
}

/* =========================================================================
   强制隐藏用户中心所有滚动条 - 最高优先级规则
   ========================================================================== */

/* 全局强制隐藏所有滚动条 */
html, body, * {
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE和Edge */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

/* 特别针对用户中心页面的关键元素 */
.admin-content,
.tab-content,
.tab-pane,
.admin-card,
.admin-card-body,
.modal-body {
    overflow-x: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

/* table-responsive允许水平滚动，但隐藏滚动条 */
.table-responsive:not(.fixed-last-column) {
    overflow-x: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.admin-content::-webkit-scrollbar,
.tab-content::-webkit-scrollbar,
.tab-pane::-webkit-scrollbar,
.admin-card::-webkit-scrollbar,
.admin-card-body::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

/* 针对Bootstrap和其他可能的滚动条 */
.container,
.container-fluid,
.row,
.col,
.col-*,
div,
section,
main {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.container::-webkit-scrollbar,
.container-fluid::-webkit-scrollbar,
.row::-webkit-scrollbar,
.col::-webkit-scrollbar,
div::-webkit-scrollbar,
section::-webkit-scrollbar,
main::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}
