/* ============================================================================
   astrogaming.space — tema sama dengan Astro POS (hitam, datar, modern).
   Mobile-first: header ringkas + tab bar bawah. ≥ 1000px: rail kiri seperti POS.
   Angka & judul: Chakra Petch. Teks: Barlow.
   ========================================================================== */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url("fonts/barlow-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 500; font-display: swap; src: url("fonts/chakra-petch-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 600; font-display: swap; src: url("fonts/chakra-petch-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 700; font-display: swap; src: url("fonts/chakra-petch-latin-700-normal.woff2") format("woff2"); }

:root {
  --bg: #000000; --bg-2: #0e0e11; --bg-3: #17171c; --bg-4: #1f1f26; --bg-input: #09090b;
  --line: #222228; --line-2: #33333c;
  --text: #f2f3f7; --muted: #8d919e;
  --cyan: #33d6ff; --cyan-2: #14b8e6; --cyan-ink: #04141c;
  --violet: #a47cff; --violet-2: #7c55e6; --green: #3ee0a5; --amber: #ffc85c; --red: #ff6e8e;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Chakra Petch", "Barlow", system-ui, sans-serif;
  --r-sm: 10px; --r: 14px; --r-lg: 20px; --rail: 240px;
  --shadow: 0 1px 0 #ffffff06 inset, 0 10px 30px #00000080;
  --pad: 16px; --tab-h: 64px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); min-height: 100vh; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: .01em; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0; }
a { color: var(--cyan); text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .86em; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .86rem; margin: 0; }
.center { text-align: center; }
.danger-text { color: var(--red) !important; }
.ok-text { color: var(--green) !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--cyan); color: var(--cyan-ink); padding: 8px 12px; border-radius: var(--r-sm); z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
svg.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.is-open .dot, .is-open .rail-status-dot { background: var(--green); box-shadow: 0 0 0 3px #3ee0a522; }
.is-closed .dot, .is-closed .rail-status-dot { background: var(--red); box-shadow: 0 0 0 3px #ff6e8e22; }
.eyebrow { display: block; font: 600 .78rem var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }
.eyebrow.small { font-size: .74rem; letter-spacing: .06em; color: var(--muted); }

/* ---------------- Tombol & input (sama dengan POS) ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 16px; border-radius: var(--r-sm); border: 1px solid transparent; font-weight: 700; text-decoration: none; line-height: 1.2; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s, opacity .15s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn.is-busy { opacity: .75; cursor: progress; }
.btn.primary { background: var(--cyan); color: var(--cyan-ink); }
.btn.primary:hover { background: #5ee0ff; }
.btn.ghost { background: var(--bg-2); border-color: var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--line-2); background: var(--bg-3); }
.btn.violet { background: var(--violet); color: #fff; }
.btn.danger-soft { background: #ff6e8e14; color: var(--red); border-color: #ff6e8e33; }
.btn.sm { min-height: 36px; padding: 7px 12px; font-size: .88rem; }
.btn.lg { min-height: 52px; padding: 14px 20px; font-size: 1.05rem; }
.btn.full { width: 100%; }
.btn .ic { width: 18px; height: 18px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea { width: 100%; background: var(--bg-input); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 12px; color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s; font-weight: 500; font-size: 16px; }
input:focus, select:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px #33d6ff1f; }
input::placeholder, textarea::placeholder { color: #5b5f6b; }
input[type="number"] { font-family: var(--display); }
label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
.form { display: grid; gap: 14px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: 0 -2px; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); font-weight: 600; font-size: .86rem; text-decoration: none; transition: .15s; }
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.is-on { color: var(--cyan-ink); background: var(--cyan); border-color: var(--cyan); }
.pill, .badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; vertical-align: middle; background: var(--bg-3); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.pill.paid, .pill.open, .pill.ok { background: #3ee0a51a; color: var(--green); border-color: #3ee0a540; }
.pill.pending { background: #a47cff1f; color: var(--violet); border-color: #a47cff4d; }
.pill.closed { background: #ffc85c1a; color: var(--amber); border-color: #ffc85c40; }
.pill.finished { background: #33d6ff1a; color: var(--cyan); border-color: #33d6ff40; }
.pill.cancelled, .pill.refunded { background: #ff6e8e1a; color: var(--red); border-color: #ff6e8e40; }
.count { display: inline-block; min-width: 24px; padding: 0 7px; border-radius: 12px; background: var(--bg-3); border: 1px solid var(--line-2); color: var(--cyan); font: 600 .78rem/22px var(--display); text-align: center; vertical-align: middle; }
.flash { padding: 12px 14px; border-radius: var(--r-sm); background: var(--bg-3); border: 1px solid var(--line-2); border-left: 4px solid var(--green); font-weight: 500; margin-bottom: 14px; }
.flash.err { border-left-color: var(--red); }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); background: var(--bg-2); border: 1px dashed var(--line-2); border-radius: var(--r); }
.avatar { position: relative; overflow: hidden; width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--bg-3); color: var(--cyan); font: 700 1rem var(--display); border: 1px solid var(--line-2); text-decoration: none; }
.avatar.sm { width: 34px; height: 34px; font-size: .9rem; }

/* ---------------- Kerangka: header HP, tab bar, rail, work ---------------- */
.rail { display: none; }
.mhead { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 var(--pad); background: #000000e6; backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.mhead-logo { margin-right: auto; }
.mhead-logo img { height: 26px; width: auto; }
.mhead-status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); font: 600 .8rem var(--display); color: var(--muted); }
.mhead-status b { color: var(--text); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #000000f2; backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.tabbar a { display: grid; justify-items: center; align-content: center; gap: 4px; color: var(--muted); font: 600 .68rem var(--font); letter-spacing: .01em; text-decoration: none; }
.tabbar a .ic { width: 22px; height: 22px; }
.tabbar a.is-active { color: var(--cyan); }
.tabbar a.is-active span { color: var(--text); }
.work { padding: 14px var(--pad) calc(var(--tab-h) + 28px); max-width: 1400px; margin: 0 auto; }
.topbar { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.topbar-title { min-width: 0; }
.topbar-title small { display: block; color: var(--muted); font-size: .8rem; }
.topbar-title h1 { margin-top: 2px; }
.topbar-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .86rem; font-weight: 600; margin-bottom: 6px; }
.back .ic { width: 16px; height: 16px; }
.back:hover { color: var(--text); }
.foot { display: none; flex-wrap: wrap; gap: 6px 16px; margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }

/* ---------------- Panel / kartu / seksi ---------------- */
.panel, .card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; }
.card-head, .panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2, .panel-head h2 { margin-right: auto; }
.section { margin-top: 22px; }
.section-head { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 12px; }
.section-head div { min-width: 0; }
.section-head h2 { margin-top: 2px; }
.section-head p { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.section-head .more { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 2px; font-weight: 600; font-size: .88rem; }
.section-head .more .ic { width: 16px; height: 16px; }
.grid { display: grid; gap: 12px; }
.stack { display: grid; gap: 14px; }

/* Hero beranda */
.hero { position: relative; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--bg-2); min-height: 300px; display: grid; align-content: end; padding: 18px; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .9; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #00000033 0%, #000000a6 55%, #000000f2 100%); }
.hero h1 { font-size: 1.6rem; line-height: 1.12; max-width: 640px; }
.hero p { color: #d4d7e0; margin-top: 8px; max-width: 560px; }
.hero .eyebrow { margin-bottom: 8px; }
.cta-row { display: grid; gap: 8px; margin-top: 16px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; color: var(--muted); font-size: .86rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta .ic { width: 16px; height: 16px; }

/* Metrik (seperti dashboard POS) */
.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.metric { padding: 14px; min-width: 0; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--text); }
.metric small { display: block; color: var(--muted); font-size: .78rem; font-weight: 600; letter-spacing: .02em; }
.metric b { display: block; font: 600 1.5rem/1.1 var(--display); margin: 4px 0 2px; }
.metric b em { font-style: normal; font-size: .9rem; color: var(--muted); }
.metric > span { display: block; color: var(--muted); font-size: .8rem; }
.metric.is-live b { color: var(--green); }
.metric.is-full b { color: var(--red); }

/* Live room per tipe */
.live-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.live-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg-3); border: 1px solid var(--line); }
.live-list b { font: 600 .95rem var(--display); color: var(--muted); }
.live-list b em { font-style: normal; color: var(--green); font-size: 1.1rem; }
.live-list li.is-full b em { color: var(--red); }

/* Tile tautan cepat */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; padding: 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); color: var(--text); transition: border-color .15s, background .15s; }
.tile:hover { border-color: var(--line-2); background: var(--bg-3); }
.tile .ic { grid-row: 1 / span 2; width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--bg-3); color: var(--cyan); border: 1px solid var(--line); }
.tile b { font-family: var(--display); font-weight: 600; }
.tile span { color: var(--muted); font-size: .82rem; }

