:root {
  --bg: #e4ebf1;
  --card: #ffffff;
  --ink: #15202b;
  --muted: #6a7785;
  --line: #d5dee6;
  --brand: #1a5678;
  --brand-2: #2a7aa3;
  --brand-soft: #e7f2f8;
  --accent: #d07a2a;
  --accent-soft: #fff3e6;
  --teal: #1f8a72;
  --teal-soft: #e6f6f1;
  --ok: #2a8a62;
  --warn: #b7791f;
  --danger: #b24343;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --shadow: 0 10px 28px rgba(21, 40, 56, 0.08);
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); }
.hidden { display: none !important; }
button, input, select, textarea { font: inherit; }
.btn {
  border: 0; border-radius: 12px; padding: 12px 16px;
  background: var(--brand-soft); color: var(--brand); width: 100%; font-weight: 500;
}
.btn.primary {
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  color: #fff; box-shadow: 0 8px 18px rgba(26, 86, 120, 0.28);
}
.btn.sm {
  width: auto; padding: 8px 12px; font-size: 13px;
  display: inline-flex; align-items: center; gap: 5px;
}
.btn.sm svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn.warn { background: var(--accent-soft); color: var(--accent); }
.btn.ok { background: var(--teal-soft); color: var(--teal); }
.btn.loc { background: var(--brand-soft); color: var(--brand-2); }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }

.page { min-height: 100vh; }
.login {
  padding: 52px 22px 30px;
  background:
    radial-gradient(520px 260px at 85% -10%, rgba(208,122,42,.28), transparent 60%),
    linear-gradient(165deg, #163e58 0%, #1a5678 36%, #e4ebf1 36.2%);
}
.hero { color: #fff; margin-bottom: 28px; }
.hero .mark {
  width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(145deg, rgba(255,255,255,.22), rgba(255,255,255,.08));
  border: 1px solid rgba(255,255,255,.18);
  font-size: 24px; font-weight: 700; margin-bottom: 14px;
}
.hero h1 { margin: 0; font-size: 30px; letter-spacing: .08em; }
.hero p { margin: 8px 0 0; opacity: .82; font-size: 14px; }
.card {
  background: var(--card); border-radius: 20px; padding: 22px;
  box-shadow: var(--shadow);
}
.card label { display: block; margin: 12px 0 6px; color: var(--muted); font-size: 13px; }
.card input, .sheet input, .sheet select, .sheet textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #f7fafc;
}
.card input:focus, .sheet input:focus, .sheet select:focus {
  outline: 2px solid rgba(42,122,163,.22); border-color: var(--brand-2); background: #fff;
}

.main { padding-bottom: calc(76px + var(--safe-bottom)); }
.m-head {
  position: sticky; top: 0; z-index: 10;
  padding: 16px 18px 14px;
  background:
    radial-gradient(400px 120px at 100% 0%, rgba(208,122,42,.22), transparent 55%),
    linear-gradient(180deg, #163e58, #1a5678);
  color: #fff;
}
.m-head strong { display: block; font-size: 18px; letter-spacing: .02em; }
.m-head small { color: rgba(201,217,228,.9); font-size: 12px; }
.m-content {
  padding: 14px 14px 24px;
  background:
    radial-gradient(420px 160px at 0% 0%, rgba(42,122,163,.08), transparent 50%),
    var(--bg);
}

.hello { margin: 2px 2px 14px; }
.hello-t { font-size: 17px; font-weight: 600; color: var(--ink); }
.hello-s { margin-top: 4px; font-size: 12px; color: var(--muted); }

.home-banner {
  position: relative; overflow: hidden;
  background:
    radial-gradient(280px 140px at 100% -20%, rgba(208,122,42,.32), transparent 55%),
    linear-gradient(145deg, #163e58 0%, #1a5678 48%, #217096 100%);
  color: #fff; border-radius: 20px; padding: 18px 16px 14px;
  margin-bottom: 14px; box-shadow: 0 14px 28px rgba(26,86,120,.22);
}
.hb-ornament {
  position: absolute; right: -20px; top: -30px; width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255,255,255,.06); pointer-events: none;
}
.hb-top { display: flex; gap: 12px; align-items: center; position: relative; z-index: 1; }
.hb-avatar {
  width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 20px; font-weight: 700;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22);
}
.hb-hello { font-size: 17px; font-weight: 600; letter-spacing: .02em; }
.hb-sub {
  margin-top: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: rgba(230,240,248,.88);
}
.hb-badge {
  display: inline-flex; padding: 2px 8px; border-radius: 999px; font-size: 11px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.18);
}
.hb-strip {
  margin-top: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  position: relative; z-index: 1;
}
.hb-strip > div {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; padding: 10px 8px; text-align: center;
}
.hb-strip b { display: block; font-size: 18px; font-weight: 700; }
.hb-strip span { display: block; margin-top: 2px; font-size: 11px; color: rgba(220,232,240,.8); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: rgba(255,255,255,.97);
  border-top: 1px solid rgba(220,228,234,.95);
  padding: 8px 0 calc(8px + var(--safe-bottom));
  backdrop-filter: blur(12px);
  box-shadow: 0 -8px 24px rgba(21,40,56,.06);
}
.tabbar button {
  border: 0; background: transparent; padding: 4px 4px 2px;
  color: #8090a0; font-size: 11px; display: flex; flex-direction: column;
  align-items: center; gap: 2px; font-weight: 500;
}
.tabbar button .ico {
  width: 40px; height: 30px; display: grid; place-items: center;
  border-radius: 10px;
}
.tabbar button .ico svg { width: 22px; height: 22px; display: block; }
.tabbar button .lab { line-height: 1.2; }
.tabbar button.active { color: var(--brand); font-weight: 600; }
.tabbar button.active .ico {
  background: var(--brand-soft); color: var(--brand);
}

.stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px;
}
.stat {
  position: relative; overflow: hidden;
  background: var(--card); border-radius: var(--radius); padding: 14px 14px 12px;
  box-shadow: var(--shadow);
}
.stat::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 2px;
  background: var(--tone, var(--brand-2));
}
.stat .ico-wrap {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: var(--tone-soft, var(--brand-soft)); color: var(--tone, var(--brand));
  margin-bottom: 8px;
}
.stat .ico-wrap svg { width: 17px; height: 17px; }
.stat .l { color: var(--muted); font-size: 12px; }
.stat .v { margin-top: 4px; font-size: 24px; font-weight: 700; letter-spacing: .02em; }
.stat.tone-blue { --tone: #2a7aa3; --tone-soft: #e7f2f8; }
.stat.tone-teal { --tone: #1f8a72; --tone-soft: #e6f6f1; }
.stat.tone-amber { --tone: #d07a2a; --tone-soft: #fff3e6; }
.stat.tone-slate { --tone: #4d6578; --tone-soft: #eef2f5; }

.quick {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px;
}
.quick.two { grid-template-columns: repeat(2, 1fr); }
.quick button {
  border: 0; background: var(--card); border-radius: 14px; padding: 14px 8px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--ink); font-size: 12px; font-weight: 500;
}
.quick .q-ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  color: #fff;
}
.quick .q-ico svg { width: 20px; height: 20px; }
.quick .q-ico.a { background: linear-gradient(145deg, #3a8fb8, #1a5678); }
.quick .q-ico.b { background: linear-gradient(145deg, #2aa88a, #1f8a72); }
.quick .q-ico.c { background: linear-gradient(145deg, #e09345, #d07a2a); }

.sec-head {
  display: flex; justify-content: space-between; align-items: center;
  margin: 4px 2px 10px; color: var(--muted); font-size: 13px; font-weight: 600;
}
.sec-head button {
  border: 0; background: none; color: var(--brand-2); font-size: 12px; padding: 0;
}

/* 运单状态横向滑动分类 */
.status-scroll {
  display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 2px 2px 14px; margin: 0 -2px 4px;
  scrollbar-width: none;
}
.status-scroll::-webkit-scrollbar { display: none; }
.st-chip {
  flex: 0 0 auto; border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 500;
  white-space: nowrap; box-shadow: 0 2px 8px rgba(21,40,56,.04);
}
.st-chip.active {
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 14px rgba(26,86,120,.28);
}

.list-card {
  background: var(--card); border-radius: var(--radius); padding: 14px;
  margin-bottom: 10px; box-shadow: var(--shadow);
}
.list-card .row { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.list-card h3 {
  margin: 0; font-size: 15px; font-weight: 600;
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
}
.list-card .dot {
  width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0;
}
.list-card .dot.from { background: #2a7aa3; }
.list-card .dot.to { background: #d07a2a; }
.list-card .arr { color: #9aabba; font-weight: 400; margin: 0 2px; }
.list-card .meta { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.tag {
  display: inline-flex; padding: 3px 9px; border-radius: 999px; font-size: 11px;
  background: var(--brand-soft); color: var(--brand); font-weight: 500; white-space: nowrap;
}
.tag.ok { background: var(--teal-soft); color: var(--ok); }
.tag.warn { background: var(--accent-soft); color: var(--warn); }
.tag.info { background: #e8f3fa; color: var(--brand-2); }
.tag.danger { background: #fdeeee; color: var(--danger); }
.tag.muted { background: #eef1f4; color: #7a8592; }

.actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.fab {
  position: fixed; right: 16px; bottom: calc(88px + var(--safe-bottom));
  width: 54px; height: 54px; border-radius: 50%; border: 0;
  background: linear-gradient(145deg, #e09345, var(--accent)); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 24px rgba(208,122,42,.38); z-index: 15;
}
.fab svg { width: 22px; height: 22px; }

.sheet {
  position: fixed; inset: 0; z-index: 40; background: rgba(16,24,32,.48);
  display: flex; align-items: flex-end;
}
.sheet .panel {
  background: #fff; width: 100%; max-height: 90vh; overflow: auto;
  border-radius: 20px 20px 0 0; padding: 10px 16px calc(16px + var(--safe-bottom));
}
.sheet-handle {
  width: 40px; height: 4px; border-radius: 999px; background: #d5dee6;
  margin: 4px auto 12px;
}
.sheet-tip {
  margin: 10px 0 0; text-align: center; color: #94a0ab; font-size: 12px;
}
.sheet h3 { margin: 0 0 12px; font-size: 17px; }
.field { margin-bottom: 10px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.toast {
  position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%);
  background: #15202b; color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 50; font-size: 13px;
}
.empty { text-align: center; color: var(--muted); padding: 48px 10px; }

.loc-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.loc-head h3 { margin: 0 0 4px; font-size: 16px; }
.loc-addr { margin-bottom: 12px; }
.loc-map {
  width: 100%; height: 260px; border: 0; border-radius: 14px;
  background: #dde5ea; margin-bottom: 12px; overflow: hidden;
}
.loc-map .leaflet-container { width: 100%; height: 100%; border-radius: 14px; }
.loc-empty {
  text-align: center; padding: 28px 10px 18px; color: var(--muted);
}
.loc-empty svg { width: 40px; height: 40px; color: var(--brand-2); margin-bottom: 8px; }
.loc-empty .muted { font-size: 12px; color: #94a0ab; }
.loc-card {
  background: var(--card); border-radius: 18px; padding: 22px 18px; box-shadow: var(--shadow); text-align: center;
}
.loc-card.inner { box-shadow: none; border: 1px solid var(--line); }
.loc-card .loc-ico {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, #3a8fb8, #1a5678);
  box-shadow: 0 10px 22px rgba(26,86,120,.28);
}
.loc-card .loc-ico svg { width: 30px; height: 30px; }
.loc-card .loc-info { color: var(--muted); font-size: 13px; line-height: 1.55; margin-bottom: 16px; min-height: 40px; }

.profile {
  position: relative; overflow: hidden;
  background: linear-gradient(145deg, #163e58 0%, #1a5678 55%, #217096 100%);
  color: #fff; border-radius: 22px; padding: 0; margin-bottom: 14px;
  box-shadow: 0 14px 30px rgba(26,86,120,.24);
}
.profile-glow {
  position: absolute; right: -30px; top: -40px; width: 140px; height: 140px; border-radius: 50%;
  background: rgba(208,122,42,.28); pointer-events: none;
}
.profile-main {
  position: relative; z-index: 1;
  display: flex; gap: 14px; align-items: center; padding: 22px 18px 16px;
}
.profile .avatar {
  width: 58px; height: 58px; border-radius: 18px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22);
  display: grid; place-items: center; font-size: 24px; font-weight: 700; flex-shrink: 0;
}
.profile .avatar svg { width: 26px; height: 26px; }
.profile h3 { margin: 0; font-size: 20px; font-weight: 600; }
.role-line { margin-top: 8px; }
.role-badge {
  display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: 11px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18);
}
.profile .meta { margin-top: 8px; opacity: .88; font-size: 12px; line-height: 1.5; }
.profile-foot {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: rgba(255,255,255,.08); border-top: 1px solid rgba(255,255,255,.1);
}
.pf-item { padding: 12px 16px; }
.pf-item span { display: block; font-size: 11px; color: rgba(220,232,240,.75); }
.pf-item b { display: block; margin-top: 4px; font-size: 13px; font-weight: 600; }

.menu {
  background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); margin-bottom: 12px;
}
.menu button, .menu a {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 16px; border: 0; background: #fff; color: var(--ink);
  text-decoration: none; font-size: 14px; border-bottom: 1px solid var(--line);
  text-align: left;
}
.menu button:last-child, .menu a:last-child { border-bottom: 0; }
.menu .m-ico {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); flex-shrink: 0;
}
.menu .m-ico svg { width: 18px; height: 18px; }
.menu .m-ico.danger { background: #fdeeee; color: var(--danger); }
.menu .m-ico.loc { background: var(--accent-soft); color: var(--accent); }
.menu .m-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.menu .m-txt b { font-size: 14px; font-weight: 600; color: var(--ink); }
.menu .m-txt small { font-size: 11px; color: #8a97a5; }
.menu .arrow { margin-left: auto; color: #b0bac4; font-size: 16px; }
