:root {
  --ink: #20242a;
  --muted: #69717d;
  --line: #e7e2dc;
  --paper: #fffaf4;
  --soft: #f7efe6;
  --blue: #2456a6;
  --blue-soft: #dbe8ff;
  --rose: #cb4d65;
  --white: #fff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #efe7dd;
  color: var(--ink);
}

button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--blue);
  color: var(--white);
  font-weight: 800;
  cursor: pointer;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 26px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(32, 36, 42, 0.12);
}

.login-card h1 {
  margin: 0;
}

.login-card p {
  margin: 0 0 8px;
  color: var(--blue);
  font-weight: 800;
}

.login-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.app-view {
  display: none;
}

.app-view.active {
  display: flex;
}

main.app-view.active {
  display: block;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}

textarea {
  min-height: 74px;
  resize: vertical;
}

.topbar {
  padding: 20px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.file-btn {
  min-height: 38px;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.file-btn input {
  display: none;
}

.topbar h1 {
  margin: 0;
  font-size: 24px;
}

.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
}

.layout {
  padding: 20px;
}

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.panel h2 {
  margin: 0;
  font-size: 20px;
}

.hint,
.muted {
  color: var(--muted);
  font-size: 13px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.stat {
  padding: 14px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.stat span {
  color: var(--muted);
}

.stat strong {
  display: block;
  margin-top: 8px;
  color: var(--blue);
  font-size: 24px;
}

.stat.warn {
  background: #fdecec;
  border-color: #f2c4c4;
}

.stat.warn strong {
  color: #c0392b;
}

.stock-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  vertical-align: middle;
}

.stock-badge.low {
  background: #fff3d6;
  color: #b26a00;
}

.stock-badge.sold-out {
  background: #fdecec;
  color: #c0392b;
}

.product-card.low-stock {
  border-color: #f0c36d;
}

.product-card.sold-out {
  border-color: #f2b8b8;
  opacity: 0.85;
}

.content {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 360px;
  gap: 16px;
}

.order-card,
.product-card,
.category-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
}

.order-top,
.product-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
}

.category-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-top img,
.product-card img {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 8px;
}

.order-preview {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.order-preview img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
}

.order-preview-title {
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 6px;
}

.name {
  font-size: 17px;
  font-weight: 900;
}

.price {
  color: var(--rose);
  font-weight: 900;
  margin-top: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.actions button {
  background: var(--blue-soft);
  color: var(--blue);
}

.actions button.done {
  background: var(--soft);
  color: var(--ink);
}

.actions button.danger {
  background: #fdecec;
  color: #c0392b;
}

.filter-bar {
  display: grid;
  grid-template-columns: 150px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.filter-bar button {
  background: var(--blue-soft);
  color: var(--blue);
}

.batch-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.batch-bar .hint {
  margin-right: auto;
}

.batch-bar button {
  background: var(--blue-soft);
  color: var(--blue);
}

.batch-bar button.done {
  background: #e6f4ea;
  color: #1a7f37;
}

.order-select {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  flex-shrink: 0;
  accent-color: var(--blue);
}

.order-top,
.product-card {
  grid-template-columns: auto 86px 1fr;
  align-items: center;
}

.photo {
  margin-top: 12px;
  max-width: 260px;
  width: 100%;
  border-radius: 8px;
}

.detail-box {
  display: none;
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.detail-box.open {
  display: block;
}

.detail-grid {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px 12px;
  font-size: 14px;
}

.detail-grid span:nth-child(odd) {
  color: var(--muted);
  font-weight: 700;
}

.photo-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

.slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 13px;
}

.review-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
  background: var(--white);
}

.review-card.hidden {
  background: var(--soft);
  opacity: 0.82;
}

.review-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.review-head .name {
  color: var(--rose);
}

.review-content {
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}

.review-reply {
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  line-height: 1.5;
}

.product-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  margin-bottom: 14px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.product-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-row.action-row {
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.8fr) auto;
  align-items: end;
}

