/* ========== 基础变量 ========== */
:root {
  --primary: #0E417C;
  --primary-dark: #092F5B;
  --primary-light: #E7EEF6;
  --success: #07C160;
  --success-light: #E8EFF8;
  --warning: #FA9D3B;
  --warning-light: #FFF5E8;
  --info: #3A8EE6;
  --info-light: #E8F2FE;
  --danger: #FA5151;
  --danger-light: #FDECEC;
  --bg: #F5F6FA;
  --card: #FFFFFF;
  --text: #2C2C2C;
  --text-2: #666666;
  --text-3: #999999;
  --border: #ECECEC;
  --border-2: #F0F0F0;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --max-width: 1100px;
  /* 驿站色 */
  --st-cainiao: #FF6A00;
  --st-duoduo: #FA5151;
  --st-jd: #306FE9;
  --st-postal: #00883A;
  --st-sf: #00A0E9;
  /* 丝滑动画曲线 */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out:  cubic-bezier(0.65, 0, 0.35, 1);
  --anim-fast: 220ms;
  --anim-mid:  360ms;
  --anim-slow: 560ms;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { scroll-behavior: smooth; }

/* 页面首屏淡入 */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
main.view.active { animation: pageFadeIn var(--anim-mid) var(--ease-out-expo); }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 16px; }

/* ========== 顶部导航 ========== */
.header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 14px 0;
  box-shadow: 0 2px 10px rgba(14,65,124,0.25);
  position: sticky; top: 0; z-index: 99999;
  overflow: visible;
  isolation: isolate;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; overflow: visible; }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-icon { font-size: 32px; }
.logo-text h1 { font-size: 20px; font-weight: 700; line-height: 1.2; }
.logo-sub { font-size: 12px; opacity: 0.85; }

.tabs {
  display: flex; gap: 4px;
  background: rgba(255,255,255,0.15);
  padding: 4px; border-radius: 10px;
  align-items: stretch;
  flex: 1; max-width: 720px;
  overflow: visible;
  position: relative;
}
.tab {
  background: transparent; border: none; color: rgba(255,255,255,0.85);
  padding: 8px 14px; border-radius: 7px; cursor: pointer;
  font-size: 14px; font-weight: 500;
  height: 38px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  gap: 5px; text-align: center;
  white-space: nowrap;
  transition: background var(--anim-fast), color var(--anim-fast), box-shadow var(--anim-fast);
  flex: 0 0 auto;
  min-width: 78px;
}
.tab:hover { color: #fff; background: rgba(255,255,255,0.1); }
.tab.active {
  background: #fff; color: var(--primary); font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.tab.user-login-btn { background: rgba(255,255,255,0.2); color: #fff; font-weight: 600; }
.tab.user-login-btn:hover { background: rgba(255,255,255,0.35); }
#logoutBtn { min-width: auto; padding: 8px 14px; }

/* 跑腿下拉菜单（代取/代寄合并） */
.nav-dropdown { position: relative; display: flex; align-items: stretch; overflow: visible; }
.nav-dropdown-toggle {
  background: transparent; border: none; color: rgba(255,255,255,0.85);
  padding: 8px 14px; border-radius: 7px; cursor: pointer;
  font-size: 14px; font-weight: 500; height: 38px; line-height: 1;
  display: flex; align-items: center; gap: 5px; white-space: nowrap;
  transition: background var(--anim-fast), color var(--anim-fast);
  min-width: 78px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.nav-dropdown-toggle:hover { color: #fff; background: rgba(255,255,255,0.1); }
.nav-dropdown.open > .nav-dropdown-toggle,
.nav-dropdown-toggle.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 2px 6px rgba(0,0,0,0.12); }
.nav-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0;
  flex-direction: column; background: #ffffff !important;
  box-shadow: 0 16px 40px rgba(0,0,0,.25), 0 4px 12px rgba(14,65,124,.18);
  border-radius: 12px;
  z-index: 2147483647; min-width: 200px; overflow: hidden; padding: 8px;
  animation: menuDrop 0.18s ease-out;
  transform-origin: top left;
  border: 1px solid rgba(14,65,124,.18);
}
@keyframes menuDrop {
  0%   { opacity: 0; transform: translateY(-6px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0)    scale(1);    }
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu { display: flex !important; visibility: visible; }
.nav-dropdown-menu .tab {
  color: var(--text-1); height: 40px; min-width: auto;
  border-radius: 7px; justify-content: flex-start; padding: 8px 14px;
  margin: 0;
}
.nav-dropdown-menu .tab:hover { background: rgba(14,65,124,.08); color: var(--primary); }
.nav-dropdown-menu .tab.active { background: var(--primary); color: #fff; }

/* 子标签页 */
.sub-tabs {
  display: flex; gap: 6px; background: var(--card); padding: 4px;
  border-radius: 10px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.sub-tab {
  flex: 1; padding: 10px 16px; border: none; background: transparent;
  border-radius: 7px; cursor: pointer; font-size: 14px; font-weight: 500;
  color: var(--text-2); transition: all 0.2s;
  text-align: center;
}
.sub-tab:hover { color: var(--primary); background: var(--primary-light); }
.sub-tab.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* ========== 视图 ========== */
.view { display: none; padding: 20px 0 40px; }
.view.active { display: block; }

/* ========== 广告轮播 ========== */
.banner-carousel {
  position: relative; width: 100%; max-width: 800px; margin: 0 auto 20px;
  border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.12);
  background: #f5f5f5;
}
.banner-slides { position: relative; width: 100%; padding-top: 56.25%; overflow: hidden; }
.banner-slide {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity .5s ease; display: flex; align-items: center; justify-content: center;
}
.banner-slide.active { opacity: 1; }
.banner-slide img.banner-img {
  width: 100%; height: 100%; object-fit: contain; display: block; cursor: pointer;
  background: #f0f0f0;
}
.banner-title {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 8px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff; font-size: 14px; font-weight: 500;
}
.banner-dots {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 2;
}
.banner-dot {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.5);
  cursor: pointer; transition: background .2s;
}
.banner-dot.active { background: #fff; }
.banner-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border: none; border-radius: 50%;
  background: rgba(0,0,0,.35); color: #fff; font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; z-index: 2;
  transition: background .2s;
}
.banner-arrow:hover { background: rgba(0,0,0,.6); }
.banner-prev { left: 8px; }
.banner-next { right: 8px; }
@media (max-width: 600px) {
  .banner-arrow { width: 26px; height: 26px; font-size: 16px; }
  .banner-title { font-size: 12px; }
}

/* ========== 横幅 ========== */
.hero {
  background: linear-gradient(135deg, var(--primary-light) 0%, #F1F5FA 100%);
  border-radius: var(--radius); padding: 28px 24px; margin-bottom: 20px; border: 1px solid #FFE4D0;
}
.hero-pickup {
  background: linear-gradient(135deg, #E8F2FE 0%, #F0F7FF 100%);
  border-color: #D0E3FF;
}
.hero h2 { font-size: 22px; color: var(--primary-dark); margin-bottom: 6px; }
.hero-pickup h2 { color: var(--info); }
.hero p { color: var(--text-2); font-size: 14px; }

/* ========== 代取入口横幅 ========== */
.pickup-banner {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #E8F2FE 0%, #F0F7FF 100%);
  border: 1.5px solid #D0E3FF; border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 20px; cursor: pointer; transition: all 0.2s;
}
.pickup-banner:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--info); }
.pickup-banner-icon { font-size: 32px; }
.pickup-banner-text { flex: 1; }
.pickup-banner-text strong { display: block; font-size: 15px; color: var(--info); }
.pickup-banner-text span { font-size: 13px; color: var(--text-2); }
.pickup-banner-arrow { font-size: 28px; color: var(--info); font-weight: 300; }

/* ========== 卡片 ========== */
.card { background: var(--card); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow); }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 18px; display: flex; align-items: center; gap: 8px; }
.step-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; background: var(--primary); color: #fff;
  border-radius: 50%; font-size: 14px; font-weight: 600;
}
.required-hint { margin-left: auto; font-size: 12px; color: var(--text-3); font-weight: 400; }

/* ========== 问题类型卡片 ========== */
.problem-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.problem-card { cursor: pointer; position: relative; }
.problem-card input { position: absolute; opacity: 0; pointer-events: none; }
.problem-card-inner {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 22px 14px; border: 2px solid var(--border); border-radius: var(--radius);
  transition: all 0.2s; background: #FAFAFA;
}
.problem-card:hover .problem-card-inner { border-color: var(--primary); transform: translateY(-2px); }
.problem-card input:checked + .problem-card-inner {
  border-color: var(--primary); background: var(--primary-light); box-shadow: 0 4px 14px rgba(14,65,124,0.15);
}
.problem-icon { font-size: 36px; }
.problem-label { font-size: 15px; font-weight: 600; }
.problem-desc { font-size: 12px; color: var(--text-3); }

/* ========== 表单 ========== */
.problem-form { display: grid; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 14px; font-weight: 500; color: var(--text); }
.required-mark { color: var(--danger); }
.optional-mark { font-size: 12px; color: var(--text-3); font-weight: 400; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; font-family: inherit;
  color: var(--text); background: #fff; transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,65,124,0.12);
}
.form-group input.error, .form-group textarea.error { border-color: var(--danger); }
.form-group textarea { resize: vertical; min-height: 70px; }
.error-msg { font-size: 12px; color: var(--danger); min-height: 16px; }
.char-count { font-size: 12px; color: var(--text-3); text-align: right; }

/* ========== 驿站单选 ========== */
.station-radios { display: flex; gap: 14px; flex-wrap: wrap; }
.station-radio { cursor: pointer; position: relative; flex: 1; min-width: 160px; }
.station-radio input { position: absolute; opacity: 0; pointer-events: none; }
.station-radio-inner {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; transition: all 0.2s; background: #FAFAFA;
}
.station-radio:hover .station-radio-inner { border-color: var(--primary); }
.station-radio input:checked + .station-radio-inner {
  border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark);
}

