/* ==========================================================================
   宿舍闪送 — 样式表
   设计目标：手机优先、像点外卖一样顺手，同时跑腿端在电脑上也好看。
   ========================================================================== */

/* 嵌在外壳里的登录页（店主登录入口） */
.auth-wrap--embedded {
  min-height: auto;
  display: block;
  padding: 8px 0 24px;
  background: transparent;
}

.auth-wrap--embedded .auth-grid {
  max-width: 440px;
  margin: 0 auto;
  grid-template-columns: 1fr !important;
  gap: 12px;
}

.auth-wrap--embedded .auth-hero {
  text-align: center;
  max-width: none;
  padding: 4px 0;
}

.auth-wrap--embedded .auth-logo {
  width: 44px;
  height: 44px;
  font-size: 21px;
  margin: 0 auto 8px;
}

.auth-wrap--embedded .auth-title {
  font-size: 19px !important;
  line-height: 1.35;
}

.auth-wrap--embedded .auth-subtitle {
  font-size: 12px;
}

.auth-wrap--embedded .auth-tags {
  display: none;
}

.auth-wrap--embedded .auth-card {
  max-width: none;
  padding: 16px;
  box-shadow: 0 4px 18px rgba(16, 24, 40, 0.08);
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.auth-back .icon {
  width: 14px;
  height: 14px;
}

/* 未登录时的「我的」页 */
.profile-head--guest {
  background: linear-gradient(135deg, #eef2f6, #dde6ee);
  color: var(--ink);
}

.profile-head--guest .profile-sub {
  color: #5b6b7b;
}

.profile-head--guest .profile-avatar {
  background: #fff;
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.08);
}

.profile-head--guest::after {
  display: none;
}

:root {
  --bg: #f4f6f8;
  --bg-soft: #edf1f4;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --ink: #111418;
  --ink-2: #3f4650;
  --muted: #7a828f;
  --line: #e7eaee;
  --line-strong: #d8dee5;

  --brand: #0f9d58;
  --brand-600: #0b8551;
  --brand-700: #096b42;
  --brand-soft: #e8f7ef;
  --price: #f4511e;
  --warn: #f59e0b;
  --warn-soft: #fff6e5;
  --info: #3b82f6;
  --info-soft: #eaf2ff;
  --danger: #e5484d;
  --danger-soft: #fdeced;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
  --shadow-2: 0 18px 48px rgba(16, 24, 40, 0.16);
  --shadow-brand: 0 10px 24px rgba(15, 157, 88, 0.28);

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Noto Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --tabbar-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  background-image: radial-gradient(1200px 420px at 50% -180px, rgba(15, 157, 88, 0.1), transparent 70%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body.is-locked {
  overflow: hidden;
}

h1, h2, h3, h4, p {
  margin: 0;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a {
  color: var(--brand-600);
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  background: rgba(15, 157, 88, 0.18);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ------------------------------- 启动/骨架 ------------------------------- */
.boot-screen {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  gap: 14px;
  justify-items: center;
  color: var(--muted);
  font-size: 14px;
}

.boot-logo {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  font-size: 30px;
  border-radius: 20px;
  background: linear-gradient(140deg, #22c55e, var(--brand));
  box-shadow: var(--shadow-brand);
  animation: bootPulse 1.6s ease-in-out infinite;
}

@keyframes bootPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.03); }
}

/* ------------------------------- 布局骨架 ------------------------------- */
.app-root {
  min-height: 100dvh;
}

.shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.page {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 18px calc(var(--tabbar-h) + var(--safe-b) + 96px);
  flex: 1;
}

.page--narrow {
  max-width: 860px;
}

/* 点单页：顶部只用很短的一条公告，把空间留给商品 */
.page--shop {
  padding: 10px 12px calc(var(--tabbar-h) + var(--safe-b) + 84px);
}

.view {
  animation: viewIn 0.28s cubic-bezier(0.22, 0.8, 0.3, 1);
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------- 顶栏 ------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(231, 234, 238, 0.9);
}

.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 17px;
  background: linear-gradient(140deg, #22c55e, var(--brand));
  box-shadow: 0 6px 14px rgba(15, 157, 88, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand-name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.topbar-spacer {
  flex: 1;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--brand-soft);
  color: var(--brand-700);
  white-space: nowrap;
}

.role-chip--runner {
  background: #fff3e6;
  color: #b45309;
}

.topnav {
  display: none;
  gap: 4px;
  margin-left: 8px;
}

.topnav-link {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  transition: background 0.16s, color 0.16s;
  white-space: nowrap;
}

.topnav-link:hover {
  background: var(--bg-soft);
}

.topnav-link.active {
  background: var(--ink);
  color: #fff;
}

.avatar-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(140deg, #64748b, #334155);
  flex: none;
}

/* ------------------------------- 底部标签栏 ------------------------------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: flex;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line);
}

.tabbar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  transition: color 0.16s;
  text-decoration: none;
}

.tabbar-item.active {
  color: var(--brand-600);
}

.tabbar-item .icon {
  width: 22px;
  height: 22px;
}

.tabbar-badge {
  position: absolute;
  top: 6px;
  left: 50%;
  margin-left: 4px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 2px #fff;
}

/* ------------------------------- 通用元素 ------------------------------- */
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 2px 12px;
}

.section-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.mono {
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12.5px;
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row--between {
  justify-content: space-between;
}

.grow {
  flex: 1;
  min-width: 0;
}

.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price {
  color: var(--price);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.price small {
  font-size: 0.62em;
  font-weight: 700;
  margin-right: 1px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  transition: transform 0.12s, box-shadow 0.16s, background 0.16s, opacity 0.16s;
  user-select: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.975);
}

.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(140deg, #17b463, var(--brand));
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-brand);
}

.btn-primary:hover {
  filter: brightness(1.03);
}

.btn-dark {
  background: var(--ink);
  color: #fff;
  border-color: transparent;
}

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

.btn-ghost:hover {
  background: var(--bg-soft);
}

.btn-soft {
  background: var(--brand-soft);
  color: var(--brand-700);
  border-color: transparent;
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: transparent;
}

.btn-sm {
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 999px;
}

.btn-block {
  width: 100%;
}

.btn-lg {
  height: 50px;
  font-size: 16px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--ink-2);
  transition: background 0.16s, color 0.16s;
  flex: none;
}

.icon-btn:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

/* 卡片 */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(17, 20, 24, 0.05);
  box-shadow: var(--shadow-1);
}

/* 提示条 */
.notice {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: linear-gradient(100deg, #e9f8f0, #f2fbf6);
  border: 1px solid rgba(15, 157, 88, 0.12);
  color: #12694a;
  font-size: 13px;
  line-height: 1.4;
}

.notice--slim {
  padding: 9px 12px;
  /* 往下挪一点，别贴着顶栏 */
  margin: 14px 0 10px;
  border-radius: 11px;
  font-size: 12.5px;
  text-align: left;
  width: 100%;
}

.notice-text {
  flex: 1;
  min-width: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.notice-edit {
  flex: none;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand);
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(15, 157, 88, 0.1);
}

.notice--empty {
  background: #fff;
  border: 1px dashed rgba(15, 157, 88, 0.35);
  color: var(--muted);
  cursor: pointer;
}

.notice--empty .icon {
  color: var(--brand);
  opacity: 0.65;
}

.notice--empty .notice-edit {
  background: rgba(15, 157, 88, 0.12);
}

.notice .icon {
  width: 17px;
  height: 17px;
  color: var(--brand);
  flex: none;
}

.notice--slim .icon {
  width: 14px;
  height: 14px;
}

/* 分类胶囊 */
.pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 2px 8px;
  margin: 0 -2px;
  scrollbar-width: none;
}

.pills::-webkit-scrollbar {
  display: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  transition: all 0.16s;
}

.pill.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  font-weight: 600;
}

