:root {
  --ink: #1a2b4a;
  --ink-2: #758092;
  --ink-3: #a7afbc;
  --line: #e3e6eb;
  --line-2: #eef0f3;
  --bg: #f6f7f9;
  --card: #ffffff;
  --ok: #1c6b47;
  --warn: #8a5a12;
  --danger: #9a2f2f;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(26, 43, 74, 0.04), 0 8px 24px rgba(26, 43, 74, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); }

button {
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 14px;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
button:hover { border-color: var(--ink-3); }
button:disabled { opacity: 0.5; cursor: default; }

button.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
button.primary:hover { background: #243657; }

button.ghost { background: transparent; }
button.danger { color: var(--danger); border-color: #eccfcf; }
button.danger:hover { background: #fdf4f4; }

input, textarea, select {
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  width: 100%;
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--ink-2); }
textarea { resize: vertical; min-height: 84px; line-height: 1.7; }

label.field { display: block; margin-bottom: 14px; }
label.field > span {
  display: block;
  font-size: 12px;
  color: var(--ink-2);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.stack > * + * { margin-top: 10px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

.muted { color: var(--ink-2); }
.tiny { font-size: 12px; }
.section-title {
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--ink-2);
  margin: 0 0 12px;
  font-weight: 600;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1f3f6;
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.chip.ok { background: #f0f6f2; color: var(--ok); border-color: #d8e8de; }
.chip.warn { background: #fbf6ea; color: var(--warn); border-color: #eee0c4; }

/* toast */
#toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 9999;
  max-width: 80vw;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.error { background: var(--danger); }

/* 弹层 */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(26, 43, 74, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9000;
}
.modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 620px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(26, 43, 74, 0.18);
}
.modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-body { padding: 20px 22px; overflow: auto; }
.modal-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--line-2);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* 空状态 */
.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--ink-2);
}
.empty h3 { margin: 0 0 6px; font-weight: 600; color: var(--ink); font-size: 15px; }
