/* GameMatrix360 — brand: navy #060C1A · cobalt #0B4FE8 · teal #00D4BC · off-white #F3F5FA · fire #FF511A */
:root {
  --navy: #060C1A; --cobalt: #0B4FE8; --teal: #00D4BC; --off: #F3F5FA;
  --fire: #FF511A; --slate: #6B7FA3; --surface: #0D1728; --surface2: #162035; --rule: #1E2F4A;
  --ok: #2ECC71; --warn: #F5A623; --bad: #FF5A5A;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  background: var(--navy); color: var(--off);
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
/* mobile customer/floor-staff app only (not the office console) — a faint
   ambient texture behind the mostly-opaque cards, never competing with content */
body.mobile-app {
  background-image:
    linear-gradient(180deg, rgba(6,12,26,.95), rgba(6,12,26,.985) 30%, var(--navy) 60%),
    url('/images/hero-sports-complex.svg');
  background-size: cover; background-position: center top; background-repeat: no-repeat; background-attachment: fixed;
}
button { font: inherit; cursor: pointer; border: none; }
input, select, textarea {
  font: inherit; width: 100%; padding: 12px 14px; border-radius: 10px;
  background: var(--surface2); border: 1px solid var(--rule); color: var(--off); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--cobalt); }
label { display: block; font-size: 12px; color: var(--slate); margin: 12px 0 5px; letter-spacing: .04em; }

