/* ===== 快递代拿系统 全局样式 v2（精致工作台 / 移动端优先 / 响应式） ===== */
:root {
  /* 色彩体系 */
  --primary: #0f766e;
  --primary-strong: #115e59;
  --primary-deep: #134e4a;
  --primary-soft: #ccfbf1;
  --primary-mist: #f0fdfa;
  --accent: #d97706;
  --accent-soft: #fef3c7;
  --warn: #d97706;
  --warn-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --success: #059669;
  --success-soft: #d1fae5;
  --info: #2563eb;
  --info-soft: #dbeafe;

  /* 中性色 */
  --bg: #f5f7fa;
  --surface: #ffffff;
  --border: #e5eaf1;
  --border-strong: #d5dce6;
  --text: #132033;
  --text-muted: #5f7087;
  --text-faint: #8b99ad;

  /* 圆角与阴影 */
  --radius: 14px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(19, 32, 51, 0.05);
  --shadow: 0 1px 2px rgba(19, 32, 51, 0.06), 0 6px 18px rgba(19, 32, 51, 0.06);
  --shadow-lg: 0 12px 32px rgba(19, 32, 51, 0.14);

  /* 聚焦环 */
  --ring: 0 0 0 4px rgba(15, 118, 110, 0.15);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

/* hidden 属性必须优先于任何 display 声明（.btn/.edit-banner 等设置 display 时会覆盖 UA 样式导致隐藏失效） */
[hidden] {
  display: none !important;
}

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}

/* 页面背景：冷灰 + 顶部青绿氛围 + 细微网格纹理 */
body {
  margin: 0;
  font-family: var(--font);
  background-color: var(--bg);
  background-image:
    radial-gradient(680px 260px at 50% -80px, rgba(15, 118, 110, 0.09), transparent 70%),
    radial-gradient(560px 200px at 95% -60px, rgba(13, 148, 136, 0.06), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M24 0H0V24' fill='none' stroke='%23132033' stroke-opacity='0.028'/%3E%3C/svg%3E");
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  text-wrap: balance;
  margin: 0;
  line-height: 1.3;
}

p {
  margin: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

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

/* 焦点可见性 */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 屏幕阅读器专用（视觉隐藏） */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

/* 容器 */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 顶部导航 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), #2dd4bf 60%, transparent);
  opacity: 0.55;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; }
.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #14b8a6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(15, 118, 110, 0.35);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}
.user-chip strong {
  color: var(--text);
  font-weight: 600;
}
.role-tag {
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 600;
  white-space: nowrap;
}
.role-tag.admin {
  background: var(--accent-soft);
  color: #92400e;
}
.role-tag.runner {
  background: var(--primary-soft);
  color: var(--primary-strong);
}
.role-tag.client {
  background: var(--info-soft);
  color: var(--info);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:active:not(:disabled) {
  transform: scale(0.97);
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.28);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-strong);
  box-shadow: 0 3px 10px rgba(15, 118, 110, 0.36);
}
.btn-outline {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover:not(:disabled) {
  background: var(--primary-mist);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover:not(:disabled) {
  background: #b91c1c;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 8px;
}
.btn-xs {
  padding: 3px 10px;
  font-size: 12px;
  border-radius: 7px;
}
.btn-block {
  width: 100%;
}
.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.btn.loading .btn-spinner {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 卡片 */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
/* 悬浮可交互卡片 */
.card-hover {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

/* 表单 */
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.field .hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
/* 登录页「记住我」复选框 */
.auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 14px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.auth-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}
/* 筛选栏内无控件的标题文本 */
.cap {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.input,
.select,
.textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: none;
}
.textarea {
  resize: vertical;
  min-height: 80px;
}
.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: var(--ring);
}
.select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235f7087' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}
.checkbox-row span {
  font-size: 15px;
}
.form-error {
  display: none;
  color: var(--danger);
  font-size: 13px;
  margin-top: 6px;
}
.form-error.show {
  display: block;
}
.field-error {
  display: none;
  color: var(--danger);
  font-size: 13px;
  margin-top: 4px;
}
.field-error.show {
  display: block;
}
.input.invalid {
  border-color: var(--danger);
}

/* 搜索框 */
.search-box {
  position: relative;
  min-width: 0;
}
.search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-faint);
  pointer-events: none;
}
.search-box .input {
  padding-left: 36px;
}

