/* Oxi platform — one stylesheet for Oxi Market, OxiAgro, Oxiseller, admin and branded programme pages.
   Palette from Nigerian produce: cassava leaf, laterite soil, palm oil, adire indigo, on pale sorghum. */
:root {
  --bg: #F5F3EC;
  --paper: #FFFFFF;
  --ink: #0C1410;
  --muted: #56615B;
  --line: #E0DCD0;
  --leaf: #0F3D2E;
  --laterite: #237A42;
  --palm: #C2401E;
  --adire: #2F4BFF;
  --warn: #9A5B00;
  --bad: #A12A1F;
  --good: #1F6B3A;
  --accent: var(--leaf);
  --brand: var(--accent);
  --brand-accent: #D4F25A;
  --radius: 10px;
  --wrap: 1120px;
  font-size: 16px;
}
body.site-agro { --accent: var(--laterite); }
body.site-seller { --accent: var(--palm); }
body.site-admin { --accent: var(--adire); }
body.branded { --accent: var(--brand); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0F0C; --paper: #121A16; --ink: #EEF2EC; --muted: #9DA8A2; --line: #24302A;
    --leaf: #9FD9B8; --laterite: #4CC27A; --palm: #FF7656; --adire: #7D8FFF;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
}
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.stack > * + * { margin-top: 1rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Header ---------- */
.top { background: var(--paper); border-bottom: 3px solid var(--accent); }
.top .wrap { display: flex; align-items: center; gap: 1rem; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); margin-right: auto; padding: .4rem 0; }
.brand b { font-stretch: 85%; font-weight: 800; font-size: 1.35rem; letter-spacing: -.01em; color: var(--accent); }
.brand span { font-size: .78rem; color: var(--muted); }
.brand img { max-height: 40px; width: auto; }
.nav { display: flex; gap: .25rem 1rem; flex-wrap: wrap; align-items: center; font-size: .95rem; }
.nav a { text-decoration: none; color: var(--ink); padding: .3rem 0; }
.nav a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.nav form { display: inline; }
.badge { display: inline-block; min-width: 1.3em; padding: 0 .35em; border-radius: 1em; background: var(--accent); color: #fff; font-size: .75rem; text-align: center; }
.sitebar { background: var(--ink); color: var(--bg); font-size: .8rem; }
.sitebar .wrap { display: flex; gap: 1rem; padding-top: .3rem; padding-bottom: .3rem; overflow-x: auto; }
.sitebar a { color: var(--bg); text-decoration: none; opacity: .8; white-space: nowrap; }
.sitebar a.on { opacity: 1; font-weight: 700; }

main { padding: 1.5rem 0 3rem; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .6rem; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-stretch: 85%; font-weight: 800; letter-spacing: -.015em; }
h2 { font-size: 1.35rem; font-weight: 750; margin-top: 2rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8rem; max-width: 72ch; }

/* ---------- Hero ---------- */
.hero { padding: 2rem 0 1.5rem; display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); line-height: 1.02; font-stretch: 75%; }
.hero .lead { font-size: 1.15rem; color: var(--muted); }
.tagline { font-weight: 700; color: var(--accent); margin-bottom: .6rem; }
@media (max-width: 800px) { .hero { grid-template-columns: 1fr; } }

/* ---------- The seal: verification tier stamp (signature element) ---------- */
.seal {
  display: inline-flex; align-items: center; gap: .35em; white-space: nowrap;
  font-weight: 700; font-size: .78rem; line-height: 1; padding: .32em .6em .3em;
  border: 2px solid currentColor; border-radius: 3px; transform: rotate(-1.5deg);
  font-stretch: 85%; letter-spacing: .01em; background: var(--paper);
}
.seal::before { content: ""; width: .55em; height: .55em; border-radius: 50%; border: 2px solid currentColor; }
.seal.tier1 { color: var(--muted); border-style: dashed; }
.seal.tier1::before { border-style: dashed; }
.seal.tier2 { color: var(--leaf); }
.seal.tier2::before { background: currentColor; }
.seal.tier3 { color: var(--adire); box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px currentColor; }
.seal.tier3::before { background: currentColor; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px currentColor; }
.seal.big { font-size: 1rem; padding: .5em .8em; }
.ladder { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .9rem; }
.ladder li { display: grid; grid-template-columns: 11rem 1fr; gap: .8rem; align-items: center; }
@media (max-width: 560px) { .ladder li { grid-template-columns: 1fr; gap: .3rem; } }

/* ---------- Panels, boards, tables ---------- */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.panel + .panel { margin-top: 1rem; }
.panel.accent { border-left: 4px solid var(--accent); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 860px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }

