:root {
  /* Back40 brand: Field Green, Barn Red, Harvest Gold, Feed Sack Cream, Soil */
  --green: #2F4A2E; --red: #A23B2A; --gold: #C8A24A; --gold-light: #E2C677; --cream: #F4EFE4; --soil: #24301F;
  --bg: var(--cream); --surface: #FFFDF8; --text: var(--soil); --muted: #5E6857; --line: #E1D8C6;
  --brand: var(--green); --brand-ink: #ffffff; --action: var(--red); --action-ink: #ffffff; --accent: var(--gold);
  --ok-bg: #E2EBDB; --ok: #2F5A2C; --info-bg: #E1E9EF; --info: #2D5370; --warn-bg: #F6EBCB; --warn: #7A5A12; --bad-bg: #F5DDD8; --bad: #A23B2A;
  --radius: 12px;
  --font-head: "Zilla Slab", Georgia, "Times New Roman", serif;
  --font-body: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171D15; --surface: #20281D; --text: #EFE9DC; --muted: #A7AE9C; --line: #343F2F;
    --brand: #9DBF8F; --brand-ink: #10160E; --action: #C9563F; --action-ink: #ffffff; --accent: var(--gold-light);
    --ok-bg: #263A22; --ok: #B3D9A6; --info-bg: #1F3140; --info: #A9C8E0; --warn-bg: #3D3217; --warn: #EBCB82; --bad-bg: #44211B; --bad: #F0A394;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.55 var(--font-body); }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; color: var(--brand); letter-spacing: .005em; }
h1 { font-size: 1.85rem; line-height: 1.15; margin: .4em 0; }
h2 { font-size: 1.35rem; line-height: 1.2; margin: .2em 0 .6em; }
h3 { font-size: 1.05rem; margin: .2em 0; }
code { font-family: ui-monospace, Menlo, monospace; font-weight: 600; letter-spacing: .05em; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 16px; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); gap: 12px; }
.topbar nav { display: flex; gap: 14px; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 8px; font: 700 1.25rem var(--font-head); letter-spacing: .06em; text-decoration: none; color: var(--brand); }
.brand img { width: 34px; height: 34px; }
.foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 32px 16px; }
.flash { background: var(--ok-bg); color: var(--ok); padding: 10px 16px; text-align: center; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 16px; }
.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.big { font-size: 1.15rem; }
.pre { white-space: pre-line; }
.error { background: var(--bad-bg); color: var(--bad); padding: 8px 12px; border-radius: 8px; }
.btn { display: inline-block; background: var(--action); color: var(--action-ink); border: 0; border-radius: 10px; padding: 10px 18px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.small { padding: 6px 12px; font-size: .9rem; }
.btn.big { width: 100%; padding: 16px; font-size: 1.15rem; text-align: center; }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }
.btn.green { background: var(--green); color: #fff; }
.btn.outline { background: transparent; color: var(--brand); border: 2px solid currentColor; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; color: var(--brand); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.link.danger { color: var(--bad); }
.inline { display: inline; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; width: 100%; }
input[type=checkbox], input[type=radio] { width: auto; }
label { display: block; font-weight: 600; font-size: .92rem; }
label input, label select, label textarea { margin-top: 4px; font-weight: 400; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.stack { display: grid; gap: 12px; }
.formgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); align-items: end; margin-top: 10px; }
.formgrid .wide { grid-column: 1 / -1; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--line); color: var(--text); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.muted { color: var(--muted); }
.pill.info { background: var(--info-bg); color: var(--info); }
.badge { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 7px; font-size: .75rem; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.grid2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.list { list-style: none; padding: 0; margin: 0 0 8px; }
.list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.alert-sold_out, .alert-cash_short { color: var(--bad); }
.table { width: 100%; border-collapse: collapse; }
.table td, .table th { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.neg { color: var(--bad); } .pos { color: var(--ok); }
.totalrow td { font-weight: 700; border-bottom: 0; }
.cards { list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.hero { text-align: center; padding: 40px 0; max-width: 640px; margin: 0 auto; }
.hero h1 { font-size: 2.1rem; }
.ownerbar { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.ownerbar select { width: auto; padding: 4px 8px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
@media (min-width: 760px) { .tabs { flex-wrap: wrap; overflow: visible; } }
.tabs a { white-space: nowrap; padding: 6px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); font-size: .92rem; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .label { color: var(--muted); font-size: .85rem; }
.stat .value { font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.checklist li { margin: 4px 0; }
.checklist li.done a { text-decoration: line-through; color: var(--muted); }
.product summary { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; cursor: pointer; }
.product .pname { font-weight: 700; flex: 1 1 140px; }
.product.inactive { opacity: .7; }
.stockbtns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.order .items { margin: 6px 0; padding-left: 18px; }
.order .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.status-cancelled { opacity: .6; }
.standhead { margin-bottom: 20px; }
/* Kiosk */
.kiosk .wrap { padding-bottom: 260px; }
.kgrid { list-style: none; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.kitem { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.kitem.picked { border-color: var(--brand); }
.kitem.out { opacity: .5; }
.kname { font-weight: 700; font-size: 1.05rem; }
.stepper { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.stepper button { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--green); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.stepper button[data-step="-1"] { background: var(--line); color: var(--text); }
.kqty { font-size: 1.3rem; font-weight: 700; min-width: 2ch; text-align: center; }
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: grid; gap: 10px; max-width: 1000px; margin: 0 auto; box-shadow: 0 -4px 16px rgba(0,0,0,.08); }
.cartbar .total { font-size: 1.2rem; display: flex; justify-content: space-between; }
.methods { display: flex; flex-wrap: wrap; gap: 8px; }
.method { border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; display: flex; gap: 6px; align-items: center; font-weight: 600; cursor: pointer; }
.method:has(input:checked) { border-color: var(--brand); background: var(--ok-bg); }
.receipt h1 { font-size: 1.5rem; }
.refcode { font-size: 1.6rem; background: var(--warn-bg); color: var(--warn); padding: 2px 10px; border-radius: 8px; }
/* Printable sign */
.sign { background: #fff; color: #111; }
.signpage { max-width: 7.5in; margin: 0 auto; text-align: center; padding: 24px; }
.signpage h1 { font-size: 2.6rem; margin-bottom: 0; }
.signpage .lead { font-size: 1.6rem; margin: 0 0 12px; color: #A23B2A; font-weight: 700; }
.signpage h1 { color: #2F4A2E; }
.signpage .qr { width: 4in; max-width: 100%; }
.signpage .steps { text-align: left; display: inline-block; font-size: 1.3rem; }
.signpage .url { color: #555; word-break: break-all; }
.small-qr { display: flex; align-items: center; justify-content: center; gap: 12px; }
.small-qr img { width: 1.2in; }
.signpage .thanks { font-size: 1.2rem; font-weight: 600; }
.noprint { text-align: center; }
@media print { .noprint { display: none; } .signpage { padding: 0; } }
@media (max-width: 520px) { h1 { font-size: 1.45rem; } .hero h1 { font-size: 1.7rem; } }
/* Admin */
.banner { padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.banner.admin { background: var(--warn-bg); color: var(--warn); }
.banner.bad { background: var(--bad-bg); color: var(--bad); }
.btn.danger { background: var(--bad); color: #fff; }
.dangerzone { border-color: var(--bad-bg); }
.tablewrap { overflow-x: auto; padding: 0; }
.tablewrap .table th, .tablewrap .table td { padding: 10px 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.searchform { display: flex; gap: 6px; }
.searchform input { width: 200px; }
.dangerzone h2 + p, .dangerzone form + h2 { margin-top: 20px; }
/* Addresses & domains */
.addr { display: flex; align-items: center; gap: 0; margin-top: 4px; }
.addr input { margin-top: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; flex: 1; min-width: 0; }
.addr .suffix { padding: 9px 10px; border: 1px solid var(--line); border-left: 0; border-radius: 0 8px 8px 0; background: var(--surface); color: var(--muted); font-weight: 400; white-space: nowrap; }
.okmsg { color: var(--ok); } .errmsg { color: var(--bad); }
.dnsbox { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow-x: auto; }
.dnsbox table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.dnsbox td, .dnsbox th { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--line); }
.dnsbox code { user-select: all; }
.pro { background: linear-gradient(135deg, var(--ok-bg), var(--warn-bg)); }
.pill.pro { background: var(--accent); color: #fff; }
.demo-box { text-align: center; } .demo-box .actions { justify-content: center; margin: 12px 0; }
.breakall { word-break: break-all; }
.formgrid .wide-2 { grid-column: span 2; }
@media (max-width: 520px) { .formgrid .wide-2 { grid-column: 1 / -1; } }
.brand, .topbar nav a, .topbar nav .link { white-space: nowrap; }
@media (max-width: 520px) {
  .topbar { padding: 8px 12px; }
  .topbar nav { gap: 10px; font-size: .9rem; }
  .brand { font-size: 1.05rem; gap: 6px; }
  .brand img { width: 28px; height: 28px; }
}

/* Products, options and photos */
.cat-head { margin: 22px 0 8px; font-size: 1.05rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-family: var(--font-body); font-weight: 600; }
.thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex: none; }
.thumb.ph { display: grid; place-items: center; background: var(--warn-bg); color: var(--warn); font: 700 1.2rem var(--font-head); }
.product .pname { display: flex; flex-direction: column; }
.stock-units { margin-top: 12px; display: grid; gap: 6px; }
.stock-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.stock-row .stockbtns { margin-top: 0; }
.options-box, .photo-box { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.options-box h4 { margin: 0 0 8px; }
.option-row { display: grid; grid-template-columns: 1.4fr .8fr .7fr auto auto auto; gap: 8px; align-items: center; margin-bottom: 6px; }
.option-row.add { grid-template-columns: 1.4fr .8fr .7fr auto; }
@media (max-width: 640px) { .option-row, .option-row.add { grid-template-columns: 1fr 1fr; } }
.photo-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.photo-box img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; }
.photo-box input[type=file] { width: auto; max-width: 100%; }
/* Checkout cards */
.kcat { margin: 20px 0 8px; font-size: 1.15rem; }
.kcard { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.kcard.picked { border-color: var(--green); }
.kcard .kitem { background: none; border: 0; padding: 0; gap: 6px; }
.kcard.has-options .kitem { border-top: 1px dashed var(--line); padding-top: 8px; }
.kphoto { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; }
.kopt { display: block; font-weight: 600; }
.kprice { display: flex; flex-direction: column; }
.taxline { margin-top: -6px; }
.stand-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; margin-bottom: 6px; }
.unit-line { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-top: 4px; flex-wrap: wrap; }

.kchips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.kchips::-webkit-scrollbar { display: none; }
.kchip { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 8px 14px; font: 600 .92rem var(--font-body); cursor: pointer; }
.kchip.active { background: var(--green); border-color: var(--green); color: #fff; }

/* Pre-orders */
.po-banner { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; background: var(--warn-bg); color: var(--warn); border: 1px solid #E9D49B; border-radius: 12px; padding: 12px 14px; margin: 8px 0 12px; text-decoration: none; }
.po-banner strong { color: var(--text); }
.po-list { list-style: none; padding: 0; display: grid; gap: 14px; }
.po-card { display: grid; grid-template-columns: 160px 1fr; gap: 16px; align-items: start; }
.po-card h2 { margin: 0 0 6px; }
.po-pic { width: 160px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
@media (max-width: 560px) { .po-card { grid-template-columns: 1fr; } .po-pic { width: 100%; } }
.po-form h2 { margin: 18px 0 4px; font-size: 1.15rem; }
.po-items { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.po-item { display: grid; grid-template-columns: 72px 1fr 84px; gap: 12px; align-items: center; background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 10px; }
.po-item:not(:has(img)) { grid-template-columns: 1fr 84px; }
.po-item.picked { border-color: var(--green); }
.po-item.out { opacity: .55; }
.po-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.po-item input.qty { text-align: center; font-size: 1.1rem; }
.po-pickups { display: grid; gap: 8px; }
.po-pickups .method { border-radius: 12px; }
.po-pickups .method.out { opacity: .5; }
.po-total { display: flex; justify-content: space-between; font-size: 1.25rem; padding-top: 10px; border-top: 1px solid var(--line); }

.po-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; text-decoration: none; color: inherit; }
.po-row:hover { border-color: var(--green); }
.po-row > span:first-child { display: flex; flex-direction: column; }
.share img { display: block; margin: 10px 0; }
.stats.compact { grid-template-columns: 1fr 1fr; }
.stats.compact .value { font-size: 1.4rem; }
.po-edit-row { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr auto auto; gap: 8px; align-items: end; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.po-edit-row.add { grid-template-columns: 2fr 1fr 1fr 1fr auto; border-bottom: 0; }
@media (max-width: 760px) { .po-edit-row, .po-edit-row.add { grid-template-columns: 1fr 1fr; } }
.picklist { background: #fff; color: #111; }
.pick-orders td { vertical-align: top; }
.pick-orders .box { display: inline-block; width: 18px; height: 18px; border: 2px solid #333; border-radius: 3px; }
@media print { .picklist .wrap { max-width: none; padding: 0; } .picklist h1 { color: #000; } }
.po-warn { background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: 8px 12px; }

/* Weekly pre-orders */
.po-weeks { width: 100%; }
.po-weeks td { vertical-align: middle; }
.po-weeks .actions { justify-content: flex-end; }
.po-note { background: var(--info-bg); color: var(--info); padding: 8px 12px; border-radius: var(--radius); }
.po-note a { color: inherit; }
.po-soon { border-left: 4px solid var(--accent); }
.po-row > span:first-child > .pill { align-self: flex-start; }
.po-group { margin: 24px 0 8px; font-size: 1.2rem; }

/* Vendors */
.list-plain { list-style: none; padding: 0; margin: 6px 0; }
.list-plain li { padding: 2px 0; }
.dropoff .table .qty { max-width: 6em; }
.pill.vendor { background: var(--info-bg); color: var(--info); font-weight: 500; }

/* Statements */
.statement-page { max-width: 760px; margin: 0 auto; }
.st-sum .st-total td { border-top: 2px solid var(--text); }
@media print { .noprint, .topbar, footer { display: none !important; } .statement-page { border: 0; box-shadow: none; } }
.bundle-in { display: flex; align-items: center; gap: 6px; } .bundle-in input { max-width: 6em; }

/* Register */
.reg { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.reg-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.reg-tools .kchips { flex: 1 1 100%; padding-bottom: 4px; }
.reg-tools #reg-search { max-width: 220px; }
.reg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin-bottom: 12px; }
.reg-item { display: flex; flex-direction: column; align-items: stretch; text-align: left; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; min-height: 120px; }
.reg-item:active { transform: scale(.98); }
.reg-item img, .reg-ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--bg); }
.reg-ph { display: grid; place-items: center; font: 700 1.6rem var(--font-head); color: var(--muted); }
.reg-name { font-weight: 600; line-height: 1.2; }
.reg-price { font-size: .85rem; color: var(--muted); }
.reg-cart { position: sticky; top: 12px; }
.reg-lines { list-style: none; padding: 0; margin: 0 0 8px; max-height: 42vh; overflow: auto; }
.reg-line { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); padding: 6px 0; }
.reg-line-main { flex: 1; display: flex; justify-content: space-between; gap: 8px; text-align: left; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.reg-qty { display: inline-flex; align-items: center; gap: 4px; }
.reg-qty span { min-width: 1.5em; text-align: center; }
.reg-totals { width: 100%; margin: 6px 0; }
.reg-totals td { padding: 2px 0; }
.reg-totals .totalrow td { font-size: 1.3rem; font-weight: 700; border-top: 1px solid var(--line); padding-top: 6px; }
.reg-pay { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.reg-pay .big { grid-column: 1 / -1; }
.reg-dialog { border: 0; border-radius: var(--radius); padding: 20px; width: min(420px, calc(100vw - 32px)); background: var(--surface); color: var(--text); }
.reg-dialog::backdrop { background: rgba(0, 0, 0, .4); }
.reg-dialog form { display: grid; gap: 10px; }
.reg-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.reg-opt { flex: 1 1 40%; }
.reg-change { font-size: 1.3rem; }
.reg-email { display: flex; gap: 6px; }
.receipt-print { max-width: 420px; margin: 0 auto; }
.reg-mobilebar { display: none; }
@media (max-width: 760px) {
  .reg { grid-template-columns: 1fr; padding-bottom: 64px; }
  .reg-mobilebar:not([hidden]) { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 5; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--radius); background: var(--action); color: var(--action-ink); text-decoration: none; font-weight: 600; box-shadow: 0 4px 16px rgba(0, 0, 0, .2); }
  .reg-cart { position: static; }
  .reg-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .reg-item { min-height: 100px; }
}
.reg-qr { display: block; margin: 0 auto; border-radius: 8px; background: #fff; padding: 8px; }
.reg-sync { margin-top: 10px; padding: 10px 12px; border-radius: var(--radius); background: var(--warn-bg); color: var(--warn); display: grid; gap: 6px; }
.reg-offline-note { margin-top: 8px; }
.kcredit { margin: 8px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: grid; gap: 8px; }
.kcredit summary { cursor: pointer; font-weight: 600; }
.kcredit[open] > *:not(summary) { margin-top: 8px; }
.kcredit label { display: grid; gap: 4px; }
.kcredit label.check { display: flex; align-items: center; gap: 8px; }

/* Reports: one-series bar charts (brand color; hover/focus shows the value) */
.report-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.report-filters .kchip { text-decoration: none; }
.report-custom { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; }
.report-custom input[type=date] { max-width: 10.5em; }
.bars { margin: 8px 0 28px; }
.bars-plot { display: flex; align-items: flex-end; gap: 2px; height: 160px; border-bottom: 1px solid var(--line); }
.bar { position: relative; flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; outline: none; }
.bar-fill { width: 100%; background: var(--brand); border-radius: 4px 4px 0 0; }
.bar:hover .bar-fill, .bar:focus .bar-fill { opacity: .8; }
.bar-tip { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); display: none; white-space: nowrap; background: var(--text); color: var(--bg); font-size: .78rem; line-height: 1.3; padding: 4px 8px; border-radius: 6px; z-index: 2; pointer-events: none; }
.bar:hover .bar-tip, .bar:focus .bar-tip { display: block; }
.bar-x { position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: .72rem; color: var(--muted); white-space: nowrap; }

/* Plans */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.plan-card.mine { border-color: var(--brand); }
.plan-price { font: 700 1.3rem var(--font-head); margin: 4px 0 8px; }

/* Maps */
.find-map { height: 420px; border-radius: var(--radius); border: 1px solid var(--line); margin: 12px 0; z-index: 0; }
.pick-map { height: 260px; border-radius: var(--radius); border: 1px solid var(--line); margin: 8px 0; z-index: 0; }
.find-list { list-style: none; padding: 0; display: grid; gap: 10px; }

/* Vendor labels */
.labels { display: grid; grid-template-columns: repeat(auto-fill, 2.625in); gap: 0.125in; }
.label-card { width: 2.625in; min-height: 1in; padding: 6px 8px; border: 1px dashed var(--line); border-radius: 4px; background: #fff; color: #000; font-size: .78rem; line-height: 1.25; }
.label-card .tiny { font-size: .68rem; }
@media print { .label-card { border-color: #ccc; break-inside: avoid; } }

/* Marketing kit prints */
.flyer { max-width: 7in; margin: 0 auto; text-align: center; }
.flyer h1 { font-size: 2.6rem; }
.flyer-items { font-size: 1.2rem; }
.price-cards { display: grid; grid-template-columns: repeat(auto-fill, 2.5in); gap: 0.1in; }
.price-card { border: 1px dashed #bbb; padding: 10px; text-align: center; background: #fff; color: #000; break-inside: avoid; }
.price-big { font: 700 2rem var(--font-head); }
.price-card .tiny { font-size: .65rem; }

/* Butcher cut sheets (Meat orders add-on) */
.cutsheet { border: 1px solid #999; padding: 10px 14px; margin: 0 0 14px; break-inside: avoid; }
.cutsheet dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 6px 0; }
.cutsheet dt { font-weight: 600; }

/* Stand security: camera notice on the paired stand tablet */
.snapnote { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; font-size: .9rem; }
.snapcam { position: fixed; right: 8px; bottom: 8px; width: 96px; border-radius: 8px; opacity: .85; z-index: 5; }
.snapgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.snapgrid figure { margin: 0; }
.snapgrid img { width: 100%; border-radius: 6px; display: block; }
.bar { background: var(--line); border-radius: 4px; height: 10px; }
.bar > span { display: block; height: 10px; border-radius: 4px; background: #c0392b; }

/* Item QR labels */
.qrlabels { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.qrlabels.large { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.qrlabel { display: flex; gap: 10px; align-items: center; border: 1px dashed #999; border-radius: 6px; padding: 8px; background: #fff; color: #222; break-inside: avoid; }
.qrlabel img { width: 96px; height: 96px; flex: none; }
.qrlabels.large .qrlabel img { width: 160px; height: 160px; }
.qrlabels.large .qrlabel { font-size: 1.25rem; }
.qrprice { font-weight: 700; }
.scan-dialog { max-width: 420px; }
.scan-video { width: 100%; border-radius: 8px; background: #000; }

/* Booth maps (market organizers) */
.boothmap { display: grid; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; overflow-x: auto; min-width: 0; }
.booth { border: 1px solid var(--line); border-radius: 6px; font-size: .72rem; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; overflow: hidden; background: #fff; color: #222; line-height: 1.1; padding: 2px; }
.booth.taken { background: #d8e8c8; border-color: #8a9a7b; }
.booth span { font-size: .65rem; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; max-width: 100%; }

/* Processor calendar and labels */
.calgrid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-bottom: 16px; }
.calday { margin: 0; padding: 10px; }
.calday.today { border-color: #8a9a7b; }
.meatlabel { min-height: 120px; }
.notforsale { font-weight: 800; letter-spacing: .05em; border: 2px solid #222; display: inline-block; padding: 1px 6px; margin: 4px 0; }
.cutsheet-dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 6px 0; }
.cutsheet-dl dt { font-weight: 600; }
.muted-card { opacity: .85; }

.try-demo { display: block; text-align: center; margin-top: 8px; }

/* Self-checkout: paying cash */
.kcash { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin: 8px 0; background: var(--surface); }
.kc-quick { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.kacct-btn { display: block; width: 100%; text-align: left; margin: 10px 0 4px; padding: 12px 14px; border-radius: var(--radius); border: 1px dashed var(--line); background: var(--surface); font: inherit; font-weight: 600; cursor: pointer; }
.kacct-btn span { display: block; font-weight: 400; font-size: .9rem; color: var(--muted); }
.kdialog { max-width: 420px; width: calc(100% - 24px); }
.kd-choices { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.kpickup { width: 100%; }
.kp-order { margin: 8px 0; }
.kpickups { margin: 6px 0; }
.kp-line { padding: 6px 0; border-top: 1px solid var(--line); }
.cc-bills { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); margin: 8px 0; }
.cc-bills label { display: flex; align-items: center; gap: 6px; }
.cc-bills label span { min-width: 4.5em; white-space: nowrap; }
.cc-bills input { width: 5em; }
.cc-check { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
#cashcount .cc-check { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 6px; }
#cashcount .cc-check input, .cc-bills input { width: 100%; min-width: 0; margin: 0; }
#cashcount fieldset { border: 1px solid var(--line, #ddd); border-radius: 8px; padding: 10px 12px; margin: 0; }
.cc-bills label { font-weight: normal; }
.payqr { margin: 12px 0; text-align: center; } .payqr img { display: block; margin: 0 auto 4px; image-rendering: pixelated; background: #fff; padding: 6px; border-radius: 8px; }