/* 工具栏（管理后台：搜索 + 筛选 + 操作按钮） */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.toolbar .search-box {
  flex: 1 1 200px;
  max-width: 320px;
}
.toolbar .grow {
  flex: 1;
}
.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.toolbar-count {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}
.toolbar-count b {
  color: var(--primary-strong);
  font-variant-numeric: tabular-nums;
}
.station-owner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  font-size: 14px;
  color: var(--text);
}
.station-owner .owner-name {
  font-weight: 600;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 6px;
  padding: 1px 8px;
}

/* 单选卡片（角色选择） */
.radio-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.radio-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.radio-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.radio-card .rc-title {
  font-weight: 700;
  font-size: 15px;
}
.radio-card .rc-desc {
  font-size: 12px;
  color: var(--text-muted);
}
.radio-card:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-mist);
}

/* 徽章 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  line-height: 1.5;
  white-space: nowrap;
}
.badge-pending { background: var(--accent-soft); color: #92400e; }
.badge-picked_up { background: var(--info-soft); color: #1e40af; }
.badge-delivered { background: var(--success-soft); color: #065f46; }
.badge-cancelled { background: #e2e8f0; color: #475569; text-decoration: line-through; }
.badge-cabinet { background: var(--primary-soft); color: var(--primary-strong); }
.badge-neutral { background: #eef1f5; color: var(--text-muted); }

/* 标签页 */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  overflow-x: auto;
  margin: 16px 0;
  box-shadow: var(--shadow-sm);
}
.tab-btn {
  flex: 1;
  min-width: max-content;
  border: none;
  background: transparent;
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.tab-btn[aria-selected="true"] {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.3);
}
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

/* 订单卡片 */
.order-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  margin-bottom: 12px;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.order-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}
.order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
/* 管理端订单复选框（批量删除） */
.order-check {
  display: inline-flex;
  align-items: center;
  margin-right: 2px;
  cursor: pointer;
}
.order-check input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--danger);
  cursor: pointer;
}
.order-card.order-checked {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}
.order-no {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  color: var(--primary-deep);
}
/* 取件人信息条（代拿端突出显示姓名/尾号/微信，方便取件） */
.pickup-who {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  background: var(--primary-soft);
  border-radius: 10px;
  padding: 8px 12px;
  margin-top: 10px;
  font-size: 14px;
}
.pickup-who .who-name {
  font-size: 15px;
  color: var(--primary-strong);
}
.pickup-who .who-wechat {
  color: var(--text);
  font-size: 13px;
}
.order-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin: 12px 0;
  font-size: 14px;
}
.order-grid .item {
  min-width: 0;
}
.order-grid .item span {
  color: var(--text-muted);
  font-size: 12px;
  display: block;
}
.order-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  border-top: 1px dashed var(--border);
  padding-top: 12px;
}
/* 驿站排序按钮组：紧凑图标按钮，点击区域更大 */
.sort-group {
  display: inline-flex;
  gap: 4px;
}
.sort-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}
.sort-btn:hover:not(:disabled) {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.sort-btn:active:not(:disabled) {
  transform: translateY(0);
}
.sort-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
/* 驿站数字排序：序号输入框（替代多次点上下按钮，直接输入数字排序） */
.station-sort-field {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 36px;
  padding: 0 6px 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.station-sort-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.station-sort-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  user-select: none;
}
.station-sort-input {
  width: 52px;
  height: 26px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-strong);
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}
.station-sort-input::-webkit-inner-spin-button,
.station-sort-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.order-photos {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.photo-block {
  flex: 1 1 160px;
  max-width: 220px;
}
.photo-block .photo-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.photo-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
}

