:root {
  --purple: #8b5cc7;
  --purple-dark: #6f43a8;
  --purple-soft: #f1e9fa;
  --orange: #f28b45;
  --ink: #261d31;
  --muted: #746b7c;
  --line: #e9e1ee;
  --paper: #fffdf9;
  --success: #248a60;
  --danger: #b83a4b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #e9e4ec;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 50% 0, #f7effd 0, #e7e1e9 52%, #ded8e1 100%); }
body.modal-open { overflow: hidden; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; }
.hidden { display: none !important; }

.phone-shell { width: min(100%, 520px); min-height: 100vh; margin: 0 auto; background: var(--paper); box-shadow: 0 0 50px rgba(49, 29, 65, .12); position: relative; overflow: hidden; }
.topbar { height: 70px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--line); background: rgba(255,253,249,.94); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(12px); }
.brand { color: var(--ink); display: flex; align-items: center; gap: 9px; font-size: 21px; font-weight: 800; text-decoration: none; letter-spacing: -.5px; }
.brand-logo { width: 38px; height: 38px; display: block; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 12px; color: white; background: linear-gradient(135deg, #a579dc, var(--purple-dark)); box-shadow: 0 7px 16px rgba(139,92,199,.25); }
.balance-pill { border: 0; background: var(--purple-soft); color: var(--purple-dark); border-radius: 14px; padding: 7px 12px; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.balance-pill span { font-size: 10px; text-transform: uppercase; letter-spacing: .7px; }
.balance-pill strong { font-size: 14px; }
.balance-pill.guest-auth-button { min-height: 42px; justify-content: center; align-items: center; padding-inline: 14px; }
.balance-pill.guest-auth-button span { font-size: 12px; font-weight: 800; text-transform: none; letter-spacing: 0; }
.page { padding: 18px 18px 40px; }

.hero-card { padding: 28px 24px; border-radius: 28px; color: white; background: linear-gradient(145deg, #9d73d3 0%, #8050bd 65%, #6f43a8 100%); box-shadow: 0 18px 35px rgba(104,62,147,.22); position: relative; overflow: hidden; }
.hero-card::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.08); right: -70px; top: -70px; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 1.1px; margin: 0 0 8px; color: var(--purple-dark); }
.hero-card .eyebrow { color: #ecddff; }
.hero-card h1 { margin: 0; font-size: 31px; letter-spacing: -1.2px; line-height: 1.08; }
.hero-card h1 span { color: #ffd0ad; }
.hero-card > p:not(.eyebrow) { color: #f1e9fa; line-height: 1.5; max-width: 340px; margin: 12px 0 22px; }
.hero-numbers { display: flex; gap: 9px; position: relative; z-index: 1; }
.hero-numbers span { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 50%; background: white; color: var(--purple-dark); font-weight: 800; box-shadow: 0 5px 12px rgba(50,20,75,.16); }
.draw-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding: 17px 18px; border: 1px solid #eee0d5; border-radius: 18px; background: #fff8f1; }
.draw-card h2 { margin: 0 0 4px; font-size: 18px; }
.draw-card > div > span { color: var(--muted); font-size: 12px; }
.prize-block { text-align: right; }
.prize-block strong { display: block; color: var(--orange); font-size: 20px; margin-top: 4px; }
.prize-block span { font-size: 10px !important; text-transform: uppercase; letter-spacing: .5px; }
.draw-card > div > small { display: block; margin-top: 7px; color: var(--orange); font-size: 11px; font-weight: 750; }
.countdown-block { min-width: 142px; padding: 12px 13px; border-radius: 15px; text-align: center; background: white; border: 1px solid #efdfd3; }
.countdown-block span, .countdown-block small { display: block; }
.countdown-block span { color: var(--muted); font-size: 9px !important; text-transform: uppercase; letter-spacing: .4px; }
.countdown-block strong { display: block; margin: 5px 0 2px; color: var(--purple-dark); font-size: 19px; font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.countdown-block small { color: var(--muted) !important; font-size: 9px !important; }

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 26px 0 12px; padding: 4px; background: #f1ecf2; border-radius: 14px; }
.auth-overlay { position: fixed; inset: 0; z-index: 40; display: grid; align-items: end; justify-items: center; padding: 18px; background: rgba(38,29,49,.5); backdrop-filter: blur(6px); }
.auth-modal { width: min(100%, 484px); max-height: calc(100vh - 36px); overflow-y: auto; padding: 22px; border-radius: 28px 28px 22px 22px; background: var(--paper); box-shadow: 0 24px 70px rgba(38,29,49,.28); position: relative; }
.auth-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; color: var(--muted); background: #f2edf4; font-size: 25px; line-height: 1; }
.auth-brand { display: flex; align-items: center; gap: 12px; padding-right: 42px; }
.auth-brand img { width: 50px; height: 50px; }
.auth-brand strong, .auth-brand span { display: block; }
.auth-brand strong { font-size: 22px; }
.auth-brand span { color: var(--muted); font-size: 13px; margin-top: 2px; }
.auth-tab { border: 0; background: transparent; color: var(--muted); border-radius: 11px; padding: 11px; font-weight: 750; }
.auth-tab.active { color: var(--purple-dark); background: white; box-shadow: 0 3px 10px rgba(46,34,55,.08); }
.card { background: white; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 8px 26px rgba(48,32,55,.055); }
.form-card { padding: 20px; display: grid; gap: 16px; }
label { display: grid; gap: 7px; color: #514857; font-size: 13px; font-weight: 700; }
input { width: 100%; height: 48px; border: 1px solid #ddd4e3; background: #fff; border-radius: 13px; padding: 0 14px; color: var(--ink); outline: none; transition: .2s; }
select, textarea { width: 100%; border: 1px solid #ddd4e3; background: #fff; border-radius: 13px; padding: 11px 14px; color: var(--ink); outline: none; font: inherit; }
textarea:focus, select:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(139,92,199,.12); }
input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(139,92,199,.12); }
.password-wrap { position: relative; display: block; }
.phone-input-wrap { display: flex; align-items: center; border: 1px solid #ddd4e3; border-radius: 13px; background: white; overflow: hidden; }
.phone-input-wrap:focus-within { border-color: var(--purple); }
.phone-country-code { padding: 0 12px 0 14px; border-right: 1px solid #ddd4e3; color: var(--ink); white-space: nowrap; }
.phone-input-wrap input { border: 0; border-radius: 0; min-width: 0; box-shadow: none; }
.phone-help, .phone-error { display: block; margin-top: 6px; font-size: 11px; font-weight: 400; line-height: 1.4; }
.phone-help { color: var(--muted); }
.phone-error { color: #b33349; }
.phone-input-wrap:has(input[aria-invalid="true"]) { border-color: #b33349; }
.password-wrap input { padding-right: 78px; }
.password-wrap button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.primary-button { border: 0; border-radius: 14px; min-height: 50px; padding: 0 18px; color: white; background: linear-gradient(135deg, #996bd2, var(--purple)); font-weight: 800; box-shadow: 0 8px 18px rgba(139,92,199,.22); }
.primary-button:disabled { opacity: .55; cursor: not-allowed; }
.primary-button.compact { min-height: 42px; margin-top: 20px; width: 100%; }
.primary-button small { display: block; font-weight: 500; opacity: .85; }
.text-button { border: 0; background: transparent; color: var(--purple-dark); font-size: 12px; font-weight: 800; padding: 7px; }
.outline-button { border: 1px solid #d9cbe5; background: rgba(255,255,255,.55); color: var(--purple-dark); padding: 9px 14px; border-radius: 12px; font-weight: 750; }
.icon-button { width: 46px; height: 46px; border-radius: 13px; border: 1px solid #ddd4e3; background: var(--purple-soft); color: var(--purple-dark); font-size: 20px; }
.form-note { color: var(--muted); font-size: 12px; text-align: center; margin: -2px 0 0; }
.captcha-row { display: grid; grid-template-columns: 1fr 110px 46px; gap: 9px; align-items: end; }
.captcha-row strong { height: 48px; display: flex; align-items: center; color: var(--purple-dark); font-size: 18px; }

.wallet-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; }
.wallet-main, .wallet-side { border-radius: 22px; padding: 20px; }
.wallet-main { background: linear-gradient(145deg, #9c72d1, #7950b0); color: white; box-shadow: 0 14px 28px rgba(100,63,140,.2); }
.wallet-side { background: #f7f1ec; border: 1px solid #eee1d8; }
.wallet-main span, .wallet-side span { display: block; font-size: 12px; opacity: .8; margin-bottom: 8px; }
.wallet-main > strong { display: block; font-size: 28px; letter-spacing: -.8px; }
.wallet-side strong { display: block; font-size: 18px; color: var(--orange); }
.phase-card { margin-top: 16px; padding: 17px; display: flex; align-items: center; gap: 14px; background: #f7fbf8; border-color: #dceee4; }
.phase-icon { width: 37px; height: 37px; border-radius: 50%; display: grid; place-items: center; flex: none; color: white; background: var(--success); font-weight: 900; }
.phase-card p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.section-block { margin-top: 28px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 11px; }
.section-heading h2, .next-card h2 { margin: 0; font-size: 20px; }
.empty-state { padding: 30px 20px; text-align: center; background: white; border: 1px dashed #d9cfdf; border-radius: 18px; color: var(--muted); }
.empty-state span { color: var(--purple); font-size: 28px; }
.empty-state strong { display: block; color: var(--ink); margin-top: 6px; }
.empty-state p { margin: 5px auto 0; max-width: 290px; font-size: 13px; line-height: 1.45; }
.transaction-list { display: grid; gap: 9px; }
.transaction-row { display: flex; justify-content: space-between; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.transaction-row span { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.amount-positive { color: var(--success); }
.amount-negative { color: var(--danger); }
.next-card { margin-top: 20px; border-radius: 20px; padding: 20px; background: #fff3e9; border: 1px solid #f7dfcd; }
.next-card .eyebrow { color: #b65f27; }
.next-card p:last-child { color: #735a4b; font-size: 13px; line-height: 1.45; margin-bottom: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); width: min(calc(100% - 36px), 480px); padding: 13px 16px; border-radius: 13px; color: white; background: #302638; box-shadow: 0 10px 30px rgba(0,0,0,.2); opacity: 0; pointer-events: none; transition: .2s; z-index: 20; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.error { background: var(--danger); }
.button-loading { opacity: .72; cursor: wait !important; }

@media (max-width: 380px) {
  .page { padding-inline: 12px; }
  .topbar { padding-inline: 14px; }
  .hero-card h1 { font-size: 27px; }
  .wallet-grid { grid-template-columns: 1fr; }
  .captcha-row { grid-template-columns: 1fr 90px 46px; }
  .draw-card { align-items: flex-start; flex-direction: column; }
  .prize-block { text-align: left; }
  .countdown-block { width: 100%; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* Complete H5 application */
.app-page { padding-bottom: 94px; }
.app-panel { min-height: 620px; }
.promo-carousel { margin-bottom: 14px; }
.carousel-track { position: relative; height: 188px; overflow: hidden; border-radius: 24px; }
.carousel-slide { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 23px; opacity: 0; transform: translateX(24px); pointer-events: none; transition: opacity .35s ease, transform .35s ease; overflow: hidden; }
.carousel-slide.active { opacity: 1; transform: translateX(0); pointer-events: auto; }
.carousel-slide h2 { margin: 0; max-width: 260px; font-size: 25px; line-height: 1.05; letter-spacing: -.7px; }
.carousel-slide p:not(.eyebrow) { margin: 8px 0 13px; max-width: 260px; font-size: 13px; line-height: 1.4; }
.carousel-slide button { border: 0; border-radius: 11px; padding: 9px 12px; color: inherit; background: rgba(255,255,255,.84); font-size: 12px; font-weight: 800; }
.slide-play { color: white; background: linear-gradient(135deg, #ad88db, #8054b5); }
.slide-play .eyebrow { color: #f3eaff; }
.slide-result { color: #2e2650; background: linear-gradient(135deg, #e9e4ff, #d7cef8); }
.slide-wallet { color: #3a2938; background: linear-gradient(135deg, #fff0e3, #f8d9c1); }
.slide-welcome { display: block; color: #4e297d; background: #efe4fb; }
.welcome-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.welcome-copy { position: relative; z-index: 1; width: 62%; }
.slide-welcome h2 { font-size: 29px; line-height: 1.1; }
.slide-welcome p:not(.eyebrow) { margin: 6px 0 10px; }
.slide-welcome button { color: white; background: #8959c3; }
.welcome-copy small { display: block; font-size: 9px; line-height: 1.4; margin-top: 7px; }
.signup-bonus-notice { display: grid; gap: 5px; background: #f3eafb; border: 1px solid #e0cef1; border-radius: 13px; padding: 13px; color: var(--purple-dark); }
.signup-bonus-notice strong { font-size: 14px; }
.signup-bonus-notice span { font-size: 11px; line-height: 1.4; }
.carousel-balls { width: 98px; height: 112px; position: relative; }
.carousel-balls span { position: absolute; width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; color: var(--purple-dark); background: white; font-weight: 900; box-shadow: 0 8px 18px rgba(48,25,70,.17); }
.carousel-balls span:nth-child(1) { top: 0; left: 0; }.carousel-balls span:nth-child(2) { top: 35px; right: 0; }.carousel-balls span:nth-child(3) { bottom: 0; left: 5px; }
.carousel-icon { width: 70px; height: 70px; display: grid; place-items: center; border-radius: 24px; color: white; background: rgba(111,67,168,.78); font-size: 34px; font-weight: 900; transform: rotate(-5deg); }
.slide-wallet .carousel-icon { background: rgba(242,139,69,.8); }
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 8px 0 2px; }
.carousel-controls > button { width: 28px; height: 28px; border: 0; border-radius: 50%; color: var(--purple-dark); background: var(--purple-soft); font-size: 20px; line-height: 1; }
.carousel-dots { display: flex; gap: 7px; }
.carousel-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 9px; background: #d9d0df; transition: width .2s ease; }
.carousel-dots button.active { width: 22px; background: var(--purple); }
.betting-heading { margin-top: 26px; }
.betting-heading > strong { color: var(--purple-dark); background: var(--purple-soft); border-radius: 20px; padding: 7px 11px; }
.number-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 64px)); justify-content: center; gap: 12px; margin: 14px 0; }
.number-ball { aspect-ratio: 1; border-radius: 50%; border: 1px solid #ded4e6; color: #51475a; background: white; font-weight: 800; box-shadow: 0 4px 10px rgba(50,35,60,.05); }
.number-ball.selected { border-color: var(--purple); color: white; background: linear-gradient(145deg, #a173d8, var(--purple-dark)); box-shadow: 0 6px 14px rgba(111,67,168,.24); }
.bet-tools { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.bet-tools > div { display: flex; gap: 7px; }
.bet-tools .bet-tools-secondary { align-items: center; gap: 12px; }
#howToPlayButton { white-space: nowrap; font-size: 11px; }
#howToPlayButton span { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1px solid currentColor; border-radius: 50%; margin-left: 3px; font-size: 10px; }
.product-dialog { width: min(480px, calc(100% - 24px)); max-height: 88dvh; overflow-y: auto; border: 1px solid var(--line); border-radius: 24px; padding: 22px; color: var(--ink); background: var(--paper); box-shadow: 0 20px 70px #261a4140; }
.product-dialog::backdrop { background: #261a4180; backdrop-filter: blur(3px); }
body:has(.product-dialog[open]) { overflow: hidden; }
.product-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.product-dialog-heading h2 { margin: 4px 0 0; font-size: 23px; }
.product-dialog-heading .eyebrow { margin: 0; }
.dialog-close { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f0eaf6; color: var(--muted); font-size: 24px; }
.play-guide { display: grid; gap: 12px; margin-bottom: 18px; }
.play-guide section { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.play-guide h3 { margin: 0 0 6px; font-size: 15px; color: var(--purple-dark); }
.play-guide p { margin: 0; line-height: 1.55; font-size: 13px; }
.product-dialog > .primary-button { width: 100%; }
.review-summary { margin: 0 0 14px; display: grid; gap: 9px; background: var(--purple-soft); border-radius: 14px; padding: 14px; }
.review-summary > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.review-summary dt { font-size: 12px; color: var(--muted); }
.review-summary dd { margin: 0; font-size: 13px; text-align: right; font-weight: 800; }
.review-game { margin-bottom: 9px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.review-game strong { font-size: 13px; }
.review-game p { margin: 6px 0; color: var(--purple-dark); font-weight: 750; line-height: 1.5; font-size: 13px; overflow-wrap: anywhere; }
.review-game small { color: var(--muted); font-size: 11px; }
.review-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--line); }
.review-total span { font-size: 13px; }
.review-total strong { color: var(--purple-dark); font-size: 24px; white-space: nowrap; }
.review-note { color: var(--muted); font-size: 12px; line-height: 1.5; }
.review-error { color: #b33349; background: #fff0f2; border-radius: 10px; padding: 10px; font-size: 12px; }
.review-actions { display: grid; gap: 9px; margin-top: 16px; }
.review-actions .primary-button { order: -1; }
.bet-groups { display: grid; gap: 7px; margin-bottom: 12px; }
.bet-group { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--purple-soft); color: var(--purple-dark); font-size: 12px; }
.bet-group button { border: 0; background: transparent; color: var(--danger); font-weight: 800; }
.bet-checkout { padding: 18px; display: grid; gap: 16px; }
.ticket-count-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px; border-radius: 14px; background: #f8f4fa; }
.ticket-count-row > div:first-child strong, .ticket-count-row > div:first-child span { display: block; }
.ticket-count-row > div:first-child strong { font-size: 13px; }
.ticket-count-row > div:first-child span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.quantity-stepper { display: grid; grid-template-columns: 34px 36px 34px; align-items: center; flex: none; border: 1px solid #d9cbe5; border-radius: 12px; overflow: hidden; background: white; }
.quantity-stepper button { height: 36px; border: 0; color: var(--purple-dark); background: var(--purple-soft); font-size: 21px; }
.quantity-stepper output { text-align: center; color: var(--ink); font-weight: 850; }
.bet-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bet-totals span { padding: 12px; border-radius: 14px; background: #f8f4fa; }
.bet-totals small { display: block; color: var(--muted); margin-bottom: 4px; }
.bet-totals strong { font-size: 19px; color: var(--purple-dark); }
.result-card { padding: 20px; }
.result-numbers { display: grid; grid-template-columns: repeat(5, minmax(0, 52px)); justify-content: center; gap: 8px; margin: 16px 0; }
.result-number { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; color: white; background: var(--purple); font-weight: 800; }
.result-history { margin-top: 28px; }
.result-history-list { display: grid; gap: 10px; }
.history-result-card { padding: 15px; border: 1px solid var(--line); border-radius: 17px; background: white; box-shadow: 0 5px 16px rgba(48,32,55,.04); }
.history-result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.history-result-head strong { font-size: 15px; }
.history-result-head span { color: var(--muted); font-size: 11px; }
.history-numbers { display: grid; grid-template-columns: repeat(15, 1fr); gap: 4px; }
.history-numbers span { aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; color: var(--purple-dark); background: var(--purple-soft); font-size: 9px; font-weight: 800; }
.tier-list, .order-list, .withdrawal-list { display: grid; gap: 9px; }
.tier-row, .order-row, .withdrawal-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 14px; background: #faf7fb; border: 1px solid var(--line); }
.tier-row span, .order-row span, .withdrawal-row span { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.order-row .order-main { min-width: 0; flex: 1; }
.order-row .order-summary { flex: 0 0 auto; max-width: 34%; text-align: right; }
.order-row .order-summary > strong { white-space: nowrap; }
.order-row .order-summary .bet-status { text-align: center; white-space: normal; }
.order-numbers { color: var(--purple-dark) !important; font-weight: 750; letter-spacing: .4px; }
.order-row.order-tone-pending { background: #fff8e7; border-color: #ecd8a7; }
.order-row.order-tone-processing { background: #eef5ff; border-color: #bdd2f0; }
.order-row.order-tone-prize-pending { background: #f4edff; border-color: #d8c3ed; }
.order-row.order-tone-won { background: #eaf8ef; border-color: #b4dfc2; }
.order-row.order-tone-lost { background: #f2f3f5; border-color: #dadde2; }
.order-row.order-tone-refunded { background: #e8f7f6; border-color: #a8dad4; }
.order-row.order-tone-cancelled { background: #fff0f0; border-color: #e9c3c3; }
.order-row .bet-status { display: inline-block; padding: 5px 8px; border-radius: 8px; font-size: 11px; font-weight: 800; line-height: 1.35; }
.bet-status-pending { color: #795716 !important; background: #fae9b7; }
.bet-status-processing { color: #285a96 !important; background: #dce9ff; }
.bet-status-prize-pending { color: #6d4298 !important; background: #e9dcf8; }
.bet-status-won { color: #21633f !important; background: #ccecd7; }
.bet-status-lost { color: #555e6c !important; background: #e1e4e9; }
.bet-status-refunded { color: #236a64 !important; background: #c9eeea; }
.bet-status-cancelled { color: #8e4242 !important; background: #f6dada; }
.money-actions { padding: 18px; margin-top: 16px; }
.money-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 5px; background: #f2edf7; border-radius: 14px; margin-bottom: 20px; }
.money-tab { min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 800; }
.money-tab.active { color: var(--purple-dark); background: white; box-shadow: 0 3px 10px #39254c10; }
.money-form { display: grid; gap: 12px; }
.payment-channel { display: flex; gap: 11px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 4px; background: #fcfaff; }
.payment-channel strong { display: block; font-size: 16px; }
.payment-channel div > span { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.pix-symbol { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #e2f7f2; color: #178976; font-size: 30px; }
.currency-tag { margin-left: auto; color: var(--purple-dark); background: var(--purple-soft); border-radius: 7px; padding: 5px 8px; font-size: 11px; font-weight: 800; }
.money-form > label { display: grid; gap: 8px; }
.money-amount { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 13px; padding-left: 15px; background: white; }
.money-amount:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px #8b5cc714; }
.money-amount > span { color: var(--muted); font-weight: 700; }
.money-amount input { border: 0; background: transparent; box-shadow: none; font-size: 23px; font-weight: 800; height: 58px; min-width: 0; }
.money-limit { margin: -5px 0 2px; color: var(--muted); font-size: 11px; }
.deposit-shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.amount-shortcut { padding: 12px 3px; min-height: 46px; border: 1px solid var(--line); border-radius: 10px; background: #faf7fd; color: var(--ink); font-size: 12px; font-weight: 800; white-space: nowrap; }
.amount-shortcut.active { border-color: var(--purple); color: var(--purple-dark); background: var(--purple-soft); box-shadow: inset 0 0 0 1px var(--purple); }
.money-submit { width: 100%; margin-top: 6px; }
.money-note { margin: 0; text-align: center; color: var(--muted); font-size: 11px; line-height: 1.5; }
.withdraw-balance { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px; border-radius: 12px; background: var(--purple-soft); margin-bottom: 4px; }
.withdraw-balance span { color: var(--muted); font-size: 12px; }
.withdraw-balance strong { color: var(--purple-dark); font-size: 18px; white-space: nowrap; }
.mini-form { padding: 16px; display: grid; gap: 11px; align-content: start; }
.mini-form .eyebrow { margin: 0; }
.pix-payment { padding: 18px; margin-top: 14px; display: grid; gap: 12px; }
.pix-payment h3 { margin: 0; }
.pix-payment code { display: block; overflow-wrap: anywhere; padding: 12px; border-radius: 12px; background: #f4eff7; color: var(--purple-dark); }
.pix-payment small { color: var(--muted); line-height: 1.4; }
.account-heading { margin-bottom: 14px; }
.account-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; margin-top: 24px; padding: 18px; }
.account-card img { width: 48px; height: 48px; }
.account-card h2 { margin: 0 0 4px; font-size: 18px; }
.account-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.account-card > button { grid-column: 1 / -1; }
.account-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.account-actions .primary-button { min-height: 44px; }
.profile-card .brand-mark { margin: 0 auto 14px; }
.profile-card h2 { margin: 0; }
.profile-card p { color: var(--muted); }
.profile-card button { margin-top: 12px; }
.pool-box { margin-top: 14px; padding: 16px; }
.pool-box summary { cursor: pointer; color: var(--purple-dark); font-weight: 800; }
.pool-box > p { color: var(--muted); font-size: 12px; line-height: 1.45; }
.pool-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pool-form button { grid-column: 1 / -1; }
.pool-heading { margin-top: 18px; }
.pool-heading h3 { margin: 0; font-size: 16px; }
.pool-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 13px; margin-top: 8px; }
.pool-row span { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.bottom-nav { position: fixed; z-index: 8; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 520px); display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,253,249,.96); backdrop-filter: blur(14px); }
.nav-item { border: 0; background: transparent; color: #8b818f; font-size: 10px; font-weight: 750; padding: 5px 2px; }
.nav-item span { display: block; font-size: 18px; line-height: 1; margin-bottom: 4px; }
.nav-item.active { color: var(--purple-dark); }

@media (max-width: 420px) {
  .money-actions { grid-template-columns: 1fr; }
  .number-grid { grid-template-columns: repeat(5, minmax(0, 56px)); gap: 9px; }
  .bet-tools { align-items: stretch; gap: 8px; flex-direction: column; }
  .bet-tools > div { display: grid; grid-template-columns: 1fr 1fr; }
  .bet-tools .outline-button { min-height: 44px; }
  .tier-row, .order-row, .withdrawal-row { align-items: flex-start; }
  .carousel-track { height: 178px; }
  .carousel-slide { padding: 19px; }
  .carousel-slide h2 { font-size: 22px; }
  .carousel-balls { width: 78px; transform: scale(.85); transform-origin: right center; }
  .result-numbers { grid-template-columns: repeat(5, minmax(0, 48px)); gap: 7px; }
  .history-numbers { grid-template-columns: repeat(8, 1fr); gap: 6px; }
  .history-numbers span { font-size: 10px; }
}

/* Administration */
.admin-body { background: #f1edf4; }
.admin-shell { width: min(1440px, 100%); min-height: 100vh; margin: 0 auto; background: #faf8fb; }
.admin-topbar { min-height: 70px; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #2f2438; color: white; }
.admin-topbar .brand { color: white; }
.admin-badge { background: rgba(255,255,255,.12); border-radius: 12px; padding: 8px 12px; font-size: 12px; }
.admin-panel-header input { max-width: 260px; height: 40px; }
.admin-panel-header select { max-width: 180px; }
.record-count { padding: 0 18px; color: var(--muted); font-size: 12px; }
.admin-rules { padding: 20px; line-height: 1.7; }
.admin-dialog { width: min(720px, calc(100% - 32px)); max-height: 85vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 20px; padding: 24px; background: var(--paper); color: var(--ink); }
.admin-dialog::backdrop { background: rgba(38,29,49,.5); }
.admin-dialog p { overflow-wrap: anywhere; }
.admin-panel .data-table td { max-width: 320px; overflow-wrap: anywhere; }
.admin-content { padding: 28px 24px 50px; }
.admin-workspace { display: grid; grid-template-columns: 176px minmax(0, 1fr); align-items: start; gap: 24px; }
.admin-workspace-main { min-width: 0; }
.admin-login { max-width: 430px; margin: 50px auto; }
.admin-login h1 { margin: 0 0 8px; }
.admin-login > p { color: var(--muted); margin: 0 0 20px; }
.admin-dashboard-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.admin-dashboard-header > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-dashboard-header h1 { margin: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
.metric-card { padding: 19px; border-radius: 17px; background: white; border: 1px solid var(--line); }
.metric-card span { display: block; color: var(--muted); font-size: 12px; }
.metric-card strong { display: block; font-size: 27px; margin-top: 6px; }
.admin-tabs { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 6px; max-height: calc(100dvh - 40px); overflow-y: auto; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.admin-tab { width: 100%; min-height: 44px; white-space: nowrap; text-align: left; border: 1px solid transparent; color: var(--muted); background: transparent; padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.admin-tab:hover { color: var(--purple-dark); background: var(--purple-soft); }
.admin-tab:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.admin-tab.active { color: white; background: var(--purple); border-color: var(--purple); }
.admin-panel { border: 1px solid var(--line); border-radius: 18px; background: white; overflow: hidden; }
.admin-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 18px; border-bottom: 1px solid var(--line); }
.admin-panel-header h2 { margin: 0; font-size: 18px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 13px 16px; border-bottom: 1px solid #eee8f1; text-align: left; }
.data-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; background: #fbf9fc; }
.data-table tbody tr:last-child td { border: 0; }
.status-chip { display: inline-block; border-radius: 20px; padding: 5px 9px; color: var(--success); background: #e7f5ee; font-size: 11px; font-weight: 800; }
.status-chip.pending { color: #9a591f; background: #fff0df; }
.status-chip.rejected { color: var(--danger); background: #fae8eb; }
.adjustment-form { display: grid; grid-template-columns: 1.4fr .8fr 2fr auto; gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); align-items: end; }
.adjustment-form input { height: 42px; }
.adjustment-form .primary-button { min-height: 42px; }
.table-action { border: 0; border-radius: 8px; padding: 7px 9px; background: var(--purple-soft); color: var(--purple-dark); font-weight: 750; margin-right: 4px; }
.table-action.reject { background: #fae8eb; color: var(--danger); }
.table-scroll { overflow-x: auto; }
.import-draw { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; padding: 16px; border-bottom: 1px solid var(--line); }
.import-draw textarea { min-height: 90px; resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.source-status-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); background: #fbf9fc; }
.source-status-grid > div { padding: 12px; border-radius: 12px; background: white; border: 1px solid var(--line); }
.source-status-grid span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.source-status-grid strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.source-error { grid-column: 1 / -1; margin: 0; color: var(--danger); font-size: 12px; }

@media (max-width: 740px) {
  .metric-grid { grid-template-columns: 1fr; }
  .adjustment-form { grid-template-columns: 1fr; }
  .import-draw { grid-template-columns: 1fr; }
  .admin-content { padding: 20px 14px 40px; }
  .admin-workspace { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; }
  .admin-tabs { padding: 6px; border-radius: 12px; }
  .admin-tab { padding: 10px 8px; font-size: 13px; }
  .admin-topbar { padding-inline: 14px; }
  .admin-topbar, .admin-dashboard-header, .admin-panel-header { flex-wrap: wrap; }
  .source-status-grid { grid-template-columns: 1fr 1fr; }
  .admin-badge { max-width: 100%; overflow-wrap: anywhere; }
}

@media (max-width: 420px) {
  input, select, textarea { font-size: 16px; }
  .source-status-grid { grid-template-columns: 1fr; }
  .source-error { grid-column: 1; }
}

.phone-shell .toast { display: flex; align-items: center; gap: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); width: min(calc(100% - 32px), 472px); max-height: 30dvh; overflow-y: auto; padding: 14px; border: 1px solid #d9e9e1; border-radius: 18px; background: #fff; color: #274638; box-shadow: 0 8px 28px rgba(38,29,49,.12), 0 2px 6px rgba(38,29,49,.04); transform: translate(-50%, 8px); visibility: hidden; transition: opacity .2s ease, transform .2s ease, visibility .2s; }
.phone-shell .toast.show { transform: translate(-50%, 0); visibility: visible; pointer-events: auto; }
.phone-shell .toast.error { border-color: #f1d8dc; background: #fff; color: #8f3545; }
.toast-icon { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; background: #eaf6ef; color: #25865a; }
.toast-icon svg { width: 20px; height: 20px; }
.toast.error .toast-icon { background: #fff0f2; color: #bb455b; }
.toast-message { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.toast-close { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #8b818f; font-size: 22px; line-height: 1; }
.toast-close:hover { background: #f5f1f7; }
.toast-close:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .phone-shell .toast { transition: none; } }

.transaction-row > div { min-width: 0; }
.transaction-row > strong { flex-shrink: 0; white-space: nowrap; margin-left: 12px; }
.transaction-row .transaction-status { display: inline-block; padding: 4px 8px; margin-top: 8px; border-radius: 7px; font-size: 10px; font-weight: 700; line-height: 1.4; }
.transaction-status.pending { color: #94620d; background: #fff3d5; }
.transaction-status.complete { color: #23734f; background: #e6f5ed; }
.transaction-status.failed { color: #766676; background: #f2edf3; }
.history-more > summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; list-style: none; color: var(--purple-dark); background: #faf7fe; font-size: 12px; font-weight: 700; cursor: pointer; }
.history-more > summary::-webkit-details-marker { display: none; }
.history-more > summary::after { content: '⌄'; font-size: 16px; }
.history-more[open] > summary::after { content: '⌃'; }
.history-more > summary:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.history-more[open] > div { margin-top: 9px; }
