/* The SWIFT app shell: plain, mobile first. */
:root {
  --ink: #17202a;
  --muted: #5d6d7e;
  --line: #d5dbe1;
  --bg: #f6f8fa;
  --card: #ffffff;
  --brand: #0b6e4f;
  --brand-ink: #ffffff;
  --warn: #9a5b00;
  --bad: #a4161a;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
body { margin: 0; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.75rem 1rem; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; letter-spacing: 0.08em; color: var(--brand); }
.lang { display: flex; gap: 0.25rem; }
.lang button { border: 1px solid var(--line); background: var(--card); padding: 0.35rem 0.6rem; border-radius: 0.4rem; font: inherit; font-size: 0.85rem; cursor: pointer; }
.lang button[aria-pressed="true"] { border-color: var(--brand); color: var(--brand); font-weight: 600; }
main { max-width: 64rem; margin: 0 auto; padding: 1rem; }
h1 { font-size: 1.5rem; margin: 0.5rem 0; }
h2 { font-size: 1.1rem; margin: 0 0 0.5rem; }
.lead { color: var(--muted); }
.hint { color: var(--muted); margin: 0.35rem 0; }
.status { min-height: 1.25rem; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 0.6rem; padding: 1rem; margin: 1rem 0; }
label { display: block; margin: 0.75rem 0; }
label span { display: block; font-size: 0.9rem; margin-bottom: 0.25rem; }
input { width: 100%; box-sizing: border-box; padding: 0.6rem; border: 1px solid var(--line); border-radius: 0.4rem; font: inherit; }
button { font: inherit; }
.primary { width: 100%; padding: 0.8rem 1rem; border: 0; border-radius: 0.5rem; background: var(--brand); color: var(--brand-ink); font-weight: 600; cursor: pointer; }
.primary:disabled, button:disabled { opacity: 0.6; cursor: not-allowed; }
#wa:disabled { background: var(--muted); }
.quiet { border: 1px solid var(--line); background: var(--card); padding: 0.5rem 0.8rem; border-radius: 0.4rem; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0 1rem; }
.actions #add-shop { border: 1px dashed var(--line); background: var(--card); padding: 0.5rem 0.8rem; border-radius: 0.4rem; text-align: left; }
.who { display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: var(--muted); }
.note { background: #fff7e6; border: 1px solid #f2d39b; color: var(--warn); padding: 0.5rem 0.75rem; border-radius: 0.4rem; }
.error { color: var(--bad); }
.shop-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.chip { font-size: 0.8rem; padding: 0.2rem 0.55rem; border-radius: 1rem; border: 1px solid currentColor; white-space: nowrap; }
.chip.healthy { color: var(--brand); }
.chip.behind, .chip.needs_you { color: var(--warn); }
.chip.not_connected { color: var(--bad); }
.table-wrap { overflow-x: auto; margin-top: 0.75rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (min-width: 40rem) {
  #signin { max-width: 26rem; }
}

/* The kit's WhatsApp sign-in screens take the shell's colours ("host" colours: the kit reads only --wl-*). */
.walogin[data-wl="swift"] {
  --wl-action: var(--brand);
  --wl-action-ink: var(--brand-ink);
  --wl-text: var(--ink);
  --wl-muted: var(--muted);
  --wl-surface: var(--card);
  --wl-border: var(--line);
  --wl-error: var(--bad);
  --wl-link: var(--brand);
  --wl-tint: color-mix(in srgb, var(--ink) 5%, var(--card));
  --wl-highlight: var(--line);
  --wl-sunk: color-mix(in srgb, var(--ink) 4%, var(--card));
  --wl-warn: var(--warn);
  --wl-error-tint: color-mix(in srgb, var(--bad) 11%, var(--card));
  --wl-warn-tint: color-mix(in srgb, var(--warn) 13%, var(--card));
  --wl-success: var(--brand);
}
#email-soon { margin-top: 1rem; }
.code-form .quiet { margin-top: 0.75rem; }
.who-actions { display: flex; gap: 0.5rem; }
.tabs { display: flex; gap: 0.25rem; margin: 0.75rem 0 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.filter { display: flex; align-items: center; gap: 0.5rem; margin: 0.75rem 0 0; }
.filter input { flex: 1; max-width: 24rem; }
.tabs button { border: 0; border-bottom: 2px solid transparent; background: none; padding: 0.5rem 0.75rem; cursor: pointer; color: var(--muted); white-space: nowrap; }
.tabs button[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.pick-list { display: grid; gap: 0.5rem; margin: 1rem 0; }
.pick-choice { text-align: left; padding: 0.8rem 1rem; }
select { width: 100%; box-sizing: border-box; padding: 0.6rem; border: 1px solid var(--line); border-radius: 0.4rem; font: inherit; background: var(--card); }
tr.inactive td { color: var(--muted); }
@media (min-width: 40rem) {
  #pick { max-width: 26rem; }
  #team-add { max-width: 26rem; }
}

/* Connecting a shop (wizard) and linking its listings (channels CH.10). */
.steps { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 1rem 0; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li button { border: 1px solid var(--line); background: var(--card); border-radius: 1rem; padding: 0.35rem 0.8rem; cursor: pointer; }
.steps li button::before { content: counter(step) ". "; }
.steps li.done button { border-color: var(--brand); color: var(--brand); }
.steps li.done button::after { content: " ✓"; }
.steps li.current button { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.places { list-style: none; padding: 0; }
.places li { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
.places li label { display: flex; align-items: center; gap: 0.5rem; margin: 0; flex: 1; }
.warehouses { display: grid; gap: 0.25rem; margin: 0.75rem 0; }
.warehouse { display: grid; grid-template-columns: minmax(10rem, 1.2fr) minmax(11rem, 1.2fr) minmax(12rem, 1fr); align-items: start; gap: 0.75rem; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--line); border-radius: 6px; }
.warehouse.head { font-size: 0.85rem; font-weight: 600; color: var(--muted); padding-bottom: 0.25rem; }
.warehouse.missing { outline: 2px solid #d98e04; outline-offset: -2px; }
.warehouse.clash { outline: 2px solid #c0392b; outline-offset: -2px; }
.warehouse .who, .warehouse .where, .warehouse .keep { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 0.2rem; }
.warehouse .who strong, .warehouse .who small { margin: 0; }
.warehouse .where select { width: 100%; }
.warehouse .tag { color: #0b6e4f; font-weight: 600; }
.warehouse .row-msg { color: #c0392b; margin: 0; font-size: 0.85rem; }
.warehouse details summary { cursor: pointer; color: var(--muted); }
.warehouse .units { display: flex; align-items: center; gap: 0.4rem; margin: 0.35rem 0 0.2rem; }
.warehouse .units input { width: 5rem; }
.warehouse details small:not([hidden]) { display: block; margin-top: 0.15rem; }
@media (max-width: 640px) { .warehouse { grid-template-columns: 1fr; } .warehouse.head { display: none; } }
.places li input[type="checkbox"] { width: auto; }
.preview { font-weight: 600; min-height: 1.4rem; }
a.again { display: inline-block; margin-top: 0.75rem; color: var(--brand); }
.notices ul { padding-left: 1.1rem; }
.notices li { margin: 0.3rem 0; }
.link-tools .file { position: relative; overflow: hidden; display: inline-block; }
.link-tools .file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cards { display: grid; gap: 0.75rem; }
.card.review, .card.linked { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 0; }
.card.review:focus { outline: 2px solid var(--brand); }
.side .chip { display: inline-block; margin: 0 0.25rem 0.25rem 0; }
.part { display: flex; align-items: center; gap: 0.5rem; margin: 0.25rem 0; }
.part input { width: 4.5rem; }
.finder .results { list-style: none; padding: 0; margin: 0.25rem 0; }
.finder .results li { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.25rem 0; }
.change { font-weight: 600; }
.risk { display: block; width: 100%; }
.danger { color: var(--bad); border-color: var(--bad); }
.change-list li.to_zero { color: var(--bad); }
.strong-list > li { margin: 0.5rem 0; }
@media (min-width: 64rem) {
  #link, #setup { max-width: 64rem; }
}

/* Marketplace requests (channels CH.6). */
.card.request .deadline { font-weight: 600; color: var(--warn); }
.card.request.answered, .card.request.closed { opacity: 0.8; }
.answer-form label { margin: 0.5rem 0; }
.answer-form textarea { width: 100%; min-height: 4rem; box-sizing: border-box; font: inherit; padding: 0.5rem; border: 1px solid var(--line); border-radius: 0.4rem; }
.rules .check { display: flex; gap: 0.5rem; align-items: center; }
.rules .check input { width: auto; }
.notices li.urgent { display: flex; gap: 0.75rem; align-items: center; justify-content: space-between; color: var(--warn); }
.small { font-size: 0.85rem; }
