* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f0f2f5; color: #333; font-size: 14px; }
a { text-decoration: none; color: inherit; }

/* 登录页 */
.login-page { display: flex; justify-content: center; align-items: center; height: 100vh; background: linear-gradient(135deg, #2DB84D, #1a8a3a); }
.login-box { background: #fff; border-radius: 12px; padding: 40px; width: 400px; box-shadow: 0 8px 40px rgba(0,0,0,0.15); }
.login-box h1 { text-align: center; color: #2DB84D; margin-bottom: 30px; font-size: 24px; }
.login-box .form-group { margin-bottom: 20px; }
.login-box label { display: block; margin-bottom: 6px; color: #666; font-size: 13px; }
.login-box input { width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; outline: none; }
.login-box input:focus { border-color: #2DB84D; }
.login-box .btn { width: 100%; padding: 12px; background: #2DB84D; color: #fff; border: none; border-radius: 6px; font-size: 15px; cursor: pointer; }
.login-box .btn:hover { background: #25a543; }
.login-box .hint { text-align: center; margin-top: 16px; color: #999; font-size: 12px; }

/* 布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #001529; color: #fff; position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto; z-index: 100; }
.sidebar .logo { padding: 20px; text-align: center; font-size: 18px; font-weight: bold; color: #2DB84D; border-bottom: 1px solid #1a2a3a; }
.sidebar .menu-group { margin-top: 8px; }
.sidebar .menu-title { padding: 10px 20px; font-size: 12px; color: #666; text-transform: uppercase; }
.sidebar .menu-item { padding: 12px 20px 12px 36px; cursor: pointer; color: #aaa; font-size: 13px; transition: all 0.2s; }
.sidebar .menu-item:hover { background: #002036; color: #fff; }
.sidebar .menu-item.active { background: #2DB84D; color: #fff; }

.main { flex: 1; margin-left: 220px; padding: 20px; }
.header { background: #fff; padding: 0 20px; height: 56px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #f0f0f0; margin: -20px -20px 20px; }
.header h2 { font-size: 18px; }
.header .user-info { display: flex; align-items: center; gap: 12px; }
.header .avatar { width: 36px; height: 36px; border-radius: 50%; background: #2DB84D; color: #fff; display: flex; align-items: center; justify-content: center; }

/* 统计卡片 */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 8px; padding: 20px; text-align: center; }
.stat-card .num { font-size: 28px; font-weight: bold; color: #2DB84D; }
.stat-card .label { font-size: 13px; color: #999; margin-top: 6px; }
.stat-card.blue .num { color: #1890ff; }
.stat-card.orange .num { color: #ff9900; }
.stat-card.purple .num { color: #722ed1; }

/* 表格 */
.table-wrap { background: #fff; border-radius: 8px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th { background: #fafafa; padding: 12px 16px; text-align: left; font-size: 13px; color: #666; font-weight: 600; border-bottom: 1px solid #f0f0f0; }
td { padding: 12px 16px; font-size: 13px; border-bottom: 1px solid #f5f5f5; }
tr:hover { background: #fafafa; }
.empty-row { text-align: center; color: #ccc; padding: 40px; }

/* 操作按钮 */
.btn { padding: 6px 14px; border: none; border-radius: 4px; cursor: pointer; font-size: 13px; }
.btn-primary { background: #2DB84D; color: #fff; }
.btn-primary:hover { background: #25a543; }
.btn-warn { background: #ff9900; color: #fff; }
.btn-danger { background: #ff4d4f; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-link { background: none; color: #2DB84D; padding: 4px 8px; }

/* 搜索栏 */
.search-bar { display: flex; gap: 12px; margin-bottom: 16px; align-items: center; }
.search-bar input, .search-bar select { padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; outline: none; }
.search-bar input:focus, .search-bar select:focus { border-color: #2DB84D; }

/* 弹窗 */
.modal-mask { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal { background: #fff; border-radius: 8px; padding: 24px; width: 500px; max-height: 80vh; overflow-y: auto; }
.modal h3 { margin-bottom: 20px; font-size: 16px; }
.modal .form-group { margin-bottom: 16px; }
.modal label { display: block; margin-bottom: 6px; font-size: 13px; color: #666; }
.modal input, .modal textarea, .modal select { width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; outline: none; }
.modal input:focus, .modal textarea:focus, .modal select:focus { border-color: #2DB84D; }
.modal textarea { min-height: 80px; resize: vertical; }
.modal .modal-footer { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }

/* 分页 */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 16px; }
.pagination button { padding: 6px 14px; border: 1px solid #ddd; background: #fff; border-radius: 4px; cursor: pointer; font-size: 13px; }
.pagination button:hover { border-color: #2DB84D; color: #2DB84D; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }
.pagination .info { font-size: 13px; color: #999; }

/* 标签 */
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.tag-success { background: #e8f8ee; color: #2DB84D; }
.tag-warn { background: #fff5e6; color: #ff9900; }
.tag-danger { background: #ffe8e8; color: #ff4d4f; }
.tag-default { background: #f5f5f5; color: #999; }

/* 图片上传预览 */
.img-preview { max-width: 100px; max-height: 100px; border-radius: 4px; margin-top: 8px; }
.upload-area { border: 2px dashed #ddd; border-radius: 6px; padding: 20px; text-align: center; cursor: pointer; color: #999; }
.upload-area:hover { border-color: #2DB84D; }
