/* ============================================================
   九鼎云仓管理后台 · 视觉规范（2026-11-29 统一）
   ------------------------------------------------------------
   主色：绿 #1aad19（品牌色，按钮/表头/选中态/链接统一用它）
   辅色：深绿 #178f16（hover）
   危险：红 #fa5151（仅用于删除、解绑等破坏性操作）
   中性：文字 #222 / 次要 #666 / 弱化 #999 / 边框 #eef0f2

   【新增页面必须遵守】
   1. 主按钮：class="btn-pass"（绿底白字）
   2. 次按钮：白底 + 绿色描边 + 绿字
   3. 危险操作：class="btn-reject"（红）
   4. 表格：class="tbl"（表头自动浅绿底）
   5. 页面标题：<div class="page-head"><h2>标题</h2>...</div>
   6. 不要再用蓝色（旧的 #2563eb / #1d4ed8 已废弃）
   ============================================================ */
:root {
  --brand: #1aad19;
  --brand-dark: #178f16;
  --brand-light: #f6ffed;
  --danger: #fa5151;
  --text: #222;
  --text-2: #666;
  --text-3: #999;
  --border: #eef0f2;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f4f5f7; color: #333; font-size: 14px; line-height: 1.6;
}
#app { min-height: 100vh; }

/* ===== 登录 ===== */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1aad19, #0e8e13);
}
.login-card {
  background: #fff; border-radius: 12px; padding: 36px 32px; width: 340px;
  max-width: 86vw; box-shadow: 0 10px 40px rgba(0,0,0,.15);
}
.login-card h1 { font-size: 22px; text-align: center; color: #1aad19; margin-bottom: 24px; }
.login-card input {
  width: 100%; height: 40px; border: 1px solid #dcdfe6; border-radius: 6px;
  padding: 0 12px; font-size: 14px; margin-bottom: 14px;
}
.login-card button {
  width: 100%; height: 42px; background: #1aad19; color: #fff;
  border: none; border-radius: 6px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.login-card button:hover { background: var(--brand-dark); }
.login-card .hint { margin-top: 14px; font-size: 12px; color: #999; text-align: center; }

/* ===== 框架 ===== */
.shell { display: flex; min-height: 100vh; }

.side {
  width: 196px; background: #1f2d3d; color: #cfd8e3; flex-shrink: 0;
  display: flex; flex-direction: column;
}
.side .logo {
  font-size: 17px; font-weight: 700; color: #fff;
  padding: 20px 18px; border-bottom: 1px solid #2c3e50; letter-spacing: .5px;
}
.side .mi {
  color: #cfd8e3; text-decoration: none; padding: 11px 18px;
  font-size: 14px; border-left: 3px solid transparent;
}
.side .mi:hover { background: #2c3e50; color: #fff; }
.side .mi.disabled { color: #6b7a8d; cursor: not-allowed; }
.side .mi.disabled:hover { background: transparent; }
.side .user {
  margin-top: auto; padding: 14px 18px; font-size: 12px;
  border-top: 1px solid #2c3e50; color: #9fb0c3;
}
.side .user a { color: #ffd75e; margin-left: 8px; text-decoration: none; }

.main { flex: 1; padding: 22px 26px; overflow: auto; min-width: 0; }
.main h2 { font-size: 19px; margin-bottom: 18px; font-weight: 600; }

/* ===== 概览卡片 ===== */
.cards { display: flex; flex-wrap: wrap; gap: 16px; }
.card {
  background: #fff; border-radius: 8px; padding: 18px 24px; min-width: 160px;
  box-shadow: 0 1px 6px rgba(0,0,0,.05);
}
.card .num { font-size: 26px; font-weight: 700; color: #1aad19; }
.card .lbl { font-size: 12.5px; color: #999; margin-top: 4px; }

/* ===== 筛选栏 ===== */
.bar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.bar select, .bar input {
  height: 34px; border: 1px solid #dcdfe6; border-radius: 6px;
  padding: 0 10px; font-size: 13px; background: #fff; min-width: 140px;
}
.bar input { min-width: 200px; }
.bar button {
  height: 34px; padding: 0 18px; background: var(--brand); color: #fff;
  border: none; border-radius: 6px; font-size: 13px; cursor: pointer;
}
.bar button:hover { background: var(--brand-dark); }

/* ===== 表格 ===== */
table {
  width: 100%; background: #fff; border-collapse: collapse;
  border-radius: 8px; overflow: hidden; font-size: 13px;
}
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f0f2f5; }
th { background: #fafbfc; color: #666; font-weight: 500; font-size: 12.5px; }
tbody tr:hover { background: #fafbfc; }
td button {
  margin-right: 8px; padding: 5px 12px; border: none; border-radius: 4px;
  font-size: 12.5px; cursor: pointer;
}
.btn-pass { background: var(--brand); color: #fff; }
.btn-reject { background: #fa5151; color: #fff; }

/* ===== 订单管理 ===== */
.tabs { display: flex; gap: 8px; margin: 14px 0; }
.tab {
  padding: 6px 16px; border-radius: 6px; font-size: 13px;
  background: #f2f4f7; color: #555; cursor: pointer;
}
.tab.on { background: var(--brand); color: #fff; }

.tbl th, .tbl td { padding: 9px 11px; font-size: 12.5px; }
/* 2026-11-29：表头统一深绿底 + 白字（与「打印面单」按钮同色） */
.tbl th { background: var(--brand); color: #fff; font-weight: 600; border-bottom: 1px solid #178f16; }
.tbl .ops a { color: var(--brand); margin-right: 10px; text-decoration: none; font-size: 12.5px; }
.tbl .ops a:hover { text-decoration: underline; }

.tag {
  display: inline-block; padding: 1px 7px; border-radius: 4px;
  background: var(--brand-light); color: var(--brand); font-size: 11.5px;
}
.muted { color: #9aa1aa; }

/* ===== 弹窗 ===== */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; z-index: 999;
}
.modal-card {
  width: 480px; max-height: 80vh; overflow-y: auto;
  background: #fff; border-radius: 10px; padding: 18px 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,.2);
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; font-size: 15px;
}
.modal-close { cursor: pointer; color: #999; font-size: 17px; }
.kv { display: flex; padding: 6px 0; font-size: 12.5px; border-bottom: 1px dashed #f0f2f5; }
.kv span { width: 78px; color: #8b929a; flex-shrink: 0; }
.kv b { font-weight: 500; color: #222; word-break: break-all; }

.track-title { margin: 14px 0 6px; font-size: 13px; font-weight: 600; }
.track-item {
  display: flex; gap: 10px; font-size: 12px; color: #555;
  padding: 6px 0; border-bottom: 1px solid #f7f8fa;
}
.track-item span { color: #9aa1aa; width: 84px; flex-shrink: 0; }

/* ===== 接口报错提示 ===== */
.err-box {
  background: #fff7f6; border: 1px solid #ffd8d3; color: #b42318;
  padding: 14px 16px; border-radius: 8px; font-size: 13px; line-height: 1.8;
}

/* ===== 超宽屏（2K/4K）自适应 ===== */
@media (min-width: 1800px) {
  body { font-size: 15px; }
  .side { width: 210px; }
  .side .mi { font-size: 15px; padding: 12px 20px; }
  .main { padding: 26px 34px; }
}

/* ===== 入驻审批 ===== */
.tbl .addr { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 状态色：待审批橙 / 已通过绿 / 已拒绝红 */
.st { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 12px; }
.st-pending { background: #fff4e5; color: #d97706; }
.st-approved { background: #e8f8ee; color: #0f9d58; }
.st-rejected { background: #fdecea; color: #d93025; }

.modal-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid #f0f2f5;
}
.modal-actions button {
  padding: 9px 22px; border-radius: 6px; border: none;
  font-size: 13.5px; cursor: pointer; font-weight: 500;
}
.modal-actions .btn-pass { background: var(--brand); color: #fff; }
.modal-actions .btn-reject { background: #fff; color: #d93025; border: 1px solid #f5c2be; }
.modal-actions .btn-pass:hover { background: #178f16; }
.modal-actions .btn-reject:hover { background: #fff7f6; }

/* 审批意见输入 */
.modal-field { margin-top: 16px; }
.mf-label { font-size: 13px; color: #555; margin-bottom: 7px; }
.mf-req { color: #d93025; font-size: 12px; }
.mf-ta {
  width: 100%; min-height: 76px; resize: vertical;
  border: 1px solid #dcdfe6; border-radius: 6px;
  padding: 9px 11px; font-size: 13px; font-family: inherit; line-height: 1.6;
}
.mf-ta:focus { outline: none; border-color: var(--brand); }

/* 驳回原因：红色醒目 */
.reject-reason { color: #d93025 !important; font-weight: 500; }

/* 重置按钮（次要样式） */
.bar button.btn-ghost {
  background: #fff; color: #555; border: 1px solid #dcdfe6;
}
.bar button.btn-ghost:hover { background: #f7f8fa; }

/* ===== 轻提示 toast ===== */
.app-toast {
  position: fixed; left: 50%; top: 26px; transform: translateX(-50%);
  background: rgba(32, 36, 42, .92); color: #fff;
  padding: 10px 20px; border-radius: 8px; font-size: 13.5px;
  z-index: 9999; display: none; max-width: 70vw; line-height: 1.6;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
}
.app-toast.success { background: rgba(15, 157, 88, .95); }
.app-toast.error { background: rgba(217, 48, 37, .95); }

/* 页面标题 + 右侧按钮 */
.page-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.page-head h2 { margin-bottom: 0; }
.btn-primary {
  height: 34px; padding: 0 18px; background: var(--brand); color: #fff;
  border: none; border-radius: 6px; font-size: 13px; cursor: pointer;
}
.btn-primary:hover { background: var(--brand-dark); }

/* 弹窗输入框 */
.mf-in {
  width: 100%; height: 36px; border: 1px solid #dcdfe6; border-radius: 6px;
  padding: 0 11px; font-size: 13px;
}
.mf-in:focus { outline: none; border-color: var(--brand); }

/* ===== 搜索栏右侧按钮 ===== */
.bar .push-right { margin-left: auto; }

/* ===== 分页条 ===== */
.pager {
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px; padding: 10px 4px; font-size: 13px; color: #555;
}
.pg-total { color: #8b929a; }
.pg-size {
  height: 30px; border: 1px solid #dcdfe6; border-radius: 6px;
  padding: 0 8px; font-size: 13px; background: #fff;
}
.pg-btn {
  height: 30px; padding: 0 14px; border: 1px solid #dcdfe6; border-radius: 6px;
  background: #fff; color: #333; font-size: 13px; cursor: pointer;
}
.pg-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pg-btn:disabled { color: #c0c4cc; cursor: not-allowed; background: #fafbfc; }
.pg-cur { color: #666; min-width: 54px; text-align: center; }

/* ===== 二级菜单（2026-11-25 修：竖排显示）===== */
.side .mi.grp { position: relative; }
.side .caret {
  float: right; font-size: 13px; font-weight: 700;
  color: #93a4b8; line-height: 1;
  transition: transform .18s; display: inline-block;
  transform-origin: 50% 50%;
}
.side .caret.open { transform: rotate(180deg); color: #cfd8e3; }

.side .sub { background: #1a2632; }
/* 关键：子菜单项必须 block，否则会横排挤在一起 */
.side .sub a.sub-mi {
  display: block; width: 100%;
  padding: 8px 18px 8px 32px !important;
  font-size: 12.5px !important; line-height: 1.5;
  box-sizing: border-box;
}
.side .sub a.sub-mi:hover { background: #24313f; color: #fff; }
.side .sub a.sub-mi.active {
  color: #fff; background: #2c3e50;
  border-left-color: #1aad19; font-weight: 600;
}

/* ===== 状态按钮组（订单页第一行）===== */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.chip {
  padding: 6px 15px; border-radius: 16px; font-size: 13px;
  background: #fff; border: 1px solid #e4e7ec; color: #555;
  cursor: pointer; user-select: none;
}
.chip:hover { border-color: #b9c4d4; color: #333; }
.chip.on {
  background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 500;
}

/* 状态按钮上的数量 */
.chip-n {
  display: inline-block; margin-left: 6px;
  font-size: 11.5px; font-weight: 600; opacity: .75;
}
.chip.on .chip-n { opacity: .95; }

/* ===== 订单状态配色（2026-11-25 按老板指定）===== */
.tag { border: none; }
.tag-wait_dispatch {
  background: #fee2e2; color: #991b1b; font-weight: 600;
  box-shadow: inset 0 0 0 1px #fca5a5;   /* 加深红 + 描边，和橙色区分开 */
}
.tag-wait_pickup   { background: #fce7f3; color: #db2777; }   /* 待取货 粉 */
.tag-wait_inbound  { background: #fff1e8; color: #ea580c; }   /* 待入仓 橙 */
.tag-wait_collect  { background: var(--brand-light); color: var(--brand); }   /* 待揽件 蓝 */
.tag-shipping      { background: #F3EEFF; color: #722ED1; }   /* 运送中 紫 */
.tag-signed        { background: #e8f8ee; color: #0f9d58; }   /* 已签收 绿 */
.tag-cancelled     { background: #f2f4f7; color: #8b929a; }   /* 已取消 灰 */

/* 商城订单状态 */
.tag-delivery_pending { background: #fce7f3; color: #db2777; }
.tag-delivery_done    { background: #e8f8ee; color: #0f9d58; }
.tag-pickup_pending   { background: #fff1e8; color: #ea580c; }
.tag-pickup_done      { background: #e8f8ee; color: #0f9d58; }

/* 状态按钮上的数量 */
.chip-n {
  display: inline-block; margin-left: 6px;
  font-size: 11.5px; font-weight: 600; opacity: .75;
}
.chip.on .chip-n { opacity: .95; }



/* ===== 状态栏 + 打印按钮同一行 ===== */
.chips-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin: 4px 0 14px;
}
.chips-row .chips { margin: 0; flex: 1; }

/* ===== 派单弹窗：取货员列表 ===== */
.pick-list { max-height: 320px; overflow-y: auto; }
.pick-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 12px; border-radius: 6px; cursor: pointer;
  border: 1px solid #f0f2f5; margin-bottom: 8px;
}
.pick-row:hover { background: #f7f9fc; border-color: #cfd8e6; }
.pick-name { font-size: 13.5px; color: #222; }
.pick-st { font-size: 11.5px; padding: 2px 8px; border-radius: 4px; background: #f2f4f7; color: #8b929a; }
.pick-st.on { background: #e8f8ee; color: #0f9d58; }

/* 列表里的勾选框 */
.tbl input[type="checkbox"] { width: 14px; height: 14px; cursor: pointer; vertical-align: middle; }
.tbl .ops input[type="checkbox"] { margin-right: 8px; }

/* 打印结果列表 */
.print-list { max-height: 300px; overflow-y: auto; }
.print-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 11px; border-bottom: 1px solid #f5f7fa; font-size: 13px;
}
.pr-order { color: #333; }
.pr-no { font-family: monospace; font-size: 12.5px; }
.pr-no.ok { color: #0f9d58; }
.pr-no.fail { color: #d93025; }

/* 全局弹窗内容区 */
.gm-body { font-size: 13px; }

/* 打印进度条 */
.pg-wrap { padding: 6px 0 4px; }
.pg-bar {
  height: 8px; background: #eef1f5; border-radius: 999px; overflow: hidden; margin-bottom: 10px;
}
.pg-bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--brand), #1aad19);
  border-radius: 999px; transition: width .25s ease;
}
.pg-text { font-size: 13px; color: #555; }

/* ===== 订单表格：勾选独立列 + 紧凑排版 ===== */
.tbl .ck-col { width: 34px; text-align: center; padding-left: 8px; padding-right: 4px; }
.tbl .no-col { font-family: ui-monospace, Menlo, monospace; font-size: 12px; white-space: nowrap; }
.tbl th, .tbl td { padding: 9px 8px; }
.tbl { font-size: 12.5px; }

/* 类型标签 */
.ptype {
  display: inline-block; padding: 1px 7px; border-radius: 4px;
  font-size: 11.5px; background: #f2f4f7; color: #5b6472; white-space: nowrap;
}

/* ===== 订单表格：固定列宽，防止列错位/挤压 ===== */
.tbl-ord { table-layout: fixed; }
.tbl-ord th, .tbl-ord td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl-ord .ck-col { width: 34px; }
.tbl-ord .no-col { width: 140px; }
.tbl-ord .m-col  { width: 130px; }   /* 商户 */
.tbl-ord .r-col  { width: 76px; }    /* 收件人 */
.tbl-ord .s-col  { width: 74px; }    /* 状态 */
.tbl-ord .f-col  { width: 66px; }    /* 运费 */
.tbl-ord .t-col  { width: 76px; }    /* 类型 */
.tbl-ord .p-col  { width: 66px; }    /* 取货员 */
.tbl-ord .i-col  { width: 84px; }    /* 入仓员 */
.tbl-ord .d-col  { width: 96px; }    /* 时间 */
.tbl-ord .o-col  { width: 110px; }   /* 操作 */

/* 类型列：两种来源用不同色（避开状态用的红粉橙蓝紫绿灰）*/
.ptype.pickup  { background: #ecfeff; color: #0891b2; }   /* 上门取货 青 */
.ptype.selfin  { background: #fefce8; color: #a16207; }   /* 自送入仓 黄褐 */

/* ===== 详情分节 ===== */
.sec { margin-bottom: 16px; }
.sec-title {
  font-size: 13px; font-weight: 700; color: #1aad19;
  padding: 6px 10px; background: #f0faf0; border-radius: 6px;
  margin-bottom: 8px; border-left: 3px solid #1aad19;
}

/* 入仓备注（网页端） */
.rm-item { padding: 8px 0; border-bottom: 1px dashed #f0f2f5; }
.rm-item:last-child { border-bottom: none; }
.rm-meta { font-size: 12px; color: #9aa1aa; margin-bottom: 4px; }
.rm-text { font-size: 13px; color: #333; line-height: 1.7; word-break: break-all; }
.rm-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.rm-img {
  width: 78px; height: 78px; object-fit: cover;
  border-radius: 6px; border: 1px solid #eef0f3; cursor: pointer;
}
.rm-img:hover { border-color: var(--brand); }

/* 侧边栏底部版本号 */
.menu-foot {
  margin-top: auto; padding: 10px 18px;
  font-size: 11px; color: #5d6b7a; letter-spacing: .3px;
}


/* 商城订单商品明细（2026-11-27） */
.gd-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0; border-bottom: 1px dashed #f0f2f5; font-size: 13px;
}
.gd-name { flex: 1; min-width: 0; color: #333; word-break: break-all; }
.gd-num { flex-shrink: 0; color: #888; font-size: 12.5px; }
.gd-sub { flex-shrink: 0; width: 62px; text-align: right; color: #333; }
.gd-total {
  display: flex; justify-content: flex-end; gap: 6px;
  padding-top: 10px; font-size: 13.5px; color: #333;
}

/* 左侧菜单选中高亮（2026-11-29） */
.side .mi.on {
  background: #16222e;
  color: #4ade80;
  border-left: 4px solid #4ade80;
  padding-left: 16px;
  font-weight: 600;
}
.side .mi.on:hover { background: #16222e; color: #4ade80; }

/* 二级菜单折叠（2026-11-29）：默认收起，点父项才展开 */
.side .sub.collapsed { display: none; }
.side .mi.grp .caret { margin-left: 6px; font-size: 11px; opacity: .75; }
