/* Painel administrativo: Bootstrap 5 + tema claro/escuro. */

:root { --mp-sidebar: 250px; }

body { min-height: 100vh; }

/* ─── Telas de login / avisos ─── */
.mp-limpo {
  background: linear-gradient(160deg, #eef2ff 0%, #f8f9fa 55%);
  min-height: 100vh;
  display: flex;
  align-items: center;
}

[data-bs-theme='dark'] .mp-limpo { background: linear-gradient(160deg, #10142a 0%, #14161c 55%); }

.mp-caixa-auth {
  max-width: 420px;
  margin: 0 auto;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.mp-captcha { border-radius: 6px; border: 1px solid var(--bs-border-color); background: #f8f9fa; }
.mp-codigo { letter-spacing: 8px; font-weight: 600; }

/* ─── Sidebar ─── */
.mp-sidebar {
  width: var(--mp-sidebar);
  min-height: 100vh;
  background: #0f172a;
  color: #cbd5e1;
  position: sticky;
  top: 0;
  flex-shrink: 0;
  overflow-y: auto;
}

.mp-marca {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid #1e293b;
}

.mp-marca i { color: #60a5fa; }

.mp-sidebar .nav-link {
  color: #cbd5e1;
  padding: 10px 20px;
  font-size: 0.92rem;
  border-left: 3px solid transparent;
}

.mp-sidebar .nav-link:hover { background: #1e293b; color: #fff; }
.mp-sidebar .nav-link.ativo { background: #1e293b; color: #fff; border-left-color: #3b82f6; }

/* ─── Topo ─── */
.mp-conteudo { min-width: 0; }

.mp-topo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--bs-body-bg);
  border-bottom: 1px solid var(--bs-border-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

/* ─── Cartões de indicador ─── */
.mp-kpi {
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  padding: 18px;
  background: var(--bs-body-bg);
  height: 100%;
}

.mp-kpi .valor { font-size: 1.9rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mp-kpi .rotulo { color: var(--bs-secondary-color); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.5px; }
.mp-kpi .icone { font-size: 1.5rem; opacity: 0.25; }

/*
 * Pills e badges sempre com fundo sólido — nunca as variantes translúcidas
 * (`text-bg-*-subtle`). É a regra visual do produto.
 */
.mp-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: #6c757d;
  line-height: 1.5;
}

.mp-pill-ativo { background: #198754; }
.mp-pill-pendente { background: #fd7e14; }
.mp-pill-inativo { background: #6c757d; }
.mp-pill-anonimizado { background: #212529; }

.mp-pill-disponivel { background: #0d6efd; }
.mp-pill-reservada { background: #fd7e14; }
.mp-pill-entregue { background: #198754; }
.mp-pill-cancelada, .mp-pill-expirada { background: #6c757d; }

.mp-pill-agendado { background: #0d6efd; }
.mp-pill-confirmado { background: #198754; }
.mp-pill-realizado { background: #0f5132; }
.mp-pill-cancelado { background: #6c757d; }

.mp-tabela td, .mp-tabela th { vertical-align: middle; }

/* ─────────────────────────────── Agenda ─────────────────────────────── */

/* A cor do evento é escolhida pelo usuário e vem no `style` inline. */
.mp-cor-evento {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.mp-calendario { table-layout: fixed; }
.mp-calendario td { height: 108px; vertical-align: top; padding: 4px; }
.mp-calendario .mp-dia-numero { font-size: 0.78rem; font-weight: 600; color: var(--bs-secondary-color); margin-bottom: 2px; }
.mp-calendario .mp-fora-do-mes { background: var(--bs-tertiary-bg); }
.mp-calendario .mp-fora-do-mes .mp-dia-numero { opacity: 0.5; }
.mp-calendario .mp-hoje .mp-dia-numero { color: var(--bs-primary); }

.mp-calendario .mp-evento {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  line-height: 1.4;
  padding: 1px 2px;
  border-radius: 4px;
  color: var(--bs-body-color);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-calendario .mp-evento:hover { background: var(--bs-secondary-bg); }
.mp-calendario .mp-evento-hora { color: var(--bs-secondary-color); font-variant-numeric: tabular-nums; }
.mp-calendario .mp-evento-cancelado { text-decoration: line-through; opacity: 0.55; }

/* ─────────────────────────────── Rádio ─────────────────────────────── */

.mp-radio { max-width: 560px; margin: 0 auto; }
.mp-radio .min-w-0 { min-width: 0; }

/* O palco tem altura fixa: o player do YouTube, a tela de intervalo e a
   cortina de "toque para ouvir" ocupam o mesmo espaço, sem a página pular. */
.mp-radio-palco {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}
.mp-radio-palco iframe { width: 100%; height: 100%; border: 0; }

.mp-radio-intervalo,
.mp-radio-capa {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
}
.mp-radio-intervalo { background: #212529; }
.mp-radio-capa { background: rgba(0, 0, 0, 0.85); }

.mp-radio-play { width: 72px; height: 72px; }

.mp-ordem { width: 1.6rem; text-align: right; font-variant-numeric: tabular-nums; }

/* ─────────────────────────── Mesa do bingo ─────────────────────────── */

.mp-mesa-bola {
  width: 130px;
  height: 130px;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #e9ecef 45%, #ced4da);
  color: #212529;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 -6px 12px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.2);
}
.mp-mesa-letra { font-size: 1.4rem; font-weight: 700; color: var(--bs-primary); line-height: 1; }
.mp-mesa-numero { font-size: 3rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }

@keyframes mp-bola-cai { 0% { transform: translateY(-40px) scale(0.7); opacity: 0; } 100% { transform: none; opacity: 1; } }
.mp-mesa-nova { animation: mp-bola-cai 0.35s ease-out; }

.mp-mesa-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  height: 2.1rem;
  padding: 0 6px;
  border-radius: 50%;
  background: var(--bs-primary);
  color: #fff;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mp-mesa-painel {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 4px;
}
.mp-mesa-painel[data-modalidade="90"] { grid-template-columns: repeat(10, 1fr); }

.mp-mesa-cel {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--bs-secondary-bg);
  color: var(--bs-secondary-color);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  transition: background 0.2s, color 0.2s;
}
.mp-mesa-cel.aceso { background: var(--bs-primary); color: #fff; font-weight: 700; }

.mp-lista-rolavel { max-height: 340px; overflow-y: auto; }

@media (max-width: 575.98px) {
  .mp-mesa-painel { grid-template-columns: repeat(10, 1fr); }
  .mp-mesa-cel { font-size: 0.72rem; }
}

@media (max-width: 991.98px) {
  .mp-sidebar { position: fixed; left: calc(-1 * var(--mp-sidebar)); z-index: 1040; transition: left 0.2s ease; }
  .mp-sidebar.aberta { left: 0; }
}
