:root {
  --accent: #ff1500;
  --ink: #18181b;
  --muted: #71717a;
  --line: #e4e4e7;
  --bg: #f4f4f5;
  --ok: #15803d;
  --warn: #b45309;
  --danger: #b91c1c;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: 'Lexend', system-ui, sans-serif; }
body { max-width: 1160px; margin: 0 auto; padding: 0 16px 32px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0 12px; }
.brand { font-weight: 700; font-size: 20px; color: var(--accent); letter-spacing: -0.3px; }
.brand .for { color: var(--ink); font-weight: 500; font-size: 15px; }
.who { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.card { background: #fff; border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.card.narrow { max-width: 420px; margin: 24px auto; }
h1 { font-size: 22px; font-weight: 600; margin: 0; line-height: 1.3; }
h2 { font-size: 17px; font-weight: 600; margin: 0; }
.line { margin: 8px 0 0; font-size: 15px; color: #3f3f46; line-height: 1.45; }
.note { margin: 0 0 12px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.muted { color: var(--muted); font-size: 13px; margin: 4px 0 0; line-height: 1.4; }
.name { font-weight: 600; font-size: 15px; margin: 0; }
.quote { margin: 8px 0 0; font-size: 14px; color: #3f3f46; }
.empty { text-align: center; color: var(--muted); font-size: 14px; padding: 24px 0; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin-top: 12px; }
.field-label { margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.card > .field-label:first-child, .head-row .field-label { margin-top: 0; }
.field input, .price-row input, .search, .select { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 15px; color: var(--ink); background: #fff; }
.check { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 15px; min-height: 44px; }
.check input { width: 20px; height: 20px; }
.two { display: flex; gap: 12px; }
.two .field { flex: 1; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px;
  border: none; border-radius: 999px; background: var(--ink); color: #fff; font: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; }
.button:disabled { opacity: 0.6; cursor: default; }
.button.full { width: 100%; margin-top: 10px; }
.card.narrow .button { width: 100%; margin-top: 14px; }
.button.ghost, .ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.button.danger { color: var(--danger); }
.ghost.small { min-height: 38px; padding: 0 14px; border-radius: 999px; font: inherit; font-size: 13px; cursor: pointer; }
.button.file { position: relative; overflow: hidden; }
.button.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.msg { min-height: 1em; margin: 10px 0 0; font-size: 14px; color: var(--danger); }
.msg.ok { color: var(--ok); }
.link { min-height: 36px; padding: 0 4px; border: none; background: none; font: inherit; font-size: 14px; color: var(--ink);
  text-decoration: underline; cursor: pointer; }
.link.danger { color: var(--danger); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #f4f4f5; font-size: 12px; color: var(--muted); }
.badge.warn { background: #fffbeb; color: var(--warn); }
.foot { margin-top: 20px; font-size: 12px; color: var(--muted); text-align: center; }

/* Lists */
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs button { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
.tabs button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.count:not(:empty) { margin-left: 4px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.search { flex: 1 1 260px; border-radius: 999px; padding: 0 16px; }
.select { cursor: pointer; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.store-card, .item-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: none; border-radius: 14px;
  background: #fff; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.store-card:hover, .item-row:hover { background: #fafafa; }
.item-row { padding: 10px 0; border-radius: 0; border-bottom: 1px solid var(--line); }
.item-row:last-child { border-bottom: none; }
.hidden-item .name { color: var(--muted); }
.store-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.store-text .name, .store-text .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 12px; object-fit: cover; background: #f4f4f5; }
.thumb.small { width: 44px; height: 44px; flex-basis: 44px; border-radius: 10px; }

/* One store */
.back { margin: 0 0 8px; padding: 0; min-height: 36px; border: none; background: none; font: inherit; font-size: 14px; color: var(--muted); cursor: pointer; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 38px; padding: 0 14px; border: none; border-radius: 999px; background: #f4f4f5; font: inherit; font-size: 14px;
  color: var(--ink); cursor: pointer; }
.chip.on { background: var(--ink); color: #fff; }
.map-wrap { position: relative; height: 320px; border-radius: 12px; overflow: hidden; background: #e4e4e7; }
#map { position: absolute; inset: 0; }
.map-pin { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -26px 0 0 -13px; border-radius: 50% 50% 50% 0;
  background: var(--accent); transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); pointer-events: none; }
.map-pin::after { content: ''; position: absolute; left: 8px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.photo { display: block; margin-top: 10px; border-radius: 12px; object-fit: cover; background: #f4f4f5; }
.photo.wide { width: 100%; max-height: 260px; }
.photo.square { width: 160px; height: 160px; }

/* Dialogs */
.overlay { position: fixed; inset: 0; z-index: 10; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px;
  background: rgba(10, 10, 12, 0.5); overflow-y: auto; }
.dialog { width: 100%; max-width: 560px; margin: 0; }
.small-dialog { max-width: 420px; }
.price-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.price-row .select { flex: 0 0 140px; }
.price-row input { flex: 1; min-width: 0; }
.dash { color: var(--muted); }
.warn-text { color: var(--warn); }
.allowed { margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: #f0fdf4; color: var(--ok); font-size: 13px; }

@media (max-width: 760px) {
  .columns { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .price-row { flex-wrap: wrap; }
  .price-row .select { flex-basis: 100%; }
}
@media (max-width: 480px) {
  .two { flex-direction: column; gap: 0; }
  .who #adminName { display: none; }
}