.pill__emoji {
  font-size: 15px;
}

/* 分段控件 */
.segmented {
  display: inline-flex;
  padding: 3px;
  background: var(--bg-soft);
  border-radius: 999px;
  gap: 2px;
}

.segmented button {
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.18s;
  white-space: nowrap;
}

.segmented button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}

/* 状态标签 */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-chip--unpaid { background: var(--warn-soft); color: #b45309; }
.status-chip--review { background: #fff1e6; color: #c2410c; }
.status-chip--pending { background: var(--info-soft); color: #1d4ed8; }
.status-chip--accepted { background: var(--info-soft); color: #1d4ed8; }
.status-chip--delivering { background: var(--brand-soft); color: var(--brand-700); }
.status-chip--delivered { background: #eef2ff; color: #4338ca; }
.status-chip--confirmed { background: var(--brand-soft); color: var(--brand-700); }
.status-chip--completed { background: var(--bg-soft); color: var(--muted); }
.status-chip--cancelled { background: var(--danger-soft); color: var(--danger); }

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

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

.empty-emoji {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 12px;
  display: block;
  opacity: 0.9;
}

.empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 4px;
}

/* ------------------------------- 商品网格 ------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.product-card {
  position: relative;
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid rgba(17, 20, 24, 0.05);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  overflow: hidden;
  transition: transform 0.18s cubic-bezier(0.22, 0.8, 0.3, 1), box-shadow 0.18s;
  touch-action: manipulation;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.1);
}

.product-card.is-out {
  opacity: 0.62;
}

.product-card.is-holding {
  transform: scale(0.96);
  box-shadow: 0 0 0 2px var(--brand), var(--shadow-1);
}

.product-card.is-dragging {
  display: none;
}

.thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  font-size: 38px;
  overflow: hidden;
  background: linear-gradient(150deg, #eef2f6, #e2e8ef);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb[data-cat="water"] { background: linear-gradient(150deg, #e8f4ff, #cfe9ff); }
.thumb[data-cat="noodle"] { background: linear-gradient(150deg, #fff3e5, #ffe2c4); }
.thumb[data-cat="snack"] { background: linear-gradient(150deg, #fdeef6, #fbdcea); }

.thumb-emoji {
  filter: drop-shadow(0 6px 10px rgba(16, 24, 40, 0.12));
}

.thumb-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(17, 20, 24, 0.72);
  color: #fff;
  backdrop-filter: blur(4px);
}

.thumb-badge--off {
  background: rgba(17, 20, 24, 0.82);
}

.thumb-badge--stock {
  top: auto;
  bottom: 8px;
  left: 8px;
  background: rgba(17, 20, 24, 0.58);
}

.cat-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink-2);
  backdrop-filter: blur(4px);
}

.product-body {
  padding: 8px 9px 9px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.product-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-desc {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-foot {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding-top: 2px;
}

.product-price {
  font-size: 17px;
  line-height: 1.1;
}

.product-unit {
  font-size: 11px;
  color: var(--muted);
  margin-left: 1px;
  font-weight: 500;
}

/* 加号 / 步进器 */
.add-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #17b463, var(--brand));
  color: #fff;
  box-shadow: 0 6px 14px rgba(15, 157, 88, 0.3);
  transition: transform 0.14s ease;
  flex: none;
}

.add-btn:active {
  transform: scale(0.88);
}

.add-btn .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.6;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 3px;
}

.stepper button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--surface);
  transition: transform 0.12s;
}

