/* Login, customer (/app), shop (/shop) and admin (/admin) web apps. Builds on legal.css. */
.app { max-width: 560px; margin: 0 auto; padding: 24px 20px 96px; }
.top-inner.app-top { max-width: 560px; padding-inline: 20px; }
.top-inner.wide { max-width: 1240px; padding-inline: 24px; }
.top nav { display: flex; align-items: center; gap: 4px; }
.top nav a:first-child { margin-left: 0; }
.top .who { font-size: 14px; color: var(--muted-ink); margin-right: 8px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted { color: var(--muted-ink); margin: 0; }
.small { font-size: 14px; }
.center { text-align: center; }

/* App shell: sidebar on desktop, scrolling pill bar on phones */
.shell { max-width: 1240px; margin: 0 auto; padding: 0 20px 96px; }
.side {
  position: sticky;
  top: 68px;
  z-index: 5;
  display: flex;
  gap: 6px;
  margin: 0 -20px;
  padding: 10px 20px;
  overflow-x: auto;
  scrollbar-width: none;
  background: #fefff9f2;
  border-bottom: 1px solid #17201810;
}
.side::-webkit-scrollbar { display: none; }
.side a {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.side a.on { background: var(--ink); border-color: var(--ink); color: var(--ivory); }
.side a img { width: 20px; height: 20px; }
.side .badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--lime); color: var(--ink); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.side .side-foot { display: none; }
.main { min-width: 0; padding-top: 20px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.page-head h1 { font-size: clamp(26px, 4vw, 34px); margin: 0; }
.page-head .muted { margin-top: 2px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.page-head .actions .btn { margin-top: 0; }

@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 48px; padding-top: 32px; }
  .side {
    top: 100px;
    align-self: start;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    overflow: visible;
    background: none;
    border: 0;
  }
  .side a { border: 0; background: none; padding: 11px 14px; border-radius: 14px; font-size: 15px; }
  .side a:hover { background: var(--muted); }
  .side a.on { background: var(--ink); color: var(--ivory); }
  .side .badge { margin-left: auto; }
  .side .side-foot { display: block; margin: 20px 14px 0; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted-ink); }
  .side .side-foot a { display: inline; padding: 0; font-size: 13px; font-weight: 500; color: var(--muted-ink); text-decoration: underline; }
  .side .side-foot a:hover { background: none; }
  .main { padding-top: 0; }
}

