:root {
  --navy: #031087;
  --navy-dark: #020c66;
  --navy2: #0f97ff;
  --sky: #0f97ff;
  --sky-soft: #e7f3ff;
  --gray: #97a3ac;
  --bg: #eef2f5;
  --card: #ffffff;
  --text: #1c2b38;
  --muted: #6b7a86;
  --line: #e4e9ed;
  --green: #2e9e5b;
  --amber: #e8a13a;
  --red: #d64550;
  --radius: 16px;
  --shadow: 0 4px 18px rgba(15,47,82,.08);
  --nav-h: 66px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; max-width: 100%; overflow-x: hidden; }
img, svg { max-width: 100%; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* screens */
.screen { display: none; }
.screen.active { display: block; }
#appBody { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
.container { max-width: 780px; margin: 0 auto; padding: 18px 16px 30px; }
h2 { color: var(--navy); margin: 4px 0 16px; font-size: 22px; }
h3.section-title { color: var(--navy); font-size: 15px; margin: 22px 0 10px; text-transform: uppercase;
  letter-spacing: .6px; opacity: .8; }

/* ---- login ---- */
#screen-login.active { display: block; }
.login-hero { min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 18px; padding: 24px;
  background: radial-gradient(1200px 500px at 50% -10%, #1c568c 0%, var(--navy) 55%); }
.login-card { background: #fff; border-radius: 22px; padding: 30px 26px; width: 100%; max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35); text-align: center; }
.login-logo { max-width: 230px; width: 100%; }
.login-tag { color: var(--muted); font-size: 14px; margin: 6px 0 20px; font-weight: 600; }
.field { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line);
  border-radius: 12px; padding: 0 12px; margin-bottom: 12px; background: #fbfcfd; }
.field:focus-within { border-color: var(--sky); background: #fff; }
.field-ico { opacity: .6; }
.field input { border: none; background: transparent; padding: 13px 4px; width: 100%; font-size: 15px; outline: none; }
.hint { font-size: 12px; color: var(--muted); margin-top: 14px; }
.login-foot { color: rgba(255,255,255,.7); font-size: 12px; }

/* ---- topbar ---- */
.topbar { display: flex; justify-content: space-between; align-items: center; background: var(--navy);
  color: #fff; padding: 12px 16px; position: sticky; top: 0; z-index: 30;
  padding-top: calc(12px + env(safe-area-inset-top)); }
.topbar-left { display: flex; align-items: center; gap: 11px; }
.topbar-logo { height: 30px; width: auto; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px 8px; }
.topbar-title { font-weight: 800; font-size: 15px; letter-spacing: .3px; }
.topbar-sub { font-size: 12px; opacity: .7; }
.topbar-left { cursor: pointer; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.btn-install { background: rgba(255,255,255,.14); color: #fff; padding: 8px 12px; font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px; }
.btn-install:hover { background: rgba(255,255,255,.25); }

/* profile screen */
.profile-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 20px; box-shadow: var(--shadow); text-align: center; }
.profile-avatar { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--navy2), var(--navy)); color: #fff; display: grid; place-items: center;
  font-size: 30px; font-weight: 800; }
.profile-name { font-size: 20px; font-weight: 800; color: var(--navy); }
.profile-user { font-size: 14px; color: var(--muted); margin-top: 2px; }
.profile-role { display: inline-block; margin-top: 10px; padding: 4px 14px; border-radius: 20px;
  background: var(--sky-soft); color: var(--navy2); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.profile-rows { margin-top: 18px; text-align: left; }
.profile-row { display: flex; justify-content: space-between; padding: 12px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.profile-row:last-child { border-bottom: none; }
.profile-row b { color: var(--navy); }
.btn-danger { background: #fff; color: var(--red); border: 1.5px solid var(--red); }
.btn-danger:hover { background: #fdecee; }

/* ---- buttons ---- */
.btn { border: none; border-radius: 12px; padding: 13px 18px; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: .15s; }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 6px 16px rgba(3,16,135,.28); }
.btn-primary:hover { background: var(--navy-dark); }
.btn-ghost { background: transparent; color: var(--navy); box-shadow: none; }
.btn-ghost:hover { background: rgba(3,16,135,.08); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 13px; font-size: 13px; }
.back { margin-bottom: 8px; }

/* ---- hero ---- */
.hero { display: flex; align-items: center; gap: 14px; background: linear-gradient(120deg, var(--navy) 0%, var(--navy2) 100%);
  color: #fff; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.hero-truck { font-size: 38px; }
.hero-hi { font-size: 13px; opacity: .8; }
.hero-name { font-size: 22px; font-weight: 800; }

/* ---- stats ---- */
.stat-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 14px; }
.stat-box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 8px;
  text-align: center; box-shadow: var(--shadow); }
.stat-value { display: block; font-size: 28px; font-weight: 800; color: var(--navy2); }
.stat-label { font-size: 11px; color: var(--muted); font-weight: 600; }

/* ---- quick actions ---- */
.quick-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.quick-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 14px;
  display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 700; color: var(--navy);
  cursor: pointer; box-shadow: var(--shadow); transition: .15s; }
.quick-card:hover { transform: translateY(-2px); border-color: var(--sky); }
.quick-card.accent { background: var(--navy); color: #fff; border-color: var(--navy); }
.q-ico { width: 42px; height: 42px; display: grid; place-items: center;
  background: var(--sky-soft); border-radius: 11px; }
.q-ico svg { width: 22px; height: 22px; stroke: var(--navy2); stroke-width: 1.9; fill: none;
  stroke-linecap: round; stroke-linejoin: round; }
.quick-card.accent .q-ico { background: rgba(255,255,255,.18); }
.quick-card.accent .q-ico svg { stroke: #fff; }
.hero-truck svg { width: 40px; height: 40px; stroke: #fff; stroke-width: 1.8; fill: none;
  stroke-linecap: round; stroke-linejoin: round; }
.badge { display: inline-block; min-width: 18px; padding: 1px 6px; margin-left: 4px; border-radius: 10px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 800; text-align: center; vertical-align: middle; }

/* ---- forms ---- */
.form-card, .detail-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); }
.form-section { font-size: 12px; font-weight: 800; color: var(--sky); text-transform: uppercase;
  letter-spacing: 1px; margin: 6px 0 12px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.form-group { margin-bottom: 14px; }
label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
input, select, textarea { width: 100%; padding: 12px; border: 1.5px solid var(--line); border-radius: 11px;
  font-size: 15px; font-family: inherit; background: #fbfcfd; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sky); background: #fff; }

/* segmented control */
.seg { display: flex; background: #eef2f5; border-radius: 12px; padding: 4px; gap: 4px; }
.seg-opt { flex: 1; border: none; background: transparent; padding: 10px; border-radius: 9px; font-weight: 700;
  font-size: 14px; color: var(--muted); cursor: pointer; }
.seg-opt.active { background: #fff; color: var(--navy2); box-shadow: 0 2px 6px rgba(0,0,0,.08); }

/* ---- search / lists ---- */
.search-row { display: flex; gap: 10px; margin-bottom: 16px; }
.search-row input { flex: 1; }
.search-full { margin-bottom: 14px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.list-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  box-shadow: var(--shadow); cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  gap: 12px; }
.list-item:hover { border-color: var(--sky); }
.li-num { font-weight: 800; color: var(--navy2); font-size: 15px; }
.li-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

.pill { font-size: 11px; font-weight: 800; padding: 4px 11px; border-radius: 20px; white-space: nowrap; }
.pill.created { background: #eceff1; color: #5c6b78; }
.pill.dispatched { background: #fdf1dc; color: #b26a00; }
.pill.transit { background: var(--sky-soft); color: var(--sky); }
.pill.delivered { background: #e4f5eb; color: var(--green); }
.pill.failed { background: #fbe6e8; color: var(--red); }

/* timeline */
.timeline { display: flex; flex-direction: column; }
.tl-item { border-left: 3px solid var(--sky); padding: 0 0 22px 20px; position: relative; }
.tl-item:last-child { border-left-color: transparent; }
.tl-item::before { content: ""; position: absolute; left: -8px; top: 2px; width: 13px; height: 13px;
  border-radius: 50%; background: var(--sky); border: 3px solid var(--bg); }
.tl-status { font-weight: 800; color: var(--navy); display: flex; gap: 8px; align-items: center; }
.tl-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tl-note { font-size: 14px; margin-top: 3px; }
.dd-parties { margin-bottom: 8px; }

/* ---- bottom nav ---- */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; align-items: stretch; z-index: 40;
  box-shadow: 0 -4px 20px rgba(15,47,82,.08); }
.nav-item { flex: 1; border: none; background: none; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; color: var(--gray); font-size: 11px; font-weight: 700; cursor: pointer; }
.nav-item svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2; fill: none;
  stroke-linecap: round; stroke-linejoin: round; }
.nav-item.active { color: var(--sky); }

/* ---- printable waybill ---- */
.print-actions { display: flex; justify-content: space-between; }
.waybill-sheet { background: #fff; max-width: 720px; margin: 12px auto; padding: 26px; border: 1px solid var(--line);
  position: relative; overflow: hidden; box-shadow: var(--shadow); border-radius: 8px; }
.watermark { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) rotate(-25deg);
  font-size: 120px; font-weight: 900; color: rgba(15,47,82,.06); pointer-events: none; letter-spacing: 6px; white-space: nowrap; }
.wb-header { display: flex; gap: 16px; align-items: center; border-bottom: 2px solid var(--navy);
  padding-bottom: 12px; position: relative; z-index: 2; }
.wb-logo { height: 52px; }
.wb-co-name { font-weight: 800; color: var(--navy); font-size: 16px; }
.wb-co-line { font-size: 11px; color: var(--muted); }
.wb-numberband { text-align: center; padding: 14px 0; position: relative; z-index: 2; }
.wb-number { font-size: 22px; font-weight: 800; letter-spacing: 2px; color: var(--navy); }
.wb-parties { display: flex; gap: 16px; position: relative; z-index: 2; }
.wb-party { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 12px; min-height: 88px; white-space: pre-line; }
.wb-party-title { font-size: 11px; font-weight: 800; color: var(--sky); letter-spacing: 1px; margin-bottom: 6px; }
.wb-details { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; position: relative; z-index: 2; align-items: start; }
.wb-k { font-weight: 700; color: var(--navy); }
.wb-qr { grid-row: span 3; justify-self: end; }
.wb-statusrow { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 20px;
  padding-top: 12px; border-top: 1px dashed var(--gray); font-size: 12px; position: relative; z-index: 2; }

/* toast */
.toast { position: fixed; bottom: calc(var(--nav-h) + 20px); left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 30px; font-size: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,.3); opacity: 0; transition: .3s; z-index: 100; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

@media (max-width: 560px) { .form-row { flex-direction: column; gap: 0; } .wb-parties { flex-direction: column; } }

/* ============ LANDING (public homepage) ============ */
#screen-landing { --fk-blue:#0f97ff; --fk-blue-deep:#031087; --fk-sky:#0f97ff; --fk-blue-soft:#e7f3ff; --fk-ink:#031087;
  --fk-slate:#5b6b86; --fk-line:#e5ecf5; --fk-mist:#f6f9fd; background:#fff; color:var(--fk-ink); overflow-x:hidden; }

/* mobile bottom nav for the public landing */
.landing-nav-bottom { display:none; }
.landing-nav-bottom button { border:none; background:none; flex:1; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:3px; font-size:10.5px; font-weight:700; color:#5b6b86; cursor:pointer; padding:6px 2px; }
.landing-nav-bottom button svg { width:23px; height:23px; stroke:currentColor; stroke-width:1.9; fill:none;
  stroke-linecap:round; stroke-linejoin:round; }
.landing-nav-bottom .lnb-signin { color:#031087; }

@media(max-width:720px){
  #screen-landing .land-links { display:none; }
  #screen-landing .land-nav { justify-content:center; padding:12px 16px; }
  #screen-landing { padding-bottom:calc(64px + env(safe-area-inset-bottom)); }
  #screen-landing .big-foot { margin-bottom:0; }
  .landing-nav-bottom { display:flex; position:fixed; left:0; right:0; bottom:0; z-index:50; background:#fff;
    border-top:1px solid var(--fk-line); box-shadow:0 -4px 20px rgba(3,16,135,.08);
    padding-bottom:env(safe-area-inset-bottom); }
}
#screen-landing .land-nav { position:sticky; top:0; z-index:40; background:rgba(255,255,255,.9);
  backdrop-filter:blur(10px); border-bottom:1px solid var(--fk-line); display:flex; align-items:center;
  justify-content:space-between; padding:12px 20px; }
#screen-landing .brand-logo { height:46px; }
@media(min-width:720px){ #screen-landing .brand-logo { height:54px; } }
#screen-landing .land-links { display:flex; align-items:center; gap:20px; }
#screen-landing .land-links a { font-size:14px; font-weight:600; color:var(--fk-ink); cursor:pointer; }
#screen-landing .land-links a:hover { color:var(--fk-blue); }
#screen-landing .cta { background:var(--fk-blue-deep); color:#fff; padding:9px 18px; border-radius:10px;
  font-weight:600; font-size:14px; border:none; cursor:pointer; }

#screen-landing .hero { position:relative; background:linear-gradient(120deg,#ffffff 0%,#f2f7fc 100%); overflow:hidden; }
#screen-landing .hero-grid { max-width:1180px; margin:0 auto; display:grid; grid-template-columns:1fr; align-items:center;
  gap:20px; padding:44px 20px 40px; position:relative; z-index:2; }
#screen-landing .hero-copy { position:relative; z-index:3; }
#screen-landing .eyebrow { display:inline-block; font-size:12px; letter-spacing:2.5px; text-transform:uppercase;
  color:var(--fk-slate); margin-bottom:14px; font-weight:700; }
#screen-landing .hero-title { font-size:clamp(34px,7vw,60px); line-height:1.02; font-weight:900; letter-spacing:-1px;
  text-transform:uppercase; color:var(--fk-ink); }
#screen-landing .hero-title .hl { color:var(--fk-blue); }
#screen-landing .hero-rule { display:flex; align-items:center; gap:0; margin:18px 0; }
#screen-landing .hero-rule span { height:3px; width:220px; max-width:60%; background:linear-gradient(90deg,var(--fk-blue),transparent);
  border-radius:3px; position:relative; }
#screen-landing .hero-rule span::before { content:""; position:absolute; left:-6px; top:-3px; width:9px; height:9px;
  border-radius:50%; background:var(--fk-blue); }
#screen-landing .hero-tag { font-size:clamp(19px,3vw,26px); font-weight:700; color:var(--fk-ink); }
#screen-landing .hero-tag .hl { color:var(--fk-blue); }
#screen-landing .hero-fk-tagline { margin:-6px 0 16px; font-size:14px; font-weight:700; font-style:italic; color:var(--fk-blue); }
#screen-landing .hero-feats { display:grid; grid-template-columns:repeat(4,auto); gap:22px; margin:26px 0 6px; }
#screen-landing .hf { display:flex; flex-direction:column; align-items:center; text-align:center; gap:8px; }
#screen-landing .hf-ico { width:52px; height:52px; border-radius:50%; border:2px solid var(--fk-blue);
  display:flex; align-items:center; justify-content:center; }
#screen-landing .hf-ico svg { width:26px; height:26px; stroke:var(--fk-blue); stroke-width:1.8; fill:none;
  stroke-linecap:round; stroke-linejoin:round; }
#screen-landing .hf span { font-size:12.5px; font-weight:700; color:var(--fk-ink); line-height:1.25; }
#screen-landing .hero-btns { margin-top:26px; display:flex; gap:12px; flex-wrap:wrap; }
#screen-landing .btn-primary { background:var(--fk-blue-deep); color:#fff; padding:14px 26px; border-radius:12px;
  font-weight:700; font-size:15px; border:none; cursor:pointer; box-shadow:0 8px 20px rgba(20,102,168,.28); }
#screen-landing .btn-ghost { background:#fff; border:1.5px solid var(--fk-line); color:var(--fk-ink);
  padding:14px 26px; border-radius:12px; font-weight:600; font-size:15px; cursor:pointer; }

/* right-side hero image (truck + skyline + dashboard) */
#screen-landing .hero-visual { position:relative; display:flex; align-items:center; justify-content:center; }
#screen-landing .hero-photo-wrap { position:relative; display:inline-block; width:100%; max-width:560px; }
#screen-landing .hero-image { width:100%; height:auto; display:block;
  border-radius:16px; box-shadow:0 16px 40px rgba(3,16,135,.14); }
#screen-landing .hero-logo-overlay { position:absolute; top:14px; left:14px; width:42%; max-width:220px;
  background:rgba(255,255,255,.92); padding:8px 12px; border-radius:10px; box-shadow:0 6px 18px rgba(3,16,135,.18); }

