/* HADI HOME mobile design system — shared by the Customer, Rider and SACCO apps */

@font-face {
  font-family: "Jakarta";
  src: url("fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Jakarta";
  src: url("fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --brand-900: #062e1b;
  --brand-800: #09452a;
  --brand-700: #0b663a;
  --brand-600: #0f7f47;
  --brand-500: #17a05a;
  --brand-100: #d9f2e3;
  --brand-50: #edf9f1;
  --accent: #c5f06a;
  --ink-900: #0e1c15;
  --ink-700: #33463b;
  --ink-500: #62766a;
  --ink-400: #86988d;
  --ink-300: #b3c0b8;
  --line: #e5ebe7;
  --bg: #f5f7f5;
  --surface: #ffffff;
  --danger: #c9362c;
  --danger-100: #fcebe9;
  --amber: #9a6208;
  --amber-100: #fdf1d8;
  --info: #1f57c3;
  --info-100: #e6eefc;
  --r-lg: 20px;
  --r-md: 16px;
  --r-sm: 12px;
  --shadow: 0 1px 2px rgba(14, 28, 21, 0.05), 0 6px 18px rgba(14, 28, 21, 0.05);
  --font: "Jakarta", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font);
  color: var(--ink-900);
  background: radial-gradient(1200px 700px at 70% -10%, #e3f3e9 0%, #eef1ee 55%, #e8ece9 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button, input, textarea, select { font-family: inherit; letter-spacing: inherit; }
button { -webkit-tap-highlight-color: transparent; color: inherit; }
a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
h1, h2, h3, p { text-wrap: pretty; }

/* =============== Preview page and device frame =============== */
.page-wrap { height: 100vh; height: 100dvh; overflow: hidden; padding: 20px 24px; }
.page-body { display: flex; height: 100%; align-items: center; justify-content: center; gap: 56px; }
.page-header { width: 260px; flex-shrink: 0; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-badge {
  width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--brand-500), var(--brand-800));
  color: #fff; font-weight: 800; font-size: 15px; letter-spacing: -0.02em;
}
.brand-text { font-weight: 800; font-size: 17px; line-height: 1.2; color: var(--brand-900); letter-spacing: -0.01em; }
.brand-text small { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink-500); letter-spacing: 0; }
.page-sub { margin: 16px 0 0; font-size: 13px; line-height: 1.6; color: var(--ink-500); }
.device-switch { display: inline-flex; margin-top: 22px; padding: 4px; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 999px; }
.device-switch button { border: 0; background: none; border-radius: 999px; padding: 8px 16px; font-size: 12.5px; font-weight: 700; color: var(--ink-500); cursor: pointer; }
.device-switch button.is-active { background: var(--brand-900); color: #fff; }
.page-links { display: flex; flex-direction: column; gap: 8px; margin-top: 22px; align-items: flex-start; }
.page-links a, .page-links button { border: 0; background: none; padding: 0; font-size: 12.5px; font-weight: 700; color: var(--brand-700); text-decoration: none; cursor: pointer; }

.phone-shell { display: flex; align-items: center; justify-content: center; }
.stage { position: relative; }
.device { position: absolute; top: 0; left: 0; transform-origin: top left; padding: 12px; }

html { --dw: 360px; --dh: 800px; --radius: 38px; --sb: 34px; --hi: 22px; }
html[data-device="iphone"] { --dw: 393px; --dh: 852px; --radius: 54px; --sb: 54px; --hi: 30px; }

.device::before {
  content: ""; position: absolute; inset: 0;
  border-radius: calc(var(--radius) + 12px);
  background: #101312;
  box-shadow: inset 0 0 0 2px #4a524e, inset 0 0 0 4px #1b201e, 0 40px 70px -20px rgba(6, 25, 15, 0.45), 0 12px 28px rgba(6, 25, 15, 0.18);
}
.device::after {
  content: ""; position: absolute; right: -3px; top: 180px; width: 4px; height: 70px;
  border-radius: 0 3px 3px 0; background: #2c3230;
  box-shadow: 0 -92px 0 0 #2c3230;
}

.phone {
  position: relative; z-index: 1; isolation: isolate;
  width: var(--dw); height: var(--dh);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--bg);
}

.status-bar {
  height: var(--sb); flex-shrink: 0; position: relative; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 2px 22px 0;
  font-size: 13px; font-weight: 700; color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}
html[data-device="iphone"] .status-bar { padding: 4px 30px 0 40px; font-size: 16.5px; }
.status-icons { display: flex; align-items: center; gap: 6px; }
.camera { position: absolute; left: 50%; top: 11px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #05070a; box-shadow: inset 0 0 0 3px #14181c; }
html[data-device="iphone"] .camera { top: 11px; width: 120px; height: 35px; margin-left: -60px; border-radius: 20px; box-shadow: none; }

.home-indicator { height: var(--hi); flex-shrink: 0; position: relative; background: var(--surface); z-index: 40; }
.home-indicator::after { content: ""; position: absolute; left: 50%; bottom: 8px; width: 112px; height: 4px; margin-left: -56px; border-radius: 4px; background: var(--ink-900); opacity: 0.85; }
html[data-device="iphone"] .home-indicator::after { width: 134px; height: 5px; margin-left: -67px; }
.phone.no-tabs .home-indicator { background: var(--bg); }

/* Full-bleed screens (splash): content runs under a light status bar */
.phone.is-immersive .status-bar { position: absolute; left: 0; right: 0; top: 0; color: #fff; }
.phone.is-immersive .home-indicator { position: absolute; left: 0; right: 0; bottom: 0; background: transparent; pointer-events: none; }
.phone.is-immersive .home-indicator::after { background: #fff; }

/* =============== Screens =============== */
.screens { position: relative; flex: 1; min-height: 0; }
.screen {
  position: absolute; inset: 0;
  display: none; flex-direction: column;
  padding: 0 20px 16px;
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: none;
  animation: screen-in 0.24s ease both;
}
.screen::-webkit-scrollbar { display: none; }
.screen > * { flex-shrink: 0; }
.screen.active { display: flex; }
@keyframes screen-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

.screen-header {
  position: sticky; top: 0; z-index: 25;
  display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 10px;
  margin: 0 -20px 6px; padding: 8px 20px 10px;
  background: var(--bg);
}
.screen-header h2 { margin: 0; text-align: center; font-size: 17px; font-weight: 800; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spacer { width: 40px; }
.icon-btn {
  position: relative;
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer;
}
.icon-btn:active { background: var(--brand-50); }

.large-title { margin: 8px 0 4px; font-size: 24px; font-weight: 800; letter-spacing: -0.025em; }
.lead { margin: 0 0 18px; font-size: 14px; line-height: 1.55; color: var(--ink-500); }
.step-label { margin: 0 0 14px; font-size: 12.5px; font-weight: 600; color: var(--ink-500); }
.step-label strong { color: var(--ink-900); }

/* =============== Buttons =============== */
.btn {
  width: 100%; min-height: 52px; padding: 14px 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--r-md);
  font-size: 15px; font-weight: 700; letter-spacing: -0.005em; line-height: 1.2;
  text-align: center; text-decoration: none; cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.985); }
.btn-primary { background: var(--brand-700); color: #fff; box-shadow: 0 8px 18px -6px rgba(11, 102, 58, 0.5); }
.btn-primary:active { background: var(--brand-800); }
.btn-primary:disabled { background: #dbe5df; color: #8ea597; box-shadow: none; cursor: not-allowed; transform: none; }
.btn-ghost { background: var(--surface); color: var(--brand-700); border: 1px solid var(--line); margin-top: 10px; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-ghost { background: var(--surface); color: var(--danger); border: 1px solid #f2cdca; margin-top: 10px; }
.btn-fixed { margin-top: auto; position: sticky; bottom: 0; z-index: 20; }
.btn-fixed.btn-primary { box-shadow: 0 0 0 8px var(--bg), 0 12px 18px -6px rgba(11, 102, 58, 0.4); }
.btn-fixed:not(.btn-primary) { box-shadow: 0 0 0 8px var(--bg); }
* + .btn-fixed { margin-top: auto; }
.screen > .btn-fixed:not(:first-child) { margin-top: auto; }
.screen > :has(+ .btn-fixed) { margin-bottom: 16px; }
.action-bar { margin-top: auto; position: sticky; bottom: -16px; z-index: 20; padding: 12px 0 16px; margin-bottom: -16px; background: linear-gradient(180deg, rgba(245, 247, 245, 0), var(--bg) 18px); }
.screen > :has(+ .action-bar) { margin-bottom: 4px; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { margin-top: 0; }
.link-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; padding: 4px 0; border: 0; background: none; font-size: 13px; font-weight: 700; color: var(--brand-700); cursor: pointer; }
.link-center { align-self: center; margin: 12px 0 0; }
.link-danger { align-self: center; margin: 14px 0 2px; border: 0; background: none; font-size: 13px; font-weight: 700; color: var(--danger); cursor: pointer; }
.job-accept-btn { width: auto; min-height: 40px; padding: 10px 14px; font-size: 13px; border-radius: var(--r-sm); white-space: nowrap; flex-shrink: 0; box-shadow: none; }

/* =============== Splash and auth =============== */
.screen[data-screen="splash"] { padding: 0; }
.splash {
  flex: 1; display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--sb) + 40px) 24px calc(var(--hi) + 18px);
  color: #fff;
  background:
    linear-gradient(180deg, rgba(4, 30, 17, 0.92) 0%, rgba(4, 30, 17, 0.78) 30%, rgba(4, 30, 17, 0.2) 48%, rgba(4, 30, 17, 0.62) 66%, rgba(4, 28, 16, 0.97) 86%),
    url("../tuktuk.jpg") center 62% / cover no-repeat;
}
.splash-art { text-align: center; }
.splash-logo-badge { width: 84px; height: 84px; margin: 0 auto 20px; border-radius: 26px; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 18px 34px rgba(0, 0, 0, 0.3); }
.splash h1 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.brand-by { margin: 6px 0 0; font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.tagline { margin: 12px 0 0; font-size: 15px; font-weight: 500; color: rgba(255, 255, 255, 0.88); }
.splash .btn-primary { background: #fff; color: var(--brand-800); box-shadow: 0 14px 28px rgba(0, 0, 0, 0.3); }
.splash-login-hint { margin: 16px 0 0; text-align: center; font-size: 13.5px; color: rgba(255, 255, 255, 0.82); }
.splash-login-hint a { color: #fff; font-weight: 700; }

.login-form { display: flex; flex-direction: column; flex: 1; }
.login-lead { margin: 0 0 20px; font-size: 14px; line-height: 1.55; color: var(--ink-500); }
.forgot-link { align-self: flex-end; margin: -4px 0 18px; font-size: 13px; font-weight: 700; color: var(--brand-700); text-decoration: none; }
.signup-hint { margin: auto 0 0; padding-top: 20px; text-align: center; font-size: 13.5px; color: var(--ink-500); }
.signup-hint a { color: var(--brand-700); font-weight: 700; text-decoration: none; }

.otp-row { display: flex; gap: 8px; justify-content: space-between; margin-bottom: 16px; }
.otp-row input { width: 0; flex: 1; height: 58px; text-align: center; font-size: 22px; font-weight: 800; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); outline: none; }
.otp-row input:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }

/* =============== Forms =============== */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; font-size: 13px; font-weight: 700; color: var(--ink-700); }
.field input, .field select, textarea {
  width: 100%; min-height: 50px; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface);
  font-size: 15px; font-weight: 500; color: var(--ink-900); outline: none;
}
textarea { resize: none; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--ink-300); font-weight: 500; }
.field input:focus, .field select:focus, textarea:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.field-label { display: block; margin: 4px 0 8px; font-size: 13px; font-weight: 700; color: var(--ink-700); }
.field-note { display: block; margin-top: 2px; font-style: normal; font-weight: 500; font-size: 12px; color: var(--ink-500); }
.field-error { margin: -4px 0 12px; font-size: 12.5px; font-weight: 600; color: var(--danger); }
.checkbox-field { display: flex; align-items: center; gap: 10px; margin: 2px 0 14px; font-size: 14px; font-weight: 600; color: var(--ink-700); cursor: pointer; }
.checkbox-field input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand-600); }

/* =============== Home =============== */
.home-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0 16px; }
.home-top-actions { display: flex; align-items: center; gap: 10px; }
.greeting { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink-500); }
.user-name { margin: 1px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -0.025em; }
.sacco-sub { margin: 1px 0 0; font-size: 12px; font-weight: 600; color: var(--ink-500); }
.avatar-btn { width: 40px; height: 40px; flex-shrink: 0; border: 0; border-radius: 14px; background: var(--brand-900); color: var(--accent); font-weight: 800; font-size: 14px; cursor: pointer; }
.notif-dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); border: 1.5px solid #fff; }

