/* IoTides Marketplace. Colours from the IoTides logo: teal and blue waves,
   a green sphere. One stylesheet for every page; no inline styles (the
   Content-Security-Policy forbids them). */

:root {
  --ink: #0f2533;
  --muted: #5b6b78;
  --line: #dde6ee;
  --bg: #f3f7fa;
  --panel: #ffffff;
  --teal: #0e7c7b;
  --teal-dark: #0a5f5e;
  --blue: #1f73b7;
  --green: #2f8f4e;
  --wave: linear-gradient(135deg, #1f9e8f 0%, #1f73b7 100%);
  --warn-bg: #fff7e6;
  --warn-ink: #7a4a00;
  --warn-line: #f3d8a4;
  --error-bg: #fdecec;
  --error-ink: #a12a2a;
  --ok-bg: #e9f7ef;
  --ok-ink: #1d6b3a;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 37, 51, 0.08);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
}

a { color: var(--blue); }
a:hover { color: var(--teal-dark); }

code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ---------- top bar ---------- */
.topbar { background: var(--panel); border-bottom: 1px solid var(--line); }
.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 1.1rem; }
.brand strong { background: var(--wave); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.who { color: var(--muted); font-size: 0.92rem; }
form.inline { display: inline; margin: 0; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 28px 20px; flex: 1; }
.footer { color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); background: var(--panel); }
.footer .container { padding: 16px 20px; }

.page-head h1 { margin: 2px 0 18px; font-size: 1.8rem; }
.eyebrow { margin: 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); }

.panel, .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.panel.narrow { max-width: 520px; margin: 24px auto; }
.panel h1 { margin: 4px 0 12px; font-size: 1.6rem; }
.panel h2 { margin: 26px 0 6px; font-size: 1.1rem; }
.card h2 { margin: 0 0 10px; font-size: 1.05rem; }
/* Cards stacked one under another get a gap; cards side by side in a grid
   are spaced by the grid itself. */
.container > .card + .card, .grid + .card { margin-top: 18px; }

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

.big { font-size: 2.4rem; font-weight: 800; margin: 0; color: var(--teal-dark); }
.hint, .muted { color: var(--muted); font-size: 0.9rem; }

dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 0.95rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.dot-ok { background: var(--green); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
ol.roadmap, ol.steps { margin: 0; padding-left: 22px; }
ol.roadmap li, ol.steps li { margin: 6px 0; }

/* ---------- landing ---------- */
.hero {
  padding: 48px 32px;
  border-radius: 22px;
  background: var(--wave);
  color: #fff;
  box-shadow: var(--shadow);
}
.hero .eyebrow { color: rgba(255, 255, 255, 0.85); }
.hero h1 { margin: 8px 0 14px; font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.2; max-width: 820px; }
.hero .lead { max-width: 760px; font-size: 1.08rem; margin: 0; color: rgba(255, 255, 255, 0.94); }
.hero .soon { display: inline-block; margin: 22px 0 0; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); font-weight: 700; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 22px; }
.staff-link { text-align: center; margin-top: 30px; font-size: 0.9rem; }
.preview-link { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin: 26px 0 0; }
.staff-link a { color: var(--muted); }

/* ---------- forms ---------- */
form.stack { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
form.stack label { font-weight: 700; margin-top: 8px; font-size: 0.95rem; }
input[type="text"], input[type="email"], input[type="password"], input:not([type]), select, textarea {
  width: 100%;
  padding: 11px 13px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c9d6e2;
  border-radius: 10px;
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(31, 115, 183, 0.22); border-color: var(--blue); }
.with-button { display: flex; gap: 8px; align-items: center; }
.with-button input { flex: 1; }
form.stack > .button { margin-top: 14px; align-self: flex-start; }

/* ---------- buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid #c9d6e2;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { border-color: var(--blue); color: var(--blue); }
.button-primary { background: var(--wave); border-color: transparent; color: #fff; }
.button-primary:hover { color: #fff; filter: brightness(1.06); }
.button-quiet { border-color: transparent; background: transparent; color: var(--blue); padding: 8px 10px; }
.button-danger { background: #fff; border-color: #e3b4b4; color: var(--error-ink); }
.button-danger:hover { background: var(--error-bg); color: var(--error-ink); border-color: var(--error-ink); }

/* ---------- messages ---------- */
.flash { padding: 12px 16px; border-radius: 10px; margin: 12px 0; font-weight: 600; }
.flash-ok { background: var(--ok-bg); color: var(--ok-ink); }
.flash-error { background: var(--error-bg); color: var(--error-ink); }
.banner { padding: 14px 18px; border-radius: 12px; margin: 0 0 18px; line-height: 1.5; }
.banner-warn { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); }
.banner a { color: var(--warn-ink); font-weight: 700; }

