/* rcj-dinner · 共享样式
   浅色暖调，克制排版，不放装饰性图标。
   换配色只改 :root 里的变量。 */

:root {
  --bg: #fbf7f2;
  --surface: #ffffff;
  --surface-2: #f6f1ea;
  --ink: #23201c;
  --ink-2: #5c544b;
  --muted: #928879;
  --line: #e8e0d5;
  --line-2: #f0e9e0;
  --accent: #c2543c;
  --accent-ink: #a8442f;
  --accent-soft: #fceeea;
  --ok: #4e7a4a;
  --ok-soft: #edf4ec;
  --warn: #b4802a;
  --warn-soft: #fbf3e4;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(35, 32, 28, 0.04), 0 8px 24px rgba(35, 32, 28, 0.05);
  --serif: 'Songti SC', 'Source Han Serif SC', Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

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

.wrap { max-width: 720px; margin: 0 auto; padding: 0 18px 72px; }
.wrap-wide { max-width: 1040px; }

/* ── 头部 ── */
.top { padding: 44px 0 26px; }
.top h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
}
.top .sub { margin-top: 8px; color: var(--muted); font-size: 14px; }
.top .who { margin-top: 14px; font-size: 13px; color: var(--ink-2); }

/* ── 卡片 / 分区 ── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0;
  box-shadow: var(--shadow);
}
.card.flat { box-shadow: none; }
.card.soft { background: var(--surface-2); border-color: var(--line-2); box-shadow: none; }

.sec-h {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 14px;
}
.sec-h .n {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--muted);
  min-width: 20px;
}
.sec-h h2 { margin: 0; font-size: 16px; font-weight: 600; }
.sec-h .hint { margin-left: auto; font-size: 12px; color: var(--muted); }

/* ── 菜单 ── */
.cat { margin: 0 0 18px; }
.cat > .cat-name {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 4px;
}
.dish {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line-2);
}
.dish:last-child { border-bottom: none; }
.dish .info { flex: 1; min-width: 0; }
.dish .nm { font-size: 15px; }
.dish .ds { font-size: 12px; color: var(--muted); margin-top: 2px; }
.dish .mins { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dish.on { background: var(--accent-soft); border-radius: var(--radius-sm); padding-left: 10px; padding-right: 10px; }
.dish.on .nm { color: var(--accent-ink); font-weight: 600; }

.step { display: flex; align-items: center; gap: 2px; }
.step button {
  width: 30px; height: 30px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: 8px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.step button:hover { border-color: var(--accent); color: var(--accent); }
.step .q {
  min-width: 26px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}
.step .q.zero { color: var(--muted); }

.note-in {
  width: 100%;
  margin-top: 8px;
  font-size: 13px;
}

/* ── 表单 ── */
label.fl { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
input[type='text'], input[type='email'], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[readonly] { background: var(--surface-2); color: var(--ink-2); }
textarea { resize: vertical; min-height: 76px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 180px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ── 按钮 ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink-2); border-color: var(--line); font-weight: 500; }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--muted); color: var(--ink); }
.btn.ok { background: var(--ok); border-color: var(--ok); }
.btn.ok:hover { filter: brightness(0.93); }
.btn.warn { background: var(--warn); border-color: var(--warn); }
.btn.warn:hover { filter: brightness(0.93); }
.btn.sm { padding: 7px 13px; font-size: 13px; }
.btn.block { width: 100%; }

/* ── 录音 ── */
.rec { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rec .dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--line); flex: none;
}
.rec.live .dot { background: var(--accent); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.rec .time { font-variant-numeric: tabular-nums; font-size: 15px; color: var(--ink-2); min-width: 44px; }
.rec .meter { flex: 1; min-width: 120px; height: 4px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.rec .meter i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.12s linear; }
audio { width: 100%; margin-top: 12px; }

/* ── 图片 ── */
.pics { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.pic {
  position: relative;
  width: 92px; height: 92px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pic .x {
  position: absolute; top: 3px; right: 3px;
  width: 20px; height: 20px;
  border: none; border-radius: 50%;
  background: rgba(35, 32, 28, 0.62);
  color: #fff; font-size: 13px; line-height: 1;
  cursor: pointer;
}
.pic .kb {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(35, 32, 28, 0.58);
  color: #fff; font-size: 10px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.drop {
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.drop:hover, .drop.over { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }

/* ── 状态标签 / 时间线 ── */
.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.tag.pending { background: var(--warn-soft); color: var(--warn); }
.tag.cooking { background: var(--accent-soft); color: var(--accent-ink); }
.tag.served { background: var(--ok-soft); color: var(--ok); }
.tag.retry { background: var(--surface-2); color: var(--muted); }

.tl { margin: 12px 0 0; padding: 0; list-style: none; }
.tl li {
  position: relative;
  padding: 0 0 14px 18px;
  border-left: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-2);
}
.tl li:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl li::before {
  content: '';
  position: absolute; left: -4px; top: 7px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--line);
}
.tl li.hi::before { background: var(--accent); }
.tl .t { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; margin-left: 8px; }

/* ── 提示条 ── */
.msg {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin: 12px 0;
  border: 1px solid transparent;
}
.msg.err { background: var(--accent-soft); color: var(--accent-ink); border-color: #f2d8d0; }
.msg.ok { background: var(--ok-soft); color: var(--ok); border-color: #d6e6d4; }
.msg.info { background: var(--surface-2); color: var(--ink-2); border-color: var(--line-2); }

/* ── 门禁页 ── */
.gate { max-width: 400px; margin: 0 auto; padding: 96px 20px; text-align: center; }
.gate h1 { font-family: var(--serif); font-size: 24px; margin: 0 0 12px; font-weight: 600; }
.gate p { color: var(--muted); font-size: 14px; margin: 0; }

/* ── 后台 ── */
.stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.stat {
  flex: 1; min-width: 108px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.stat .v { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat .k { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.o-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.o-head .id { font-size: 11px; color: var(--muted); font-family: ui-monospace, Menlo, Consolas, monospace; }
.o-head .who { font-weight: 600; }
.o-head .when { font-size: 12px; color: var(--muted); margin-left: auto; font-variant-numeric: tabular-nums; }
.o-body { margin-top: 12px; font-size: 14px; }
.o-body .kv { display: flex; gap: 10px; padding: 5px 0; }
.o-body .kv .k { color: var(--muted); font-size: 12.5px; min-width: 64px; flex: none; padding-top: 2px; }
.o-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.card.focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 20px 0 4px; }
.tabs button {
  padding: 9px 14px;
  border: none; background: none;
  color: var(--muted);
  font-family: inherit; font-size: 14px; cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }

table.tb { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tb th, table.tb td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tb th { color: var(--muted); font-weight: 500; font-size: 12px; }
table.tb code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }

.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.thumbs img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; }

.lb {
  position: fixed; inset: 0;
  background: rgba(35, 32, 28, 0.82);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; z-index: 50; cursor: zoom-out;
}
.lb img { max-width: 100%; max-height: 100%; border-radius: 8px; }

.foot {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hide { display: none !important; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.dim { color: var(--muted); }
.tiny { font-size: 12px; }

@media (max-width: 560px) {
  .top { padding: 30px 0 20px; }
  .top h1 { font-size: 25px; }
  .card { padding: 16px; }
  .o-head .when { margin-left: 0; width: 100%; }
}