/* layout */
#app { max-width: 520px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: rgba(6,12,26,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule);
}
.topbar img { width: 34px; height: 34px; }
.topbar .brand { font-weight: 900; letter-spacing: .02em; font-size: 15px; }
.topbar .brand .thin { font-weight: 200; opacity: .7; }
.topbar .b360 { background: var(--fire); color: #fff; font-size: 10px; font-weight: 800; border-radius: 4px; padding: 1px 5px; margin-left: 4px; }
.topbar .role { margin-left: auto; font-size: 11px; color: var(--slate); text-transform: uppercase; letter-spacing: .1em; text-align: right; }
.topbar .role b { display: block; color: var(--teal); }
.topbar-logout {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-left: 10px; flex: 0 0 auto;
  background: var(--surface2); border: 1px solid var(--rule); border-radius: 50%;
  color: var(--off); font-size: 20px; line-height: 1; min-height: unset;
}
.topbar-logout:active { background: rgba(255,90,90,.16); border-color: var(--bad); color: var(--bad); }

main { flex: 1; padding: 16px 16px 88px; }

/* bottom tabs */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  max-width: 520px; margin: 0 auto; display: flex;
  background: rgba(13,23,40,.97); backdrop-filter: blur(8px); border-top: 1px solid var(--rule);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar button {
  flex: 1; background: none; color: var(--slate); padding: 10px 2px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; min-height: 56px;
}
.tabbar button .ico { font-size: 20px; line-height: 1; }
.tabbar button.active { color: var(--teal); }
.tabbar button.active::after { content: ""; width: 4px; height: 4px; border-radius: 99px; background: var(--teal); margin-top: 2px; }

/* components */
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.card h3 { font-size: 13px; color: var(--slate); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 14px; }
.stat .v { font-size: 22px; font-weight: 800; color: var(--off); }
.stat .l { font-size: 11px; color: var(--slate); margin-top: 3px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  background: linear-gradient(120deg, var(--cobalt), #0a6fe8); color: #fff; font-weight: 700;
  padding: 15px; border-radius: 12px; font-size: 15px; min-height: 48px;
}
.btn:disabled { opacity: .45; }
.btn.teal { background: linear-gradient(120deg, #00b8a8, var(--teal)); color: #04241f; }
.btn.ghost { background: var(--surface2); color: var(--off); border: 1px solid var(--rule); }
.btn.danger { background: #7a1d1d; }
.btn.sm { width: auto; padding: 8px 14px; font-size: 13px; min-height: 36px; border-radius: 9px; }
.row { display: flex; align-items: center; gap: 10px; }
.row .grow { flex: 1; }
.muted { color: var(--slate); font-size: 13px; }
.small { font-size: 12px; }
h2.page { font-size: 20px; font-weight: 800; margin: 4px 0 14px; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.pill.ok { background: rgba(46,204,113,.15); color: var(--ok); }
.pill.warn { background: rgba(245,166,35,.15); color: var(--warn); }
.pill.bad { background: rgba(255,90,90,.15); color: var(--bad); }
.pill.info { background: rgba(11,79,232,.18); color: #7aa6ff; }
.list-item { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.list-item:last-child { border-bottom: none; }

/* sport chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; background: var(--surface2); border: 1px solid var(--rule); color: var(--off);
  padding: 9px 15px; border-radius: 99px; font-size: 13px; font-weight: 600; min-height: 40px;
}
.chip.active { background: var(--cobalt); border-color: var(--cobalt); }

/* slot grid */
.slotgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.slot {
  padding: 12px 4px; border-radius: 10px; text-align: center; font-size: 13px; font-weight: 700;
  background: var(--surface2); border: 1px solid var(--rule); color: var(--off); min-height: 44px;
}
.slot.active { background: var(--teal); color: #04241f; border-color: var(--teal); }
.slot.booked, .slot.blocked { opacity: .3; text-decoration: line-through; pointer-events: none; }
.slot.held { background: rgba(245,166,35,.18); border-color: var(--warn); color: var(--warn); }

/* sport tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  border-radius: 16px; padding: 16px 14px; min-height: 100px; color: #fff; text-align: left;
  display: flex; flex-direction: column; justify-content: space-between; border: none; position: relative; overflow: hidden;
}
.tile .tile-ic { font-size: 22px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.25)); }
.tile b { font-size: 15px; } .tile span { font-size: 12px; opacity: .85; }

/* ---------- personalized customer home ---------- */
.hero-card {
  border-radius: 20px; padding: 22px 20px; margin-bottom: 16px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--cobalt) 0%, #063a6e 55%, var(--navy) 100%);
}
.hero-card::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(16,224,188,.35), transparent 70%);
}
.hero-top { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.avatar {
  width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; color: #fff; flex: 0 0 auto;
}
.hero-greet { flex: 1; }
.hero-greet .g-time { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.6); }
.hero-greet .g-name { font-size: 18px; font-weight: 800; color: #fff; margin-top: 1px; }
.hero-points {
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); border-radius: 12px;
  padding: 6px 12px; text-align: center; color: #fff; flex: 0 0 auto;
}
.hero-points b { font-size: 15px; display: block; line-height: 1.1; }
.hero-points span { font-size: 9px; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.hero-stats { display: flex; gap: 22px; margin-top: 16px; position: relative; z-index: 1; }
.hero-stats div b { display: block; font-size: 17px; color: #fff; }
.hero-stats div span { font-size: 10.5px; color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: .06em; }

.continue-card {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border-radius: 16px;
  padding: 14px 16px; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--rule);
}
.continue-card .ic { font-size: 26px; width: 46px; height: 46px; border-radius: 12px; background: var(--surface2);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.continue-card .grow b { display: block; font-size: 14px; }
.continue-card .grow span { font-size: 12px; color: var(--slate); }
.continue-card .arrow { font-size: 18px; color: var(--teal); }

.section-title { font-size: 13px; font-weight: 700; color: var(--slate); text-transform: uppercase; letter-spacing: .08em; margin: 6px 0 10px; }
.upcoming-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.upcoming-scroll::-webkit-scrollbar { display: none; }
.upcoming-card {
  flex: 0 0 auto; width: 168px; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 14px;
}
.upcoming-card .pill { margin-bottom: 8px; }
.upcoming-card b { display: block; font-size: 13.5px; }
.upcoming-card span { font-size: 11.5px; color: var(--slate); }

/* ---------- rewards wallet ---------- */
.wallet-card {
  border-radius: 20px; padding: 26px 22px; text-align: center; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #00695c 0%, #00897b 45%, var(--teal) 100%); color: #04241f;
}
.wallet-card::before {
  content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 15%, rgba(255,255,255,.25), transparent 55%);
}
.wallet-card .w-label { position: relative; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; opacity: .75; font-weight: 700; }
.wallet-card .w-amt { position: relative; font-size: 44px; font-weight: 900; margin-top: 6px; }
.wallet-card .w-sub { position: relative; font-size: 12.5px; opacity: .8; margin-top: 4px; }
.refer-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; padding: 18px; }
.refer-code-row { display: flex; align-items: center; gap: 10px; background: var(--surface2); border: 1px dashed var(--rule); border-radius: 12px; padding: 12px 14px; }
.refer-code-row input.code {
  background: none; border: none; padding: 0; width: auto; flex: 1; color: var(--off);
  font-family: ui-monospace, monospace; font-size: 15px; font-weight: 700; letter-spacing: .04em;
}
.icon-btn { background: var(--surface2); border: 1px solid var(--rule); color: var(--off); border-radius: 10px; width: 38px; height: 38px; font-size: 15px; flex: 0 0 auto; }

/* ---------- food: category tabs + sticky cart bar ---------- */
.cat-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab { flex: 0 0 auto; background: var(--surface2); border: 1px solid var(--rule); color: var(--off); padding: 9px 16px; border-radius: 99px; font-size: 13px; font-weight: 600; }
.cat-tab.active { background: var(--teal); color: #04241f; border-color: var(--teal); }
.food-item-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--rule); }
.food-item-row:last-child { border-bottom: none; }
.food-item-row .f-ic { font-size: 22px; width: 42px; height: 42px; border-radius: 11px; background: var(--surface2); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 28px; height: 28px; border-radius: 8px; background: var(--surface2); border: 1px solid var(--rule); color: var(--off); font-size: 15px; font-weight: 700; }
.stepper b { min-width: 16px; text-align: center; font-size: 13px; }
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 66px; z-index: 25; max-width: 520px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; background: var(--cobalt); color: #fff; border-radius: 16px;
  padding: 13px 18px; box-shadow: 0 10px 30px rgba(11,79,232,.4);
}
.cart-bar b { font-size: 14px; } .cart-bar span { font-size: 12px; opacity: .85; }
.cart-bar .go { margin-left: auto; background: rgba(255,255,255,.18); border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 700; }

/* hold countdown */
.countdown { font-size: 40px; font-weight: 900; text-align: center; color: var(--warn); font-variant-numeric: tabular-nums; }

/* modal */
.modal-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(2,6,14,.7); display: flex; align-items: flex-end; justify-content: center; }
.modal { width: 100%; max-width: 520px; background: var(--surface); border-radius: 18px 18px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); border: 1px solid var(--rule); max-height: 88dvh; overflow-y: auto; }
.modal h3 { font-size: 17px; margin-bottom: 12px; }

/* toast */
#toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 60;
  background: var(--surface2); border: 1px solid var(--rule); color: var(--off);
  padding: 11px 18px; border-radius: 12px; font-size: 14px; max-width: 90vw;
  opacity: 0; transition: opacity .25s; pointer-events: none; text-align: center;
}
#toast.show { opacity: 1; }
#toast.err { border-color: var(--bad); color: #ffb3b3; }

/* landing */
.hero { text-align: center; padding: 34px 8px 10px; }
.hero img { width: 92px; height: 92px; }
.hero h1 { font-size: 26px; margin-top: 14px; }
.hero h1 .thin { font-weight: 200; letter-spacing: .14em; opacity: .75; }
.hero .b360 { background: var(--fire); color: #fff; font-size: 13px; font-weight: 800; border-radius: 5px; padding: 2px 7px; vertical-align: middle; }
.hero .tag { color: var(--slate); letter-spacing: .3em; font-size: 11px; text-transform: uppercase; margin-top: 8px; }
.plan { border: 1px solid var(--rule); border-radius: 14px; padding: 16px; margin-bottom: 12px; background: var(--surface); }
.plan.hot { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.plan .price { font-size: 24px; font-weight: 900; }
.plan .price span { font-size: 12px; color: var(--slate); font-weight: 400; }
.plan ul { margin: 10px 0 0 18px; color: var(--slate); font-size: 13px; }
.util-bar { height: 8px; border-radius: 99px; background: var(--surface2); overflow: hidden; margin-top: 4px; }
.util-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cobalt), var(--teal)); }
.kitchen-card { border-left: 4px solid var(--cobalt); }
.banner { background: rgba(245,166,35,.12); border: 1px solid var(--warn); color: var(--warn); border-radius: 12px; padding: 12px 14px; font-size: 13px; margin-bottom: 12px; }
.seg { display: flex; background: var(--surface2); border-radius: 10px; padding: 3px; margin: 8px 0; }
.seg button { flex: 1; background: none; color: var(--slate); padding: 9px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.seg button.active { background: var(--cobalt); color: #fff; }
a { color: var(--teal); }
table.rep { width: 100%; border-collapse: collapse; font-size: 12px; }
table.rep th, table.rep td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--rule); }
table.rep th { color: var(--slate); font-weight: 600; }
.rep-wrap { overflow-x: auto; }
