/* ============================================================
   货车调度系统 · 网页版通用样式（保管员端 / 司机端 / 统一入口）
   视觉与微信小程序一致：深蓝 #1a3a5c · 橙 #ff6b35 · 绿 #07c160
   移动优先；≥900px 切换 PC 居中布局
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
html { height: 100%; }
body { min-height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  background: #f2f4f7; color: #2b3a4a; line-height: 1.6; font-size: 14px;
}

/* ---------- PC 适配外壳 ---------- */
@media (min-width: 900px) {
  body {
    background:
      radial-gradient(1200px 600px at 15% 0%, rgba(26,111,196,.10), transparent 60%),
      radial-gradient(1000px 600px at 90% 100%, rgba(255,107,53,.08), transparent 60%),
      linear-gradient(160deg, #16324f 0%, #1d4a75 55%, #1a6fc4 130%);
    min-height: 100vh;
  }
  .app-shell {
    max-width: 520px; margin: 0 auto; min-height: 100vh;
    box-shadow: 0 0 60px rgba(0,0,0,.25); background: #f2f4f7;
  }
  .app-shell.wide { max-width: 860px; }
}
.app-shell { min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }

/* ---------- 顶部导航 ---------- */
.nav {
  background: linear-gradient(135deg, #1d4066, #16324f);
  color: #fff; padding: 10px 14px; display: flex; align-items: center; gap: 10px;
  position: sticky; top: 0; z-index: 50; flex: none;
}
.nav .back { border: 1px solid rgba(255,255,255,.55); border-radius: 20px; font-size: 12px; padding: 3px 12px; cursor: pointer; background: transparent; color: #fff; user-select: none; flex: none; }
.nav .back:active { background: rgba(255,255,255,.15); }
.nav .t { flex: 1; min-width: 0; text-align: center; font-weight: 600; font-size: 16px; letter-spacing: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav .act { font-size: 12px; border: 1px solid rgba(255,255,255,.4); border-radius: 16px; padding: 3px 12px; cursor: pointer; background: transparent; color: #fff; }
.nav .act.warn { border-color: rgba(255,180,180,.7); color: #ffd9d9; }
.brand-sub { font-size: 11px; opacity: .75; text-align: center; margin-top: -2px; }

/* ---------- 页面容器 ---------- */
.page { flex: 1; padding: 12px 12px 40px; }
.page.nopad { padding: 0; }
.loading { text-align: center; color: #9aa5b1; font-size: 13px; padding: 40px 0; }
.empty-box { text-align: center; padding: 46px 0 30px; }
.empty-box .ico { font-size: 44px; }
.empty-box .tx { color: #9aa5b1; font-size: 13px; margin-top: 8px; }

/* ---------- 卡片 ---------- */
.card { background: #fff; border-radius: 12px; padding: 12px 14px; margin-bottom: 11px; box-shadow: 0 2px 8px rgba(26,58,92,.07); }
.card .row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.card .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mini { font-size: 12px; color: #8a94a6; }
.h-title { font-size: 15px; font-weight: 700; color: #1a3a5c; }
.divider { height: 1px; background: #eef1f4; margin: 8px 0; }

/* ---------- 按钮 ---------- */
.btn { display: flex; align-items: center; justify-content: center; border: none; border-radius: 9px; height: 40px; font-size: 15px; font-weight: 600; cursor: pointer; color: #fff; width: 100%; font-family: inherit; transition: filter .15s; }
.btn:active { filter: brightness(.9); }
.btn[disabled] { background: #a8b6c4 !important; cursor: not-allowed; }
.btn-p { background: #1a3a5c; }
.btn-a { background: #ff6b35; }
.btn-g { background: #07c160; }
.btn-o { background: #fff; color: #5a6a7a; border: 1px solid #d8dee6; }
.btn-sm { display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 7px; font-size: 12px; padding: 5px 12px; color: #fff; cursor: pointer; font-family: inherit; }
.btn-sm:active { filter: brightness(.9); }
.btn-sm.c-call { background: #1a6fc4; }
.btn-sm.c-fin { background: #07c160; }
.btn-sm.c-pri { background: #f5a623; }
.btn-sm.c-cut { background: #5a6a7a; }
.btn-sm.c-rel { background: #fff; color: #e6a23c; border: 1px solid #e6a23c; }
.btn-row { display: flex; gap: 9px; margin-top: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 40%; min-width: 0; }

/* ---------- 标签 ---------- */
.tag { display: inline-block; font-size: 11px; padding: 1px 9px; border-radius: 5px; white-space: nowrap; }
.tag-blue { background: #e8f1fb; color: #1a6fc4; }
.tag-orange { background: #fff1e8; color: #ff6b35; }
.tag-green { background: #e6f9ef; color: #07c160; }
.tag-gray { background: #eef1f4; color: #8a94a6; }
.tag-solid-o { background: #f5a623; color: #fff; font-weight: 700; }

/* ---------- 表单 ---------- */
.field { display: flex; align-items: center; gap: 9px; border-bottom: 1px solid #e5e8ed; height: 46px; }
.field .ico { font-size: 17px; opacity: .7; }
.field input, .field select { flex: 1; min-width: 0; border: none; outline: none; font-size: 15px; background: transparent; font-family: inherit; color: #333; }
.field input::placeholder { color: #b8c0cc; }
.form-label { font-size: 13px; color: #5a6a7a; margin: 14px 0 6px; font-weight: 600; }
.hint-ok { color: #07c160; font-size: 12px; margin-top: 4px; }
.hint-err { color: #e64340; font-size: 12px; margin-top: 4px; }
.link-center { text-align: center; color: #1a6fc4; font-size: 13px; margin-top: 16px; cursor: pointer; }

/* ---------- 统计栏 ---------- */
.stat-bar { display: flex; background: #fff; border-radius: 12px; padding: 10px 4px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(26,58,92,.07); }
.stat-i { flex: 1; text-align: center; border-radius: 8px; padding: 4px 0; cursor: pointer; }
.stat-i .n { font-size: 20px; font-weight: 800; color: #1a3a5c; line-height: 1.2; }
.stat-i .l { font-size: 11px; color: #8a94a6; }
.stat-i.on { background: #fff7ee; }
.stat-i.on .n, .stat-i.on .l { color: #ff6b35; }

/* ---------- 队列卡片 ---------- */
.q-card { background: #fff; border-radius: 12px; padding: 11px 13px; margin-bottom: 10px; box-shadow: 0 2px 8px rgba(26,58,92,.07); border-left: 4px solid #e5e8ed; }
.q-card.un { border-left-color: #07c160; }
.q-card.wt { border-left-color: #ff6b35; }
.q-card.pri { border-left-color: #f5a623; background: #fffdf5; }
.q-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plate { font-size: 16px; font-weight: 800; color: #1a3a5c; letter-spacing: 1px; }
.q-info { font-size: 12px; color: #8a94a6; margin-top: 3px; }
.q-btns { display: flex; gap: 7px; margin-top: 9px; flex-wrap: wrap; }
.sec-t { font-size: 14px; font-weight: 700; color: #1a3a5c; margin: 12px 2px 8px; }

/* ---------- 卸货点选择（队列入口） ---------- */
.pt-card { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 13px 14px; margin-bottom: 10px; box-shadow: 0 2px 8px rgba(26,58,92,.07); cursor: pointer; }
.pt-card:active { background: #f6f9fc; }
.pt-card .ic { font-size: 20px; }
.pt-card .nm { font-weight: 600; color: #1a3a5c; font-size: 15px; }
.pt-card .sub { font-size: 12px; color: #8a94a6; }
.pt-card .ar { margin-left: auto; color: #c3ccd6; font-size: 18px; }

/* 卸货点九宫格（计划页底部概览） */
.pt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pt-cell { background: #fff; border-radius: 12px; padding: 12px 6px 10px; text-align: center; box-shadow: 0 2px 8px rgba(26,58,92,.07); cursor: pointer; }
.pt-cell:active { background: #f6f9fc; }
.pt-cell .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.pt-cell .dot.idle { background: #c3ccd6; }
.pt-cell .dot.act { background: #07c160; }
.pt-cell .dot.full { background: #ff6b35; }
.pt-cell .nm { font-size: 12px; font-weight: 600; color: #1a3a5c; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-cell .cap { font-size: 16px; font-weight: 700; color: #1a3a5c; margin-top: 2px; }
.pt-cell .cl { font-size: 10px; color: #8a94a6; }

/* 登录密码显隐 */
.field .eye { cursor: pointer; font-size: 15px; padding: 0 2px; user-select: none; }

/* ---------- 计划卡 ---------- */
.plan-date { font-size: 14px; font-weight: 700; color: #1a3a5c; }
.mat-line { display: flex; justify-content: space-between; font-size: 13px; padding: 2px 0; }
.mat-line .nm { color: #3a4a5a; } .mat-line .qty { color: #8a94a6; }
.route { background: #f6f8fa; border-radius: 8px; padding: 6px 10px; font-size: 12px; color: #5a6a7a; margin-top: 6px; }
.route b { color: #1a3a5c; font-weight: 600; }
.claimed { color: #ff6b35; font-size: 12px; margin-top: 6px; font-weight: 600; }
.pt-step { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 7px 10px; border-radius: 9px; margin-top: 6px; }
.pt-step.cur { background: #e8f1fb; border: 1px solid #bcd6f2; color: #1a3a5c; font-weight: 600; }
.pt-step.done { background: #e6f9ef; color: #5a6a7a; }
.pt-step.wait { background: #f6f8fa; color: #8a94a6; }
.pt-step .st { margin-left: auto; font-size: 11px; }
.pt-step .st.c2 { color: #1a6fc4; } .pt-step .st.g2 { color: #07c160; }

/* ---------- 车辆卡 ---------- */
.veh-row { display: flex; font-size: 13px; padding: 2px 0; }
.veh-row .k { color: #8a94a6; width: 76px; flex: none; }
.veh-row .v { color: #3a4a5a; flex: 1; word-break: break-all; }
.call-a { color: #1a6fc4; font-size: 14px; text-decoration: none; cursor: pointer; }

/* ---------- 弹窗 ---------- */
.mask { position: fixed; inset: 0; background: rgba(15,25,38,.5); z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 700px) { .mask { align-items: center; } }
.modal { background: #fff; width: 100%; max-width: 560px; border-radius: 16px 16px 0 0; padding: 18px 18px calc(20px + env(safe-area-inset-bottom)); max-height: 86vh; overflow-y: auto; }
@media (min-width: 700px) { .modal { border-radius: 16px; } }
.modal h3 { text-align: center; font-size: 16px; color: #1a3a5c; margin-bottom: 12px; }
.mat-edit { display: flex; gap: 7px; align-items: center; margin-bottom: 7px; flex-wrap: wrap; }
.mat-edit select, .mat-edit input { border: 1px solid #d8dee6; border-radius: 8px; padding: 7px 9px; font-size: 13px; outline: none; font-family: inherit; background: #fff; }
.mat-edit select.cat { flex: 1 1 100%; max-width: none; }
.mat-edit .n1 { flex: 1; min-width: 90px; }
.mat-edit .n2 { width: 64px; }
.mat-edit select.u { width: 76px; flex: none; }
.mat-edit .rm { color: #e64340; font-size: 15px; cursor: pointer; padding: 4px; margin-left: auto; }
.sp-item { display: flex; align-items: center; gap: 8px; background: #f6f8fa; border-radius: 9px; padding: 8px 10px; margin-bottom: 6px; font-size: 13px; }
.sp-item .no { color: #1a6fc4; font-weight: 800; }
.sp-item .rm { margin-left: auto; color: #8a94a6; cursor: pointer; }
.add-line { border: 1px dashed #b9c6d4; color: #1a6fc4; text-align: center; border-radius: 9px; padding: 9px; font-size: 13px; cursor: pointer; margin-top: 4px; }

/* ---------- 搜索 ---------- */
.search { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 10px; padding: 9px 13px; margin-bottom: 11px; box-shadow: 0 2px 8px rgba(26,58,92,.07); }
.search input { flex: 1; border: none; outline: none; font-size: 14px; background: transparent; font-family: inherit; }

/* ---------- 快捷筛选 chips ---------- */
.chips { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chip { font-size: 12px; padding: 4px 14px; border-radius: 14px; background: #eef1f4; color: #5a6a7a; cursor: pointer; border: none; font-family: inherit; }
.chip.on { background: #1a6fc4; color: #fff; }
.chip input { border: 1px solid #d8dee6; border-radius: 8px; padding: 4px 8px; font-size: 12px; font-family: inherit; }

/* ---------- toast ---------- */
#toast { position: fixed; left: 50%; top: 18%; transform: translateX(-50%); background: rgba(20,35,55,.88); color: #fff; font-size: 13px; padding: 9px 18px; border-radius: 10px; z-index: 999; display: none; max-width: 80vw; text-align: center; }
#confirm-mask { position: fixed; inset: 0; background: rgba(15,25,38,.5); z-index: 200; display: none; align-items: center; justify-content: center; }
#confirm-box { background: #fff; border-radius: 14px; width: 300px; max-width: 86vw; overflow: hidden; }
#confirm-box .ct { padding: 20px 18px 14px; text-align: center; }
#confirm-box .ct .t { font-weight: 700; color: #1a3a5c; margin-bottom: 6px; }
#confirm-box .ct .m { font-size: 13px; color: #5a6a7a; }
#confirm-box .btns { display: flex; border-top: 1px solid #eef1f4; }
#confirm-box .btns button { flex: 1; border: none; background: #fff; padding: 12px; font-size: 15px; cursor: pointer; font-family: inherit; }
#confirm-box .btns button.ok { color: #1a6fc4; font-weight: 700; border-left: 1px solid #eef1f4; }

/* ---------- 入口页 ---------- */
.gate { padding: 0 18px 40px; }
.gate-hero { text-align: center; color: #fff; padding: 40px 0 26px; }
.gate-hero .logo { font-size: 54px; }
.gate-hero .tt { font-size: 22px; font-weight: 800; margin-top: 10px; letter-spacing: 2px; }
.gate-hero .st { font-size: 13px; opacity: .8; margin-top: 4px; letter-spacing: 3px; }
.gate-cards { display: flex; flex-direction: column; gap: 13px; margin-top: 6px; }
.gate-card { background: #fff; border-radius: 14px; padding: 18px 20px; display: flex; align-items: center; gap: 14px; box-shadow: 0 4px 16px rgba(10,25,45,.18); cursor: pointer; text-decoration: none; color: inherit; transition: transform .15s; }
.gate-card:active { transform: scale(.98); }
.gate-card .ic { font-size: 30px; width: 54px; height: 54px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex: none; }
.gate-card .nm { font-size: 17px; font-weight: 700; color: #16324f; }
.gate-card .ds { font-size: 12px; color: #8a94a6; margin-top: 2px; }
.gate-card .ar { margin-left: auto; color: #c3ccd6; font-size: 22px; }
.ic-b { background: #e8f1fb; } .ic-o { background: #fff1e8; } .ic-g { background: #e6f9ef; }
.gate-foot { text-align: center; color: rgba(255,255,255,.55); font-size: 11px; margin-top: 30px; }
@media (min-width: 900px) {
  .gate { max-width: 900px; margin: 0 auto; }
  .gate-cards { flex-direction: row; }
  .gate-card { flex: 1; flex-direction: column; text-align: center; padding: 30px 20px; }
  .gate-card .ar { margin: 12px 0 0; }
}

/* ---------- 登录页 ---------- */
.login-hero { text-align: center; padding: 34px 0 22px; }
.login-hero .logo { font-size: 52px; }
.login-hero .tt { font-size: 21px; font-weight: 800; color: #1a3a5c; margin-top: 10px; }
.login-hero .st { font-size: 12px; color: #9aa5b1; margin-top: 4px; letter-spacing: 2px; }
.seg { display: flex; background: #eef1f4; border-radius: 11px; padding: 4px; margin-bottom: 18px; }
.seg button { flex: 1; border: none; background: transparent; border-radius: 9px; padding: 9px; font-size: 14px; color: #5a6a7a; cursor: pointer; font-family: inherit; font-weight: 600; }
.seg button.on { background: #fff; color: #1a3a5c; box-shadow: 0 2px 6px rgba(26,58,92,.12); }

/* ---------- 通知徽标 / 铃铛 ---------- */
.bell-wrap { position: relative; cursor: pointer; font-size: 20px; }
.bell-wrap .badge { position: absolute; top: -7px; right: -11px; background: #ff4d4f; color: #fff; font-size: 10px; border-radius: 10px; padding: 0 5px; font-weight: 700; }
.n-item { border-bottom: 1px solid #f0f3f6; padding: 9px 2px; font-size: 13px; }
.n-item:last-child { border-bottom: none; }
.n-item .t2 { color: #1a3a5c; font-weight: 600; }
.n-item .m2 { color: #8a94a6; font-size: 12px; }

/* ---------- 容量头部（队列页顶部深蓝区） ---------- */
.cap-head { background: linear-gradient(135deg, #1d4066, #16324f); color: #fff; padding: 16px 18px; display: flex; align-items: center; }
.cap-head .info .nm { font-size: 17px; font-weight: 700; }
.cap-head .info .sub { font-size: 12px; opacity: .75; }
.cap-ring { margin-left: auto; width: 56px; height: 56px; border: 5px solid #2f9dff; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(255,255,255,.08); flex: none; }
.cap-ring .n { font-size: 18px; font-weight: 800; line-height: 1; }
.cap-ring .t { font-size: 10px; opacity: .7; }

/* ---------- 搜索/下拉兼容 ---------- */
select.picker { border: 1px solid #d8dee6; border-radius: 8px; padding: 8px 10px; font-size: 13px; background: #fff; font-family: inherit; outline: none; max-width: 100%; }
