/**
 * 快递代取服务平台 - 样式表
 * @version 2.5.0
 */

/* ============ 重置和变量 ============ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #007aff;
  --primary-dark: #004ecb;
  --primary-light: #5ac8fa;
  --primary-bg: rgba(0, 122, 255, 0.08);

  --success: #34c759;
  --success-light: #d1fae5;
  --warning: #ff9500;
  --warning-light: #fef3c7;
  --danger: #ff3b30;
  --danger-light: #fee2e2;
  --info: #5ac8fa;
  --info-light: #dbeafe;

  /* 业务语义色 */
  --orange: #ff9500;
  --orange-light: #fed7aa;
  --wechat: #07c160;
  --wechat-dark: #06ad56;
  --primary-accent: #30b0c7;
  --link: #007aff;
  --highlight: #00b8ff;

  --gray-50: #f9fafb;
  --gray-100: #f2f2f7;
  --gray-200: #e5e5ea;
  --gray-300: #d1d1d6;
  --gray-400: #c7c7cc;
  --gray-500: #8e8e93;
  --gray-600: #636366;
  --gray-700: #48484a;
  --gray-800: #3a3a3c;
  --gray-900: #1c1c1e;

  /* ============ 字号体系（大字号模式开关控制）============
     三档：标准 14px / 大 16px / 超大 18px
     通过 <html data-font-size="normal|large|xlarge"> 切换
     派生变量用 calc 计算，业务代码只引用派生变量
  */
  --font-base: 14px;
  --font-sm: calc(var(--font-base) - 1px);   /* 辅助文字 */
  --font-xs: calc(var(--font-base) - 2px);   /* 次要信息 */
  --font-md: calc(var(--font-base) + 1px);   /* 略大正文 */
  --font-lg: calc(var(--font-base) + 4px);   /* 小标题 */
  --font-xl: calc(var(--font-base) + 8px);   /* 大标题 */
  --font-key: calc(var(--font-base) + 4px);  /* 关键信息（金额/电话/取件码） */

  /* 触摸目标高度 */
  --touch-min: 48px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 16px -6px rgba(0, 0, 0, 0.10), 0 1px 4px -2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, 0.14), 0 2px 8px -4px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px -12px rgba(0, 0, 0, 0.18), 0 4px 12px -6px rgba(0, 0, 0, 0.10);
  --shadow-xl: 0 24px 56px -16px rgba(0, 0, 0, 0.22), 0 8px 20px -8px rgba(0, 0, 0, 0.12);

  /* iOS Liquid Glass */
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-bg-strong: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-blur: 20px;
  --glass-saturate: 180%;
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  --glass-shadow: 0 8px 32px -8px rgba(0, 0, 0, 0.12), 0 2px 8px -4px rgba(0, 0, 0, 0.08);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --radius-2xl: 24px;

  --ease-ios: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --transition: background-color 0.22s cubic-bezier(0.32, 0.72, 0, 1), border-color 0.22s cubic-bezier(0.32, 0.72, 0, 1), color 0.22s cubic-bezier(0.32, 0.72, 0, 1), box-shadow 0.22s cubic-bezier(0.32, 0.72, 0, 1), transform 0.22s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.22s cubic-bezier(0.32, 0.72, 0, 1);
  --transition-slow: background-color 0.34s cubic-bezier(0.32, 0.72, 0, 1), border-color 0.34s cubic-bezier(0.32, 0.72, 0, 1), color 0.34s cubic-bezier(0.32, 0.72, 0, 1), box-shadow 0.34s cubic-bezier(0.32, 0.72, 0, 1), transform 0.34s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.34s cubic-bezier(0.32, 0.72, 0, 1);
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --ink: #1c1c1e;
  --bg-page: #f2f2f7;
}

/* 大字号模式：正文 16px */
:root[data-font-size="large"] {
  --font-base: 16px;
}

/* 超大字号模式：正文 18px（适合 50+ 老花眼） */
:root[data-font-size="xlarge"] {
  --font-base: 18px;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: var(--font-base);
  background: var(--bg-page);
  min-height: 100vh;
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}

/* ============ Skip-link 无障碍 ============ */
.skip-link:focus {
  position: fixed !important;
  left: 16px !important;
  top: 16px !important;
  width: auto !important;
  height: auto !important;
  padding: 12px 20px !important;
  background: var(--primary) !important;
  color: white !important;
  border-radius: var(--radius) !important;
  z-index: 10000 !important;
  overflow: visible !important;
}

/* ============ iPhone 安全区适配 ============ */
/* main-nav 已是底部固定栏，其安全区在专门块（734 行起）已处理 */
header, .modal-content, #wd-box, #wa-box, #nc-box, #ep-box, #cp-box, #lh-box, #hp-box, #od-box, .pay-modal {
  padding-top: env(safe-area-inset-top);
}
.action-area, .modal-actions, #wd-foot, #wa-foot, #nc-box, #ep-foot, #cp-foot, #lh-box, #hp-foot, #od-box, .pay-action-area {
  padding-bottom: env(safe-area-inset-bottom);
}

/* ============ 模态框 overscroll 隔离 ============ */
.modal,
.modal-content,
#wd-overlay,
#wa-overlay,
#nc-overlay,
#ep-overlay,
#cp-overlay,
#lh-overlay,
#hp-overlay,
#od-overlay {
  overscroll-behavior: contain;
}

/* ============ 认证页面 ============ */
#auth-page,
.auth-page-full {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    linear-gradient(rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.08)),
    radial-gradient(circle at 20% 12%, rgba(59, 130, 246, 0.38), transparent 24rem),
    radial-gradient(circle at 84% 20%, rgba(45, 212, 191, 0.24), transparent 22rem),
    linear-gradient(135deg, #eef6ff 0%, #f8fafc 52%, #e7f5ef 100%);
  position: relative;
  overflow: hidden;
}

#auth-page::before,
.auth-page-full::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.06) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, black, transparent 80%);
}

.auth-container {
  width: 100%;
  max-width: 440px;
  padding: 48px 40px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 18px;
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(22px);
  animation: fadeInUp 0.6s ease;
  position: relative;
  isolation: isolate;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-logo {
  font-size: 76px;
  text-align: center;
  margin-bottom: 8px;
  filter: drop-shadow(0 18px 24px rgba(37, 99, 235, 0.18));
}

/* 上传的 Logo 图片（比 emoji 略大、更清晰） */
.auth-logo-img {
  display: block;
  margin: 0 auto;
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 12px;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.auth-container h1 {
  text-align: center;
  font-size: clamp(30px, 5vw, 40px);
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: 0;
  line-height: 1.08;
  text-wrap: balance;
}

.auth-container .subtitle {
  text-align: center;
  color: var(--gray-500);
  margin-bottom: 32px;
  font-size: 15px;
}

.back-link {
  display: block;
  text-align: center;
  margin-top: 24px;
  color: var(--gray-500);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.back-link:hover {
  color: var(--primary);
}

/* Tabs */
.tabs {
  display: flex;
  margin-bottom: 28px;
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 4px;
}

.tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: var(--transition-slow);
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-500);
}

.tab.active {
  background: var(--surface-strong);
  color: var(--primary);
  box-shadow: var(--shadow);
}

.tab:hover:not(.active) {
  color: var(--gray-700);
}

/* ============ 表单 ============ */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
}

.form-group .required {
  color: var(--danger);
}

.form-group .optional {
  color: var(--gray-400);
  font-weight: 400;
}

form input,
form textarea,
form select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 15px;
  transition: var(--transition);
  background: var(--surface-strong);
  color: var(--gray-800);
  font-family: inherit;
}

form input:hover,
form textarea:hover {
  border-color: var(--gray-300);
}

form input:focus,
form textarea:focus,
form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-bg);
}

form input:focus:focus-visible,
form textarea:focus:focus-visible,
form select:focus:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 2px;
}

form input::placeholder,
form textarea::placeholder {
  color: var(--gray-400);
}

form button[type="submit"],
.btn-submit {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-accent) 100%);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-slow);
  position: relative;
  overflow: hidden;
}

form button[type="submit"]:hover,
.btn-submit:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 16px 28px -18px rgba(37, 99, 235, 0.72);
}

form button[type="submit"]:active,
.btn-submit:active {
  transform: translateY(1px) scale(0.99);
}

form button[type="submit"]:disabled,
.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.agreement {
  margin: 24px 0;
  font-size: 13px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 10px;
}

.agreement input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.agreement a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.agreement a:hover {
  text-decoration: underline;
}

/* ============ 超时开关 ============ */
.overtime-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-300);
  border-radius: 13px;
  cursor: pointer;
  transition: background 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: var(--surface-strong);
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

.overtime-label-text {
  font-size: 14px;
  color: var(--gray-600);
  font-weight: 500;
}

.overtime-days-wrap {
  padding: 12px 14px;
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 2px solid var(--gray-200);
}

.overtime-days-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.overtime-days-wrap select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--surface-strong);
  color: var(--gray-800);
  cursor: pointer;
}

.overtime-fee-hint {
  margin-top: 8px;
  font-size: 13px;
  color: var(--orange);
  font-weight: 500;
}

/* ============ 订单总价栏 ============ */
.order-total-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fff7ed, #fff);
  border: 2px solid var(--orange-light);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.order-total-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
}

.order-total-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--orange);
}

/* 价格输入（¥ 与 input 同格叠放，避免相对整块区域 50% 导致偏下） */
.price-input-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: 10px;
}

.price-symbol {
  grid-row: 1;
  grid-column: 1;
  align-self: center;
  justify-self: start;
  margin-left: 16px;
  z-index: 1;
  pointer-events: none;
  color: var(--gray-500);
  font-weight: 600;
  font-size: 18px;
  line-height: 1;
}

.price-input-wrapper input {
  grid-row: 1;
  grid-column: 1;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding-left: 40px !important;
  padding-right: 14px;
  padding-top: 12px;
  padding-bottom: 12px;
  font-size: var(--font-key);
  font-weight: 700;
}

.price-tips {
  grid-row: 2;
  grid-column: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.min-price {
  font-size: 12px;
  color: var(--gray-500);
}

.quick-prices {
  display: flex;
  gap: 8px;
}

.price-btn {
  padding: 6px 14px;
  border: 2px solid var(--gray-200);
  background: var(--surface-strong);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  transition: var(--transition);
}

.price-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.price-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ============ 用户页面 ============ */
#user-page {
  background: var(--gray-50);
  min-height: 100vh;
}

/* Header */
/* ============ Header ============ */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border-bottom: 0.5px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 12px;
  box-shadow: var(--glass-highlight);
}

.header-logo-area {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
}

.header-logo-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  flex-shrink: 0;
  color: #0f766e;
  background:
    radial-gradient(circle at 32% 18%, rgba(255,255,255,0.95), rgba(255,255,255,0) 44%),
    linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(226, 234, 243, 0.86));
  border: 1px solid rgba(148, 163, 184, 0.32);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.88);
}

.header-logo-emoji {
  /* legacy alias */
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}

.header-logo-area h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.header-right,
header .header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.user-badge,
.admin-badge {
  padding: 8px 16px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
}

/* 合并后 user-badge 作为可点击入口（原为 span，现改为 button） */
button.user-badge {
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

button.user-badge:hover {
  background: var(--gray-200);
}

button.user-badge:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 2px;
}

header button {
  padding: 8px 14px;
  background: var(--gray-100);
  color: var(--gray-700);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

header button:hover {
  background: var(--gray-200);
  color: var(--gray-900);
}

/* 退出按钮 — 红色危险样式 */
header .btn-logout {
  background: var(--surface-strong);
  color: var(--danger);
  border: 1.5px solid var(--danger);
  padding: 7px 13px;
}

header .btn-logout:hover {
  background: var(--danger);
  color: white;
}

.notification-btn {
  padding: 8px 10px;
  background: transparent;
  font-size: 18px;
  border: none;
}

/* 主导航 — 底部固定栏（微信/Telegraph 风格） */
.main-nav {
  position: fixed;
  bottom: 8px;
  left: 8px;
  right: 8px;
  z-index: 90;
  display: flex;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  gap: 0;
  border: 0.5px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-2xl);
  box-shadow: var(--glass-shadow), var(--glass-highlight);
  max-width: 704px;
  margin: 0 auto;
  overflow: hidden;
}

.main-nav button {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: var(--font-xs);
  font-weight: 500;
  color: var(--gray-500);
  transition: color 0.15s;
  white-space: nowrap;
  min-height: 56px;
  font-family: inherit;
  border-radius: var(--radius);
}

.main-nav button .nav-icon {
  font-size: 22px;
  line-height: 1;
  position: relative;
  display: inline-block;
}

.main-nav button .nav-text {
  font-size: var(--font-xs);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.main-nav button:hover {
  background: var(--gray-50);
  color: var(--gray-800);
}

.main-nav button.active {
  color: var(--primary);
  background: transparent;
  box-shadow: none;
}

.main-nav button.active .nav-icon {
  position: relative;
}

.main-nav button.active .nav-icon::before {
  display: none;
}

.main-nav button .nav-svg {
  width: 26px;
  height: 26px;
  display: block;
  flex-shrink: 0;
  opacity: 0.55;
  transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.main-nav button.active .nav-svg {
  opacity: 1;
  transform: translateY(-1px);
}

.main-nav button.active .nav-text {
  font-weight: 600;
}

.main-nav .nav-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  width: auto;
  height: auto;
  min-height: 26px;
  padding: 0;
  color: inherit;
}

.main-nav .nav-icon-notify .notification-badge {
  top: -2px;
  right: -8px;
}

.nav-svg {
  display: block;
  flex-shrink: 0;
}

.nav-svg-sm {
  width: 18px;
  height: 18px;
}

.header-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--primary);
  background: transparent;
  border: none;
  box-shadow: none;
}

.header-logo-mark .nav-svg {
  width: 22px;
  height: 22px;
}

.notification-btn {
  min-width: 36px;
  min-height: 36px;
  padding: 6px;
  border-radius: 10px;
  color: var(--gray-600);
  background: transparent;
  border: none;
}

.notification-btn:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.user-badge {
  gap: 6px;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
}

.user-badge .nav-svg-sm {
  color: var(--primary);
}


.main-nav button.active .nav-icon {
  transform: translateY(-1px);
}

.main-nav button.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* 主内容区 */
#main-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 96px;
}

/* 订单表单 */
.order-form {
  background: var(--surface-strong);
  padding: 32px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

.form-header {
  margin-bottom: 28px;
}

.order-form h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.order-form .desc {
  color: var(--gray-500);
  font-size: 14px;
}

/* 订单列表头部 */
.orders-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.orders-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
}

.order-count {
  font-weight: 400;
  color: var(--gray-500);
  font-size: 14px;
}

.btn-refresh {
  background: var(--surface-strong);
  border: 1px solid var(--gray-200);
  color: var(--gray-600);
}

.btn-refresh:hover {
  background: var(--gray-100);
}

/* 订单卡片 */
.orders-container,
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-card {
  background: var(--surface-strong);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  transition: var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.order-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary);
  transition: var(--transition);
}

.order-card.status-pending::before {
  background: var(--warning);
}

.order-card.status-processing::before {
  background: var(--info);
}

.order-card.status-completed::before {
  background: var(--success);
}

.order-card.status-cancelled::before {
  background: var(--gray-400);
}

.order-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.order-card .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--gray-200);
}

.order-card .code {
  font-weight: 700;
  font-size: 18px;
  color: var(--gray-900);
}

.order-card .header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-card .info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--gray-600);
  font-size: 14px;
}

.order-card .info div {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.order-card .info .label {
  color: var(--gray-400);
  min-width: 80px;
}

.order-card .footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--gray-200);
}

.order-card .footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.order-card .footer-right {
  display: flex;
  gap: 8px;
}

.order-card .price {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}

.order-card .price.earn {
  color: var(--success);
}

.price-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.price-note {
  font-size: 12px;
  color: var(--gray-400);
}

.order-card .time {
  font-size: 13px;
  color: var(--gray-400);
}

