/* 云大厨管理后台样式 —— 与小程序端保持同一套配色 */

:root {
  --green: #3d9970;
  --green-dark: #2f6b4f;
  --green-light: #eaf5ef;
  --bg: #f7f7f3;
  --warm: #faf8f4;
  --orange: #d9541f;
  --text: #2f2f2a;
  --muted: #8a8a80;
  --line: #e8e8e0;
  --white: #fff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

.hidden { display: none !important; }

/* ---------- 登录 ---------- */
.login-page {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #e8f5ee 0%, #f5faf7 100%);
}
.login-box {
  width: 380px;
  background: #fff;
  border-radius: 16px;
  padding: 44px 40px;
  box-shadow: 0 8px 40px rgba(47, 107, 79, 0.1);
}
.login-logo {
  margin: 0;
  font-size: 30px;
  color: var(--green-dark);
  letter-spacing: 2px;
  text-align: center;
}
.login-sub {
  margin: 8px 0 32px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.field {
  display: block;
  margin-bottom: 18px;
}
.field span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.field input:focus { border-color: var(--green); }
/* 弹窗里的下拉（商户账号表单等）复用输入框外观 */
.field select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  background: #fff;
  color: var(--text);
}
.field select:focus { border-color: var(--green); }
/* 表格容器（商户账号列表） */
.table-wrap { overflow-x: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table-wrap th, .table-wrap td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table-wrap th { color: var(--muted); font-weight: 500; background: #fbfaf7; }
.table-wrap tbody tr:hover { background: #fbfaf7; }
.login-error {
  color: var(--orange);
  font-size: 13px;
  min-height: 20px;
  margin-bottom: 8px;
}
.login-tip {
  margin: 18px 0 0;
  font-size: 12px;
  color: #b0b0a6;
  text-align: center;
}

/* ---------- 布局 ---------- */
.app { display: flex; height: 100vh; }

.sidebar {
  width: 208px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.brand { padding: 22px 20px; border-bottom: 1px solid var(--line); }
.brand-logo {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--green-dark);
  letter-spacing: 1px;
}
.brand-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }

.nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}
.nav-item:hover { background: var(--warm); }
.nav-item.active {
  background: var(--green-light);
  color: var(--green-dark);
  font-weight: 600;
  border-left-color: var(--green);
}

/* ---------- 一级菜单分组（订单管理 / 门店设置）与子菜单 ---------- */
.nav-group .nav-parent { font-weight: 600; }
.nav-caret {
  margin-left: auto;
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  transition: transform 0.15s;
}
.nav-group.open .nav-caret { transform: rotate(180deg); }
/* 默认收起，由 .nav-group.open 控制展开，保证菜单结构在刷新后仍一致 */
.nav-sub { display: none; }
.nav-group.open .nav-sub { display: block; }
.nav-sub .nav-child {
  padding-left: 46px;
  font-size: 13px;
  color: var(--text);
  background: var(--warm);
}
.nav-sub .nav-child.active { background: var(--green-light); }

.sidebar-foot { padding: 16px; border-top: 1px solid var(--line); }
.who { font-size: 13px; color: var(--muted); margin-bottom: 12px; text-align: center; }

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: 58px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}
.topbar h2 { margin: 0; font-size: 17px; }
.clock { font-size: 13px; color: var(--muted); }

/* ---------- 门店切换器（顶栏） ---------- */
.shop-switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 16px;
  font-size: 13px;
}
.shop-switch-label { color: var(--muted); }
.shop-switcher {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  max-width: 200px;
}
.shop-switcher:focus { outline: 2px solid var(--green); outline-offset: -1px; }
.shop-switch-name { font-weight: 600; color: var(--text); }

