/* Jonboss v7 — base. Identidade: preto, ciano (#00c8ff) dos painéis/banner do Jon, branco,
   Montserrat. A cunha diagonal do banner só aparece no herói; o padrão de coroas só nos
   versos das cartas e nas casas fechadas. */
@font-face {
  font-family: 'Montserrat';
  src: url('/assets/fonts/montserrat-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --bg: #060809; --s1: #0c1013; --s2: #12171b; --s3: #192026; --line: #222a30; --line2: #2e3840;
  --tx: #f2f5f7; --mu: #95a1aa; --mu2: #66737c;
  --cy: #00c8ff; --cy2: #5fdcff; --cy-ink: #00141b; --mg: #ff2e93; --red: #ff5a64; --amb: #ffb21e; --tw: #9146ff;
  --r: 6px; --wrap: 1240px; --hdr: 64px;
  --f: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr) + 12px); }
body { margin: 0; background: var(--bg); color: var(--tx); font: 500 15px/1.55 var(--f); min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--cy); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.1; margin: 0; }
h1 { font-weight: 900; font-size: clamp(28px, 4vw, 44px); letter-spacing: -.01em; text-transform: uppercase; }
h2 { font-weight: 800; font-size: clamp(20px, 2.4vw, 26px); }
h3 { font-weight: 800; font-size: 17px; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cy); outline-offset: 2px; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--cy); color: var(--cy-ink); padding: 8px 12px; border-radius: var(--r); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--mu); }
.small { font-size: 13px; }
.stack { display: grid; gap: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.row.center { justify-content: center; }
.sub { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--mu); margin-top: 6px; }
.pos { color: var(--cy); }
.neg { color: var(--red); }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r); border: 1px solid transparent; background: var(--s3); color: var(--tx); font-weight: 800; font-size: 14px; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .08s; white-space: nowrap; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--cy); color: var(--cy-ink); }
.btn-primary:hover:not(:disabled) { background: var(--cy2); }
.btn-ghost { background: transparent; border-color: var(--line2); }
.btn-ghost:hover:not(:disabled) { border-color: var(--mu); }
.btn-twitch { background: var(--tw); color: #fff; }
.btn-twitch:hover { background: #a36bff; }
.btn-danger { background: transparent; border-color: var(--red); color: var(--red); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn-lg { min-height: 52px; font-size: 16px; padding: 0 24px; }
.btn.done { background: var(--cy); color: var(--cy-ink); }
.btn .ico { display: inline-flex; }
.linklike { background: none; border: 0; padding: 0; color: var(--mu); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linklike:hover { color: var(--tx); }

/* Formulários */
.field { display: grid; gap: 6px; font-size: 13px; color: var(--mu); }
.field > span { font-weight: 700; }
input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; background: var(--s1); border: 1px solid var(--line2); border-radius: var(--r); color: var(--tx); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--cy); outline: none; }
.form-error { color: var(--red); font-size: 13px; min-height: 0; }
.form-error:empty { display: none; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--tx); min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--cy); }