/* 状态标签 */
.status {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.status.pending {
  background: var(--warning-light);
  color: #92400e;
}

.status.pending::before {
  background: var(--warning);
}

.status.processing {
  background: var(--info-light);
  color: #1e40af;
}

.status.processing::before {
  background: var(--info);
}

.status.completed {
  background: var(--success-light);
  color: #065f46;
}

.status.completed::before {
  background: var(--success);
  animation: none;
}

.status.cancelled {
  background: var(--gray-200);
  color: var(--gray-600);
}

.status.cancelled::before {
  background: var(--gray-400);
  animation: none;
}

.status.approved {
  background: var(--success-light);
  color: #065f46;
}

.status.approved::before {
  background: var(--success);
}

.status.rejected {
  background: var(--danger-light);
  color: #991b1b;
}

.status.rejected::before {
  background: var(--danger);
}

/* 按钮 */
.btn {
  padding: 12px 22px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: var(--font-base);
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  min-height: var(--touch-min);
  line-height: 1.2;
}

.btn-sm {
  padding: 10px 16px;
  font-size: var(--font-sm);
  min-height: 44px;
}

.btn-xs {
  padding: 8px 12px;
  font-size: var(--font-xs);
  min-height: 40px;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -2px rgba(99, 102, 241, 0.4);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #059669;
  transform: translateY(-1px);
}

.btn-warning {
  background: var(--warning);
  color: white;
}

.btn-warning:hover {
  background: #d97706;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: var(--danger);
}

.btn-outline.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-cancel {
  flex: 1;
  padding: 14px;
  background: var(--gray-100);
  color: var(--gray-700);
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-cancel:hover {
  background: var(--gray-200);
}

/* 配送员面板 */
.courier-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-item {
  background: var(--surface-strong);
  padding: 20px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-item.highlight {
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  color: white;
  border: none;
}

.stat-item.highlight .stat-label {
  color: rgba(255, 255, 255, 0.8);
}

.stat-item.warning {
  border-color: var(--warning);
  background: var(--warning-light);
}

.stat-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: inherit;
}

.stat-label {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
}

.courier-panel {
  margin-top: 8px;
}

.courier-limited {
  opacity: 0.5;
}

.courier-limited .limit-text {
  font-style: italic;
  color: var(--gray-500);
  font-size: 13px;
}

.courier-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  background: var(--surface-strong);
  padding: 8px;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.courier-tabs button {
  flex: 1;
  padding: 14px 20px;
  border: none;
  background: transparent;
  color: var(--gray-600);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
}

.courier-tabs button:hover {
  background: var(--gray-100);
}

.courier-tabs button.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px -2px rgba(99, 102, 241, 0.4);
}

/* 空状态 */
.empty {
  text-align: center;
  padding: 40px 20px;
  background:
    radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.08), transparent 16rem),
    var(--surface-strong);
  border-radius: var(--radius-xl);
  border: 2px solid var(--gray-200);
  color: var(--gray-500);
}

.empty.error {
  border-color: var(--danger-light);
  background: #fff5f5;
}

.empty .icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.8;
  transform: scale(0.92);
  filter: saturate(0.85);
}

.empty .text {
  font-size: 16px;
  color: var(--gray-500);
  font-weight: 500;
  margin-bottom: 8px;
}

.empty button,
.empty .btn {
  margin-top: 16px;
}

/* 加载动画 */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Toast 提示 */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 16px 24px;
  background: var(--gray-800);
  color: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  font-size: 14px;
  pointer-events: auto;
}

.toast-icon {
  font-size: 18px;
}

.toast.success {
  background: var(--success);
}

.toast.error {
  background: var(--danger);
}

.toast.warning {
  background: var(--warning);
}

.toast-exit {
  animation: slideOut 0.3s ease forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(100px);
  }
}

/* 弹窗（统一实现，避免重复定义） */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  border-radius: var(--radius-xl);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-content {
  background: var(--surface-strong);
  padding: 20px 24px;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 420px;
  animation: scaleIn 0.3s ease;
}

.modal-content.modal-sm {
  max-width: 360px;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.modal-header h3 {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--gray-900);
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--gray-200);
  color: var(--gray-700);
}

.modal-desc {
  color: var(--gray-600);
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.modal-actions button {
  flex: 1;
}

/* 取消原因弹窗 */
.cancel-reason-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.reason-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}

.reason-option:hover {
  border-color: var(--primary-light);
  background: var(--primary-bg);
}

.reason-option input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

/* 「其他原因」输入：与选项卡片同一视觉体系 */
.cc-other-wrap {
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cc-other-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-bg);
  background: var(--surface-strong);
}

.cc-other-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.cc-other-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--gray-800);
  background: var(--surface-strong);
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cc-other-input:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 2px;
}

.cc-other-input::placeholder {
  color: var(--gray-400);
}

.cc-other-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

.penalty-hint {
  margin-top: 12px;
  padding: 10px 14px;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: var(--radius);
  font-size: 13px;
  color: #92400e;
  font-weight: 500;
}

/* 取消订单弹窗主按钮：与主站渐变按钮同风格，红色系 */
.cc-modal-actions .btn-cc-submit {
  flex: 1;
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  background: linear-gradient(135deg, #f87171 0%, var(--danger) 45%, var(--danger) 100%);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.cc-modal-actions .btn-cc-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45);
}

.cc-modal-actions .btn-cc-submit:active {
  transform: translateY(0);
}

.cc-modal-actions .btn-cc-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 配送员订单操作按钮组 */
.action-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-btns .btn {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
}

/* 分页 */
.page-info {
  font-size: 14px;
  color: var(--gray-500);
}

/* ============ 通用分页组件（renderPagination） ============ */
.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 14px 20px;
  background: var(--surface-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  justify-content: center;
}

.pg-info {
  font-size: 14px;
  color: var(--gray-600);
  margin: 0 6px;
  white-space: nowrap;
}

.pg-info strong {
  color: var(--primary-color);
  font-weight: 700;
}

.pg-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  background: var(--surface-strong);
  color: var(--gray-700);
  cursor: pointer;
  transition: background-color 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s, transform 0.18s, opacity 0.18s;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.4;
}

.pg-btn:hover:not(.pg-disabled):not(:disabled) {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: var(--primary-light);
}

.pg-disabled,
.pg-btn:disabled,
.pg-btn.pg-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.pg-prev,
.pg-next {
  min-width: 80px;
}

.pg-go {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.pg-go:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}

.pg-jump-label {
  font-size: 13px;
  color: var(--gray-500);
  white-space: nowrap;
  margin-left: 4px;
}

.pg-input {
  width: 52px;
  padding: 5px 8px;
  font-size: 13px;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  text-align: center;
  color: var(--gray-800);
  background: var(--surface-strong);
  outline: none;
  transition: border-color 0.18s;
  font-family: inherit;
  -moz-appearance: textfield;
}

.pg-input:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 2px;
}

.pg-input::-webkit-inner-spin-button,
.pg-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.pg-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
}

/* ============ 管理后台 ============ */
#admin-section {
  background: var(--gray-50);
  min-height: 100vh;
}

.admin-nav {
  display: flex;
  background: var(--surface-strong);
  padding: 12px 24px;
  gap: 8px;
  border-bottom: 1px solid var(--gray-200);
  overflow-x: auto;
}

.admin-nav button {
  padding: 12px 20px;
  border: none;
  background: var(--gray-100);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  border-radius: 10px;
  transition: var(--transition);
  white-space: nowrap;
}

.admin-nav button:hover {
  background: var(--gray-200);
}

.admin-nav button.active {
  background: var(--primary);
  color: white;
}

#content {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 24px;
}

.dashboard {
  animation: fadeIn 0.3s ease;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title .count {
  font-weight: 400;
  color: var(--gray-500);
  font-size: 14px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.header-actions select {
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--surface-strong);
  cursor: pointer;
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface-strong);
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
  font-size: 32px;
  line-height: 1;
}

.stat-card .stat-content {
  flex: 1;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
}

.stat-card .stat-label {
  color: var(--gray-500);
  font-size: 14px;
  margin-top: 4px;
}

.stat-card.highlight {
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
  border-color: var(--primary-light);
}

.stat-card.highlight .stat-value {
  color: var(--primary);
}

.stat-card.highlight.primary {
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  border: none;
}

.stat-card.highlight.primary .stat-value,
.stat-card.highlight.primary .stat-label {
  color: white;
}

.stat-card.highlight.primary .stat-label {
  opacity: 0.8;
}

.stat-card.warning {
  border-color: var(--warning);
}

.stat-card.warning .stat-value {
  color: var(--warning);
}

.stat-card.success .stat-value {
  color: var(--success);
}

.stat-card.info .stat-value {
  color: var(--info);
}

.stat-action {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
}

.stat-action:hover {
  text-decoration: underline;
}

/* 表格 */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.admin-table {
  width: 100%;
  background: var(--surface-strong);
  border-collapse: collapse;
  min-width: 800px;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
}