.stepper button:active {
  transform: scale(0.86);
}

.stepper button .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.6;
}

.stepper-qty {
  min-width: 22px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* 跑腿端的商品卡操作 */
.card-tools {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 5px;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.16s, transform 0.16s;
  z-index: 2;
}

.product-card:hover .card-tools,
.product-card:focus-within .card-tools {
  opacity: 1;
  transform: none;
}

.card-tools button {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink-2);
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.16);
  backdrop-filter: blur(6px);
}

.card-tools button .icon {
  width: 15px;
  height: 15px;
}

.card-tools button:hover {
  color: var(--ink);
}

.card-tools .danger:hover {
  color: var(--danger);
}

.drag-handle {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.16s;
  pointer-events: none;
}

.product-card:hover .drag-handle {
  opacity: 1;
}

/* 添加商品卡：和商品卡一样高 */
.add-card {
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  min-height: 220px;
  aspect-ratio: 0.7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  transition: all 0.18s;
}

.add-card:hover {
  border-color: var(--brand);
  color: var(--brand-600);
  background: rgba(15, 157, 88, 0.04);
}

.add-card-plus {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  color: currentColor;
}

.add-card-plus .icon {
  width: 22px;
  height: 22px;
  stroke-width: 2.2;
}

.add-card-text {
  font-size: 13px;
  font-weight: 600;
}

/* 拖拽幽灵 */
.drag-ghost {
  position: fixed;
  z-index: 900;
  pointer-events: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  transform-origin: center;
  transition: none;
  will-change: transform;
  opacity: 0.97;
}

.drag-placeholder {
  border-radius: var(--radius);
  border: 2px dashed var(--brand);
  background: rgba(15, 157, 88, 0.06);
}