/* ---------- two-step codes ---------- */
.secret { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.secret code { font-size: 1.05rem; letter-spacing: 0.06em; background: #f0f5f9; border: 1px solid var(--line); padding: 8px 12px; border-radius: 8px; }
pre.codes { font-size: 1.05rem; line-height: 1.8; letter-spacing: 0.08em; background: #f0f5f9; border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; column-count: 2; }

/* ---------- shared bits (console and business portal) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.button-small { padding: 7px 12px; font-size: 0.86rem; border-radius: 9px; }
.optional { color: var(--muted); font-weight: 400; font-size: 0.88rem; }
.flash p { margin: 0 0 4px; }
.flash ul { margin: 0; padding-left: 20px; font-weight: 500; }
blockquote { margin: 8px 0 12px; padding: 10px 14px; border-left: 4px solid var(--warn-line); background: #fffaf0; border-radius: 0 10px 10px 0; }
.status { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 800; white-space: nowrap; vertical-align: middle; }
.status-waiting { background: #fff4d6; color: #7a4a00; }
.status-attention { background: #fde7dc; color: #a13b12; }
.status-done { background: var(--ok-bg); color: var(--ok-ink); }
.pill { display: inline-flex; padding: 2px 10px; border-radius: 999px; background: #e7f3f2; color: var(--teal-dark); font-size: 0.8rem; font-weight: 700; }
.tabs { display: flex; gap: 6px; margin: 0 0 14px; overflow-x: auto; }
.tab { flex: none; padding: 8px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.tab b { margin-left: 4px; color: var(--muted); }
.tab[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.tab[aria-current="page"] b { color: rgba(255, 255, 255, 0.75); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* ---------- forms with groups and choices ---------- */
.panel.wide { max-width: 820px; margin: 24px auto; }
fieldset.group { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 16px; margin: 10px 0 4px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
fieldset.group legend { font-weight: 800; padding: 0 6px; }
form.stack .label, .label { font-weight: 700; margin: 8px 0 0; font-size: 0.95rem; }
.choices { display: flex; flex-direction: column; gap: 6px; }
.choices-inline { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; }
form.stack label.choice, label.choice { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; margin: 0; cursor: pointer; }
.choice input { width: 18px; height: 18px; margin: 3px 0 0; flex: none; accent-color: var(--teal); }
.choice.declare { margin: 12px 0 4px; padding: 12px 14px; border-radius: 10px; background: #f3f7fa; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.two > div { display: flex; flex-direction: column; gap: 6px; }
form.stack .two label { margin-top: 8px; }
.join-steps { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 4px 0 16px; font-size: 0.9rem; color: var(--muted); }
.join-steps li { display: inline-flex; align-items: center; gap: 8px; }
.join-steps span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #c9d6e2; font-weight: 800; font-size: 0.8rem; }
.join-steps .done span { background: var(--teal); border-color: var(--teal); color: #fff; }
.join-steps .now { color: var(--ink); font-weight: 700; }
.join-steps .now span { border-color: var(--teal); color: var(--teal-dark); }
.gst-facts { background: #f3f7fa; border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; }
.small-link { font-size: 0.85rem; font-weight: 500; margin-left: 8px; }
.link-box { margin: 12px 0; padding: 12px 14px; border-radius: 10px; background: #f0f5f9; border: 1px solid var(--line); overflow-wrap: anywhere; }
.link-box code { font-size: 0.92rem; }

/* ---------- business portal ---------- */
.biz-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 20px; }
.biz-nav a { padding: 8px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.92rem; }
.biz-nav a:hover { background: #eef4f8; color: var(--ink); }
.biz-nav a[aria-current="page"] { background: #e7f3f2; color: var(--teal-dark); }
.status-card { border-radius: var(--radius); padding: 20px 22px; margin: 0 0 18px; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); }
.status-card h2 { margin: 0 0 8px; font-size: 1.25rem; }
.status-card p { margin: 0 0 8px; }
.status-card-waiting { border-color: var(--warn-line); background: linear-gradient(180deg, #fffaf0, #fff); }
.status-card-done { border-color: #b7e0c4; background: linear-gradient(180deg, var(--ok-bg), #fff); }
.status-card-attention { border-color: #f5c9b3; background: linear-gradient(180deg, #fff6f1, #fff); }
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.person { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 6px 16px; padding: 12px 0; border-bottom: 1px solid #edf2f6; align-items: center; }
.person:last-child { border-bottom: 0; }
.person-main, .person-facts { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.person-facts { align-items: flex-start; }
.person .muted { font-size: 0.85rem; overflow-wrap: anywhere; }
.row-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.inline-form select { width: auto; max-width: 260px; padding: 7px 10px; font-size: 0.88rem; }

/* ---------- the console's approval queue ---------- */
.queue { display: flex; flex-direction: column; gap: 10px; }
.queue-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; }
.queue-row:hover { border-color: #b9cfe0; box-shadow: var(--shadow); color: var(--ink); }
.queue-row > span { display: flex; flex-direction: column; gap: 3px; min-width: 0; align-items: flex-start; }
.queue-row small { color: var(--muted); font-size: 0.82rem; }
.checks { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.checks li { padding-left: 24px; position: relative; }
.checks li::before { position: absolute; left: 0; font-weight: 800; }
.checks .ok::before { content: "✓"; color: var(--green); }
.checks .bad::before { content: "✗"; color: var(--error-ink); }
.compare { margin: 6px 0 10px; padding-left: 20px; }
.decision { margin-top: 18px; }
.decision form + form { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; }
.crumbs-console { font-size: 0.88rem; color: var(--muted); margin-bottom: 8px; }
.crumbs-console a { color: var(--muted); }

/* ---------- the catalogue ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.data th { text-align: left; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); padding: 0 12px 8px 0; border-bottom: 1px solid var(--line); }
table.data td { padding: 9px 12px 9px 0; border-bottom: 1px solid #edf2f6; vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.row-bad td { background: #fff8f6; }
.row-notes { margin: 6px 0 0; padding-left: 18px; font-size: 0.86rem; color: var(--error-ink); }
.row-notes .muted { color: var(--muted); }
.offer-row { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.9fr); }
.slab-row { padding-top: 2px; }
.search-form { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.search-form input { flex: 1; }
details.editor summary, details.card summary { cursor: pointer; }
details.editor[open] summary { margin-bottom: 10px; }
.section-title { font-size: 1.1rem; margin: 22px 0 10px; }
.claim + .claim { margin-top: 14px; }
.claim h2 { font-size: 1.05rem; }

/* ---------- start page: businesses ---------- */
.join-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 22px; padding: 20px 24px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.join-band h2 { margin: 0 0 4px; font-size: 1.15rem; }
.join-band p { margin: 0; }
.join-band .actions { margin: 0; }

@media (max-width: 640px) {
  .container { padding: 18px 14px; }
  .person { grid-template-columns: minmax(0, 1fr); }
  .queue-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .panel, .card { padding: 18px; }
  .hero { padding: 30px 20px; border-radius: 16px; }
  .who { display: none; }
  pre.codes { column-count: 1; }
}

/* ---------- trade accounts and price lists ---------- */
input[type="date"] { width: 100%; padding: 11px 13px; font: inherit; color: var(--ink); background: #fff; border: 1px solid #c9d6e2; border-radius: 10px; }
.nav-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: #c2410c; color: #fff; font-size: 0.75rem; font-weight: 800; vertical-align: 1px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.card-head p { margin: 2px 0 0; }
.card-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.price-row { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr); }
.seller-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 0.7fr) minmax(0, 0.9fr); }
div.queue-row:hover { border-color: var(--line); box-shadow: none; }
.special { color: var(--teal-dark); }
.search-form select.narrow-select { width: auto; max-width: 220px; }
details.danger-zone { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
details.danger-zone summary { cursor: pointer; color: var(--error-ink); font-weight: 700; font-size: 0.92rem; }
details.danger-zone[open] summary { margin-bottom: 6px; }
.decision form h2 { margin: 0 0 4px; }
.button[disabled] { opacity: 0.45; cursor: not-allowed; }
p.actions + .tabs { margin-top: 18px; }
.decision form.stack:first-child { margin-top: 0; }
@media (max-width: 640px) {
  .search-form { flex-wrap: wrap; }
  .search-form select.narrow-select { max-width: none; flex: 1; }
  .price-row, .seller-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

/* ---------- distribution ---------- */
.rule-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) minmax(0, 1fr); }
.card + .queue, .queue + .card, .queue + section.card { margin-top: 14px; }
.rule-row > span:last-child { align-items: flex-end; }
.queue-row small.warn-text { color: var(--warn-ink); font-weight: 600; }
.check-result { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: #f3f7fa; }
.check-result p { margin: 0 0 6px; }
details.inline-details { margin-top: 6px; text-align: left; }
details.inline-details summary { cursor: pointer; color: var(--blue); font-weight: 700; font-size: 0.88rem; }
details.inline-details[open] { width: 100%; }
details.inline-details form.stack { margin-top: 6px; }
section.card h3 { margin: 0 0 6px; font-size: 1rem; }
@media (max-width: 640px) {
  .rule-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .rule-row > span:last-child { align-items: flex-start; }
}

/* ---------- orders (module 1.8): an order's page; the seller's is in the portal ---------- */
.order-page .card + .card, .order-page .card + .grid { margin-top: 18px; }
.status-accepted { background: #e6f0fa; color: #1a5f99; }
.status-moving { background: #e1f4f3; color: #0a5f5e; }
.status-ended { background: #eef2f6; color: #5b6b78; }
.seller-order .crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; color: var(--muted); font-size: 0.88rem; }
.seller-order .crumbs a { color: var(--muted); }
.seller-order .order-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.seller-order .order-head h1 { margin: 0; font-size: 1.6rem; }
.seller-order .order-head .muted { margin: 4px 0 0; }
.seller-order .timeline {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; margin: 0 0 18px; padding: 16px 18px;
  list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
}
.seller-order .step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); font-size: 0.85rem; text-align: center; }
.seller-order .step::before { content: ""; position: absolute; top: 14px; left: -50%; right: 50%; height: 3px; background: #dde6ee; }
.seller-order .step:first-child::before { display: none; }
.seller-order .step-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 31px; height: 31px; border: 3px solid #dde6ee; border-radius: 50%; background: #fff; color: #fff; }
.seller-order .step-dot .icon { width: 16px; height: 16px; }
.seller-order .step-label { color: var(--ink); font-weight: 700; }
.seller-order .step small { font-size: 0.78rem; }
.seller-order .step-done .step-dot { background: var(--teal); border-color: var(--teal); }
.seller-order .step-done::before, .seller-order .step-now::before, .seller-order .step-attention::before, .seller-order .step-ended::before { background: var(--teal); }
.seller-order .step-now .step-dot { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(14, 124, 123, 0.15); }
.seller-order .step-attention .step-dot { background: #e4572e; border-color: #e4572e; }
.seller-order .step-ended .step-dot { background: #8a99a6; border-color: #8a99a6; }
.seller-order .panel-note { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.seller-order .panel-note > .icon { width: 24px; height: 24px; margin-top: 1px; color: var(--teal); }
.seller-order .panel-note > div { min-width: 0; flex: 1; }
.seller-order .panel-note p { margin: 0 0 8px; }
.seller-order .panel-ended { background: #f6f8fa; }
.seller-order .panel-ended > .icon { color: var(--muted); }
.seller-order .warn { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-ink); font-size: 0.9rem; }
.seller-order .warn .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.seller-order .order-lines h2 { margin: 0 0 4px; }
.seller-order .lines { display: flex; flex-direction: column; }
.seller-order .line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid #edf2f6; }
.seller-order .line:last-child { border-bottom: 0; }
.seller-order .line-art { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 12px; background: #f3f7fa; }
.seller-order .pack-mini { width: 54px; height: 54px; }
.seller-order .line-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.seller-order .line-what small { color: var(--muted); font-size: 0.82rem; }
.seller-order .line-qty { display: none; }
.seller-order .line-money { display: flex; flex-direction: column; align-items: flex-end; min-width: 120px; text-align: right; font-variant-numeric: tabular-nums; }
.seller-order .line-price, .seller-order .line-money small { color: var(--muted); font-size: 0.8rem; }
.seller-order .group-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 350px); gap: 18px; align-items: start; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.seller-order .pay-note { margin: 0; font-size: 0.88rem; }
.seller-order dl.totals { display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 0.9rem; }
.seller-order dl.totals div { display: flex; justify-content: space-between; gap: 12px; }
.seller-order dl.totals dt { color: var(--muted); }
.seller-order dl.totals dd { margin: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.seller-order dl.totals .grand { margin-top: 2px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 1.05rem; font-weight: 800; }
.seller-order dl.totals .grand dt { color: var(--ink); }
.seller-order .change-table input { min-width: 70px; max-width: 130px; }
.seller-order tr.row-changed td { background: #fff8f3; }
.seller-order .small { font-size: 0.82rem; }
.seller-order .icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.seller-order .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 640px) {
  .seller-order .timeline { grid-auto-flow: row; gap: 14px; padding: 14px 16px; }
  .seller-order .step { flex-direction: row; align-items: center; gap: 10px; text-align: left; }
  .seller-order .step::before { top: -16px; left: 14px; right: auto; width: 3px; height: 18px; }
  .seller-order .step small { margin-left: auto; }
  .seller-order .line { grid-template-columns: 56px minmax(0, 1fr); }
  .seller-order .line-money { grid-column: 2; align-items: flex-start; text-align: left; min-width: 0; }
  .seller-order .group-foot { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- dispatch and receipt (module 1.9): both sides' order pages ---------- */
.order-page .send-form h3 { margin: 14px 0 2px; font-size: 1rem; }
.order-page .shipments .card-head { margin-bottom: 2px; }
.order-page .shipment { margin-top: 14px; padding: 14px 16px; background: #fbfcfd; border: 1px solid var(--line); border-radius: 14px; }
.order-page .shipment-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 14px; margin-bottom: 8px; }
.order-page .shipment-head h3 { margin: 0; font-size: 1.02rem; }
.order-page .shipment-head .muted { margin: 2px 0 0; font-size: 0.88rem; }
.order-page .shipment-facts { margin: 6px 0 10px; font-size: 0.9rem; }
.order-page .shipment-facts a { display: inline-flex; align-items: center; gap: 6px; }
.order-page .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; overflow-wrap: anywhere; }
.order-page .receipt-form, .order-page .attach-form { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.order-page .receipt-form h4 { margin: 0; font-size: 1rem; }
.order-page .attach-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.order-page .attach-form label { margin: 0; font-weight: 600; }
.order-page .dispute { margin-top: 12px; padding: 12px 14px; border-radius: 12px; }
.order-page .dispute-open { background: #fff8f3; border: 1px solid #f5c9b3; }
.order-page .dispute-closed { background: #f3faf5; border: 1px solid #cfe9d7; }
.order-page .dispute h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 0.98rem; }
.order-page .dispute-open h4 .icon { color: #d9480f; }
.order-page .dispute p { margin: 6px 0; }
.order-page .settled { display: flex; align-items: flex-start; gap: 8px; color: var(--ok-ink); font-weight: 600; }
.order-page .step-forms { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.order-page details.step-form { padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.order-page details.step-form summary { cursor: pointer; color: var(--blue); font-weight: 700; }
.order-page details.step-form[open] summary { margin-bottom: 8px; }
.order-page label.check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.order-page label.check input { width: auto; margin: 0; }
.order-page .change-table input { min-width: 64px; max-width: 120px; }
.order-page .icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
@media (max-width: 640px) {
  .order-page .shipment .money-col { display: none; }
  .order-page .shipment { padding: 12px; }
}

/* ---------- dues and payments (module 1.10) ---------- */
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data th.num { text-align: right; }
.dues-table tfoot th { border-top: 2px solid var(--line); padding-top: 10px; }
.overdue { color: var(--error-ink); font-weight: 700; }
.card-attention { border-color: #f5c9b3; background: linear-gradient(180deg, #fff6f1, #fff); }
.dues-cards .card h2 { font-size: 0.95rem; }
.payment-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.payment-actions details.step-form { padding: 6px 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.payment-actions details.step-form summary { cursor: pointer; color: var(--blue); font-weight: 700; font-size: 0.88rem; }
.payment-actions details.step-form[open] summary { margin-bottom: 6px; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
label.check input { width: auto; margin: 0; }
.inline-number { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px 26px; }
.inline-number input { width: 80px; }
.dues-page .icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.dues-page .warn { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-ink); font-size: 0.92rem; }
.dues-page .warn .icon { margin-top: 1px; }
.dues-page .warn a { color: inherit; font-weight: 700; }
.dues-page .card + .card, .dues-page .grid + .card { margin-top: 18px; }

/* Your ERP (module 1.11) */
.erp-page .erp-steps { margin: 0 0 16px; padding-left: 22px; line-height: 1.6; }
.erp-page .erp-steps li { margin: 0 0 4px; }
.erp-page .erp-connect, .erp-page select { max-width: 460px; }
.erp-page .erp-trouble { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #fff4d6; color: #7a4a00; }
.erp-page .erp-table td { vertical-align: top; }
.erp-page .erp-table .erp-actions, .erp-page .erp-table td:first-child { white-space: nowrap; }
.erp-page .card + .card { margin-top: 18px; }
.erp-page .erp-table .inline-form { display: inline-block; margin: 0 4px 4px 0; }
.dues-page .erp-line, .erp-line { color: var(--muted); }
.erp-line .erp-ref { white-space: nowrap; }
table.data tr.with-erp td { border-bottom: 0; padding-bottom: 2px; }
table.data tr.erp-row td { padding-top: 0; }
@media (max-width: 640px) {
  .erp-page .erp-table th:nth-child(4), .erp-page .erp-table td:nth-child(4) { display: none; }
}

/* Module 1.14, part A: "needs your attention" list, and a one-time link shown
   once on the page that made it. */
.attention { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.attention a { display: flex; align-items: baseline; gap: 8px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.attention a:hover { border-color: var(--teal); }
.attention strong { font-size: 1.15rem; color: var(--teal-dark); font-variant-numeric: tabular-nums; }
.status-ended { background: #eceff1; color: #4a5560; }
.one-time-link { margin: 12px 0; padding: 12px 14px; background: #f6f8f8; border: 1px dashed var(--line); border-radius: 10px; overflow-wrap: anywhere; }
.one-time-link code { font-size: 0.95rem; }

/* ---------- "List my ERP products" (/business/erp/products) ---------- */
.erp-common { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.erp-common label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.erp-common input { width: 5em; }
table.erp-pick td { vertical-align: top; }
table.erp-pick input:not([type="checkbox"]), table.erp-pick select { width: 100%; min-width: 7em; }
table.erp-pick tr.erp-done td { opacity: 0.7; }
.erp-notes { margin: 6px 0 0; padding-left: 18px; color: #8a4b00; font-size: 0.85rem; }
