/* =====================================================
   CampusGo 三端管理后台 · 公共样式资源 cg-ui.css
   设计语言: 卡片式 | 响应式: 移动端底部Tab / PC端左侧可折叠侧边栏
   三端(用户yh/商家sj/骑手qi)共用，页面文件零重复样式
   ===================================================== */

:root {
  --cg-primary: #ff6a3c;
  --cg-primary-deep: #f4502a;
  --cg-primary-soft: #fff1ea;
  --cg-success: #10b981;
  --cg-warn: #f59e0b;
  --cg-danger: #ef4444;
  --cg-info: #3b82f6;
  --cg-bg: #f4f5fa;
  --cg-card: #ffffff;
  --cg-text: #262633;
  --cg-sub: #8a8f9c;
  --cg-line: #eef0f5;
  --cg-radius: 16px;
  --cg-radius-sm: 10px;
  --cg-shadow: 0 2px 14px rgba(32, 36, 60, .07);
  --cg-tabbar-h: 58px;
  --cg-topbar-h: 52px;
  --cg-sidebar-w: 224px;
  --cg-sidebar-min: 66px;
  --cg-max: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font: 14px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--cg-bg); color: var(--cg-text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #d5d8e2; border-radius: 3px; }

/* ---------- 应用骨架 ---------- */
.cg-app { min-height: 100%; }
.cg-main {
  min-height: 100vh;
  padding: 0 12px calc(var(--cg-tabbar-h) + 20px); /* 给吸底Tab让位 */
}
.cg-page { display: none; max-width: var(--cg-max); margin: 0 auto; animation: cgFade .22s ease; }
.cg-page.active { display: block; }
@keyframes cgFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 顶栏（移动端吸顶 + PC 常驻） */
.cg-topbar {
  position: sticky; top: 0; z-index: 60;
  height: var(--cg-topbar-h);
  display: flex; align-items: center; gap: 10px;
  padding: 0 4px;
  background: linear-gradient(180deg, rgba(244,245,250,.98), rgba(244,245,250,.92));
  backdrop-filter: blur(8px);
  margin: 0 -12px 12px; padding-left: 16px;
}
.cg-topbar .cg-title { font-size: 17px; font-weight: 700; flex: 1; }
.cg-topbar .cg-burger {
  width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: var(--cg-card); box-shadow: var(--cg-shadow);
  display: none; cursor: pointer; align-items: center; justify-content: center;
}
.cg-topbar .cg-burger svg { width: 18px; height: 18px; stroke: var(--cg-text); }

/* ---------- 底部 Tab（移动端，吸底） ---------- */
.cg-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  height: calc(var(--cg-tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 -4px 18px rgba(32,36,60,.08);
}
.cg-tabbar button {
  flex: 1; border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--cg-sub); font-size: 11px; position: relative;
  transition: color .15s;
}
.cg-tabbar button svg { width: 22px; height: 22px; }
.cg-tabbar button.active { color: var(--cg-primary); font-weight: 600; }
.cg-tabbar .cg-badge {
  position: absolute; top: 6px; right: calc(50% - 20px);
  min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px;
  background: var(--cg-danger); color: #fff; font-size: 10px; line-height: 15px; text-align: center;
}

/* ---------- 左侧侧边栏（PC端，吸左固定，可折叠） ---------- */
.cg-sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 80;
  width: var(--cg-sidebar-w);
  background: #fff; box-shadow: 2px 0 18px rgba(32,36,60,.06);
  display: none; flex-direction: column;
  padding: 14px 10px;
  transition: width .2s ease;
}
.cg-sidebar .cg-brand { display: flex; align-items: center; gap: 8px; padding: 4px 8px 14px; }
.cg-sidebar .cg-brand img, .cg-sidebar .cg-brand .cg-logo-dot {
  width: 34px; height: 34px; border-radius: 10px; background: var(--cg-primary);
  color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 15px;
  flex: none; object-fit: cover;
}
.cg-sidebar .cg-brand b { font-size: 15px; white-space: nowrap; overflow: hidden; }
.cg-sidebar nav { flex: 1; overflow-y: auto; }
.cg-sidebar nav button {
  width: 100%; border: 0; background: none; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; margin-bottom: 4px; border-radius: 12px;
  color: var(--cg-sub); font-size: 14px; position: relative;
  transition: all .15s;
}
.cg-sidebar nav button svg { width: 20px; height: 20px; flex: none; }
.cg-sidebar nav button:hover { background: var(--cg-bg); color: var(--cg-text); }
.cg-sidebar nav button.active { background: var(--cg-primary-soft); color: var(--cg-primary); font-weight: 600; }
.cg-sidebar nav button.active::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 2px; background: var(--cg-primary);
}
.cg-sidebar .cg-badge {
  position: absolute; top: 6px; right: 12px;
  min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px;
  background: var(--cg-danger); color: #fff; font-size: 10px; line-height: 15px; text-align: center;
}
.cg-sidebar .cg-collapse {
  border: 0; background: var(--cg-bg); border-radius: 10px; cursor: pointer;
  padding: 8px 0; display: flex; align-items: center; justify-content: center; gap: 6px;
  color: var(--cg-sub); font-size: 12px;
}
.cg-sidebar .cg-collapse svg { width: 15px; height: 15px; transition: transform .2s; }
.cg-sidebar.collapsed { width: var(--cg-sidebar-min); }
.cg-sidebar.collapsed .cg-brand b,
.cg-sidebar.collapsed nav button span,
.cg-sidebar.collapsed .cg-collapse span { display: none; }
.cg-sidebar.collapsed nav button { justify-content: center; padding: 12px 0; }
.cg-sidebar.collapsed .cg-collapse svg { transform: rotate(180deg); }

