/* ============================================================
   Mizamo Foods & Deliveries — storefront theme.
   Warm cream + deep forest green + the Growth charcoal, with a
   serif display face for the premium feel. The base stays big,
   high-contrast and thumb-friendly for elderly clients on cheap
   phones; admin.css layers a denser console on top of this.
   ============================================================ */

:root {
  --green: #2f8f33;
  --green-deep: #1f6b28;
  --green-dark: #17501f;
  --green-soft: #e3f0da;
  --green-ring: rgba(47, 143, 51, 0.30);
  --forest: #233028;
  --charcoal: #3a3a3a;
  --terracotta: #c4571e;
  --terracotta-soft: #fbe8da;
  --bg: #faf6ee;
  --card: #fffdf8;
  --ink: #27251d;
  --muted: #6f6c60;
  --line: #e9e2d2;
  --red: #b91c1c;
  --red-soft: #fee2e2;
  --amber: #b45309;
  --amber-soft: #fef3c7;
  --blue: #1d4ed8;
  --blue-soft: #dbeafe;
  --violet: #6d28d9;
  --violet-soft: #ede9fe;
  --shadow-card: 0 1px 2px rgba(40, 35, 20, 0.05), 0 12px 30px -22px rgba(40, 35, 20, 0.35);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  accent-color: var(--green-deep);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

/* Easy mode: one tap makes everything bigger for weaker eyes. */
body.ez { font-size: 21px; }
body.ez .btn { min-height: 58px; font-size: 20px; }
body.ez .muted { font-size: 18px; }
body.ez input, body.ez select, body.ez textarea { font-size: 20px; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */

header {
  background: linear-gradient(135deg, #2d372e, #161d17);
  color: #fff;
  padding: 12px 0;
  border-bottom: 3px solid var(--green);
}
header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.brand {
  color: #fff; text-decoration: none; margin-right: auto;
  display: flex; align-items: center; gap: 11px;
}
.brand-icon { width: 40px; height: 40px; border-radius: 11px; background: #fff; padding: 4px; flex: none; }
.brand-name { font-size: 21px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.05; display: flex; flex-direction: column; }
.brand-name small {
  font-family: var(--display); font-weight: 600; font-style: italic;
  font-size: 12px; letter-spacing: 0.04em; color: #a9c8a5; margin-top: 2px;
}
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
nav a {
  color: rgba(255, 255, 255, 0.92); text-decoration: none; font-weight: 600;
  font-size: 16px; padding: 7px 12px; border-radius: 999px; transition: background 0.15s;
}
nav a:hover { background: rgba(255, 255, 255, 0.13); }
nav a.on { background: rgba(74, 222, 128, 0.18); color: #b8e8ba; }
.cart-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--green); color: #fff; text-decoration: none; font-weight: 800;
  font-size: 16px; padding: 9px 16px; border-radius: 999px;
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.6);
  transition: background 0.15s, transform 0.1s;
}
.cart-pill:hover { background: var(--green-deep); }
.cart-pill:active { transform: scale(0.97); }
.cart-n {
  background: #fff; color: var(--green-dark); border-radius: 999px;
  font-size: 13.5px; padding: 1px 8px; font-style: normal;
}
@media (max-width: 560px) {
  .cart-word { display: none; }
  .brand-name { font-size: 18px; }
  nav a { font-size: 14.5px; padding: 6px 9px; }
}

/* ---------- Utility bar (language + big text) ---------- */

.utility {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px; margin: 12px 0 4px;
}
.langbar { display: flex; align-items: center; gap: 8px; margin: 0; }
.langbar label { font-size: 14.5px; color: var(--muted); font-weight: 600; margin: 0; }
.langbar select {
  font-size: 15px; padding: 7px 10px; margin: 0; width: auto;
  border-radius: 10px; border: 1.5px solid var(--line); background: var(--card);
}
.ez-toggle {
  font: inherit; font-size: 14.5px; font-weight: 700; color: var(--muted);
  background: var(--card); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 7px 14px; cursor: pointer;
}
.ez-toggle.on { background: var(--green-soft); border-color: var(--green); color: var(--green-dark); }

/* ---------- Typography ---------- */

h1, .display {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.12;
}
h1 { font-size: 32px; margin: 20px 0 10px; }
h2 { font-size: 21px; letter-spacing: -0.01em; margin: 8px 0 10px; }
p { margin: 8px 0; }
a { color: var(--green-dark); }
a:focus-visible, .btn:focus-visible, button:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--green-ring);
}
.muted { color: var(--muted); font-size: 16px; }
.big-amount {
  font-size: 38px; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

.section-head { display: flex; align-items: baseline; gap: 14px; margin: 34px 0 14px; }
.section-head h2 { font-family: var(--display); font-size: 26px; font-weight: 700; margin: 0; }
.section-head::after { content: ''; flex: 1; height: 2px; background: linear-gradient(90deg, var(--line), transparent); border-radius: 2px; }
.section-head .more { font-size: 15px; font-weight: 700; white-space: nowrap; }

/* ---------- Cards, flashes ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  margin: 14px 0;
  box-shadow: var(--shadow-card);
}
.flash { border-radius: 12px; padding: 12px 16px; margin: 12px 0; font-weight: 600; }
.flash.ok { background: var(--green-soft); color: var(--green-dark); border: 1px solid #bcd9ad; }
.flash.bad { background: var(--red-soft); color: var(--red); border: 1px solid #f3c1c1; }
.notice {
  background: var(--amber-soft); color: var(--amber); border: 1px solid #f0dfa8;
  border-radius: 12px; padding: 11px 14px; margin: 10px 0; font-size: 15.5px;
}

/* ---------- Buttons & forms ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 17px; font-weight: 800; text-decoration: none;
  color: #fff; background: linear-gradient(180deg, var(--green), var(--green-deep));
  border: 0; border-radius: 13px; padding: 12px 22px; min-height: 50px;
  cursor: pointer; transition: filter 0.15s, transform 0.1s;
  box-shadow: 0 8px 18px -10px rgba(31, 107, 40, 0.7);
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn.ghost {
  background: var(--card); color: var(--green-dark);
  border: 2px solid var(--green-deep); box-shadow: none;
}
.btn.dark { background: linear-gradient(180deg, #454540, #2b2b27); box-shadow: 0 8px 18px -10px rgba(0,0,0,0.55); }
.btn.warn { background: linear-gradient(180deg, #d1571f, #a84416); box-shadow: 0 8px 18px -10px rgba(168, 68, 22, 0.7); }
.btn.danger { background: linear-gradient(180deg, #cf3f36, #a52c25); box-shadow: 0 8px 18px -10px rgba(165, 44, 37, 0.6); }
.btn.small { font-size: 14px; padding: 6px 13px; min-height: 0; border-radius: 9px; font-weight: 700; }
.btn.big { font-size: 19px; min-height: 58px; padding: 14px 26px; border-radius: 15px; }
.btn.full { display: flex; width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

label { display: block; font-weight: 700; font-size: 15.5px; margin: 14px 0 5px; }
label .opt { color: var(--muted); font-weight: 500; font-size: 14px; }
input[type="text"], input[type="password"], input[type="tel"], input[type="number"],
input[type="date"], input[type="file"], select, textarea {
  width: 100%; font: inherit; font-size: 17px; color: var(--ink);
  background: #fff; border: 1.7px solid #d9d2bf; border-radius: 12px;
  padding: 12px 14px; margin: 0;
}
textarea { min-height: 110px; resize: vertical; }
.hint { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.checkline { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; font-size: 16px; margin: 14px 0; }
.checkline input { width: 22px; height: 22px; margin-top: 2px; flex: none; }
.radio-cards { display: grid; gap: 9px; margin: 6px 0; }
.radio-card {
  display: flex; align-items: center; gap: 12px; background: #fff;
  border: 2px solid var(--line); border-radius: 13px; padding: 13px 15px;
  cursor: pointer; font-weight: 600; font-size: 16.5px; margin: 0;
}
.radio-card input { width: 21px; height: 21px; flex: none; }
.radio-card:has(input:checked) { border-color: var(--green); background: var(--green-soft); }

/* ---------- Tables ---------- */

table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 12px; overflow: hidden; }
th {
  text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); padding: 10px 12px; border-bottom: 2px solid var(--line); background: #f7f2e6;
}
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.table-scroll table { border-radius: 0; }