.cols { display: grid; gap: 24px; }
@media (min-width: 1100px) {
  .cols { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px; align-items: start; }
  .cols.even { grid-template-columns: 1fr 1fr; }
}
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.panel { border: 1px solid var(--border); border-radius: 22px; background: #fff; padding: 20px; }
.panel > h2:first-child, .panel > .section-title:first-child, .panel > form > h2:first-child { margin-top: 0; }
a.btn { text-decoration: none; }
.page-head { margin-bottom: 16px; }

.intro h1 { margin-top: 14px; }
.intro .lead { margin-bottom: 0; }
.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 20px 0 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--muted);
  font-size: 14px;
}
.notice img { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.notice.warn { background: #fff4d6; }
.notice.bad { background: #fbe9e7; }
.notice b { display: block; }
.roles { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.role {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff;
  font: inherit;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.role:hover { border-color: var(--ink); transform: translateY(-2px); }
.role img { width: 44px; height: 44px; flex: none; padding: 8px; border-radius: 14px; background: var(--muted); object-fit: contain; }
.role strong { display: block; font-size: 17px; }
.role small { display: block; font-size: 14px; color: var(--muted-ink); }
@media (prefers-reduced-motion: reduce) { .role { transition: none; } .role:hover { transform: none; } }
.role-chip { margin: 0; font-size: 14px; font-weight: 600; }

/* Login: brand panel left, sign-in right */
.login-split { max-width: 1240px; margin: 0 auto; padding: 24px 24px 64px; display: grid; gap: 32px; }
.login-panel { display: flex; align-items: center; justify-content: center; }
@media (max-width: 899px) {
  .login-split { min-height: calc(100vh - 69px); min-height: calc(100dvh - 69px); grid-template-rows: auto 1fr; padding-bottom: 0; gap: 16px; }
  .login-art { order: 2; display: flex; align-items: flex-end; justify-content: center; }
  .login-art-copy { display: none; }
  .login-art { overflow: hidden; }
  .login-art img { display: block; width: min(64vw, 260px); height: auto; transform: translateY(5.5%); }
}
.login-box { width: 100%; max-width: 460px; }
.login-box .intro h1 { margin-top: 0; }
@media (min-width: 900px) {
  .login-split { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: calc(100vh - 69px); align-items: stretch; padding-block: 24px; }
  .login-art {
    position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
    padding: 44px 44px 0; border-radius: 32px; background: var(--lime); min-height: 560px;
  }
  .login-art::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(#17201814 3px, #0000 3px) 0 0 / 26px 26px;
    -webkit-mask-image: linear-gradient(180deg, #000, #0000 55%); mask-image: linear-gradient(180deg, #000, #0000 55%);
  }
  .login-art-copy { position: relative; }
  .login-art .eyebrow { background: var(--ivory); }
  .login-art-title { font-size: clamp(32px, 3.4vw, 46px); line-height: 1.08; letter-spacing: -.03em; font-weight: 700; margin: 18px 0 16px; }
  .login-art ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-weight: 500; }
  .login-art li { display: flex; gap: 10px; align-items: center; margin: 0; }
  .login-art li::before { content: "✓"; display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--lime); font-size: 13px; font-weight: 700; }
  .login-art img { position: relative; align-self: center; width: min(78%, 420px); height: auto; margin-top: 16px; margin-bottom: -8px; }
  .login-panel { padding: 24px 0; }
}

/* Login, first step: just the two choices */
.login-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.login-page > main { flex: 1 0 auto; width: 100%; }
.login-split.picking { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; min-height: 0; padding-block: 48px; }
.login-split.picking .login-art { display: none; }
.picking .login-box { max-width: 820px; }
.picking .intro { text-align: center; }
.picking .intro h1 { font-size: clamp(34px, 5vw, 56px); }
@media (min-width: 640px) {
  .picking .roles { flex-direction: row; gap: 16px; margin-top: 36px; }
  .picking .role { flex: 1; flex-direction: column; align-items: flex-start; gap: 22px; padding: 28px; border-radius: 26px; }
  .picking .role img { width: 64px; height: 64px; padding: 12px; border-radius: 18px; }
  .picking .role strong { font-size: 20px; }
  .picking .role small { font-size: 15px; margin-top: 4px; }
}

.login-foot { position: relative; background: var(--ivory); }
.login-foot .page { max-width: 1240px; justify-content: space-between; align-items: center; row-gap: 8px; }
.login-foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
@media (max-width: 899px) { .login-split:not(.picking) ~ .login-foot { display: none; } }

/* Moving background behind the two choices: drifting lime blobs, dots lit up around the pointer */
.login-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; --mx: 50%; --my: 45%; }
.login-split:not(.picking) ~ .login-bg { display: none; }
.login-bg::before, .login-bg::after { content: ""; position: absolute; inset: 0; }
.login-bg::before {
  z-index: 1;
  background: radial-gradient(#17201826 2px, #0000 2.5px) 0 0 / 24px 24px;
  -webkit-mask-image: radial-gradient(320px circle at var(--mx) var(--my), #000, #0000 75%);
  mask-image: radial-gradient(320px circle at var(--mx) var(--my), #000, #0000 75%);
}
.login-bg::after { background: radial-gradient(520px circle at var(--mx) var(--my), #b8e86a40, #0000 70%); }
.login-bg span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: login-drift 22s ease-in-out infinite alternate; }
.login-bg span:nth-child(1) { width: 46vmax; height: 46vmax; left: -12vmax; top: -10vmax; background: var(--lime); }
.login-bg span:nth-child(2) { width: 38vmax; height: 38vmax; right: -10vmax; top: 20%; background: var(--muted); opacity: .9; animation-duration: 28s; animation-delay: -8s; }
.login-bg span:nth-child(3) { width: 30vmax; height: 30vmax; left: 30%; bottom: -14vmax; background: #d9f2a8; animation-duration: 25s; animation-delay: -15s; }
@keyframes login-drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vmax, 4vmax) scale(1.12); }
  100% { transform: translate(-4vmax, 7vmax) scale(.94); }
}
.picking .role { background: #fffffff2; box-shadow: 0 1px 0 #17201808; }
.picking .role:hover { box-shadow: 0 18px 40px #1720181f; }
@media (prefers-reduced-motion: reduce) { .login-bg span { animation: none; } }

/* "Get the apps" strip above the footer, first login step only */
.app-strip { position: relative; width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px 24px; }
.app-bar {
  display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 16px;
  border-radius: 20px; background: var(--ink); color: var(--ivory);
  font-size: 14px; line-height: 1.5;
}
.app-bar img { width: 32px; height: 32px; flex: none; border-radius: 8px; }
.app-bar p { margin: 0; flex: 1; }
.app-bar a { color: var(--lime); font-weight: 600; }
.app-bar-x { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--ivory); font-size: 22px; line-height: 1; cursor: pointer; }
.app-bar-x:hover { background: #fefff91a; }
.phone-field { display: flex; gap: 8px; }
.phone-field .cc { flex: none; width: 68px; padding-inline: 0; text-align: center; font-weight: 600; color: var(--muted-ink); background: var(--muted); opacity: 1; -webkit-text-fill-color: var(--muted-ink); }
.phone-field #phone { flex: 1; min-width: 0; }
.card.form { padding: 24px; }
.card.form h2 { margin: 0 0 4px; font-size: 20px; }
.btn.full { width: 100%; }
.btn.lime { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.btn.ghost { background: #fff; color: var(--ink); }
.btn.small { padding: 10px 16px; font-size: 14px; margin-top: 0; }
.btn.tiny { padding: 6px 12px; font-size: 13px; margin-top: 0; }
.btn.danger.ghost { background: #fff; color: var(--danger); border-color: #e9b9b5; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: #4f7f18; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn.danger { color: var(--danger); }
textarea { width: 100%; font: inherit; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--ivory); color: var(--ink); resize: vertical; min-height: 96px; }
textarea:focus { outline: 2px solid var(--lime); border-color: var(--ink); }

.hello { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hello h1 { font-size: 28px; margin: 0; }
.hello select, select.pill { width: auto; max-width: 60%; padding: 8px 14px; border-radius: 999px; font-size: 14px; background: #fff; }

.hero-card {
  margin: 20px 0 8px;
  padding: 22px;
  border-radius: 24px;
  background: var(--ink);
  color: var(--ivory);
}
.hero-card h2 { margin: 0; font-size: 21px; }
.hero-card p { margin: 4px 0 0; color: #cfd8c6; font-size: 15px; }
.hero-card .btn { margin-top: 18px; width: 100%; }
.hero-card .row-btns { display: flex; gap: 10px; }
.hero-card .row-btns .btn { flex: 1; }
.hero-card .btn.ghost { background: transparent; color: var(--ivory); border-color: #fefff955; }
@media (min-width: 960px) {
  .hero-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 32px; margin-top: 24px; }
  .hero-card h2 { font-size: 24px; }
  .hero-card .btn { width: auto; margin-top: 0; padding-inline: 32px; flex: none; }
}

.tabs {
  display: flex;
  gap: 4px;
  margin: 24px 0 12px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
}
.tabs button {
  flex: 1;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  border: 0;
  background: none;
  color: var(--ink);
  padding: 10px 8px;
  border-radius: 999px;
  cursor: pointer;
}
.tabs button.on { background: var(--ink); color: var(--ivory); }
.tabs.fit { display: inline-flex; }
.tabs.fit button { flex: none; padding-inline: 18px; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 16px 0 12px; }
.toolbar input[type=search] { flex: 1; min-width: 200px; padding: 11px 16px; border-radius: 999px; background: #fff; }
.toolbar .chips { margin: 0; }

.list { display: flex; flex-direction: column; gap: 10px; }
.list.two { display: grid; gap: 10px; }
@media (min-width: 900px) { .list.two { grid-template-columns: 1fr 1fr; } }
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  font: inherit;
  color: inherit;
  text-align: left;
}
button.row { cursor: pointer; }
button.row:hover { border-color: var(--ink); }
.row .thumb {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 14px;
  background: var(--muted) center / cover no-repeat;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #4f7f18;
}
.row .thumb.round { border-radius: 50%; }
.row .body { flex: 1; min-width: 0; }
.row .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .sub { font-size: 13px; color: var(--muted-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .end { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.row .end.inline-end { flex-direction: row; align-items: center; gap: 8px; }
.row .pts { font-weight: 700; font-size: 17px; }
.row .pts small { font-size: 12px; font-weight: 500; color: var(--muted-ink); }
.row .plus { color: #4f7f18; }
.row .minus { color: var(--danger); }
.row.reversed .title, .row.reversed .pts { text-decoration: line-through; opacity: .55; }
.row.off { opacity: .6; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted-ink); border: 1px dashed var(--border); border-radius: 18px; }
.empty .btn { margin-top: 14px; }

.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--muted); color: #3d6512; white-space: nowrap; }
.tag.pending { background: #fff1c7; color: #7a5a00; }
.tag.rejected, .tag.suspended { background: #fbe9e7; color: var(--danger); }
.tag.grey { background: #eef0eb; color: var(--muted-ink); }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
@media (min-width: 720px) { .stats.four { grid-template-columns: repeat(4, 1fr); } .stats.three { grid-template-columns: repeat(3, 1fr); } }
.stat { padding: 16px; border: 1px solid var(--border); border-radius: 18px; background: #fff; }
.stat b { display: block; font-size: 26px; letter-spacing: -.02em; line-height: 1.2; }
.stat span { font-size: 13px; color: var(--muted-ink); }
.stat.hi { background: var(--lime); border-color: var(--lime); }
.stat.hi span { color: var(--ink); }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 28px 0 10px; }
.section-title h2 { margin: 0; font-size: 19px; }

.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; height: 180px; padding: 16px 4px 0; }
.bars .bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; font-size: 12px; color: var(--muted-ink); }
.bars .bar i { display: block; width: 100%; max-width: 44px; min-height: 4px; border-radius: 10px 10px 4px 4px; background: var(--lime); }
.bars .bar b { color: var(--ink); font-size: 13px; }

.menu { border: 1px solid var(--border); border-radius: 20px; background: #fff; overflow: hidden; }
.menu > a, .menu > button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 16px 18px; border: 0; border-top: 1px solid var(--border); background: none; font: inherit; font-weight: 600; color: var(--ink); text-decoration: none; text-align: left; cursor: pointer; }
.menu > :first-child { border-top: 0; }
.menu > a:hover, .menu > button:hover { background: #fbfdf6; }
.menu > a::after, .menu > button::after { content: '\203A'; font-size: 22px; line-height: 1; color: var(--muted-ink); }
.menu .danger { color: var(--danger); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-top: 1px solid var(--border); }
.switch-row:first-child { border-top: 0; }
.switch-row input { appearance: none; -webkit-appearance: none; position: relative; width: 44px; height: 26px; margin: 0; border-radius: 999px; background: #d9ddd5; cursor: pointer; flex: none; transition: background .15s; }
.switch-row input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.switch-row input:checked { background: var(--ink); }
.switch-row input:checked::after { transform: translateX(18px); }
.switch-row input:focus-visible { outline: 2px solid var(--lime, #b8e86a); outline-offset: 2px; }

.profile-head { display: flex; align-items: center; gap: 16px; }
.avatar { width: 72px; height: 72px; border-radius: 50%; flex: none; background: var(--lime) center / cover no-repeat; display: grid; place-items: center; font-size: 26px; font-weight: 700; }
.avatar.small { width: 40px; height: 40px; font-size: 15px; }
.photo-pick { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.photo-pick .shot { width: 88px; height: 88px; border-radius: 20px; background: var(--muted) center / cover no-repeat; flex: none; display: grid; place-items: center; color: #4f7f18; font-weight: 700; }
.photo-pick .shot.round { border-radius: 50%; }

/* Dialogs: bottom sheets on phones, centred cards on wider screens */
.sheet {
  width: 100%;
  max-width: 520px;
  max-height: calc(100% - 24px);
  margin: auto auto 0;
  border: 0;
  border-radius: 28px 28px 0 0;
  padding: 28px 22px calc(24px + env(safe-area-inset-bottom));
  background: var(--ivory);
  color: var(--ink);
  box-shadow: 0 -12px 60px #17201833;
}
@media (min-width: 600px) {
  .sheet { margin: auto; border-radius: 28px; padding: 32px 28px 28px; }
  .sheet.wide { max-width: 760px; }
}
.sheet::backdrop { background: rgb(23 32 24 / 50%); backdrop-filter: blur(2px); }
.sheet h2 { margin: 0 32px 4px 0; font-size: 22px; }
.sheet .x {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--muted);
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}
.warn-box { margin-top: 12px; padding: 14px 16px; border-radius: 16px; background: #fbe9e7; font-size: 14px; }
.warn-box p { margin: 0 0 6px; }
.warn-box p:last-child { margin: 0; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 100; padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--ivory); font-weight: 600; font-size: 14px; box-shadow: 0 10px 30px #17201840; transition: opacity .4s; }
.toast.out { opacity: 0; }

.qr-box {
  margin: 20px auto 0;
  width: min(280px, 100%);
  aspect-ratio: 1;
  padding: 14px;
  border-radius: 24px;
  background: #fff;
  border: 4px solid var(--lime);
  display: grid;
  place-items: center;
}
.qr-box svg { width: 100%; height: 100%; display: block; }
.qr-box.dim svg { opacity: .2; }
.qr-status { margin: 14px 0 0; text-align: center; font-size: 14px; color: var(--muted-ink); }
.qr-status.error { color: var(--danger); }
.segment { display: flex; padding: 4px; margin-top: 16px; border-radius: 999px; background: var(--muted); }
.segment button { flex: 1; font: inherit; font-weight: 600; border: 0; background: none; padding: 9px; border-radius: 999px; cursor: pointer; color: var(--ink); }
.segment button.on { background: var(--ink); color: var(--ivory); }

.done { text-align: center; padding: 12px 0 4px; }
.done .big { font-size: 46px; font-weight: 800; letter-spacing: -.03em; margin: 8px 0 0; }
.done .big.plus { color: #4f7f18; }
.done img { width: 140px; height: auto; }

.shop-head { display: flex; gap: 14px; align-items: center; }
.shop-head .thumb { width: 64px; height: 64px; border-radius: 18px; background: var(--muted) center / cover no-repeat; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 22px; color: #4f7f18; }
.shop-head h2 { margin: 0; }
.fav { margin-left: auto; flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: #fff; font-size: 20px; cursor: pointer; color: var(--muted-ink); }
.fav.on { color: #c2362b; border-color: #f0c4bf; background: #fdf1ef; }
.facts { margin: 16px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted-ink); }
.facts li { margin: 4px 0; }
.balance { margin: 18px 0 0; padding: 16px; border-radius: 18px; background: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.balance b { font-size: 28px; }
.reward-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.reward-row:last-child { border-bottom: 0; }
.reward-row .body { flex: 1; min-width: 0; }
.reward-row .sub { font-size: 13px; color: var(--muted-ink); }
.reward-row .thumb { width: 44px; height: 44px; border-radius: 12px; background: var(--muted) center / cover no-repeat; flex: none; display: grid; place-items: center; font-weight: 700; color: #4f7f18; font-size: 14px; }

.offer-card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 20px; background: #fff; overflow: hidden; }
.offer-card .pic { aspect-ratio: 16 / 9; background: var(--muted) center / cover no-repeat; display: grid; place-items: center; font-size: 32px; font-weight: 800; color: #4f7f18; }
.offer-card .inner { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.offer-card .inner .title { font-weight: 700; }
.offer-card .inner .sub { font-size: 13px; color: var(--muted-ink); }
.offer-card .acts { display: flex; gap: 8px; margin-top: auto; padding-top: 12px; flex-wrap: wrap; }
.offer-card.off .pic, .offer-card.off .inner .title { opacity: .55; }

/* Shop: camera scanner */
.scanner {
  position: relative;
  margin-top: 16px;
  border-radius: 22px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 1;
}
.scanner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner .frame {
  position: absolute;
  inset: 18%;
  border: 3px solid var(--lime);
  border-radius: 22px;
  box-shadow: 0 0 0 999px rgb(0 0 0 / 35%);
  pointer-events: none;
}
.customer-card { margin-top: 16px; padding: 16px; border-radius: 18px; background: var(--muted); }
.customer-card .name { font-weight: 700; font-size: 18px; }
.preview { margin: 8px 0 0; font-size: 15px; font-weight: 600; color: #4f7f18; min-height: 24px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chips button { font: inherit; font-size: 14px; font-weight: 600; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--ink); cursor: pointer; }
.chips button.on { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.inline { display: flex; gap: 10px; align-items: center; }
.inline > * { flex: 1; min-width: 0; width: auto; }
.inline > input { padding-inline: 12px; }
.inline > span { flex: none; font-weight: 600; }
.form-grid { display: grid; gap: 0 20px; }
.form-grid > * { min-width: 0; }
@media (min-width: 720px) { .form-grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .form-grid .span { grid-column: 1 / -1; } }
@media (min-width: 1100px) { .cols .form-grid.two { grid-template-columns: minmax(0, 1fr); } }

/* Shop setup: location first */
.locate-card { text-align: center; padding: 36px 24px; }
.locate-card .pin { width: 88px; height: 88px; margin: 0 auto 8px; border-radius: 50%; background: var(--lime); display: grid; place-items: center; font-size: 40px; }
.locate-card h2 { margin: 12px 0 4px; }
.locate-card .btn { min-width: 240px; }
.pin-line { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 12px 14px; border-radius: 14px; background: var(--muted); font-size: 14px; }
.pin-line.none { background: #fff4d6; }
.pin-line span { flex: 1; }
.setup-wrap { max-width: 720px; }

/* Admin tables */
.table-wrap { border: 1px solid var(--border); border-radius: 20px; background: #fff; overflow-x: auto; }
table.data { margin: 0; font-size: 14px; min-width: 720px; }
table.data th { background: #f6faef; font-size: 13px; color: var(--muted-ink); white-space: nowrap; }
table.data td { vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { cursor: pointer; }
table.data tbody tr:hover { background: #fbfdf6; }
table.data .name { font-weight: 600; }
table.data .sub { font-size: 12px; color: var(--muted-ink); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 12px 0 0; font-size: 14px; }
.kv dt { color: var(--muted-ink); }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.review-card { display: grid; gap: 16px; padding: 20px; border: 1px solid var(--border); border-radius: 22px; background: #fff; }
@media (min-width: 900px) { .review-card { grid-template-columns: 1fr auto; align-items: start; } }
.review-card .acts { display: flex; flex-direction: column; gap: 8px; min-width: 180px; }
.review-card .acts .btn { margin: 0; }

.spinner { width: 28px; height: 28px; border: 3px solid var(--muted); border-top-color: #5f9620; border-radius: 50%; animation: spin .8s linear infinite; margin: 24px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }
