/* ===== 全局基础 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: #f0f2f5; font-size: 14px; color: #333; }
a { color: #409eff; text-decoration: none; }

/* ===== 卡片/统计 ===== */
.card { background: #fff; border-radius: 4px; padding: 20px; margin-bottom: 20px; }
.stat-row { display: flex; gap: 20px; margin-bottom: 20px; }
.stat-card { flex: 1; background: #fff; border-radius: 4px; padding: 20px; text-align: center; }
.stat-title { color: #999; font-size: 14px; margin-bottom: 10px; }
.stat-value { font-size: 28px; font-weight: bold; color: #333; }
.search-bar { margin-bottom: 20px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ===== 表格 ===== */
.data-table { width: 100%; border-collapse: collapse; background: #fff; }
.data-table th { background: #f5f7fa; color: #606266; font-weight: 600; padding: 12px 10px; text-align: left; border: 1px solid #ebeef5; white-space: nowrap; }
.data-table td { padding: 10px; border: 1px solid #ebeef5; color: #333; }
.data-table tr:hover td { background: #f5f7fa; }
.data-table .empty { text-align: center; color: #999; padding: 30px; }
.table-wrapper { width: 100%; overflow-x: auto; }

/* ===== 按钮 ===== */
.btn { display: inline-block; padding: 8px 16px; border: 1px solid #dcdfe6; border-radius: 4px; cursor: pointer; font-size: 14px; background: #fff; color: #606266; transition: all 0.2s; }
.btn:hover { color: #409eff; border-color: #c6e2ff; background: #ecf5ff; }
.btn-primary { background: #409eff; border-color: #409eff; color: #fff; }
.btn-primary:hover { background: #66b1ff; border-color: #66b1ff; color: #fff; }
.btn-success { background: #67c23a; border-color: #67c23a; color: #fff; }
.btn-success:hover { background: #85ce61; border-color: #85ce61; color: #fff; }
.btn-danger { background: #f56c6c; border-color: #f56c6c; color: #fff; }
.btn-danger:hover { background: #f78989; border-color: #f78989; color: #fff; }
.btn-warning { background: #e6a23c; border-color: #e6a23c; color: #fff; }
.btn-warning:hover { background: #ebb563; border-color: #ebb563; color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ===== 输入框 ===== */
.input { padding: 8px 12px; border: 1px solid #dcdfe6; border-radius: 4px; font-size: 14px; outline: none; transition: border-color 0.2s; }
.input:focus { border-color: #409eff; }
.select { padding: 8px 12px; border: 1px solid #dcdfe6; border-radius: 4px; font-size: 14px; outline: none; background: #fff; cursor: pointer; }

/* ===== 标签 ===== */
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; line-height: 20px; }
.check-detail { font-size: 12px; color: #909399; margin-top: 2px; }
.text-success { color: #67c23a; }
.text-danger { color: #f56c6c; }
.check-section { margin-top: 20px; padding-top: 16px; border-top: 1px dashed #dcdfe6; }
.check-section-header { display: flex; align-items: center; gap: 16px; }
.check-title { font-size: 15px; font-weight: bold; color: #303133; }
.check-summary { font-size: 13px; color: #606266; }
.tag-success { background: #f0f9eb; color: #67c23a; border: 1px solid #e1f3d8; }
.tag-warning { background: #fdf6ec; color: #e6a23c; border: 1px solid #faecd8; }
.tag-danger { background: #fef0f0; color: #f56c6c; border: 1px solid #fde2e2; }
.tag-info { background: #f4f4f5; color: #909399; border: 1px solid #e9e9eb; }
.tag-default { background: #f4f4f5; color: #909399; border: 1px solid #e9e9eb; }

/* ===== 开关 ===== */
.switch { position: relative; width: 44px; height: 22px; background: #dcdfe6; border-radius: 11px; cursor: pointer; transition: all 0.3s; display: inline-block; vertical-align: middle; }
.switch.active { background: #409eff; }
.switch-dot { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: all 0.3s; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.switch.active .switch-dot { left: 24px; }

/* ===== 对话框 ===== */
.dialog-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.dialog { background: #fff; border-radius: 8px; width: 500px; max-width: 90%; max-height: 80vh; overflow-y: auto; }
.dialog-header { padding: 20px; border-bottom: 1px solid #eee; font-size: 16px; font-weight: bold; }
.dialog-body { padding: 20px; }
.dialog-footer { padding: 15px 20px; border-top: 1px solid #eee; text-align: right; }
.form-item { margin-bottom: 15px; }
.form-item label { display: inline-block; width: 100px; text-align: right; padding-right: 12px; color: #606266; }
.form-item .input { width: 300px; }

/* ===== 消息提示 ===== */
.msg-toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); padding: 10px 20px; border-radius: 4px; z-index: 10000; font-size: 14px; box-shadow: 0 2px 12px rgba(0,0,0,0.15); }
.msg-success { background: #f0f9eb; color: #67c23a; border: 1px solid #e1f3d8; }
.msg-error { background: #fef0f0; color: #f56c6c; border: 1px solid #fde2e2; }
.msg-info { background: #f4f4f5; color: #909399; border: 1px solid #e9e9eb; }

/* ===== 分页 ===== */
.pagination { display: flex; justify-content: center; align-items: center; margin-top: 20px; gap: 5px; flex-wrap: wrap; }
.pagination button { padding: 6px 12px; border: 1px solid #dcdfe6; border-radius: 4px; background: #fff; cursor: pointer; font-size: 13px; color: #606266; transition: all 0.2s; }
.pagination button:hover:not(:disabled) { border-color: #409eff; color: #409eff; }
.pagination button.active { background: #409eff; color: #fff; border-color: #409eff; }
.pagination button:disabled { cursor: not-allowed; opacity: 0.5; }
.pagination .info { margin: 0 10px; color: #606266; font-size: 13px; }
.pagination select { padding: 6px 8px; border: 1px solid #dcdfe6; border-radius: 4px; font-size: 13px; outline: none; background: #fff; cursor: pointer; }
