/* 后台管理系统样式 */
* { margin: 0; padding: 0; box-sizing: border-box; } :root { --primary: #1a237e; --secondary: #1565c0; --accent: #ffd700; --success: #2e7d32; --warning: #f57f17; --danger: #c62828; --sidebar-w: 240px; --header-h: 60px; --bg: #f0f2f5; --white: #ffffff; --border: #e0e0e0; --text: #212121; --text-light: #757575;
} body { font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif; background: var(--bg); color: var(--text);
} /* 侧边栏 */
.admin-sidebar { position: fixed; left: 0; top: 0; width: var(--sidebar-w); height: 100vh; background: linear-gradient(180deg, #0d1b4b 0%, #1a237e 100%); overflow-y: auto; z-index: 100;
} .sidebar-logo { padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.1); text-align: center;
} .sidebar-logo h2 { color: #ffd700; font-size: 16px; font-weight: 700; margin-top: 10px;
} .sidebar-logo p { color: rgba(255,255,255,0.5); font-size: 12px; margin-top: 4px;
} .sidebar-nav { padding: 16px 0;
} .sidebar-group { margin-bottom: 8px;
} .sidebar-group-title { padding: 8px 20px 4px; font-size: 11px; color: rgba(255,255,255,0.4); letter-spacing: 1px; text-transform: uppercase;
} .sidebar-nav a { display: flex; align-items: center; gap: 10px; padding: 11px 20px; color: rgba(255,255,255,0.75); font-size: 14px; text-decoration: none; transition: all 0.3s; border-left: 3px solid transparent;
} .sidebar-nav a:hover,
.sidebar-nav a.active { color: white; background: rgba(255,255,255,0.1); border-left-color: #ffd700;
} .sidebar-nav a .icon { font-size: 16px; } /* 头部 */
.admin-header { position: fixed; top: 0; left: var(--sidebar-w); right: 0; height: var(--header-h); background: var(--white); box-shadow: 0 2px 8px rgba(0,0,0,0.08); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; z-index: 99;
} .header-title { font-size: 18px; font-weight: 700; color: var(--primary);
} .header-user { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-light);
} .avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--secondary)); display: flex; align-items: center; justify-content: center; color: white; font-size: 16px;
} /* 内容区 */
.admin-main { margin-left: var(--sidebar-w); margin-top: var(--header-h); padding: 24px; min-height: calc(100vh - var(--header-h));
} /* 统计卡片 */
.stats-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 24px;
} .stat-card { background: var(--white); border-radius: 12px; padding: 20px 24px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); display: flex; align-items: center; gap: 16px;
} .stat-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px;
} .stat-icon.blue { background: linear-gradient(135deg, #1a237e, #1565c0); }
.stat-icon.green { background: linear-gradient(135deg, #2e7d32, #388e3c); }
.stat-icon.orange { background: linear-gradient(135deg, #e65100, #f57c00); }
.stat-icon.purple { background: linear-gradient(135deg, #4a148c, #7b1fa2); } .stat-info h3 { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1;
} .stat-info p { font-size: 13px; color: var(--text-light); margin-top: 4px;
} /* 内容卡片 */
.card { background: var(--white); border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); margin-bottom: 24px; overflow: hidden;
} .card-header { padding: 16px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between;
} .card-header h3 { font-size: 16px; font-weight: 700; color: var(--primary);
} .card-body { padding: 24px; } /* 表格 */
.table-wrap { overflow-x: auto; } table { width: 100%; border-collapse: collapse; font-size: 14px;
} thead tr { background: #f8f9ff;
} th { padding: 12px 16px; text-align: left; font-weight: 600; color: var(--primary); border-bottom: 2px solid var(--border); white-space: nowrap;
} td { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; color: var(--text);
} tr:hover td { background: #fafbff; } /* 操作按钮 */
.btn { display: inline-flex; align-items: center; gap: 5px; padding: 7px 16px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: all 0.3s; text-decoration: none;
} .btn-sm { padding: 5px 12px; font-size: 12px; } .btn-primary { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(26,35,126,0.3); } .btn-success { background: linear-gradient(135deg, #2e7d32, #388e3c); color: white; }
.btn-success:hover { transform: translateY(-1px); } .btn-warning { background: linear-gradient(135deg, #e65100, #f57c00); color: white; }
.btn-warning:hover { transform: translateY(-1px); } .btn-danger { background: linear-gradient(135deg, #b71c1c, #c62828); color: white; }
.btn-danger:hover { transform: translateY(-1px); } .btn-outline { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; } /* 状态标签 */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500;
} .badge-success { background: #e8f5e9; color: #2e7d32; }
.badge-warning { background: #fff8e1; color: #f57f17; }
.badge-danger { background: #ffebee; color: #c62828; }
.badge-info { background: #e3f2fd; color: #1565c0; } /* 表单 */
.form-group { margin-bottom: 18px; } .form-group label { display: block; font-size: 14px; font-weight: 600; color: #424242; margin-bottom: 7px;
} .form-group label .required { color: #c62828; margin-left: 3px; } .form-control { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 7px; font-size: 14px; font-family: inherit; transition: all 0.3s; color: var(--text); background: var(--white);
} .form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,35,126,0.08);
} textarea.form-control { min-height: 120px; resize: vertical;
} .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
} /* 提示消息 */
.alert { padding: 12px 18px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px;
} .alert-success { background: #e8f5e9; color: #2e7d32; border-left: 4px solid #2e7d32; }
.alert-error { background: #ffebee; color: #c62828; border-left: 4px solid #c62828; }
.alert-warning { background: #fff8e1; color: #f57f17; border-left: 4px solid #f57f17; } /* 搜索工具栏 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap;
} .search-box { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: 25px; padding: 7px 16px; gap: 8px; background: var(--bg); flex: 1; max-width: 320px;
} .search-box input { border: none; background: transparent; font-size: 14px; outline: none; width: 100%; font-family: inherit;
} /* 分页 */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 20px;
} .pagination button { width: 36px; height: 36px; border: 1.5px solid var(--border); border-radius: 7px; background: var(--white); font-size: 14px; cursor: pointer; transition: all 0.3s;
} .pagination button:hover,
.pagination button.active { background: var(--primary); color: white; border-color: var(--primary);
} /* 登录页 */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0d1b4b 0%, #1a237e 50%, #1565c0 100%);
} .login-box { background: white; border-radius: 16px; padding: 40px; width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
} .login-logo { text-align: center; margin-bottom: 30px;
} .login-logo .icon { width: 64px; height: 64px; background: linear-gradient(135deg, var(--primary), var(--secondary)); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 30px; color: white; margin: 0 auto 14px;
} .login-logo h2 { font-size: 22px; color: var(--primary); }
.login-logo p { font-size: 13px; color: var(--text-light); margin-top: 4px; } /* 模态框 */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; display: none;
} .modal-overlay.show { display: flex; } .modal { background: white; border-radius: 14px; padding: 28px; width: 560px; max-width: 95vw; max-height: 85vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.2);
} .modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--border);
} .modal-header h3 { font-size: 18px; color: var(--primary); } .modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-light); line-height: 1;
} /* 响应式 */
@media (max-width: 1024px) { .stats-cards { grid-template-columns: repeat(2, 1fr); }
}
