:root {
  color-scheme: light;
  --ink: #18212f;
  --muted: #667085;
  --line: #e5e7eb;
  --paper: #ffffff;
  --wash: #f4f6f8;
  --brand: #2358d5;
  --brand-dark: #1846b3;
  --good: #137a50;
  --warn: #a15c00;
  --bad: #bb2d3b;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--wash); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
a { color: inherit; }

.shell { width: min(1100px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(244, 246, 248, .94); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229, 231, 235, .8);
}
.topbar-inner { min-height: 68px; display: flex; align-items: center; gap: 16px; }
.brand { font-weight: 800; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.page { padding: 28px 0 56px; }
.hero { padding: 36px 0 24px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 46px); letter-spacing: -.04em; }
.hero p { margin: 0; color: var(--muted); max-width: 720px; line-height: 1.7; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  padding: 22px; box-shadow: 0 10px 30px rgba(24, 33, 47, .04);
}
.card h2, .card h3 { margin: 0; }
.card-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.card-head .actions { margin-left: auto; }
.card-link { text-decoration: none; transition: transform .18s ease, border-color .18s ease; }
.card-link:hover { transform: translateY(-2px); border-color: #b8c7ef; }
.eyebrow { font-size: 12px; color: var(--brand); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.field { display: grid; gap: 7px; }
.field label { font-size: 13px; font-weight: 700; color: #475467; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid #d0d5dd; border-radius: 11px; background: #fff;
  color: var(--ink); padding: 10px 12px; outline: none;
}
.field textarea { min-height: 112px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(35, 88, 213, .12);
}
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.btn {
  border: 1px solid transparent; border-radius: 10px; padding: 9px 14px;
  background: var(--brand); color: #fff; font-weight: 750;
}
.btn:hover { background: var(--brand-dark); }
.btn-secondary { background: #fff; color: #344054; border-color: #d0d5dd; }
.btn-secondary:hover { background: #f8fafc; }
.btn-danger { background: #fff; color: var(--bad); border-color: #f3c5ca; }
.btn-ghost { background: transparent; color: #475467; border-color: transparent; }
.btn-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.toggle-row {
  display: flex; gap: 10px; align-items: center; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: #fbfcfd;
}
.toggle-row input { width: 20px; height: 20px; accent-color: var(--brand); }

.pill {
  display: inline-flex; align-items: center; gap: 7px; border-radius: 999px;
  padding: 5px 10px; font-size: 12px; font-weight: 800; background: #eef2f6; color: #475467;
}
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #98a2b3; }
.pill.good { background: #e8f7f0; color: var(--good); }
.pill.good::before { background: #20a66a; }
.pill.warn { background: #fff3dc; color: var(--warn); }
.pill.warn::before { background: #dc8a13; }
.pill.bad { background: #fdebed; color: var(--bad); }
.pill.bad::before { background: #d64252; }

.notice {
  padding: 12px 14px; border-radius: 12px; font-size: 13px; line-height: 1.6;
  background: #edf3ff; color: #294f9d; border: 1px solid #cfddfb;
}
.notice.warn { background: #fff8e8; color: #805300; border-color: #f3d899; }
.message { min-height: 22px; margin-top: 10px; font-size: 13px; }
.message.good { color: var(--good); }
.message.bad { color: var(--bad); }

/* 总开关关闭时的顶部暂停横幅（三页共用，置顶醒目） */
.pause-banner {
  position: sticky; top: 0; z-index: 50;
  padding: 10px 16px; text-align: center; font-size: 13px; font-weight: 600;
  background: #fdebed; color: var(--bad); border-bottom: 1px solid #f3c5ca;
}

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.stat strong { display: block; font-size: 24px; margin-top: 6px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: #667085; background: #f8fafc; font-size: 12px; }
tr:last-child td { border-bottom: 0; }
.empty { padding: 22px; color: var(--muted); text-align: center; }

.footer-editor-list { display: grid; gap: 10px; }
.footer-editor-row {
  display: grid; grid-template-columns: minmax(260px, 1fr) 110px minmax(210px, auto) auto;
  gap: 10px; align-items: center; padding: 12px;
  border: 1px solid var(--line); border-radius: 12px; background: #fbfcfd;
}
.footer-editor-row input[type="text"], .footer-editor-row select {
  width: 100%; border: 1px solid #d0d5dd; border-radius: 9px; background: #fff;
  color: var(--ink); padding: 9px 10px;
}
.footer-editor-actions { display: flex; gap: 6px; justify-content: flex-end; }
.footer-editor-actions .btn { padding: 7px 9px; }
.separator-check { display: flex; align-items: center; gap: 7px; color: #475467; font-size: 13px; }
.separator-check input { width: 18px; height: 18px; accent-color: var(--brand); }
.footer-editor-flags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.qr-position { color: var(--brand); font-size: 12px; font-weight: 700; }

.login-page {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(circle at 15% 20%, rgba(66, 114, 224, .22), transparent 34%),
    radial-gradient(circle at 85% 80%, rgba(53, 181, 139, .15), transparent 32%),
    #0e1726;
}
.login-card { width: min(420px, 100%); background: #fff; border-radius: 22px; padding: 30px; box-shadow: 0 30px 90px rgba(0,0,0,.3); }
.login-card h1 { margin: 0 0 6px; }
.login-card form { display: grid; gap: 14px; margin-top: 24px; }

@media (max-width: 760px) {
  .shell { width: min(100% - 20px, 1100px); }
  .grid-2, .grid-3, .form-row, .form-row.three, .stats { grid-template-columns: 1fr; }
  .topbar-inner { min-height: 60px; gap: 8px; }
  .topbar .brand { font-size: 14px; }
  .topbar .btn { padding: 8px 10px; white-space: nowrap; }
  .card-head { flex-wrap: wrap; }
  .card-head .actions { margin-left: 0; }
  .hide-mobile { display: none; }
  .card { padding: 17px; border-radius: 15px; }
  .page { padding-top: 18px; }
  .footer-editor-row { grid-template-columns: 1fr; }
  .footer-editor-actions { justify-content: flex-start; }
}
