/* PurpleMC - estilo do site (docs/site.md > Visual).
   Regras: cores sólidas (roxo só como cor de marca, sem gradiente), cantos de 6-8 px, sem brilho, sem caixa dentro
   de caixa, ícones em SVG (nunca emoji), texto alinhado à esquerda (menos o bloco do IP no topo do início), um só
   padrão de botão (.btn e .btn-primary, e .btn-danger para apagar). Tudo que muda de cor mora em :root. O fundo é
   quase preto puxado para o roxo (o tom da arte do banner), não cinza neutro. */

:root {
  --bg: #120d18;
  --surface: #1a1422;
  --surface-2: #231c2d;
  --border: #2e2639;
  --border-strong: #43384f;
  --text: #eeebf3;
  --muted: #a9a2b6;
  --faint: #7a7189;
  --brand: #7c3aed;
  --brand-hover: #6d28d9;
  --header: #120d18;
  --lilac: #c4b5fd;
  --ok: #22c55e;
  --warn: #eab308;
  --bad: #ef4444;
  --radius: 8px;
  --radius-sm: 6px;
  --header-h: 76px;
  --max: 1440px;
  --gutter: 48px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-title: "Exo 2", "Inter", system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--lilac); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-title); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--lilac); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: min(var(--max), 100% - var(--gutter)); margin-inline: auto; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .86rem; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.icon { width: 18px; height: 18px; flex-shrink: 0; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ cabeçalho */
/* Três partes: busca e os primeiros links | a logo no meio | os outros links e a conta. Fundo da página, com uma
   linha embaixo; no celular, logo à esquerda e tudo o mais no menu. */
.site-header, #site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: var(--header); }
.site-header { border-bottom: 1px solid var(--border); }
.header-bar { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 24px; }
.header-side { display: flex; align-items: center; gap: 18px; min-width: 0; }
.header-right { justify-content: flex-end; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 58px; width: auto; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a, .nav-drawer a {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--text); font-weight: 600; font-size: .94rem; white-space: nowrap;
}
.nav a:hover, .nav-drawer a:hover { background: var(--surface-2); text-decoration: none; }
.nav a[aria-current="page"], .nav-drawer a[aria-current="page"] { color: var(--lilac); }
.nav .icon { width: 19px; height: 19px; }
.search { position: relative; width: 210px; flex-shrink: 1; min-width: 150px; }
.search input {
  width: 100%; height: 38px; padding: 0 12px 0 36px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
}
.search input:focus { outline: none; border-color: var(--lilac); }
.search input::placeholder { color: var(--faint); }
.search button { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.search button .icon { width: 17px; height: 17px; }
.search-results {
  position: absolute; top: 44px; left: 0; right: 0; z-index: 5; min-width: 220px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden;
}
.search-results a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: var(--text); }
.search-results a:hover, .search-results a.active { background: var(--surface-2); text-decoration: none; }
.search-results img { width: 24px; height: 24px; border-radius: 4px; image-rendering: pixelated; }
.account-menu { position: relative; }
.account-btn { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 5px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); cursor: pointer; font-weight: 700; }
.account-btn:hover { border-color: var(--border-strong); }
.account-btn img { width: 28px; height: 28px; border-radius: 4px; image-rendering: pixelated; }
.account-btn .chevron { width: 16px; height: 16px; color: var(--muted); }
.account-menu .menu { position: absolute; right: 0; top: 46px; min-width: 210px; padding: 4px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
.account-menu .menu a, .account-menu .menu button { display: block; width: 100%; padding: 9px 12px; text-align: left; border: 0; background: none; border-radius: 4px; color: var(--text); cursor: pointer; }
.account-menu .menu a:hover, .account-menu .menu button:hover { background: var(--surface-2); text-decoration: none; }
.login-link { color: var(--text); font-weight: 600; padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius); white-space: nowrap; }
.login-link:hover { background: var(--surface-2); text-decoration: none; }
.menu-toggle { display: none; border: 1px solid var(--border); background: var(--surface); color: var(--text); width: 40px; height: 40px; border-radius: var(--radius-sm); cursor: pointer; place-items: center; }
.nav-drawer { display: none; }

