/* DRS Battle Pass
   Só fundos sólidos: no FiveM, sombras, filtros e animações com transform ficam com um retângulo preto.
   Solid backgrounds only: in FiveM, shadows, filters and transform animations render a black box. */
:root {
    --bg: rgb(10, 9, 17);
    --panel: rgb(15, 14, 25);
    --side: rgb(19, 18, 31);
    --card: rgb(24, 23, 39);
    --card-hover: rgb(31, 30, 49);
    --tile: rgb(33, 31, 53);
    --line: rgb(42, 40, 64);
    --line-soft: rgb(31, 30, 49);
    --white: #f6f4ff;
    --text: #dad6ee;
    --muted: #918cae;
    --faint: #5f5a80;
    --accent: #a78bfa;
    --accent-2: #c4b5fd;
    --accent-bg: rgb(44, 34, 84);
    --gold: #fbbf24;
    --gold-2: #fcd34d;
    --gold-bg: rgb(58, 42, 10);
    --ok: #4ade80;
    --ok-bg: rgb(16, 46, 30);
    --bad: #f87171;
    /* rarities */
    --r-common: #94a3b8;     --r-common-bg: rgb(27, 29, 40);
    --r-rare: #60a5fa;       --r-rare-bg: rgb(19, 31, 55);
    --r-epic: #c084fc;       --r-epic-bg: rgb(38, 22, 58);
    --r-legendary: #fbbf24;  --r-legendary-bg: rgb(52, 37, 10);
    --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: "Manrope", "Segoe UI", sans-serif; }
