/* OA Commerce app — black and silver, Jost. */
@font-face { font-family: Jost; src: url(fonts/jost-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Jost; src: url(fonts/jost-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Jost; src: url(fonts/jost-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
:root {
	--bg: #0b0b0c; --bg2: #121315; --card: #17181b; --card2: #1d1f23; --line: #2a2c31; --line2: #383b41;
	--text: #f1f2f4; --muted: #9ea2a8; --dim: #6f737a;
	--silver: linear-gradient(180deg, #c4c6c9 0%, #dfe1e4 30%, #f1f2f4 48%, #e3e5e8 56%, #c9cbcf 78%, #a8abb0 100%);
	--btn: linear-gradient(180deg, #f3f4f6, #c9cbcf 55%, #a8abb0);
	--ok: #4cc38a; --warn: #e6b450; --bad: #ff6b6b; --info: #7aa7ff;
	--r: 18px; --r-sm: 12px;
	--safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
	--ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); color: var(--text); font-family: Jost, system-ui, sans-serif; font-size: 16px; -webkit-font-smoothing: antialiased; min-height: 100%; }
body { overscroll-behavior-y: contain; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.silver { background: var(--silver); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* splash */
.splash { flex: 1; display: grid; place-items: center; align-content: center; gap: 30px; }
.splash-mark { width: 150px; animation: rise .8s var(--ease) both; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: #e3e5e8; animation: spin .8s linear infinite; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; padding: calc(var(--safe-t) + 12px) 18px 12px; background: rgba(11, 11, 12, .86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid rgba(255, 255, 255, .05); display: flex; align-items: center; gap: 12px; }
.top .back { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--card); margin-left: -4px; }
.top h1 { font-size: 20px; font-weight: 500; letter-spacing: .02em; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .biz { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.top .biz img { width: 38px; height: 38px; border-radius: 10px; object-fit: contain; background: #fff; padding: 3px; }
.top .biz .mark { width: 38px; height: 38px; border-radius: 10px; background: #000 url(mark.svg) center / 78% no-repeat; border: 1px solid var(--line); }
.top .biz b { display: block; font-weight: 500; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .biz small { display: block; color: var(--muted); font-size: 13px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--card); position: relative; }
.icon-btn .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--card); }
svg.i { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* content */
.view { flex: 1; padding: 16px 16px calc(96px + var(--safe-b)); animation: fade .35s var(--ease) both; }
.view.no-tabs { padding-bottom: calc(30px + var(--safe-b)); }
.h2 { font-size: 13px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin: 22px 4px 10px; display: flex; justify-content: space-between; align-items: center; }
.h2 a { letter-spacing: .04em; text-transform: none; font-size: 15px; color: #dfe1e4; }
.greet { margin: 6px 4px 16px; }
.greet h2 { font-size: 30px; font-weight: 500; line-height: 1.15; }
.greet p { color: var(--muted); margin-top: 4px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card + .card { margin-top: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: linear-gradient(180deg, var(--card2), var(--card)); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; position: relative; overflow: hidden; display: block; animation: rise .45s var(--ease) both; }
.stat::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent); }
.stat small { color: var(--muted); font-size: 14px; display: block; }
.stat b { display: block; font-size: clamp(20px, 6.6vw, 30px); font-weight: 500; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat span { color: var(--muted); font-size: 13px; }
.stat.wide { grid-column: 1 / -1; }
.stat.hero { padding: 20px; }
.stat.hero b { font-size: clamp(32px, 10vw, 40px); }
.stat .pulse { position: absolute; right: 16px; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); animation: ping 2s infinite; }
.seg { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; padding: 9px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: 15px; transition: all .2s var(--ease); }
.seg button.on { background: var(--btn); color: #0b0b0c; border-color: transparent; font-weight: 500; }
.seg button em { font-style: normal; opacity: .7; margin-left: 4px; }

/* order list */
.olist { display: flex; flex-direction: column; gap: 10px; }
.orow { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; animation: rise .4s var(--ease) both; transition: transform .15s var(--ease), border-color .2s; }
.orow:active { transform: scale(.985); border-color: var(--line2); }
.orow .no { font-size: 18px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.orow .who { color: #dfe1e4; grid-column: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orow .meta { color: var(--muted); font-size: 14px; grid-column: 1 / -1; }
.orow .amt { text-align: right; font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 500; letter-spacing: .02em; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-new { background: rgba(255, 107, 107, .13); color: var(--bad); }
.st-preparing { background: rgba(230, 180, 80, .14); color: var(--warn); }
.st-ready { background: rgba(122, 167, 255, .14); color: var(--info); }
.st-sent, .st-done { background: rgba(76, 195, 138, .14); color: var(--ok); }
.st-unpaid, .st-closed { background: rgba(158, 162, 168, .14); color: var(--muted); }
.b2b { font-size: 11px; font-weight: 600; letter-spacing: .14em; padding: 3px 8px; border-radius: 6px; background: var(--btn); color: #0b0b0c; }
.empty { text-align: center; color: var(--muted); padding: 50px 20px; }
.empty .ic { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); }

/* order detail */
.ohead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 4px 14px; }
.ohead h2 { font-size: 30px; font-weight: 500; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { text-align: right; }
.addr { line-height: 1.5; font-size: 16px; }
.contact-btns { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.chip-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); font-size: 15px; }
.items { display: flex; flex-direction: column; }
.item { display: grid; grid-template-columns: auto 52px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item .tick { width: 34px; height: 34px; border-radius: 10px; border: 2px solid var(--line2); display: grid; place-items: center; transition: all .25s var(--spring); }
.item .tick svg { width: 20px; height: 20px; stroke: #0b0b0c; stroke-width: 3; fill: none; opacity: 0; transform: scale(.4); transition: all .25s var(--spring); }
.item.ok .tick { background: var(--ok); border-color: var(--ok); }
.item.ok .tick svg { opacity: 1; transform: none; }
.item.locked .tick { opacity: .5; }
.item .thumb { width: 52px; height: 52px; border-radius: 10px; background: #fff center / cover no-repeat; border: 1px solid var(--line); }
.item .nm { font-size: 15px; line-height: 1.3; }
.item .nm code { display: block; color: var(--muted); font-family: ui-monospace, Menlo, monospace; font-size: 13px; margin-top: 2px; }
.item .nm em { font-style: normal; color: var(--warn); font-size: 13px; display: block; }
.item .q { font-size: 24px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.item .q small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.no-tick .item { grid-template-columns: 52px 1fr auto; }
.totals { margin-top: 10px; }
.totals .grand dd, .totals .grand dt { font-size: 19px; font-weight: 500; color: var(--text); padding-top: 6px; border-top: 1px solid var(--line); }
.progress { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 6px 0 2px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--ok), #7be0ad); border-radius: inherit; transition: width .5s var(--ease); }
.log li { list-style: none; color: var(--muted); font-size: 14px; padding: 6px 0; border-top: 1px solid var(--line); }
.log li:first-child { border-top: 0; }
.log b { color: var(--text); font-weight: 500; }
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 12px 16px calc(12px + var(--safe-b)); background: linear-gradient(180deg, rgba(11, 11, 12, 0), rgba(11, 11, 12, .92) 30%); display: flex; gap: 10px; }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 22px; border-radius: 16px; font-size: 17px; font-weight: 500; letter-spacing: .02em; background: var(--btn); color: #0b0b0c; box-shadow: 0 10px 30px -12px rgba(255, 255, 255, .25); transition: transform .12s var(--ease), opacity .2s; width: 100%; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; }
.btn.ghost { background: var(--card); color: var(--text); border: 1px solid var(--line2); box-shadow: none; }
.btn.danger { background: rgba(255, 107, 107, .12); color: var(--bad); border: 1px solid rgba(255, 107, 107, .3); box-shadow: none; }
.btn.small { min-height: 44px; font-size: 15px; padding: 0 16px; border-radius: 12px; width: auto; }
.btn.busy { pointer-events: none; opacity: .8; }
.btn.busy::after { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.field { display: block; margin: 14px 0; }
.field span { display: block; color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.input { width: 100%; min-height: 54px; padding: 0 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line2); font-size: 18px; outline: none; transition: border-color .2s, box-shadow .2s; }
.input:focus { border-color: #c9cbcf; box-shadow: 0 0 0 4px rgba(225, 228, 233, .12); }
.input.code { text-align: center; letter-spacing: .22em; font-size: 22px; text-transform: uppercase; font-family: ui-monospace, Menlo, monospace; }
.roles { display: flex; flex-direction: column; gap: 10px; }
.role { display: block; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line2); background: var(--card); transition: border-color .2s, background .2s; }
.role input { display: none; }
.role b { font-weight: 500; font-size: 17px; }
.role p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.role:has(input:checked) { border-color: #dfe1e4; background: var(--card2); box-shadow: 0 0 0 1px #dfe1e4 inset; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.switch:first-child { border-top: 0; }
.switch span { font-size: 15px; }
.switch input { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 999px; background: var(--line2); position: relative; transition: background .25s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .3s var(--spring); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(20px); }
.switch input:disabled { opacity: .45; }

/* connect / lock */
.center { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--safe-t) + 30px) 24px calc(var(--safe-b) + 30px); max-width: 480px; width: 100%; margin: 0 auto; animation: fade .4s var(--ease) both; }
.brand { text-align: center; margin-bottom: 28px; }
.brand img { width: 120px; margin: 0 auto 14px; display: block; filter: drop-shadow(0 10px 30px rgba(255, 255, 255, .08)); animation: rise .7s var(--ease) both; }
.brand h1 { font-size: 30px; font-weight: 500; letter-spacing: .02em; }
.brand p { color: var(--muted); margin-top: 6px; line-height: 1.45; }
.brand .kicker { font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--dim); margin: 18px 0; font-size: 14px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.note { color: var(--muted); font-size: 14px; line-height: 1.45; text-align: center; margin-top: 16px; }
.steps { counter-reset: s; display: flex; flex-direction: column; gap: 12px; }
.steps li { list-style: none; counter-increment: s; display: flex; gap: 12px; align-items: flex-start; line-height: 1.4; }
.steps li::before { content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--btn); color: #0b0b0c; display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.share-ic { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; }
.wait-ring { width: 110px; height: 110px; border-radius: 50%; margin: 10px auto 24px; border: 2px solid var(--line); position: relative; display: grid; place-items: center; }
.wait-ring::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid transparent; border-top-color: #e3e5e8; animation: spin 1.2s linear infinite; }
.wait-ring img { width: 64px; }
.pin-dots { display: flex; justify-content: center; gap: 18px; margin: 26px 0 10px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line2); transition: all .2s var(--spring); }
.pin-dots i.on { background: #e3e5e8; border-color: #e3e5e8; transform: scale(1.1); }
.pin-dots.shake { animation: shake .4s; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 300px; margin: 24px auto 0; }
.pad button { height: 70px; border-radius: 50%; width: 70px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); font-size: 26px; font-weight: 500; transition: background .15s, transform .1s; }
.pad button:active { background: var(--card2); transform: scale(.94); }
.pad button.txt { font-size: 14px; background: none; border: 0; color: var(--muted); }
.qr-box { background: #fff; border-radius: 22px; padding: 18px; width: 260px; height: 260px; margin: 8px auto 16px; box-shadow: 0 20px 50px -20px rgba(255, 255, 255, .3); }
.qr-box svg { width: 100%; height: 100%; display: block; }
.code-big { text-align: center; font-family: ui-monospace, Menlo, monospace; font-size: 26px; letter-spacing: .14em; }
.timer { text-align: center; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }

/* camera */
.cam { position: fixed; inset: 0; z-index: 60; background: #000; display: flex; flex-direction: column; animation: fade .25s; }
.cam video { flex: 1; width: 100%; object-fit: cover; }
.cam .frame { position: absolute; left: 50%; top: 45%; width: 70vw; max-width: 300px; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 24px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .55); border: 3px solid rgba(255, 255, 255, .9); }
.cam .frame::after { content: ""; position: absolute; left: 8%; right: 8%; height: 2px; top: 10%; background: linear-gradient(90deg, transparent, #fff, transparent); animation: scan 2s ease-in-out infinite; }
.cam .bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 20px calc(var(--safe-b) + 20px); text-align: center; color: #fff; }
.cam .bar p { margin-bottom: 14px; }

/* tabs */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; padding: 8px 6px calc(8px + var(--safe-b)); background: rgba(16, 17, 19, .92); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); border-top: 1px solid rgba(255, 255, 255, .06); }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; color: var(--dim); font-size: 12px; letter-spacing: .04em; position: relative; transition: color .2s; }
.tabs a.on { color: var(--text); }
.tabs a.on svg { stroke: #e3e5e8; }
.tabs a .n { position: absolute; top: 0; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; }

/* sheet (bottom panel) */
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .55); animation: fade .2s; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; background: var(--bg2); border-radius: 24px 24px 0 0; border-top: 1px solid var(--line2); padding: 10px 18px calc(22px + var(--safe-b)); max-height: 88vh; overflow-y: auto; animation: up .35s var(--ease) both; }
.sheet::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line2); margin: 0 auto 14px; }
.sheet h3 { font-size: 22px; font-weight: 500; margin-bottom: 6px; }
.sheet p.sub { color: var(--muted); margin-bottom: 14px; }

/* toast & banners */
.toast { position: fixed; left: 50%; bottom: calc(100px + var(--safe-b)); transform: translateX(-50%) translateY(20px); z-index: 80; background: #f1f2f4; color: #0b0b0c; padding: 12px 18px; border-radius: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: all .35s var(--spring); max-width: 90vw; text-align: center; box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .6); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #ffdede; color: #6b0f0f; }
.banner { margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; background: rgba(230, 180, 80, .12); border: 1px solid rgba(230, 180, 80, .3); color: #f3d79b; font-size: 14px; line-height: 1.4; }
.banner.info { background: rgba(122, 167, 255, .1); border-color: rgba(122, 167, 255, .3); color: #c6d8ff; }
.skeleton { height: 76px; border-radius: var(--r); background: linear-gradient(90deg, var(--card) 0%, var(--card2) 50%, var(--card) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; margin-bottom: 10px; }
.person { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 14px; background: var(--btn); color: #0b0b0c; display: grid; place-items: center; font-weight: 600; font-size: 18px; flex: none; }
.person .txt { flex: 1; min-width: 0; }
.person .txt b { font-weight: 500; display: block; }
.person .txt small { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photos { display: flex; gap: 8px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(76, 195, 138, .5); } 80%, 100% { box-shadow: 0 0 0 12px rgba(76, 195, 138, 0); } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes scan { 0%, 100% { top: 10%; } 50% { top: 88%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }
@media (min-width: 700px) { .view, .top { max-width: 720px; margin-left: auto; margin-right: auto; width: 100%; } }

/* Google Play app: "Try the demo" in the top corner of the first screen */
.demo-chip { position: absolute; top: calc(var(--safe-t) + 14px); right: 16px; z-index: 5; background: rgba(255, 255, 255, .06); border: 1px solid var(--line2); color: var(--text); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.demo-chip:active { transform: scale(.97); }