/* ---------- 门店下拉（总店父级 + 子门店收纳） ---------- */
.shop-switch { position: relative; display: inline-block; }
.shop-switch-current {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.shop-switch-current:hover { border-color: var(--green); }
.shop-switch-caret { color: var(--muted); font-size: 11px; }
.shop-switch-icon { font-size: 13px; }
.shop-switch-menu {
  position: absolute;
  left: 0;
  top: 36px;
  z-index: 60;
  min-width: 210px;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 30, 20, 0.14);
}
.shop-switch-opt {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}
.shop-switch-opt:hover { background: #f2f7f3; }
.shop-switch-opt.active { color: var(--green); background: #eef7f0; }
.shop-switch-opt.active .shop-switch-text { font-weight: 600; }
/* 子门店：缩进 + 分支符，体现归属总店 */
.shop-switch-sub { padding-left: 20px; }
.shop-switch-branch { color: var(--muted); font-size: 12px; }
.shop-switch-opt em {
  margin-left: 6px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  color: var(--muted);
}
.content { flex: 1; overflow-y: auto; padding: 22px 24px; }

/* ---------- 按钮 ---------- */
.btn {
  height: 36px;
  padding: 0 18px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}
.btn:active { opacity: 0.85; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--green); color: #fff; }
.btn-ghost { background: var(--green-light); color: var(--green-dark); }
.btn-outline { background: #fff; color: var(--green); border: 1px solid var(--green); }
.btn-danger { background: #fff; color: var(--orange); border: 1px solid #f0c9b5; }
.btn-sm { height: 28px; padding: 0 12px; font-size: 12px; }
.btn-block { width: 100%; }

/* ---------- 卡片与表格 ---------- */
.panel {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 18px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.panel-title { font-size: 15px; font-weight: 600; margin: 0; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar input, .toolbar select {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}
.toolbar input:focus, .toolbar select:focus { border-color: var(--green); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left;
  padding: 11px 10px;
  background: var(--warm);
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
}
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
tr:hover td { background: #fcfcf9; }
.ops { display: flex; gap: 8px; white-space: nowrap; }

.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 12px;
  background: var(--green-light);
  color: var(--green-dark);
}
.tag-off { background: #f2f2ee; color: var(--muted); }
.tag-warn { background: #fdf0e8; color: var(--orange); }

/* 统计卡 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.stat {
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
}
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--green-dark);
  margin-top: 8px;
}
.stat-value.orange { color: var(--orange); }

/* ---------- 财务：营业数据卡片与报表 ---------- */
.tool-field { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.tool-field input[type="date"] {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  background: #fff;
}
.tool-field input[type="date"]:focus { border-color: var(--green); }
.finance-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.finance-note { margin: 12px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.cell-warn { color: var(--orange); }

/* 空状态 */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); font-size: 13px; }

/* ---------- 弹层 ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-box {
  width: 560px;
  max-width: 92vw;
  max-height: 88vh;
  background: #fff;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: 16px; }
.icon-btn {
  border: none;
  background: none;
  font-size: 26px;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}
.modal-body { padding: 22px; overflow-y: auto; }
.modal-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* 表单 */
.form-row {
  display: flex;
  gap: 14px;
  margin-bottom: 15px;
  align-items: flex-start;
}
.form-label {
  width: 96px;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--muted);
  padding-top: 9px;
}
.form-control { flex: 1; }
.form-tip {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  background: var(--warm);
  border-left: 3px solid var(--orange);
  padding: 10px 12px;
  border-radius: 4px;
  margin-bottom: 15px;
}
.form-tip strong { color: var(--text); }
.form-control input,
.form-control select,
.form-control textarea {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}
.form-control textarea { height: auto; padding: 9px 12px; resize: vertical; }
.form-control input:focus,
.form-control select:focus,
.form-control textarea:focus { border-color: var(--green); }
.form-hint { font-size: 12px; color: #b0b0a6; margin-top: 5px; }
/* 商户账号弹窗 · 微信支付配置区
   用左侧色条 + 分区标题与账号基础字段区分开，
   避免管理员把「支付资质」误当成「登录信息」随手填。 */
.sa-pay {
  margin-top: 16px;
  padding: 14px 14px 2px;
  border: 1px solid #ece7dd;
  border-left: 3px solid var(--orange);
  border-radius: 10px;
  background: #fcfaf6;
}
.sa-pay-title {
  font-size: 14px;
  font-weight: 600;
  color: #3c3a35;
  margin-bottom: 4px;
}
.sa-pay-row {
  display: flex;
  gap: 12px;
}
.sa-pay-row > .field { flex: 1; }
/* 配置未就绪 / 待完善提示 */
.sa-pay-warn {
  margin: 6px 0 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fdf3e8;
  color: #a8703a;
  font-size: 12px;
  line-height: 1.7;
}
.sa-pay-ok {
  margin: 6px 0 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #eef7ef;
  color: #4c7a52;
  font-size: 12px;
}
/* 必填星号 */
.form-label .req { color: var(--orange); font-style: normal; margin-left: 2px; }
/* 表格单元格里的小字补充说明（如「已退 ￥12」「已撤销」） */
.sub-note { font-size: 12px; color: var(--muted); margin-top: 3px; }
.switch-row { display: flex; align-items: center; gap: 8px; padding-top: 8px; }

/* 明细列表（菜品用料） */
.sub-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  max-height: 260px;
  overflow-y: auto;
}
.sub-item {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.sub-item:last-child { margin-bottom: 0; }
.sub-item select { flex: 2; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.sub-item input { flex: 1; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.sub-item button { border: none; background: none; color: var(--orange); cursor: pointer; font-size: 16px; }

/* Toast */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: #33332e;
  color: #fff;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 200;
  transition: transform 0.25s;
  max-width: 80vw;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--orange); }

/* 库存列就地编辑 */
.stock-cell { cursor: pointer; position: relative; white-space: nowrap; }
.stock-cell:hover { background: rgba(0, 0, 0, 0.035); }
.stock-cell.editing { background: #fff; padding: 0; }
.stock-cell .stock-input {
  width: 76px;
  padding: 4px 7px;
  font-size: 14px;
  border: 1px solid var(--orange);
  border-radius: 4px;
  outline: none;
  font-family: inherit;
  text-align: center;
}

/* 市场价列就地编辑（划线价） */
.market-cell { cursor: pointer; position: relative; white-space: nowrap; display: inline-block; }
.market-cell:hover { background: rgba(0, 0, 0, 0.035); }
.market-cell.editing { background: #fff; padding: 0; }
.market-cell .market-input {
  width: 88px;
  padding: 4px 7px;
  font-size: 14px;
  border: 1px solid var(--orange);
  border-radius: 4px;
  outline: none;
  font-family: inherit;
  text-align: center;
}
/* 划线价：灰色 + 删除线，视觉上与「现价」区分 */
.market-val { color: #a8a89e; text-decoration: line-through; }
.market-zero { color: var(--muted); font-size: 12px; }
/* 分类不在受控字典内（历史脏值）：标红提示运营去改 */
.cat-invalid { color: var(--orange); font-weight: 600; }

/* 详情描述列表 */
.desc { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.desc-item { font-size: 13px; }
.desc-key { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.desc-val { font-weight: 500; }
/* ---------------- 图片上传组件 ---------------- */
.img-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.img-preview {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e0e0d8;
  background: #fafaf7;
}
.img-empty {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  border: 1px dashed #d5d5cb;
  background: #fafaf7;
  color: #a8a89e;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-ops {
  display: flex;
  gap: 8px;
}

/* ---------------- 商品管理 ---------------- */
/* 分类切换标签 */
.chip-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.chip {
  padding: 6px 14px;
  border-radius: 14px;
  border: 1px solid #e0e0d8;
  background: #fff;
  color: #5c5c54;
  font-size: 13px;
  cursor: pointer;
}
.chip:hover {
  border-color: var(--green);
  color: var(--green);
}
.chip-on {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
/* 表格内图片缩略图 */
.cell-thumb img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #eee;
}
.cell-thumb-ph {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: #f6f6f2;
  color: #a8a89e;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cell-sub {
  font-size: 12px;
  color: #9a9a92;
  margin-top: 2px;
}
/* 整件下单标记 */
.badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 9px;
  background: #fdf3e8;
  color: #a8703a;
  font-size: 11px;
  font-weight: 400;
}
/* 库存状态 */
.stock-low {
  color: #d9541f;
  font-weight: 600;
}
.stock-zero {
  color: #b0b0a6;
}

/* ===== 在线客服：对话气泡与回复框 ===== */
.chat-box {
  max-height: 420px;
  min-height: 220px;
  overflow-y: auto;
  padding: 14px;
  background: #faf8f4;
  border: 1px solid var(--line, #ece8e0);
  border-radius: 10px;
}
.chat-row {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.chat-row-user {
  align-items: flex-end;
}
.chat-bubble {
  max-width: 72%;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line, #ece8e0);
  line-height: 1.6;
  word-break: break-all;
  white-space: pre-wrap;
}
.chat-row-user .chat-bubble {
  background: var(--brand, #3d9970);
  border-color: var(--brand, #3d9970);
  color: #fff;
}
.chat-row-admin .chat-bubble {
  background: #fff7e8;
  border-color: #f0dfc0;
}
.chat-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #b0b0a6;
}
.chat-input {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.chat-input input {
  flex: 1;
  padding: 0 12px;
  height: 40px;
  border: 1px solid var(--line, #ece8e0);
  border-radius: 8px;
  font-size: 14px;
}
/* 表格里放长文本（答案、最后一条消息）时的换行与截断 */
.cell-answer {
  max-width: 420px;
  white-space: pre-wrap;
  word-break: break-all;
}
/* 会话列表当前选中行 */
.row-active {
  background: #f3faf6;
}

/* ===== 食材 / 水果 / 百宝箱：卡片网格，一行 8 个，自动换行向下排列 =====
 * 需求：食材管理改成与水果管理一致的卡片式，且两个页面都统一为「一行 8 个」。
 * 用 CSS Grid 而不是原来的「纵列切片」：纵列方案每行几个由屏幕宽度猜，
 * 无法保证正好 8 个；grid 的 repeat(8, minmax(0,1fr)) 是硬约束，
 * 卡片等宽、间距一致，顺序即 DOM 顺序（左→右、再下一行）。 */
.goods-columns {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 14px;
  margin-top: 4px;
  align-items: stretch;
}
/* 空态要横跨整行，不能只占左上角一个格子 */
.goods-columns > .empty {
  grid-column: 1 / -1;
}
.goods-card {
  border: 1px solid var(--line, #ece8e0);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.goods-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f7f7f3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.goods-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.goods-card-ph {
  color: #b0b0a6;
  font-size: 13px;
}
.goods-card-body {
  padding: 10px 12px 4px;
  flex: 1;
}
.goods-card-name {
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}
.goods-card-sub {
  color: #9a9a92;
  font-size: 12px;
  margin: 4px 0;
  min-height: 16px;
}
.goods-card-cat {
  display: inline-block;
  font-size: 12px;
  color: #a8703a;
  background: #fdf3e8;
  border-radius: 4px;
  padding: 1px 7px;
}
.goods-card-price {
  font-size: 16px;
  font-weight: 700;
  color: #e4393c;
  margin: 6px 0 4px;
}
.goods-card-unit {
  font-size: 12px;
  font-weight: 400;
  color: #9a9a92;
  margin-left: 6px;
}
.goods-card-stock {
  font-size: 13px;
  color: #555;
  margin: 2px 0;
}
.goods-card-status {
  font-size: 12px;
  color: #9a9a92;
  margin-bottom: 6px;
}
.goods-card-ops {
  padding: 8px 12px 12px;
  border-top: 1px solid var(--line, #ece8e0);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
/* 按钮均分一行：两个按钮（食材卡）时左右等宽更整齐；
 * 三个按钮（水果卡）放不下时由上面的 flex-wrap 整颗换行，
 * 不会被压扁导致文字溢出（flex-grow 只在行内有余量时生效）。 */
.goods-card-ops .btn {
  flex: 1 1 auto;
  min-width: 0;
}
/* 每份规格（食材卡专用）：与分类角标同级的次要信息，弱化显示 */
.goods-card-spec {
  font-size: 12px;
  color: #9a9a92;
  margin: 2px 0;
}
/* 一行 8 个是硬性要求；窗口变窄时逐档减少列数，保证卡片不会被压成一条线。
 * 档位按「卡片可用宽度 ≥ 约 140px」反推：8 列要viewport ≥ 1520px
 * （1920/1680/1600 屏都落在这一档，正好 8 个），再窄就降到 6 列，
 * 而不是让 8 张卡挤到 110px 把按钮行折成两行。 */
@media (max-width: 1519px) {
  .goods-columns { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 1099px) {
  .goods-columns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 699px) {
  .goods-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 479px) {
  .goods-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* ---------------- 卡片拖拽排序（菜品 / 食材 / 水果 / 百宝箱） ---------------- */

.drag-hint {
  color: #9a9a92;
  font-size: 12px;
  margin: 2px 0 8px;
}

/* 卡片整体可拖：抓握光标提示可拖动；拖起来的那张半透明并轻微抬升，
   让用户看清自己抓的是哪一张、将要落在哪个位置 */
.goods-card[draggable="true"] {
  cursor: grab;
}
.goods-card[draggable="true"]:active {
  cursor: grabbing;
}
.goods-card.dragging {
  opacity: 0.45;
  border-color: #c8a06a;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}
/* 拖拽进行中，禁止其余卡片抢 hover 效果干扰视线 */
.goods-columns.is-dragging .goods-card:not(.dragging):hover {
  box-shadow: none;
}

/* 卡片副信息行：如菜品「食材 6 种 · 步骤 4 步」 */
.goods-card-meta {
  color: #6b6b63;
  font-size: 12px;
  margin: 4px 0;
}

/* 编辑弹窗内的「当前内容（查看）」预览区：原独立「查看」按钮收纳于此 */
.recipe-preview {
  border: 1px solid #ece8e0;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fbfaf7;
}
.recipe-preview table {
  margin: 0;
  font-size: 12px;
}
.recipe-preview th,
.recipe-preview td {
  padding: 4px 6px;
}
.preview-steps {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.9;
  color: #4a4a44;
}
