:root {
  --bg: #f5f6f8;
  --card: #fff;
  --line: #e3e6ea;
  --text: #1f2328;
  --muted: #6b7280;
  --brand: #2563eb;
  --danger: #dc2626;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
header h1 { font-size: 18px; margin: 0; }
main { max-width: 960px; margin: 24px auto; padding: 0 16px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 16px;
}
.cols { display: grid; grid-template-columns: 300px 1fr; gap: 16px; }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } }
h2 { font-size: 15px; margin: 0 0 12px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
input, select, button {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
}
input { width: 100%; margin-top: 4px; }
button { cursor: pointer; background: var(--brand); color: #fff; border-color: var(--brand); }
button.ghost { background: transparent; color: var(--muted); border-color: var(--line); }
button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
button.ghost.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tabs button { background: transparent; color: var(--muted); border-color: var(--line); }
.tabs button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
form { display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.row select { flex: 1; }
ul { list-style: none; padding: 0; margin: 0; }
#spaces li, #members li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
#spaces button.space {
  width: 100%;
  display: flex;
  justify-content: space-between;
  background: transparent;
  color: var(--text);
  border-color: transparent;
  padding: 8px 6px;
}
#spaces button.space.active { background: #eef2ff; border-color: #c7d2fe; }
small { color: var(--muted); font-weight: normal; }
.row-actions { display: flex; gap: 6px; align-items: center; }
.msg { font-size: 13px; min-height: 18px; margin: 8px 0 0; color: var(--muted); }
.msg.err { color: var(--danger); }
.msg.ok { color: #047857; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px; font: inherit; resize: vertical; }
#draft-fields li { padding: 6px 0; border-bottom: 1px solid var(--line); }