.is-sorting,
.is-sorting body {
  overflow: hidden;
  cursor: grabbing;
}

.drop-pop {
  animation: dropPop 0.32s cubic-bezier(0.22, 0.8, 0.3, 1);
}

@keyframes dropPop {
  0% { transform: scale(0.94); }
  60% { transform: scale(1.015); }
  100% { transform: scale(1); }
}

/* ------------------------------- 购物车悬浮条 ------------------------------- */
.cart-bar {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px);
  transform: translateX(-50%) translateY(0);
  width: min(520px, calc(100% - 28px));
  z-index: 42;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 16px;
  border-radius: 999px;
  background: rgba(17, 20, 24, 0.94);
  color: #fff;
  box-shadow: 0 16px 36px rgba(16, 24, 40, 0.32);
  backdrop-filter: blur(14px);
  animation: cartIn 0.3s cubic-bezier(0.22, 0.8, 0.3, 1);
}

@keyframes cartIn {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.cart-icon-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  flex: none;
}

.cart-icon-wrap .icon {
  width: 19px;
  height: 19px;
}

.cart-bar-info {
  min-width: 0;
  line-height: 1.25;
}

.cart-bar-total {
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.cart-bar-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.62);
}

.cart-bar .btn {
  height: 42px;
  padding: 0 22px;
  border-radius: 999px;
  flex: none;
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--price);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 2px rgba(17, 20, 24, 0.94);
}

/* ------------------------------- 弹层 / 抽屉 ------------------------------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(11, 14, 18, 0.44);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.2s ease;
}

.overlay--center {
  align-items: center;
  padding: 18px;
}

.overlay.is-closing {
  animation: fadeOut 0.18s ease forwards;
}

.sheet {
  width: 100%;
  max-width: 520px;
  max-height: 92dvh;
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
  animation: sheetUp 0.3s cubic-bezier(0.22, 0.8, 0.3, 1);
  padding-bottom: var(--safe-b);
}

.sheet--center {
  border-radius: var(--radius-lg);
  max-height: 88dvh;
  animation: popIn 0.26s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.sheet.is-closing {
  animation: sheetDown 0.2s ease forwards;
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: none; }
}

@keyframes sheetDown {
  from { transform: none; }
  to { transform: translateY(100%); }
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.sheet-grabber {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: var(--line-strong);
  margin: 9px auto 0;
  flex: none;
}

.sheet-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px 10px;
  flex: none;
}

.sheet-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sheet-sub {
  font-size: 12.5px;
  color: var(--muted);
}

.sheet-body {
  padding: 4px 18px 14px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

.sheet-foot {
  padding: 12px 18px calc(14px + var(--safe-b));
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  align-items: center;
  flex: none;
  background: var(--surface);
}

/* ------------------------------- 表单 ------------------------------- */
.field {
  margin-bottom: 13px;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.field-label .req {
  color: var(--price);
  font-weight: 700;
}

.field-hint {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 400;
  margin-left: auto;
}

.input,
.textarea,
.select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 13px;
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  font-size: 15px;
  transition: border-color 0.16s, background 0.16s, box-shadow 0.16s;
  outline: none;
  color: var(--ink);
}

.input::placeholder,
.textarea::placeholder {
  color: #a8b0ba;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(15, 157, 88, 0.1);
}

.textarea {
  height: auto;
  min-height: 78px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.5;
}

.field-error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 5px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field-row--3 {
  grid-template-columns: 1.2fr 1fr 1fr;
}

/* ------------------------------- 提示 toast ------------------------------- */
.toast-root {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: min(92vw, 440px);
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(17, 20, 24, 0.94);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-2);
  animation: toastIn 0.26s cubic-bezier(0.22, 0.8, 0.3, 1);
  backdrop-filter: blur(10px);
}

.toast.is-out {
  animation: toastOut 0.22s ease forwards;
}

.toast .icon {
  width: 17px;
  height: 17px;
  flex: none;
}

.toast--error {
  background: rgba(180, 35, 40, 0.96);
}

.toast--success {
  background: rgba(12, 122, 71, 0.96);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; transform: translateY(-8px); }
}

/* ------------------------------- 登录页 ------------------------------- */
.auth-wrap {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 18px 40px;
  background:
    radial-gradient(900px 460px at 15% -10%, rgba(34, 197, 94, 0.16), transparent 62%),
    radial-gradient(700px 420px at 95% 10%, rgba(255, 138, 76, 0.14), transparent 60%);
}

