html, body { background: #f4f9f8; }
/* One light theme everywhere, matching the homepage: light green › light blue gradients, deep navy text.
   Light gradients always carry dark text; where text itself is colored it uses the deeper green/blue. */
:root {
  --bg: #f4f9f8;
  --surface: #ffffff;
  --surface-2: #edf3f2;
  --border: #dce9e6;
  --text: #0f2230;
  --muted: #566a76;
  --primary: #1f7fc8;        /* deep blue: links, focus, small accents */
  --primary-ink: #0f2230;    /* text on the light gradient buttons */
  --primary-soft: #e3f1fc;
  --green: #0f9466;
  --mint: #b8ecd3;
  --sky: #b9dcf7;
  --grad: linear-gradient(100deg, var(--mint) 0%, #bce6e6 50%, var(--sky) 100%);
  --grad-ink: linear-gradient(100deg, var(--green) 0%, var(--primary) 100%);
  --grad-soft: linear-gradient(120deg, #e2f6ec, #e3f1fc);
  --accent: var(--primary);
  --ok: #0f8a5f;
  --ok-soft: #e2f6ec;
  --warn: #a4570a;
  --warn-soft: #fbeed8;
  --danger: #c62828;
  --danger-soft: #fbe4e2;
  --info: #1f6fb0;
  --info-soft: #e3f1fc;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(15, 34, 48, .05), 0 6px 18px rgba(15, 34, 48, .06);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --bounce: cubic-bezier(0.34, 1.45, 0.64, 1);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --hand: "Caveat", "Segoe Print", cursive;
  color-scheme: light;
}
/* Soft green and blue light in the corners of every app page */
body:not(.is-landing)::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(640px circle at 0% 0%, rgba(184,236,211,.55), transparent 62%), radial-gradient(720px circle at 100% 8%, rgba(185,220,247,.55), transparent 62%), radial-gradient(600px circle at 60% 100%, rgba(205,236,240,.4), transparent 60%); }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
::selection { background: var(--sky); color: var(--text); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5rem; font-family: var(--display); }
h1 { font-size: 1.7rem; letter-spacing: -.025em; }
h2 { font-size: 1.2rem; letter-spacing: -.015em; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70%; }
.hidden { display: none !important; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.stack > * + * { margin-top: 1rem; }
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.is-landing .topbar { display: none; }
.topbar .inner { max-width: 1180px; margin: 0 auto; padding: .7rem 16px; display: flex; align-items: center; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--text); letter-spacing: -.03em; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 30px; height: 30px; display: grid; transition: transform .6s var(--ease); }
.brand .logo svg { width: 100%; height: 100%; }
.brand:hover .logo { transform: rotate(-8deg) scale(1.08); }
.brand b { font-weight: 800; background: var(--grad-ink); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; gap: .25rem; margin-left: auto; align-items: center; }
.nav a, .nav button.link { padding: .45rem .7rem; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: .9rem; background: none; border: 0; cursor: pointer; font-family: inherit; white-space: nowrap; }
.nav a:hover, .nav button.link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--primary-soft); color: var(--primary); }
.nav a.btn.primary { color: var(--primary-ink); }
.nav-badge { display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding: 0 .35rem; margin-left: .35rem; border-radius: 999px; background: #e5484d; color: #fff; font-size: .72rem; font-weight: 800; line-height: 1; vertical-align: .1em; box-shadow: 0 0 0 2px var(--surface, #fff); animation: badge-pop .45s var(--ease, ease) both; }
@keyframes badge-pop { from { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.18); } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .nav-badge { animation: none; } }
.nav a:not(.btn) { position: relative; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .2rem; height: 2px; border-radius: 2px; background: var(--grad-ink); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav a:not(.btn):hover::after, .nav a.active::after { transform: scaleX(1); }

.app { max-width: 1180px; margin: 0 auto; padding: 1.5rem 16px 6rem; }
.app.narrow { max-width: 720px; }
.loading { padding: 3rem; text-align: center; color: var(--muted); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card h2 { margin-bottom: .75rem; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; margin: 1.75rem 0 .75rem; }
.section-title h2 { margin: 0; }
.order-row { display: grid; gap: .3rem; color: inherit; }
.order-row:hover { text-decoration: none; border-color: var(--primary); }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: .6rem 1.05rem; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s, border-color .2s; text-decoration: none; white-space: nowrap; position: relative; overflow: hidden; }
.btn:hover { background: var(--surface-2); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--grad); background-size: 180% 100%; border-color: rgba(15,34,48,.06); color: var(--primary-ink); box-shadow: 0 6px 18px -10px rgba(31,127,200,.5); }
.btn.primary:hover { background-position: 100% 0; box-shadow: 0 12px 26px -12px rgba(15,148,102,.5); }
/* light sweep across main buttons on hover */
.btn.primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.7) 50%, transparent 70%); transform: translateX(-120%); transition: transform .8s var(--ease); pointer-events: none; }
.btn.primary:hover::after { transform: translateX(120%); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.accent { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: .38rem .75rem; font-size: .85rem; }
.btn.lg { padding: .85rem 1.4rem; font-size: 1.02rem; }
.btn.block { width: 100%; }

label.field { display: block; }
label.field > span { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .3rem; }
input, select, textarea { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .6rem .75rem; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--primary) 35%, transparent); border-color: var(--primary); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--primary); }
input[type=file] { padding: .5rem; }
textarea { resize: vertical; min-height: 70px; }
.big-input { font-size: 1.3rem; letter-spacing: .06em; font-weight: 700; }
.form { display: grid; gap: .9rem; }
.form-error { color: var(--danger); font-size: .88rem; font-weight: 600; min-height: 1.2em; }
.hint { color: var(--muted); font-size: .82rem; margin-top: .25rem; }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px; gap: 3px; }
.seg button, .seg a { border: 0; background: transparent; padding: .42rem .85rem; border-radius: 999px; font: inherit; font-weight: 600; font-size: .88rem; color: var(--muted); cursor: pointer; }
.seg a:hover { text-decoration: none; }
.seg .on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg button.on.color { color: #c2410c; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.stepper button { border: 0; background: var(--surface-2); width: 40px; height: 42px; font-size: 1.1rem; cursor: pointer; color: var(--text); }
.stepper input { width: 56px; border: 0; text-align: center; border-radius: 0; padding: .5rem 0; }
.stepper input:focus { outline: none; }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.danger { background: var(--danger-soft); color: var(--danger); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.primary { background: var(--primary-soft); color: var(--primary); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

.demo-box { margin-top: 1rem; padding: .8rem 1rem; border-radius: 12px; background: var(--primary-soft); font-size: .88rem; }

/* ---------- shops ---------- */
.shop-card { display: flex; flex-direction: column; gap: .6rem; }
.shop-card .prices { display: flex; gap: .4rem; flex-wrap: wrap; }
.price-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.price-table th, .price-table td { padding: .45rem .5rem; border-bottom: 1px solid var(--border); text-align: left; }
.price-table th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- order builder ---------- */
.builder { display: grid; grid-template-columns: 1fr 340px; gap: 1.25rem; align-items: start; }
.dropzone { display: block; border: 2px dashed var(--border); border-radius: var(--radius); padding: 2rem 1rem; text-align: center; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--primary); background: var(--primary-soft); }
.dz-icon { width: 36px; height: 36px; color: var(--primary); display: block; margin: 0 auto .5rem; }
.item-card { display: grid; gap: .85rem; }
.item-head { display: flex; gap: .75rem; align-items: flex-start; }
.file-icon { width: 40px; height: 48px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 800; font-size: .7rem; flex-shrink: 0; }
.item-head .name { font-weight: 700; word-break: break-word; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; }
.opts .opt > span { display: block; font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: .3rem; text-transform: uppercase; letter-spacing: .03em; }
.opts .opt.check { align-self: end; padding-bottom: .55rem; display: flex; gap: .4rem; align-items: center; font-weight: 600; }
.item-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed var(--border); padding-top: .7rem; gap: .5rem; flex-wrap: wrap; }
.item-foot .calc { color: var(--muted); font-size: .88rem; }
.item-foot .sub { font-weight: 800; font-size: 1.05rem; }
.item-err { color: var(--danger); font-size: .85rem; font-weight: 600; }
.summary { position: sticky; top: 80px; }
.summary .total { font-family: var(--display); font-size: 2rem; font-weight: 700; letter-spacing: -.03em; }
.summary-lines { font-size: .88rem; display: grid; gap: .3rem; margin: .75rem 0; }
.summary-lines div { display: flex; justify-content: space-between; gap: .5rem; }
.summary-lines div span:first-child { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-pay { display: none; }
.uploading { display: flex; align-items: center; gap: .6rem; color: var(--muted); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--primary); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- GCash payment ---------- */
.pay-card { padding: 1.4rem; }
.pay-step { display: flex; gap: 1rem; align-items: flex-start; }
.pay-step > div { flex: 1; min-width: 0; }
.pay-step .num { width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: var(--text); display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.pay-step h2 { margin-top: .2rem; }
.amount { color: var(--primary); }
.pay-grid { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: start; margin-top: .75rem; }
.gqr { margin: 0; display: grid; gap: .5rem; justify-items: center; }
.gqr img { width: 190px; height: 190px; object-fit: contain; background: #fff; border-radius: 12px; border: 1px solid var(--border); padding: 6px; }
.big { font-size: 1.25rem; letter-spacing: .03em; }

/* ---------- receipt ---------- */
.receipt { max-width: 560px; margin: 0 auto; }
.receipt-top { text-align: center; padding: 1.5rem 1rem 1rem; }
.receipt-top .code { font-size: 2.2rem; font-weight: 800; letter-spacing: .04em; background: var(--grad-ink); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; padding-bottom: .05em; }
.receipt-top img { width: 200px; height: 200px; border-radius: 12px; background: #fff; padding: 6px; margin: .5rem auto; display: block; }
.queue-no { display: inline-block; background: var(--primary-soft); color: var(--primary); font-weight: 800; padding: .25rem .8rem; border-radius: 999px; }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); margin: 1rem 0 .5rem; }
.timeline .t { text-align: center; font-size: .78rem; color: var(--muted); font-weight: 600; position: relative; }
.timeline .t .b { width: 26px; height: 26px; border-radius: 50%; margin: 0 auto .35rem; display: grid; place-items: center; background: var(--surface-2); border: 2px solid var(--border); font-size: .75rem; position: relative; z-index: 1; }
.timeline .t::before { content: ""; position: absolute; top: 12px; left: -50%; width: 100%; height: 2px; background: var(--border); }
.timeline .t:first-child::before { display: none; }
.timeline .t.done { color: var(--text); }
.timeline .t.done .b { background: var(--ok); border-color: var(--ok); color: #fff; }
.timeline .t.done::before { background: var(--ok); }
.timeline .t.now .b { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 5px var(--primary-soft); }
.dashed { border-top: 2px dashed var(--border); margin: 1rem 0; }
.lines { width: 100%; border-collapse: collapse; font-size: .9rem; }
.lines td { padding: .45rem 0; vertical-align: top; }
.lines td + td { padding-left: .75rem; }
.ready-banner { background: var(--ok-soft); color: var(--ok); border-radius: 12px; padding: .9rem 1rem; font-weight: 700; text-align: center; }

/* ---------- shop dashboard ---------- */
.shop-head { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-bottom: 1rem; }
.open-toggle { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; font: inherit; font-weight: 700; background: none; border: 0; color: var(--text); }
.switch { width: 44px; height: 26px; border-radius: 999px; background: var(--border); position: relative; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.open-toggle.on .switch { background: var(--ok); }
.open-toggle.on .switch::after { left: 21px; }
.claim-bar { display: flex; gap: .6rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .45rem .45rem .45rem 1rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.claim-bar input { flex: 1; min-width: 0; font-size: 1.05rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; border: 0; background: transparent; }
.claim-bar input:focus { outline: none; }
.claim-bar .label { font-weight: 700; }
.tabs { display: flex; gap: .4rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--border); background: var(--surface); padding: .5rem .95rem; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; color: var(--muted); }
.tabs button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.tabs button.attn:not(.on) { border-color: var(--primary); color: var(--primary); }
.tabs .count { display: inline-block; min-width: 22px; padding: 0 .35rem; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: .78rem; margin-left: .35rem; text-align: center; }
.tabs button.on .count, .tabs button.attn .count { background: var(--primary); color: #fff; }
.orders { display: grid; gap: .9rem; }
.order-card { display: grid; grid-template-columns: 96px 1fr; gap: 1rem; }
.order-card.new { animation: flash 2.5s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 4px var(--primary); } 100% { box-shadow: var(--shadow); } }
.qbox { background: var(--surface-2); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: .6rem .3rem; text-align: center; align-self: start; }
.qbox .n { font-family: var(--display); font-size: 2.1rem; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.qbox .n.amount { font-size: 1.35rem; }
.qbox .l { font-size: .7rem; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.order-card.ready .qbox { background: var(--ok-soft); color: var(--ok); }
.order-card.verify .qbox { background: var(--info-soft); color: var(--info); }
.order-meta { display: flex; gap: .5rem 1rem; flex-wrap: wrap; align-items: center; margin-bottom: .6rem; }
.order-meta .code { font-weight: 800; font-size: 1.1rem; letter-spacing: .03em; }
.order-meta .push { margin-left: auto; }
.verify-box { display: flex; justify-content: space-between; gap: 1rem; align-items: center; background: var(--surface-2); border-radius: 12px; padding: .8rem 1rem; }
.verify-box .ref { font-size: 1.5rem; font-weight: 800; letter-spacing: .06em; }
.proof-thumb { border: 1px solid var(--border); border-radius: 10px; padding: 0; background: #fff; cursor: zoom-in; overflow: hidden; width: 74px; height: 110px; flex-shrink: 0; }
.proof-thumb img { width: 100%; height: 100%; object-fit: cover; }
.proof-full { max-width: 100%; max-height: 75vh; display: block; margin: 0 auto; border-radius: 10px; }
.file-rows { display: grid; gap: .5rem; }
.file-row { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: center; background: var(--surface-2); border-radius: 12px; padding: .55rem .7rem; }
.file-row .fname { font-weight: 650; word-break: break-word; }
.guide summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.guide[open] summary { margin-bottom: .75rem; }
.guide .table { margin: .5rem 0 1rem; }
.file-actions { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.specs { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .3rem; }
.spec { font-size: .78rem; font-weight: 700; padding: .12rem .5rem; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); }
.spec.big { font-size: .85rem; background: var(--text); color: var(--bg); border-color: var(--text); }
.spec.colored { background: var(--grad); color: var(--text); border-color: transparent; }
.spec.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.spec.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.order-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; align-items: center; }
.note { background: var(--warn-soft); border-radius: 8px; padding: .45rem .7rem; font-size: .88rem; margin-top: .5rem; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.banner { border-radius: 12px; padding: .85rem 1rem; margin: 0 0 1rem; font-weight: 600; display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.info { background: var(--info-soft); color: var(--info); }
.howto { margin: 0; padding-left: 1.2rem; display: grid; gap: .25rem; }

/* ---------- stats ---------- */
.kpi .v { font-family: var(--display); font-size: 1.75rem; font-weight: 700; letter-spacing: -.03em; }
.kpi .l { color: var(--muted); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.bars { display: flex; align-items: flex-end; gap: .5rem; height: 160px; padding-top: 1rem; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: .3rem; min-width: 0; }
.bars .bar .fill { width: 100%; max-width: 46px; background: color-mix(in srgb, var(--primary) 45%, transparent); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.bars .bar.today .fill { background: var(--primary); }
.bars .bar .x { font-size: .72rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.bars .bar .y { font-size: .72rem; font-weight: 700; white-space: nowrap; }
.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; align-items: end; height: 70px; }
.hours div { background: var(--primary); border-radius: 2px; min-height: 2px; opacity: .85; }
.hours-x { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); margin-top: .25rem; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .55rem .5rem; border-bottom: 1px solid var(--border); text-align: left; }
.table th { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.price-edit input[type=number] { max-width: 110px; }
.qr-preview { width: 160px; height: 160px; object-fit: contain; background: #fff; border-radius: 12px; padding: 6px; border: 1px solid var(--border); }

/* ---------- poster ---------- */
.poster { max-width: 640px; margin: 0 auto; background: #fff; color: #0f2230; border-radius: 24px; padding: 2.5rem; text-align: center; border: 1px solid var(--border); position: relative; overflow: hidden; }
.poster::before { content: ""; position: absolute; inset: 0 0 auto; height: 14px; background: var(--grad); }
.poster-brand { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--display); font-weight: 800; font-size: 1.2rem; color: #0f2230; }
.poster-brand svg { width: 34px; height: 34px; }
.poster h1 { font-size: 2.6rem; color: #0f2230; letter-spacing: -.035em; margin-top: 1rem; }
.poster-sub { font-size: 1.15rem; color: #566a76; }
.poster .shopname { font-family: var(--display); font-size: 1.5rem; font-weight: 700; }
.poster img { width: 300px; height: 300px; margin: 1rem auto; display: block; }
.poster ol { text-align: left; display: inline-block; font-size: 1.05rem; margin: .75rem auto 0; }

/* ---------- toasts & modal ---------- */
.toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); display: grid; gap: .5rem; z-index: 100; width: min(440px, calc(100% - 32px)); }
.toast { background: #0f2230; color: #fff; padding: .8rem 1rem; border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.25); font-weight: 600; animation: up .2s ease-out; }
.toast.error { background: var(--danger); }
.toast.ok { background: var(--ok); }
@keyframes up { from { transform: translateY(10px); opacity: 0; } }
.modal-back { position: fixed; inset: 0; background: rgba(10, 12, 20, .5); display: grid; place-items: center; z-index: 90; padding: 16px; }
.modal { background: var(--surface); border-radius: 20px; padding: 1.4rem; width: min(540px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); }

/* ---------- page animations ----------
   Every app page eases in when it opens: its blocks rise into place one after another. */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.enter > * { animation: rise .6s var(--ease) backwards; }
.enter > *:nth-child(2) { animation-delay: .06s; } .enter > *:nth-child(3) { animation-delay: .12s; }
.enter > *:nth-child(4) { animation-delay: .18s; } .enter > *:nth-child(5) { animation-delay: .24s; }
.enter > *:nth-child(n+6) { animation-delay: .3s; }
.enter .grid > *, .enter .orders > *, .enter .stack > * { animation: rise .6s var(--ease) backwards; }
.enter .grid > *:nth-child(2), .enter .orders > *:nth-child(2), .enter .stack > *:nth-child(2) { animation-delay: .1s; }
.enter .grid > *:nth-child(3), .enter .orders > *:nth-child(3), .enter .stack > *:nth-child(3) { animation-delay: .16s; }
.enter .grid > *:nth-child(n+4), .enter .orders > *:nth-child(n+4), .enter .stack > *:nth-child(n+4) { animation-delay: .22s; }

/* ---------- hover ---------- */
.shop-card, .order-row, .kpi, .item-card, .order-card { transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s; }
.shop-card:hover, .order-row:hover, .kpi:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -20px rgba(31,127,200,.45); border-color: #c7e2f3; }
.order-card:hover, .item-card:hover { box-shadow: 0 14px 30px -22px rgba(15,148,102,.45); }
.file-row { transition: background .25s; }
.file-row:hover { background: #e6f1f4; }
.dropzone { transition: border-color .2s, background .2s, transform .3s var(--ease); }
.dropzone:hover { transform: translateY(-2px); }
.kpi .v { background: var(--grad-ink); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; }

/* ---------- login / sign up / confirm email / reset password ---------- */
.auth-page { min-height: 100vh; padding: 0 24px 48px; position: relative; overflow: hidden; }
.auth-page::before { content: ""; position: absolute; inset: -10% -10% auto; height: 90%; z-index: -1; pointer-events: none; filter: blur(60px); opacity: .8;
  background: radial-gradient(40% 50% at 15% 20%, #bdeed6, transparent 70%), radial-gradient(40% 50% at 85% 10%, #bfe0fb, transparent 70%), radial-gradient(35% 40% at 50% 70%, #d6f2ee, transparent 70%); }
.auth-nav { max-width: 1120px; margin: 0 auto; height: 80px; display: flex; align-items: center; justify-content: space-between; }
.auth-wrap { max-width: 1120px; margin: 24px auto 0; display: grid; grid-template-columns: 1fr 460px; gap: 64px; align-items: center; }
.auth-side { padding-right: 24px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 14px; background: var(--grad-ink); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; }
.auth-hero { font-family: var(--display); font-weight: 800; font-size: clamp(40px, 4.8vw, 68px); line-height: .98; letter-spacing: -.045em; color: var(--text); margin: 0 0 40px; }
.auth-hero span { display: inline-block; padding-bottom: .12em; background: var(--grad-ink); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-tickets { position: relative; height: 320px; }
.at-ticket { position: absolute; width: 220px; height: 290px; background: #fff; border-radius: 18px; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; font-size: 12px;
  box-shadow: 0 20px 40px -22px rgba(15,34,48,.35), 0 0 0 1px rgba(15,34,48,.04); transition: transform .6s var(--ease); animation: deal-in 1s var(--bounce) backwards; }
.at-ticket.t-a { left: 0; top: 18px; transform: rotate(-7deg); animation-delay: .25s; }
.at-ticket.t-b { left: 244px; top: 0; transform: rotate(5deg); animation-delay: .4s; }
.auth-tickets:hover .t-a { transform: rotate(-11deg) translateX(-14px); }
.auth-tickets:hover .t-b { transform: rotate(8deg) translateX(14px) translateY(-8px); }
@keyframes deal-in { from { opacity: 0; transform: translateY(-160px) rotate(-18deg); } }
.at-ticket header { display: flex; justify-content: space-between; align-items: center; }
.at-ticket header b { font-family: ui-monospace, Consolas, monospace; color: var(--primary); letter-spacing: .04em; }
.at-ticket header em { font-style: normal; font-size: 10px; font-weight: 700; background: var(--surface-2); border-radius: 4px; padding: 2px 6px; color: var(--muted); }
.at-ticket h4 { margin: 0; font-size: 14px; font-family: var(--display); letter-spacing: -.01em; }
.at-ticket .lines { height: 64px; background: repeating-linear-gradient(#e3ecea 0 5px, transparent 5px 12px); mask: linear-gradient(90deg, #000 70%, transparent); }
.at-ticket .swatch { height: 46px; border-radius: 8px; background: linear-gradient(120deg, #7fdcb0, #7cbdf0); }
.at-ticket p { margin: auto 0 0; color: var(--muted); font-weight: 600; }
.at-ticket .stamp { align-self: flex-start; font-weight: 800; font-size: 10.5px; letter-spacing: .08em; padding: 4px 8px; border-radius: 6px; border: 1.5px solid; transform: rotate(-4deg); }
.at-ticket .stamp.ok { color: var(--ok); background: var(--ok-soft); }
.at-ticket .stamp.q { color: var(--primary); background: var(--primary-soft); }
.auth-card { background: rgba(255,255,255,.9); backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: 28px; padding: 36px 32px; box-shadow: 0 30px 60px -38px rgba(15,34,48,.35); animation: rise .7s var(--ease) .1s backwards; }
.auth-card h1 { font-size: 34px; font-weight: 800; letter-spacing: -.04em; margin-bottom: 8px; }
.auth-card > .muted { margin-bottom: 22px; }
.auth-card .form { gap: 14px; }
.auth-card input { padding: .72rem .9rem; border-radius: 12px; background: #f8fbfa; transition: border-color .2s, box-shadow .2s, background .2s; }
.auth-card input:hover { border-color: #c5dbe3; }
.auth-card input:focus { background: #fff; outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(31,127,200,.12); }
.auth-card .field > span.row { display: flex; font-weight: 600; font-size: .88rem; margin-bottom: .3rem; }
.auth-seg { margin-bottom: 20px; }
.auth-alt { margin-top: 18px; }
.auth-card .demo-box { margin-top: 18px; background: var(--grad-soft); }
.code-input { font-size: 28px; letter-spacing: .5em; text-align: center; font-weight: 700; padding: .6rem; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .builder { grid-template-columns: 1fr; }
  .summary { position: static; }
  .summary .desktop-pay { display: none; }
  .mobile-pay { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: .75rem 16px calc(.75rem + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--border); align-items: center; justify-content: space-between; gap: 1rem; box-shadow: 0 -4px 20px rgba(0,0,0,.08); }
  .mobile-pay .total { font-family: var(--display); font-size: 1.35rem; font-weight: 700; }
  .auth-wrap { grid-template-columns: 1fr; gap: 0; margin-top: 8px; }
  .auth-side { display: none; }
  .auth-card { max-width: 480px; width: 100%; margin: 0 auto; }
}
@media (max-width: 520px) {
  .auth-page { padding: 0 16px 32px; }
  .auth-card { padding: 26px 20px; border-radius: 22px; }
  .auth-card h1 { font-size: 28px; }
  .auth-nav { height: 68px; }
}
@media (max-width: 760px) {
  .order-card { grid-template-columns: 1fr; }
  .qbox { flex-direction: row; gap: .6rem; justify-content: flex-start; padding: .5rem .8rem; }
  .qbox .n { font-size: 1.5rem; }
  .topbar .inner { flex-wrap: wrap; gap: .4rem; }
  .nav { margin-left: 0; width: 100%; overflow-x: auto; }
  .pay-grid { grid-template-columns: 1fr; justify-items: start; }
  .verify-box { flex-wrap: wrap; }
  .order-meta .push { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .topbar, .toasts, .no-print { display: none !important; }
  body { background: #fff; }
  .app { padding: 0; }
  .poster { border: 0; }
}

/* ---------- settings ---------- */
.jump { display: flex; gap: .4rem; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-top: .75rem; position: sticky; top: 62px; z-index: 5; padding: .5rem 0; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(8px); }
.jump::-webkit-scrollbar { display: none; }
.jump a { flex-shrink: 0; white-space: nowrap; padding: .38rem .8rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: .85rem; font-weight: 600; color: var(--text); transition: background .2s, transform .2s var(--ease); }
.jump a:hover { text-decoration: none; background: var(--grad); transform: translateY(-1px); }
.group-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 1.5rem 0 0; }
.stack > .group-title:first-child { margin-top: 0; }
.stack > [id] { scroll-margin-top: 130px; }
.logout-card { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.logout-card h2 { margin-bottom: .2rem; }
.btn.danger { border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.danger-fill { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger-fill:hover { background: #a91f1f; }
@media (max-width: 760px) { .jump { top: 96px; } }
.alert-banner { animation: rise .6s var(--ease); }
.alert-banner .btn { flex-shrink: 0; }

/* ---------- long file names never push the page wider ---------- */
body:not(.is-landing) { overflow-wrap: anywhere; }
.grid > *, .orders > *, .file-row > *, .order-meta > *, .summary-lines div span { min-width: 0; }
.order-row .row { flex-wrap: nowrap; }
.order-row .ellipsis { flex: 1 1 auto; min-width: 0; max-width: none; }
.order-row b { flex-shrink: 0; }
.lines td:first-child { width: 100%; }
.order-row { grid-template-columns: minmax(0, 1fr); }
.order-row > * { min-width: 0; }

/* Pop-ups: long file names and codes always wrap inside the box, on every screen size */
.modal { overflow-wrap: anywhere; max-width: calc(100vw - 2rem); overflow-x: hidden; }
.modal * { min-width: 0; }
.modal .row { flex-wrap: wrap; }