.hero-card {
  position: relative; overflow: hidden;
  display: block; width: 100%; text-align: left; cursor: pointer;
  padding: 18px 20px; border: 0; border-radius: var(--r-lg);
  color: #fff;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-900) 75%);
  box-shadow: 0 16px 30px -14px rgba(6, 46, 27, 0.65);
}
.hero-card::after { content: ""; position: absolute; width: 170px; height: 170px; right: -50px; top: -70px; border-radius: 50%; border: 28px solid rgba(197, 240, 106, 0.12); }
.hero-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.78); }
.hero-amount { display: block; margin-top: 4px; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.hero-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.78); }
.hero-pill { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: 999px; background: var(--accent); color: var(--brand-900); font-size: 12px; font-weight: 800; white-space: nowrap; }

.home-cta { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 14px 14px 14px 16px; border-radius: var(--r-md); background: var(--brand-50); border: 1px solid var(--brand-100); }
.home-cta-text { flex: 1; min-width: 0; }
.home-cta-text strong { display: block; font-size: 14px; font-weight: 800; color: var(--brand-900); }
.home-cta-text span { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-500); }
.home-cta-btn { width: auto; min-height: 42px; padding: 10px 18px; font-size: 13.5px; box-shadow: none; flex-shrink: 0; }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0 4px; }
.quick-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0; border: 0; background: none; font-size: 11.5px; font-weight: 700; color: var(--ink-700); cursor: pointer; text-align: center; }
.tile-icon { width: 56px; height: 56px; border-radius: 18px; display: flex; align-items: center; justify-content: center; background: var(--surface); color: var(--brand-700); box-shadow: var(--shadow); }
.quick-tile.primary .tile-icon { background: var(--brand-700); color: #fff; }

.stat-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; margin: 12px 0; }
.stat-grid-2 { grid-template-columns: 1fr 1fr; }
.stat-tile { display: flex; flex-direction: column; gap: 3px; padding: 13px 12px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); }
.stat-value { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-label { font-size: 11px; font-weight: 600; color: var(--ink-500); line-height: 1.35; }

.online-toggle-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; margin-bottom: 12px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); }
.online-toggle-card strong { display: block; font-size: 14px; font-weight: 800; }
.online-toggle-card span { display: block; margin-top: 1px; font-size: 12px; color: var(--ink-500); }
.toggle-switch { position: relative; width: 52px; height: 30px; flex-shrink: 0; border: 0; border-radius: 999px; background: var(--ink-300); cursor: pointer; transition: background 0.2s ease; }
.toggle-switch.is-on { background: var(--brand-500); }
.toggle-knob { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.22); transition: transform 0.2s ease; }
.toggle-switch .toggle-knob { margin: 0; }
.toggle-switch.is-on .toggle-knob { transform: translateX(22px); }

.section-block { margin-top: 18px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.section-heading h3 { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: -0.01em; }
.section-heading a { font-size: 12.5px; font-weight: 700; color: var(--brand-700); text-decoration: none; }

.activity-item, .tx-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  margin-bottom: 8px; padding: 12px 14px;
  border: 0; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow);
  text-align: left; cursor: pointer;
}
.activity-dot { width: 9px; height: 9px; flex-shrink: 0; border-radius: 50%; background: var(--ink-300); }
.activity-dot.done { background: var(--brand-500); }
.activity-dot.pending { background: #e09a14; }
.activity-dot.approved { background: var(--info); }
.activity-dot.awaiting { background: #7c4fd0; }
.activity-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.activity-text strong { font-size: 13.5px; font-weight: 700; }
.activity-text span { font-size: 12px; color: var(--ink-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-amount { flex-shrink: 0; font-size: 13.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.empty-state { margin: 0; padding: 36px 16px; text-align: center; font-size: 13.5px; font-weight: 600; color: var(--ink-400); }

/* =============== Option rows =============== */
.option-list { display: flex; flex-direction: column; gap: 10px; }
.option-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 14px; border: 1.5px solid transparent; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); text-align: left; cursor: pointer; }
.option-row.is-selected { border-color: var(--brand-600); background: var(--brand-50); }
.option-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: var(--brand-50); color: var(--brand-700); }
.option-row.is-selected .option-icon { background: var(--brand-700); color: #fff; }
.option-text { flex: 1; font-size: 14.5px; font-weight: 700; }
.option-text-col { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.option-text-col .option-text { flex: none; }
.option-sub { font-size: 12px; font-weight: 500; color: var(--ink-500); }
.option-price { flex-shrink: 0; font-size: 14.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.option-chevron { display: flex; color: var(--ink-300); }
.option-radio { position: relative; width: 20px; height: 20px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--ink-300); }
.option-row-radio.is-selected .option-radio { border-color: var(--brand-600); }
.option-row-radio.is-selected .option-radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--brand-600); }

/* =============== Locations and maps =============== */
.search-field-wrap { position: relative; margin-bottom: 8px; z-index: 22; }
.search-field { display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--brand-700); }
.search-field:focus-within { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.search-field input { flex: 1; min-width: 0; height: 50px; border: 0; background: none; outline: none; font-size: 14.5px; font-weight: 500; color: var(--ink-900); }
.suggestions { position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: 230px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); box-shadow: 0 18px 34px rgba(14, 28, 21, 0.16); }
.suggestions li { padding: 10px; border-radius: 8px; font-size: 13px; line-height: 1.4; color: var(--ink-700); cursor: pointer; }
.suggestions li:hover, .suggestions li:active { background: var(--brand-50); }
.suggestions li.suggestions-empty { color: var(--ink-400); cursor: default; }
.map-wrap { position: relative; isolation: isolate; flex: 1 0 auto; min-height: 180px; margin-bottom: 14px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.leaflet-map { position: absolute; inset: 0; background: #e2efe5; font-family: var(--font); }
.leaflet-container .leaflet-control-attribution { font-size: 9px; }
.leaflet-pin-icon { background: none; border: 0; }
.map-preview { flex: 0 0 auto; height: 150px; min-height: 0; margin-bottom: 8px; }
.live-map-wrap { min-height: 420px; }
.track-map-wrap { min-height: 170px; margin-bottom: 12px; }
.job-popup-btn { margin-top: 8px; padding: 7px 12px; border: 0; border-radius: 8px; background: var(--brand-700); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }

.address-card { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); }
.address-card strong { font-size: 14px; font-weight: 700; line-height: 1.45; }
.address-tag { font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-600); }

/* =============== Parcel size and quantity =============== */
.qty-stepper { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.qty-btn { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-size: 20px; font-weight: 700; line-height: 1; color: var(--brand-700); cursor: pointer; }
.qty-value { min-width: 24px; text-align: center; font-size: 18px; font-weight: 800; }
.estimate-hint { margin: 0; font-size: 13px; font-weight: 700; color: var(--brand-700); }
#packageInstructions { min-height: 50px; }
.info-note { display: flex; gap: 10px; margin: 14px 0; padding: 12px 14px; border-radius: var(--r-sm); background: var(--brand-50); font-size: 12.5px; font-weight: 500; line-height: 1.55; color: var(--ink-700); }
.info-note svg { flex-shrink: 0; margin-top: 1px; color: var(--brand-700); }
.info-note.warn { background: var(--amber-100); }
.info-note.warn svg { color: var(--amber); }

/* =============== Summary cards =============== */
.summary-card, .receipt-panel { display: flex; flex-direction: column; gap: 11px; margin-bottom: 14px; padding: 16px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); }
.receipt-panel { width: 100%; margin-top: 12px; text-align: left; }
.summary-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; font-size: 13px; }
.summary-row span { color: var(--ink-500); font-weight: 500; }
.summary-row strong { max-width: 64%; text-align: right; font-weight: 700; overflow-wrap: anywhere; }
.summary-total { align-items: center; padding-top: 11px; border-top: 1px dashed var(--ink-300); }
.summary-total span { color: var(--ink-900); font-weight: 700; font-size: 14px; }
.summary-total strong { font-size: 18px; font-weight: 800; color: var(--brand-700); font-variant-numeric: tabular-nums; }

