/* =====================================================================
   REGULARS — LAYOUT & COMPONENTS
   How things are arranged: spacing, cards, buttons, the stamp card,
   the customer bottom navigation and the business segmented tabs.
   Colours and sizes come from theme.css — change looks THERE, not here.
   ===================================================================== */
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;background:var(--bg);color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  font-size:var(--base-font);line-height:1.5;
}
#app{max-width:560px;margin:0 auto;padding:16px 14px 96px} /* bottom pad clears the nav bar */
h1{font-size:24px;margin:6px 0 8px}
h2{font-size:19px;margin:0 0 8px}
h3{font-size:16px;margin:0 0 6px}
p{margin:6px 0}
.small{font-size:13px}
.muted{color:var(--muted)}
.center{text-align:center}

.card{
  background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px 16px;margin:12px 0;
}

/* Big, thumb-friendly buttons — minimum 50px tall. */
.btn{
  display:block;width:100%;min-height:50px;padding:13px 16px;margin:8px 0;
  background:var(--accent);color:#fff;border:none;border-radius:var(--radius-small);
  font-size:16px;font-weight:600;text-align:center;cursor:pointer;
  text-decoration:none;
}
.btn:active{background:var(--accent-dark)}
.btn.secondary{background:#edf1f0;color:var(--ink)}
.btn.secondary:active{background:#dde5e3}
.btn.danger{background:var(--bad);color:#fff}
.btn:disabled{opacity:.5;cursor:default}
.btn.small-btn{display:inline-block;width:auto;min-height:42px;padding:9px 14px;font-size:14px;margin:4px 4px 4px 0}

input,select,textarea{
  width:100%;padding:13px;margin:6px 0 10px;font-size:16px;min-height:50px;
  border:1px solid var(--line);border-radius:var(--radius-small);background:#fff;color:var(--ink);
}
input[type="color"]{padding:4px;height:50px}
input[type="checkbox"]{min-height:0}
label{font-size:14px;font-weight:600;color:var(--muted)}
.row{display:flex;gap:8px;align-items:center}
.row>*{flex:1}
.row>.fixed{flex:0 0 auto}

.tag{
  display:inline-block;padding:3px 11px;border-radius:999px;font-size:13px;font-weight:600;
  background:#edf1f0;color:var(--ink);margin:2px 2px 2px 0;
}
.tag.ok{background:#e0f2e6;color:var(--ok)}
.tag.bad{background:#fbe7e5;color:var(--bad)}
.tag.warn{background:var(--warn-bg);color:#8a6108}
.tag.reward{background:#fdf0d3;color:#8a6108}

.notice{background:var(--warn-bg);border:1px solid #f0d488;border-radius:var(--radius-small);padding:12px;margin:10px 0}
.error{background:#fbe7e5;border:1px solid #f0b8b3;border-radius:var(--radius-small);padding:12px;margin:10px 0;color:var(--bad)}
.good{background:#e0f2e6;border:1px solid #a9d3b6;border-radius:var(--radius-small);padding:12px;margin:10px 0;color:var(--ok)}

/* The stamp card: big circles, filled ones use the accent, and the next
   empty slot pulses gently so the goal is obvious. */
.stamps{display:flex;flex-wrap:wrap;gap:9px;margin:12px 0}
.stamp{
  width:46px;height:46px;border-radius:50%;
  border:2px dashed #c3cec9;background:#fff;display:flex;align-items:center;justify-content:center;
  font-size:21px;color:#c3cec9;
}
.stamp.filled{border:2px solid var(--accent);background:var(--accent);color:#fff}
.stamp.next{border-color:var(--reward);color:var(--reward);animation:pulse 1.8s ease-in-out infinite}
@keyframes pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.1)}}
.progressbar{height:10px;border-radius:999px;background:#edf1f0;overflow:hidden;margin:8px 0}
.progressbar>div{height:100%;background:var(--reward);border-radius:999px;transition:width .4s ease}

.bigcode{
  font-size:42px;font-weight:800;letter-spacing:7px;text-align:center;
  padding:12px 0;color:var(--accent);
}
.listitem{border-top:1px solid var(--line);padding:11px 0}
.listitem:first-child{border-top:none}

/* Segmented control (business screens): one pill bar, equal segments. */
.tabs{
  display:flex;gap:2px;margin:12px 0;background:#edf1f0;
  border-radius:999px;padding:3px;overflow-x:auto;
}
.tabs button{
  flex:1 1 auto;padding:10px 10px;border-radius:999px;border:none;white-space:nowrap;
  background:transparent;font-size:14px;font-weight:600;cursor:pointer;color:var(--muted);
}
.tabs button.on{background:var(--card);color:var(--ink);box-shadow:0 1px 4px rgba(16,42,38,.15)}

/* Customer bottom navigation: fixed, three big targets with icons. */
.bottomnav{
  position:fixed;left:0;right:0;bottom:0;z-index:40;
  background:var(--card);border-top:1px solid var(--line);
  box-shadow:0 -4px 18px rgba(16,42,38,.06);
  display:flex;max-width:560px;margin:0 auto;
  padding-bottom:env(safe-area-inset-bottom);
}
.bottomnav button{
  flex:1;background:none;border:none;padding:9px 4px 10px;cursor:pointer;
  font-size:12.5px;font-weight:600;color:var(--muted);
  display:flex;flex-direction:column;align-items:center;gap:2px;min-height:58px;
}
.bottomnav button .ic{font-size:21px;line-height:1}
.bottomnav button.on{color:var(--accent)}

.qrbox{text-align:center}
.qrbox svg{max-width:210px;width:100%;height:auto}
.toast{
  position:fixed;left:50%;bottom:86px;transform:translateX(-50%);
  background:var(--ink);color:#fff;padding:11px 18px;border-radius:999px;
  font-size:15px;z-index:60;box-shadow:0 4px 18px rgba(0,0,0,.25);max-width:92vw;text-align:center;
}
.boot{text-align:center;padding-top:60px}
.boot-logo{width:84px;height:84px;border-radius:22px}
.topbar{display:flex;align-items:center;gap:10px;margin-bottom:4px}
.topbar img{width:40px;height:40px;border-radius:12px;object-fit:cover}
.topbar .bizname{font-size:19px;font-weight:700}
.linklike{background:none;border:none;color:var(--accent);font-size:15px;font-weight:600;cursor:pointer;padding:8px 0;min-height:44px}
.switch{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0}
.switch input{width:auto;transform:scale(1.35)}
.statgrid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.stat{background:#f2f5f4;border-radius:var(--radius-small);padding:12px}
.stat b{font-size:22px;display:block}
@media print{
  body{background:#fff}
  #app{max-width:none;padding-bottom:0}
  .noprint,.bottomnav{display:none !important}
}