/* Cabeçalho */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(6, 8, 9, .94); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.hdr { display: flex; align-items: center; gap: 22px; height: var(--hdr); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--tx); text-decoration: none; font-weight: 900; font-size: 17px; letter-spacing: -.01em; flex: none; }
.brand img { border-radius: 50%; background: #fff; }
.nav { display: flex; gap: 2px; flex: 1; min-width: 0; }
.nav a { color: var(--mu); text-decoration: none; font-weight: 700; font-size: 14px; padding: 8px 10px; border-radius: var(--r); white-space: nowrap; }
.nav a:hover { color: var(--tx); }
.nav a[aria-current=page] { color: var(--tx); box-shadow: inset 0 -2px 0 var(--cy); border-radius: 0; }
.hdr-right { display: flex; align-items: center; gap: 8px; flex: none; }
.pts { display: flex; align-items: baseline; gap: 6px; min-height: 40px; padding: 0 12px; background: var(--s2); border: 1px solid var(--line2); border-radius: 999px; cursor: pointer; }
.pts b { font-weight: 900; font-variant-numeric: tabular-nums; }
.pts span { font-size: 11px; color: var(--mu); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.pts.up b { color: var(--cy); transition: color 1s; }
.pts.down b { color: var(--tx); }
.bell, .me { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line2); background: var(--s2); cursor: pointer; padding: 0; }
.me img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.me .initial { font-weight: 900; }
.bell .badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--mg); color: #fff; font: 800 11px/18px var(--f); font-style: normal; }
.menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line2); background: var(--s2); border-radius: var(--r); cursor: pointer; padding: 12px 11px; flex-direction: column; justify-content: space-between; }
.menu-btn i { display: block; height: 2px; background: var(--tx); border-radius: 1px; }
.imp-bar { background: var(--amb); color: #1b1300; font-weight: 700; font-size: 14px; }
.imp-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.imp-bar .btn { background: #1b1300; color: var(--amb); }

@media (max-width: 1080px) {
  .hdr { gap: 10px; }
  .menu-btn { display: flex; order: 3; }
  .nav { position: fixed; inset: calc(var(--hdr) + 1px) 0 auto 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 20px 16px; display: none; max-height: calc(100vh - var(--hdr)); overflow: auto; }
  .menu-open .nav { display: flex; }
  .nav a { padding: 12px 6px; font-size: 16px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a[aria-current=page] { box-shadow: inset 3px 0 0 var(--cy); padding-left: 12px; }
  .hdr-right { margin-left: auto; }
}
@media (max-width: 420px) {
  .wrap { padding: 0 14px; }
  .brand span { display: none; }
  .pts { padding: 0 10px; }
  .pts span { display: none; }
  .hdr-right { gap: 6px; }
  .hdr-right .btn { padding: 0 12px; }
}

/* Rodapé e selo SRIJ */
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 28px 0 32px; background: var(--s1); }
.ftr { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; align-items: start; }
.ftr-rg { display: grid; gap: 12px; }
.ftr-rg p { color: var(--mu); font-size: 13px; max-width: 46ch; }
.ftr-links, .ftr-meta { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.ftr-links a, .ftr-meta a { color: var(--mu); text-decoration: none; min-height: 28px; display: inline-flex; align-items: center; }
.ftr-links a:hover, .ftr-meta a:hover { color: var(--tx); }
.ftr-meta .linklike { text-align: left; min-height: 28px; font-size: 14px; text-decoration: none; }
.srij { display: inline-flex; align-items: stretch; border: 1px solid var(--tx); border-radius: 4px; text-decoration: none; color: var(--tx); font-size: 13px; font-weight: 700; width: max-content; max-width: 100%; min-height: 36px; }
.srij b { background: var(--tx); color: var(--bg); padding: 0 8px; display: grid; place-items: center; font-weight: 900; }
.srij span { padding: 0 10px; display: grid; place-items: center; }
.srij:hover { border-color: var(--cy); }
.srij:hover b { background: var(--cy); }
@media (max-width: 760px) { .ftr { grid-template-columns: 1fr; } .ftr-links { flex-direction: row; flex-wrap: wrap; gap: 4px 16px; } }

/* Modais, gavetas, avisos */
dialog { color: var(--tx); }
.modal { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line2); border-radius: 10px; background: var(--s1); overflow: auto; }
.modal.wide { width: min(880px, calc(100vw - 24px)); }
.modal::backdrop, .drawer::backdrop { background: rgba(0, 0, 0, .7); }
.modal-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: var(--s1); border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 18px; }
.x { width: 40px; height: 40px; border: 0; background: var(--s3); border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; flex: none; }
.modal-body { padding: 18px; }
.drawer { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(420px, 100vw); padding: 0; border: 0; border-left: 1px solid var(--line2); background: var(--s1); overflow: auto; }
.drawer-body { padding: 18px; }
.toasts { position: fixed; z-index: 90; right: 16px; top: calc(var(--hdr) + 12px); display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.toast { background: var(--s3); border: 1px solid var(--line2); border-left: 3px solid var(--cy); padding: 12px 14px; border-radius: var(--r); font-size: 14px; font-weight: 600; transition: opacity .3s, transform .3s; }
.toast.err { border-left-color: var(--red); }
.toast.ok { border-left-color: var(--cy); }
.toast.out { opacity: 0; transform: translateX(10px); }
.gate { width: min(440px, calc(100vw - 24px)); text-align: center; }
.gate-in { padding: 28px 22px; display: grid; gap: 16px; justify-items: center; }
.gate-in img { border-radius: 50%; background: #fff; }
.gate-in h2 { font-size: 24px; font-weight: 900; }
.gate-in p { color: var(--mu); }
.popup { display: grid; gap: 12px; }
.popup img { border-radius: var(--r); }
.popup .tag { color: var(--pc, var(--cy)); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.popup h3 { font-size: 24px; font-weight: 900; }
.popup .lead { font-weight: 700; }

/* Carteira e notificações */
.wallet-head { display: flex; gap: 12px; align-items: center; }
.wallet-head img { border-radius: 50%; }
.wallet-head div { display: grid; }
.wallet-head small { color: var(--mu); }
.wallet-bal { display: flex; align-items: baseline; gap: 10px; padding: 16px; background: var(--s2); border-radius: var(--r); border-left: 3px solid var(--cy); }
.wallet-bal b { font-size: 32px; font-weight: 900; font-variant-numeric: tabular-nums; }
.wallet-bal span { color: var(--mu); font-size: 13px; font-weight: 700; }
.ledger, .notifs { list-style: none; margin: 0; padding: 0; display: grid; }
.ledger li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.l-what { display: grid; }
.l-what small { color: var(--mu); font-size: 12px; }
.l-when { color: var(--mu2); font-size: 12px; grid-row: 2; }
.l-delta { grid-row: 1 / 3; grid-column: 2; align-self: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.notifs li { padding: 12px 0 12px 12px; border-bottom: 1px solid var(--line); display: grid; gap: 2px; font-size: 14px; border-left: 3px solid transparent; }
.notifs li.unread { border-left-color: var(--cy); }
.notifs p { color: var(--mu); }
.notifs small { color: var(--mu2); font-size: 12px; }
.n-kind { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--mu); }

/* Cabeçalho de página (simples: o conteúdo começa logo) */
.page-top { padding: 28px 20px 18px; display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-top p { color: var(--mu); max-width: 60ch; margin-top: 8px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 18px; scrollbar-width: none; }
.tabs button { flex: none; min-height: 44px; padding: 0 14px; background: none; border: 0; color: var(--mu); font-weight: 700; cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button[aria-selected=true] { color: var(--tx); border-bottom-color: var(--cy); }
.empty { padding: 28px; border: 1px dashed var(--line2); border-radius: var(--r); color: var(--mu); text-align: center; }
.todo { border: 1px dashed var(--amb); border-radius: var(--r); padding: 16px; color: var(--mu); }
.todo b { color: var(--amb); display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--s3); color: var(--mu); }
.chip.on { background: rgba(0, 200, 255, .12); color: var(--cy); }
.chip.warn { background: rgba(255, 178, 30, .12); color: var(--amb); }
.chip.bad { background: rgba(255, 90, 100, .12); color: var(--red); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); display: inline-block; }
.live-dot.on { animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* Tabelas (admin, loja) */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--mu); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; background: var(--s1); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td .who { display: flex; align-items: center; gap: 8px; }
td .who img { width: 28px; height: 28px; border-radius: 50%; }

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