/* 分组标题 */
.group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-strong);
  margin: 16px 0 8px;
  padding: 8px 12px;
  background: linear-gradient(90deg, var(--primary-soft), var(--primary-mist));
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 10px;
}
.group-title .count {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 12px;
}

/* 订单视图切换（按订单 / 按驿站） */
.order-view-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 14px;
}
.order-view-toggle {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.view-btn {
  border: none;
  background: transparent;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.view-btn.active {
  background: var(--primary);
  color: #fff;
}

/* 按驿站分类：紧凑行列表 */
.station-rows {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.station-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.station-row:last-child {
  border-bottom: none;
}
.row-code {
  flex: none;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: var(--primary-mist);
  border: 1px solid rgba(15, 118, 110, 0.15);
  border-radius: 8px;
  padding: 2px 9px;
  white-space: nowrap;
}
.row-who {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 代拿端按驿站清单行：驿站名/件数/操作 */
.station-row {
  flex-wrap: wrap;
}
.row-station {
  flex: none;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-strong);
  background: var(--surface-alt, #f0fdfa);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px 9px;
  white-space: nowrap;
}
.row-count {
  flex: none;
  color: var(--text-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.row-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.station-row .tier-inline {
  min-width: 96px;
  max-width: 150px;
  padding: 2px 22px 2px 8px;
  font-size: 11px;
}
.station-row .badge-tier,
.station-row .badge-tier-pending {
  flex: none;
  font-size: 11px;
}
.station-row .row-who {
  min-width: 0;
  flex: 1 1 auto;
}

/* 筛选栏 */
.filter-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.filter-bar .field {
  margin: 0;
}
.filter-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
}
.filter-check .checkbox-row {
  padding: 0;
}
@media (min-width: 720px) {
  .filter-bar {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 数据表格（管理后台） */
.table-card {
  padding: 0;
  overflow: hidden;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table thead th {
  position: sticky;
  top: 0;
  background: #fafbfd;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.data-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}
.data-table tbody tr:nth-child(even) {
  background: rgba(245, 247, 250, 0.5);
}
.data-table tbody tr {
  transition: background-color 0.12s ease;
}
.data-table tbody tr:hover {
  background: var(--primary-mist);
}
.user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.role-select {
  width: auto;
  padding: 5px 28px 5px 10px;
  font-size: 13px;
  border-radius: 8px;
}

/* 空状态 */
.empty {
  text-align: center;
  padding: 44px 16px;
  color: var(--text-muted);
}
.empty-icon {
  font-size: 38px;
  margin-bottom: 8px;
  filter: grayscale(0.15);
}
.empty p {
  font-size: 14px;
}

/* 弹窗 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(19, 32, 51, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  z-index: 100;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.modal-backdrop.open {
  display: flex;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  padding: 22px;
  box-shadow: var(--shadow-lg);
  margin: auto 0;
  border-top: 3px solid var(--primary);
  animation: modal-in 0.18s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.modal-close {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  touch-action: manipulation;
}
.modal-close:hover {
  background: var(--bg);
  color: var(--text);
}
.modal-narrow {
  max-width: 420px;
}
/* 账号信息表（创建账号成功后展示） */
.cred-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 6px 0 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.cred-table th,
.cred-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.cred-table th {
  width: 84px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  background: var(--bg);
}
.cred-table td {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.cred-table tr:last-child th,
.cred-table tr:last-child td {
  border-bottom: none;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.photo-preview {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  margin-top: 8px;
  display: none;
}

/* Toast 通知 */
.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: min(92vw, 420px);
  pointer-events: none;
}
.toast {
  background: var(--text);
  color: #fff;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.22s ease;
  max-width: 100%;
  pointer-events: auto;
}
.toast.error {
  background: var(--danger);
}
.toast.success {
  background: var(--success);
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 确认弹层 */
.confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(19, 32, 51, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 110;
}
.confirm-backdrop.open {
  display: flex;
}
.confirm-box {
  background: var(--surface);
  border-radius: 16px;
  padding: 20px;
  max-width: 360px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.16s ease;
}
.confirm-box p {
  margin-bottom: 16px;
  font-size: 15px;
}
.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* 认证页 */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 30px 26px;
  border-top: 3px solid var(--primary);
}
.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--primary-deep);
}
.auth-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 22px;
}
.auth-alt {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 16px;
}

/* 首页 */
.hero {
  text-align: center;
  padding: 56px 0 32px;
}
.hero h1 {
  font-size: clamp(26px, 4vw, 36px);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.hero .hero-sub {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 460px;
  margin: 0 auto;
}
.entry-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding-bottom: 48px;
}
@media (min-width: 720px) {
  .entry-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.entry-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 28px 24px;
  color: var(--text);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.entry-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.entry-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(19, 32, 51, 0.08);
}
.entry-icon.runner {
  background: linear-gradient(135deg, var(--primary-soft), #a7f3d0);
}
.entry-icon.client {
  background: linear-gradient(135deg, var(--info-soft), #c7d2fe);
}
.entry-icon.admin {
  background: linear-gradient(135deg, var(--accent-soft), #fde68a);
}
.entry-card h2 {
  font-size: 19px;
  margin-bottom: 6px;
}
.entry-card p {
  color: var(--text-muted);
  font-size: 14px;
}

/* 区段标题 */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0 12px;
}
.section-head h2 {
  font-size: 18px;
}

/* 修改订单状态提示条：编辑已有订单时的醒目说明，消除「退出修改」按钮的歧义 */
.edit-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-mist), #ffffff);
  box-shadow: var(--shadow-sm);
  animation: edit-banner-in 0.25s ease both;
}
@keyframes edit-banner-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.edit-banner-icon {
  flex: none;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  box-shadow: 0 4px 10px rgba(15, 118, 110, 0.25);
}
.edit-banner-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.edit-banner-text strong {
  font-size: 14px;
  color: var(--primary-strong);
}
.edit-banner-text small {
  font-size: 12px;
  color: var(--text-muted);
}
.edit-banner-btn {
  flex: none;
}
@media (max-width: 480px) {
  .edit-banner {
    flex-wrap: wrap;
  }
  .edit-banner-btn {
    width: 100%;
  }
}

/* 设置卡片（注册开关） */
.setting-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  background: linear-gradient(120deg, var(--surface), var(--primary-mist));
}
.setting-card.setting-stack {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 6px 16px;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
}
.setting-row + .setting-row {
  border-top: 1px dashed var(--border);
}
.setting-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
/* 输入框 + 按钮组合（随机生成等） */
.input-group {
  display: flex;
  gap: 8px;
}
.input-group .input {
  flex: 1;
  min-width: 0;
}
.input-group .btn {
  flex: none;
  white-space: nowrap;
}

/* 客户端多驿站选择 */
.station-pick-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.station-pick {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.station-pick-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
}
.station-pick-head input {
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--primary);
}
.station-pick-head:has(input:checked) {
  background: var(--primary-mist);
}
.station-pick-head .station-name {
  font-weight: 600;
  color: var(--text-strong);
}
.station-pick-head .station-addr {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.station-pick-detail {
  padding: 10px 12px 12px;
  border-top: 1px dashed var(--border);
}
.station-pick-detail .cabinet-field {
  margin-bottom: 0;
}
.code-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.code-row .input {
  flex: 1;
  min-width: 0;
}
.code-row .code-remove {
  flex: none;
  align-self: center;
}
.station-pick-detail .add-code-btn {
  margin-top: 8px;
}
.switch {
  flex: none;
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #e2e8f0;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(19, 32, 51, 0.25);
  transition: transform 0.2s ease;
}
.switch.on {
  background: var(--success);
  border-color: var(--success);
}
.switch.on .switch-knob {
  transform: translateX(20px);
}
.switch.loading {
  opacity: 0.55;
  cursor: wait;
}

/* 统计条 */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-card .num {
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
  line-height: 1.2;
}
.stat-card .label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 联系信息 */
.contact-line {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.contact-line a {
  font-weight: 600;
}

/* 加载态 */
.loading-line {
  text-align: center;
  color: var(--text-muted);
  padding: 30px;
  font-size: 14px;
}
.loading-line::after {
  content: "…";
}

/* 页面进入动画（仅 transform/opacity） */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.rise {
  animation: rise-in 0.3s ease both;
}

/* 动效减弱 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== 安装向导 ===== */
.install-card {
  max-width: 560px;
}
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.check-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
}
.check-item:last-child {
  border-bottom: none;
}
.check-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  margin-top: 2px;
}
.check-icon.pass {
  background: var(--success);
}
.check-icon.fail {
  background: var(--danger);
}
.check-name {
  display: block;
  font-weight: 600;
}
.check-detail {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
}
.install-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}
.install-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.install-actions .btn {
  flex: 1;
}

/* ===== v1.6.0 客户端：会员标签 / 菜单式驿站编辑 / 预估价格 / 订单明细 ===== */
.vip-tag {
  background: linear-gradient(135deg, #f6d365, #fda085);
  color: #7a4a00;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
}
.station-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.station-count {
  flex: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 2px 10px;
}
/* 添加驿站：整行虚线卡片，多驿站场景更醒目、无需回顶部操作 */
.add-station-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin-top: 12px;
  padding: 14px 16px;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.add-station-tile:hover {
  border-color: var(--primary);
  background: var(--primary-mist);
  box-shadow: var(--shadow-sm);
}
.add-station-tile:active {
  transform: scale(0.99);
}
.add-station-tile:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}
.add-station-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 20px;
  line-height: 1;
  transition: transform 0.25s ease, background 0.2s ease, color 0.2s ease;
}
.add-station-tile:hover .add-station-icon {
  transform: rotate(90deg);
  background: var(--primary);
  color: #fff;
}
.add-station-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  text-align: left;
}
.add-station-text strong {
  font-size: 15px;
  color: var(--primary-strong);
}
.add-station-text small {
  font-size: 12px;
  color: var(--text-muted);
}
.station-editor-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.station-editor {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.station-editor-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface-alt, #f8fafc);
  border-bottom: 1px dashed var(--border);
}
.station-editor-head .station-select {
  flex: 1;
  min-width: 0;
  font-weight: 600;
}
.station-editor-sum {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}
.station-editor-body {
  padding: 12px;
}
.station-editor-body .cabinet-field {
  margin-bottom: 10px;
}
.station-editor-foot {
  margin-top: 8px;
}
.item-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.item-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.item-row .content-input {
  flex: 2 1 200px;
  min-width: 0;
}
.item-row .tier-select {
  flex: 1 1 130px;
  min-width: 0;
}
.item-row .remark-input {
  flex: 1 1 130px;
  min-width: 0;
}
.count-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
}
.count-wrap .count-input {
  width: 64px;
  text-align: center;
}
.count-unit {
  font-size: 13px;
  color: var(--text-muted);
}
.focus-ring:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

/* 预估价格条 */
.price-preview {
  border: 1px solid var(--primary-soft, #c7d2fe);
  background: var(--primary-mist, #eef2ff);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 4px 0 14px;
}
.price-preview-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.price-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-strong);
}
.price-vip-flag {
  font-size: 11px;
  font-weight: 700;
  color: #7a4a00;
  background: linear-gradient(135deg, #f6d365, #fda085);
  padding: 1px 8px;
  border-radius: 999px;
}
.price-preview-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
}
.price-original {
  color: var(--text-muted);
  text-decoration: line-through;
}
.price-final {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-strong, var(--primary));
}
.price-discount {
  color: var(--success, #16a34a);
  font-weight: 700;
}
.price-note {
  margin: 6px 0 0;
  font-size: 12px;
  color: #b45309;
}
.price-strong {
  color: var(--primary-strong, var(--primary));
}
.price-note-inline {
  color: #b45309;
  font-size: 13px;
}
.price-vip {
  color: #b45309;
  font-size: 12px;
}

/* 价格参考表 */
.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.price-table th,
.price-table td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.price-table th {
  background: var(--surface-alt, #f8fafc);
  font-weight: 700;
}

/* 订单明细行 / 价格行 */
.order-items-block {
  margin: 10px 0 4px;
  border-top: 1px dashed var(--border);
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.order-item-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}
.order-item-line .item-station {
  font-weight: 700;
  color: var(--primary-strong, var(--primary));
  flex: none;
}
.order-item-line .item-content {
  word-break: break-all;
}
.order-item-line .item-count {
  color: var(--text-muted);
  flex: none;
}
.order-item-line .item-price {
  margin-left: auto;
  font-weight: 700;
  flex: none;
}
.badge-tier {
  background: var(--primary-soft, #c7d2fe);
  color: var(--primary-strong, var(--primary));
  flex: none;
}
.order-price-line {
  margin: 6px 0 2px;
  font-size: 14px;
  color: var(--text-strong);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: baseline;
}
.order-desc {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* ===== v1.6.0 管理端：会员徽章 / 折扣规则编辑器 ===== */
.vip-badge {
  background: linear-gradient(135deg, #f6d365, #fda085);
  color: #7a4a00;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.discount-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 260px;
  transition: opacity 0.15s ease;
}
/* 件数阶梯折扣关闭时：编辑器置灰不可编辑 */
.discount-editor.disabled {
  opacity: 0.45;
  pointer-events: none;
}
.discount-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.discount-label {
  font-size: 13px;
  color: var(--text-muted);
  flex: none;
}
.discount-row .discount-min {
  width: 72px;
  text-align: center;
}
.discount-row .discount-rate {
  width: 96px;
  flex: none;
}
.discount-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
#tierModal .modal {
  max-width: 560px;
}

/* ===== v1.8.0 多会员类型 / 代拿端内联档位 / 弹窗美化 ===== */
.text-faint {
  color: var(--text-faint);
}

/* 会员类型卡片（管理端价格设置） */
.member-type-list {
  flex: 1 1 auto;
  min-width: 260px;
  max-width: 680px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.mt-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.mt-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.mt-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 14px;
}
.mt-card-head strong {
  font-size: 14px;
  color: var(--primary-deep);
}
.mt-desc {
  color: var(--text-muted);
  font-size: 12px;
  margin: 6px 0 0;
  line-height: 1.5;
}
.mt-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.mt-hide-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.mt-hide-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

/* 档位弹窗：各会员类型价格输入行 */
.mt-price-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.mt-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mt-price-name {
  flex: none;
  min-width: 96px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.mt-price-row .input {
  flex: 1;
  min-width: 0;
}
.mt-price-unit {
  flex: none;
  font-size: 12px;
  color: var(--text-muted);
}

/* 代拿端：订单卡内联档位下拉（替代弹窗） */
.tier-inline {
  width: auto;
  flex: none;
  min-width: 110px;
  max-width: 200px;
  padding: 3px 26px 3px 9px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  border-color: rgba(15, 118, 110, 0.35);
  background-color: var(--primary-mist);
  color: var(--primary-strong);
  cursor: pointer;
}
.tier-inline:hover {
  border-color: var(--primary);
}
.tier-inline:focus {
  outline: none;
  box-shadow: var(--ring);
}
.tier-inline:disabled {
  opacity: 0.55;
  cursor: wait;
}
.order-item-line .tier-inline {
  margin-left: 2px;
}

/* 弹窗美化：顶部渐变饰线 / 标题分隔 / 遮罩淡入 / 关闭按钮更柔和 */
.modal-backdrop {
  animation: backdrop-in 0.18s ease;
}
@keyframes backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal {
  position: relative;
  border-top: none;
  overflow: hidden;
}
.modal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, #2dd4bf 55%, rgba(45, 212, 191, 0) 100%);
}
.modal-title {
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}
.modal-title span:first-child {
  color: var(--primary-deep);
  letter-spacing: 0.01em;
}
.modal-close {
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.modal-close:hover {
  background: var(--danger-soft);
  color: var(--danger);
  transform: rotate(90deg);
}
.confirm-backdrop {
  animation: backdrop-in 0.16s ease;
}
