:root {
  color-scheme: light;
  --ink: #1c1915;
  --muted: #74695c;
  --line: #e4d9cc;
  --paper: #f6f1e8;
  --card: #fffdf9;
  --green: #0d6b4c;
  --green-ink: #e7f5ee;
  --danger: #9d2f2f;
  --side: #17211e;
  --shadow: 0 16px 40px rgba(48, 34, 18, 0.08);
  font-family: "Segoe UI", "PingFang SC", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--danger); min-height: 1.2em; }
.eyebrow { margin: 0; color: var(--muted); font-size: 13px; letter-spacing: 0.04em; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(440px, 100%); }
.card, .login-card, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.login-card { padding: 28px; }
h1, h2, h3 { font-weight: 650; letter-spacing: -0.03em; }
h1 { margin: 8px 0; font-size: 36px; }
label { display: grid; gap: 6px; margin: 14px 0; font-size: 14px; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
}
textarea { min-height: 140px; resize: vertical; }
button, .primary, .ghost, .danger {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--green);
  color: white;
}
.ghost { background: transparent; color: inherit; border: 1px solid var(--line); }
.danger { background: var(--danger); }
.shell { min-height: 100vh; display: grid; grid-template-columns: 230px 1fr; }
aside {
  background: var(--side);
  color: #f4efe6;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.brand strong { display: block; font-size: 20px; }
.brand span, aside .ghost { color: #c9d5cf; font-size: 12px; }
nav { display: grid; gap: 6px; }
nav button { text-align: left; background: transparent; color: #e7efe9; }
nav button.active { background: #2b3d36; }
main { padding: 28px; }
.top { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 18px; }
.top h2 { margin: 4px 0 0; font-size: 28px; }
.grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 16px; }
.panel { padding: 18px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.stat { padding: 12px; border-radius: 14px; background: #f7f3ec; }
.stat b { display: block; font-size: 22px; }
.bubble {
  white-space: pre-wrap;
  background: #e7f6df;
  border-radius: 16px 16px 16px 5px;
  padding: 12px 14px;
  line-height: 1.6;
}
.row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 12px; border-radius: 999px; padding: 3px 8px; background: var(--green-ink); color: var(--green); }
.tag.warn { background: #fff1d6; color: #8a5a00; }
.tag.muted { background: #f0ebe4; color: var(--muted); }
.warn-list { display: grid; gap: 8px; margin-bottom: 14px; }
.warn-list p { margin: 0; padding: 10px 12px; background: #fff6e8; border-radius: 12px; }
.help { font-size: 14px; line-height: 1.7; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: var(--ink);
  color: white;
  padding: 12px 14px;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.toast.show { opacity: 1; }
@media (max-width: 800px) {
  .shell, .grid, .split, .stats { grid-template-columns: 1fr; }
  aside { padding: 14px; }
  nav { grid-template-columns: repeat(3, 1fr); }
  main { padding: 16px; }
}
