/* 神仙 · 管理中心 — 设计令牌与基础样式 */
:root {
  --dq-background: #f4f6f0;
  --dq-surface: #ffffff;
  --dq-text: #20291e;
  --dq-muted: #536052;
  --dq-brand: #355e2d;
  --dq-hover: #294c22;
  --dq-tint: #e8f1df;
  --dq-line: #dce4d7;
  --dq-metric: #eff3ea;
  --dq-amber: #b07c3a;
  --dq-amber-tint: #f7efdd;
  --dq-amber-text: #7c5a26;
  --dq-cream: #fbf6ea;
  --dq-blue-tint: #eef3fb;
  --dq-blue: #2f4f86;
  --dq-danger: #a8342a;
  --dq-radius: 20px;
  --dq-radius-sm: 12px;
  --dq-radius-xs: 10px;
  --dq-shadow: 0 1px 2px rgba(32, 41, 30, .06);
  --dq-font: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --dq-mono: SFMono-Regular, Consolas, ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

html { background: var(--dq-background); color-scheme: light; }

body {
  background-color: var(--dq-background);
  color: var(--dq-text);
  font-family: var(--dq-font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}

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

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

h1, h2, h3, h4, p { margin: 0; }

::selection { background: #cfe3bd; }

:is(button, a, input, select, textarea):focus-visible {
  outline: 2px solid var(--dq-brand);
  outline-offset: 2px;
}

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border: 1px solid transparent; border-radius: var(--dq-radius-xs);
  padding: .6rem 1.1rem; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--dq-brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--dq-hover); }
.btn-ghost { background: #fff; border-color: var(--dq-line); color: var(--dq-text); font-weight: 500; }
.btn-ghost:hover:not(:disabled) { background: var(--dq-tint); }
.btn-amber { background: var(--dq-amber); color: #fff; }
.btn-amber:hover:not(:disabled) { background: #96652c; }
.btn-soft { background: var(--dq-tint); color: var(--dq-brand); font-weight: 600; }
.btn-soft:hover:not(:disabled) { background: #dcebd0; }
.btn-dark { background: #22281f; color: #fff; }
.btn-sm { padding: .35rem .7rem; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- 表单 ---------- */
.field { display: grid; gap: .4rem; }
.field > label, .field-label { font-size: 13px; color: var(--dq-muted); }
.field > label .req { color: #b64a3a; margin-left: 2px; }

.input, .select, .textarea,
input[type="date"], input[type="text"], input[type="number"], input[type="password"], select, textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--dq-line);
  border-radius: var(--dq-radius-xs);
  padding: .65rem .85rem;
  color: var(--dq-text);
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder, textarea::placeholder { color: var(--dq-muted); opacity: 1; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--dq-brand);
  box-shadow: 0 0 0 3px rgba(53, 94, 45, .12);
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--dq-muted) 50%), linear-gradient(135deg, var(--dq-muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }
textarea { min-height: 96px; resize: vertical; }

.checkbox { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; font-size: 14px; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--dq-brand); cursor: pointer; }

/* ---------- 卡片 / 通用块 ---------- */
.panel {
  background: #fff; border: 1px solid var(--dq-line); border-radius: var(--dq-radius);
  padding: 1.6rem 1.75rem; box-shadow: var(--dq-shadow);
}

.mini-label { display: block; font-size: 11px; letter-spacing: .16em; font-weight: 700; color: var(--dq-muted); text-transform: uppercase; }

.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.chip-owner { background: var(--dq-amber-tint); color: var(--dq-amber-text); }
.chip-ok { background: var(--dq-tint); color: var(--dq-brand); }
.chip-muted { background: #f0f2ec; color: var(--dq-muted); }
.chip-blue { background: var(--dq-blue-tint); color: var(--dq-blue); }
.chip-warn { background: #fbeade; color: #9a5220; }

.table { width: 100%; border-collapse: collapse; }
.table thead th {
  background: var(--dq-background); color: var(--dq-muted); font-size: 13px; font-weight: 600;
  text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--dq-line); white-space: nowrap;
}
.table tbody td { background: #fff; padding: .72rem .8rem; border-bottom: 1px solid var(--dq-line); font-size: 13.5px; vertical-align: middle; }
.table tbody tr:hover > td { background: #f3f7ef; }
.table tbody tr.selected > td { background: var(--dq-tint); }
.table tbody td small { color: var(--dq-muted); font-size: 12px; }

.muted { color: var(--dq-muted); }
.mono { font-family: var(--dq-mono); }
.money { font-weight: 700; }
.tiny { font-size: 12px; }
.stack { display: grid; gap: 1rem; }
.row { display: flex; align-items: center; gap: .75rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.grow { flex: 1 1 auto; min-width: 0; }
.center-text { text-align: center; }
.empty-state { padding: 2.4rem 0; text-align: center; color: var(--dq-muted); font-size: 13.5px; }
hr.sep { border: 0; border-top: 1px dashed var(--dq-line); margin: 1.2rem 0; }
