/* ===== 设计令牌 ===== */
:root {
  --primary: #0e8f83;
  --primary-dark: #0a6f66;
  --accent: #f1664f;
  --sidebar: #12343a;
  --sidebar-active: #1a5560;
  --bg: #f5f7fa;
  --card: #ffffff;
  --border: #e4e8eb;
  --text: #1f2d3d;
  --text-secondary: #6b7a8a;
  --text-inverse: #ffffff;
  --success: #52c41a;
  --warning: #faad14;
  --danger: #f5222d;
  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

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

/* ===== 页面壳 ===== */
.page-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* ===== 卡片表单(登录/忘记密码/C端兑换)===== */
.form-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 32px;
  width: 100%;
  max-width: 400px;
}

.form-card.wide { max-width: 640px; }

.form-heading { margin-bottom: 24px; text-align: center; }
.form-heading h1 { font-size: 22px; color: var(--text); margin: 8px 0 4px; }
.form-heading .eyebrow {
  font-size: 12px; color: var(--primary); text-transform: uppercase;
  letter-spacing: 1px; font-weight: 600;
}
.form-heading .summary { font-size: 13px; color: var(--text-secondary); }

/* ===== 表单控件 ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 13px; color: var(--text);
  margin-bottom: 6px; font-weight: 500;
}
.form-control {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 14px; color: var(--text);
  background: var(--card); transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 143, 131, 0.12);
}
.form-control::placeholder { color: #b0b8c0; }

.form-row { display: flex; gap: 12px; }
.form-row > * { flex: 1; }

/* 验证码输入组 */
.captcha-group { display: flex; gap: 8px; align-items: center; }
.captcha-group .form-control { flex: 1; }
.captcha-canvas {
  width: 100px; height: 40px; border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer; background: #fafafa;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 18px; border: none; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s;
  white-space: nowrap; user-select: none;
}
.btn-primary { background: var(--primary); color: var(--text-inverse); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: var(--text-inverse); }
.btn-accent:hover { background: #d9503a; }
.btn-default { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.btn-default:hover { background: #f0f2f5; }
.btn-danger { background: var(--danger); color: var(--text-inverse); }
.btn-danger:hover { background: #d32029; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Toast 提示(320px 居中)===== */
.toast-container {
  position: fixed; top: 32px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  max-width: 320px; min-width: 240px; padding: 12px 16px;
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  font-size: 13px; color: var(--text-inverse); pointer-events: auto;
  animation: toastIn 0.25s ease;
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--primary); }
.toast-warning { background: var(--warning); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 管理后台布局 ===== */
.admin-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 200px; background: var(--sidebar); color: var(--text-inverse);
  display: flex; flex-direction: column; flex-shrink: 0;
}
.sidebar-header {
  padding: 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-header h1 { font-size: 16px; font-weight: 600; }
.sidebar-header p { font-size: 11px; opacity: 0.6; margin-top: 2px; }
.sidebar-nav { flex: 1; padding: 8px 0; overflow-y: auto; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px; color: rgba(255,255,255,0.7); font-size: 13px;
  border-left: 3px solid transparent; transition: all 0.2s;
}
.sidebar-nav a:hover { background: rgba(255,255,255,0.05); color: var(--text-inverse); }
.sidebar-nav a.active {
  background: var(--sidebar-active); color: var(--text-inverse);
  border-left-color: var(--accent);
}
.sidebar-nav .icon { font-size: 16px; width: 20px; text-align: center; }
.sidebar-footer {
  padding: 12px 18px; border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
}
.sidebar-footer .user-info { opacity: 0.7; margin-bottom: 8px; }
.sidebar-footer .btn { width: 100%; padding: 6px; font-size: 12px; }

.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: 56px; background: var(--card); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; box-shadow: var(--shadow-sm);
}
.topbar h2 { font-size: 16px; font-weight: 500; }
.content-body { flex: 1; padding: 20px 24px; overflow-y: auto; }

/* ===== 数据表格 ===== */
.toolbar {
  display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
  align-items: center;
}
.toolbar .form-control { width: auto; min-width: 140px; }
.toolbar .spacer { flex: 1; }

.batch-bar {
  display: flex; gap: 8px; margin-bottom: 12px; padding: 10px 14px;
  background: #f5f7fa; border: 1px solid var(--border); border-radius: var(--radius);
  align-items: center; flex-wrap: wrap;
}
.batch-bar #batch-count {
  font-size: 13px; color: var(--text-secondary); margin-right: 8px;
  min-width: 80px;
}
.batch-bar button:disabled { opacity: 0.5; cursor: not-allowed; }
.data-table th input[type="checkbox"],
.data-table td input[type="checkbox"] {
  width: 16px; height: 16px; cursor: pointer; vertical-align: middle;
}

.data-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  background: #fafbfc; padding: 11px 12px; text-align: left;
  font-weight: 600; color: var(--text-secondary); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text);
}
.data-table tr:hover td { background: #fafbfc; }
.data-table .actions { display: flex; gap: 6px; flex-wrap: nowrap; }

/* 状态标签 */
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 500; line-height: 1.4;
}
.tag-success { background: #e6f7ec; color: var(--success); }
.tag-warning { background: #fff7e0; color: var(--warning); }
.tag-danger { background: #ffe8e8; color: var(--danger); }
.tag-info { background: #e6f4f1; color: var(--primary); }
.tag-default { background: #f0f2f5; color: var(--text-secondary); }

/* 分页 */
.pagination {
  display: flex; gap: 6px; align-items: center; justify-content: flex-end;
  padding: 12px; border-top: 1px solid var(--border);
}
.pagination .info { margin-right: auto; color: var(--text-secondary); font-size: 12px; }
.pagination .btn { padding: 4px 10px; font-size: 12px; }

/* ===== 仪表盘 ===== */
.dashboard-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.stat-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 20px;
}
.stat-card .label { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.stat-card .value { font-size: 28px; font-weight: 600; color: var(--text); }
.stat-card .icon { float: right; font-size: 24px; opacity: 0.3; }

/* ===== 弹窗 dialog ===== */
dialog {
  border: none; border-radius: var(--radius); padding: 0;
  box-shadow: var(--shadow-lg); max-width: 480px; width: 90%;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  max-height: 90vh;
  overflow-y: auto;
}
dialog::backdrop { background: rgba(0,0,0,0.4); }
dialog.modal-wide { max-width: 760px; }
.dialog-content { padding: 20px 24px; }
.dialog-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px; border-bottom: 1px solid var(--border);
}
.dialog-header h3 { font-size: 15px; font-weight: 600; }
.dialog-close {
  background: none; border: none; font-size: 20px; cursor: pointer;
  color: var(--text-secondary); line-height: 1;
}
.dialog-footer {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 12px 24px 16px; border-top: 1px solid var(--border);
}
dialog .form-group { margin-bottom: 12px; }
dialog .form-row { gap: 8px; }

/* ===== 商品池维护 ===== */
.pool-section { margin-bottom: 12px; }
.pool-section-title { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
.pool-list {
  max-height: 200px; overflow-y: auto; border: 1px solid var(--border);
  border-radius: 6px; padding: 8px;
}
.pool-item { display: flex; align-items: center; gap: 6px; padding: 4px 2px; cursor: pointer; }
.pool-item:hover { background: #fafbfc; }
.pool-sel-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 4px;
  border-bottom: 1px solid var(--border);
}
.pool-sel-item:last-child { border-bottom: none; }
.pool-sel-idx { width: 18px; text-align: center; color: var(--text-secondary); font-size: 12px; flex-shrink: 0; }
.pool-sel-name { flex: 1; font-size: 13px; }
.pool-sel-btns { display: flex; gap: 4px; flex-shrink: 0; }
.pool-sel-btns .btn-sm { padding: 2px 8px; font-size: 11px; line-height: 1.4; }

/* ===== C端兑换步骤 ===== */
.steps-indicator {
  display: flex; justify-content: center; gap: 8px; margin-bottom: 24px;
}
.step-dot {
  width: 28px; height: 28px; border-radius: 50%; background: var(--border);
  color: var(--text-secondary); display: flex; align-items: center;
  justify-content: center; font-size: 13px; font-weight: 600;
}
.step-dot.active { background: var(--primary); color: var(--text-inverse); }
.step-dot.done { background: var(--success); color: var(--text-inverse); }
.step-line { width: 40px; height: 2px; background: var(--border); align-self: center; }
.step-line.done { background: var(--success); }

/* 商品网格(C端选品) */
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px; margin: 16px 0;
}
.product-card {
  border: 2px solid var(--border); border-radius: var(--radius);
  padding: 12px; cursor: pointer; transition: all 0.2s; background: var(--card);
  position: relative;
}
.product-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.product-card.selected {
  border-color: var(--primary); background: #e6f4f1;
  box-shadow: 0 0 0 2px rgba(14,143,131,0.2);
}
.product-card.disabled { opacity: 0.4; cursor: not-allowed; }
.product-card img {
  width: 100%; height: 100px; object-fit: cover; border-radius: 4px;
  margin-bottom: 8px; background: #f0f2f5;
}
.product-card .name { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.product-card .spec { font-size: 11px; color: var(--text-secondary); }
.product-card .stock { font-size: 11px; color: var(--success); margin-top: 4px; }
.product-card .check {
  position: absolute; top: 8px; right: 8px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--primary); color: white;
  display: none; align-items: center; justify-content: center; font-size: 12px;
}
.product-card.selected .check { display: flex; }

/* 商品详情按钮 */
.product-detail-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 4px 0;
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.product-detail-btn:hover {
  background: var(--primary);
  color: #fff;
}

/* C端商品详情弹窗 */
#product-detail-modal { max-width: 520px; }
.pd-body { padding: 20px 24px; }
.pd-header {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.pd-image {
  width: 100px; height: 100px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--bg);
}
.pd-info { flex: 1; min-width: 0; }
.pd-name { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.pd-spec { font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.pd-stock { font-size: 12px; color: var(--success); }
.pd-section { margin-bottom: 16px; }
.pd-section:last-child { margin-bottom: 0; }
.pd-section-title {
  font-size: 13px; font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
  padding-left: 8px;
  border-left: 3px solid var(--primary);
}
.pd-section-body {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  word-break: break-word;
}

/* 省市区联动下拉框 */
.region-selects {
  display: flex;
  gap: 8px;
}
.region-selects select {
  flex: 1;
  min-width: 0;
}

.logistics-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* 订单确认弹窗 */
.confirm-section { margin-bottom: 16px; }
.confirm-section:last-child { margin-bottom: 0; }
.confirm-items { display: flex; flex-direction: column; gap: 6px; }
.confirm-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; background: var(--bg); border-radius: 6px;
}
.confirm-item-name { font-size: 13px; font-weight: 500; }
.confirm-item-spec { font-size: 12px; color: var(--text-secondary); }
.confirm-row {
  display: flex; gap: 8px; padding: 6px 0;
  font-size: 13px; line-height: 1.6;
}
.confirm-label {
  flex-shrink: 0; width: 60px; color: var(--text-secondary);
}
.confirm-value { flex: 1; word-break: break-word; }

.select-counter {
  text-align: center; padding: 10px; background: #e6f4f1; border-radius: var(--radius);
  margin-bottom: 12px; font-size: 13px; color: var(--primary-dark);
}

/* 已选清单 */
.order-summary {
  background: #fafbfc; border-radius: var(--radius); padding: 12px;
  margin: 12px 0; font-size: 13px;
}
.order-summary .item {
  display: flex; justify-content: space-between; padding: 4px 0;
  border-bottom: 1px dashed var(--border);
}
.order-summary .item:last-child { border-bottom: none; }

/* 物流轨迹 */
.trace-box {
  background: #fafbfc; border-radius: var(--radius); padding: 12px;
  font-size: 12px; white-space: pre-wrap; max-height: 200px; overflow-y: auto;
  border-left: 3px solid var(--primary);
}

/* 工具类 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.hidden { display: none; }

/* 弹窗表单双列布局 */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.table-address {
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-items-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.manual-order-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.manual-order-result {
  min-height: 24px;
  padding: 8px 0;
  font-size: 13px;
}

.manual-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  padding: 2px;
}

.manual-product-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 112px;
  padding: 10px;
  text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.manual-product-card:hover,
.manual-product-card.selected {
  border-color: var(--primary);
  background: #e6f4f1;
  box-shadow: 0 0 0 2px rgba(14,143,131,0.15);
}

.manual-product-card img {
  width: 100%;
  height: 82px;
  object-fit: cover;
  border-radius: 6px;
  background: #f0f2f5;
}

.manual-product-name {
  font-size: 13px;
  font-weight: 600;
}

.manual-product-spec,
.manual-product-stock {
  color: var(--text-secondary);
  font-size: 12px;
}

.manual-product-stock {
  color: var(--success);
}

.order-item-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 96px auto;
  gap: 8px;
  align-items: center;
}

.product-search-box {
  position: relative;
  min-width: 0;
}

.product-search-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-md);
}

.product-search-option {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
}

.product-search-option:hover,
.product-search-option:focus {
  background: #f2fbf9;
}

.product-search-option span,
.product-search-option small {
  display: block;
}

.product-search-option small,
.product-search-empty {
  color: var(--text-secondary);
  font-size: 12px;
}

.product-search-empty {
  padding: 10px 12px;
}

.shipment-lines-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shipment-line-row {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.batch-ship-order {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 12px;
  background: #fafbfc;
}

.batch-ship-title {
  font-weight: 700;
  margin-bottom: 8px;
}

/* 商品编辑图片上传 */
.product-image-editor {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: stretch;
}
.product-image-preview-wrap {
  width: 120px;
  height: 120px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fafbfc;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-image-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-image-empty {
  color: var(--text-secondary);
  font-size: 12px;
}
.product-image-tools {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.product-image-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 560px) {
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .order-item-row {
    grid-template-columns: 1fr;
  }

  .shipment-line-row {
    grid-template-columns: 1fr;
  }

  .product-image-editor {
    grid-template-columns: 1fr;
  }
  .product-image-preview-wrap {
    width: 100%;
    height: 160px;
  }
}

/* ===== macOS-style visual refresh ===== */
:root {
  --primary: #007aff;
  --primary-dark: #005ecb;
  --accent: #ff9500;
  --sidebar: rgba(242, 242, 247, 0.86);
  --sidebar-active: rgba(0, 122, 255, 0.12);
  --bg: #f5f5f7;
  --card: rgba(255, 255, 255, 0.88);
  --border: rgba(60, 60, 67, 0.16);
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-inverse: #ffffff;
  --success: #34c759;
  --warning: #ff9f0a;
  --danger: #ff3b30;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.05), 0 18px 48px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12), 0 36px 80px rgba(0, 0, 0, 0.14);
  --mac-surface: rgba(255, 255, 255, 0.74);
  --mac-surface-strong: rgba(255, 255, 255, 0.94);
  --mac-control: rgba(255, 255, 255, 0.72);
  --mac-control-hover: rgba(255, 255, 255, 0.92);
  --mac-line: rgba(60, 60, 67, 0.12);
  --mac-blue-soft: rgba(0, 122, 255, 0.10);
}

html {
  background: #f5f5f7;
}

body {
  background:
    radial-gradient(circle at 18% 8%, rgba(0, 122, 255, 0.10), transparent 30%),
    radial-gradient(circle at 88% 4%, rgba(52, 199, 89, 0.08), transparent 24%),
    linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 46%, #eeeeef 100%);
  color: var(--text);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body::selection {
  background: rgba(0, 122, 255, 0.22);
}

@supports ((backdrop-filter: blur(22px)) or (-webkit-backdrop-filter: blur(22px))) {
  .form-card,
  .data-card,
  .stat-card,
  .batch-bar,
  .topbar,
  .sidebar,
  dialog,
  .product-card,
  .manual-order-panel,
  .manual-product-card,
  .order-summary,
  .trace-box,
  .logistics-panel,
  .manual-order-result {
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    backdrop-filter: blur(22px) saturate(180%);
  }
}

.page-shell {
  align-items: flex-start;
  padding: 44px 18px;
}

.form-card {
  background: var(--mac-surface);
  border: 1px solid var(--mac-line);
  box-shadow: var(--shadow-md);
}

.form-card.wide {
  max-width: 920px;
}

.form-heading h1,
.topbar h2,
.dialog-header h3 {
  color: var(--text);
  font-weight: 700;
}

.form-heading h1 {
  font-size: 28px;
}

.form-heading .eyebrow {
  color: var(--primary);
  letter-spacing: 0;
}

.form-heading .summary {
  color: var(--text-secondary);
}

.form-group label {
  color: #303036;
  font-weight: 600;
}

.form-control,
select.form-control,
textarea.form-control,
input[type="date"].form-control {
  background: var(--mac-control);
  border: 1px solid var(--mac-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  color: var(--text);
}

.form-control:hover,
select.form-control:hover,
textarea.form-control:hover,
input[type="date"].form-control:hover {
  background: var(--mac-control-hover);
  border-color: rgba(60, 60, 67, 0.22);
}

.form-control:focus,
select.form-control:focus,
textarea.form-control:focus,
input[type="date"].form-control:focus {
  border-color: rgba(0, 122, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.14);
}

.form-control::placeholder {
  color: #9ca3af;
}

.captcha-canvas,
.product-image-preview-wrap {
  background: rgba(255, 255, 255, 0.62);
  border-color: var(--mac-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.btn {
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  font-weight: 600;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.btn:active {
  transform: translateY(0);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.10);
}

.btn-primary {
  background: linear-gradient(180deg, #1687ff 0%, #007aff 100%);
  color: #ffffff;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #2f95ff 0%, #006ee6 100%);
}

.btn-accent {
  background: linear-gradient(180deg, #ffac30 0%, #ff9500 100%);
  color: #ffffff;
}

.btn-accent:hover {
  background: linear-gradient(180deg, #ffb84d 0%, #eb8700 100%);
}

.btn-default {
  background: rgba(255, 255, 255, 0.78);
  border-color: var(--mac-line);
  color: var(--text);
}

.btn-default:hover {
  background: #ffffff;
  border-color: rgba(60, 60, 67, 0.22);
}

.btn-danger {
  background: linear-gradient(180deg, #ff5a52 0%, #ff3b30 100%);
  color: #ffffff;
}

.btn-danger:hover {
  background: linear-gradient(180deg, #ff6b64 0%, #e7352b 100%);
}

.btn:disabled,
.btn[disabled] {
  transform: none;
  box-shadow: none;
}

.admin-layout {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(245, 245, 247, 0.80)),
    #f5f5f7;
}

.sidebar {
  color: var(--text);
  border-right: 1px solid var(--mac-line);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.52) inset;
}

.sidebar-header {
  position: relative;
  padding: 42px 18px 18px;
  border-bottom: 1px solid var(--mac-line);
}

.sidebar-header::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 20px 0 #ffbd2e, 40px 0 #28c840;
}

.sidebar-header h1 {
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
}

.sidebar-header p,
.sidebar-footer .user-info {
  color: var(--text-secondary);
  opacity: 1;
}

.sidebar-nav {
  padding: 10px 8px;
}

.sidebar-nav a {
  border-left: 0;
  border-radius: 8px;
  color: #3a3a3c;
  margin: 2px 0;
  padding: 10px 12px;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.sidebar-nav a.active {
  background: var(--sidebar-active);
  border-left-color: transparent;
  color: var(--primary);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(0, 122, 255, 0.10);
}

.sidebar-footer {
  border-top: 1px solid var(--mac-line);
}

.main-content {
  background: transparent;
}

.topbar {
  height: 60px;
  background: rgba(255, 255, 255, 0.70);
  border-bottom: 1px solid var(--mac-line);
  box-shadow: none;
}

.content-body {
  background: transparent;
  padding: 24px;
}

.toolbar,
.form-row,
.product-image-actions,
.data-table .actions {
  align-items: center;
}

.batch-bar,
.data-card,
.stat-card,
.manual-order-panel,
.manual-order-result,
.order-summary,
.trace-box,
.logistics-panel {
  background: var(--mac-surface);
  border: 1px solid var(--mac-line);
  box-shadow: var(--shadow-sm);
}

.batch-bar {
  padding: 12px 14px;
}

.data-card {
  overflow: hidden;
}

.data-table {
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th {
  background: rgba(247, 247, 249, 0.92);
  color: #54545a;
  font-weight: 700;
  border-bottom: 1px solid var(--mac-line);
}

.data-table td {
  border-bottom: 1px solid var(--mac-line);
}

.data-table tr:hover td {
  background: rgba(0, 122, 255, 0.045);
}

.pagination {
  border-top-color: var(--mac-line);
  background: rgba(255, 255, 255, 0.54);
}

.stat-card .label {
  color: var(--text-secondary);
  font-weight: 600;
}

.stat-card .value {
  color: var(--text);
  font-weight: 700;
}

.tag {
  border-radius: 8px;
  font-weight: 700;
}

.tag-success {
  background: rgba(52, 199, 89, 0.14);
  color: #1f8f3a;
}

.tag-warning {
  background: rgba(255, 159, 10, 0.15);
  color: #b86600;
}

.tag-danger {
  background: rgba(255, 59, 48, 0.13);
  color: #c12a22;
}

.tag-info {
  background: rgba(0, 122, 255, 0.13);
  color: #005ecb;
}

.tag-default {
  background: rgba(142, 142, 147, 0.14);
  color: #5f6368;
}

dialog {
  background: var(--mac-surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-lg);
}

dialog::backdrop {
  background: rgba(28, 28, 30, 0.34);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.dialog-header,
.dialog-footer {
  border-color: var(--mac-line);
}

.dialog-close {
  background: rgba(142, 142, 147, 0.14);
  border: 1px solid transparent;
  border-radius: 8px;
  color: #4a4a4f;
}

.dialog-close:hover {
  background: rgba(142, 142, 147, 0.22);
  color: var(--text);
}

.product-grid,
.manual-product-grid {
  gap: 14px;
}

.product-card,
.manual-product-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--mac-line);
  box-shadow: var(--shadow-sm);
}

.product-card:hover,
.manual-product-card:hover {
  border-color: rgba(0, 122, 255, 0.48);
  box-shadow: 0 12px 28px rgba(0, 122, 255, 0.10);
}

.product-card.selected,
.manual-product-card.selected {
  background: rgba(0, 122, 255, 0.08);
  border-color: rgba(0, 122, 255, 0.64);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12), var(--shadow-sm);
}

.product-card img,
.manual-product-card img {
  background: rgba(247, 247, 249, 0.88);
  border-color: var(--mac-line);
}

.product-card .name,
.manual-product-card .name {
  color: var(--text);
  font-weight: 700;
}

.product-card .spec,
.manual-product-card .spec {
  color: var(--text-secondary);
}

.product-card .stock,
.manual-product-card .stock {
  color: #1f8f3a;
  font-weight: 700;
}

.product-card .check {
  background: var(--primary);
}

.step-dot {
  background: rgba(142, 142, 147, 0.18);
  color: var(--text-secondary);
}

.step-dot.active {
  background: var(--primary);
  color: #ffffff;
}

.step-line {
  background: rgba(142, 142, 147, 0.18);
}

.step-line.active {
  background: var(--primary);
}

.logistics-query-btn,
#show-logistics-btn {
  background: linear-gradient(180deg, #ff5a52 0%, #ff3b30 100%);
  color: #ffffff;
}

.logistics-query-btn:hover,
#show-logistics-btn:hover {
  background: linear-gradient(180deg, #ff6b64 0%, #e7352b 100%);
}

.toast {
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: var(--shadow-lg);
}

.toast-success {
  background: rgba(52, 199, 89, 0.94);
}

.toast-error {
  background: rgba(255, 59, 48, 0.94);
}

.toast-info {
  background: rgba(0, 122, 255, 0.94);
}

.toast-warning {
  background: rgba(255, 159, 10, 0.96);
}

@media (max-width: 768px) {
  .page-shell {
    padding: 20px 12px;
  }

  .form-card {
    padding: 22px 16px;
  }

  .form-heading h1 {
    font-size: 24px;
  }

  .content-body {
    padding: 16px;
  }
}

/* ===== 公告管理与前台公告弹窗 ===== */
.announcement-preview {
  max-width: 420px;
  color: var(--text-secondary);
  white-space: normal;
}

.announcement-editor {
  min-height: 180px;
  resize: vertical;
}

.announcement-modal {
  max-width: 520px;
  width: min(92vw, 520px);
}

.announcement-body {
  padding: 22px 24px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.8;
  max-height: min(60vh, 520px);
  overflow-y: auto;
  white-space: normal;
}

.announcement-body:empty::before {
  content: "暂无公告内容";
  color: var(--text-secondary);
}

/* ===== 全站字体统一: 微软雅黑 ===== */
html,
body,
input,
select,
textarea,
dialog,
table {
  font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif !important;
}

*,
*::before,
*::after {
  font-family: inherit;
}

/* 按钮文字恢复为系统 UI 字体，避免按钮字形过重 */
button,
.btn,
.btn * {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif !important;
}

/* ===== 英国国旗红蓝 UI 主题 ===== */
:root {
  --primary: #012169;
  --primary-dark: #00164a;
  --accent: #c8102e;
  --danger: #c8102e;
  --success: #247a3d;
  --warning: #b56b00;
  --bg: #f5f7fb;
  --card: rgba(255, 255, 255, 0.92);
  --border: rgba(1, 33, 105, 0.14);
  --text: #171a22;
  --text-secondary: #687084;
  --sidebar: rgba(255, 255, 255, 0.92);
  --sidebar-active: rgba(1, 33, 105, 0.10);
  --uk-blue-soft: rgba(1, 33, 105, 0.08);
  --uk-blue-line: rgba(1, 33, 105, 0.22);
  --uk-red-soft: rgba(200, 16, 46, 0.09);
  --uk-red-line: rgba(200, 16, 46, 0.28);
  --shadow-sm: 0 1px 2px rgba(1, 33, 105, 0.04), 0 10px 28px rgba(1, 33, 105, 0.06);
  --shadow-md: 0 2px 8px rgba(1, 33, 105, 0.06), 0 20px 52px rgba(1, 33, 105, 0.10);
  --shadow-lg: 0 12px 34px rgba(1, 33, 105, 0.14), 0 36px 80px rgba(23, 26, 34, 0.14);
}

body {
  background:
    linear-gradient(180deg, #fbfcff 0%, #f5f7fb 48%, #eef2f8 100%);
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 9999;
  pointer-events: none;
  background: linear-gradient(90deg, #012169 0 42%, #ffffff 42% 50%, #c8102e 50% 100%);
}

a {
  color: var(--primary);
}

a:hover {
  color: var(--accent);
}

.form-card,
.data-card,
.stat-card,
.batch-bar,
.manual-order-panel,
.manual-order-result,
.order-summary,
.trace-box,
.logistics-panel,
dialog {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.form-card,
.data-card,
.manual-order-panel,
dialog {
  background: rgba(255, 255, 255, 0.94);
}

.form-card {
  position: relative;
  overflow: hidden;
}

.form-card::before,
.data-card::before,
.manual-order-panel::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #012169 0 58%, #c8102e 58% 100%);
}

.form-card::before {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.form-heading .eyebrow,
.pd-stock,
.product-card .stock,
.manual-product-card .stock {
  color: var(--accent);
}

.form-heading h1,
.topbar h2,
.dialog-header h3 {
  color: #101526;
}

.form-control,
select.form-control,
textarea.form-control,
input[type="date"].form-control {
  border-color: rgba(1, 33, 105, 0.18);
}

.form-control:hover,
select.form-control:hover,
textarea.form-control:hover,
input[type="date"].form-control:hover {
  border-color: var(--uk-blue-line);
}

.form-control:focus,
select.form-control:focus,
textarea.form-control:focus,
input[type="date"].form-control:focus {
  border-color: #1d4fa3;
  box-shadow: 0 0 0 4px rgba(1, 33, 105, 0.12), inset 3px 0 0 rgba(200, 16, 46, 0.50);
}

.btn-primary {
  background: linear-gradient(180deg, #123b83 0%, #012169 100%);
  color: #ffffff;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #1b4a9d 0%, #001b59 100%);
}

.btn-accent,
.btn-danger,
.logistics-query-btn,
#show-logistics-btn,
#logistics-toggle-btn,
#query-logistics-btn {
  background: linear-gradient(180deg, #dc2442 0%, #c8102e 100%);
  color: #ffffff;
}

.btn-accent:hover,
.btn-danger:hover,
.logistics-query-btn:hover,
#show-logistics-btn:hover,
#logistics-toggle-btn:hover,
#query-logistics-btn:hover {
  background: linear-gradient(180deg, #ee3854 0%, #a90d27 100%);
}

.btn-default {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(1, 33, 105, 0.16);
  color: #17203a;
}

.btn-default:hover {
  background: #ffffff;
  border-color: rgba(1, 33, 105, 0.30);
  color: var(--primary);
}

.sidebar {
  background: rgba(255, 255, 255, 0.90);
  border-right-color: rgba(1, 33, 105, 0.16);
}

.sidebar-header {
  border-bottom-color: rgba(1, 33, 105, 0.12);
}

.sidebar-header::before {
  width: 54px;
  height: 5px;
  border-radius: 8px;
  background: linear-gradient(90deg, #012169 0 44%, #ffffff 44% 54%, #c8102e 54% 100%);
  box-shadow: 0 1px 0 rgba(1, 33, 105, 0.12);
}

.sidebar-header h1 {
  color: var(--primary);
}

.sidebar-nav a {
  color: #27304d;
}

.sidebar-nav a:hover {
  background: rgba(1, 33, 105, 0.06);
  color: var(--primary);
}

.sidebar-nav a.active {
  background: var(--sidebar-active);
  color: var(--primary);
  box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 1px rgba(1, 33, 105, 0.08);
}

.topbar {
  background: rgba(255, 255, 255, 0.86);
  border-bottom-color: rgba(1, 33, 105, 0.13);
}

.content-body {
  background:
    linear-gradient(180deg, rgba(1, 33, 105, 0.025), rgba(255, 255, 255, 0));
}

.stat-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #012169 0 68%, #c8102e 68% 100%);
}

.stat-card .label {
  color: #536078;
}

.stat-card .value {
  color: var(--primary);
}

.stat-card .icon {
  color: var(--accent);
  opacity: 0.25;
}

.batch-bar {
  background: rgba(1, 33, 105, 0.035);
  border-color: rgba(1, 33, 105, 0.14);
}

.data-table th {
  background: #f2f5fb;
  color: #31405f;
  border-bottom-color: rgba(1, 33, 105, 0.18);
}

.data-table tr:hover td {
  background: rgba(1, 33, 105, 0.045);
}

.pagination {
  background: rgba(248, 250, 255, 0.82);
}

.tag-success {
  background: rgba(36, 122, 61, 0.13);
  color: #1f7138;
}

.tag-warning {
  background: rgba(181, 107, 0, 0.14);
  color: #985900;
}

.tag-danger {
  background: var(--uk-red-soft);
  color: #a50e26;
}

.tag-info {
  background: var(--uk-blue-soft);
  color: var(--primary);
}

.dialog-header {
  position: relative;
  background: rgba(250, 252, 255, 0.82);
}

.dialog-header::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, rgba(1, 33, 105, 0.72), rgba(200, 16, 46, 0.72));
}

.dialog-footer {
  background: rgba(250, 252, 255, 0.82);
}

.dialog-close {
  color: var(--primary);
}

.dialog-close:hover {
  background: var(--uk-red-soft);
  color: var(--accent);
}

.product-card,
.manual-product-card {
  border-color: rgba(1, 33, 105, 0.14);
}

.product-card:hover,
.manual-product-card:hover {
  border-color: rgba(1, 33, 105, 0.48);
  box-shadow: 0 12px 28px rgba(1, 33, 105, 0.11);
}

.product-card.selected,
.manual-product-card.selected {
  background: rgba(1, 33, 105, 0.07);
  border-color: rgba(1, 33, 105, 0.66);
  box-shadow: 0 0 0 3px rgba(1, 33, 105, 0.12), inset 0 3px 0 rgba(200, 16, 46, 0.70);
}

.product-card .check {
  background: var(--accent);
}

.product-detail-btn {
  color: var(--primary);
}

.product-detail-btn:hover {
  color: var(--accent);
}

.step-dot.active {
  background: var(--primary);
}

.step-dot.done,
.step-line.done {
  background: var(--accent);
  color: #ffffff;
}

.step-line.active {
  background: var(--primary);
}

.toast-info {
  background: rgba(1, 33, 105, 0.96);
}

.toast-error {
  background: rgba(200, 16, 46, 0.96);
}

.announcement-preview {
  color: #5c667d;
}

.announcement-modal .dialog-header::after {
  background: linear-gradient(90deg, #012169 0 58%, #c8102e 58% 100%);
}

/* ===== 前台礼品卡兑换页第一阶段重构 ===== */
.front-shell {
  align-items: flex-start;
  padding: 28px 16px 40px;
}

.redeem-app {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.front-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 18px;
  padding: 10px 4px 0;
}

.front-title .eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.front-title h1 {
  margin-top: 6px;
  color: #101526;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
}

.front-title .summary {
  margin-top: 8px;
  color: #5f6b84;
  font-size: 15px;
}

.front-assurance {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  color: var(--primary);
}

.front-assurance span {
  padding: 7px 10px;
  border: 1px solid rgba(1, 33, 105, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 700;
}

.front-card {
  max-width: 1120px;
  padding: 0;
  overflow: visible;
  background: rgba(255, 255, 255, 0.96);
}

.front-card::before {
  height: 4px;
}

.front-steps {
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 20px 28px;
  border-bottom: 1px solid rgba(1, 33, 105, 0.12);
  background: rgba(248, 250, 255, 0.88);
}

.step-node {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 72px;
  color: #66708a;
  font-size: 12px;
  font-weight: 700;
}

.step-node:has(.step-dot.active),
.step-node:has(.step-dot.done) {
  color: var(--primary);
}

.front-step-panel {
  padding: 28px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.panel-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.panel-heading h2 {
  margin-top: 4px;
  color: #101526;
  font-size: 22px;
  line-height: 1.25;
}

.panel-badge {
  flex-shrink: 0;
  padding: 7px 10px;
  border: 1px solid rgba(200, 16, 46, 0.18);
  border-radius: 8px;
  background: rgba(200, 16, 46, 0.08);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.verify-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: stretch;
}

.verify-form,
.order-form-panel,
.order-selected-panel {
  border: 1px solid rgba(1, 33, 105, 0.12);
  border-radius: 8px;
  background: rgba(248, 250, 255, 0.66);
  padding: 18px;
}

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

.front-form-grid.compact {
  align-items: end;
}

.front-action-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.front-guide {
  display: grid;
  gap: 12px;
}

.guide-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 110px;
  padding: 16px;
  border: 1px solid rgba(1, 33, 105, 0.13);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(1, 33, 105, 0.055), rgba(255, 255, 255, 0.84));
}

.guide-card strong {
  color: var(--primary);
  font-size: 15px;
}

.guide-card span {
  color: #5f6b84;
  line-height: 1.7;
}

.logistics-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(200, 16, 46, 0.18);
  border-radius: 8px;
  background: rgba(200, 16, 46, 0.04);
}

.logistics-panel-title {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 800;
}

.product-panel-heading {
  align-items: center;
}

.product-toolbar {
  position: sticky;
  top: 8px;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 10px;
  padding: 12px;
  margin: -6px -12px 10px;
  border: 1px solid rgba(1, 33, 105, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
}

.product-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: #6a7287;
  font-size: 12px;
}

.product-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  margin: 0 0 16px;
}

.product-card {
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: 0;
  overflow: hidden;
  border-width: 1px;
  background: #ffffff;
}

.product-image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #f3f6fb;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.product-image-button img,
.product-card img {
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
}

.product-image-empty {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #7a8499;
  font-size: 13px;
}

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

.product-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-card-tags span {
  padding: 3px 7px;
  border-radius: 8px;
  background: rgba(1, 33, 105, 0.08);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
}

.product-card-tags span:last-child {
  background: rgba(200, 16, 46, 0.08);
  color: var(--accent);
}

.product-card .name {
  display: -webkit-box;
  overflow: hidden;
  color: #121827;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-card .spec,
.product-card .delivery {
  display: -webkit-box;
  overflow: hidden;
  color: #687084;
  font-size: 13px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 12px 12px;
}

.product-detail-btn,
.product-select-btn {
  min-height: 36px;
  border-radius: 8px;
  font-weight: 800;
}

.product-select-btn {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
}

.product-card.selected .product-select-btn {
  border-color: var(--accent);
  background: var(--accent);
}

.product-empty {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed rgba(1, 33, 105, 0.22);
  border-radius: 8px;
  color: #687084;
  text-align: center;
}

.front-sticky-actions {
  position: sticky;
  bottom: 12px;
  z-index: 12;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(1, 33, 105, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-md);
}

.order-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.order-selected-panel h3 {
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 16px;
}

.order-summary {
  background: transparent;
  padding: 0;
  margin: 0;
  border: 0;
  box-shadow: none;
}

.selected-order-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(1, 33, 105, 0.12);
  border-radius: 8px;
  background: #ffffff;
}

.selected-order-item + .selected-order-item {
  margin-top: 10px;
}

.selected-order-item img,
.selected-order-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: #eef2f8;
  object-fit: cover;
}

.selected-order-item strong {
  display: block;
  color: #121827;
  line-height: 1.4;
}

.selected-order-item span {
  display: block;
  margin-top: 6px;
  color: #687084;
  font-size: 13px;
}

.success-panel {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 26px 16px;
  border: 1px solid rgba(36, 122, 61, 0.16);
  border-radius: 8px;
  background: rgba(36, 122, 61, 0.06);
  text-align: center;
}

.success-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: #247a3d;
  color: #ffffff;
  font-size: 32px;
  font-weight: 800;
}

.success-panel h3 {
  color: #15351f;
  font-size: 22px;
}

.success-panel p {
  color: #4f5a68;
}

@media (max-width: 760px) {
  .front-shell {
    padding: 14px 10px 28px;
  }

  .front-header {
    display: block;
    margin-bottom: 12px;
  }

  .front-title h1 {
    font-size: 26px;
  }

  .front-title .summary {
    font-size: 13px;
  }

  .front-assurance {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .front-card {
    border-radius: 8px;
  }

  .front-steps {
    gap: 6px;
    padding: 14px 8px;
  }

  .step-node {
    min-width: 54px;
    font-size: 11px;
  }

  .step-line {
    width: 22px;
  }

  .front-step-panel {
    padding: 16px 12px;
  }

  .panel-heading {
    display: grid;
    gap: 10px;
  }

  .verify-layout,
  .front-form-grid,
  .order-layout {
    grid-template-columns: 1fr;
  }

  .front-action-stack,
  .front-sticky-actions {
    grid-template-columns: 1fr;
  }

  .front-guide {
    display: none;
  }

  .product-toolbar {
    top: 6px;
    grid-template-columns: 1fr;
    margin: -4px 0 10px;
  }

  .product-meta-row {
    display: grid;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .product-card {
    min-height: 290px;
  }

  .product-card-body {
    padding: 10px;
  }

  .product-card .name {
    font-size: 14px;
  }

  .product-card .spec,
  .product-card .delivery {
    font-size: 12px;
    -webkit-line-clamp: 1;
  }

  .product-card-actions {
    grid-template-columns: 1fr;
    padding: 0 10px 10px;
  }

  .front-sticky-actions {
    bottom: calc(8px + env(safe-area-inset-bottom));
  }

  .region-selects {
    display: grid;
    grid-template-columns: 1fr;
  }

  #product-detail-modal,
  #order-confirm-modal,
  .announcement-modal {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: none;
    max-height: 88vh;
    transform: none;
    border-radius: 8px 8px 0 0;
  }

  .pd-header {
    display: grid;
  }

  .pd-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 380px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== 淡雅低饱和 UI 主题：替代英伦红蓝风格 ===== */
:root {
  --primary: #4f8f8a;
  --primary-dark: #376f6a;
  --accent: #c97a67;
  --danger: #bd5b5b;
  --success: #5f8f6a;
  --warning: #b58a45;
  --bg: #f6f8f8;
  --card: rgba(255, 255, 255, 0.94);
  --border: rgba(71, 91, 96, 0.14);
  --text: #20262a;
  --text-secondary: #687478;
  --sidebar: rgba(252, 253, 253, 0.92);
  --sidebar-active: rgba(79, 143, 138, 0.12);
  --soft-surface: rgba(255, 255, 255, 0.88);
  --soft-surface-muted: rgba(247, 250, 250, 0.92);
  --soft-line: rgba(71, 91, 96, 0.13);
  --soft-primary: rgba(79, 143, 138, 0.12);
  --soft-accent: rgba(201, 122, 103, 0.11);
  --shadow-sm: 0 1px 2px rgba(46, 64, 68, 0.04), 0 10px 26px rgba(46, 64, 68, 0.06);
  --shadow-md: 0 2px 8px rgba(46, 64, 68, 0.06), 0 18px 46px rgba(46, 64, 68, 0.09);
  --shadow-lg: 0 12px 34px rgba(46, 64, 68, 0.13), 0 32px 70px rgba(46, 64, 68, 0.12);
}

body {
  background:
    radial-gradient(circle at 12% 6%, rgba(79, 143, 138, 0.10), transparent 30%),
    radial-gradient(circle at 92% 4%, rgba(201, 122, 103, 0.08), transparent 24%),
    linear-gradient(180deg, #fbfcfc 0%, #f6f8f8 52%, #eef3f3 100%);
}

body::before {
  display: none;
}

a {
  color: var(--primary-dark);
}

a:hover {
  color: var(--accent);
}

.form-card,
.data-card,
.stat-card,
.batch-bar,
.manual-order-panel,
.manual-order-result,
.order-summary,
.trace-box,
.logistics-panel,
dialog,
.verify-form,
.order-form-panel,
.order-selected-panel,
.product-toolbar,
.front-sticky-actions,
.guide-card {
  border-color: var(--soft-line);
  box-shadow: var(--shadow-sm);
}

.form-card,
.data-card,
.manual-order-panel,
dialog,
.verify-form,
.order-form-panel,
.order-selected-panel {
  background: var(--soft-surface);
}

.form-card::before,
.data-card::before,
.manual-order-panel::before,
.stat-card::before {
  background: linear-gradient(90deg, rgba(79, 143, 138, 0.72), rgba(201, 122, 103, 0.48));
}

.front-title .eyebrow,
.form-heading .eyebrow,
.panel-kicker,
.form-heading h1,
.front-title h1,
.panel-heading h2,
.topbar h2,
.dialog-header h3 {
  color: #263236;
}

.front-title .eyebrow,
.panel-kicker {
  color: var(--primary-dark);
}

.front-title .summary,
.form-heading .summary,
.guide-card span,
.product-meta-row,
.product-card .spec,
.product-card .delivery,
.selected-order-item span {
  color: var(--text-secondary);
}

.panel-badge,
.front-assurance span,
.product-card-tags span {
  border-color: rgba(79, 143, 138, 0.18);
  background: var(--soft-primary);
  color: var(--primary-dark);
}

.product-card-tags span:last-child {
  background: rgba(95, 143, 106, 0.12);
  color: #4f7c5a;
}

.form-control,
select.form-control,
textarea.form-control,
input[type="date"].form-control {
  border-color: rgba(71, 91, 96, 0.16);
  background: rgba(255, 255, 255, 0.82);
}

.form-control:hover,
select.form-control:hover,
textarea.form-control:hover,
input[type="date"].form-control:hover {
  border-color: rgba(79, 143, 138, 0.32);
}

.form-control:focus,
select.form-control:focus,
textarea.form-control:focus,
input[type="date"].form-control:focus {
  border-color: rgba(79, 143, 138, 0.72);
  box-shadow: 0 0 0 4px rgba(79, 143, 138, 0.15);
}

.btn-primary {
  background: linear-gradient(180deg, #65a29e 0%, #4f8f8a 100%);
  color: #ffffff;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #6eaaa6 0%, #427f7a 100%);
}

.btn-accent {
  background: linear-gradient(180deg, #d58d7c 0%, #c97a67 100%);
  color: #ffffff;
}

.btn-accent:hover {
  background: linear-gradient(180deg, #dc9b8d 0%, #b86c5c 100%);
}

.btn-danger,
.logistics-query-btn,
#show-logistics-btn,
#logistics-toggle-btn,
#query-logistics-btn {
  background: linear-gradient(180deg, #cb7373 0%, #bd5b5b 100%);
  color: #ffffff;
}

.btn-danger:hover,
.logistics-query-btn:hover,
#show-logistics-btn:hover,
#logistics-toggle-btn:hover,
#query-logistics-btn:hover {
  background: linear-gradient(180deg, #d18484 0%, #a94f4f 100%);
}

.btn-default {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(71, 91, 96, 0.16);
  color: #2e383b;
}

.btn-default:hover {
  background: #ffffff;
  border-color: rgba(79, 143, 138, 0.32);
  color: var(--primary-dark);
}

.sidebar,
.topbar,
.front-steps,
.dialog-header,
.dialog-footer,
.product-toolbar,
.front-sticky-actions {
  background: rgba(255, 255, 255, 0.88);
  border-color: var(--soft-line);
}

.sidebar-header::before {
  background: linear-gradient(90deg, #4f8f8a 0 56%, #c97a67 56% 100%);
  box-shadow: 0 1px 0 rgba(46, 64, 68, 0.10);
}

.sidebar-header h1,
.sidebar-nav a.active,
.stat-card .value,
.guide-card strong,
.order-selected-panel h3,
.product-detail-btn,
.pd-section-title {
  color: var(--primary-dark);
}

.sidebar-nav a:hover {
  background: rgba(79, 143, 138, 0.07);
  color: var(--primary-dark);
}

.sidebar-nav a.active {
  background: var(--sidebar-active);
  box-shadow: inset 3px 0 0 var(--primary), inset 0 0 0 1px rgba(79, 143, 138, 0.10);
}

.content-body {
  background: linear-gradient(180deg, rgba(79, 143, 138, 0.035), rgba(255, 255, 255, 0));
}

.batch-bar,
.verify-form,
.order-form-panel,
.order-selected-panel,
.guide-card {
  background: var(--soft-surface-muted);
}

.data-table th {
  background: #f2f6f6;
  color: #45575b;
  border-bottom-color: rgba(71, 91, 96, 0.16);
}

.data-table tr:hover td {
  background: rgba(79, 143, 138, 0.045);
}

.tag-success {
  background: rgba(95, 143, 106, 0.13);
  color: #4f7c5a;
}

.tag-warning {
  background: rgba(181, 138, 69, 0.14);
  color: #8d672b;
}

.tag-danger {
  background: rgba(189, 91, 91, 0.12);
  color: #a44d4d;
}

.tag-info {
  background: var(--soft-primary);
  color: var(--primary-dark);
}

.dialog-header::after,
.announcement-modal .dialog-header::after {
  background: linear-gradient(90deg, rgba(79, 143, 138, 0.62), rgba(201, 122, 103, 0.42));
}

.dialog-close {
  color: var(--primary-dark);
}

.dialog-close:hover {
  background: var(--soft-accent);
  color: #9b5a4d;
}

.product-card {
  border-color: rgba(71, 91, 96, 0.14);
}

.product-card:hover,
.manual-product-card:hover {
  border-color: rgba(79, 143, 138, 0.42);
  box-shadow: 0 12px 28px rgba(79, 143, 138, 0.10);
}

.product-card.selected,
.manual-product-card.selected {
  background: rgba(79, 143, 138, 0.075);
  border-color: rgba(79, 143, 138, 0.58);
  box-shadow: 0 0 0 3px rgba(79, 143, 138, 0.12), inset 0 3px 0 rgba(201, 122, 103, 0.42);
}

.product-card .check,
.product-card.selected .product-select-btn {
  background: var(--accent);
}

.product-select-btn {
  border-color: var(--primary);
  background: var(--primary);
}

.product-detail-btn {
  border-color: rgba(79, 143, 138, 0.38);
}

.product-detail-btn:hover {
  background: var(--primary);
  color: #ffffff;
}

.select-counter {
  background: var(--soft-primary);
  color: var(--primary-dark);
}

.step-dot.active {
  background: var(--primary);
}

.step-dot.done,
.step-line.done,
.step-line.active {
  background: var(--accent);
}

.logistics-panel {
  border-color: rgba(189, 91, 91, 0.18);
  background: rgba(189, 91, 91, 0.045);
}

.logistics-panel-title,
.toast-error {
  color: #9d4b4b;
}

.trace-box {
  border-left-color: var(--primary);
}

.success-icon {
  background: var(--success);
}

.success-panel {
  border-color: rgba(95, 143, 106, 0.18);
  background: rgba(95, 143, 106, 0.07);
}

.toast-info {
  background: rgba(79, 143, 138, 0.96);
}

.toast-error {
  background: rgba(189, 91, 91, 0.96);
  color: #ffffff;
}

/* ===== 前台兑换页：恢复旧版左图右表单登录式布局 ===== */
.login-style-redemption.front-shell {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
}

.login-style-redemption .redeem-split-app {
  display: grid;
  width: min(1160px, 100%);
  min-height: min(720px, calc(100vh - 56px));
  grid-template-columns: 380px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(71, 91, 96, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 22px 58px rgba(46, 64, 68, 0.13);
}

.redeem-visual-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
  background:
    linear-gradient(180deg, rgba(79, 143, 138, 0.14), rgba(255, 255, 255, 0.54)),
    #edf5f3;
}

.redeem-visual-image {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  border: 1px solid rgba(79, 143, 138, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.94) 0 30%, transparent 31%),
    linear-gradient(135deg, rgba(79, 143, 138, 0.22), rgba(201, 122, 103, 0.16));
}

.redeem-visual-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.redeem-visual-copy {
  display: grid;
  gap: 10px;
}

.redeem-visual-copy .eyebrow {
  margin: 0;
  color: var(--primary-dark);
}

.redeem-visual-copy h1 {
  margin: 0;
  color: var(--text-primary);
  font-size: 34px;
  line-height: 1.15;
}

.redeem-visual-copy .summary {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
}

.redeem-visual-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.redeem-visual-tags span {
  padding: 8px 11px;
  border: 1px solid rgba(79, 143, 138, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.redeem-work-panel {
  min-width: 0;
  background: rgba(255, 255, 255, 0.94);
}

.login-style-redemption .front-card {
  width: 100%;
  max-width: none;
  min-height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.login-style-redemption .front-card::before {
  display: none;
}

.login-style-redemption .front-steps {
  padding: 22px 28px;
  background: rgba(255, 255, 255, 0.66);
}

.login-style-redemption .front-step-panel {
  padding: 30px 34px 34px;
}

.login-style-redemption .verify-layout {
  grid-template-columns: 1fr;
}

.login-style-redemption .front-guide {
  display: none;
}

.login-style-redemption .verify-form {
  border-color: rgba(71, 91, 96, 0.12);
  background: rgba(255, 255, 255, 0.68);
}

.login-style-redemption .front-action-stack {
  grid-template-columns: 1fr;
  margin-top: 14px;
}

.login-style-redemption .front-action-stack .btn {
  min-height: 48px;
}

.login-style-redemption .product-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.login-style-redemption .order-layout {
  grid-template-columns: 280px minmax(0, 1fr);
}

@media (max-width: 980px) {
  .login-style-redemption.front-shell {
    align-items: flex-start;
    padding: 16px 12px 28px;
  }

  .login-style-redemption .redeem-split-app {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .redeem-visual-panel {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    padding: 18px;
  }

  .redeem-visual-image {
    min-height: 128px;
  }

  .redeem-visual-image img {
    min-height: 128px;
  }

  .redeem-visual-tags {
    grid-column: 1 / -1;
  }

  .redeem-visual-copy h1 {
    font-size: 28px;
  }

  .login-style-redemption .order-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .login-style-redemption .front-step-panel {
    padding: 16px 12px;
  }

  .login-style-redemption .front-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .login-style-redemption.front-shell {
    padding: 10px;
  }

  .login-style-redemption .redeem-split-app {
    border-radius: 8px;
  }

  .redeem-visual-panel {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

  .redeem-visual-image {
    min-height: 168px;
  }

  .redeem-visual-image img {
    min-height: 168px;
  }

  .redeem-visual-copy h1 {
    font-size: 26px;
  }

  .redeem-visual-copy .summary {
    font-size: 13px;
  }

  .login-style-redemption .front-steps {
    padding: 14px 8px;
  }
}

/* ===== 前台兑换页：第一版大图登录页样式 ===== */
.login-style-redemption.front-shell {
  background:
    linear-gradient(180deg, rgba(79, 143, 138, 0.11), rgba(255, 255, 255, 0) 360px),
    #eef6f5;
}

.login-style-redemption .first-version-layout {
  width: clamp(960px, 86vw, 1180px);
  height: clamp(560px, calc(100dvh - 56px), 760px);
  min-height: 0;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(46, 64, 68, 0.14);
}

.first-version-layout .redeem-visual-panel {
  display: block;
  min-height: 0;
  padding: 0;
  background: #e8efee;
}

.first-version-layout .redeem-visual-image {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 8px 0 0 8px;
  background: #e8efee;
}

.first-version-layout .redeem-visual-image img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.first-version-layout .redeem-work-panel {
  display: flex;
  min-width: 0;
  min-height: 0;
  background: #ffffff;
}

.first-version-layout .front-card {
  display: flex;
  min-height: 100%;
}

.first-version-layout .front-steps {
  display: none;
}

.first-version-layout .verify-panel {
  display: flex;
  width: 100%;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
  padding: clamp(26px, 4vh, 46px) clamp(28px, 4vw, 44px);
}

.first-version-layout .verify-login-heading {
  display: block;
  margin-bottom: clamp(20px, 3vh, 30px);
}

.first-version-layout .verify-login-heading .panel-kicker {
  margin: 0 0 8px;
  color: #f26150;
  font-size: clamp(13px, 1.4vw, 15px);
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.first-version-layout .verify-login-heading h2 {
  margin: 0;
  color: #16232b;
  font-size: clamp(28px, 3.1vw, 34px);
  line-height: 1.12;
  font-weight: 900;
}

.first-version-layout .verify-login-heading .summary {
  max-width: 520px;
  margin-top: 12px;
  color: #6a7780;
  font-size: clamp(14px, 1.55vw, 16px);
  line-height: 1.65;
}

.first-version-layout .verify-form {
  padding: 0;
  border: 0;
  background: transparent;
}

.first-version-layout .verify-form .front-form-grid {
  grid-template-columns: 1fr;
  gap: clamp(14px, 2.4vh, 20px);
}

.first-version-layout .verify-form .form-group {
  margin-bottom: 0;
}

.first-version-layout .verify-form label {
  margin-bottom: 8px;
  color: #16232b;
  font-size: clamp(14px, 1.45vw, 16px);
  font-weight: 900;
}

.first-version-layout .verify-form .form-control {
  min-height: clamp(46px, 6vh, 54px);
  border-color: rgba(79, 143, 138, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  font-size: clamp(15px, 1.5vw, 17px);
}

.first-version-layout .verify-form .form-control::placeholder {
  color: #a4b0b8;
}

.first-version-layout .verify-form .captcha-group {
  grid-template-columns: minmax(0, 1fr) 150px;
}

.first-version-layout .verify-form .captcha-group .btn {
  min-height: clamp(46px, 6vh, 54px);
  color: var(--primary-dark);
  font-size: clamp(14px, 1.35vw, 15px);
  font-weight: 900;
}

.front-agreement-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: clamp(18px, 2.8vh, 26px) 0 clamp(16px, 2.4vh, 22px);
  color: #68747c;
  font-size: clamp(13px, 1.35vw, 15px);
  line-height: 1.6;
  font-weight: 600;
}

.front-agreement-row input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--primary);
}

.first-version-layout .front-action-stack {
  grid-template-columns: minmax(0, 1fr) clamp(130px, 13vw, 160px);
  gap: 12px;
  margin-top: 0;
}

.first-version-layout .front-action-stack .btn {
  min-height: clamp(48px, 6.2vh, 56px);
  border-radius: 8px;
  font-size: clamp(15px, 1.7vw, 17px);
  font-weight: 900;
}

.first-version-layout #verify-btn {
  background: #129486;
}

.first-version-layout #logistics-toggle-btn {
  background: #f26150;
}

.front-notice-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  margin-top: clamp(16px, 2.4vh, 22px);
  padding: 12px 16px;
  border: 1px solid rgba(242, 97, 80, 0.34);
  border-radius: 8px;
  background: rgba(242, 97, 80, 0.07);
  color: #6f4d48;
  line-height: 1.7;
}

.front-notice-bar strong {
  color: #b9463a;
  font-weight: 900;
}

@media (max-width: 1100px) {
  .login-style-redemption .first-version-layout {
    width: min(980px, calc(100vw - 32px));
    grid-template-columns: 0.95fr 1fr;
  }

  .first-version-layout .verify-login-heading h2 {
    font-size: 32px;
  }

  .first-version-layout .verify-login-heading .summary {
    font-size: 16px;
  }
}

@media (max-height: 700px) and (min-width: 861px) {
  .login-style-redemption.front-shell {
    padding: 18px;
  }

  .login-style-redemption .first-version-layout {
    height: calc(100dvh - 36px);
    width: min(1080px, calc(100vw - 36px));
  }

  .first-version-layout .verify-panel {
    justify-content: flex-start;
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .front-notice-bar {
    font-size: 13px;
    line-height: 1.55;
  }
}

@media (max-width: 860px) {
  .login-style-redemption .first-version-layout {
    width: min(560px, calc(100vw - 24px));
    height: auto;
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .first-version-layout .redeem-visual-panel {
    min-height: 260px;
  }

  .first-version-layout .redeem-visual-image {
    min-height: 260px;
    border-radius: 8px 8px 0 0;
  }

  .first-version-layout .redeem-visual-image img {
    min-height: 260px;
  }

  .first-version-layout .verify-panel {
    justify-content: start;
    padding: 26px 20px;
  }
}

@media (max-width: 560px) {
  .login-style-redemption .first-version-layout {
    width: 100%;
  }

  .first-version-layout .redeem-visual-panel,
  .first-version-layout .redeem-visual-image,
  .first-version-layout .redeem-visual-image img {
    min-height: 210px;
  }

  .first-version-layout .verify-login-heading {
    margin-bottom: 22px;
  }

  .first-version-layout .verify-login-heading h2 {
    font-size: 28px;
  }

  .first-version-layout .verify-login-heading .summary {
    font-size: 14px;
  }

  .first-version-layout .verify-form .front-form-grid {
    gap: 18px;
  }

  .first-version-layout .verify-form .captcha-group,
  .first-version-layout .front-action-stack,
  .front-notice-bar {
    grid-template-columns: 1fr;
  }
}

/* ===== 前台首屏最终收敛：防止大屏过大、左图被挤压、右侧内滚动 ===== */
.login-style-redemption.front-shell {
  min-height: 100dvh;
  padding: clamp(18px, 3vh, 30px) clamp(18px, 3vw, 34px) !important;
}

.login-style-redemption .first-version-layout {
  display: grid !important;
  width: min(1120px, calc(100vw - 48px)) !important;
  height: clamp(560px, calc(100dvh - 48px), 680px) !important;
  min-height: 0 !important;
  max-height: none !important;
  grid-template-columns: minmax(440px, 54%) minmax(380px, 46%) !important;
  align-items: stretch;
}

.first-version-layout .redeem-visual-panel {
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
}

.first-version-layout .redeem-visual-image {
  position: relative !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border-radius: 8px 0 0 8px !important;
}

.first-version-layout .redeem-visual-image img {
  position: absolute !important;
  inset: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  object-fit: cover !important;
  object-position: center center;
}

.first-version-layout .redeem-work-panel {
  min-width: 0 !important;
}

.first-version-layout .front-card {
  display: block !important;
  min-height: 0 !important;
}

.first-version-layout .verify-panel {
  display: block !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding: clamp(24px, 4vh, 36px) clamp(26px, 3.5vw, 40px) !important;
}

.first-version-layout .verify-login-heading {
  margin-bottom: clamp(18px, 3vh, 24px) !important;
}

.first-version-layout .verify-login-heading .panel-kicker {
  margin-bottom: 8px !important;
  font-size: 14px !important;
}

.first-version-layout .verify-login-heading h2 {
  font-size: clamp(28px, 3vw, 34px) !important;
  line-height: 1.18 !important;
}

.first-version-layout .verify-login-heading .summary {
  max-width: 440px;
  margin-top: 10px !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
}

.first-version-layout .verify-form .front-form-grid {
  gap: clamp(12px, 2vh, 16px) !important;
}

.first-version-layout .verify-form label {
  margin-bottom: 7px !important;
  font-size: 14px !important;
}

.first-version-layout .verify-form .form-control {
  min-height: 46px !important;
  height: 46px !important;
  padding: 0 14px !important;
  font-size: 15px !important;
}

.first-version-layout .verify-form .captcha-group {
  grid-template-columns: minmax(0, 1fr) 132px !important;
  gap: 10px !important;
}

.first-version-layout .verify-form .captcha-group .btn {
  min-height: 46px !important;
  height: 46px !important;
  padding: 0 12px !important;
  font-size: 14px !important;
  white-space: nowrap;
}

.front-agreement-row {
  margin: clamp(14px, 2vh, 18px) 0 clamp(14px, 2vh, 18px) !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}

.front-agreement-row input {
  width: 18px !important;
  height: 18px !important;
}

.first-version-layout .front-action-stack {
  grid-template-columns: minmax(0, 1fr) 138px !important;
  gap: 12px !important;
}

.first-version-layout .front-action-stack .btn {
  min-height: 48px !important;
  height: 48px !important;
  font-size: 16px !important;
}

.front-notice-bar {
  margin-top: 16px !important;
  padding: 12px 14px !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
}

@media (max-height: 720px) and (min-width: 861px) {
  .login-style-redemption .first-version-layout {
    height: calc(100dvh - 64px) !important;
    min-height: 0 !important;
  }

  .first-version-layout .redeem-visual-image,
  .first-version-layout .redeem-visual-image img {
    min-height: 0 !important;
  }

  .first-version-layout .verify-panel {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
  }

  .first-version-layout .verify-login-heading .summary {
    line-height: 1.5 !important;
  }

  .front-notice-bar {
    display: none !important;
  }
}

@media (max-width: 920px) {
  .login-style-redemption .first-version-layout {
    width: min(560px, calc(100vw - 24px)) !important;
    height: auto !important;
    min-height: 0 !important;
    grid-template-columns: 1fr !important;
  }

  .first-version-layout .redeem-visual-image,
  .first-version-layout .redeem-visual-image img {
    min-height: 240px !important;
    height: 240px !important;
    border-radius: 8px 8px 0 0 !important;
  }

  .first-version-layout .verify-panel {
    padding: 24px 18px !important;
  }
}

@media (max-width: 520px) {
  .login-style-redemption.front-shell {
    padding: 10px !important;
  }

  .login-style-redemption .first-version-layout {
    width: 100% !important;
  }

  .first-version-layout .redeem-visual-image,
  .first-version-layout .redeem-visual-image img {
    min-height: 190px !important;
    height: 190px !important;
  }

  .first-version-layout .front-action-stack,
  .first-version-layout .verify-form .captcha-group {
    grid-template-columns: 1fr !important;
  }
}

/* ===== 独立物流查询页 ===== */
.logistics-page-shell {
  min-height: 100dvh;
  padding: clamp(18px, 4vh, 42px) 16px;
  background:
    linear-gradient(180deg, rgba(79, 143, 138, 0.12), rgba(255, 255, 255, 0) 320px),
    #eef6f5;
}

.logistics-page-card {
  width: min(920px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(71, 91, 96, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 44px rgba(46, 64, 68, 0.12);
  overflow: hidden;
}

.logistics-page-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 28px 30px 22px;
  border-bottom: 1px solid rgba(71, 91, 96, 0.10);
}

.logistics-page-header h1 {
  margin: 0;
  color: #16232b;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.15;
}

.logistics-query-card {
  padding: 24px 30px;
  border-bottom: 1px solid rgba(71, 91, 96, 0.10);
  background: rgba(255, 255, 255, 0.72);
}

.logistics-query-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: end;
}

.logistics-page-submit {
  margin-top: 16px;
  min-height: 48px;
}

.logistics-result-panel {
  display: grid;
  gap: 14px;
  padding: 24px 30px 30px;
}

.logistics-empty-state,
.logistics-loading,
.logistics-error {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 34px 18px;
  border: 1px dashed rgba(79, 143, 138, 0.28);
  border-radius: 8px;
  background: rgba(79, 143, 138, 0.05);
  color: #61727d;
  text-align: center;
}

.logistics-empty-state strong,
.logistics-loading {
  color: #294c49;
  font-weight: 900;
}

.logistics-error {
  border-color: rgba(189, 91, 91, 0.28);
  background: rgba(189, 91, 91, 0.06);
  color: #9d4b4b;
  font-weight: 800;
}

.logistics-order-card {
  border: 1px solid rgba(71, 91, 96, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(46, 64, 68, 0.06);
  overflow: hidden;
}

.logistics-order-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(71, 91, 96, 0.10);
  background: #f6faf9;
}

.logistics-order-head div,
.logistics-info-grid div {
  display: grid;
  gap: 4px;
}

.logistics-order-head span,
.logistics-info-grid span {
  color: #718087;
  font-size: 12px;
}

.logistics-order-head strong,
.logistics-info-grid strong {
  color: #17252d;
  font-size: 15px;
}

.logistics-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 18px;
}

.logistics-product-list {
  display: grid;
  gap: 12px;
  padding: 16px 18px 0;
}

.logistics-product-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(21, 153, 138, 0.16);
  border-radius: 8px;
  background: rgba(21, 153, 138, 0.04);
}

.logistics-product-item img,
.logistics-product-empty {
  width: 86px;
  height: 86px;
  border-radius: 8px;
  background: #f0f8f7;
  object-fit: cover;
}

.logistics-product-empty {
  display: grid;
  place-items: center;
  color: #8aa4a0;
  font-size: 12px;
}

.logistics-product-info {
  display: grid;
  gap: 5px;
}

.logistics-product-info span,
.logistics-receiver-grid span {
  color: #718087;
  font-size: 12px;
}

.logistics-product-info strong,
.logistics-receiver-grid strong {
  color: #17252d;
  font-size: 16px;
  line-height: 1.45;
}

.logistics-product-info em {
  color: #687882;
  font-size: 13px;
  font-style: normal;
}

.logistics-receiver-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 18px;
}

.logistics-receiver-grid div {
  display: grid;
  gap: 4px;
}

.logistics-receiver-grid .wide {
  grid-column: 1 / -1;
}

.logistics-info-grid .wide {
  grid-column: 1 / -1;
}

.logistics-info-grid.compact {
  padding: 0;
}

.shipment-list {
  display: grid;
  gap: 12px;
  padding: 0 18px 18px;
}

.shipment-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(79, 143, 138, 0.16);
  border-radius: 8px;
  background: rgba(79, 143, 138, 0.045);
}

.shipment-card.is-pending {
  border-color: rgba(181, 138, 69, 0.20);
  background: rgba(181, 138, 69, 0.06);
}

.shipment-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.shipment-card-header strong {
  color: #294c49;
}

.shipment-card-header span {
  color: #4f8f8a;
  font-weight: 800;
}

@media (max-width: 720px) {
  .logistics-page-header {
    display: grid;
    padding: 22px 18px 18px;
  }

  .logistics-query-card,
  .logistics-result-panel {
    padding: 18px;
  }

  .logistics-query-grid,
  .logistics-info-grid,
  .logistics-info-grid.compact,
  .logistics-receiver-grid {
    grid-template-columns: 1fr;
  }

  .logistics-product-item {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .logistics-product-item img,
  .logistics-product-empty {
    width: 72px;
    height: 72px;
  }
}

/* ===== C 端统一色彩方案：青绿色主色 + 珊瑚红辅助色 ===== */
.login-style-redemption,
.logistics-page-shell {
  --front-primary: #15998a;
  --front-primary-dark: #0f8176;
  --front-primary-soft: rgba(21, 153, 138, 0.10);
  --front-primary-line: rgba(21, 153, 138, 0.24);
  --front-accent: #f45d50;
  --front-accent-dark: #df4f44;
  --front-accent-soft: rgba(244, 93, 80, 0.10);
  --front-accent-line: rgba(244, 93, 80, 0.30);
  --front-text: #16232b;
  --front-muted: #687882;
  --front-bg: #eef8f6;
  --front-card: #ffffff;
}

.login-style-redemption.front-shell,
.logistics-page-shell {
  background:
    linear-gradient(180deg, rgba(21, 153, 138, 0.13), rgba(255, 255, 255, 0) 330px),
    var(--front-bg) !important;
}

.login-style-redemption .first-version-layout,
.logistics-page-card {
  border: 1px solid rgba(21, 153, 138, 0.10) !important;
  background: var(--front-card) !important;
  box-shadow: 0 18px 42px rgba(15, 129, 118, 0.12) !important;
}

.login-style-redemption .panel-kicker,
.logistics-page-header .eyebrow {
  color: var(--front-accent) !important;
}

.login-style-redemption h1,
.login-style-redemption h2,
.logistics-page-header h1,
.logistics-order-head strong,
.logistics-info-grid strong {
  color: var(--front-text) !important;
}

.login-style-redemption .summary,
.logistics-page-header .summary,
.logistics-order-head span,
.logistics-info-grid span,
.logistics-empty-state,
.front-agreement-row {
  color: var(--front-muted) !important;
}

.login-style-redemption .form-control,
.logistics-page-shell .form-control,
.login-style-redemption select.form-control,
.login-style-redemption textarea.form-control {
  border-color: var(--front-primary-line) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  color: var(--front-text) !important;
}

.login-style-redemption .form-control:hover,
.logistics-page-shell .form-control:hover,
.login-style-redemption select.form-control:hover,
.login-style-redemption textarea.form-control:hover {
  border-color: rgba(21, 153, 138, 0.42) !important;
}

.login-style-redemption .form-control:focus,
.logistics-page-shell .form-control:focus,
.login-style-redemption select.form-control:focus,
.login-style-redemption textarea.form-control:focus {
  border-color: var(--front-primary) !important;
  box-shadow: 0 0 0 4px rgba(21, 153, 138, 0.15) !important;
}

.login-style-redemption .captcha-canvas,
.logistics-page-shell .captcha-canvas {
  border-color: var(--front-primary-line) !important;
  background: #ffffff !important;
}

.login-style-redemption .btn-primary,
.logistics-page-shell .btn-primary,
.login-style-redemption #verify-btn,
.login-style-redemption .product-select-btn,
.login-style-redemption #next-to-order,
.login-style-redemption #submit-order {
  border-color: var(--front-primary) !important;
  background: var(--front-primary) !important;
  color: #ffffff !important;
}

.login-style-redemption .btn-primary:hover,
.logistics-page-shell .btn-primary:hover,
.login-style-redemption #verify-btn:hover,
.login-style-redemption .product-select-btn:hover,
.login-style-redemption #next-to-order:hover,
.login-style-redemption #submit-order:hover {
  border-color: var(--front-primary-dark) !important;
  background: var(--front-primary-dark) !important;
}

.login-style-redemption .btn-danger,
.logistics-page-shell .btn-danger,
.login-style-redemption #logistics-toggle-btn,
.logistics-page-submit,
.logistics-page-shell #query-logistics-btn {
  border-color: var(--front-accent) !important;
  background: var(--front-accent) !important;
  color: #ffffff !important;
}

.login-style-redemption .btn-danger:hover,
.logistics-page-shell .btn-danger:hover,
.login-style-redemption #logistics-toggle-btn:hover,
.logistics-page-submit:hover,
.logistics-page-shell #query-logistics-btn:hover {
  border-color: var(--front-accent-dark) !important;
  background: var(--front-accent-dark) !important;
}

.login-style-redemption .btn-default,
.logistics-page-shell .btn-default,
.first-version-layout .verify-form .captcha-group .btn {
  border-color: var(--front-primary-line) !important;
  background: var(--front-primary-soft) !important;
  color: var(--front-primary-dark) !important;
}

.login-style-redemption .btn-default:hover,
.logistics-page-shell .btn-default:hover,
.first-version-layout .verify-form .captcha-group .btn:hover {
  border-color: var(--front-primary) !important;
  background: rgba(21, 153, 138, 0.16) !important;
}

.front-agreement-row input {
  accent-color: var(--front-primary) !important;
}

.front-notice-bar,
.logistics-error {
  border-color: var(--front-accent-line) !important;
  background: var(--front-accent-soft) !important;
  color: #8f453d !important;
}

.front-notice-bar strong,
.logistics-error {
  color: #b7473d !important;
}

.login-style-redemption .front-steps,
.logistics-query-card,
.logistics-order-head {
  border-color: rgba(21, 153, 138, 0.12) !important;
  background: rgba(21, 153, 138, 0.045) !important;
}

.login-style-redemption .step-dot.active,
.login-style-redemption .step-line.active {
  background: var(--front-primary) !important;
  color: #ffffff !important;
}

.login-style-redemption .step-dot.done,
.login-style-redemption .step-line.done {
  background: var(--front-accent) !important;
  color: #ffffff !important;
}

.login-style-redemption .step-node:has(.step-dot.active),
.login-style-redemption .step-node:has(.step-dot.done),
.login-style-redemption .select-counter,
.login-style-redemption .product-detail-btn,
.shipment-card-header strong,
.logistics-empty-state strong,
.logistics-loading {
  color: var(--front-primary-dark) !important;
}

.login-style-redemption .select-counter,
.product-card-tags span,
.logistics-empty-state,
.logistics-loading {
  border-color: var(--front-primary-line) !important;
  background: var(--front-primary-soft) !important;
}

.product-card-tags span:last-child {
  background: var(--front-accent-soft) !important;
  color: var(--front-accent-dark) !important;
}

.login-style-redemption .product-card,
.login-style-redemption .order-form-panel,
.login-style-redemption .order-selected-panel,
.logistics-order-card,
.shipment-card {
  border-color: rgba(21, 153, 138, 0.16) !important;
}

.login-style-redemption .product-card:hover,
.login-style-redemption .product-card.selected {
  border-color: var(--front-primary) !important;
  box-shadow: 0 12px 28px rgba(21, 153, 138, 0.13) !important;
}

.login-style-redemption .product-card.selected {
  background: rgba(21, 153, 138, 0.075) !important;
}

.login-style-redemption .product-card.selected .product-select-btn,
.login-style-redemption .product-card .check {
  background: var(--front-accent) !important;
  color: #ffffff !important;
}

.login-style-redemption .product-toolbar,
.login-style-redemption .front-sticky-actions {
  border-color: rgba(21, 153, 138, 0.14) !important;
  background: rgba(255, 255, 255, 0.94) !important;
}

.shipment-card {
  background: var(--front-primary-soft) !important;
}

.shipment-card-header span {
  color: var(--front-accent) !important;
}

.trace-box {
  border-left-color: var(--front-primary) !important;
}

/* ===== C 端布局状态修复：验卡页是双栏，验卡后切换成完整流程页 ===== */
.login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) {
  display: grid !important;
  width: min(1080px, calc(100vw - 56px)) !important;
  height: clamp(540px, calc(100dvh - 64px), 650px) !important;
  min-height: 0 !important;
  grid-template-columns: minmax(500px, 54%) minmax(420px, 46%) !important;
  overflow: hidden !important;
}

.login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .redeem-visual-panel {
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
}

.login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .redeem-visual-image,
.login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .redeem-visual-image img {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
}

.login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .redeem-work-panel {
  width: auto !important;
  min-width: 0 !important;
}

.login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .front-steps {
  display: none !important;
}

.login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .verify-panel {
  display: block !important;
  padding: clamp(22px, 3.6vh, 34px) clamp(24px, 3.2vw, 38px) !important;
}

.login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .verify-login-heading h2 {
  font-size: clamp(28px, 3vw, 34px) !important;
}

.login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .verify-login-heading .summary {
  font-size: 15px !important;
}

.login-style-redemption .redeem-split-app.first-version-layout.is-flow-mode {
  display: block !important;
  width: min(1120px, calc(100vw - 40px)) !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

.login-style-redemption .redeem-split-app.first-version-layout.is-flow-mode .redeem-visual-panel {
  display: none !important;
}

.login-style-redemption .redeem-split-app.first-version-layout.is-flow-mode .redeem-work-panel {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
}

.login-style-redemption .redeem-split-app.first-version-layout.is-flow-mode .front-card {
  display: block !important;
  width: 100% !important;
  min-height: 0 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
}

.login-style-redemption .redeem-split-app.first-version-layout.is-flow-mode .front-steps {
  display: flex !important;
}

.login-style-redemption .redeem-split-app.first-version-layout.is-flow-mode .front-step-panel {
  padding: clamp(18px, 3vw, 28px) !important;
}

.login-style-redemption .redeem-split-app.first-version-layout.is-flow-mode .product-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)) !important;
}

.login-style-redemption .redeem-split-app.first-version-layout.is-flow-mode .order-layout {
  grid-template-columns: 320px minmax(0, 1fr) !important;
}

@media (max-width: 980px) {
  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) {
    width: min(560px, calc(100vw - 24px)) !important;
    height: auto !important;
    grid-template-columns: 1fr !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .redeem-visual-image,
  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .redeem-visual-image img {
    height: 220px !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout.is-flow-mode .order-layout {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 560px) {
  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode),
  .login-style-redemption .redeem-split-app.first-version-layout.is-flow-mode {
    width: 100% !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout.is-flow-mode .product-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ===== 首页登录态最终收齐：小字号、稳定左右分栏 ===== */
@media (min-width: 761px) {
  .login-style-redemption.front-shell {
    display: flex !important;
    min-height: 100dvh !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 22px 16px !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) {
    display: flex !important;
    width: min(980px, calc(100vw - 36px)) !important;
    height: min(620px, calc(100dvh - 44px)) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .redeem-visual-panel {
    display: block !important;
    flex: 0 0 45% !important;
    width: 45% !important;
    min-width: 0 !important;
    max-width: 45% !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .redeem-visual-image {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    border-radius: 8px 0 0 8px !important;
    overflow: hidden !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .redeem-visual-image img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    object-fit: cover !important;
    object-position: center center !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .redeem-work-panel {
    display: flex !important;
    flex: 1 1 auto !important;
    width: 55% !important;
    min-width: 0 !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .front-card {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .verify-panel {
    display: block !important;
    padding: clamp(20px, 3.2vh, 30px) clamp(24px, 3vw, 34px) !important;
    overflow: visible !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .verify-login-heading {
    margin-bottom: 18px !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .verify-login-heading .panel-kicker {
    margin-bottom: 6px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .verify-login-heading h2 {
    font-size: 30px !important;
    line-height: 1.16 !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .verify-login-heading .summary {
    max-width: 390px !important;
    margin-top: 8px !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .verify-form .front-form-grid {
    gap: 11px !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .verify-form label {
    margin-bottom: 5px !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .verify-form .form-control {
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .verify-form .captcha-group {
    grid-template-columns: minmax(0, 1fr) 118px !important;
    gap: 8px !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .verify-form .captcha-group .btn {
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .front-agreement-row {
    grid-template-columns: 18px minmax(0, 1fr) !important;
    gap: 8px !important;
    margin: 14px 0 !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .front-agreement-row input {
    width: 16px !important;
    height: 16px !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .front-action-stack {
    grid-template-columns: minmax(0, 1fr) 126px !important;
    gap: 10px !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .front-action-stack .btn {
    height: 42px !important;
    min-height: 42px !important;
    font-size: 14px !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .front-notice-bar {
    grid-template-columns: auto minmax(0, 1fr) !important;
    gap: 8px !important;
    margin-top: 14px !important;
    padding: 10px 12px !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
  }
}

@media (max-width: 980px) and (min-width: 761px) {
  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) {
    width: min(900px, calc(100vw - 28px)) !important;
  }

  .login-style-redemption .redeem-split-app.first-version-layout:not(.is-flow-mode) .redeem-visual-panel {
    flex-basis: 42% !important;
    width: 42% !important;
    max-width: 42% !important;
  }
}

/* ===== C 端输入框背景统一：与所在白色面板一致 ===== */
.login-style-redemption .redeem-work-panel,
.login-style-redemption .front-card,
.login-style-redemption .verify-panel,
.login-style-redemption .verify-form,
.login-style-redemption .order-form-panel,
.login-style-redemption .order-selected-panel,
.logistics-page-card,
.logistics-query-card {
  background: #ffffff !important;
}

.login-style-redemption .verify-form,
.login-style-redemption .order-form-panel,
.login-style-redemption .order-selected-panel {
  box-shadow: none !important;
}

.login-style-redemption .form-control,
.login-style-redemption input.form-control,
.login-style-redemption textarea.form-control,
.login-style-redemption select.form-control,
.login-style-redemption .captcha-group .form-control,
.logistics-page-shell .form-control,
.logistics-page-shell input.form-control {
  background-color: #ffffff !important;
  background-image: none !important;
}

.login-style-redemption .form-control:focus,
.logistics-page-shell .form-control:focus {
  background-color: #ffffff !important;
}

.login-style-redemption .front-form-grid,
.login-style-redemption .verify-layout,
.logistics-query-grid {
  background: transparent !important;
}

/* ===== 步骤切换兜底：hidden 必须压过首页布局强制显示规则 ===== */
.login-style-redemption .front-step-panel.hidden,
.login-style-redemption #step-1.hidden,
.login-style-redemption #step-2.hidden,
.login-style-redemption #step-3.hidden {
  display: none !important;
}

/* ===== 兑换规则入口与弹窗 ===== */
.login-style-redemption .rules-link {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--front-primary-dark, #0f8176);
  font: inherit;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.login-style-redemption .rules-link:hover {
  color: var(--front-accent, #f45d50);
}

.redeem-rules-modal {
  width: min(720px, calc(100vw - 28px));
  max-height: min(760px, calc(100dvh - 32px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(22, 35, 43, 0.22);
  overflow: hidden;
}

.redeem-rules-modal::backdrop {
  background: rgba(22, 35, 43, 0.34);
}

.redeem-rules-modal .dialog-header {
  border-bottom: 1px solid rgba(21, 153, 138, 0.14);
}

.redeem-rules-modal .dialog-header h3 {
  color: #16232b;
}

.redeem-rules-body {
  max-height: min(540px, calc(100dvh - 188px));
  padding: 22px 26px;
  overflow-y: auto;
  color: #4d5f68;
  font-size: 14px;
  line-height: 1.75;
}

.redeem-rules-body p {
  margin: 0 0 14px;
}

.redeem-rules-body ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.redeem-rules-body li::marker {
  color: var(--front-primary, #15998a);
  font-weight: 900;
  font-size: 1.16em;
}

.redeem-rules-body .rules-numbered-list {
  padding-left: 24px;
}

.redeem-rules-body strong {
  color: #16232b;
}

.redeem-rules-modal .dialog-footer {
  border-top: 1px solid rgba(21, 153, 138, 0.14);
}

@media (max-width: 560px) {
  .redeem-rules-body {
    padding: 18px;
    font-size: 13px;
  }
}

/* Mobile input polish: avoid iOS focus zoom and keep toast visible. */
@media (max-width: 760px) {
  input,
  select,
  textarea,
  button,
  .form-control,
  .login-style-redemption .form-control,
  .login-style-redemption input.form-control,
  .login-style-redemption textarea.form-control,
  .login-style-redemption select.form-control,
  .login-style-redemption .captcha-group .form-control,
  .logistics-page-shell .form-control,
  .logistics-page-shell input.form-control {
    font-size: 16px !important;
  }

  .toast-container {
    top: auto !important;
    right: max(14px, env(safe-area-inset-right)) !important;
    bottom: max(18px, calc(env(safe-area-inset-bottom) + 18px)) !important;
    left: max(14px, env(safe-area-inset-left)) !important;
    transform: none !important;
    align-items: stretch;
    z-index: 2147483647;
  }

  .toast {
    width: 100%;
    min-width: 0;
    max-width: none;
    padding: 13px 15px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.45;
    text-align: left;
  }

  @keyframes toastIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
