/* ============================================================
   GlbXpress — Mobile Track screen (scoped .mt-)
   Touch-first: min 44px targets, big type, thumb-reachable actions
   ============================================================ */

.mt-root {
  position: absolute; inset: 0;
  background: var(--paper);
  font-family: var(--font-ui);
  color: var(--ink);
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* ---- sticky header (sits under status bar) ---- */
.mt-header {
  flex: none;
  padding: 56px 18px 12px;
  background: rgba(255,253,248,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
  z-index: 5;
}
.mt-back {
  width: 40px; height: 40px; flex: none;
  border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line); color: var(--navy-700);
}
.mt-back:active { background: var(--orange-tint); }
.mt-brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 800; font-size: 19px; color: var(--navy-700); letter-spacing: -.03em; }
.mt-brand .brand-mark { width: 28px; height: 28px; border-radius: 9px; }
.mt-header-title { font-family: var(--font-display); font-weight: 800; font-size: 19px; color: var(--navy-700); }
.mt-help { margin-left: auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); color: var(--ink-soft); }

/* ---- scroll body ---- */
.mt-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 18px 18px 120px; }

/* ===================== SEARCH STATE ===================== */
.mt-h1 { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1.05; color: var(--navy-700); letter-spacing: -.02em; }
.mt-lede { color: var(--ink-soft); font-size: 15.5px; margin-top: 8px; }
.mt-search { margin-top: 20px; }
.mt-search-bar {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1.5px solid var(--line-strong); border-radius: 16px;
  padding: 4px 4px 4px 16px; box-shadow: var(--shadow-sm);
}
.mt-search-bar:focus-within { border-color: var(--orange-400); }
.mt-search-bar .mt-ic { color: var(--ink-faint); display: flex; }
.mt-search-input {
  flex: 1; min-width: 0; border: none; outline: none; background: none;
  font-family: var(--font-ui); font-size: 16px; font-weight: 500; color: var(--ink);
  padding: 14px 2px;
}
.mt-search-go {
  flex: none; height: 48px; min-width: 48px; padding: 0 18px; border-radius: 13px;
  background: var(--orange-500); color: #fff; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  box-shadow: var(--shadow-orange);
}
.mt-search-go:active { transform: scale(.97); }
.mt-search-go.disabled { background: #e7ddcf; color: #fff; box-shadow: none; }

.mt-section-label { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin: 30px 0 12px; }

/* recent shipment cards */
.mt-recent { display: flex; flex-direction: column; gap: 12px; }
.mt-rcard {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 16px; text-align: left; width: 100%;
  box-shadow: var(--shadow-sm); transition: transform .12s;
}
.mt-rcard:active { transform: scale(.985); }
.mt-rcard-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mt-rcard-no { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; color: var(--navy-700); white-space: nowrap; }
.mt-pill { font-size: 11.5px; font-weight: 800; padding: 5px 10px; border-radius: 99px; white-space: nowrap; }
.mt-pill.live { background: var(--sky-soft); color: var(--sky-600); }
.mt-pill.out { background: var(--orange-tint); color: var(--orange-600); }
.mt-pill.done { background: #e3f6ee; color: var(--mint-500); }
.mt-rcard-route { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.mt-rcard-route .dash { flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 4px, transparent 4px 8px); }
.mt-rcard-route svg { color: var(--ink-faint); }
.mt-rcard-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.mt-rcard-eta { font-size: 13px; color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
.mt-rcard-eta b { color: var(--navy-700); }
.mt-rcard-go { color: var(--orange-500); display: flex; }

/* mini progress dots */
.mt-mini { display: flex; gap: 4px; margin-top: 14px; }
.mt-mini i { flex: 1; height: 4px; border-radius: 99px; background: #ece5d8; }
.mt-mini i.on { background: var(--orange-500); }

/* ===================== DETAIL STATE ===================== */
.mt-status-card {
  background: var(--navy-800); color: #fff; border-radius: 24px;
  padding: 22px; position: relative; overflow: hidden;
  box-shadow: var(--shadow-md);
}
.mt-status-card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 90% at 90% -10%, rgba(255,106,31,.34), transparent 70%); pointer-events: none; }
.mt-status-top { display: flex; align-items: center; gap: 8px; position: relative; }
.mt-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #56e0a0; box-shadow: 0 0 0 0 rgba(86,224,160,.6); animation: mtpulse 1.6s infinite; }
@keyframes mtpulse { 0% { box-shadow: 0 0 0 0 rgba(86,224,160,.55); } 70% { box-shadow: 0 0 0 8px rgba(86,224,160,0); } 100% { box-shadow: 0 0 0 0 rgba(86,224,160,0); } }
.mt-live-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: rgba(255,255,255,.7); white-space: nowrap; }
.mt-updated { margin-left: auto; font-size: 11.5px; color: rgba(255,255,255,.5); font-family: var(--font-mono); }
.mt-status-big { font-family: var(--font-display); font-weight: 800; font-size: 30px; margin-top: 14px; letter-spacing: -.02em; position: relative; }
.mt-eta { font-size: 15px; color: rgba(255,255,255,.82); margin-top: 6px; position: relative; }
.mt-eta b { color: var(--orange-400); }
/* segmented progress */
.mt-seg { display: flex; gap: 5px; margin-top: 20px; position: relative; }
.mt-seg i { flex: 1; height: 6px; border-radius: 99px; background: rgba(255,255,255,.16); overflow: hidden; }
.mt-seg i.on { background: var(--orange-500); }
.mt-seg i.cur { background: rgba(255,255,255,.16); }
.mt-seg i.cur::after { content: ""; display: block; height: 100%; width: 55%; background: var(--orange-500); border-radius: 99px; }
.mt-status-no { margin-top: 16px; font-family: var(--font-mono); font-size: 12.5px; color: rgba(255,255,255,.6); position: relative; }

/* route + map */
.mt-route-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-top: 14px; box-shadow: var(--shadow-sm); }
.mt-route-line { display: flex; align-items: center; gap: 10px; }
.mt-route-end { display: flex; flex-direction: column; }
.mt-route-end .city { font-weight: 800; font-size: 15px; color: var(--navy-700); }
.mt-route-end .ctry { font-size: 12px; color: var(--ink-faint); font-family: var(--font-mono); }
.mt-route-mid { flex: 1; display: flex; align-items: center; gap: 6px; color: var(--orange-500); }
.mt-route-mid .ln { flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--orange-400) 0 5px, transparent 5px 10px); }
.mt-route-end.r { align-items: flex-end; }
.mt-map { margin-top: 12px; height: 150px; border-radius: 14px; font-size: 11px; }