.admin-table th {
  background: var(--gray-50);
  font-weight: 600;
  color: var(--gray-600);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.admin-table tbody tr {
  transition: background 0.2s;
}

.admin-table tbody tr:hover {
  background: var(--gray-50);
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table code {
  background: var(--gray-100);
  padding: 4px 8px;
  border-radius: 4px;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 13px;
}

.text-ellipsis {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-nowrap {
  white-space: nowrap;
}

.text-muted {
  color: var(--gray-500);
  font-size: var(--font-sm);
}

/* 表格单元格内的小字辅助文本（如处理备注） */
.text-cell-meta {
  margin-top: 4px;
}

/* 日期输入框（适老化：最小高度 48px、跟随字号变量） */
.date-input {
  padding: 10px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: var(--font-base);
  min-height: 48px;
  background: var(--surface, #fff);
  color: var(--gray-900);
}

/* 紧凑型统计栅格（与下一块间距收紧到 16px） */
.stats-grid-tight {
  margin-bottom: 16px;
}

/* 区块卡片（与下一块间距统一为 24px） */
.section-card-block {
  margin-bottom: 24px;
}

/* 表格单元格内的"详情"按钮（下方紧邻按钮组时使用） */
.btn-cell-detail {
  margin-bottom: 4px;
}

/* 表单内"其他"选项的附加输入框（默认隐藏，由 JS 切换 display） */
.form-extra-input {
  margin-top: 8px;
}

.form-extra-block {
  margin-top: 10px;
}

.status-select {
  padding: 6px 10px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  background: var(--surface-strong);
}

.status-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 角色徽章 */
.role-badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.role-user {
  background: var(--gray-100);
  color: var(--gray-600);
}

.role-courier {
  background: var(--info-light);
  color: #1e40af;
}

.role-admin {
  background: #fae8ff;
  color: #86198f;
}

/* 配送员审核 */
.courier-section {
  margin-bottom: 24px;
}

.warning-text {
  color: #92400e;
}

.success-text {
  color: #065f46;
}

.danger-text {
  color: #991b1b;
}

/* ============ 响应式 ============ */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-card {
    padding: 16px;
  }

  .stat-card .stat-value {
    font-size: 22px;
  }
}

/* ============================================
   手机响应式 — 全面重写
   ============================================ */

@media (max-width: 640px) {
  /* 安全区适配 */
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }

  /* Header 紧凑布局 */
  header {
    padding: 10px 14px;
    gap: 8px;
  }

  .header-logo-area h2 {
    font-size: 16px;
    max-width: 140px;
  }

  .header-logo-img {
    width: 28px;
    height: 28px;
  }

  .header-logo-mark,
  .header-logo-emoji {
    width: 28px;
    height: 28px;
  }

  header .user-info,
  header .header-right {
    gap: 6px;
  }

  /* 合并后 user-badge 是个人中心唯一入口，手机端不再隐藏 */
  .user-badge {
    display: inline-flex;
    align-items: center;
    max-width: 120px;
  }

  .user-badge #user-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  header button {
    padding: 8px 12px;
    font-size: 13px;
  }

  /* 底部导航栏移动端紧凑化 */
  .main-nav {
    padding: 4px 2px calc(4px + env(safe-area-inset-bottom, 0px));
  }

  .main-nav button {
    padding: 6px 2px;
    min-height: 52px;
  }

  .main-nav button .nav-icon {
    font-size: 20px;
  }

  .main-nav button .nav-text {
    font-size: var(--font-xs);
  }

  /* 内容区域 */
  #main-content {
    padding: 14px 14px 84px;
  }

  .page {
    padding-bottom: 0; /* 底部留空已由 #main-content 的 padding-bottom 处理 */
  }

  /* 寄件表单 */
  .order-form {
    padding: 20px 16px;
    border-radius: var(--radius-lg);
    gap: 16px;
  }

  .form-group {
    margin-bottom: 16px;
  }

  .form-group label {
    font-size: 13px;
  }

  form input,
  form textarea,
  form select {
    padding: 12px 14px;
    font-size: 15px;
  }

  form button[type="submit"],
  .btn-submit {
    padding: 14px;
    font-size: 15px;
  }

  /* 订单卡片 — 紧凑 */
  .orders-container,
  .orders-list {
    gap: 12px;
  }

  .order-card {
    padding: 16px;
  }

  .order-card::before {
    width: 3px;
  }

  .order-card .header {
    margin-bottom: 12px;
    padding-bottom: 12px;
  }

  .order-card .code {
    font-size: 16px;
  }

  .order-card .info {
    gap: 8px;
    font-size: 13px;
  }

  .order-card .footer {
    flex-direction: column;
    gap: 10px;
  }

  .order-card .footer-left,
  .order-card .footer-right {
    width: 100%;
    justify-content: space-between;
  }

  .order-card .btn {
    width: 100%;
    padding: 10px;
    font-size: 13px;
  }

  /* 配送员统计 */
  .courier-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
  }

  .stat-item {
    padding: 14px 10px;
  }

  .stat-icon {
    font-size: 20px;
    margin-bottom: 4px;
  }

  .stat-value {
    font-size: 20px;
  }

  .stat-label {
    font-size: 11px;
  }

  /* 配送员订单操作按钮 */
  .action-btns {
    gap: 6px;
  }

  .action-btns .btn {
    padding: 8px 10px;
    font-size: 12px;
  }

  /* 弹窗 — 全屏底部弹出风格 */
  .modal {
    align-items: flex-end;
  }

  .modal-content {
    padding: 20px 16px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-width: 100%;
    margin: 0;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
  }

  @keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);   opacity: 1; }
  }

  /* 取消订单弹窗 */
  .cancel-reason-list {
    gap: 8px;
  }

  .reason-option {
    padding: 10px 12px;
    font-size: 13px;
  }

  .cc-other-wrap {
    padding: 10px 12px;
  }

  .cc-other-input {
    padding: 10px 12px;
    font-size: 14px;
  }

  .cc-modal-actions .btn-cc-submit,
  .cc-modal-actions .btn-cancel {
    padding: 13px;
    font-size: 14px;
  }

  /* 通知中心/提现等抽屉式弹窗 */
  #wd-overlay,
  #wa-overlay,
  #nc-overlay,
  #ep-overlay,
  #cp-overlay,
  #od-overlay {
    align-items: flex-end;
  }

  #wd-box,
  #wa-box,
  #nc-box,
  #ep-box,
  #cp-box,
  #od-box {
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
  }

  #wd-title,
  #wa-title,
  #nc-title,
  #ep-title,
  #cp-title,
  #od-title {
    padding: 18px 16px 14px;
    font-size: 16px;
  }

  #wd-body,
  #wa-body,
  #nc-body,
  #ep-body,
  #cp-body,
  #od-body {
    padding: 0 16px 16px;
  }

  #wd-foot,
  #wa-foot,
  #nc-foot,
  #ep-foot,
  #cp-foot,
  #od-foot {
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    gap: 10px;
  }

  #wd-foot button,
  #wa-foot button,
  #ep-foot button,
  #cp-foot button {
    padding: 13px;
    font-size: 14px;
  }

  /* 提现输入 */
  .wd-input-group input {
    font-size: 16px;
  }

  /* 统计数据页 */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-card .stat-value {
    font-size: 20px;
  }

  /* 搜索过滤栏 */
  .orders-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .orders-header .btn-refresh {
    width: 100%;
  }

  /* 筛选下拉 */
  .filter-group {
    width: 100%;
  }

  .filter-group select {
    width: 100%;
    font-size: 14px;
    padding: 10px 12px;
  }

  /* 分页 */
  .pagination {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .pagination button {
    padding: 8px 12px;
    font-size: 13px;
  }

  /* 设置卡片 */
  .setting-item {
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .setting-label {
    font-size: 14px;
  }

  /* 管理表格 */
  .admin-table {
    font-size: 12px;
  }

  .admin-table th,
  .admin-table td {
    padding: 10px 8px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .header-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .header-actions select {
    flex: 1;
    min-width: 120px;
  }
}

/* ============ Reference-driven UX pass: route, progress, operations ============ */
.order-compose-grid {
  display: block;
}

.order-compose-form {
  min-width: 0;
  width: 100%;
}

.order-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: -2px 0 16px;
  padding: 10px 0 2px;
}

.order-progress.compact {
  grid-template-columns: 1fr;
}

.progress-line {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 22px;
  height: 2px;
  background: rgba(148, 163, 184, 0.26);
}

.progress-chip {
  position: relative;
  z-index: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 24px;
  padding: 4px 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.progress-chip.active {
  background: #dbeafe;
  color: #1e40af;
}

.order-progress.cancelled .progress-chip.active {
  background: #fee2e2;
  color: #991b1b;
}

.ops-focus-strip {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(110px, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}

.ops-focus-copy,
.ops-focus-item {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.ops-focus-copy {
  padding: 18px 20px;
}

.ops-focus-copy span {
  display: block;
  margin-bottom: 5px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
}

.ops-focus-copy strong {
  display: block;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.2;
  text-wrap: balance;
}

.ops-focus-item {
  display: flex;
  min-height: 86px;
  flex-direction: column;
  justify-content: center;
  padding: 16px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.ops-focus-item:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.32);
  background: #f8fbff;
}

.ops-focus-item.hot {
  border-color: rgba(245, 158, 11, 0.38);
  background: linear-gradient(135deg, #fff7ed, #fff);
}

.ops-focus-item.danger {
  border-color: rgba(239, 68, 68, 0.36);
  background: linear-gradient(135deg, #fef2f2, #fff);
}

.ops-value {
  color: #0f172a;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.ops-label {
  margin-top: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.pay-method-card {
  border-radius: 18px;
}

.filter-bar,
.settings-card,
.profile-menu,
.profile-header,
.profile-stat-item {
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: var(--shadow);
}

@media (max-width: 980px) {
  .ops-focus-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .order-progress {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .progress-line {
    display: none;
  }

  .progress-chip {
    justify-content: flex-start;
    padding: 7px 10px;
  }
}

@media (max-width: 480px) {
  /* 极小屏额外调整 */
  .header-logo-area h2 {
    max-width: 110px;
    font-size: 15px;
  }

  .order-card {
    padding: 14px;
  }

  .order-card .code {
    font-size: 15px;
  }

  .courier-stats {
    gap: 8px;
  }

  .stat-item {
    padding: 12px 8px;
  }

  .auth-container {
    padding: 24px 18px;
  }

  .modal-content {
    padding: 18px 14px;
  }

  .cc-modal-actions {
    flex-direction: column;
  }
}

/* ============ 设置卡片 ============ */
.settings-card {
  background: var(--surface-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.settings-card + .settings-card {
  margin-top: 16px;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 56px;
  padding: 16px 20px;
  gap: 16px;
}

.setting-info {
  flex: 1;
}

.setting-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.setting-desc {
  font-size: 13px;
  color: var(--gray-500);
}

.setting-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fee-rate-input {
  display: flex;
  align-items: center;
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 4px;
}

.fee-rate-input input {
  width: 70px;
  padding: 10px 12px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  background: var(--surface-strong);
  color: var(--primary);
}

.fee-rate-input input:focus {
  outline: none;
  border-color: var(--primary);
}

.fee-rate-input input:focus:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 2px;
}

.fee-rate-input .unit {
  padding: 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-500);
}

.setting-preview {
  background: var(--gray-50);
  padding: 16px 24px;
  border-top: 1px solid var(--gray-200);
}

.preview-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--gray-600);
}

.preview-calc {
  color: var(--gray-500);
}

.preview-calc strong {
  color: var(--primary);
}

@media (max-width: 640px) {
  .setting-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .setting-control {
    width: 100%;
    margin-top: 16px;
  }

  .preview-item {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}

/* ============ 搜索框和筛选栏 ============ */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 200px;
}

.search-box input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

.search-box input:focus:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 2px;
}

.filter-bar select {
  padding: 10px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--surface-strong);
  cursor: pointer;
  min-width: 120px;
}

/* ============ 评分组件 ============ */
.stars {
  display: inline-flex;
  gap: 2px;
}

.star {
  color: var(--gray-300);
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
}

.star.active {
  color: #fbbf24;
}

.star:hover {
  transform: scale(1.2);
}

.rating-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 20px;
}

.rating-stars .star {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 4px;
  font-size: 32px;
  color: var(--gray-300);
  transition: color 0.2s ease, transform 0.2s ease;
}

.rating-stars .star:hover,
.rating-stars .star.active {
  color: #fbbf24;
  transform: scale(1.1);
}

.rating-stars .star:hover {
  transform: scale(1.2);
}

.rating-stars .star:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.rating-text {
  text-align: center;
  color: var(--gray-500);
  font-size: 14px;
  margin-bottom: 16px;
}

/* ============ 验证码输入 ============ */
.code-input-group {
  display: flex;
  gap: 8px;
}

.code-input-group input {
  flex: 1;
}

.code-input-group button {
  white-space: nowrap;
  padding: 10px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.code-input-group button:disabled {
  background: var(--gray-400);
  cursor: not-allowed;
}

.form-footer {
  text-align: center;
  margin-top: 20px;
}

.form-footer a {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
}

.form-footer a:hover {
  text-decoration: underline;
}

.footer-sep {
  color: var(--gray-400);
  font-size: 14px;
  user-select: none;
}

/* 联系管理员卡片 */
.contact-admin-card {
  background: var(--surface-strong);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.contact-admin-icon {
  font-size: 56px;
  margin-bottom: 16px;
  animation: bounce 2s infinite;
}

.contact-admin-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.contact-admin-desc {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 24px;
}

.contact-admin-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.contact-label {
  font-size: 18px;
}

.contact-value {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.contact-value:hover {
  text-decoration: underline;
}

/* ============ 通知组件 ============ */
.toast.notification {
  flex-direction: column;
  align-items: stretch;
  padding: 16px;
  max-width: 320px;
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.notification-message {
  font-size: 13px;
  opacity: 0.9;
}

.notification-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.7;
  transition: var(--transition);
}

.notification-close:hover {
  opacity: 1;
}

/* ============ 价格信息 ============ */
.price-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.price-note {
  font-size: 12px;
  color: var(--gray-400);
}

/* ============ 表单行 ============ */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 540px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ============ 设置页面 ============ */
.settings-page {
  animation: fadeIn 0.3s ease;
}

.settings-sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.settings-section {
  margin-bottom: 8px;
}

.settings-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.setting-control input,
.setting-control select,
.setting-control textarea {
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 14px;
  width: 220px;
  transition: var(--transition);
}

.setting-control.full input,
.setting-control.full textarea {
  width: 100%;
  max-width: 500px;
}

.setting-control textarea {
  resize: vertical;
  min-height: 60px;
}

.setting-control input:focus,
.setting-control select:focus,
.setting-control textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

.setting-control input:focus:focus-visible,
.setting-control select:focus:focus-visible,
.setting-control textarea:focus:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 2px;
}

.setting-control select {
  cursor: pointer;
  background: var(--surface-strong);
}

.input-with-unit {
  display: flex;
  align-items: center;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.input-with-unit input {
  border: none;
  background: var(--surface-strong);
  border-radius: 0;
  width: 100px;
  text-align: center;
}

.input-with-unit .unit {
  padding: 10px 12px;
  color: var(--gray-500);
  font-weight: 500;
  font-size: 14px;
  background: var(--gray-100);
}

.settings-actions {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: center;
}

.btn-lg {
  padding: 14px 40px;
  font-size: 16px;
}

@media (max-width: 768px) {
  .setting-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .setting-control,
  .setting-control input,
  .setting-control select {
    width: 100%;
  }

  .setting-control.full input,
  .setting-control.full textarea {
    max-width: 100%;
  }
}

/* ============ 骨架屏加载 ============ */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-card {
  height: 120px;
  margin-bottom: 16px;
}

/* ============ 空状态增强（已合并至主定义） ============ */
.empty .sub-text {
  font-size: 14px;
  color: var(--gray-400);
}

.empty.error .icon {
  color: var(--danger);
}

/* ============ 必填标记 ============ */
.required {
  color: var(--danger);
  margin-left: 2px;
}

.optional {
  color: var(--gray-400);
  font-weight: 400;
  font-size: 12px;
}

/* ============ 表格优化 ============ */
.text-ellipsis {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-nowrap {
  white-space: nowrap;
}

/* ============ 按钮组 ============ */
.btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============ 警告/成功文本 ============ */
.warning-text {
  color: var(--warning);
}

.success-text {
  color: var(--success);
}

.danger-text {
  color: var(--danger);
}

/* ============ 子标题 ============ */
.sub-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============ 配送员分区 ============ */
.courier-section:last-child {
  margin-bottom: 0;
}

/* ============ 弹窗基础样式（.modal-overlay 作为 .modal 别名，保持向后兼容） ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
  box-sizing: border-box;
}

/* @keyframes fadeIn 已在文件前文定义，此处不再重复 */

.modal-overlay .modal,
.modal-overlay .admin-modal {
  position: relative;
  inset: auto;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  display: block;
  align-items: initial;
  justify-content: initial;
  background: var(--surface-strong);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  height: auto;
  min-height: 0;
  min-width: 320px;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
  padding: 20px 24px;
  box-sizing: border-box;
}

.modal-overlay .modal .modal-header,
.modal-overlay .admin-modal .modal-header {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-100);
  min-width: 0;
}

.modal-overlay .modal .modal-header h4,
.modal-overlay .admin-modal .modal-header h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.modal-overlay .modal .close-btn,
.modal-overlay .admin-modal .close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.modal-overlay .modal .close-btn:hover,
.modal-overlay .admin-modal .close-btn:hover {
  background: var(--gray-200);
  color: var(--gray-700);
}

.modal-overlay .modal form,
.modal-overlay .admin-modal form {
  display: block;
}

.modal-overlay .modal .form-group,
.modal-overlay .admin-modal .form-group {
  margin-bottom: 16px;
}

.modal-overlay .modal .modal-desc,
.modal-overlay .admin-modal .modal-desc {
  color: var(--gray-600);
  margin-bottom: 20px;
  font-size: 14px;
}

.modal-overlay .modal .modal-footer,
.modal-overlay .admin-modal .modal-footer {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
}

.modal-overlay .modal .modal-footer .btn-outline,
.modal-overlay .admin-modal .modal-footer .btn-outline,
.modal-overlay .modal .modal-footer .btn-primary,
.modal-overlay .admin-modal .modal-footer .btn-primary {
  flex: 1;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============ 支付弹窗 - 全新设计 ============ */
/* ============ 支付弹窗 - 全新设计 ============ */

.pay-modal {
  max-width: 420px;
  width: 100%;
  /* 新增：确保响应式 */

  /* --- 核心修复开始 --- */
  height: fit-content;
  min-height: auto;
  max-height: 90vh;
  /* 防止超高屏幕溢出 */
  /* --- 核心修复结束 --- */

  padding: 0;
  overflow: hidden;
  position: relative;

  /* 建议添加：为了更好的视觉效果 */
  background: var(--surface-strong);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}


.modal-close-x {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  font-size: 20px;
  color: var(--gray-500);
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-x:hover {
  background: var(--gray-200);
  color: var(--gray-700);
}

.pay-step {
  padding: 32px;
}

.pay-header {
  text-align: center;
  margin-bottom: 24px;
}

.pay-icon-large {
  font-size: 48px;
  margin-bottom: 12px;
  animation: bounce 1s ease infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

.pay-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 8px 0;
}

.pay-subtitle {
  font-size: 14px;
  color: var(--gray-500);
  margin: 0;
}

.pay-amount-card {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.pay-amount-label {
  display: block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 4px;
}

.pay-amount-value {
  font-size: 36px;
  font-weight: 800;
  color: white;
  letter-spacing: -1px;
}

.pay-methods-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.pay-method-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 16px;
  background: var(--surface-strong);
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
  position: relative;
  overflow: hidden;
}

.pay-method-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pay-method-card.alipay::before {
  background: linear-gradient(90deg, var(--link) 0%, var(--highlight) 100%);
}

.pay-method-card.wechat::before {
  background: linear-gradient(90deg, var(--wechat) 0%, #2aae67 100%);
}

.pay-method-card:hover::before,
.pay-method-card.active::before {
  opacity: 1;
}

.pay-method-card.alipay:hover,
.pay-method-card.alipay.active {
  border-color: var(--link);
  background: #f0f7ff;
}

.pay-method-card.wechat:hover,
.pay-method-card.wechat.active {
  border-color: var(--wechat);
  background: #f0fff4;
}

.pay-method-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.pay-method-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.pay-method-card.alipay .pay-method-icon {
  background: linear-gradient(135deg, var(--link) 0%, var(--highlight) 100%);
  color: white;
}

.pay-method-card.wechat .pay-method-icon {
  background: linear-gradient(135deg, #07c160 0%, #2aae67 100%);
  color: white;
}

.pay-method-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--gray-800);
}

.pay-method-desc {
  font-size: 12px;
  color: var(--gray-400);
}

.pay-cancel-btn {
  width: 100%;
  padding: 14px;
  background: transparent;
  border: none;
  color: var(--gray-500);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.pay-cancel-btn:hover {
  color: var(--gray-700);
}

/* 二维码步骤 */
.pay-qr-container {
  background: var(--gray-50);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}

.pay-qr-box {
  background: var(--surface-strong);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  position: relative;
  min-height: 200px;
}

.pay-qr-box img {
  max-width: 180px;
  height: 180px;
  object-fit: contain;
  border-radius: 8px;
}

.pay-qr-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface-strong);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--gray-500);
  font-size: 14px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.pay-qr-info {
  text-align: center;
}

.pay-qr-tip {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 12px;
  padding: 8px 16px;
  background: var(--gray-100);
  border-radius: 8px;
  display: inline-block;
}

.pay-manual-tip {
  font-size: 13px;
  color: #ea580c;
  background: #fff7ed;
  padding: 10px 16px;
  border-radius: 8px;
  margin: 12px 0;
  border: 1px dashed #fb923c;
}

.pay-qr-amount {
  margin-bottom: 8px;
}

.pay-qr-amount .label {
  font-size: 13px;
  color: var(--gray-500);
  margin-right: 8px;
}

.pay-qr-amount .value {
  font-size: 24px;
  font-weight: 700;
  color: #ef4444;
}

.pay-qr-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: var(--warning);
}

.pay-qr-timer .icon {
  font-size: 16px;
}

.pay-qr-timer strong {
  color: #ea580c;
}

.pay-qr-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-direct-pay {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.btn-direct-pay:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
  color: white;
}

.btn-check-pay {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-check-pay:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.btn-retry-pay {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-retry-pay:hover {
  border-color: var(--gray-300);
  background: var(--gray-50);
}

/* 订单卡片支付按钮 */
.order-pay-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.order-pay-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

/* 支付状态标签 */
.payment-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.payment-status.unpaid {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
}

.payment-status.paid {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
}

/* 响应式 */
@media (max-width: 480px) {
  .pay-modal {
    max-width: 100%;
    margin: 16px;
  }

  .pay-step {
    padding: 24px;
  }

  .pay-amount-value {
    font-size: 28px;
  }

  .pay-method-card {
    padding: 16px 12px;
  }

  .pay-method-icon {
    width: 48px;
    height: 48px;
  }
}

/* ============ 注册表单增强 ============ */
.required {
  color: var(--danger);
  font-weight: 500;
}

.form-hint {
  display: block;
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 6px;
}

form select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 40px;
}

form select:hover {
  border-color: var(--gray-300);
}

/* ============ 职工管理样式 ============ */
.employee-management {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-card {
  background: var(--surface-strong);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.dept-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.dept-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--gray-50);
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s, opacity 0.2s;
}

.dept-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.dept-name {
  font-weight: 500;
  color: var(--gray-900);
}

.dept-count {
  font-size: 12px;
  color: var(--gray-500);
  background: var(--gray-200);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
}

.dept-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-left: auto;
}

.dept-actions .btn {
  width: 60px;
  min-width: 60px;
}

.dept-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-light) 0%, #dbeafe 100%);
  color: var(--primary-color);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.dept-select {
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  background: var(--surface-strong);
  font-size: 14px;
  min-width: 150px;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 4px;
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.empty-text {
  text-align: center;
  color: var(--gray-400);
  padding: 20px;
  grid-column: 1 / -1;
}

.empty-cell {
  text-align: center;
  color: var(--gray-400);
  padding: 40px 20px;
}

/* 确认收货按钮 */
.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* 待确认状态 */
.status.awaiting_confirm,
.order-card.status-awaiting_confirm .status {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

/* ========================================================
   重置密码弹窗 — 完全独立，使用 rp- 前缀，不依赖任何旧 class
   ======================================================== */
#rp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: rpFadeIn 0.2s ease;
}

@keyframes rpFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#rp-box {
  background: var(--surface-strong);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 380px;
  animation: rpSlideUp 0.25s ease;
  overflow: hidden;
}

@keyframes rpSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 标题栏 */
#rp-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
}

#rp-title-text {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--gray-900);
  white-space: nowrap;
}

#rp-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

#rp-close:hover {
  background: #e5e7eb;
  color: #374151;
}

/* 内容区 */
#rp-body {
  padding: 16px 24px 20px;
}

#rp-hint {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 16px;
  line-height: 1.5;
}

#rp-hint strong {
  color: #111827;
}

.rp-field {
  margin-bottom: 14px;
}

.rp-field:last-child {
  margin-bottom: 0;
}

.rp-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.rp-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  font-size: 14px;
  color: #111827;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.rp-field input:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 2px;
}

.rp-field input:focus {
  border-color: #6366f1;
  background: var(--surface-strong);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

/* 底部按钮 */
#rp-foot {
  display: flex;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid #e5e7eb;
}

.rp-btn-cancel,
.rp-btn-confirm {
  flex: 1;
  padding: 12px 16px;
  font-size: var(--font-base);
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s, opacity 0.2s;
  font-family: inherit;
}

