:root {
  --bg-canvas: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #e5e9f2;
  --line-strong: #d3dbe8;
  --ink-900: #1d2129;
  --ink-700: #4e5969;
  --ink-500: #86909c;
  --cobalt: #165dff;
  --cobalt-hover: #0e42d2;
  --cobalt-tint: #eef4ff;
  --warm: #d95d24;
  --warm-hover: #bf4a16;
  --warm-tint: #fff4ec;
  --green: #009a29;
  --green-tint: #e8ffea;
  --amber: #d97706;
  --amber-tint: #fef3c7;
  --red: #cb2634;
  --red-tint: #ffece8;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 7px;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 18px rgba(15, 23, 42, 0.03);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-canvas);
  color: var(--ink-900);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==================== 顶部栏 ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1420px;
  margin: 0 auto;
  height: 62px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--cobalt), #3c82ff);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  display: grid;
  place-items: center;
}

.brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 11px;
  color: var(--ink-500);
  margin-top: 1px;
}

.mode-switcher {
  display: inline-flex;
  background: #edf1f7;
  padding: 4px;
  border-radius: 10px;
  gap: 4px;
}

.mode-tab {
  border: none;
  background: transparent;
  color: var(--ink-700);
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.16s ease;
}

.mode-tab.active {
  background: #fff;
  color: var(--ink-900);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
}

.tab-dot.dining { background: var(--warm); }
.tab-dot.ai { background: var(--cobalt); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ==================== 按钮与通用组件 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-sm {
  font-size: 12.5px;
  padding: 6px 11px;
}

.btn-primary {
  background: var(--cobalt);
  color: #fff;
}

.btn-primary:hover {
  background: var(--cobalt-hover);
}

.btn-warm {
  background: var(--warm);
  color: #fff;
}

.btn-warm:hover {
  background: var(--warm-hover);
}

.btn-outline {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink-900);
}

.btn-outline:hover {
  border-color: var(--cobalt);
  color: var(--cobalt);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-700);
}

.btn-ghost:hover {
  background: #eef1f6;
  color: var(--ink-900);
}

.main-wrap {
  max-width: 1420px;
  margin: 0 auto;
  padding: 18px 22px 32px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.guide-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 13px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 16px;
  border: 1px solid var(--line);
}

.dining-banner {
  background: linear-gradient(90deg, #fff8f3, #ffffff);
  border-color: #f6decb;
}

.ai-banner {
  background: linear-gradient(90deg, #eff5ff, #ffffff);
  border-color: #d6e4ff;
}

.banner-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 99px;
}

.pill-chip.warm {
  background: var(--warm-tint);
  color: var(--warm);
}

.pill-chip.blue {
  background: var(--cobalt-tint);
  color: var(--cobalt);
}

.panel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h3 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
}

.panel-head p {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--ink-500);
}

.subbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.segmented {
  display: inline-flex;
  background: #e9edf5;
  padding: 3px;
  border-radius: 9px;
  gap: 3px;
}

.seg-btn {
  border: none;
  background: transparent;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-700);
  cursor: pointer;
}

.seg-btn.active {
  background: #fff;
  color: var(--ink-900);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ink-700);
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 99px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 154, 41, 0.16);
}

/* ==================== TAB 1：餐饮小程序 + 后厨看板 ==================== */
.dining-layout {
  display: grid;
  grid-template-columns: 372px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.phone-frame {
  position: relative;
  background: #fff;
  border: 8px solid #1e2430;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.12);
  height: 730px;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  background: #fff;
  padding: 8px 18px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-900);
}

.notch-pill {
  width: 72px;
  height: 16px;
  border-radius: 99px;
  background: #1e2430;
}

.mp-header {
  background: linear-gradient(135deg, #271f1b, #432b1f);
  color: #fff;
  padding: 13px 14px 12px;
}

.mp-store-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mp-store-name {
  font-size: 15.5px;
  font-weight: 800;
}

.mp-store-meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 2px;
}

.mp-mode-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.14);
  padding: 2px;
  border-radius: 7px;
}

.mp-mode-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 5px;
  cursor: pointer;
}

.mp-mode-btn.active {
  background: #fff;
  color: #271f1b;
}

.mp-member-strip {
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
}

.mp-coupon-tag {
  background: var(--warm);
  color: #fff;
  padding: 2px 7px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 700;
}

.mp-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  background: #fff;
}