@media(min-width:900px){
  #screen-landing .hero-grid { grid-template-columns:1fr 1fr; gap:24px; padding:50px 24px 46px; }
}
@media(max-width:520px){ #screen-landing .hero-feats { grid-template-columns:repeat(2,1fr); gap:16px; } }

/* stacked layout: show the image on top, above the headline */
@media(max-width:899px){
  #screen-landing .hero-visual { order:-1; margin-bottom:6px; }
  #screen-landing .hero-photo-wrap { max-width:420px; margin:0 auto; display:block; }
}

/* install button on hero */
#screen-landing .hero-install { display:inline-flex; align-items:center; gap:7px; border-color:var(--fk-blue); color:var(--fk-blue-deep); }

/* --- mobile-first fine-tuning for small phones --- */
@media(max-width:600px){
  #screen-landing .hero-grid { padding:26px 18px 30px; gap:18px; }
  #screen-landing .hero-btns { flex-direction:column; align-items:stretch; }
  #screen-landing .hero-btns button { width:100%; justify-content:center; text-align:center; }
  #screen-landing .track-wrap { padding:0 14px 10px; }
  #screen-landing .track-panel { padding:18px 16px; }
  #screen-landing .tab { padding:13px 6px; font-size:12.5px; }
  #screen-landing .tp-row { flex-direction:column; gap:10px; }
  #screen-landing .tp-row input { width:100%; text-overflow:ellipsis; }
  #screen-landing .tp-btn { width:100%; padding:14px; }
  #screen-landing .info-sec { padding:38px 18px; }
  #screen-landing .fgrid { gap:14px; }
}
@media(max-width:360px){
  #screen-landing .hero-title { font-size:30px; }
  #screen-landing .hero-feats { gap:12px; }
  #screen-landing .hf-ico { width:46px; height:46px; }
  #screen-landing .hf span { font-size:11.5px; }
}

#screen-landing .side-rail { position:fixed; right:14px; top:50%; transform:translateY(-50%); z-index:45; background:#fff;
  border:1px solid var(--fk-line); border-radius:40px; box-shadow:0 10px 30px rgba(20,102,168,.16);
  display:flex; flex-direction:column; gap:4px; padding:8px 6px; }
