/* CABAL ACTION — compatibilidade: veste as páginas que ainda usam a marcação do tema Dark
   (painel da conta, eventos, loja, suporte, admin) com a Identidade Imperial, sem mexer no HTML delas.
   Carregado por último. Páginas reconstruídas no tema novo usam $pageClass = 'pagina-nova'. */

/* ---------- 1. Fontes: as páginas antigas pedem Oxanium/Rajdhani; agora são Saira Condensed e Inter (locais) ---------- */
@font-face { font-family: "Oxanium"; font-weight: 400 600; font-display: swap; src: url("../fonts/saira-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Oxanium"; font-weight: 700; font-display: swap; src: url("../fonts/saira-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Oxanium"; font-weight: 800 900; font-display: swap; src: url("../fonts/saira-condensed-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Rajdhani"; font-weight: 300 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Rajdhani"; font-weight: 500; font-display: swap; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Rajdhani"; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Rajdhani"; font-weight: 700 900; font-display: swap; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); }

/* ---------- 2. Tokens do tema Dark trocados pela paleta Imperial ---------- */
body.tema-action {
  --bg: #0B0D10;
  --bg-header: rgba(11,13,16,.96);
  --bg-surface: #12161B;
  --bg-card: #12161B;
  --border-soft: rgba(224,181,74,.16);
  --border-med: rgba(224,181,74,.28);
  --border-tab: rgba(224,181,74,.18);
  --azul: #00E08A;
  --azul-dark: #00A86B;
  --ouro: #E0B54A;
  --ouro-dark: #A8741E;
  --roxo: #00E08A;
  --roxo-dark: #00A86B;
  --text-primary: #E9EDF1;
  --text-secondary: #A7B0BA;
  --text-muted: #7D8792;
  --text-faint: #6B7480;
  --glow-azul: 0 8px 26px rgba(0,224,138,.22);
  --glow-ouro: 0 4px 18px rgba(224,181,74,.32);
  --radius-sm: 2px; --radius-md: 3px; --radius-lg: 4px; --radius-xl: 4px;
  font-family: var(--f-texto);
}
body.tema-action::before { display: none; } /* fundo antigo (Themes/Dark/images/fundo) */

/* ---------- 3. Área principal ---------- */
body.tema-action .site-main { padding-top: 32px; }
body.pagina-nova .site-main { padding: 0; max-width: none; }
.site-splash { background: #0B0D10; }
.selo-contagem { display: inline-block; margin-left: 6px; padding: 0 6px; font-size: .72rem; line-height: 1.5; color: #2A1A05; background: var(--ouro); }

/* links: nas páginas antigas os links sem classe herdam a cor (como antes); os com classe seguem a classe */
:where(body:not(.pagina-nova) .site-main) a { color: inherit; }
:where(body:not(.pagina-nova) .site-main) p a:not([class]) { color: var(--forca); }

/* ---------- 4. Cartões, títulos e selos do tema Dark ---------- */
.tema-action .card {
  background: linear-gradient(180deg, #151A20, #0F1317);
  border: 1px solid rgba(224,181,74,.18);
  border-radius: 2px;
  box-shadow: 0 18px 40px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,231,163,.06);
}
.tema-action .card::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--ouro), transparent); opacity: .55; pointer-events: none; }
.tema-action .page-title {
  font-family: var(--f-titulo); font-weight: 800; letter-spacing: .02em;
  background: var(--metal-platina); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tema-action .card-badge { border-radius: 0; font-family: var(--f-texto); letter-spacing: .12em; }
.tema-action .card-badge--gold, .tema-action .card-badge--blue, .tema-action .card-badge--cyan { background: rgba(224,181,74,.12); border-color: rgba(224,181,74,.4); color: var(--ouro-luz); }
.tema-action .card-badge--purple, .tema-action .card-badge--violet, .tema-action .card-badge--teal { background: rgba(0,224,138,.10); border-color: rgba(0,224,138,.35); color: var(--forca-nucleo); }

/* ---------- 5. Botões das páginas antigas (a classe .btn é compartilhada com o tema novo) ---------- */
.tema-action .btn { border-radius: 2px; }
.tema-action .btn--primary, .tema-action .btn--ouro, .tema-action .btn-submit {
  color: #2A1A05; border: 1px solid var(--ouro-luz);
  background: linear-gradient(180deg, rgba(255,240,190,.5), rgba(255,255,255,0) 45%, rgba(92,58,14,.35)), url("../img/ui/ouro-escovado.webp") center / 256px, var(--ouro);
  box-shadow: inset 0 1px 0 rgba(255,250,225,.8), inset 0 -3px 0 rgba(92,58,14,.45), 0 6px 18px rgba(0,0,0,.35);
  border-radius: 2px; font-family: var(--f-titulo);
}
.tema-action .btn--primary:hover, .tema-action .btn--ouro:hover, .tema-action .btn-submit:hover { color: #1A1003; filter: brightness(1.08) drop-shadow(0 0 12px rgba(224,181,74,.45)); }
.tema-action .btn--ghost, .tema-action .btn-sm {
  background: linear-gradient(180deg, #1A1F25, #0E1216); border: 1px solid var(--platina-base); color: var(--platina-luz); border-radius: 2px;
}
.tema-action .btn--ghost:hover, .tema-action .btn-sm:hover { border-color: var(--ouro); color: var(--ouro-luz); }
.tema-action .btn--danger { background: linear-gradient(180deg, #4A1515, #2A0B0B); border: 1px solid #B94A4A; color: #FFD4D4; border-radius: 2px; }

/* ---------- 6. Formulários e tabelas ---------- */
.tema-action .form-input, .tema-action input[type="text"], .tema-action input[type="password"], .tema-action input[type="email"],
.tema-action input[type="number"], .tema-action select, .tema-action textarea {
  border-radius: 2px; border-color: rgba(211,215,221,.18); background-color: #0E1216;
}
.tema-action .form-input:focus, .tema-action input:focus, .tema-action select:focus, .tema-action textarea:focus { border-color: var(--ouro); box-shadow: 0 0 0 3px rgba(224,181,74,.15); outline: none; }
.tema-action .table-wrapper { border-radius: 2px; border-color: rgba(224,181,74,.16); }
.tema-action table th { color: var(--ouro); letter-spacing: .12em; }

/* ---------- 7. Painel da conta, admin e eventos: realces na cor nova ---------- */
.tema-action .admin-card, .tema-action .admin-summary__card, .tema-action .dashboard-character-card { border-radius: 2px; border-color: rgba(224,181,74,.18); }
.tema-action .admin-summary__value, .tema-action .dashboard-character-card__value { color: var(--ouro-luz); }
.nav__link--admin { color: var(--ouro); }

/* ---------- 8. Painel "Logado Premiado" (parcial do tema antigo) ---------- */
.tema-action .logado-premiado, .tema-action [class*="hourly-reward"] { border-radius: 2px; }

/* ---------- 9. Links para a ficha do personagem (ranking, guilda, busca) ---------- */
.link-ficha { color: inherit; text-decoration: underline; text-decoration-color: rgba(224,181,74,.45); text-underline-offset: 4px; }
.link-ficha:hover { color: var(--ouro-luz); text-decoration-color: var(--ouro); }
.busca-ficha { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }
.busca-ficha .busca { min-width: min(360px, 100%); }