.mp-cat-nav {
  background: #f7f8fa;
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 6px 0;
}

.mp-cat-btn {
  width: 100%;
  border: none;
  background: transparent;
  padding: 12px 6px;
  font-size: 12px;
  color: var(--ink-700);
  cursor: pointer;
  border-left: 3px solid transparent;
  text-align: center;
  line-height: 1.35;
}

.mp-cat-btn.active {
  background: #fff;
  color: var(--warm);
  font-weight: 700;
  border-left-color: var(--warm);
}

.mp-dish-list {
  overflow-y: auto;
  padding: 10px 10px 70px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dish-card {
  display: flex;
  gap: 9px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.14s ease;
}

.dish-card.sold-out {
  opacity: 0.54;
  background: #f9fafb;
}

.dish-thumb {
  width: 62px;
  height: 62px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  position: relative;
}

.dish-station-badge {
  position: absolute;
  bottom: 3px;
  font-size: 9.5px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.28);
  padding: 1px 5px;
  border-radius: 4px;
}

.dish-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dish-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-900);
}

.dish-desc {
  font-size: 11px;
  color: var(--ink-500);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dish-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.dish-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--warm);
  font-variant-numeric: tabular-nums;
}

.dish-add-btn {
  border: none;
  background: var(--warm);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  cursor: pointer;
}

.dish-add-btn:disabled {
  background: #cbd2dd;
  cursor: not-allowed;
}

.mp-cart-bar {
  position: relative;
  z-index: 6;
  background: #1f242e;
  color: #fff;
  padding: 9px 10px 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mp-cart-left {
  border: none;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  padding: 0;
}

.mp-bag-icon {
  width: 36px;
  height: 36px;
  border-radius: 99px;
  background: var(--warm);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  position: relative;
}

.mp-bag-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  font-style: normal;
  background: #ef4444;
  color: #fff;
  font-size: 10.5px;
  min-width: 18px;
  height: 18px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  padding: 0 4px;
}

.mp-cart-total {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.mp-cart-discount {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.72);
}

.mp-checkout-btn {
  border: none;
  background: var(--warm);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 99px;
  cursor: pointer;
  flex-shrink: 0;
}

.mp-checkout-btn:hover {
  background: var(--warm-hover);
}

.mp-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 58px;
  background: #fff;
  border-top: 1px solid var(--line);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.16);
  padding: 12px 14px;
  max-height: 310px;
  display: none;
  flex-direction: column;
  gap: 8px;
  z-index: 5;
}

.mp-sheet.open {
  display: flex;
}

.mp-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.text-link {
  border: none;
  background: transparent;
  color: var(--ink-500);
  font-size: 12px;
  cursor: pointer;
}

.mp-sheet-list {
  overflow-y: auto;
  max-height: 160px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--line);
}

.cart-row-spec {
  font-size: 11px;
  color: var(--ink-500);
}

.qty-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.qty-btn {
  width: 22px;
  height: 22px;
  border-radius: 99px;
  border: 1px solid var(--line-strong);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.mp-remark-box label {
  display: block;
  font-size: 11px;
  color: var(--ink-500);
  margin-bottom: 4px;
}

.mp-remark-box input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 7px 9px;
  font-size: 12px;
}

/* 右侧后厨与宣传 */
.dining-subview,
.ai-subview {
  display: none;
}

.dining-subview.active,
.ai-subview.active {
  display: block;
}

.kpi-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.kpi-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 13px 15px;
}

.kpi-card.accent-warm {
  background: linear-gradient(135deg, #fff9f5, #ffffff);
  border-color: #f5d8c4;
}

.kpi-label {
  font-size: 12px;
  color: var(--ink-500);
}

.kpi-val {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.kpi-val.warm { color: var(--warm); }

.kpi-sub {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--ink-500);
}

.soldout-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.soldout-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 6px 11px;
  border-radius: 99px;
  font-size: 12.5px;
  cursor: pointer;
}

.soldout-chip.is-out {
  background: var(--red-tint);
  border-color: #f9c0ba;
  color: var(--red);
}

.soldout-state {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
  background: #e8ffea;
  color: var(--green);
}

.soldout-chip.is-out .soldout-state {
  background: #fff;
  color: var(--red);
}

.kitchen-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.station-tag {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  flex-shrink: 0;
}

.station-tag.hot {
  background: var(--warm-tint);
  color: var(--warm);
}

