:root {
  --bg: #0e121c;
  --bg-2: #111827;
  --panel: #161d2b;
  --panel-2: #1b2434;
  --panel-3: #222d40;
  --line: rgba(255, 255, 255, .085);
  --line-strong: rgba(255, 255, 255, .15);
  --text: #f5f8fc;
  --muted: #8f9bae;
  --muted-2: #69768a;
  --green: #18c58a;
  --green-bright: #35e6aa;
  --green-soft: rgba(24, 197, 138, .13);
  --red: #ff5e67;
  --red-soft: rgba(255, 94, 103, .13);
  --blue: #4c8dff;
  --amber: #ffba4a;
  --shadow: 0 20px 60px rgba(0, 0, 0, .28);
  --radius: 16px;
  --radius-sm: 10px;
  --header: 72px;
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, strong { letter-spacing: -.02em; }
form { margin: 0; }

.icon { flex: 0 0 auto; transition: transform .18s ease, color .18s ease, filter .18s ease; shape-rendering: geometricPrecision; }
.icon--glow { filter: drop-shadow(0 0 6px currentColor); }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; color: var(--green-bright); background: linear-gradient(145deg, #1c2a38, #15202c); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 8px 24px rgba(0,0,0,.25); }
.brand-mark svg, .brand-mark img { width: 25px; height: 25px; }
.brand-mark svg { fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; shape-rendering: geometricPrecision; }
.brand-word { font-size: 19px; font-weight: 800; letter-spacing: -.045em; }
.brand-word b { color: var(--green-bright); }

.eyebrow { color: var(--green-bright); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.status-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(24,197,138,.12); margin-right: 8px; }
.mobile-nav { display: none; }

.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-weight: 750; transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button--primary { color: #071710; background: linear-gradient(135deg, var(--green-bright), var(--green)); box-shadow: 0 12px 28px rgba(24,197,138,.18); }
.button--primary:hover { box-shadow: 0 14px 34px rgba(24,197,138,.28); }
.button--ghost { color: var(--text); background: rgba(255,255,255,.035); border-color: var(--line-strong); }
.button--ghost:hover { background: rgba(255,255,255,.07); }
.button--danger { color: #fff; background: var(--red); }
.button--small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.button--large { min-height: 52px; padding: 0 24px; border-radius: 12px; }
.button--wide { width: 100%; }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.icon-button { width: 38px; height: 38px; display: inline-grid; place-items: center; padding: 0; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; }
.icon-button:hover { color: var(--text); background: rgba(255,255,255,.06); }

.site-header { position: relative; z-index: 20; height: var(--header); display: flex; align-items: center; gap: 40px; padding: 0 clamp(20px, 5vw, 76px); border-bottom: 1px solid var(--line); background: rgba(14,18,28,.82); backdrop-filter: blur(18px); }
.site-logo { display: flex; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { position: relative; color: var(--muted); font-size: 14px; font-weight: 650; }
.site-nav a:hover, .site-nav a.active { color: var(--text); }
.site-nav a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -26px; height: 2px; background: var(--green); }
.header-actions, .header-account { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.header-account form { display: flex; }
.header-balance { min-width: 86px; display: flex; align-items: flex-end; flex-direction: column; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.1; }
.header-balance small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.header-balance strong { margin-top: 3px; font-size: 14px; font-weight: 800; }
.header-live-dot { width: 5px; height: 5px; display: inline-block; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(24,197,138,.1); }
.header-deposit { min-height: 30px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border-radius: 4px; color: #fff; background: #0faf59; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.header-deposit:hover { background: #14c969; }

.site-footer { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 44px; padding: 34px clamp(20px, 5vw, 76px); border-top: 1px solid var(--line); color: var(--muted); background: #0b0f17; font-size: 13px; }
.site-footer p { margin: 8px 0 0; }
.footer-note { display: flex; flex-direction: column; max-width: 440px; }
.footer-note strong { color: var(--amber); }

.field { display: flex; flex-direction: column; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 650; }
.field > span:first-child { color: #c3cbd8; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line-strong); outline: none; border-radius: 10px; background: #111724; color: var(--text); transition: border-color .18s ease, box-shadow .18s ease; }
.field input, .field select { height: 47px; padding: 0 13px; }
.field textarea { padding: 12px 13px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(24,197,138,.75); box-shadow: 0 0 0 3px rgba(24,197,138,.1); }
.field input::placeholder, .field textarea::placeholder { color: #596579; }
.field small { color: var(--muted-2); font-weight: 500; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.check-field { display: grid; grid-template-columns: 18px 1fr; align-items: start; gap: 10px; color: var(--muted); font-size: 12px; line-height: 1.55; cursor: pointer; }
.check-field input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--green); }

.flash-stack { position: fixed; z-index: 200; top: 82px; right: 18px; width: min(390px, calc(100vw - 36px)); display: grid; gap: 8px; }
.flash { padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px; background: #1b2433; box-shadow: var(--shadow); font-size: 13px; animation: flash-in .25s ease both; }
.flash--success { border-color: rgba(24,197,138,.35); color: #9ff0d0; }
.flash--error { border-color: rgba(255,94,103,.4); color: #ffb5ba; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-8px); } }

.status { display: inline-flex; align-items: center; justify-content: center; min-width: 68px; padding: 4px 8px; border-radius: 99px; font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; }
.status--pending, .status--open { color: #ffd083; background: rgba(255,186,74,.12); }
.status--awaiting_payment { color:#8ecaff; background:rgba(43,153,255,.13); }
.status--expired { color:#a9b1c0; background:rgba(169,177,192,.1); }
.status--approved, .status--paid, .status--answered, .status--won, .status--active { color: #75e6bd; background: var(--green-soft); }
.status--rejected, .status--lost, .status--blocked { color: #ff9fa5; background: var(--red-soft); }
.status--draw, .status--cancelled, .status--closed { color: #aab5c6; background: rgba(143,155,174,.12); }
.amount-positive { color: var(--green-bright) !important; }
.amount-negative { color: #ff7c85 !important; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #092219; background: linear-gradient(135deg, var(--green-bright), var(--green)); font-size: 14px; font-weight: 900; }

@media (max-width: 820px) {
  :root { --header: 62px; }
  .site-header { gap: 16px; padding: 0 16px; }
  .site-nav { display: none; }
  .header-actions { gap: 6px; }
  .header-actions .button { min-height: 37px; padding: 0 12px; font-size: 12px; }
  .header-actions .button--ghost { display: none; }
  .header-account { gap: 6px; }
  .header-balance { min-width: 72px; }
  .header-balance strong { font-size: 12px; }
  .header-deposit { min-height: 28px; padding-inline: 9px; font-size: 9px; }
  .site-footer { grid-template-columns: 1fr; gap: 22px; padding: 28px 20px; }
  .field-grid { grid-template-columns: 1fr; }
  body.account-page { padding-bottom: 62px; }
  .mobile-nav { position: fixed; z-index: 120; right: 0; bottom: 0; left: 0; height: 62px; display: grid; grid-template-columns: repeat(5,1fr); padding: 4px max(5px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(5px,env(safe-area-inset-left)); border-top: 1px solid var(--line); background: rgba(22,27,40,.97); backdrop-filter: blur(16px); }
  .mobile-nav a { min-width: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 2px; border-radius: 7px; color: var(--muted-2); font-size: 8px; font-weight: 700; }
  .mobile-nav a.active { color: #fff; background: rgba(2,111,211,.18); }
  .mobile-nav a.active .icon { color: #39a8ff; }
}

@media (max-width: 540px) {
  .site-logo .brand-word { display: none; }
  .site-header { gap: 8px; padding-inline: 10px; }
  .site-header .brand-mark { width: 31px; height: 31px; border-radius: 8px; }
  .header-account { gap: 3px; }
  .header-account > form { display: none; }
  .header-account .icon-button { width: 32px; height: 32px; }
}

.site-banners-container { position: relative; width: 100%; margin-bottom: 20px; overflow: hidden; border-radius: 14px; }
.site-banners-track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.site-banners-track::-webkit-scrollbar { display: none; }
.site-banner-slide { flex: 0 0 100%; min-width: 100%; scroll-snap-align: start; }
@media (min-width: 768px) {
  .site-banner-slide { flex: 0 0 calc(50% - 7px); min-width: calc(50% - 7px); }
}
@media (min-width: 1200px) {
  .site-banner-slide { flex: 0 0 calc(33.333% - 10px); min-width: calc(33.333% - 10px); }
}
.site-banner-card { position: relative; display: block; height: 160px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #131926; box-shadow: 0 8px 24px rgba(0,0,0,.2); transition: transform .2s ease, border-color .2s ease; }
.site-banner-card:hover { transform: translateY(-2px); border-color: rgba(24,197,138,.4); }
.site-banner-img { width: 100%; height: 100%; object-fit: cover; }
.site-banner-overlay { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 16px; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(10,14,22,.9) 100%); }
.site-banner-content { display: flex; flex-direction: column; gap: 3px; }
.site-banner-title { font-size: 15px; font-weight: 800; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.6); }
.site-banner-subtitle { font-size: 12px; font-weight: 500; color: #cbd5e1; }

/* Double navbar prevention */
body.account-page .mobile-nav,
.qx-account-shell .mobile-nav {
  display: none !important;
}

/* ==========================================================================
   Site Loader & Splash Screen ("Gol Loading") System
   ========================================================================== */
.site-loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background: rgba(18, 22, 34, var(--loader-bg-opacity, 0.92));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity .35s ease, visibility .35s ease;
}

.site-loader-overlay.is-fading {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.site-loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}

.site-loader-text {
  color: #d1d5db;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}

.site-loader-anim {
  position: relative;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
}

/* Style 1: Brand Dual Ring */
.site-loader-style--brand_ring .brand-ring-outer {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3.5px solid transparent;
  border-top-color: var(--loader-accent, #18c58a);
  border-right-color: var(--loader-accent, #18c58a);
  filter: drop-shadow(0 0 8px var(--loader-accent, #18c58a));
  animation: loader-spin 1.1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}
.site-loader-style--brand_ring .brand-ring-inner {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  border-bottom-color: rgba(255, 255, 255, .8);
  border-left-color: var(--loader-accent, #18c58a);
  animation: loader-spin-rev 0.85s linear infinite;
}
.site-loader-style--brand_ring .brand-ring-center {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  z-index: 2;
}
.site-loader-style--brand_ring .brand-ring-center .brand-mark {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

/* Style 2: Pulse Logo */
.site-loader-style--pulse_logo .pulse-ring {
  position: absolute;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 2px solid var(--loader-accent, #18c58a);
  animation: loader-pulse-wave 1.6s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}
.site-loader-style--pulse_logo .pulse-ring--2 {
  animation-delay: 0.8s;
}
.site-loader-style--pulse_logo .pulse-logo-box {
  position: absolute;
  display: grid;
  place-items: center;
  z-index: 2;
  animation: loader-pulse-core 1.6s ease-in-out infinite;
}

/* Style 3: Fintech Orbit */
.site-loader-style--fintech_orbit .orbit-center {
  position: absolute;
  z-index: 2;
}
.site-loader-style--fintech_orbit .orbit-track {
  position: absolute;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 255, 255, .18);
  animation: loader-spin 2.2s linear infinite;
}
.site-loader-style--fintech_orbit .orbit-dot {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--loader-accent, #18c58a);
  box-shadow: 0 0 10px var(--loader-accent, #18c58a);
}
.site-loader-style--fintech_orbit .orbit-track--2 {
  width: 48px;
  height: 48px;
  animation: loader-spin-rev 1.4s linear infinite;
}
.site-loader-style--fintech_orbit .orbit-dot--2 {
  width: 7px;
  height: 7px;
  top: auto;
  bottom: -4px;
  background: #fff;
  box-shadow: 0 0 8px #fff;
}

/* Style 4: Quantum Circle */
.site-loader-style--quantum_circle .quantum-svg {
  width: 70px;
  height: 70px;
  animation: loader-spin 1.4s linear infinite;
}
.site-loader-style--quantum_circle .quantum-bg {
  fill: none;
  stroke: rgba(255, 255, 255, .08);
  stroke-width: 4;
}
.site-loader-style--quantum_circle .quantum-bar {
  fill: none;
  stroke: var(--loader-accent, #18c58a);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-dasharray: 85, 150;
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 8px var(--loader-accent, #18c58a));
}
.site-loader-style--quantum_circle .quantum-brand {
  position: absolute;
  display: grid;
  place-items: center;
  z-index: 2;
}

/* Style 5: Minimal Circle */
.site-loader-style--minimal_circle .minimal-spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3.5px solid rgba(255, 255, 255, .12);
  border-top-color: var(--loader-accent, #18c58a);
  animation: loader-spin 0.75s linear infinite;
  filter: drop-shadow(0 0 6px var(--loader-accent, #18c58a));
}

@keyframes loader-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes loader-spin-rev {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}
@keyframes loader-pulse-wave {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.4); opacity: 0; }
}
@keyframes loader-pulse-core {
  0%, 100% { transform: scale(0.95); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 10px var(--loader-accent, #18c58a)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
