/* ============ 基础 ============ */
:root {
  --bg: #f0f5f9;
  --card: #ffffff;
  --border: #e5eaef;
  --text: #2a3547;
  --muted: #707a82;
  --muted2: #b0b5bd;
  --brand: #0085db;
  --brand-dark: #006db5;
  --success: #21bf73;
  --warning: #ff8a00;
  --danger: #ef4444;
  --green-bg: #e8f9f1;
  --blue-bg: #e8f0ff;
  --pink-bg: #ffeef3;
  --yellow-bg: #fff7e0;
  --radius: 18px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

#app {
  min-height: 100vh;
  padding-bottom: 96px;
}

body.public-entry #app {
  padding-bottom: 0;
}

body.public-entry .tabbar,
body.public-entry .footer-brand,
body.public-entry #btnClose {
  display: none;
}

/* ============ 头部 ============ */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 30;
}
.app-header .title { font-size: 15px; font-weight: 500; color: #333; }
.icon-btn {
  background: transparent; border: 0; font-size: 18px;
  color: #888; padding: 4px 6px; cursor: pointer;
}

.footer-brand {
  position: fixed;
  bottom: 60px;
  left: 0; right: 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted2);
  pointer-events: none;
}

/* ============ 底部 tabbar ============ */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
  z-index: 30;
}
.tabbar button {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 4px 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px;
  color: var(--muted);
}
.tabbar button .ico { font-size: 18px; }
.tabbar button.active { color: var(--brand); }

/* ============ 卡片通用 ============ */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin: 12px 14px;
  border: 1px solid var(--border);
}
.card.no-border { border: 0; }

.row {
  display: flex; align-items: center;
}
.row.between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.big { font-size: 22px; font-weight: 700; }
.bold { font-weight: 600; }
.right { margin-left: auto; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }

.divider { height: 1px; background: var(--border); margin: 12px 0; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.dot.green { background: var(--success); }
.dot.red { background: var(--danger); }

/* ============ 按钮 ============ */
.btn {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}
.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn.danger { color: var(--danger); border-color: #fcd5d5; }
.btn.block { display: block; width: 100%; }
.btn.lg { padding: 14px; font-size: 15px; font-weight: 600; }
.btn.sm { padding: 6px 10px; font-size: 12px; }
.btn:disabled { opacity: .6; }

.chip {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  background: #f0f2f5;
  color: #555;
  border: 1px solid transparent;
  margin-right: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.chip.active {
  background: #e8f0ff;
  color: var(--brand);
  border-color: #cfdcff;
}
.chip.dark { background: #1f1f1f; color: #fff; }
.chip-bar {
  display: flex; overflow-x: auto; padding: 4px 0;
  scrollbar-width: none;
}
.chip-bar::-webkit-scrollbar { display: none; }

/* ============ 概览页 ============ */
.shop-head {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0 0 0;
}
.shop-head .avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: #d6d8db url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12 12a5 5 0 100-10 5 5 0 000 10zm0 2c-4.4 0-8 2.7-8 6v2h16v-2c0-3.3-3.6-6-8-6z"/></svg>') center/24px no-repeat;
  flex: 0 0 44px;
}
.shop-head .meta { flex: 1; }
.shop-head .name { font-size: 16px; font-weight: 700; }
.shop-head .username { font-size: 12px; color: var(--muted); margin-top: 2px; }
.shop-head .status-pill {
  display: inline-block; margin-left: 6px; padding: 1px 6px;
  background: var(--green-bg); color: var(--success);
  border-radius: 6px; font-size: 11px;
}
.shop-head .actions { display: flex; gap: 8px; }
.circle-btn {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--border); background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: #666;
}

.grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin: 12px 14px 0;
}
.mini-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 14px;
}
.mini-card .head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--muted);
  margin-bottom: 8px;
}
.mini-card .head .ico {
  width: 26px; height: 26px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.mini-card .num { font-size: 22px; font-weight: 700; }
.mini-card .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

.ico.green { background: var(--green-bg); color: var(--success); }
.ico.blue { background: var(--blue-bg); color: var(--brand); }
.ico.pink { background: var(--pink-bg); color: #ff5379; }
.ico.yellow { background: var(--yellow-bg); color: var(--warning); }

/* 大块余额卡 */
.balance-card {
  margin: 12px 14px 0;
  padding: 16px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.balance-card .label-row {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--muted);
}
.balance-card .amount {
  font-size: 28px; font-weight: 700; margin-top: 4px;
}
.balance-card .secondary {
  color: var(--muted); font-size: 12px; margin-top: 4px;
}
.balance-card .pill-row {
  display: flex; gap: 16px; margin-top: 8px;
  color: var(--muted); font-size: 12px;
}

.three-cols {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
  margin: 12px 14px 0;
}
.three-cols .mini-card .num { font-size: 26px; }

/* 折线/柱状图区 */
.chart-card {
  margin: 12px 14px 0; padding: 14px;
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--border);
}
.chart-card .legend {
  display: flex; gap: 16px; margin: 8px 0;
  font-size: 12px; color: var(--muted);
}
.chart-card .legend .lg {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 4px; vertical-align: middle;
}
.bar-row { display: flex; align-items: flex-end; gap: 6px; height: 130px; }
.bar { flex: 1; background: var(--brand); border-radius: 6px 6px 0 0; min-height: 4px; position: relative; }
.bar.gray { background: #e6e9ee; }
.bar-labels { display: flex; gap: 6px; margin-top: 6px; }
.bar-labels span { flex: 1; text-align: center; font-size: 10px; color: var(--muted); }
.bar-summary { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* ============ 商品页 ============ */
.list-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px 0;
}
.list-head h2 { margin: 0; font-size: 22px; }
.list-head .sub { color: var(--muted); font-size: 12px; margin-top: 4px; }

.search-bar {
  margin: 10px 14px 0;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 12px;
}
.search-bar input {
  border: 0; flex: 1; padding: 10px 0; background: transparent;
  font-size: 14px; outline: none;
}
.search-bar .ico-search { color: var(--muted); margin-right: 6px; }

.filter-bar {
  margin: 10px 14px 0;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 8px 12px;
  display: flex; gap: 8px; align-items: center;
}
.filter-bar select {
  border: 0; outline: none; flex: 1; background: transparent; font-size: 14px;
}
.filter-bar .ico-filter {
  color: var(--muted);
  padding-left: 10px;
  border-left: 1px solid var(--border);
  margin-left: 6px;
  cursor: pointer;
}

.empty {
  text-align: center; padding: 60px 20px 0;
  color: var(--muted);
}
.empty .box {
  width: 64px; height: 64px;
  background: #f0f2f5; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: #bdc3cd; margin: 0 auto 12px;
}
.empty .tip { font-size: 12px; margin-top: 4px; }

.product-item {
  background: #fff;
  margin: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 12px;
  display: flex; gap: 12px;
}
.product-item .cover {
  width: 64px; height: 64px;
  border-radius: 10px;
  background: #f0f2f5;
  background-size: cover; background-position: center;
  flex: 0 0 64px;
  display: flex; align-items: center; justify-content: center;
  color: #bdc3cd; font-size: 24px;
}
.product-item .info { flex: 1; min-width: 0; }
.product-item .info .name { font-size: 14px; font-weight: 600; }
.product-item .info .desc {
  color: var(--muted); font-size: 12px; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.product-item .info .meta { margin-top: 4px; font-size: 12px; color: var(--muted); }
.product-item .info .price { color: #ff5d3b; font-weight: 700; margin-right: 6px; }
.product-item .actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 100;
  display: flex; align-items: flex-end;
  animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff;
  width: 100%;
  max-height: 88vh;
  border-radius: 18px 18px 0 0;
  padding: 16px 16px 24px;
  overflow-y: auto;
  animation: slide .2s ease;
}
@keyframes slide { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal .modal-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.modal .modal-head h3 { margin: 0; font-size: 18px; }

.field {
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #fff;
}
.field label {
  font-size: 11px; color: var(--muted); margin-bottom: 4px;
}
.field input, .field textarea, .field select {
  border: 0; outline: none; font-size: 14px; background: transparent;
  font-family: inherit; resize: vertical;
}
.field textarea { min-height: 56px; }
.field.inline {
  flex-direction: row; align-items: center; gap: 8px;
}
.field.inline label { margin: 0; }

.toggle-row {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.toggle-row .chip { margin: 0; }

.upload-box {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  background: #fff;
  position: relative;
  overflow: hidden;
  min-height: 80px;
  display: flex; align-items: center; justify-content: center;
  background-size: cover; background-position: center;
}
.upload-box.has-img { color: transparent; min-height: 140px; }
.upload-box input[type=file] { display: none; }

.media-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  margin-bottom: 12px;
}
.media-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.media-tile {
  min-height: 132px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  background-size: cover;
  background-position: center;
}
.media-tile input[type=file] { display: none; }
.media-tile .tile-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #e0f2fe;
  color: #0369a1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  z-index: 1;
}
.media-tile .tile-title {
  font-weight: 700;
  color: #0f172a;
  z-index: 1;
}
.media-tile .tile-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
  z-index: 1;
}
.media-tile.has-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,.15), rgba(15,23,42,.62));
}
.media-tile.has-media .tile-title,
.media-tile.has-media .tile-desc {
  color: #fff;
}
.media-tile.has-media .tile-icon {
  background: rgba(255,255,255,.9);
}
.media-tile.video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.video-helper {
  margin-top: 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  padding: 10px;
}
.cmd-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.cmd-row code {
  flex: 1;
  background: #0f172a;
  color: #bae6fd;
  padding: 7px 9px;
  border-radius: 8px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tip-box.compact {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
  margin-bottom: 12px;
  font-size: 12px;
  line-height: 1.6;
}

.pair-input { display: flex; gap: 8px; }
.pair-input .field { flex: 1; }

.currency-toggle {
  display: flex; gap: 6px;
}
.currency-toggle .chip { flex: 0; margin: 0; }

/* ============ 订单页 ============ */
.order-card {
  background: #fff;
  margin: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 12px;
}
.order-card .head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--muted);
}
.order-card .body { margin-top: 6px; font-size: 14px; }
.order-card .body .amt { float: right; color: #ff5d3b; font-weight: 700; }
.order-card .tag {
  padding: 2px 6px; border-radius: 6px; font-size: 11px;
  background: #f0f2f5; color: #555;
}
.order-card .tag.paid { background: var(--green-bg); color: var(--success); }
.order-card .tag.pending { background: var(--yellow-bg); color: var(--warning); }
.order-card .tag.expired { background: #f7f7f7; color: var(--muted); }

/* ============ 财务页 ============ */
.cool-tip {
  margin: 12px 14px 0;
  background: var(--yellow-bg);
  color: #a96d00;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  display: flex; gap: 8px;
}

/* ============ 更多 tab 列表 ============ */
.list-card {
  background: #fff; margin: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.list-card .item {
  display: flex; align-items: center; padding: 14px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.list-card .item:last-child { border-bottom: 0; }
.list-card .item .ico {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  margin-right: 12px; font-size: 16px;
}
.list-card .item .lbl { flex: 1; }
.list-card .item .lbl .t { font-size: 14px; font-weight: 500; }
.list-card .item .lbl .s { font-size: 11px; color: var(--muted); margin-top: 2px; }
.list-card .item .arrow { color: var(--muted2); font-size: 16px; }

.section-title {
  margin: 14px 14px 6px;
  display: flex; justify-content: space-between; align-items: center;
}
.section-title h3 { margin: 0; font-size: 18px; }
.section-title .right-action {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted);
}
.section-title .right-action .pause-pill {
  background: var(--pink-bg); color: #d11456;
  padding: 2px 6px; border-radius: 6px; font-size: 11px;
}

/* ============ Toast ============ */
#toast {
  position: fixed;
  left: 50%; top: 30%;
  transform: translate(-50%, 0);
  background: rgba(0,0,0,.78);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 999;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
  max-width: 80%;
  text-align: center;
}
#toast.show { opacity: 1; }

/* ============ 加载占位 ============ */
.skeleton {
  background: linear-gradient(90deg, #efefef 0%, #f7f7f7 50%, #efefef 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.creator-guide {
  width: min(480px, calc(100% - 28px));
  margin: 72px auto 0;
  padding: 28px 22px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 14px 36px rgba(20, 32, 55, .08);
}

.creator-guide .guide-logo {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2f7bff, #21bf73);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
}

.creator-guide h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

.creator-guide p {
  margin: 12px 0 0;
  color: #5f6672;
  line-height: 1.75;
}

.creator-guide .guide-note {
  margin: 16px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  color: #8a8f99;
  font-size: 12px;
}

.creator-guide .guide-cta {
  display: block;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
}

.creator-guide .guide-sub {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 520px) {
  .creator-guide {
    margin-top: 36px;
    padding: 24px 18px 22px;
  }
}

/* ============ 店铺设置工作台 ============ */
body.modal-open { overflow: hidden; }
button, input, textarea, select { font-family: inherit; }
.modal-heading { flex: 1; min-width: 0; }
.settings-mode { background: #f4f6fa; color: #202c40; }
.settings-mode .app-header {
  background: rgba(244, 246, 250, .94);
  border-bottom: 1px solid rgba(222, 228, 237, .6);
  padding: 15px 24px;
  backdrop-filter: blur(16px);
}
.settings-mode .app-header .title { color: #6d7b91; font-size: 12px; letter-spacing: .03em; }
.settings-mode .app-header .title::before {
  content: ''; display: inline-block; width: 7px; height: 7px;
  background: #3c72df; border-radius: 2px; margin-right: 8px; vertical-align: 1px;
}
.settings-page { max-width: 1040px; margin: 0 auto; padding: 28px 24px 16px; }
.settings-page-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.settings-eyebrow { color: #7a879b; font-size: 11px; letter-spacing: .08em; }
.settings-page-title h1 { font-size: 27px; letter-spacing: -.04em; font-weight: 700; margin: 7px 0 0; line-height: 1.25; }
.workspace-mark { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #8190a7; }
.workspace-mark svg { width: 15px; height: 15px; }
.settings-shop-card {
  position: relative; overflow: hidden; display: flex; align-items: center; flex-wrap: wrap;
  gap: 16px; padding: 24px; border-radius: 22px; background: #203650;
  background-image: radial-gradient(ellipse at 95% 0%, rgba(94, 149, 216, .25), transparent 62%);
  box-shadow: 0 10px 24px -14px rgba(25, 49, 80, .5); color: #fff;
}
.settings-shop-card::after {
  content: ''; position: absolute; width: 200px; height: 200px; border: 1px solid rgba(179, 208, 244, .08);
  border-radius: 50%; right: -70px; top: -100px; box-shadow: 0 0 0 35px rgba(179, 208, 244, .025); pointer-events: none;
}
.settings-shop-avatar {
  display: grid; place-items: center; width: 54px; height: 54px; flex: 0 0 54px;
  color: #d5e5ff; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .14); border-radius: 17px;
}
.settings-shop-avatar svg { width: 27px; height: 27px; }
.settings-shop-identity { flex: 1; min-width: 0; }
.settings-shop-name { font-size: 20px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.settings-shop-handle { font-size: 12px; color: #a9bdd7; margin-top: 5px; overflow-wrap: anywhere; }
.shop-state { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 20px; color: #b0edd4; background: rgba(73, 178, 138, .12); border: 1px solid rgba(143, 221, 191, .16); font-size: 11px; white-space: nowrap; }
.shop-state i { width: 5px; height: 5px; background: #79d2ad; border-radius: 50%; }
.shop-state.is-paused { color: #f2ce9b; background: rgba(234, 181, 109, .08); border-color: rgba(234, 181, 109, .18); }
.shop-state.is-paused i { background: #e4b777; }
.settings-shop-bottom { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid rgba(212, 228, 248, .12); padding-top: 16px; margin-top: 2px; }
.settings-shop-bottom p { font-size: 12px; color: #a8bcd4; margin: 0; line-height: 1.6; }
.shop-status-action { position: relative; z-index: 1; border: 0; background: transparent; padding: 6px 0 6px 8px; color: #d7e3f4; font-size: 11px; white-space: nowrap; cursor: pointer; }
.shop-status-action:hover { color: #fff; }
.settings-section { margin-top: 29px; }
.settings-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 2px 12px; }
.settings-section-head h2 { font-size: 14px; font-weight: 650; margin: 0; letter-spacing: .01em; }
.settings-section-head > span { color: #8b98ab; font-size: 11px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.setting-tile {
  appearance: none; display: flex; align-items: flex-start; gap: 13px; width: 100%; min-width: 0;
  padding: 19px 17px; border: 1px solid #e6ebf2; border-radius: 17px; background: #fff; color: #24334b;
  text-align: left; cursor: pointer; box-shadow: 0 2px 4px rgba(31, 56, 91, .015);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.setting-tile:hover { border-color: #c8d6ec; box-shadow: 0 6px 18px -8px rgba(31, 56, 91, .15); transform: translateY(-2px); }
.setting-tile:active { transform: scale(.988); }
.setting-icon { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; display: grid; place-items: center; }
.setting-icon svg { width: 21px; height: 21px; }
.tone-blue { color: #587ccd; background: #edf2fc; }
.tone-teal { color: #438c83; background: #edf7f4; }
.tone-amber { color: #b5914d; background: #fbf5e9; }
.tone-slate { color: #72819b; background: #f0f3f8; }
.setting-tile-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.setting-tile-title { font-size: 14px; line-height: 1.5; font-weight: 600; }
.setting-tile-description { font-size: 11px; line-height: 1.6; color: #8995a8; margin-top: 4px; }
.setting-tile-meta { align-self: flex-start; color: #69809d; background: #f5f7fa; padding: 3px 7px; border-radius: 5px; font-size: 10px; line-height: 1.5; margin-top: 12px; }
.setting-arrow { flex: 0 0 14px; color: #b5c0cf; margin-top: 5px; }
.setting-arrow svg { width: 14px; height: 14px; }
.settings-endnote { margin-top: 28px; text-align: center; color: #9aa6b8; font-size: 11px; }
.settings-mode .footer-brand { position: static; padding: 0 20px 10px; color: #a4aebd; font-size: 10px; }
.settings-mode .tabbar { padding-top: 9px; background: rgba(255, 255, 255, .96); border-color: #e8edf4; box-shadow: 0 -4px 24px rgba(36, 56, 86, .035); backdrop-filter: blur(16px); }
.settings-mode .tabbar button { cursor: pointer; font-size: 10px; gap: 3px; }
.settings-mode .tabbar button.active { color: #4c72bb; }
.settings-mode .tabbar button.active .ico { background: #eef3fc; border-radius: 9px; }
.tabbar .ico { min-width: 38px; height: 26px; display: grid; place-items: center; }
.tabbar .ico svg { width: 20px; height: 20px; }
.setting-tile:focus-visible, .shop-status-action:focus-visible, .settings-modal button:focus-visible, .settings-modal summary:focus-visible { outline: 3px solid #91b5f5; outline-offset: 3px; }

/* 设置弹窗：标题、内容与操作分层，宽屏居中、手机抽屉 */
.settings-mask { background: rgba(19, 32, 53, .34); backdrop-filter: blur(5px); align-items: center; justify-content: center; padding: 24px; }
.settings-modal { max-width: 660px; max-height: min(90dvh, 940px); padding: 0; border-radius: 24px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 80px rgba(16, 35, 63, .24); animation: settings-appear .2s ease; }
@keyframes settings-appear { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.settings-modal .modal-head { flex: 0 0 auto; gap: 12px; padding: 23px 24px 20px; margin: 0; border-bottom: 1px solid #edf0f5; background: #fff; }
.settings-modal .dialog-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 42px; border-radius: 13px; background: #edf2fb; color: #5879b5; }
.dialog-icon svg { width: 22px; height: 22px; }
.settings-modal .modal-head h3 { font-size: 18px; font-weight: 650; letter-spacing: -.02em; color: #26354a; }
.settings-modal .modal-heading p { font-size: 11px; color: #8a97aa; margin: 5px 0 0; line-height: 1.5; }
.settings-modal .modal-head .icon-btn { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 50%; background: #f3f5f8; color: #8b97aa; font-size: 13px; flex: 0 0 32px; }
.settings-modal .modal-head .icon-btn:hover { background: #e9eef5; color: #364d6e; }
.settings-modal .modal-body { padding: 22px 24px 0; background: #fafbfd; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.settings-modal .field { padding: 12px 14px; border-color: #e3e9f2; border-radius: 12px; margin-bottom: 14px; transition: box-shadow .15s, border-color .15s; min-width: 0; }
.settings-modal .field:focus-within { border-color: #89a9df; box-shadow: 0 0 0 3px rgba(76, 114, 187, .08); }
.settings-modal .field label { color: #738299; font-size: 11px; line-height: 1.5; margin-bottom: 7px; }
.settings-modal .field input, .settings-modal .field textarea, .settings-modal .field select { color: #293b55; width: 100%; min-width: 0; line-height: 1.7; padding: 0; }
.settings-modal .field input::placeholder, .settings-modal .field textarea::placeholder { color: #a8b1c0; }
.settings-modal .field textarea { min-height: 84px; }
.settings-modal .btn { border-radius: 10px; border-color: #e0e7f1; color: #4b5e78; transition: background .15s, box-shadow .15s; }
.settings-modal .btn.primary { color: #fff; background: #4d73b9; border-color: #4d73b9; box-shadow: 0 4px 10px rgba(66, 104, 171, .12); }
.settings-modal .btn.primary:hover { background: #3e65aa; }
.settings-modal .btn.danger { color: #b45a5a; border-color: #efdbdb; }
.settings-modal .btn.lg { padding: 13px 18px; font-size: 14px; }
.settings-modal .tip-box.compact { background: #f1f5fb; border: 0; color: #73829a; border-radius: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.settings-modal .order-card { margin: 10px 0; border-radius: 12px; border-color: #e7ecf3; overflow-wrap: anywhere; }
.settings-modal .mini-card { border-color: #e7ecf3; border-radius: 12px; min-width: 0; }
.settings-modal .mini-card .num { font-size: 20px; overflow-wrap: anywhere; }
.settings-modal .muted { color: #8190a5; }
.settings-modal .divider { background: #e8edf5; margin: 20px 0; }
.settings-modal .modal-body > div > .btn:last-child { margin-bottom: 22px; }
.settings-form-section { background: #fff; border: 1px solid #e7ecf3; border-radius: 16px; padding: 18px; margin-bottom: 16px; }
.settings-form-section .field:last-child { margin-bottom: 0; }
.form-section-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.form-section-heading > svg { color: #758cad; width: 19px; height: 19px; flex: 0 0 19px; }
.form-section-heading h4 { font-size: 13px; color: #344761; margin: 0; flex: 1; font-weight: 600; }
.form-section-heading > span { font-size: 10px; color: #94a0b1; }
.settings-form-section .field { background: #fafbfd; }
.section-caption { font-size: 11px; line-height: 1.8; color: #8a97a9; margin: 0 0 13px; }
.section-caption.after-field { margin: -3px 0 0; }
.settings-modal .modal-actions { position: sticky; bottom: 0; z-index: 2; padding: 16px 0 max(20px, env(safe-area-inset-bottom)); background: #fafbfd; border-top: 1px solid #e9edf4; display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.modal-actions .save-note { flex: 1; font-size: 10px; color: #96a2b3; line-height: 1.7; }
.modal-actions .btn { flex: 0 0 auto; min-width: 138px; }
.modal-actions .btn svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 5px; }
.template-selector { display: flex; gap: 8px; margin-bottom: 17px; }
.template-option { flex: 1; min-width: 0; border: 1px solid #e4eaf3; background: #fff; border-radius: 11px; color: #6f8099; padding: 10px 6px; font-size: 11px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.template-option svg { width: 15px; height: 15px; }
.template-option:hover, .template-option.active { color: #4d73b9; border-color: #b2c7e8; background: #f0f5fd; }
.welcome-editor-label { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin: 0 2px 10px; font-size: 12px; color: #596e8b; }
.welcome-editor-label > span { font-size: 10px; color: #98a4b6; }
.settings-modal .welcome-editor { padding: 15px; margin-bottom: 12px; background: #fff; }
.settings-modal .welcome-editor textarea { min-height: 148px; line-height: 1.9; font-size: 13px; resize: vertical; }
.variable-tools { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; padding: 0 0 17px; }
.variable-tools > span { font-size: 10px; color: #98a4b6; width: 100%; margin-bottom: 2px; }
.variable-chip { border: 0; border-radius: 6px; padding: 6px 8px; background: #eef2f8; color: #6a809f; font-size: 10px; cursor: pointer; }
.variable-chip:hover { color: #3f6bad; background: #e3ebf7; }
.welcome-preview { margin: 2px 0 15px; background: #eef3f8; border-radius: 14px; padding: 15px; }
.preview-heading { display: flex; align-items: center; justify-content: space-between; font-size: 10px; color: #94a3b8; margin-bottom: 11px; }
.preview-heading span:first-child { color: #6c819f; font-weight: 600; }
.preview-message { max-width: 92%; border-radius: 4px 13px 13px; border: 1px solid #e2e9f3; background: #fff; padding: 13px 15px 9px; box-shadow: 0 2px 4px rgba(59, 81, 112, .025); }
.preview-message > div { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.8; color: #475d79; }
.preview-message > time { display: block; text-align: right; font-size: 9px; color: #a1b0c5; margin-top: 4px; }
.settings-help { font-size: 11px; color: #8b98ab; line-height: 1.8; margin-bottom: 16px; }
.settings-help summary { cursor: pointer; color: #7d8fa8; }
.settings-help code { color: #6380aa; font-size: 10px; white-space: normal; overflow-wrap: anywhere; }
.security-status { display: inline-flex; align-items: center; gap: 5px; border-radius: 6px; color: #508d7b; background: #edf7f2; padding: 4px 7px; font-size: 10px; }
.security-status svg { width: 12px; height: 12px; }
.pin-status-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.pin-status-row > p { color: #8e9caf; font-size: 10px; margin: 0; }
.text-button { border: 0; background: transparent; color: #8c98ab; font-size: 10px; padding: 6px 0; cursor: pointer; }
.text-button.is-remove { color: #b86c6c; }
.address-summary { padding: 13px; border-radius: 10px; background: #f0f5fb; margin-top: 12px; }
.address-summary-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 10px; color: #738aa8; }
.address-summary-head span:first-child { font-weight: 600; }
.address-summary > code { display: block; margin-top: 9px; overflow-wrap: anywhere; color: #536d91; font-size: 11px; line-height: 1.7; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.address-summary > p { margin: 8px 0 0; color: #8799b1; font-size: 10px; line-height: 1.8; }
.address-input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace !important; font-size: 12px !important; }
.settings-load-state { padding: 48px 10px; text-align: center; color: #8799b0; font-size: 12px; line-height: 1.8; }

@media (min-width: 600px) {
  .settings-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .settings-grid.four-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 600px) and (max-width: 899px) {
  .settings-grid:not(.four-items) .setting-tile { position: relative; flex-wrap: wrap; }
  .settings-grid:not(.four-items) .setting-tile-content { flex-basis: 100%; }
  .settings-grid:not(.four-items) .setting-arrow { position: absolute; right: 15px; top: 20px; }
}
@media (max-width: 560px) {
  .settings-mode .app-header { padding: 11px 18px; }
  .settings-page { padding: 23px 17px 16px; }
  .settings-page-title { margin-bottom: 18px; }
  .settings-page-title h1 { font-size: 25px; }
  .workspace-mark { font-size: 10px; }
  .settings-shop-card { padding: 19px; gap: 12px; border-radius: 19px; }
  .settings-shop-avatar { width: 45px; height: 45px; flex-basis: 45px; border-radius: 14px; }
  .settings-shop-name { font-size: 17px; }
  .shop-state { padding: 5px 7px; font-size: 9px; }
  .settings-shop-bottom p { font-size: 10px; }
  .settings-section { margin-top: 25px; }
  .settings-section-head > span { font-size: 10px; }
  .settings-grid { gap: 9px; }
  .setting-tile { flex-wrap: wrap; gap: 11px; padding: 15px 13px; border-radius: 14px; position: relative; }
  .setting-icon { width: 35px; height: 35px; flex-basis: 35px; border-radius: 10px; }
  .setting-icon svg { width: 19px; height: 19px; }
  .setting-tile-content { flex-basis: 100%; }
  .setting-tile-title { font-size: 12px; }
  .setting-tile-description { font-size: 10px; }
  .setting-tile-meta { margin-top: 10px; font-size: 9px; }
  .setting-arrow { position: absolute; right: 12px; top: 20px; }
  .settings-grid:not(.four-items) .setting-tile:last-child { grid-column: 1 / -1; flex-wrap: nowrap; align-items: center; }
  .settings-grid:not(.four-items) .setting-tile:last-child .setting-tile-content { flex-basis: auto; }
  .settings-grid:not(.four-items) .setting-tile:last-child .setting-arrow { position: static; }
  .settings-mask { padding: 0; align-items: flex-end; }
  .settings-modal { max-width: none; border-radius: 23px 23px 0 0; max-height: 93dvh; }
  .settings-modal .modal-head { padding: 20px 18px 17px; gap: 10px; }
  .settings-modal .modal-head h3 { font-size: 16px; }
  .settings-modal .modal-heading p { font-size: 10px; }
  .settings-modal .dialog-icon { width: 37px; height: 37px; flex-basis: 37px; border-radius: 12px; }
  .settings-modal .modal-body { padding: 18px 16px 0; }
  .settings-form-section { padding: 15px; border-radius: 14px; }
  .settings-modal .field { padding: 11px 12px; }
  .settings-modal .field input, .settings-modal .field select, .settings-modal .field textarea { font-size: 13px; }
  .settings-modal .modal-actions { gap: 12px; }
  .modal-actions .btn { min-width: 125px; }
  .template-option { font-size: 10px; gap: 4px; }
}
@media (max-width: 360px) {
  .settings-page { padding-inline: 13px; }
  .workspace-mark { display: none; }
  .settings-shop-card { padding: 17px; }
  .settings-shop-identity { flex-basis: calc(100% - 60px); }
  .settings-shop-card > .shop-state { margin-left: 57px; margin-top: -6px; }
  .settings-section-head > span { font-size: 9px; }
  .setting-tile { padding: 13px 11px; }
  .settings-modal .modal-head { padding-inline: 15px; }
  .settings-modal .dialog-icon { display: none; }
  .settings-modal .modal-body { padding-inline: 12px; }
  .settings-form-section { padding: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .setting-tile, .settings-modal, .settings-mask { animation: none; transition: none; }
}

/* Spike light workspace: one shared visual language for every merchant page. */
:root { --blue-bg: #e5f3fb; --green-bg: #dffff3; --yellow-bg: #fff6ea; --pink-bg: #ffede9; --shadow: 0 2px 6px rgba(37,83,185,.08); }
body { line-height: 1.55; }
button { cursor: pointer; }
button[hidden], [hidden] { display: none !important; }
button:focus-visible, a:focus-visible, [role=button]:focus-visible { outline: 3px solid #80c9f5; outline-offset: 3px; }
input, textarea, select { min-width: 0; color: var(--text); }
svg { flex-shrink: 0; }
.btn svg, .circle-btn svg, .overview-hourly svg, .label-row svg { width: 18px; height: 18px; vertical-align: -4px; }
.btn { border-radius: 8px; font-weight: 500; transition: background .15s, box-shadow .15s; }
.btn:hover:not(:disabled) { background: #f6f9fc; }
.btn.primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn.primary { box-shadow: 0 3px 9px rgba(0,133,219,.14); }
.btn.primary svg { margin-left: 7px; }
.chip { border-radius: 8px; background: #f0f5f9; color: #627182; }
.chip.active, .chip.dark.active { color: var(--brand); background: var(--blue-bg); border-color: #bae1f7; }
.card, .mini-card, .balance-card, .chart-card, .product-item, .order-card, .list-card { box-shadow: var(--shadow); }
.app-header, .settings-mode .app-header { padding: 15px 20px; min-height: 76px; background: #fff; border: 0; box-shadow: var(--shadow); }
.header-identity, .header-actions { display: flex; align-items: center; gap: 12px; min-width: 0; }
.app-header .title, .settings-mode .app-header .title { color: var(--text); font-size: 16px; font-weight: 650; letter-spacing: 0; }
.settings-mode .app-header .title::before { display: none; }
.header-caption { color: var(--muted); font-size: 11px; margin-top: 2px; overflow-wrap: anywhere; }
.workspace-badge { padding: 6px 11px; border-radius: 8px; background: var(--blue-bg); color: #0085db; font-size: 11px; white-space: nowrap; }
.brand-symbol { width: 38px; height: 38px; display: inline-grid; place-items: center; flex-shrink: 0; background: #0085db; color: #fff; font-size: 21px; font-weight: 700; border-radius: 12px 12px 12px 3px; }
.merchant-sidebar { display: none; }
#view { max-width: 1360px; margin: 0 auto; padding: 22px 6px 10px; min-width: 0; }
.page-loading { min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 40px 20px; color: var(--muted); text-align: center; overflow-wrap: anywhere; }
.loading-orbit { width: 28px; height: 28px; border: 3px solid var(--blue-bg); border-top-color: var(--brand); border-radius: 50%; animation: loading-spin .8s linear infinite; }
@keyframes loading-spin { to { transform: rotate(360deg); } }
.footer-brand, .settings-mode .footer-brand { position: static; padding: 20px 20px 8px; color: #8d9aa9; font-size: 11px; }
.tabbar, .settings-mode .tabbar { padding-top: 8px; border-color: var(--border); background: rgba(255,255,255,.97); box-shadow: 0 -2px 12px rgba(37,83,185,.05); }
.tabbar button, .settings-mode .tabbar button { font-size: 11px; gap: 3px; }
.tabbar button.active, .settings-mode .tabbar button.active { color: var(--brand); }
.tabbar button.active .ico, .settings-mode .tabbar button.active .ico { background: var(--blue-bg); border-radius: 8px; }
.list-head { padding-top: 0; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.list-head h2 { font-size: 24px; letter-spacing: -.03em; font-weight: 650; }
.list-head .sub { font-size: 12px; margin-top: 5px; }
.circle-btn { width: 35px; height: 35px; color: #607089; border-radius: 10px; cursor: pointer; }
.search-bar, .filter-bar { border-radius: 12px; padding: 6px 16px; box-shadow: var(--shadow); }
.search-bar input { min-width: 0; }
.filter-bar select { padding: 5px 0; color: #546173; }
.search-bar .ico-search svg { width: 18px; height: 18px; }
.product-item { padding: 20px; gap: 18px; border-color: #fff; }
.product-item .cover { width: 84px; height: 84px; flex-basis: 84px; border-radius: 14px; background-color: var(--bg); }
.product-item .info .name { font-size: 16px; }
.product-item .info .price { color: var(--brand); font-size: 17px; }
.product-item .info .meta { overflow-wrap: anywhere; line-height: 1.9; }
.product-item .actions { margin-top: 10px; }
.order-card { padding: 20px; border-color: #fff; }
.order-card .head { gap: 10px; flex-wrap: wrap; }
.order-card code, .order-card .body { overflow-wrap: anywhere; }
.cool-tip { background: #e5f3fb; color: #42718f; line-height: 1.8; padding: 15px 18px; border-radius: 12px; }
.empty { margin: 14px; padding: 64px 20px; background: #fff; border-radius: 18px; box-shadow: var(--shadow); }
.empty .box { color: #76b9df; background: var(--blue-bg); }
.modal-mask { background: rgba(42,53,71,.35); backdrop-filter: blur(4px); }
.modal { padding: 24px; max-height: 92dvh; box-shadow: 0 20px 70px rgba(42,53,71,.18); }
.modal .modal-head { gap: 12px; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.modal .modal-head h3 { font-size: 19px; }
.field { border-color: #dfe5ef; border-radius: 10px; padding: 12px 14px; }
.field:focus-within { border-color: #51b4eb; box-shadow: 0 0 0 3px #e5f3fb; }
.field input, .field textarea, .field select { width: 100%; line-height: 1.65; }
.field.inline input[type=checkbox] { width: auto; }
.pair-input .field { min-width: 0; }
.bar-row { gap: 7px; border-bottom: 1px solid var(--border); background: repeating-linear-gradient(to top,transparent 0,transparent 32px,#edf3f8 32px,#edf3f8 33px); }
.bar { background: #46a9e6; border-radius: 5px 5px 0 0; min-width: 0; }
.bar-labels { gap: 7px; }
.bar-labels span { min-width: 0; overflow: hidden; white-space: nowrap; font-size: 9px; }
.overview-dashboard { display: grid; grid-template-columns: minmax(0,1fr); gap: 18px; margin: 0 14px; }
.overview-dashboard > section { margin: 0; min-width: 0; }
.welcome-card { position: relative; background: #e5f3fb; border-radius: 18px; overflow: hidden; padding: 30px; min-height: 245px; display: flex; align-items: center; box-shadow: var(--shadow); }
.welcome-copy { position: relative; z-index: 1; width: 65%; }
.eyebrow { font-size: 10px; color: #0085db; letter-spacing: .12em; font-weight: 650; }
.welcome-copy h1 { font-size: 26px; line-height: 1.3; margin: 10px 0; letter-spacing: -.03em; }
.welcome-copy > p { color: #61788d; margin: 0 0 12px; font-size: 12px; }
.welcome-card .shop-head { padding: 0; margin: 14px 0 18px; }
.welcome-card .shop-head .name { font-size: 13px; overflow-wrap: anywhere; }
.welcome-card .username { display: none; }
.welcome-art { position: absolute; width: 230px; height: auto; right: -15px; bottom: 0; pointer-events: none; }
.welcome-refresh { position: absolute; right: 17px; top: 17px; background: rgba(255,255,255,.85); z-index: 2; }
.overview-metrics { gap: 18px; }
.overview-metrics .mini-card { border: 0; padding: 22px; min-width: 0; }
.mini-card .head { color: #627182; font-size: 12px; }
.mini-card .head .ico { width: 34px; height: 34px; border-radius: 10px; }
.mini-card .head .ico svg { width: 19px; height: 19px; }
.mini-card .num { font-size: 26px; letter-spacing: -.03em; overflow-wrap: anywhere; }
.mini-card .sub { color: #8592a3; font-size: 11px; margin-top: 6px; }
.overview-balance { padding: 26px; border: 0; background: #fff; }
.overview-balance .label-row { gap: 10px; flex-wrap: wrap; }
.overview-balance .label-row > span:first-child { font-weight: 650; color: #2a3547; font-size: 15px; }
.overview-balance .label-row > span:last-child { font-size: 10px; }
.overview-balance .amount { margin-top: 24px; font-size: 32px; }
.overview-balance .secondary { font-size: 11px; line-height: 1.8; }
.overview-balance .pill-row { font-size: 11px; }
.overview-balance .btn { margin-top: 23px; }
.overview-store-stats { gap: 12px; }
.overview-store-stats .mini-card { border: 0; padding: 18px 15px; min-width: 0; }
.overview-store-stats .head { align-items: flex-start; gap: 4px; }
.overview-chart { padding: 26px; border: 0; }
.overview-chart .row { gap: 8px; flex-wrap: wrap; }
.overview-chart .chip { margin: 0 0 0 4px; font-size: 10px; padding: 6px 9px; }
.overview-chart .legend { margin: 26px 0 16px; }
.overview-visitors { padding: 26px; border: 0; }
.overview-visitors > .row { flex-wrap: wrap; gap: 6px; }
.overview-visitors .grid-2 { gap: 10px; }
.overview-visitors .mini-card { box-shadow: none; border: 0; background: #f6f9fc; border-radius: 12px; }
.overview-visitors .mini-card:last-child { grid-column: 1 / -1; background: var(--blue-bg); }
.overview-hourly { padding: 20px 26px; border: 0; }
.settings-mode { background: var(--bg); color: var(--text); }
.settings-page { max-width: none; padding: 0 14px 10px; }
.settings-page-title h1 { font-size: 25px; color: var(--text); }
.settings-shop-card { background: #e5f3fb; background-image: none; color: var(--text); border-radius: 18px; box-shadow: var(--shadow); padding: 26px; }
.settings-shop-avatar { color: #0085db; background: #fff; border-color: #d5eaf6; }
.settings-shop-handle, .settings-shop-bottom p { color: #718698; }
.settings-shop-bottom { border-color: #d2e8f6; }
.shop-status-action { color: #0085db; }
.shop-status-action:hover { color: #006db5; }
.shop-state { color: #218660; background: #dffff3; border-color: #b6ecd9; }
.shop-state.is-paused { color: #a77422; background: #fff6ea; border-color: #f3dfba; }
.settings-shop-card::after { border-color: #c9e6f7; box-shadow: 0 0 0 35px rgba(0,133,219,.03); }
.setting-tile { border-color: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 22px 19px; }
.setting-tile:hover { border-color: #9cd7f8; box-shadow: 0 7px 20px rgba(37,83,185,.09); }
.tone-blue { color: #0085db; background: #e5f3fb; }
.tone-teal { color: #269b74; background: #dffff3; }
.tone-amber { color: #b88529; background: #fff6ea; }
.tone-slate { color: #8763da; background: #f1ebff; }
.setting-tile-title { color: #2a3547; }
.setting-tile-description { color: #7d8b9c; }
.setting-tile-meta { background: #f0f5f9; color: #718296; }
.settings-modal { padding: 0; border-radius: 18px; }
.settings-modal .modal-head { border-color: var(--border); }
.settings-modal .dialog-icon { background: var(--blue-bg); color: var(--brand); }
.settings-modal .btn.primary { background: var(--brand); border-color: var(--brand); }
.settings-modal .btn.primary:hover { background: var(--brand-dark); }
.settings-modal .modal-body, .settings-modal .modal-actions { background: #f6f9fc; }
.template-option.active, .template-option:hover { color: var(--brand); border-color: #9dd3f3; background: var(--blue-bg); }
.settings-modal .field:focus-within { border-color: #51b4eb; box-shadow: 0 0 0 3px #e5f3fb; }
body.public-entry .merchant-sidebar { display: none; }
body.public-entry #app { padding: 0; }
body.public-entry #view { padding: 0; max-width: 1280px; }
body.public-entry .app-header { max-width: 1240px; margin: 20px auto 0; border-radius: 16px; padding-inline: 30px; position: relative; }
body.public-entry .app-header .title { font-size: 18px; }
body.public-entry .app-header .title::after { content: '光速发卡'; font-size: 18px; }
body.public-entry .mobile-brand { display: inline-grid; }
body.public-entry #workspaceTitle { font-size: 0; }
body.public-entry .workspace-badge { background: #f0f5f9; color: #627182; }
.landing-hero { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px; padding: 90px 40px 75px; }
.landing-copy h1 { font-size: clamp(32px,3.4vw,48px); line-height: 1.4; font-weight: 750; letter-spacing: -.05em; margin: 18px 0; }
.landing-copy h1 span { color: var(--brand); }
.landing-copy > p { color: #707e90; font-size: 14px; line-height: 1.95; max-width: 440px; }
.guide-cta { display: inline-flex; align-items: center; justify-content: center; gap: 14px; text-decoration: none; background: var(--brand); color: #fff; border-radius: 8px; padding: 14px 22px; font-weight: 600; margin-top: 20px; box-shadow: 0 6px 15px rgba(0,133,219,.16); }
.guide-cta svg { width: 18px; height: 18px; }
.guide-sub { font-size: 11px; color: #8290a3; margin-top: 16px; }
.landing-visual { position: relative; padding: 24px 14px 35px; }
.landing-preview { background: #fff; border-radius: 22px; padding: 22px; box-shadow: 0 18px 60px rgba(37,83,185,.12); transform: rotate(-3deg); position: relative; }
.preview-top { display: flex; align-items: center; gap: 12px; }
.preview-top strong { font-size: 14px; }
.preview-top small { display: block; font-size: 10px; color: #8a98a9; margin-top: 3px; }
.preview-live { margin-left: auto; padding: 5px 8px; background: #dffff3; color: #2e9672; border-radius: 6px; font-size: 10px; white-space: nowrap; }
.landing-preview > img { display: block; max-width: 90%; height: auto; margin: 25px auto 8px; }
.preview-bottom { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid #edf2f6; padding-top: 17px; }
.preview-bottom span { display: flex; align-items: center; gap: 6px; font-size: 10px; color: #78899e; }
.preview-bottom svg { width: 17px; height: 17px; color: var(--brand); }
.floating-label { position: absolute; right: -2px; bottom: 10px; padding: 13px 18px; background: #fff; border-radius: 12px; box-shadow: 0 8px 22px rgba(37,83,185,.12); font-size: 11px; color: #596f87; display: flex; gap: 9px; align-items: center; }
.floating-label svg { width: 21px; height: 21px; background: #dffff3; color: #2e9672; border-radius: 50%; padding: 4px; }
.visual-orbit { position: absolute; width: 170px; height: 170px; border-radius: 50%; background: #d4ebf9; }
.orbit-one { top: -15px; right: -15px; }
.orbit-two { bottom: -10px; left: -20px; width: 110px; height: 110px; background: #e1def9; }
.landing-features { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; padding: 0 40px 70px; }
.landing-features > div { padding: 28px; background: #fff; border-radius: 18px; box-shadow: var(--shadow); }
.landing-features > div > svg { width: 44px; height: 44px; padding: 11px; border-radius: 12px; color: #0085db; background: #e5f3fb; }
.landing-features > div:nth-child(2) > svg { background: #dffff3; color: #269b74; }
.landing-features > div:nth-child(3) > svg { background: #f1ebff; color: #8763da; }
.landing-features h2 { font-size: 16px; margin: 17px 0 8px; }
.landing-features p { font-size: 12px; line-height: 1.9; color: #7f8b9a; margin: 0; }
.landing-start { margin: 0 40px; background: #e5f3fb; border-radius: 20px; padding: 35px; display: flex; gap: 32px; align-items: center; }
.landing-start h2 { font-size: 21px; margin: 9px 0; }
.landing-start ol { display: flex; list-style: none; padding: 0; margin: 0 0 0 auto; gap: 28px; }
.landing-start li { display: flex; align-items: flex-start; gap: 10px; }
.landing-start li b { color: #0085db; font-size: 19px; font-weight: 500; }
.landing-start li span { font-size: 12px; }
.landing-start li small { display: block; color: #7b91a4; font-size: 10px; margin-top: 6px; }
.landing-note { color: #8b9aab; font-size: 11px; text-align: center; margin: 35px 24px 0; }
.landing-footer { padding: 30px 20px; text-align: center; color: #9ba8b5; font-size: 11px; }
@media (min-width: 700px) {
  .overview-dashboard { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .welcome-card, .overview-metrics, .overview-store-stats, .overview-chart, .overview-hourly { grid-column: 1 / -1; }
  .overview-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .overview-metrics .mini-card { padding: 18px; }
  .overview-balance { grid-column: 1; grid-row: 5; }
  .overview-visitors { grid-column: 2; grid-row: 5; }
  .welcome-art { width: 320px; right: 45px; }
  .welcome-card { min-height: 250px; }
  .modal-mask { align-items: center; justify-content: center; padding: 28px; }
  .modal { max-width: 760px; border-radius: 18px; }
  .settings-modal { max-width: 660px; }
}
@media (min-width: 1100px) {
  #app { padding: 20px 26px 20px 304px; }
  .merchant-sidebar { position: fixed; display: flex; flex-direction: column; top: 20px; bottom: 20px; left: 20px; width: 258px; padding: 28px 18px 18px; background: #fff; border-radius: 18px; box-shadow: var(--shadow); z-index: 40; overflow-y: auto; }
  .workspace-brand { display: flex; align-items: center; gap: 11px; margin: 0 10px 35px; color: #2a3547; text-decoration: none; font-size: 21px; font-weight: 700; white-space: nowrap; }
  .workspace-brand small { display: block; margin-top: 2px; color: #8b99ab; font-size: 8px; font-weight: 500; letter-spacing: .1em; }
  .nav-caption { padding: 0 18px 12px; color: #9aa6b5; font-size: 10px; letter-spacing: .08em; }
  .desktop-nav { display: grid; gap: 8px; }
  .desktop-nav button { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border: 0; border-radius: 10px; background: #fff; color: #627182; text-align: left; font-size: 14px; }
  .desktop-nav button:hover { background: #f6f9fc; }
  .desktop-nav .ico { display: grid; place-items: center; width: 26px; height: 26px; }
  .desktop-nav svg { width: 22px; height: 22px; }
  .desktop-nav button.active { background: #e5f3fb; color: #0085db; font-weight: 600; }
  .sidebar-helper { margin: auto 10px 15px; padding: 22px 17px; background: #e5f3fb; border-radius: 16px; position: relative; }
  .helper-icon { font-size: 30px; color: #0085db; display: block; }
  .sidebar-helper strong { display: block; font-size: 13px; margin: 7px 0; }
  .sidebar-helper p { font-size: 11px; color: #7b91a4; line-height: 1.85; }
  .sidebar-helper .btn { font-size: 11px; padding: 8px 12px; }
  .switch-shop { margin: 5px 10px 10px; border: 1px solid #e5eaef; background: #fff; color: #0085db; border-radius: 8px; padding: 10px; }
  .sidebar-foot { text-align: center; font-size: 9px; color: #a5b1c0; }
  .app-header, .settings-mode .app-header { border-radius: 18px; min-height: 80px; top: 12px; padding: 15px 28px; }
  .mobile-brand { display: none; }
  .tabbar, .settings-mode .tabbar { display: none; }
  #view { padding-top: 30px; }
  .overview-dashboard { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
  .welcome-card { grid-column: 1 / 3; }
  .overview-metrics { grid-column: 1 / -1; grid-row: 2; gap: 22px; }
  .overview-balance { grid-column: 3; grid-row: 1; }
  .overview-store-stats { grid-column: 1 / -1; grid-row: 4; gap: 22px; }
  .overview-chart { grid-column: 1 / 3; grid-row: 3; }
  .overview-visitors { grid-column: 3; grid-row: 3; }
  .overview-hourly { grid-column: 1 / -1; grid-row: 5; }
  .welcome-art { width: 260px; right: -5px; }
  .welcome-card { min-height: 280px; }
  .welcome-copy { width: 66%; }
  .settings-grid.four-items { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .settings-grid.four-items .setting-tile { flex-wrap: wrap; position: relative; }
  .settings-grid.four-items .setting-tile-content { flex-basis: 100%; }
  .settings-grid.four-items .setting-arrow { position: absolute; right: 15px; top: 22px; }
}
@media (max-width: 699px) {
  #view { padding-top: 22px; }
  .overview-dashboard { gap: 14px; }
  .welcome-card { padding: 23px; min-height: 250px; }
  .welcome-copy { width: 78%; }
  .welcome-copy h1 { font-size: 24px; }
  .welcome-copy > p { max-width: 195px; }
  .welcome-art { width: 180px; opacity: .7; right: -33px; }
  .welcome-copy .btn { font-size: 12px; }
  .overview-metrics { gap: 14px; }
  .overview-metrics .mini-card { padding: 18px 15px; }
  .overview-metrics .num { font-size: 24px; }
  .overview-store-stats .head { flex-direction: column-reverse; gap: 10px; }
  .overview-store-stats .num { font-size: 25px; }
  .overview-store-stats .mini-card { padding: 17px 12px; }
  .overview-chart, .overview-visitors, .overview-balance { padding: 23px; }
  .overview-chart .bar-row, .overview-chart .bar-labels { gap: 4px; }
  .list-head h2 { font-size: 23px; }
  .product-item { padding: 16px; gap: 13px; }
  .product-item .cover { width: 64px; height: 64px; flex-basis: 64px; }
  .product-item .info .name { font-size: 14px; }
  .product-item .info .meta { font-size: 11px; }
  .order-card { padding: 16px; }
  .list-head .row { flex-wrap: wrap; gap: 8px; }
  .settings-shop-card { padding: 21px; }
  .setting-tile { padding: 18px 15px; }
  .settings-grid.four-items { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.public-entry .app-header { margin: 12px 14px 0; padding: 14px 18px; }
  .landing-hero { grid-template-columns: minmax(0,1fr); gap: 35px; padding: 48px 24px 40px; }
  .landing-copy h1 { font-size: 34px; }
  .landing-copy > p { font-size: 13px; }
  .landing-visual { max-width: 470px; width: 100%; margin: 0 auto; padding: 15px 10px 30px; }
  .landing-features { grid-template-columns: minmax(0,1fr); gap: 14px; padding: 0 24px 35px; }
  .landing-features > div { padding: 24px; }
  .landing-start { margin: 0 24px; padding: 28px 24px; display: block; }
  .landing-start ol { display: grid; gap: 24px; margin-top: 24px; }
  .landing-preview { padding: 18px; }
  .preview-top strong { font-size: 12px; }
  .preview-top small { font-size: 9px; }
  .preview-live { display: none; }
  .preview-bottom { gap: 7px; }
  .preview-bottom span { font-size: 9px; gap: 4px; }
  .visual-orbit { width: 100px; height: 100px; right: 0; }
  .floating-label { font-size: 10px; right: 0; padding: 11px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