.station-tag.drink {
  background: var(--cobalt-tint);
  color: var(--cobalt);
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 410px;
  overflow-y: auto;
}

.ticket-paper {
  border: 1px dashed #c8d2e2;
  background: #fcfdff;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
}

.ticket-paper.done {
  opacity: 0.62;
  background: #f7f8fa;
}

.ticket-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px dashed var(--line-strong);
  padding-bottom: 7px;
  margin-bottom: 8px;
}

.ticket-table {
  font-weight: 800;
  font-size: 14.5px;
}

.ticket-time {
  font-size: 11.5px;
  color: var(--ink-500);
}

.ticket-items {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ticket-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.ticket-remark {
  margin-top: 8px;
  background: var(--amber-tint);
  color: #92400e;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 6px;
}

.ticket-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ticket-no {
  font-size: 11.5px;
  color: var(--ink-500);
}

/* 门店宣传 H5 */
.brand-h5-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 14px;
}

.h5-hero-card {
  background: linear-gradient(145deg, #241b17, #3e281d);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
}

.h5-hero-card h2 {
  margin: 12px 0 8px;
  font-size: 24px;
}

.h5-hero-card > p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.82);
}

.h5-stat-row {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.h5-stat-row > div {
  background: rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 12px;
}

.h5-stat-row strong {
  display: block;
  font-size: 20px;
  color: #ffb88c;
}

.h5-stat-row span {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.78);
}

.h5-promo-cards {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.promo-tile {
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink-900);
  border-radius: 10px;
  padding: 13px;
}

.promo-badge {
  font-size: 11px;
  font-weight: 700;
  background: var(--warm-tint);
  color: var(--warm);
  padding: 2px 8px;
  border-radius: 99px;
}

.promo-tile h4 {
  margin: 8px 0 5px;
  font-size: 14px;
}

.promo-tile p {
  margin: 0;
  font-size: 12px;
  color: var(--ink-700);
  line-height: 1.55;
}

.wx-share-preview {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wx-share-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: #f9fafb;
}

.wx-share-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.wx-share-body {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.wx-share-body p {
  margin: 0;
  font-size: 12px;
  color: var(--ink-700);
  line-height: 1.6;
  flex: 1;
}

.wx-share-thumb {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--warm), #f59e0b);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.wx-share-foot {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--ink-500);
}

.h5-checklist {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-700);
}

/* ==================== TAB 2：企业级 AI 工作台 ==================== */
.ai-quote-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.28fr;
  gap: 16px;
  align-items: start;
}

.sample-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.sample-btn {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-700);
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.sample-btn.active {
  border-color: var(--cobalt);
  background: var(--cobalt-tint);
  color: var(--cobalt);
}

.raw-doc-meta {
  font-size: 12px;
  color: var(--ink-700);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 11px;
  margin-bottom: 10px;
}

.raw-textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.68;
  color: var(--ink-900);
  background: #fcfdff;
  resize: vertical;
}

.raw-textarea:focus {
  outline: none;
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.12);
}

.parse-action-bar {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.parse-hint {
  font-size: 12px;
  color: var(--ink-500);
}

.parse-steps {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.step-item {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--ink-500);
  display: flex;
  align-items: center;
  gap: 7px;
}

.step-item.active {
  border-color: var(--cobalt);
  background: var(--cobalt-tint);
  color: var(--cobalt);
  font-weight: 600;
}

.step-item.done {
  border-color: #b7eb8f;
  background: var(--green-tint);
  color: var(--green);
  font-weight: 600;
}

.step-num {
  width: 18px;
  height: 18px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.08);
  display: grid;
  place-items: center;
  font-size: 11px;
  flex-shrink: 0;
}

.confidence-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--green-tint);
  color: var(--green);
  flex-shrink: 0;
}

.quote-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12.5px;
  color: var(--ink-700);
  background: var(--surface-soft);
  border-radius: 8px;
  padding: 9px 12px;
  margin-bottom: 12px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  background: #f7f9fc;
  color: var(--ink-700);
  font-weight: 600;
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.price-input {
  width: 78px;
  text-align: right;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 12.5px;
  font-weight: 600;
}

.risk-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
}

.risk-tag.ok {
  background: var(--green-tint);
  color: var(--green);
}

.risk-tag.warn {
  background: var(--amber-tint);
  color: #b45309;
}

.quote-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.total-label {
  font-size: 12px;
  color: var(--ink-500);
}