/* ---------- Badges ---------- */

.badge {
  display: inline-block; font-size: 13px; font-weight: 800; border-radius: 999px;
  padding: 3px 11px; letter-spacing: 0.01em; white-space: nowrap;
}
.badge.new { background: var(--blue-soft); color: var(--blue); }
.badge.confirmed { background: #d7f0ee; color: #0f766e; }
.badge.packing { background: var(--amber-soft); color: var(--amber); }
.badge.out { background: var(--violet-soft); color: var(--violet); }
.badge.delivered { background: var(--green-soft); color: var(--green-dark); }
.badge.cancelled { background: var(--red-soft); color: var(--red); }
.badge.paid { background: var(--green-soft); color: var(--green-dark); }
.badge.unpaid { background: var(--terracotta-soft); color: var(--terracotta); }
.badge.errand { background: #f3e8ff; color: #7c3aed; }
.badge.feat { background: var(--terracotta-soft); color: var(--terracotta); }
.badge.own { background: var(--green-soft); color: var(--green-dark); }

/* ---------- Hero ---------- */

.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(90% 140% at 100% 0%, rgba(47, 143, 51, 0.14), transparent 55%),
    radial-gradient(70% 120% at 0% 100%, rgba(196, 87, 30, 0.10), transparent 55%),
    linear-gradient(160deg, #fffdf6, #f6efdd);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 44px 34px 40px;
  margin: 16px 0 8px;
  box-shadow: var(--shadow-card);
}
.hero::after {
  content: ''; position: absolute; right: -70px; bottom: -90px; width: 340px; height: 340px;
  background: url('/icon.svg') no-repeat center / contain; opacity: 0.07; transform: rotate(-8deg);
  pointer-events: none;
}
.hero .kicker {
  display: inline-block; font-size: 13.5px; font-weight: 800; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--green-dark);
  background: var(--green-soft); border-radius: 999px; padding: 6px 14px; margin: 0 0 16px;
}
.hero h1 { font-size: clamp(34px, 6vw, 56px); margin: 0 0 14px; max-width: 17ch; }
.hero .sub { font-size: clamp(17px, 2.4vw, 20px); color: #4b493e; max-width: 56ch; margin: 0 0 22px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; position: relative; z-index: 1; }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 22px; }
.trust-chip {
  display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 700;
  color: #43523f; background: rgba(255, 255, 255, 0.75); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px;
}
.trust-chip::before { content: '✓'; color: var(--green); font-weight: 900; }

/* ---------- Category chips ---------- */

.cat-row { display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px 10px; scrollbar-width: thin; }
.cat-chip {
  flex: none; display: flex; align-items: center; gap: 9px; text-decoration: none;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 7px 16px 7px 8px; font-weight: 700; font-size: 15.5px; color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
}
.cat-chip:hover { border-color: var(--green); }
.cat-chip.on { background: var(--forest); border-color: var(--forest); color: #fff; }
.cat-chip .art { width: 34px; height: 34px; border-radius: 50%; }

/* ---------- Product grid ---------- */

.prod-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px; margin: 10px 0 26px;
}
body.ez .prod-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.prod-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 12px 12px 14px; box-shadow: var(--shadow-card);
  transition: transform 0.15s, box-shadow 0.15s;
}
.prod-card:hover { transform: translateY(-2px); box-shadow: 0 2px 3px rgba(40,35,20,0.05), 0 18px 34px -22px rgba(40,35,20,0.45); }
.prod-card .art { width: 100%; height: auto; border-radius: 14px; }
.prod-card .photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; }
.prod-card .p-name { font-weight: 800; font-size: 16.5px; line-height: 1.25; margin: 10px 0 1px; }
.prod-card .p-unit { color: var(--muted); font-size: 13.5px; }
.prod-card .p-desc { color: var(--muted); font-size: 13.5px; line-height: 1.4; margin-top: 3px; }
.p-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; }
.p-price { font-weight: 900; font-size: 19px; letter-spacing: -0.01em; white-space: nowrap; }
.p-flag { position: absolute; top: 10px; left: 10px; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.soldout-cover {
  position: absolute; inset: 12px; border-radius: 14px;
  background: rgba(250, 246, 238, 0.72); display: flex; align-items: flex-start; justify-content: center; padding-top: 30%;
  font-weight: 900; color: var(--muted); font-size: 17px; letter-spacing: 0.02em;
}

/* Add-to-basket stepper */
.addform { margin: 0; }
.add-btn {
  font: inherit; font-size: 15px; font-weight: 800; color: #fff; cursor: pointer;
  background: linear-gradient(180deg, var(--green), var(--green-deep));
  border: 0; border-radius: 999px; padding: 8px 18px; min-height: 40px;
  box-shadow: 0 6px 14px -8px rgba(31, 107, 40, 0.8);
}
.add-btn:active { transform: scale(0.96); }
.stepper { display: inline-flex; align-items: center; border: 2px solid var(--green-deep); border-radius: 999px; overflow: hidden; background: #fff; }
.stepper button {
  font: inherit; font-size: 19px; font-weight: 900; color: var(--green-dark);
  background: none; border: 0; width: 38px; min-height: 38px; cursor: pointer;
}
.stepper button:hover { background: var(--green-soft); }
.stepper .q { min-width: 26px; text-align: center; font-weight: 900; font-size: 16px; }

/* ---------- Featured strip ---------- */

.feat-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 230px); gap: 14px; overflow-x: auto; padding: 4px 2px 12px; }

