/* ===== 全局样式补充 ===== */

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #f3f4f6;
  color: #1f2937;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f3f4f6; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* 卡片阴影 */
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  padding: 20px;
  overflow-x: auto;
}

/* 状态标签 */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-gray { background: #e5e7eb; color: #374151; }
.badge-blue { background: #dbeafe; color: #1e40af; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
.table th { background: #f9fafb; text-align: left; padding: 10px 12px; font-weight: 500; color: #6b7280; border-bottom: 1px solid #e5e7eb; }
.table td { padding: 10px 12px; border-bottom: 1px solid #f3f4f6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table tr:hover td { background: #f9fafb; }
.table-wrap { overflow-x: auto; }
.table-wrap .table { min-width: 700px; }

/* 表单 */
.form-input { width: 100%; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; outline: none; transition: border-color 0.15s; }
.form-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.form-label { display: block; font-size: 13px; color: #374151; margin-bottom: 4px; font-weight: 500; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; border: none; transition: all 0.15s; }
.btn-primary { background: #3b82f6; color: #fff; }
.btn-primary:hover { background: #2563eb; }
.btn-secondary { background: #fff; color: #374151; border: 1px solid #d1d5db; }
.btn-secondary:hover { background: #f9fafb; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: #10b981; color: #fff; }
.btn-success:hover { background: #059669; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 导航 */
.nav-link { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 6px; color: #d1d5db; transition: all 0.15s; text-decoration: none; }
.nav-link:hover { background: #1e293b; color: #fff; }
.nav-link.active { background: #1e40af; color: #fff; }

/* 弹窗 */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-content { background: #fff; border-radius: 8px; max-width: 600px; width: 100%; max-height: 90vh; overflow-y: auto; }

/* Toast */
.toast { position: fixed; top: 20px; right: 20px; z-index: 100; padding: 12px 20px; border-radius: 6px; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); min-width: 240px; animation: slideIn 0.3s ease; }
.toast-success { background: #d1fae5; color: #065f46; }
.toast-error { background: #fee2e2; color: #991b1b; }
.toast-info { background: #dbeafe; color: #1e40af; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* 数字字体（统计卡片） */
.stat-num { font-size: 28px; font-weight: 700; color: #111827; line-height: 1.2; }
.stat-label { font-size: 13px; color: #6b7280; margin-top: 4px; }

/* 代码块 */
.code { background: #1f2937; color: #e5e7eb; padding: 12px 16px; border-radius: 6px; font-family: 'Menlo', 'Consolas', monospace; font-size: 12px; word-break: break-all; line-height: 1.6; }

/* Loading 旋转 */
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid #e5e7eb; border-top-color: #3b82f6; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 链接颜色 */
a { color: #3b82f6; text-decoration: none; }
a:hover { text-decoration: underline; }

/* 空状态 */
.empty-state { text-align: center; padding: 60px 20px; color: #9ca3af; }
.empty-state-icon { font-size: 48px; margin-bottom: 12px; }

/* 分页 */
.pagination { display: flex; gap: 4px; align-items: center; }
.pagination button { padding: 6px 12px; border: 1px solid #d1d5db; background: #fff; border-radius: 4px; cursor: pointer; font-size: 13px; }
.pagination button:hover:not(:disabled) { background: #f3f4f6; }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }
.pagination button.active { background: #3b82f6; color: #fff; border-color: #3b82f6; }