/* =====================================================================
   Rede Horizon — base de todas as páginas
   Segue o manual da marca: fundo quase preto, chapas marrom-escuras, bordas
   de 2px, quinas retas, botões com "degrau" embaixo, Monocraft em títulos,
   botões, menus e números; Manrope no texto corrido.
   ===================================================================== */

@font-face { font-family: "Monocraft"; src: url("../fonts/Monocraft.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Monocraft"; src: url("../fonts/Monocraft-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  /* fundo e chapas */
  --bg: #120E0C;
  --bg-deep: #0C0908;
  --plate: #1A1411;
  --plate-2: #221A16;
  --plate-3: #2B211B;
  --line: #33271F;
  --line-2: #4A3729;
  /* texto */
  --text: #F3E9DF;
  --text-2: #DCCDBF;
  --muted: #A8978A;
  /* marca */
  --yellow: #F9D423;
  --orange: #FC913A;
  --red: #FF4E50;
  --step: #7A2E10;
  --grad: linear-gradient(90deg, #FF4E50, #FC913A 50%, #F9D423);
  /* moedas e cargos */
  --money: #4ADE80;
  --cash: #F9D423;
  --liga: #C084FC;
  --master: #5EC8FF;
  --elite: #C98BFF;
  --supremo: #F9D423;
  /* tipografia */
  --pixel: "Monocraft", ui-monospace, "Cascadia Mono", Consolas, monospace;   /* só no nome da marca e na prévia do chat */
  --display: "Chakra Petch", "Manrope", "Segoe UI", system-ui, sans-serif;     /* títulos, botões, menus e números */
  --body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --code: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  /* medidas */
  --wrap: 1200px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 500 16px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
main { flex: 1; }
[hidden] { display: none !important; }
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--yellow); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: #FFE36B; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 700; line-height: 1.15; letter-spacing: 0; text-wrap: balance; }
ul, ol { margin: 0; padding: 0; }
strong, b { font-weight: 800; color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--orange); color: #1A0E06; }

/* foco sempre visível, no amarelo da marca */
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 200;
  font-family: var(--display); font-weight: 600; font-size: 14px; text-decoration: none;
  background: var(--yellow); color: #1A0E06; padding: 12px 16px; box-shadow: 0 4px 0 var(--step);
  transition: top .15s;
}
.skip-link:focus { top: 12px; color: #1A0E06; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- textos de apoio ---------- */
.label {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 700; font-size: 12px; line-height: 1.2; letter-spacing: .14em; text-transform: uppercase;
  color: var(--orange);
}
.label::before { content: ""; width: 8px; height: 8px; flex: none; background: currentColor; box-shadow: 0 2px 0 var(--step); }
.muted { color: var(--muted); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.money { color: var(--money); } .cash { color: var(--cash); } .liga { color: var(--liga); }
.mono { font-family: var(--display); font-weight: 700; }
kbd {
  font-family: var(--display); font-weight: 700; font-size: 12px; line-height: 1;
  border: 2px solid var(--line-2); border-bottom-width: 4px; background: var(--plate-2); padding: 3px 6px; color: var(--text-2);
}

.section { padding-block: clamp(56px, 8vw, 104px); position: relative; }
.section + .section { padding-top: 0; }
.section-head { display: grid; gap: 12px; margin-bottom: clamp(28px, 4vw, 44px); max-width: 720px; }
.section-head h2 { font-size: clamp(28px, 4vw, 44px); }
.section-head p { color: var(--muted); font-size: 17px; max-width: 60ch; }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }

/* ---------- botões ---------- */
.btn {
  --b-bg: var(--plate-2); --b-fg: var(--text); --b-line: var(--line-2); --b-step: #3A2B21;   /* degrau visível no fundo escuro */
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 10px 20px; margin-bottom: 4px;
  font-family: var(--display); font-weight: 600; font-size: 15px; line-height: 1.1; letter-spacing: .02em; text-decoration: none; white-space: nowrap;
  color: var(--b-fg); background: var(--b-bg);
  border: 2px solid var(--b-line); border-radius: 0;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.08), 0 4px 0 var(--b-step);
  transition: transform .12s var(--ease), box-shadow .12s var(--ease), background-color .15s, border-color .15s, color .15s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { color: var(--b-fg); border-color: var(--yellow); transform: translateY(-2px); box-shadow: inset 0 2px 0 rgba(255,255,255,.08), 0 6px 0 var(--b-step); }
.btn:active { transform: translateY(4px); box-shadow: inset 0 2px 0 rgba(0,0,0,.2), 0 0 0 var(--b-step); }
.btn-primary {
  --b-fg: #1A0E06; --b-line: #FFB46B; --b-step: var(--step);
  background-color: var(--orange);
  background-image: linear-gradient(180deg, #FFAB52, var(--orange) 55%, #F07A22);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.45), inset 0 -3px 0 rgba(122,46,16,.35), 0 4px 0 var(--b-step);
}
.btn-primary:hover { border-color: #FFE08A; box-shadow: inset 0 2px 0 rgba(255,255,255,.45), inset 0 -3px 0 rgba(122,46,16,.35), 0 6px 0 var(--b-step); }
.btn-primary:active { box-shadow: inset 0 3px 0 rgba(122,46,16,.35), 0 0 0 var(--b-step); }
.btn-discord {
  --b-fg: #fff; --b-line: #8891F7; --b-step: #2B2F80;
  background-color: #5865F2; background-image: linear-gradient(180deg, #6F7BF7, #5865F2 55%, #4752C4);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.3), inset 0 -3px 0 rgba(0,0,0,.2), 0 4px 0 var(--b-step);
}
.btn-discord:hover { border-color: #C3C8FF; box-shadow: inset 0 2px 0 rgba(255,255,255,.3), inset 0 -3px 0 rgba(0,0,0,.2), 0 6px 0 var(--b-step); }
.btn-discord:active { box-shadow: inset 0 3px 0 rgba(0,0,0,.25), 0 0 0 var(--b-step); }
.btn-ghost { --b-bg: transparent; --b-line: transparent; box-shadow: none; margin-bottom: 0; }
.btn-ghost:hover, .btn-ghost:active { box-shadow: none; transform: none; border-color: var(--line-2); }
.btn-sm { min-height: 40px; padding: 7px 14px; font-size: 13px; }
.btn-lg { min-height: 56px; padding: 12px 26px; font-size: 17px; }
.btn[aria-disabled="true"], .btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0;
  background: var(--plate-2); border: 2px solid var(--line-2); color: var(--text);
  transition: border-color .15s, color .15s, background-color .15s;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { border-color: var(--yellow); color: var(--yellow); }
.link-btn { background: none; border: 0; padding: 6px 0; min-height: 32px; color: var(--yellow); font-family: var(--display); font-weight: 600; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- botão do IP (a peça-chave da marca: IP em Monocraft dentro do botão com degrau) ---------- */
.ip-btn {
  display: inline-flex; align-items: stretch; min-height: 64px; margin-bottom: 6px; padding: 0; text-align: left; max-width: 100%;
  background: var(--plate); border: 2px solid var(--line-2);
  box-shadow: 0 6px 0 #0A0706; transition: transform .12s var(--ease), box-shadow .12s var(--ease), border-color .15s;
}
.ip-btn:hover { border-color: var(--yellow); transform: translateY(-2px); box-shadow: 0 8px 0 #0A0706; }
.ip-btn:active { transform: translateY(6px); box-shadow: 0 0 0 #0A0706; }
.ip-btn .ip-text { display: grid; align-content: center; gap: 4px; padding: 10px 18px; min-width: 0; }
.ip-btn .ip-label { font-family: var(--display); font-weight: 600; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ip-btn .ip-value { font-family: var(--display); font-weight: 700; font-size: clamp(15px, 2.2vw, 20px); line-height: 1.2; color: var(--text); overflow-wrap: anywhere; }
.ip-btn .ip-action {
  display: inline-flex; align-items: center; gap: 8px; padding: 0 18px; flex: none;
  font-family: var(--display); font-weight: 600; font-size: 14px; color: #1A0E06;
  background: linear-gradient(180deg, #FFAB52, var(--orange) 55%, #F07A22);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.45), inset 0 -3px 0 rgba(122,46,16,.35);
  transition: background .2s;
}
.ip-btn .ip-action svg { width: 18px; height: 18px; }
.ip-btn.is-copied { border-color: var(--money); }
.ip-btn.is-copied .ip-action { background: linear-gradient(180deg, #8DF5B2, var(--money) 55%, #22C55E); color: #06260F; }
@media (max-width: 420px) { .ip-btn .ip-action .ip-action-text { display: none; } .ip-btn .ip-action { padding: 0 16px; } }

/* ---------- cartões ---------- */
.card { position: relative; background: var(--plate); border: 2px solid var(--line); padding: clamp(18px, 2.4vw, 26px); }
a.card { display: block; color: inherit; text-decoration: none; transition: border-color .18s, transform .18s var(--ease), box-shadow .18s var(--ease); }
a.card:hover { color: inherit; border-color: var(--line-2); transform: translateY(-3px); box-shadow: 0 6px 0 #0A0706; }
a.card:active { transform: translateY(0); box-shadow: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px;
  font-family: var(--display); font-weight: 600; font-size: 12px; line-height: 1; padding: 6px 10px;
  border: 2px solid var(--line-2); background: var(--plate-2); color: var(--text-2); white-space: nowrap;
}
.chip.ok { color: var(--money); border-color: rgba(74,222,128,.35); }
.chip.bad { color: #FF8A8C; border-color: rgba(255,78,80,.35); }
.chip.warn { color: var(--yellow); border-color: rgba(249,212,35,.4); }

/* ícones em pixel (12×12, desenhados em main.js) */
.px { display: inline-block; width: 40px; height: 40px; flex: none; }
.px svg { width: 100%; height: 100%; }
.px .px-img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }

/* bolinha de status */
.dot { position: relative; display: inline-block; width: 10px; height: 10px; flex: none; background: var(--muted); }
.dot.on { background: var(--money); }
.dot.off { background: var(--red); }
.dot.on::after { content: ""; position: absolute; inset: -4px; border: 2px solid var(--money); opacity: 0; animation: ping 2.2s var(--ease) infinite; }
@keyframes ping { 0% { opacity: .8; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.6); } }

/* ---------- cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(18, 14, 12, .8); backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 2px solid transparent; transition: border-color .2s, background-color .2s;
}
.site-header.is-scrolled, body.nav-open .site-header { border-bottom-color: var(--line); background: rgba(18, 14, 12, .96); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; flex: none; min-height: 48px; }
.brand:hover { color: var(--text); }
.brand img { width: auto; height: 48px; transition: transform .25s var(--ease); }
.brand:hover img { transform: translateY(-2px) rotate(-4deg); }
/* letreiro: "REDE" pequeno e espaçado em cima, "HORIZON" no degradê da marca com o degrau embaixo */
.brand-name { display: grid; gap: 3px; font-family: var(--pixel); font-weight: 400; line-height: 1; text-transform: uppercase; white-space: nowrap; }
.brand-top { font-size: 10px; letter-spacing: .62em; color: var(--text-2); padding-left: 1px; }
.brand-main {
  font-size: 20px; letter-spacing: .06em;
  background: linear-gradient(180deg, #FFE36B, var(--yellow) 35%, var(--orange) 80%, #F26B2E);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 var(--step));
}

.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: 2px; }
.main-nav a {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  font-family: var(--display); font-weight: 600; font-size: 17px; color: var(--text-2); text-decoration: none;
}
.main-nav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px; background: var(--yellow); transform: scaleX(0); transform-origin: left; transition: transform .2s var(--ease); }
.main-nav a:hover { color: var(--text); }
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); }
.main-nav a[aria-current="page"] { color: var(--yellow); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions .btn { margin-bottom: 0; }
.header-actions .btn-sm { min-height: 44px; padding: 8px 18px; font-size: 16px; }
.nav-toggle { display: none; }
.nav-extra { display: none; }

@media (max-width: 900px) {
  /* backdrop-filter faria o menu fixo ficar preso dentro do cabeçalho */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(18, 14, 12, .97); }
  .nav-toggle { display: inline-grid; }
  .header-actions { margin-left: auto; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 0; margin: 0; z-index: 49;
    background: var(--bg); padding: 12px var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px));
    display: flex; flex-direction: column; gap: 24px; overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s, transform .2s var(--ease), visibility 0s .2s;
  }
  .main-nav.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .2s, transform .2s var(--ease); }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav li + li { border-top: 2px solid var(--line); }
  .main-nav a { width: 100%; min-height: 60px; font-size: 18px; padding: 0 4px; }
  .main-nav a::after { display: none; }
  .main-nav a[aria-current="page"]::before { content: ""; width: 8px; height: 8px; margin-right: 12px; background: var(--yellow); }
  .nav-extra { display: grid; gap: 12px; }
  .nav-extra .ip-btn { width: 100%; }
  .header-actions .hide-sm { display: none; }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 360px) { .brand-main { font-size: 17px; } .brand img { height: 42px; } }

/* ---------- rodapé ---------- */
.site-footer { border-top: 2px solid var(--line); background: var(--bg-deep); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(2, 1fr); gap: 40px; padding-block: 48px 36px; }
.footer-brand { display: grid; gap: 18px; align-content: start; }
.footer-brand img { width: 230px; }
.footer-brand p { color: var(--muted); max-width: 38ch; font-size: 15px; }
.footer-col h2 { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.footer-col ul { list-style: none; display: grid; }
.footer-col a { display: inline-flex; align-items: center; min-height: 38px; color: var(--text-2); text-decoration: none; }
.footer-col a:hover { color: var(--yellow); }
.fn-left { display: inline-flex; align-items: center; gap: 10px; }
.fn-lock { display: inline-grid; place-items: center; width: 32px; height: 32px; color: var(--muted); border: 2px solid transparent; transition: color .15s, border-color .15s; }
.fn-lock svg { width: 15px; height: 15px; }
.fn-lock:hover, .fn-lock:focus-visible { color: var(--yellow); border-color: var(--line-2); }
.fn-center { text-align: center; }
.fn-right { text-align: right; }
.fn-right a { color: var(--text-2); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
.fn-right a:hover { color: var(--yellow); }
@media (max-width: 760px) { .footer-note { grid-template-columns: 1fr; justify-items: center; text-align: center; } .fn-right { text-align: center; } }
.footer-note {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px 24px;
  padding-block: 20px calc(20px + env(safe-area-inset-bottom, 0px)); border-top: 2px solid var(--line);
  font-size: 13px; color: var(--muted);
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- topo das páginas internas ---------- */
.page-head { position: relative; overflow: hidden; border-bottom: 2px solid var(--line); isolation: isolate; }
.page-head .wrap { position: relative; padding-block: clamp(44px, 6vw, 76px) clamp(56px, 7vw, 88px); display: grid; gap: 14px; justify-items: start; }
.page-head h1 { font-size: clamp(28px, 6vw, 62px); overflow-wrap: anywhere; }
.page-head p { color: var(--text-2); font-size: 18px; max-width: 58ch; }
.page-head-sm .wrap { padding-block: clamp(32px, 4vw, 48px) clamp(48px, 5vw, 64px); gap: 10px; }
.page-head-sm h1 { font-size: clamp(32px, 4.6vw, 48px); }
.page-head-sm p { font-size: 17px; }

/* pôr do sol em pixel: anéis em degraus + faixas do horizonte (vêm do logo antigo) */
.sunset {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(ellipse var(--sun-w, 58%) var(--sun-h, 90%) at var(--sun-x, 74%) var(--sun-y, 116%), #6E3010 0 16%, #55250F 16% 30%, #3D1C0F 30% 46%, #2B160E 46% 64%, #1D120D 64% 82%, transparent 82%),
    var(--bg);
}
/* as faixas do horizonte só aparecem no topo da página inicial */
.hero .sunset::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 104px;
  background:
    linear-gradient(var(--orange), var(--orange)) 0 12px / 100% 8px no-repeat,
    linear-gradient(var(--orange), var(--orange)) 0 36px / 100% 6px no-repeat,
    linear-gradient(var(--orange), var(--orange)) 0 62px / 100% 4px no-repeat,
    linear-gradient(var(--orange), var(--orange)) 0 94px / 100% 2px no-repeat;
  opacity: .28;
}
.page-head .sunset { --sun-x: 86%; }
/* em tela em pé (celular, tablet) o tamanho em % esticava o sol: lá ele segue a largura da tela */
@media (orientation: portrait), (max-width: 760px) {
  .sunset { --sun-w: 130vw; --sun-h: 64vw; --sun-y: calc(100% + 12vw); }
  .hero .sunset, .login .sunset { --sun-w: 175vw; --sun-h: 140vw; --sun-y: calc(100% + 28vw); }
}

/* ---------- formulários ---------- */
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  background: var(--bg); border: 2px solid var(--line-2); border-radius: 0; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: #85746A; }
.input:hover, .select:hover, .textarea:hover { border-color: #6A503D; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(249,212,35,.25); }
.input[aria-invalid="true"] { border-color: var(--red); }
.field { display: grid; gap: 8px; }
.field > label, .field-label { font: 600 14.5px/1.3 var(--body); color: var(--text); }
.field-hint { font-size: 14px; color: #B9AA9C; }
.field-hint.bad { color: #FF8A8C; }

/* ---------- comandos copiáveis ---------- */
.cmd { display: inline-flex; align-items: stretch; vertical-align: middle; max-width: 100%; border: 2px solid var(--line-2); background: var(--bg); }
.cmd code { font-family: var(--code); font-weight: 500; font-size: 14.5px; line-height: 1.35; padding: 7px 11px; color: var(--yellow); overflow-wrap: anywhere; }
.cmd button {
  display: grid; place-items: center; width: 40px; flex: none; padding: 0;
  background: var(--plate-2); border: 0; border-left: 2px solid var(--line-2); color: var(--muted);
  transition: color .15s, background-color .15s;
}
.cmd button svg { width: 16px; height: 16px; }
.cmd button:hover { color: var(--yellow); background: var(--plate-3); }
.cmd button.is-copied { color: var(--money); }

/* ---------- avisos (toast) ---------- */
.toast-region { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 300; display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--plate-2); border: 2px solid var(--line-2); box-shadow: 0 4px 0 #0A0706, 0 16px 40px rgba(0,0,0,.45);
  font-size: 15px; animation: toast-in .25s var(--ease) both;
}
.toast .t-icon { display: grid; place-items: center; width: 28px; height: 28px; flex: none; background: var(--money); color: #06260F; }
.toast .t-icon.info { background: var(--yellow); color: #1A0E06; }
.toast .t-icon svg { width: 16px; height: 16px; }
.toast.is-leaving { animation: toast-out .25s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- diálogos ---------- */
dialog {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; color: var(--text);
  background: var(--plate); border: 2px solid var(--line-2); box-shadow: 0 8px 0 #0A0706, 0 30px 80px rgba(0,0,0,.6);
}
dialog::backdrop { background: rgba(8, 6, 5, .72); backdrop-filter: blur(3px); }
dialog[open] { animation: dlg-in .22s var(--ease) both; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 14px 22px; border-bottom: 2px solid var(--line); }
.dialog-head h2 { font-size: 20px; }
.dialog-body { padding: 22px; display: grid; gap: 18px; }

/* ---------- abas ---------- */
.tabs { display: inline-flex; flex-wrap: wrap; border: 2px solid var(--line-2); background: var(--bg); padding: 4px; }
.tab {
  min-height: 44px; padding: 0 18px; border: 0; background: transparent; color: var(--muted);
  font-family: var(--display); font-weight: 600; font-size: 14px; transition: color .15s, background-color .15s;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"], .tab[aria-pressed="true"] { background: var(--orange); color: #1A0E06; box-shadow: inset 0 2px 0 rgba(255,255,255,.4), inset 0 -3px 0 rgba(122,46,16,.35); }

/* ---------- tabela ---------- */
.table-wrap { overflow-x: auto; border: 2px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 2px solid var(--line); vertical-align: middle; }
th { font-family: var(--body); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--plate-2); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }

/* ---------- aparecer ao rolar ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
}