/* =============== Progress, success, failure =============== */
.rider-searching, .center-state { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px 8px; text-align: center; font-size: 14px; font-weight: 600; line-height: 1.6; color: var(--ink-500); }
.center-state h2 { margin: 0; font-size: 20px; font-weight: 800; color: var(--ink-900); letter-spacing: -0.02em; }
.center-state p { margin: 0; max-width: 290px; }
.center-state .big { font-size: 30px; font-weight: 800; color: var(--ink-900); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.spinner { width: 52px; height: 52px; border-radius: 50%; border: 5px solid var(--brand-100); border-top-color: var(--brand-600); animation: spin 0.85s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.rider-found-ping, .accept-ping { position: relative; flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 90px; }
.accept-ping { flex: 0 0 auto; margin: 6px 0; gap: 8px; }
.accept-ping p { margin: 0; font-size: 14px; font-weight: 800; color: var(--brand-700); text-align: center; }
.ping-ring { position: absolute; width: 66px; height: 66px; border-radius: 50%; border: 3px solid var(--brand-500); animation: ping-ring 1s ease-out infinite; opacity: 0; }
.accept-ping .ping-ring { top: 8px; }
.ping-check { width: 62px; height: 62px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--brand-600); animation: pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes ping-ring { from { transform: scale(0.6); opacity: 0.9; } to { transform: scale(1.8); opacity: 0; } }
@keyframes pop { from { transform: scale(0.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.success-wrap { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 24px; }
.success-wrap > .btn-fixed { margin-top: auto; }
.success-check { width: 68px; height: 68px; margin-bottom: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--brand-600); box-shadow: 0 0 0 10px var(--brand-100); animation: pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both; flex-shrink: 0; }
.success-check.is-fail { background: var(--danger); box-shadow: 0 0 0 10px var(--danger-100); }
.success-check.is-wait { background: #d68f0c; box-shadow: 0 0 0 10px var(--amber-100); }
.success-wrap h2 { margin: 6px 0 4px; font-size: 22px; font-weight: 800; letter-spacing: -0.025em; }
.success-amount { margin: 0 0 14px; font-size: 20px; font-weight: 800; color: var(--brand-700); font-variant-numeric: tabular-nums; }
.success-txn { margin: 0 0 14px; font-size: 12.5px; line-height: 1.55; color: var(--ink-500); }

/* =============== Rider cards =============== */
.rider-found { display: flex; flex-direction: column; flex: 1 0 auto; animation: card-in 0.4s ease both; }
@keyframes card-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.rider-banner { margin: 4px 0 14px; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; color: var(--brand-800); }
.rider-card { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 12px; padding: 14px; border: 0; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); text-align: left; }
.rider-avatar { width: 46px; height: 46px; flex-shrink: 0; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--brand-100); color: var(--brand-800); font-weight: 800; font-size: 15px; }
.rider-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.rider-info strong { font-size: 14.5px; font-weight: 800; }
.rider-info .rider-rating { font-size: 12px; color: var(--ink-500); }
.round-btn { width: 42px; height: 42px; flex-shrink: 0; border: 0; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--brand-700); color: #fff; cursor: pointer; }
.rider-eta-row { display: flex; gap: 10px; margin-bottom: 12px; }
.rider-eta { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: var(--r-md); background: var(--brand-50); }
.eta-label { font-size: 10.5px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--brand-600); }
.eta-value { font-size: 14px; font-weight: 800; }
.rider-actions { display: flex; gap: 10px; margin-bottom: 8px; }
.rider-actions .btn { margin-top: 0; padding-left: 10px; padding-right: 10px; font-size: 13.5px; }
.rider-profile { text-align: center; padding: 4px 0 16px; }
.rider-avatar-lg { width: 76px; height: 76px; margin: 0 auto 10px; border-radius: 26px; display: flex; align-items: center; justify-content: center; background: var(--brand-900); color: var(--accent); font-size: 24px; font-weight: 800; }
.rider-profile h3 { margin: 0 0 3px; font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.rider-profile .rider-rating { font-size: 12.5px; color: var(--ink-500); }
.kyc-badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; background: var(--brand-100); color: var(--brand-800); font-size: 11px; font-weight: 800; }
.rider-detail-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rider-detail-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.rider-detail-row span { color: var(--ink-500); }

/* =============== QR and delivery PIN =============== */
.qr-card { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; margin-bottom: 12px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.qr-card-plain { box-shadow: none; padding: 0; margin: 0; }
.qr-box { padding: 8px; background: #fff; line-height: 0; }
.qr-box img, .qr-box canvas { display: block; }
.qr-code-text { font-size: 16px; font-weight: 800; letter-spacing: 0.08em; }
.qr-caption { font-size: 12px; line-height: 1.55; text-align: center; color: var(--ink-500); }
.pin-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin-bottom: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--brand-900); color: #fff; text-align: left; }
.pin-card strong { display: block; font-size: 12.5px; font-weight: 700; }
.pin-card span { display: block; margin-top: 2px; font-size: 11.5px; color: rgba(255, 255, 255, 0.72); line-height: 1.45; }
.pin-card b { flex-shrink: 0; font-size: 26px; font-weight: 800; letter-spacing: 0.14em; color: var(--accent); font-variant-numeric: tabular-nums; }

/* =============== Orders and tracking =============== */
.orders-list, .parcels-list, .jobs-list, .notif-list { display: flex; flex-direction: column; gap: 10px; }
.order-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border: 0; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); text-align: left; cursor: pointer; }
.order-status-dot { width: 10px; height: 10px; flex-shrink: 0; border-radius: 50%; background: var(--ink-300); }
.order-status-dot.is-delivered { background: var(--brand-500); }
.order-status-dot.is-active { background: #e09a14; }
.order-status-dot.is-cancelled { background: var(--danger); }
.order-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.order-text strong { font-size: 13.5px; font-weight: 800; }
.order-route { font-size: 12.5px; color: var(--ink-500); }
.order-status-label { font-size: 12px; font-weight: 700; color: var(--brand-700); }
.order-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.order-amount { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.order-date { font-size: 11.5px; color: var(--ink-400); }
.track-header-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); }
.track-header-card strong { display: block; font-size: 15px; font-weight: 800; }
.track-header-card div span { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 700; color: var(--brand-700); }
.track-amount { flex-shrink: 0; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.timeline { display: flex; flex-direction: column; margin-bottom: 12px; padding: 16px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); }
.timeline-step { position: relative; display: flex; gap: 12px; padding-bottom: 16px; }
.timeline-step:last-child { padding-bottom: 0; }
.timeline-step::after { content: ""; position: absolute; left: 6px; top: 17px; bottom: -1px; width: 2px; background: var(--line); }
.timeline-step:last-child::after { display: none; }
.timeline-dot { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; border-radius: 50%; border: 3px solid var(--line); background: #fff; z-index: 1; }
.timeline-text { display: flex; flex-direction: column; gap: 1px; }
.timeline-text strong { font-size: 13.5px; font-weight: 700; color: var(--ink-400); }
.timeline-text span { font-size: 12px; color: var(--ink-400); }
.timeline-step.is-done .timeline-dot { border-color: var(--brand-500); background: var(--brand-500); }
.timeline-step.is-done::after { background: var(--brand-500); }
.timeline-step.is-done .timeline-text strong, .timeline-step.is-done .timeline-text span { color: var(--ink-700); }
.timeline-step.is-current .timeline-dot { border-color: var(--brand-600); box-shadow: 0 0 0 4px var(--brand-100); }
.timeline-step.is-current .timeline-text strong { color: var(--brand-800); font-weight: 800; }
.timeline-step.is-current .timeline-text span { color: var(--brand-700); }
.footer-actions { display: flex; gap: 10px; }
.footer-actions .btn { margin-top: 0; }

/* =============== Bottom sheets =============== */
.modal-overlay { position: absolute; inset: 0; z-index: 55; display: flex; align-items: flex-end; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5, 18, 11, 0.55); opacity: 0; transition: opacity 0.25s ease; }
.modal-sheet { position: relative; width: 100%; max-height: 92%; overflow-y: auto; padding: 8px 20px calc(var(--hi) + 12px); border-radius: 28px 28px 0 0; background: var(--surface); transform: translateY(100%); transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1); }
.modal-overlay.is-open .modal-backdrop { opacity: 1; }
.modal-overlay.is-open .modal-sheet { transform: none; }
.modal-handle { width: 40px; height: 4px; margin: 4px auto 16px; border-radius: 4px; background: var(--ink-300); }
.modal-close { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 12px; }
.modal-sheet h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { margin-top: 0; }