#screen-landing .side-rail button { background:none; border:none; display:flex; flex-direction:column; align-items:center;
  gap:2px; font-size:10px; font-weight:600; color:var(--fk-slate); padding:9px 8px; border-radius:20px; width:58px; cursor:pointer; }
#screen-landing .side-rail button svg { width:22px; height:22px; stroke:currentColor; stroke-width:1.8; fill:none;
  stroke-linecap:round; stroke-linejoin:round; }
#screen-landing .side-rail button:hover { background:var(--fk-blue-soft); color:var(--fk-blue); }
@media(max-width:720px){ #screen-landing .side-rail{display:none} }

#screen-landing .track-wrap { max-width:900px; margin:12px auto 0; position:relative; z-index:5; padding:0 16px 10px; }
#screen-landing .tw-title { text-align:center; font-size:clamp(20px,4vw,28px); font-weight:800; color:var(--fk-ink); margin-bottom:18px; }
#screen-landing .tabs { display:flex; background:#eef3f8; border-radius:12px 12px 0 0; overflow:hidden; max-width:720px; margin:0 auto; }
#screen-landing .tab { flex:1; padding:15px 10px; font-size:14px; font-weight:700; color:var(--fk-slate); background:#eef3f8; border:none; cursor:pointer; }
#screen-landing .tab.on { background:var(--fk-blue-deep); color:#fff; }
#screen-landing .track-panel { background:#fff; border:1px solid var(--fk-line); border-top:none; max-width:720px; margin:0 auto;
  padding:22px; border-radius:0 0 12px 12px; box-shadow:var(--shadow); }
