@import url('https://fonts.googleapis.com/css2?family=Khand:wght@300;400;500;600;700&display=swap');

:root {
  --bg:        #0a0a0a;
  --surface:   #141414;
  --surface-2: #1c1c1c;
  --surface-3: #242424;
  --border:    #282828;
  --border-2:  #333333;
  --text:      #ffffff;
  --text-2:    #cccccc;
  --muted:     #666666;
  --brand:     #ffffff;
  --brand-dim: #444444;
  --success:   #22c55e;
  --danger:    #ef4444;
  --warn:      #f59e0b;
  --info:      #3b82f6;
  --radius:    10px;
  --radius-sm: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Khand', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: .01em;
}

/* ── Nav ─────────────────────────────────────────────────────────── */
nav {
  background: #0f0f0f;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 58px;
  position: sticky;
  top: 0;
  z-index: 50;
}
nav .logo {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
}
nav .nav-right { display: flex; align-items: center; gap: 1rem; }
#nav-user { font-size: .9rem; color: var(--text-2); }

/* ── Layout ──────────────────────────────────────────────────────── */
.page      { max-width: 960px;  margin: 0 auto; padding: 2rem 1rem; }
.page-wide { max-width: 1240px; margin: 0 auto; padding: 2rem 1rem; }

/* ── Cards ───────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.card h2 {
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: .75rem;
}

/* ── Stat grid ───────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
}
.stat-card .val {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
}
.stat-card .lbl {
  font-size: .78rem;
  color: var(--muted);
  margin-top: .3rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ── Forms ───────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
label {
  display: block;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: .35rem;
  letter-spacing: .03em;
}
input, select, textarea {
  width: 100%;
  padding: .6rem .9rem;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Khand', sans-serif;
  font-size: 1rem;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
}
input::placeholder { color: var(--muted); }
select option { background: var(--surface-2); }
textarea { resize: vertical; min-height: 80px; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .55rem 1.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: 'Khand', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}
.btn-primary  { background: var(--brand);   color: #000; border-color: var(--brand); }
.btn-primary:hover { background: #d97706; border-color: #d97706; }
.btn-success  { background: var(--success); color: #000; }
.btn-success:hover { background: #16a34a; }
.btn-danger   { background: var(--danger);  color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-outline  { background: transparent; border-color: var(--border-2); color: var(--text-2); }
.btn-outline:hover { background: var(--surface-2); border-color: var(--muted); color: var(--text); }
.btn-ghost    { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-sm { padding: .35rem .75rem; font-size: .82rem; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── Tables ──────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th {
  text-align: left;
  padding: .6rem 1rem;
  background: var(--surface-2);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
}
td { padding: .65rem 1rem; border-top: 1px solid var(--border); color: var(--text-2); }
tr:hover td { background: var(--surface-2); }

/* ── Badges ──────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.badge-earn         { background: #052e16; color: #4ade80; border: 1px solid #166534; }
.badge-redeem       { background: #450a0a; color: #f87171; border: 1px solid #7f1d1d; }
.badge-adjustment   { background: #431407; color: #fb923c; border: 1px solid #7c2d12; }
.badge-staff_discount { background: #1e1b4b; color: #a5b4fc; border: 1px solid #3730a3; }
.badge-new_member   { background: #172554; color: #93c5fd; border: 1px solid #1d4ed8; }
.badge-member       { background: #1c1c1c; color: #d1d5db; border: 1px solid #374151; }
.badge-regular      { background: #3b1f00; color: #fbbf24; border: 1px solid #92400e; }
.badge-slipping_away { background: #450a0a; color: #fca5a5; border: 1px solid #991b1b; }
.badge-staff        { background: #1a2e1a; color: #86efac; border: 1px solid #166534; }
.badge-admin        { background: #2d1b1b; color: #fca5a5; border: 1px solid #991b1b; }

/* ── Alerts ──────────────────────────────────────────────────────── */
.alert {
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: .9rem;
  border: 1px solid;
}
.alert-error   { background: #450a0a; color: #fca5a5; border-color: #7f1d1d; }
.alert-success { background: #052e16; color: #86efac; border-color: #166534; }
.alert-info    { background: #172554; color: #93c5fd; border-color: #1d4ed8; }
.hidden { display: none !important; }

/* ── Points hero ─────────────────────────────────────────────────── */
.points-hero {
  text-align: center;
  padding: 2.5rem 1rem;
  background: linear-gradient(135deg, #1a1200 0%, #2d1f00 50%, #1a1200 100%);
  border: 1px solid #3d2a00;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
}
.points-hero .points-num {
  font-size: 4rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
}
.points-hero .points-sub {
  color: var(--text-2);
  margin-top: .5rem;
  font-size: 1.1rem;
}

/* ── Discount banner ─────────────────────────────────────────────── */
.discount-banner {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border: 1px solid #3730a3;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.discount-banner .disc-pct { font-size: 2.5rem; font-weight: 700; color: #a5b4fc; }
.discount-banner .disc-text { font-size: .9rem; color: #c7d2fe; }

/* ── Tab bar ─────────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}
.tab-bar button {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: .75rem .5rem;
  font-family: 'Khand', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--muted);
  cursor: pointer;
  text-transform: uppercase;
  transition: color .15s;
}
.tab-bar button.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-bar button:hover:not(.active) { color: var(--text-2); }

/* ── Search bar ──────────────────────────────────────────────────── */
.search-bar { display: flex; gap: .75rem; }
.search-bar input { flex: 1; }

/* ── QR ──────────────────────────────────────────────────────────── */
.qr-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  text-align: center;
  margin-bottom: 1.25rem;
}
.qr-wrap img {
  width: 200px; height: 200px;
  border-radius: 10px;
  display: block;
  margin: 0 auto .75rem;
  background: #fff;
  padding: 8px;
}
.site-pills { display: flex; gap: .5rem; justify-content: center; margin-top: .6rem; }
.site-pill {
  background: #1c1c00;
  color: var(--brand);
  border: 1px solid #3d3a00;
  border-radius: 999px;
  padding: .25rem .85rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ── Login ───────────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at top, #1a0f00 0%, #0a0a0a 60%);
  padding: 1rem;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
}
.login-card .logo-big { text-align: center; margin-bottom: 1.75rem; }
.login-card .logo-big h1 {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.login-card .logo-big p { color: var(--muted); font-size: .9rem; margin-top: .25rem; letter-spacing: .05em; }

/* ── Category segment filter ─────────────────────────────────────── */
.segment-pills { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.segment-pill {
  padding: .3rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--muted);
  font-family: 'Khand', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .15s;
}
.segment-pill.active, .segment-pill:hover { border-color: var(--brand); color: var(--brand); background: #1a1200; }

/* ── Booking venue button ────────────────────────────────────────── */
.book-venue-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.book-venue-btn:hover { border-color: var(--brand); background: #1a1200; }

/* ── Wallet buttons ──────────────────────────────────────────────── */
.wallet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-family: 'Khand', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: opacity .15s;
  width: 220px;
}
.wallet-btn:hover { opacity: .85; }
.wallet-apple  { background: #000; color: #fff; border: 1px solid #444; }
.wallet-google { background: #fff; color: #3c4043; border: 1px solid #dadce0; }

/* ── Misc ────────────────────────────────────────────────────────── */
hr { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }
strong { color: var(--text); }

@media (max-width: 640px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .page, .page-wide { padding: 1rem .75rem; }
  nav .logo { font-size: .95rem; }
}
