@import url("../css/tokens.css");

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.dashboard {
  min-height: 100vh;
  padding-top: 48px;
  padding-left: 190px;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.brand {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 18px;
  background: transparent;
}

.brand img {
  width: 124px;
  height: auto;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding-right: 18px;
}

.top-actions button {
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 17px;
}

.currency-toggle {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: var(--yellow);
  background: rgba(255, 255, 255, 0.1);
}

.currency-icon {
  display: none;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 999px;
}

.currency-icon.active {
  display: grid;
}

.currency-icon svg {
  display: block;
  width: 20px;
  height: 20px;
}

.currency-toggle:hover {
  border-color: var(--yellow);
  background: rgba(255, 153, 0, 0.14);
}

.sidebar {
  position: fixed;
  top: 48px;
  bottom: 0;
  left: 0;
  z-index: 10;
  width: 190px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line-strong);
  background: var(--bg);
}

.user-greeting {
  min-height: 104px;
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--line);
}

.user-greeting span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.user-greeting strong {
  display: block;
  margin-top: 6px;
  color: var(--yellow);
  font-size: 22px;
  line-height: 1.1;
}

.side-nav {
  display: grid;
  padding-top: 26px;
  width: 100%;
}

.side-nav a,
.logout-button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  width: 100%;
  min-width: 0;
  padding: 0 24px;
  border: 0;
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  background: transparent;
  font-size: 18px;
  font-weight: 700;
}

.side-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  min-width: 24px;
  color: var(--yellow);
  font-size: 18px;
  line-height: 1;
}

.side-icon img,
.side-icon svg {
  display: block;
  width: 21px;
  height: 21px;
  object-fit: contain;
}

.side-label {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-nav a.active {
  color: var(--text);
  background: rgba(255, 153, 0, 0.14);
  box-shadow: inset 3px 0 0 var(--yellow);
}

.logout-area {
  margin-top: auto;
  margin-bottom: 32px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.logout-button {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  cursor: pointer;
}

.logout-button:hover {
  color: var(--text);
  background: rgba(255, 153, 0, 0.12);
}

.content {
  width: min(920px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 120px;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

.wallet-section {
  min-height: calc(100vh - 176px);
}

.wallet-panel {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "balance"
    "shortcuts";
  gap: 28px;
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.wallet-balance-card {
  grid-area: balance;
  display: grid;
  gap: 8px;
  min-height: 146px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(92, 40, 48, 0.8), rgba(92, 40, 48, 0.54));
}

.wallet-balance-card span,
.wallet-info span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.wallet-balance-card span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.wallet-balance-card i {
  color: #d8dbe4;
  font-style: normal;
}

.wallet-balance-card i svg {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: -3px;
}

.wallet-balance-card strong {
  color: var(--yellow);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(42px, 7vw, 64px);
  line-height: 1;
}

.wallet-balance-card small {
  font-family: var(--font-mono);
  font-size: 20px;
}

.wallet-balance-card em {
  color: var(--text);
  font-size: 13px;
  font-style: normal;
}

.wallet-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.wallet-info div {
  display: grid;
  gap: 10px;
}

.wallet-info strong {
  color: var(--text);
  font-size: 14px;
}

.wallet-actions {
  display: grid;
  gap: 10px;
  justify-items: stretch;
}

.wallet-actions button {
  min-width: 92px;
  min-height: 38px;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  font-weight: 700;
}

.wallet-withdraw {
  color: #11151b;
  background: var(--yellow);
}

.wallet-shortcuts {
  grid-area: shortcuts;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  justify-items: center;
  gap: 10px;
  width: 100%;
  padding-top: 6px;
}

.wallet-shortcuts button {
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.wallet-shortcuts span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: var(--yellow);
  background: rgba(255, 255, 255, 0.1);
}

.wallet-shortcuts span svg {
  width: 22px;
  height: 22px;
}

.wallet-shortcuts small {
  font-size: 11px;
}

.wallet-shortcuts button:hover span {
  border-color: var(--yellow);
  background: rgba(255, 153, 0, 0.14);
}

.referrals-panel {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 22px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.referrals-intro,
.referral-code-card,
.referral-link-card,
.referral-how-card,
.referral-users-card,
.referrals-total-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(17, 21, 27, 0.76);
}

.referrals-intro {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 26px;
  align-items: center;
  padding: 28px 30px;
  border-color: rgba(255, 153, 0, 0.2);
}

.referrals-intro span,
.referral-code-card span,
.referral-link-card label,
.referrals-total-card small {
  color: var(--yellow);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.referrals-intro h1 {
  max-width: 780px;
  margin: 8px 0 12px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}

.referrals-intro p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.referrals-total-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 126px;
  padding: 20px;
  align-content: center;
  background: rgba(255, 255, 255, 0.04);
}

.referrals-total-card > span {
  color: var(--yellow);
}

.referrals-total-card > span svg {
  display: block;
  width: 28px;
  height: 28px;
}

.referrals-total-card strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 34px;
  line-height: 1;
}

.referrals-total-card small {
  color: var(--muted);
  font-size: 10px;
}

.referral-code-card,
.referral-link-card {
  display: grid;
  gap: 12px;
  padding: 24px;
}

.referral-code-card {
  grid-column: 1;
}

.referral-code-card > div,
.referral-link-card > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 10px 12px 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--bg);
}

.referral-code-card strong {
  overflow: hidden;
  color: var(--yellow);
  font-family: var(--font-mono);
  font-size: 20px;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referral-code-card button,
.referral-link-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  color: #11151b;
  background: var(--yellow);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.referral-link-card input {
  min-width: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: 13px;
}

.referral-code-card button span svg {
  display: block;
  width: 16px;
  height: 16px;
}

.referral-link-card small {
  min-height: 18px;
  color: var(--verify);
  font-size: 12px;
  font-weight: 700;
}

.referral-how-card {
  grid-column: 2;
  grid-row: 2 / span 2;
  padding: 24px;
}

.referral-how-card h2,
.referral-users-card h2 {
  margin: 0 0 18px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
}

.referral-how-card ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.referral-how-card li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 50px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  line-height: 1.4;
}

.referral-how-card li span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: #11151b;
  background: var(--yellow);
  font-weight: 700;
}