.subhead {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.upload-line {
  display: grid;
  grid-template-columns: 1fr 128px;
  gap: 8px;
  align-items: center;
}

.upload-line input[type="file"] {
  padding: 7px;
  font-size: 12px;
}

.checkline {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 8px !important;
}

.checkline input {
  width: auto;
  min-height: auto;
}

.rest-days-label {
  display: block;
  margin-top: 4px;
}

.rest-days {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 8px;
}

.rest-days .checkline {
  font-size: 13px;
  font-weight: 400;
  color: var(--text, #333);
}

.tier-editor {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line, #e7e2dc);
  border-radius: 10px;
  background: #faf8f4;
}

.tier-editor-head {
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--text, #333);
}

.tier-editor-row {
  display: grid;
  grid-template-columns: 44px 1fr 1fr 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line, #eee);
}

.tier-editor-row:first-of-type {
  border-top: none;
}

.tier-editor-level {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent, #e7837d);
  text-align: center;
}

.tier-editor-row label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: #777;
}

.tier-editor-row input {
  width: 100%;
  box-sizing: border-box;
}

.tier-editor-row .tier-free {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #555;
}

@media (max-width: 900px) {
  .tier-editor-row {
    grid-template-columns: 44px 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .content,
  .stats,
  .filter-bar,
  .form-row.action-row {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .stats-columns {
    grid-template-columns: 1fr;
  }
}

/* ===== 数据统计面板 ===== */
.stats-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stats-columns {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 16px;
}

.stats-col {
  padding: 14px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.stats-col-title {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 180px;
}

.bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  min-width: 0;
}

.bar-value {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
  min-height: 14px;
}

.bar-track {
  flex: 1;
  width: 100%;
  max-width: 26px;
  display: flex;
  align-items: flex-end;
  background: var(--blue-soft);
  border-radius: 4px 4px 0 0;
  overflow: hidden;
}

.bar-fill {
  width: 100%;
  background: var(--blue);
  border-radius: 4px 4px 0 0;
}

.bar-label {
  font-size: 9px;
  color: var(--muted);
  margin-top: 6px;
  white-space: nowrap;
}

.top-product {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.top-product:last-child {
  border-bottom: none;
}

.top-product .rank {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  text-align: center;
  line-height: 22px;
  font-size: 12px;
  font-weight: 700;
}

.top-product .top-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-product .top-meta {
  flex: none;
  color: var(--muted);
  font-size: 12px;
}

/* =====================================================================
   分区导航版式（参考美团商家版排版）
   宽屏：顶部横向 tab ｜ 手机：底部固定 tab 栏
   下面这些规则放在文件末尾，用于覆盖上面旧的两栏布局
   ===================================================================== */

/* ---- 顶部栏 ---- */
.topbar {
  padding: 14px 20px;
  gap: 10px;
}

.topbar .brand h1 {
  font-size: 18px;
  line-height: 1.25;
}

.topbar .brand p {
  margin-top: 3px;
  font-size: 12px;
}

.top-actions {
  flex-wrap: nowrap;
}

.ghost-btn {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 800;
}

/* ---- 分区导航 ---- */
.adm-nav.app-view {
  display: none;
}

.adm-nav.app-view.active {
  display: flex;
}

.adm-nav {
  gap: 2px;
  padding: 0 14px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.adm-nav .nav-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.adm-nav .nav-item .nav-ico {
  font-size: 17px;
  line-height: 1;
}

.adm-nav .nav-item.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

/* ---- 分区视图 ---- */
.view {
  display: none;
}

.view.active {
  display: block;
}

/* ---- 版心 ---- */
.layout {
  padding: 16px;
  max-width: 1080px;
  margin: 0 auto;
}

.panel {
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(32, 36, 42, 0.04);
  scroll-margin-top: 78px; /* 锚点滚动避开吸顶栏 */
}

.panel h2 {
  font-size: 17px;
}

.panel-head {
  margin-bottom: 12px;
}

/* ---- 概览大数字卡片 ---- */
.stats {
  gap: 10px;
}

.stat {
  border-radius: 12px;
  padding: 16px;
  background: linear-gradient(158deg, #ffffff 0%, var(--paper) 100%);
}

.stat strong {
  font-size: 26px;
  line-height: 1.15;
}

.stat.stat-warn,
.stat.warn {
  background: #fdecec;
  border-color: #f2c4c4;
}

.stat.stat-warn strong,
.stat.warn strong {
  color: #c0392b;
}

/* ---- 订单状态快捷筛选 ---- */
.status-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}

.status-chips .chip {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.status-chips .chip.active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.hidden-select {
  display: none;
}

.filter-bar.orders-filter {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

/* ---- 系统工具 ---- */
.tool-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---- 手机端：底部 tab 栏 ---- */
@media (max-width: 760px) {
  .adm-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    padding: 0 0 env(safe-area-inset-bottom, 0px);
    border-bottom: 0;
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 18px rgba(32, 36, 42, 0.08);
  }

  .adm-nav .nav-item {
    flex: 1 1 0;
    flex-direction: column;
    gap: 3px;
    min-height: 58px;
    padding: 7px 2px;
    border-bottom: 0;
    font-size: 11px;
  }

  .adm-nav .nav-item .nav-ico {
    font-size: 20px;
  }

  .adm-nav .nav-item.active {
    border-bottom-color: transparent;
  }

  .layout {
    padding: 12px 12px 84px;
  }

  .topbar {
    padding: 12px 14px;
    flex-direction: row;
    align-items: center;
  }

  .topbar .brand h1 {
    font-size: 16px;
  }

  .panel {
    padding: 14px;
    border-radius: 12px;
  }

  .stat strong {
    font-size: 22px;
  }
}

/* ---- 全屏（添加到主屏幕 / 安装为应用）时的安全区适配 ---- */
@media (max-width: 760px) {
  .topbar {
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
  }
}

/* =====================================================================
   美团式订单卡片 + 日期筛选 + tab 计数
   ===================================================================== */
.date-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.date-chips {
  margin-bottom: 0;
}

.chip.mini {
  min-height: 28px;
  padding: 0 12px;
  font-size: 12px;
}

.chip .cnt {
  font-weight: 800;
  margin-left: 2px;
}

.chip.active .cnt {
  color: var(--white);
}

/* ---- 卡片 ---- */
.order-card.mt-card {
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.mt-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.mt-cust {
  flex: 1 1 auto;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.mt-name {
  font-size: 16px;
  font-weight: 800;
}

.mt-phone {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.mt-quick {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.mt-quick a {
  display: inline-block;
  min-height: 30px;
  line-height: 28px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.mt-addr {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0 30px;
  font-size: 15px;
  font-weight: 700;
}

.mt-dist {
  color: var(--blue);
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}

.mt-time {
  margin: 8px 0 0 30px;
  color: #b4690e;
  background: #fdf3e4;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  width: fit-content;
  max-width: 100%;
}

.mt-remark {
  margin: 6px 0 0 30px;
  color: var(--muted);
  font-size: 13px;
}

.mt-goods {
  margin: 12px 0 0 30px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}

.mt-goods-sum {
  font-size: 14px;
  margin-bottom: 8px;
}

.mt-goods-sum b {
  font-size: 15px;
}

.mt-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.mt-item img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 auto;
}

.mt-item-info {
  flex: 1 1 auto;
  min-width: 0;
}

.mt-item-name {
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mt-item-price {
  flex: 0 0 auto;
  font-weight: 800;
  font-size: 14px;
}

.mt-fee {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.mt-foot {
  margin: 10px 0 0 30px;
  font-size: 12px;
}

@media (max-width: 760px) {
  .mt-addr,
  .mt-time,
  .mt-remark,
  .mt-goods,
  .mt-foot {
    margin-left: 0;
  }

  .mt-head {
    flex-wrap: wrap;
  }

  .mt-quick {
    width: 100%;
    justify-content: flex-end;
  }

  .date-row {
    flex-wrap: wrap;
  }
}

/* ---- 订单编号 / 支付流水号 ---- */
.mt-sn {
  margin: 10px 0 0 30px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mt-sn-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  width: fit-content;
  max-width: 100%;
}

.mt-sn-label {
  font-size: 12px;
  color: var(--muted);
  flex: 0 0 auto;
}

.mt-sn-val {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2px;
  word-break: break-all;
}

.copy-btn {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.copy-btn:hover {
  border-color: var(--blue);
}

@media (max-width: 760px) {
  .mt-sn {
    margin-left: 0;
  }

  .mt-sn-row {
    width: 100%;
  }
}

/* ---- 订单序号（第 N 号） ---- */
.mt-seq {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--blue);
  color: var(--white);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

/* ---- 版本标签 ---- */
.ver-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(59, 92, 168, 0.1);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}

/* =====================================================================
   锁定缩放：禁止双击放大 / 双指缩放 / 输入框聚焦自动放大
   ===================================================================== */
html,
body {
  touch-action: manipulation;      /* 关键：干掉双击缩放 */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior: none;
}

/* iOS/安卓浏览器：输入框字号 <16px 时聚焦会自动放大，统一提到 16px */
@media (max-width: 760px) {
  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }

  .chip,
  .status-chips .chip,
  .chip.mini,
  .copy-btn,
  .mt-quick a {
    font-size: 14px;
  }
}

/* 轻提示 toast（操作成功反馈） */
#toast {
  position: fixed;
  left: 50%;
  bottom: 110px;
  transform: translateX(-50%) translateY(16px);
  background: #1f2d3d;
  color: #fff;
  padding: 10px 20px;
  border-radius: 22px;
  font-size: 15px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9999;
  max-width: 82vw;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 微信发货上报状态行 */
.wx-ship {
  margin: 6px 2px 0;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
}
.wx-ship.ok { background: #eef7ee; color: #3f7a45; }
.wx-ship.bad { background: #fdeceb; color: #b3352c; font-weight: 600; }
.actions button.warn { background: #fdeceb; color: #b3352c; border-color: #f3c9c5; }

/* =====================================================================
   功能宫格首页（参考美团商家式分组宫格）
   ===================================================================== */
#view-grid {
  padding-bottom: 8px;
}

.grid-card {
  background: var(--white);
  border-radius: 16px;
  padding: 16px 16px 6px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(32, 36, 42, 0.05);
}

.grid-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 12px;
}

.grid-group-title::before {
  content: "";
  width: 4px;
  height: 15px;
  border-radius: 2px;
  background: var(--blue);
}

.grid-items {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px 2px;
}

.grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 0;
  padding: 10px 4px 14px;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  border-radius: 12px;
  transition: background 0.15s ease, transform 0.12s ease;
}

.grid-item:active {
  background: var(--soft);
  transform: scale(0.95);
}

.grid-ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  font-size: 22px;
  line-height: 1;
  color: #fff;
  box-shadow: 0 3px 8px rgba(32, 36, 42, 0.14);
}

.grid-label {
  font-size: 12.5px;
  line-height: 1.25;
  text-align: center;
  color: #3c434d;
  font-weight: 700;
}

.grid-back {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  margin-bottom: 10px;
  border-radius: 18px;
  background: var(--white);
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 1px 2px rgba(32, 36, 42, 0.06);
}

/* 从宫格跳转后高亮目标区块 */
@keyframes secFlash {
  0% { box-shadow: 0 0 0 0 rgba(36, 86, 166, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(36, 86, 166, 0); }
  100% { box-shadow: 0 0 0 0 rgba(36, 86, 166, 0); }
}

.panel.sec-flash {
  animation: secFlash 1.1s ease-out 1;
  outline: 2px solid rgba(36, 86, 166, 0.45);
  outline-offset: 2px;
}

/* 点「编辑」后表单滚动到眼前并高亮，明确反馈 */
form.product-form,
#categoryForm,
#couponForm,
#slotForm,
#rechargePlanForm {
  scroll-margin-top: 78px; /* 避免被吸顶栏挡住 */
}

@keyframes formFlash {
  0% { box-shadow: 0 0 0 0 rgba(36, 86, 166, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(36, 86, 166, 0); }
  100% { box-shadow: 0 0 0 0 rgba(36, 86, 166, 0); }
}

form.form-flash {
  animation: formFlash 1.3s ease-out 1;
  outline: 2px solid rgba(36, 86, 166, 0.55);
  outline-offset: 3px;
  border-radius: 10px;
}

@media (max-width: 760px) {
  .grid-card {
    padding: 14px 10px 4px;
    border-radius: 14px;
  }

  .grid-items {
    grid-template-columns: repeat(4, 1fr);
  }

  .grid-ico {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 21px;
  }
}

@media (max-width: 360px) {
  .grid-items {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =====================================================================
   商品管家（美团式）：搜索 + 状态 tab + 分类侧栏 + 商品卡 + 底部操作条
   ===================================================================== */
.prod-search {
  margin-bottom: 10px;
}

.prod-search input {
  width: 100%;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #f5f2ee;
  font-size: 14px;
}

.prod-tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  border-bottom: 2px solid var(--soft);
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}

.prod-tab {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.prod-tab b {
  font-size: 12px;
  color: #a08c78;
  margin-left: 2px;
}

.prod-tab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.prod-layout {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.prod-cats {
  flex: 0 0 96px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #f5f1ea;
  border-radius: 12px;
  padding: 6px;
  position: sticky;
  top: 70px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}

.prod-cat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 0;
  padding: 9px 8px;
  border-radius: 9px;
  background: transparent;
  color: #5c554d;
  font-size: 12.5px;
  font-weight: 700;
  text-align: left;
  line-height: 1.3;
}

.prod-cat b {
  font-size: 11px;
  color: #a39484;
  font-weight: 600;
}

.prod-cat.active {
  background: var(--white);
  color: var(--blue);
  box-shadow: 0 1px 4px rgba(32, 36, 42, 0.08);
}

.prod-cat.active b {
  color: var(--blue);
}

.prod-cat-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prod-list-wrap {
  flex: 1;
  min-width: 0;
}

/* ---- 商品卡 ---- */
.mt-prod {
  display: flex;
  gap: 10px;
  padding: 12px 10px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  margin-bottom: 10px;
}

.mt-prod.is-off {
  opacity: 0.62;
}

.mt-prod .order-select {
  display: none;
}

.batching .mt-prod .order-select {
  display: block;
  align-self: center;
}

.mt-prod-img {
  width: 86px;
  height: 86px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--soft);
  flex-shrink: 0;
}

.mt-prod-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mt-prod-name {
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mt-prod-meta {
  font-size: 12px;
  color: var(--muted);
}

.mt-tag {
  display: inline-block;
  font-style: normal;
  font-size: 11px;
  padding: 0 5px;
  border-radius: 4px;
  background: #fdeceb;
  color: #b3352c;
  font-weight: 700;
}

.mt-tag.rec {
  background: #fff6df;
  color: #b07a1a;
}

.mt-prod-price {
  font-size: 17px;
  font-weight: 800;
  color: #cb4d65;
}

.mt-prod-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 2px;
}

.mt-prod-actions button {
  min-height: 30px;
  padding: 0 11px;
  font-size: 12.5px;
  border-radius: 15px;
  background: var(--blue-soft);
  color: var(--blue);
  white-space: nowrap;
  flex: 0 0 auto;
}

.mt-prod-actions button.mt-edit {
  background: var(--blue);
  color: #fff;
}

/* ---- 编辑表单（默认收起，点新建/编辑展开）---- */
#productForm {
  scroll-margin-top: 78px;
}

.mt-form {
  display: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 12px 12px;
  margin-bottom: 14px;
  background: var(--paper);
}

.mt-form.open {
  display: block;
}

.mt-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2px;
}

.mt-form-head strong {
  font-size: 15px;
}

.mt-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--soft);
}

.mt-row:last-of-type {
  border-bottom: 0;
}

.mt-label {
  flex: 0 0 84px;
  font-size: 13.5px;
  font-weight: 800;
  color: #3f3a33;
  line-height: 1.3;
}

.mt-label .req {
  color: #e02e24;
  font-style: normal;
  margin-right: 2px;
}

.mt-row input,
.mt-row select,
.mt-row textarea {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 14px;
  background: var(--white);
}

.mt-row textarea {
  min-height: 64px;
  resize: vertical;
}

.mt-row .mt-inline {
  flex: 1;
  display: flex;
  gap: 8px;
}

.mt-row .mt-inline input {
  min-width: 0;
}

.mt-upload {
  flex: 1;
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.mt-upload input {
  flex: 1;
  min-width: 0;
}

.upload-btn {
  flex: 0 0 auto;
  position: relative;
  display: inline-grid;
  place-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.upload-btn input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* ---- 底部操作条 ---- */
.prod-actionbar {
  position: sticky;
  bottom: 66px;
  z-index: 30;
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 -4px 16px rgba(32, 36, 42, 0.08);
}

.prod-actionbar button {
  flex: 1;
  min-height: 40px;
  font-size: 13.5px;
  background: var(--soft);
  color: #4a443c;
  border-radius: 10px;
}

.prod-actionbar button.primary {
  background: var(--blue);
  color: #fff;
}

.prod-actionbar button.active {
  background: var(--blue);
  color: #fff;
}

/* 批量模式：显示批量栏 */
#view-products .batch-bar {
  display: none;
}

#view-products.batching .batch-bar {
  display: flex;
}

@media (min-width: 761px) {
  .prod-actionbar {
    bottom: 10px;
  }

  .prod-cats {
    flex-basis: 130px;
  }
}

/* =====================================================================
   设置中心：分组卡片 + 子页 + 装修实时预览
   ===================================================================== */
#settingGroups {
  display: grid;
  gap: 12px;
}

.setting-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 0;
  padding: 16px 14px;
  text-align: left;
  background: var(--white);
  color: var(--ink);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(32, 36, 42, 0.05);
  transition: transform 0.12s ease;
}

.setting-card:active {
  transform: scale(0.985);
}

.setting-ico {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  font-size: 21px;
  color: #fff;
  box-shadow: 0 3px 8px rgba(32, 36, 42, 0.14);
}

.setting-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.setting-title {
  font-size: 15.5px;
  font-weight: 800;
}

.setting-desc {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}

.setting-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 3px;
}

.setting-tags em {
  font-style: normal;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--soft);
  color: #6b6156;
  font-weight: 700;
}

.setting-arrow {
  flex: 0 0 auto;
  align-self: center;
  font-size: 22px;
  color: #c4b6a6;
  font-weight: 700;
}

.sub-page {
  display: none;
}

.sub-page.active {
  display: block;
}

.subhead {
  margin-top: 20px;
  margin-bottom: 6px;
}

.subhead h2 {
  font-size: 15px !important;
  color: var(--blue);
}

.subhead .hint {
  display: block;
  margin-top: 2px;
}

.action-sticky {
  position: sticky;
  bottom: 66px;
  z-index: 26;
  margin-top: 18px;
  padding: 8px 0;
  background: linear-gradient(to top, var(--white) 70%, rgba(255, 255, 255, 0));
}

.action-sticky button {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  font-size: 15px;
  box-shadow: 0 4px 14px rgba(36, 86, 166, 0.28);
}

@media (min-width: 761px) {
  .action-sticky {
    bottom: 10px;
  }
}

/* ---- 装修实时预览 ---- */
.deco-preview {
  margin: 4px 0 18px;
  padding: 12px;
  border-radius: 14px;
  background: #f4f0ea;
  border: 1px dashed #d8cdbf;
}

.deco-preview-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #6b6156;
  margin-bottom: 10px;
}

.deco-frame {
  display: grid;
  gap: 10px;
}

.dp-block {
  cursor: pointer;
}

.dp-block:hover .dp-label {
  color: var(--blue);
}

.dp-label {
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 800;
  color: #8a7d6d;
  text-align: center;
}

.dp-hero,
.dp-story {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(140deg, #efe3d6, #e2d3c2);
  background-size: cover;
  background-position: center;
}

.dp-hero {
  min-height: 132px;
}

.dp-story {
  min-height: 96px;
}

.dp-hero.empty,
.dp-story.empty {
  background-image: linear-gradient(140deg, #efe3d6, #e2d3c2) !important;
}

.dp-hero::after,
.dp-story::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 250, 244, 0.9), rgba(255, 247, 238, 0.5) 60%, rgba(255, 247, 238, 0.1));
}

.dp-hero-in,
.dp-story-in {
  position: relative;
  z-index: 1;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 76%;
}

.dp-eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a7a66;
  font-weight: 700;
}

.dp-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.dp-story .dp-title {
  font-size: 15px;
}

.dp-text {
  font-size: 11.5px;
  color: #6d6255;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dp-btn {
  align-self: flex-start;
  margin-top: 4px;
  padding: 4px 14px;
  border-radius: 14px;
  background: var(--blue);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
}

.dp-points {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 4px;
}

.dp-points span {
  font-size: 11px;
  font-weight: 800;
  color: #4a443c;
}

.dp-points span i {
  font-style: normal;
  font-weight: 600;
  color: #8a7d6d;
  margin-left: 3px;
}

.dp-cats,
.dp-recommend {
  background: #fff;
  border-radius: 10px;
  padding: 12px;
}

.dp-cats-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 9px;
}