.star-row { display: flex; justify-content: center; gap: 8px; margin: 14px 0; }
.star-row button { padding: 2px; border: 0; background: none; color: var(--ink-300); cursor: pointer; }
.star-row button.is-on { color: #f0a30a; }
.star-row button.is-on svg { fill: currentColor; }

/* =============== Rider jobs =============== */
.tab-switch { display: flex; gap: 4px; margin-bottom: 14px; padding: 4px; border-radius: var(--r-md); background: #e8eeea; }
.tab-btn { flex: 1; min-height: 38px; padding: 8px 4px; border: 0; border-radius: var(--r-sm); background: none; font-size: 12.5px; font-weight: 700; color: var(--ink-500); cursor: pointer; white-space: nowrap; }
.tab-btn span { font-weight: 600; opacity: 0.75; }
.tab-btn.is-active { background: var(--surface); color: var(--ink-900); box-shadow: 0 2px 6px rgba(14, 28, 21, 0.1); }
.job-card, .parcel-card { padding: 14px; border: 1.5px solid transparent; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; }
.job-card-top, .parcel-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.job-icon, .parcel-icon { width: 38px; height: 38px; flex-shrink: 0; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: var(--brand-50); color: var(--brand-700); }
.job-card-title, .parcel-card-title { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.job-card-title strong, .parcel-card-title strong { font-size: 14px; font-weight: 800; }
.job-card-title span, .parcel-card-title span { font-size: 12px; color: var(--ink-500); }
.job-eta-badge { flex-shrink: 0; padding: 5px 10px; border-radius: 999px; background: var(--amber-100); color: var(--amber); font-size: 11px; font-weight: 800; }
.job-card-route, .parcel-card-route { margin-bottom: 10px; font-size: 13.5px; font-weight: 700; color: var(--ink-900); }
.job-card-trip { display: flex; gap: 8px; margin-bottom: 10px; }
.job-card-trip span { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--bg); font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-400); }
.job-card-trip b { font-size: 12.5px; letter-spacing: 0; text-transform: none; color: var(--ink-900); }
.job-card-bottom, .parcel-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.job-card-weight, .parcel-card-weight { flex: 1; min-width: 0; font-size: 11.5px; line-height: 1.5; color: var(--ink-500); }
.job-fee, .parcel-commission { flex-shrink: 0; font-size: 15px; font-weight: 800; color: var(--brand-700); font-variant-numeric: tabular-nums; }
.batch-parcel-row { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); }
.batch-parcel-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.batch-parcel-text strong { font-size: 13px; font-weight: 800; }
.batch-parcel-text span { font-size: 11.5px; color: var(--ink-500); line-height: 1.45; }
#batchParcelsList { margin-bottom: 14px; }
.route-stops { display: flex; flex-direction: column; gap: 10px; }
.route-stop { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1.5px solid transparent; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); }
.route-stop-number { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--line); font-size: 13px; font-weight: 800; color: var(--ink-500); }
.route-stop-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.route-stop-text strong { font-size: 13.5px; font-weight: 800; }
.route-stop-text span { font-size: 11.5px; color: var(--ink-500); line-height: 1.45; }
.route-stop-fee { flex-shrink: 0; font-size: 13px; font-weight: 800; }
.route-stop.is-done { opacity: 0.6; }
.route-stop.is-done .route-stop-number { background: var(--brand-500); color: #fff; }
.route-stop.is-current { border-color: var(--brand-600); background: var(--brand-50); }
.route-stop.is-current .route-stop-number { background: var(--brand-700); color: #fff; }

.nav-full-address { margin: 0 0 12px; font-size: 13px; font-weight: 700; line-height: 1.5; color: var(--ink-700); }
.nav-actions { margin-bottom: 4px; }
.nav-actions-row { display: flex; gap: 10px; margin-top: 10px; }
.nav-actions-row .btn { margin-top: 0; }

.scanner-frame { flex: 1 0 auto; min-height: 340px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; margin-bottom: 14px; border-radius: 28px; background: radial-gradient(circle at 50% 38%, #24342c, #0a120e 75%); color: #fff; }
.scanner-corners { position: relative; width: 210px; height: 210px; }
.corner { position: absolute; width: 36px; height: 36px; border: 4px solid var(--accent); }
.corner.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 14px 0 0 0; }
.corner.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 14px 0 0; }
.corner.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 14px; }
.corner.br { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 14px 0; }
.scanner-beam { position: absolute; left: 12px; right: 12px; top: 12px; height: 2px; background: var(--accent); box-shadow: 0 0 14px 3px rgba(197, 240, 106, 0.55); animation: beam 1.6s ease-in-out infinite alternate; }
@keyframes beam { to { top: 196px; } }
.scanner-frame p { margin: 0; padding: 0 24px; text-align: center; font-size: 13.5px; font-weight: 600; line-height: 1.5; }
.scanner-frame.is-success .scanner-beam { display: none; }
.scanner-frame.is-success .corner { border-color: #3ddc84; }

.signature-wrap { position: relative; height: 140px; margin-bottom: 4px; border: 1.5px dashed var(--ink-300); border-radius: var(--r-md); background: var(--surface); }
.signature-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.signature-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; pointer-events: none; font-size: 13px; font-weight: 600; color: var(--ink-300); }
.photo-upload { display: flex; align-items: center; justify-content: center; height: 108px; margin-bottom: 14px; overflow: hidden; border: 1.5px dashed var(--ink-300); border-radius: var(--r-md); background: var(--surface); font-size: 13px; font-weight: 700; color: var(--ink-500); cursor: pointer; }
.photo-upload span { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.photo-upload img { width: 100%; height: 100%; object-fit: cover; }
.upload-row { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 10px; padding: 12px 14px; border: 1.5px dashed var(--ink-300); border-radius: var(--r-md); background: var(--surface); text-align: left; cursor: pointer; }
.upload-row.is-done { border-style: solid; border-color: var(--brand-500); background: var(--brand-50); }
.upload-state { flex-shrink: 0; font-size: 12px; font-weight: 800; color: var(--brand-700); }

.failed-panel { margin-top: 8px; padding: 16px; border: 1px solid #f2cdca; border-radius: var(--r-md); background: var(--surface); }
.option-list-plain { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.radio-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--ink-700); cursor: pointer; }
.radio-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--danger); }
.failed-note { margin: 10px 0 0; font-size: 12px; line-height: 1.55; color: var(--ink-500); }

/* =============== Profile, notifications, help =============== */
.profile-menu { display: flex; flex-direction: column; margin-bottom: 14px; padding: 2px 0; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); }
.profile-menu-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line); background: none; font-size: 14px; font-weight: 700; text-align: left; cursor: pointer; }
.profile-menu-item:last-child { border-bottom: 0; }
.profile-menu-item > svg { color: var(--brand-700); flex-shrink: 0; }
.profile-menu-item > span:not(.option-chevron) { flex: 1; }
.notif-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); }
.notif-icon { width: 38px; height: 38px; flex-shrink: 0; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: var(--brand-50); color: var(--brand-700); }
.notif-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.notif-text strong { font-size: 13.5px; font-weight: 800; }
.notif-text span { font-size: 12.5px; line-height: 1.5; color: var(--ink-500); }
.notif-time { flex-shrink: 0; font-size: 11px; font-weight: 600; color: var(--ink-400); }
.faq { margin-bottom: 10px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); }
.faq summary { font-size: 13.5px; font-weight: 700; cursor: pointer; }
.faq p { margin: 8px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--ink-500); }