.referral-users-card {
  grid-column: 1 / -1;
  padding: 24px;
}

.referral-users-list {
  display: grid;
  gap: 10px;
}

.referral-user-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.referral-user-item strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.referral-user-item span,
.referral-user-item time {
  color: var(--quiet);
  font-size: 11px;
}

.referral-empty {
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--quiet);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
}

.settings-header {
  max-width: 640px;
  margin-bottom: 28px;
}

.settings-header .eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--yellow);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.settings-header h1 {
  margin: 0 0 8px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.1;
}

.settings-header .lede {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.settings-stack {
  display: grid;
  gap: 18px;
  max-width: 640px;
}

.settings-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(17, 21, 27, 0.76);
  padding: 24px;
}

.settings-card .card-head {
  margin-bottom: 18px;
}

.settings-card .card-head span {
  color: var(--yellow);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.settings-card .card-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  max-width: 480px;
}

.settings-card .field-row {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.settings-card .field-row:last-of-type {
  margin-bottom: 0;
}

.settings-card .field-row label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--bg);
}

.field-wrap input {
  flex: 1;
  min-width: 0;
  padding: 0;
  padding-right: 8px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 14px;
}

.field-wrap:focus-within {
  border-color: var(--yellow);
}

.field-wrap.has-error {
  border-color: var(--danger, #ff8f8f);
}

.pwd-toggle {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: var(--r-sm);
  color: var(--quiet);
  background: transparent;
  cursor: pointer;
}

.pwd-toggle:hover {
  color: var(--text);
}

.pwd-toggle svg {
  width: 17px;
  height: 17px;
}

.pwd-toggle svg[hidden] {
  display: none;
}

.settings-card .field-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

.save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 7px;
  color: #11151b;
  background: var(--yellow);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  will-change: transform;
}

.save-btn:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.field-message {
  min-height: 16px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.field-message.success {
  color: var(--verify);
}

.field-message.error {
  color: #ff8f8f;
}

.pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.pref-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.pref-row:first-child {
  padding-top: 0;
}

.pref-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.pref-copy small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  max-width: 360px;
}

.switch-toggle {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--line-strong);
  cursor: pointer;
  flex: none;
  border: 0;
}

.switch-toggle .dot {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--muted);
}

.switch-toggle.on {
  background: rgba(255, 153, 0, 0.22);
}

.switch-toggle.on .dot {
  background: var(--yellow);
}

.segmented {
  position: relative;
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  flex: none;
}

.segmented-highlight {
  position: absolute;
  top: 3px;
  left: 3px;
  height: calc(100% - 6px);
  border-radius: 999px;
  background: var(--yellow);
  will-change: transform, width;
}

.segmented button {
  position: relative;
  z-index: 1;
  min-width: 56px;
  min-height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.segmented button.active {
  color: #11151b;
}

.wallet-state {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--bg);
}

.wallet-state svg {
  width: 20px;
  height: 20px;
  color: var(--yellow);
  flex: none;
}

