:root {
  --bg: #f4f6f9; --panel: #fff; --ink: #1d2733; --muted: #6b7785; --line: #e3e8ee;
  --brand: #1f6feb; --brand-ink: #fff; --soft: #eef4ff; --warn: #b54708; --warn-bg: #fff6e5;
  --bad: #c62828; --good: #1a7f37;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.5 -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
input, select { height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
input:focus, select:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
button { height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); cursor: pointer; white-space: nowrap; }
button:hover { border-color: var(--brand); }
button:disabled { opacity: .55; cursor: default; }
button.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
button.sm { height: 28px; padding: 0 10px; }
button.link { border: 0; background: none; color: var(--muted); padding: 0 6px; height: auto; }
button.link:hover { color: var(--brand); }
.muted { color: var(--muted); }
.err { color: var(--bad); min-height: 1em; margin: 6px 0; }
.ok { color: var(--good); margin: 6px 0; }
.ok:empty { display: none; }

.logo { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--brand); color: #fff; font-weight: 700; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand small { display: block; color: var(--muted); font-size: 12px; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(360px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 28px; display: grid; gap: 14px; }
.login-card label { display: grid; gap: 6px; color: var(--muted); }
.login-card input { height: 40px; }
.login-card button { height: 40px; }

.top { display: flex; align-items: center; gap: 24px; padding: 0 20px; height: 56px; background: var(--panel); border-bottom: 1px solid var(--line); }
.top nav { display: flex; gap: 4px; flex: 1; }
.top nav button { border: 0; background: none; height: 56px; border-radius: 0; border-bottom: 2px solid transparent; }
.top nav button.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.me { display: flex; align-items: center; gap: 4px; color: var(--muted); }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 20px; background: var(--soft); font-size: 13px; }
.bar.warn { background: var(--warn-bg); color: var(--warn); }

