/* ============================================================
   即达 - 品牌样式（粉色美妆主题）
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --pink: #ff6fa5;
  --pink-deep: #e64a8a;
  --pink-soft: #ffe0ec;
  --pink-bg: #fff5f8;
  --gold: #f5c24a;
  --blue: #1677ff;
  --green: #16a34a;
  --orange: #fa541c;
  --text: #3a2e33;
  --muted: #9a8a90;
  --line: #f0e3e8;
  --card: #ffffff;
  --shadow: 0 2px 10px rgba(230, 74, 138, .08);
}
html, body { height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--pink-bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
button { touch-action: manipulation; -webkit-user-select: none; user-select: none; }

/* ---------- 品牌 LOGO ---------- */
.logo-wrap { text-align: center; margin: 6px 0 4px; }
.logo-wrap img.logo {
  width: 84px; height: 84px; border-radius: 50%;
  object-fit: cover; box-shadow: 0 4px 18px rgba(230, 74, 138, .25);
  border: 3px solid #fff;
}
.logo-wrap .brand-name {
  font-size: 22px; font-weight: 800; color: var(--pink-deep);
  letter-spacing: 2px; margin-top: 6px;
  background: linear-gradient(90deg, var(--pink), var(--pink-deep));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.logo-wrap .brand-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- 移动端（填单/小哥端） ---------- */
.wrap { max-width: 640px; margin: 0 auto; padding: 14px; }
.header {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card); padding: 12px 16px; border-radius: 14px;
  box-shadow: var(--shadow); margin-bottom: 12px; border: 1px solid var(--line);
}
.header h1 { font-size: 17px; color: var(--pink-deep); font-weight: 700; }
.header .sub { font-size: 12px; color: var(--muted); }
.header .head-logo { display: flex; align-items: center; gap: 10px; }
.header .head-logo img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--pink-soft); }
.card {
  background: var(--card); border-radius: 14px; padding: 16px;
  box-shadow: var(--shadow); margin-bottom: 12px; border: 1px solid var(--line);
}
.card h2 { font-size: 16px; margin-bottom: 10px; color: var(--text); }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; font-weight: 600; }
input[type=text], input[type=password], input[type=date], input[type=tel], input[type=number], select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; background: #fff; color: var(--text); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 111, 165, .12); }
textarea { min-height: 70px; resize: vertical; }
/* 手机微信：输入框字号不小于 16px，避免 iOS 聚焦自动放大；日期框限制在卡片内 */
@media (max-width: 768px) {
  input[type=text], input[type=password], input[type=date], input[type=tel], input[type=number], select, textarea, .ss-input { font-size: 16px; }
  input[type=date] { display: block; width: 100%; max-width: 100%; min-width: 0; -webkit-appearance: none; appearance: none; }
  #date { width: 100%; max-width: 100%; min-width: 0; }
}
button {
  width: 100%; padding: 12px; border: none; border-radius: 10px;
  font-size: 15px; font-weight: 700; cursor: pointer; color: #fff;
  background: linear-gradient(90deg, var(--pink), var(--pink-deep));
  margin-top: 12px; box-shadow: 0 4px 12px rgba(230, 74, 138, .25);
}
button:active { transform: scale(.98); opacity: .92; }
button.mini { width: auto; padding: 7px 13px; font-size: 12px; margin: 0; border-radius: 9px; box-shadow: none; }
button.ghost { background: #fff; color: var(--pink-deep); border: 1px solid var(--pink); box-shadow: none; }
button.gray { background: #f7eef2; color: #7a6a70; box-shadow: none; }
button.danger { background: linear-gradient(90deg, #ff8a6b, var(--orange)); box-shadow: 0 4px 12px rgba(250, 84, 28, .2); }
button:disabled { background: #dcd0d5; cursor: not-allowed; box-shadow: none; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.slot-group { display: flex; gap: 8px; flex-wrap: wrap; }
.slot-item {
  flex: 1; min-width: 80px; text-align: center; padding: 11px 6px;
  border: 1px solid var(--line); border-radius: 12px; font-size: 14px; background: #fff; cursor: pointer;
}
.slot-item.active { border-color: var(--pink); background: var(--pink-soft); color: var(--pink-deep); font-weight: 700; }
.slot-item.disabled { opacity: .45; background: #f2eef0; cursor: not-allowed; }
.slot-item .tip { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; font-weight: 400; }
.tip { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
/* 可搜索下拉（所有品类选择框）：保留原生 select，叠加输入筛选框 */
.ss-wrap { position: relative; display: inline-block; min-width: 0; vertical-align: middle; }
.ss-wrap.ss-flex { display: block; flex: 1 1 0%; width: 100%; min-width: 0; }
.ss-wrap.ss-inline { width: auto; min-width: 130px; }
.ss-wrap.ss-flex .ss-input { width: 100%; }
.ss-native { position: absolute !important; left: 0; top: 0; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.ss-input { box-sizing: border-box; width: 100%; height: 40px; padding: 9px 36px 9px 10px; border: 1px solid var(--line, #e5e0e4); border-radius: 10px; background: #fff; color: var(--ink, #333); font: inherit; font-size: 14px; outline: none; }
.ss-input::placeholder { color: #aaa; }
.ss-input:focus { border-color: #e6a9ba; box-shadow: 0 0 0 2px rgba(201, 122, 144, .12); }
/* 右侧三角单独一块可点区域，避免选错后想重选却点到输入框 */
.ss-arrow { position: absolute; right: 0; top: 0; width: 34px; height: 100%; display: flex; align-items: center; justify-content: center; color: #c97a90; font-size: 14px; line-height: 1; cursor: pointer; z-index: 2; }
.ss-panel { position: absolute; z-index: 9999; left: 0; right: 0; top: calc(100% + 4px); max-height: 238px; overflow-y: auto; background: #fff; border: 1px solid #e8d7de; border-radius: 10px; box-shadow: 0 10px 26px rgba(92, 41, 56, .16); padding: 4px; display: none; }
.ss-wrap.open .ss-panel { display: block; }
.ss-wrap.panel-up .ss-panel { top: auto; bottom: calc(100% + 4px); }
.ss-option { padding: 9px 10px; border-radius: 8px; font-size: 14px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; color: #3b3236; }
.ss-option:hover, .ss-option.active { background: #fbe9ef; color: #a84f6b; }
.ss-empty { padding: 10px 10px; color: #999; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-row .ss-wrap.ss-flex .ss-input { padding: 10px 38px 10px 12px; font-size: 16px; }
.admin-toolbar .ss-wrap.ss-inline .ss-input { min-width: 130px; padding: 8px 28px 8px 10px; font-size: 13px; }

.cat-search { width: 100%; padding: 11px 12px; font-size: 15px; margin-bottom: 8px; }
/* 预约页品类组：第一行品类独占整行，第二行数量/下单价/删除，组间分割线 */
.cat-group { width: 100%; }
.cat-group + .cat-group { margin-top: 16px; padding-top: 16px; border-top: 2px dashed #e2a2b8; }
.cat-group .cat-row-main { display: block; width: 100%; margin: 0; }
.cat-group .cat-row-main .ss-wrap { width: 100%; }
.cat-group .cat-row-main .ss-input { height: 44px; padding: 10px 34px 10px 12px; font-size: 16px; }
/* 预约页品类框右侧三角热区放大到框宽约 70%，三角本身仍在最右边；点框右半边都能直接展开候选 */
.cat-group .cat-row-main .ss-arrow { width: 70%; justify-content: flex-end; padding-right: 16px; font-size: 28px; }
.cat-group .cat-row-main .catSel { width: 100%; height: 44px; }
.cat-group .cat-row-controls { display: flex; gap: 12px; align-items: center; width: auto; margin: 10px 0 0; }
.cat-row .catSel { flex: 1 1 0%; min-width: 0; width: auto; padding: 10px 6px; font-size: 15px; -webkit-appearance: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, #c97a90 50%), linear-gradient(135deg, #c97a90 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
.cat-row .catSel:invalid { color: var(--muted); }
.qty-step { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; flex: none; }
.cat-group .cat-row-controls .qty-step { height: 42px; margin: 0; }
.qty-btn { width: 34px; height: 40px; margin: 0; background: #fff; border: none; font-size: 18px; color: var(--pink-deep); cursor: pointer; line-height: 1; flex: none; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.qty-btn:active { background: var(--pink-soft); }
.qty-val { min-width: 30px; height: 40px; text-align: center; font-size: 16px; font-weight: 700; color: var(--pink-deep); flex: none; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.cat-group .cat-row-controls .catDel { flex: none; width: 42px; height: 42px; margin: 0; padding: 0; border: none; background: #f5e9ee; color: #c97a90; border-radius: 10px; font-size: 15px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.cat-group .cat-row-controls .catDel:active { background: #f0dbe4; }
/* 下单价输入框与数量控件同高、宽度接近，右侧留白 */
.cat-group .cat-row-controls .catPrice {
  flex: 0 0 118px; width: 118px; height: 42px; box-sizing: border-box;
  padding: 0 9px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink, #333); font: inherit; font-size: 16px; outline: none;
}
.cat-group .cat-row-controls .catPrice::placeholder { color: #aaa; font-size: 13px; }
.cat-group .cat-row-controls .catPrice:focus { border-color: #e6a9ba; box-shadow: 0 0 0 2px rgba(201, 122, 144, .12); }
.add-cat-row { display: block; width: 100% !important; height: 42px; margin: 12px 0 0 !important; padding: 0 12px; border: 1px dashed #e5cfd9; border-radius: 10px; background: #faf6f8; color: #8a5e70; font-size: 15px; }
.stat { display: flex; gap: 8px; margin-bottom: 12px; }
.stat-item { flex: 1; background: var(--card); border-radius: 12px; padding: 10px; text-align: center; box-shadow: var(--shadow); border: 1px solid var(--line); }
.stat-item b { display: block; font-size: 20px; color: var(--pink-deep); }
.stat-item span { font-size: 12px; color: var(--muted); }
/* 顺延(超时未收)订单 */
.order-item.overdue { border-color: var(--orange); }
.overdue-badge { margin: 6px 0 0; font-size: 12px; font-weight: 600; color: var(--orange); background: #fff5ee; border: 1px solid #ffd8c2; border-radius: 8px; padding: 6px 8px; }
.group-title .badge { background: var(--orange); color: #fff; }

.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input[type=date] { flex: 1; min-width: 120px; padding: 8px 10px; font-size: 14px; }
.toolbar select { flex: 1; min-width: 90px; padding: 8px 10px; font-size: 14px; }
.group-title { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; font-size: 15px; font-weight: 700; }
.group-title .badge { background: linear-gradient(90deg, var(--pink), var(--pink-deep)); color: #fff; font-size: 12px; padding: 2px 10px; border-radius: 12px; }

/* 订单卡片（小哥端） */
.order-item {
  background: var(--card); border-radius: 12px; padding: 11px 12px; margin-bottom: 8px;
  box-shadow: var(--shadow); border: 1px solid var(--line); border-left: 4px solid var(--pink);
}
.order-item.done { border-left-color: var(--green); opacity: .8; }
.order-item.picking { border-left-color: var(--gold); }
.order-item.abnormal { border-left-color: var(--orange); background: #fffaf7; }
.item-collect { display: inline-block; margin-left: 4px; padding: 0 4px; border-radius: 4px; background: #eaf7ee; color: #237804; font-size: 12px; white-space: nowrap; }
.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.oh-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.oh-left b { font-size: 15.5px; color: var(--text); }
.order-no { font-size: 11px; color: var(--muted); }
.oh-actions { display: flex; gap: 14px; flex-shrink: 0; }
.mini-btn { width: auto; margin: 0; border: none; border-radius: 16px; padding: 6px 13px; font-size: 12.5px; font-weight: 700; cursor: pointer;
  box-shadow: 0 2px 0 rgba(0,0,0,.07), 0 3px 8px rgba(0,0,0,.10); border-bottom: 1px solid rgba(0,0,0,.05);
  transition: transform .06s, box-shadow .06s; -webkit-tap-highlight-color: transparent; }
.mini-btn:active { transform: translateY(2px); box-shadow: 0 0 0 rgba(0,0,0,.07); }
.mini-btn.copy { background: linear-gradient(180deg,#f3f8ff,#e1edff); color: #2f6fb3; }
.mini-btn.edit { background: linear-gradient(180deg,#fff7f1,#ffe8d6); color: #b5713a; }
.mini-btn.split { background: linear-gradient(180deg,#fbf0ff,#eed8f7); color: #8e3fa8; }
/* 小哥端品类一件一行，长名字也不挤在一起 */
.items-lines { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.item-line { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.item-line .item-name { overflow-wrap: anywhere; }
/* 品类字体颜色：后台品类管理里设置，客户报单/订单管理/小哥端共用 */
.cat-color-red { color: #c62828; }
.cat-color-green { color: #2e7d32; }
.cat-color-blue { color: #1565c0; }
.report-grid td.rp-cat.cat-color-red { color: #c62828; }
.report-grid td.rp-cat.cat-color-green { color: #2e7d32; }
.report-grid td.rp-cat.cat-color-blue { color: #1565c0; }
.order-row { font-size: 13.5px; color: var(--text); margin: 4px 0; display: flex; align-items: flex-start; gap: 6px; }
.order-row .k { color: var(--muted); flex-shrink: 0; min-width: 30px; }
/* 底部三个操作按钮：导航 / 拨打电话 / 开始收货，一行三个，等宽收窄 */
.order-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: nowrap; align-items: stretch; }
.order-actions > a, .order-actions > button {
  flex: 1 1 0%; width: auto; min-width: 0; margin: 0; text-align: center; text-decoration: none;
  padding: 9px 4px; border-radius: 11px; font-size: 12.5px; border: none; outline: none; cursor: pointer;
  font-weight: 700; min-height: 34px; line-height: 1.2; white-space: nowrap;
  box-shadow: 0 3px 0 rgba(0,0,0,.07), 0 3px 8px rgba(0,0,0,.08);
  transition: transform .06s, box-shadow .06s; -webkit-tap-highlight-color: transparent;
}
.order-actions > a:active, .order-actions > button:active { transform: translateY(2px); box-shadow: 0 0 0 rgba(0,0,0,.06); }
a.nav { background: linear-gradient(180deg,#fff2f7,#ffdfee); color: var(--pink-deep); box-shadow: inset 0 1px 0 #fff, 0 3px 0 rgba(200,60,110,.14), 0 3px 8px rgba(0,0,0,.07); }
a.tel { background: linear-gradient(180deg,#f1fbf5,#dcf5e6); color: var(--green); box-shadow: inset 0 1px 0 #fff, 0 3px 0 rgba(40,140,90,.14), 0 3px 8px rgba(0,0,0,.07); }
button.status { background: linear-gradient(180deg,#ff9ec4,#f0538f); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 3px 0 #d23c74, 0 5px 12px rgba(230,74,138,.3); }
button.status.done { background: linear-gradient(180deg,#fff8ef,#ffe6cd); color: #a7612c; box-shadow: inset 0 1px 0 #fff, 0 3px 0 rgba(175,115,45,.18), 0 3px 8px rgba(0,0,0,.07); }
button.status.pickup { background: linear-gradient(180deg,#7ed6a6,#3fae75); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 3px 0 #2f8b5c, 0 5px 12px rgba(40,140,90,.25); }
button.status.abnormal { background: linear-gradient(180deg,#ffb08e,#f4552a); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 3px 0 #c8401a, 0 5px 12px rgba(250,84,28,.25); }
button.status.reject { background: linear-gradient(180deg,#fff0f0,#ffd9d9); color: #c23030; box-shadow: inset 0 1px 0 #fff, 0 3px 0 rgba(190,45,45,.16), 0 3px 8px rgba(0,0,0,.07); }
.order-item.rejected { border-left-color: #c23030; background: #fffafa; }
/* 已收货卡片：在「恢复为待收货」上面单独一行放「补充备注」 */
.append-note-row { display: flex; margin-top: 10px; }
.append-note-row .append-note-btn {
  flex: 1 1 auto; width: auto; margin: 0; padding: 8px 4px; border-radius: 11px;
  border: 1px solid #f3c6d8; background: linear-gradient(180deg,#fff7fb,#ffe8f2); color: #c2185b;
  font-size: 12.5px; font-weight: 700; line-height: 1.2; white-space: nowrap; cursor: pointer;
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 rgba(200,60,110,.12);
}
.append-note-row .append-note-btn:active { transform: translateY(2px); box-shadow: 0 0 0 rgba(0,0,0,.06); }

.route-box { background: #fdf7fa; border-radius: 10px; padding: 10px; margin-top: 10px; border: 1px solid var(--line); }
.route-box .seq { font-size: 13px; color: #7a6a70; margin: 6px 0; }
.route-box a { color: var(--pink-deep); text-decoration: none; font-size: 13px; }
.route-box .merged { display: block; margin-top: 6px; background: #fff; border: 1px solid var(--pink); border-radius: 9px; padding: 8px; text-align: center; color: var(--pink-deep); font-size: 13px; text-decoration: none; font-weight: 700; }

.msg { font-size: 13px; margin: 8px 0; }
.msg.err { color: var(--orange); }
.msg.ok { color: var(--green); }
.muted { color: var(--muted); font-size: 12px; }
.center { text-align: center; }
.big-no { font-size: 24px; color: var(--pink-deep); font-weight: 800; letter-spacing: 1px; }
.success-icon { font-size: 44px; text-align: center; color: var(--green); margin-bottom: 6px; }

/* 弹框 */
/* 弹窗：全屏遮罩可滚动，卡片 margin:auto 居中；内容超过屏幕时可滚动，不再被裁掉 */
.modal-mask { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(60, 20, 40, .5); z-index: 200; padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; }
.modal-mask[hidden] { display: none; }
.modal { background: #fff; border-radius: 16px; padding: 20px; width: 100%; max-width: 360px; margin: auto; box-shadow: 0 12px 40px rgba(0,0,0,.22); }
/* 小屏手机：弹窗内滚动，保证底部按钮始终能看到 */
@media (max-height: 700px) {
  .modal { max-height: calc(100vh - 24px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
}
.modal h3 { margin: 0 0 6px; font-size: 18px; color: var(--text); }
.modal .muted { font-size: 13px; color: #9a8a90; word-break: break-all; margin-bottom: 14px; line-height: 1.6; }
.modal textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 9px; padding: 10px; font-size: 14px; min-height: 80px; margin-top: 12px; }
.modal .full { width: 100%; box-sizing: border-box; }
/* 弹窗内按钮：统一等高、微 3D */
.modal button { width: 100%; margin-top: 10px; padding: 11px; border-radius: 11px; font-size: 14.5px; font-weight: 700; border: none; cursor: pointer;
  box-shadow: 0 3px 0 rgba(0,0,0,.06), 0 4px 10px rgba(0,0,0,.06); transition: transform .06s, box-shadow .06s; }
.modal button:active { transform: translateY(2px); box-shadow: 0 0 0 rgba(0,0,0,.05); }
.modal .primary { background: linear-gradient(180deg,#ff9ec4,#ef4e8b); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 3px 0 #cf3a70, 0 6px 14px rgba(230,74,138,.24); }
.modal .ghost { background: #fff; border: 1px solid var(--line); color: #6f6168; box-shadow: 0 2px 0 rgba(0,0,0,.04); }
.modal .mini { background: linear-gradient(180deg,#f9f4f6,#efe7eb); color: #7a6a70; border: none; box-shadow: 0 2px 0 rgba(0,0,0,.05); }
/* 小哥端收货/改单弹框 */
.modal hr { border: none; border-top: 1px solid var(--line); margin: 14px 0; }
.modal input[type=text], .modal input[type=date], .modal input[type=number], .modal select { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 9px; padding: 10px; font-size: 14px; margin-top: 4px; }
.modal .f-label { display: block; font-size: 13px; color: var(--muted); margin-top: 12px; }
.modal .btn-row { display: flex; gap: 10px; margin-top: 14px; }
.modal .btn-row button { flex: 1 1 0%; width: auto; min-width: 0; margin-top: 0; }
.modal .btn-row button.reject { background: #fff6f6; color: #c23030; border-color: #f0b8b8; box-shadow: none; }
/* 收货弹窗：拍照 + 缩略图 */
.collect-photo-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; box-sizing: border-box; margin-top: 10px; padding: 10px; border: 1px dashed #f0a9c4; border-radius: 10px; background: #fff5f9; color: #c2185b; font-size: 14px; font-weight: 700; cursor: pointer; }
.collect-photo-btn:active { background: #ffeaf2; }
.collect-photo-tip { margin: 7px 0 0; color: #9a8a90; font-size: 12px; line-height: 1.5; }
.collect-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.collect-photo { position: relative; aspect-ratio: 1 / 1; border: 1px solid #f0dbe4; border-radius: 9px; overflow: hidden; background: #faf5f7; }
.collect-photo img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; pointer-events: none; }
.collect-photo .cp-zoom { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0 !important; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: transparent; font-size: 0; line-height: 0; cursor: zoom-in; z-index: 1; }
.collect-photo .cp-zoom:active { transform: none; background: rgba(255,255,255,.12); }
.collect-photo .cp-del { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; padding: 0; margin: 0 !important; border: 0; border-radius: 50%; background: rgba(0,0,0,.62); color: #fff; font-size: 15px; line-height: 24px; text-align: center; box-shadow: none; z-index: 3; }
.collect-photo .cp-del:active { transform: none; }
.collect-photo .cp-badge { position: absolute; left: 5px; bottom: 5px; padding: 1px 5px; border-radius: 5px; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; z-index: 2; pointer-events: none; }
.collect-empty { margin-top: 8px; color: #b09aa4; font-size: 12px; text-align: center; }
.collect-photo-count { margin-top: 6px; text-align: right; color: #9a8a90; font-size: 12px; }
.modal .cat-row { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.modal .cat-row select { flex: 1 1 0%; margin: 0; min-width: 0; }
.modal .cat-row input[type=number] { flex: 0 0 70px; margin: 0; }
.modal .icon-del { flex: none; width: 38px; height: 40px; padding: 0; border: none; background: #f5e9ee; color: #c97a90; border-radius: 9px; cursor: pointer; }
button.status.gray { background: #f2edf0; color: #7a6a70; }
.modal .mini-btn2 { background: #f5e9ee; border: none; border-radius: 9px; padding: 9px; font-size: 14px; color: #7a6a70; cursor: pointer; }
.abnormal-box { background: #fdf0ee; border: 1px solid #f8d4cc; border-radius: 10px; padding: 10px 12px; margin-top: 12px; font-size: 14px; color: #c2410c; line-height: 1.6; }
.abnormal-box b { display: block; margin-bottom: 4px; color: var(--orange); font-size: 13px; }

/* 小哥收货照片 */
.photo-preview { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center; background: rgba(10, 5, 8, .86); padding: 14px; }
.photo-preview[hidden] { display: none !important; }
.photo-preview img { max-width: 96vw; max-height: 92vh; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); cursor: zoom-out; }
.photo-viewer-modal { max-width: 760px; width: 94vw; max-height: 90vh; overflow-y: auto; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.photo-card { border: 1px solid #f0dbe4; border-radius: 10px; background: #fff; padding: 6px; min-width: 0; }
.photo-card img { display: block; width: 100%; height: 150px; object-fit: cover; border-radius: 7px; cursor: zoom-in; background: #faf5f7; }
.photo-card span { display: block; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8b7a83; font-size: 11.5px; }
.photo-card.photo-bad { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 150px; color: #b56; font-size: 13px; }
.photo-loading { grid-column: 1 / -1; padding: 26px 0; text-align: center; color: #9a8a90; font-size: 13px; }

/* ============================================================
   管理后台（PC 电脑端布局）
   ============================================================ */
.admin-body { background: #f7f2f5; }
.admin-app { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 230px; background: linear-gradient(180deg, #fff, #fff5f8); border-right: 1px solid var(--line);
  padding: 22px 16px; position: fixed; top: 0; bottom: 0; overflow-y: auto;
}
.admin-sidebar .side-brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 20px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.admin-sidebar .side-brand img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid var(--pink-soft); }
.admin-sidebar .side-brand .sb-name { font-size: 20px; font-weight: 800; background: linear-gradient(90deg, var(--pink), var(--pink-deep)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.admin-sidebar .side-brand .sb-sub { font-size: 11px; color: var(--muted); }
.side-menu { list-style: none; }
.side-menu li {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 4px;
  border-radius: 10px; color: #7a6a70; cursor: pointer; font-size: 14px; font-weight: 600; transition: all .15s;
}
.side-menu li .ico { width: 20px; text-align: center; font-size: 16px; }
.side-menu li:hover { background: #fdeef4; color: var(--pink-deep); }
.side-menu li.active { background: linear-gradient(90deg, var(--pink), var(--pink-deep)); color: #fff; box-shadow: 0 4px 14px rgba(230, 74, 138, .3); }
.admin-main { flex: 1; margin-left: 230px; padding: 20px 26px 40px; min-width: 0; }
.admin-topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-radius: 14px; padding: 14px 20px; margin-bottom: 20px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.admin-topbar .tb-title { font-size: 18px; font-weight: 700; color: var(--pink-deep); }
.admin-topbar .tb-user { display: flex; align-items: center; gap: 12px; }
.admin-panel { background: #fff; border-radius: 14px; padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.admin-panel h3 { font-size: 16px; margin-bottom: 16px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.admin-panel h3::before { content: ''; width: 4px; height: 16px; background: linear-gradient(180deg, var(--pink), var(--pink-deep)); border-radius: 2px; }
.admin-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.admin-toolbar input[type=date], .admin-toolbar select, .admin-toolbar input[type=text] { width: auto; min-width: 130px; padding: 8px 12px; font-size: 13px; }
.admin-toolbar input[type=text] { flex: 0 1 200px; }
.admin-toolbar .btn { width: auto; padding: 8px 18px; font-size: 13px; margin: 0; border-radius: 9px; }
/* 订单筛选：状态和两个日期框收窄，避免占满整行；日期选中后仍按内容自然撑开 */
.admin-toolbar .f-status-compact { min-width: 98px; width: 98px; }
.admin-toolbar .f-date-compact { min-width: 120px; }
.admin-toolbar .filter-pair { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
/* 物流管理筛选：时间区间在左，搜索/状态/按钮接着排在右侧同一行；窄屏再换行 */
.lg-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.lg-toolbar .btn { white-space: nowrap; }
.lg-dates { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.lg-dates .dr-input { min-width: 145px; }
.lg-search { display: flex; align-items: center; gap: 10px; flex: 1 1 360px; min-width: 0; }
.lg-search input[type=text] { flex: 1 1 180px; min-width: 150px; width: auto; margin: 0; }
.lg-search select { flex: 0 0 128px; width: 128px; margin: 0; }
.lg-search .btn { flex: 0 0 auto; }
.lg-cfg-tip { flex: 0 0 100%; font-size: 12px; line-height: 1.5; }
#lgTable { overflow-x: auto; }
#lgTable .lg-track-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  max-width: 300px;
}
#lgTable table { min-width: 900px; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
/* 订单表列多，窄屏/小窗口允许横向滚动，避免 15 列被裁掉 */
#orderTable { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
@media (max-width: 1100px) {
  #orderTable table { min-width: 1100px; }
}
.order-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-bottom: 14px; }
/* 报单只有 3 个统计项：保持一行紧凑，不强行拉成超宽卡片 */
.rp-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.rp-stats .os-chip { flex: 0 0 130px; }
.os-chip { display: inline-flex; flex-direction: column; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fdf7fa; min-width: 0; box-sizing: border-box; }
.os-chip-btn { display: inline-flex; width: 100%; margin: 0; cursor: pointer; font: inherit; text-align: left; transition: border-color .15s, box-shadow .15s, background .15s; }
.os-chip-btn:hover { border-color: #e6b86d; box-shadow: 0 2px 8px rgba(160, 110, 30, .08); }
.os-chip-btn.active { border-color: #d99a3a; background: #fff3df; box-shadow: inset 0 0 0 1px #f1d4a4; }
.os-pay { background: #fff8ee; border-color: #f0d9b6; }
.os-pay .os-val { color: #ad6b12; }
.os-await { background: #fff4ec; border-color: #f6cfae; }
.os-await .os-val { color: #c2410c; }
.os-aftersale { background: #fdf1f7; border-color: #f0d0df; }
.os-aftersale .os-val { color: #c2185b; }
.os-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.os-val { font-size: 17px; font-weight: 700; color: #5a4b57; white-space: nowrap; }
.os-val.p-pos { color: #3aa06a; }
.os-val.p-neg { color: #e05b4f; }
.row-del { background: none; border: none; cursor: pointer; font-size: 16px; padding: 4px 6px; border-radius: 6px; opacity: .65; }
.row-del:hover { background: #fdecec; opacity: 1; }
.btn.danger { background: #fff; color: #e05b4f; border: 1px solid #f0c4bc; }
.btn.danger:hover { background: #fdecec; }
.admin-table input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--pink-deep); }
.change-log { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.chg-item { font-size: 12px; color: var(--muted); padding: 4px 0; border-bottom: 1px dashed var(--line); display: flex; gap: 8px; }
.chg-time { flex: 0 0 auto; color: #b8a4ac; }
.chg-by { flex: 0 0 auto; color: var(--pink-deep); }
.chg-detail { flex: 1 1 auto; word-break: break-all; }
/* 修改记录里的照片：跟正文同一行，蓝色下划线文字，不是按钮 */
.chg-photo-link {
  display: inline;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #1565c0;
  font: inherit;
  font-size: inherit;
  font-weight: 600;
  line-height: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  box-shadow: none;
  white-space: nowrap;
}
.chg-photo-link:hover { color: #0d47a1; background: none; }
.chg-badge { display: inline-block; background: #e05b4f; color: #fff; font-size: 10px; border-radius: 6px; padding: 0 4px; margin-left: 4px; cursor: help; vertical-align: middle; }
/* 拆分单标记：单号后面的「拆」，点开可恢复合并 */
.split-badge { display: inline-block; background: #b06ab3; color: #fff; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 0 6px; margin-left: 4px; cursor: pointer; vertical-align: middle; line-height: 17px; }
.split-badge:hover { background: #95529a; }
.admin-table tr.chg-row td { background: #fff7f6; }
.admin-table th, .admin-table td { padding: 11px 12px; border-bottom: 1px solid #f4ebef; text-align: left; vertical-align: middle; }
.admin-table th { color: var(--muted); font-weight: 600; background: #fdf7fa; white-space: nowrap; }
.admin-table tr:hover td { background: #fff9fb; }
.admin-table .tag { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.tag.pending { background: #eef4ff; color: var(--blue); }
.tag.picking { background: #fff7e6; color: #d48806; }
.tag.paying { background: #fff1dc; color: #b36a10; }
.tag.done { background: #eaf7ee; color: var(--green); }
.tag.abnormal { background: #fdefea; color: var(--orange); }
.tag.rejected { background: #fdecec; color: #c23030; }
.tag.recovered { background: #f0ecfd; color: #7b61d6; }
.tag.after_sale { background: #fff0f6; color: #c2185b; }
.tag.returned { background: #e8f7f9; color: #0e7c86; }
.tag.await_pay { background: #ffe9d6; color: #c2410c; }
.tag.after_sold { background: #eef2f7; color: #455a75; }
.tag.lg-attr-out { background: #eef4ff; color: #2f6bb5; }
.tag.lg-attr-return { background: #fff0f6; color: #c2185b; }
.admin-table .mini-btn { width: auto; padding: 5px 14px; font-size: 12px; margin: 0; border-radius: 8px; box-shadow: none; }
.admin-table select { width: auto; padding: 5px 8px; font-size: 12px; border-radius: 7px; border: 1px solid var(--line); }
.admin-empty { padding: 30px; text-align: center; color: var(--muted); font-size: 14px; }

/* 统计卡片 */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 14px; padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.stat-card .sc-label { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.stat-card .sc-num { font-size: 32px; font-weight: 800; color: var(--pink-deep); }
.stat-card .sc-extra { font-size: 12px; color: var(--muted); margin-top: 6px; }
.stat-card.sc-done .sc-num { color: var(--green); }
.stat-card.sc-abnormal .sc-num { color: var(--orange); }
.stat-card.sc-blue .sc-num { color: var(--blue); }
.stat-card.sc-money .sc-num { color: #3aa06a; }
.stat-card.sc-profit .sc-num { color: #e05b4f; }
.stat-card.sc-recovered .sc-num { color: #7b61d6; }
.stat-card.sc-await .sc-num { color: #c2410c; }
.stat-card.sc-warn .sc-num { color: var(--orange); }
.stat-card.sc-warn-hot { border-color: var(--orange); background: #fff7f2; }
.kpi-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-bottom: 20px; }

/* 图表 */
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-box { background: #fff; border-radius: 14px; padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.chart-box h4 { font-size: 14px; margin-bottom: 14px; color: var(--text); }
.bar-row { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar-col .bar { width: 60%; max-width: 46px; background: linear-gradient(180deg, var(--pink), var(--pink-deep)); border-radius: 6px 6px 0 0; min-height: 2px; transition: height .4s; }
.bar-col .bar-label { font-size: 11px; color: var(--muted); margin-top: 6px; white-space: nowrap; }
.bar-col .bar-num { font-size: 11px; color: var(--pink-deep); font-weight: 700; }
.city-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.city-row .city-name { width: 60px; color: var(--text); }
.city-row .city-track { flex: 1; background: #f7eef2; height: 18px; border-radius: 9px; overflow: hidden; }
.city-row .city-fill { height: 100%; background: linear-gradient(90deg, var(--pink), var(--pink-deep)); border-radius: 9px; }
.city-row .city-num { width: 40px; text-align: right; color: var(--muted); font-weight: 600; }

/* 详情弹窗（后台） */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; font-size: 13.5px; }
.detail-grid .d-item { display: flex; flex-direction: column; gap: 3px; }
.detail-grid .d-item.full { grid-column: 1 / -1; }
.detail-grid .d-item .dk { font-size: 12px; color: var(--muted); }
.detail-grid .d-item .dv { color: var(--text); word-break: break-all; }
.admin-statusbar { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.admin-statusbar .btn { width: auto; padding: 8px 18px; font-size: 13px; margin: 0; border-radius: 9px; flex: 0 0 auto; white-space: nowrap; }
.admin-statusbar .muted { white-space: nowrap; }
@media (max-width: 900px) {
  .admin-sidebar { width: 68px; padding: 18px 8px; }
  .admin-sidebar .side-brand .sb-text, .side-menu li .m-text { display: none; }
  .admin-main { margin-left: 68px; padding: 14px; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
  .chart-row { grid-template-columns: 1fr; }
}

/* 确保 hidden 属性始终生效（覆盖 display:flex 等） */
[hidden] { display: none !important; }

/* 利润列颜色 */
.p-pos { color: #3aa06a; font-weight: 700; }
.p-neg { color: #e05b4f; font-weight: 700; }
.exp-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 10px; background: #fff3e6; color: #d48806; font-size: 11px; font-weight: 700; cursor: help; white-space: nowrap; }
.profit-box { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 12px 14px; background: #fff5f8; border: 1px solid var(--line); border-radius: 12px; }
.profit-box b { font-size: 18px; color: var(--pink-deep); }
.pp { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 400; color: var(--text); cursor: pointer; }

/* 后台订单编辑：每个品类行含各自价格 */
.item-row { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 10px; background: #fffdfe; }
.item-head { display: grid; grid-template-columns: 1fr 74px 36px; gap: 6px; align-items: center; width: 100%; }
.item-head .iCat { width: 100%; min-width: 0; padding: 8px 10px; font-size: 14px; max-width: none; box-sizing: border-box; }
.item-head .iCat option, .exp-row .xType option { font-size: 14px; padding: 2px 4px; }
.item-head .iQty { width: 70px; padding: 7px 8px; font-size: 13px; flex: none; }
.item-head .iDel, .exp-row .xDel { flex: none; width: 34px; height: 34px; padding: 0; border: none; background: #f5e9ee; color: #c97a90; border-radius: 9px; font-size: 13px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.item-price { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.item-price .ipf { display: flex; flex-direction: column; }
.item-price .ipf label { margin: 0 0 3px; font-size: 11px; color: var(--muted); font-weight: 500; }
.item-price .ipf input { width: 96px; padding: 7px 8px; font-size: 13px; }
.item-exp { flex: 1 1 100%; min-width: 0; }
.item-exp-label { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.item-exp-rows { display: flex; flex-direction: column; gap: 6px; }
.exp-row { display: grid; grid-template-columns: 1fr 124px 36px; gap: 6px; align-items: center; width: 100%; }
.exp-row .xType { width: 100%; min-width: 0; padding: 8px 10px; font-size: 13px; max-width: none; box-sizing: border-box; }
.exp-row .xAmt { width: 120px; padding: 6px 8px; font-size: 13px; flex: none; }

/* 日期区间选择器：一个框显示起止，点开双月日历一次选区间 */
.dr-input {
  display: inline-flex; align-items: center; gap: 6px; min-width: 190px; height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted);
  font-size: 13px; cursor: pointer; user-select: none; white-space: nowrap; box-sizing: border-box;
}
.dr-input:hover { border-color: #e3b9c6; }
.dr-input.dr-on { color: var(--text); border-color: #e3b9c6; background: #fffafc; font-weight: 600; }
.dr-input::after { content: '▾'; margin-left: auto; color: #c9a; font-size: 11px; }
.dr-pop {
  position: absolute; z-index: 3000; background: #fff; border: 1px solid #f0dfe5; border-radius: 14px;
  box-shadow: 0 18px 44px rgba(120, 60, 85, .18); padding: 12px; width: 460px; box-sizing: border-box;
}
.dr-months { display: flex; gap: 14px; }
.dr-mon { flex: 1 1 0; min-width: 0; }
.dr-mon-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dr-mon-head b { font-size: 13px; color: var(--text); }
.dr-nav, .dr-nav-ph { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; color: #b98; font-size: 15px; cursor: pointer; border-radius: 6px; }
.dr-nav:hover { background: #fdeef3; }
.dr-nav-ph { visibility: hidden; }
.dr-week, .dr-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dr-w { text-align: center; font-size: 11px; color: var(--muted); padding: 3px 0; }
.dr-c { text-align: center; font-size: 12px; padding: 6px 0; border-radius: 6px; }
.dr-d { cursor: pointer; color: var(--text); }
.dr-d:hover { background: #fdeef3; }
.dr-today { color: #d1718d; font-weight: 700; }
.dr-mid { background: #fdeef3; color: #b8517a; }
.dr-sel { background: #e46f94; color: #fff !important; font-weight: 700; }
.dr-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.dr-clear { color: var(--muted); font-size: 13px; text-decoration: none; }
.dr-ok { width: auto; min-width: 84px; padding: 7px 18px; font-size: 13px; margin: 0; border-radius: 9px; background: #e46f94; color: #fff; border: none; cursor: pointer; }

/* ---------- 订单表格：就地编辑 + 宽松两行布局 ---------- */
.order-grid th, .order-grid td { padding: 11px 12px; vertical-align: middle; line-height: 1.55; font-size: 13px; }
.order-grid th { white-space: nowrap; font-size: 13px; }
.order-grid td b { font-weight: 600; }
.order-grid .sub { color: #8b7a83; font-size: 12px; }
.order-grid .col-chk { width: 38px; text-align: center; padding-left: 6px; padding-right: 4px; }
.order-grid .cell-items { min-width: 140px; max-width: 210px; white-space: normal; word-break: break-all; }
.order-grid .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.order-grid .ship-cell { min-width: 118px; }
.order-grid .ship-cell .ln { display: block; }
.order-grid .note-cell { width: 270px; min-width: 270px; max-width: 290px; }
.order-grid .customer-cell { width: 210px; min-width: 210px; max-width: 210px; padding-left: 24px; padding-right: 14px; }
.order-grid .addr-inline { display: block; max-width: 172px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #7d6b73; font-size: 12px; cursor: copy; }
.order-grid .addr-inline:hover { color: #c2185b; }
.order-grid .date-cell { padding-left: 2px; padding-right: 18px; }
.order-grid .cell-items { padding-left: 22px; }
.order-grid .note-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; flex-wrap: nowrap; }
.order-grid .note-text { width: 100%; min-width: 0; text-align: center; line-height: 1.5; word-break: break-word; }
.order-grid .status-edit { cursor: pointer; }
.order-grid .status-edit:hover { filter: brightness(.94); box-shadow: 0 0 0 1px #f3c6d8 inset; }
.order-grid .overdue-mini { display: block; width: max-content; margin: 4px auto 0; padding: 1px 5px; border-radius: 5px; background: #fff1f0; color: #cf1322; font-size: 11.5px; line-height: 1.5; white-space: nowrap; text-align: center; }
.order-grid .note-photo-btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: auto; margin: 0 !important; padding: 2px 7px; border: 1px solid #f0b6cf; border-radius: 6px; background: #fff7fa; color: #c2185b; font-size: 12px; line-height: 1.5; white-space: nowrap; cursor: pointer; }
.order-grid .note-photo-btn:hover { background: #ffeaf2; }
.order-grid .price-flag.second { right: 21px; }
.cell-ed { cursor: text; border-radius: 6px; transition: background .15s, box-shadow .15s; }
.cell-ed:hover { background: #fff2f7; box-shadow: inset 0 0 0 1px #f3c6d8; }
.cell-ed i { color: #c9a7b5; font-style: normal; }
.cell-exp { cursor: pointer; }
.cell-input { width: 100%; min-width: 62px; height: 28px; padding: 0 6px; border: 1px solid #e06a95; border-radius: 6px; font-size: 12.5px; }
.row-edit { width: 28px; height: 28px; padding: 0; border-radius: 8px; border: 1px solid #e6d9e0; background: #fff; color: #c2185b; font-size: 14px; cursor: pointer; }
.row-edit:hover { background: #fff2f7; border-color: #f3c6d8; }
.qx-modal { max-width: 430px; }
.qx-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.qx-row .qx-type { flex: 1 1 auto; min-width: 0; height: 38px; }
.qx-row .qx-amt { width: 88px; flex: 0 0 88px; height: 38px; }
.qx-del { width: 34px; height: 38px; flex: 0 0 34px; border-radius: 8px; border: 1px solid #f0d3e0; background: #fff0f4; color: #c2185b; }
.qx-add { width: 100%; margin-top: 4px; height: 36px; border-radius: 10px; border: 1px dashed #e5cfd9; background: #faf6f8; color: #8a5e70; }
.bs-row { display: flex; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px dashed #eee4ea; }
.bs-info { flex: 0 0 44%; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.bs-info b { font-weight: 600; }
.bs-info span { color: #8b7a83; font-size: 12px; }
.bs-row .bs-no, .bs-row .bas-no { flex: 1 1 auto; min-width: 0; height: 34px; }
.bs-modal { font-size: 14px; }
.bs-modal h3 { font-size: 20px; }
.bs-modal label { font-size: 14px; }
.bs-modal .muted, .bs-modal .tip { font-size: 13.5px; line-height: 1.65; }
.bs-modal input[type=text], .bs-modal input[type=date], .bs-modal input[type=number] {
  font-size: 15px; padding: 9px 12px; height: auto;
}
.bs-order { padding: 11px 0 9px; border-bottom: 1px dashed #eee4ea; }
.bs-order-head { font-size: 15px; color: var(--text); }
.bs-order-sub { margin: 2px 0 8px; font-size: 13.5px; color: #8b7a83; }
.bs-order-line { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: center; }
.bs-order-info b { font-size: 15px; color: var(--text); }
.bs-order-info .bs-order-sub { margin: 2px 0 2px; }
.bs-order-info .bs-order-items { font-size: 12.5px; color: #8b7a83; line-height: 1.45; word-break: break-all; }
.bs-old-multi { display: inline-block; margin-left: 8px; padding: 1px 6px; border-radius: 6px; background: #fff5e8; border: 1px solid #f3d7b2; color: #9a6420; font-size: 11px; }
.bs-order-line .bs-no { width: 100%; height: 38px; margin: 0; }
.bs-order-cats { display: flex; flex-direction: column; gap: 7px; }
.bs-cat-group { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 12px; }
.bs-cat-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; color: #6b4c5b; }
.bs-cat-group .bs-no { width: 100%; margin: 0; height: 38px; }
.bs-fee-rows { margin-top: 2px; }
.bs-fee-rows[hidden], .bs-fee-total[hidden] { display: none; }
.bs-fee-empty { padding: 6px 0; font-size: 13px; color: #8b7a83; }
.bs-fee-row { display: flex; align-items: center; gap: 10px; margin: 7px 0; }
.bs-fee-no { flex: 0 0 180px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; color: #6b4c5b; }
.bs-fee-input { flex: 1 1 auto; min-width: 0; margin: 0 !important; height: 38px; }
.bs-fee-total { margin-top: 3px; text-align: right; font-size: 14px; font-weight: 600; color: #c2185b; }
.bs-actions { position: sticky; bottom: 0; margin-top: 10px; padding: 10px 0 4px; background: #fff; border-top: 1px dashed #f0e2e9; z-index: 1; }
.bs-mode { display: flex; gap: 8px; margin: 12px 0 4px; }
.bs-mode button { flex: 1; height: 40px; border: 1px solid #e8d6de; border-radius: 10px; background: #fff; color: #7a606b; font-size: 14px; font-weight: 600; cursor: pointer; }
.bs-mode button.active { border-color: #e59ab0; background: #fff0f4; color: #b92a55; }
#bsSharedWrap[hidden], #bsSplitWrap[hidden] { display: none; }
.after-sale-box { margin: 14px 0 2px; padding: 12px 14px 10px; border: 1px solid #f2d3e1; border-radius: 12px; background: #fffaf9; }
.after-sale-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.after-sale-head b { color: #c2185b; font-size: 13px; }
.after-sale-box label { margin-top: 6px; }
.after-sale-box #eAfterSaleField { padding-top: 2px; }
.force-rollback { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #efd3dc; }
.force-rollback[hidden] { display: none; }

.order-grid .addr-cell { cursor: copy; min-width: 150px; max-width: 210px; white-space: normal; word-break: break-all; display: table-cell; }
.order-grid .addr-cell { -webkit-line-clamp: 2; overflow: hidden; }

.order-grid .tag { white-space: nowrap; }
.order-grid .sub { white-space: nowrap; }
.order-grid th:nth-child(n) { white-space: nowrap; }
.order-grid .cell-items { word-break: break-word; }

/* 已寄出状态标签 */
.tag.shipped { background: #e6f6f8; color: #0e7490; }
/* 就地编辑输入框固定宽度，避免撑列导致画面跳动 */
.cell-input { width: 100%; max-width: 108px; box-sizing: border-box; }
.cell-input[type=date] { max-width: 132px; }
.order-grid .num { min-width: 74px; }
/* 短列：表头与订单值统一居中，同时给就地编辑输入框 / 支出角标留足空间 */
.order-grid .ctr { text-align: center; }
.order-grid .ctr.num { text-align: center; }
.order-grid th.ctr { padding-left: 6px; padding-right: 6px; }
.order-grid .ctr-status { min-width: 72px; }
.order-grid .ctr-money { min-width: 88px; }
/* 下单价角标：红=与报单明细金额不一致，橙=报单表未找到 */
.price-flag {
  position: absolute; top: 3px; right: 3px; width: 16px; height: 16px;
  margin: 0 !important; padding: 0; border: 0; border-radius: 50%;
  color: #fff; font-size: 10px; font-weight: 700; line-height: 16px;
  text-align: center; cursor: pointer; box-shadow: 0 0 0 1px #fff;
}
.price-flag.red { background: #df4b4b; }
.price-flag.orange { background: #ee8b2f; }
.price-flag:hover { filter: brightness(.94); }
.pf-detail { margin: 10px 0 2px; padding: 10px 12px; border-radius: 10px; background: #fff8ef; border: 1px solid #f6dcc0; }
.pf-detail .pf-line { font-size: 13.5px; color: #8a5a1f; line-height: 1.7; }
.pf-detail .pf-line + .pf-line { margin-top: 2px; }
.order-grid .ctr-expense { min-width: 88px; }
.order-grid .ctr-date { min-width: 100px; }
.order-grid .ctr-note { width: 216px; min-width: 216px; max-width: 232px; padding-left: 10px; padding-right: 10px; white-space: normal; word-break: break-word; }
/* 单元格固定最小行高：点开就地编辑输入框时行高不变，避免列表跳动 */
.order-grid tbody td { height: 48px; position: relative; }
/* 输入框绝对定位覆盖在单元格上，不参与排版，行高/列宽都不会变 */
.cell-input { position: absolute; left: 3px; right: 3px; top: 50%; transform: translateY(-50%); width: auto; height: 24px; padding: 0 4px; }
/* 分页条 */
.order-pager { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid #f4ebef; font-size: 13px; color: #7a6a73; }
.order-pager .pg-left b { color: #c2185b; }
.order-pager .pg-size { width: 106px; height: 30px; margin: 0; padding: 0 6px; border-radius: 8px; border: 1px solid #e6d9e0; background: #fff; color: #5f4d57; }
.order-pager .pg-nav, .order-pager .pg-btn { width: 30px; height: 30px; min-width: 30px; padding: 0; margin: 0; border-radius: 8px; border: 1px solid #e6d9e0; background: #fff; color: #7a6a73; font-size: 13px; cursor: pointer; }
.order-pager .pg-btn.on { background: #fde8f0; border-color: #f0b6cf; color: #c2185b; font-weight: 700; }
.order-pager .pg-nav:disabled { opacity: .45; cursor: default; }
.order-pager .pg-dot { color: #b9a7b0; padding: 0 2px; }
.order-pager .pg-jump { display: flex; align-items: center; gap: 6px; }
.order-pager .pg-jump input { width: 52px; height: 30px; margin: 0; padding: 0 6px; border-radius: 8px; border: 1px solid #e6d9e0; text-align: center; }
.cell-copy { cursor: copy; }
.cell-copy:hover { background: #fff8fa; }
.cell-note { cursor: copy; }
.cell-note:hover { background: #fff8fa; }
/* 城市与单号前缀 */
.city-list { margin-bottom: 10px; }
.city-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed #eee4ea; }
.city-main { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex: 1 1 100%; min-width: 0; }
.city-district-line { display: flex; align-items: center; gap: 8px; flex: 1 1 100%; padding-left: 0; box-sizing: border-box; }
.city-district-line > span { flex: 0 0 90px; font-size: 12px; color: var(--muted); }
.city-district-line .city-districts { flex: 1 1 auto; min-width: 0; height: 34px; margin: 0; }
.city-row .city-name { flex: 0 0 90px; font-weight: 600; }
.city-row .city-code { flex: 0 0 110px; height: 34px; margin: 0; text-transform: uppercase; }
.city-row .city-fee-wrap { display: flex; align-items: center; gap: 4px; flex: 0 0 92px; font-size: 12px; color: var(--muted); }
.city-row .city-fee { width: 68px; height: 34px; margin: 0; text-align: center; }
.city-row .city-fee:disabled { background: #f6f1f4; color: #9b8d95; cursor: not-allowed; }
.city-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.city-add input { height: 36px; }
/* 多品类按品类改价 */
.pm-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pm-row .pm-name { flex: 1 1 auto; min-width: 0; font-size: 13px; }
.pm-row .pm-val { flex: 0 0 96px; width: 96px; height: 36px; }
/* 编辑订单弹窗：整窗固定高度，头部/底部按钮冻结，中间内容自己滚（画面不跳） */
.modal.edit-modal { height: 86vh; max-height: 86vh; display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.edit-head { flex: 0 0 auto; padding: 18px 22px 10px; border-bottom: 1px solid #f6ecf2; }
.edit-head h3 { margin: 0; }
.edit-head p { margin: 4px 0 0; }
.edit-body { flex: 1 1 auto; overflow-y: auto; padding: 14px 22px 18px; }
/* 编辑订单：图片备注拖动上传 */
.edit-photo-box { margin-top: 10px; }
.edit-photo-drop { border: 2px dashed #f0bfd2; border-radius: 12px; background: #fffafc; padding: 10px 12px; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; }
.edit-photo-drop:hover { background: #fff4f8; border-color: #e79ab8; }
.edit-photo-drop.drag { background: #ffeaf3; border-color: #c2185b; box-shadow: 0 0 0 3px rgba(194, 24, 91, .10) inset; }
.ep-hint { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 28px; font-size: 12.5px; color: #a0798a; text-align: center; line-height: 1.5; }
.ep-hint b { color: #c2185b; font-weight: 600; }
.edit-photo-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.edit-photo-grid:empty { display: none; }
.ep-card { position: relative; width: 88px; flex: 0 0 88px; }
.ep-card img { display: block; width: 88px; height: 88px; object-fit: cover; border-radius: 9px; border: 1px solid #f0d5df; background: #faf4f7; }
.ep-card .ep-ph { display: flex; align-items: center; justify-content: center; width: 88px; height: 88px; border-radius: 9px; border: 1px dashed #ecc9d6; background: #faf4f7; color: #b08a98; font-size: 12px; }
.ep-card .ep-tag { display: block; margin-top: 3px; text-align: center; font-size: 11px; color: #9a7a86; }
.ep-card .ep-x { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; margin: 0 !important; padding: 0; border: 0; border-radius: 50%; background: #d64d71; color: #fff; font-size: 12px; line-height: 20px; text-align: center; cursor: pointer; z-index: 2; box-shadow: 0 2px 6px rgba(122, 43, 67, .28); }
.ep-card .ep-x:hover { background: #b9365b; }
.ep-state { font-size: 12px; color: #a0798a; margin-top: 5px; min-height: 16px; }
.edit-foot { flex: 0 0 auto; padding: 12px 22px 16px; border-top: 1px solid #f6ecf2; background: #fff; border-radius: 0 0 16px 16px; }
.edit-foot .row-between { margin-top: 0; }
.items-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.items-head label { flex: 1 1 auto; min-width: 0; margin: 0; }
.items-head button { flex: 0 0 auto; white-space: nowrap; }
#eItems { padding: 2px 0; }
/* 其他支出小弹窗：明细区固定高度，加/删支出项时弹窗不跳动 */
#expRows { height: 200px; overflow-y: auto; padding-right: 4px; }
/* 添加品类按钮：放在最后一个品类行的其他支出上方 */
.item-addcat { display: inline-block; width: auto; margin: 8px 0 2px; padding: 4px 12px; font-size: 12px; }
.city-add button { white-space: nowrap; }

/* 已手动顺延的红点（预约日期/时段后面） */
.red-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #f5222d; margin-left: 5px; vertical-align: middle; box-shadow: 0 0 0 2px rgba(245,34,45,.12); cursor: help; }
/* 顺延记录气泡（悬停红点弹出） */
.pp-tip { position: fixed; z-index: 10000; display: none; max-width: 320px; background: #fff; border: 1px solid #ffd6e2; box-shadow: 0 6px 18px rgba(180,60,100,.18); border-radius: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.65; color: #5a4a50; white-space: pre-line; pointer-events: none; }

/* 小哥端批量操作条（勾选后出现） */
.bulk-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: #fff3f6; border: 1px solid #ffd6e2; box-shadow: var(--shadow); }
.bulk-bar #bulkCount { font-size: 13px; font-weight: 700; color: #c2185b; flex: 1; }
.bulk-bar button { width: auto; margin: 0; padding: 6px 14px; font-size: 12.5px; }

/* 订单卡片勾选框 */
.oh-name-line { display: flex; align-items: center; gap: 7px; }
.ord-chk { width: 17px; height: 17px; margin: 0; flex-shrink: 0; accent-color: #e0559a; }

/* 物流管理：关联订单展开、短信内容 */
.lg-table td { vertical-align: middle; }
.lg-no-link { color: #c2185b; text-decoration: none; }
.lg-no-link:hover { text-decoration: underline; }
.lg-order-box { padding: 6px 2px; }
.lg-order-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 7px 8px; border-bottom: 1px dashed #eee; font-size: 13px; }
.lg-order-item:last-child { border-bottom: none; }
.lg-order-id { font-weight: 700; color: #333; }
.lg-order-item .row-edit { width: auto; padding: 0 8px; margin: 0; }
.lg-sms { max-width: 420px; color: #666; font-size: 12.5px; line-height: 1.5; }
.tag.lg-picked { background: #e6f4ff; color: #0958d9; }
.tag.lg-transit { background: #f6ffed; color: #389e0d; }
.tag.lg-signed { background: #f9f0ff; color: #722ed1; white-space: nowrap; }
.tag.lg-problem { background: #fff2e8; color: #d4380d; }
.tag.lg-unknown { background: #f5f5f5; color: #888; }

/* 客户报单 */
.rp-table-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
#rpTable table { min-width: 0; width: 100%; }
.report-grid .rp-date { min-width: 96px; white-space: nowrap; }
.report-grid .rp-phone { min-width: 108px; white-space: nowrap; }
.report-grid .rp-cat { min-width: 140px; max-width: 220px; word-break: break-word; }
.report-grid .rp-order-no { min-width: 108px; white-space: nowrap; }
.report-grid .num { min-width: 78px; }
.report-grid .col-op { width: 56px; }
.report-grid .ctr-status { min-width: 72px; text-align: center; }
.report-grid tr.rp-reserved td { color: #a99aa3; }
.report-grid .rp-strike { text-decoration: line-through; text-decoration-color: #c08ba2; text-decoration-thickness: 1.5px; }
.report-grid tr.rp-reserved td .rp-del { text-decoration: none; }
.report-grid .rp-del { width: auto; margin: 0; padding: 4px 6px; font-size: 11.5px; color: #c2185b; border-color: #f0b6cf; background: #fff7fa; white-space: nowrap; }
.tag.report-reported { background: #eef4ff; color: #0958d9; }
.tag.report-reserved { background: #eaf7ee; color: #237804; }
.tag.report-remind1 { background: #fff7e6; color: #d46b08; }
.tag.report-remind2 { background: #fff1e0; color: #ad4e00; }
.tag.report-remind3 { background: #fff0f0; color: #cf1322; }
.tag.report-dead { background: #f3f4f6; color: #8c8c8c; }
.rp-show-reserved { display: inline-flex; align-items: center; gap: 5px; margin: 0; font-size: 12.5px; color: #7a6a73; white-space: nowrap; cursor: pointer; }
.rp-show-reserved input { width: 16px; height: 16px; margin: 0; accent-color: var(--pink-deep); }
.rp-overdue-on { background: #fff1f0 !important; border-color: #ffa39e !important; color: #cf1322 !important; }
.rp-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.rp-form-address { margin-top: 12px; }
.rp-form-address label { display: block; font-size: 12.5px; color: #7a6a73; margin-bottom: 6px; }
.rp-form-address input { width: 100%; }
.rp-form-grid > div { min-width: 0; }
.rp-form-grid label { display: block; font-size: 12.5px; color: #7a6a73; margin-bottom: 6px; }
.rp-form-grid input, .rp-form-grid select { width: 100%; }
.rp-form-items-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 8px; }
.rp-form-items-head label { margin: 0; font-size: 12.5px; color: #7a6a73; flex: 1 1 auto; }
.rp-form-items-head .mini { width: auto; margin: 0; padding: 5px 12px; font-size: 12px; flex: 0 0 auto; white-space: nowrap; }
.rp-item-row { display: flex; flex-direction: column; gap: 9px; margin-bottom: 8px; }
.rp-item-row + .rp-item-row { margin-top: 16px; padding-top: 16px; border-top: 2px dashed #e2a2b8; }
.rp-item-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rp-item-line-top > .ss-wrap { flex: 1.45 1 0%; min-width: 0; }
.rp-item-line-top > .rp-cat-input { flex: 1.45 1 0%; min-width: 0; margin: 0; }
.rp-item-line-top > .rp-order-input { flex: 1 1 0%; width: auto; min-width: 0; height: 36px; margin: 0; padding: 0 9px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; background: #fff; }
.rp-item-line-top .rp-order-input:focus { outline: none; border-color: #e06a95; }
.rp-item-line-controls { display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1fr) 36px; gap: 10px; align-items: center; }
.rp-item-line-controls .qty-step { width: 100%; height: 36px; box-sizing: border-box; justify-content: center; }
.rp-item-line-controls .qty-btn { width: 27px; height: 34px; font-size: 16px; }
.rp-item-line-controls .qty-val { min-width: 28px; height: 34px; font-size: 14px; }
.rp-item-line-controls .rp-money-input { width: 100%; height: 36px; margin: 0; padding: 0 9px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; text-align: center; background: #fff; }
.rp-item-line-controls .rp-money-input:focus { outline: none; border-color: #e06a95; }
.rp-item-line-controls .rp-money-input::-webkit-outer-spin-button, .rp-item-line-controls .rp-money-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rp-item-line-controls .rp-item-remove, .rp-item-line-controls .rp-item-remove-placeholder { flex: none; width: 36px; height: 36px; margin: 0; padding: 0; box-sizing: border-box; }
.rp-item-line-controls .rp-item-remove { border-radius: 9px; border: 1px solid #f0d6df; background: #fff7fa; color: #c2185b; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; line-height: 1; }
.rp-item-line-controls .rp-item-remove-placeholder { display: block; }
.acc-districts { display: flex; flex-direction: column; gap: 9px; margin-top: 7px; }
.acc-district-group { border: 1px solid #f3dfe6; border-radius: 10px; padding: 8px 10px; background: #fffafb; }
.acc-district-title { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; font-weight: 600; color: #7a3e52; margin-bottom: 6px; }
.acc-district-title span { font-size: 11px; font-weight: 400; color: #a99aa3; }
.acc-district-options { display: flex; flex-wrap: wrap; gap: 7px 14px; }
.acc-district-options label { display: inline-flex; align-items: center; gap: 5px; margin: 0; font-size: 12.5px; font-weight: 400; color: var(--text); cursor: pointer; }
.acc-district-options input { width: 15px; height: 15px; margin: 0; accent-color: #c2185b; flex: none; }
.rp-modal { min-height: min(640px, calc(100vh - 40px)); max-height: none; overflow: visible; }
.report-grid .rp-address { min-width: 130px; max-width: 220px; }
.report-grid .rp-address span { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
/* 拆分 / 恢复合并弹窗 */
.split-list { border: 1px solid #f0d6df; border-radius: 12px; background: #fffafb; padding: 6px 10px; max-height: 44vh; overflow-y: auto; }
.split-item { display: flex; align-items: center; gap: 9px; padding: 9px 2px; border-bottom: 1px dashed #f3dfe6; cursor: pointer; font-size: 13.5px; color: #4a3b41; }
.split-item:last-child { border-bottom: none; }
.split-item.static { cursor: default; justify-content: space-between; }
.split-check { width: 18px; height: 18px; margin: 0; flex: none; accent-color: #e06a95; }
.split-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.split-price { flex: none; color: #8a7a80; font-size: 12px; white-space: nowrap; }
.split-order-btn { width: auto; flex: 0 0 auto; white-space: nowrap; background: #fff0f5; border-color: #e9b7c9; color: #b23a63; }
.edit-foot-actions { display: flex; gap: 10px; margin-left: auto; flex: 0 0 auto; }
.edit-foot-actions .mini { width: auto; margin: 0; white-space: nowrap; flex: none; }
.modal .split-order-btn { width: auto; min-width: 96px; flex: 0 0 auto; white-space: nowrap; }
.modal .edit-foot-actions .mini { width: auto; flex: none; white-space: nowrap; }
.report-grid .ctr-money { min-width: 76px; text-align: center; }
@media (max-width: 700px) {
  .report-grid th, .report-grid td { padding: 8px 4px; font-size: 11px; }
  .report-grid .rp-date { min-width: 0; width: 72px; }
  .report-grid .rp-phone { min-width: 0; width: 88px; font-size: 10.5px; }
  .report-grid .rp-address { min-width: 0; width: 118px; max-width: 118px; }
  .report-grid .rp-cat { min-width: 0; max-width: none; width: 118px; }
  .report-grid .rp-order-no { min-width: 0; width: 104px; }
  .report-grid .ctr-status { min-width: 0; width: 60px; }
  .report-grid .col-op { width: 34px; }
  .report-grid .col-chk { width: 26px; padding-left: 2px; padding-right: 2px; }
  .report-grid .tag { padding: 2px 5px; font-size: 10.5px; }
  .report-grid .rp-del { padding: 3px 4px; font-size: 10.5px; }
}
@media (max-width: 600px) {
  .rp-form-grid { grid-template-columns: 1fr; }
  .rp-item-line-controls { grid-template-columns: 88px minmax(0, 1fr) minmax(0, 1fr) 34px; gap: 8px; }
  .rp-item-line-controls .rp-item-remove, .rp-item-line-controls .rp-item-remove-placeholder { width: 34px; height: 36px; }
  .rp-item-line-controls .qty-btn { width: 24px; }
}
@media (max-width: 420px) {
  .rp-item-line-top { flex-direction: column; align-items: stretch; }
  .rp-item-line-top > .ss-wrap, .rp-item-line-top > .rp-cat-input, .rp-item-line-top > .rp-order-input { flex: 1 1 auto; width: 100%; }
}

/* 权限角色 */
#aPermRole { width: 100%; }
.role-table { width: 100%; min-width: 0; }
.role-table th:first-child, .role-table td:first-child { width: 42%; }
.role-table td { vertical-align: middle; }
#roleList .admin-empty { padding: 26px 12px; text-align: center; color: #9ca3af; font-size: 13px; }
#roleEditPane > label { display: block; font-size: 13px; color: #374151; margin-bottom: 6px; }

/* 品类 / 支出项胶囊：名称 + 关联数 + 彩色按钮 */
.cat-item { flex-wrap: wrap; max-width: 100%; }
.cat-order-badge { font-size: 12px; color: #c2185b; background: #ffe6ef; border-radius: 10px; padding: 2px 8px; white-space: nowrap; }
.cat-report-badge { font-size: 12px; color: #8a5a00; background: #fff0df; border-radius: 10px; padding: 2px 8px; white-space: nowrap; }
.exp-use-badge { font-size: 12px; color: #1565c0; background: #e8f1fb; border-radius: 10px; padding: 2px 8px; white-space: nowrap; }
button.mini.cat-edit {
  background: #fff0f6; color: #c2185b; border: 1px solid #f1c9d8; box-shadow: none;
}
button.mini.cat-edit:hover { background: #ffe3ee; }
button.mini.cat-del {
  background: #fff0f0; color: #c62828; border: 1px solid #f3c6c6; box-shadow: none;
}
button.mini.cat-del:hover { background: #ffe5e5; }
button.mini.cat-del.is-blocked {
  background: #f0ecee; color: #8a7f84; border-color: #ded7da; box-shadow: none;
}
button.mini.cat-del.is-blocked:hover { background: #eae5e7; }

/* 手机端后台：左侧固定栏改为顶部横向菜单，主区占满屏幕 */
@media (max-width: 640px) {
  .admin-app { flex-direction: column; }
  .admin-sidebar {
    position: static; width: 100%; height: auto; bottom: auto;
    padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line);
    background: #fff; overflow: visible;
  }
  .admin-sidebar .side-brand { display: none; }
  .side-menu {
    display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden;
    padding-bottom: 2px; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; -ms-overflow-style: none;
  }
  .side-menu::-webkit-scrollbar { display: none; }
  .side-menu li {
    flex: 0 0 auto; padding: 8px 10px; margin: 0; font-size: 14px;
    border-radius: 9px; white-space: nowrap;
  }
  .side-menu li .ico { width: auto; font-size: 16px; }
  .side-menu li .m-text { display: inline; }
  .admin-main { margin-left: 0; padding: 10px 10px 28px; width: 100%; min-width: 0; }
  .admin-topbar {
    flex-wrap: wrap; gap: 8px; padding: 10px 12px; margin-bottom: 12px; border-radius: 12px;
  }
  .admin-topbar .tb-title { font-size: 18px; }
  .admin-topbar .tb-user { gap: 8px; }
  .admin-panel { padding: 12px; margin-bottom: 12px; border-radius: 12px; }
  .admin-panel h3 { font-size: 16px; margin-bottom: 12px; }
  .admin-toolbar { gap: 8px; }
  .admin-toolbar input[type=text] { flex: 1 1 140px; min-width: 0; }
  .admin-toolbar .btn, .admin-statusbar .btn { padding: 8px 12px; font-size: 13px; }
  .stat-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .chart-row { grid-template-columns: 1fr; gap: 12px; }
  .cat-item { padding-left: 11px !important; padding-right: 6px !important; }
}


/* ===== R48：全端焦点框、弹窗与刷新提示（只追加，不改原有规则） ===== */
button, a, input, select, textarea, [role="button"] { -webkit-tap-highlight-color: transparent; }
* { -webkit-tap-highlight-color: transparent; }
*:focus { outline: none !important; }
button:focus, a:focus, [role="button"]:focus { outline: none !important; }
#mainView { animation: r49PageIn .25s ease-out; }
@keyframes r49PageIn { from { opacity: .6; transform: translateY(5px) } to { opacity: 1; transform: none } }
input:focus, select:focus, textarea:focus { outline: none; }
.modal-mask { animation: r48MaskIn .18s ease-out; }
.modal { animation: r48ModalIn .24s cubic-bezier(.18,.85,.25,1); }
@keyframes r48MaskIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes r48ModalIn { from { opacity: .55; transform: translateY(10px) scale(.98) } to { opacity: 1; transform: none } }
.r48-sync-bar { position: fixed; top: 12px; left: 50%; transform: translateX(-50%) translateY(-8px); z-index: 500; display: flex; align-items: center; gap: 8px; width: min(560px, calc(100% - 32px)); height: 40px; box-sizing: border-box; padding: 4px 6px 4px 12px; border-radius: 10px; border: 1px solid #f0d6a8; background: #fffaf0; box-shadow: 0 8px 22px rgba(110,70,30,.14); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.r48-sync-bar.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.r48-sync-bar span { flex: 1 1 auto; min-width: 0; color: #8a5c25; font-size: 12px; line-height: 1.3; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r48-sync-bar button { flex: 0 0 auto; width: auto; height: 28px; padding: 0 10px; border-radius: 7px; border: 1px solid #ecd19f; background: #fff; color: #8a5c25; font-size: 11.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.r48-sync-bar button.primary { background: #d98b32; border-color: #d98b32; color: #fff; }
.r48-sync-bar button.x { width: 24px; padding: 0; border: 0; background: transparent; color: #a88655; font-size: 15px; }
.admin-toolbar .search-all { flex: 1 1 260px; min-width: 210px; }
.tab-enter { animation: r49TabIn .22s ease-out; }
@keyframes r49TabIn { from { opacity: .55; transform: translateY(6px) } to { opacity: 1; transform: none } }
@media (max-width: 640px) { .r48-sync-bar { top: 8px; height: 38px; padding: 4px 5px 4px 10px; } .r48-sync-bar span { font-size: 11px; } }
