/* ═══════════════════════════════════════════════════
   RITZA RAFFLES — App Styles (app.html)
   ═══════════════════════════════════════════════════ */

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

:root {
  --navy:      #0b2545;
  --navy-mid:  #163d6a;
  --gold:      #e8a000;
  --gold-l:    #f0b429;
  --gold-pale: #fef9ec;
  --green:     #059669;
  --green-lt:  #d1fae5;
  --purple:    #7c3aed;
  --red:       #dc2626;
  --red-lt:    #fee2e2;
  --bg:        #f8f9fb;
  --white:     #ffffff;
  --gray-100:  #f1f4f8;
  --gray-200:  #e2e8f0;
  --gray-400:  #94a3b8;
  --gray-600:  #475569;
  --gray-800:  #1e293b;
  --text:      #1a2535;
  --radius:    12px;
  --radius-lg: 20px;
  --shadow:    0 4px 20px rgba(0,0,0,.09);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.14);
  --t:         .22s ease;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { font-family: 'Poppins', 'Inter', sans-serif; line-height: 1.2; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.hidden { display: none !important; }

/* ── Shared Buttons ─────────────────────────────── */
.btn-solid {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  background: var(--navy); color: var(--white);
  font-size: .9rem; font-weight: 600; border-radius: 8px;
  border: 2px solid var(--navy);
  cursor: pointer; transition: var(--t);
}
.btn-solid:hover { background: var(--navy-mid); border-color: var(--navy-mid); transform: translateY(-1px); }

/* ── Section tag ────────────────────────────────── */
.section-tag {
  display: inline-block;
  padding: 5px 14px;
  background: var(--gold-pale);
  color: var(--gold);
  font-size: .75rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  border-radius: 100px; border: 1px solid #f3d97a;
}

/* ── TOP NAV ─────────────────────────────────────── */
.topnav {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 1px 8px rgba(0,0,0,.05);
}

.nav-inner {
  max-width: 1140px; margin: 0 auto; padding: 0 24px;
  height: 64px;
  display: flex; align-items: center; gap: 24px;
}

.nav-logo {
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem; font-weight: 900;
  color: var(--navy); letter-spacing: -.02em;
  flex-shrink: 0;
}
.nav-logo span { color: var(--gold-l); }

.nav-tabs {
  display: flex; gap: 4px;
  margin-left: auto;
}

.nav-tab {
  display: inline-flex; align-items: center;
  padding: 8px 16px;
  background: none; border: none;
  font-size: .86rem; font-weight: 500;
  color: var(--gray-600);
  border-radius: 8px; cursor: pointer;
  transition: var(--t);
}
.nav-tab:hover { color: var(--navy); background: var(--gray-100); }
.nav-tab.active {
  color: var(--navy); background: var(--gray-100);
  font-weight: 700;
}
.nav-tab[href] { text-decoration: none; }

.nav-right {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}

.nav-wallet {
  display: flex; gap: 8px; align-items: center;
}

.wallet-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px;
  background: var(--gray-100);
  border-radius: 100px;
  font-size: .82rem; font-weight: 700;
  color: var(--navy);
  border: 1px solid var(--gray-200);
}
.wallet-chip.ticket { background: var(--gold-pale); border-color: #f3d97a; color: var(--gold); }

.btn-nav-signin {
  padding: 8px 18px;
  background: var(--navy); color: var(--white);
  border: none; border-radius: 8px;
  font-size: .85rem; font-weight: 600;
  cursor: pointer; transition: var(--t);
}
.btn-nav-signin:hover { background: var(--navy-mid); }

.nav-avatar { display: flex; align-items: center; gap: 10px; }

.avatar-circle {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--gold-l));
  color: var(--white); font-weight: 800; font-size: .95rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

.btn-signout {
  background: none; border: none;
  font-size: .82rem; color: var(--gray-400);
  cursor: pointer; transition: color var(--t);
}
.btn-signout:hover { color: var(--red); }

