/* 管理面板样式。深色侧栏 + 浅色内容区，移动端折叠为图标导航。 */
:root {
  --bg: #f4f6fb; --surface: #ffffff; --line: #e3e8f1; --ink: #16202f; --muted: #667287;
  --accent: #2563eb; --ok: #16a34a; --warn: #b45309; --bad: #dc2626; --sidebar: #0f1a2c;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
h1, h2 { margin: 0; }
code { background: #eef2f8; padding: 2px 6px; border-radius: 5px; font-size: 12px; }

.login { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 22% 0, #dbeafe, #f6f8fc 46%); padding: 20px; }
.login .card { width: min(430px, 100%); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px; box-shadow: 0 18px 44px rgba(24, 44, 82, 0.07); margin-bottom: 20px; }
.eyebrow { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; color: var(--muted); }
.card h1 { font-size: 28px; margin: 12px 0 8px; }
.card h2 { font-size: 18px; margin-bottom: 8px; }
.muted, .hint { color: var(--muted); line-height: 1.65; font-size: 13px; }
.hint { margin: 6px 0 14px; }

label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
input, select, textarea { width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 9px; font: inherit; background: #fff; color: var(--ink); }
input[readonly], textarea[readonly] { background: #f1f5f9; color: var(--muted); }
textarea { min-height: 130px; resize: vertical; font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12px; }
button { border: 0; border-radius: 9px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; background: #e6ebf3; color: #1f2b3d; }
button:hover { filter: brightness(0.97); }
button:disabled { opacity: 0.55; cursor: progress; }
button.primary { background: var(--accent); color: #fff; }
button.danger { background: #fee2e2; color: var(--bad); }
button.ghost { background: transparent; color: inherit; }
button.small { padding: 5px 10px; font-size: 12px; }
.login button { width: 100%; margin-top: 6px; }

.shell { display: flex; min-height: 100vh; }
.shell aside { width: 232px; flex: 0 0 232px; background: var(--sidebar); color: #b9c7db; padding: 24px 16px; display: flex; flex-direction: column; }
.brand { color: #fff; font-size: 21px; font-weight: 800; margin: 0 10px 28px; }
.brand span { color: #60a5fa; }
.brand small { display: block; font-size: 9px; letter-spacing: 0.22em; color: #7d8ca6; margin-top: 6px; font-weight: 600; }
.shell nav { display: flex; flex-direction: column; gap: 4px; }
.shell nav button { background: none; color: inherit; text-align: left; font-weight: 500; padding: 11px 12px; }
.shell nav button:hover { background: #1e2c45; color: #fff; }
.shell nav button.active { background: #24365a; color: #fff; font-weight: 650; }
.side-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid #22304a; }
.side-foot .hint { color: #8395ad; font-size: 12px; margin: 4px 0; }
.side-foot button { width: 100%; margin-top: 10px; color: #cbd5e1; }

article { flex: 1; min-width: 0; padding: 38px clamp(18px, 4vw, 60px) 60px; max-width: 1220px; }
header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
header h1 { font-size: 32px; margin-top: 8px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions select { width: auto; margin-top: 0; }
label.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; font-size: 13px; }
label.inline input { width: auto; margin: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stats b { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 18px; font-size: 27px; }
.stats b.warn { color: var(--warn); }
.stats small, .row small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 6px; }

.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input { flex: 1; min-width: 180px; margin: 0; }
.toolbar select { width: auto; margin: 0; }

.site { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; margin-bottom: 14px; overflow: hidden; }
.site summary { padding: 14px 18px; font-weight: 700; cursor: pointer; }
.site .count { color: var(--muted); font-weight: 500; font-size: 12px; }
.table { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; margin-bottom: 16px; }
.site .table { border: 0; border-radius: 0; margin: 0; }
.row { display: flex; align-items: center; gap: 13px; padding: 14px 18px; border-top: 1px solid #eef1f6; flex-wrap: wrap; }
.row:first-child { border-top: 0; }
.grow { flex: 1; min-width: 190px; }
.row .msg { color: var(--muted); font-size: 12px; }
.rowbtns { display: flex; gap: 6px; flex-wrap: wrap; }
.rowbtns button { padding: 6px 10px; font-size: 12px; font-weight: 500; }

.row i { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; }
.dot-ok { background: var(--ok); }
.dot-idle { background: #93a4bd; }
.dot-off { background: #d5dbe5; }
.pill { font-style: normal; font-size: 12px; padding: 5px 10px; border-radius: 99px; background: #eef2f7; color: var(--muted); white-space: nowrap; }
.pill.ok { background: #dcfce7; color: #15803d; }
.pill.bad { background: #fee2e2; color: var(--bad); }
.pill.warn { background: #fef3c7; color: var(--warn); }
.tag { font-size: 10px; background: #e6ebf3; color: var(--muted); padding: 2px 6px; border-radius: 4px; font-weight: 600; }

.notice { background: #eff6ff; border: 1px solid #cfe0fb; color: #1c3f74; padding: 13px 16px; border-radius: 11px; margin-bottom: 16px; font-size: 13px; line-height: 1.6; }
.notice.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.notice.bad { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.empty { padding: 42px; text-align: center; color: var(--muted); }
.notes { color: var(--muted); font-size: 13px; line-height: 1.85; padding-left: 20px; margin: 0; }

.progress { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 16px 18px; margin-bottom: 16px; }
.progress .bar { height: 8px; background: #e8edf5; border-radius: 99px; overflow: hidden; }
.progress .bar span { display: block; height: 100%; background: var(--accent); transition: width 0.4s ease; }
.progress p { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: 10px 0 0; }

.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 16px; }
.form label { margin-bottom: 14px; }
.form .full, .form h2, .form .hint, .form button.full { grid-column: 1 / -1; }
.form h2 { font-size: 16px; margin: 8px 0 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.form h2:first-child { border-top: 0; padding-top: 0; }
.form select[multiple] { height: auto; }

.modal { position: fixed; inset: 0; background: rgba(15, 26, 44, 0.55); display: grid; place-items: center; padding: 18px; z-index: 40; }
.sheet { background: var(--surface); border-radius: 16px; width: min(760px, 100%); max-height: 88vh; overflow: auto; }
.sheet header { padding: 18px 22px; border-bottom: 1px solid var(--line); margin: 0; position: sticky; top: 0; background: var(--surface); align-items: center; }
.sheet .body { padding: 22px; }
.sheet pre { background: #f1f5f9; padding: 14px; border-radius: 9px; white-space: pre-wrap; word-break: break-word; font-size: 12px; max-height: 400px; overflow: auto; }

.toast { position: fixed; right: 18px; bottom: 18px; background: #12203a; color: #fff; padding: 13px 18px; border-radius: 10px; font-size: 13px; z-index: 60; max-width: 420px; box-shadow: 0 12px 30px rgba(10, 20, 40, 0.28); }
.toast.bad { background: #b91c1c; }

.account-select { margin: 0; display: flex; align-items: center; }
.account-select input, .site-select input { width: auto; margin: 0 6px 0 0; }
.bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; margin: 0 0 14px; border: 1px solid #bfdbfe; border-radius: 11px; background: #eff6ff; color: #1e3a8a; }
.bulkbar strong { margin-right: auto; }
.site-select { display: inline-flex; align-items: center; margin: 0; font-size: inherit; font-weight: inherit; }

@media (max-width: 720px) {
  .shell aside { width: 66px; flex: 0 0 66px; padding: 16px 8px; }
  .brand { font-size: 0; margin: 0 0 18px; text-align: center; }
  .brand span { font-size: 17px; }
  .brand small { display: none; }
  .shell nav button { font-size: 0; text-align: center; padding: 12px 0; }
  .shell nav button::before { content: "▪"; font-size: 15px; }
  .side-foot .hint { display: none; }
  .side-foot button { font-size: 0; padding: 10px 0; }
  .side-foot button::before { content: "⏻"; font-size: 14px; }
  article { padding: 24px 14px 48px; }
  header h1 { font-size: 24px; }
  .form { grid-template-columns: 1fr; }
}

/* 分组快捷签到 */
.grouprun { margin: 18px 0; border: 1px solid var(--line); border-radius: 10px; padding: 0; background: var(--surface); }
.grouprun summary { padding: 14px 18px; cursor: pointer; font-weight: 500; color: var(--ink); user-select: none; }
.grouprun summary .hint { font-weight: 400; color: var(--muted); margin-left: 8px; font-size: 13px; }
.grouprun-list { padding: 12px 18px 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.grouprun-btn { padding: 8px 14px; font-size: 13px; border-radius: 7px; background: var(--accent); color: white; border: none; cursor: pointer; transition: background 0.15s; }
.grouprun-btn:hover:not(:disabled) { background: #1e40af; }
.grouprun-btn:disabled { background: #9ca3af; cursor: not-allowed; opacity: 0.6; }