#screen-landing .tp-label { display:block; font-size:14px; font-weight:700; margin-bottom:10px; color:var(--fk-ink); }
#screen-landing .tp-row { display:flex; gap:8px; }
#screen-landing .tp-row input { flex:1; padding:13px 14px; border:1.5px solid var(--fk-line); border-radius:10px; font-size:14px; background:var(--fk-mist); }
#screen-landing .tp-row input:focus { outline:none; border-color:var(--fk-blue); background:#fff; }
#screen-landing .tp-btn { background:var(--fk-blue-deep); color:#fff; padding:0 26px; border-radius:10px; font-weight:700; font-size:14px; border:none; cursor:pointer; }
#screen-landing .tp-hint { font-size:12.5px; color:var(--fk-slate); margin-top:10px; }
#screen-landing .land-timeline { margin-top:16px; }
#screen-landing .lt-num { font-weight:800; color:var(--fk-blue); margin-bottom:10px; }
#screen-landing .lt-step { display:flex; gap:12px; padding:10px 0; border-bottom:1px solid var(--fk-line); }
#screen-landing .lt-step:last-child { border-bottom:none; }
#screen-landing .lt-dot { width:11px; height:11px; border-radius:50%; background:var(--fk-blue); margin-top:4px; flex-shrink:0; }
#screen-landing .lt-step b { font-size:13.5px; } #screen-landing .lt-step span { font-size:12px; color:var(--fk-slate); display:block; }
#screen-landing .lt-empty { margin-top:14px; color:var(--fk-slate); font-size:13.5px; }

#screen-landing .feat { max-width:1080px; margin:0 auto; padding:56px 20px 60px; }
#screen-landing .feat h2 { text-align:center; font-size:clamp(22px,4vw,32px); font-weight:800; letter-spacing:-.4px; }
#screen-landing .feat .sub { text-align:center; color:var(--fk-slate); margin-top:10px; font-size:15px; }
#screen-landing .fgrid { margin-top:38px; display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:18px; }
#screen-landing .fcard { background:#fff; border:1px solid var(--fk-line); border-radius:14px; padding:26px; transition:.15s; }
#screen-landing .fcard:hover { box-shadow:var(--shadow); transform:translateY(-2px); }
#screen-landing .fcard .ico { width:52px; height:52px; border-radius:50%; border:2px solid var(--fk-blue);
  background:transparent; display:flex; align-items:center; justify-content:center; margin-bottom:16px; }
#screen-landing .fcard .ico svg { width:26px; height:26px; stroke:var(--fk-blue); stroke-width:1.8; fill:none;
  stroke-linecap:round; stroke-linejoin:round; }
#screen-landing .fcard h3 { font-size:17px; font-weight:700; } #screen-landing .fcard p { margin-top:8px; color:var(--fk-slate); font-size:14px; line-height:1.6; }