/* ── SECTIONS ────────────────────────────────────── */
.section { display: none; }
.section.active { display: block; }

/* ── GUEST BANNER ───────────────────────────────── */
.guest-banner {
  background: linear-gradient(90deg, var(--navy) 0%, #163d6a 100%);
  padding: 28px 0;
}
.gb-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
}
.gb-inner strong { font-size: 1rem; color: var(--white); display: block; margin-bottom: 4px; }
.gb-inner p { font-size: .88rem; color: rgba(255,255,255,.6); }

/* ── DASHBOARD HERO ─────────────────────────────── */
.dashboard-hero {
  background: linear-gradient(150deg, var(--navy) 0%, #163d6a 100%);
  padding: 40px 0 48px;
  position: relative;
}
.dashboard-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(240,180,41,.1) 0%, transparent 60%);
  pointer-events: none;
}

.dash-welcome {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 32px; position: relative; z-index: 1;
}
.dash-welcome h2 { font-size: 1.6rem; font-weight: 800; color: var(--white); margin-bottom: 4px; }
.dash-welcome p  { font-size: .88rem; color: rgba(255,255,255,.55); }

.btn-games {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  background: var(--gold-l); color: var(--navy);
  font-size: .9rem; font-weight: 700; border-radius: 10px;
  transition: var(--t);
  box-shadow: 0 4px 16px rgba(240,180,41,.3);
}
.btn-games:hover { background: var(--gold); transform: translateY(-2px); }

/* ── STAT CARDS ─────────────────────────────────── */
.stat-cards {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-bottom: 24px; position: relative; z-index: 1;
}

.sc {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: var(--t);
}
.sc:hover { background: rgba(255,255,255,.14); }

.sc-icon {
  width: 44px; height: 44px;
  margin: 0 auto 12px;
  color: var(--white);
}
.sc-icon svg { width: 100%; height: 100%; }
.coin-icon   { color: var(--gold-l); }
.ticket-icon { color: #a78bfa; }
.xp-icon     { color: #34d399; }
.level-icon  { color: #fb923c; }

.sc-num {
  font-family: 'Poppins', sans-serif;
  font-size: 1.7rem; font-weight: 900;
  color: var(--white); line-height: 1;
  margin-bottom: 4px;
}
.sc-lbl { font-size: .78rem; color: rgba(255,255,255,.5); font-weight: 500; }

/* ── XP BAR ─────────────────────────────────────── */
.xp-bar-section { position: relative; z-index: 1; }

.xp-bar-labels {
  display: flex; justify-content: space-between;
  font-size: .78rem; color: rgba(255,255,255,.45);
  margin-bottom: 8px;
}
.xp-bar-center-lbl { font-weight: 700; color: rgba(255,255,255,.65); }

.xp-bar-track {
  height: 8px;
  background: rgba(255,255,255,.12);
  border-radius: 100px; overflow: hidden;
}
.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-l), #34d399);
  border-radius: 100px;
  transition: width .8s cubic-bezier(.4,0,.2,1);
}

/* ── SECTION HEADERS ────────────────────────────── */
.section-hdr {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 16px;
  margin-bottom: 36px;
}
.section-title {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 800; color: var(--navy); margin-bottom: 6px;
}
.section-sub { font-size: .9rem; color: var(--gray-600); }

.section-subhead {
  font-size: 1rem; font-weight: 700; color: var(--navy);
  margin-bottom: 20px;
}

/* ── QUICK ACCESS GRID ──────────────────────────── */
.quick-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-bottom: 48px;
}

.quick-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: var(--t);
}
.quick-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: transparent; }
.quick-card strong { display: block; font-size: .9rem; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.quick-card p { font-size: .8rem; color: var(--gray-600); }

.qc-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── WINNERS STRIP ──────────────────────────────── */
.winners-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}

