* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f0f2f5; color: #333; }
a { text-decoration: none; color: inherit; }

/* 登录页 */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.login-box { background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); padding: 40px; width: 400px; }
.login-box h1 { text-align: center; margin-bottom: 30px; color: #333; font-size: 24px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; color: #555; }
.form-group input { width: 100%; padding: 12px 16px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; transition: border-color 0.3s; }
.form-group input:focus { outline: none; border-color: #667eea; }
.btn { display: inline-block; padding: 12px 24px; border: none; border-radius: 8px; font-size: 14px; cursor: pointer; transition: all 0.3s; }
.btn-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; width: 100%; }
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-success { background: #52c41a; color: #fff; }
.btn-danger { background: #ff4d4f; color: #fff; }
.btn-warning { background: #faad14; color: #fff; }
.btn-info { background: #1890ff; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* 后台布局 */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #001529; color: #fff; flex-shrink: 0; }
.sidebar-logo { padding: 20px; text-align: center; font-size: 18px; font-weight: bold; border-bottom: 1px solid #1f3a5c; }
.sidebar-menu { padding: 10px 0; }
.menu-item { display: block; padding: 12px 20px; color: #a6b2c4; transition: all 0.3s; border-left: 3px solid transparent; }
.menu-item:hover, .menu-item.active { background: #1890ff; color: #fff; border-left-color: #fff; }
.main-content { flex: 1; padding: 20px; overflow-x: auto; }
.topbar { background: #fff; padding: 15px 20px; border-radius: 8px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.topbar h2 { font-size: 18px; }
.topbar .user-info { display: flex; align-items: center; gap: 15px; }

/* 卡片 */
.card { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #eee; }

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.stat-card .stat-label { color: #999; font-size: 14px; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 28px; font-weight: bold; color: #333; }
.stat-card.primary .stat-value { color: #1890ff; }
.stat-card.success .stat-value { color: #52c41a; }
.stat-card.warning .stat-value { color: #faad14; }
.stat-card.danger .stat-value { color: #ff4d4f; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px; text-align: left; border-bottom: 1px solid #eee; }
.table th { background: #fafafa; font-weight: 600; color: #555; }
.table tr:hover { background: #f5f7fa; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.badge-success { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.badge-warning { background: #fffbe6; color: #faad14; border: 1px solid #ffe58f; }
.badge-danger { background: #fff1f0; color: #ff4d4f; border: 1px solid #ffa39e; }
.badge-info { background: #e6f7ff; color: #1890ff; border: 1px solid #91d5ff; }

/* 表单 */
.form-row { display: flex; gap: 20px; margin-bottom: 15px; }
.form-row .form-group { flex: 1; }
textarea { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; resize: vertical; min-height: 100px; }
select { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; }

/* 弹窗 */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; }
.modal.show { display: flex; }
.modal-content { background: #fff; border-radius: 12px; padding: 30px; width: 500px; max-width: 90%; max-height: 80vh; overflow-y: auto; }
.modal-title { font-size: 18px; font-weight: 600; margin-bottom: 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* 分页 */
.pagination { display: flex; gap: 5px; margin-top: 20px; justify-content: center; }
.pagination a, .pagination span { padding: 6px 12px; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; }
.pagination .current { background: #1890ff; color: #fff; border-color: #1890ff; }

/* 提示消息 */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 15px; }
.alert-success { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.alert-error { background: #fff1f0; color: #ff4d4f; border: 1px solid #ffa39e; }
.alert-info { background: #e6f7ff; color: #1890ff; border: 1px solid #91d5ff; }

/* 响应式 */
@media (max-width: 768px) {
    .admin-layout { flex-direction: column; }
    .sidebar { width: 100%; }
    .sidebar-menu { display: flex; overflow-x: auto; }
    .menu-item { white-space: nowrap; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { flex-direction: column; }
}