/* ========== 驿站多选 ========== */
.station-checkboxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.station-checkbox { cursor: pointer; position: relative; }
.station-checkbox input { position: absolute; opacity: 0; pointer-events: none; }
.station-checkbox-inner {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 14px 10px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; transition: all 0.2s; background: #FAFAFA;
}
.station-checkbox:hover .station-checkbox-inner { transform: translateY(-1px); }
.station-checkbox input:checked + .station-checkbox-inner { color: #fff; border-color: transparent; }
.station-checkbox input:checked + .st-cainiao { background: var(--st-cainiao); }
.station-checkbox input:checked + .st-duoduo { background: var(--st-duoduo); }
.station-checkbox input:checked + .st-jd { background: var(--st-jd); }
.station-checkbox input:checked + .st-postal { background: var(--st-postal); }
.station-checkbox input:checked + .st-sf { background: var(--st-sf); }

/* ========== 按钮 ========== */
.btn {
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 14px; font-weight: 500; font-family: inherit;
  padding: 10px 20px; transition: all 0.2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: #F0F0F0; color: var(--text-2); }
.btn-ghost:hover { background: #E4E4E4; }
.btn-warning { background: #FA8C16; color: #fff; }
.btn-warning:hover { background: #D46B08; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #D4380D; }
.btn-danger-text { background: transparent; color: var(--danger); }
.btn-danger-text:hover { background: var(--danger-light); }
.btn-lg { padding: 12px 28px; font-size: 15px; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.form-actions { display: flex; gap: 12px; margin-top: 6px; }

/* ========== 我的记录 ========== */
.my-records { display: flex; flex-direction: column; gap: 10px; }
.my-record-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: #FAFAFA; border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary); flex-wrap: wrap; gap: 8px;
}
.my-record-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.my-record-type { font-weight: 600; font-size: 14px; }
.my-record-waybill { font-size: 13px; color: var(--text-2); font-family: monospace; }

/* ========== 登录 ========== */
.staff-login { display: flex; justify-content: center; align-items: center; min-height: 400px; padding: 40px 0; }
.login-box {
  background: #fff; border-radius: var(--radius); padding: 40px 32px;
  box-shadow: var(--shadow-lg); text-align: center; width: 100%; max-width: 380px;
}
.login-icon { font-size: 48px; margin-bottom: 12px; }
.login-box h3 { font-size: 20px; margin-bottom: 6px; }
.login-hint { color: var(--text-2); font-size: 14px; margin-bottom: 24px; }
.login-box input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; text-align: center; margin-bottom: 8px;
}
.login-box input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,65,124,0.12); }

/* ========== 子标签 ========== */
.sub-tabs { display: flex; gap: 8px; margin-bottom: 20px; border-bottom: 2px solid var(--border); padding-bottom: 0; }
.sub-tab {
  background: transparent; border: none; cursor: pointer;
  padding: 10px 20px; font-size: 14px; font-weight: 500; color: var(--text-2);
  border-bottom: 3px solid transparent; transition: all 0.2s; margin-bottom: -2px;
}
.sub-tab:hover { color: var(--primary); }
.sub-tab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.sub-view { display: none; }
.sub-view.active { display: block; }

/* ========== 筛选标签（卡片内状态筛选） ========== */
.card .filter-tabs {
  display: flex; gap: 6px; margin: 0 0 14px 0;
  background: var(--bg-2); border-radius: var(--radius-sm);
  padding: 4px; width: fit-content; max-width: 100%;
}
.card .filter-tab {
  background: transparent; border: none; cursor: pointer;
  padding: 6px 14px; font-size: 13px; font-weight: 500; color: var(--text-2);
  border-radius: var(--radius-sm); transition: all 0.2s; white-space: nowrap;
}
.card .filter-tab:hover { color: var(--primary); background: rgba(14,65,124,0.06); }
.card .filter-tab.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.my-record-item .staff-note-row {
  margin-top: 10px; padding: 8px 12px;
  background: #f0f9ff; border-left: 3px solid var(--info, #3b82f6);
  border-radius: var(--radius-sm); font-size: 13px; color: var(--text-2);
  line-height: 1.5;
}

/* ========== 统计卡片 ========== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card {
  background: #fff; border-radius: var(--radius); padding: 18px 20px;
  display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow); border-left: 4px solid var(--primary);
}
.stat-pending { border-left-color: var(--warning); }
.stat-processing { border-left-color: var(--info); }
.stat-resolved { border-left-color: var(--success); }
.stat-rate { border-left-color: var(--primary); }
.stat-icon { font-size: 32px; }
.stat-body { display: flex; flex-direction: column; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--text); }
.stat-label { font-size: 13px; color: var(--text-2); }

/* ========== 每日统计 ========== */
.daily-stats-card { border-left: 4px solid var(--info); }
.daily-stats-body { display: flex; flex-direction: column; gap: 16px; }
.daily-today {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px;
}
.daily-today-item {
  background: linear-gradient(135deg, #F8FAFF 0%, #F0F4FA 100%);
  border-radius: var(--radius-sm); padding: 16px; text-align: center;
}
.daily-today-value { font-size: 28px; font-weight: 700; color: var(--info); }
.daily-today-value.green { color: var(--success); }
.daily-today-label { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.daily-table-wrap { overflow-x: auto; }
.daily-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 500px; }
.daily-table th { text-align: left; padding: 10px 12px; font-weight: 600; color: var(--text-2); border-bottom: 2px solid var(--border); white-space: nowrap; }
.daily-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-2); }
.daily-table tbody tr:hover { background: #FAFBFF; }
.rate-bar-wrap { display: flex; align-items: center; gap: 8px; }
.rate-bar { flex: 1; height: 8px; background: #F0F0F0; border-radius: 4px; overflow: hidden; min-width: 60px; }
.rate-bar-fill { height: 100%; border-radius: 4px; transition: width 0.4s; }
.rate-bar-fill.high { background: var(--success); }
.rate-bar-fill.mid { background: var(--warning); }
.rate-bar-fill.low { background: var(--danger); }
.rate-text { font-size: 12px; font-weight: 600; min-width: 38px; text-align: right; }
.daily-empty { text-align: center; color: var(--text-3); padding: 20px; font-size: 14px; }

/* ========== 工具栏 ========== */
.toolbar-card { padding: 16px 20px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.toolbar-left { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; }
.toolbar-right { display: flex; gap: 8px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 9px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; }
.search-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,65,124,0.12); }
.filter-select { padding: 9px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; background: #fff; cursor: pointer; color: var(--text); }
.filter-select:focus { outline: none; border-color: var(--primary); }

/* ========== 数据表格 ========== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 800px; }
.data-table thead { background: #FAFAFA; }
.data-table th { text-align: left; padding: 12px 14px; font-weight: 600; color: var(--text-2); border-bottom: 2px solid var(--border); white-space: nowrap; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-2); vertical-align: middle; }
.data-table tbody tr:hover { background: #FAFBFF; }
.data-table .col-waybill, .data-table .col-phone, .data-table .col-code { font-family: monospace; font-weight: 500; }
.data-table .col-time { color: var(--text-2); white-space: nowrap; font-size: 12px; }

/* ========== 状态标签 ========== */
.status-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.status-tag.tag-green { background: #E8F5E9; color: #2E7D32; }
.status-tag.tag-red { background: #FFEBEE; color: #C62828; }
.status-tag.tag-orange { background: #FFF3E0; color: #E65100; }
.status-tag.tag-admin { background: #E8F2FE; color: #1D4ED8; }
.status-tag.tag-delivery { background: #E8EFF8; color: #047857; }
.status-tag.tag-vip { background: linear-gradient(135deg,#FFF8E5,#FDE68A); color: #92400E; border: 1px solid #F59E0B; }
.status-pending { background: var(--warning-light); color: var(--warning); }
.status-processing { background: var(--info-light); color: var(--info); }
.status-resolved, .status-completed { background: var(--success-light); color: var(--success); }
.type-tag { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--primary-light); color: var(--primary-dark); white-space: nowrap; }

/* ========== 驿站标签 ========== */
.station-tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 500; white-space: nowrap; margin-right: 3px; }
.st-tag-cainiao { background: rgba(14,65,124,0.12); color: var(--st-cainiao); }
.st-tag-duoduo { background: rgba(250,81,81,0.12); color: var(--st-duoduo); }
.st-tag-jd { background: rgba(48,111,233,0.12); color: var(--st-jd); }
.st-tag-postal { background: rgba(0,136,58,0.12); color: var(--st-postal); }
.st-tag-sf { background: rgba(0,160,233,0.12); color: var(--st-sf); }
.station-cainiao { background: var(--primary-light); color: var(--primary-dark); }
.station-duoduo { background: var(--danger-light); color: var(--danger); }

/* ========== 空状态 ========== */
.empty-state { text-align: center; padding: 50px 20px; color: var(--text-3); }
/* 终极：禁止任何圆形/虚线边框(避免浏览器缓存旧icons.css导致透明圆圈残留) */
.empty-icon {
  font-size: 56px !important;
  line-height: 1.2 !important;
  margin-bottom: 10px;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  width: auto !important;
  height: auto !important;
  display: inline-block !important;
  align-items: initial !important;
  justify-content: initial !important;
}

/* ========== 弹窗 ========== */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 100001;
  justify-content: center; align-items: center; padding: 20px;
  animation: fadeIn 0.2s ease both;
  /* 遮罩：深灰半透明 + 柔化聚焦 */
  background:
    radial-gradient(1200px 800px at 50% -10%, rgba(14,65,124,0.18), transparent 60%),
    radial-gradient(900px 600px at 110% 110%, rgba(114,46,209,0.18), transparent 60%),
    rgba(15,23,42,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-overlay.show { display: flex; }

/* 通用弹窗内容容器（卡片）：磨砂白+柔边+渐变顶栏 */
.modal-content {
  position: relative; width: 100%; max-width: 520px;
  background: #FFFFFF;
  border-radius: 18px;
  box-shadow:
    0 30px 80px -12px rgba(15,23,42,0.45),
    0 10px 30px -6px rgba(15,23,42,0.25),
    0 0 0 1px rgba(255,255,255,0.6) inset;
  overflow: hidden; max-height: 92vh; display: flex; flex-direction: column;
  animation: slideUpPop 0.28s cubic-bezier(.2,.9,.2,1.2) both;
  isolation: isolate;
}
/* 顶部装饰：渐变横幅 */
.modal-content::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 120px; z-index: 0; pointer-events: none;
  background:
    radial-gradient(600px 180px at 10% -20%, rgba(14,65,124,0.22), transparent 60%),
    radial-gradient(500px 160px at 110% 20%, rgba(114,46,209,0.22), transparent 60%),
    linear-gradient(135deg, #FFF7F0 0%, #F5F3FF 100%);
  border-bottom: 1px solid rgba(15,23,42,0.06);
}
.modal-content > .modal-header,
.modal-content > .modal-body,
.modal-content > .modal-footer { position: relative; z-index: 1; }
.modal-content > .modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 14px;
}
.modal-content > .modal-header h3 {
  margin: 0; font-size: 18px; font-weight: 700; color: var(--text, #111);
  display: flex; align-items: center; gap: 8px;
}
.modal-content > .modal-header h3::before {
  content: "✦"; color: var(--primary, #0E417C); font-size: 18px;
}
.modal-content > .modal-header .modal-close {
  background: rgba(15,23,42,0.05); border: 1px solid rgba(15,23,42,0.06);
  border-radius: 10px; width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--text-3, #94a3b8); cursor: pointer;
  transition: all .18s ease;
}
.modal-content > .modal-header .modal-close:hover {
  background: rgba(250,81,81,0.1); border-color: rgba(250,81,81,0.25); color: #FA5151;
  transform: translateY(-1px);
}
.modal-content > .modal-body {
  padding: 4px 24px 18px; overflow-y: auto; flex: 1 1 auto;
}
.modal-content > .modal-body .detail-row {
  padding: 12px 14px; background: linear-gradient(180deg, #FAFBFC, #F4F5F7);
  border: 1px solid rgba(15,23,42,0.06);
  border-radius: 12px;
}
.modal-content > .modal-body .detail-label { color: var(--text-3, #94a3b8); font-weight: 600; min-width: 82px; }
.modal-content > .modal-body .detail-value { color: var(--text, #0f172a); font-weight: 500; }
.modal-content > .modal-footer {
  padding: 14px 24px 20px; display: flex; justify-content: flex-end; gap: 10px;
  border-top: 1px solid rgba(15,23,42,0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(249,250,251,1) 100%);
}
.modal-content .form-group label {
  font-size: 13px; font-weight: 600; color: var(--text-2, #334155);
  letter-spacing: 0.2px;
}

.modal-box { background: #fff; border-radius: var(--radius); padding: 32px 28px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); animation: slideUp 0.25s; max-height: 90vh; overflow-y: auto; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUpPop {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
.modal-success { text-align: center; }
.modal-icon-success { font-size: 56px; margin-bottom: 12px; }
.modal-success h3 { font-size: 20px; margin-bottom: 8px; }
.modal-success p { color: var(--text-2); font-size: 14px; margin-bottom: 20px; }
.success-ticket { background: var(--primary-light); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 20px; display: flex; flex-direction: column; gap: 4px; }
.success-ticket span { font-size: 12px; color: var(--text-2); }
.success-ticket strong { font-size: 20px; color: var(--primary-dark); font-family: monospace; letter-spacing: 1px; }

/* ========== 详情弹窗 ========== */
.modal-detail, .modal-pw { max-width: 480px; }
.modal-coupon  { max-width: 760px; padding: 28px 32px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-header h3 { font-size: 18px; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-3); padding: 4px 8px; border-radius: 6px; transition: all 0.2s; }
.modal-close:hover { background: #F0F0F0; color: var(--text); }
.detail-content { display: grid; gap: 12px; margin-bottom: 20px; }
.detail-row { display: flex; gap: 10px; padding: 10px 12px; background: #FAFAFA; border-radius: var(--radius-sm); }
.detail-label { font-size: 13px; color: var(--text-2); min-width: 70px; flex-shrink: 0; }
.detail-value { font-size: 14px; color: var(--text); word-break: break-all; }

/* ========== 通用弹窗（替代方案） ========== */
.modal { display: none; position: fixed; inset: 0; z-index: 100001; justify-content: center; align-items: center; padding: 20px; }
.modal.show { display: flex; }
.modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.modal-dialog { position: relative; background: #fff; border-radius: var(--radius); width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); animation: slideUp 0.25s; max-height: 90vh; overflow-y: auto; }
.modal-body { padding: 20px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.detail-actions { display: grid; gap: 14px; }
.status-selector, .detail-notes, .extra-fee-row { display: flex; flex-direction: column; gap: 6px; }
.extra-fee-row input, .status-selector select, .detail-notes textarea { width: 100%; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; }
.extra-fee-row input:focus, .status-selector select:focus, .detail-notes textarea:focus { outline: none; border-color: var(--primary); }
.extra-fee-row { padding: 10px 12px; background: #fffbeb; border-radius: var(--radius-sm); border: 1px dashed var(--warning); }

/* ========== Toast ========== */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px);
  background: rgba(0,0,0,0.8); color: #fff; padding: 12px 24px; border-radius: 24px;
  font-size: 14px; z-index: 100003; opacity: 0; transition: all 0.3s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: rgba(250,81,81,0.92); }
.toast.success { background: rgba(7,193,96,0.92); }

/* ========== 页脚 ========== */
.footer { text-align: center; padding: 24px 16px; color: var(--text-3); font-size: 12px; border-top: 1px solid var(--border); }
.footer-contact { display: block; margin-top: 6px; }
.footer-contact b { color: var(--primary); }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .logo-text h1 { font-size: 17px; }
  .logo-sub { font-size: 11px; }
  .logo-icon { font-size: 28px; }
  .tabs {
    width: 100%; justify-content: flex-start;
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    max-width: none; flex: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    flex: 0 0 auto; padding: 7px 12px; font-size: 13px;
    gap: 4px; white-space: nowrap; min-width: auto; height: 36px;
  }
  .sub-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
  .sub-tab { white-space: nowrap; padding: 9px 12px; font-size: 13px; min-width: auto; flex: 0 0 auto; }
  .card .filter-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
  .card .filter-tab { white-space: nowrap; padding: 5px 10px; font-size: 12px; flex: 0 0 auto; }
  .hero { padding: 20px 16px; }
  .hero h2 { font-size: 18px; }
  .hero p { font-size: 13px; }
  .card { padding: 18px 16px; }
  .problem-types { grid-template-columns: 1fr 1fr; }
  .problem-card-inner { padding: 16px 8px; }
  .problem-icon { font-size: 28px; }
  .problem-label { font-size: 13px; }
  .problem-desc { font-size: 11px; }
  .station-radios { flex-direction: column; }
  .station-checkboxes { grid-template-columns: 1fr 1fr; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .toolbar-left { width: 100%; }
  .toolbar-right { width: 100%; }
  .search-input { min-width: 100%; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 22px; }
  .pickup-banner { padding: 14px 16px; }
  .pickup-banner-text strong { font-size: 14px; }
  .pickup-banner-text span { font-size: 12px; }
  .daily-today { grid-template-columns: 1fr 1fr 1fr; }
  .daily-today-value { font-size: 22px; }
  .visit-counter { font-size: 12px; padding: 6px 12px; gap: 6px; }
}
@media (max-width: 480px) {
  .header-inner { flex-wrap: wrap; gap: 8px; }
  .logo { gap: 8px; }
  .logo-text h1 { font-size: 15px; }
  .logo-sub { font-size: 10px; }
  .hero { padding: 16px 12px; }
  .hero h2 { font-size: 17px; }
  .container { padding: 0 12px; }
  .tab { padding: 7px 10px; font-size: 12px; height: 34px; gap: 3px; }
  .user-info-btn { padding: 6px 8px 6px 4px !important; }
  .user-name { max-width: 70px; }
  .user-balance { font-size: 11px; padding: 1px 6px; }
  .user-dropdown { width: 200px; }
}
@media (max-width: 400px) {
  .problem-types { grid-template-columns: 1fr; }
  .station-checkboxes { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .daily-today { grid-template-columns: 1fr; }
  .tab { padding: 7px 8px; font-size: 11px; }
  .user-nav { margin-left: auto; }
  .user-name { display: none; }
  .user-info-btn { padding: 6px 8px !important; }
}

/* 地址选择下拉 */
#savedAddressSelect {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius); background: #fff; color: var(--text);
  font-size: 14px; cursor: pointer;
  transition: border-color var(--anim-fast);
}
#savedAddressSelect:focus { outline: none; border-color: var(--primary); }
#savedAddressSelect:empty { display: none; }

/* ========== 主页入口卡片 ========== */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.entry-card {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border-radius: var(--radius); padding: 22px 20px;
  box-shadow: var(--shadow); text-decoration: none; color: var(--text);
  transition: transform var(--anim-fast) var(--ease-out-expo),
              box-shadow var(--anim-mid) var(--ease-out-expo);
  position: relative; overflow: hidden;
  min-height: 82px;
}
.entry-card::before {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius);
  box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow var(--anim-fast);
  pointer-events: none;
}
.entry-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.entry-card:hover::before { box-shadow: inset 0 0 0 1.5px var(--primary); }
.entry-icon { font-size: 40px; flex-shrink: 0; width: 48px; text-align: center; }
.entry-body { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.entry-body strong {
  font-size: 16px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block; line-height: 1.3;
}
.entry-body span {
  font-size: 12px; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block; line-height: 1.3;
}
.entry-arrow { font-size: 26px; color: var(--text-3); font-weight: 300; flex-shrink: 0; }
.entry-staff { background: linear-gradient(135deg, #E7EEF6 0%, #F1F5FA 100%); }
@media (max-width: 768px) {
  .entry-grid { grid-template-columns: 1fr; }
  .entry-card { padding: 18px 16px; min-height: 72px; }
  .entry-icon { font-size: 32px; width: 36px; }
  .entry-body strong { font-size: 15px; }
  .entry-body span { font-size: 12px; }
}
@media (max-width: 400px) {
  .entry-card { padding: 14px 12px; gap: 10px; min-height: 64px; }
  .entry-icon { font-size: 28px; width: 32px; }
  .entry-body strong { font-size: 14px; }
  .entry-body span { font-size: 11px; }
  .entry-arrow { font-size: 22px; }
}
.entry-parcel { background: linear-gradient(135deg, #E8EFF8 0%, #F0FFF8 100%); }
.entry-recharge { background: linear-gradient(135deg, #FFF5E8 0%, #FFFCF5 100%); }
.entry-faq { background: linear-gradient(135deg, #E8F2FE 0%, #F0F7FF 100%); }

/* ========== 页脚访问统计 ========== */
.visit-counter {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; background: #F7F9FC; border-radius: 20px;
  color: var(--text-2); font-size: 13px; margin-top: 12px;
  border: 1px solid var(--border);
}
.visit-counter .visit-value { font-weight: 600; color: var(--primary); font-variant-numeric: tabular-nums; }
.visit-counter .visit-sep { color: var(--text-3); }

/* ========== 使用说明卡片 ========== */
.tips-list { list-style: none; display: grid; gap: 10px; color: var(--text-2); font-size: 14px; }
.tips-list li { padding: 8px 10px; background: #FAFBFF; border-radius: 8px; }
.tips-list b { color: var(--text); }

/* ========== 用户导航 ========== */
.user-nav { display: flex; align-items: center; flex-shrink: 0; }
.user-login-btn {
  background: #fff !important; color: var(--primary) !important;
  border-radius: 7px; font-weight: 600 !important;
  padding: 8px 14px !important; height: 38px;
}
.user-menu { position: relative; display: flex; align-items: center; }
.user-info-btn {
  display: inline-flex !important; align-items: center !important; gap: 6px !important;
  justify-content: center !important; text-align: center !important;
  background: #fff !important; color: var(--primary) !important;
  border-radius: 7px !important; font-weight: 600 !important;
  padding: 8px 12px 8px 6px !important; height: 38px; line-height: 1;
  cursor: pointer; position: relative; z-index: 250;
}
.user-avatar {
  width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-light); border-radius: 50%; font-size: 14px;
}
.user-name { font-size: 13px; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-balance {
  font-size: 12px; background: var(--primary-light); color: var(--primary-dark);
  padding: 2px 8px; border-radius: 12px; font-weight: 600;
}
.user-dropdown {
  position: fixed; width: 240px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  overflow: hidden; z-index: 9999;
  animation: userDropdownFadeIn 0.18s ease-out;
}
@keyframes userDropdownFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.user-dropdown-header {
  padding: 14px 16px; background: linear-gradient(135deg, var(--primary-light) 0%, #F1F5FA 100%);
  border-bottom: 1px solid var(--border-2);
}
.user-dn-name { font-weight: 700; color: var(--primary-dark); font-size: 15px; }
.user-dn-phone { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.user-dn-balance { font-size: 13px; margin-top: 8px; color: var(--text); }
.user-dn-balance b { color: var(--primary-dark); }
.user-dd-item {
  display: block; padding: 11px 16px; color: var(--text); text-decoration: none;
  font-size: 14px; transition: background 0.15s;
}
.user-dd-item:hover { background: #FAFBFF; color: var(--primary); }

/* ========== 登录拦截卡片 ========== */
.need-login-card { text-align: center; }
.need-login { padding: 20px 16px; }
.need-login-icon { font-size: 64px; margin-bottom: 12px; }
.need-login h3 { font-size: 20px; margin-bottom: 8px; }
.need-login p { color: var(--text-2); font-size: 14px; margin-bottom: 20px; }
.need-login-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ========== 用户登录/注册页面 ========== */
.user-auth-wrap { display: flex; justify-content: center; padding: 30px 0; }
.user-auth-box {
  width: 100%; max-width: 440px; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.auth-tabs { display: flex; background: #FAFAFA; }
.auth-tab {
  flex: 1; padding: 14px; background: transparent; border: none; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--text-2); transition: all 0.2s;
  border-bottom: 3px solid transparent;
}
.auth-tab.active { background: #fff; color: var(--primary); border-bottom-color: var(--primary); }
.auth-view { display: none; padding: 28px 28px 24px; }
.auth-view.active { display: block; }
.auth-icon { font-size: 52px; text-align: center; margin-bottom: 6px; }
.auth-view h3 { font-size: 20px; text-align: center; margin-bottom: 4px; }
.auth-hint { text-align: center; color: var(--text-2); font-size: 13px; margin-bottom: 20px; }
.auth-form { display: grid; gap: 14px; }
.auth-tip { text-align: center; color: var(--text-3); font-size: 13px; margin-top: 16px; }
.auth-tip a { color: var(--primary); text-decoration: none; font-weight: 500; }

/* ========== 表单网格（代寄快递） ========== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}
.fee-preview {
  background: var(--primary-light); color: var(--primary-dark);
  padding: 11px 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px;
}

/* ========== 尺寸/大小 选择 ========== */
.size-options { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.size-option { cursor: pointer; position: relative; }
.size-option input { position: absolute; opacity: 0; pointer-events: none; }
.size-option-inner {
  padding: 14px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  background: #FAFAFA; transition: all 0.2s; display: grid; gap: 4px;
}
.size-option:hover .size-option-inner { transform: translateY(-1px); border-color: var(--primary); }
.size-option input:checked + .size-option-inner {
  background: var(--primary-light); border-color: var(--primary);
}
.size-option.size-small input:checked + .size-option-inner {
  background: #E8EFF8; border-color: #07C160;
}
.size-option.size-big input:checked + .size-option-inner {
  background: #E7EEF6; border-color: #FF8A3D;
}
.size-option.size-huge input:checked + .size-option-inner {
  background: #FFECEC; border-color: #F55555;
}
.size-title { font-weight: 700; font-size: 15px; color: var(--text); }
.size-desc { font-size: 12px; color: var(--text-2); }
.size-price { font-weight: 800; font-size: 18px; color: var(--primary-dark); margin-top: 4px; }
.size-small .size-price { color: #07C160; }
.size-big .size-price { color: #FF8A3D; }
.size-huge .size-price { color: #F55555; }

/* ========== 支付方式选择 ========== */
.pay-methods { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.pay-methods-large { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pay-method { cursor: pointer; position: relative; }
.pay-method input { position: absolute; opacity: 0; pointer-events: none; }
.pay-method-inner {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  transition: all 0.2s; background: #FAFAFA; font-weight: 600; font-size: 14px;
}
.pay-method:hover .pay-method-inner { transform: translateY(-1px); border-color: var(--primary); }
.pay-method input:checked + .pay-method-inner {
  background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark);
}
.pay-alipay input:checked + .pay-method-inner { background: #E8F2FF; border-color: #1677FF; color: #1677FF; }
.pay-wechat input:checked + .pay-method-inner { background: #E8EFF8; border-color: #07C160; color: #07C160; }
.pay-balance input:checked + .pay-method-inner { background: #E7EEF6; border-color: var(--primary); color: var(--primary-dark); }
.pay-later input:checked + .pay-method-inner { background: #F0F0F0; border-color: var(--text-3); color: var(--text); }
.balance-label { font-size: 12px; color: var(--text-2); font-weight: 400; margin-left: 4px; }

/* ========== 费用汇总 ========== */
.fee-summary {
  margin-top: 16px; background: #FAFBFF; border-radius: var(--radius-sm); padding: 16px;
  display: grid; gap: 10px; border: 1px solid #E8EDFB;
}
.fee-row { display: flex; justify-content: space-between; color: var(--text-2); font-size: 14px; }
.fee-total { font-size: 16px; font-weight: 700; color: var(--primary-dark); border-top: 1px dashed #D0D8F0; padding-top: 10px; }
.order-discount-banner {
  display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 10px;
  background: linear-gradient(135deg, #FFF7E6, #FFEFD5); border: 1px solid #FFD591;
  color: #B45309; font-size: 13px; font-weight: 600; line-height: 1.55;
}
.parcel-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.parcel-actions .btn { flex: 1; min-width: 120px; }

/* ========== 支付页面 ========== */
.payment-wrap { padding: 10px 0; }
.biz-card {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
  background: linear-gradient(135deg, var(--primary-light) 0%, #F1F5FA 100%);
  border: 1.5px solid #FFD4B8;
}
.biz-icon { font-size: 40px; }
.biz-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.biz-title { font-weight: 700; font-size: 17px; color: var(--primary-dark); }
.biz-id { font-size: 12px; color: var(--text-2); font-family: monospace; }
.biz-right { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; }
.biz-amount { font-size: 26px; font-weight: 700; color: var(--primary-dark); }
.biz-countdown { font-size: 13px; color: var(--warning); margin-top: 4px; font-weight: 600; }
.biz-countdown #countdownTime { font-size: 15px; color: var(--danger); font-weight: 700; }
.biz-countdown.expired #countdownTime { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.4; } }

/* 充值金额选择 */
.recharge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.recharge-item { cursor: pointer; position: relative; }
.recharge-item input { position: absolute; opacity: 0; pointer-events: none; }
.recharge-item span {
  display: block; padding: 18px; text-align: center; font-weight: 700;
  font-size: 18px; color: var(--text);
  border: 2px solid var(--border); border-radius: var(--radius-sm); background: #FAFAFA;
  transition: all 0.2s;
}
.recharge-item:hover span { transform: translateY(-1px); }
.recharge-item.active span, .recharge-item input:checked + span {
  background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark);
}
/* 自定义按钮与其他按钮完全相同的大小和样式 */
.recharge-custom span {
  display: block; padding: 18px; text-align: center; font-weight: 700;
  font-size: 18px; color: var(--text);
  border: 2px solid var(--border); border-radius: var(--radius-sm); background: #FAFAFA;
  transition: all 0.2s;
}
.recharge-custom:hover span { transform: translateY(-1px); }
.recharge-item.active .recharge-custom span,
.recharge-custom input:checked + span {
  background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark);
}

/* 自定义金额输入区域 */
.recharge-custom-input {
  margin-top: 14px; padding: 16px; background: #F7F9FC;
  border-radius: var(--radius-sm); border: 1px dashed var(--primary);
  animation: slideDown 0.2s ease-out;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.custom-input-box {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #fff; border: 2px solid var(--primary); border-radius: 10px;
  padding: 8px 14px;
}
.custom-prefix { font-size: 22px; font-weight: 700; color: var(--primary); }
.custom-suffix { font-size: 16px; color: var(--text-2); }
#rechargeCustomAmount {
  width: 180px; padding: 6px 10px; border: none; outline: none;
  font-size: 20px; font-weight: 700; text-align: center;
  color: var(--text);
}
#rechargeCustomAmount::-webkit-outer-spin-button,
#rechargeCustomAmount::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
#rechargeCustomAmount[type=number] { appearance: textfield; -moz-appearance: textfield; }
.custom-tip { margin: 8px 0 0; text-align: center; font-size: 12px; color: var(--text-3); }

/* 二维码 */
.qrcode-box { text-align: center; padding: 20px; background: #FAFBFF; border-radius: var(--radius-sm); }
.qrcode-content svg { border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.qrcode-tip { margin-top: 14px; font-size: 14px; color: var(--text-2); }
.mock-hint { font-size: 12px; color: var(--warning); }
.mock-hint a { color: var(--primary); font-weight: 600; }

/* ========== 我的记录 - 扩展 ========== */
.my-record-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fee-amount { font-weight: 700; color: var(--primary-dark); font-size: 14px; }
.record-id-badge {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 500; color: var(--text-2); background: #F0F0F0; font-family: monospace;
}
.status-cancelled { background: var(--danger-light); color: var(--danger); }
.my-parcel-item { padding-top: 14px; padding-bottom: 14px; }

@media (max-width: 768px) {
  .user-auth-box { max-width: 100%; border-radius: var(--radius); box-shadow: none; }
  .auth-view { padding: 22px 18px; }
  .biz-card { flex-wrap: wrap; }
  .biz-right { width: 100%; align-items: flex-start; }
  .biz-amount { width: 100%; text-align: right; }
  .biz-countdown { text-align: right; width: 100%; }
  .recharge-grid { grid-template-columns: repeat(3, 1fr); }
  .user-name { display: none; }
  .user-balance { font-size: 11px; }
}

/* ====================================================================
 *   丝滑动画升级 2026（追加覆盖，不影响上面原有选择器）
 *   - 所有 transition 升级为 cubic-bezier 曲线
 *   - 卡片/按钮 hover 微抬起 + 点击缩放反馈
 *   - 列表 stagger 淡入（加载时逐条弹出）
 *   - 二维码区域缩放弹出动画
 *   - 减少重复 animation 抖动（transform 使用 will-change 提示 GPU）
 * ==================================================================== */

/* 过渡曲线升级（覆盖所有 0.2s 级别） */
.tab,
.pickup-banner,
.problem-card-inner,
.station-radio-inner,
.station-checkbox-inner,
.btn,
.sub-tab,
.modal-close,
.entry-card,
.auth-tab,
.size-option-inner,
.pay-method-inner,
.recharge-item span,
.rate-bar-fill,
.user-dd-item,
.form-group input,
.form-group textarea,
.form-group select,
.login-box input,
.toast,
.data-table tbody tr {
  transition-timing-function: var(--ease-out-expo) !important;
  transition-duration: var(--anim-fast) !important;
}

/* 卡片基础 + hover 丝滑抬起 */
.card,
.entry-card,
.login-box,
.user-auth-box,
.qrcode-box {
  will-change: transform, box-shadow;
  transition: transform var(--anim-fast) var(--ease-out-expo),
              box-shadow var(--anim-mid)  var(--ease-out-expo),
              border-color var(--anim-fast) var(--ease-out-expo),
              background var(--anim-fast) var(--ease-out-expo);
}
.card:hover          { transform: translateY(-1px); }
.entry-card:hover    { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.problem-card:hover .problem-card-inner { transform: translateY(-3px); }
.station-checkbox:hover .station-checkbox-inner { transform: translateY(-2px); }
.pickup-banner:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.size-option:hover .size-option-inner { transform: translateY(-2px); }
.pay-method:hover .pay-method-inner { transform: translateY(-2px); }
.recharge-item:hover span { transform: translateY(-2px) scale(1.01); }
.stat-card { transition: transform var(--anim-fast) var(--ease-out-expo), box-shadow var(--anim-mid) var(--ease-out-expo); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* 按钮丝滑点击反馈（按下回弹） */
.btn {
  will-change: transform, background;
  transition: transform 180ms var(--ease-out-back),
              background var(--anim-fast) var(--ease-out-expo),
              color var(--anim-fast) var(--ease-out-expo),
              box-shadow var(--anim-fast) var(--ease-out-expo);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.09); }
.btn:active { transform: scale(0.96); box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.btn-primary:hover { box-shadow: 0 6px 16px rgba(14,65,124,0.28); }
.btn-primary:active { box-shadow: 0 2px 4px rgba(14,65,124,0.2); }

/* 顶部导航 tab 激活弹入感 */
.tab.active {
  animation: tabPopIn 260ms var(--ease-out-back);
}
@keyframes tabPopIn {
  0%   { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* 统计数字从 0 变大的效果（首次加载） */
.stat-value {
  display: inline-block;
  animation: numZoomIn var(--anim-mid) var(--ease-out-expo) both;
  animation-delay: var(--d, 0ms);
}
.daily-today-value {
  display: inline-block;
  animation: numZoomIn var(--anim-mid) var(--ease-out-expo) both;
  animation-delay: var(--d, 0ms);
}
@keyframes numZoomIn {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}

/* 首页 6 个入口卡片 stagger 淡入弹出 */
.entry-card {
  animation: cardFlyIn var(--anim-slow) var(--ease-out-expo) both;
  animation-delay: calc(var(--i, 0) * 60ms + 80ms);
}
@keyframes cardFlyIn {
  0%   { opacity: 0; transform: translateY(18px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0)    scale(1); }
}
.entry-grid > .entry-card:nth-child(1) { --i: 0; }
.entry-grid > .entry-card:nth-child(2) { --i: 1; }
.entry-grid > .entry-card:nth-child(3) { --i: 2; }
.entry-grid > .entry-card:nth-child(4) { --i: 3; }
.entry-grid > .entry-card:nth-child(5) { --i: 4; }
.entry-grid > .entry-card:nth-child(6) { --i: 5; }

/* 我的记录列表 stagger */
.my-record-item,
.my-records > .my-parcel-item {
  animation: listItemFadeIn var(--anim-mid) var(--ease-out-expo) both;
  animation-delay: calc(var(--i, 0) * 50ms + 80ms);
}
@keyframes listItemFadeIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
.my-records > *:nth-child(1) { --i: 0; }
.my-records > *:nth-child(2) { --i: 1; }
.my-records > *:nth-child(3) { --i: 2; }
.my-records > *:nth-child(4) { --i: 3; }
.my-records > *:nth-child(5) { --i: 4; }
.my-records > *:nth-child(6) { --i: 5; }
.my-records > *:nth-child(7) { --i: 6; }
.my-records > *:nth-child(8) { --i: 7; }
.my-records > *:nth-child(9) { --i: 8; }
.my-records > *:nth-child(10) { --i: 9; }
.my-records > *:nth-child(n+11) { --i: 10; }

/* 统计网格 stagger */
.stats-grid > .stat-card {
  animation: cardFlyIn var(--anim-slow) var(--ease-out-expo) both;
  animation-delay: calc(var(--i, 0) * 70ms + 60ms);
}
.stats-grid > .stat-card:nth-child(1) { --i: 0; }
.stats-grid > .stat-card:nth-child(2) { --i: 1; }
.stats-grid > .stat-card:nth-child(3) { --i: 2; }
.stats-grid > .stat-card:nth-child(4) { --i: 3; }
.stats-grid > .stat-card:nth-child(n+5) { --i: 4; }

/* 表格行 stagger */
.data-table tbody tr {
  animation: rowFadeIn var(--anim-mid) var(--ease-out-expo) both;
  animation-delay: calc(var(--i, 0) * 35ms);
}
.data-table tbody tr:nth-child(1)  { --i: 0; }
.data-table tbody tr:nth-child(2)  { --i: 1; }
.data-table tbody tr:nth-child(3)  { --i: 2; }
.data-table tbody tr:nth-child(4)  { --i: 3; }
.data-table tbody tr:nth-child(5)  { --i: 4; }
.data-table tbody tr:nth-child(6)  { --i: 5; }

/* 隐藏 file input 但不阻止 .click()（移动端 display:none 的 input 无法被 JS 触发） */
.hidden-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }

/* ========== 图片上传/展示（后台详情 + 用户记录） ========== */
.detail-images { margin: 16px 0; padding: 12px; background: var(--bg); border-radius: var(--radius-sm); }
.image-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; min-height: 36px; align-items: center; }
.image-item { position: relative; width: 72px; height: 72px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.image-item img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; display: block; }
.image-delete-btn { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; border: none; font-size: 11px; line-height: 18px; text-align: center; cursor: pointer; padding: 0; }
.image-delete-btn:hover { background: var(--danger); }
.image-upload-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }

/* 用户端记录里的图片缩略图 */
.record-images { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.record-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; cursor: pointer; border: 1px solid var(--border); }
.record-thumb:hover { border-color: var(--primary); }
.data-table tbody tr:nth-child(7)  { --i: 6; }
.data-table tbody tr:nth-child(8)  { --i: 7; }
.data-table tbody tr:nth-child(9)  { --i: 8; }
.data-table tbody tr:nth-child(10) { --i: 9; }
.data-table tbody tr:nth-child(n+11) { --i: 10; }
@keyframes rowFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 二维码区域：从 0.8 → 1 弹出 + 阴影扩散 */
#qrcodeArea {
  animation: qrPopIn 520ms var(--ease-out-back) both;
}
@keyframes qrPopIn {
  0%   { opacity: 0; transform: scale(0.82); filter: blur(4px); }
  60%  { filter: blur(0); }
  100% { opacity: 1; transform: scale(1); }
}
.qrcode-box {
  transition: transform var(--anim-fast) var(--ease-out-expo), box-shadow var(--anim-mid) var(--ease-out-expo);
}
.qrcode-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

/* 登录/注册 Tab 切换视图的淡入 */
.auth-view.active {
  animation: authViewFade var(--anim-mid) var(--ease-out-expo);
}
@keyframes authViewFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.auth-icon {
  display: inline-block;
  animation: iconFloat 3s ease-in-out infinite;
}
/* 登录图标轻微浮动，让页面更有生气 */
@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

/* Modal 弹窗动画升级 */
.modal-overlay { animation: fadeIn var(--anim-fast) var(--ease-out-expo) both; }
.modal-box     { animation: slideUpPop var(--anim-slow) var(--ease-out-back) both; }
@keyframes slideUpPop {
  0%   { opacity: 0; transform: translateY(24px) scale(0.94); }
  100% { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Toast 弹出用 cubic-bezier + 轻微回弹 */
.toast {
  transition: opacity 300ms var(--ease-out-expo),
              transform 360ms var(--ease-out-back) !important;
}

/* ========== 优惠券发放弹窗 ========== */
.form-help {
  display: block; font-size: 12px; color: var(--text-3);
  margin-top: 4px; line-height: 1.5;
}
.coupon-form-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px 22px; margin-bottom: 18px;
}
.coupon-form-grid .cf-big-row { grid-column: 1 / -1; }
.discount-picker {
  position: relative;
}
.discount-picker input {
  padding-right: 34px;
  font-size: 18px; font-weight: 600; color: var(--primary);
}
.discount-suffix {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--primary); font-weight: 600; font-size: 18px;
}
.discount-presets {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.preset-btn {
  background: #F2F3F5; border: none; padding: 5px 12px;
  border-radius: 7px; cursor: pointer; font-size: 12px; font-weight: 500;
  color: var(--text-1); transition: all 0.15s;
}
.preset-btn:hover { background: var(--primary-light); color: var(--primary); transform: translateY(-1px); }
.input-with-suffix {
  position: relative;
}
.input-with-suffix input { padding-right: 34px; }
.input-with-suffix > span {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); font-size: 13px;
}
.coupon-form-preview {
  background: linear-gradient(135deg, #FFF7EC 0%, #FFE9D2 100%);
  border: 1px dashed #FFB065; border-radius: 12px; padding: 16px 18px;
}
.cfp-title {
  font-size: 12px; color: #B86A00; font-weight: 500; margin-bottom: 10px;
}
.cfp-card {
  display: grid; grid-template-columns: 150px 1fr;
  gap: 16px; align-items: center;
}
.cfp-left {
  background: #fff;
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(14,65,124,0.12);
  border: 1px solid #FFE0BC;
}
.cfp-discount {
  font-size: 34px; font-weight: 800; color: var(--primary);
  line-height: 1; letter-spacing: -1px;
}
.cfp-discount .cfp-z { font-size: 16px; font-weight: 600; margin-left: 2px; }
.cfp-code {
  font-size: 11px; color: #B86A00; background: #FFF3DC;
  border-radius: 5px; padding: 3px 8px; margin-top: 8px;
  display: inline-block; font-family: monospace; font-weight: 600;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cfp-right { display: flex; flex-direction: column; gap: 4px; }
.cfp-line {
  display: flex; justify-content: space-between;
  font-size: 13px;
}
.cfp-k { color: #92631F; }
.cfp-v { color: var(--text); font-weight: 500; }
@media (max-width: 640px) {
  .coupon-form-grid { grid-template-columns: 1fr; gap: 12px; }
  .modal-coupon { padding: 20px 16px; }
  .cfp-card { grid-template-columns: 1fr; }
}

/* ========== 公告编辑器（单页发布） ========== */
.ann-editor-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 4px 2px 12px;
}
.ann-editor-title {
  font-size: 17px; font-weight: 700; color: var(--text); flex: 1;
  text-align: center;
}
.ann-hero-preview {
  background: linear-gradient(180deg, #FCFCFF 0%, #F4F0FF 100%);
  border: 2px dashed #A78BFA;
  padding: 28px 30px 18px; margin-bottom: 20px;
  position: relative;
}
.ann-hero-inner {
  background: #fff; border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 4px 14px rgba(139,92,246,.12);
  margin-bottom: 10px;
}
.ann-hero-bigtitle {
  font-size: 28px; font-weight: 800; color: #111;
  margin: 0 0 14px; line-height: 1.35;
  border-bottom: 3px solid #F3E8FF; padding-bottom: 12px;
}
.ann-hero-midtitle {
  font-size: 20px; font-weight: 700; color: var(--text);
  margin: 0 0 8px; line-height: 1.4;
}
.ann-hero-subtitle {
  font-size: 16px; font-weight: 600; color: var(--text-2);
  margin: 0 0 4px; line-height: 1.5;
}
.ann-hero-bigtitle:empty::before,
.ann-hero-midtitle:empty::before,
.ann-hero-subtitle:empty::before {
  content: attr(data-placeholder);
  color: #C4B5FD;
  font-weight: 500;
}
.ann-hero-tag {
  text-align: right; font-size: 12px; color: #7C3AED;
  font-weight: 500;
}
.ann-editor-grid {
  display: grid; grid-template-columns: 1fr 300px;
  gap: 24px; align-items: start;
}
.ann-editor-form .form-group { margin-bottom: 18px; }

.inline-toolbar, .block-toolbar {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  background: #F7F8FA; border: 1px solid var(--border-2);
  border-radius: 8px 8px 0 0; padding: 6px 8px;
}
.block-toolbar { border-radius: 8px 8px 0 0; margin-bottom: 0; }
.inline-toolbar > input[type="text"] {
  flex: 1; min-width: 200px; height: 34px; border: 1px solid var(--border-2);
  border-radius: 6px; padding: 0 12px; background: #fff;
  margin-left: 4px;
}
.tb-btn {
  background: #fff; border: 1px solid var(--border-2);
  border-radius: 6px; padding: 4px 10px; cursor: pointer;
  font-size: 13px; color: var(--text-1); height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.15s; min-width: 30px;
}
.tb-btn:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.tb-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.tb-sep { width: 1px; height: 18px; background: var(--border-2); margin: 0 4px; }
.tb-hint { font-size: 11px; color: var(--text-3); margin-left: 4px; }

.editable-text {
  min-height: 260px; border: 1px solid var(--border-2);
  border-top: none; border-radius: 0 0 8px 8px;
  padding: 14px 16px; line-height: 1.8; font-size: 15px; color: var(--text);
  background: #fff;
  outline: none;
  white-space: pre-wrap; word-break: break-word;
}
.editable-text:empty::before {
  content: attr(data-placeholder);
  color: var(--text-3);
}
.editable-text:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-focus); }

.sort-picker {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px;
}
.sort-picker > input {
  grid-column: 1 / -1;
  padding: 10px 12px; border: 1px solid var(--border-2);
  border-radius: 8px; font-size: 16px; font-weight: 600;
}
.sort-preset-btn {
  background: #F2F3F5; border: none; cursor: pointer;
  border-radius: 7px; padding: 6px 4px; font-size: 12px;
  font-weight: 500; color: var(--text-1);
  transition: all 0.15s;
}
.sort-preset-btn:hover { background: var(--primary-light); color: var(--primary); transform: translateY(-1px); }

.format-summary {
  background: #FAFAFA; border: 1px solid var(--border-2);
  border-radius: 8px; padding: 10px 12px;
}
.fs-row {
  display: flex; justify-content: space-between;
  padding: 5px 0; font-size: 13px;
  border-bottom: 1px dashed var(--border-2);
}
.fs-row:last-child { border-bottom: none; }
.fs-k { color: var(--text-3); }
.fs-v { color: var(--text); font-weight: 500; }

.ann-actions-stack {
  display: flex; flex-direction: column; gap: 8px;
}

@media (max-width: 820px) {
  .ann-editor-grid { grid-template-columns: 1fr; }
  .ann-hero-preview { padding: 20px 16px 14px; }
  .ann-hero-bigtitle { font-size: 22px; }
  .ann-hero-midtitle { font-size: 18px; }
}

/* ========== 常见问题 (FAQ) 页面 ========== */
.faq-container { display: flex; flex-direction: column; gap: 14px; }
.faq-loading, .faq-empty {
  text-align: center; padding: 60px 20px; color: var(--text-3);
}
.faq-loading .empty-icon, .faq-empty .empty-icon { font-size: 48px; margin-bottom: 12px; }
.faq-item {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: box-shadow var(--anim-fast) var(--ease-out-expo);
}
.faq-item:hover { box-shadow: var(--shadow-lg); }
.faq-question {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px; cursor: pointer;
  user-select: none; transition: background var(--anim-fast);
}
.faq-question:hover { background: var(--primary-light); }
.faq-q-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.faq-q-text { flex: 1; font-size: 15px; font-weight: 600; color: var(--text); }
.faq-q-arrow {
  font-size: 24px; color: var(--text-3); transition: transform var(--anim-fast);
}
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height 400ms var(--ease-out-expo), padding 400ms var(--ease-out-expo);
  padding: 0 20px;
}
.faq-answer.show {
  max-height: 1000px; padding: 0 20px 18px;
}
.faq-item.open .faq-q-arrow {
  transform: rotate(90deg);
}
.faq-a-text {
  font-size: 14px; color: var(--text-2); line-height: 1.8;
  margin-bottom: 10px; white-space: pre-wrap;
}
.faq-a-images { display: flex; flex-wrap: wrap; gap: 10px; }
.faq-item-image {
  max-width: 240px; max-height: 180px; object-fit: cover;
  border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--border); transition: transform var(--anim-fast);
}
.faq-item-image:hover { transform: scale(1.03); border-color: var(--primary); }
@media (max-width: 600px) {
  .faq-question { padding: 14px 16px; }
  .faq-q-text { font-size: 14px; }
  .faq-answer.show { padding: 0 16px 14px; }
  .faq-item-image { max-width: 100%; }
}

/* FAQ 管理后台样式 */
.faq-editor-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px; margin-bottom: 12px; background: #FAFAFA;
}
.faq-editor-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.faq-editor-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.faq-image-thumb {
  position: relative; width: 80px; height: 80px; border-radius: 6px;
  overflow: hidden; border: 1px solid var(--border);
}
.faq-image-thumb img { width: 100%; height: 100%; object-fit: cover; }
.faq-image-thumb button {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; border: none;
  font-size: 11px; cursor: pointer; padding: 0; line-height: 18px; text-align: center;
}
.faq-image-thumb button:hover { background: var(--danger); }
.faq-image-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.faq-sort-btn {
  padding: 4px 8px; font-size: 12px; background: var(--border);
  border: none; border-radius: 4px; cursor: pointer; color: var(--text-2);
}
.faq-sort-btn:hover { background: var(--primary); color: #fff; }

/* ========== 数据总览 (Dashboard) ========== */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.dash-stat-card {
  background: #fff; border-radius: var(--radius);
  padding: 18px 16px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
  transition: transform var(--anim-fast) var(--ease-out-expo), box-shadow var(--anim-fast);
}
.dash-stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.dash-stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.dash-stat-card.users::before   { background: linear-gradient(90deg, #3A8EE6, #5BA8F0); }
.dash-stat-card.vip::before      { background: linear-gradient(90deg, #F5B041, #F9C74F); }
.dash-stat-card.problems::before { background: linear-gradient(90deg, #0E417C, #4580C4); }
.dash-stat-card.pickups::before  { background: linear-gradient(90deg, #07C160, #2D7BD4); }
.dash-stat-card.parcels::before  { background: linear-gradient(90deg, #8B5CF6, #A78BFA); }
.dash-stat-card.combined::before { background: linear-gradient(90deg, #FA9D3B, #FBB869); }

.dash-stat-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dash-stat-label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.dash-stat-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.dash-stat-card.users .dash-stat-icon   { background: var(--info-light); color: var(--info); }
.dash-stat-card.vip .dash-stat-icon      { background: #FFF3CD; color: #B8860B; }
.dash-stat-card.problems .dash-stat-icon { background: var(--primary-light); color: var(--primary); }
.dash-stat-card.pickups .dash-stat-icon  { background: var(--success-light); color: var(--success); }
.dash-stat-card.parcels .dash-stat-icon  { background: #F3E8FF; color: #8B5CF6; }
.dash-stat-card.combined .dash-stat-icon { background: var(--warning-light); color: var(--warning); }

.dash-stat-values { display: flex; align-items: baseline; gap: 14px; }
.dash-stat-main { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1; }
.dash-stat-main .unit { font-size: 14px; color: var(--text-3); font-weight: 400; margin-left: 4px; }
.dash-stat-today {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 12px; color: var(--success); font-weight: 600;
  background: var(--success-light); padding: 3px 8px; border-radius: 10px;
}
.dash-stat-footer {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--border-2);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--text-3);
}
.dash-stat-rate {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 8px; border-radius: 10px; font-weight: 600;
}
.dash-stat-rate.good { background: var(--success-light); color: var(--success); }
.dash-stat-rate.warn { background: var(--warning-light); color: var(--warning); }

/* Dashboard charts */
.dashboard-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.chart-box {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px;
}
.chart-box h4 {
  font-size: 13px; color: var(--text-2); margin-bottom: 12px;
  display: flex; align-items: center; gap: 6px;
}
.chart-bars {
  display: flex; flex-direction: column; gap: 6px;
}
.chart-bar-row {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 8px;
  align-items: center; font-size: 12px;
}
.chart-bar-row .bar-date { color: var(--text-3); }
.chart-bar-row .bar-track {
  height: 18px; background: var(--border-2); border-radius: 9px;
  overflow: hidden; position: relative;
}
.chart-bar-row .bar-fill {
  height: 100%; border-radius: 9px; min-width: 2px;
  transition: width 600ms var(--ease-out-expo);
}
.chart-bar-row.problem .bar-fill { background: linear-gradient(90deg, #0E417C, #4580C4); }
.chart-bar-row.pickup  .bar-fill { background: linear-gradient(90deg, #07C160, #2D7BD4); }
.chart-bar-row.parcel  .bar-fill { background: linear-gradient(90deg, #8B5CF6, #A78BFA); }
.chart-bar-row.users   .bar-fill { background: linear-gradient(90deg, #3A8EE6, #5BA8F0); }
.chart-bar-row.vip     .bar-fill { background: linear-gradient(90deg, #F5B041, #F9C74F); }
.chart-bar-row .bar-val { color: var(--text-2); font-weight: 600; min-width: 32px; text-align: right; }

/* Rankings */
.dashboard-rankings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.rank-tabs {
  display: flex; gap: 4px; margin-bottom: 14px;
  background: var(--bg); padding: 4px; border-radius: var(--radius-sm);
}
.rank-tab {
  flex: 1; padding: 8px 12px; border: none; background: transparent;
  border-radius: calc(var(--radius-sm) - 2px);
  font-size: 13px; color: var(--text-2); cursor: pointer;
  transition: all var(--anim-fast);
  font-weight: 500;
}
.rank-tab.active { background: var(--primary); color: #fff; font-weight: 600; }

/* ============================================================
 * 角色标签（admin/delivery/vip/user）统一规范
 * ============================================================ */
.role-tag {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 600; line-height: 1.4;
  border: 1px solid transparent;
  white-space: nowrap;
}
.role-admin    { background: #E8F2FE; color: #1D4ED8; border-color: #BFDBFE; }   /* 管理员 蓝底 */
.role-delivery { background: #E8EFF8; color: #047857; border-color: #A7F3D0; }   /* 派送员 绿底 */
.role-vip      { background: #FFFBE6; color: #B45309; border-color: #FDE68A; }   /* VIP     黄底 */
.role-vip.role-vip-expired { background: #F5F5F5; color: #888; border-color: #DDD; }
.role-user     { background: #FFFFFF; color: var(--text-3); border-color: var(--border); } /* 普通 白 */
.role-delivery::before { content: '🚚'; }
.role-vip::before      { content: '👑'; }
.role-vip.role-vip-expired::before { content: '👑'; opacity:.5 }
.role-tag-custom {
  background: #F5F3FF;
  color: #5B21B6;
  border-color: #DDD6FE;
}
.role-tag-user {
  background: #FFFFFF;
  color: #374151;
  border-color: #E5E7EB;
  border-style: dashed;
}

/* ============================================================
 * 用户 badge：头像 + 名字（自定义颜色） + 角色标签
 * ============================================================ */
.user-badge {
  display: inline-flex; align-items: center; gap: 8px;
  max-width: 100%;
}
.user-badge-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; font-size: 15px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.user-badge-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-badge-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.user-badge-name {
  font-weight: 600; font-size: 14px; color: var(--text);
  line-height: 1.2; word-break: break-all;
}
.user-badge-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.user-badge-sub { color: var(--text-3); font-size: 12px; }

/* 紧凑版（评论区 / 小列表） */
.user-badge-sm .user-badge-avatar { width: 28px; height: 28px; font-size: 12px; }
.user-badge-sm .user-badge-name   { font-size: 13px; }
.user-badge-sm .role-tag          { font-size: 10px; padding: 1px 6px; }

/* 头像可点击（staff 登录态下的光标 + hover 阴影） */
.avatar-clickable { cursor: pointer; }
.avatar-clickable:hover {
  box-shadow: 0 0 0 3px rgba(14,65,124,.25), 0 2px 8px rgba(0,0,0,.1);
  transform: translateY(-1px);
  transition: all var(--anim-fast);
}

/* ============================================================
 * 用户管理弹层（全站统一 openUserManageModal）
 * ============================================================ */
.user-manage-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100002;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; animation: pageFadeIn var(--anim-mid) var(--ease-out-expo);
}
.user-manage-dialog {
  background: #fff; border-radius: var(--radius); width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.user-manage-head {
  padding: 18px 22px; border-bottom: 1px solid var(--border-2);
  display: flex; align-items: center; gap: 12px;
}
.user-manage-head h3 { font-size: 17px; font-weight: 700; flex: 1; }
.user-manage-close {
  width: 30px; height: 30px; border-radius: 50%; border: none; background: var(--border-2);
  font-size: 18px; cursor: pointer; color: var(--text-2);
}
.user-manage-body { padding: 20px 22px; }
.user-manage-info-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px;
  margin-bottom: 18px;
}
.user-manage-info-row {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 10px; background: var(--bg); border-radius: var(--radius-sm);
}
.user-manage-info-row .label { font-size: 11px; color: var(--text-3); }
.user-manage-info-row .value { font-size: 14px; color: var(--text); font-weight: 500; }
.user-manage-section { margin-bottom: 16px; }
.user-manage-section-title {
  font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px;
}
.user-manage-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.user-manage-actions .btn { padding: 7px 12px; font-size: 13px; }

/* ============================================================
 * 公告系统样式（列表 / 详情 / 评论 / 管理）
 * ============================================================ */

/* 首页公告入口按钮 */
.announcement-entry {
  margin-bottom: 20px;
  display: flex; justify-content: center;
}
.btn-announcement-entry {
  background: linear-gradient(135deg, #7C3AED, #A78BFA);
  color: #fff; border: none;
  padding: 12px 28px; border-radius: 999px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  box-shadow: 0 6px 18px rgba(124,58,237,.3);
  display: inline-flex; align-items: center; gap: 8px;
  transition: all var(--anim-fast);
}
.btn-announcement-entry:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(124,58,237,.38); }

/* 公告列表 */
.announcement-list { display: flex; flex-direction: column; gap: 14px; }
.announcement-card {
  background: #fff; border-radius: var(--radius); padding: 20px 22px;
  box-shadow: var(--shadow); cursor: pointer;
  border-left: 4px solid #A78BFA;
  transition: all var(--anim-fast);
}
.announcement-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.announcement-card-big {
  font-size: 18px; font-weight: 700; color: #111; margin-bottom: 6px;
}
.announcement-card-mid {
  font-size: 15px; color: var(--text-2); margin-bottom: 4px;
}
.announcement-card-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; font-size: 12px; color: var(--text-3);
}

/* 公告详情页四级标题字号（严格阶梯：大>中>小>正文） */
.announcement-detail { padding: 4px 2px; }
.ann-detail-big {
  font-size: 28px; font-weight: 800; color: #111;
  margin: 10px 0 18px; line-height: 1.35;
  border-bottom: 3px solid #F3E8FF; padding-bottom: 12px;
}
.ann-detail-mid {
  font-size: 20px; font-weight: 700; color: var(--text);
  margin: 18px 0 8px; line-height: 1.4;
}
.ann-detail-sub {
  font-size: 16px; font-weight: 600; color: var(--text-2);
  margin: 14px 0 6px; line-height: 1.5;
}
.ann-detail-content {
  font-size: 15px; color: var(--text);
  line-height: 1.8; white-space: pre-wrap; word-break: break-word;
}
/* 公告正文图片：不溢出卡片，高度自适应（支持按 width 百分比调整比例） */
.ann-detail-content img,
#aeContent img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 8px 0;
  border-radius: 8px;
  object-fit: contain;
}
#aeContent img { cursor: pointer; }
#aeContent img.ann-img-selected {
  outline: 2px solid var(--primary, #0E417C);
  outline-offset: 2px;
  border-radius: 8px;
}
.ann-detail-meta {
  color: var(--text-3); font-size: 13px;
  margin-bottom: 18px; text-align: right;
}
.ann-back-btn { margin-bottom: 14px; }

/* 评论区 */
.comments-section {
  margin-top: 32px; padding-top: 22px; border-top: 1px dashed var(--border-2);
}
.comments-title {
  font-size: 16px; font-weight: 700; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.comment-form { margin-bottom: 20px; }
.comment-form textarea {
  width: 100%; min-height: 84px; resize: vertical;
  padding: 12px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; font-family: inherit;
}
.comment-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,65,124,.12); }
.comment-form-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.comment-hint { color: var(--text-3); font-size: 12px; }

.comment-item {
  display: flex; flex-direction: column; gap: 6px; padding: 12px 0;
  border-bottom: 1px solid var(--border-2);
}
.comment-item:last-child { border-bottom: none; }
.comment-body { width: 100%; min-width: 0; }
.comment-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 4px;
}
.comment-time { color: var(--text-3); font-size: 12px; }
.comment-content { font-size: 14px; color: var(--text); line-height: 1.7; word-break: break-word; }
.comment-deleted {
  padding: 10px 12px; background: var(--bg); border-radius: var(--radius-sm);
  color: var(--text-3); font-size: 13px;
  display: flex; align-items: center; gap: 6px;
}
.comment-deleted-badge {
  font-size: 11px; font-weight: 600;
  background: #F3E8FF; color: #7C3AED;
  padding: 1px 7px; border-radius: 8px;
}
.comment-actions { margin-left: auto; display: flex; gap: 6px; }
.admin-action-btn {
  background: #F3E8FF; color: #7C3AED;
  border: none; padding: 3px 9px; border-radius: 7px;
  font-size: 11px; font-weight: 600; cursor: pointer;
  transition: background 0.15s;
}
.admin-action-btn:hover { background: #E9D5FF; }
.admin-action-danger { background: #FEE2E2; color: #DC2626; }
.admin-action-danger:hover { background: #FECACA; }
.admin-action-success { background: #DCFCE7; color: #16A34A; }
.admin-action-success:hover { background: #BBF7D0; }
/* 评论已关闭提示 */
.comment-closed-hint {
  margin: 8px 0 14px;
  padding: 10px 14px;
  background: #F3F4F6;
  border: 1px dashed #D1D5DB;
  border-radius: 9px;
  color: #6B7280;
  font-size: 13px;
  text-align: center;
}
/* 编辑器开关行（checkbox + 文本） */
.switch-line {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.switch-line input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #7C3AED;
}
.switch-line-text {
  font-size: 14px;
  color: var(--text-1, #1F1F1F);
}
/* 长评论折叠 */
.comment-foldable .comment-fold-toggle {
  color: #7C3AED;
  cursor: pointer;
  font-size: 12px;
  margin-left: 4px;
  user-select: none;
}
.comment-foldable .comment-fold-toggle:hover { text-decoration: underline; }
.comment-foldable .comment-ellipsis { color: var(--text-3, #9CA3AF); }
.admin-action-label::before {
  content: '管理员'; display: inline-block;
  font-size: 9px; padding: 0 5px; margin-right: 4px;
  background: #7C3AED; color: #fff; border-radius: 6px; line-height: 14px;
  vertical-align: 1px;
}
/* 已删除评论：折叠条 + 展开内容（仅工作人员可见） */
.comment-deleted-fold {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 12px; background: #FFFBEB; border: 1px dashed #F5C97B;
  border-radius: 9px; cursor: pointer; user-select: none;
  transition: background 0.15s;
}
.comment-deleted-fold:hover { background: #FEF3C7; }
.comment-fold-hint { font-size: 12px; color: #B45309; }
.comment-deleted-content {
  margin-top: 6px; padding: 10px 12px;
  background: rgba(255,165,0,.08); border: 1px dashed rgba(255,140,0,.4);
  border-radius: 8px; color: #B45309; font-size: 14px; line-height: 1.7;
  word-break: break-word;
}

/* ============================================================
 * 个人设置：VIP中心 / 头像 / 名字颜色 卡片追加样式
 * ============================================================ */

/* VIP 卡片 */
.vip-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #FFF7E6 0%, #FFFBE6 100%);
  border: 1.5px solid #FDE68A;
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.vip-card-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  background: linear-gradient(135deg, #F59E0B, #F97316);
  color: #fff; font-weight: 700; font-size: 13px;
  box-shadow: 0 4px 10px rgba(249,115,22,.25);
}
.vip-card-badge.inactive {
  background: #9CA3AF; box-shadow: none;
}
.vip-card-price {
  font-size: 22px; font-weight: 800; color: #B45309;
}
.vip-card-price small { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 2px; }
.vip-card-benefit {
  background: #FAFAFA; border-radius: var(--radius-sm);
  padding: 10px 14px; margin-top: 10px;
  font-size: 13px; color: var(--text-2);
  line-height: 1.9;
}
.vip-card-benefit b { color: #B45309; }
.vip-pay-row {
  display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap;
}
.vip-pay-row .btn { flex: 1; min-width: 120px; }
.month-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 14px;
  border-radius: 8px; border: 1.5px solid var(--border-2);
  background: #fff; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--text-1);
  transition: all .15s;
}
.month-btn:hover { border-color: var(--primary); color: var(--primary); }
.month-btn.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 3px 8px rgba(14,65,124,.25);
}
@media (max-width: 520px) {
  .month-picker .month-btn { flex: 1 1 calc(50% - 8px); min-width: 0; }
}

/* 头像卡片 */
.avatar-edit-row { display: flex; align-items: center; gap: 16px; }
.avatar-edit-preview {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; font-size: 32px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden; border: 3px solid #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.1);
}
.avatar-edit-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-edit-info { flex: 1; font-size: 13px; color: var(--text-2); line-height: 1.7; }
.avatar-edit-info b { color: var(--text); }
.avatar-input-hidden { position: absolute; opacity: 0; width: 1px; height: 1px; overflow: hidden; }

/* 名字颜色色板 */
.namecolor-lock {
  color: var(--text-3); font-size: 13px;
  padding: 10px 14px; background: var(--bg); border-radius: var(--radius-sm);
}
.namecolor-lock b { color: var(--danger); }
.color-swatches {
  display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0;
}
.color-swatch {
  width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; border: 3px solid transparent;
  transition: transform 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.color-swatch:hover { transform: scale(1.12); }
.color-swatch.active { border-color: var(--text); transform: scale(1.12); }
.color-picker-row {
  display: flex; gap: 10px; align-items: center;
}
.color-picker-row input[type=text] {
  flex: 1; padding: 8px 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: monospace; font-size: 14px;
}
.color-preview-box {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  border: 2px solid var(--border);
}

.rank-tab:hover { color: var(--text); }
.rank-tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow); }

.rank-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  font-size: 12px; font-weight: 700;
}
.rank-num.top1 { background: #FFD700; color: #7A5A00; }
.rank-num.top2 { background: #C0C0C0; color: #555; }
.rank-num.top3 { background: #CD7F32; color: #fff; }
.rank-num.normal { background: var(--border); color: var(--text-2); }

.rank-user { display: flex; align-items: center; gap: 8px; }
.rank-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-light); color: var(--primary);
  font-size: 12px; font-weight: 600;
  overflow: hidden;
}
.rank-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rank-user-name { font-weight: 500; color: var(--text); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 600px) {
  .dashboard-stats { grid-template-columns: 1fr 1fr; }
  .dash-stat-main { font-size: 22px; }
  .dashboard-charts { grid-template-columns: 1fr; }
  .dashboard-rankings { grid-template-columns: 1fr; }
}

/* Switch toggle */
.switch-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.switch-row:last-of-type { border-bottom: none; }
.switch-label { font-size: 14px; font-weight: 500; color: var(--text); }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--border); border-radius: 24px;
  transition: background var(--anim-fast);
}
.switch-slider::before {
  content: ""; position: absolute;
  width: 18px; height: 18px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%;
  transition: transform var(--anim-fast);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .switch-slider { background: var(--success); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

/* Maintenance notice (for problem/pickup/parcel pages) */
.maintenance-notice {
  text-align: center; padding: 40px 20px;
}
.maintenance-notice .maintenance-icon {
  font-size: 48px; margin-bottom: 12px;
}
.maintenance-notice h3 {
  font-size: 18px; color: var(--text); margin-bottom: 8px;
}
.maintenance-notice p {
  font-size: 14px; color: var(--text-3); line-height: 1.6;
}

/* ============================================================
 * 跑腿页：一键填充地址选择下拉面板
 * ============================================================ */
.address-picker-dropdown {
  position: absolute;
  z-index: 1000;
  min-width: 280px;
  max-width: 360px;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  overflow: hidden;
}
.address-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #F9FAFB;
  border-bottom: 1px solid #E5E7EB;
  font-size: 13px;
  color: #6B7280;
  font-weight: 600;
}
.address-picker-close {
  background: transparent;
  border: none;
  font-size: 18px;
  line-height: 1;
  color: #9CA3AF;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 4px;
}
.address-picker-close:hover { background: #E5E7EB; color: #1F1F1F; }
.address-picker-list {
  max-height: 320px;
  overflow-y: auto;
}
.address-picker-item {
  padding: 10px 14px;
  border-bottom: 1px solid #F3F4F6;
  cursor: pointer;
  transition: background 0.12s;
}
.address-picker-item:hover { background: #F3F4FF; }
.address-picker-item:last-child { border-bottom: none; }
.address-picker-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.address-picker-top .ap-label {
  font-size: 13px;
  font-weight: 600;
  color: #1F1F1F;
  background: #EDE9FE;
  padding: 2px 8px;
  border-radius: 5px;
}
.address-picker-top .ap-default {
  font-size: 11px;
  font-weight: 600;
  color: #16A34A;
  background: #DCFCE7;
  padding: 1px 6px;
  border-radius: 5px;
}
.ap-phone {
  font-size: 13px;
  color: #4B5563;
  margin: 2px 0;
}
.ap-addr {
  font-size: 13px;
  color: #6B7280;
  word-break: break-all;
  line-height: 1.5;
}

/* ============================================================
 * 公告评论区：匿名发送、匿名徽章
 * ============================================================ */
/* 匿名发送开关（位于评论表单操作行左侧） */
.anonymous-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: #6B7280;
  padding: 4px 8px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background: #F9FAFB;
  margin-right: auto;
  transition: all 0.15s;
}
.anonymous-switch:hover {
  background: #F3F4FF;
  border-color: #7C3AED;
  color: #4C1D95;
}
.anonymous-switch input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: #7C3AED;
  vertical-align: middle;
}
/* 匿名用户角色标签（灰色徽章） */
.role-anonymous {
  display: inline-block;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 600;
  color: #4B5563;
  background: #F3F4F6;
  border: 1px dashed #9CA3AF;
  border-radius: 5px;
  margin-left: 4px;
}

/* ============================================================
 * 站内私信：快速私信 Modal + 违禁词弹窗（全站通用）
 * ============================================================ */
.quick-pm-mask,
.pm-blocked-modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .55);
  z-index: 100000; display: flex; align-items: center; justify-content: center;
  padding: 14px; animation: pageFadeIn var(--anim-mid) var(--ease-out-expo);
  /* 避免 header(z-index:99999) 盖在模态之上 */
}
.quick-pm-dialog,
.pm-blocked-modal {
  width: 100%; max-width: 460px; background: #fff; border-radius: 14px;
  box-shadow: var(--shadow-lg); overflow: hidden;
  animation: cardFlyIn var(--anim-mid) var(--ease-out-expo);
  max-height: 92vh; display: flex; flex-direction: column;
}
/* 滚动容器（移动端小屏时防止表单被截断） */
.quick-pm-dialog .quick-pm-recipient,
.quick-pm-dialog .quick-pm-body,
.quick-pm-dialog .quick-pm-history { flex-shrink: 0; }
.quick-pm-dialog .quick-pm-history { max-height: 40vh; overflow-y: auto; }
.quick-pm-dialog .quick-pm-body textarea { max-height: 32vh; }
.quick-pm-head,
.pm-blocked-head {
  padding: 14px 18px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border-2); background: var(--bg);
}
.quick-pm-head h3,
.pm-blocked-head h3 {
  font-size: 16px; font-weight: 700; color: var(--text); margin: 0;
  display: flex; align-items: center; gap: 8px;
}
.quick-pm-close,
.pm-blocked-close {
  width: 28px; height: 28px; border: none; border-radius: 50%;
  background: var(--border-2); color: var(--text-2);
  font-size: 18px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.quick-pm-close:hover,
.pm-blocked-close:hover { background: var(--border-3); color: var(--text); }

/* 快速私信收件人信息卡 */
.quick-pm-recipient {
  padding: 14px 18px; display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #EEF2FF, #FAF5FF);
  border-bottom: 1px dashed #D1D5DB;
}
.quick-pm-recipient .user-badge-main .user-badge-name { font-size: 15px; }
.quick-pm-recipient .user-badge-main .user-badge-sub { font-size: 12px; color: #6B7280; }

/* 表单 */
.quick-pm-body { padding: 14px 18px; }
.quick-pm-label { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; display: flex; justify-content: space-between; }
.quick-pm-label .counter { color: var(--text-3); font-weight: 500; }
.quick-pm-label .counter.over { color: #DC2626; }
.quick-pm-textarea {
  width: 100%; box-sizing: border-box; min-height: 140px; resize: vertical;
  padding: 10px 12px; border: 1px solid var(--border-3); border-radius: 10px;
  font-size: 14px; line-height: 1.6; color: var(--text); outline: none;
  transition: all 0.15s; font-family: inherit;
}
.quick-pm-textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,65,124,.14);
}
.quick-pm-textarea[readonly] {
  background: #F9FAFB; color: #6B7280; cursor: not-allowed;
}
.quick-pm-tip {
  font-size: 12px; color: var(--text-3); margin-top: 6px; line-height: 1.5;
}
.quick-pm-tip.danger { color: #DC2626; font-weight: 500; }

.quick-pm-actions {
  padding: 12px 18px 18px; display: flex; justify-content: flex-end; gap: 10px;
}
.quick-pm-actions .btn { padding: 9px 18px; }
.quick-pm-actions .btn[disabled] {
  opacity: .6; cursor: not-allowed; filter: grayscale(.2);
}

/* 违禁词弹窗 */
.pm-blocked-body { padding: 16px 18px; }
.pm-blocked-reason {
  margin: 0 0 12px; color: var(--text); font-size: 14px; line-height: 1.6;
}
.pm-blocked-list-title {
  font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px;
}
.pm-blocked-list {
  margin: 0; padding-left: 20px; color: #DC2626; font-size: 13px; line-height: 1.8;
  word-break: break-all;
}
.pm-blocked-actions {
  padding: 0 18px 16px; display: flex; justify-content: flex-end;
}

/* ============================================================
 * 站内私信：消息气泡（message 详情页 + 快速私信 Modal 历史区 共用）
 * ============================================================ */
.pm-msg-box {
  flex: 1; padding: 20px 24px; overflow-y: auto; background: #FAFAF7;
  display: flex; flex-direction: column; gap: 14px;
}
.pm-msg-row { display: flex; gap: 10px; }
.pm-msg-row.mine { justify-content: flex-end; }
.pm-msg-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: #eee; object-fit: cover; flex-shrink: 0;
  align-self: flex-end;
}
.pm-msg-row.mine .pm-msg-avatar { order: 2; }
.pm-bubble {
  max-width: 70%; padding: 10px 14px; border-radius: 12px;
  font-size: 14px; line-height: 1.55; word-break: break-word;
  position: relative;
}
.pm-msg-row.their .pm-bubble { background: #fff; border-top-left-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.05); color: #1F1F1F; }
.pm-msg-row.mine  .pm-bubble { background: linear-gradient(135deg,#1A5DA9,#0B386B); color: #fff; border-top-right-radius: 4px; box-shadow: 0 1px 2px rgba(14,65,124,.22); }
.pm-msg-time {
  font-size: 11px; color: #bbb; text-align: right; margin-top: 4px;
}
.pm-msg-row.mine .pm-msg-time { color: rgba(255,255,255,.85); }
.pm-msg-status {
  display: inline-block; margin-left: 6px; font-size: 11px;
  color: rgba(255,255,255,.8);
}

/* 快速私信 Modal 内的历史记录容器 */
.quick-pm-history {
  max-height: 280px; overflow-y: auto; background: #FAFAF7;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 12px;
  border-top: 1px dashed #E5E7EB; border-bottom: 1px dashed #E5E7EB;
}
.quick-pm-history .pm-msg-avatar { width: 32px; height: 32px; }
.quick-pm-history .pm-bubble { max-width: 78%; font-size: 13px; padding: 8px 12px; }
.quick-pm-history-empty {
  text-align: center; color: #9CA3AF; font-size: 12px; padding: 20px 10px; line-height: 1.6;
}
.quick-pm-history-loading {
  text-align: center; color: #9CA3AF; font-size: 12px; padding: 18px 10px;
}
/* 管理员视角下匿名评论的真实身份可见提示 */
.comment-anon-staff-hint {
  margin-top: 8px;
  padding: 5px 10px;
  background: #EEF2FF;
  color: #4338CA;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid #C7D2FE;
}

/* ============================================================
 * 公告评论区：引用/回复功能
 * ============================================================ */
.reply-btn {
  font-size: 12px;
  padding: 2px 10px;
  background: #fff;
  color: #6D28D9;
  border: 1px solid #DDD6FE;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
}
.reply-btn:hover {
  background: #EDE9FE;
  border-color: #7C3AED;
  transform: translateY(-1px);
}
.reply-context-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #EDE9FE;
  border: 1px solid #C4B5FD;
  border-radius: 10px 10px 4px 4px;
  font-size: 13px;
  color: #4C1D95;
  margin-bottom: -2px;
  border-bottom: none;
}
.reply-context-bar b { color: #4C1D95; font-weight: 600; }
.reply-cancel-btn {
  background: none;
  border: 1px solid #A78BFA;
  color: #5B21B6;
  padding: 2px 10px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
}
.reply-cancel-btn:hover { background: #DDD6FE; border-color: #7C3AED; }

/* 引用他人评论的卡片 */
.comment-quote {
  background: #F5F3FF;
  border: 1px solid #EDE9FE;
  border-left: 3px solid #8B5CF6;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.comment-quote:hover {
  background: #EDE9FE;
  transform: translateX(2px);
}
.comment-quote-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.comment-quote-icon {
  font-size: 12px;
  color: #7C3AED;
  font-weight: 600;
  background: #fff;
  border: 1px solid #C4B5FD;
  padding: 1px 7px;
  border-radius: 10px;
}
.comment-quote-body {
  font-size: 13px;
  line-height: 1.55;
  padding-left: 2px;
  color: #374151;
}

/* 违禁词命中 chip（弹窗内） */
.bw-chip {
  display: inline-block;
  padding: 4px 11px;
  background: #fff;
  color: #991B1B;
  border: 1px solid #FECACA;
  border-radius: 16px;
  font-size: 12.5px;
  font-weight: 600;
}
.bw-chip:nth-child(even) { background: #FEF2F2; color: #B91C1C; }
/* user-badge-xs 超小尺寸（在引用块内 staff 视角显示被引用作者） */
.user-badge-xs .user-badge-avatar {
  width: 20px; height: 20px; font-size: 10px;
}
.user-badge-xs .user-badge-name { font-size: 12px; }
.user-badge-xs .role-tag     { font-size: 9px; padding: 0 5px; }

