/* 扫码排队系统原型 · 基础样式与设计令牌
   风格：克制的工具型界面。低圆角、无渐变、无毛玻璃、无 emoji。 */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* 品牌 */
  --brand: #1F6F5C;
  --brand-d: #165243;
  --brand-l: #E9F2EF;
  --brand-line: #C9DED7;

  /* 文字与线条 */
  --ink: #14181C;
  --ink-2: #414A53;
  --ink-3: #6B7580;
  --ink-4: #98A1AA;
  --line: #DCDFDB;
  --line-2: #ECEEEA;

  /* 底 */
  --bg: #F3F4F1;
  --bg-2: #E9EBE7;
  --white: #FFFFFF;

  /* 状态语义色（全局统一） */
  --calling: #C2410C;      /* 叫号中 */
  --calling-bg: #FDF1E8;
  --wait: #2563A8;         /* 等待中 */
  --wait-bg: #EBF2FA;
  --passed: #6B7580;       /* 过号待处理 */
  --passed-bg: #EFF1F3;
  --done: #1F7A4D;         /* 已入座 */
  --done-bg: #EAF4EE;
  --warn: #A16207;
  --warn-bg: #FBF4E5;
  --danger: #B3261E;
  --danger-bg: #FBEDEC;

  /* 形状 */
  --r: 8px;
  --r-s: 6px;
  --r-l: 12px;
  --sh: 0 1px 2px rgba(20, 24, 28, .06), 0 1px 3px rgba(20, 24, 28, .04);
  --sh-2: 0 6px 20px rgba(20, 24, 28, .10);

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

html, body { height: 100%; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }

.num { font-variant-numeric: tabular-nums; letter-spacing: .2px; }

/* ---------- 图标 ---------- */
svg.ic { width: 18px; height: 18px; flex: none; display: block; }
svg.ic-14 { width: 14px; height: 14px; }
svg.ic-16 { width: 16px; height: 16px; }
svg.ic-20 { width: 20px; height: 20px; }
svg.ic-22 { width: 22px; height: 22px; }
svg.ic-26 { width: 26px; height: 26px; }
svg.ic-34 { width: 34px; height: 34px; }
svg.ic-56 { width: 56px; height: 56px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px;
  font-family: var(--font); font-size: 13px; font-weight: 500;
  color: var(--ink-2); background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-s);
  cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: #F7F8F6; border-color: #CDD2CD; }
.btn:active { background: var(--bg-2); }

.btn-primary { color: #fff; background: var(--brand); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-d); border-color: var(--brand-d); }
.btn-primary:active { background: #124234; }

.btn-call { color: #fff; background: var(--calling); border-color: var(--calling); }
.btn-call:hover { background: #A93509; border-color: #A93509; }

.btn-danger { color: var(--danger); border-color: #E6C9C6; background: #fff; }
.btn-danger:hover { background: var(--danger-bg); }

.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-2); border-color: transparent; }

.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh);
}
.card-hd {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid var(--line-2);
  font-size: 13.5px; font-weight: 600; color: var(--ink);
}
.card-hd .right { margin-left: auto; font-weight: 400; font-size: 12.5px; color: var(--ink-3); }
.card-bd { padding: 16px; }
.card-bd.tight { padding: 10px 16px; }

/* ---------- 标签 / 徽标 ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 4px;
  font-size: 12px; font-weight: 500; line-height: 1;
  background: var(--passed-bg); color: var(--passed);
}
.tag-calling { background: var(--calling-bg); color: var(--calling); }
.tag-wait { background: var(--wait-bg); color: var(--wait); }
.tag-done { background: var(--done-bg); color: var(--done); }
.tag-warn { background: var(--warn-bg); color: var(--warn); }
.tag-danger { background: var(--danger-bg); color: var(--danger); }
.tag-brand { background: var(--brand-l); color: var(--brand-d); }

.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

/* ---------- 表单 ---------- */
.field { display: block; margin-bottom: 14px; }
.field > label { display: block; margin-bottom: 6px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.input, .select {
  width: 100%; height: 34px; padding: 0 10px;
  font-family: var(--font); font-size: 13.5px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-s);
  outline: none;
}
.input:focus, .select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31,111,92,.10); }
.hint { margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.hint-warn { color: var(--warn); }
.hint-danger { color: var(--danger); }

.switch {
  position: relative; width: 40px; height: 22px; flex: none;
  background: #C8CEC8; border-radius: 11px; cursor: pointer; transition: background .15s;
}
.switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; background: #fff; border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,.18); transition: left .15s;
}
.switch.on { background: var(--brand); }
.switch.on::after { left: 20px; }

/* ---------- 列表行 ---------- */
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line-2);
}
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-size: 13.5px; font-weight: 500; }
.row .s { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.row-link { cursor: pointer; }
.row-link:hover { background: #FAFBFA; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; padding: 10px 14px; font-weight: 500; font-size: 12.5px; color: var(--ink-3);
  background: #FAFBFA; border-bottom: 1px solid var(--line);
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:hover { background: #FAFBFA; }
.table .act { color: var(--brand); cursor: pointer; }
.table .act + .act { margin-left: 12px; }

/* ---------- 统计块 ---------- */
.stats { display: grid; gap: 12px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 16px; box-shadow: var(--sh);
}
.stat .k { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.stat .v { margin-top: 6px; font-size: 26px; font-weight: 600; letter-spacing: -.4px; }
.stat .v small { font-size: 13px; font-weight: 400; color: var(--ink-3); margin-left: 4px; }

/* ---------- 分段控件 ---------- */
.seg { display: inline-flex; padding: 3px; background: var(--bg-2); border-radius: var(--r-s); gap: 2px; }
.seg button {
  height: 28px; padding: 0 14px; border: 0; border-radius: 4px;
  background: transparent; color: var(--ink-3);
  font-family: var(--font); font-size: 13px; cursor: pointer;
}
.seg button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: var(--sh); }

/* ---------- 提示条 ---------- */
.note {
  display: flex; gap: 10px; padding: 10px 12px;
  border-radius: var(--r-s); font-size: 12.5px; line-height: 1.6;
  background: var(--brand-l); color: var(--brand-d);
}
.note-warn { background: var(--warn-bg); color: #7A4A06; }
.note-danger { background: var(--danger-bg); color: #8C1D17; }
.note svg.ic { margin-top: 2px; }

/* ---------- 设置行（各端共用） ---------- */
/* 设置行内主标题与副标题必须分行，否则会挤成一行 */
.setrow { display: flex; align-items: center; gap: 10px; }
.setrow .grow > span { display: block; }
.setrow .s { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.setrow .v { font-size: 12.5px; color: var(--ink-3); }

/* ---------- 空态 ---------- */
.empty { padding: 28px 16px; text-align: center; color: var(--ink-4); font-size: 13px; }
