/* nightcap design tokens and shared components (customer, driver and dev apps). */
:root {
  --bg: #FFFFFF;
  --ink: #121A3A;
  --ink-2: #4B5563;
  --muted: #6B7280;
  --green: #1E8B2C;
  --green-dark: #16701F;
  --tint: #E8F7D8;
  --tint-2: #F6FBF1;
  --surface: #F1F3FA;
  --line: #E6E9F2;
  --line-2: #EEF0F6;
  --red: #D92D20;
  --red-tint: #FDECEA;
  --amber: #B7791F;
  --amber-tint: #FEF3C7;
  --blue: #2C6FB0;
  --blue-tint: #E6F1FB;
  --shadow: 0 4px 16px rgba(18, 26, 58, 0.07);
  --shadow-lg: 0 10px 30px rgba(18, 26, 58, 0.14);
  --r-sm: 10px;
  --r: 18px;
  --r-lg: 22px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; font-size: 15px; line-height: 1.45; }
a { color: var(--green); text-decoration: none; font-weight: 600; }
a:hover { color: var(--green-dark); }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 19px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid rgba(30, 139, 44, 0.45); outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; background: var(--green); color: #fff; font-weight: 700; font-size: 15.5px; cursor: pointer; text-decoration: none; transition: transform .06s ease, background .15s ease; white-space: nowrap; }
.btn:hover { background: var(--green-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { background: #C9CFD6; border-color: #C9CFD6; color: #fff; cursor: not-allowed; }
.btn-block { display: flex; width: 100%; }
.btn-lg { min-height: 56px; font-size: 16.5px; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--surface); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--green); border-color: transparent; }
.btn-ghost:hover { background: var(--tint-2); color: var(--green-dark); }
.btn-danger { background: var(--red-tint); color: #B42318; }
.btn-danger:hover { background: #FAD7D3; color: #912018; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #0B1129; }
.icon-btn { width: 44px; height: 44px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--line); color: var(--ink); cursor: pointer; position: relative; flex: none; }
.icon-btn:hover { background: var(--surface); }
.icon-btn .dot { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, select.input, textarea.input { width: 100%; min-height: 50px; border-radius: 14px; border: 1px solid var(--line); background: #fff; padding: 0 14px; font-size: 15px; outline: none; }
textarea.input { padding: 12px 14px; min-height: 90px; resize: vertical; }
.input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(30, 139, 44, 0.15); }
.input.is-error { border-color: var(--red); }
.hint { font-size: 12.5px; color: var(--muted); }
.error-text { font-size: 13px; color: #B42318; font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--green); margin-top: 1px; flex: none; }
.search { display: flex; align-items: center; gap: 10px; height: 48px; border-radius: 999px; background: var(--surface); padding: 0 18px; }
.search input { flex: 1; border: none; background: none; outline: none; font-size: 15px; min-width: 0; }

/* Surfaces */
.card { background: #fff; border: 1px solid #EDF0F6; border-radius: var(--r); box-shadow: var(--shadow); }
.card-pad { padding: 14px; }
.tint { background: var(--tint); }
.surface { background: var(--surface); }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.bold { font-weight: 700; }
.xbold { font-weight: 800; }
.green { color: var(--green); }
.red { color: #B42318; }
.center { text-align: center; }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--line-2); border: 0; margin: 0; }

/* Pills and badges */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap; color: var(--ink); }
.chip.is-on { background: var(--green); border-color: var(--green); color: #fff; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.badge-green { background: var(--green); color: #fff; }
.badge-tint { background: var(--tint); color: var(--green-dark); }
.badge-grey { background: var(--surface); color: var(--ink); }
.badge-red { background: var(--red-tint); color: #B42318; }
.badge-amber { background: var(--amber-tint); color: #8A5A00; }
.badge-blue { background: var(--blue-tint); color: #1D4F80; }
.badge-ink { background: var(--ink); color: #fff; }
.demo-tag { font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: var(--surface); color: var(--ink); letter-spacing: .02em; }
.sim-tag { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--amber-tint); color: #8A5A00; }

/* Wordmark */
.wordmark { position: relative; display: inline-block; font-weight: 800; letter-spacing: -0.045em; line-height: 1; padding-top: .32em; color: var(--ink); }
.wordmark .cap { color: var(--green); }
.wordmark svg { position: absolute; left: 1.35em; top: 0; width: 2.2em; height: .42em; }

/* Toast */
.toasts { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 1000; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); animation: toast-in .18s ease-out; pointer-events: auto; }
.toast.is-error { background: #B42318; }
.toast.is-ok { background: var(--green); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Modal / sheet */
.backdrop { position: fixed; inset: 0; background: rgba(18, 26, 58, 0.45); display: flex; align-items: flex-end; justify-content: center; z-index: 900; }
.sheet { background: #fff; width: min(100%, 460px); border-radius: 24px 24px 0 0; padding: 20px 18px 24px; max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); animation: sheet-in .2s ease-out; }
@media (min-width: 700px) { .backdrop { align-items: center; } .sheet { border-radius: 24px; } }
@keyframes sheet-in { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }

/* Maps */
.map { position: relative; width: 100%; height: 260px; border-radius: var(--r); overflow: hidden; background: #EAF0E6; border: 1px solid var(--line); }
.map .leaflet-container { width: 100%; height: 100%; font-family: var(--font); }
.map-note { position: absolute; left: 8px; bottom: 8px; z-index: 500; background: rgba(255, 255, 255, .92); border-radius: 8px; padding: 3px 8px; font-size: 11px; color: var(--ink-2); font-weight: 600; }
.nc-pin { width: 30px; height: 30px; border-radius: 999px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 800; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(18, 26, 58, .35); }
.nc-pin.store { background: var(--ink); }
.nc-pin.home { background: var(--green); }
.nc-pin.driver { background: #2C6FB0; }
.nc-pin.driver.sim { background: #B7791F; }
.nc-pin.pin { background: var(--red); }
.nc-pin.self { background: #2C6FB0; box-shadow: 0 0 0 6px rgba(44, 111, 176, .25); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { position: relative; padding: 0 0 14px 22px; font-size: 13.5px; }
.timeline li::before { content: ''; position: absolute; left: 5px; top: 6px; width: 8px; height: 8px; border-radius: 999px; background: var(--green); }
.timeline li::after { content: ''; position: absolute; left: 8px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }

/* Progress bar steps */
.steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; flex-direction: column; gap: 6px; font-size: 10.5px; color: var(--muted); line-height: 1.2; }
.steps li span { height: 6px; border-radius: 999px; background: var(--line); }
.steps li.done span { background: var(--ink); }
.steps li.done { color: var(--ink); }
.steps li.now span { background: var(--green); }
.steps li.now { color: var(--ink); font-weight: 700; }

/* Product art */
.art { display: flex; align-items: flex-end; justify-content: center; border-radius: 14px; overflow: hidden; }
.art img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; } /* white packshot backgrounds blend into the tile */

.skeleton { background: linear-gradient(90deg, #F1F3EF 25%, #E7EBE4 37%, #F1F3EF 63%); background-size: 400% 100%; animation: sk 1.2s ease infinite; border-radius: 12px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.empty { padding: 32px 16px; text-align: center; color: var(--ink-2); }
.banner { border-radius: 14px; padding: 12px 14px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; }
.banner-amber { background: var(--amber-tint); color: #6B4500; }
.banner-red { background: var(--red-tint); color: #8A1C12; }
.banner-green { background: var(--tint); color: var(--green-dark); }
.banner-blue { background: var(--blue-tint); color: #1D4F80; }

/* ---------- nightcap look: shared across customer, driver and dev ---------- */
.btn:not(.btn-secondary):not(.btn-ghost):not(.btn-danger):not(.btn-dark):not([disabled]):not(.is-disabled) { background: linear-gradient(180deg, #26A036 0%, #1E8B2C 100%); box-shadow: 0 6px 14px rgba(30, 139, 44, .24); }
.btn:not(.btn-secondary):not(.btn-ghost):not(.btn-danger):not(.btn-dark):not([disabled]):not(.is-disabled):hover { background: linear-gradient(180deg, #1E8B2C 0%, #17741F 100%); }
.btn-secondary { border-color: #E3E7F0; box-shadow: 0 2px 8px rgba(18, 26, 58, .05); }
.icon-btn { border-color: transparent; box-shadow: 0 3px 12px rgba(18, 26, 58, .09); }
.chip { background: var(--surface); border-color: transparent; }
.chip:hover { background: #E8F6DC; }
.chip.is-on { background: linear-gradient(180deg, #26A036, #1E8B2C); border-color: transparent; box-shadow: 0 4px 10px rgba(30, 139, 44, .25); }
.search { background: var(--surface); }
.badge-tint { background: #DDF3C8; }
[hidden] { display: none !important; }

/* Live site: hide testing notes and test-only controls */
html.nc-live .testing-note, html.nc-live [data-test-only], html.nc-live .sim-tag { display: none !important; }

/* Scrollbars: slim, rounded, no arrow buttons (Windows draws chunky grey bars with arrows by default).
   Sheets keep the bar clear of their rounded corners. */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(20, 35, 25, .22); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; min-height: 40px; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(20, 35, 25, .38); }
.sheet::-webkit-scrollbar-track { margin: 26px 0; }
.sheet { overscroll-behavior: contain; }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: rgba(20, 35, 25, .25) transparent; }
}
