* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f6f8fb;
  color: #182230;
}
a { color: #2563eb; text-decoration: none; }
.shell { min-height: 100vh; }
.login-wrap, .page-wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0; }
.login-card, .panel, .stat, .notice {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .08);
}
.login-card { max-width: 460px; margin: 8vh auto 0; padding: 28px; }
.topbar { background: #111827; color: #fff; }
.topbar-inner { width: min(1180px, calc(100% - 32px)); margin: 0 auto; min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-size: 20px; font-weight: 900; color: #fff; }
.nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.nav a { color: rgba(255,255,255,.82); font-weight: 700; }
.nav a:hover { color: #fff; }
h1 { margin: 0 0 18px; font-size: 28px; }
h2 { margin: 0 0 12px; font-size: 20px; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { padding: 18px; }
.stat-label { color: #64748b; font-size: 13px; font-weight: 700; }
.stat-value { margin-top: 6px; font-size: 24px; font-weight: 900; }
.panel { padding: 22px; margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
label { display: block; font-weight: 800; margin-bottom: 7px; }
input, select, textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 9px 11px;
  font: inherit;
}
textarea { min-height: 90px; }
.btn {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 9px 16px;
  background: #2563eb;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn.secondary { background: #475569; }
.btn.danger { background: #dc2626; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid #e2e8f0; text-align: left; vertical-align: top; }
th { background: #f8fafc; color: #475569; font-size: 13px; }
.badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 900; background: #e0f2fe; color: #075985; }
.badge.active { background: #dcfce7; color: #166534; }
.badge.disabled { background: #fee2e2; color: #991b1b; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; font-size: 13px; }
.notice { padding: 14px 16px; margin-bottom: 18px; background: #fff7ed; color: #9a3412; }
.notice.success { background: #ecfdf5; color: #047857; }
.output-box { min-height: 260px; white-space: pre; }
@media (max-width: 760px) {
  .grid, .form-grid { grid-template-columns: 1fr; }
  .topbar-inner { align-items: flex-start; flex-direction: column; padding: 16px 0; }
  table { font-size: 13px; }
}