.board { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); font-size: .95rem; }
.board th, .board td { padding: .6rem .7rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.board th { font-size: .8rem; color: var(--muted); font-weight: 600; background: color-mix(in srgb, var(--bg) 60%, var(--paper)); }
.board tr:last-child td { border-bottom: 0; }
.board td.num, .board th.num { text-align: right; font-variant-numeric: tabular-nums; }
.board .thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 3px; display: block; background: var(--bg); }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 640px) {
  .board.stackable thead { display: none; }
  .board.stackable tr { display: block; border-bottom: 1px solid var(--line); padding: .4rem 0; }
  .board.stackable td { display: block; border: 0; padding: .2rem .7rem; }
  .board.stackable td.num { text-align: left; }
}

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin: 1rem 0; }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; }
.kpi b { display: block; font-size: 1.6rem; font-stretch: 85%; font-variant-numeric: tabular-nums; }
.kpi span { font-size: .85rem; color: var(--muted); }
.kpi.bad b { color: var(--bad); }
.kpi.good b { color: var(--good); }

.bar { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; min-width: 80px; }
.bar i { display: block; height: 100%; background: var(--accent); }

/* Pipeline (stages) */
.pipeline { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 0; }
.pipeline li { display: grid; grid-template-columns: 1.4rem 1fr auto; gap: .7rem; padding: .45rem 0; position: relative; }
.pipeline li::before { content: ""; width: .9rem; height: .9rem; border-radius: 50%; border: 2px solid var(--line); background: var(--paper); margin-top: .2rem; z-index: 1; }
.pipeline li::after { content: ""; position: absolute; left: .43rem; top: 1.3rem; bottom: -.45rem; width: 2px; background: var(--line); }
.pipeline li:last-child::after { display: none; }
.pipeline li.done::before { background: var(--accent); border-color: var(--accent); }
.pipeline li.now::before { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.pipeline li.now { font-weight: 700; }
.pipeline li.fail::before { background: var(--bad); border-color: var(--bad); }

/* ---------- Forms ---------- */
form.form { display: grid; gap: .9rem; }
label { display: grid; gap: .3rem; font-weight: 600; font-size: .92rem; }
label.check { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; }
label small, .hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--paper); border: 1px solid #A9B5A4; border-radius: var(--radius);
  padding: .55rem .65rem; width: 100%; min-height: 44px;
}
input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; margin-top: .25rem; }
input[type="color"] { padding: .2rem; width: 4rem; }
textarea { min-height: 6rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; margin: 0; }
legend { font-weight: 700; padding: 0 .3rem; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .9rem; }
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .3rem 1rem; }
.btn, button {
  font: inherit; font-weight: 700; cursor: pointer; border: 2px solid var(--accent); background: var(--accent); color: #fff;
  padding: .55rem 1rem; border-radius: var(--radius); min-height: 44px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
}
.btn.ghost, button.ghost { background: transparent; color: var(--accent); }
.btn.danger, button.danger { background: var(--bad); border-color: var(--bad); }
button.link { background: none; border: 0; color: var(--accent); padding: 0; min-height: 0; font-weight: 600; text-decoration: underline; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.inline { display: inline; }

/* ---------- Flash / notes ---------- */
.flash { padding: .8rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; border-left: 4px solid; background: var(--paper); }
.flash.ok { border-color: var(--good); }
.flash.warn { border-color: var(--warn); }
.flash.error { border-color: var(--bad); }
.note { border-left: 3px solid var(--accent); padding: .2rem 0 .2rem .8rem; color: var(--muted); }
.status { font-weight: 700; font-size: .85rem; }
.status.completed, .status.approved, .status.active, .status.open, .status.sent { color: var(--good); }
.status.disputed, .status.rejected, .status.failed, .status.suspended { color: var(--bad); }
.status.proposed, .status.pending, .status.applied, .status.draft, .status.held { color: var(--warn); }

/* ---------- Listing / photos ---------- */
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.photos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 3px; background: var(--bg); }
.spec { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.spec header { padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.spec ul { margin: 0; padding: .7rem 1rem .7rem 2rem; }
.spec dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem 1rem; margin: 0; padding: .7rem 1rem; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; font-weight: 600; }
.variation { background: color-mix(in srgb, var(--brand-accent) 12%, var(--paper)); border-top: 1px dashed var(--line); padding: .7rem 1rem; }

/* Messages */
.thread { display: grid; gap: .6rem; }
.msg { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .8rem; max-width: 46rem; }
.msg.me { margin-left: auto; border-color: var(--accent); }
.msg.sys { background: transparent; border-style: dashed; }
.msg header { font-size: .8rem; color: var(--muted); margin-bottom: .2rem; }

/* Tabs (studio) */
.tabs { display: flex; gap: .2rem; flex-wrap: wrap; border-bottom: 2px solid var(--line); margin: 1rem 0; }
.tabs a { padding: .5rem .8rem; text-decoration: none; color: var(--muted); font-weight: 600; margin-bottom: -2px; border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--accent); border-color: var(--accent); }