html, body { width: 100vw; height: 100vh; overflow: hidden; background: transparent; color: var(--text); user-select: none; }
body { display: grid; place-items: center; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input { font: inherit; color: var(--white); }
::-webkit-scrollbar { width: 6px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }

.app { width: min(1320px, 96vw); height: min(780px, 92vh); display: grid; grid-template-columns: 300px 1fr; background: var(--panel); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }

/* ------------------------------------------------------------------ sidebar */
.side { display: flex; flex-direction: column; gap: 14px; padding: 18px; background: var(--side); border-right: 1px solid var(--line); min-height: 0; overflow-y: auto; }
.profile { display: flex; align-items: center; gap: 12px; }
.avatar { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font: 800 19px var(--mono); color: #1a1238; background: var(--accent); flex-shrink: 0; }
.avatar.gold { background: var(--gold); color: #2b1d02; }
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.gold img { border-radius: 14px; }
.who { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.who strong { font-size: 15.5px; font-weight: 800; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbadge { align-self: flex-start; height: 22px; padding: 0 9px; border-radius: 6px; display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: var(--tile); }
.pbadge.gold { color: var(--gold); background: var(--gold-bg); }

.ring-box { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line-soft); }
.ring { position: relative; width: 96px; height: 96px; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; }
.ring-track { fill: none; stroke: var(--tile); stroke-width: 9; }
.ring-fill { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 289.03; stroke-dashoffset: 289.03; transition: stroke-dashoffset 0.5s ease; }
.ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-text span { font-size: 9px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.ring-text strong { font: 800 30px/1 var(--mono); color: var(--white); }
.ring-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.xp-line { display: flex; align-items: baseline; gap: 5px; }
.xp-line strong { font: 800 18px var(--mono); color: var(--white); }
.xp-line span { font: 600 11px var(--mono); color: var(--muted); }
.bar { height: 8px; border-radius: 8px; background: var(--tile); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 8px; background: var(--accent); transition: width 0.4s ease; }
.mini-line { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--faint); }
.mini-line b { font-family: var(--mono); color: var(--muted); }

.side-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.link { font-size: 11px; font-weight: 800; letter-spacing: 0; text-transform: none; color: var(--accent-2); }
.link:hover { color: var(--white); }

.next { padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line-soft); }
.next-body { display: flex; align-items: center; gap: 12px; }
.next .img { width: 62px; height: 62px; border-radius: 14px; }
.next-name { font-size: 14px; font-weight: 800; color: var(--white); line-height: 1.25; }
.next-sub { margin-top: 4px; font: 700 11px var(--mono); color: var(--muted); }
.next-done { font-size: 13px; font-weight: 700; color: var(--ok); }

.today-list { display: flex; flex-direction: column; gap: 7px; }
.tmission { padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 7px; }
.tmission.done { border-color: rgb(40, 90, 60); }
.tm-top { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--white); }
.tm-top span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-top b { font: 700 10.5px var(--mono); color: var(--accent-2); }
.tmission.done .tm-top b { color: var(--ok); }
.tmission .bar { height: 5px; }
.tmission.done .bar i { background: var(--ok); }

/* ------------------------------------------------------------------ main + hero */
.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.hero { position: relative; overflow: hidden; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px 18px; background: rgb(24, 18, 48); border-bottom: 1px solid var(--line); }
.hero-stripes { position: absolute; right: 250px; top: -30px; bottom: -30px; display: flex; gap: 14px; pointer-events: none; }
.hero-stripes i { width: 26px; background: rgb(32, 24, 64); }
.hero-stripes i:nth-child(2) { background: rgb(38, 28, 76); }
.hero-stripes i:nth-child(3) { background: rgb(30, 23, 60); }
.hero-text { position: relative; z-index: 1; }
.hero-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent-2); }
.hero h1 { margin-top: 4px; font-size: 32px; font-weight: 800; letter-spacing: -0.02em; color: var(--white); line-height: 1.1; }
.hero-chips { display: flex; gap: 8px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 800; color: var(--text); background: rgb(36, 28, 70); border: 1px solid rgb(58, 46, 108); }
.chip.gold { color: var(--gold); background: var(--gold-bg); border-color: rgb(100, 74, 20); }
.chip svg { width: 15px; height: 15px; }
.hero-right { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgb(16, 13, 32); border: 1px solid rgb(48, 38, 92); }
.tab { padding: 8px 15px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.tab:hover { color: var(--white); }
.tab.on { color: var(--white); background: var(--accent-bg); }
.tab .n { font: 700 11px var(--mono); padding: 1px 6px; border-radius: 6px; background: var(--accent); color: #1a1238; }
.icon-btn { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--muted); background: rgb(16, 13, 32); border: 1px solid rgb(48, 38, 92); }
.icon-btn:hover { color: var(--white); }
.icon-btn svg { width: 17px; height: 17px; }

.btn { height: 40px; padding: 0 16px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 13.5px; font-weight: 800; color: #1a1238; background: var(--accent); }
.btn:hover { background: var(--accent-2); }
.btn:disabled { cursor: not-allowed; color: var(--faint); background: var(--tile); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 12.5px; border-radius: 10px; }
.btn.gold { color: #2b1d02; background: var(--gold); }
.btn.gold:hover { background: var(--gold-2); }
.btn.ghost { color: var(--text); background: var(--tile); border: 1px solid var(--line); }
.btn.ghost:hover { color: var(--white); background: var(--card-hover); }

.view { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ------------------------------------------------------------------ rewards track */
.track-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px 0; }
.track-bar span { font-size: 12px; font-weight: 700; color: var(--muted); }
.track-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: 104px 1fr; }
.lanes { display: grid; grid-template-rows: 1fr 60px 1fr; padding: 16px 0 20px; }
.lane { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; text-align: center; }
.lane .lane-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.lane .lane-ico svg { width: 21px; height: 21px; }
.lane.premium .lane-ico { color: var(--gold); background: var(--gold-bg); }
.lane.free .lane-ico { color: var(--accent-2); background: var(--accent-bg); }
.lane b { font-size: 10.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.lane.premium b { color: var(--gold); }
.lane.free b { color: var(--accent-2); }
.track { overflow-x: auto; overflow-y: hidden; display: flex; padding: 16px 18px 12px 0; }
.col { width: 160px; flex-shrink: 0; display: grid; grid-template-rows: 1fr 60px 1fr; padding: 0 6px; }

.node { position: relative; display: grid; place-items: center; }
.node .line { position: absolute; left: -6px; right: -6px; top: 50%; height: 5px; margin-top: -2.5px; background: var(--line); overflow: hidden; }
.node .line i { display: block; height: 100%; width: 0; background: var(--accent); }
.node.first .line { left: 50%; }
.node.last .line { right: 50%; }
.node b { position: relative; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 12px; display: grid; place-items: center; font: 800 14px var(--mono); color: var(--muted); background: var(--tile); border: 2px solid var(--line); }
.node.reached b { color: #1a1238; background: var(--accent); border-color: var(--accent-2); }
.node.current b { color: var(--white); background: var(--accent-bg); border-color: var(--accent); }
.node.milestone b { border-radius: 50%; }

.reward { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 6px; padding: 12px 10px 10px; border-radius: 16px; text-align: center; min-height: 0;
    background: var(--rbg, var(--card)); border: 1px solid var(--line-soft); }
.reward::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--rc, var(--line)); }
.reward.empty { background: transparent; border: 1px dashed var(--line-soft); }
.reward.empty::before { display: none; }
.rarity { font-size: 9.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rc); }
.img { width: 66px; height: 66px; border-radius: 15px; display: grid; place-items: center; background: rgb(16, 15, 26); overflow: hidden; }
.img img { width: 82%; height: 82%; object-fit: contain; }
.img svg { width: 32px; height: 32px; color: var(--ok); }
.img svg.box { color: var(--faint); }
.reward .name { font-size: 12.5px; font-weight: 800; color: var(--white); line-height: 1.25; max-height: 32px; overflow: hidden; }
.reward .state { height: 28px; width: 100%; border-radius: 8px; display: grid; place-items: center; font-size: 11.5px; font-weight: 800; color: var(--faint); background: rgb(16, 15, 26); }
.reward .state svg { width: 14px; height: 14px; }
.reward.claimable { border-color: var(--accent); }
.reward.premium.claimable { border-color: var(--gold); }
.reward.claimable .state { color: #1a1238; background: var(--accent); cursor: pointer; }
.reward.claimable .state:hover { background: var(--accent-2); }
.reward.premium.claimable .state { color: #2b1d02; background: var(--gold); }
.reward.claimed { opacity: 0.5; }
.reward.claimed .state { color: var(--ok); background: var(--ok-bg); }
.reward.locked-prem .img { opacity: 0.6; }

.r-common { --rc: var(--r-common); --rbg: var(--r-common-bg); }
.r-rare { --rc: var(--r-rare); --rbg: var(--r-rare-bg); }
.r-epic { --rc: var(--r-epic); --rbg: var(--r-epic-bg); }
.r-legendary { --rc: var(--r-legendary); --rbg: var(--r-legendary-bg); }

/* ------------------------------------------------------------------ missions */
.missions { flex: 1; overflow-y: auto; padding: 20px 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-content: start; }
.mgroup h3 { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.mgroup h3 small { font: 600 11.5px var(--mono); letter-spacing: 0; text-transform: none; color: var(--faint); }
.mlist { display: flex; flex-direction: column; gap: 9px; }
.mission { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line-soft); }
.mission.done { border-color: rgb(40, 90, 60); background: rgb(18, 30, 26); }
.m-ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: var(--accent-2); background: var(--accent-bg); flex-shrink: 0; }
.mission.weekly .m-ico { color: var(--gold); background: var(--gold-bg); }
.mission.done .m-ico { color: var(--ok); background: var(--ok-bg); }
.m-ico svg { width: 22px; height: 22px; }
.m-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.m-top { display: flex; align-items: center; gap: 10px; }
.m-top strong { flex: 1; font-size: 14px; font-weight: 800; color: var(--white); }
.m-xp { font: 700 11.5px var(--mono); padding: 3px 8px; border-radius: 7px; color: var(--accent-2); background: var(--accent-bg); }
.mission.done .m-xp { color: var(--ok); background: var(--ok-bg); }
.m-bottom { display: flex; align-items: center; gap: 12px; }
.m-bottom .bar { flex: 1; }
.mission.done .bar i { background: var(--ok); }
.m-count { font: 700 12px var(--mono); color: var(--muted); white-space: nowrap; }
.empty { padding: 30px; text-align: center; color: var(--muted); font-size: 13.5px; font-weight: 600; }

/* ------------------------------------------------------------------ store */
.store { flex: 1; overflow-y: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.premium-card { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; padding: 22px 24px; border-radius: 20px; background: rgb(34, 26, 16); border: 1px solid rgb(96, 70, 24); }
.premium-card h2 { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; color: var(--white); }
.premium-card h2 svg { width: 26px; height: 26px; color: var(--gold); }
.premium-card p { margin-top: 6px; font-size: 13.5px; font-weight: 500; color: var(--muted); max-width: 560px; line-height: 1.5; }
.perks { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.perk { height: 26px; padding: 0 10px; border-radius: 7px; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; color: var(--gold); background: var(--gold-bg); }
.premium-buy { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.premium-buy .price { font: 800 28px var(--mono); color: var(--gold); }
.active { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 11px; font-size: 14px; font-weight: 800; color: var(--gold); background: var(--gold-bg); }
.active svg { width: 17px; height: 17px; }

.tickets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ticket { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line-soft); }
.ticket::before, .ticket::after { content: ""; position: absolute; top: 58px; width: 16px; height: 16px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line-soft); }
.ticket::before { left: -9px; }
.ticket::after { right: -9px; }
.ticket-top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 2px dashed var(--line); }
.ticket-top strong { font: 800 22px var(--mono); color: var(--white); }
.ticket-top span { font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-2); }
.ticket .price { font: 800 18px var(--mono); color: var(--white); }
.ticket.off { opacity: 0.45; }

.redeem { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: end; padding: 18px 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--line-soft); }
.redeem h3 { font-size: 15px; font-weight: 800; color: var(--white); }
.redeem p { margin: 4px 0 10px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.code { width: 100%; height: 42px; padding: 0 14px; border-radius: 11px; font: 700 14px var(--mono); letter-spacing: 0.04em; background: var(--tile); border: 1px solid var(--line); outline: none; user-select: text; }
.code:focus { border-color: var(--accent); }

/* ------------------------------------------------------------------ modals + toast */
.modal { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(6, 5, 12, 0.72); }
.modal-box { width: min(560px, 92vw); display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 26px; border-radius: 22px; background: var(--panel); border: 1px solid var(--accent); text-align: center; }
.modal-box.small { width: min(420px, 92vw); border-color: var(--gold); }
.modal-kicker { font-size: 12px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-2); }
.modal-box.small .modal-kicker { color: var(--gold); }
.modal-box p { font-size: 15px; font-weight: 700; color: var(--white); line-height: 1.5; }
.modal-actions { display: flex; gap: 10px; }
.claim-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-height: 360px; overflow-y: auto; }
.claim-item { width: 130px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px; border-radius: 16px; background: var(--rbg, var(--card)); border: 1px solid var(--rc, var(--line)); }
.claim-item .img { width: 72px; height: 72px; }
.claim-item strong { font-size: 12.5px; font-weight: 800; color: var(--white); line-height: 1.25; }

.toast { position: fixed; top: 8vh; left: 0; right: 0; margin: 0 auto; width: max-content; display: flex; align-items: center; gap: 14px; padding: 12px 20px 12px 12px; border-radius: 16px; background: var(--panel); border: 1px solid var(--accent); }
.toast-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--accent-2); background: var(--accent-bg); }
.toast-icon svg { width: 24px; height: 24px; }
.toast span { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.toast strong { display: block; font-size: 19px; font-weight: 800; color: var(--white); }