/* Room & harga */
.tiers { display: grid; gap: 12px; }
.tier { display: grid; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tier-media { position: relative; aspect-ratio: 16 / 8; background: var(--bg-3); }
.tier-media img { width: 100%; height: 100%; object-fit: cover; }
.tier-media .tag { position: absolute; left: 10px; top: 10px; padding: 4px 9px; border-radius: 999px; background: #000000b3; border: 1px solid var(--line-2); font: 600 .74rem var(--display); }
.tier-body { padding: 14px; display: grid; gap: 10px; }
.tier-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tier-title b { font: 600 1.15rem var(--display); color: var(--cyan); white-space: nowrap; }
.tier-title b em { font-style: normal; font-size: .8rem; color: var(--muted); }
.tier ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; color: var(--muted); font-size: .9rem; }
.tier ul li { padding-left: 14px; position: relative; }
.tier ul li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--violet); }
.pkg summary { cursor: pointer; color: var(--cyan); font-weight: 600; font-size: .9rem; list-style: none; }
.pkg summary::-webkit-details-marker { display: none; }
.pkg summary::after { content: " ▸"; }
.pkg[open] summary::after { content: " ▾"; }
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin-top: 8px; }
.pkg-grid span { display: grid; gap: 2px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--bg-3); border: 1px solid var(--line); font: 600 .9rem var(--display); }
.pkg-grid span b { color: var(--muted); font-size: .74rem; font-weight: 600; }

