/* 后台管理样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background: #f0f2f5;
    color: #333;
}

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

/* 侧边栏 */
.sidebar {
    width: 220px;
    background: #001529;
    color: #fff;
    transition: width 0.3s;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 18px;
    margin-bottom: 5px;
}

.sidebar-header span {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

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

.nav-section {
    margin-bottom: 10px;
}

.nav-title {
    padding: 10px 20px;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    transition: all 0.3s;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.nav-item.active {
    color: #fff;
    background: #2d8f4e;
}

.nav-item i {
    width: 18px;
    text-align: center;
}

/* 主内容区 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: #fff;
    padding: 0 20px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

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

.menu-toggle {
    cursor: pointer;
    font-size: 18px;
    color: #333;
}

.page-title {
    font-size: 16px;
    font-weight: bold;
}

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

.admin-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

/* 内容区域 */
.content-area {
    flex: 1;
    padding: 20px;
}

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

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    display: flex;
    gap: 15px;
    align-items: center;
}

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

.stat-info {
    flex: 1;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.stat-trend {
    font-size: 12px;
}

.stat-trend.up {
    color: #52c41a;
}

.stat-trend.down {
    color: #f5222d;
}

/* 待办事项 */
.todo-section {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.todo-section h3 {
    font-size: 16px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.todo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.todo-item {
    text-align: center;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
}

.todo-item:hover {
    background: #e8f5e9;
}

.todo-count {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: #e4393c;
    margin-bottom: 5px;
}

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

/* 表格区域 */
.table-section {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.table-header h3 {
    font-size: 16px;
}

.table-header a {
    color: #2d8f4e;
    font-size: 13px;
}

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

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

th {
    background: #f5f5f5;
    font-weight: bold;
    color: #333;
}

tr:hover {
    background: #f9f9f9;
}

.status {
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
}

.status.pending {
    background: #fff3e0;
    color: #f57c00;
}

.status.success {
    background: #e8f5e9;
    color: #388e3c;
}

.status.danger {
    background: #ffebee;
    color: #c62828;
}

/* 按钮 */
.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin-right: 5px;
}

.btn-primary {
    background: #2d8f4e;
    color: #fff;
}

.btn-primary:hover {
    background: #1f6b3a;
}

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

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

.btn-outline {
    background: transparent;
    border: 1px solid #ddd;
    color: #666;
}

.btn-outline:hover {
    border-color: #2d8f4e;
    color: #2d8f4e;
}

/* 折叠侧边栏 */
.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed .sidebar-header h2,
.sidebar.collapsed .sidebar-header span,
.sidebar.collapsed .nav-title,
.sidebar.collapsed .nav-item span {
    display: none;
}