/* =============== SACCO parcels =============== */
.status-badge { align-self: flex-start; display: inline-block; flex-shrink: 0; padding: 5px 11px; border-radius: 999px; background: var(--brand-100); color: var(--brand-800); font-size: 11px; font-weight: 800; }
.status-badge.is-pending { background: var(--amber-100); color: var(--amber); }
.status-badge.is-awaiting_pickup { background: #efe7fd; color: #5b34a8; }
.status-badge.is-approved { background: var(--info-100); color: var(--info); }
.status-badge.is-failed { background: var(--danger-100); color: var(--danger); }
.parcel-card-top .status-badge { align-self: center; }
.parcel-card.is-selected { border-color: var(--brand-600); background: var(--brand-50); }
.parcel-card-select { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--brand-600); }
#consolidateList { margin-bottom: 14px; }
#detailStatusBadge { margin-bottom: 12px; }
.consolidate-bar { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 12px; margin-top: auto; padding: 12px 12px 12px 16px; border-radius: var(--r-lg); background: var(--brand-900); color: #fff; box-shadow: 0 14px 28px rgba(6, 46, 27, 0.35); }
.parcels-list:has(+ .consolidate-bar:not([hidden])) { margin-bottom: 14px; }
.consolidate-bar-text { flex: 1; }
.consolidate-bar-text strong { display: block; font-size: 13.5px; }
.consolidate-bar-text span { display: block; font-size: 12px; color: rgba(255, 255, 255, 0.72); }
.consolidate-bar .btn { width: auto; min-height: 44px; background: var(--accent); color: var(--brand-900); box-shadow: none; }

/* =============== Wallet =============== */
.wallet-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; margin-top: 14px; }
.wallet-actions .btn { min-height: 48px; margin: 0; font-size: 14px; }
.wallet-split { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 12px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); }
.wallet-split div { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-right: 1px solid var(--line); }
.wallet-split div:last-child { border-right: 0; }
.wallet-split strong { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wallet-split span { font-size: 10.5px; font-weight: 600; color: var(--ink-500); }
.tx-icon { width: 38px; height: 38px; flex-shrink: 0; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: var(--brand-50); color: var(--brand-700); }
.tx-row.is-out .tx-icon { background: #eef1ef; color: var(--ink-700); }
.tx-row.is-held .tx-icon, .tx-row.is-pending .tx-icon { background: var(--amber-100); color: var(--amber); }
.tx-row.is-failed .tx-icon { background: var(--danger-100); color: var(--danger); }
.tx-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.tx-amount { font-size: 13.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tx-row.is-in .tx-amount { color: var(--brand-700); }
.tx-row.is-failed .tx-amount { color: var(--ink-400); text-decoration: line-through; }
.tx-status { font-size: 10.5px; font-weight: 800; color: var(--ink-400); }
.tx-row.is-held .tx-status, .tx-row.is-pending .tx-status { color: var(--amber); }
.tx-row.is-failed .tx-status { color: var(--danger); }
.tx-day { margin: 6px 0 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-400); }
.amount-box { margin-bottom: 14px; padding: 20px 16px 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.amount-input { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.amount-input b { font-size: 18px; font-weight: 800; color: var(--ink-400); }
.amount-input input { width: 6.5ch; border: 0; outline: none; background: none; text-align: left; font-size: 44px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.amount-box small { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-500); }
.amount-box small.is-error { color: var(--danger); }
.amount-chips { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.chip { flex: 1; min-height: 38px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 12.5px; font-weight: 800; color: var(--ink-700); cursor: pointer; }
.chip.is-selected { border-color: var(--brand-600); background: var(--brand-50); color: var(--brand-800); }
.pin-head { margin-top: 12px; text-align: center; }
.pin-head p { margin: 0; font-size: 13.5px; color: var(--ink-500); line-height: 1.6; }
.pin-head strong { display: block; margin: 4px 0; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.pin-dots { display: flex; justify-content: center; gap: 18px; margin: 26px 0; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink-300); }
.pin-dots i.is-on { border-color: var(--brand-700); background: var(--brand-700); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: auto; }
.keypad button { height: 58px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); font-size: 23px; font-weight: 700; cursor: pointer; }
.keypad button:active { background: var(--brand-100); }
.keypad .blank { background: none; box-shadow: none; pointer-events: none; }

/* =============== Phone prompt (M-Pesa STK) =============== */
.stk { width: 100%; max-width: 290px; padding: 18px; border-radius: 18px; background: var(--surface); box-shadow: 0 18px 40px rgba(14, 28, 21, 0.18); text-align: left; }
.stk small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-400); }
.stk p { margin: 8px 0 12px; font-size: 13px; line-height: 1.55; color: var(--ink-900); }
.stk-field { height: 40px; display: flex; align-items: center; padding: 0 12px; border-bottom: 2px solid var(--brand-600); font-size: 20px; letter-spacing: 0.35em; }

/* =============== Bottom navigation =============== */
.bottom-nav { display: flex; align-items: stretch; flex-shrink: 0; padding: 6px 6px 0; border-top: 1px solid var(--line); background: var(--surface); z-index: 40; }
.phone.no-tabs .bottom-nav { display: none; }
.nav-item { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; min-height: 52px; padding: 2px 0 0; border: 0; background: none; font-size: 11px; font-weight: 700; color: var(--ink-400); cursor: pointer; }
.nav-item svg { width: 22px; height: 22px; padding: 0; }
.nav-item .nav-ico { display: flex; align-items: center; justify-content: center; width: 52px; height: 30px; border-radius: 999px; transition: background 0.2s ease; }
.nav-item.is-active { color: var(--brand-800); }
.nav-item.is-active .nav-ico { background: var(--brand-100); }
.nav-fab { width: 52px; height: 52px; margin-top: -26px; border-radius: 19px; display: flex; align-items: center; justify-content: center; background: var(--brand-700); color: #fff; box-shadow: 0 10px 18px -4px rgba(11, 102, 58, 0.55), 0 0 0 5px var(--surface); }
.nav-fab svg { width: 24px; height: 24px; }

.toast { position: absolute; left: 16px; right: 16px; bottom: calc(var(--hi) + 74px); z-index: 70; padding: 13px 16px; border-radius: 14px; background: #14261c; color: #fff; font-size: 13px; font-weight: 600; line-height: 1.45; text-align: center; box-shadow: 0 14px 28px rgba(5, 18, 11, 0.3); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity 0.22s ease, transform 0.22s ease; }
.toast.show { opacity: 1; transform: none; }

/* =============== Preview page: narrow desktop windows =============== */
@media (max-width: 900px) {
  .page-body { flex-direction: column; gap: 14px; }
  .page-header { width: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; text-align: center; }
  .page-sub, .page-links { display: none; }
  .device-switch { margin: 0; }
}

/* =============== On a real phone, or installed to the home screen =============== */
html.is-native, html.is-native body { background: var(--bg); overflow: hidden; }
html.is-native { --sb: env(safe-area-inset-top, 0px); --hi: max(8px, env(safe-area-inset-bottom, 0px)); }
html.is-native .page-wrap { padding: 0; }
html.is-native .page-body { display: block; }
html.is-native .page-header { display: none; }
html.is-native .stage, html.is-native .phone-shell { display: block; width: 100% !important; height: 100% !important; }
html.is-native .device { position: static; padding: 0; transform: none !important; height: 100%; }
html.is-native .device::before, html.is-native .device::after { display: none; }
html.is-native .phone { width: 100%; height: 100vh; height: 100dvh; border-radius: 0; }
html.is-native .status-bar > *, html.is-native .home-indicator::after { display: none; }
html.is-native .status-bar { padding: 0; }
html.is-native .screen-header { padding-top: 10px; }

/* Embedded in the live prototype page: device only, scaled to its window */
html.is-embed, html.is-embed body { background: transparent; overflow: hidden; }
html.is-embed .page-wrap { padding: 0; }
html.is-embed .page-body { display: flex; flex-direction: row; gap: 0; }
html.is-embed .page-header { display: none; }
html.is-embed .device::before { box-shadow: inset 0 0 0 2px #4a524e, inset 0 0 0 4px #1b201e; }

/* Capture mode: device only, true size (used to produce the sign-off screenshots) */
html.is-capture, html.is-capture body { background: #fff; }
html.is-capture .page-wrap { padding: 0; height: auto; }
html.is-capture .page-body { display: block; }
html.is-capture .page-header { display: none; }
html.is-capture .device::before { box-shadow: inset 0 0 0 2px #4a524e, inset 0 0 0 4px #1b201e; }
html.is-capture .device::after { display: none; }
html.is-capture *, html.is-capture *::before, html.is-capture *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
html.is-capture .toast { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}

/* =============== Delivery in progress (home) =============== */
.live-card { display: block; width: 100%; margin-top: 12px; padding: 13px 15px 12px; border: 1.5px solid var(--brand-100); border-radius: var(--r-lg); background: linear-gradient(160deg, #fff 55%, var(--brand-50)); box-shadow: var(--shadow); text-align: left; cursor: pointer; animation: live-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }
.live-card:active { transform: scale(0.99); }
.live-card span { display: block; }
.live-card .live-head { display: flex; align-items: center; gap: 8px; }
.live-card .live-flag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 8px; border-radius: 20px; background: var(--brand-900); color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.live-flag i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: live-blink 1.4s ease-in-out infinite; }
.live-id { font-size: 12px; font-weight: 700; color: var(--ink-500); }
.live-card .live-eta { margin-left: auto; font-size: 15px; font-weight: 800; color: var(--brand-800); font-variant-numeric: tabular-nums; }
.live-status { display: block; margin-top: 7px; font-size: 14px; font-weight: 800; letter-spacing: -0.01em; }
.live-card .live-road { position: relative; height: 40px; margin: 4px 6px 0; }
.live-card .live-line, .live-card .live-done { position: absolute; left: 0; top: 24px; height: 4px; border-radius: 4px; }
.live-card .live-line { right: 0; background: repeating-linear-gradient(90deg, var(--ink-300) 0 8px, transparent 8px 14px); animation: live-flow 0.9s linear infinite; }
.live-card .live-done { width: var(--at); background: var(--brand-600); }
.live-card .live-start { position: absolute; left: -5px; top: 19px; width: 14px; height: 14px; border: 3.5px solid var(--brand-600); border-radius: 50%; background: #fff; }
.live-card .live-end { position: absolute; right: -9px; top: 3px; color: var(--brand-800); animation: live-hop 2s ease-in-out infinite; }
.live-card .live-car { position: absolute; left: var(--at); top: 10px; width: 32px; height: 32px; margin-left: -16px; display: flex; align-items: center; justify-content: center; border: 2.5px solid #fff; border-radius: 12px; background: var(--brand-700); color: #fff; box-shadow: 0 6px 14px -4px rgba(11, 102, 58, 0.6); animation: live-drive 2.6s ease-in-out infinite; }
.live-card.is-step-1 .live-car { top: 19px; width: 14px; height: 14px; margin-left: -5px; border: 0; border-radius: 50%; background: var(--brand-600); box-shadow: none; animation: live-radar 1.6s ease-out infinite; }
.live-card .live-places { display: flex; justify-content: space-between; gap: 12px; margin-top: 3px; font-size: 11.5px; font-weight: 600; color: var(--ink-500); }
.live-card .live-more { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11.5px; font-weight: 700; color: var(--brand-700); }

.quick-tile .tile-icon { position: relative; }
.tile-badge { position: absolute; top: -6px; right: -6px; z-index: 2; min-width: 20px; height: 20px; padding: 0 5px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg); border-radius: 20px; background: #e8590c; color: #fff; font-size: 10.5px; font-weight: 800; }
.quick-tile.is-live { color: var(--brand-800); font-weight: 800; }
.quick-tile.is-live .tile-icon { background: var(--accent); color: var(--brand-900); }
.quick-tile.is-live .tile-icon::before, .quick-tile.is-live .tile-icon::after { content: ""; position: absolute; inset: 0; border: 2px solid var(--brand-500); border-radius: inherit; opacity: 0; animation: live-ring 2s ease-out infinite; pointer-events: none; }
.quick-tile.is-live .tile-icon::after { animation-delay: 1s; }
.quick-tile.is-live .tile-icon svg { transform-origin: 50% 100%; animation: live-hop 1.4s ease-in-out infinite; }

@keyframes live-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes live-blink { 50% { opacity: 0.25; } }
@keyframes live-flow { to { background-position: 14px 0; } }
@keyframes live-drive { 0%, 100% { transform: translate(-5px, 0); } 25% { transform: translate(0, -1.5px); } 50% { transform: translate(7px, 0); } 75% { transform: translate(1px, -1.5px); } }
@keyframes live-hop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-4px); } }
@keyframes live-ring { 0% { opacity: 0.8; transform: scale(1); } 80%, 100% { opacity: 0; transform: scale(1.38); } }
@keyframes live-radar { 0% { box-shadow: 0 0 0 0 rgba(23, 160, 90, 0.55); } 100% { box-shadow: 0 0 0 16px rgba(23, 160, 90, 0); } }

/* =============== Chat =============== */
.screen.chat-screen { padding: 0; overflow: hidden; }
.chat-top { display: flex; align-items: center; gap: 10px; padding: 6px 14px 10px; border-bottom: 1px solid var(--line); }
.chat-avatar { position: relative; width: 42px; height: 42px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 15px; background: var(--brand-900); color: var(--accent); font-size: 14px; font-weight: 800; }
.chat-avatar i { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border: 2.5px solid var(--bg); border-radius: 50%; background: var(--brand-500); }
.chat-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.chat-who strong { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-who span { font-size: 11.5px; font-weight: 600; color: var(--ink-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-who span.is-typing { color: var(--brand-600); }
.chat-order { display: flex; align-items: center; gap: 10px; margin: 10px 14px 0; padding: 9px 11px; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow); }
.chat-order-icon { width: 30px; height: 30px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--brand-50); color: var(--brand-700); }
.chat-order > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-order strong { font-size: 12.5px; font-weight: 800; }
.chat-order span span { font-size: 11px; color: var(--ink-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-order em { flex-shrink: 0; padding: 4px 9px; border-radius: 20px; background: var(--brand-100); color: var(--brand-800); font-size: 10.5px; font-style: normal; font-weight: 800; }
.chat-thread { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 6px 14px 12px; overflow-y: auto; scrollbar-width: none; background-image: radial-gradient(rgba(11, 102, 58, 0.07) 1px, transparent 1.5px); background-size: 18px 18px; }
.chat-thread::-webkit-scrollbar { display: none; }
.chat-thread > * { flex-shrink: 0; }
.chat-thread > :first-child { margin-top: auto; }
.chat-day { align-self: center; margin: 4px 0; padding: 3px 11px; border-radius: 20px; background: #e6ece8; font-size: 10.5px; font-weight: 700; color: var(--ink-500); }
.chat-system { align-self: center; display: flex; gap: 7px; max-width: 92%; margin: 8px 0 2px; padding: 7px 11px; border-radius: 12px; background: var(--amber-100); font-size: 11px; font-weight: 600; line-height: 1.45; color: #6d4706; text-align: left; }
.chat-system svg { flex-shrink: 0; margin-top: 1px; }
.chat-msg { align-self: flex-start; max-width: 80%; margin-top: 9px; padding: 9px 12px 6px; border-radius: 18px 18px 18px 6px; background: var(--surface); box-shadow: 0 1px 2px rgba(14, 28, 21, 0.08), 0 4px 12px rgba(14, 28, 21, 0.04); font-size: 13.5px; font-weight: 500; line-height: 1.45; overflow-wrap: anywhere; }
.chat-msg.is-follow { margin-top: 3px; }
.chat-msg.is-me { align-self: flex-end; border-radius: 18px 18px 6px 18px; background: var(--brand-700); color: #fff; }
.chat-msg.is-fresh { animation: chat-pop 0.28s cubic-bezier(0.22, 1.2, 0.36, 1) both; }
.chat-text, .chat-meta { display: block; }
.chat-meta { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 1px; font-size: 9.5px; font-weight: 600; color: var(--ink-400); }
.chat-msg.is-me .chat-meta { color: rgba(255, 255, 255, 0.7); }
.chat-tick { display: inline-flex; }
.chat-tick.is-read { color: var(--accent); }
.chat-msg.is-card { width: 232px; padding: 4px 4px 6px; }
.chat-msg.is-card .chat-meta { padding: 0 8px; }
.chat-map { position: relative; display: block; height: 104px; overflow: hidden; border-radius: 14px; }
.chat-map svg { display: block; width: 100%; height: 100%; }
.chat-pin { position: absolute; left: 56%; top: 46%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border: 3px solid #fff; border-radius: 50%; background: var(--brand-700); animation: live-radar 1.6s ease-out infinite; }
.chat-card-text { display: flex; flex-direction: column; padding: 7px 8px 0; }
.chat-card-text strong { font-size: 12.5px; font-weight: 800; }
.chat-card-text span { font-size: 11px; opacity: 0.75; }
.chat-photo { display: block; width: 100%; height: 142px; object-fit: cover; border-radius: 14px; }
.chat-caption { display: block; padding: 7px 8px 0; }
.chat-typing { display: flex; gap: 4px; padding: 13px 14px; }
.chat-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-400); animation: chat-dot 1.1s ease-in-out infinite; }
.chat-typing i:nth-child(2) { animation-delay: 0.15s; }
.chat-typing i:nth-child(3) { animation-delay: 0.3s; }
.chat-bottom { padding: 8px 12px 6px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-chips { display: flex; gap: 7px; margin-bottom: 8px; overflow-x: auto; scrollbar-width: none; }
.chat-chips::-webkit-scrollbar { display: none; }
.chat-chips button { flex-shrink: 0; padding: 8px 13px; border: 1px solid var(--brand-100); border-radius: 20px; background: var(--brand-50); font-size: 12px; font-weight: 700; color: var(--brand-800); white-space: nowrap; cursor: pointer; }
.chat-chips button:active { background: var(--brand-100); }
.chat-tray { display: flex; gap: 8px; margin-bottom: 8px; animation: live-in 0.2s ease both; }
.chat-tray button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); font-size: 12.5px; font-weight: 700; color: var(--ink-700); cursor: pointer; }
.chat-tray button span { display: flex; color: var(--brand-700); }
.chat-compose { display: flex; align-items: center; gap: 8px; }
.chat-compose input[type="text"] { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 22px; outline: none; background: var(--bg); font: 500 14px var(--font); color: var(--ink-900); }
.chat-compose input[type="text"]:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.chat-more, .chat-send { width: 44px; height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; cursor: pointer; }
.chat-more { background: var(--brand-50); color: var(--brand-700); }
.chat-send { background: var(--brand-700); color: #fff; transition: background 0.15s ease, transform 0.1s ease; }
.chat-send:active { transform: scale(0.93); }
.chat-send:disabled { background: #dbe5df; color: #8ea597; cursor: default; }
.chat-closed { margin: 4px 0 6px; text-align: center; font-size: 12px; font-weight: 600; color: var(--ink-500); }
.phone:has(.chat-screen.active) .home-indicator { background: var(--surface); }
.chat-screen [hidden] { display: none !important; }
@keyframes chat-pop { from { opacity: 0; transform: translateY(8px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes chat-dot { 0%, 60%, 100% { opacity: 0.35; transform: none; } 30% { opacity: 1; transform: translateY(-4px); } }
#homeLive[hidden], #homeCta[hidden], .tile-badge[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .live-card, .live-card *, .quick-tile.is-live *, .quick-tile.is-live .tile-icon::before, .quick-tile.is-live .tile-icon::after, .chat-screen * { animation: none !important; }
}

/* =============== Booking progress =============== */
.steps { margin: 0 0 14px; }
.steps-track { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.steps-track li { flex: 1; }
.steps-track li.is-current { flex: 2; }
.steps-seg { display: block; width: 100%; height: 20px; padding: 6px 0; border: 0; background: none; }
.steps-seg i { position: relative; display: block; height: 8px; overflow: hidden; border-radius: 8px; background: #dfe7e2; }
.steps-track .is-done .steps-seg { cursor: pointer; }
.steps-track .is-done .steps-seg i { background: var(--brand-700); }
.steps-track .is-current .steps-seg i { background: var(--brand-100); }
.steps-track .is-current .steps-seg i::after { content: ""; position: absolute; inset: 0; border-radius: 8px; background: linear-gradient(90deg, var(--brand-700), var(--brand-500) 55%, #a8e04f); animation: steps-fill 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s backwards; }
.steps-caption { display: flex; justify-content: space-between; gap: 12px; margin: 3px 0 0; font-size: 12px; }
.steps-caption strong { font-weight: 800; color: var(--brand-800); }
.steps-caption span { font-weight: 600; color: var(--ink-400); }
@keyframes steps-fill { from { width: 0; right: auto; } to { width: 100%; right: auto; } }

/* =============== Parcel categories =============== */
.parcel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.parcel-grid .parcel-tile { position: relative; flex-direction: column; align-items: center; justify-content: flex-start; gap: 0; min-height: 0; padding: 30px 10px 18px; border: 1.5px solid var(--line); border-radius: var(--r-lg); box-shadow: none; text-align: center; transition: transform 0.12s ease, border-color 0.2s ease, background 0.2s ease; }
.parcel-grid .parcel-tile:active { transform: scale(0.975); }
.parcel-grid .parcel-tile.is-selected { border-color: var(--brand-600); background: var(--brand-50); box-shadow: 0 0 0 1px var(--brand-600); }
.parcel-art { display: flex; align-items: center; justify-content: center; height: 70px; }
.parcel-art svg { width: 82px; height: 68px; fill: none; stroke: var(--brand-800); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.parcel-art .wash { fill: var(--brand-100); stroke: none; transition: fill 0.2s ease; }
.parcel-art .paper { fill: var(--surface); }
.parcel-tile.is-selected .parcel-art .wash { fill: var(--accent); }
.parcel-name { display: block; margin-top: 12px; font-size: 14.5px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink-900); }
.parcel-desc { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 500; line-height: 1.4; color: var(--ink-500); }
/* round checkbox: empty until chosen, then it fills, the tick draws itself and a ring spreads out */
.parcel-check { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border: 2.5px solid var(--ink-300); border-radius: 50%; background: var(--surface); transition: background 0.2s ease, border-color 0.2s ease; }
.parcel-check::after { content: ""; position: absolute; inset: -3px; border: 3px solid var(--brand-500); border-radius: 50%; opacity: 0; pointer-events: none; }
.parcel-check svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 20; stroke-dashoffset: 20; }
.is-selected > .parcel-check { border-color: var(--brand-700); background: var(--brand-700); box-shadow: 0 6px 14px -4px rgba(11, 102, 58, 0.6); animation: check-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
.is-selected > .parcel-check::after { animation: check-ripple 0.65s ease-out 0.12s backwards; }
.is-selected > .parcel-check svg { stroke-dashoffset: 0; animation: check-draw 0.35s ease-out 0.18s backwards; }
.parcel-tile.is-selected .parcel-art svg { animation: check-nudge 0.45s ease-out; }
@keyframes check-pop { 0% { transform: scale(0.5); } 55% { transform: scale(1.25); } 78% { transform: scale(0.94); } 100% { transform: scale(1); } }
@keyframes check-ripple { 0% { opacity: 0.75; transform: scale(1); } 100% { opacity: 0; transform: scale(1.9); } }
@keyframes check-draw { from { stroke-dashoffset: 20; } to { stroke-dashoffset: 0; } }
@keyframes check-nudge { 45% { transform: scale(1.1); } }

/* =============== Delivery journey (tracking) =============== */
.journey { margin: 0 0 12px; padding: 16px 14px; list-style: none; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.journey-step { position: relative; display: flex; align-items: flex-start; gap: 12px; min-height: 62px; padding-bottom: 16px; }
.journey-step:last-child { min-height: 0; padding-bottom: 0; }
.journey-step::after { content: ""; position: absolute; left: 18px; top: 41px; bottom: 3px; width: 3px; border-radius: 3px; background: var(--line); }
.journey-step:last-child::after { display: none; }
.journey-step.is-done::after { background: var(--brand-500); }
.journey-step.is-done:has(+ .is-next)::after { background: repeating-linear-gradient(180deg, var(--brand-500) 0 6px, var(--brand-100) 6px 12px); animation: journey-flow 0.8s linear infinite; }
.journey-icon { position: relative; width: 39px; height: 39px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: #eef2ef; color: var(--ink-400); }
.journey-step.is-done .journey-icon { background: var(--brand-700); color: #fff; }
.journey-step.is-next .journey-icon { background: var(--accent); color: var(--brand-900); }
.journey-step.is-next .journey-icon::after { content: ""; position: absolute; inset: 0; border: 2px solid var(--brand-500); border-radius: inherit; animation: live-ring 1.8s ease-out infinite; }
.journey-step.is-cancelled .journey-icon { background: var(--danger-100); color: var(--danger); }
.journey-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding-top: 2px; }
.journey-text strong { font-size: 14px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink-400); }
.journey-text > span { font-size: 12px; font-weight: 500; line-height: 1.4; color: var(--ink-400); }
.journey-step.is-done .journey-text strong, .journey-step.is-next .journey-text strong, .journey-step.is-cancelled .journey-text strong { color: var(--ink-900); }
.journey-step.is-done .journey-text > span, .journey-step.is-next .journey-text > span, .journey-step.is-cancelled .journey-text > span { color: var(--ink-500); }
.journey-time { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; padding-top: 2px; font-variant-numeric: tabular-nums; }
.journey-time strong { font-size: 13px; font-weight: 800; color: var(--ink-700); }
.journey-time small { font-size: 10.5px; font-weight: 600; color: var(--ink-400); }
.journey-eta { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; min-width: 66px; padding: 5px 10px; border-radius: 13px; background: var(--brand-900); color: var(--accent); font-variant-numeric: tabular-nums; }
.journey-eta small { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; }
.journey-eta strong { font-size: 13.5px; font-weight: 800; white-space: nowrap; }
.journey-call { display: inline-flex; align-items: center; gap: 6px; margin-top: 7px; padding: 7px 15px 7px 12px; border: 0; border-radius: 20px; background: var(--brand-100); color: var(--brand-800); font-size: 12px; font-weight: 800; cursor: pointer; }
.journey-call:active { background: var(--accent); transform: scale(0.96); }
@keyframes journey-flow { to { background-position: 0 12px; } }

/* =============== Private call =============== */
.screen.call-screen { align-items: center; padding: calc(var(--sb) + 22px) 24px calc(var(--hi) + 22px); overflow: hidden; color: #fff; background: radial-gradient(520px 420px at 50% 22%, #12754a, #052415 75%); text-align: center; }
.call-flag { display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 7px 14px; border-radius: 20px; background: rgba(255, 255, 255, 0.1); font-size: 11.5px; font-weight: 700; }
.call-who { margin: auto 0; display: flex; flex-direction: column; align-items: center; }
.call-avatar { position: relative; width: 118px; height: 118px; margin-bottom: 26px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent); color: var(--brand-900); font-size: 36px; font-weight: 800; }
.call-avatar::before, .call-avatar::after { content: ""; position: absolute; inset: 0; border: 2px solid var(--accent); border-radius: 50%; opacity: 0; }
.call-screen.is-ringing .call-avatar::before, .call-screen.is-ringing .call-avatar::after { animation: call-ring 2s ease-out infinite; }
.call-screen.is-ringing .call-avatar::after { animation-delay: 1s; }
.call-who h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.call-who p { margin: 4px 0 16px; font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.7); }
.call-who strong { font-size: 18px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.call-note { max-width: 250px; margin: 0 0 22px; font-size: 12px; line-height: 1.5; color: rgba(255, 255, 255, 0.65); }
.call-actions { display: flex; justify-content: center; gap: 28px; margin-bottom: 26px; }
.call-actions button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: #fff; font-size: 11.5px; font-weight: 700; cursor: pointer; }
.call-actions button span { width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255, 255, 255, 0.13); }
.call-actions button.is-on span { background: #fff; color: var(--brand-900); }
.call-end { width: 70px; height: 70px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: var(--danger); color: #fff; box-shadow: 0 14px 28px -8px rgba(201, 54, 44, 0.8); cursor: pointer; }
.call-end svg { transform: rotate(135deg); }
@keyframes call-ring { 0% { opacity: 0.7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.75); } }

@media (prefers-reduced-motion: reduce) {
  .steps-seg i::after, .parcel-check, .parcel-check::after, .parcel-check svg, .parcel-tile .parcel-art svg, .size-option .size-art svg, .journey-step::after, .journey-icon::after, .call-avatar::before, .call-avatar::after { animation: none !important; }
}

/* =============== Parcel size panels =============== */
.size-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.size-head .field-label { margin: 0; }
.size-head .estimate-hint { padding: 4px 10px; border-radius: 20px; background: var(--brand-100); color: var(--brand-800); font-size: 11px; font-weight: 800; white-space: nowrap; }
.size-help { margin: 3px 0 9px; font-size: 12px; font-weight: 500; color: var(--ink-500); }
.size-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.size-option { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 10px 12px 11px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-align: left; cursor: pointer; transition: transform 0.12s ease, border-color 0.2s ease, background 0.2s ease; }
.size-option:active { transform: scale(0.975); }
.size-option.is-selected { border-color: var(--brand-600); background: var(--brand-50); box-shadow: 0 0 0 1px var(--brand-600), 0 10px 18px -12px rgba(11, 102, 58, 0.7); }
.size-art { display: block; height: 48px; }
.size-art svg { display: block; width: 52px; height: 48px; fill: none; stroke: var(--brand-800); stroke-linecap: round; stroke-linejoin: round; }
.size-art svg path { stroke-width: 1.7; vector-effect: non-scaling-stroke; }
.size-art .wash { fill: var(--brand-100); stroke: none; transition: fill 0.2s ease; }
.size-art .paper { fill: var(--surface); }
.size-option.is-selected .size-art .wash { fill: var(--accent); }
.size-option.is-selected .size-art svg { animation: check-nudge 0.45s ease-out; }
.size-line { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; margin-top: 4px; }
.size-name { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.size-max { padding: 2px 8px; border-radius: 20px; background: #eef2ef; color: var(--ink-700); font-size: 10.5px; font-weight: 800; white-space: nowrap; transition: background 0.2s ease, color 0.2s ease; }
.size-option.is-selected .size-max { background: var(--brand-700); color: #fff; }
.size-dims { margin-top: 2px; font-size: 12px; font-weight: 700; line-height: 1.35; color: var(--brand-700); }
.size-eg { font-size: 11.5px; line-height: 1.35; color: var(--ink-500); }
.size-option .parcel-check { top: 9px; right: 9px; width: 28px; height: 28px; }
.size-option .parcel-check svg { width: 18px; height: 18px; }

/* package details holds the most fields: tighter spacing keeps them all in view */
.screen[data-screen="package-details"] .steps { margin-bottom: 9px; }

/* weight and quantity share one row */
.measure-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.measure { display: block; min-width: 0; }
.measure .field-label { display: block; margin: 0 0 6px; }
.measure-box { display: flex; align-items: center; height: 60px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.measure-box:focus-within { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.measure-box input { flex: 1; width: 100%; min-width: 0; padding: 0; border: 0; outline: none; background: none; box-shadow: none; font: 800 22px var(--font); color: var(--ink-900); -moz-appearance: textfield; appearance: textfield; }
.measure-box input::-webkit-inner-spin-button, .measure-box input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.measure-box input::placeholder { color: var(--ink-300); }
.measure-box em { flex-shrink: 0; font-size: 14px; font-style: normal; font-weight: 700; color: var(--ink-500); }
.measure-box.qty-stepper { justify-content: space-between; gap: 6px; margin: 0; padding: 0 7px; }
.measure-box .qty-btn { width: 46px; height: 46px; flex-shrink: 0; border: 0; background: var(--brand-50); font-size: 24px; }
.measure-box .qty-btn:active { background: var(--brand-100); }
.measure-box .qty-value { font-size: 22px; }
.screen[data-screen="package-details"] .checkbox-field { margin-bottom: 10px; font-size: 14.5px; }
.screen[data-screen="package-details"] .checkbox-field input { width: 22px; height: 22px; }
.screen[data-screen="package-details"] .field { margin-bottom: 9px; }

/* package details: larger text. Each size panel reads name, picture and limit, then dimensions */
.screen[data-screen="package-details"] .screen-header h2 { font-size: 19px; }
.screen[data-screen="package-details"] .steps-caption { font-size: 14px; }
.screen[data-screen="package-details"] .field-label, .screen[data-screen="package-details"] .field { font-size: 15.5px; }
.screen[data-screen="package-details"] .size-head .estimate-hint { font-size: 12.5px; }
.screen[data-screen="package-details"] .size-help { font-size: 13.5px; }
.screen[data-screen="package-details"] textarea { font-size: 15.5px; }
.screen[data-screen="package-details"] .checkbox-field { font-size: 16px; }
.screen[data-screen="package-details"] .btn { font-size: 16.5px; }
.size-option { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "name name" "art max" "dims dims" "eg eg"; align-content: start; align-items: center; column-gap: 6px; padding: 10px 11px; }
.size-line { display: contents; }
.size-name { grid-area: name; font-size: 18.5px; line-height: 1.3; }
.size-art { grid-area: art; height: 42px; }
.size-art svg { width: 45px; height: 42px; }
.size-max { grid-area: max; justify-self: end; padding: 3px 8px; font-size: 12.5px; }
.size-dims { grid-area: dims; margin-top: 3px; font-size: 14px; }
.size-eg { grid-area: eg; font-size: 13px; }
.measure-box input, .measure-box .qty-value { font-size: 25px; }
.measure-box em { font-size: 15.5px; }
.screen[data-screen="package-details"] .measure-row { margin-bottom: 10px; }

/* weight label and its limit sit on one line, level with the Quantity label */
.measure .field-label { display: flex; align-items: center; justify-content: space-between; gap: 6px; height: 24px; white-space: nowrap; }
.weight-max { padding: 2px 9px; border-radius: 20px; background: var(--brand-100); color: var(--brand-800); font-size: 12.5px; font-style: normal; font-weight: 800; }

/* =============== Tracking fits one screen: the map takes whatever height is left =============== */
.screen[data-screen="track-delivery"] { padding-bottom: 8px; }
.screen[data-screen="track-delivery"] .screen-header { margin-bottom: 0; }
.screen[data-screen="track-delivery"] .track-header-card { margin-bottom: 8px; padding: 9px 14px; }
.screen[data-screen="track-delivery"] .track-map-wrap { flex: 1 0 96px; min-height: 96px; margin-bottom: 8px; }
.screen[data-screen="track-delivery"] .rider-card { margin-bottom: 8px; padding: 8px 10px; }
.screen[data-screen="track-delivery"] .rider-avatar { width: 40px; height: 40px; border-radius: 14px; }
.screen[data-screen="track-delivery"] .round-btn { width: 40px; height: 40px; }
.screen[data-screen="track-delivery"] .journey { margin-bottom: 8px; padding: 11px 12px; }
.screen[data-screen="track-delivery"] .journey-step { align-items: center; gap: 10px; min-height: 46px; padding-bottom: 8px; }
.screen[data-screen="track-delivery"] .journey-step:last-child { min-height: 38px; padding-bottom: 0; }
.screen[data-screen="track-delivery"] .journey-step::after { left: 16px; top: 38px; bottom: 0; }
.screen[data-screen="track-delivery"] .journey-icon { width: 35px; height: 35px; margin-bottom: 0; border-radius: 12px; }
.screen[data-screen="track-delivery"] .journey-text { padding-top: 0; }
.screen[data-screen="track-delivery"] .journey-time { padding-top: 0; }
.screen[data-screen="track-delivery"] .journey-eta { min-width: 62px; padding: 3px 9px; }
.screen[data-screen="track-delivery"] .journey-call { flex-shrink: 0; margin: 0; padding: 8px 12px 8px 10px; }
.track-actions { display: flex; gap: 10px; }
.track-actions .btn { min-height: 48px; margin: 0; padding-top: 11px; padding-bottom: 11px; }
.track-actions #cancelBookingBtn { width: auto; flex-shrink: 0; padding-left: 18px; padding-right: 18px; }
.track-actions [hidden] { display: none !important; }

/* tracking page is flat: no white panels, only fine lines between the sections */
.screen[data-screen="track-delivery"] .track-header-card, .screen[data-screen="track-delivery"] .rider-card, .screen[data-screen="track-delivery"] .journey { border-radius: 0; background: transparent; box-shadow: none; padding-left: 2px; padding-right: 2px; }
.screen[data-screen="track-delivery"] .track-header-card { padding-top: 2px; padding-bottom: 2px; }
.screen[data-screen="track-delivery"] .rider-card { margin-bottom: 4px; padding-top: 2px; padding-bottom: 10px; border-bottom: 1px solid #dde5e0; }
.screen[data-screen="track-delivery"] .journey { margin-bottom: 4px; padding-top: 6px; padding-bottom: 4px; }
.screen[data-screen="track-delivery"] .journey-step:not(.is-done):not(.is-next):not(.is-cancelled) .journey-icon { background: #e6ece8; }
.track-actions #cancelBookingBtn { background: transparent; }

/* review and pay: with three payment methods everything fits one screen */
.screen[data-screen="payment"] .option-row-radio { min-height: 56px; padding-top: 8px; padding-bottom: 8px; }
.screen[data-screen="payment"] .summary-card { gap: 9px; margin-bottom: 10px; padding-top: 13px; padding-bottom: 13px; }

/* =============== M-Pesa number to pay with =============== */
.option-row[data-method="M-Pesa"]:not(.is-selected) + .pay-phone { display: none; }
.option-row[data-method="M-Pesa"].is-selected:has(+ .pay-phone) { border-bottom: 0; border-radius: var(--r-md) var(--r-md) 0 0; box-shadow: none; }
.pay-phone { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; margin-top: -10px; padding: 7px 12px 9px 16px; border: 1.5px solid var(--brand-600); border-top: 1px dashed #bfe3cd; border-radius: 0 0 var(--r-md) var(--r-md); background: var(--surface); }
.pay-phone-field { flex: 1; min-width: 0; }
.pay-phone-field span { display: block; font-size: 11px; font-weight: 700; color: var(--ink-500); }
.pay-phone-field input { display: block; width: 100%; height: 30px; margin: 0; padding: 0; border: 0; border-bottom: 2px solid transparent; outline: none; background: none; font: 800 18px var(--font); letter-spacing: 0.01em; color: var(--ink-900); font-variant-numeric: tabular-nums; cursor: pointer; }
.pay-phone.is-editing .pay-phone-field input { border-bottom-color: var(--brand-600); cursor: text; }
.pay-phone-btn { flex-shrink: 0; min-width: 84px; min-height: 38px; padding: 8px 14px; border: 0; border-radius: 20px; background: var(--brand-100); color: var(--brand-800); font-size: 13px; font-weight: 800; cursor: pointer; }
.pay-phone.is-editing .pay-phone-btn { background: var(--brand-700); color: #fff; }
.pay-phone .field-error { flex-basis: 100%; margin: 4px 0 0; }
.pay-phone [hidden], .prompt-phone[hidden] { display: none !important; }
.prompt-phone { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 2px 0 12px; }
.prompt-phone span { padding: 8px 16px; border-radius: 20px; background: var(--brand-50); font-size: 13px; font-weight: 600; color: var(--ink-700); }
.prompt-phone strong { font-weight: 800; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.prompt-phone button { padding: 8px 16px; border: 1.5px solid var(--brand-600); border-radius: 20px; background: none; font-size: 13px; font-weight: 800; color: var(--brand-700); cursor: pointer; }

/* pickup and drop-off: the map grows into the free space */
.map-wrap.map-preview { flex: 1 0 150px; height: auto; min-height: 150px; }
.screen[data-screen="payment"] .info-note { margin: 10px 0 0; padding: 9px 12px; }
.screen[data-screen="payment"] .steps { margin-bottom: 10px; }