/* timeline */
.mt-tl-label { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin: 26px 4px 14px; }
.mt-tl { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 8px 18px; box-shadow: var(--shadow-sm); }
.mt-step { display: flex; gap: 14px; padding: 14px 0; position: relative; }
.mt-step:not(:last-child)::before { content: ""; position: absolute; left: 14px; top: 36px; bottom: -2px; width: 2px; background: var(--line); }
.mt-step.done:not(:last-child)::before { background: var(--orange-soft); }
.mt-node { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #f1efe9; color: var(--ink-faint); border: 2px solid var(--line); z-index: 1; }
.mt-step.done .mt-node { background: var(--orange-500); border-color: var(--orange-500); color: #fff; }
.mt-step.cur .mt-node { background: #fff; border-color: var(--orange-500); color: var(--orange-500); box-shadow: 0 0 0 5px var(--orange-tint); }
.mt-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.mt-step-body { padding-top: 3px; flex: 1; }
.mt-step-label { font-weight: 700; font-size: 15px; color: var(--ink-faint); }
.mt-step.done .mt-step-label, .mt-step.cur .mt-step-label { color: var(--navy-700); }
.mt-step-meta { font-size: 13px; color: var(--ink-faint); margin-top: 2px; }
.mt-step-meta .pl { font-family: var(--font-mono); }

/* details list */
.mt-details { background: #fff; border: 1px solid var(--line); border-radius: 18px; margin-top: 14px; box-shadow: var(--shadow-sm); overflow: hidden; }
.mt-drow { display: flex; justify-content: space-between; align-items: center; padding: 15px 18px; font-size: 14.5px; }
.mt-drow:not(:last-child) { border-bottom: 1px solid var(--line); }
.mt-drow span { color: var(--ink-soft); font-weight: 500; }
.mt-drow b { color: var(--navy-700); font-weight: 700; }
.mt-drow b.save { color: var(--orange-600); }

/* help / contact row */
.mt-help-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 16px 18px; background: var(--orange-tint); border: 1px solid var(--orange-soft); border-radius: 18px; font-size: 14px; color: var(--ink-soft); font-weight: 500; }
.mt-help-row svg { color: var(--orange-500); flex: none; }
.mt-help-row a { color: var(--orange-600); font-weight: 700; font-family: var(--font-mono); font-size: 13.5px; }

/* loading / error */
.mt-loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 80px 24px; color: var(--ink-soft); font-size: 15px; font-weight: 600; text-align: center; }
.mt-spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--orange-soft); border-top-color: var(--orange-500); animation: mtspin .7s linear infinite; }
@keyframes mtspin { to { transform: rotate(360deg); } }
.mt-err { text-align: center; padding: 50px 10px; display: flex; flex-direction: column; align-items: center; }
.mt-err-ic { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--orange-tint); color: var(--orange-600); margin-bottom: 18px; }
.mt-err h3 { font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--navy-700); }
.mt-err p { font-size: 15px; color: var(--ink-soft); margin-top: 8px; font-weight: 500; }
.mt-err-hint { font-size: 13.5px; }
.mt-err-hint a { color: var(--orange-600); font-weight: 700; font-family: var(--font-mono); }

/* sticky action bar */
.mt-actions {
  flex: none; position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 18px 30px; display: flex; gap: 10px;
  background: linear-gradient(180deg, rgba(255,253,248,0) 0%, var(--paper) 26%);
}
.mt-act {
  height: 52px; border-radius: 15px; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.mt-act-primary { flex: 1; background: var(--orange-500); color: #fff; box-shadow: var(--shadow-orange); }
.mt-act-primary:active { transform: scale(.98); }
.mt-act-icon { width: 52px; flex: none; background: #fff; border: 1.5px solid var(--line-strong); color: var(--navy-700); }
.mt-act-icon:active { background: var(--orange-tint); }
.mt-act-primary.armed { background: var(--navy-700); }

@keyframes mtpop { from { transform: translateY(8px); } to { transform: none; } }
.mt-fade { animation: mtpop .3s ease; }
