:root {
  color-scheme: light;
  --bg: #eef2f5;
  --surface: #ffffff;
  --line: #cfd7df;
  --text: #17202a;
  --muted: #607080;
  --accent: #136f63;
  --accent-2: #b33b2e;
  --warn: #a76b00;
  --good: #1f7a3f;
  --shadow: 0 16px 34px rgba(20, 33, 46, .12);
}

html { scroll-behavior: smooth; }
body.onboarding-open { overflow: hidden; }
.onboarding[hidden], .onboarding-step[hidden], .nav-create-user[hidden] { display: none !important; }
.onboarding { position: fixed; z-index: 9999; inset: 0; display: grid; place-items: center; padding: 20px; overflow-y: auto; background: radial-gradient(circle at 20% 0%, rgba(184,239,66,.18), transparent 30%), rgba(7,20,17,.94); font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.onboarding-card { width: min(500px, 100%); overflow: hidden; border: 1px solid rgba(255,255,255,.13); border-radius: 26px; background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.38); }
.onboarding-brand { display: flex; align-items: center; gap: 11px; padding: 22px 28px; background: #10231f; color: #fff; }
.onboarding-brand > span:last-child { display: grid; line-height: 1; }
.onboarding-brand strong { font-size: 20px; }
.onboarding-brand small { margin-top: 5px; color: #b8ef42; font-size: 9px; font-weight: 900; letter-spacing: .18em; }
.onboarding-step { padding: 32px 34px 35px; }
.onboarding-chip { display: inline-block; margin-bottom: 13px; color: #63810f; font-size: 10px; font-weight: 950; letter-spacing: .15em; }
.onboarding-step h1, .onboarding-step h2 { margin: 0 0 12px; color: #14241f; font-size: clamp(29px, 6vw, 40px); letter-spacing: -.045em; line-height: 1.04; }
.onboarding-step h2 { font-size: 31px; }
.onboarding-step > p { margin: 0 0 24px; color: #66756f; line-height: 1.55; }
.onboarding-primary, .onboarding-secondary { width: 100%; min-height: 52px; margin-top: 10px; border-radius: 12px; font-size: 15px; font-weight: 900; }
.onboarding-primary { background: #b8ef42; color: #14241f; }
.onboarding-secondary { border: 1px solid #ced8d1; background: #fff; color: #20342d; }
.onboarding-android, .onboarding-ios { width: 100%; min-height: 52px; margin-top: 10px; border-radius: 12px; background: #173d32; color: #fff; font-size: 15px; font-weight: 900; }
.onboarding-ios { border: 1px solid #d7dfda; background: #f1f4f1; color: #17332b; }
.onboarding-link { display: block; margin: 17px auto 0; padding: 5px; background: transparent; color: #466159; font-size: 13px; text-decoration: underline; }
.onboarding-privacy { display: block; margin-top: 24px; padding-top: 18px; border-top: 1px solid #e6ebe7; color: #78857f; font-size: 11px; line-height: 1.5; }
.onboarding-back { margin: -8px 0 19px; padding: 0; background: transparent; color: #52665e; font-size: 13px; }
.onboarding-step > label { display: grid; gap: 7px; margin: 15px 0; color: #263b34; font-size: 12px; font-weight: 850; }
.onboarding-step select, .onboarding-step > label > input[type="email"] { width: 100%; height: 48px; padding: 0 12px; border: 1px solid #cfd9d2; border-radius: 10px; background: #f9fbf9; color: #20332d; font: inherit; box-sizing: border-box; }
.onboarding-step .onboarding-check { display: flex; align-items: flex-start; gap: 10px; color: #61716b; font-weight: 600; line-height: 1.45; }
.onboarding-check input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: #638f14; }
.onboarding-error { min-height: 18px; margin: 6px 0 0 !important; color: #ad332a !important; font-size: 12px; font-weight: 750; }
.onboarding-success { text-align: center; }
.success-mark { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto 18px; border-radius: 50%; background: #e8f8c9; color: #4e7600; font-size: 29px; font-weight: 950; }
.created-alias { display: block; margin: -8px 0 16px; color: #152a23; font-size: 31px; letter-spacing: -.03em; }
.alias-note { font-size: 13px; }
.onboarding-email { display: flex; align-items: center; justify-content: center; box-sizing: border-box; text-decoration: none; }
.nav-create-user { min-height: 38px; padding: 0 14px; border-radius: 9px; background: #b8ef42; color: #15251f; font-size: 12px; }
.nav-android, .nav-ios { min-height: 38px; padding: 0 13px; border: 1px solid rgba(184,239,66,.4); border-radius: 9px; background: rgba(184,239,66,.1); color: #d9ff82; font-size: 11px; }
.nav-ios { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.07); color: #fff; }
.driver-app { background: #f4f6f1; color: #17221f; font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
.driver-nav { height: 76px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; background: #10231f; color: #fff; border-bottom: 1px solid rgba(255,255,255,.1); }
.driver-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.driver-brand > span:last-child { display: grid; line-height: 1; }
.driver-brand strong { font-size: 20px; letter-spacing: -.02em; }
.driver-brand small { margin-top: 5px; color: #b8f040; font-size: 9px; font-weight: 900; letter-spacing: .22em; }
.desktop-links { display: flex; align-self: stretch; align-items: center; gap: 28px; }
.desktop-links a { position: relative; color: #9eb0aa; font-size: 13px; font-weight: 750; text-decoration: none; }
.desktop-links a:hover, .desktop-links a.active { color: #fff; }
.desktop-links a.active::after { content: ""; position: absolute; right: 0; bottom: -29px; left: 0; height: 3px; border-radius: 4px 4px 0 0; background: #b8ef42; }
.brand-mark, .coin { display: grid; place-items: center; border-radius: 50%; background: #b8ef42; color: #10231f; font-weight: 950; transform: rotate(-8deg); }
.brand-mark { width: 38px; height: 38px; font-size: 23px; box-shadow: inset 0 0 0 4px rgba(16,35,31,.15); }
.nav-actions { display: flex; align-items: center; gap: 15px; }
.network-pill { padding: 8px 12px; border-radius: 99px; background: rgba(255,255,255,.07); font-size: 12px; font-weight: 700; }
.network-pill i, .status-chip.live i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #b8ef42; box-shadow: 0 0 0 4px rgba(184,239,66,.12); }
.avatar-btn { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; background: #26443c; color: #fff; font-weight: 850; cursor: pointer; }
.driver-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 46px 0 64px; }
.welcome-row { display: flex; justify-content: space-between; gap: 28px; align-items: end; margin-bottom: 26px; }
.driver-kicker { margin-bottom: 8px; color: #5b756d; font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.welcome-row h2 { margin: 0 0 8px; font-size: clamp(30px, 4vw, 47px); letter-spacing: -.045em; line-height: 1.04; }
.welcome-row > div:first-child > p:last-child { margin: 0; color: #63716c; font-size: 16px; }
.level-card { width: 270px; padding: 17px 19px; border: 1px solid #dfe5dc; border-radius: 14px; background: rgba(255,255,255,.65); }
.level-card span, .level-card small { display: block; color: #728078; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.level-card strong { display: block; margin: 5px 0 10px; font-size: 15px; }
.level-track { height: 5px; margin-bottom: 8px; overflow: hidden; border-radius: 9px; background: #dce3dc; }
.level-track i { display: block; width: 62%; height: 100%; background: #6da512; }
.level-steps { position: relative; display: flex; justify-content: space-between; margin-top: 14px; }
.level-steps::before { content: ""; position: absolute; top: 10px; right: 9px; left: 9px; height: 2px; background: #dce3dc; }
.level-steps b { position: relative; z-index: 1; display: grid; place-items: center; width: 21px; height: 21px; border: 2px solid #d4dcd4; border-radius: 50%; background: #fff; color: #8a968f; font-size: 7px; }
.level-steps b.done { border-color: #9a673e; background: #a97145; color: #fff; }
.level-steps b.current { border-color: #74808a; background: #9aa4ac; color: #fff; box-shadow: 0 0 0 4px rgba(116,128,138,.12); }
.driver-grid { display: grid; grid-template-columns: 1.25fr .95fr; gap: 18px; }
.balance-card, .trip-card, .activity-card, .community-card { border-radius: 20px; box-shadow: 0 18px 50px rgba(23,34,31,.08); }
.balance-card { position: relative; overflow: hidden; padding: 29px; background: #10231f; color: #fff; }
.balance-card::after { content: "P"; position: absolute; right: -12px; bottom: -73px; color: rgba(184,239,66,.055); font-size: 260px; font-weight: 950; transform: rotate(-12deg); }
.balance-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; color: #9bb0aa; font-size: 11px; font-weight: 900; letter-spacing: .15em; }
.coin { width: 26px; height: 26px; font-size: 16px; }
.balance-top button { margin-left: auto; border: 0; background: transparent; color: #aabbb6; cursor: pointer; }
.big-balance { position: relative; z-index: 1; display: block; margin: 20px 0 4px; font-size: clamp(42px, 6vw, 66px); letter-spacing: -.055em; line-height: 1; }
.big-balance small { color: #b8ef42; font-size: 18px; letter-spacing: 0; }
.balance-card > p { position: relative; z-index: 1; color: #a9bbb5; font-size: 13px; }
.balance-actions { position: relative; z-index: 1; display: flex; gap: 10px; margin-top: 25px; }
.primary-action, .ghost-action, .start-trip, .stop-trip { min-height: 44px; padding: 0 19px; border-radius: 10px; font-weight: 850; cursor: pointer; }
.primary-action { border: 0; background: #b8ef42; color: #15251f; }
.ghost-action { border: 1px solid #3d534c; background: transparent; color: #fff; }
.demo-note { position: relative; z-index: 1; display: block; max-width: 520px; margin-top: 20px; color: #789088; font-size: 10px; line-height: 1.45; }
.beta-sync { position: relative; z-index: 1; display: flex; align-items: center; gap: 7px; margin-top: 12px; color: #93a69f; font-size: 10px; font-weight: 750; }
.beta-sync i { width: 7px; height: 7px; border-radius: 50%; background: #d59b3c; }
.beta-sync.connected i { background: #b8ef42; box-shadow: 0 0 0 4px rgba(184,239,66,.1); }
.beta-sync.offline i { background: #d36b61; }
.trip-card { display: grid; place-items: center; min-height: 320px; padding: 34px; border: 1px solid #e0e6dd; background: #fff; text-align: center; }
.status-chip { display: inline-flex; align-items: center; padding: 7px 10px; border-radius: 7px; background: #eef3e9; color: #52645d; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.status-chip.live { background: #eef8db; color: #466800; }
.trip-card h3 { margin: 21px 0 8px; font-size: 26px; letter-spacing: -.03em; }
.trip-card p { max-width: 360px; color: #75827e; line-height: 1.45; }
.start-trip { margin-top: 9px; border: 0; background: #1b342d; color: #fff; }
.start-trip span { margin-right: 7px; color: #b8ef42; }
.gps-permission { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px auto 4px; color: #73817c; font-size: 11px; font-weight: 750; }
.gps-permission i { width: 8px; height: 8px; border-radius: 50%; background: #d59b3c; }
.gps-permission.requesting i { animation: gpsPulse 1s infinite; }
.gps-permission.active { color: #527000; }
.gps-permission.active i { background: #7fad20; box-shadow: 0 0 0 4px rgba(127,173,32,.12); }
.gps-permission.denied { color: #a13b32; }
.gps-permission.denied i { background: #c5574e; }
@keyframes gpsPulse { 50% { opacity: .3; transform: scale(.75); } }
.stop-trip { border: 1px solid #c5574e; background: #fff; color: #a6322a; }
.trip-stats { display: flex; justify-content: center; gap: 45px; margin: 19px 0; }
.trip-stats span { display: grid; gap: 4px; color: #83908b; font-size: 11px; }
.trip-stats strong { color: #21322c; font-size: 14px; }
.road-intel { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; margin: 18px 0; }
.next-stop-card, .safety-card { padding: 23px; border: 1px solid #e0e6dd; border-radius: 17px; background: #fff; box-shadow: 0 12px 32px rgba(23,34,31,.05); }
.intel-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.distance-pill, .community-live { color: #66776f; font-size: 11px; font-weight: 800; }
.community-live i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #68a012; }
.station-line { display: flex; align-items: center; gap: 14px; margin: 19px 0; }
.station-logo { display: grid; place-items: center; width: 51px; height: 51px; border-radius: 13px; background: #0b5fa9; color: #fff; font-size: 12px; font-weight: 950; }
.station-line h3, .safety-card h3 { margin: 0 0 5px; font-size: 19px; }
.station-line p, .safety-card p { margin: 0; color: #728079; font-size: 13px; line-height: 1.5; }
.service-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.service-chips span { padding: 7px 9px; border-radius: 7px; background: #f1f4ef; color: #617169; font-size: 10px; font-weight: 800; }
.route-link { display: flex; justify-content: space-between; margin-top: 18px; padding-top: 15px; border-top: 1px solid #edf0ec; color: #486b0c; font-size: 13px; font-weight: 850; text-decoration: none; }
.status-chip.safe { background: #e7f4e9; color: #28643b; }
.safety-card { background: linear-gradient(145deg, #edf6e5, #f7faf4); }
.safety-card h3 { margin-top: 21px; }
.safety-actions { display: flex; gap: 9px; margin-top: 19px; }
.safety-actions button { flex: 1; min-height: 39px; border: 1px solid #cad7c4; border-radius: 9px; background: #fff; color: #30483d; font-weight: 800; cursor: pointer; }
.safety-actions button:last-child { border-color: #e0b7b2; color: #a43c33; }
.missions-section { margin: 18px 0; padding: 27px; border: 1px solid #dce4da; border-radius: 20px; background: linear-gradient(145deg, #fff, #f4f8ee); box-shadow: 0 18px 45px rgba(23,34,31,.06); }
.missions-heading { display: flex; justify-content: space-between; align-items: end; gap: 25px; margin-bottom: 21px; }
.missions-heading h3 { margin-bottom: 6px; font-size: 23px; }
.missions-heading > div:first-child > p:last-child { margin: 0; color: #75827d; font-size: 13px; }
.daily-progress { width: 180px; }
.daily-progress > span { display: block; color: #4f7413; font-size: 20px; font-weight: 900; text-align: right; }
.daily-progress small { display: block; margin: 2px 0 7px; color: #78867f; font-size: 10px; text-align: right; }
.daily-progress > div, .mini-progress { height: 6px; overflow: hidden; border-radius: 8px; background: #dfe6dc; }
.daily-progress i, .mini-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: #70a51b; transition: width .3s ease; }
.mission-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 12px; }
.mission-card { position: relative; display: flex; flex-direction: column; min-height: 275px; padding: 19px; border: 1px solid #dfe6dc; border-radius: 15px; background: #fff; }
.mission-card.featured { overflow: hidden; border-color: #8ba85e; background: #122a23; color: #fff; }
.mission-card.featured::after { content: "⌖"; position: absolute; right: -15px; bottom: -55px; color: rgba(184,239,66,.06); font-size: 170px; }
.mission-reward { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; }
.mission-reward span { color: #7b8983; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.mission-card.featured .mission-reward span { color: #9cafaa; }
.mission-reward strong { color: #56820b; font-size: 12px; }
.mission-card.featured .mission-reward strong { color: #b8ef42; }
.mission-icon { position: relative; z-index: 1; display: grid; place-items: center; width: 42px; height: 42px; margin: 22px 0 13px; border-radius: 11px; background: #edf4e4; color: #5d8619; font-size: 20px; font-weight: 900; }
.mission-card.featured .mission-icon { background: rgba(184,239,66,.13); color: #b8ef42; }
.mission-card h4 { position: relative; z-index: 1; margin: 0 0 7px; font-size: 17px; }
.mission-card p { position: relative; z-index: 1; margin: 0; color: #74817c; font-size: 12px; line-height: 1.5; }
.mission-card.featured p { color: #a6b7b1; }
.verify-row { position: relative; z-index: 1; display: flex; gap: 6px; margin: 13px 0; }
.verify-row span { padding: 5px 7px; border-radius: 6px; background: rgba(255,255,255,.08); color: #c0cec9; font-size: 8px; font-weight: 800; }
.mission-action { position: relative; z-index: 1; display: grid; place-items: center; min-height: 39px; margin-top: auto; border: 0; border-radius: 9px; background: #b8ef42; color: #172820; font-size: 12px; font-weight: 900; text-decoration: none; cursor: pointer; }
.secondary-mission { background: #1c362e; color: #fff; }
.link-action { background: #eef3e9; color: #45650e; }
.mini-progress { margin: auto 0 7px; }
.mission-card > small { color: #7b8983; font-size: 10px; }
.mission-card.completed { border-color: #76a12f; background: #f2f8e9; }
.mission-card.completed .mission-action { background: #dfead0; color: #527019; pointer-events: none; }
.theft-reward-panel { display: grid; grid-template-columns: auto minmax(260px,1fr) auto auto; gap: 18px; align-items: center; margin-top: 14px; padding: 20px; border: 1px solid #e3c5c0; border-radius: 15px; background: #fff7f5; }
.theft-shield { display: grid; place-items: center; width: 48px; height: 55px; border-radius: 15px 15px 20px 20px; background: #9e3c33; color: #fff; font-size: 23px; font-weight: 950; }
.theft-reward-panel h4 { margin: 0 0 5px; font-size: 18px; }
.theft-reward-panel p:last-child { margin: 0; color: #776c68; font-size: 11px; line-height: 1.45; }
.theft-steps { display: flex; gap: 9px; }
.theft-steps span { display: grid; justify-items: center; gap: 5px; max-width: 78px; color: #766d69; font-size: 8px; font-weight: 800; text-align: center; }
.theft-steps b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #eedbd8; color: #8e3a32; }
.theft-reward-panel > a { padding: 11px 13px; border-radius: 9px; background: #8f382f; color: #fff; font-size: 11px; font-weight: 850; text-decoration: none; white-space: nowrap; }
.report-status-box { padding: 12px; border-radius: 9px; background: #fff0da; }
.report-status-box span, .report-status-box strong, .report-status-box small { display: block; }
.report-status-box span { color: #947242; font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.report-status-box strong { margin: 5px 0; color: #744f1b; font-size: 13px; }
.report-status-box small { color: #876e4b; font-size: 10px; line-height: 1.4; }
.evidence-upload small { margin-top: 6px; color: #74817c; font-size: 10px; line-height: 1.4; }
.safety-warning { display: grid; gap: 5px; padding: 13px; border: 1px solid #e1b8b3; border-radius: 9px; background: #fff1ef; color: #88372f; }
.safety-warning strong { font-size: 12px; }
.safety-warning span { font-size: 10px; line-height: 1.4; }
.price-capture-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0; }
.photo-capture { position: relative; display: grid; place-items: center; min-height: 190px; overflow: hidden; border: 2px dashed #b9c6bd; border-radius: 13px; background: #f4f6f3; cursor: pointer; }
.photo-capture input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-capture img { width: 100%; height: 190px; object-fit: cover; }
.photo-placeholder { display: grid; gap: 8px; justify-items: center; color: #65766e; font-size: 12px; font-weight: 800; text-align: center; }
.photo-placeholder b { font-size: 30px; }
.capture-fields { display: grid; align-content: start; gap: 11px; }
.capture-fields label { display: grid; gap: 6px; color: #5f7068; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.capture-fields input, .capture-fields select { width: 100%; height: 44px; padding: 0 11px; border: 1px solid #cad4cd; border-radius: 8px; background: #fff; color: #22342c; font: inherit; text-transform: none; }
.gps-box { padding: 12px; border-radius: 9px; background: #edf2eb; }
.gps-box strong, .gps-box small { display: block; }
.gps-box strong { font-size: 12px; }
.gps-box small { margin-top: 4px; color: #75827d; font-size: 10px; }
.gps-box.verified { background: #e8f4df; color: #497316; }
.capture-privacy { color: #76847d; font-size: 10px; line-height: 1.4; }
.quick-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
.quick-stats article { display: flex; gap: 14px; align-items: center; padding: 20px; border: 1px solid #e1e6df; border-radius: 15px; background: #fff; }
.stat-icon, .movement-icon { display: grid; flex: 0 0 auto; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #edf4e2; color: #567f10; font-weight: 900; }
.quick-stats small { color: #76857f; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.quick-stats strong { display: block; margin: 4px 0 2px; font-size: 19px; }
.quick-stats p { margin: 0; color: #80908a; font-size: 11px; }
.route-bottom { display: grid; grid-template-columns: 1.65fr .75fr; gap: 18px; }
.activity-card, .community-card { padding: 26px; border: 1px solid #e1e6df; background: #fff; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.section-title h3, .community-card h3 { font-size: 22px; }
.section-title button { border: 0; background: transparent; color: #557512; font-weight: 800; cursor: pointer; }
.movement { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 13px; align-items: center; padding: 14px 0; border-bottom: 1px solid #edf0ec; }
.movement:last-child { border: 0; }
.movement > div { min-width: 0; }
.movement strong { display: block; font-size: 13px; }
.movement small { display: block; margin-top: 4px; color: #7c8984; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.movement-amount { text-align: right; }
.movement-amount strong { color: #507b0a; }
.community-card { background: #eaf1df; }
.community-card > p:not(.driver-kicker) { color: #61705f; font-size: 14px; line-height: 1.55; }
.community-card a { display: flex; justify-content: space-between; margin-top: 34px; padding-top: 16px; border-top: 1px solid #cfdac1; color: #253b31; font-weight: 850; text-decoration: none; }
.rank-section { margin-top: 18px; padding: 27px; border: 1px solid #e0e6dd; border-radius: 18px; background: #fff; }
.rank-section .section-title > small { max-width: 320px; color: #74827d; line-height: 1.4; text-align: right; }
.rank-road { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; margin-top: 19px; }
.rank-item { position: relative; padding: 16px 13px; border: 1px solid #e1e6df; border-radius: 12px; background: #f8faf7; }
.rank-item.active { border-color: #87a65a; background: #f0f7e7; box-shadow: inset 0 0 0 1px #87a65a; }
.rank-item.complete { background: #f5f1ec; }
.rank-medal { display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 12px; border-radius: 50%; background: #e5e9e4; color: #75817b; font-size: 10px; font-weight: 950; }
.rank-item.complete .rank-medal { background: #aa7349; color: #fff; }
.rank-item.active .rank-medal { background: #9aa4ac; color: #fff; box-shadow: 0 0 0 5px rgba(154,164,172,.14); }
.rank-item:nth-child(3) .rank-medal { color: #946f00; background: #f4e5a6; }
.rank-item:nth-child(4) .rank-medal { color: #4c6772; background: #dce8ed; }
.rank-item:nth-child(5) .rank-medal { color: #186675; background: #cceef5; }
.rank-item strong, .rank-item small { display: block; }
.rank-item strong { font-size: 13px; }
.rank-item small { margin-top: 5px; color: #7b8983; font-size: 10px; }
.mobile-nav { display: none; }
.legacy-app { border-top: 7px solid #b8ef42; }
.app-toast { position: fixed; z-index: 1000; left: 50%; bottom: 24px; padding: 13px 18px; border-radius: 10px; background: #132620; color: #fff; box-shadow: 0 12px 40px rgba(0,0,0,.25); font-weight: 700; transform: translate(-50%, 130px); transition: transform .25s ease; }
.app-toast.show { transform: translate(-50%, 0); }
.reward-dialog { width: min(560px, calc(100% - 30px)); padding: 0; border: 0; border-radius: 20px; box-shadow: 0 30px 100px rgba(0,0,0,.35); }
.reward-dialog::backdrop { background: rgba(8,20,17,.7); backdrop-filter: blur(4px); }
.reward-dialog-card { position: relative; padding: 30px; }
.reward-close { position: absolute; top: 15px; right: 15px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #eef1ed; font-size: 20px; cursor: pointer; }
.redeem-label { display: grid; gap: 7px; margin: 24px 0 12px; color: #52635d; font-size: 12px; font-weight: 800; }
.redeem-label input { height: 48px; padding: 0 13px; border: 1px solid #ccd5cf; border-radius: 9px; font: inherit; font-size: 17px; }
.redeem-preview { margin-bottom: 18px; padding: 16px; border-radius: 10px; background: #edf4e2; }
.redeem-preview small { display: block; margin-top: 5px; color: #718066; font-size: 10px; }
.wallet-summary { display: flex; justify-content: space-between; margin-top: 20px; padding: 14px; border-radius: 10px; background: #10231f; color: #fff; }
.wallet-summary span { color: #a6b7b1; font-size: 12px; }
.amount-presets { display: flex; gap: 7px; margin-bottom: 14px; }
.amount-presets button { flex: 1; padding: 8px; border: 1px solid #d4ddd6; border-radius: 8px; background: #fff; color: #42564e; font-weight: 800; cursor: pointer; }
.profile-head { display: flex; align-items: center; gap: 16px; }
.profile-head h2 { margin-bottom: 4px; }
.profile-head p:last-child { margin: 0; color: #728079; font-size: 12px; }
.profile-avatar { display: grid; flex: 0 0 auto; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #193b31; color: #fff; font-size: 20px; font-weight: 900; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 24px 0; }
.profile-grid div { padding: 14px; border-radius: 10px; background: #f2f5f1; }
.profile-grid span, .profile-grid strong { display: block; }
.profile-grid span { margin-bottom: 5px; color: #77857f; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.verified-text { color: #3e711f; }
.demo-box { padding: 13px; border: 1px solid #e0e5df; border-radius: 9px; color: #6f7c76; font-size: 11px; line-height: 1.5; }
.alert-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 20px 0; }
.alert-options button { min-height: 50px; border: 1px solid #d8dfda; border-radius: 10px; background: #fff; color: #34483f; font-weight: 800; cursor: pointer; }
.alert-options button.selected { border-color: #a53e35; background: #fff0ee; color: #9b332b; box-shadow: inset 0 0 0 1px #a53e35; }
.primary-action:disabled { cursor: not-allowed; opacity: .45; }
.wide { width: 100%; }
.dialog-movements { max-height: 55vh; overflow: auto; }

@media (max-width: 820px) {
  body { padding-bottom: 67px; }
  .driver-shell { width: min(100% - 24px, 600px); padding-top: 28px; }
  .driver-nav { position: sticky; z-index: 50; top: 0; height: 64px; padding: 0 15px; }
  .desktop-links { display: none; }
  .welcome-row { display: block; }
  .level-card { width: 100%; margin-top: 22px; }
  .driver-grid, .route-bottom, .road-intel { grid-template-columns: 1fr; }
  .missions-heading { display: block; }
  .daily-progress { width: 100%; margin-top: 17px; }
  .daily-progress > span, .daily-progress small { text-align: left; }
  .mission-grid { grid-template-columns: 1fr; }
  .mission-card { min-height: 245px; }
  .theft-reward-panel { grid-template-columns: auto 1fr; }
  .theft-steps, .theft-reward-panel > a { grid-column: 1 / -1; }
  .theft-steps { justify-content: center; }
  .theft-reward-panel > a { text-align: center; }
  .price-capture-grid { grid-template-columns: 1fr; }
  .quick-stats { grid-template-columns: 1fr; }
  .network-pill { display: none; }
  .nav-android { padding: 0 9px; font-size: 0; }
  .nav-android::after { content: "↓ App"; font-size: 10px; }
  .balance-card, .trip-card { min-height: 0; padding: 24px; }
  .balance-actions { flex-direction: column; }
  .movement { grid-template-columns: auto minmax(0,1fr); }
  .movement-amount { grid-column: 2; text-align: left; }
  .rank-section { padding: 21px; }
  .rank-section .section-title > small { display: none; }
  .rank-road { display: flex; overflow-x: auto; padding-bottom: 7px; scroll-snap-type: x mandatory; }
  .rank-item { min-width: 130px; scroll-snap-align: start; }
  .mobile-nav { position: fixed; z-index: 100; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4,1fr); padding: 7px 5px max(7px, env(safe-area-inset-bottom)); border-top: 1px solid #dce3dc; background: rgba(255,255,255,.96); box-shadow: 0 -8px 30px rgba(20,35,29,.08); backdrop-filter: blur(12px); }
  .mobile-nav a { display: grid; justify-items: center; gap: 2px; color: #728078; font-size: 9px; font-weight: 800; text-decoration: none; }
  .mobile-nav b { font-size: 18px; font-weight: 500; }
  .mobile-nav a.active { color: #3f6500; }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  min-height: 118px;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #13212d;
  color: #fff;
  border-bottom: 5px solid var(--accent);
}

.eyebrow {
  margin: 0 0 6px;
  color: #9fc8be;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.eyebrow.dark { color: #4e6b68; }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: 17px; }
h3 { margin-bottom: 8px; font-size: 18px; }

.source {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  color: #d8e5e8;
}

a { color: inherit; }

.market-board {
  padding: 18px;
  background: #dfe7eb;
  border-bottom: 1px solid var(--line);
}

.market-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 12px;
}

.market-heading h2 {
  margin-bottom: 0;
  font-size: clamp(22px, 3vw, 34px);
}

.market-clock {
  display: grid;
  gap: 4px;
  justify-items: end;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.market-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.quote-card {
  position: relative;
  min-height: 142px;
  padding: 16px;
  overflow: hidden;
  border-radius: 8px;
  background: #0f1b25;
  color: #fff;
  box-shadow: var(--shadow);
}

.quote-card::after {
  content: "";
  position: absolute;
  inset: auto -24px -42px auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}

.quote-card span,
.quote-card small {
  position: relative;
  z-index: 1;
  display: block;
}

.quote-card span {
  color: #b9c7ce;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.quote-card strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 12px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1;
}

.quote-card small {
  margin-top: 10px;
  color: #d9e2e6;
  font-weight: 800;
}

.quote-card.up { background: linear-gradient(135deg, #0f5132, #15803d); }
.quote-card.down { background: linear-gradient(135deg, #7f1d1d, #b91c1c); }
.quote-card.flat { background: linear-gradient(135deg, #263846, #455866); }
.quote-card.local { background: linear-gradient(135deg, #134e4a, #0f766e); }
.quote-card.loading { background: linear-gradient(135deg, #263846, #607080); }

.layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.filters, .content {
  min-width: 0;
}

.filters {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 12px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

textarea { min-height: 86px; resize: vertical; }

.panel, .station-card, .province-card, .report-card, .dialog-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .03);
}

.panel { padding: 16px; }

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
}

.stats div {
  padding: 10px;
  border-radius: 7px;
  background: #f5f8fa;
}

dt { color: var(--muted); font-size: 12px; }
dd { margin: 3px 0 0; font-size: 22px; font-weight: 800; }

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.tabs {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

button {
  border: 0;
  border-radius: 7px;
  padding: 10px 13px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
}

.danger {
  display: block;
  margin-top: 8px;
  background: var(--accent-2);
}

.tab {
  border-radius: 0;
  background: #fff;
  color: var(--muted);
}

.tab.active {
  background: var(--accent);
  color: #fff;
}

.secondary {
  background: #263846;
}

.view { display: none; }
.view.active { display: block; }

.station-list, .reports-list {
  display: grid;
  gap: 10px;
}

.station-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 15px;
}

.station-meta, .price-row, .badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.station-meta {
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef4f2;
  color: #28544f;
  font-size: 12px;
  font-weight: 800;
}

.badge.alert { background: #fdebea; color: var(--accent-2); }
.badge.warn { background: #fff5df; color: var(--warn); }
.badge.good { background: #e8f6ed; color: var(--good); }

.price-row {
  margin-top: 10px;
  font-size: 13px;
}

.price {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfd;
}

.province-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.province-card, .report-card {
  padding: 15px;
}

.risk-line {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e5eaee;
  overflow: hidden;
  margin: 12px 0;
}

.risk-line span {
  display: block;
  height: 100%;
  background: var(--accent);
}

dialog {
  width: min(760px, calc(100vw - 28px));
  border: 0;
  padding: 0;
  background: transparent;
}

dialog::backdrop { background: rgba(10, 18, 25, .55); }

.dialog-card {
  position: relative;
  padding: 22px;
  box-shadow: var(--shadow);
}

.close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  padding: 0;
  background: #e8edf1;
  color: var(--text);
}

.dialog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.wide { grid-column: 1 / -1; }

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.empty {
  padding: 36px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .source { justify-content: flex-start; }
  .market-cards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .onboarding { align-items: start; padding: 12px; }
  .onboarding-card { margin: 8px 0; border-radius: 20px; }
  .onboarding-brand { padding: 18px 22px; }
  .onboarding-step { padding: 25px 22px 27px; }
  .network-pill { display: none; }
  .nav-create-user { padding: 0 10px; font-size: 10px; }
  .layout { padding: 12px; }
  .market-heading { align-items: flex-start; flex-direction: column; }
  .market-clock { justify-items: start; }
  .market-cards { grid-template-columns: 1fr; }
  .toolbar, .station-card { grid-template-columns: 1fr; flex-direction: column; align-items: stretch; }
  .tabs { width: 100%; }
  .tab { flex: 1; }
  .dialog-grid { grid-template-columns: 1fr; }
}