.rp-btn-cancel {
  background: #f3f4f6;
  color: #374151;
}

.rp-btn-cancel:hover {
  background: #e5e7eb;
  color: #111827;
}

.rp-btn-confirm {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
}

.rp-btn-confirm:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.rp-btn-confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ========================================================
   职工编辑弹窗 — 完全独立，使用 ee- 前缀，与 rp- 风格一致
   ======================================================== */
#ee-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: eeFadeIn 0.2s ease;
}

@keyframes eeFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#ee-box {
  background: var(--surface-strong);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 380px;
  animation: eeSlideUp 0.25s ease;
  overflow: hidden;
}

@keyframes eeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

#ee-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
}

#ee-title-text {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--gray-900);
  white-space: nowrap;
}

#ee-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

#ee-close:hover {
  background: #e5e7eb;
  color: #374151;
}

#ee-body {
  padding: 16px 24px 20px;
}

.ee-field {
  margin-bottom: 14px;
}

.ee-field:last-child {
  margin-bottom: 0;
}

.ee-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.ee-field input,
.ee-field select {
  width: 100%;
  padding: 9px 12px;
  font-size: 14px;
  color: #111827;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  box-sizing: border-box;
}

.ee-field input:focus-visible,
.ee-field select:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 2px;
}

.ee-field input:focus,
.ee-field select:focus {
  border-color: #6366f1;
  background: var(--surface-strong);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

#ee-foot {
  display: flex;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid #e5e7eb;
}

.ee-btn-cancel,
.ee-btn-confirm {
  flex: 1;
  padding: 12px 16px;
  font-size: var(--font-base);
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s, opacity 0.2s;
  font-family: inherit;
}

.ee-btn-cancel {
  background: #f3f4f6;
  color: #374151;
}

.ee-btn-cancel:hover {
  background: #e5e7eb;
  color: #111827;
}

.ee-btn-confirm {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
}

.ee-btn-confirm:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.ee-btn-confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ========================================================
   编辑用户弹窗 — 使用 eu- 前缀，与 rp- 风格一致
   ======================================================== */
#eu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: euFadeIn 0.2s ease;
}

@keyframes euFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#eu-box {
  background: var(--surface-strong);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 380px;
  animation: euSlideUp 0.25s ease;
  overflow: hidden;
}

@keyframes euSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

#eu-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
}

#eu-title-text {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--gray-900);
  white-space: nowrap;
}

#eu-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

#eu-close:hover {
  background: #e5e7eb;
  color: #374151;
}

#eu-body {
  padding: 16px 24px 20px;
}

.eu-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.eu-row .eu-field {
  flex: 1;
  margin-bottom: 0;
}

.eu-field {
  margin-bottom: 14px;
}

.eu-field:last-child {
  margin-bottom: 0;
}

.eu-readonly label {
  margin-bottom: 6px;
}

.eu-stat {
  padding: 10px 14px;
  font-size: 14px;
  color: #374151;
  background: #f3f4f6;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  line-height: 1.4;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.eu-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.eu-field input,
.eu-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  font-size: 14px;
  color: #111827;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.eu-field input:focus-visible,
.eu-field select:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 2px;
}

.eu-field input:focus,
.eu-field select:focus {
  border-color: #6366f1;
  background: var(--surface-strong);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

#eu-foot {
  display: flex;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid #e5e7eb;
}

.eu-btn-cancel,
.eu-btn-confirm {
  flex: 1;
  padding: 12px 16px;
  font-size: var(--font-base);
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s, opacity 0.2s;
  font-family: inherit;
}

.eu-btn-cancel {
  background: #f3f4f6;
  color: #374151;
}

.eu-btn-cancel:hover {
  background: #e5e7eb;
  color: #111827;
}

.eu-btn-confirm {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
}

.eu-btn-confirm:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.eu-btn-confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ========================================================
   通知中心弹窗 — nc- 前缀
   ======================================================== */
#nc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: ncFadeIn 0.2s ease;
  box-sizing: border-box;
}

@keyframes ncFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#nc-box {
  background: var(--surface-strong);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: ncSlideUp 0.25s ease;
  overflow: hidden;
}

@keyframes ncSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

#nc-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

#nc-title-text {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--gray-900);
  white-space: nowrap;
}

#nc-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  font-size: 20px;
  color: var(--gray-500);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s, opacity 0.2s;
}

#nc-close:hover {
  background: #e5e7eb;
  color: #374151;
}

#nc-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

#nc-list {
  padding: 0;
}

.nc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  color: #9ca3af;
}

.nc-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.nc-empty-text {
  font-size: 14px;
}

.nc-item {
  padding: 16px 24px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background 0.2s;
}

.nc-item:hover {
  background: #f9fafb;
}

.nc-item:last-child {
  border-bottom: none;
}

.nc-item.read {
  opacity: 0.6;
}

.nc-item-title {
  font-weight: 600;
  color: #1f2937;
  font-size: 15px;
  margin-bottom: 6px;
}

.nc-item-msg {
  font-size: 14px;
  color: #4b5563;
  margin-bottom: 8px;
  line-height: 1.5;
}

.nc-item-time {
  font-size: 12px;
  color: #9ca3af;
}
#ep-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: epFadeIn 0.2s ease;
  box-sizing: border-box;
}

@keyframes epFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#ep-box {
  background: var(--surface-strong);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 380px;
  animation: epSlideUp 0.25s ease;
  overflow: hidden;
}

@keyframes epSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

#ep-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
}

#ep-title-text {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--gray-900);
  white-space: nowrap;
}

#ep-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

#ep-close:hover {
  background: #e5e7eb;
  color: #374151;
}

#ep-body {
  padding: 16px 24px 20px;
}

.ep-field {
  margin-bottom: 14px;
}

.ep-field:last-child {
  margin-bottom: 0;
}

.ep-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.ep-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  font-size: 14px;
  color: #111827;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.ep-field input:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 2px;
}

.ep-field input:focus {
  border-color: #6366f1;
  background: var(--surface-strong);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

#ep-foot {
  display: flex;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid #e5e7eb;
}

.ep-btn-cancel,
.ep-btn-confirm {
  flex: 1;
  padding: 12px 16px;
  font-size: var(--font-base);
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s, opacity 0.2s;
  font-family: inherit;
}

.ep-btn-cancel {
  background: #f3f4f6;
  color: #374151;
}

.ep-btn-cancel:hover {
  background: #e5e7eb;
  color: #111827;
}

.ep-btn-confirm {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
}

.ep-btn-confirm:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.ep-btn-confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ========================================================
   个人中心：修改密码弹窗 — cp- 前缀，独立于所有 class
   ======================================================== */
#cp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: cpFadeIn 0.2s ease;
  box-sizing: border-box;
}

@keyframes cpFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#cp-box {
  background: var(--surface-strong);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 380px;
  animation: cpSlideUp 0.25s ease;
  overflow: hidden;
}

@keyframes cpSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

#cp-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
}

#cp-title-text {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--gray-900);
  white-space: nowrap;
}

#cp-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

#cp-close:hover {
  background: #e5e7eb;
  color: #374151;
}

#cp-body {
  padding: 16px 24px 20px;
}

.cp-field {
  margin-bottom: 14px;
}

.cp-field:last-child {
  margin-bottom: 0;
}

.cp-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.cp-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  font-size: 14px;
  color: #111827;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.cp-field input:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 2px;
}

.cp-field input:focus {
  border-color: #6366f1;
  background: var(--surface-strong);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

#cp-foot {
  display: flex;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid #e5e7eb;
}

.cp-btn-cancel,
.cp-btn-confirm {
  flex: 1;
  padding: 12px 16px;
  font-size: var(--font-base);
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s, opacity 0.2s;
  font-family: inherit;
}

.cp-btn-cancel {
  background: #f3f4f6;
  color: #374151;
}

.cp-btn-cancel:hover {
  background: #e5e7eb;
  color: #111827;
}

.cp-btn-confirm {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
}

.cp-btn-confirm:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.cp-btn-confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ========================================================
   订单详情弹窗 — od- 前缀
   ======================================================== */
#od-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: odFadeIn 0.2s ease;
  box-sizing: border-box;
}

@keyframes odFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#od-box {
  background: var(--surface-strong);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  animation: odSlideUp 0.25s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@keyframes odSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

#od-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

#od-title-text {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--gray-900);
}

#od-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

#od-close:hover {
  background: #e5e7eb;
  color: #374151;
}

#od-body {
  padding: 16px 24px 20px;
  overflow-y: auto;
  flex: 1;
}

.od-field {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
  gap: 12px;
}

.od-field:last-child {
  border-bottom: none;
}

.od-field label {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  flex-shrink: 0;
  min-width: 70px;
}

.od-value {
  font-size: 14px;
  color: #374151;
  text-align: right;
  word-break: break-all;
}

.od-value.od-highlight {
  font-weight: 700;
  color: #6366f1;
  font-size: 16px;
}

.od-value.od-id-long {
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 13px;
  color: #1f2937;
  background: #f3f4f6;
  padding: 4px 8px;
  border-radius: 6px;
}

/* 配送流程样式 */
#od-delivery-flow {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.od-flow-title {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 12px;
}

.od-flow-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
}

.od-flow-item:first-child {
  padding-top: 0;
}

.od-flow-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.od-flow-text {
  font-size: 13px;
  color: #374151;
  line-height: 1.5;
}

/* ========================================================
   个人中心：登录历史弹窗 — lh- 前缀
   ======================================================== */
#lh-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: lhFadeIn 0.2s ease;
  box-sizing: border-box;
}

@keyframes lhFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#lh-box {
  background: var(--surface-strong);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  animation: lhSlideUp 0.25s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@keyframes lhSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

#lh-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

#lh-title-text {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--gray-900);
  white-space: nowrap;
}

#lh-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

#lh-close:hover {
  background: #e5e7eb;
  color: #374151;
}

#lh-body {
  padding: 16px 24px 20px;
  overflow-y: auto;
  flex: 1;
}

/* ========================================================
   个人中心：帮助弹窗 — hp- 前缀
   ======================================================== */
#hp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: hpFadeIn 0.2s ease;
  box-sizing: border-box;
}

@keyframes hpFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#hp-box {
  background: var(--surface-strong);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  animation: hpSlideUp 0.25s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@keyframes hpSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

#hp-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

#hp-title-text {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--gray-900);
  white-space: nowrap;
}

#hp-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

#hp-close:hover {
  background: #e5e7eb;
  color: #374151;
}

#hp-body {
  padding: 16px 24px 20px;
  overflow-y: auto;
  flex: 1;
}

#hp-body .faq-item {
  margin-bottom: 16px;
}

#hp-body .faq-item:last-child {
  margin-bottom: 0;
}

#hp-body .faq-q {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 6px;
}

#hp-body .faq-a {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
}

/* ========================================================
   编辑区队弹窗 — 使用 ed- 前缀，与 rp-/eu- 风格一致
   ======================================================== */
#ed-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: edFadeIn 0.2s ease;
  box-sizing: border-box;
}

@keyframes edFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#ed-box {
  background: var(--surface-strong);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  min-width: 320px;
  max-width: 380px;
  animation: edSlideUp 0.25s ease;
  overflow: hidden;
}

@keyframes edSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

#ed-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
  min-width: 0;
}

#ed-title-text {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

#ed-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

#ed-close:hover {
  background: #e5e7eb;
  color: #374151;
}

#ed-body {
  padding: 16px 24px 20px;
}

.ed-field {
  margin-bottom: 0;
}

.ed-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.ed-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  font-size: 14px;
  color: #111827;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.ed-field input:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 2px;
}

.ed-field input:focus {
  border-color: #6366f1;
  background: var(--surface-strong);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

#ed-foot {
  display: flex;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid #e5e7eb;
}

.ed-btn-cancel,
.ed-btn-confirm {
  flex: 1;
  padding: 12px 16px;
  font-size: var(--font-base);
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s, opacity 0.2s;
  font-family: inherit;
}

.ed-btn-cancel {
  background: #f3f4f6;
  color: #374151;
}

.ed-btn-cancel:hover {
  background: #e5e7eb;
  color: #111827;
}

.ed-btn-confirm {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
}

.ed-btn-confirm:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.ed-btn-confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.order-card.status-awaiting_confirm {
  border-left-color: #f59e0b;
}

/* ============ Logo 上传控件 ============ */
.logo-upload-area {
  position: relative;
  width: 80px;
  height: 80px;
  border: 2px dashed var(--gray-300);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--gray-50);
}

.logo-upload-area:hover {
  border-color: var(--primary-color);
  background: var(--primary-light);
}

.logo-upload-area img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-upload-area .logo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--gray-400);
  font-size: 12px;
  user-select: none;
}

.logo-upload-area .logo-placeholder span:first-child {
  font-size: 24px;
}

.logo-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.btn-danger-outline {
  background: transparent;
  color: var(--danger);
  border: 1.5px solid var(--danger);
}

.btn-danger-outline:hover {
  background: #fef2f2;
}

.hidden {
  display: none !important;
}

/* ============ 操作日志页面样式 ============ */
.logs-page {
  animation: fadeIn 0.3s ease;
}

.action-type-badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.action-type-badge.action-login {
  background: var(--info-light);
  color: #1e40af;
}

.action-type-badge.action-create_order {
  background: var(--success-light);
  color: #065f46;
}

.action-type-badge.action-cancel_order {
  background: var(--warning-light);
  color: #92400e;
}

.action-type-badge.action-reset_password {
  background: var(--danger-light);
  color: #991b1b;
}

.action-type-badge.action-courier_approve {
  background: var(--success-light);
  color: #065f46;
}

.action-type-badge.action-courier_reject {
  background: var(--danger-light);
  color: #991b1b;
}

.action-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--gray-100);
  border-radius: 8px;
  font-size: 13px;
  color: var(--gray-600);
}

.action-stat-badge strong {
  color: var(--gray-800);
}

.logs-page .filter-bar {
  margin-bottom: 20px;
}

.logs-page .filter-bar select,
.logs-page .filter-bar input {
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 14px;
  background: var(--surface-strong);
}

.logs-page .filter-bar input[type="date"] {
  width: 150px;
}

/* ============ 通知中心样式 ============ */
.notification-btn {
  position: relative;
  background: var(--gray-100);
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
}

.notification-btn:hover {
  background: var(--gray-200);
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  background: var(--danger);
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 0 0 2px var(--bg-elevated, #fff);
  pointer-events: none;
  z-index: 3;
  line-height: 1;
}

.notification-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background 0.2s;
}

.notification-item:hover {
  background: var(--gray-50);
}

.notification-item.read {
  opacity: 0.6;
}

.notification-title {
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 4px;
}

.notification-msg {
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: 4px;
}

.notification-time {
  font-size: 12px;
  color: var(--gray-400);
}

/* ============ 个人中心样式 ============ */
.profile-page {
  animation: fadeIn 0.3s ease;
}

/* —— 顶部用户卡片 —— */
.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
  padding: 20px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  color: #fff;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
  flex-shrink: 0;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-info h3 {
  font-size: var(--font-lg);
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-info .profile-role {
  font-size: var(--font-sm);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0;
}

.profile-info .dept-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-full);
  font-size: var(--font-xs);
  color: #fff;
}

/* —— 统计数据 —— */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.profile-stat-item {
  background: var(--surface-strong);
  padding: 16px 12px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

.profile-stat-item .stat-value {
  font-size: var(--font-key);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.profile-stat-item .stat-label {
  font-size: var(--font-sm);
  color: var(--gray-500);
  margin-top: 6px;
}

/* —— 菜单分组 —— */
.profile-menu-group {
  margin-bottom: 20px;
}

.profile-group-title {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--gray-500);
  padding: 0 4px 8px;
  letter-spacing: 0.5px;
}

.profile-menu {
  background: var(--surface-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  border: none;
  background: var(--surface-strong);
  font-size: var(--font-base);
  color: var(--gray-800);
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--gray-100);
  font-family: inherit;
  text-align: left;
}

.profile-menu-item:last-child {
  border-bottom: none;
}

.profile-menu-item:hover {
  background: var(--gray-50);
}

.profile-menu-item:active {
  background: var(--gray-100);
}

.profile-menu-item:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: -2px;
}

/* 图标容器：统一 36×36 圆形底色，让 emoji 更醒目 */
.profile-menu-item .menu-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--gray-100);
  border-radius: 50%;
  flex-shrink: 0;
}

.profile-menu-item .menu-text {
  flex: 1;
  min-width: 0;
  font-weight: 500;
}

/* 右侧箭头指引 */
.profile-menu-item .menu-arrow {
  font-size: 22px;
  color: var(--gray-400);
  font-weight: 400;
  flex-shrink: 0;
  line-height: 1;
}