/* info pages: About / Contact */
#screen-landing .info-sec { padding:52px 20px; }
#screen-landing .info-sec.alt { background:var(--fk-mist); border-top:1px solid var(--fk-line); border-bottom:1px solid var(--fk-line); }
#screen-landing .info-in { max-width:820px; margin:0 auto; }
#screen-landing .info-sec h2 { font-size:clamp(22px,4vw,30px); font-weight:800; letter-spacing:-.4px; color:var(--fk-ink); margin-bottom:16px; }
#screen-landing .info-lead { font-size:17px; line-height:1.6; color:var(--fk-ink); margin-bottom:12px; }
#screen-landing .info-sec p { font-size:15px; line-height:1.7; color:var(--fk-slate); margin-bottom:12px; }
#screen-landing .info-muted { font-size:13.5px; color:var(--fk-slate); }
#screen-landing .contact-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; margin-top:8px; }
#screen-landing .contact-card { background:#fff; border:1px solid var(--fk-line); border-radius:14px; padding:18px 20px; box-shadow:var(--shadow); }
#screen-landing .cc-label { font-size:12px; font-weight:800; letter-spacing:.6px; text-transform:uppercase; color:var(--fk-blue); margin-bottom:6px; }
#screen-landing .cc-value { font-size:15px; font-weight:600; color:var(--fk-ink); line-height:1.5; }
#screen-landing .cc-placeholder { color:var(--fk-slate); font-weight:500; font-style:italic; }
#screen-landing .cc-value a { color:var(--fk-blue-deep); font-weight:600; text-decoration:none; }
#screen-landing .cc-value a:hover { color:var(--fk-blue); text-decoration:underline; }
#screen-landing .fleet-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:12px; margin-top:8px; }
#screen-landing .fleet-card { background:#fff; border:1px solid var(--fk-line); border-radius:14px; padding:16px 18px; box-shadow:var(--shadow); }
#screen-landing .fleet-t { font-size:16px; font-weight:800; color:var(--fk-blue); line-height:1.2; }
#screen-landing .fleet-s { font-size:13px; color:var(--fk-slate); margin-top:4px; }
#screen-landing .bf-tagline { margin-top:12px; font-size:13.5px; font-weight:700; color:#cfe3f4; font-style:italic; }
.privacy-logo { display:block; height:44px; width:auto; margin:4px 0 14px; }

#screen-landing .info-sec h4 { font-size:15px; font-weight:800; color:var(--fk-ink); margin:18px 0 6px; }
#screen-landing .priv-list { margin:6px 0 4px 18px; padding:0; }
#screen-landing .priv-list li { font-size:14.5px; line-height:1.6; color:var(--fk-slate); margin-bottom:6px; }
#screen-landing .priv-list li b { color:var(--fk-ink); }