.auth-grid {
  width: 100%;
  max-width: 440px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 22px;
}

.auth-hero {
  width: 100%;
  max-width: 440px;
}

.auth-logo {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 27px;
  background: linear-gradient(140deg, #22c55e, var(--brand));
  box-shadow: var(--shadow-brand);
  margin-bottom: 16px;
}

.auth-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.auth-subtitle {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.55;
}

.auth-tags {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.auth-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(17, 20, 24, 0.06);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.04);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.13);
  padding: 20px;
}

.auth-switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-soft);
  border-radius: 999px;
  margin-bottom: 16px;
}

.auth-switch button {
  flex: 1;
  height: 38px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.18s;
}

.auth-switch button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}

.role-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 15px;
}

.role-option {
  padding: 12px;
  border-radius: 15px;
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  text-align: left;
  transition: all 0.18s;
}

.role-option.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 3px rgba(15, 157, 88, 0.08);
}

.role-option-emoji {
  font-size: 20px;
  line-height: 1;
  margin-bottom: 6px;
}

.role-option-title {
  font-size: 14px;
  font-weight: 700;
}

.role-option-desc {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.3;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}

.demo-box {
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 13px;
  background: var(--bg-soft);
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.6;
}

.demo-box b {
  color: var(--ink);
}

.demo-btn {
  margin-top: 7px;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.auth-footnote {
  margin-top: 12px;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* ------------------------------- 客户端 ------------------------------- */
.hero-greet {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.hero-title {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.hero-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

.hero-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #22c55e, var(--brand));
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  box-shadow: var(--shadow-brand);
  flex: none;
}

/* 购物车行 */
.cart-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.cart-row:last-child {
  border-bottom: 0;
}

.cart-thumb {
  width: 50px;
  height: 50px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 23px;
  flex: none;
  overflow: hidden;
}

.cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.cart-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 6px;
  font-size: 14px;
  color: var(--ink-2);
}

.total-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--price);
  letter-spacing: -0.02em;
}

.pay-option {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  width: 100%;
  text-align: left;
}

.pay-option.active {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.pay-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #07c160;
  color: #fff;
  font-size: 17px;
  flex: none;
}

.radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  display: grid;
  place-items: center;
  flex: none;
  transition: all 0.16s;
}

.radio.on {
  border-color: var(--brand);
  background: var(--brand);
}

.radio.on::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
}

/* 支付成功 */
.pay-done {
  text-align: center;
  padding: 18px 8px 6px;
}

.pay-done-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  animation: popIn 0.4s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.pay-done-icon .icon {
  width: 34px;
  height: 34px;
  stroke-width: 2.6;
}

.pay-done-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.pay-done-sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 5px;
}

.qr-box {
  width: 168px;
  height: 168px;
  margin: 16px auto 12px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-1);
}

.qr-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.qr-center .pay-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(7, 193, 96, 0.4);
}

/* 跑腿收款码 */
.qr-amount {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 2px;
}

.qr-real {
  width: 210px;
  height: 210px;
  margin: 12px auto 8px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: var(--shadow-1);
}

.qr-real img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 「金额必须付对」的警示条 */
.pay-warn {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 9px 11px;
  border-radius: 12px;
  background: #fff7e8;
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: #92400e;
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
}

.pay-warn .icon {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 1px;
  color: var(--warn);
}

.pay-warn b {
  font-weight: 700;
}

/* ------------------------------- 订单 ------------------------------- */
.order-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.order-card {
  padding: 15px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(17, 20, 24, 0.05);
  box-shadow: var(--shadow-1);
  transition: transform 0.16s, box-shadow 0.16s;
  text-align: left;
  width: 100%;
  display: block;
}

.order-card:hover {
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.09);
}

.order-card--attention {
  box-shadow: 0 0 0 2px rgba(15, 157, 88, 0.24), var(--shadow-1);
  animation: attention 1.6s ease-in-out 2;
}

@keyframes attention {
  0%, 100% { box-shadow: 0 0 0 2px rgba(15, 157, 88, 0.24), var(--shadow-1); }
  50% { box-shadow: 0 0 0 4px rgba(15, 157, 88, 0.14), var(--shadow-1); }
}

.order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.order-no {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.order-items {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.55;
  margin-bottom: 10px;
}

.order-addr {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 11px;
  line-height: 1.45;
}

.order-addr .icon {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  flex: none;
}

.order-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
}