.dp-cats-head i {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.dp-cats-row {
  display: flex;
  gap: 8px;
  overflow: hidden;
}

.dp-cats-row span {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 19px;
}

.dp-cats-row span i {
  font-style: normal;
  font-size: 10.5px;
  color: #5c554d;
  font-weight: 700;
}

.dp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.dp-good {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dp-good em {
  display: block;
  height: 62px;
  border-radius: 8px;
  background-color: #f0e7dc;
  background-size: cover;
  background-position: center;
}

.dp-good i {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: #3f3a33;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dp-good b {
  font-size: 12px;
  color: #cb4d65;
}

.dp-none {
  grid-column: 1 / -1;
  font-size: 11.5px;
  color: var(--muted);
  padding: 8px 0;
}

.dp-off {
  padding: 10px 12px;
  border-radius: 10px;
  background: #eee9e2;
  color: #9a8d7c;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

/* 宽屏：图标尺寸适中、从左到右紧凑排列 */
@media (min-width: 761px) {
  .grid-items {
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 6px 8px;
  }

  .grid-item {
    padding: 14px 4px 16px;
  }
}

/* ---- 点预览区块跳转：小节标题也要能高亮（h2 不是 .panel）---- */
.subhead h2,
#decoratePage h2[id],
#setupPage h2[id],
#prelaunchPage h2[id] {
  scroll-margin-top: 84px;
}

h2.sec-flash {
  animation: secFlashH2 1.6s ease-out 1;
  outline: 2px solid rgba(165, 107, 214, 0.55);
  outline-offset: 6px;
  border-radius: 6px;
}

@keyframes secFlashH2 {
  0%   { box-shadow: 0 0 0 0 rgba(165, 107, 214, 0.65); background: rgba(165, 107, 214, 0.16); }
  60%  { box-shadow: 0 0 0 12px rgba(165, 107, 214, 0); background: rgba(165, 107, 214, 0.10); }
  100% { box-shadow: 0 0 0 0 rgba(165, 107, 214, 0); background: transparent; }
}

/* ---- 装修字段缩略图 + 自动上传状态 ---- */
.field-thumb {
  display: block;
  max-width: 220px;
  max-height: 90px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: -4px 0 12px;
}

label.uploading {
  opacity: 0.6;
  pointer-events: none;
}

.upload-status {
  display: block;
  margin: -2px 0 12px;
  color: #2456a6;
  font-size: 12px;
}


/* =====================================================================
   店铺装修页 · 重构排版（20261006g）
   目标：每个区块独立卡片 + 字段两列网格 + 左侧预览固定，消除"乱"
   ===================================================================== */

.deco-panel {
  padding: 0;
  overflow: hidden;
}

/* 顶部条：标题 + 保存按钮 */
.deco-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 26px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fdfbf8, #faf6f1);
  position: sticky;
  top: 0;
  z-index: 20;
}

.deco-topbar h2 {
  margin: 0 0 4px;
  font-size: 19px;
  letter-spacing: 0.02em;
}

.deco-topbar .hint {
  margin: 0;
  font-size: 12.5px;
}

.deco-save-top {
  flex: 0 0 auto;
  padding: 10px 26px;
  border-radius: 999px;
  border: none;
  background: var(--brand, #2456a6);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(36, 86, 166, 0.24);
}

.deco-save-top:hover { filter: brightness(1.08); }

/* 主体两栏：左预览（固定）+ 右表单 */
.deco-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

.deco-side {
  position: sticky;
  top: 78px;
  padding: 20px 18px 28px;
  border-right: 1px solid var(--line);
  background: #fbf9f6;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
}

.deco-form {
  padding: 22px 26px 40px;
  display: block;
  min-width: 0;
}

/* 每个区块 = 一张卡片 */
.deco-sec {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  margin-bottom: 18px;
  overflow: hidden;
  scroll-margin-top: 88px;
}

.deco-sec-head {
  padding: 14px 20px;
  background: #faf7f3;
  border-bottom: 1px solid var(--line);
}

.deco-sec-head h2 {
  scroll-margin-top: 96px;
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: #3c2f27;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.deco-sec-hint {
  margin: 5px 0 0;
  font-size: 12px;
  color: #8b7d72;
  line-height: 1.55;
}

/* 字段区：两列自适应网格 */
.deco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px 20px;
  padding: 18px 20px 20px;
}

.deco-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.deco-field-wide {
  grid-column: 1 / -1;
}

.deco-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #6b5b4f;
  letter-spacing: 0.01em;
}

