/* Chomoka Marketplace web pages. Brand from the Chomoka logo: navy wordmark, green people mark. */
:root {
  --navy: #000239;
  --navy-2: #12155A;      /* hover / raised on navy */
  --green: #58B947;
  --green-ink: #2C7A1F;   /* green that reads on white */
  --page: #F4F6F9;
  --paper: #FFFFFF;
  --ink: #0B0D33;
  --muted: #5B6078;
  --line: #E1E4EC;
  --line-strong: #CBD0DC;
  --danger: #B42318; --danger-bg: #FDF0EF;
  --ok-bg: #EBF6E8;
  --warn: #8A5A00; --warn-bg: #FFF6DF;
  --crop-1: #58B947; --crop-2: #000239; --crop-3: #E3A72F; --crop-4: #7A5236; --crop-5: #2C7A1F; --crop-6: #8E92B8;
  --radius: 12px;
  --display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --width: 1200px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.55 var(--body); min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
a { color: var(--green-ink); }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; }

/* One width for everything: top bar, page header, content and footer line up. */
.wrap { width: 100%; max-width: var(--width); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }

/* ---------------------------------------------------------------- top bar (stacked layout) */
.topbar { background: var(--navy); color: #fff; position: relative; z-index: 20; }
.topbar .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; flex-shrink: 0; }
.brand img { height: 30px; width: auto; display: block; }
.brand span { font: 600 13px var(--body); color: var(--green); background: rgba(88,185,71,.14); padding: 3px 8px; border-radius: 999px; }
.mainnav { display: none; gap: 22px; flex: 1; min-width: 0; align-self: stretch; }
.mainnav a { display: flex; align-items: center; color: rgba(255,255,255,.72); text-decoration: none; font-weight: 500; font-size: 15px; padding: 0 2px; border-bottom: 3px solid transparent; border-top: 3px solid transparent; white-space: nowrap; }
.mainnav a:hover { color: #fff; }
.mainnav a[aria-current="page"] { color: #fff; border-bottom-color: var(--green); font-weight: 600; }
/* Inside a dropdown the page is light: the current item is navy on grey with a green edge, not white. */
.mainnav .menu-panel a[aria-current="page"], .menu-panel a[aria-current="page"] { color: var(--navy); background: #EEF0F4; border-bottom-color: transparent; box-shadow: inset 3px 0 0 var(--green); font-weight: 650; }
.topbar .spacer { flex: 1; }
.topbar .btn-on-navy { color: #fff; border: 1px solid rgba(255,255,255,.35); background: transparent; }
.topbar .btn-on-navy:hover { background: var(--navy-2); border-color: #fff; color: #fff; }

.chev { width: 10px; height: 10px; flex-shrink: 0; }
.usermenu { position: relative; display: none; margin-left: auto; flex-shrink: 0; }
.usermenu > summary .chev { color: rgba(255,255,255,.7); margin-right: 4px; }
.usermenu > summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 6px 4px 4px; border-radius: 999px; }
.usermenu > summary::-webkit-details-marker { display: none; }
.usermenu > summary:hover { background: var(--navy-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: var(--navy); display: grid; place-items: center; font: 700 14px var(--display); flex-shrink: 0; }
.who { line-height: 1.2; text-align: left; }
.who b { display: block; font-size: 14px; font-weight: 600; color: #fff; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.who small { display: block; font-size: 12px; color: rgba(255,255,255,.65); white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 240px; background: var(--paper); color: var(--ink); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,2,57,.18), 0 0 0 1px var(--line); padding: 6px; }
.menu-panel a, .menu-panel button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font: 500 15px var(--body); background: none; border: 0; cursor: pointer; }
.menu-panel a:hover, .menu-panel button:hover, .mainnav .menu-panel a:hover { background: var(--page); color: var(--navy); }
.menu-panel .menu-head { padding: 10px 12px 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-panel .menu-head b { display: block; font-weight: 600; }
.menu-panel .menu-head small { color: var(--muted); }
.menu-panel form { margin: 0; }

/* Reports dropdown in the bar */
.navmenu { position: relative; display: flex; }
.navmenu > summary { list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; color: rgba(255,255,255,.72); font-weight: 500; font-size: 15px; padding: 0 2px; border-bottom: 3px solid transparent; border-top: 3px solid transparent; white-space: nowrap; }
.navmenu > summary::-webkit-details-marker { display: none; }
.navmenu > summary:hover, .navmenu[open] > summary { color: #fff; }
.navmenu[data-current] > summary { color: #fff; border-bottom-color: var(--green); font-weight: 600; }
.navmenu .menu-panel { top: calc(100% + 2px); }
.menu-panel.left { left: 0; right: auto; width: 270px; }
.menu-panel .menu-all { border-top: 1px solid var(--line); margin-top: 6px; border-radius: 0 0 8px 8px; color: var(--green-ink); font-weight: 600; }
.mobile-section { margin: 12px 12px 2px; font-size: 12px; text-transform: none; color: rgba(255,255,255,.5); }

/* Mobile: a menu button opens the links and account stacked under the bar. */
.mobilenav { margin-left: auto; }
.mobilenav > summary { list-style: none; cursor: pointer; width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.mobilenav > summary::-webkit-details-marker { display: none; }
.mobilenav > summary:hover { background: var(--navy-2); }
.mobilenav .bars, .mobilenav .bars::before, .mobilenav .bars::after { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; position: relative; content: ""; }
.mobilenav .bars::before { position: absolute; top: -6px; }
.mobilenav .bars::after { position: absolute; top: 6px; }
.mobilenav[open] .bars { background: transparent; }
.mobilenav[open] .bars::before { top: 0; transform: rotate(45deg); }
.mobilenav[open] .bars::after { top: 0; transform: rotate(-45deg); }
.mobile-panel { position: absolute; left: 0; right: 0; top: 64px; background: var(--navy); border-top: 1px solid var(--navy-2); padding: 8px 16px 16px; box-shadow: 0 12px 24px rgba(0,2,57,.25); }
.mobile-panel a, .mobile-panel button { display: block; width: 100%; text-align: left; color: rgba(255,255,255,.85); text-decoration: none; padding: 10px 12px; border-radius: 8px; font: 500 16px var(--body); background: none; border: 0; cursor: pointer; }
.mobile-panel a[aria-current="page"] { background: var(--navy-2); color: #fff; box-shadow: inset 3px 0 0 var(--green); }
.mobile-panel .who-row { display: flex; align-items: center; gap: 12px; padding: 14px 12px 8px; margin-top: 8px; border-top: 1px solid var(--navy-2); }
.mobile-panel form { margin: 0; }

@media (min-width: 960px) {
  .mainnav, .usermenu { display: flex; }
  .usermenu { display: block; }
  .mobilenav { display: none; }
}

/* ---------------------------------------------------------------- page header band */
.pagebar { background: var(--paper); border-bottom: 1px solid var(--line); }
.pagebar .wrap { padding-top: 24px; padding-bottom: 22px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; justify-content: space-between; }
.pagebar h1 { margin: 0; font: 700 clamp(24px, 3.4vw, 30px)/1.2 var(--display); color: var(--navy); letter-spacing: -0.01em; }
.pagebar p { margin: 6px 0 0; color: var(--muted); max-width: 72ch; }
.crumb { font-size: 14px; margin: 0 0 6px !important; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--navy); }
main > .wrap { padding-top: 28px; padding-bottom: 64px; }

/* ---------------------------------------------------------------- controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--navy); background: var(--navy); color: #fff; font: 600 15px var(--body); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.btn.quiet { background: var(--paper); color: var(--navy); border-color: var(--line-strong); }
.btn.quiet:hover { border-color: var(--navy); }
.btn.danger { background: var(--paper); color: var(--danger); border-color: #F1B0AE; }
.btn.danger:hover { background: var(--danger-bg); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn.block { width: 100%; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--ink); }
.hint { font-weight: 400; color: var(--muted); font-size: 13px; }
input, select, textarea { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; font: 16px var(--body); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(88,185,71,.35); }
input[type=file] { padding: 8px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.field { margin-bottom: 18px; }
.row { display: grid; gap: 0 16px; }
@media (min-width: 720px) { .row.two { grid-template-columns: 1fr 1fr; } .row.three { grid-template-columns: repeat(3, 1fr); } }

/* Phone: one field. The flag and dial code sit inside it; the country is a real <select> on top. */
.phone { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; min-height: 44px; }
.phone:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(88,185,71,.35); }
.phone-country { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 12px; border-right: 1px solid var(--line); background: #F8F9FB; border-radius: 8px 0 0 8px; margin: 0; font: 500 15px var(--body); color: var(--ink); flex-shrink: 0; }
.phone-country img { width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.phone-country .chev { width: 10px; height: 10px; color: var(--muted); }
.phone-country select { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; width: 100%; border: 0; }
.phone-country.fixed { cursor: default; }
.phone input { border: 0; border-radius: 0 8px 8px 0; min-height: 42px; box-shadow: none !important; }
.phone input:focus { box-shadow: none; }

.country-select { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; font: 400 16px var(--body); margin: 0; cursor: pointer; }
.country-select:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(88,185,71,.35); }
.country-select img { width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.country-select .chev { margin-left: auto; color: var(--muted); }
.country-select select { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; width: 100%; }

.alert-choices { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; }
.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 14px; margin: 0; cursor: pointer; white-space: nowrap; }
.check input, .check-card input { width: 16px; height: 16px; min-height: 0; accent-color: var(--navy); margin: 0; flex-shrink: 0; }
.alert-grid { display: grid; gap: 10px; }
@media (min-width: 720px) { .alert-grid { grid-template-columns: 1fr 1fr; } }
.check-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 10px; margin: 0; cursor: pointer; font-weight: 400; }
.check-card input { margin-top: 3px; }
.check-card:has(input:checked) { border-color: var(--navy); background: #F7F8FF; }
.check-card b { display: block; font-weight: 600; }
.check-card small { color: var(--muted); font-size: 13px; line-height: 1.4; }

/* Products */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.toolbar select { width: auto; min-width: 180px; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 420px; }
.search svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 38px; }
.product-cell { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.product-cell b { display: block; font-weight: 600; }
.product-cell small { color: var(--muted); font-size: 13px; }
.product-cell:hover b { color: var(--green-ink); }
.thumb { width: 44px; height: 44px; border-radius: 10px; background: #EEF6EC; color: var(--green-ink); display: grid; place-items: center; font: 700 15px var(--display); object-fit: cover; flex-shrink: 0; border: 1px solid var(--line); }
.thumb.lg { width: 64px; height: 64px; font-size: 20px; border-radius: 14px; }
.product-table td { vertical-align: middle; }
.product-head { display: flex; gap: 16px; align-items: center; }
.product-head .tag { vertical-align: 1px; }
.radio-cards { display: grid; gap: 10px; }
@media (min-width: 720px) { .radio-cards { grid-template-columns: repeat(3, 1fr); } }
.legend-label { font-weight: 600; font-size: 14px; margin-bottom: 8px; padding: 0; }
.affix { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }
.affix:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(88,185,71,.35); }
.affix input { border: 0; box-shadow: none !important; min-width: 0; }
.affix span { display: flex; align-items: center; padding: 0 12px; color: var(--muted); background: #F8F9FB; border-left: 1px solid var(--line); border-radius: 0 8px 8px 0; font-size: 14px; }
.affix.pre span { border-left: 0; border-right: 1px solid var(--line); border-radius: 8px 0 0 8px; order: -1; }
.price-now { margin: 0; font: 700 28px var(--display); color: var(--navy); }
.price-now small { display: block; font: 400 13px var(--body); color: var(--muted); }
.pending-box { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: 14px; }
.history { list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 14px; }
.history li { display: flex; align-items: center; gap: 10px; }
.history small { margin-left: auto; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Product photos */
.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.photo { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #F8F9FB; aspect-ratio: 1; }
.photo.cover { border: 2px solid var(--green); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-badge { position: absolute; top: 8px; left: 8px; }
.photo-badge.right { left: auto; right: 8px; }
.photo-actions { position: absolute; inset: auto 0 0 0; display: flex; gap: 6px; justify-content: center; padding: 8px; background: linear-gradient(transparent, rgba(0,2,57,.55)); opacity: 0; transition: opacity .15s; }
.photo:hover .photo-actions, .photo:focus-within .photo-actions { opacity: 1; }
@media (hover: none) { .photo-actions { opacity: 1; } }
.photo-actions form { margin: 0; }
.photo-add { aspect-ratio: 1; border: 2px dashed var(--line-strong); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; color: var(--navy); font-weight: 600; margin: 0; }
.photo-add:hover { border-color: var(--navy); background: #F7F8FF; }
.photo-add span { font-size: 28px; line-height: 1; }
.photo-add small { font-weight: 400; color: var(--muted); font-size: 12px; }
.cropper-panel { margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #F8F9FB; }
.cropper-stage { max-height: 460px; background: #1b1d3a; border-radius: 8px; overflow: hidden; }
.cropper-stage img { display: block; max-width: 100%; }
.cropper-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 6px; }
.cropper-bar .spacer { flex: 1; }
.crop-size { font-size: 14px; font-weight: 600; }
.crop-size.ok { color: var(--green-ink); }
.crop-size.bad { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Reports */
.report-cards { display: grid; gap: 16px; }
@media (min-width: 820px) { .report-cards { grid-template-columns: repeat(2, 1fr); } }
.report-card { display: block; padding: 20px; text-decoration: none; color: var(--ink); }
.report-card:hover { border-color: var(--navy); }
.report-card b { display: block; font: 650 18px var(--display); color: var(--navy); margin-bottom: 4px; }
.report-card span { color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.filters .field { margin: 0; min-width: 150px; }
.filters label { font-size: 13px; }
.filters input, .filters select { min-height: 40px; }
.report-totals { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: #FAFBFC; font-size: 14px; color: var(--muted); }
.report-totals b { color: var(--navy); font: 700 18px var(--display); margin-right: 4px; }

/* Wallet */
.panel.wallet-card { background: var(--navy); color: #fff; border-color: var(--navy); }
.wallet-card .hint { color: rgba(255,255,255,.7); }
.panel.wallet-card.missing { background: var(--danger-bg); color: var(--danger); border-color: #F1B0AE; }
.wallet-no { margin: 4px 0 6px; font: 700 28px var(--display); letter-spacing: .02em; }
.danger-text { color: var(--danger) !important; }

/* Messages */
.flash { margin: 0 0 20px; padding: 12px 16px; border-radius: 10px; border: 1px solid; }
.flash.ok { background: var(--ok-bg); border-color: #B9DAC1; color: var(--green-ink); }
.flash.err { background: var(--danger-bg); border-color: #F1B0AE; color: var(--danger); }
.flash.info { background: var(--warn-bg); border-color: #F1D79A; color: var(--warn); }

/* ---------------------------------------------------------------- panels, tables */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(0,2,57,.04); min-width: 0; }
.panel > header { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel > header h2 { margin: 0; font: 650 17px var(--display); color: var(--navy); }
.panel > header p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.panel .body { padding: 20px; }
.stack > * + * { margin-top: 20px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { text-align: left; font: 600 13px var(--body); color: var(--muted); padding: 10px 14px; background: #FAFBFC; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 14px; border-bottom: 1px solid #EEF0F4; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
.num { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #EEF0F4; color: var(--muted); white-space: nowrap; }
.tag.ok { background: var(--ok-bg); color: var(--green-ink); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.err { background: var(--danger-bg); color: var(--danger); }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); padding: 0 12px; }
.tabs a { padding: 13px 10px; text-decoration: none; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--navy); }
.tabs a[aria-current="page"] { color: var(--navy); border-color: var(--green); font-weight: 650; }
.tabs .count { margin-left: 6px; font-size: 12px; background: #EEF0F4; border-radius: 999px; padding: 1px 8px; }
.figures { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 20px; }
.figure { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.figure b { display: block; font: 700 22px var(--display); color: var(--navy); font-variant-numeric: tabular-nums; }
.figure span { color: var(--muted); font-size: 14px; }
.split { display: grid; gap: 20px; }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; } }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
.qty-input { width: 110px; min-height: 38px; text-align: right; }
.steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; padding: 0; list-style: none; }
.steps li { padding: 6px 12px; border-radius: 999px; background: #E8EBF1; color: var(--muted); font-size: 14px; }
.steps li.done { background: var(--ok-bg); color: var(--green-ink); }
.steps li.now { background: var(--navy); color: #fff; font-weight: 600; }
.inline-form { display: inline; margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.member { display: flex; align-items: center; gap: 12px; }
.member .avatar { width: 36px; height: 36px; background: #E7F4E4; color: var(--green-ink); }

/* ---------------------------------------------------------------- harvest deals */
/* Small six-step track in tables: one bar per step. */
.track { display: flex; gap: 3px; margin: 4px 0 4px; padding: 0; list-style: none; width: 132px; }
.track li { flex: 1; height: 6px; border-radius: 3px; background: #E3E6ED; }
.track li.done { background: var(--green); }
.track li.now { background: var(--navy); }
.next-line { font-weight: 600; color: var(--ink); }
.next-line.wait { font-weight: 500; color: var(--muted); }
.next-line.closed, .next-line.done { font-weight: 500; color: var(--muted); }

/* The deal's steps, joined by a line; done steps in green, the current one in navy. */
.deal-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: 0 0 20px; padding: 16px 8px 14px; list-style: none; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.deal-track li { position: relative; display: grid; justify-items: center; text-align: center; gap: 2px; padding: 0 6px; min-width: 92px; }
.deal-track li::before { content: ""; position: absolute; top: 8px; left: -50%; right: 50%; height: 2px; background: var(--line); }
.deal-track li:first-child::before { display: none; }
.deal-track li.done::before, .deal-track li.now::before { background: var(--green); }
.deal-track .dot { position: relative; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 2px solid var(--line-strong); margin-bottom: 4px; }
.deal-track li.done .dot { background: var(--green); border-color: var(--green); }
.deal-track li.done .dot::after { content: ""; position: absolute; left: 5px; top: 1px; width: 4px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.deal-track li.now .dot { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(0,2,57,.12); }
.deal-track b { font-size: 14px; font-weight: 600; color: var(--muted); }
.deal-track li.done b, .deal-track li.now b { color: var(--navy); }
.deal-track small { font-size: 12px; color: var(--muted); min-height: 1.4em; }
.deal-track.compact { max-width: 520px; }

/* The "what to do now" panel: a coloured edge says whose move it is. */
.next-card { border-left: 4px solid var(--line-strong); }
.next-card.action { border-left-color: var(--green); }
.next-card.wait { border-left-color: #E3A72F; }
.next-card.done { border-left-color: var(--green-ink); }
.next-card > header p b { color: var(--ink); }
.sub-h { margin: 0 0 12px; font: 650 16px var(--display); color: var(--navy); }
.checklist { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.checklist li { padding-left: 26px; position: relative; color: var(--muted); }
.checklist li::before { content: ""; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); }
.checklist li.done { color: var(--ink); }
.checklist li.done::before { background: var(--green); border-color: var(--green); }
.sum-table td { padding-top: 10px; padding-bottom: 10px; }
.sum-table tr.total td { font: 700 18px var(--display); color: var(--navy); border-top: 2px solid var(--line); }
.agent-cell { display: inline-block; min-width: 0; }

/* ---------------------------------------------------------------- how you get paid */
/* A numbered sequence: it is a real order of events, so the numbers carry meaning. */
.payflow { list-style: none; margin: 0; padding: 0; counter-reset: pay; }
.payflow > li { position: relative; padding: 0 0 22px 48px; counter-increment: pay; }
.payflow > li:last-child { padding-bottom: 0; }
.payflow > li::before { content: counter(pay); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 14px var(--display); background: #EEF0F4; color: var(--muted); }
.payflow > li::after { content: ""; position: absolute; left: 14px; top: 34px; bottom: 4px; width: 2px; background: var(--line); }
.payflow > li:last-child::after { display: none; }
.payflow > li.money::before { background: var(--green); color: #fff; }
.payflow b { display: block; color: var(--navy); font-weight: 650; }
.payflow p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.payflow .still { display: inline-block; margin-top: 6px; font-size: 13px; color: var(--muted); background: #F4F6F9; border-radius: 6px; padding: 2px 8px; }
.payflow .moves { display: grid; gap: 6px; margin-top: 10px; }
.payflow .move { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #FBFCFD; font-size: 14px; }
.payflow .move .who { font-weight: 600; color: var(--ink); }
.payflow .move .arrow { color: var(--green-ink); font-weight: 700; }
.payflow .move .what { color: var(--muted); margin-left: auto; }
.waits { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.waits li { display: grid; grid-template-columns: 84px 1fr; gap: 2px 12px; font-size: 14px; color: var(--muted); }
.waits li .tag { grid-row: span 2; align-self: start; justify-self: start; }
.waits li b { color: var(--ink); font-weight: 600; }
.wallet-card .arrives { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.18); font-size: 14px; color: rgba(255,255,255,.78); }
.wallet-card .arrives a { color: #fff; }
.wallet-card.missing .arrives { border-top-color: #F1B0AE; color: var(--danger); }
.wallet-card.missing .arrives a { color: var(--danger); }

/* ---------------------------------------------------------------- public page */
.hero { background: var(--navy); color: #fff; padding: 48px 0 88px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .07; pointer-events: none; background: repeating-linear-gradient(-12deg, transparent 0 22px, #fff 22px 24px); }
.hero .wrap { position: relative; }
.pickers { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.picker { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.28); color: #fff; font-size: 15px; }
.picker:hover { border-color: #fff; }
.picker img { width: 20px; height: 20px; border-radius: 50%; }
.picker .chev { width: 10px; height: 10px; opacity: .7; }
.picker select { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; }
.statement { font: 600 clamp(30px, 5.2vw, 56px)/1.08 var(--display); letter-spacing: -0.02em; max-width: 20ch; margin: 0; }
.statement .qty { color: var(--green); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero .sub { margin: 22px 0 0; max-width: 62ch; color: #D3D5EC; font-size: 17px; }
.hero .facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 28px 0 0; padding: 0; list-style: none; font-size: 15px; }
.hero .facts b { font: 700 20px var(--display); color: var(--green); margin-right: 6px; font-variant-numeric: tabular-nums; }
.lifted { margin-top: -56px; position: relative; }
main > .wrap.lifted-wrap { padding-top: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.district { display: grid; grid-template-columns: 1fr; gap: 6px 24px; padding: 18px 20px; border-top: 1px solid #EEF0F4; }
@media (min-width: 820px) { .district { grid-template-columns: 220px 1fr 140px; align-items: center; } }
.district h3 { margin: 0; font: 650 18px var(--display); color: var(--navy); }
.district .where { color: var(--muted); font-size: 14px; }
.bar { display: flex; height: 16px; border-radius: 4px; overflow: hidden; background: #EEF0F4; }
.bar span { display: block; height: 100%; min-width: 3px; }
.bar-note { font-size: 13px; color: var(--muted); margin-top: 6px; }
.district .tonnes { font: 700 20px var(--display); color: var(--navy); font-variant-numeric: tabular-nums; }
@media (min-width: 820px) { .district .tonnes { text-align: right; } }
.district .tonnes small { display: block; font: 400 13px var(--body); color: var(--muted); }
.doors { display: grid; gap: 16px; margin-top: 32px; }
@media (min-width: 820px) { .doors { grid-template-columns: repeat(3, 1fr); } }
.door { padding: 24px; display: flex; flex-direction: column; }
.door h2 { margin: 0 0 6px; font: 650 20px var(--display); color: var(--navy); }
.door p { margin: 0 0 20px; color: var(--muted); }
.door-actions { margin-top: auto; display: grid; gap: 8px; }
.door-actions .btn { width: 100%; }
.privacy { color: var(--muted); font-size: 14px; margin: 16px 0 0; max-width: 75ch; }

/* ---------------------------------------------------------------- sign in and other single-card pages */
main > .wrap.centered { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: calc(100vh - 64px - 74px); padding-top: 40px; padding-bottom: 40px; }
.centered > .flash { width: 100%; max-width: 440px; }
.centered.wide > .flash { max-width: 720px; }
.card-center { width: 100%; max-width: 440px; }
.card-center.wide { max-width: 720px; }
.card-center .card-head { padding: 28px 28px 0; text-align: center; }
.card-center .card-head img { width: 44px; height: 44px; margin: 0 auto 14px; display: block; }
.card-center .card-head h1 { margin: 0; font: 700 26px/1.2 var(--display); color: var(--navy); }
.card-center .card-head p { margin: 8px auto 0; color: var(--muted); max-width: 52ch; }
.card-center .body { padding: 24px 28px 28px; }
.card-foot { margin-top: 20px; text-align: center; color: var(--muted); font-size: 14px; max-width: 440px; }
.card-center + .card-foot { width: 100%; }
.next-steps { margin: 4px 0 0; padding: 16px 18px 16px 36px; background: #F8F9FB; border-radius: 10px; color: var(--muted); font-size: 14px; display: grid; gap: 6px; }

.signin { max-width: 440px; margin: 24px auto 0; }
.signin .body { padding: 28px; }
.signin h1 { font: 700 26px var(--display); color: var(--navy); margin: 0 0 6px; }
.signin p.lead { color: var(--muted); margin: 0 0 24px; }
.code-input { letter-spacing: .4em; font: 600 24px var(--display); text-align: center; }

/* ---------------------------------------------------------------- footer */
footer.foot { background: var(--navy); color: #C9CCE6; padding: 24px 0; font-size: 14px; }
footer.foot .wrap { display: flex; gap: 12px 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
footer.foot img { height: 26px; width: auto; display: block; }
footer.foot .foot-link { color: #fff; font-weight: 600; white-space: nowrap; }
footer.foot .foot-link:hover { color: var(--green); }

@media (prefers-reduced-motion: no-preference) {
  .bar { animation: grow .6s ease-out both; transform-origin: left; }
  @keyframes grow { from { transform: scaleX(0); } }
  .menu-panel, .mobile-panel { animation: drop .14s ease-out; }
  @keyframes drop { from { opacity: 0; transform: translateY(-4px); } }
}
@media print { .topbar nav, .usermenu, .mobilenav, .doors, .pickers { display: none; } .hero { background: #fff; color: var(--ink); } }

/* Phone checks: code to the phone, then the mobile money name (partials/phone-check). */
.phone-check .pc-line { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.phone-check .pc-line > .phone { flex: 1 1 220px; min-width: 0; }
.phone-check .pc-line > input { flex: 1 1 140px; min-width: 0; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.phone-check [hidden] { display: none !important; }
.phone-check .pc-done { align-self: center; }
.phone-check .pc-code { margin-top: 10px; }
.phone-check .pc-code label { display: block; margin-bottom: 6px; font-weight: 400; font-size: 14px; color: var(--muted); }
.phone-check .pc-code label b { color: var(--ink, #212225); }
.phone-check .pc-mismatch { margin-top: 10px; padding: 12px 14px; border-radius: 8px; background: var(--warn-bg); display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.phone-check .pc-mismatch p { margin: 0; flex: 1 1 100%; }
.phone-check .pc-status { margin: 6px 0 0; font-size: 14px; min-height: 0; }
.phone-check .pc-status:empty { display: none; }
.phone-check .pc-status.ok { color: var(--green-ink); }
.phone-check .pc-status.warn { color: var(--warn); }
.phone-check .pc-status.err { color: var(--danger); }

/* Contacts at the group (supplier order page). */
.contact-list { list-style: none; margin: 0 0 16px; padding: 0; }
.contact-list li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); }
.contact-list li:first-child { border-top: 0; padding-top: 0; }
.contact-list a { font-variant-numeric: tabular-nums; }

/* Withdraw (supplier wallet). */
.seg { display: inline-flex; gap: 0; border: 1px solid var(--line-strong); border-radius: 8px; padding: 3px; margin: 0 0 18px; background: #F8F9FB; }
.seg label { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 6px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: #fff; color: var(--navy); box-shadow: 0 1px 2px rgba(17,24,39,.08); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 1px; }
[data-withdraw] [hidden] { display: none !important; }
.withdraw-confirm p { margin: 0 0 10px; }
.withdraw-confirm .pc-line { display: flex; gap: 8px; flex-wrap: wrap; }
.withdraw-confirm .pc-line input { flex: 1 1 160px; letter-spacing: .12em; }
.withdrawals td { vertical-align: top; }
.withdrawals .num { text-align: right; white-space: nowrap; }
