/* 安州残联爱心助农平台 - 管理后台 通用样式 */

:root {
    --primary-color: #4CAF50;
    --primary-light: #81C784;
    --primary-dark: #388E3C;
    --bg-color: #f5f7fa;
    --text-color: #333;
    --text-secondary: #666;
    --border-color: #dcdfe6;
    --header-height: 60px;
    --sidebar-width: 220px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
}

/* 登录页样式 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.login-box {
    width: 400px;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-title {
    text-align: center;
    margin-bottom: 30px;
}

.login-title h1 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.login-title p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 主布局 */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    background: #304156;
    color: #fff;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    transition: width 0.3s;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    padding: 0 20px;
}

.sidebar-header h1 {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-menu {
    padding: 10px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #bfcbd9;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}

.menu-item:hover {
    background: #263445;
    color: #fff;
}

.menu-item.active {
    background: var(--primary-color);
    color: #fff;
}

.menu-item i {
    margin-right: 10px;
    font-size: 18px;
}

.menu-item span {
    font-size: 14px;
}

/* 主内容区 */
.main-container {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

/* 顶部导航 */
.header {
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 99;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-left h2 {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
}

/* 内容区 */
.content {
    flex: 1;
    padding: 20px;
    background: var(--bg-color);
}

/* 卡片样式 */
.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stat-card-title {
    font-size: 14px;
    color: var(--text-secondary);
}

.stat-card-value {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-color);
}

.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
}

.icon-green { background: var(--primary-color); }
.icon-blue { background: #409EFF; }
.icon-orange { background: #E6A23C; }
.icon-purple { background: #9B59B6; }

/* 表格容器 */
.table-container {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

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

.table-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

/* 统计卡片网格 */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

/* 图表容器 */
.chart-container {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 15px;
}

/* Element Plus 覆盖样式 */
.el-button--primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.el-button--primary:hover {
    background-color: var(--primary-light) !important;
    border-color: var(--primary-light) !important;
}

.el-tag--success {
    background-color: #f0f9eb !important;
    border-color: #c2e7b0 !important;
    color: var(--primary-dark) !important;
}

/* 响应式 */
@media (max-width: 1200px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    
    .sidebar-header h1,
    .menu-item span {
        display: none;
    }
    
    .menu-item {
        justify-content: center;
        padding: 15px;
    }
    
    .menu-item i {
        margin-right: 0;
    }
    
    .main-container {
        margin-left: 60px;
    }
    
    .stat-grid {
        grid-template-columns: 1fr;
    }
}

/* 加载状态 */
.loading-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 10px;
    color: #dcdfe6;
}