/* ---------- How it works / steps ---------- */

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 12px 0; }
.step-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow-card); }
.step-num {
  display: inline-flex; width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(160deg, var(--green), var(--green-dark)); color: #fff;
  font-family: var(--display); font-weight: 700; font-size: 21px;
  align-items: center; justify-content: center; margin-bottom: 10px;
}
.step-card h3 { margin: 4px 0 6px; font-size: 18.5px; }
.step-card p { color: var(--muted); font-size: 15.5px; margin: 0; }

/* ---------- Errand banner ---------- */

.errand-banner {
  display: flex; align-items: center; gap: 22px;
  background: linear-gradient(140deg, #2d372e, #1a231b);
  color: #f2f0e6; border-radius: 24px; padding: 30px 30px; margin: 30px 0;
  box-shadow: var(--shadow-card); overflow: hidden; position: relative;
}
.errand-banner .art { width: 130px; height: 130px; flex: none; filter: drop-shadow(0 10px 18px rgba(0,0,0,0.35)); }
.errand-banner h2 { font-family: var(--display); font-size: 27px; color: #fff; margin: 0 0 8px; }
.errand-banner p { color: #c9cec2; font-size: 16.5px; margin: 0 0 16px; max-width: 60ch; }
.errand-banner .stores-lead {
  color: #a9c8a5; font-size: 13px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.07em; margin: 2px 0 8px;
}
.errand-banner .fee-line { color: #a3a89a; font-size: 13.5px; margin: 14px 0 0; }
.store-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.store-chip {
  font-size: 14px; font-weight: 800; padding: 6px 14px; border-radius: 999px;
  background: var(--card); border: 1.5px solid var(--line); color: var(--ink); white-space: nowrap;
}
.errand-banner .store-chip {
  background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.22); color: #f2f0e6;
}
@media (max-width: 620px) {
  .errand-banner { flex-direction: column; text-align: center; }
  .errand-banner .store-chips, .errand-banner .cta-row { justify-content: center; }
}

/* Small catalogue: fewer, larger tiles so each product feels like a hero */
.prod-grid.slim { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }

/* ---------- Local kitchens ---------- */

.p-by { color: var(--green-dark); font-size: 13px; font-weight: 700; margin-top: 2px; }
.k-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 270px);
  gap: 14px; overflow-x: auto; padding: 4px 2px 12px;
}
.k-card { text-decoration: none; color: inherit; }
.k-card:hover { border-color: var(--green); }
.see-menu { font-weight: 800; color: var(--green-dark); font-size: 15px; }
.k-head { display: flex; gap: 20px; align-items: flex-start; }
@media (max-width: 560px) { .k-head { flex-direction: column; align-items: center; text-align: center; } }

/* ---------- Info / contact ---------- */

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; margin: 12px 0; }
.contact-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