.winner-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--t);
}
.winner-card:hover { box-shadow: var(--shadow); border-color: transparent; }
.w-emoji { font-size: 1.8rem; margin-bottom: 10px; }
.w-name  { font-weight: 700; color: var(--navy); font-size: .92rem; margin-bottom: 2px; }
.w-prize-name { font-size: .82rem; color: var(--gold); font-weight: 600; margin-bottom: 6px; }
.w-quote-text { font-size: .82rem; color: var(--gray-600); font-style: italic; line-height: 1.55; }

.winner-skeleton, .raffle-skeleton {
  background: var(--gray-100); border-radius: var(--radius);
  height: 140px;
  animation: shimmer 1.4s infinite;
}
.raffle-skeleton { height: 320px; }

@keyframes shimmer {
  0%   { opacity: .6; }
  50%  { opacity: 1; }
  100% { opacity: .6; }
}

/* ── FILTER BUTTONS ─────────────────────────────── */
.raffle-filters { display: flex; gap: 8px; }
.filter-btn {
  padding: 7px 16px;
  border: 1px solid var(--gray-200);
  background: var(--white); color: var(--gray-600);
  font-size: .82rem; font-weight: 600;
  border-radius: 100px; cursor: pointer; transition: var(--t);
}
.filter-btn:hover  { border-color: var(--navy); color: var(--navy); }
.filter-btn.active { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ── RAFFLES GRID ───────────────────────────────── */
.raffles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.raffle-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--t);
  cursor: pointer;
}
.raffle-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: transparent; }

.rc-banner {
  height: 120px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem;
  position: relative;
}

.rc-hot-badge {
  position: absolute; top: 10px; right: 10px;
  padding: 3px 10px;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(4px);
  color: var(--white);
  font-size: .7rem; font-weight: 700;
  border-radius: 100px;
}

.rc-body { padding: 20px; }

.rc-name {
  font-size: 1.1rem; font-weight: 800;
  color: var(--navy); margin-bottom: 4px;
}
.rc-val {
  font-size: .82rem; font-weight: 600; color: var(--green);
  margin-bottom: 14px;
}

.rc-bar-bg {
  height: 6px; background: var(--gray-100);
  border-radius: 100px; overflow: hidden; margin-bottom: 6px;
}
.rc-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy), var(--gold-l));
  border-radius: 100px;
}
.rc-bar-meta {
  display: flex; justify-content: space-between;
  font-size: .74rem; color: var(--gray-400);
  margin-bottom: 14px;
}

.rc-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; border-top: 1px solid var(--gray-100);
}
.rc-cost { font-size: .82rem; color: var(--gray-600); font-weight: 500; }
.rc-entries-mine {
  font-size: .78rem; font-weight: 700; color: var(--purple);
  background: #f3f0ff; padding: 3px 10px; border-radius: 100px;
}

.btn-rc-enter {
  padding: 9px 18px;
  background: var(--navy); color: var(--white);
  font-size: .82rem; font-weight: 700; border-radius: 8px;
  border: none; cursor: pointer; transition: var(--t);
}
.btn-rc-enter:hover { background: var(--navy-mid); }

.rc-end-date { font-size: .74rem; color: var(--gray-400); margin-top: 10px; }

/* ── RITZA PASS ──────────────────────────────────── */
.bp-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.bp-grid .main-card { grid-column: 1 / -1; }