/* —— 个人中心移动端优化 —— */
@media (max-width: 480px) {
  .profile-header {
    padding: 16px;
    gap: 12px;
    border-radius: var(--radius-lg);
  }

  .profile-avatar {
    width: 52px;
    height: 52px;
    font-size: 26px;
  }

  .profile-info h3 {
    font-size: var(--font-md);
  }

  /* 统计数据窄屏固定 2 列，避免 3 列挤压 */
  .profile-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .profile-stat-item {
    padding: 14px 8px;
  }

  /* 注册时间是日期字符串，窄屏字号缩小避免溢出 */
  .profile-stat-item .stat-value {
    font-size: var(--font-md);
    word-break: break-all;
  }

  .profile-menu-group {
    margin-bottom: 16px;
  }

  .profile-menu-item {
    padding: 12px 14px;
    gap: 12px;
    min-height: 52px;
  }

  .profile-menu-item .menu-icon {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  .profile-menu-item .menu-text {
    font-size: var(--font-base);
  }
}

/* ============ 密码强度指示器 ============ */
.password-strength {
  margin: 10px 0 8px;
}

.strength-bar {
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  margin-bottom: 4px;
  transition: background-color 0.3s, border-color 0.3s, color 0.3s, box-shadow 0.3s, transform 0.3s, opacity 0.3s;
}

.strength-bar.weak {
  background: var(--danger);
  width: 25%;
}

.strength-bar.medium {
  background: var(--warning);
  width: 50%;
}

.strength-bar.strong {
  background: var(--success);
  width: 75%;
}

.strength-text {
  font-size: 12px;
  color: var(--gray-500);
}

/* ============ 登录历史 ============ */
.login-history-list {
  max-height: 400px;
  overflow-y: auto;
}

.login-history-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
}

.login-history-item:last-child {
  border-bottom: none;
}

.login-info {
  display: flex;
  gap: 12px;
  margin-bottom: 4px;
}

.login-time {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
}

.login-ip {
  font-size: 13px;
  color: var(--gray-500);
}

.login-device {
  font-size: 12px;
  color: var(--gray-400);
}

/* ============ FAQ 样式 ============ */
.help-content {
  padding: 8px 0;
}

.faq-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-100);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-q {
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 8px;
  font-size: 14px;
}

.faq-a {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.6;
}

/* ============ 表单辅助 ============ */
.form-hint {
  display: block;
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 4px;
}

/* ============ 配送员收入明细 ============ */
.earnings-detail {
  background: var(--surface-strong);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.earnings-summary {
  margin-bottom: 24px;
}

.earnings-card {
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  color: white;
  padding: 24px;
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: 16px;
}

.earnings-label {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 8px;
}

.earnings-value {
  font-size: 36px;
  font-weight: 800;
}

.earnings-note {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 8px;
}

.earnings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.earnings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--gray-50);
  border-radius: var(--radius);
  font-size: 14px;
}

.earnings-item .label {
  color: var(--gray-500);
}

.earnings-item .value {
  font-weight: 600;
  color: var(--gray-700);
}

.earnings-item .value.highlight {
  color: var(--success);
  font-size: 16px;
}

.earnings-history h4,
.withdraw-section h4,
.withdraw-panel > h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 12px;
}

.earnings-list {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}

.earnings-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
}

.earnings-item-row:last-child {
  border-bottom: none;
}

.earnings-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.earnings-order {
  font-weight: 500;
  color: var(--gray-700);
}

.earnings-time {
  font-size: 12px;
  color: var(--gray-400);
}

.earnings-amount {
  text-align: right;
}

.earnings-amount .amount {
  font-weight: 700;
  color: var(--success);
  font-size: 16px;
}

.earnings-amount .order-amount {
  font-size: 12px;
  color: var(--gray-400);
}

.withdraw-panel {
  margin-top: 24px;
  padding: 18px 18px 20px;
  background: linear-gradient(180deg, #fafafa 0%, #fff 40%);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.withdraw-balance-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(59, 130, 246, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.withdraw-balance-card .label {
  font-size: 13px;
  color: var(--gray-600);
}

.withdraw-balance-card .value {
  font-size: 28px;
  font-weight: 700;
  color: var(--success, #059669);
  letter-spacing: -0.02em;
}

.withdraw-section {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.withdraw-account-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 14px;
  line-height: 1.45;
}

.withdraw-account-banner .w-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.withdraw-account-banner.missing {
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.withdraw-account-banner.missing .w-icon {
  background: #fef3c7;
  color: #b45309;
}

.withdraw-account-banner.ok {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.withdraw-account-banner.ok .w-icon {
  background: #d1fae5;
  color: #047857;
}

.withdraw-account-banner .w-body {
  flex: 1;
  min-width: 0;
}

.withdraw-account-banner .w-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 4px;
}

.withdraw-account-banner .w-desc {
  font-size: 13px;
  color: var(--gray-600);
}

.withdraw-account-banner .w-action {
  flex-shrink: 0;
  align-self: center;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary, #6366f1);
  background: transparent;
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s;
}

.withdraw-account-banner .w-action:hover {
  background: rgba(99, 102, 241, 0.06);
  border-color: var(--primary, #6366f1);
}

.withdraw-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.withdraw-actions .btn {
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
}

.withdraw-actions .btn-ghost-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  background: var(--gray-100);
  color: var(--gray-500);
  border: 1px dashed var(--gray-300);
}

.withdraw-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  background: var(--gray-50);
  border-radius: var(--radius);
}

.info-item .label {
  font-size: 12px;
  color: var(--gray-500);
}

.info-item .value {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
}

/* ============ 订单详情样式 ============ */
.detail-content {
  padding: 8px 0;
}

.detail-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 12px;
  color: var(--gray-500);
}

.detail-value {
  font-size: 14px;
  color: var(--gray-800);
}

.detail-value.highlight {
  font-weight: 700;
  color: var(--primary);
  font-size: 18px;
}

.detail-comment {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}

.order-card {
  cursor: pointer;
}

/* ============ 图表样式 ============ */
.charts-section {
  margin-bottom: 24px;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.chart-card {
  background: var(--surface-strong);
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.chart-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 16px;
}

.donut-chart {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 16px;
}

.donut-chart .donut {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.donut-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-800);
}

.donut-label {
  font-size: 12px;
  color: var(--gray-500);
}

.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-600);
}

.legend-item .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ============ 配送员操作状态提示 ============ */
.courier-hint {
  padding: 10px 14px;
  margin: 8px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.courier-hint.accepted {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  border-left: 3px solid #3b82f6;
}

.courier-hint.picked {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border-left: 3px solid #f59e0b;
}

.courier-hint.placed {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  border-left: 3px solid #10b981;
}

/* ========================================================
   提现申请弹窗 — wd- 前缀
   ======================================================== */
#wd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: wdFadeIn 0.2s ease;
  box-sizing: border-box;
}

@keyframes wdFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#wd-box {
  background: var(--surface-strong);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 400px;
  animation: wdSlideUp 0.25s ease;
  overflow: hidden;
}

@keyframes wdSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

#wd-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
}

#wd-title-text {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--gray-900);
}

#wd-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  font-size: 20px;
  color: var(--gray-500);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s, opacity 0.2s;
}

#wd-close:hover {
  background: #e5e7eb;
  color: #374151;
}

#wd-body {
  padding: 16px 24px 20px;
}

.wd-balance {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  text-align: center;
}

.wd-balance-label {
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 4px;
}

.wd-balance-value {
  font-size: 28px;
  font-weight: 700;
}

.wd-form-group {
  margin-bottom: 16px;
}

.wd-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.wd-input-group {
  display: flex;
  align-items: center;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.wd-input-group:focus-within {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.wd-input-group input {
  flex: 1;
  border: none;
  padding: 12px 14px;
  font-size: 16px;
  outline: none;
  min-width: 0;
}

.wd-input-group input:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 2px;
}

.wd-unit {
  padding: 12px 14px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  border-left: 1px solid #e5e7eb;
}

.wd-hint {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 6px;
  min-height: 16px;
}

.wd-hint.error {
  color: #ef4444;
}

.wd-hint.success {
  color: #10b981;
}

.wd-withdraw-type {
  padding: 12px 14px;
  background: #f3f4f6;
  border-radius: 10px;
  font-size: 14px;
  color: #6b7280;
}

.wd-setup-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 10px;
  border: 1px solid #fcd34d;
  margin-bottom: 10px;
}

.wd-setup-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.wd-setup-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: #78350f;
}

.wd-setup-text strong {
  font-weight: 700;
  color: #451a03;
}

.wd-setup-text span {
  font-size: 12px;
  opacity: 0.9;
}

.wd-btn-open-setup {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.wd-btn-open-setup:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
}

/* 配送员：提现收款信息弹窗 — wa- 前缀 */
#wa-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  box-sizing: border-box;
}

#wa-box {
  background: var(--surface-strong);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 400px;
  max-height: min(90vh, 640px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#wa-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

#wa-title-text {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--gray-900);
}

#wa-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

#wa-close:hover {
  background: #e5e7eb;
  color: #374151;
}

#wa-body {
  padding: 16px 20px 20px;
  overflow-y: auto;
  flex: 1;
}

.wa-intro {
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 14px;
  line-height: 1.5;
}

.wa-field {
  margin-bottom: 14px;
}

.wa-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.wa-select,
.wa-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-size: 14px;
  color: #111827;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.wa-select:focus-visible,
.wa-input:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 2px;
}

.wa-select:focus,
.wa-input:focus {
  border-color: #6366f1;
  background: var(--surface-strong);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.wa-file {
  display: block;
  width: 100%;
  font-size: 13px;
  padding: 8px 0;
}

.wa-hint {
  font-size: 12px;
  color: #9ca3af;
  margin: 4px 0 8px;
}

.wa-qrcode-preview-wrap {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  max-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wa-qrcode-preview {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  display: block;
}

#wa-foot {
  display: flex;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.wa-btn-cancel,
.wa-btn-confirm {
  flex: 1;
  padding: 11px 0;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s, opacity 0.2s;
  font-family: inherit;
}

.wa-btn-cancel {
  background: #f3f4f6;
  color: #374151;
}

.wa-btn-cancel:hover {
  background: #e5e7eb;
}

.wa-btn-confirm {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
}

.wa-btn-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.wa-btn-confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#wd-foot {
  display: flex;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid #e5e7eb;
}

.wd-btn-cancel {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  background: var(--surface-strong);
  color: #374151;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s, opacity 0.2s;
}

.wd-btn-cancel:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.wd-btn-confirm {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s, opacity 0.2s;
}

.wd-btn-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.wd-btn-confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ============ 提现记录 ============ */
.withdraw-records-section {
  margin-top: 24px;
}

.withdraw-records-section > h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 12px;
}

.withdraw-records-list {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}

.wd-record-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
}

.wd-record-row:last-child {
  border-bottom: none;
}

.wd-record-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wd-record-amount {
  font-weight: 700;
  color: var(--gray-800);
  font-size: 15px;
}

.wd-record-time {
  font-size: 12px;
  color: var(--gray-400);
}

.wd-record-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.wd-record-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.wd-record-status.pending {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid var(--orange-light);
}

.wd-record-status.approved {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.wd-record-status.rejected {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.wd-record-note {
  font-size: 12px;
  color: var(--gray-500);
  max-width: 180px;
  text-align: right;
  word-break: break-all;
}

/* ============ 提现详情弹窗 ============ */
.wd-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.wd-detail-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wd-detail-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 6px;
  margin-bottom: 4px;
}

.wd-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.wd-detail-row > span:first-child {
  color: var(--gray-500);
  flex-shrink: 0;
}

.wd-detail-row > span:last-child {
  color: var(--gray-800);
  text-align: right;
  word-break: break-all;
}

.wd-detail-qrcode-section {
  grid-column: 1 / -1;
}

.wd-detail-qrcode {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

/* ========================================================
   管理后台：提现详情弹窗 — wd2- 前缀
   ======================================================== */
#wd2-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: wd2FadeIn 0.2s ease;
  box-sizing: border-box;
}

@keyframes wd2FadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#wd2-box {
  background: var(--surface-strong);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  animation: wd2SlideUp 0.25s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@keyframes wd2SlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

#wd2-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

#wd2-title-text {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--gray-900);
}

#wd2-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

#wd2-close:hover {
  background: #e5e7eb;
  color: #374151;
}

#wd2-body {
  padding: 16px 24px 20px;
  overflow-y: auto;
  flex: 1;
}

/* ---- 提现详情内容（wd2-body 内部）---- */
.wd2-loading,
.wd2-error {
  padding: 40px;
  text-align: center;
}
.wd2-loading { color: var(--gray-400); }
.wd2-error   { color: var(--danger); }

.wd2-section {
  margin-bottom: 16px;
}

.wd2-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 12px;
}

.wd2-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
}

.wd2-label {
  font-size: 13px;
  color: var(--gray-500);
}

.wd2-value {
  font-size: 13px;
  color: var(--gray-900);
}

.wd2-value-amount {
  font-size: 14px;
  font-weight: 700;
  color: var(--danger);
}

.wd2-value-status {
  font-size: 13px;
  font-weight: 600;
}

.wd2-value-break {
  max-width: 200px;
  text-align: right;
  word-break: break-all;
}

.wd2-qrcode-section {
  margin-top: 16px;
}

.wd2-qrcode-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.wd2-qrcode-wrap {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

.wd2-qrcode-frame {
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 8px;
  background: var(--gray-50);
}

.wd2-qrcode-img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  display: block;
}

/* ============ 图片懒加载样式 ============ */
img.lazy {
  opacity: 0;
  transition: opacity 0.3s;
}
img.lazy[src] {
  opacity: 1;
}

/* ============ 键盘导航焦点样式 ============ */
:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* ============ 触摸友好按钮尺寸 ============ */
@media (max-width: 640px) {
  .btn {
    min-height: 44px;
    font-size: 15px;
  }
  .order-card {
    padding: 12px;
  }
}

/* ============ UI polish 2.3: product-grade surfaces and interactions ============ */
html {
  scroll-behavior: smooth;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.18;
  background-image: radial-gradient(circle at 1px 1px, rgba(15, 23, 42, 0.16) 1px, transparent 0);
  background-size: 22px 22px;
}

#user-page,
#admin-section {
  background:
    radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.08), transparent 24rem),
    radial-gradient(circle at 90% 12%, rgba(13, 148, 136, 0.08), transparent 22rem),
    #f6f9fc;
}

header {
  padding: 14px clamp(16px, 4vw, 32px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 30px -28px rgba(15, 23, 42, 0.65);
}

.header-logo-area h2,
header h2 {
  letter-spacing: 0;
  color: var(--ink);
}

.user-badge,
.admin-badge {
  background: rgba(37, 99, 235, 0.08);
  color: #1e3a8a;
  border: 1px solid rgba(37, 99, 235, 0.12);
}

header button,
.btn,
.modal-actions button,
.cc-modal-actions button,
.wd-btn-cancel,
.wd-btn-confirm,
.eu-btn-cancel,
.eu-btn-confirm,
.ee-btn-cancel,
.ee-btn-confirm,
.ed-btn-cancel,
.ed-btn-confirm {
  transition: transform 0.2s cubic-bezier(0.32, 0.72, 0, 1), box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

header button:hover,
.btn:hover,
.modal-actions button:hover,
.cc-modal-actions button:hover,
.wd-btn-cancel:hover,
.wd-btn-confirm:hover,
.eu-btn-cancel:hover,
.eu-btn-confirm:hover,
.ee-btn-cancel:hover,
.ee-btn-confirm:hover,
.ed-btn-cancel:hover,
.ed-btn-confirm:hover {
  transform: translateY(-1px);
}

header button:active,
.btn:active,
.modal-actions button:active,
.cc-modal-actions button:active,
.wd-btn-cancel:active,
.wd-btn-confirm:active,
.eu-btn-cancel:active,
.eu-btn-confirm:active,
.ee-btn-cancel:active,
.ee-btn-confirm:active,
.ed-btn-cancel:active,
.ed-btn-confirm:active {
  transform: translateY(1px) scale(0.99);
}

.admin-nav {
  gap: 8px;
  padding: 10px clamp(12px, 4vw, 28px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
}

/* main-nav 已迁移为底部固定栏，样式见 734 行起的专门块 */
.main-nav {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.admin-nav button,
.courier-tabs button {
  background: transparent;
  border: 1px solid transparent;
  color: #475569;
  min-height: 42px;
}

.admin-nav button:hover,
.courier-tabs button:hover {
  background: rgba(37, 99, 235, 0.07);
  border-color: rgba(37, 99, 235, 0.12);
  color: #1e3a8a;
}

.admin-nav button.active,
.courier-tabs button.active {
  background: #0f172a;
  color: white;
  box-shadow: 0 14px 28px -22px rgba(15, 23, 42, 0.9);
}

.btn-primary,
.btn-success,
.btn-confirm,
.wd-btn-confirm,
.eu-btn-confirm,
.ee-btn-confirm,
.ed-btn-confirm,
.cc-modal-actions .btn-cc-submit {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-accent) 100%);
  color: #fff;
  box-shadow: 0 16px 30px -22px rgba(37, 99, 235, 0.78);
}

#main-content {
  max-width: 820px;
  padding: 28px clamp(16px, 4vw, 28px) 48px;
}

#content {
  max-width: 1240px;
  margin: 28px auto 56px;
  padding: 0 clamp(16px, 4vw, 28px);
}

