* { box-sizing: border-box; }
:root {
  --bg: #0f1424; --card: #1a2138; --line: #2a3350; --fg: #e8ecf6;
  --muted: #8b95b2; --accent: #6c8cff; --ok: #3ecf8e; --warn: #ffae57; --err: #ff6b6b;
}
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.5 -apple-system, "PingFang SC", "Microsoft Yahei", sans-serif;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.err { color: var(--err); min-height: 1.2em; }
button {
  background: var(--accent); color: #fff; border: 0; border-radius: 8px;
  padding: 8px 14px; cursor: pointer; font-size: 14px;
}
button:hover { filter: brightness(1.1); }
button.ghost { background: transparent; border: 1px solid var(--line); color: var(--fg); }
button.sm { padding: 4px 9px; font-size: 13px; }
button.danger { background: #3a2030; color: var(--err); border: 1px solid #5a2a3a; }
input, select, textarea {
  background: #11172b; color: var(--fg); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; font-size: 14px; width: 100%;
}
textarea { font-family: ui-monospace, monospace; min-height: 64px; }

/* 登录 */
.login { display: grid; place-items: center; min-height: 100vh; }
.card { background: var(--card); padding: 28px; border-radius: 16px; width: 360px; }
.card h1 { margin: 0 0 4px; font-size: 20px; }
.card input { margin: 14px 0 12px; }
.card button { width: 100%; }

/* 主框架 */
header {
  display: flex; align-items: center; gap: 14px; padding: 12px 20px;
  background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0;
}
header nav { display: flex; gap: 6px; }
.tab { background: transparent; color: var(--muted); }
.tab.active { background: #25304f; color: var(--fg); }
.spacer { flex: 1; }
main { padding: 20px; max-width: 1000px; margin: 0 auto; }

.bar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.bar select { width: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
th { color: var(--muted); font-weight: 500; }
.pill { padding: 2px 8px; border-radius: 99px; font-size: 12px; }
.pill.published { background: #16432f; color: var(--ok); }
.pill.draft { background: #3a3320; color: var(--warn); }
.pill.offline { background: #3a2030; color: var(--err); }
.actions { display: flex; gap: 5px; flex-wrap: wrap; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.full { grid-column: 1 / -1; }
.row-check { flex-direction: row !important; align-items: center; gap: 8px; }
.row-check input { width: auto; }

.modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 20px; z-index: 10;
}
.modal { background: var(--card); border-radius: 16px; padding: 22px; width: 600px; max-width: 100%; max-height: 90vh; overflow: auto; }
.modal h3 { margin: 0 0 16px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #25304f; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line);
}
.toast.err { background: #3a2030; }
.section-title { margin: 22px 0 8px; color: var(--muted); font-size: 13px; }
.banner { background: #3a2030; color: var(--warn); padding: 8px 20px; font-size: 13px; border-bottom: 1px solid #5a2a3a; text-align: center; }