.wallet-state code {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-state small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.wallet-badge {
  margin-left: auto;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex: none;
}

.wallet-badge.linked {
  color: #11151b;
  background: var(--verify);
}

.wallet-badge.unlinked {
  color: var(--muted);
  background: var(--panel-2);
}

@media (max-width: 560px) {
  .pref-row {
    align-items: flex-start;
  }
}

.loterias-hero {
  padding: 8px 0 32px;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.hero-top .eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--yellow);
}

.countdown-inline {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.countdown-inline b {
  color: var(--yellow);
  font-weight: 500;
}

.loterias-hero h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.12;
  margin: 0 0 14px;
  max-width: 680px;
  color: var(--text);
}

.loterias-hero .lede {
  max-width: 600px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 24px;
}

.game-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  margin-bottom: 26px;
}

.game-switch button {
  padding: 9px 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.game-switch button.selected {
  background: var(--yellow);
  color: #11151b;
}

.play {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.picker {
  padding: 22px;
  border-right: 1px solid var(--line-strong);
  background: var(--panel);
}

.picker-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.picker-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
}

.luck-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.luck-btn:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.luck-btn svg {
  width: 14px;
  height: 14px;
}

.slip {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--panel);
}

.slip h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
}

.slip .line-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.slip .line-item span {
  font-size: 13px;
  color: var(--muted);
}

.slip .line-item b {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.slip .line-item b.big {
  font-size: 19px;
  color: var(--yellow);
}

.slip-brl {
  margin-top: -8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.loterias-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  margin-top: 26px;
  color: var(--quiet);
  font-size: 12px;
  font-weight: 700;
}

.loterias-stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
}

.loterias-stats i {
  color: var(--yellow);
  font-style: normal;
  line-height: 1;
}

.loterias-stats i svg {
  display: block;
  width: 16px;
  height: 16px;
}

.loterias-stats b {
  color: var(--muted);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

@media (max-width: 760px) {
  .play {
    grid-template-columns: 1fr;
  }

  .picker {
    border-right: none;
    border-bottom: 1px solid var(--line-strong);
  }
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 14px;
}

.number-grid button {
  aspect-ratio: 1;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--quiet);
  background: var(--panel-2);
  cursor: pointer;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

.number-grid button.selected {
  border-color: var(--yellow);
  color: #11151b;
  background: var(--yellow);
  font-weight: 500;
}

.selected-preview {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  min-height: 32px;
  margin: 0 0 30px;
  padding: 0;
}

.selected-preview span,
.selected-preview-chip {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: var(--r-sm);
  color: #11151b;
  background: var(--yellow);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 500;
}

.selected-preview-chip {
  cursor: pointer;
}

.selected-preview em {
  color: var(--quiet);
  font-size: 12px;
  font-style: normal;
}

.bet-meta {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin: 22px 0 16px;
  color: var(--quiet);
  font-size: 12px;
}

.bet-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
}

.bet-meta-item:first-child {
  justify-content: flex-start;
}

.bet-meta-item:nth-child(2) {
  justify-content: center;
}

.bet-meta-item img,
.bet-meta-item svg {
  width: 15px;
  height: 15px;
  object-fit: contain;
  color: var(--yellow);
}

.bet-meta strong {
  color: var(--yellow);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  line-height: 1;
}