.bp-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.bp-card-head {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 24px;
}
.bp-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bp-card-head strong { display: block; font-size: .95rem; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.bp-card-head p { font-size: .82rem; color: var(--gray-600); }

/* Streak */
.streak-days {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.streak-dot {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--gray-100);
  border: 2px solid var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; color: var(--gray-400);
  transition: var(--t);
}
.streak-dot.done { background: var(--green); border-color: var(--green); color: var(--white); }
.streak-dot.today { border-color: var(--gold-l); background: var(--gold-pale); color: var(--gold); }

.checkin-reward {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 16px; border-top: 1px solid var(--gray-100);
}
.checkin-reward span { font-size: .9rem; color: var(--gray-600); }
.checkin-reward strong { color: var(--navy); }

.btn-claim {
  padding: 10px 24px;
  background: var(--gold-l); color: var(--navy);
  font-size: .88rem; font-weight: 700; border-radius: 8px;
  border: none; cursor: pointer; transition: var(--t);
  box-shadow: 0 2px 10px rgba(240,180,41,.3);
}
.btn-claim:hover { background: var(--gold); transform: translateY(-1px); }
.btn-claim:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* Level rewards */
.level-rewards { display: flex; flex-direction: column; gap: 12px; }

.lvl-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--gray-100); border-radius: 8px;
  font-size: .84rem; color: var(--gray-600);
}
.lvl-row.unlocked { background: var(--green-lt); color: var(--navy); }

.lvl-badge {
  padding: 3px 10px;
  background: var(--navy); color: var(--white);
  font-size: .72rem; font-weight: 700;
  border-radius: 100px; flex-shrink: 0;
}
.lvl-row.unlocked .lvl-badge { background: var(--green); }

.lvl-row > span:nth-child(2) { flex: 1; }
.lvl-check { color: var(--green); font-weight: 700; margin-left: auto; }
.lvl-lock  { margin-left: auto; }

/* Missions */
.missions { display: flex; flex-direction: column; gap: 16px; }

.mission-row {
  display: flex; align-items: center; gap: 16px;
}
.mission-info { flex: 1; }
.mission-info > span { font-size: .85rem; color: var(--navy); font-weight: 500; display: block; margin-bottom: 6px; }
.mission-prog-bg { height: 5px; background: var(--gray-200); border-radius: 100px; overflow: hidden; }
.mission-prog-fill { height: 100%; background: var(--green); border-radius: 100px; transition: width .6s ease; }
.mission-reward { font-size: .82rem; font-weight: 700; color: var(--gold); flex-shrink: 0; }

/* ── EXCHANGE ────────────────────────────────────── */
.exchange-layout {
  display: grid; grid-template-columns: 1fr 380px; gap: 32px;
  align-items: start;
}

.exchange-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 36px;
}

.ex-balance {
  display: flex; align-items: center; gap: 20px;
  justify-content: center;
  margin-bottom: 28px;
}
.ex-balance-item { display: flex; align-items: center; gap: 12px; }
.ex-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
}
.ex-icon.coin   { background: var(--navy); }
.ex-icon.ticket { background: var(--gold-l); color: var(--navy); }
.ex-val { display: block; font-family: 'Poppins', sans-serif; font-size: 1.6rem; font-weight: 900; color: var(--navy); line-height: 1; }
.ex-lbl { font-size: .75rem; color: var(--gray-400); }
.ex-arrow { font-size: 1.4rem; color: var(--gray-400); }

.ex-rate { text-align: center; margin-bottom: 28px; }
.ex-rate-pill {
  display: inline-block;
  padding: 8px 20px;
  background: var(--gold-pale); color: var(--gold);
  font-size: .85rem; font-weight: 700;
  border-radius: 100px; border: 1px solid #f3d97a;
  margin-bottom: 6px;
}
.ex-rate-note { font-size: .8rem; color: var(--gray-400); }

.ex-controls { display: flex; align-items: center; gap: 20px; justify-content: center; margin-bottom: 28px; flex-wrap: wrap; }

