/* ===== 基础重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif; font-size: 14px; color: #333; background: #f0f2f5; }
a { text-decoration: none; color: inherit; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }

/* ===== 登录页 ===== */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #B85328 0%, #d4764a 100%); }
.login-box { background: #fff; padding: 40px; border-radius: 12px; width: 380px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.login-box h1 { text-align: center; color: #B85328; margin-bottom: 8px; }
.login-subtitle { text-align: center; color: #999; margin-bottom: 32px; }

/* ===== 布局 ===== */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #001529; color: #fff; display: flex; flex-direction: column; position: fixed; height: 100vh; }
.sidebar-header { padding: 20px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-header h2 { font-size: 18px; }
.sidebar-header p { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 4px; }
.sidebar-nav { flex: 1; padding: 8px 0; overflow-y: auto; }
.nav-item { display: block; padding: 12px 20px; color: rgba(255,255,255,0.7); transition: all 0.2s; font-size: 14px; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,0.05); }
.nav-item.active { color: #fff; background: #B85328; }
.sidebar-footer { padding: 12px 20px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; font-size: 12px; }
.sidebar-footer a { color: rgba(255,255,255,0.5); }

.main-content { margin-left: 220px; flex: 1; padding: 24px; min-height: 100vh; }

/* ===== 组件 ===== */
.btn-primary { background: #B85328; color: #fff; border: none; padding: 8px 20px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.btn-primary:hover { background: #a04620; }
.btn-danger { background: #ff4d4f; color: #fff; border: none; padding: 8px 20px; border-radius: 6px; cursor: pointer; }
.btn-outline { background: transparent; color: #B85328; border: 1px solid #B85328; padding: 8px 20px; border-radius: 6px; cursor: pointer; }
.btn-sm { padding: 4px 12px; font-size: 12px; }

.card { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-header h3 { font-size: 16px; font-weight: 600; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 14px; }
.form-group textarea { height: 100px; resize: vertical; }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f0f0f0; font-size: 13px; white-space: nowrap; }
th { background: #fafafa; color: #666; font-weight: 600; }
tr:hover { background: #fafafa; }

/* ===== 标签 ===== */
.tag { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 12px; }
.tag-green { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.tag-orange { background: #fff7e6; color: #fa8c16; border: 1px solid #ffd591; }
.tag-red { background: #fff2f0; color: #ff4d4f; border: 1px solid #ffa39e; }
.tag-gray { background: #f5f5f5; color: #999; border: 1px solid #d9d9d9; }
.tag-blue { background: #e6f7ff; color: #1890ff; border: 1px solid #91d5ff; }

/* ===== 分页 ===== */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.pagination button { padding: 6px 14px; border: 1px solid #d9d9d9; background: #fff; border-radius: 4px; cursor: pointer; }
.pagination button.active { background: #B85328; color: #fff; border-color: #B85328; }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== 搜索栏 ===== */
.toolbar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select { padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 6px; }

/* ===== 仪表盘 ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 8px; padding: 20px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.stat-number { font-size: 32px; font-weight: bold; color: #B85328; }
.stat-label { font-size: 13px; color: #999; margin-top: 4px; }

/* ===== 模态框 ===== */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-content { background: #fff; border-radius: 12px; width: 560px; max-height: 80vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #f0f0f0; }
.modal-close { font-size: 20px; cursor: pointer; color: #999; }
.modal-body { padding: 20px; }
.modal-footer { padding: 12px 20px; border-top: 1px solid #f0f0f0; text-align: right; display: flex; gap: 8px; justify-content: flex-end; }

/* ===== 提示 ===== */
.toast { position: fixed; top: 20px; right: 20px; padding: 12px 24px; border-radius: 8px; color: #fff; font-size: 14px; z-index: 2000; animation: slideIn 0.3s; }
.toast-success { background: #52c41a; }
.toast-error { background: #ff4d4f; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== 空状态 ===== */
.empty-state { text-align: center; padding: 60px 20px; color: #999; }
