:root {
  --pink: #ff1493;
  --pink-dark: #d10f78;
  --pink-soft: #ffe3f1;
  --roxo: #4b0082;
  --roxo-dark: #33005a;
  --roxo-soft: #efe5f8;
  --text: #1f1430;
  --muted: #6b6280;
  --border: #e2dbec;
  --bg: #f6f3fa;
  --surface: #ffffff;
  --error: #d93025;
  --success: #188038;
  --success-soft: #e6f4ea;
  --warning: #b06000;
  --warning-soft: #fef3e0;
  --radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Elementos escondidos ficam escondidos mesmo com display definido por classe (ex.: grades). */
[hidden] { display: none !important; }

body {
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

a { color: var(--pink); }

h1, h2, h3 { line-height: 1.25; }

/* ---------- Login ---------- */

body.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: linear-gradient(135deg, var(--roxo) 0%, var(--pink) 100%);
}

.card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: 16px;
  padding: 40px 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.brand {
  text-align: center;
  margin-bottom: 28px;
}

.logo {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
  margin: 0 auto 8px;
}

.brand p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  font: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.btn-google:hover { background: #faf7fd; }
.btn-google:disabled { opacity: 0.7; cursor: wait; }

.signup {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  margin-bottom: 22px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.link {
  color: var(--pink);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.link:hover { text-decoration: underline; }

.form-message {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 14px;
  min-height: 1.2em;
}

.form-message.success { color: var(--success); }
.form-message.fail { color: var(--error); }

/* ---------- Formulários ---------- */

.field { margin-bottom: 16px; }

.field label,
.field .label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.field .req { color: var(--pink); }

.field .hint {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: -2px;
  margin-bottom: 6px;
}

.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field textarea { min-height: 90px; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 20, 147, 0.15);
}

.field .invalid,
.field input.invalid { border-color: var(--error) !important; }

.error {
  display: block;
  min-height: 1em;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--error);
}

.password-wrap { position: relative; }
.password-wrap input { padding-right: 80px !important; }

.toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--pink);
  cursor: pointer;
  padding: 6px 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}

.form-grid .full { grid-column: 1 / -1; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  cursor: pointer;
}

.check input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--pink);
  flex-shrink: 0;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.check-grid .check {
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
}

.notice {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  background: var(--roxo-soft);
  color: var(--roxo);
  border-left: 4px solid var(--roxo);
  margin: 8px 0 16px;
}

.notice.warn {
  background: var(--warning-soft);
  color: var(--warning);
  border-left-color: var(--warning);
}

.section-title {
  font-size: 1rem;
  color: var(--roxo);
  margin: 8px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--pink-soft);
}

.file-box {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 14px;
  background: #fcfbfe;
}

