/* ===========================================================
   邻集 LINJI · 演示系统 基础样式与设计令牌
   =========================================================== */
:root {
  --ink: #14161b;
  --ink-2: #3d434e;
  --ink-3: #6b7280;
  --ink-4: #9ca3af;
  --ink-5: #b9bfc9;
  --line: #e8eaee;
  --line-strong: #d9dce2;
  --bg: #f4f5f7;
  --card: #ffffff;

  --brand: #e2542c;
  --brand-strong: #c8431e;
  --brand-soft: #fdeee8;
  --brand-ink: #8f2f14;

  --jade: #0e7a62;
  --jade-soft: #e6f4f0;
  --gold: #a97a12;
  --gold-soft: #fbf3e2;
  --danger: #c0392b;
  --danger-soft: #fbeae8;
  --info: #2f6fb3;
  --info-soft: #eaf1fa;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;

  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-2: 0 2px 6px rgba(16, 24, 40, 0.06), 0 10px 24px rgba(16, 24, 40, 0.07);
  --shadow-3: 0 18px 48px rgba(10, 14, 22, 0.18);

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
svg { display: block; }
::selection { background: rgba(226, 84, 44, 0.16); }

.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- 通用小组件 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.badge-brand { background: var(--brand-soft); color: var(--brand-ink); }
.badge-jade { background: var(--jade-soft); color: var(--jade); }
.badge-gold { background: var(--gold-soft); color: var(--gold); }
.badge-grey { background: #f0f1f4; color: var(--ink-3); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }

.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; display: inline-block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.12s ease, background 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.985); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(226, 84, 44, 0.24); }
.btn-primary:hover { background: var(--brand-strong); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost { background: #fff; border: 1px solid var(--line-strong); color: var(--ink-2); }
.btn-ghost:hover { background: #fafbfc; }
.btn-soft { background: #f1f3f6; color: var(--ink-2); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn-xs { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.field {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line-strong);
  font-size: 13.5px;
  outline: none;
  transition: border 0.15s, box-shadow 0.15s;
}
.field:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(226, 84, 44, 0.12); }
textarea.field { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.55; }
select.field { appearance: none; background-image: none; cursor: pointer; }

.card {
  background: var(--card);
  border-radius: var(--r);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}

.sec-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 10px;
}
.sec-title h3 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -0.1px; }
.sec-title .more { font-size: 12px; color: var(--ink-4); display: flex; align-items: center; gap: 2px; }

/* 表格（后台） */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left;
  font-weight: 600;
  color: var(--ink-3);
  font-size: 12px;
  padding: 10px 14px;
  background: #fafbfc;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  vertical-align: middle;
}
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #fcfcfd; }
.tbl .strong { color: var(--ink); font-weight: 600; }

/* 滑动条 */
.range { -webkit-appearance: none; width: 100%; height: 4px; border-radius: 4px; background: var(--line-strong); outline: none; }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--brand);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18); cursor: pointer;
}

/* 滚动条 */
.scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.scroll::-webkit-scrollbar-thumb { background: rgba(140, 148, 160, 0.35); border-radius: 6px; }
.scroll::-webkit-scrollbar-track { background: transparent; }

/* Toast */
#toast {
  position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 20px);
  background: rgba(20, 22, 27, 0.94); color: #fff;
  padding: 11px 18px; border-radius: 12px; font-size: 13px; font-weight: 500;
  opacity: 0; pointer-events: none; transition: all 0.24s cubic-bezier(.2,.9,.3,1);
  z-index: 9999; box-shadow: 0 12px 32px rgba(0,0,0,.24); max-width: 460px; text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