.order-foot-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.order-total {
  font-size: 13px;
  color: var(--muted);
}

.order-total b {
  color: var(--price);
  font-size: 17px;
  font-weight: 800;
  margin-left: 5px;
  font-variant-numeric: tabular-nums;
}

/* 时间轴 */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 4px 0 8px;
}

.timeline-item {
  display: flex;
  gap: 11px;
  position: relative;
  padding-bottom: 15px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 15px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2.5px solid var(--line-strong);
  background: var(--surface);
  flex: none;
  margin-top: 2px;
  z-index: 1;
}

.timeline-item.on .timeline-dot {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 157, 88, 0.14);
}

.timeline-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.timeline-item.on .timeline-label {
  color: var(--ink);
}

.timeline-time {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------- 跑腿看板 ------------------------------- */
.board-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 13px;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 14px;
}

.stat-strip--5 {
  grid-template-columns: repeat(2, 1fr);
}

/* 收款核对提示 */
.pay-check {
  display: flex;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff4ec;
  border: 1px solid rgba(244, 81, 30, 0.22);
  color: #9a3412;
  font-size: 12.5px;
  line-height: 1.45;
}

.pay-check .icon {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
  color: var(--price);
}

.pay-check b {
  display: block;
  font-size: 13.5px;
  margin-bottom: 1px;
}

.pay-check .small {
  color: #b45309;
  font-size: 11.5px;
}

.pay-check--muted {
  background: var(--info-soft);
  border-color: rgba(59, 130, 246, 0.2);
  color: #1e40af;
}

.pay-check--muted .icon {
  color: var(--info);
}

.pay-check--muted .small {
  color: #3b6fd4;
}

.pay-check--ok {
  background: var(--brand-soft);
  border-color: rgba(15, 157, 88, 0.22);
  color: var(--brand-700);
}

.pay-check--ok .icon {
  color: var(--brand);
}

.pay-check--ok .small {
  color: var(--brand-600);
}

.stat-mini {
  padding: 11px 13px;
  border-radius: 15px;
  background: var(--surface);
  border: 1px solid rgba(17, 20, 24, 0.05);
  box-shadow: var(--shadow-1);
}

.stat-mini-label {
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 2px;
}

.stat-mini-value {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.board-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.board-card {
  padding: 14px 15px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(17, 20, 24, 0.05);
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  gap: 11px;
  text-align: left;
  width: 100%;
  transition: box-shadow 0.16s, transform 0.16s;
}

.board-card:hover {
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.1);
}

.board-card--new {
  animation: newOrder 1.2s ease-in-out 2;
  box-shadow: 0 0 0 2px rgba(255, 87, 34, 0.35), var(--shadow-1);
}

@keyframes newOrder {
  0%, 100% { transform: none; }
  30% { transform: scale(1.012); }
}

.customer-block {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border-radius: 14px;
  background: var(--bg-soft);
}

.customer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface);
  font-weight: 800;
  font-size: 16px;
  color: var(--brand-700);
  flex: none;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
}

.customer-name {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.customer-meta {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.addr-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.call-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  flex: none;
  box-shadow: 0 6px 14px rgba(15, 157, 88, 0.3);
}

.call-btn .icon {
  width: 18px;
  height: 18px;
}

.note-block {
  display: flex;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--warn-soft);
  border: 1px solid rgba(245, 158, 11, 0.2);
  font-size: 12.5px;
  color: #92400e;
  line-height: 1.45;
}

.note-block .icon {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 1px;
}

.item-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  padding: 3px 0;
}

.item-line .qty {
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.item-line .line-total {
  margin-left: auto;
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.board-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
}

.board-total {
  font-size: 17px;
  font-weight: 800;
  color: var(--price);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.board-actions {
  display: flex;
  gap: 8px;
}

.empty-board {
  padding: 46px 20px;
  text-align: center;
  color: var(--muted);
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
}

/* 数据页 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
  margin-bottom: 16px;
}

.stat-card {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(17, 20, 24, 0.05);
  box-shadow: var(--shadow-1);
}

.stat-label {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
}

.stat-label .icon {
  width: 15px;
  height: 15px;
  color: var(--brand);
}

.stat-value {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.stat-value small {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 3px;
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 132px;
  padding: 10px 2px 0;
}

.chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}

.chart-col--btn {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  border-radius: 8px;
}

.chart-col--btn:hover {
  background: rgba(15, 157, 88, 0.06);
}

/* 单品销量行 */
.sale-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.sale-row:last-child {
  border-bottom: 0;
}

.sale-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--bg-soft);
  font-size: 15px;
  flex: none;
}

