/* iOS-inspired theme. Tokens here; templates use the semantic classes below. */
:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --ink: #1c1c1e;
  --ink-soft: #6b6b70;
  --pine: #0a5c46;
  --pine-ink: #ffffff;
  --amber: #b87514;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app { max-width: 480px; margin: 0 auto; padding: 16px 16px 120px; }
.app--wide { max-width: 980px; }

h1, h2, h3 { letter-spacing: -0.02em; }
h1 { font-size: 1.6rem; margin: 8px 0 16px; }
.muted { color: var(--ink-soft); }
.price { font-variant-numeric: tabular-nums; }

.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0 16px; position: sticky; top: 0; background: var(--bg); z-index: 5;
}
.topbar a { color: var(--pine); text-decoration: none; font-weight: 600; }

.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 14px;
}
.card--tap { display: block; color: inherit; text-decoration: none; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.thumb {
  width: 100%; aspect-ratio: 1; border-radius: var(--radius-sm);
  background: #ececef center/cover no-repeat; margin-bottom: 8px;
  object-fit: cover; display: block;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 999px; padding: 12px 18px; font-size: 1rem;
  font-weight: 600; cursor: pointer; background: var(--pine); color: var(--pine-ink);
}
.btn:disabled { background: #c9c9cf; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--pine); padding: 10px 14px; }
.btn--block { width: 100%; }

.field { width: 100%; padding: 14px; border: 1px solid #e2e2e6; border-radius: var(--radius-sm);
  font-size: 1rem; margin-bottom: 12px; background: #fff; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.chip { white-space: nowrap; padding: 8px 14px; border-radius: 999px; background: #fff;
  box-shadow: var(--shadow); color: var(--ink); text-decoration: none; font-size: 0.9rem; }
.chip--on { background: var(--pine); color: #fff; }

/* Always-visible minimum-order bar */
.minbar {
  position: fixed; left: 0; right: 0; bottom: 0; background: #fff;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.08); padding: 14px 16px;
}
.minbar__inner { max-width: 480px; margin: 0 auto; }
.minbar__track { height: 10px; border-radius: 999px; background: #ececef; overflow: hidden; margin: 8px 0; }
.minbar__fill { height: 100%; border-radius: 999px; background: var(--amber); transition: width .2s; }
.minbar__fill--done { background: var(--pine); }
.minbar__row { display: flex; justify-content: space-between; align-items: center; }
.tag-amber { color: var(--amber); font-weight: 700; }
.tag-pine { color: var(--pine); font-weight: 700; }

.stepper { display: inline-flex; align-items: center; gap: 10px; }
.stepper button { width: 34px; height: 34px; border-radius: 999px; border: 1px solid #e2e2e6;
  background: #fff; font-size: 1.2rem; cursor: pointer; }

.line { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid #f0f0f2; }
.line:last-child { border-bottom: none; }
.line__main { flex: 1; }
.soldout { opacity: 0.45; }

.banner { background: #fff7e8; color: var(--amber); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 14px; font-weight: 600; }
.error { background: #fdecec; color: #b3261e; border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 14px; }
.empty { text-align: center; color: var(--ink-soft); padding: 48px 16px; }
.contact { font-size: 0.95rem; }
.contact a { color: var(--pine); }

[x-cloak] { display: none !important; }
.toast { position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%);
  max-width: 88%; z-index: 60; padding: 11px 16px; border-radius: 999px;
  font-weight: 700; font-size: 0.95rem; color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.18);
  text-align: center; }
.toast--ok { background: var(--pine); }
.toast--err { background: #b3261e; }

/* ---- Desktop panel / admin: dense tool, shared brand tokens ---- */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: #0b3a2e; color: #d7e7e1; padding: 22px 16px; }
.side h2 { color: #fff; font-size: 1.1rem; margin: 0 0 18px; }
.side a { display: block; color: #cfe3dc; text-decoration: none; padding: 9px 10px;
  border-radius: 10px; margin-bottom: 4px; }
.side a:hover, .side a.on { background: rgba(255,255,255,0.10); color: #fff; }
.side__soon { display: block; color: #7fa99b; padding: 9px 10px; font-size: 0.95rem; }
.side__soon small { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em;
  opacity: 0.7; margin-left: 6px; }
.side__who { margin-top: 24px; font-size: 0.75rem; color: #7fa99b; word-break: break-all; }
.content { padding: 28px 32px; max-width: 1000px; }
.content h1 { margin-top: 0; }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px;
  overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid #f0f0f2; }
.table th { background: #fafafa; font-size: 0.85rem; color: var(--ink-soft); }
.table tr:last-child td { border-bottom: none; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.8rem; }
.pill--active, .pill--approved { background: #e6f4ee; color: var(--pine); }
.pill--hidden, .pill--rejected, .pill--registered { background: #eee; color: #777; }
.pill--sold_out, .pill--pending, .pill--verified { background: #fff7e8; color: var(--amber); }
.pill--suspended { background: #fdecec; color: #b3261e; }
.pill--accepted, .pill--adjusted { background: #e6f4ee; color: var(--pine); }
.pill--sent { background: #fff7e8; color: var(--amber); }
.pill--draft, .pill--closed { background: #eee; color: #777; }
.form-row { display: flex; flex-direction: column; margin-bottom: 14px; max-width: 520px; }
.form-row label { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 6px; }
textarea.field { min-height: 90px; font-family: inherit; }
.toolbar { display: flex; gap: 10px; margin-bottom: 18px; }

/* Images: list thumbnails + detail galleries */
.thumb-sm { display: inline-block; width: 42px; height: 42px; border-radius: 10px;
  background: #ececef center/cover no-repeat; vertical-align: middle; object-fit: cover; }
.gallery { display: flex; flex-wrap: wrap; gap: 10px; }
.gallery__item { position: relative; }
.gallery__img { display: block; width: 120px; height: 120px; border-radius: 14px;
  background: #ececef center/cover no-repeat; object-fit: cover; }
.gallery__del { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px;
  border-radius: 999px; border: none; background: rgba(0,0,0,0.6); color: #fff;
  cursor: pointer; font-size: 1rem; line-height: 1; }
/* Retailer mobile photo strip */
.photos { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin-bottom: 12px; }
.photos__img { flex: 0 0 auto; width: 88%; aspect-ratio: 4/3; border-radius: var(--radius-sm);
  background: #ececef center/cover no-repeat; scroll-snap-align: center;
  object-fit: cover; display: block; }