main { padding: 16px 20px 40px; max-width: 1400px; margin: 0 auto; }
.filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.filter label { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.kw { width: 160px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--brand); color: #fff; }
.quick { display: inline-flex; gap: 4px; }
.quick button { height: 30px; padding: 0 8px; color: var(--muted); }

.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--bg); color: var(--muted); font-weight: 500; position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; }
td.note { color: var(--warn); }
td.empty { text-align: center; color: var(--muted); padding: 40px; white-space: normal; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 10px; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: grid; gap: 6px; }
.card h4 { margin: 0; display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.good { background: var(--good); } .dot.bad { background: var(--bad); }
.card .kv { display: grid; grid-template-columns: 72px 1fr; gap: 2px 8px; color: var(--muted); font-size: 13px; }
.card .kv b { color: var(--ink); font-weight: 400; word-break: break-all; }
.card .error { color: var(--bad); font-size: 13px; }
.card .actions { display: flex; gap: 6px; margin-top: 6px; }

dialog { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); padding: 24px; width: min(420px, calc(100vw - 32px)); }
dialog::backdrop { background: rgb(0 0 0 / .35); }
dialog h3 { margin: 0 0 14px; }
dialog form { display: grid; gap: 12px; }
dialog label { display: grid; gap: 6px; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actions { display: flex; gap: 8px; align-items: center; }
.grow { flex: 1; }

@media (max-width: 720px) {
  .top { flex-wrap: wrap; height: auto; gap: 0 12px; padding: 8px 16px 0; }
  .top nav { order: 3; flex-basis: 100%; }
  .top nav button { height: 42px; }
  .me { margin-left: auto; }
  .bar, main { padding-left: 16px; padding-right: 16px; }
  .kw { width: 100%; }
  .filter > * { flex: 1 1 auto; }
}

/* Shengteng light workspace: intentionally independent of OS theme. */
:root {
  color-scheme: light;
  --bg: #f5f7fb; --ink: #24334b; --muted: #66758b; --line: #e5eaf2;
  --brand: #315fe9; --soft: #edf3ff; --good: #167553;
}
body { font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select { min-height: 38px; border-radius: 8px; transition: border-color .15s, background .15s, box-shadow .15s; }
button { font-weight: 500; }
button:hover:not(:disabled) { background: #f2f5fc; border-color: #b8c8e8; }
button.primary { box-shadow: 0 2px 4px #315fe91a; }
button.primary:hover:not(:disabled) { background: #244dd0; border-color: #244dd0; }
button:focus-visible, a:focus-visible { outline: 3px solid #9db6ff; outline-offset: 3px; }
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px #315fe914; }
input::placeholder { color: #8994a5; }
.logo { width: 40px; height: 40px; border-radius: 12px; font-size: 20px; background: #315fe9; }
.brand { gap: 12px; }
.brand b { font-size: 17px; letter-spacing: .5px; }
.brand small { font-size: 11px; letter-spacing: 1px; margin-top: 2px; }
.top { height: 80px; padding: 0 36px; gap: 48px; }
.top nav { gap: 8px; }
.top nav button { height: 40px; padding: 0 20px; border-radius: 8px; border-bottom: 0; color: var(--muted); }
.top nav button.on { background: var(--soft); color: var(--brand); }
.me { gap: 12px; font-size: 12px; }
#who { color: var(--ink); font-weight: 600; padding-right: 12px; border-right: 1px solid var(--line); }
.bar { padding: 12px 36px; background: #fff; border-bottom: 1px solid var(--line); color: var(--muted); gap: 20px; }
#syncText { line-height: 1.7; overflow-wrap: anywhere; }
.bar.warn { border-bottom-color: #f2e4c9; }
main { max-width: 1560px; padding: 32px 36px 56px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-heading h1 { font-size: 25px; line-height: 1.4; letter-spacing: -.5px; margin: 0 0 8px; font-weight: 650; }
.page-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.eyebrow { display: block; font-size: 10px; color: var(--brand); font-weight: 700; letter-spacing: 1.8px; margin-bottom: 8px; }
.read-badge { flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 20px; padding: 6px 12px; background: #fff; color: var(--muted); font-size: 12px; margin-top: 20px; }
.read-badge::before { content: ''; width: 6px; height: 6px; background: #8a9bb6; border-radius: 50%; }
.filter { background: #fff; border: 1px solid var(--line); padding: 18px; border-radius: 12px; gap: 12px; margin-bottom: 20px; }
.filter label { font-size: 12px; gap: 8px; }
.seg { padding: 4px; background: #f2f5fa; border: none; border-radius: 9px; }
.seg button { background: transparent; min-height: 34px; height: 34px; padding: 0 14px; color: var(--muted); border-radius: 6px; }
.seg button + button { border: none; }
.seg button.on { background: #fff; color: var(--brand); box-shadow: 0 1px 4px #24334b12; font-weight: 600; }
.quick button { border: none; background: #f6f8fc; border-radius: 6px; }
.table-wrap { border-radius: 12px; box-shadow: 0 3px 12px #24334b03; }
th, td { padding: 15px 18px; font-size: 13px; }
th { background: #f9fafc; color: #586981; font-weight: 600; height: 50px; }
tbody tr:hover td { background: #f8faff; }
td.empty { padding: 72px 24px; line-height: 1.8; }
.pager { padding: 12px 0; gap: 12px; font-size: 12px; }
.cards { gap: 20px; }
.card { padding: 24px; border-radius: 12px; gap: 14px; box-shadow: 0 3px 12px #24334b03; }
.card h4 { font-size: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.card .kv { gap: 10px 12px; }
.card .actions { padding-top: 10px; flex-wrap: wrap; }
.dot { flex-shrink: 0; }
dialog { border-radius: 16px; padding: 28px; box-shadow: 0 24px 80px #192b4926; }
dialog::backdrop { background: #14233b55; backdrop-filter: blur(3px); }
dialog h3 { font-size: 20px; margin-bottom: 10px; }
dialog label { font-size: 13px; }
dialog form { gap: 18px; }
.login { background: radial-gradient(ellipse at 20% 20%, #e8efff 0, transparent 55%), #f5f7fb; padding: 32px 20px; }
.login-card { width: min(420px, 100%); border-radius: 20px; padding: 40px; gap: 20px; box-shadow: 0 20px 70px #233e7510; }
.login-intro { margin: 8px 0 2px; }
.login-intro h1 { margin: 0 0 8px; font-size: 24px; }
.login-intro p, .login-note { margin: 0; color: var(--muted); font-size: 12px; }
.login-card input, .login-card button { height: 44px; }
.login-card .err:empty { display: none; }
.login-note { text-align: center; padding-top: 4px; }
@media (max-width: 1050px) {
  .top { padding: 0 24px; gap: 24px; }
  .top nav button { padding: 0 12px; }
  .me { gap: 8px; }
}
@media (max-width: 720px) {
  .top { height: auto; padding: 16px 16px 0; gap: 16px 10px; }
  .brand b { font-size: 15px; }
  .top .logo { width: 34px; height: 34px; }
  .top nav { padding-bottom: 12px; }
  .top nav button { flex: 1; }
  .me { flex-wrap: wrap; }
  .bar { padding: 12px 16px; align-items: flex-start; }
  main { padding: 24px 16px 40px; }
  .page-heading { margin-bottom: 20px; }
  .page-heading h1 { font-size: 22px; }
  .read-badge { display: none; }
  .filter { padding: 14px; gap: 12px; }
  .seg { width: 100%; }
  .seg button { flex: 1; padding: 0 8px; }
  .filter label { flex-wrap: wrap; }
  .filter label input { min-width: 0; flex: 1; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .login-card { padding: 28px; }
}