.bet-meta small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.clear-bet {
  display: inline-grid;
  place-items: center;
  justify-self: end;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.clear-bet:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.clear-bet svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.confirm-bet {
  width: 100%;
  min-height: 43px;
  border: 0;
  border-radius: var(--r-md);
  color: #11151b;
  background: var(--yellow);
  cursor: pointer;
  font-weight: 700;
}

.confirm-bet:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.bet-message {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.bet-message[data-type="success"] {
  color: var(--verify);
}

.bet-message[data-type="error"] {
  color: #ff6c6c;
}

.payment-dialog {
  width: min(440px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  color: var(--text);
  background: transparent;
}

.payment-dialog::backdrop {
  background: rgba(5, 7, 13, 0.76);
  backdrop-filter: blur(6px);
}

.payment-card {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--panel);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
}

.payment-title {
  padding: 14px 20px;
  color: var(--muted);
  background: var(--panel-2);
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
}

.payment-body {
  display: grid;
  gap: 16px;
  padding: 18px 22px 22px;
}

.payment-qr {
  display: grid;
  place-items: center;
  min-height: auto;
  padding: 14px;
  border-radius: var(--r-sm);
  background: #fff;
}

.payment-qr img {
  display: block;
  width: min(330px, 100%);
  height: auto;
}

.payment-copy {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 4px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.payment-copy summary {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 32px;
  list-style: none;
  cursor: pointer;
}

.payment-copy summary::-webkit-details-marker {
  display: none;
}

.payment-copy-icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  color: var(--yellow);
  background: transparent;
  cursor: pointer;
}

.payment-copy-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.payment-copy small {
  color: var(--yellow);
  font-size: 11px;
  font-weight: 700;
}

.payment-arrow {
  width: 18px;
  height: 18px;
  margin-left: auto;
  transition: transform 0.18s ease;
}

.payment-copy[open] .payment-arrow {
  transform: rotate(180deg);
}

.payment-copy textarea {
  width: 100%;
  min-height: 96px;
  margin: 0 0 12px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--text);
  background: var(--bg);
  font: 11px/1.45 var(--font-mono);
}

.payment-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.payment-actions button {
  width: auto;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
}

button.payment-close {
  justify-self: start;
  color: var(--text);
  background: transparent;
  border-color: var(--line-strong);
}

.payment-open-wallet {
  justify-self: end;
  color: #11151b;
  background: var(--yellow);
}

.pix-toggle {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--yellow);
  border-radius: var(--r-md);
  color: var(--yellow);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.pix-back {
  justify-self: start;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.pix-form {
  display: grid;
  gap: 12px;
}

.pix-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.pix-field input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
}

.pix-field input:focus {
  outline: none;
  border-color: var(--yellow);
}

.pix-message {
  min-height: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.pix-message[data-type="error"] {
  color: #ff6b6b;
}

.pix-message[data-type="success"] {
  color: var(--yellow);
}

.pix-result {
  display: grid;
  gap: 16px;
}

.payment-result-dialog {
  width: min(430px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: var(--text);
  background: transparent;
}

.payment-result-dialog::backdrop {
  background: rgba(4, 4, 33, 0.78);
  backdrop-filter: blur(6px);
}

.payment-result-card {
  display: grid;
  gap: 24px;
  padding: 34px 26px 30px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
}

.payment-result-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  color: var(--verify-ink);
  background: var(--verify);
}

.payment-result-icon svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}

.payment-result-card h2 {
  max-width: 300px;
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.3;
}

.payment-result-value {
  display: grid;
  gap: 8px;
  padding: 16px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--panel-2);
}

.payment-result-value span {
  color: var(--muted);
  font-size: 14px;
}

.payment-result-value strong {
  color: var(--yellow);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 18px;
}

.payment-result-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: var(--r-md);
  font-size: 18px;
  font-weight: 700;
}

.payment-result-close {
  margin-top: auto;
  border: 0;
  color: #11151b;
  background: var(--yellow);
  cursor: pointer;
}

.withdraw-dialog {
  width: min(540px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 16px;
  color: var(--text);
  background: transparent;
}

.withdraw-dialog::backdrop {
  background: rgba(4, 4, 33, 0.78);
  backdrop-filter: blur(6px);
}

.withdraw-card {
  overflow: hidden;
  border: 1px solid rgba(255, 153, 0, 0.34);
  border-radius: 16px;
  background: #11151b;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
}

.withdraw-title {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  min-height: 42px;
  color: #11151b;
  background: var(--yellow);
}

.withdraw-title button {
  border: 0;
  color: #11151b;
  background: transparent;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}

.withdraw-title strong {
  justify-self: center;
  font-size: 21px;
}

.withdraw-body {
  display: grid;
  gap: 24px;
  padding: 20px;
}

.withdraw-body label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.withdraw-body input {
  width: 100%;
  min-height: 54px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--text);
  background: var(--bg);
  font: 13px/1.45 var(--font-mono);
}

.withdraw-summary {
  display: grid;
  gap: 18px;
  padding-top: 22px;
  border-top: 1px solid var(--line-strong);
}

.withdraw-summary div {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.withdraw-summary strong {
  color: var(--yellow);
  font-size: 15px;
}

.withdraw-message {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.withdraw-message[data-type="success"] {
  color: var(--verify);
}

.withdraw-message[data-type="error"] {
  color: #ff6c6c;
}

.withdraw-submit {
  justify-self: center;
  min-width: 112px;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  color: #11151b;
  background: var(--yellow);
  cursor: pointer;
  font-weight: 700;
}

.withdraw-submit:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.previous-results {
  margin-top: 150px;
}

.previous-results h2 {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 16px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 42px;
}

.results-grid .empty-state {
  grid-column: 1 / -1;
}

.result-card {
  padding: 22px 28px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(17, 21, 27, 0.74);
}

.result-card header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  color: var(--quiet);
  font-size: 10px;
  font-weight: 700;
}

.result-numbers {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.result-numbers span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--yellow);
  border-radius: 999px;
  color: var(--yellow);
  background: rgba(4, 4, 33, 0.34);
  font-size: 10px;
  font-weight: 700;
}