.deco-field input[type="text"],
.deco-field input:not([type]),
.deco-field select,
.deco-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #e2d9d0;
  border-radius: 10px;
  background: #fdfcfa;
  font-size: 13.5px;
  color: #3c2f27;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.deco-field input:focus,
.deco-field select:focus,
.deco-field textarea:focus {
  outline: none;
  border-color: #c9a882;
  box-shadow: 0 0 0 3px rgba(201, 168, 130, 0.16);
  background: #fff;
}

.deco-field input[type="color"] {
  width: 100%;
  height: 40px;
  padding: 4px;
  border: 1px solid #e2d9d0;
  border-radius: 10px;
  background: #fdfcfa;
  cursor: pointer;
}

.deco-field textarea {
  min-height: 76px;
  resize: vertical;
  line-height: 1.65;
}

.deco-field .checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid #e2d9d0;
  border-radius: 10px;
  background: #fdfcfa;
  font-size: 13.5px;
}

.deco-field .field-thumb {
  margin: 6px 0 0;
  max-width: 100%;
  max-height: 118px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.deco-field .action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: #8b7d72;
  cursor: pointer;
}

.deco-field .action-row input[type="file"] {
  font-size: 12px;
  padding: 0;
  border: none;
  background: none;
}

.deco-tip {
  margin: 0;
  padding: 10px 12px;
  background: #fdf7ee;
  border: 1px dashed #e3cba9;
  border-radius: 10px;
  font-size: 12.5px;
  color: #94725a;
}

/* 预览区在左栏内适配 */
.deco-side .deco-preview-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #6b5b4f;
  margin-bottom: 10px;
}

.deco-side .deco-frame {
  width: 100%;
}

/* 窄屏：预览收起在上方，字段单列 */
@media (max-width: 1080px) {
  .deco-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .deco-side {
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .deco-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .deco-topbar {
    flex-direction: column;
    align-items: stretch;
  }
  .deco-save-top { width: 100%; }
}


/* 标题鎏金渐变（后台预览 + 与小程序 .title-gold 同款） */
.dp-gold {
  background: linear-gradient(115deg, #f3d98b 0%, #d9ad4a 16%, #9a721a 32%, #63470c 48%, #e5c977 58%, #b98c2a 74%, #7c5a10 88%, #d4b05e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0.6px rgba(96, 66, 16, 0.55);
  filter: drop-shadow(0 2px 4px rgba(60, 40, 8, 0.68)) drop-shadow(0 0 9px rgba(255, 250, 238, 0.45));
}