.order-form,
.order-card,
.stat-card,
.settings-card,
.table-container,
.empty,
.modal-content,
.contact-admin-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.order-card::after,
.stat-card::after,
.settings-card::after,
.auth-container::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s ease;
  background: radial-gradient(420px circle at var(--spotlight-x, 50%) var(--spotlight-y, 0%), rgba(37, 99, 235, 0.12), transparent 42%);
}

.order-card:hover::after,
.stat-card:hover::after,
.settings-card:hover::after,
.auth-container:hover::after {
  opacity: 1;
}

.order-form {
  padding: clamp(24px, 5vw, 40px);
}

.order-form h3,
.section-title,
.orders-header h3,
.page-header h3 {
  color: var(--ink);
  line-height: 1.14;
  text-wrap: balance;
}

.order-form .desc,
.setting-desc,
.empty .text {
  max-width: 64ch;
  text-wrap: pretty;
}

.order-card {
  border-radius: 18px;
  transform-origin: center top;
}

.order-card:hover,
.stat-card:hover {
  transform: translateY(-4px) scale(1.005);
  box-shadow: var(--shadow-lg);
}

.order-card::before {
  width: 5px;
}

.order-card .code,
.stat-card .stat-value,
.order-card .price {
  font-variant-numeric: tabular-nums;
}

.price-btn:hover,
.price-btn.active {
  transform: translateY(-1px);
}

.stats-grid {
  grid-auto-flow: dense;
}

.stat-card {
  min-height: 124px;
  border-radius: 18px;
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.08);
}

.stat-card.highlight {
  background: linear-gradient(135deg, rgba(240, 249, 255, 0.98), rgba(236, 253, 245, 0.96));
}

.stat-card.highlight.primary {
  background:
    radial-gradient(circle at 82% 12%, rgba(45, 212, 191, 0.34), transparent 12rem),
    linear-gradient(135deg, #0f172a 0%, #1e40af 100%);
}

.table-container {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.admin-table th {
  background: #f8fafc;
  color: #475569;
  letter-spacing: 0;
  text-transform: none;
}

.admin-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.04);
}

/* .empty 与 .empty .icon 已在文件前文统一合并，此处不再重复 */

.toast {
  background: #0f172a;
  box-shadow: 0 18px 38px -24px rgba(15, 23, 42, 0.85);
}

/* .modal 与 .modal-content 已在文件前文统一定义，此处不再重复 */

.ui-reveal {
  opacity: 0;
  transform: translateY(22px) scale(0.985);
  transition: opacity 0.62s ease, transform 0.62s cubic-bezier(0.32, 0.72, 0, 1);
}

.ui-reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 640px) {
  header {
    align-items: center;
    flex-wrap: nowrap;
    padding: 10px 12px;
    gap: 8px;
  }

  .header-logo-area {
    gap: 6px;
    min-width: 0;
    flex: 1;
  }

  .header-logo-area h2,
  header h2 {
    font-size: var(--font-base);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-logo-img {
    width: 28px;
    height: 28px;
  }

  .header-right,
  header .header-right,
  .user-info {
    width: auto;
    flex-wrap: nowrap;
    gap: 6px;
    flex-shrink: 0;
  }

  .user-badge {
    display: inline-flex;
    max-width: 90px;
    overflow: hidden;
  }

  .user-badge #user-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 窄屏下 header 按钮紧凑化，保持单行 */
  .user-info button {
    padding: 8px 10px;
    font-size: var(--font-sm);
    min-height: 40px;
  }

  .user-info .btn-logout {
    padding: 8px 12px;
  }

  /* main-nav 已是底部固定栏，这里仅处理 admin-nav */
  .admin-nav {
    position: sticky;
    top: 0;
    z-index: 90;
  }

  .orders-header,
  .page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .header-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .auth-container {
    padding: 34px 24px;
    border-radius: 18px;
  }

  .order-form {
    padding: 22px;
  }

  .order-card {
    padding: 18px;
  }

  .order-card .header,
  .order-card .footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .order-card .footer-left,
  .order-card .footer-right {
    width: 100%;
    flex-wrap: wrap;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .wd-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* ============ 暗色模式适配 ============ */
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --primary-bg: rgba(59, 130, 246, 0.15);
    --gray-50: #111827;
    --gray-100: #1f2937;
    --gray-200: #374151;
    --gray-300: #4b5563;
    --gray-400: #6b7280;
    --gray-500: #9ca3af;
    --gray-600: #d1d5db;
    --gray-700: #e5e7eb;
    --gray-800: #f3f4f6;
    --gray-900: #f9fafb;
    --surface: rgba(31, 41, 55, 0.9);
    --surface-strong: #1f2937;
    --ink: #f3f4f6;
  }
  body {
    background:
      radial-gradient(circle at 12% 0%, rgba(59, 130, 246, 0.18), transparent 28rem),
      radial-gradient(circle at 92% 8%, rgba(20, 184, 166, 0.14), transparent 24rem),
      linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: var(--gray-300);
  }
}

/* 减少动画偏好规则已在前文定义（见 @media (prefers-reduced-motion: reduce) 块），此处保留占位以避免重复定义 */

/* ============================================================
   退款 / 资金对账 / 投诉模块样式（admin-finance.js）
   ============================================================ */

/* ---- 投诉状态补充：resolved / closed ---- */
.status.resolved {
  background: var(--success-light);
  color: #065f46;
}

.status.resolved::before {
  background: var(--success);
  animation: none;
}

.status.closed {
  background: var(--gray-100);
  color: var(--gray-600);
}

.status.closed::before {
  background: var(--gray-400);
  animation: none;
}

/* ---- 退款详情弹窗（rf- 前缀，沿用 wd2 设计语言）---- */
.rf-loading,
.rf-error,
.cp-error {
  padding: 40px 20px;
  text-align: center;
}
.rf-loading { color: var(--gray-400); }
.rf-error,
.cp-error { color: var(--danger); }

.rf-detail,
.cp-detail {
  display: block;
}

.rf-section,
.cp-section {
  margin-bottom: 18px;
  padding-bottom: 4px;
}

.rf-section-title,
.cp-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--gray-100);
}

.rf-row,
.cp-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px solid var(--gray-100);
}

.rf-label,
.cp-label {
  font-size: 13px;
  color: var(--gray-500);
  flex-shrink: 0;
  min-width: 80px;
}

.rf-value,
.cp-value {
  font-size: 13px;
  color: var(--gray-900);
  text-align: right;
  word-break: break-word;
}

.rf-value-amount {
  font-size: 15px;
  font-weight: 700;
  color: var(--danger);
}

.rf-value-status,
.cp-value-status {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
}

.rf-value-break,
.cp-value-break {
  max-width: 280px;
  text-align: right;
  word-break: break-all;
}

.rf-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  background: var(--surface-strong);
  color: var(--gray-800);
}

.rf-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

.rf-action,
.cp-action {
  margin-top: 8px;
}

.rf-action-buttons,
.cp-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.rf-action-buttons .btn,
.cp-action-buttons .btn {
  flex: 1;
  min-width: 110px;
}

/* ---- 资金对账页 ---- */
.finance-section {
  margin-top: 28px;
}

.recon-status {
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.recon-ok {
  background: var(--success-light);
  color: #065f46;
  border: 1px solid var(--success);
}

.recon-warn {
  background: var(--warning-light);
  color: #92400e;
  border: 1px solid var(--warning);
}

/* 收入趋势柱状图（纯 CSS）*/
.trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 240px;
  padding: 16px 12px 40px;
  background: var(--surface-strong);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow-x: auto;
  box-sizing: border-box;
}

.trend-bar {
  flex: 1 0 28px;
  min-width: 28px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  cursor: pointer;
}

.trend-bar-value {
  font-size: 10px;
  color: var(--gray-500);
  margin-bottom: 4px;
  white-space: nowrap;
}

.trend-bar-fill {
  width: 70%;
  min-height: 2px;
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
}

.trend-bar:hover .trend-bar-fill {
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
}

.trend-bar-label {
  position: absolute;
  bottom: -24px;
  font-size: 10px;
  color: var(--gray-500);
  white-space: nowrap;
  line-height: 1.2;
}

/* ---- 响应式：投诉 / 退款 / 资金对账 ---- */
@media (max-width: 768px) {
  .rf-row,
  .cp-row {
    flex-direction: column;
    gap: 2px;
  }

  .rf-value,
  .cp-value,
  .rf-value-break,
  .cp-value-break {
    text-align: left;
    max-width: 100%;
  }

  .rf-action-buttons .btn,
  .cp-action-buttons .btn {
    flex: 1 1 100%;
  }

  .trend-chart {
    height: 180px;
  }

  .trend-bar-value {
    display: none;
  }
}

/* ============ 投诉 / 消息中心扩展样式（user-extra.js） ============ */

/* —— 投诉列表页 —— */
.complaints-page {
  animation: fadeIn 0.3s ease;
}

.complaints-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.complaints-page-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
}

.complaints-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.complaint-item {
  background: var(--surface-strong);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.complaint-item:hover {
  box-shadow: var(--shadow);
  border-color: var(--gray-300);
}

.complaint-item.status-resolved {
  border-left: 4px solid var(--success);
}

.complaint-item.status-closed {
  border-left: 4px solid var(--gray-400);
  opacity: 0.85;
}

.complaint-item.status-pending {
  border-left: 4px solid var(--warning);
}

.complaint-item.status-processing {
  border-left: 4px solid var(--info);
}

.complaint-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}

.complaint-type {
  display: inline-block;
  padding: 2px 10px;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
}

.complaint-status {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  color: var(--gray-600);
}

.complaint-status.pending {
  background: var(--warning-light);
  color: var(--warning);
}

.complaint-status.processing {
  background: var(--info-light);
  color: var(--info);
}

.complaint-status.resolved {
  background: var(--success-light);
  color: var(--success);
}

.complaint-status.closed {
  background: var(--gray-100);
  color: var(--gray-500);
}

.complaint-subject {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 6px;
  line-height: 1.5;
}

