:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #171717;
  --muted: #6d6d6d;
  --faint: #8f8f8f;
  --line: #e7e7e7;
  --line-strong: #d4d4d4;
  --soft: #f6f6f6;
  --ok: #17663a;
  --bad: #9f1239;
  --wait: #3f3f46;
  --sidebar: 216px;
  --font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; }

:focus-visible {
  outline: 2px solid #171717;
  outline-offset: 2px;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
}

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: #fff;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 22px;
}

.mark {
  width: 14px;
  height: 14px;
  background: #171717;
  display: inline-block;
}

.brand-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.brand-sub {
  display: block;
  color: var(--faint);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}

.nav { display: flex; flex-direction: column; gap: 2px; }

.nav a {
  display: block;
  padding: 8px 10px;
  border-left: 2px solid transparent;
  color: #4b4b4b;
}

.nav a:hover { color: var(--ink); background: var(--soft); }

.nav a.is-on {
  color: var(--ink);
  border-left-color: #171717;
  font-weight: 600;
  background: transparent;
}

.side-foot {
  margin-top: auto;
  padding: 12px 10px 0;
  color: var(--faint);
  font-size: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.side-foot a:hover { color: var(--ink); }

.main {
  min-width: 0;
  padding: 28px 48px 72px;
}

.banner {
  margin: 0 0 28px;
  padding: 10px 12px;
  background: var(--soft);
  color: #3f3f3f;
  font-size: 13px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.sub { margin: 6px 0 0; color: var(--muted); }

h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--muted);
}

.actions { display: flex; gap: 8px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border: 1px solid #171717;
  background: #171717;
  color: #fff;
  border-radius: 4px;
}

.btn:hover { background: #2b2b2b; }

.btn.ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn.ghost:hover { background: var(--soft); }

.btn.small { height: 32px; padding: 0 10px; font-size: 13px; }

.metrics {
  display: flex;
  gap: 36px;
  padding: 0 0 22px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.metrics b {
  display: block;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.metrics span { color: var(--muted); font-size: 13px; }

.metrics .bad b { color: var(--bad); }

section + section { margin-top: 36px; }

.agenda { border-top: 1px solid var(--line); }

.agenda a, .agenda .row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.agenda time, .when {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.where { color: var(--muted); font-size: 13px; }

.agenda a:hover .what { text-decoration: underline; }

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--faint);
  padding: 0 12px 10px 0;
  border-bottom: 1px solid var(--line);
}

td {
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

tr:hover td { background: #fafafa; }

.name { font-weight: 600; }

.muted { color: var(--muted); }

.faint { color: var(--faint); font-size: 12px; }

.st { font-weight: 600; font-size: 13px; }
.st-wait { color: var(--wait); }
.st-ok { color: var(--ok); }
.st-bad { color: var(--bad); }

.filters { display: flex; gap: 6px; margin-bottom: 16px; }

.filters a, .filters button {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 4px;
}

.filters a.is-on, .filters button.is-on {
  border-color: var(--line-strong);
  color: var(--ink);
  background: #fff;
}

.banner.bad { background: #fff1f2; color: var(--bad); }
.banner.ok { background: #f0fdf4; color: var(--ok); }

.inline { display: inline; }
.text-btn, .side-foot button {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
}
.empty { color: var(--muted); padding: 8px 0 0; }

.panel {
  border: 1px solid var(--line);
  padding: 16px;
  margin-bottom: 28px;
}

.fields {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 12px;
  align-items: end;
}

label { display: block; }

label span, .lbl {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
}

input, select, textarea {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
}

textarea {
  height: auto;
  min-height: 160px;
  padding: 12px;
  line-height: 1.65;
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
}

.stack { display: flex; flex-direction: column; gap: 16px; }

.drop {
  height: 96px;
  border: 1px dashed var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: #fff;
}

.btn-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 8px;
  margin-bottom: 8px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.check input { width: 16px; height: 16px; }

.stage {
  background: #f3f3f3;
  padding: 20px;
}

.post {
  background: #fff;
  border: 1px solid var(--line);
  padding: 14px 14px 10px;
}

.post-ch {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 10px;
}

.shot {
  height: 148px;
  background: #f7f7f7;
  border: 1px solid var(--line);
  margin-bottom: 10px;
  display: flex;
  align-items: flex-end;
  padding: 8px;
  color: var(--faint);
  font-size: 12px;
  overflow: hidden;
}

.shot img, .shot video {
  width: 100%;
  height: 148px;
  object-fit: cover;
  display: block;
}

.drop input { display: none; }

.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.post p { margin: 0 0 10px; white-space: pre-wrap; }

.link-btn {
  display: inline-block;
  border: 1px solid var(--line-strong);
  padding: 4px 10px;
  margin: 0 6px 6px 0;
  font-size: 13px;
  border-radius: 4px;
}

.post time {
  display: block;
  text-align: right;
  color: var(--faint);
  font-size: 12px;
}

.note { color: var(--faint); font-size: 12px; margin-top: 8px; }

.thumb {
  width: 44px;
  height: 44px;
  background: var(--soft);
  border: 1px solid var(--line);
  display: inline-block;
  vertical-align: middle;
  margin-right: 12px;
  overflow: hidden;
  flex: none;
}

.cell-title { display: flex; align-items: center; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background: #fff;
}

.login {
  width: min(380px, 100%);
}

.login h1 { margin: 18px 0 6px; }

.login form { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }

.login .btn { width: 100%; margin-top: 8px; }

.error-line { color: var(--bad); font-size: 13px; margin: 4px 0 0; }

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .side { position: relative; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .main { padding: 24px 20px 48px; }
  .form-grid, .fields, .btn-row { grid-template-columns: 1fr; }
}