.opcoes-arquivo { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.opcoes-arquivo .check { padding: 8px 14px; border: 1.5px solid var(--border); border-radius: 999px; font-size: 0.88rem; }
.opcoes-arquivo .check:has(input:checked) { border-color: var(--pink); background: #fff8fc; font-weight: 600; }
.opcoes-arquivo .check input { margin-top: 2px; }

/* Inscrições: atalhos dos eventos abertos e exclusão */
.eventos-abertos { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.chip-evento {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.85rem;
  color: var(--roxo);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
}
.chip-evento span { font-size: 0.78rem; color: var(--muted); }
.chip-evento:hover { border-color: var(--pink); }
.chip-evento.ativo { background: var(--roxo); border-color: var(--roxo); color: #fff; }
.chip-evento.ativo span { color: #e9dcf7; }
tr.linha-excluida td { background: var(--vermelho-soft); color: var(--muted); }
.btn-excluir { color: var(--error) !important; }
.btn.btn-perigo { background: var(--error); }
.btn.btn-perigo:hover { background: #b3261e; }

.info-arquivo:empty { display: none; }
.info-arquivo { margin-bottom: 10px; }
.erro-inline { color: var(--error); }
.ref-cadastrada { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1.5px solid var(--success); border-radius: 10px; background: var(--success-soft); }
.ref-cadastrada img { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 8px; border: 1px solid var(--border); }

.avisos-arquivo { list-style: none; margin: 0 0 10px; padding: 10px 14px; border-radius: 10px; background: var(--warning-soft); color: var(--warning); font-size: 0.86rem; }
.avisos-arquivo li + li { margin-top: 4px; }

.file-box input[type="file"] { font-size: 0.85rem; max-width: 100%; }
.file-box .file-info { font-size: 0.8rem; color: var(--muted); margin-top: 6px; }
.file-box.ok { border-color: var(--success); background: var(--success-soft); }
.file-box.bad { border-color: var(--error); }

/* ---------- Botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  background: var(--pink);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}

.btn:hover { background: var(--pink-dark); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.sec { background: var(--roxo); }
.btn.sec:hover { background: var(--roxo-dark); }
.btn.ghost { background: transparent; color: var(--roxo); border: 1.5px solid var(--border); }
.btn.ghost:hover { background: var(--roxo-soft); }
.btn.ok { background: var(--success); }
.btn.sm { padding: 6px 12px; font-size: 0.82rem; border-radius: 8px; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.actions.end { justify-content: flex-end; }
.actions.between { justify-content: space-between; }

/* ---------- Layout do app ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 24px;
  background: var(--surface);
  border-bottom: 3px solid var(--pink);
}

.topbar img { height: 40px; width: auto; display: block; }

.user-box {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  min-width: 0;
}

.user-box .who { text-align: right; min-width: 0; }
.user-box .who strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.user-box .who span { color: var(--muted); font-size: 0.78rem; }

.layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: calc(100vh - 63px);
}

.sidebar {
  background: linear-gradient(180deg, var(--roxo) 0%, var(--roxo-dark) 100%);
  padding: 20px 12px;
}

.sidebar nav { display: flex; flex-direction: column; gap: 4px; }

.sidebar a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  color: #e9dcf7;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
}

.sidebar a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sidebar a.active { background: var(--pink); color: #fff; }

.sidebar .nav-group {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b9a3d4;
  padding: 14px 14px 4px;
}

.content {
  padding: 28px;
  min-width: 0;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.page-head h2 { font-size: 1.5rem; color: var(--roxo); }
.page-head p { color: var(--muted); font-size: 0.92rem; }

.panel {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 20px;
}

.panel h3 { font-size: 1.05rem; margin-bottom: 14px; color: var(--roxo); }

.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.center { text-align: center; }

.loading {
  padding: 40px;
  text-align: center;
  color: var(--muted);
}

.empty {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
}

/* ---------- Tabelas ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th, td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

th {
  background: var(--roxo-soft);
  color: var(--roxo);
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
}

/* Lista do palco: participante faltante em vermelho e riscado ao centro */
tr.linha-faltante td { background: #fff1f1; color: #c62828; }
tr.linha-faltante td.riscavel { text-decoration: line-through; text-decoration-color: #c62828; text-decoration-thickness: 2px; }
tbody tr.linha-faltante:hover td { background: #ffe6e6; }
td.palco-controles input { padding: 4px 6px; }

/* Cabeçalho que ordena a tabela ao clicar */
.th-ordem {
  background: none; border: none; padding: 0; margin: 0;
  font: inherit; color: inherit; cursor: pointer; white-space: nowrap;
}
.th-ordem:hover { text-decoration: underline; }
.th-ordem.ativo { color: var(--rosa, #FF1493); }

tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fcfaff; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td .actions { margin-top: 0; gap: 6px; flex-wrap: nowrap; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.toolbar .field { margin-bottom: 0; flex: 1 1 180px; }

/* ---------- Logo do evento ---------- */

.event-logo {
  display: block;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.event-logo.sm { width: 44px; height: 44px; flex-shrink: 0; }
.event-logo.lg { width: 100%; height: 90px; margin-bottom: 10px; padding: 6px; }
.logo-box .event-logo.lg { max-width: 220px; }

.event-cell { display: flex; align-items: center; gap: 10px; }

.insta-prev { margin-top: 4px; margin-bottom: 0; }
.insta-prev.ok { color: var(--success); font-weight: 500; }

.link-copiavel { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.link-copiavel .btn.sm { padding: 3px 10px; font-size: 0.75rem; }

/* ---------- Critérios e notas ---------- */

.crit-trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.crit-trio input {
  width: 100%;
  padding: 9px 12px;
  font: inherit;
  font-size: 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  outline: none;
}

.crit-trio input:focus { border-color: var(--pink); }

.modo-nota {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: var(--roxo-soft);
}

.bloco-nota { margin-bottom: 10px; }

/* Deliberação (nota extra da apuração) */
.deliberacao { font-weight: 700; font-variant-numeric: tabular-nums; }
.deliberacao.pos { color: var(--success); }
.deliberacao.neg { color: var(--error); }
.deliberacao-box { margin: 4px 0 12px; }

.nota-final label { color: var(--roxo); font-weight: 600; }
.nota-final input { font-weight: 700; font-size: 1.05rem !important; }
.nota-final input.auto { background: var(--roxo-soft) !important; color: var(--roxo); cursor: not-allowed; }

@media (max-width: 860px) {
  .crit-trio { grid-template-columns: 1fr; }
}

/* ---------- Cosplays e painel do cosplayer ---------- */

.cosplay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.cosplay-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Miniaturas: a imagem inteira, reduzida para caber (sem cortar), com fundo suave e borda. */
.cosplay-card .cosplay-img {
  width: calc(100% - 20px);
  height: 220px;
  margin: 10px 10px 0;
}
.cosplay-info { padding: 14px; }
.cosplay-info h4 { font-size: 1rem; }

.cosplay-img {
  display: block;
  object-fit: contain;
  padding: 4px;
  background: #faf8fd;
  border: 1.5px solid var(--border);
  border-radius: 10px;
}

/* Miniatura clicável (abre em tela cheia) */
.foto-btn { display: block; width: 100%; padding: 0; border: none; background: none; cursor: zoom-in; }
.foto-btn:focus-visible .cosplay-img { outline: 2px solid var(--pink); outline-offset: 2px; }
.foto-btn:hover .cosplay-img { border-color: var(--pink); }

.cosplay-img.vazio {
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  font-weight: 700;
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--roxo), var(--pink));
}

.destaque-cosplay { display: flex; gap: 16px; align-items: center; }
.destaque-cosplay .cosplay-img { width: 120px; height: 150px; flex-shrink: 0; }
.destaque-cosplay h4 { font-size: 1.15rem; color: var(--roxo); }

.cosplay-select select { font-weight: 500; }

.tipo-cosplay { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.tipo-cosplay .check { padding: 8px 14px; border: 1.5px solid var(--border); border-radius: 999px; }
.tipo-cosplay .check:has(input:checked) { border-color: var(--pink); background: #fff8fc; }

.tile.destaque {
  color: #fff;
  border: none;
  background: linear-gradient(135deg, var(--roxo), var(--pink));
}

a.tile-link { text-decoration: none; display: block; transition: transform 0.15s; }
a.tile-link:hover { transform: translateY(-2px); }

.tile.destaque .label,
.tile.destaque .sub,
.tile.destaque .value { color: #fff; }

tr.eu td { background: var(--pink-soft); }

/* Ranking geral: 1º-3º rosa, 4º-15º roxo */
table.ranking tbody tr td:first-child { border-left: 5px solid transparent; }
table.ranking tr.rk-podio td { background: var(--pink-soft); }
table.ranking tr.rk-podio td:first-child { border-left-color: var(--pink); }
table.ranking tr.rk-destaque td { background: var(--lilas-soft); }
table.ranking tr.rk-destaque td:first-child { border-left-color: var(--roxo); }
table.ranking tr.eu td { font-weight: 600; }
.legend-item.rk-podio::before { background: var(--pink); }
.legend-item.rk-destaque::before { background: var(--roxo); }
.ranking-scroll { max-height: 560px; overflow-y: auto; }
table.ranking tr.rk-salto td { text-align: center; color: var(--muted); letter-spacing: 0.3em; padding: 4px; background: var(--bg); }
.evento-ranking + .evento-ranking { margin-top: 20px; }

/* ---------- BeCommunity ---------- */

.comunidade-box {
  margin: 8px 0 14px;
  padding: 14px;
  border-radius: 10px;
  border: 1.5px dashed var(--pink);
  background: #fff8fc;
}

/* Tela cheia (BeCommunity) */
.tela-cheia {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  background: rgba(15, 8, 25, 0.94);
  color: #fff;
}
.tela-cheia .tc-topo, .tela-cheia .tc-base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
}
.tela-cheia .tc-imagem { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 56px; position: relative; }
.tela-cheia .tc-imagem img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.tela-cheia .tc-fechar, .tela-cheia .tc-seta {
  border: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  cursor: pointer;
}
.tela-cheia .tc-fechar:hover, .tela-cheia .tc-seta:hover { background: rgba(255, 255, 255, 0.25); }
.tela-cheia .tc-seta { position: absolute; top: 50%; transform: translateY(-50%); }
.tela-cheia .tc-seta.anterior { left: 8px; }
.tela-cheia .tc-seta.proxima { right: 8px; }
.tela-cheia .tc-legenda strong { font-size: 1.05rem; }
.tela-cheia .tc-legenda span { display: block; font-size: 0.85rem; opacity: 0.8; }
.tela-cheia .tc-abas { display: flex; gap: 6px; }
.tela-cheia .tc-abas button {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.tela-cheia .tc-abas button.ativa { background: #fff; color: var(--roxo); }
.tela-cheia .curtir { font-size: 0.95rem; padding: 8px 16px; }

@media (max-width: 480px) {
  .tela-cheia .tc-imagem { padding: 0 8px; }
  .tela-cheia .tc-seta { display: none; }
}

.ref-comparar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ref-comparar figure { margin: 0; }
.ref-comparar img { width: 100%; max-height: 420px; object-fit: contain; border-radius: 10px; background: var(--roxo-soft); }
.ref-comparar figcaption { text-align: center; font-size: 0.82rem; color: var(--muted); margin-top: 4px; }

@media (max-width: 480px) {
  .ref-comparar { grid-template-columns: 1fr; }
}

/* ---------- BeCo Artist ---------- */

.artist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

/* Curtidas (Sugoi!) */
.curtir {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--pink-dark);
  background: #fff;
  border: 1.5px solid var(--pink-soft);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.curtir:hover { background: var(--pink-soft); }
.curtir:active { transform: scale(0.95); }
.curtir.ativo { color: #fff; background: var(--pink); border-color: var(--pink); }
.curtir:disabled { opacity: 0.6; cursor: wait; }
.curtir-total { display: inline-flex; align-items: center; gap: 4px; font-size: 0.85rem; font-weight: 600; color: var(--pink-dark); }
.curtir-linha { margin-top: 10px; }
.curtir-resumo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--pink-dark); margin-bottom: 14px; }
.quem-curtiu { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.quem-curtiu li { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--pink-soft); color: var(--pink-dark); }
.quem-curtiu li strong { color: var(--text); }
.titulo-curtir { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.icone-curtida { flex-shrink: 0; vertical-align: middle; }
/* Brilho do olhinho: branco sobre a íris rosa; rosa quando o botão ativo deixa a íris branca */
.icone-curtida .brilho { fill: #fff; }
.curtir.ativo .icone-curtida .brilho { fill: var(--pink); }
.page-head h2 .icone-curtida { width: 28px; height: 28px; color: var(--pink); }

/* Dashboard Sugoi! */
.panel h3 .icone-curtida { color: var(--pink); }
.sugoi-lista { display: flex; flex-direction: column; gap: 8px; }
.sugoi-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.sugoi-mini { width: 64px; height: 64px; font-size: 1.4rem !important; }
.sugoi-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sugoi-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugoi-barra { display: block; height: 8px; margin-top: 4px; border-radius: 999px; background: var(--pink-soft); }
.sugoi-barra span { display: block; height: 100%; min-width: 2px; border-radius: 999px; background: var(--pink); }
.sugoi-total { display: inline-flex; align-items: center; gap: 4px; color: var(--pink-dark); font-size: 1.05rem; }

@media (max-width: 480px) {
  .sugoi-item { grid-template-columns: 52px minmax(0, 1fr) auto; }
  .sugoi-mini { width: 52px; height: 52px; }
  .sugoi-item .btn { grid-column: 1 / -1; }
}

/* Interruptor liga/desliga */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--border);
  transition: background 0.2s;
  flex-shrink: 0;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}
.switch input:checked + .switch-track { background: var(--pink); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--roxo); outline-offset: 2px; }

.link-btn { background: none; border: none; padding: 0; font: inherit; font-weight: 600; cursor: pointer; }

.artist-card { margin-bottom: 0; display: flex; flex-direction: column; }

/* Capa do artista: foto ou logo inteira (sem cortar) sobre fundo suave */
.artist-capa {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: contain;
  background: var(--roxo-soft);
  border-radius: 10px;
  margin-bottom: 12px;
}

.artist-capa.vazio {
  display: grid;
  place-items: center;
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--roxo), var(--pink));
}

.file-box .artist-capa { max-width: 320px; }
.artist-card .servicos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.artist-card .actions { margin-top: auto !important; padding-top: 10px; }

@media (max-width: 480px) {
  .artist-grid { grid-template-columns: 1fr; }
}

/* ---------- Seleção de equipe do evento ---------- */

.team-picker { margin-bottom: 8px; }
.team-picker .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.team-picker input {
  width: 100%;
  padding: 9px 12px;
  font: inherit;
  font-size: 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  outline: none;
}
.team-picker input:focus { border-color: var(--pink); }
.team-picker .sugestoes { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px 3px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  background: var(--roxo-soft);
  color: var(--roxo);
}

.chip button {
  border: none;
  background: none;
  color: inherit;
  font-size: 1.1rem;
  line-height: 1;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
}

.chip button:hover { background: rgba(75, 0, 130, 0.12); }

.sugestao {
  text-align: left;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.88rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.sugestao:hover { background: var(--roxo-soft); }

/* ---------- Histórico: cor por situação ---------- */

:root {
  --lilas: #8e4fc6;
  --lilas-soft: #f1e6fb;
  --vermelho-soft: #fdecea;
}

table.hist tbody tr td:first-child { border-left: 5px solid transparent; }
table.hist tr.st-nao td { background: var(--vermelho-soft); }
table.hist tr.st-nao td:first-child { border-left-color: var(--error); }
table.hist tr.st-participou td { background: var(--lilas-soft); }
table.hist tr.st-participou td:first-child { border-left-color: var(--lilas); }
table.hist tr.st-podio td { background: var(--pink-soft); }
table.hist tr.st-podio td:first-child { border-left-color: var(--pink); }

.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; font-size: 0.85rem; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-item::before { content: ""; width: 14px; height: 14px; border-radius: 4px; }
.legend-item.st-nao::before { background: var(--error); }
.legend-item.st-participou::before { background: var(--lilas); }
.legend-item.st-podio::before { background: var(--pink); }

.dupla-tag {
  display: inline-block;
  margin: 4px 0 2px;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #ffe066;
  color: #5c4200;
}

/* ---------- Badges ---------- */

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--roxo-soft);
  color: var(--roxo);
}

.badge.pink { background: var(--pink-soft); color: var(--pink-dark); }
.badge.ok { background: var(--success-soft); color: var(--success); }
.badge.warn { background: var(--warning-soft); color: var(--warning); }
.badge.off { background: #eee; color: #666; }
.badge.nao { background: var(--error); color: #fff; }
.badge.lilas { background: var(--lilas); color: #fff; }
.badge.pink { background: var(--pink); color: #fff; }

/* ---------- Cards de escolha ---------- */

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.choice {
  position: relative;
  display: block;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.choice:hover { border-color: #d8b5f0; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }

.choice:has(input:checked) {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 20, 147, 0.15);
  background: #fff8fc;
}

.choice:has(input:focus-visible) { outline: 2px solid var(--roxo); outline-offset: 2px; }

.choice .title { font-weight: 600; display: block; }
.choice .meta { font-size: 0.82rem; color: var(--muted); }

.event-date {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--roxo);
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
}

/* ---------- Progresso da inscrição ---------- */

.progress {
  margin-bottom: 24px;
}

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--roxo-soft);
  overflow: hidden;
}

.progress-bar div {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--roxo), var(--pink));
  transition: width 0.4s ease;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
  list-style: none;
}

.steps li {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.steps li .n {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.75rem;
  background: var(--roxo-soft);
  color: var(--roxo);
  flex-shrink: 0;
}

.steps li.done .n { background: var(--roxo); color: #fff; }
.steps li.current { color: var(--text); font-weight: 600; }
.steps li.current .n { background: var(--pink); color: #fff; }

.term-text {
  background: #faf8fd;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  font-size: 0.92rem;
  margin-bottom: 12px;
}

.term-text h4 { color: var(--roxo); margin-bottom: 8px; font-size: 0.95rem; }

.upload-progress {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Sucesso ---------- */

.success-hero {
  text-align: center;
  padding: 40px 24px;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(135deg, var(--roxo) 0%, var(--pink) 100%);
  margin-bottom: 20px;
}

.success-hero .icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  background: rgba(255, 255, 255, 0.2);
}

.success-hero h2 { font-size: 1.6rem; margin-bottom: 12px; }
.success-hero p { max-width: 560px; margin: 0 auto 8px; opacity: 0.95; }

/* ---------- Dashboard ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.tile .label { font-size: 0.8rem; color: var(--muted); }
.tile .value { font-size: 2rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.tile .sub { font-size: 0.78rem; color: var(--muted); }

.bars { display: flex; flex-direction: column; gap: 10px; }

.bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 34%) 1fr 44px;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}

.bar-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.bar-row .track { height: 14px; display: flex; align-items: center; }
.bar-row .fill { height: 14px; background: var(--pink); border-radius: 0 4px 4px 0; min-width: 2px; }
.bar-row .count { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.bar-row:hover .fill { background: var(--pink-dark); }

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

/* ---------- Jurado ---------- */

.entry-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}

.entry-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.entry-card h4 { font-size: 1rem; }

.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0 12px;
}

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tabs button {
  padding: 8px 14px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--roxo);
  cursor: pointer;
}

.tabs button.active { background: var(--roxo); border-color: var(--roxo); color: #fff; }

.podium-pos {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.8rem;
  background: var(--roxo-soft);
  color: var(--roxo);
}

.podium-pos.p1 { background: var(--pink); color: #fff; }

/* ---------- Modal e avisos ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(31, 20, 48, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}

.modal {
  width: 100%;
  max-width: 760px;
  background: var(--surface);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.modal-head h3 { color: var(--roxo); font-size: 1.15rem; }

.modal-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.detail-list {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 6px 14px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.detail-list dt { color: var(--muted); }
.detail-list dd { overflow-wrap: anywhere; }

.preview-img { max-width: 100%; max-height: 320px; border-radius: 10px; display: block; margin-top: 8px; }

.toast-area {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: calc(100vw - 32px);
}

.toast {
  padding: 12px 16px;
  border-radius: 10px;
  color: #fff;
  background: var(--roxo);
  font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.toast.ok { background: var(--success); }
.toast.fail { background: var(--error); }

/* ---------- Responsivo ---------- */

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }

  .sidebar { padding: 8px; position: sticky; top: 63px; z-index: 15; }
  .sidebar nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .sidebar .nav-group { display: none; }
  .sidebar a { padding: 8px 12px; font-size: 0.85rem; }

  .content { padding: 16px; }
  .panel { padding: 16px; }
  .topbar { padding: 10px 16px; }
  .topbar img { height: 32px; }
  .user-box .who strong { max-width: 120px; }
  .two-col, .form-grid { grid-template-columns: 1fr; }
  .steps li .label { display: none; }
  .steps li { justify-content: center; }
  .detail-list { grid-template-columns: 1fr; gap: 0; }
  .detail-list dd { margin-bottom: 8px; }
  .bar-row { grid-template-columns: minmax(90px, 38%) 1fr 36px; }
}

@media (max-width: 480px) {
  .card { padding: 32px 20px; }
  .user-box .who { display: none; }
}