/* ≥768px 切换为侧边栏布局 */
@media (min-width: 768px) {
  .cg-sidebar { display: flex; }
  .cg-tabbar { display: none; }
  .cg-main {
    margin-left: var(--cg-sidebar-w);
    padding-bottom: 28px;
    transition: margin-left .2s ease;
  }
  body.cg-collapsed .cg-main { margin-left: var(--cg-sidebar-min); }
  .cg-topbar .cg-burger { display: none; }
}

/* ---------- 卡片体系 ---------- */
.cg-card {
  background: var(--cg-card); border-radius: var(--cg-radius);
  box-shadow: var(--cg-shadow); padding: 16px; margin-bottom: 12px;
}
.cg-card-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.cg-card-title .cg-extra { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--cg-primary); cursor: pointer; }
.cg-card-sub { font-size: 12px; color: var(--cg-sub); }

/* 数据大屏 */
.cg-dash { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .cg-dash { grid-template-columns: repeat(4, 1fr); } }
.cg-dash .metric {
  background: linear-gradient(145deg, #fff7f3, #fff);
  border: 1px solid #ffe4d6; border-radius: var(--cg-radius-sm);
  padding: 12px; text-align: center;
}
.cg-dash .metric b { display: block; font-size: 20px; color: var(--cg-primary-deep); font-weight: 800; }
.cg-dash .metric span { font-size: 12px; color: var(--cg-sub); }

/* 轮播 */
.cg-carousel { position: relative; border-radius: var(--cg-radius); overflow: hidden; margin-bottom: 12px; box-shadow: var(--cg-shadow); background: #e8eaf1; }
.cg-carousel .slides { display: flex; transition: transform .45s ease; }
.cg-carousel .slide { min-width: 100%; aspect-ratio: 16 / 7; }
.cg-carousel .slide img { width: 100%; height: 100%; object-fit: cover; }
.cg-carousel .dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.cg-carousel .dots i { width: 6px; height: 6px; border-radius: 4px; background: rgba(255,255,255,.5); transition: all .25s; }
.cg-carousel .dots i.on { width: 16px; background: #fff; }
.cg-carousel .placeholder { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 7; color: #fff; font-size: 15px; letter-spacing: 2px; background: linear-gradient(120deg, #ff8a5c, #ff5f4d); }

/* 功能入口网格（每行3个） */
.cg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cg-grid .entry {
  border: 0; background: var(--cg-bg); border-radius: var(--cg-radius-sm);
  padding: 14px 4px 12px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  color: var(--cg-text); font-size: 12px; position: relative; transition: transform .12s;
}
.cg-grid .entry:active { transform: scale(.95); }
.cg-grid .entry .ic {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--cg-primary-soft); color: var(--cg-primary);
}
.cg-grid .entry .ic svg { width: 20px; height: 20px; }
@media (min-width: 560px) { .cg-grid { grid-template-columns: repeat(6, 1fr); } }

/* 列表卡片 / 订单卡 */
.cg-item { border-bottom: 1px solid var(--cg-line); padding: 12px 0; }
.cg-item:last-child { border-bottom: 0; padding-bottom: 2px; }
.cg-item:first-child { padding-top: 2px; }
.cg-row { display: flex; align-items: center; gap: 8px; }
.cg-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cg-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cg-strong { font-weight: 600; }
.cg-money { color: var(--cg-primary-deep); font-weight: 700; }
.cg-sub { color: var(--cg-sub); font-size: 12px; }

/* 状态标签 */
.cg-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; padding: 2px 8px; border-radius: 999px; flex: none;
}
.cg-chip.c-orange { background: var(--cg-primary-soft); color: var(--cg-primary-deep); }
.cg-chip.c-blue { background: #eaf2ff; color: #2563eb; }
.cg-chip.c-green { background: #e6f9f1; color: #059669; }
.cg-chip.c-gray { background: #f0f1f5; color: #6b7280; }
.cg-chip.c-red { background: #feecec; color: #dc2626; }
.cg-chip.c-gold { background: #fff7e0; color: #b45309; }

/* 按钮 */
.cg-btn {
  border: 0; cursor: pointer; border-radius: 999px;
  padding: 7px 16px; font-size: 13px;
  background: var(--cg-primary); color: #fff; font-weight: 500;
  transition: opacity .15s; display: inline-flex; align-items: center; gap: 5px; justify-content: center;
}
.cg-btn:active { opacity: .85; }
.cg-btn[disabled] { opacity: .45; cursor: not-allowed; }
.cg-btn.plain { background: var(--cg-bg); color: var(--cg-text); }
.cg-btn.ghost { background: none; border: 1px solid var(--cg-primary); color: var(--cg-primary); }
.cg-btn.danger { background: var(--cg-danger); }
.cg-btn.green { background: var(--cg-success); }
.cg-btn.sm { padding: 4px 12px; font-size: 12px; }
.cg-btn.block { width: 100%; padding: 11px 0; font-size: 15px; }
.cg-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 10px; }

/* 表单 */
.cg-field { margin-bottom: 12px; }
.cg-field label { display: block; font-size: 12px; color: var(--cg-sub); margin-bottom: 5px; }
.cg-field input, .cg-field select, .cg-field textarea {
  width: 100%; border: 1px solid var(--cg-line); border-radius: var(--cg-radius-sm);
  padding: 10px 12px; font-size: 14px; background: #fafbfd; outline: none; transition: border .15s;
}
.cg-field input:focus, .cg-field select:focus, .cg-field textarea:focus { border-color: var(--cg-primary); background: #fff; }
.cg-field textarea { resize: vertical; min-height: 72px; }
.cg-form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }

/* 图片上传 */
.cg-uploader {
  width: 84px; height: 84px; border: 1px dashed #d4d7e0; border-radius: var(--cg-radius-sm);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--cg-sub); font-size: 12px; background: #fafbfd; position: relative; overflow: hidden;
}
.cg-uploader img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cg-uploader input { display: none; }

/* 开关 */
.cg-switch { position: relative; width: 44px; height: 25px; flex: none; cursor: pointer; }
.cg-switch input { display: none; }
.cg-switch i {
  position: absolute; inset: 0; border-radius: 999px; background: #dfe2ea; transition: background .2s;
}
.cg-switch i::after {
  content: ""; position: absolute; top: 2.5px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: transform .2s;
}
.cg-switch input:checked + i { background: var(--cg-success); }
.cg-switch input:checked + i::after { transform: translateX(18px); }

/* 筛选条 */
.cg-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px; margin-bottom: 12px; scrollbar-width: none; }
.cg-chips::-webkit-scrollbar { display: none; }
.cg-chips button {
  border: 0; background: #fff; color: var(--cg-sub); cursor: pointer; flex: none;
  padding: 6px 15px; border-radius: 999px; font-size: 13px; box-shadow: var(--cg-shadow);
}
.cg-chips button.on { background: var(--cg-primary); color: #fff; font-weight: 600; }

/* 空状态 / 加载更多 */
.cg-empty { text-align: center; color: var(--cg-sub); padding: 40px 0; font-size: 13px; }
.cg-empty svg { width: 46px; height: 46px; opacity: .35; margin-bottom: 8px; }
.cg-more { display: block; width: 100%; border: 0; background: none; color: var(--cg-sub); cursor: pointer; padding: 10px 0; font-size: 13px; }
.cg-more:disabled { color: #c8ccd6; }

/* Toast / 弹窗 / 子页面 */
.cg-toast-wrap { position: fixed; top: 14px; left: 0; right: 0; z-index: 300; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.cg-toast {
  background: rgba(30,32,40,.92); color: #fff; padding: 9px 18px; border-radius: 10px;
  font-size: 13px; max-width: 82vw; animation: cgFade .2s;
}
.cg-toast.err { background: rgba(220,38,38,.94); }
.cg-toast.ok { background: rgba(5,150,105,.94); }

.cg-mask { position: fixed; inset: 0; background: rgba(20,22,32,.5); z-index: 200; display: flex; align-items: flex-end; justify-content: center; animation: cgFade .18s; }
.cg-modal {
  background: #fff; border-radius: 20px 20px 0 0; width: 100%; max-height: 86vh;
  display: flex; flex-direction: column; animation: cgUp .25s ease;
}
@keyframes cgUp { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.cg-modal .m-head { padding: 16px 18px 10px; font-weight: 700; font-size: 16px; display: flex; align-items: center; }
.cg-modal .m-head .m-close { margin-left: auto; border: 0; background: var(--cg-bg); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; color: var(--cg-sub); }
.cg-modal .m-body { padding: 4px 18px 18px; overflow-y: auto; }
@media (min-width: 640px) {
  .cg-mask { align-items: center; }
  .cg-modal { border-radius: 20px; max-width: 460px; }
}

.cg-subpage { position: fixed; inset: 0; z-index: 150; background: var(--cg-bg); display: flex; flex-direction: column; animation: cgFade .2s; }
.cg-subpage .sp-head {
  height: var(--cg-topbar-h); flex: none; display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: #fff; box-shadow: 0 2px 10px rgba(32,36,60,.05); position: sticky; top: 0;
}
.cg-subpage .sp-head button { border: 0; background: var(--cg-bg); width: 30px; height: 30px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cg-subpage .sp-head button svg { width: 16px; height: 16px; }
.cg-subpage .sp-head b { font-size: 16px; }
.cg-subpage .sp-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px; max-width: var(--cg-max); margin: 0 auto; width: 100%; }

/* 个人中心入口卡片行 */
.cg-cell { display: flex; align-items: center; gap: 12px; padding: 14px 2px; border-bottom: 1px solid var(--cg-line); cursor: pointer; }
.cg-cell:last-child { border-bottom: 0; }
.cg-cell .ic { width: 38px; height: 38px; border-radius: 11px; background: var(--cg-primary-soft); color: var(--cg-primary); display: flex; align-items: center; justify-content: center; flex: none; }
.cg-cell .ic svg { width: 19px; height: 19px; }
.cg-cell b { font-size: 14px; flex: 1; }
.cg-cell .arr { color: #c3c7d1; }
.cg-cell .arr svg { width: 14px; height: 14px; }

/* 头像 */
.cg-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--cg-primary-soft); flex: none; }

/* 登录页 */
.cg-login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px; max-width: 430px; margin: 0 auto; }
.cg-login .logo { text-align: center; margin-bottom: 22px; }
.cg-login .logo .dot { width: 64px; height: 64px; border-radius: 20px; background: linear-gradient(135deg, #ff8a5c, #ff4d4f); color: #fff; font-size: 26px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; box-shadow: 0 8px 24px rgba(255,106,60,.35); }
.cg-login h1 { font-size: 22px; }
.cg-login p { color: var(--cg-sub); font-size: 13px; margin-top: 4px; }

/* =====================================================
   iOS 高级质感升级层（v20261021，纯增量微调，不改变布局）
   ===================================================== */
:root {
  /* 覆盖为 iOS 系统色倾向 + 多层柔和阴影（同文件后定义优先生效） */
  --cg-primary: #ff6a3c;
  --cg-primary-deep: #f24e1e;
  --cg-primary-soft: #fff2eb;
  --cg-bg: #f3f5f9;
  --cg-line: #eceef3;
  --cg-radius: 18px;
  --cg-radius-sm: 12px;
  --cg-shadow: 0 1px 2px rgba(20, 24, 40, .04), 0 6px 20px rgba(20, 24, 40, .06);
  --cg-shadow-pop: 0 8px 30px rgba(20, 24, 40, .12), 0 2px 8px rgba(20, 24, 40, .06);
  --cg-ease-spring: cubic-bezier(.32, .72, 0, 1);
}
body {
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(255, 106, 60, .06), transparent 60%),
    var(--cg-bg);
  letter-spacing: .1px;
}

/* 卡片：发丝边 + 多层柔光阴影 */
.cg-card {
  border: .5px solid rgba(20, 24, 40, .05);
  box-shadow: var(--cg-shadow);
}

/* 按钮：主色渐变 + 立体柔光，按压回弹 */
.cg-btn {
  transition: transform .12s var(--cg-ease-spring), opacity .15s, box-shadow .15s, filter .15s;
}
.cg-btn:not(.plain):not(.ghost):not(.danger):not(.green) {
  background: linear-gradient(180deg, #ff7d54, var(--cg-primary-deep));
  box-shadow: 0 4px 12px rgba(255, 90, 40, .28);
}
.cg-btn:not(.plain):not(.ghost):not(.danger):not(.green):hover { filter: brightness(1.03); }
.cg-btn:active { transform: scale(.97); opacity: 1; }
.cg-btn.plain { background: #f0f2f7; font-weight: 500; }
.cg-btn.plain:active { background: #e6e9f0; }
.cg-btn.ghost:active { background: var(--cg-primary-soft); }

/* 输入聚焦：iOS 风格柔光环 */
.cg-field input, .cg-field select, .cg-field textarea {
  background: #f7f8fb; border-color: transparent;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.cg-field input:focus, .cg-field select:focus, .cg-field textarea:focus {
  border-color: rgba(255, 106, 60, .55); background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 106, 60, .12);
}
input:focus-visible, select:focus-visible, button:focus-visible { outline: none; }

/* 网格入口 / 筛选 chip / tab：按压回弹更跟手 */
.cg-grid .entry {
  background: #fff; box-shadow: var(--cg-shadow);
  transition: transform .14s var(--cg-ease-spring), box-shadow .14s;
}
.cg-grid .entry:active { transform: scale(.94); box-shadow: 0 1px 4px rgba(20,24,40,.06); }
.cg-chips button { transition: transform .12s var(--cg-ease-spring), background .15s, color .15s; }
.cg-chips button:active { transform: scale(.94); }
.cg-tabbar button { transition: color .15s, transform .12s var(--cg-ease-spring); }
.cg-tabbar button:active { transform: scale(.92); }
.cg-sidebar nav button { transition: background .15s, color .15s; }

/* 弹窗：圆角加大 + 弹性进场，遮罩加深并模糊 */
.cg-mask { background: rgba(15, 17, 24, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cg-modal { border-radius: 24px 24px 0 0; animation: cgUp .32s var(--cg-ease-spring); }
@media (min-width: 640px) { .cg-modal { border-radius: 24px; box-shadow: var(--cg-shadow-pop); } }
.cg-modal .m-head .m-close { transition: background .15s, transform .15s; }
.cg-modal .m-head .m-close:active { transform: scale(.9); background: #e6e9f0; }

/* 子页面头部毛玻璃强化 */
.cg-subpage .sp-head {
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
}
.cg-topbar {
  background: linear-gradient(180deg, rgba(243,245,249,.92), rgba(243,245,249,.78));
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
}
.cg-tabbar {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(16px) saturate(1.6); -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border-top: .5px solid rgba(20,24,40,.06);
  box-shadow: 0 -6px 24px rgba(20,24,40,.07);
}
.cg-switch i::after { box-shadow: 0 2px 6px rgba(0,0,0,.18); }

/* ---------- 自定义图片图标（底部导航 / 功能入口） ---------- */
.cg-tabbar button .nav-img {
  width: 24px; height: 24px; border-radius: 7px; object-fit: cover;
  box-shadow: 0 1px 4px rgba(20,24,40,.12);
}
.cg-grid .entry .ic .ic-img {
  width: 100%; height: 100%; border-radius: inherit; object-fit: cover;
}

/* ---------- 管理端：图标选择器 / 导航行 ---------- */
.iconpick {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
}
.ip-btn {
  height: 38px; border: 1.5px solid var(--cg-line); border-radius: 12px;
  background: #f7f8fb; color: var(--cg-sub); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .14s var(--cg-ease-spring);
}
.ip-btn:active { transform: scale(.92); }
.ip-btn.on {
  border-color: var(--cg-primary); color: var(--cg-primary);
  background: var(--cg-primary-soft);
  box-shadow: 0 0 0 3px rgba(255,106,60,.12);
}
.ip-img {
  width: 30px; height: 30px; border-radius: 9px; object-fit: cover; flex: none;
  box-shadow: 0 1px 4px rgba(20,24,40,.12); background: #f3f5f9;
}
.nav-row {
  gap: 10px; flex-wrap: wrap;
  padding: 12px; border: .5px solid rgba(20,24,40,.05);
  border-radius: var(--cg-radius-sm); background: #fff; margin-bottom: 8px;
  box-shadow: var(--cg-shadow);
}

/* ---------- 商家端：配送方式单选卡 ---------- */
.cg-cell.dm-cell {
  border-bottom: 0; margin-bottom: 10px; padding: 14px;
  border: 1.5px solid var(--cg-line); border-radius: var(--cg-radius-sm);
  background: #fff; cursor: pointer;
  transition: border-color .15s, background .15s, transform .12s var(--cg-ease-spring);
}
.cg-cell.dm-cell:active { transform: scale(.99); }
.cg-cell.dm-cell.on {
  border-color: var(--cg-primary);
  background: linear-gradient(180deg, var(--cg-primary-soft), #fff7f3);
}
.cg-cell.dm-cell .pick {
  width: 21px; height: 21px; border-radius: 50%; flex: none;
  border: 2px solid #d3d7e0; background: #fff; position: relative;
  transition: border-color .15s;
}
.cg-cell.dm-cell .pick::after {
  content: ""; position: absolute; inset: 4px; border-radius: 50%;
  background: var(--cg-primary); transform: scale(0);
  transition: transform .16s var(--cg-ease-spring);
}
.cg-cell.dm-cell.on .pick { border-color: var(--cg-primary); }
.cg-cell.dm-cell.on .pick::after { transform: scale(1); }

/* ---------- 骑手端：商家信息块（取货信息） ---------- */
.rider-merchant {
  display: flex; align-items: center; gap: 10px;
  margin: 8px 0; padding: 10px 12px;
  background: linear-gradient(180deg, #fffaf7, #fff5ef);
  border: .5px solid #ffe2d2; border-radius: 12px;
}
.rider-merchant .cg-btn { flex: none; }

/* ---------- 用户端：首页广告弹窗 ---------- */
.cg-admask {
  position: fixed; inset: 0; z-index: 250;
  display: flex; align-items: center; justify-content: center;
  padding: 28px 20px;
  background: rgba(12, 14, 20, .55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation: cgFade .22s ease;
}
.cg-admask.out { animation: cgAdOut .2s ease forwards; }
@keyframes cgAdOut { to { opacity: 0; } }
.cg-admask.out .cg-adpop { animation: cgAdPopOut .2s ease forwards; }
@keyframes cgAdPopOut { to { transform: scale(.94); opacity: 0; } }
.cg-adpop {
  position: relative; width: 100%; max-width: 340px;
  background: #fff; border-radius: 24px; overflow: hidden;
  box-shadow: var(--cg-shadow-pop);
  animation: cgAdPop .34s var(--cg-ease-spring);
  text-align: center;
}
@keyframes cgAdPop {
  from { transform: scale(.86) translateY(14px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.cg-adpop .ad-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.82); backdrop-filter: blur(6px);
  color: #4b4f5a; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.14);
  transition: transform .12s var(--cg-ease-spring);
}
.cg-adpop .ad-close:active { transform: scale(.88); }
.cg-adpop .ad-tag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-size: 10px; line-height: 1; padding: 4px 7px; border-radius: 999px;
  color: #fff; background: rgba(12,14,20,.42); backdrop-filter: blur(4px);
  letter-spacing: 1px;
}
.cg-adpop .ad-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #f0f2f7; }
.cg-adpop .ad-body { padding: 20px 20px 16px; }
.cg-adpop .ad-title { display: block; font-size: 18px; font-weight: 700; color: #1d2029; line-height: 1.35; }
.cg-adpop .ad-sub {
  display: block; margin: 8px 0 16px; font-size: 13px; line-height: 1.6;
  color: var(--cg-sub);
}
.cg-adpop .ad-skip {
  margin-top: 10px; border: 0; background: none; cursor: pointer;
  font-size: 12px; color: #b3b8c4; padding: 4px 10px;
}
.cg-adpop .ad-skip:active { color: var(--cg-sub); }

/* ---------- 用户端：订单详情结构化布局 ---------- */
.od-head {
  background: linear-gradient(150deg, var(--cg-primary-soft), #fff8f4);
  border-radius: 14px; padding: 14px; margin-bottom: 12px;
}
.od-head .od-status { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.od-head .od-stat-text { font-size: 16px; color: var(--cg-primary-deep); }
.od-shop {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; margin-bottom: 12px;
  background: #f7f8fb; border-radius: 14px;
}
.od-shop-logo {
  width: 42px; height: 42px; border-radius: 12px; object-fit: cover; flex: none;
  background: #fff; box-shadow: 0 1px 4px rgba(20,24,40,.08);
}
.od-shop-dot {
  display: flex; align-items: center; justify-content: center;
  background: var(--cg-primary); color: #fff; font-weight: 700; font-size: 16px;
}
.od-shop .cg-btn { flex: none; }
.od-block { padding: 12px 0; border-top: .5px solid var(--cg-line); }
.od-block:first-of-type { border-top: 0; padding-top: 2px; }
.od-label { margin-bottom: 8px; font-weight: 600; color: #6b7080 !important; }
.od-goods {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; font-size: 13px;
}
.od-goods img, .od-goods .od-goods-ph {
  width: 42px; height: 42px; border-radius: 10px; flex: none; object-fit: cover;
  background: #f0f2f7;
}
.od-goods .od-g-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.od-fee {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; font-size: 13px; color: var(--cg-sub);
}
.od-fee.total {
  margin-top: 6px; padding-top: 12px;
  border-top: .5px solid var(--cg-line);
  font-size: 15px; color: var(--cg-text); font-weight: 700;
}
.od-log {
  position: relative; margin-left: 4px; padding: 0 0 14px 18px;
  border-left: 2px solid var(--cg-line);
  font-size: 12px;
}
.od-log:last-child { padding-bottom: 2px; border-left-color: transparent; }
.od-log i {
  position: absolute; left: -6px; top: 3px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--cg-primary);
}
.od-log:first-child i { background: var(--cg-primary); }
.od-log span { color: var(--cg-sub); margin-right: 8px; }
.od-log b { font-weight: 500; color: var(--cg-text); }

/* ---------- 用户端：校外平台组件 ---------- */
.tp-bind {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: .5px solid var(--cg-line);
}
.tp-bind:last-child { border-bottom: 0; }
.tp-ord {
  padding: 12px; margin-bottom: 10px;
  border: .5px solid rgba(20,24,40,.05); border-radius: 14px;
  background: #fff; box-shadow: var(--cg-shadow);
}
.tp-pl-dot {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  color: #fff; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.14);
}
.tp-pl-dot.sm { width: 26px; height: 26px; border-radius: 8px; font-size: 12px; }