/* ------------------------------------------------------------------ botões e campos (um padrão só) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--border); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-danger { color: #fca5a5; border-color: rgba(239, 68, 68, .45); background: transparent; }
.btn-danger:hover { background: rgba(239, 68, 68, .12); }
.btn-sm { height: 32px; padding: 0 12px; font-size: .86rem; }
.btn-block { width: 100%; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label, .label { font-weight: 600; font-size: .9rem; }
.hint { font-size: .82rem; color: var(--muted); }
.input {
  width: 100%; min-height: 40px; padding: 8px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--bg); color: var(--text);
}
textarea.input { min-height: 130px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--lilac); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--brand); width: 16px; height: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stack > * + * { margin-top: 14px; }

/* ------------------------------------------------------------------ blocos */
.box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.box-head h2, .box-head h3 { margin: 0; font-size: 1.05rem; }
.box-body { padding: 16px 18px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.section { padding: 28px 0; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-title h2 { margin: 0; }
.page-head { padding: 30px 0 8px; }
.page-head p { color: var(--muted); max-width: 680px; margin: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 4px; font-size: .75rem; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border-strong); }
.badge-ok { color: #86efac; border-color: rgba(34, 197, 94, .4); }
.badge-warn { color: #fde047; border-color: rgba(234, 179, 8, .4); }
.badge-bad { color: #fca5a5; border-color: rgba(239, 68, 68, .4); }
.badge-brand { color: var(--lilac); border-color: rgba(196, 181, 253, .45); }
.rank { font-weight: 800; }
.head { width: 40px; height: 40px; border-radius: 4px; image-rendering: pixelated; background: var(--surface-2); flex-shrink: 0; }
.empty { padding: 22px; color: var(--muted); }
.skeleton { background: var(--surface-2); border-radius: 4px; min-height: 14px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.list > * + * { border-top: 1px solid var(--border); }
.online { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.dot.on { background: var(--ok); }
.dot.warn { background: var(--warn); }

/* ------------------------------------------------------------------ época especial (Natal, Halloween...) */
.season-bar { background: color-mix(in srgb, var(--season, var(--brand)) 22%, var(--bg)); border-bottom: 2px solid var(--season, var(--brand)); font-size: .9rem; }
.season-bar .container { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 0; }
.season-bar .icon { color: var(--season); width: 20px; height: 20px; }
.season-bar a { margin-left: auto; color: var(--text); font-weight: 600; }
.season-coupon code { padding: 1px 6px; border-radius: 4px; background: rgba(0, 0, 0, .3); font-weight: 700; }
body[data-season] .hero-banner { border-color: var(--season); }
.seasonal { border-color: var(--season, var(--lilac)); }
.seasonal .tier { color: var(--season, var(--lilac)); }

/* ------------------------------------------------------------------ início */
/* O hero: o banner (arte da turma) num quadro com a largura do conteúdo e, embaixo, centralizados, o título, o IP para
   copiar (a ação principal), o Discord e uma linha com quem está online. O banner corta só o céu em telas largas. */
.hero { padding: 20px 0 8px; }
.hero-banner {
  display: block; width: 100%; height: clamp(170px, min(28vw, 46vh), 470px); object-fit: cover; object-position: 50% 64%;
  border-radius: var(--radius); border: 1px solid var(--border);
}
.hero-copy { display: grid; justify-items: center; text-align: center; padding: 26px 0 6px; }
.hero-copy h1 { margin: 0; font-size: clamp(1.6rem, 1.2rem + 1.8vw, 3rem); font-weight: 800; letter-spacing: -.01em; }
.hero-sub { margin: 8px 0 0; color: var(--muted); font-size: 1.05rem; max-width: 66ch; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; }
.hero-actions .btn { height: 54px; padding: 0 22px; border-radius: var(--radius); font-size: 1rem; }
.hero-actions .btn .icon { width: 20px; height: 20px; }
.hero-actions .btn:not(.btn-primary) { background: transparent; }
.hero-actions .btn:not(.btn-primary):hover { background: var(--surface-2); }
.hero-ip { min-width: 200px; }
.hero-ip-text { display: grid; text-align: left; line-height: 1.2; }
.hero-ip-text small { font-weight: 500; font-size: .82rem; opacity: .85; }
.hero-ip.is-copied { background: #15803d; border-color: #15803d; }
.hero-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px; margin: 14px 0 0; color: var(--faint); font-size: .88rem; }
.hero-meta .online { font-size: inherit; }

.modes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 20px 0 24px; }
.mode { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
a.mode:hover { border-color: var(--lilac); text-decoration: none; }
.mode .icon { width: 28px; height: 28px; color: var(--lilac); }
.mode strong { display: block; font-family: var(--font-title); font-size: 1.05rem; line-height: 1.2; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; padding-bottom: 20px; }
.side > * + * { margin-top: 16px; }
.news-post { padding: 18px; }
.news-post h3 { margin: 0; font-size: 1.15rem; }
.news-post h3 a { color: var(--text); }
.news-meta { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: .84rem; }
.news-meta img { width: 22px; height: 22px; border-radius: 4px; image-rendering: pixelated; }
.news-post .text { margin: 10px 0 0; color: #d6d3de; }
.news-post .cover { width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--radius-sm); margin-top: 12px; }
.social-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.social-list .btn { justify-content: flex-start; }
.store-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 18px 0 20px; padding: 4px; }
.store-bar .tabs { margin: 0; border: 0; }
.store-bar .tabs button, .store-bar .tabs a { border: 0; background: none; padding: 9px 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-radius: var(--radius-sm); }
.store-bar .tabs a:hover { color: var(--text); text-decoration: none; }
.store-bar .tabs button[aria-selected="true"] { color: var(--text); background: var(--surface-2); }
.store-account { display: flex; align-items: center; gap: 8px; padding-right: 6px; font-weight: 600; }
.store-account img { width: 26px; height: 26px; border-radius: 4px; image-rendering: pixelated; }

/* ------------------------------------------------------------------ fórum */
.categories > * + * { border-top: 1px solid var(--border); }
.category { display: grid; grid-template-columns: 44px minmax(0, 1fr) 150px 260px; gap: 16px; align-items: start; padding: 18px; }
.category-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--brand); color: #fff; }
.category-icon .icon { width: 24px; height: 24px; }
.category h3 { margin: 0; font-size: 1.25rem; }
.category h3 a { color: var(--text); }
.category p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.filters { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; font-size: .88rem; }
.filters a { color: var(--text); font-weight: 600; }
.counts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.counts div { text-align: center; padding: 6px 4px; background: var(--surface-2); border-radius: var(--radius-sm); }
.counts strong { display: block; font: 700 1.15rem var(--font-title); }
.counts span { font-size: .75rem; color: var(--muted); }
.last { border-left: 2px solid var(--brand); padding-left: 10px; font-size: .84rem; min-width: 0; }
.last .when { display: flex; align-items: center; gap: 6px; color: var(--faint); }
.last .when img { width: 18px; height: 18px; border-radius: 3px; image-rendering: pixelated; }
.last a { color: var(--text); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.forum-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.post { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 14px 18px; color: var(--text); }
a.post:hover { background: var(--surface-2); text-decoration: none; }
.post .head { width: 44px; height: 44px; }
.post .author { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; font-size: .92rem; }
.post h3 { margin: 2px 0; font-size: 1.02rem; }
.post .excerpt { color: var(--muted); margin: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post .meta { display: flex; gap: 14px; color: var(--faint); font-size: .8rem; margin-top: 4px; }
.sidebar .post { grid-template-columns: 32px 1fr; padding: 10px 16px; }
.sidebar .post .head { width: 32px; height: 32px; }
.sidebar .post h3 { font-size: .94rem; }
.thread-body { font-size: 1rem; line-height: 1.7; }
.reply { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 14px 18px; }
.reply .head { width: 36px; height: 36px; }
.reply .who { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 700; }

/* ------------------------------------------------------------------ loja */
.facts { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; color: var(--muted); font-size: .9rem; }
.facts span { display: inline-flex; gap: 6px; align-items: center; }
.facts .icon { width: 16px; height: 16px; color: var(--lilac); }
.tabs { display: inline-flex; border-bottom: 1px solid var(--border); gap: 4px; margin: 18px 0 20px; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--lilac); }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.plan.recommended { border-color: var(--lilac); }
.plan .tier { font: 800 1.5rem var(--font-title); }
.plan .tagline { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.price { margin: 14px 0 2px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price .now { font: 800 1.8rem var(--font-title); }
.price .old { color: var(--faint); text-decoration: line-through; }
.price .per { color: var(--muted); font-size: .88rem; }
.plan .note { color: var(--muted); font-size: .82rem; min-height: 20px; }
.plan ul { list-style: none; padding: 0; margin: 14px 0 18px; display: grid; gap: 7px; flex: 1; }
.plan li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; font-size: .92rem; }
.plan li .icon { width: 16px; height: 16px; margin-top: 3px; color: var(--lilac); }
.period { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; }
.period button { border: 1px solid var(--border-strong); background: var(--bg); padding: 6px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; font-size: .86rem; color: var(--muted); }
.period button[aria-pressed="true"] { border-color: var(--lilac); color: var(--text); }
.period small { display: block; font-weight: 500; color: #86efac; }
.coins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.coin-pack .amount { font: 800 1.6rem var(--font-title); }
.compare { width: 100%; border-collapse: collapse; font-size: .92rem; }
.compare th, .compare td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: center; }
.compare th:first-child, .compare td:first-child { text-align: left; }
.compare thead th { background: var(--surface-2); }
.compare .group td { font-weight: 700; color: var(--lilac); text-align: left; background: var(--bg); }
.yes { color: #86efac; }
.no { color: var(--faint); }
.scroll { overflow-x: auto; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.faq details { border-bottom: 1px solid var(--border); padding: 12px 2px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 8px 0 0; color: var(--muted); }
.lines { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.lines div { display: flex; justify-content: space-between; gap: 10px; }
.lines .total { font-weight: 800; font-size: 1.05rem; }
.discount { color: #86efac; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border-strong); border-top-color: var(--lilac); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ jogador, conta e ranking */
.account-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
/* Item de grade não encolhe abaixo do conteúdo (tabela larga) sem isto: a página rolaria para o lado no celular. */
.profile > *, .home-grid > *, .forum-layout > *, .admin-layout > *, .account-grid > * { min-width: 0; }
.profile { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.skin-card { text-align: center; }
.skin-card img.body { margin: 0 auto 12px; height: 280px; width: auto; image-rendering: pixelated; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px 18px; }
.stat .value { font: 800 1.3rem var(--font-title); }
.stat .label { color: var(--muted); font-size: .8rem; }
.bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.bar > div { height: 100%; background: var(--brand); }
.data-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.data-table th, .data-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.data-table th { color: var(--muted); font-weight: 600; font-size: .8rem; background: var(--surface-2); }
.data-table td.num, .data-table th.num { text-align: right; }
.data-table tr:last-child td { border-bottom: 0; }
.player-cell { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; }
.player-cell img { width: 26px; height: 26px; border-radius: 4px; image-rendering: pixelated; }
.pos { font-weight: 800; width: 44px; color: var(--muted); }
.pos-1 { color: #facc15; } .pos-2 { color: #d4d4d8; } .pos-3 { color: #d97706; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border-strong); background: var(--surface); padding: 6px 12px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; font-size: .86rem; color: var(--muted); }
.chip[aria-pressed="true"] { border-color: var(--lilac); color: var(--text); }

/* ------------------------------------------------------------------ login */
.auth { max-width: 500px; margin: 36px auto; }
.steps { counter-reset: step; display: grid; gap: 10px; margin: 16px 0 20px; padding: 0; list-style: none; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 28px 1fr; gap: 10px; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; background: var(--surface-2); color: var(--lilac); font-weight: 800; font-size: .85rem; margin-top: 1px; }
.code-input { text-align: center; font: 800 1.6rem var(--font-title); letter-spacing: 8px; text-transform: uppercase; height: 56px; }
kbd { padding: 1px 6px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border-strong); font-family: ui-monospace, monospace; font-size: .9em; }

/* ------------------------------------------------------------------ painel */
.admin-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; padding: 24px 0 40px; align-items: start; }
.admin-nav { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 2px; }
.admin-nav button { text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: var(--radius-sm); cursor: pointer; color: var(--muted); font-weight: 600; }
.admin-nav button:hover { background: var(--surface); color: var(--text); }
.admin-nav button[aria-selected="true"] { background: var(--surface-2); color: var(--text); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.kpi .label { color: var(--muted); font-size: .82rem; }
.kpi .value { font: 800 1.45rem var(--font-title); }
.kpi .sub { color: var(--faint); font-size: .8rem; }
.chart { width: 100%; height: 200px; display: block; }
.chart .bar-day { fill: var(--brand); }
.chart .bar-day:hover { fill: var(--lilac); }
.chart .axis { fill: var(--faint); font-size: 10px; }
.chart .grid-line { stroke: var(--border); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar .input { width: auto; min-width: 170px; }

/* ------------------------------------------------------------------ diálogo e avisos */
dialog.modal { width: min(540px, calc(100% - 24px)); max-height: calc(100vh - 40px); padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); }
dialog.modal-wide { width: min(780px, calc(100% - 24px)); }
dialog.modal::backdrop { background: rgba(5, 4, 8, .7); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 1.1rem; }
.modal-close { border: 0; background: none; width: 32px; height: 32px; border-radius: var(--radius-sm); cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.modal-close:hover { background: var(--surface-2); }
.modal-body { padding: 16px 18px; overflow: auto; max-height: calc(100vh - 180px); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.toasts { position: fixed; bottom: 16px; right: 16px; left: 16px; z-index: 100; display: grid; gap: 8px; justify-items: end; pointer-events: none; }
.toast { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border-strong); max-width: 360px; pointer-events: auto; }
.toast.ok { border-left: 3px solid var(--ok); }
.toast.bad { border-left: 3px solid var(--bad); }
.alert { padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); }
.alert-warn { border-left: 3px solid var(--warn); }
.alert-bad { border-left: 3px solid var(--bad); }

/* ------------------------------------------------------------------ rodapé */
.site-footer { margin-top: 40px; border-top: 1px solid var(--border); background: #0e0d12; padding: 28px 0 18px; color: var(--muted); font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
.site-footer h4 { color: var(--text); font-size: .9rem; margin: 0 0 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.social { display: flex; gap: 8px; margin-top: 18px; }
.social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); color: var(--text); }
.social a:hover { background: var(--surface-2); text-decoration: none; }
.social .icon { width: 20px; height: 20px; }
.footer-bottom { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--border); font-size: .8rem; color: var(--faint); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ telas largas */
/* Monitor grande: o conteúdo ocupa até 1440 px e o texto cresce um pouco, em vez de uma coluna estreita no meio. */
@media (min-width: 1280px) {
  :root { --header-h: 80px; --gutter: 64px; }
  body { font-size: 16px; }
  .brand img { height: 62px; }
  .nav a { font-size: 1rem; padding: 9px 12px; }
  .nav .icon { width: 20px; height: 20px; }
  .search { width: 250px; }
  .search input, .account-btn, .login-link { height: 42px; }
  .hero { padding-top: 24px; }
  .hero-copy { padding-top: 32px; }
  .hero-sub { font-size: 1.15rem; }
  .hero-actions .btn { height: 58px; padding: 0 26px; font-size: 1.05rem; }
  .hero-ip { min-width: 220px; }
  .hero-meta { font-size: .94rem; }
  .modes { gap: 16px; margin: 28px 0 32px; }
  .mode { gap: 14px; padding: 18px 20px; }
  .mode .icon { width: 32px; height: 32px; }
  .mode strong { font-size: 1.15rem; }
  h2 { font-size: 1.45rem; }
  .news-post { padding: 22px 24px; }
  .news-post h3 { font-size: 1.25rem; }
}

/* ------------------------------------------------------------------ telas menores */
@media (max-width: 1180px) {
  .modes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .header-bar { gap: 14px; }
  .header-side { gap: 8px; }
  .nav .icon { display: none; }
  .search { width: 170px; }
}
@media (max-width: 900px) {
  :root { --header-h: 60px; }
  .menu-toggle { display: inline-grid; }
  .header-bar { grid-template-columns: auto minmax(0, 1fr); }
  .header-bar > .header-side:first-child { display: none; }
  .header-right .nav { display: none; }
  .nav-drawer:not([hidden]) {
    display: grid; gap: 2px; position: fixed; top: var(--header-h); left: 0; right: 0; padding: 10px 16px 14px;
    background: var(--header); border-bottom: 1px solid var(--border);
  }
  .nav-drawer .search { width: 100%; margin-bottom: 6px; }
  .nav-drawer a { padding: 11px 8px; font-size: 1rem; }
  .brand img { height: 40px; }
  .hero { padding-top: 12px; }
  .home-grid, .forum-layout, .profile, .admin-layout, .account-grid { grid-template-columns: 1fr; }
  .category { grid-template-columns: 44px minmax(0, 1fr); }
  .category .counts, .category .last { grid-column: 2; }
  .admin-nav { position: static; grid-auto-flow: column; overflow-x: auto; }
  .plans, .coins, .grid-3 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  :root { --gutter: 32px; }
  h1 { font-size: 1.55rem; }
  .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .account-btn span { display: none; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1 1 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .modal-foot .btn { flex: 1; }
}
a.chip:hover { text-decoration: none; }