.total-amount {
  font-size: 24px;
  font-weight: 800;
  color: var(--cobalt);
  font-variant-numeric: tabular-nums;
}

.quote-footer-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.mes-result-bar {
  margin-top: 12px;
  display: none;
  padding: 10px 13px;
  border-radius: 8px;
  background: var(--green-tint);
  border: 1px solid #b7eb8f;
  color: #135200;
  font-size: 13px;
  line-height: 1.55;
}

.mes-result-bar.show {
  display: block;
}

/* 场景 B：知识库问答 */
.ai-kb-grid {
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.kb-doc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kb-doc-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  background: #fff;
  transition: all 0.14s ease;
}

.kb-doc-item.active {
  border-color: var(--cobalt);
  background: var(--cobalt-tint);
}

.kb-doc-title {
  font-size: 13px;
  font-weight: 700;
}

.kb-doc-meta {
  margin-top: 5px;
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--ink-500);
}

.kb-doc-preview {
  margin-top: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-700);
}

.kb-chat-card {
  display: flex;
  flex-direction: column;
  min-height: 600px;
}

.kb-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.kb-chat-head h3 {
  margin: 0;
  font-size: 15.5px;
}

.kb-chat-head p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--ink-500);
}

.role-pills {
  display: inline-flex;
  background: #edf1f7;
  padding: 3px;
  border-radius: 8px;
  gap: 3px;
}

.role-btn {
  border: none;
  background: transparent;
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-700);
  cursor: pointer;
}

.role-btn.active {
  background: #fff;
  color: var(--cobalt);
}

.kb-messages {
  flex: 1;
  overflow-y: auto;
  max-height: 390px;
  padding: 16px 4px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-msg {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.7;
}

.chat-msg.user {
  align-self: flex-end;
  background: var(--cobalt);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg.bot {
  align-self: flex-start;
  background: #f5f8ff;
  border: 1px solid #dbe7ff;
  color: var(--ink-900);
  border-bottom-left-radius: 4px;
}

.cite-box {
  margin-top: 10px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #d5e2ff;
  border-left: 3px solid var(--cobalt);
  border-radius: 7px;
  font-size: 12px;
  color: var(--ink-700);
}

.kb-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.quick-ask-btn {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-700);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 99px;
  cursor: pointer;
}

.quick-ask-btn:hover {
  border-color: var(--cobalt);
  color: var(--cobalt);
  background: var(--cobalt-tint);
}

.kb-input-bar {
  margin-top: 10px;
  display: flex;
  gap: 9px;
}

.kb-input-bar input {
  flex: 1;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 10px 13px;
  font-size: 13.5px;
}

.kb-input-bar input:focus {
  outline: none;
  border-color: var(--cobalt);
}

/* ==================== 弹窗、页脚与 Toast ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  background: #fff;
  width: 100%;
  max-width: 400px;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.modal-head h3 {
  margin: 0;
  font-size: 16px;
}

.modal-sub {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--ink-500);
}

.icon-close {
  border: none;
  background: #f2f4f8;
  width: 28px;
  height: 28px;
  border-radius: 99px;
  font-size: 16px;
  cursor: pointer;
}

.spec-options-wrap {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spec-group-label {
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 6px;
}

.spec-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.spec-chip {
  border: 1px solid var(--line-strong);
  background: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  cursor: pointer;
}

.spec-chip.active {
  border-color: var(--warm);
  background: var(--warm-tint);
  color: var(--warm);
  font-weight: 700;
}

.modal-foot {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.spec-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--warm);
}

.site-footer {
  max-width: 1420px;
  margin: 0 auto;
  padding: 16px 22px 28px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink-500);
}

.footer-links {
  display: flex;
  gap: 10px;
}

.footer-links a:hover {
  color: var(--cobalt);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(16px);
  background: rgba(29, 33, 41, 0.94);
  color: #fff;
  padding: 10px 18px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 80;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1120px) {
  .dining-layout,
  .ai-quote-grid,
  .ai-kb-grid,
  .brand-h5-grid {
    grid-template-columns: 1fr;
  }
  .phone-frame {
    max-width: 390px;
    margin: 0 auto;
  }
  .kpi-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .kitchen-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .header-inner {
    height: auto;
    padding: 10px 14px;
    flex-wrap: wrap;
  }
  .parse-steps {
    grid-template-columns: 1fr;
  }
}