.ex-qty-wrap { display: flex; align-items: center; gap: 0; }
.ex-qty-btn {
  width: 40px; height: 40px;
  border: 2px solid var(--gray-200);
  background: var(--white); color: var(--navy);
  font-size: 1.3rem; font-weight: 700;
  border-radius: 8px; cursor: pointer;
  transition: var(--t); line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.ex-qty-btn:hover { border-color: var(--navy); background: var(--gray-100); }

.ex-qty-display {
  min-width: 72px; text-align: center;
  padding: 0 16px;
}
.ex-qty-display span { font-family: 'Poppins', sans-serif; font-size: 1.6rem; font-weight: 900; color: var(--navy); display: block; }
.ex-qty-display small { font-size: .72rem; color: var(--gray-400); }

.ex-cost-display { font-size: .95rem; color: var(--gray-600); }
.ex-cost-display strong { color: var(--navy); }

.btn-exchange {
  width: 100%;
  padding: 16px;
  background: var(--navy); color: var(--white);
  font-size: 1rem; font-weight: 700; border-radius: 10px;
  border: none; cursor: pointer; transition: var(--t);
}
.btn-exchange:hover { background: var(--navy-mid); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-exchange:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.ex-msg {
  margin-top: 14px; text-align: center;
  font-size: .88rem; font-weight: 600; min-height: 22px;
}
.ex-msg.success { color: var(--green); }
.ex-msg.error   { color: var(--red); }

.exchange-info {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.exchange-info h4 { font-size: .95rem; font-weight: 700; color: var(--navy); margin-bottom: 16px; }
.exchange-info ul { padding-left: 18px; display: flex; flex-direction: column; gap: 10px; }
.exchange-info li { font-size: .88rem; color: var(--gray-600); }

.btn-play-link {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 20px; padding: 10px 20px;
  background: var(--gold-pale); color: var(--navy);
  font-size: .85rem; font-weight: 700; border-radius: 8px;
  border: 1px solid #f3d97a; transition: var(--t);
}
.btn-play-link:hover { background: var(--gold-l); }

/* ── ABOUT ───────────────────────────────────────── */
.about-hero {
  background: linear-gradient(150deg, var(--navy) 0%, #163d6a 100%);
  padding: 72px 0;
  text-align: center;
}
.section-tag-white {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(240,180,41,.15);
  color: var(--gold-l);
  font-size: .75rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  border-radius: 100px; border: 1px solid rgba(240,180,41,.3);
  margin-bottom: 20px;
}
.about-hero h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900; color: var(--white);
  margin-bottom: 16px;
}
.about-hero p { font-size: 1rem; color: rgba(255,255,255,.6); max-width: 540px; margin: 0 auto; }

.about-split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
  align-items: center; margin-bottom: 48px;
}
.about-text h3 { font-size: 1.3rem; font-weight: 700; color: var(--navy); margin-bottom: 14px; }
.about-text p  { font-size: .9rem; color: var(--gray-600); line-height: 1.75; margin-bottom: 16px; }

.about-numbers {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.ab-num {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.ab-num strong {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 2rem; font-weight: 900;
  color: var(--navy); margin-bottom: 4px;
}
.ab-num span { font-size: .8rem; color: var(--gray-600); }

/* Past winners grid */
.past-winners-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.pw-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px; transition: var(--t);
}
.pw-card:hover { box-shadow: var(--shadow); border-color: transparent; }
.pw-emoji { font-size: 1.8rem; margin-bottom: 10px; }
.pw-name  { font-weight: 700; color: var(--navy); font-size: .9rem; margin-bottom: 2px; }
.pw-prize { font-size: .8rem; color: var(--gold); font-weight: 600; margin-bottom: 8px; }
.pw-quote { font-size: .82rem; color: var(--gray-600); font-style: italic; line-height: 1.55; }
.pw-loc   { font-size: .75rem; color: var(--gray-400); margin-top: 10px; }

/* ── AUTH MODAL ──────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(11,37,69,.7);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 100%; max-width: 420px;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,.25);
}

.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none;
  font-size: 1rem; color: var(--gray-400);
  cursor: pointer; width: 28px; height: 28px;
  border-radius: 50%; transition: var(--t);
}
.modal-close:hover { background: var(--gray-100); color: var(--navy); }

.modal-logo {
  font-family: 'Poppins', sans-serif;
  font-size: 1.6rem; font-weight: 900;
  color: var(--navy); text-align: center;
  margin-bottom: 24px; letter-spacing: -.02em;
}
.modal-logo span { color: var(--gold-l); }

.auth-tabs {
  display: flex; gap: 4px; margin-bottom: 28px;
  background: var(--gray-100); padding: 4px;
  border-radius: 10px;
}
.auth-tab {
  flex: 1; padding: 9px;
  background: none; border: none;
  font-size: .88rem; font-weight: 600; color: var(--gray-400);
  border-radius: 8px; cursor: pointer; transition: var(--t);
}
.auth-tab.active { background: var(--white); color: var(--navy); box-shadow: 0 1px 6px rgba(0,0,0,.08); }

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .82rem; font-weight: 600; color: var(--navy); }
.form-group input {
  padding: 12px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: .92rem; color: var(--text);
  font-family: inherit;
  transition: var(--t);
  outline: none;
}
.form-group input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(11,37,69,.08); }

.btn-auth {
  padding: 14px;
  background: var(--navy); color: var(--white);
  font-size: .95rem; font-weight: 700; border-radius: 10px;
  border: none; cursor: pointer; transition: var(--t);
  margin-top: 4px;
}
.btn-auth:hover { background: var(--navy-mid); }
.btn-auth:disabled { opacity: .6; cursor: not-allowed; }

.auth-error {
  font-size: .82rem; color: var(--red);
  background: var(--red-lt); border-radius: 8px;
  padding: 0; max-height: 0; overflow: hidden; transition: all .3s;
}
.auth-error.show { padding: 10px 14px; max-height: 80px; }

.auth-note  { font-size: .8rem; color: var(--green); text-align: center; }
.auth-switch { font-size: .82rem; color: var(--gray-600); text-align: center; }

.link-btn {
  background: none; border: none;
  color: var(--navy); font-weight: 600; font-size: inherit;
  cursor: pointer; text-decoration: underline;
  font-family: inherit;
}

/* ── ENTRY MODAL ─────────────────────────────────── */
.entry-modal { text-align: center; }
.em-emoji { font-size: 3rem; margin-bottom: 12px; }
.em-emoji-text { font-size: 3rem; margin-bottom: 12px; }
.entry-modal h3 { font-size: 1.4rem; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.entry-modal > p { font-size: .88rem; color: var(--gray-600); margin-bottom: 20px; }
.em-cost { font-size: .88rem; color: var(--gold); font-weight: 700; margin-bottom: 20px; }
.em-qty-wrap { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 16px; }
.em-total { font-size: .9rem; color: var(--gray-600); margin-bottom: 20px; }
.em-total strong { color: var(--navy); }

/* ── TOAST ───────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  padding: 14px 22px;
  background: var(--navy); color: var(--white);
  font-size: .9rem; font-weight: 600;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  transform: translateY(80px); opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--green); }
.toast.error   { background: var(--red); }

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 1024px) {
  .stat-cards      { grid-template-columns: repeat(2, 1fr); }
  .quick-grid      { grid-template-columns: repeat(2, 1fr); }
  .raffles-grid    { grid-template-columns: repeat(2, 1fr); }
  .winners-strip   { grid-template-columns: repeat(2, 1fr); }
  .exchange-layout { grid-template-columns: 1fr; }
  .about-split     { grid-template-columns: 1fr; gap: 40px; }
  .past-winners-grid { grid-template-columns: repeat(2, 1fr); }
  .bp-grid         { grid-template-columns: 1fr; }
  .bp-grid .main-card { grid-column: 1; }
}

@media (max-width: 768px) {
  .nav-tabs { display: none; }
  .stat-cards   { grid-template-columns: repeat(2, 1fr); }
  .quick-grid   { grid-template-columns: 1fr 1fr; }
  .raffles-grid { grid-template-columns: 1fr; }
  .winners-strip { grid-template-columns: 1fr; }
  .past-winners-grid { grid-template-columns: 1fr; }
  .section-hdr  { flex-direction: column; }
  .dash-welcome { flex-direction: column; align-items: flex-start; gap: 16px; }
}