.sale-name {
  font-size: 13.5px;
  font-weight: 500;
}

.sale-qty {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand-700);
  font-variant-numeric: tabular-nums;
}

.sale-money {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 52px;
  text-align: right;
}

.chart-bar {
  width: 100%;
  max-width: 34px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #34d399, var(--brand));
  min-height: 4px;
  transition: height 0.5s cubic-bezier(0.22, 0.8, 0.3, 1);
  position: relative;
}

.chart-bar[data-value="0"] {
  background: var(--bg-soft);
}

.chart-label {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}

.chart-value {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 11px;
}

.rank-no {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 800;
  background: var(--bg-soft);
  color: var(--muted);
  flex: none;
}

.rank-item:nth-child(1) .rank-no { background: #fff2d8; color: #b45309; }
.rank-item:nth-child(2) .rank-no { background: #eef1f5; color: #475569; }
.rank-item:nth-child(3) .rank-no { background: #fbeee6; color: #9a3412; }

.rank-name {
  font-size: 13.5px;
  font-weight: 600;
}

.rank-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
  margin-top: 5px;
}

.rank-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #34d399, var(--brand));
}

/* 我的 */
.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

.profile-head::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.4), transparent 70%);
}

.profile-avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 23px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  flex: none;
  z-index: 1;
}

.profile-name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  z-index: 1;
}

.profile-sub {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.66);
  margin-top: 3px;
  z-index: 1;
}

.menu-group {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(17, 20, 24, 0.05);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  margin-bottom: 13px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14.5px;
  transition: background 0.14s;
}

.menu-item:last-child {
  border-bottom: 0;
}

.menu-item:hover {
  background: var(--surface-2);
}

.menu-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--bg-soft);
  color: var(--ink-2);
  flex: none;
}

.menu-icon .icon {
  width: 17px;
  height: 17px;
}

.menu-value {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.menu-value .icon {
  width: 16px;
  height: 16px;
  color: #c2c9d2;
}

/* 收款码设置 */
.qr-setting {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.qr-setting-img {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  flex: none;
  color: var(--muted);
}

.qr-setting-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-setting-img .icon {
  width: 30px;
  height: 30px;
}

/* 图片上传 */
.image-picker {  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  border: 1.5px dashed var(--line-strong);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s;
}

.image-picker:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.image-preview {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--bg-soft);
  font-size: 26px;
  flex: none;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-picker-text {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}

.image-picker-text b {
  color: var(--ink-2);
  font-size: 13.5px;
  display: block;
  margin-bottom: 2px;
}

/* 骨架 */
.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(100deg, #eef1f4 30%, #f7f9fa 50%, #eef1f4 70%);
  background-size: 220% 100%;
  animation: shimmer 1.3s infinite linear;
  height: 220px;
}

@keyframes shimmer {
  from { background-position: 120% 0; }
  to { background-position: -60% 0; }
}

/* 小工具类 */
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.text-center { text-align: center; }
.hide { display: none !important; }
.nowrap { white-space: nowrap; }

/* ------------------------------- 响应式 ------------------------------- */
@media (min-width: 720px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
    gap: 12px;
  }

  .thumb {
    aspect-ratio: 1 / 1;
    font-size: 46px;
  }

  .board-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .stat-strip {
    grid-template-columns: repeat(4, 1fr);
  }

  .stat-strip--5 {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 900px) {
  .auth-grid {
    max-width: 1020px;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 48px;
  }

  .auth-hero,
  .auth-card {
    max-width: none;
  }

  .auth-card {
    padding: 26px;
  }

  .page {
    padding-bottom: 90px;
  }

  .tabbar {
    display: none;
  }

  .topnav {
    display: flex;
  }

  .cart-bar {
    bottom: 24px;
  }

  .overlay {
    align-items: center;
    padding: 20px;
  }

  .sheet {
    border-radius: var(--radius-lg);
    max-height: 86dvh;
    animation: popIn 0.28s cubic-bezier(0.22, 0.8, 0.3, 1);
  }

  .sheet-grabber {
    display: none;
  }

  .board-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .board-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