/* Fasilitas */
.features { display: grid; gap: 10px; }
.feature { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); }
.feature .ic { grid-row: 1 / span 2; width: 38px; height: 38px; padding: 8px; border-radius: 10px; background: var(--bg-3); color: var(--cyan); border: 1px solid var(--line); }
.feature h3 { font-size: 1rem; }
.feature p { color: var(--muted); font-size: .9rem; }
.steps { counter-reset: s; display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: s; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: start; padding: 12px 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); }
.steps li::before { content: counter(s); grid-row: 1 / span 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--cyan); color: var(--cyan-ink); font: 700 .9rem var(--display); }
.steps b { font-family: var(--display); font-weight: 600; }
.steps span { color: var(--muted); font-size: .9rem; }

/* Menu café */
.menus { display: grid; gap: 8px; }
.menu-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); text-align: left; color: var(--text); width: 100%; cursor: pointer; transition: border-color .15s, background .15s; }
button.menu-item:hover { border-color: var(--line-2); background: var(--bg-3); }
.menu-item.is-out { opacity: .6; }
.out-badge { position: absolute; left: 4px; bottom: 4px; padding: 1px 6px; border-radius: 999px; background: #ff6e8ee0; color: #fff; font: 700 .64rem var(--display); }
.qty-badge { display: inline-block; margin-top: 4px; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--cyan); color: var(--cyan-ink); font: 700 .72rem/20px var(--display); text-align: center; }
.menu-img { position: relative; width: 64px; height: 64px; border-radius: var(--r-sm); overflow: hidden; background: var(--bg-3); display: grid; place-items: center; color: var(--muted); }
.menu-img img { width: 100%; height: 100%; object-fit: cover; }
.menu-img .ic { width: 26px; height: 26px; }
.menu-body { min-width: 0; display: grid; gap: 2px; }
.menu-body b { font-family: var(--display); font-weight: 600; }
.menu-body small { color: var(--muted); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-body .promo { display: inline-block; width: fit-content; margin-top: 2px; padding: 1px 8px; border-radius: 999px; background: #a47cff1f; color: var(--violet); border: 1px solid #a47cff4d; font-size: .72rem; font-weight: 700; }
.price { font: 600 1rem var(--display); color: var(--text); text-align: right; white-space: nowrap; display: grid; justify-items: end; }
.price s { display: block; color: var(--muted); font-size: .78rem; font-weight: 500; }
.price em { display: block; font: 600 .72rem var(--font); color: var(--violet); }
.menu-cat { margin-top: 18px; }
.menu-cat h2 { margin-bottom: 8px; }

/* Game */
.games { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.game { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; min-width: 0; }
.game-poster { position: relative; aspect-ratio: 3 / 4; background: var(--bg-3); display: grid; place-items: center; color: var(--muted); }
.game-poster img { width: 100%; height: 100%; object-fit: cover; }
.game-poster .ic { width: 34px; height: 34px; }
.game-poster .tag { position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 999px; background: #000000b3; border: 1px solid var(--line-2); font: 600 .7rem var(--display); }
.game-poster .tag.right { left: auto; right: 8px; }
.game-body { padding: 10px 12px; display: grid; gap: 2px; }
.game-body b { font-family: var(--display); font-weight: 600; font-size: .95rem; line-height: 1.2; }
.game-body small { color: var(--muted); font-size: .78rem; }

/* Lokasi */
.map { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); aspect-ratio: 16 / 10; }
.map iframe, .map svg.ph { width: 100%; height: 100%; border: 0; display: block; }
.map .map-btn { position: absolute; left: 12px; bottom: 12px; }
.info-card { display: grid; gap: 10px; }
.info-card > div { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 12px 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); }
.info-card .ic { width: 20px; height: 20px; color: var(--cyan); margin-top: 2px; }
.info-card b { display: block; font-family: var(--display); font-weight: 600; font-size: .9rem; }
.info-card span { color: var(--muted); font-size: .9rem; }

/* ---------------- Member: masuk (gaya e-wallet) ---------------- */
body.bare { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.bare-wrap { flex: 1; width: 100%; max-width: 440px; margin: 0 auto; padding: 14px var(--pad) 40px; display: flex; flex-direction: column; }
.bare-back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: .9rem; width: fit-content; min-height: 40px; }
.bare-back:hover { color: var(--text); }
.auth { display: grid; gap: 14px; margin-top: 8vh; }
.auth-logo { height: 34px; width: auto; margin: 0 auto 10px; }
.auth h1 { font-size: 1.5rem; text-align: center; }
.auth > .muted { text-align: center; font-size: .95rem; }
.phone-field { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-input); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.phone-field:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px #33d6ff1f; }
.phone-field .prefix { display: flex; align-items: center; padding: 0 12px; border-right: 1px solid var(--line); color: var(--muted); font: 600 1.05rem var(--display); background: var(--bg-2); }
.phone-field input { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; font: 600 1.25rem var(--display); letter-spacing: .04em; padding: 14px 12px; }
.otp-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp-boxes input { text-align: center; font: 600 1.6rem var(--display); padding: 12px 0; height: 60px; caret-color: var(--cyan); }
.otp-boxes input.is-filled { border-color: var(--line-2); background: var(--bg-2); }
.resend { margin-top: 2px; display: grid; gap: 6px; }
.resend.is-in { animation: fadeup .35s ease-out; }
.otp-wait { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r); background: var(--bg-2); border: 1px solid #33d6ff33; }
.otp-wait > div { display: grid; gap: 3px; min-width: 0; }
.otp-wait b { font-family: var(--display); font-weight: 600; font-size: .95rem; }
.otp-wait span { color: var(--muted); font-size: .82rem; }
.otp-wait-ic { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #3ee0a51a; color: var(--green); border: 1px solid #3ee0a540; }
.otp-wait-ic::before, .otp-wait-ic::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--green); opacity: 0; animation: ping 1.6s ease-out infinite; }
.otp-wait-ic::after { animation-delay: .8s; }
.otp-bar { display: block; height: 4px; border-radius: 2px; background: var(--bg-4); overflow: hidden; margin-top: 4px; }
.otp-bar i { display: block; height: 100%; width: 0; border-radius: 2px; background: linear-gradient(90deg, var(--green), var(--cyan)); animation: fill var(--wait, 15s) linear forwards; }
@keyframes ping { 0% { transform: scale(.9); opacity: .7; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes fill { to { width: 100%; } }
@keyframes fadeup { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.btn.primary.btn-google { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; gap: 10px; }
.btn.primary.btn-google:hover { background: #f3f4f6; }
.btn-google .g-logo { width: 20px; height: 20px; flex: none; }
.perks { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--muted); font-size: .9rem; }
.perks li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.perks .ic { width: 18px; height: 18px; color: var(--cyan); margin-top: 2px; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 48px; height: 48px; font-size: 1.2rem; }
.avatar.xl { width: 104px; height: 104px; font-size: 2.2rem; border-width: 2px; }

/* ---------------- Member: dashboard (gaya e-wallet) ---------------- */
.wallet { display: grid; gap: 14px; max-width: 640px; margin: 0 auto; }
.wallet-head { display: flex; align-items: center; gap: 12px; }
.wallet-user { display: flex; align-items: center; gap: 12px; color: var(--text); min-width: 0; flex: 1; }
.wallet-user span { display: grid; min-width: 0; }
.wallet-user small { color: var(--muted); font-size: .82rem; }
.wallet-user b { font: 600 1.15rem var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); display: grid; place-items: center; }
.icon-btn:hover { border-color: var(--line-2); background: var(--bg-3); }
.balance-card { position: relative; overflow: hidden; display: grid; gap: 4px; padding: 18px; border-radius: var(--r-lg); border: 1px solid #33d6ff40; background: linear-gradient(135deg, #0b1f2a 0%, #0e0e11 45%, #171226 100%); box-shadow: var(--shadow); }
.balance-card::after { content: ""; position: absolute; right: -40px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(closest-side, #33d6ff2e, transparent); pointer-events: none; }
.balance-top { display: flex; align-items: center; justify-content: space-between; }
.balance { display: block; font: 600 2.2rem/1.1 var(--display); color: var(--text); margin: 4px 0 2px; }
.balance-card small { font-size: .82rem; }
.balance-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.balance-actions .btn { padding-inline: 8px; }
.member-code { text-align: center; }
.quick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.quick > a, .quick > button { position: relative; display: grid; justify-items: center; gap: 6px; padding: 12px 4px 10px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); color: var(--text); font-size: .74rem; font-weight: 600; text-align: center; text-decoration: none; }
.quick > a:hover, .quick > button:hover { border-color: var(--line-2); background: var(--bg-3); }
.quick .ic { width: 36px; height: 36px; padding: 8px; border-radius: 12px; background: var(--bg-3); color: var(--cyan); border: 1px solid var(--line); }
.quick .qbadge { position: absolute; top: 6px; right: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--violet); color: #fff; font: 700 .68rem/18px var(--display); font-style: normal; text-align: center; }
.topup { display: grid; gap: 10px; }
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.presets .chip { text-align: center; padding: 8px 4px; font-family: var(--display); }
.presets .chip.is-on { color: var(--cyan-ink); background: var(--cyan); border-color: var(--cyan); }
.muted.small { font-size: .8rem; }
.vouchers { display: grid; gap: 8px; }
.voucher { display: grid; gap: 8px; padding: 12px; background: var(--bg-2); border: 1px dashed var(--line-2); border-radius: var(--r); }
.voucher > div:first-child { display: grid; gap: 2px; }
.voucher b { font-family: var(--display); font-weight: 600; }
.voucher span { color: var(--muted); font-size: .84rem; }
.voucher-code { display: grid; gap: 4px; justify-items: center; background: #fff; color: #000; padding: 8px; border-radius: 8px; }
.voucher-code svg { width: 100%; max-width: 260px; height: 44px; }
.voucher-code code { font-weight: 700; letter-spacing: .12em; }
.list { display: grid; gap: 6px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); color: var(--text); }
.list-row > div { min-width: 0; display: grid; gap: 2px; }
.list-row b { font-family: var(--display); font-weight: 600; }
.list-row span { color: var(--muted); font-size: .84rem; }
table.tx { width: 100%; border-collapse: collapse; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: block; }
table.tx tbody { display: block; }
table.tx tr { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); }
table.tx tr:first-child { border-top: 0; }
table.tx td { padding: 0; vertical-align: middle; }
table.tx td b { display: block; font-family: var(--display); font-weight: 600; font-size: .92rem; }
table.tx td span { color: var(--muted); font-size: .8rem; }
table.tx td.r { text-align: right; white-space: nowrap; font: 600 .98rem var(--display); }
table.tx td.r small { display: block; color: var(--muted); font: 500 .74rem var(--font); }
table.tx td.pos { color: var(--green); }
table.tx td.neg { color: var(--text); }
.tx-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-3); border: 1px solid var(--line); color: var(--text); }
.tx-ic.pos { color: var(--green); border-color: #3ee0a540; }
.tx-ic .ic { width: 18px; height: 18px; }
.logout-row { margin-top: 6px; }
.qr-pay { display: grid; gap: 14px; justify-items: center; }
.qr-box { background: #fff; padding: 12px; border-radius: var(--r); }
.qr-box #qrcode img, .qr-box #qrcode canvas, .qr-box #memberqr img, .qr-box #memberqr canvas { width: 200px !important; height: 200px !important; }
.qr-info { display: grid; gap: 6px; text-align: center; color: var(--muted); font-size: .9rem; max-width: 420px; }
.qr-info b { font-size: 1.4rem; color: var(--text); }
.qr-status { font-weight: 700; color: var(--amber); }
.qr-status.paid { color: var(--green); }
/* Profil */
.photo-pick { display: grid; justify-items: center; gap: 10px; }
.photo-drop { position: relative; cursor: pointer; }
.photo-edit { position: absolute; right: -2px; bottom: 2px; width: 32px; height: 32px; border-radius: 50%; background: var(--cyan); color: var(--cyan-ink); display: grid; place-items: center; border: 2px solid var(--bg-2); }
.photo-edit .ic { width: 16px; height: 16px; }
.photo-actions { display: flex; gap: 8px; }

/* ---------------- Turnamen ---------------- */
.tourneys { display: grid; gap: 10px; }
.tourney { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; color: var(--text); }
.tourney.is-open { border-color: #33d6ff55; }
.tourney img { width: 96px; height: 100%; min-height: 110px; object-fit: cover; background: var(--bg-3); }
.tourney-body { padding: 12px 12px 12px 0; display: grid; gap: 4px; min-width: 0; }
.tourney:not(:has(img)) .tourney-body { grid-column: 1 / -1; padding: 12px 14px; }
.tourney h3 { font-size: 1.02rem; }
.tourney h3 small { color: var(--muted); font-size: .8rem; font-weight: 500; }
.tourney p { font-size: .88rem; }
.tourney-head { display: grid; gap: 12px; margin-bottom: 14px; }
.tourney-head .poster { width: 100%; max-width: 420px; border-radius: var(--r); border: 1px solid var(--line); }
.tourney-head h2 { font-size: 1.35rem; margin-top: 6px; }
.tourney-head h2 small { color: var(--muted); font-weight: 500; font-size: .9rem; }
.facts { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.facts li { display: grid; gap: 1px; min-width: 0; overflow-wrap: anywhere; padding: 8px 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm); font-size: .9rem; }
.facts b { color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.desc { white-space: normal; color: #d4d7e0; }
.results { margin-top: 12px; padding: 12px; border-radius: var(--r-sm); background: #3ee0a512; border: 1px solid #3ee0a540; }
.results h3 { color: var(--green); margin-bottom: 4px; }
details.rules summary { cursor: pointer; font-weight: 600; color: var(--cyan); margin-top: 8px; }
.pay-pick { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.pay-pick legend { font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.pay-pick label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-3); cursor: pointer; font-weight: 500; }
.pay-pick label:has(input:checked) { border-color: var(--cyan); }
.pay-pick label.is-off { opacity: .55; }
.pay-pick input { accent-color: var(--cyan); }
.pay-pick span { display: grid; }
.pay-pick small { color: var(--muted); font-size: .8rem; }
.participants { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.participants li { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--r-sm); }
.participants li.pending { opacity: .6; }
.participants .no { font: 600 .9rem var(--display); color: var(--muted); text-align: center; }
.participants b { display: block; font-family: var(--display); font-weight: 600; font-size: .92rem; }
.participants small { color: var(--muted); font-size: .8rem; }

/* ---------------- ≥ 640px ---------------- */
@media (min-width: 640px) {
  :root { --pad: 24px; }
  dialog.modal { align-items: center; padding: 24px; }
  .modal-card { border-radius: var(--r-lg); }
  .cart-bar { left: 50%; right: auto; transform: translateX(-50%); width: min(560px, calc(100% - 2 * var(--pad))); }
  h1 { font-size: 1.6rem; }
  .cta-row { grid-template-columns: repeat(2, max-content); }
  .metrics { grid-template-columns: repeat(4, 1fr); }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .tiers { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .games { grid-template-columns: repeat(3, 1fr); }
  .menus { grid-template-columns: repeat(2, 1fr); }
  .member-grid { grid-template-columns: 1fr 1fr; }
  .tourneys { grid-template-columns: repeat(2, 1fr); }
  .tourney-head:has(.poster) { grid-template-columns: 200px 1fr; align-items: start; }
  .facts { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .hero { min-height: 360px; padding: 26px; }
  .hero h1 { font-size: 2.1rem; }
}

/* ---------------- ≥ 1000px: rail kiri seperti POS ---------------- */
@media (min-width: 1000px) {
  :root { --pad: 30px; }
  .mhead, .tabbar { display: none; }
  .rail { position: fixed; inset: 0 auto 0 0; width: var(--rail); padding: 20px 14px 16px; background: var(--bg); display: flex; flex-direction: column; gap: 14px; z-index: 30; border-right: 1px solid var(--line); overflow-y: auto; }
  .rail-brand { display: block; padding: 6px 10px 2px; }
  .rail-brand img { width: 100%; max-width: 160px; }
  .rail-nav { display: grid; gap: 2px; flex: 1 1 auto; align-content: start; }
  .rail-nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: var(--muted); text-decoration: none; font-weight: 600; border-radius: var(--r-sm); transition: background .15s, color .15s; }
  .rail-nav a:hover { color: var(--text); background: var(--bg-2); }
  .rail-nav a.is-active { color: var(--text); background: var(--bg-3); }
  .rail-nav a.is-active .ic { color: var(--cyan); }
  .rail-status { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font-weight: 700; font-family: var(--display); font-size: .88rem; }
  .rail-status small { grid-column: 2; display: block; color: var(--muted); font: 500 .76rem/1.3 var(--font); }
  .rail-status small b { color: var(--green); font-family: var(--display); }
  .rail-status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); grid-row: 1 / span 2; }
  .rail-status.is-open { border-color: #3ee0a540; }
  .rail-status.is-closed { border-color: #ff6e8e55; color: var(--red); }
  .rail-foot { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
  .rail-user { display: flex; align-items: center; gap: 10px; color: var(--text); padding: 4px 2px 8px; }
  .rail-user-meta { min-width: 0; flex: 1; }
  .rail-user-meta b, .rail-user-meta small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rail-user-meta small { color: var(--muted); font-size: .78rem; }
  .work { margin-left: var(--rail); padding: 22px var(--pad) 48px; max-width: none; }
  .foot { display: flex; }
  .work > *:not(.topbar):not(.foot):not(.wallet), .work .section, .work .member-grid { max-width: 1240px; }
  .topbar { margin-bottom: 22px; }
  .hero { min-height: 420px; padding: 34px; }
  .hero h1 { font-size: 2.5rem; }
  .games { grid-template-columns: repeat(5, 1fr); }
  .menus { grid-template-columns: repeat(3, 1fr); }
  .tiers { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: repeat(3, 1fr); }
  .tourneys { grid-template-columns: repeat(3, 1fr); }
  .lokasi { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }
  .auth { margin-top: 10vh; }
  .wallet { max-width: 720px; margin: 0; }
  dialog.modal { align-items: center; padding: 24px; }
  .modal-card { border-radius: var(--r-lg); padding: 22px 24px; }
  .cart-bar { left: calc(var(--rail) + var(--pad)); right: auto; transform: none; width: min(560px, calc(100% - var(--rail) - 2 * var(--pad))); bottom: 20px; }
}
@media (min-width: 1400px) { .games { grid-template-columns: repeat(6, 1fr); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------------- Modal (sama dengan POS: lembar dari bawah di HP, kartu di tengah di desktop) ---------------- */
dialog.modal { border: 0; padding: 0; margin: 0; width: 100%; max-width: none; height: 100%; max-height: none; background: transparent; color: var(--text); inset: 0; position: fixed; display: none; align-items: flex-end; justify-content: center; }
dialog.modal[open] { display: flex; }
dialog.modal::backdrop { background: #000000b8; backdrop-filter: blur(3px); }
.modal-card { position: relative; width: 100%; max-width: 560px; max-height: min(92vh, 92dvh); overflow-y: auto; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 18px var(--pad) calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 14px; box-shadow: var(--shadow); animation: sheetup .28s cubic-bezier(.2,.8,.2,1); }
.modal-card > label, .modal-card .form { margin: 0; }
.modal-head { display: flex; align-items: center; gap: 10px; }
.modal-head div { flex: 1; min-width: 0; }
.modal-head small { display: block; color: var(--muted); font-size: .8rem; }
.modal-head h2 { font-size: 1.2rem; }
.modal-x { position: absolute; right: 12px; top: 12px; z-index: 2; background: #000000b0; border-color: #ffffff22; }
.modal-total { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: var(--r-sm); background: var(--bg-3); border: 1px solid var(--line); font-weight: 600; }
.modal-total b { font: 600 1.2rem var(--display); }
body.has-modal { overflow: hidden; }
@keyframes sheetup { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-card .qr-pay { padding-top: 4px; }

/* ---------------- Leaderboard bulanan ---------------- */
.lb .section-head { align-items: center; }
.lb-live { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid #3ee0a540; background: #3ee0a512; color: var(--green); font: 700 .74rem var(--display); letter-spacing: .04em; }
.lb-live .dot { background: var(--green); box-shadow: 0 0 0 3px #3ee0a522; animation: ping-dot 1.6s ease-out infinite; }
@keyframes ping-dot { 0%, 100% { box-shadow: 0 0 0 2px #3ee0a533; } 50% { box-shadow: 0 0 0 5px #3ee0a511; } }
.lb-tabs { margin-bottom: 10px; }
.lb-tabs .chip { display: inline-flex; align-items: center; gap: 6px; }
.lb-tabs .chip .ic { width: 15px; height: 15px; }
.lb-tabs a.chip { margin-left: auto; }
.lb-board { padding: 14px; }
.lb-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.lb-head > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.lb-head b { font: 600 1.05rem var(--display); }
.lb-head .muted { font-size: .82rem; }
.lb-prize { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: var(--r-sm); background: #ffc85c14; border: 1px solid #ffc85c40; color: var(--amber); max-width: 46%; }
.lb-prize .ic { width: 18px; height: 18px; }
.lb-prize span { display: grid; min-width: 0; }
.lb-prize small { font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.lb-prize b { font: 600 .82rem var(--display); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lb-list li { display: grid; grid-template-columns: 28px auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r-sm); background: var(--bg-3); border: 1px solid var(--line); }
.lb-list li.is-me { border-color: #33d6ff66; background: #33d6ff0f; }
.lb-list li.is-top { border-color: var(--line-2); }
.lb-no { font: 700 .95rem var(--display); color: var(--muted); text-align: center; }
.lb-no i { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-style: normal; color: #000; background: #c0c4cf; }
.lb-list li.r1 .lb-no i { background: var(--amber); } .lb-list li.r2 .lb-no i { background: #d8dbe4; } .lb-list li.r3 .lb-no i { background: #d9a066; }
.lb-name { min-width: 0; display: grid; }
.lb-name b { font-family: var(--display); font-weight: 600; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-name b em { font: 700 .66rem var(--display); font-style: normal; color: var(--cyan-ink); background: var(--cyan); border-radius: 999px; padding: 1px 6px; margin-left: 4px; vertical-align: middle; }
.lb-name small { color: var(--muted); font-size: .78rem; }
.lb-val { font-size: .98rem; white-space: nowrap; }
.lb-list .lb-empty { grid-template-columns: 1fr; text-align: center; color: var(--muted); font-size: .9rem; padding: 18px 14px; border-style: dashed; }
.lb-me { margin-top: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px dashed var(--line-2); color: var(--muted); font-size: .9rem; }
.lb-me b { color: var(--cyan); font-family: var(--display); }
.order-row .pill { flex: none; }

/* ---------------- Menu café: detail, keranjang, kirim ke kasir ---------------- */
.menu-hero { aspect-ratio: 16 / 9; background: var(--bg-3); border-radius: var(--r); overflow: hidden; display: grid; place-items: center; color: var(--muted); margin: -4px 0 0; }
.menu-hero img { width: 100%; height: 100%; object-fit: cover; }
.menu-hero .ic { width: 48px; height: 48px; }
.menu-detail { display: grid; gap: 8px; }
.menu-detail h2 { font-size: 1.35rem; }
.menu-detail .desc { color: #d4d7e0; }
.md-price { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.md-price > b { font: 600 1.35rem var(--display); }
.md-price s { color: var(--muted); font-size: .95rem; }
.md-price .promo { display: inline-block; padding: 2px 9px; border-radius: 999px; background: #a47cff1f; color: var(--violet); border: 1px solid #a47cff4d; font-size: .74rem; font-weight: 700; }
.md-options { display: grid; gap: 10px; }
.md-group { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.md-group legend { font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.md-group legend small { color: var(--muted); font-weight: 500; }
.md-group label { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-3); cursor: pointer; font-weight: 500; }
.md-group label:has(input:checked) { border-color: var(--cyan); }
.md-group input { accent-color: var(--cyan); }
.md-group small { color: var(--muted); margin-left: 4px; }
.md-add { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; margin-top: 6px; position: sticky; bottom: 0; background: var(--bg-2); padding-top: 6px; }
.md-add .btn span { display: inline-flex; gap: 6px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--bg-3); overflow: hidden; height: 52px; }
.stepper button { width: 44px; height: 100%; border: 0; background: transparent; color: var(--text); display: grid; place-items: center; }
.stepper button:hover { background: var(--bg-4); }
.stepper input { width: 44px; height: 100%; border: 0 !important; border-radius: 0 !important; background: transparent !important; text-align: center; font: 600 1.1rem var(--display); padding: 0; -moz-appearance: textfield; box-shadow: none !important; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.md-login { display: grid; gap: 10px; margin-top: 6px; }
.cart-bar { position: fixed; left: var(--pad); right: var(--pad); bottom: calc(var(--tab-h) + 12px + env(safe-area-inset-bottom)); z-index: 25; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 16px; border-radius: var(--r-lg); background: #0e0e11f2; border: 1px solid #33d6ff55; box-shadow: 0 12px 40px #000000b0; backdrop-filter: blur(10px); }
.cart-bar > div { display: grid; }
.cart-bar small { color: var(--muted); font-size: .78rem; font-weight: 600; }
.cart-bar b.num { font-size: 1.15rem; }
.cart-bar.is-pop { animation: pop .3s ease-out; }
@keyframes pop { 0% { border-color: var(--cyan); box-shadow: 0 0 0 8px #33d6ff33, 0 12px 40px #000000b0; } 100% { box-shadow: 0 12px 40px #000000b0; } }
.cart-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cart-lines li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r-sm); background: var(--bg-3); border: 1px solid var(--line); }
.cart-lines .cart-empty { grid-template-columns: 1fr; text-align: center; color: var(--muted); border-style: dashed; padding: 16px; }
.cl-name { min-width: 0; display: grid; }
.cl-name b { font-family: var(--display); font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-name small { color: var(--muted); font-size: .78rem; }
.cl-qty { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg-2); }
.cl-qty button { width: 30px; height: 30px; border: 0; background: transparent; color: var(--text); font-size: 1.1rem; border-radius: 50%; }
.cl-qty b { min-width: 20px; text-align: center; font-family: var(--display); }
.cl-sum { white-space: nowrap; font-size: .92rem; }
.pending-topup { border-color: #ffc85c55; }
.pending-topup .card-head h2 { font-size: 1.02rem; }

/* ---- Bagan turnamen (v21) ---- */
.bracket-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
.bracket { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 14px; min-width: calc(var(--rounds, 1) * 222px); }
.bround h4 { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.bround-m { display: flex; flex-direction: column; justify-content: space-around; gap: 10px; height: calc(100% - 24px); }
.bround-third { border-left: 1px dashed var(--line); padding-left: 14px; }
.bm { background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 10px; padding: 6px 8px; display: grid; gap: 2px; font-size: .9rem; }
.bm.is-scheduled { border-left-color: #a47cff; } .bm.is-live { border-left-color: #ffc85c; } .bm.is-finished { border-left-color: #3ee0a5; } .bm.is-bye { opacity: .6; }
.bm-head { display: grid; gap: 1px; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; min-width: 0; }
.bm-head > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-when { text-transform: none; letter-spacing: 0; color: var(--cyan); font-weight: 600; font-size: .78rem; }
.bm-when:empty { display: none; }
.bm { min-width: 0; }
.bm-row { min-width: 0; }
.bm-row b { min-width: 0; }
.bm-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 6px; background: var(--bg); }
.bm-row b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-row.is-w { background: #3ee0a514; } .bm-row.is-w b { color: #3ee0a5; font-weight: 800; }
.bm-row .sc { min-width: 1.5em; text-align: right; font-weight: 800; }
.bm-row .tbd { color: var(--muted); font-style: italic; font-size: .85rem; }
.bm-live { font-size: .75rem; color: #ffc85c; font-weight: 700; }
.champion { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #3ee0a566; background: #3ee0a514; border-radius: 10px; margin-bottom: 12px; }
.champion .ic { color: #ffc85c; width: 24px; height: 24px; } .champion small { display: block; color: var(--muted); }
.my-matches { list-style: none; margin: 6px 0 10px; padding: 0; display: grid; gap: 6px; }
.my-matches li { display: grid; gap: 2px; padding: 8px 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; font-size: .9rem; }
.my-matches .when { color: var(--cyan); font-weight: 700; } .my-matches .what { color: var(--muted); } .my-matches .what b { color: var(--text); }
.my-matches .win { color: #3ee0a5; } .my-matches .lose { color: #ff6e8e; } .my-matches .live { color: #ffc85c; }
.mt-sm { margin-top: 8px; }
.bracket-card .card-head { flex-wrap: wrap; gap: 6px 10px; }
.bracket-card .card-head .tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.bround h4 { display: flex; justify-content: space-between; gap: 8px; }
.bround h4 small { color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; }
@media (max-width: 639px) {
  .bracket-scroll { overflow: visible; }
  .bracket { display: grid; grid-auto-flow: row; grid-template-columns: 1fr; min-width: 0; gap: 16px; }
  .bround-m { height: auto; justify-content: flex-start; }
  .bround-third { border-left: 0; padding-left: 0; border-top: 1px dashed var(--line); padding-top: 12px; }
  .bm-head { grid-template-columns: 1fr auto; align-items: baseline; gap: 8px; }
}

/* Modal bayar pendaftaran turnamen (v21.2) */
.regpay-total { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg-3); border: 1px solid var(--line); }
.regpay-total b { font: 700 1.4rem var(--display); }
.regpay-opt { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--bg-2); }
.regpay-opt.is-off { opacity: .75; }
.regpay-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #33d6ff14; color: var(--cyan); }
.regpay-body { min-width: 0; display: grid; gap: 2px; } .regpay-body small { color: var(--muted); font-size: .82rem; } .regpay-body small b { color: var(--text); }
@media (max-width: 380px) { .regpay-opt { grid-template-columns: auto 1fr; } .regpay-opt > .btn { grid-column: 1 / -1; } }