/* Studio section on public pages */
.studio-band { background: var(--ink); color: var(--bg); padding: 2.5rem 0; margin-top: 2.5rem; }
.studio-band a { color: var(--bg); }
.studio-band .panel { background: transparent; border-color: #3C4A41; color: var(--bg); }
.studio-band .muted { color: #B9C4BB; }
.studio-band h2 { margin-top: 0; font-stretch: 85%; font-size: clamp(1.6rem, 4vw, 2.2rem); }
.modlist { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .4rem 1.5rem; }
.modlist li { padding: .5rem 0; border-top: 1px solid #3C4A41; }

/* Branded programme pages */
.branded .top { border-bottom-color: var(--brand); }
.branded .powered { font-size: .78rem; color: var(--muted); }
.branded .stripe { height: 4px; background: var(--brand-accent); }

footer.foot { border-top: 1px solid var(--line); padding: 1.5rem 0 2.5rem; color: var(--muted); font-size: .88rem; }
footer.foot .wrap { display: flex; gap: 1rem 2rem; flex-wrap: wrap; justify-content: space-between; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.sitebar-tag { margin-left: auto; opacity: .8; white-space: nowrap; }
.bar i.w0 { width: 0%; }
.bar i.w5 { width: 5%; }
.bar i.w10 { width: 10%; }
.bar i.w15 { width: 15%; }
.bar i.w20 { width: 20%; }
.bar i.w25 { width: 25%; }
.bar i.w30 { width: 30%; }
.bar i.w35 { width: 35%; }
.bar i.w40 { width: 40%; }
.bar i.w45 { width: 45%; }
.bar i.w50 { width: 50%; }
.bar i.w55 { width: 55%; }
.bar i.w60 { width: 60%; }
.bar i.w65 { width: 65%; }
.bar i.w70 { width: 70%; }
.bar i.w75 { width: 75%; }
.bar i.w80 { width: 80%; }
.bar i.w85 { width: 85%; }
.bar i.w90 { width: 90%; }
.bar i.w95 { width: 95%; }
.bar i.w100 { width: 100%; }
.viewerbar { background: var(--brand-accent); color: #0C1410; font-weight: 600; font-size: .9rem; padding: .5rem 0; }
.viewerbar button.link { color: #0C1410; }
/* Fixes after visual review */
.kpi b { font-size: clamp(1.15rem, 2.1vw, 1.6rem); overflow-wrap: anywhere; }
.nav a.btn, .nav a.btn:visited { color: #fff; }
.studio-band .tagline { color: var(--brand-accent); }
dl.spec { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; margin: 0; padding: .7rem 1rem; }
dl.spec dt { color: var(--muted); }
dl.spec dd { margin: 0; font-weight: 600; }
.ladder li { grid-template-columns: max-content 1fr; }
.bar { margin: .3rem 0 .9rem; }
@media (max-width: 640px) { .sitebar-tag { display: none; } .hero h1 { font-size: 2rem; } }

/* Avatars and the place shown beside a nickname */
.who { display: inline-flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex: none; background: #dfe5d8; }
.avatar.lg { width: 96px; height: 96px; }
.avatar.md { width: 56px; height: 56px; }
.avatar-edit { display: flex; gap: 1rem; align-items: center; margin-bottom: .75rem; }

/* ------------------------------------------------------------------------------------------------
   Oxi Market: the combined platform wears the Oxi Market identity (Oxi brand v2: forest, volt, Inter Tight)
   so the contract, programme and air-cargo pages and the stamps, listings and Studio pages read as one site.
   ------------------------------------------------------------------------------------------------ */
body.site-market {
  --bg: #F5F3EC; --paper: #FFFFFF; --ink: #0F3D2E; --muted: #56615B; --line: #E0DCD0;
  --accent: #0F5C43; --brand: #0F5C43; --brand-accent: #D4F25A;
  font-family: "Inter Tight", "Segoe UI", system-ui, sans-serif;
}
body.site-market h1, body.site-market h2, body.site-market h3, body.site-market .brand b { font-family: "Inter Tight", "Segoe UI", system-ui, sans-serif; font-stretch: normal; }
body.site-market .top { background: #0F3D2E; border-bottom: 0; }
body.site-market .brand b { color: #F5F3EC; }
body.site-market .brand span { color: #A9BDB2; }
body.site-market .nav a { color: #CFE0D6; }
body.site-market .nav a:hover { color: #F5F3EC; }
body.site-market .nav a[aria-current="page"] { color: #F5F3EC; box-shadow: inset 0 -2px 0 #D4F25A; }
body.site-market .nav button.link { color: #CFE0D6; }
body.site-market .btn:not(.ghost):not(.danger), body.site-market button:not(.link):not(.ghost):not(.danger):not([class*="oxs-"]) { background: #D4F25A; border-color: #D4F25A; color: #0F3D2E; border-radius: 999px; }
body.site-market .nav a.btn, body.site-market .nav a.btn:visited { color: #0F3D2E; }
body.site-market .sitebar { background: #0A2E22; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.site-market { --bg: #0F3D2E; --paper: #164A38; --ink: #F5F3EC; --muted: #7A847E; --line: #2A5A48; --accent: #C8EA45; }
}

/* One Oxi sign-in (oxi-signin.js) */
.hidden { display: none !important; }
button.linklike, button.linklike:hover { background: none !important; border: 0 !important; padding: 0 !important; min-height: 0; box-shadow: none !important; border-radius: 0; color: var(--accent, inherit); text-decoration: underline; cursor: pointer; font: inherit; font-weight: normal; }
.signin-box { max-width: 30rem; }

/* OxiID: Continue with Google, under the code form */
.oxi-google-row { margin-top: .75rem; align-items: center; gap: .5rem; }
button.oxi-google { background: #fff; color: #1f1f1f; border: 1px solid #747775; border-radius: 999px; padding: .55rem 1.1rem; font: inherit; font-weight: 500; cursor: pointer; }
button.oxi-google:hover { background: #f2f2f2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) button.oxi-google { background: #131314; color: #e3e3e3; border-color: #8e918f; } }

/* Trade options and the requirements checklist (country scoping, 10 Oct 2026) */
.tstat { display: inline-block; padding: .05em .55em; border-radius: 1em; font-size: .78rem; font-weight: 600; border: 1px solid currentColor; }
.tstat.t-ok { color: #1E6B3A; } .tstat.t-warn { color: #9A6700; } .tstat.t-bad { color: #B42318; }
.trade-opts tr.sel td { background: rgba(30,107,58,.07); font-weight: 600; }
.lane-banner { border-left: 4px solid #9A6700; background: #FFF8E6; padding: .6rem .8rem; margin: .6rem 0; }
.lane-banner.ok { border-color: #1E6B3A; background: #EEF7F0; }
.trade-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .6rem; }
/* Admin: Oxi identity checks (views/admin/identity-check.ejs) */
.idc-list { list-style: none; padding: 0; margin: 0; }
.idc-list li { padding: 4px 0; }
.idc-ok { color: #1f7a45; }
.idc-no { color: #b3261e; }
.idc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.idc-ph { margin: 0; }
.idc-ph img, .idc-empty { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; background: #eee; }
.idc-empty { border: 1px dashed #ccc; background: none; display: flex; align-items: center; justify-content: center; }
.idc-ids { display: flex; gap: 10px; flex-wrap: wrap; }
.idc-ids img { max-width: 320px; width: 100%; border-radius: 8px; border: 1px solid #ddd; }
.idc-h { margin: 12px 0 4px; }
label.idc-check { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 2px 0; }
label.idc-check input { width: auto; margin: 0; }

/* Admin → Ads: the ad preview in the approval queue (src/views/admin/ads.ejs). */
.adprev{display:grid;grid-template-columns:180px 1fr;gap:14px;align-items:start;border:1px solid var(--line,#ddd);border-radius:14px;padding:12px;background:#fff}
.adprev .pic{width:180px;aspect-ratio:16/9;border-radius:10px;object-fit:cover;background:#eee;display:grid;place-items:center;color:#777;font-size:.85rem}
.adprev h3{margin:0 0 4px}.adprev .sp{font-size:.75rem;letter-spacing:.06em;text-transform:uppercase;color:#777}
.adprev .cta{display:inline-block;margin-top:6px;padding:4px 10px;border-radius:999px;background:#14301F;color:#D4F25A;font-size:.85rem}
.rev{display:flex;gap:8px;flex-wrap:wrap;align-items:flex-end;margin-top:10px}.rev textarea{min-width:260px;flex:1}
@media(max-width:700px){.adprev{grid-template-columns:1fr}.adprev .pic{width:100%}}

.adpic{max-width:420px;width:100%;border-radius:12px}.adh{margin:0}.adtable{margin-top:10px}
.rev .grow{flex:1}.nowrap{white-space:nowrap}
