* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  line-height: 1.6;
}
a { color: #E84142; text-decoration: none; }
a:hover { text-decoration: underline; }

.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px;
  background: #1a1a2e;
  color: #fff;
  padding: 24px 0;
  flex-shrink: 0;
}
.sidebar .brand {
  padding: 0 24px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 16px;
}
.sidebar .brand h1 { font-size: 16px; font-weight: 700; color: #E84142; }
.sidebar .brand p { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 4px; }
.sidebar nav a {
  display: block;
  padding: 10px 24px;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  transition: all 0.2s;
}
.sidebar nav a:hover, .sidebar nav a.active {
  background: rgba(232,65,66,0.15);
  color: #fff;
  text-decoration: none;
  border-left: 3px solid #E84142;
}
.main { flex: 1; padding: 32px; overflow-x: auto; }
.page-title { font-size: 24px; font-weight: 700; margin-bottom: 24px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.stat-card .label { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card .value { font-size: 32px; font-weight: 700; color: #E84142; margin-top: 4px; }

.card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 24px;
}
.card h2 { font-size: 16px; margin-bottom: 16px; color: #333; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; }
th { background: #fafafa; font-weight: 600; color: #666; font-size: 12px; text-transform: uppercase; }
tr:hover td { background: #fafafa; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.badge-yes { background: #ffebee; color: #c62828; }
.badge-no { background: #e8f5e9; color: #2e7d32; }
.badge-warn { background: #fff3e0; color: #e65100; }

.btn {
  display: inline-block;
  padding: 8px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary { background: #E84142; color: #fff; }
.btn-primary:hover { background: #c62828; }
.btn-secondary { background: #eee; color: #333; }
.btn-danger { background: #ff5252; color: #fff; }
.btn-sm { padding: 4px 12px; font-size: 12px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #555; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group textarea.code { font-family: 'SF Mono', Monaco, Consolas, monospace; min-height: 400px; font-size: 12px; }

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}
.alert-success { background: #e8f5e9; color: #2e7d32; }
.alert-error { background: #ffebee; color: #c62828; }
.alert-info { background: #e3f2fd; color: #1565c0; }

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}
.login-box {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  width: 400px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.login-box h1 { font-size: 20px; text-align: center; margin-bottom: 8px; }
.login-box .subtitle { text-align: center; color: #888; font-size: 13px; margin-bottom: 24px; }

.checkbox-list { max-height: 300px; overflow-y: auto; border: 1px solid #eee; border-radius: 8px; padding: 8px; }
.checkbox-list label { display: flex; align-items: center; gap: 8px; padding: 6px 8px; font-size: 13px; cursor: pointer; }
.checkbox-list label:hover { background: #fafafa; border-radius: 4px; }

.help-text { font-size: 12px; color: #888; margin-top: 4px; }

/* ── 增强组件 ── */
.nav-logout { margin-top: 24px !important; color: #ff5252 !important; }
.page-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-header-row .page-title { margin-bottom: 0; }
.stat-danger .value { color: #B71C1C; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } .sidebar { width: 200px; } }

.card-highlight { border: 2px solid #E84142; }
.copy-box { background: #f8f9fa; border-radius: 8px; padding: 16px; font-size: 13px; color: #555; line-height: 1.8; margin-bottom: 12px; }
.copy-box ul { margin: 8px 0 0 16px; }
.status-list { list-style: none; font-size: 14px; }
.status-list li { padding: 8px 0; border-bottom: 1px solid #f0f0f0; }

.steps-bar { display: flex; gap: 16px; margin-bottom: 28px; }
.step { flex: 1; background: #fff; border-radius: 10px; padding: 16px; text-align: center; font-size: 13px; font-weight: 600; color: #888; box-shadow: 0 2px 6px rgba(0,0,0,0.05); }
.step span { display: block; width: 28px; height: 28px; line-height: 28px; border-radius: 50%; background: #eee; color: #888; margin: 0 auto 8px; font-size: 14px; }
.step.done { color: #2e7d32; border: 2px solid #4CAF50; }
.step.done span { background: #4CAF50; color: #fff; }
.step.pending { border: 2px dashed #ddd; }

.funnel { display: flex; flex-direction: column; gap: 8px; }
.funnel-step { min-width: 80px; }
.funnel-step span { font-size: 12px; color: #666; display: block; margin-bottom: 4px; }
.funnel-bar { height: 24px; border-radius: 4px; min-width: 40px; transition: width 0.5s; }

.table-filter { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.table-filter input { padding: 8px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 13px; width: 260px; }
.table-filter label { font-size: 13px; color: #666; cursor: pointer; }

.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 2px solid #eee; }
.tabs button { padding: 10px 20px; border: none; background: none; font-size: 14px; font-weight: 600; color: #888; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tabs button.active { color: #E84142; border-bottom-color: #E84142; }

.risk-row td { background: #fff5f5 !important; }
code { background: #f0f0f0; padding: 2px 6px; border-radius: 4px; font-size: 12px; }