/* ---------- Basket & checkout ---------- */

.cart-line { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-line .art { width: 62px; height: 62px; border-radius: 14px; flex: none; }
.cl-main { flex: 1; min-width: 0; }
.cl-name { font-weight: 800; font-size: 17px; }
.cl-unit { color: var(--muted); font-size: 14px; }
.cl-price { font-weight: 900; white-space: nowrap; font-size: 17px; }
.rm-btn { background: none; border: 0; color: var(--red); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; padding: 2px 0; }

.price-rows { margin: 10px 0 4px; }
.price-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 17px; }
.price-row.total { border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 12px; font-weight: 900; font-size: 21px; }
.price-row .free { color: var(--green-dark); font-weight: 800; }

.review-box {
  background: var(--green-soft); border: 2px solid var(--green);
  border-radius: 16px; padding: 16px 18px; margin: 18px 0;
  font-size: 18.5px; font-weight: 700; color: var(--green-dark); line-height: 1.45;
}

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.sticky-side { position: sticky; top: 14px; }

/* ---------- Order confirmation & tracking ---------- */

.conf-hero { text-align: center; padding: 40px 20px 30px; }
.conf-hero .tick {
  display: inline-flex; width: 86px; height: 86px; border-radius: 50%;
  background: linear-gradient(160deg, var(--green), var(--green-dark)); color: #fff;
  font-size: 46px; align-items: center; justify-content: center; margin-bottom: 18px;
  box-shadow: 0 16px 30px -16px rgba(23, 80, 31, 0.8);
}
.conf-hero h1 { margin: 0 0 8px; }
.code-chip {
  display: inline-block; font-family: var(--display); font-weight: 700; font-size: 26px;
  background: var(--forest); color: #fff; border-radius: 12px; padding: 6px 18px; margin: 8px 0;
  letter-spacing: 0.03em;
}