/* standalone privacy policy page */
.privacy-page { background:#fff; min-height:100vh; }
.privacy-wrap { max-width:820px; margin:0 auto; padding:22px 20px 70px; color:#12212f; }
.privacy-back { margin-bottom:12px; }
.privacy-wrap h1 { color:#031087; font-size:26px; font-weight:800; margin:6px 0 10px; }
.privacy-wrap h4 { color:#031087; font-size:15px; font-weight:800; margin:20px 0 6px; }
.privacy-wrap p { color:#5b6b86; font-size:15px; line-height:1.7; margin-bottom:12px; }
.privacy-wrap p b { color:#12212f; }
.privacy-muted { color:#7180a0 !important; font-size:13.5px !important; }
.privacy-wrap .priv-list { margin:6px 0 4px 18px; padding:0; }
.privacy-wrap .priv-list li { font-size:14.5px; line-height:1.6; color:#5b6b86; margin-bottom:6px; }
.privacy-wrap .priv-list li b { color:#12212f; }
.privacy-wrap .cc-placeholder { color:#7180a0; font-style:italic; }

/* cookie consent bar */
.cookie-bar { position:fixed; left:0; right:0; bottom:0; z-index:70; background:#031087; color:#fff;
  display:flex; align-items:center; justify-content:center; gap:16px; flex-wrap:wrap;
  padding:14px 20px; padding-bottom:calc(14px + env(safe-area-inset-bottom));
  box-shadow:0 -6px 24px rgba(0,0,0,.25); }
.cookie-text { font-size:13.5px; max-width:900px; line-height:1.5; }
.cookie-text a { color:#8ec9ff; font-weight:700; text-decoration:underline; cursor:pointer; }
.cookie-agree { background:#0f97ff; color:#fff; border:none; padding:11px 26px; border-radius:10px;
  font-weight:800; font-size:14px; cursor:pointer; white-space:nowrap; }
.cookie-agree:hover { background:#0b84e6; }
@media(max-width:720px){
  .cookie-bar { flex-direction:column; gap:10px; text-align:center; bottom:calc(64px + env(safe-area-inset-bottom)); padding-bottom:14px; }
  .cookie-agree { width:100%; }
}

#screen-landing .big-foot { background:var(--fk-blue-deep); color:#fff; }
#screen-landing .bf-in { max-width:1080px; margin:0 auto; padding:46px 20px 30px; display:grid;
  grid-template-columns:1.6fr 1fr 1fr 1fr; gap:26px; }
#screen-landing .bf-logo { height:40px; background:#fff; padding:6px 10px; border-radius:8px; }
#screen-landing .bf-addr { margin-top:16px; font-size:13px; line-height:1.7; color:#cfe3f4; max-width:34ch; }
#screen-landing .bf-col h5 { font-size:13px; letter-spacing:1px; text-transform:uppercase; margin-bottom:14px; color:#fff; }
#screen-landing .bf-col a { display:block; font-size:13.5px; color:#cfe3f4; margin-bottom:10px; cursor:pointer; }
#screen-landing .bf-col a:hover { color:#fff; }
#screen-landing .bf-bottom { border-top:1px solid rgba(255,255,255,.18); text-align:center; padding:18px; font-size:12.5px; color:#bcd7ee; }
@media(max-width:720px){ #screen-landing .bf-in{grid-template-columns:1fr 1fr;gap:22px} #screen-landing .bf-brand{grid-column:1 / -1} }

/* ============ AUTH MODAL ============ */
.auth-modal { position:fixed; inset:0; z-index:60; display:flex; align-items:center; justify-content:center; padding:20px; }
.auth-modal .auth-backdrop { position:absolute; inset:0; background:rgba(3,16,135,.45); backdrop-filter:blur(4px); }
.auth-dialog { position:relative; z-index:2; background:#fff; width:100%; max-width:400px; border-radius:22px;
  padding:30px 28px 26px; box-shadow:0 30px 80px rgba(3,16,135,.35); animation:authPop .18s ease-out; }
@keyframes authPop { from{ opacity:0; transform:translateY(12px) scale(.98); } to{ opacity:1; transform:none; } }
.auth-x { position:absolute; top:14px; right:16px; background:none; border:none; font-size:26px; line-height:1;
  color:#9aa6bf; cursor:pointer; }
.auth-x:hover { color:#031087; }
.auth-logo { display:block; max-width:200px; width:100%; margin:2px auto 16px; }
.auth-tabs { display:flex; background:#eef3fb; border-radius:12px; padding:4px; gap:4px; margin-bottom:20px; }
.auth-tab { flex:1; border:none; background:transparent; padding:11px; border-radius:9px; font-size:14px; font-weight:800;
  color:#5b6b86; cursor:pointer; }
.auth-tab.on { background:#fff; color:#031087; box-shadow:0 2px 6px rgba(3,16,135,.12); }
.auth-role { display:flex; gap:8px; background:#eef3fb; border-radius:12px; padding:4px; margin-bottom:14px; }
.auth-role-opt { flex:1; border:none; background:transparent; padding:10px; border-radius:9px; font-size:13.5px;
  font-weight:800; color:#5b6b86; cursor:pointer; }
.auth-role-opt.on { background:#fff; color:#031087; box-shadow:0 2px 6px rgba(3,16,135,.12); }
.auth-form .field { display:flex; align-items:center; gap:9px; border:1.5px solid #e5ecf5; border-radius:12px;
  padding:0 13px; margin-bottom:12px; background:#f6f9fd; }
.auth-form .field:focus-within { border-color:#0f97ff; background:#fff; box-shadow:0 0 0 3px rgba(15,151,255,.14); }
.auth-form .field-ico { width:20px; height:20px; flex-shrink:0; stroke:#0f97ff; stroke-width:1.9; fill:none;
  stroke-linecap:round; stroke-linejoin:round; }
.auth-form .field input { border:none; background:transparent; padding:13px 2px; width:100%; font-size:15px; outline:none; color:#12212f; }
.auth-submit { width:100%; background:#031087; color:#fff; border:none; padding:14px; border-radius:12px; font-weight:800;
  font-size:15px; cursor:pointer; box-shadow:0 10px 22px rgba(3,16,135,.28); transition:.15s; }
.auth-submit:hover { background:#020c66; }
.auth-hint { text-align:center; font-size:12.5px; color:#7180a0; margin-top:14px; }
.auth-msg { text-align:center; font-size:13.5px; font-weight:600; margin-top:10px; }
.auth-msg.ok { color:#12855a; } .auth-msg.err { color:#d64550; }

/* Printable waybill fits SHORT BOND (Letter 8.5 x 11 in) */
@page { size: Letter portrait; margin: 0.5in; }
@media print {
  body { background: #fff; }
  .topbar, .bottom-nav, #bottomNav, .no-print, .toast, .cookie-bar, .landing-nav-bottom, .side-rail { display: none !important; }
  #appBody { padding: 0; }
  .screen:not(#screen-waybill-print) { display: none !important; }
  #screen-waybill-print { display: block !important; }
  #screen-waybill-print .container { padding: 0; }

  .waybill-sheet {
    box-shadow: none; border: none; margin: 0; border-radius: 0;
    width: 100%; max-width: 100%; padding: 0.1in 0.15in;
    page-break-inside: avoid; overflow: hidden;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  /* keep the watermark visible but clipped inside the page */
  .watermark { font-size: 150px; color: rgba(15,47,82,.07); }
  /* ensure barcode + QR never overflow the printable width */
  #wbBarcode { width: 100%; max-width: 100%; height: auto; }
  .wb-qr img, .wb-qr canvas { width: 90px; height: 90px; }
  .wb-logo { height: 46px; }
}

/* ---------- bulk CSV import ---------- */
.row-between { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.bulk-summary { padding:12px 14px; border-radius:10px; font-size:14px; margin-bottom:12px;
  background:var(--sky-soft); color:var(--navy); border:1px solid var(--line); }
.bulk-summary.ok { background:#e9f8ee; border-color:#bfe6ca; color:#1c6b34; }
.bulk-summary.warn { background:#fff5e6; border-color:#f2d9a8; color:#8a5a00; }
.bulk-bad { color:#c0392b; font-weight:700; }
.bulk-table-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:10px; background:#fff; }
.bulk-table { width:100%; border-collapse:collapse; font-size:13px; }
.bulk-table th, .bulk-table td { text-align:left; padding:8px 10px; border-bottom:1px solid var(--line); white-space:nowrap; }
.bulk-table th { background:#f6f9fb; color:var(--muted); font-weight:700; }
.bulk-table tr:last-child td { border-bottom:none; }
.bulk-row-bad { background:#fdf1f0; }
.tag { display:inline-block; padding:2px 8px; border-radius:999px; font-size:11px; font-weight:700; }
.tag-ok { background:#e9f8ee; color:#1c6b34; }
.tag-bad { background:#fdecea; color:#c0392b; }
.wb-chip { display:inline-block; margin:4px 6px 0 0; padding:4px 10px; border-radius:8px;
  background:var(--sky-soft); color:var(--navy); font-size:12.5px; font-weight:700; font-family:monospace; }
.bulk-numbers { margin-bottom:10px; }
.skip-line { font-size:13px; padding:4px 0; border-bottom:1px solid var(--line); }

/* inline text link (used in hints) */
.link-inline { color:var(--sky); font-weight:700; cursor:pointer; text-decoration:underline; }

/* ---------- clickable dashboard cards (usability) ---------- */
.tappable { cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.tappable:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(3,16,135,.12); }
.tappable:active { transform: translateY(0); box-shadow: 0 3px 8px rgba(3,16,135,.10); }
.tappable:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.stat-box.tappable:hover { border-color: var(--sky); }
/* chevron affordance on the hero (points to the profile page) */
.hero { position: relative; }
.hero-chev { margin-left: auto; display: flex; opacity: .8; }
.hero-chev svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hero.tappable:hover .hero-chev { opacity: 1; transform: translateX(2px); transition: transform .12s ease; }

/* ---------- profile picture ---------- */
.profile-avatar.has-photo { background-size: cover; background-position: center; color: transparent; }
.profile-avatar-btn { position: relative; display: inline-block; border: none; background: none; padding: 0; cursor: pointer; }
.avatar-edit { position: absolute; right: 2px; bottom: 2px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--navy); display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.avatar-edit svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.profile-avatar-btn:hover .avatar-edit { background: var(--navy2); }
/* topbar avatar chip */
.topbar-avatar { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--sky-soft);
  background: var(--navy); color: #fff; font-weight: 800; font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0; background-size: cover; background-position: center; }
.topbar-avatar.has-photo { color: transparent; }
.topbar-avatar:hover { border-color: var(--sky); }

/* ---------- splash screen (static: logo + company name, no animation) ---------- */
#splash { position: fixed; inset: 0; z-index: 9999; background: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: 1; transition: opacity .4s ease; }
#splash.hide { opacity: 0; pointer-events: none; }
.splash-inner { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 24px; }
.splash-logo { width: 140px; height: auto; }
.splash-name { margin-top: 22px; font-size: clamp(14px, 3.4vw, 18px); font-weight: 900; letter-spacing: .5px;
  color: var(--navy); }

/* ---------- modern file inputs (Choose File) ---------- */
input[type="file"]:not([hidden]) {
  display: block; width: 100%; box-sizing: border-box; font-size: 13.5px; color: var(--muted);
  border: 1.5px dashed var(--line); border-radius: 12px; padding: 9px 12px; background: #fff;
  cursor: pointer; transition: border-color .15s ease, background .15s ease; }
input[type="file"]:not([hidden]):hover { border-color: var(--sky); background: var(--sky-soft); }
input[type="file"]:not([hidden]):focus-visible { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(15,151,255,.18); }
/* the actual "Choose File" button — FK navy pill, standard + WebKit selectors */
input[type="file"]:not([hidden])::file-selector-button,
input[type="file"]:not([hidden])::-webkit-file-upload-button {
  margin-right: 12px; padding: 9px 16px; border: none; border-radius: 9px; background: var(--navy);
  color: #fff; font-weight: 700; font-size: 13px; cursor: pointer; transition: background .15s ease; }
input[type="file"]:not([hidden]):hover::file-selector-button { background: var(--navy2); }
input[type="file"]:not([hidden])::file-selector-button:hover { background: var(--sky); }

/* ---------- ePOD clickable rows + image lightbox ---------- */
.pod-item { cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease; }
.pod-item:hover { border-color: var(--sky); box-shadow: 0 6px 18px rgba(3,16,135,.10); transform: translateY(-1px); }
.pod-item:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.pod-thumb { height: 46px; width: 46px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); }

.lightbox { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(3,16,135,.55); }
.lb-panel { position: relative; background: #fff; border-radius: 16px; padding: 16px; max-width: 640px; width: 100%;
  max-height: 90vh; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 24px 70px rgba(0,0,0,.45); }
.lb-head { display: flex; align-items: center; justify-content: space-between; }
#lbTitle { font-weight: 800; color: var(--navy); font-size: 15px; }
.lb-x { border: none; background: var(--bg); width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  font-size: 15px; color: var(--muted); line-height: 1; }
.lb-x:hover { background: var(--sky-soft); color: var(--navy); }
.lb-img { width: 100%; max-height: 68vh; object-fit: contain; border-radius: 10px; background: var(--bg); }
.lb-panel .btn { align-self: center; min-width: 160px; text-align: center; }

/* small helper text under an input */
.input-hint { font-size: 12px; margin: 6px 2px 2px; }

/* ---------- manual deliveries ---------- */
.manual-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; }
.manual-filters select, .manual-filters input[type="date"] {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 11px; font-size: 13px;
  background: #fff; color: var(--text); }
.manual-filters select:focus, .manual-filters input:focus { outline: none; border-color: var(--sky); }
.md-item { cursor: pointer; transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease; }
.md-item:hover { border-color: var(--sky); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(3,16,135,.10); }
.md-item:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.md-pods { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.md-pod { display: flex; flex-direction: column; align-items: center; gap: 6px; }

/* ---------- delivery attempt dates ---------- */
.attempt-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.attempt-lbl { flex: 0 0 74px; margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.attempt-date { flex: 1; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 11px;
  font-size: 14px; background: #fff; color: var(--text); }
.attempt-date:focus { outline: none; border-color: var(--sky); }
.attempt-date:disabled { background: var(--bg); color: var(--muted); }
.attempt-clear { flex: 0 0 auto; }
.tl-attempt { border-left: 3px solid var(--amber); }
.tl-attempt .tl-status { color: var(--navy); font-weight: 700; }

/* ---------- persistent import error banner ---------- */
.import-error { background: #fdecea; border: 1px solid #f5b5ad; color: #b02a1e; border-radius: 10px;
  padding: 11px 14px; font-size: 13.5px; font-weight: 600; }

/* ---------- actionable empty state ---------- */
.empty-state { text-align: center; padding: 34px 18px; background: var(--card);
  border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-state .es-title { font-size: 16px; font-weight: 800; color: var(--navy); margin: 0 0 4px; }
.empty-state .muted { margin: 0 0 14px; }
.empty-state .btn { display: inline-flex; }

/* ---------- manual delivery: unassigned flag ---------- */
.md-pills { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pill-unassigned { font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 20px;
  background: #fff4e5; color: #b26a00; border: 1px solid #f2d9a8; white-space: nowrap; }

/* ---------- duplicate detection UI ---------- */
.tag-dup { background: #fff4e5; color: #b26a00; border: 1px solid #f2d9a8; }
.bulk-row-dup { background: #fffaf2; }
.dup-toggle { display: inline-flex; margin-top: 6px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.dup-toggle .dt { border: none; background: #fff; color: var(--muted); font-size: 12px; font-weight: 700;
  padding: 5px 12px; cursor: pointer; }
.dup-toggle .dt + .dt { border-left: 1px solid var(--line); }
.dup-toggle .dt.on { background: var(--navy); color: #fff; }
.dup-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
  padding: 10px 12px; background: #fff4e5; border: 1px solid #f2d9a8; border-radius: 10px;
  font-size: 13px; font-weight: 600; color: #8a5a00; }
.dupe-group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.dupe-head { font-weight: 800; color: var(--navy); font-size: 14px; margin-bottom: 8px; }
.pill-orig { font-size: 10.5px; font-weight: 800; padding: 2px 8px; border-radius: 20px;
  background: #e4f5eb; color: var(--green); border: 1px solid #bfe6ca; margin-left: 4px; }
.pill-newer { font-size: 10.5px; font-weight: 800; padding: 2px 8px; border-radius: 20px;
  background: #fdecea; color: #c0392b; border: 1px solid #f5b5ad; margin-left: 4px; }
.tag-view { font-size: 12px; font-weight: 700; color: var(--sky); white-space: nowrap; }

/* ---------- POD action buttons (download / delete) ---------- */
.md-pod-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.md-pod-actions .btn { text-align: center; }

/* ---------- delete-control UX: bigger hit targets + persistent error banner ---------- */
.row-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
/* Whole button area is clickable, not just the text — with a comfortable min hit target. */
.list-item .btn-sm, .md-pod-actions .btn-sm {
  min-height: 38px; min-width: 64px; display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 14px; line-height: 1; }
.global-error { position: fixed; left: 50%; transform: translateX(-50%);
  top: calc(10px + env(safe-area-inset-top)); z-index: 10001; max-width: min(92vw, 560px);
  display: flex; align-items: center; gap: 12px; background: #fdecea; border: 1px solid #f5b5ad;
  color: #b02a1e; border-radius: 12px; padding: 12px 14px; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.global-error button { border: none; background: transparent; color: #b02a1e; font-size: 16px;
  cursor: pointer; line-height: 1; padding: 2px 4px; }

/* ---------- driver link-state pills + detail driver line ---------- */
.pill-linked { display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 20px;
  background: #e7f0f8; color: #1466a8; border: 1px solid #bcd6ea; white-space: nowrap; margin-left: 6px; }
.pill-notlinked { display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 20px;
  background: #eef1f4; color: #6b7a86; border: 1px solid #dfe4e9; white-space: nowrap; margin-left: 6px; }
.pr-val { text-align: right; }
.pr-val b { color: var(--navy); }
.md-sheet { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- Phase 1: password toggle, COD, caps, inline msgs ---------- */
.pw-toggle { border: none; background: transparent; padding: 4px 2px; cursor: pointer; display: flex; align-items: center; }
.pw-toggle svg { width: 20px; height: 20px; stroke: var(--gray); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.pw-toggle .pw-slash { display: none; }
.pw-toggle.showing .pw-slash { display: inline; }
.pw-toggle.showing svg { stroke: #1466a8; }
/* uppercase display on manual-delivery free-text inputs (value is also uppercased on submit) */
#mnBrand, #mnOrder, #mnPlate, #mnDropoff, #mnStore, #mnDriver,
#mdaBrand, #mdaOrder, #mdaPlate, #mdaDropoff, #mdaDriverName { text-transform: uppercase; }
.cod-switch { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600;
  color: var(--text); cursor: pointer; padding: 10px 0; }
.cod-switch input { width: 18px; height: 18px; accent-color: #1466a8; }
.cod-chip { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 8px;
  background: #e7f0f8; color: #1466a8; border: 1px solid #bcd6ea; white-space: nowrap; }
.field-msg { font-size: 13px; font-weight: 600; color: #b02a1e; margin: 6px 2px 0; }

/* ---------- Phase 2: offline queue + photo picker + awaiting ---------- */
.sync-banner { background: #e7f0f8; border: 1px solid #bcd6ea; color: #1466a8; border-radius: 12px;
  padding: 10px 14px; font-size: 13px; font-weight: 700; margin: 4px 0 10px; }
.sync-banner.err { background: #fdecea; border-color: #f5b5ad; color: #b02a1e; }
.q-pill { font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.q-pill.q-pending { background: #fff4e5; color: #b26a00; border: 1px solid #f2d9a8; }
.q-pill.q-failed { background: #fdecea; color: #b02a1e; border: 1px solid #f5b5ad; }
.photo-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.photo-thumb { position: relative; width: 68px; height: 68px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; padding: 0; }
.input-hint.err { color: #b02a1e; font-weight: 700; }
.input-hint.ok { color: #1c6b34; font-weight: 700; }
.pill-awaiting { display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 20px;
  background: #fff4e5; color: #b26a00; border: 1px solid #f2d9a8; white-space: nowrap; }
.pill-awaiting.stale { background: #fdecea; color: #b02a1e; border-color: #f5b5ad; }

/* ---------- v61: other-account note + queued-detail thumbs ---------- */
.sync-banner.other { background: #eef1f4; border-color: #dfe4e9; color: #6b7a86; }
.photo-thumb.ph-done { display: flex; align-items: center; justify-content: center;
  background: #e9f8ee; color: #1c6b34; font-weight: 900; font-size: 22px; }

/* ---------- Phase 3: auth links ---------- */
.auth-link { display: inline-block; margin-top: 12px; color: #1466a8; font-weight: 700; font-size: 13px;
  cursor: pointer; text-decoration: underline; background: none; border: none; }
