/* 通用样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background-color: #f5f7fa;
    line-height: 1.5;
}

/* 布局容器 */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 18px;
    color: #ecf0f1;
}

.admin-info {
    padding: 15px;
    border-bottom: 1px solid #34495e;
    margin-bottom: 20px;
    margin-left: 20px;
}

.admin-info .name {
    font-size: 14px;
    color: #bdc3c7;
}

.admin-info .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #34495e;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-size: 20px;
    color: #bdc3c7;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    box-sizing: border-box;
}

.sidebar-menu li a .menu-icon {
    margin-right: 10px;
    font-size: 16px;
    width: 20px;
    text-align: center;
    display: inline-block;
}
.sidebar-menu li a:hover {
    background: #34495e;
    color: white;
    border-left-color: #3498db;
}

.sidebar-menu li a.active {
    background: #34495e;
    color: white;
    border-left-color: #3498db;
    font-weight: 600;
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}



.header h1 {
    margin: 0;
    font-size: 20px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}



.header h1 {
    margin: 0;
    font-size: 20px;
    color: #2c3e50;
}

.header .admin-name {
    font-size: 14px;
    color: #666;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 统计卡片网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    padding: 15px;
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 8px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

/* 待审核统计 */
.pending-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.pending-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pending-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.pending-value {
    font-size: 24px;
    font-weight: bold;
    color: #f39c12;
}

.btn-link {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.btn-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 图表区域网格 */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.chart-container {
    height: 200px;
    margin-top: 15px;
}

/* 卡片头部 */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

/* 活动列表 */
.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.no-activities {
    text-align: center;
    color: #999;
    padding: 40px 0;
}

/* 活动项样式 */
.activity-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

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

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

.activity-icon {
    font-size: 18px;
    margin-right: 12px;
    margin-top: 2px;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

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

.card-header h3 {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
}

/* 表单控件 */
.form-control {
    padding: 12px 16px;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    min-width: 120px;
    width: 100%;
    background-color: #fff;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: #999;
    font-size: 14px;
}

/* 表单网格布局 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

/* 表单组 */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
    letter-spacing: 0.2px;
}

/* 必填标记 */
.required {
    color: #e74c3c;
    font-weight: bold;
}

/* 单选按钮组 */
.radio-group {
    display: flex;
    gap: 30px;
    align-items: center;
    padding: 8px 0;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 6px 12px;
    border-radius: 6px;
    margin-bottom: 0;
}

.radio-group label:hover {
    color: #3498db;
    background-color: rgba(52, 152, 219, 0.08);
}

.radio-group input[type="radio"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #3498db;
}

/* 输入组 */
.input-group {
    display: flex;
    align-items: stretch;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
}

.input-group-addon {
    padding: 12px 16px;
    background: linear-gradient(to right, #f8f9fa, #e9ecef);
    border: 1px solid #e1e4e8;
    border-right: none;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    font-size: 15px;
}

.input-group .form-control {
    border-radius: 0 8px 8px 0;
    border-left: none;
    box-shadow: none;
}

.input-group .form-control:focus {
    border-left: 1px solid #3498db;
}

/* 帮助文本 */
.help-text {
    margin-top: 8px;
    font-size: 13px;
    color: #6c757d;
    font-style: italic;
    padding: 6px 0;
}

/* 表单操作按钮区 */
.form-actions {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid #e1e4e8;
    display: flex;
    justify-content: flex-end;
    gap: 16px;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::after {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 6px rgba(52, 152, 219, 0.2);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9, #1f6aad);
    box-shadow: 0 6px 12px rgba(52, 152, 219, 0.3);
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    box-shadow: 0 4px 6px rgba(149, 165, 166, 0.2);
}

.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #7f8c8d, #6c757d);
    box-shadow: 0 6px 12px rgba(149, 165, 166, 0.3);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 4px 6px rgba(231, 76, 60, 0.2);
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #c0392b, #a93226);
    box-shadow: 0 6px 12px rgba(231, 76, 60, 0.3);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* 搜索控件 */
.search-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

tr:hover {
    background: #f8f9fa;
}

/* 分页样式 */
.pagination {
    display: flex;
    gap: 5px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.pagination button {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pagination button:hover {
    border-color: #3498db;
}

.pagination button.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 底部操作栏 */
.bottom-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* 复选框样式 */
input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

/* 状态标签 */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: #2ecc71;
    color: white;
}

.status-inactive {
    background: #95a5a6;
    color: white;
}

.status-pending {
    background: #f39c12;
    color: white;
}

.status-rejected {
    background: #e74c3c;
    color: white;
}

/* 评论内容截断 */
.comment-content {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 统计卡片 */
.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #3498db;
}

.stat-label {
    margin-top: 8px;
    color: #666;
    font-size: 14px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(5px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    animation: slideIn 0.3s ease;
    position: relative;
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #e1e4e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #f8f9fa, #ffffff);
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #2c3e50;
    font-weight: 600;
}

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

.modal-close:hover {
    background: #f5f5f5;
    color: #333;
    transform: scale(1.1) rotate(90deg);
}

.modal-body {
    padding: 28px;
    background: #ffffff;
}

/* 平滑滚动 */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 选择框样式增强 */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23666' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

select.form-control:focus {
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%233498db' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}

/* 文本域样式增强 */
textarea.form-control {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

/* 美化复选框 */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3498db;
    cursor: pointer;
}

/* 输入错误状态 */
.form-control.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-control.error:focus {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

.error-message {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 6px;
    display: block;
}

/* 通知消息样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1001;
    animation: slideIn 0.3s ease;
    max-width: 350px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-success {
    background: #2ecc71;
    color: white;
}

.notification-error {
    background: #e74c3c;
    color: white;
}

.notification-info {
    background: #3498db;
    color: white;
}

.notification-warning {
    background: #f39c12;
    color: white;
}

/* 加载状态 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: #999;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 移动端响应式样式 */
@media (max-width: 768px) {
    /* 侧边栏移动端样式 */
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 1000;
        height: 100vh;
        transition: transform 0.3s ease;
        width: 200px;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .sidebar.sidebar-hidden {
        transform: translateX(-100%);
    }
    
    /* 主内容区移动端样式 */
    .main-content {
        margin-left: 0;
        padding-top: 70px;
        padding: 15px;
        padding-top: 70px;
    }
    
    .main-content-expanded {
        margin-left: 0;
    }
    
    /* 菜单按钮 */
    .menu-toggle {
        display: block;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 1001;
        background: #3498db;
        color: white;
        border: none;
        padding: 10px 15px;
        border-radius: 5px;
        cursor: pointer;
        font-size: 18px;
    }

    
    .header h1 {
        font-size: 18px;
    }
    
    /* 搜索控件移动端样式 */
    .search-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .search-controls > * {
        width: 100% !important;
        margin-bottom: 10px;
    }
    
    /* 底部操作栏移动端样式 */
    .bottom-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pagination {
        justify-content: center;
    }
    
    /* 表格移动端样式 */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    th, td {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    /* 评论内容移动端样式 */
    .comment-content {
        max-width: 100px;
    }
    
    /* 统计卡片移动端样式 */
    .stat-value {
        font-size: 24px;
    }
    
    /* 模态框移动端样式 */
    .modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .modal-header, .modal-body {
        padding: 15px;
    }
    
    /* 通知移动端样式 */
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* 平板响应式样式 */
@media (max-width: 1024px) and (min-width: 769px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
    }
    
    .stat-card {
        min-width: 150px;
    }
}