.timeline { list-style: none; margin: 14px 0 4px; padding: 0; }
.timeline li { position: relative; padding: 0 0 22px 38px; }
.timeline li::before {
  content: ''; position: absolute; left: 10px; top: 26px; bottom: 0; width: 3px;
  background: var(--line); border-radius: 2px;
}
.timeline li:last-child::before { display: none; }
.timeline .dot {
  position: absolute; left: 0; top: 2px; width: 23px; height: 23px; border-radius: 50%;
  background: #fff; border: 3px solid var(--line);
}
.timeline li.done .dot { background: var(--green); border-color: var(--green); }
.timeline li.done .dot::after { content: '✓'; color: #fff; font-size: 13px; font-weight: 900; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.timeline li.now .dot { border-color: var(--green); box-shadow: 0 0 0 5px var(--green-ring); }
.timeline .t-label { font-weight: 800; font-size: 16.5px; }
.timeline li.future .t-label { color: var(--muted); font-weight: 600; }
.timeline .t-time { color: var(--muted); font-size: 13.5px; }

.order-card { display: block; text-decoration: none; color: inherit; }
.order-card:hover { border-color: var(--green); }
.oc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.oc-code { font-family: var(--display); font-weight: 700; font-size: 19px; }

/* ---------- Stats (admin dashboard vocabulary) ---------- */

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 12px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; }
.stat span { color: var(--muted); font-size: 13px; font-weight: 700; }
.stat b { font-size: 24px; letter-spacing: -0.01em; }
.stat em { font-style: normal; color: var(--muted); font-size: 13px; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 16px; margin: 8px 0; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; overflow-wrap: break-word; }

.filters { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.filters a {
  text-decoration: none; font-weight: 700; font-size: 14.5px; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 14px;
}
.filters a.on { background: var(--forest); border-color: var(--forest); color: #fff; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }

.msg-card .body { background: #f7f2e6; border-radius: 10px; padding: 10px 12px; font-size: 15px; margin: 8px 0; overflow-wrap: break-word; }

/* ---------- Footer ---------- */

footer {
  margin-top: 50px; background: linear-gradient(160deg, #262f27, #151b16);
  color: #b9beb2; font-size: 14.5px; padding: 30px 0 90px;
}
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.foot-brand b { color: #fff; font-size: 16px; }
.foot-brand span { font-family: var(--display); font-style: italic; color: #8faf8b; }
.foot-brand img { vertical-align: -8px; background: #fff; border-radius: 8px; padding: 2px; margin-right: 6px; }
footer a { color: #cfe6cc; }

main { padding-bottom: 30px; min-height: 55vh; }

/* ---------- Print (packing slips / run sheets) ---------- */

@media print {
  header, footer, .utility, .no-print, .tabbar, .gateway-warn { display: none !important; }
  body, body.admin { background: #fff; font-size: 12.5px; }
  .card { box-shadow: none; border: 1px solid #bbb; break-inside: avoid; }
  main, body.admin > main { max-width: none; padding: 0; }
}