.complaint-desc {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.complaint-meta {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.complaint-reply {
  font-size: 13px;
  color: var(--gray-700);
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 6px;
  line-height: 1.6;
}

.complaint-time {
  font-size: 12px;
  color: var(--gray-400);
}

/* —— 消息中心页 —— */
.notifications-page {
  animation: fadeIn 0.3s ease;
}

.notifications-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.notifications-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
}

.notifications-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notifications-unread {
  font-size: 13px;
  color: var(--gray-600);
  font-weight: 500;
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notif-item {
  background: var(--surface-strong);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.notif-item:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

.notif-item.unread {
  border-left: 3px solid var(--primary);
  background: var(--primary-bg);
}

.notif-item.read {
  opacity: 0.72;
}

.notif-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}

.notif-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  flex-shrink: 0;
}

.notif-content {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 6px;
  white-space: pre-wrap;
  word-break: break-word;
}

.notif-time {
  font-size: 12px;
  color: var(--gray-400);
}

/* —— 响应式 —— */
@media (max-width: 640px) {
  .complaints-page-header,
  .notifications-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .notifications-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* ========================================================
   配送员等级卡片 — lv- 前缀（用户端配送员面板）
   ======================================================== */
.courier-level-card {
  background: var(--surface-strong, #fff);
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.lv-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.lv-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 12px;
  color: #fff;
  min-width: 0;
}

.lv-badge-emoji {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.lv-badge-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.lv-badge-sub {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 2px;
}

.lv-credit {
  text-align: right;
  flex-shrink: 0;
}

.lv-credit-num {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.lv-credit-label {
  font-size: 12px;
  color: var(--gray-500, #6b7280);
  margin-top: 4px;
}

.lv-credit.good { color: var(--success, #10b981); }
.lv-credit.warn { color: var(--warning, #f59e0b); }
.lv-credit.bad  { color: var(--danger, #ef4444); }

.lv-progress-block {
  margin-bottom: 14px;
}

.lv-progress-title {
  font-size: 12px;
  color: var(--gray-600, #4b5563);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lv-progress-bar {
  height: 8px;
  background: var(--gray-100, #f3f4f6);
  border-radius: 999px;
  overflow: hidden;
}

.lv-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}

.lv-stats-row {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--gray-100, #f3f4f6);
  border-bottom: 1px solid var(--gray-100, #f3f4f6);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.lv-stat-item {
  flex: 1;
  min-width: 80px;
}

.lv-stat-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-800, #1f2937);
  line-height: 1.2;
}

.lv-stat-label {
  font-size: 11px;
  color: var(--gray-500, #6b7280);
  margin-top: 2px;
}

.lv-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lv-actions button {
  flex: 1;
  min-width: 120px;
}

/* ========================================================
   对账订单分布图表 — dist- 前缀
   ======================================================== */
.dist-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dist-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.dist-label {
  width: 120px;
  flex-shrink: 0;
  color: var(--gray-600, #4b5563);
  font-weight: 500;
}

.dist-bar-wrap {
  flex: 1;
  height: 22px;
  background: var(--gray-100, #f3f4f6);
  border-radius: 6px;
  overflow: hidden;
  min-width: 80px;
}

.dist-bar {
  height: 100%;
  border-radius: 6px;
  transition: width 0.4s ease;
  min-width: 2px;
}

.dist-num {
  width: 70px;
  flex-shrink: 0;
  text-align: right;
  color: var(--gray-700, #374151);
  font-weight: 600;
}

.dist-amount {
  width: 110px;
  flex-shrink: 0;
  text-align: right;
  color: var(--success, #10b981);
  font-weight: 700;
}

/* ========================================================
   保证金缴纳弹窗 — dp- 前缀
   ======================================================== */
.dp-balance-info {
  background: var(--gray-50, #f9fafb);
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--gray-600);
}

.dp-balance-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dp-balance-label {
  font-size: 12px;
  color: var(--gray-500, #6b7280);
}

.dp-balance-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-800, #1f2937);
}

.dp-balance-value.danger {
  color: var(--danger, #ef4444);
}

.dp-balance-value.success {
  color: var(--success, #10b981);
}

/* ========================================================
   等级规则弹窗 — lv-detail
   ======================================================== */
.lv-rule-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}

.lv-rule-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 10px;
}

.lv-rule-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  flex-shrink: 0;
}

.lv-rule-info {
  flex: 1;
  min-width: 0;
}

.lv-rule-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800, #1f2937);
}

.lv-rule-req {
  font-size: 12px;
  color: var(--gray-500, #6b7280);
  margin-top: 2px;
}

/* 等级详情弹窗内的辅助元素 */
.lv-detail-loading {
  text-align: center;
}

.lv-detail-error {
  text-align: center;
  color: var(--danger, #ef4444);
}

.lv-current {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--lv-color-bg, transparent);
  border-radius: 12px;
  margin-bottom: 16px;
}

.lv-current-emoji {
  font-size: 32px;
}

.lv-current-name {
  font-weight: 600;
  font-size: 16px;
}

.lv-current-hint {
  font-size: var(--font-sm, 12px);
  color: var(--gray-500, #6b7280);
}

.lv-section-title {
  margin: 12px 0 8px;
}

.lv-section-title.lv-section-title-gap {
  margin-top: 16px;
}

.lv-rule-emoji {
  font-size: 24px;
}

.lv-rule-level {
  color: var(--gray-400, #9ca3af);
  font-size: 12px;
}

.lv-rule-badge-current {
  color: var(--success, #10b981);
  font-size: 13px;
}

.lv-rule-item.is-current {
  border-color: var(--lv-color, var(--gray-200, #e5e7eb));
  background: var(--lv-color-bg-soft, transparent);
}

.lv-credit-rules {
  font-size: 13px;
  color: var(--gray-600, #4b5563);
  line-height: 1.7;
}

.lv-credit-rules strong {
  color: var(--danger, #ef4444);
}

/* 响应式：分布图表小屏适配 */
@media (max-width: 640px) {
  .dist-label { width: 90px; font-size: 12px; }
  .dist-num { width: 56px; font-size: 12px; }
  .dist-amount { width: 80px; font-size: 12px; }
  .lv-badge { padding: 8px 12px; }
  .lv-badge-emoji { font-size: 24px; }
  .lv-badge-name { font-size: 14px; }
  .lv-stats-row { gap: 10px; }
}

/* ========================================================
   字号设置弹窗 — fs- 前缀
   ======================================================== */
.fs-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--surface-strong, #fff);
  border: 2px solid var(--gray-200, #e5e7eb);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  min-height: 56px;
}

.fs-option:hover {
  border-color: var(--primary-light, #93c5fd);
  background: var(--primary-bg, rgba(37, 99, 235, 0.05));
}

.fs-option.active {
  border-color: var(--primary, #2563eb);
  background: var(--primary-bg, rgba(37, 99, 235, 0.08));
}

.fs-option-info {
  flex: 1;
  min-width: 0;
}

.fs-option-label {
  font-size: var(--font-md);
  font-weight: 700;
  color: var(--gray-800, #1f2937);
}

.fs-option-desc {
  font-size: var(--font-sm);
  color: var(--gray-500, #6b7280);
  margin-top: 2px;
}

.fs-option-preview {
  flex-shrink: 0;
  padding: 6px 12px;
  background: var(--gray-100, #f3f4f6);
  border-radius: 8px;
  color: var(--gray-700, #374151);
  font-weight: 600;
}

.fs-preview-normal { font-size: 14px; }
.fs-preview-large { font-size: 16px; }
.fs-preview-xlarge { font-size: 18px; }

.fs-option-check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary, #2563eb);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}

/* ========================================================
   煤矿场景适老化覆盖（v2.6.0）
   针对硬编码字号统一提升，关键信息字号强化，对比度提升
   覆盖规则放在末尾，利用选择器优先级生效
   ======================================================== */

/* —— 全局辅助文字字号提升 —— */
.text-muted,
.text-secondary,
.admin-table .text-muted,
.wd-record-note,
.cp-label,
.rf-label,
.wd2-label,
.dept-count,
.count,
.notification-time,
.faqs-item small {
  font-size: var(--font-sm) !important;
  color: var(--gray-700) !important;
}

/* —— 极小字号(11px)统一提升到 --font-sm —— */
.action-stat-badge,
.dist-num,
.dist-amount,
.status,
.dept-badge,
.lv-badge-sub,
.lv-stat-label,
.lv-rule-req,
.dp-balance-label,
.trend-bar-label,
.trend-bar-value {
  font-size: var(--font-sm) !important;
}

/* —— 表格字号提升 —— */
.admin-table {
  font-size: var(--font-base);
}

.admin-table th {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--gray-800);
  padding: 12px 14px;
}

.admin-table td {
  padding: 12px 14px;
  color: var(--gray-800);
}

/* —— 列表行高提升，便于触摸 —— */
.admin-table tbody tr {
  min-height: 56px;
}

/* —— 状态标签字号强化 —— */
.status {
  font-size: var(--font-sm) !important;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
}

/* —— 统计卡片字号 —— */
.stat-value {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--gray-900);
}

.stat-label {
  font-size: var(--font-sm);
  color: var(--gray-700);
}

/* —— 区队徽章字号 —— */
.dept-badge {
  font-size: var(--font-sm) !important;
  font-weight: 600;
  padding: 4px 10px;
}

/* —— 标签页/导航字号 —— */
/* main-nav 已迁移为底部固定栏，字号/min-height 由专门块控制；这里仅保留 admin-nav */
.admin-nav button {
  font-size: var(--font-base);
  font-weight: 600;
  min-height: var(--touch-min);
  padding: 12px 18px;
}

/* —— 表单输入框字号 + 触摸目标 —— */
input[type="text"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="email"],
input[type="date"],
input[type="search"],
input[type="url"],
select,
textarea {
  font-size: var(--font-base);
  min-height: var(--touch-min);
  padding: 12px 14px;
  color: var(--gray-900);
}

/* —— Toast 字号提升 —— */
.toast {
  font-size: var(--font-md) !important;
  padding: 14px 18px !important;
  min-height: var(--touch-min);
}

.toast-icon {
  font-size: var(--font-lg) !important;
}

/* —— 弹窗标题字号 —— */
.modal-header h3,
.modal-header h4,
#wd2-title-text,
#hp-title-text,
#cp-title,
.modal h3,
.modal h4 {
  font-size: var(--font-lg) !important;
  font-weight: 700;
}

/* —— 订单卡片字号 —— */
.order-card,
.order-item {
  font-size: var(--font-base);
}

.order-card .order-price,
.order-item .order-price,
.order-amount,
.amount {
  font-size: var(--font-key) !important;
  font-weight: 700;
  color: var(--danger);
}

/* —— 关键信息：取件码、电话、地址 —— */
.pickup-code,
.pickup_code,
.contact-phone,
.phone-display,
.order-phone {
  font-size: var(--font-key) !important;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: 0.5px;
}

/* —— 区队/配送员列表行高 —— */
.dept-item,
.courier-section table tr {
  min-height: 56px;
}

/* —— 分页按钮触摸目标 —— */
.pagination button,
.pg-prev,
.pg-next,
.pg-go {
  min-height: var(--touch-min) !important;
  min-width: var(--touch-min);
  font-size: var(--font-base);
  padding: 10px 14px !important;
}

/* —— 筛选栏触摸目标 —— */
.filter-bar select,
.filter-bar input {
  min-height: var(--touch-min);
}

/* —— 区队管理列表项 —— */
.dept-list .dept-item {
  min-height: 56px;
}

/* —— 设置项触摸目标（已合并至主定义，保留字号/字色补充） —— */
.setting-label {
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--gray-800);
}

.setting-desc,
.setting-info small {
  font-size: var(--font-sm);
  color: var(--gray-700);
}

/* —— 评价星星字号 —— */
.rating-stars .star,
.rating-stars button {
  font-size: 32px;
  min-width: 44px;
  min-height: 44px;
}

/* —— 底部导航/操作栏 —— */
.bottom-nav button,
.fab,
.floating-btn {
  min-width: var(--touch-min);
  min-height: var(--touch-min);
}

/* —— 超大字号模式下，进一步放大关键信息 —— */
:root[data-font-size="xlarge"] .stat-value,
:root[data-font-size="xlarge"] .order-amount,
:root[data-font-size="xlarge"] .amount {
  font-size: 24px;
}

:root[data-font-size="xlarge"] .pickup-code,
:root[data-font-size="xlarge"] .contact-phone {
  font-size: 22px;
}

/* —— 对比度强化：辅助文字色加深（已与主定义合并） —— */
.text-secondary { color: var(--gray-700) !important; }
.help-text { color: var(--gray-700) !important; }

/* —— 表单标签加粗 —— */
.form-group label,
label.form-label {
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 6px;
  display: block;
}

/* —— 表单错误提示（输入框下方红字） —— */
.field-error {
  color: var(--danger);
  font-size: var(--font-sm);
  font-weight: 600;
  margin-top: 4px;
  min-height: 20px;
  display: block;
}

/* —— 必填标记 —— */
.required-mark {
  color: var(--danger);
  font-weight: 700;
  margin-left: 2px;
}

/* —— 表单内联错误条（showFormError） —— */
.form-error-banner {
  background: var(--danger-light, #fee2e2);
  border: 2px solid var(--danger, #ef4444);
  color: var(--danger, #ef4444);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: var(--font-base);
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: formErrorShake 0.4s ease;
}

.form-error-icon {
  font-size: var(--font-lg);
  font-weight: 700;
  flex-shrink: 0;
}

@keyframes formErrorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ========================================================
   批次B-2：对立操作按钮视觉隔离
   通过/拒绝、接单/取消等对立操作用强色区分，避免误触
   ======================================================== */

/* 成功类按钮（通过/接单/确认/批准）—— 绿色强化 */
.btn-success,
.btn-approve,
.btn-accept,
.btn-confirm {
  background: var(--success) !important;
  color: #fff !important;
  font-weight: 700;
}

.btn-success:hover,
.btn-approve:hover,
.btn-accept:hover,
.btn-confirm:hover {
  background: var(--success-dark, #059669) !important;
}

/* 危险类按钮（拒绝/取消/删除/驳回）—— 红色强化 */
.btn-danger,
.btn-reject,
.btn-cancel,
.btn-delete,
.btn-decline {
  background: var(--danger) !important;
  color: #fff !important;
  font-weight: 700;
}

.btn-danger:hover,
.btn-reject:hover,
.btn-cancel:hover,
.btn-delete:hover,
.btn-decline:hover {
  background: var(--danger-dark, #dc2626) !important;
}

/* 描边版危险按钮（次级操作） */
.btn-outline-danger {
  background: transparent !important;
  color: var(--danger) !important;
  border: 2px solid var(--danger) !important;
  font-weight: 600;
}

.btn-outline-danger:hover {
  background: var(--danger-light, #fee2e2) !important;
}

/* 对立按钮组内的间距强化 */
.btn-group .btn + .btn,
.action-buttons .btn + .btn,
.list-actions .btn + .btn {
  margin-left: 4px;
}

/* 操作按钮区域统一间距 */
.action-buttons,
.list-actions,
.order-actions,
.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* 主操作按钮放大（接单/提交/通过） */
.btn-primary,
.btn-submit {
  font-size: var(--font-md);
  font-weight: 700;
  padding: 14px 24px;
}

/* 次级操作按钮弱化（详情/编辑） */
.btn-secondary,
.btn-info,
.btn-outline {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
  font-weight: 600;
}

.btn-secondary:hover,
.btn-info:hover,
.btn-outline:hover {
  background: var(--gray-200);
}

/* ========================================================
   自定义确认弹窗 — cf- 前缀（替代浏览器原生 confirm）
   字号加大，按钮触摸目标 48px，适合老年用户
   ======================================================== */
.cf-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  animation: cfFadeIn 0.2s ease;
}

@keyframes cfFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cf-box {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: cfSlideUp 0.25s ease;
}

@keyframes cfSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cf-header {
  padding: 20px 20px 8px;
  text-align: center;
}

.cf-title {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--gray-900);
}

.cf-box.cf-danger .cf-title {
  color: var(--danger);
}

.cf-message {
  padding: 8px 24px 24px;
  font-size: var(--font-md);
  color: var(--gray-800);
  text-align: center;
  line-height: 1.6;
  font-weight: 500;
}

.cf-actions {
  display: flex;
  gap: 12px;
  padding: 0 20px 20px;
}

.cf-actions .btn {
  flex: 1;
  min-height: var(--touch-min);
  font-size: var(--font-md);
  font-weight: 700;
}

/* ========================================================
   取件流程提示弹窗 — oa- 前缀（每天弹一次）
   ======================================================== */
.oa-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 16px;
  animation: oaFadeIn 0.2s ease;
}

@keyframes oaFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.oa-box {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: oaSlideUp 0.25s ease;
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes oaSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.oa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 8px;
}

.oa-kicker {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-bg);
  padding: 4px 10px;
  border-radius: 999px;
}

.oa-close {
  background: var(--gray-100);
  border: none;
  font-size: 20px;
  line-height: 1;
  color: var(--gray-500);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  transition: var(--transition);
}

.oa-close:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}

.oa-title {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--gray-900);
  padding: 0 20px 16px;
  margin: 0;
  line-height: 1.4;
}

.oa-route-card {
  padding: 8px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.oa-route-card .route-node {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.oa-route-card .route-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gray-300);
  flex-shrink: 0;
  margin-top: 4px;
  position: relative;
}

.oa-route-card .route-node.active .route-dot {
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-bg);
}

/* 连接线 */
.oa-route-card .route-node:not(:last-child) .route-dot::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 28px;
  background: var(--gray-200);
}

.oa-route-card .route-node strong {
  display: block;
  font-size: var(--font-base);
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.3;
}

.oa-route-card .route-node small {
  display: block;
  font-size: var(--font-sm);
  color: var(--gray-600);
  margin-top: 2px;
  line-height: 1.4;
}

.oa-note {
  margin: 16px 20px;
  padding: 14px 16px;
  background: var(--warning-light);
  border-radius: 10px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.oa-note-tag {
  flex-shrink: 0;
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--warning);
  background: #fff;
  padding: 2px 10px;
  border-radius: 6px;
}

.oa-note p {
  margin: 0;
  font-size: var(--font-sm);
  color: var(--gray-700);
  line-height: 1.5;
}

.oa-actions {
  padding: 0 20px 20px;
}

.oa-actions .btn {
  width: 100%;
  min-height: var(--touch-min);
  font-size: var(--font-md);
  font-weight: 700;
}



/* ============================================ */
/* iOS Liquid Glass Enhancement Layer (v2.6.5)  */
/* ============================================ */

/* Page background */
body {
  background: var(--bg-page);
}

/* Card glass effect */
.profile-menu,
.settings-card,
.stat-card,
.order-card,
.order-item,
.notif-item,
.dept-item,
.complaint-item,
.refunds-page .table-container,
.admin-table {
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 0.5px solid var(--gray-200);
  box-shadow: var(--shadow), var(--glass-highlight);
}

/* Button press feedback (iOS style) */
.btn:not(:disabled):active,
.main-nav button:not(.disabled):active,
.profile-menu-item:active,
.modal-actions button:not(:disabled):active {
  transform: scale(0.96);
  transition-duration: 0.08s;
}

/* Primary button iOS style */
.btn-primary {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius);
  box-shadow: none;
  transition: transform 0.15s var(--ease-ios), background-color 0.15s var(--ease-ios), opacity 0.15s;
}

.btn-primary:hover {
  background: #0a6fff;
  transform: none;
}

.btn-primary:not(:disabled):active {
  background: #005edb;
  transform: scale(0.96);
}

/* Outline button iOS style */
.btn-outline {
  background: transparent;
  border: 1px solid var(--gray-300);
  color: var(--primary);
  font-weight: 500;
  border-radius: var(--radius);
  transition: transform 0.15s var(--ease-ios), background-color 0.15s var(--ease-ios);
}

.btn-outline:hover {
  background: var(--primary-bg);
  border-color: var(--primary);
}

.btn-outline:not(:disabled):active {
  background: rgba(0, 122, 255, 0.14);
  transform: scale(0.96);
}

/* Input iOS style */
input[type="text"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="email"],
input[type="date"],
input[type="search"],
textarea,
select {
  border: 0.5px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--surface-strong);
  transition: border-color 0.15s var(--ease-ios), box-shadow 0.15s var(--ease-ios);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
  outline: none;
}

/* Section title iOS style */
.section-title,
h3.section-title {
  letter-spacing: -0.2px;
}

/* Stat value iOS blue */
.stat-card .stat-value,
.profile-stat-item .stat-value {
  color: var(--primary);
  letter-spacing: -0.5px;
}

/* Smooth scroll for iOS feel */
html {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Hide scrollbar but keep scroll */
::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Page transition iOS feel */
.profile-page,
.orders-page,
.send-page,
.notifications-page {
  animation: iosFadeIn 0.3s var(--ease-ios);
}

@keyframes iosFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Modal backdrop iOS blur */
.modal-overlay {
  background: rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* Modal content iOS card */
.modal-content,
.modal-overlay .modal {
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 0.5px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-lg), var(--glass-highlight);
}

/* Close button iOS style */
.close-btn {
  background: var(--gray-200);
  transition: transform 0.15s var(--ease-ios), background-color 0.15s;
}

.close-btn:active {
  transform: scale(0.9);
  background: var(--gray-300);
}

/* Status badge iOS pill */
.status {
  border-radius: var(--radius-full);
  font-weight: 600;
  padding: 3px 10px;
  font-size: var(--font-xs);
}

/* Profile menu item iOS grouped list */
.profile-menu-item {
  transition: background-color 0.12s var(--ease-ios), transform 0.12s var(--ease-ios);
}

.profile-menu-item:active {
  background: var(--gray-100);
  transform: scale(0.99);
}

/* Tab bar icon active animation */
.main-nav button.active .nav-icon {
  transform: translateY(-1px);
  transition: transform 0.2s var(--ease-spring);
}

.main-nav button .nav-icon {
  transition: transform 0.2s var(--ease-ios);
}

/* Floating action button shadow */
.btn-primary:not(:disabled) {
  box-shadow: 0 4px 12px -4px rgba(0, 122, 255, 0.4);
}

/* Empty state iOS card */
.empty {
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 0.5px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

/* ============ 公告系统样式 ============ */

/* 普通公告横幅（header 下方，可关闭） */
.announcement-banner {
  background: var(--warning-light);
  border-bottom: 0.5px solid rgba(255, 149, 0, 0.2);
  padding: 0;
}

.ann-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 720px;
  margin: 0 auto;
  padding: 10px 16px;
  min-height: 48px;
}

.ann-banner-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.ann-banner-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ann-banner-text strong {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ann-banner-sub {
  font-size: var(--font-xs);
  color: var(--gray-600);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ann-banner-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--gray-500);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.ann-banner-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--gray-800);
}

.ann-banner-close:active {
  background: rgba(0, 0, 0, 0.12);
  transform: scale(0.9);
}

/* 移动端横幅紧凑化 */
@media (max-width: 480px) {
  .ann-banner-content {
    padding: 8px 12px;
    gap: 8px;
  }

  .ann-banner-icon {
    font-size: 18px;
  }

  .ann-banner-text strong {
    font-size: var(--font-xs);
  }

  .ann-banner-sub {
    display: none;
  }
}
/* ========================================================
   管理端公告卡片 — ann-card 前缀（admin-announcements.js）
   ======================================================== */
.ann-card {
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 0.5px solid var(--gray-200);
  border-radius: var(--radius-lg, 14px);
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm), var(--glass-highlight);
  transition: transform 0.15s var(--ease-ios), box-shadow 0.15s;
}

.ann-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow), var(--glass-highlight);
}

.ann-card-urgent {
  border-left: 3px solid var(--danger);
}

.ann-card-inactive {
  opacity: 0.65;
}

.ann-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.ann-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.ann-card-title {
  font-size: var(--font-md);
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}

.ann-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.ann-card-content {
  font-size: var(--font-base);
  color: var(--gray-700);
  line-height: 1.6;
  margin-bottom: 10px;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 10px 12px;
  background: var(--gray-50);
  border-radius: 8px;
}

.ann-card-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: var(--font-xs);
  color: var(--gray-500);
}

.ann-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* 公告徽章 */
.ann-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full, 999px);
  font-size: var(--font-xs);
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

.ann-badge-urgent {
  background: rgba(255, 59, 48, 0.12);
  color: var(--danger);
}

.ann-badge-normal {
  background: var(--primary-bg, rgba(0, 122, 255, 0.1));
  color: var(--primary);
}

.ann-badge-active {
  background: rgba(52, 199, 89, 0.12);
  color: var(--success);
}

.ann-badge-inactive {
  background: var(--gray-100);
  color: var(--gray-500);
}

/* 公告表单提示框 */
.ann-tip {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  background: var(--primary-bg, rgba(0, 122, 255, 0.06));
  border-radius: 10px;
  margin-top: 8px;
  align-items: flex-start;
}

.ann-tip-icon {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1.4;
}

.ann-tip-text {
  font-size: var(--font-sm);
  color: var(--gray-700);
  line-height: 1.5;
}

.ann-tip-text strong {
  color: var(--gray-900);
}

/* modal-body 兜底 */
.modal-body {
  padding: 16px 20px;
}

/* 响应式：小屏公告卡片紧凑化 */
@media (max-width: 640px) {
  .ann-card {
    padding: 14px 14px;
  }

  .ann-card-top {
    flex-direction: column;
    align-items: stretch;
  }

  .ann-card-actions {
    justify-content: flex-end;
  }

  .ann-card-meta {
    gap: 10px;
  }
}
/* ========================================================
   管理端地址卡片 — addr-card 前缀（admin-locations.js）
   复用 .ann-badge 徽章样式，不重复定义
   ======================================================== */
.addr-card {
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 0.5px solid var(--gray-200);
  border-radius: var(--radius-lg, 14px);
  padding: 14px 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm), var(--glass-highlight);
  transition: transform 0.15s var(--ease-ios), box-shadow 0.15s;
}

.addr-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow), var(--glass-highlight);
}

.addr-card-inactive {
  opacity: 0.65;
}

.addr-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.addr-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.addr-card-sort {
  font-size: var(--font-xs);
  color: var(--gray-400);
  font-weight: 600;
  flex-shrink: 0;
}

.addr-card-title {
  font-size: var(--font-md);
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.addr-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* 响应式：小屏地址卡片紧凑化 */
@media (max-width: 640px) {
  .addr-card {
    padding: 12px 14px;
  }

  .addr-card-top {
    flex-direction: column;
    align-items: stretch;
  }

  .addr-card-actions {
    justify-content: flex-end;
  }
}

/* ========================================================
   UI audit pass 2026-07-02: non-blocking coach panel and refined nav marks
   ======================================================== */
.oa-overlay.oa-coach {
  position: fixed;
  inset: auto 28px 104px auto;
  width: min(380px, calc(100vw - 32px));
  padding: 0;
  display: block;
  background: transparent;
  z-index: 76;
  pointer-events: none;
  animation: none;
}

.oa-overlay.oa-coach .oa-box {
  width: 100%;
  max-width: none;
  max-height: min(78vh, 680px);
  pointer-events: auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 255, 0.9));
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 28px;
  box-shadow:
    0 28px 72px -44px rgba(15, 23, 42, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  animation: oaCoachIn 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes oaCoachIn {
  from { opacity: 0; transform: translate3d(16px, 18px, 0) scale(0.98); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

.oa-overlay.oa-coach .oa-header {
  padding: 20px 22px 8px;
}

.oa-overlay.oa-coach .oa-title {
  padding-inline: 22px;
  font-size: clamp(18px, 1.6vw, 22px);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.oa-overlay.oa-coach .oa-kicker,
.oa-note-tag {
  border-radius: 10px;
  letter-spacing: 0.04em;
}

.oa-overlay.oa-coach .oa-close {
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.oa-overlay.oa-coach .oa-close:hover {
  background: rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.oa-overlay.oa-coach .oa-actions {
  padding: 0 20px 20px;
}

.oa-overlay.oa-coach .oa-confirm {
  min-height: 46px;
  border-radius: 16px;
}

.nav-icon.nav-mark,
.user-badge-mark,
.header-icon-mark {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 12px;
  color: #1e3a8a;
  background:
    radial-gradient(circle at 32% 18%, rgba(255,255,255,0.95), rgba(255,255,255,0) 44%),
    linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(226, 234, 243, 0.86));
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

.main-nav button.active .nav-icon.nav-mark {
  color: #fff;
  background: linear-gradient(180deg, #0f172a, #1e3a8a);
  border-color: rgba(15, 23, 42, 0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.main-nav button:hover .nav-icon.nav-mark {
  color: #0f766e;
  border-color: rgba(13, 148, 136, 0.28);
}

.notification-btn {
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

@media (min-width: 960px) {
  #main-content {
    max-width: min(1080px, calc(100vw - 64px));
  }

  .order-form {
    max-width: 760px;
    margin-inline: auto;
  }
}

@media (min-width: 1280px) {
  #main-content {
    max-width: min(1160px, calc(100vw - 80px));
  }

  .order-form {
    margin-left: clamp(24px, 7vw, 128px);
    margin-right: auto;
  }
}

@media (max-width: 720px) {
  .oa-overlay.oa-coach {
    inset: auto 14px calc(82px + env(safe-area-inset-bottom, 0px)) 14px;
    width: auto;
  }

  .oa-overlay.oa-coach .oa-box {
    border-radius: 22px;
    max-height: 58vh;
  }

  .oa-overlay.oa-coach .oa-title {
    font-size: 18px;
  }
}

/* Desktop command rail: keep mobile bottom nav, avoid covering primary actions on wide screens. */
@media (min-width: 960px) {
  .main-nav {
    top: 96px;
    bottom: auto;
    left: 24px;
    right: auto;
    width: 82px;
    min-height: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    padding: 10px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 28px 70px -48px rgba(15, 23, 42, 0.75);
  }

  .main-nav button {
    min-height: 66px;
    padding: 8px 4px;
    border-radius: 22px;
    flex: 0 0 auto;
  }

  .main-nav button.active {
    background: rgba(15, 23, 42, 0.06);
  }

  .main-nav button.active .nav-icon::before {
    display: none;
  }

  .main-nav button .nav-text {
    font-size: 11px;
    letter-spacing: 0.02em;
  }

  .nav-icon.nav-mark {
    width: 32px;
    height: 32px;
    border-radius: 13px;
  }

  #main-content {
    padding-bottom: 72px;
  }
}

/* ========================================================
   UI audit pass 2026-07-02: admin command rail and KPI bento
   ======================================================== */
#admin-section header h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.03em;
}

.auth-logo.auth-logo-mark,
.admin-title-mark,
.admin-badge-mark,
.admin-nav-mark,
.stat-icon.stat-mark {
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  color: #0f172a;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(226,232,240,0.82));
  border: 1px solid rgba(148, 163, 184, 0.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.86), 0 10px 24px -20px rgba(15,23,42,0.65);
}

.auth-logo.auth-logo-mark {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  margin-inline: auto;
  font-size: 30px;
}

.admin-title-mark {
  width: 34px;
  height: 34px;
  border-radius: 13px;
  font-size: 15px;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-badge-mark {
  width: 34px;
  height: 24px;
  border-radius: 9px;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.admin-nav {
  position: sticky;
  top: 0;
  z-index: 46;
  gap: 8px;
  align-items: center;
  padding: 12px clamp(14px, 3vw, 32px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(248, 250, 252, 0.78);
  backdrop-filter: blur(20px) saturate(1.18);
  -webkit-backdrop-filter: blur(20px) saturate(1.18);
  scrollbar-width: thin;
}

.admin-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 8px 13px 8px 9px;
  border-radius: 18px;
  font-size: 13px;
  letter-spacing: -0.01em;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #334155;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.68);
}

.admin-nav button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(37, 99, 235, 0.22);
  color: #172554;
}

.admin-nav button.active {
  background: #0f172a;
  color: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 18px 38px -26px rgba(15, 23, 42, 0.92);
}

.admin-nav-mark {
  width: 28px;
  height: 28px;
  border-radius: 11px;
  font-size: 12px;
  flex: 0 0 auto;
}

.admin-nav button.active .admin-nav-mark {
  color: #ffffff;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.92), rgba(15, 118, 110, 0.86));
  border-color: rgba(255,255,255,0.18);
}

.dashboard .section-title,
.page-header .section-title {
  letter-spacing: -0.03em;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 14px;
}

.stat-card {
  min-height: 124px;
  border-radius: 24px;
  padding: 22px;
  align-items: stretch;
}

.stat-card .stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  font-size: 14px;
  flex: 0 0 auto;
}

.stat-card .stat-icon:empty {
  display: none;
}

.stat-card .stat-value,
.stat-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.stat-card.highlight.primary .stat-icon.stat-mark {
  color: #ffffff;
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.2);
}

@media (max-width: 1180px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .admin-nav {
    padding-inline: 12px;
  }

  .admin-nav button {
    min-width: 76px;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    font-size: 11px;
    border-radius: 18px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 108px;
  }
}

/* ========================================================
   Admin generated SVG icon system: replaces text badges
   ======================================================== */
.admin-icon {
  width: 1em;
  height: 1em;
  display: block;
  fill: currentColor;
  stroke: none;
}

.auth-logo.auth-logo-mark,
.admin-title-mark,
.admin-badge-mark,
.admin-nav-mark,
.stat-card .stat-icon {
  display: inline-grid;
  place-items: center;
  color: #0f172a;
  background:
    radial-gradient(circle at 32% 18%, rgba(255,255,255,0.95), rgba(255,255,255,0) 44%),
    linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(226, 234, 243, 0.86));
  border: 1px solid rgba(148, 163, 184, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.88),
    0 12px 26px -22px rgba(15,23,42,0.7);
}

.auth-logo.auth-logo-mark {
  width: 76px;
  height: 76px;
  border-radius: 26px;
  color: #0f766e;
}

.admin-logo-svg {
  width: 40px;
  height: 40px;
}

.admin-title-mark {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  color: #0f766e;
}

.admin-title-svg {
  width: 20px;
  height: 20px;
}

.admin-badge-mark {
  width: 30px;
  height: 24px;
  border-radius: 10px;
  color: #1d4ed8;
}

.admin-badge-svg {
  width: 15px;
  height: 15px;
}

.admin-nav-mark {
  width: 30px;
  height: 30px;
  border-radius: 12px;
  color: #1e3a8a;
}

.admin-nav-svg {
  width: 16px;
  height: 16px;
}

.admin-nav button:hover .admin-nav-mark {
  color: #0f766e;
  border-color: rgba(13, 148, 136, 0.28);
}

.admin-nav button.active .admin-nav-mark {
  color: #ffffff;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.94), rgba(15, 118, 110, 0.9));
  border-color: rgba(255,255,255,0.2);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.28),
    0 14px 30px -20px rgba(37,99,235,0.82);
}

.stat-card .stat-icon {
  color: #1d4ed8;
  background:
    radial-gradient(circle at 34% 22%, rgba(255,255,255,0.96), rgba(255,255,255,0) 44%),
    linear-gradient(180deg, rgba(241, 247, 255, 0.98), rgba(226, 235, 246, 0.9));
}

.stat-card.warning .stat-icon {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.32);
}

.stat-card.info .stat-icon {
  color: #0ea5e9;
  border-color: rgba(14, 165, 233, 0.28);
}

.stat-card.success .stat-icon {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.28);
}

.stat-card.highlight .stat-icon {
  color: #0f766e;
  border-color: rgba(20, 184, 166, 0.32);
}

.stat-card.highlight.primary .stat-icon {
  color: #ffffff;
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.2);
}

.stat-svg {
  width: 20px;
  height: 20px;
}

/* Admin login brand mark: replace abstract cube with centered wordmark */
.auth-logo.auth-logo-mark.auth-wordmark {
  width: 92px;
  height: 92px;
  margin: 0 auto 18px;
  border-radius: 30px;
  display: grid;
  place-items: center;
  gap: 0;
  color: #0f172a;
  background:
    radial-gradient(circle at 28% 20%, rgba(255,255,255,0.98), rgba(255,255,255,0) 45%),
    linear-gradient(145deg, rgba(240, 249, 255, 0.98), rgba(213, 232, 246, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.92),
    0 24px 50px -34px rgba(15,23,42,0.72);
}

.auth-wordmark span {
  display: block;
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.08em;
  transform: translateY(2px);
}

.auth-wordmark small {
  display: grid;
  place-items: center;
  width: 26px;
  height: 22px;
  margin-top: -2px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #0f766e);
  box-shadow: 0 10px 22px -16px rgba(37,99,235,0.9);
}

.auth-container h1 {
  text-align: center;
}

.auth-container .subtitle {
  text-align: center;
}

/* Admin login symbol: package route + pickup pin, no text glyphs */
.auth-logo.auth-logo-mark.auth-symbol-mark {
  width: 96px;
  height: 96px;
  margin: 0 auto 18px;
  border-radius: 32px;
  display: grid;
  place-items: center;
  color: #0f766e;
  background:
    radial-gradient(circle at 28% 18%, rgba(255,255,255,0.98), rgba(255,255,255,0) 48%),
    linear-gradient(145deg, rgba(240, 249, 255, 0.98), rgba(219, 234, 254, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.92),
    0 24px 50px -34px rgba(15,23,42,0.72);
}

.auth-symbol-svg {
  width: 72px;
  height: 72px;
  overflow: visible;
}

.auth-symbol-route,
.auth-symbol-box,
.auth-symbol-box-line,
.auth-symbol-pin,
.auth-symbol-pin-dot {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-symbol-route {
  stroke: rgba(37, 99, 235, 0.42);
  stroke-width: 4;
  stroke-dasharray: 5 7;
}

.auth-symbol-box {
  stroke: #2563eb;
  stroke-width: 4.2;
  fill: rgba(37, 99, 235, 0.08);
}

.auth-symbol-box-line {
  stroke: #2563eb;
  stroke-width: 3.2;
}

.auth-symbol-pin {
  stroke: #0f766e;
  stroke-width: 4;
  fill: rgba(20, 184, 166, 0.12);
}

.auth-symbol-pin-dot {
  fill: #0f766e;
  stroke: none;
}

/* Admin login: use the real project icon.ico logo */
.auth-logo.auth-logo-mark.auth-image-logo {
  width: 96px;
  height: 96px;
  margin: 0 auto 18px;
  padding: 10px;
  border-radius: 32px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 28% 18%, rgba(255,255,255,0.98), rgba(255,255,255,0) 48%),
    linear-gradient(145deg, rgba(240, 249, 255, 0.98), rgba(219, 234, 254, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.92),
    0 24px 50px -34px rgba(15,23,42,0.72);
}

.auth-image-logo img {
  width: 72px;
  height: 72px;
  display: block;
  object-fit: contain;
  border-radius: 20px;
}

/* Shared auth page real logo image */
.auth-logo.auth-image-logo {
  display: grid;
  place-items: center;
  padding: 8px;
  overflow: hidden;
}

.auth-logo.auth-image-logo img {
  width: 100%;
  height: 100%;
  max-width: 72px;
  max-height: 72px;
  object-fit: contain;
  border-radius: 18px;
}

.admin-title-mark.admin-title-logo {
  padding: 4px;
  overflow: hidden;
}

.admin-title-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 9px;
}

/* ========================================================
   User-facing SVG icon system (bottom nav + header)
   ======================================================== */
.user-icon {
  width: 1em;
  height: 1em;
  display: block;
  flex-shrink: 0;
  fill: currentColor;
  stroke: none;
}

.user-icon path {
  fill: currentColor;
}

.user-nav-svg {
  width: 17px;
  height: 17px;
}

.header-logo-svg {
  width: 18px;
  height: 18px;
}

.header-action-svg,
.user-badge-svg {
  width: 16px;
  height: 16px;
}

.user-badge-mark {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  color: #1d4ed8;
  flex-shrink: 0;
}

.header-icon-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #334155;
}

.nav-mark-notify .notification-badge {
  top: -2px;
  right: -4px;
}

.user-badge {
  gap: 8px;
}

