/* Tema Rede Sigma: cartaz dos anos 40, preto, carmesim e dourado. */

:root {
  --carmim: #b3121b;
  --breu: #0e0e0e;
  --ouro: #c9a54c;
  --marmore: #ede8df;
  --oliva: #4b4a2f;
}

/* Textura de papel subtil */
body.paper {
  background-color: var(--breu);
  background-image:
    radial-gradient(ellipse at top, rgba(179, 18, 27, 0.12), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.93 0 0 0 0 0.91 0 0 0 0 0.87 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-attachment: fixed;
}

.page-title {
  font-family: Oswald, sans-serif;
  font-size: 2rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--marmore);
  border-left: 6px solid var(--carmim);
  padding-left: 0.75rem;
  line-height: 1.1;
}
.page-subtitle { margin-top: 0.35rem; color: rgba(237, 232, 223, 0.6); font-size: 0.9rem; }

.section-title {
  font-family: Oswald, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ouro);
  font-size: 0.95rem;
}

.poster-card {
  background: linear-gradient(180deg, rgba(30, 28, 26, 0.92), rgba(18, 17, 16, 0.92));
  border: 1px solid rgba(201, 165, 76, 0.25);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(237, 232, 223, 0.04);
}

.stripe {
  height: 6px;
  background: repeating-linear-gradient(-45deg, var(--carmim) 0 10px, var(--breu) 10px 20px);
  border-top: 1px solid var(--ouro);
  border-bottom: 1px solid var(--ouro);
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(160deg, rgba(179, 18, 27, 0.22), rgba(14, 14, 14, 0.9) 70%);
  border: 1px solid rgba(201, 165, 76, 0.3);
  border-top: 3px solid var(--carmim);
  border-radius: 6px;
}
.stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.2em; color: rgba(237, 232, 223, 0.6); }
.stat-value { font-family: Oswald, sans-serif; font-size: 2rem; color: var(--ouro); line-height: 1.1; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1.25rem;
  font-size: 0.9rem;
  color: rgba(237, 232, 223, 0.8);
  border-left: 3px solid transparent;
}
a.nav-link:hover { background: rgba(201, 165, 76, 0.08); color: var(--marmore); }
.nav-active { border-left-color: var(--carmim); background: rgba(179, 18, 27, 0.15); color: var(--ouro) !important; }

.btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: Oswald, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.6rem 1.25rem;
  border-radius: 4px;
  transition: filter 0.15s, background 0.15s;
}
.btn-primary { background: var(--carmim); color: var(--marmore); border: 1px solid var(--ouro); }
.btn-primary:hover { filter: brightness(1.15); }
.btn-ghost { padding: 0.35rem 0.8rem; border: 1px solid rgba(201, 165, 76, 0.4); color: var(--ouro); }
.btn-ghost:hover { background: rgba(201, 165, 76, 0.1); }

.alert-error {
  background: rgba(179, 18, 27, 0.2);
  border: 1px solid var(--carmim);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

.badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.1rem 0.45rem;
  border: 1px solid rgba(201, 165, 76, 0.4);
  color: var(--ouro);
  border-radius: 3px;
  font-weight: 500;
}

/* Interruptor ligar/desligar */
.toggle {
  position: relative;
  flex-shrink: 0;
  width: 3.25rem;
  height: 1.75rem;
  border-radius: 999px;
  background: #2a2826;
  border: 1px solid rgba(201, 165, 76, 0.35);
  transition: background 0.2s;
}
.toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  background: var(--marmore);
  transition: transform 0.2s;
}
.toggle-on { background: var(--carmim); }
.toggle-on .toggle-knob { transform: translateX(1.5rem); background: var(--ouro); }
.toggle:disabled { opacity: 0.5; cursor: not-allowed; }
.toggle.htmx-request { opacity: 0.6; }

.flash { animation: flash 0.9s ease-out; }
@keyframes flash { from { background: rgba(201, 165, 76, 0.2); } to { background: transparent; } }

/* Formulários */
.label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(237, 232, 223, 0.7);
}
.input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  background: #141312;
  color: var(--marmore);
  border: 1px solid rgba(201, 165, 76, 0.3);
  border-radius: 4px;
  font-size: 0.9rem;
}
.input:focus { outline: 2px solid var(--ouro); outline-offset: 1px; border-color: transparent; }
.input:disabled { opacity: 0.6; cursor: not-allowed; }
select.input option { background: #141312; color: var(--marmore); }
.input-error { border-color: var(--carmim); box-shadow: 0 0 0 1px var(--carmim); }
.field-error { margin-top: 0.3rem; font-size: 0.8rem; color: #ff7a7a; }

.alert-ok {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.6);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

.chip {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(201, 165, 76, 0.4);
  border-radius: 999px;
  color: var(--ouro);
  background: rgba(201, 165, 76, 0.06);
}
.chip:hover { background: rgba(201, 165, 76, 0.16); }

/* Imitação de uma mensagem do Discord na pré-visualização */
.discord-message {
  background: #313338;
  color: #dbdee1;
  border-radius: 6px;
  padding: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.4;
}

code {
  font-family: ui-monospace, monospace;
  font-size: 0.85em;
  color: var(--ouro);
}

/* Blocos que abrem e fecham (regras da moderação) */
.rule-card {
  border: 1px solid rgba(201, 165, 76, 0.2);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.2);
}
.rule-card[open] { border-color: rgba(201, 165, 76, 0.45); }
.rule-card > summary { list-style: none; }
.rule-card > summary::-webkit-details-marker { display: none; }
.rule-card > summary::after { content: "▸"; color: var(--ouro); transition: transform 0.15s; }
.rule-card[open] > summary::after { transform: rotate(90deg); }
.badge-on { border-color: rgba(34, 197, 94, 0.6); color: #4ade80; }