.result-card strong {
  display: block;
  margin-bottom: 16px;
  color: #dfe6f5;
  font-size: 20px;
  text-align: center;
}

.result-card a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border-radius: 2px;
  color: #11151b;
  background: var(--yellow);
  font-size: 9px;
  font-weight: 700;
}

.bet-history {
  margin-top: 70px;
}

.bet-history h2 {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 16px;
}

.bet-history-list {
  display: grid;
  gap: 12px;
}

.bet-filter {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel);
}

.bet-filter button {
  min-height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.bet-filter button.active {
  color: #11151b;
  background: var(--yellow);
}

.bet-item {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--panel);
}

.bet-item header {
  display: grid;
  gap: 6px;
}

.bet-item strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 500;
}

.bet-item small {
  overflow: hidden;
  color: var(--quiet);
  font-family: var(--font-mono);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bet-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bet-numbers span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--text);
  background: var(--panel-2);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  font-weight: 500;
}

.bet-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 26px;
  border-radius: 999px;
  color: #11151b;
  background: var(--verify);
  font-size: 10px;
  font-weight: 700;
}

.bet-status.invalid {
  color: var(--muted);
  background: var(--panel-2);
}

.empty-state {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  color: var(--quiet);
}

@media (max-width: 1080px) {
  .dashboard {
    padding-left: 72px;
  }

  .sidebar {
    width: 72px;
  }

  .user-greeting {
    display: none;
  }

  .side-nav {
    padding-top: 18px;
  }

  .side-nav a,
  .logout-button {
    justify-content: center;
    min-height: 58px;
    padding: 0;
    border-radius: 0;
  }

  .side-label {
    display: none;
  }

  .logout-area {
    margin-bottom: 16px;
    padding: 10px;
  }

  .logout-button {
    min-height: 48px;
    border-radius: 8px;
  }

  .content {
    width: min(100% - 32px, 920px);
    padding-top: 24px;
  }

  .game-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .wallet-panel {
    grid-template-columns: 1fr;
    grid-template-areas:
      "balance"
      "shortcuts";
  }

  .bet-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .dashboard {
    padding-left: 0;
    padding-bottom: 72px;
  }

  .sidebar {
    top: auto;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 64px;
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .side-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 100%;
    padding: 0;
  }

  .side-nav a {
    min-height: 64px;
  }

  .logout-area {
    display: none;
  }

  .results-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 640px) {
  .topbar {
    height: 58px;
  }

  .dashboard {
    padding-top: 58px;
  }

  .brand img {
    width: 112px;
  }

  .summary-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .wallet-panel {
    width: min(420px, 100%);
  }

  .wallet-balance-card strong {
    font-size: clamp(38px, 14vw, 54px);
  }

  .wallet-shortcuts {
    gap: 8px;
  }

  .wallet-shortcuts span {
    width: 42px;
    height: 42px;
    font-size: 22px;
  }

  .referrals-panel {
    grid-template-columns: 1fr;
  }

  .referrals-intro {
    grid-template-columns: 1fr;
  }

  .referrals-intro,
  .referral-code-card,
  .referral-link-card,
  .referral-how-card,
  .referral-users-card,
  .referrals-total-card {
    padding: 20px;
  }

  .referral-how-card,
  .referral-users-card,
  .referral-code-card,
  .referral-link-card {
    grid-column: auto;
    grid-row: auto;
  }

  .referral-code-card > div,
  .referral-link-card > div,
  .referral-user-item {
    grid-template-columns: 1fr;
  }

  .game-strip {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .game-card {
    min-width: 230px;
  }

  .hero-prize {
    margin-top: 24px;
    flex-direction: column;
  }

  .countdown-box {
    grid-template-columns: repeat(2, 1fr);
  }

  .countdown-box div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line-strong);
  }

  .countdown-box div:nth-child(4) {
    border-top: 1px solid var(--line-strong);
  }

  .bet-builder {
    padding: 20px 16px 32px;
  }

  .builder-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .bet-meta {
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    width: 100%;
  }

  .number-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
  }

  .payment-actions {
    grid-template-columns: 1fr;
  }

  .payment-result-card {
    min-height: 560px;
  }

  .payment-body {
    padding: 14px 16px 18px;
  }

  .payment-qr {
    min-height: auto;
    padding: 10px;
  }

  .previous-results {
    margin-top: 70px;
  }
}
