/* JCLUB POS — dark, big targets, readable at arm's length in a dark doorway. */
:root {
	--pink: #FF2D8F; --purple: #8B2FE0; --orange: #FF7A45;
	--black: #0A0A0C; --ink: #131316; --ink-2: #1B1B20; --ink-3: #26262D;
	--line: rgba(255,255,255,0.10); --line-2: rgba(255,255,255,0.20);
	--white: #FFFFFF; --grey: #A6A6AE;
	--green: #2BD67B; --amber: #FFB020; --red: #FF4D55;
	--gradient: linear-gradient(135deg, var(--pink) 0%, var(--purple) 55%, var(--orange) 100%);
	--font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--display: "Unbounded", var(--font);
	--safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; touch-action: manipulation; overscroll-behavior: none; }
* { touch-action: manipulation; }
button, .pos-tabs a, .pos-prod, .pos-name, summary { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body { margin: 0; min-height: 100%; background: var(--black); color: var(--white); font: 16px/1.45 var(--font); -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.pos-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pos-muted { color: var(--grey); }
.pos-small { font-size: 13px; }

.pos-logo { font: 700 14px/1 var(--display); letter-spacing: 0.06em; margin: 0 0 18px; }
.pos-logo span { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pos-logo--sm { margin: 0; font-size: 12px; white-space: nowrap; }
.pos-box--wide { text-align: center; }
.pos-h1 { font: 700 24px/1.2 var(--display); margin: 0 0 8px; }

.pos-center { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px calc(24px + var(--safe-b)); }
.pos--door .pos-center { min-height: calc(100dvh - 60px); }
.pos-box { width: 100%; max-width: 420px; }
.pos-box--wide { max-width: 720px; }

.pos-alert { border-radius: 12px; padding: 12px 14px; margin: 12px 0; font-weight: 600; }
.pos-alert--error { background: rgba(255,77,85,0.14); border: 1px solid rgba(255,77,85,0.5); }
.pos-alert--ok { background: rgba(43,214,123,0.12); border: 1px solid rgba(43,214,123,0.45); }
.pos-alert--warn { background: rgba(255,176,32,0.12); border: 1px solid rgba(255,176,32,0.45); }

.pos-form { display: grid; gap: 12px; margin-top: 18px; }
.pos-label { font-weight: 600; font-size: 14px; }
.pos-input { width: 100%; min-height: 52px; background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 0 14px; font-size: 17px; }
.pos-input:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255,45,143,0.25); }
.pos-input--code { font: 700 26px/1 var(--display); letter-spacing: 0.1em; text-align: center; text-transform: uppercase; }

.pos-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--ink-3); font-weight: 700; font-size: 16px; text-decoration: none; }
.pos-btn:disabled { opacity: 0.5; }
.pos-btn:focus-visible { outline: 3px solid rgba(255,45,143,0.6); outline-offset: 2px; }
.pos-btn--primary { background: var(--gradient); border-color: transparent; color: #fff; }
.pos-btn--warn { background: var(--amber); border-color: transparent; color: #1a1200; }
.pos-btn--ghost { background: transparent; }
.pos-btn--block { width: 100%; }
.pos-btn--big { min-height: 64px; font-size: 20px; }
.pos-link { background: none; border: 0; color: var(--grey); text-decoration: underline; padding: 12px; }

/* ---------- pick your name ---------- */
.pos-names { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
@media (min-width: 600px) { .pos-names { grid-template-columns: repeat(auto-fill, 170px); justify-content: center; } }
.pos-name { width: 100%; min-height: 120px; background: var(--ink); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px 10px; text-align: center; }
.pos-name strong { font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; }
.pos-name small { color: var(--grey); font-size: 12px; }
.pos-name:active, .pos-name.is-chosen { border-color: var(--pink); }
.pos-name:disabled { opacity: 0.45; }
.pos-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--gradient); display: inline-flex; align-items: center; justify-content: center; font: 700 18px/1 var(--display); color: #fff; flex: 0 0 auto; }
.pos-avatar--sm { width: 30px; height: 30px; font-size: 13px; }

.pos-sheet { position: fixed; inset: 0; background: rgba(0,0,0,0.72); display: flex; align-items: flex-end; justify-content: center; z-index: 20; }
.pos-sheet-in { width: 100%; max-width: 400px; background: var(--ink); border: 1px solid var(--line-2); border-bottom: 0; border-radius: 22px 22px 0 0; padding: 20px 20px calc(10px + var(--safe-b)); text-align: center; }
@media (min-height: 700px) and (min-width: 600px) { .pos-sheet { align-items: center; } .pos-sheet-in { border-radius: 22px; border-bottom: 1px solid var(--line-2); } }
.pos-sheet-title { font: 700 20px/1.2 var(--display); margin: 0 0 10px; }
.pos-pin-dots { width: 100%; background: transparent; border: 0; text-align: center; font-size: 34px; letter-spacing: 0.4em; height: 50px; margin: 0 0 10px; caret-color: transparent; }
.pos-pin-dots:focus { outline: none; }
.pos-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pos-pad button { height: 64px; border-radius: 16px; border: 1px solid var(--line); background: var(--ink-2); font: 600 24px/1 var(--font); }
.pos-pad button:active { background: var(--ink-3); }
.pos-pad .pos-pad-ok { background: var(--gradient); border-color: transparent; color: #fff; }

/* ---------- top bar ---------- */
.pos-bar { position: sticky; top: 0; z-index: 10; height: calc(60px + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 0 12px 0 16px; background: rgba(10,10,12,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.pos-bar-l { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pos-bar-night { font-size: 13px; color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-count { font: 700 22px/1 var(--display); white-space: nowrap; }
.pos-count span { color: var(--grey); font-size: 15px; }
.pos-count small { font: 600 12px/1 var(--font); color: var(--grey); }
.pos-me { position: relative; }
.pos-me > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; cursor: pointer; }
.pos-me > summary::-webkit-details-marker { display: none; }
.pos-me-name { font-weight: 600; font-size: 14px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-me-menu { position: absolute; right: 0; top: 52px; width: 260px; background: var(--ink); border: 1px solid var(--line-2); border-radius: 14px; padding: 14px; box-shadow: 0 12px 40px rgba(0,0,0,0.5); }
.pos-me-menu p { margin: 0 0 10px; font-size: 13px; }
@media (max-width: 420px) { .pos-me-name { display: none; } }

/* ---------- door ---------- */
.pos-door { max-width: 640px; margin: 0 auto; padding: 14px 16px calc(24px + var(--safe-b)); }
.pos-cam { position: relative; aspect-ratio: 1 / 1; max-height: 58vh; margin: 0 auto 14px; border-radius: 20px; overflow: hidden; background: var(--ink); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.pos-cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.pos-cam.is-on video { opacity: 1; }
.pos-cam-frame { position: absolute; inset: 16%; border-radius: 18px; box-shadow: 0 0 0 9999px rgba(0,0,0,0.35); border: 3px solid rgba(255,255,255,0.85); opacity: 0; pointer-events: none; }
.pos-cam.is-on .pos-cam-frame { opacity: 1; }
.pos-cam-toggle { position: relative; z-index: 2; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(19,19,22,0.85); font-weight: 700; }
.pos-cam.is-on .pos-cam-toggle { position: absolute; bottom: 12px; font-size: 13px; min-height: 38px; }
.pos-cam-msg { position: absolute; left: 16px; right: 16px; bottom: 16px; margin: 0; z-index: 2; text-align: center; color: var(--amber); font-weight: 600; font-size: 14px; }
.pos-cam:not(.is-on) .pos-cam-msg { position: static; }
.pos-cam:not(.is-on) { flex-direction: column; gap: 12px; padding: 16px; }

.pos-manual { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.pos-results { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.pos-results > li.pos-muted { padding: 10px 4px; }
.pos-results button { width: 100%; min-height: 54px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 14px; background: var(--ink); border: 1px solid var(--line); border-radius: 12px; text-align: left; }
.pos-results button span { color: var(--grey); font-weight: 700; }
.pos-results button span.is-in { color: var(--green); }

/* ---------- the result card ---------- */
.pos-card-wrap { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,0.78); display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 600px) { .pos-card-wrap { align-items: center; padding: 20px; } }
.pos-card { width: 100%; max-width: 560px; max-height: 100dvh; overflow: auto; background: var(--ink); border-radius: 24px 24px 0 0; padding-bottom: calc(16px + var(--safe-b)); border-top: 6px solid var(--grey); }
@media (min-width: 600px) { .pos-card { border-radius: 24px; padding-bottom: 16px; } }
.pos-verdict { font: 700 26px/1.15 var(--display); padding: 18px 20px 16px; }
.pos-card--ok { border-top-color: var(--green); }
.pos-card--ok .pos-verdict { background: rgba(43,214,123,0.14); color: var(--green); }
.pos-card--wait { border-top-color: var(--amber); }
.pos-card--wait .pos-verdict { background: rgba(255,176,32,0.14); color: var(--amber); }
.pos-card--stop { border-top-color: var(--red); }
.pos-card--stop .pos-verdict { background: rgba(255,77,85,0.16); color: var(--red); }
.pos-card-msg { margin: 0; padding: 12px 20px 0; font-weight: 600; font-size: 17px; }
.pos-person { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; padding: 16px 20px 6px; align-items: start; }
@media (max-width: 380px) { .pos-person { grid-template-columns: 104px minmax(0, 1fr); } }
.pos-photo { margin: 0; }
.pos-photo img, .pos-photo--none span { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; background: var(--ink-2); display: flex; align-items: center; justify-content: center; }
.pos-photo--none span { font: 700 44px/1 var(--display); color: var(--grey); border: 1px dashed var(--line-2); }
.pos-photo figcaption { font-size: 11px; color: var(--grey); margin-top: 4px; text-align: center; line-height: 1.3; }
.pos-person h2 { font: 700 22px/1.2 var(--display); margin: 2px 0 10px; overflow-wrap: anywhere; }
.pos-band { display: inline-block; margin: 0 0 10px; padding: 6px 10px; border-radius: 8px; font-weight: 700; font-size: 15px; }
.pos-band--adult { background: rgba(43,214,123,0.16); color: var(--green); }
.pos-band--minor { background: rgba(139,47,224,0.25); color: #D9B8FF; }
.pos-band--unknown { background: rgba(255,176,32,0.16); color: var(--amber); }
.pos-units-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--grey); margin: 4px 0 6px; }
.pos-units { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.pos-units li { background: var(--ink-2); border-radius: 8px; padding: 9px 12px; font-size: 17px; font-weight: 700; }
.pos-units li.is-in { color: var(--grey); }
.pos-units small { font-weight: 400; }
.pos-card-actions { display: grid; gap: 8px; padding: 12px 20px 0; }

/* ---------- mode tabs (managers) ---------- */
.pos-bar:has(.pos-tabs) { grid-template-columns: minmax(0, 1fr) auto auto auto; }
.pos-tabs { display: flex; background: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.pos-tabs a { padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--grey); text-decoration: none; white-space: nowrap; }
.pos-tabs a[aria-current] { background: var(--ink-3); color: var(--white); }
@media (max-width: 480px) { .pos-tabs a { padding: 8px 10px; font-size: 13px; } .pos-bar:has(.pos-tabs) .pos-count { display: none; } }

/* ---------- cassa ---------- */
.pos-cassa { display: grid; gap: 16px; padding: 14px 16px 0; max-width: 1200px; margin: 0 auto; }
.pos-cassa > .pos-alert { margin: 0; }
@media (min-width: 820px) {
	.pos-cassa { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; padding-bottom: 24px; }
	.pos-cassa > .pos-alert { grid-column: 1 / -1; }
	.pos-basket { position: sticky; top: 74px; }
}
.pos-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-content: start; }
@media (max-width: 420px) { .pos-products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pos-products-none { grid-column: 1 / -1; padding: 24px 4px; }
.pos-prod { position: relative; min-height: 112px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 6px; padding: 14px; background: var(--ink); border: 1px solid var(--line); border-radius: 16px; text-align: left; }
.pos-prod strong { font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; }
.pos-prod-price { font: 700 20px/1 var(--display); }
.pos-prod small { color: var(--grey); font-size: 12px; }
.pos-prod:active { background: var(--ink-2); border-color: var(--pink); }
.pos-prod:disabled { opacity: 0.45; }
.pos-prod.is-bump { animation: pos-bump 0.18s ease-out; }
@keyframes pos-bump { 50% { transform: scale(0.96); } }
.pos-prod-qty { position: absolute; top: 10px; right: 10px; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; background: var(--gradient); color: #fff; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }

.pos-basket { display: grid; gap: 12px; }
.pos-basket-in { background: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 14px 14px 10px; }
.pos-basket-head { display: flex; justify-content: space-between; align-items: center; }
.pos-basket-head h2 { font: 700 16px/1 var(--display); margin: 0; }
.pos-basket-head .pos-link { padding: 6px 0; }
.pos-lines { list-style: none; margin: 8px 0 0; padding: 0; }
.pos-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto 78px; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.pos-lines li:first-child { border-top: 0; }
.pos-line-name { font-weight: 600; overflow-wrap: anywhere; }
.pos-line-sum { text-align: right; font-weight: 700; }
.pos-step { display: inline-flex; align-items: center; gap: 4px; }
.pos-step button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--ink-2); font-size: 20px; font-weight: 700; }
.pos-step b { min-width: 22px; text-align: center; }

.pos-pay { position: sticky; bottom: 0; z-index: 5; background: rgba(10,10,12,0.96); backdrop-filter: blur(10px); padding: 10px 0 calc(12px + var(--safe-b)); border-top: 1px solid var(--line); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
@media (min-width: 820px) { .pos-pay { position: static; margin: 0; padding: 0; border: 0; background: none; } }
.pos-pay-total { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.pos-pay-total span { color: var(--grey); font-weight: 600; }
.pos-pay-total strong { font: 700 28px/1 var(--display); margin-left: auto; }
.pos-pay-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.pos-shift { display: grid; gap: 10px; }
.pos-shift-box { background: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.pos-shift-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--grey); margin: 0 0 8px; }
.pos-shift-box dl { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pos-shift-box dt { font-size: 12px; color: var(--grey); }
.pos-shift-box dd { margin: 2px 0 0; font-weight: 700; }
.pos-shift-box p { margin: 6px 0 0; }
.pos-recent { padding-bottom: calc(16px + var(--safe-b)); }
.pos-sales { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pos-sales li { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.pos-sales li p { margin: 2px 0 0; }
.pos-sales li.is-void strong { text-decoration: line-through; color: var(--grey); }
.pos-sales .pos-link { padding: 8px 0; color: var(--red); white-space: nowrap; }
.pos-pill-void { font-size: 12px; font-weight: 700; color: var(--red); white-space: nowrap; }

/* pay sheets */
.pos-card--plain { border-top-color: var(--pink); }
.pos-sheet-big { font: 700 40px/1 var(--display); margin: 0; padding: 14px 20px 4px; }
.pos-cashbtns { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; padding: 12px 20px; }
.pos-card .pos-label { display: block; padding: 0 20px 6px; }
.pos-card .pos-input--money { width: calc(100% - 40px); margin: 0 20px; font: 700 22px/1 var(--display); }
.pos-change { min-height: 28px; margin: 10px 20px 0; font: 700 22px/1.2 var(--display); color: var(--green); }
.pos-sheet-give { font: 700 30px/1.15 var(--display); margin: 0; padding: 16px 20px 4px; }
.pos-sheet-change { font: 700 24px/1.2 var(--display); margin: 0; padding: 6px 20px 0; color: var(--amber); }
.pos-card .pos-units { padding: 10px 20px 0; }
.pos-card > .pos-muted { padding: 6px 20px 0; margin: 0; }
.pos-card .pos-err { margin: 12px 20px 0; }

/* ---------- manager ---------- */
.pos-mgr { max-width: 980px; margin: 0 auto; padding: 14px 16px calc(32px + var(--safe-b)); }
.pos-mgr-head { margin-bottom: 14px; }
.pos-select { color: var(--white); appearance: none; -webkit-appearance: none; background: var(--ink-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23A6A6AE' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 16px center; padding-right: 40px; font-weight: 600; }
.pos-mgr-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.pos-tile { background: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.pos-tile p { margin: 0; }
.pos-tile-big { font: 700 28px/1.15 var(--display); margin: 4px 0 8px !important; }
.pos-tile .pos-band { font-size: 13px; padding: 4px 8px; margin: 0 4px 4px 0; }
.pos-mgr-sec { margin-top: 22px; }
.pos-mgr-sec h2 { font: 700 18px/1.2 var(--display); margin: 0 0 6px; }
.pos-mgr-sec > .pos-muted { margin: 0 0 10px; }
.pos-count-row { background: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin: 0 0 10px; }
.pos-count-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.pos-count-top h3 { margin: 0; font-size: 17px; }
.pos-count-top p { margin: 0; }
.pos-count-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; margin-top: 10px; }
.pos-count-fields label span { display: block; font-size: 13px; font-weight: 600; color: var(--grey); margin-bottom: 4px; }
.pos-count-fields .pos-input { font-weight: 700; font-size: 18px; }
.pos-count-diff { min-height: 22px; margin: 10px 0 0; font-weight: 700; }
.pos-count-diff.is-ok { color: var(--green); }
.pos-count-diff.is-more, .pos-count-diff.is-less { color: var(--amber); }
.pos-count-row > .pos-small { margin: 4px 0 0; }
.pos-mgr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pos-mgr-list li { display: flex; justify-content: space-between; gap: 12px; background: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
@media (max-width: 560px) { .pos-tabs a { padding: 8px 8px; font-size: 12px; } .pos-bar:has(.pos-tabs) .pos-logo--sm { display: none; } }
