:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1c1e21;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #111827;
  --accent: #2563eb;
  --danger: #dc2626;
  --ok: #059669;
  --radius: 16px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: rgba(245,246,248,.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.dot { width: 11px; height: 11px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 4px #d1fae5; }
.muted { color: var(--muted); font-size: 13px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 24px; }
.card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--line); padding: 20px;
  box-shadow: 0 1px 2px rgba(16,24,40,.03);
}
.login-card { max-width: 420px; margin: 10vh auto 0; }
h1, h2 { margin: 0 0 14px; }
h1 { font-size: 24px; }
h2 { font-size: 17px; }
label { display: block; margin: 12px 0; font-size: 13px; color: var(--muted); }
input, textarea, button { font: inherit; }
input, textarea {
  width: 100%; margin-top: 6px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--text); outline: none;
}
input:focus, textarea:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px #dbeafe; }
textarea { resize: vertical; }
button { cursor: pointer; border: 0; border-radius: 10px; padding: 10px 16px; }
button.primary { background: var(--primary); color: #fff; }
button.primary:hover { background: #374151; }
button.ghost { background: #eef0f3; color: var(--text); }
button.danger { background: #fee2e2; color: var(--danger); }
button.small { padding: 7px 10px; font-size: 12px; }
button:disabled { opacity: .5; cursor: not-allowed; }
.actions { display: flex; gap: 10px; margin-top: 14px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); }
.check input { width: auto; }
.error { color: var(--danger); font-size: 13px; min-height: 20px; }
.hidden { display: none !important; }
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { background: #e9ecf1; color: var(--muted); }
.tab.active { background: var(--primary); color: #fff; }
.grid { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 18px; align-items: start; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.list-head input { max-width: 240px; margin: 0; }
.list { display: flex; flex-direction: column; gap: 10px; max-height: 62vh; overflow: auto; padding-right: 4px; }
.item {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  background: #fbfbfc;
}
.item-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.item-title { font-weight: 650; }
.item-sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.pill { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 11px; background: #e5e7eb; color: #374151; }
.pill.ok { background: #d1fae5; color: #065f46; }
.pill.off { background: #fee2e2; color: #991b1b; }
.item-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.content { margin-top: 8px; color: #374151; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.empty { color: var(--muted); text-align: center; padding: 24px 0; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: #111827; color: #fff; padding: 11px 18px; border-radius: 999px;
  font-size: 13px; z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .wrap { padding: 16px; }
  .list { max-height: none; }
}
