/* ============ 洗衣洗鞋平台 · 骑手工作台 样式（v1.2.1 现代简约圆角） ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; background: #f4f6fb; color: #16233d; font-size: 14px; }

/* 登录页 */
.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0f172a 0%, #065f46 100%); }
.login-card { width: 400px; background: #fff; border-radius: 20px; padding: 44px 40px 36px; box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35); }
.login-logo { width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 20px; background: linear-gradient(135deg, #059669, #34d399); display: flex; align-items: center; justify-content: center; font-size: 34px; box-shadow: 0 12px 28px rgba(5, 150, 105, 0.35); }
.login-title { text-align: center; font-size: 20px; font-weight: 700; }
.login-sub { text-align: center; color: #7a859c; margin-top: 6px; margin-bottom: 28px; }
.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-size: 13px; color: #7a859c; margin-bottom: 8px; }
.login-field input {
  width: 100%; padding: 11px 14px; border: 1.5px solid #e6ebf5; border-radius: 12px;
  font-size: 15px; outline: none; background: #fafbfe; transition: all .2s; font-family: inherit;
}
.login-field input:focus { border-color: #059669; background: #fff; box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12); }
.login-btn {
  width: 100%; padding: 13px; border: none; border-radius: 999px;
  background: linear-gradient(135deg, #059669, #34d399); color: #fff; font-size: 16px; font-weight: 600;
  cursor: pointer; margin-top: 10px; box-shadow: 0 8px 20px rgba(5, 150, 105, 0.3); transition: all .2s;
}
.login-btn:hover { opacity: .92; transform: translateY(-1px); }
.login-tip { margin-top: 18px; font-size: 12px; color: #9aa3b5; text-align: center; line-height: 1.8; }

/* 布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 224px; background: linear-gradient(180deg, #0f172a 0%, #134e4a 100%); color: #fff; display: flex; flex-direction: column; padding: 0; }
.sidebar .brand { padding: 24px 20px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .brand h1 { font-size: 18px; }
.sidebar .brand p { font-size: 12px; color: rgba(255,255,255,.5); margin-top: 4px; }
.sidebar nav { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; color: #b6c9c2; text-decoration: none; font-size: 15px;
  border-radius: 12px; transition: all .2s;
}
.sidebar nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar nav a.active { background: linear-gradient(135deg, #059669, #34d399); color: #fff; font-weight: 600; box-shadow: 0 8px 20px rgba(5, 150, 105, 0.35); }
.nav-ico {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  background: rgba(255,255,255,.08);
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
}
.sidebar nav a.active .nav-ico { background: rgba(255,255,255,.2); }
.sidebar .logout { display: flex; align-items: center; gap: 12px; padding: 16px 26px; border-top: 1px solid rgba(255,255,255,.08); cursor: pointer; font-size: 14px; color: #b6c9c2; }
.sidebar .logout:hover { color: #fca5a5; }
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; flex-shrink: 0; }
.topbar h2 { font-size: 20px; font-weight: 800; }
.who { color: #7a859c; font-size: 13px; background: #fff; padding: 8px 18px; border-radius: 999px; box-shadow: 0 4px 16px rgba(31, 58, 120, 0.06); }
.content { flex: 1; overflow-y: auto; }

/* 统计卡 */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.stat-card {
  background: #fff; border-radius: 16px; padding: 20px 22px;
  box-shadow: 0 8px 28px rgba(31, 58, 120, 0.08); border: 1px solid rgba(230, 235, 245, 0.6);
  transition: transform .2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card .label { font-size: 13px; color: #7a859c; }
.stat-card .value { font-size: 30px; font-weight: 800; margin-top: 6px; }
.stat-card .extra { font-size: 12px; color: #9aa3b5; margin-top: 4px; }
.stat-card.green .value { color: #059669; }
.stat-card.orange .value { color: #ea580c; }
.stat-card.blue .value { color: #2563eb; }

/* 订单卡片 */
.order-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.order-card {
  background: #fff; border-radius: 16px; padding: 20px;
  box-shadow: 0 8px 28px rgba(31, 58, 120, 0.08); border: 1px solid rgba(230, 235, 245, 0.6);
}
.order-card .oc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.order-card .oc-id { font-weight: 700; font-size: 15px; }
.order-card .oc-store { color: #4a5878; font-size: 14px; margin-bottom: 8px; }
.order-card .oc-items { background: #f7f9fd; border-radius: 12px; padding: 12px 14px; font-size: 13px; color: #4a5878; margin-bottom: 10px; }
.order-card .oc-row { display: flex; justify-content: space-between; font-size: 13px; color: #7a859c; margin-bottom: 6px; }
.order-card .oc-fee { color: #ea580c; font-weight: 700; }
.order-card .oc-addr { background: #eff6ff; border-radius: 12px; padding: 12px 14px; font-size: 13px; color: #1d4ed8; margin: 10px 0; line-height: 1.8; }
.order-card .oc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.order-card .oc-actions .btn { flex: 1 1 auto; min-width: 128px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.order-card .oc-actions .btn .ico { width: 15px; height: 15px; }
.order-card .oc-time { font-size: 12px; color: #9aa3b5; margin-top: 10px; }
.empty { text-align: center; color: #9aa3b5; padding: 60px 0; font-size: 14px; }

/* 按钮与徽章 */
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.pending { background: #fff3e8; color: #ea580c; }
.badge.accepted { background: #e8f1ff; color: #2563eb; }
.badge.picked { background: #f0edff; color: #7c3aed; }
.badge.washing { background: #e0f7fb; color: #0891b2; }
.badge.ready { background: #fdf3d7; color: #d97706; }
.badge.delivering { background: #eceffe; color: #4f46e5; }
.badge.delivered { background: #fff7ed; color: #c2410c; }
.badge.done { background: #e2f8ea; color: #059669; }
.badge.cancelled { background: #f1f3f8; color: #9aa3b5; }
.btn {
  padding: 9px 20px; border: none; border-radius: 999px; font-size: 14px; cursor: pointer;
  background: linear-gradient(135deg, #059669, #34d399); color: #fff; font-weight: 600;
  transition: all .2s; box-shadow: 0 6px 16px rgba(5, 150, 105, 0.25); font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:hover { opacity: .92; transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-ghost { background: #fff; color: #059669; border: 1.5px solid #059669; box-shadow: none; padding-top: 8px; }
.btn-danger { background: linear-gradient(135deg, #dc2626, #f87171); box-shadow: 0 6px 16px rgba(220, 38, 38, 0.22); }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); display: flex; align-items: center; justify-content: center; z-index: 100; backdrop-filter: blur(4px); }
.modal { background: #fff; border-radius: 20px; width: 560px; max-width: 92vw; max-height: 86vh; overflow: auto; box-shadow: 0 30px 80px rgba(15, 23, 42, 0.3); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid #e6ebf5; }
.modal-close { background: none; border: none; font-size: 18px; cursor: pointer; color: #9aa3b5; width: 32px; height: 32px; border-radius: 50%; }
.modal-close:hover { background: #f1f4fa; color: #16233d; }
.modal-body { padding: 22px 24px; }
.modal-foot { padding: 16px 24px; border-top: 1px solid #e6ebf5; display: flex; justify-content: flex-end; gap: 10px; }
.item { margin-bottom: 8px; font-size: 14px; }
.item span { color: #7a859c; }
.timeline { padding-left: 4px; }
.tl-item { position: relative; padding: 0 0 14px 18px; border-left: 2px solid #e8edf7; }
.tl-item:last-child { border-left-color: #059669; }
.tl-item .t { font-size: 14px; }
.tl-item .d { font-size: 12px; color: #9aa3b5; margin-top: 2px; }
.tl-item::before { content: ''; position: absolute; left: -5px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: #d3dbe8; }
.tl-item:last-child::before { background: #059669; box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.15); }

/* toast */
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: #16233d; color: #fff; padding: 12px 24px; border-radius: 999px; font-size: 14px; opacity: 0; transition: opacity .25s; z-index: 200; pointer-events: none; box-shadow: 0 12px 32px rgba(15, 23, 42, 0.3); }
.toast.show { opacity: 1; }
.loading { text-align: center; color: #9aa3b5; padding: 60px 0; }

/* ---------- 图标底块与刷新 ---------- */
.stat-card { position: relative; }
.sc-ico {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 10px;
}
.sc-ico .ico { width: 20px; height: 20px; }
.sc-ico.green { background: #e2f8ea; }
.sc-ico.orange { background: #fff3e8; }
.sc-ico.blue { background: #e8f1ff; }
.row-ico { display: inline-block; margin-right: 4px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sec-head h3 { font-size: 16px; }
.btn-refresh {
  background: #fff; color: #059669; border: 1.5px solid #059669;
  box-shadow: none; padding: 6px 16px; font-size: 13px;
}
.btn-refresh:hover { background: #e2f8ea; }
.btn-refresh:disabled { opacity: .6; cursor: wait; }

/* 移动端悬浮刷新（默认隐藏，窄屏大厅显示） */
.m-hall-refresh {
  display: none;
  position: fixed; right: 18px; bottom: 92px; z-index: 150;
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #059669, #34d399); color: #fff;
  align-items: center; justify-content: center; font-size: 22px;
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.4); cursor: pointer;
  transition: transform .2s;
}
.m-hall-refresh.spin { animation: mspin .6s; }
@keyframes mspin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* ---------- 移动端适配（≤ 768px） ---------- */
.m-header { display: none; }
.m-tabbar { display: none; }
@media (max-width: 768px) {
  body { background: #f4f6fb; }
  .login-body { padding: 24px 16px; }
  .login-card { width: 100%; max-width: 400px; padding: 34px 28px 28px; }
  .sidebar { display: none; }
  .layout { display: block; padding-bottom: 76px; }
  .main { display: block; overflow: visible; padding: 0; }
  .topbar { display: none; }
  .content { padding: 16px 14px 20px; overflow: visible; }
  .m-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; background: linear-gradient(135deg, #0f172a, #134e4a);
    color: #fff; position: sticky; top: 0; z-index: 120;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.2);
  }
  .m-brand { font-size: 16px; font-weight: 700; }
  .m-who { font-size: 13px; color: #a7f3d0; background: rgba(255,255,255,.1); padding: 4px 12px; border-radius: 999px; }
  .m-tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
    background: #fff; border-top: 1px solid #e6ebf5;
    box-shadow: 0 -6px 24px rgba(31, 58, 120, 0.08);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .m-tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 10px 0 8px; color: #7a859c; text-decoration: none; font-size: 11px;
  }
  .m-tabbar a.active { color: #059669; font-weight: 700; }
  .m-tab-ico { font-size: 20px; }
  .m-hall-refresh { display: none; }
  .m-hall-refresh.on { display: flex; }
  .cards { grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
  .stat-card { padding: 14px 12px; border-radius: 14px; }
  .stat-card .value { font-size: 24px; }
  .stat-card .extra { font-size: 11px; }
  .sc-ico { width: 32px; height: 32px; font-size: 16px; margin-bottom: 8px; border-radius: 10px; }
  .order-grid { grid-template-columns: 1fr; gap: 14px; }
  .order-card { padding: 16px; border-radius: 18px; }
  .sec-head h3 { font-size: 15px; }
  .oc-actions .btn { flex: 1 1 44%; padding: 12px 6px; font-size: 15px; min-width: 0; }
  .oc-actions .loc-tip { flex-basis: 100%; }
  .oc-addr { margin: 8px 0; }
  .m-tabbar a[data-view] .m-tab-ico { transition: transform .15s; }
  .m-tabbar a.active .m-tab-ico { transform: scale(1.15); }
}

/* ============ 照片凭证（配送前 / 送达）+ 大图查看 ============ */
.ph-section { margin: 10px 0; }
.ph-item { margin-bottom: 10px; }
.ph-label { font-size: 12px; color: #7a859c; margin-bottom: 6px; font-weight: 600; }
.ph-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.ph-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; border: 2px solid #e5e9f2; cursor: zoom-in; transition: transform .15s, border-color .15s; }
.ph-thumb:hover { transform: scale(1.08); border-color: #2563eb; }
.ph-preview { margin-bottom: 12px; }
.ph-preview img { width: 100%; border-radius: 14px; }

/* 大图查看弹层 */
.lightbox { position: fixed; inset: 0; z-index: 9999; background: rgba(8, 12, 24, 0.92); display: none; flex-direction: column; }
.lightbox.on { display: flex; }
.lb-stage { flex: 1; overflow: hidden; display: flex; align-items: center; justify-content: center; touch-action: none; }
.lb-img { max-width: 92%; max-height: 88%; border-radius: 8px; cursor: grab; user-select: none; -webkit-user-drag: none; transform-origin: 0 0; transition: transform .1s; }
.lb-img:active { cursor: grabbing; }
.lb-bar { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 16px; color: #fff; flex-wrap: wrap; }
.lb-cap { color: #cbd5e1; font-size: 13px; margin-right: 8px; }
.lb-pct { color: #7dd3fc; font-size: 13px; min-width: 42px; text-align: center; }
.lb-btn { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.25); border-radius: 10px; padding: 8px 14px; cursor: pointer; font-size: 14px; }
.lb-btn:hover { background: rgba(255,255,255,0.22); }
.lb-close { background: rgba(220,38,38,0.55); border-color: rgba(255,255,255,0.2); }

/* ============ SVG 图标（替代 emoji） ============ */
.ico { width: 17px; height: 17px; vertical-align: -3.5px; stroke-width: 2; }
.ico-lg { width: 21px; height: 21px; vertical-align: -4.5px; }
.ico-xl { width: 24px; height: 24px; }
.nav-ico .ico, .m-tab-ico .ico { display: inline-block; }
.row-ico { font-size: 14px; }

/* 客户定位状态提示 */
.loc-tip { display: flex; align-items: center; gap: 5px; font-size: 12px; margin: 8px 0; padding: 8px 10px; border-radius: 10px; }
.loc-tip.ok { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.loc-tip.warn { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.loc-tip .ico { width: 14px; height: 14px; }

/* 批量操作悬浮条 */
.batch-dock { position: sticky; bottom: 12px; margin-top: 14px; background: #fff; border-radius: 16px; box-shadow: 0 6px 24px rgba(15,23,42,.14); padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; z-index: 30; }
.batch-dock .bd-count { font-size: 13px; color: #4a5878; font-weight: 600; }
.batch-dock .btn-primary { background: #16a34a; color: #fff; border: none; }
.batch-dock .btn-primary:disabled { background: #cbd5e1; cursor: not-allowed; }

/* 一键导航按钮（骑手端订单卡片：客户地址 / 门店） */
.oc-nav{display:inline-flex;align-items:center;gap:4px;margin-left:8px;padding:3px 10px;
  border:1px solid #bfdbfe;border-radius:999px;background:#eff6ff;color:#1d4ed8;font-size:12px;
  line-height:1.4;cursor:pointer;vertical-align:middle;-webkit-tap-highlight-color:transparent}
.oc-nav:active{background:#dbeafe}
.oc-nav.is-busy{opacity:.65;cursor:default}
.oc-nav svg{width:13px;height:13px}
.oc-addr .oc-nav,.oc-store .oc-nav{white-space:nowrap}

/* ===== 客户备注 / 可点击拨号（骑手端） ===== */
.oc-tel { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 2px 10px 2px 8px; margin: -2px 0 -2px -4px; border-radius: 16px; background: #eef4ff; color: #1d4ed8; text-decoration: none; font-weight: 600; }
.oc-tel:active { background: #dbeafe; }
.oc-tel .ico { width: 14px; height: 14px; }
.oc-tel em { font-style: normal; font-size: 11px; padding: 1px 5px; border-radius: 9px; background: #1d4ed8; color: #fff; font-weight: 600; }
.oc-copy { border: 1px solid #cbd5e1; background: #fff; color: #475569; font-size: 12px; padding: 3px 9px; border-radius: 12px; margin-left: 2px; }
.oc-copy:active { background: #f1f5f9; }
.oc-phone-blocked { color: #64748b; letter-spacing: .5px; }
.oc-note { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: 13px; line-height: 1.5; display: flex; gap: 6px; align-items: flex-start; }
.oc-note .ico { flex: none; width: 15px; height: 15px; margin-top: 1px; }
.oc-note b { flex: none; font-weight: 700; }
.oc-note-txt { flex: 1; min-width: 0; white-space: pre-wrap; word-break: break-word; }

/* ===== 密码可见性切换（线性 SVG 小眼睛，pwd-eye.js 配套） ===== */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap > input { width: 100%; box-sizing: border-box; padding-right: 42px; }
.pw-toggle { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: 34px; height: 34px; min-width: 32px; min-height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0; margin: 0; border: 0; border-radius: 8px; background: transparent; color: #94a3b8; cursor: pointer; line-height: 0; -webkit-appearance: none; appearance: none; }
.pw-toggle:hover { color: #059669; background: rgba(148, 163, 184, 0.18); }
.pw-toggle:active { background: rgba(148, 163, 184, 0.28); }
.pw-toggle:focus-visible { outline: 2px solid #34d399; outline-offset: 1px; }
.pw-toggle svg { width: 18px; height: 18px; display: block; pointer-events: none; }
@media (max-width: 640px) { .pw-toggle { width: 36px; height: 36px; } }

/* ===== 登录失败提示条 / 输入框错误态（骑手端登录页） ===== */
.login-err { display: none; margin: 4px 0 14px; padding: 10px 12px; border: 1px solid #f7b6b6; border-radius: 12px; background: #fef3f2; color: #b42318; font-size: 13px; line-height: 1.5; text-align: left; }
.login-err.show { display: block; }
.login-field input.is-error { border-color: #f04438; background: #fff8f8; }
.login-field input.is-error:focus { border-color: #f04438; box-shadow: 0 0 0 4px rgba(240, 68, 56, 0.12); }
.login-btn[disabled] { opacity: .72; cursor: not-allowed; }
