/* Arena Eventos: tema sobre o Bootstrap 5.3.
   A cor principal (--brand) vem das Configurações da instituição e é injetada no <head> do base.html. */

:root {
  --brand: #0b4f8a;
  --brand-rgb: 11, 79, 138;
  --brand-contrast: #ffffff;
  --brand-strong: color-mix(in srgb, var(--brand) 82%, #000);
  --brand-soft: color-mix(in srgb, var(--brand) 9%, #fff);
  --accent: #e9b949;
  --accent-strong: #c99a2e;
  --ink: #1c2533;
  --muted: #5a6577;
  --paper: #f4f6f9;
  --surface: #ffffff;
  --line: #dce3ec;
  --ok: #1e7a4c;
  --warn: #9a6400;

  --bs-body-font-family: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--paper);
  --bs-emphasis-color: var(--ink);
  --bs-secondary-color: var(--muted);
  --bs-border-color: var(--line);
  --bs-border-radius: 0.6rem;
  --bs-border-radius-lg: 0.9rem;
  --bs-primary: var(--brand);
  --bs-primary-rgb: var(--brand-rgb);
  --bs-link-color: var(--brand);
  --bs-link-color-rgb: var(--brand-rgb);
  --bs-link-hover-color: var(--brand-strong);
  --bs-focus-ring-color: rgba(var(--brand-rgb), 0.25);
  /* Vermelho e verde do Bootstrap ficam abaixo de 4,5:1 sobre o fundo cinza da página (axe, WCAG AA):
     tons mais escuros para texto, links e botões só com contorno. */
  --bs-danger: #b02a37;
  --bs-danger-rgb: 176, 42, 55;
  --bs-success: #146c43;
  --bs-success-rgb: 20, 108, 67;
  --bs-code-color: #a61e5b;  /* o rosa padrão do Bootstrap fica abaixo de 4,5:1 nos fundos claros e nos avisos */
}
.btn-outline-danger {
  --bs-btn-color: #b02a37; --bs-btn-border-color: #b02a37;
  --bs-btn-hover-bg: #b02a37; --bs-btn-hover-border-color: #b02a37;
  --bs-btn-active-bg: #8f2230; --bs-btn-active-border-color: #8f2230;
  --bs-btn-disabled-color: #b02a37; --bs-btn-disabled-border-color: #b02a37;
}
.btn-outline-success {
  --bs-btn-color: #146c43; --bs-btn-border-color: #146c43;
  --bs-btn-hover-bg: #146c43; --bs-btn-hover-border-color: #146c43;
  --bs-btn-active-bg: #0f5132; --bs-btn-active-border-color: #0f5132;
  --bs-btn-disabled-color: #146c43; --bs-btn-disabled-border-color: #146c43;
}

body {
  font-feature-settings: 'tnum' 0;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }

h1, h2, h3, h4, .h1, .h2, .h3, .h4 { font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
h1, .h1 { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.4rem); line-height: 1.15; }
.lead { color: var(--muted); font-size: 1.125rem; }
.text-secondary { color: var(--muted) !important; }
.tabular { font-variant-numeric: tabular-nums; }
.measure { max-width: 68ch; }

/* ---------- Botões */
.btn { font-weight: 600; border-radius: 0.6rem; }
.btn-primary {
  --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-color: var(--brand-contrast);
  --bs-btn-hover-bg: var(--brand-strong); --bs-btn-hover-border-color: var(--brand-strong); --bs-btn-hover-color: var(--brand-contrast);
  --bs-btn-active-bg: var(--brand-strong); --bs-btn-active-border-color: var(--brand-strong); --bs-btn-active-color: var(--brand-contrast);
  --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); --bs-btn-disabled-color: var(--brand-contrast);
}
.btn-outline-primary {
  --bs-btn-color: var(--brand); --bs-btn-border-color: rgba(var(--brand-rgb), 0.45);
  --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-hover-color: var(--brand-contrast);
  --bs-btn-active-bg: var(--brand-strong); --bs-btn-active-border-color: var(--brand-strong); --bs-btn-active-color: var(--brand-contrast);
}
.btn-outline-secondary { --bs-btn-color: var(--ink); --bs-btn-border-color: var(--line); --bs-btn-hover-bg: var(--paper); --bs-btn-hover-color: var(--ink); --bs-btn-hover-border-color: #c6d0dc; }
.btn-accent, .btn-arena-yellow {
  --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-color: var(--ink);
  --bs-btn-hover-bg: var(--accent-strong); --bs-btn-hover-border-color: var(--accent-strong); --bs-btn-hover-color: var(--ink);
  --bs-btn-active-bg: var(--accent-strong); --bs-btn-active-border-color: var(--accent-strong); --bs-btn-active-color: var(--ink);
}
.btn .bi { margin-right: 0.35rem; }
.btn-icon .bi { margin-right: 0; }

/* ---------- Formulários */
.form-label { font-weight: 600; font-size: 0.925rem; margin-bottom: 0.35rem; }
.form-control, .form-select { border-color: var(--line); padding-top: 0.55rem; padding-bottom: 0.55rem; }
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: rgba(var(--brand-rgb), 0.6);
  box-shadow: 0 0 0 0.25rem rgba(var(--brand-rgb), 0.15);
}
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-control-color { width: 4rem; height: 2.6rem; padding: 0.25rem; }
.form-text { color: var(--muted); }
.form-fields > .field + .field { margin-top: 1.1rem; }

/* ---------- Foco visível para teclado */
a:focus-visible, .btn:focus-visible, .nav-link:focus-visible, .dropdown-item:focus-visible {
  outline: 3px solid rgba(var(--brand-rgb), 0.45);
  outline-offset: 2px;
  box-shadow: none;
}

/* ---------- Topo */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 1030;
}
.site-header .navbar { padding-top: 0.6rem; padding-bottom: 0.6rem; }
.brand { display: flex; align-items: center; gap: 0.75rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-logo { max-height: 40px; max-width: 170px; object-fit: contain; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px; background: var(--brand); color: var(--brand-contrast);
  display: grid; place-items: center; font-weight: 800; font-size: 1.05rem;
}
.brand-name { font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; }
/* Celular: o nome some da tela, mas continua para o leitor de tela (é ele que dá nome ao link do topo). */
@media (max-width: 575.98px) {
  .brand-name {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
}
.brand-divider { width: 1px; height: 28px; background: var(--line); }
.site-nav .nav-link { color: var(--muted); font-weight: 600; padding: 0.5rem 0.85rem !important; border-radius: 0.5rem; }
.site-nav .nav-link:hover { color: var(--ink); background: var(--paper); }
.site-nav .nav-link.active { color: var(--brand); background: var(--brand-soft); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  display: inline-grid; place-items: center; font-weight: 700; font-size: 0.8rem;
}
.user-toggle { display: flex; align-items: center; gap: 0.5rem; color: var(--ink); text-decoration: none; font-weight: 600; }
.dropdown-menu { border-color: var(--line); border-radius: 0.75rem; box-shadow: 0 12px 32px rgba(28, 37, 51, 0.12); padding: 0.4rem; }
.dropdown-item { border-radius: 0.45rem; padding: 0.45rem 0.75rem; }
.dropdown-item .bi { width: 1.25rem; margin-right: 0.45rem; color: var(--muted); }
.dropdown-item.text-danger .bi { color: inherit; }

/* ---------- Mensagens */
.flash { border: 0; border-left: 4px solid currentColor; display: flex; gap: 0.6rem; align-items: flex-start; }
.flash .bi { font-size: 1.1rem; line-height: 1.4; }

/* ---------- Cabeçalho de página */
.page-head { padding: 2rem 0 1.25rem; }
.page-head .crumbs { font-size: 0.875rem; margin-bottom: 0.75rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; color: var(--muted); }
.page-head .crumbs a { color: var(--muted); text-decoration: none; }
.page-head .crumbs a:hover { color: var(--brand); }
/* O último link do caminho vira o botão "voltar" para a tela anterior */
.page-head .crumbs a:last-of-type, .back-link {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.8rem 0.35rem 0.6rem;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 500; text-decoration: none;
}
.page-head .crumbs a:last-of-type::before, .back-link::before { font-family: bootstrap-icons; content: "\f12f"; font-size: 0.95em; line-height: 1; }
.page-head .crumbs a:last-of-type:hover, .back-link:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.page-head p { color: var(--muted); margin: 0.35rem 0 0; }

/* ---------- Painéis */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; }
.panel-body { padding: 1.5rem; }
.panel-head { padding: 1rem 1.5rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.panel-head h2 { font-size: 1.1rem; margin: 0; }
.panel-head p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.875rem; }
.panel .list-row { padding: 0.9rem 1.5rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.panel .list-row:first-child { border-top: 0; }
.panel .list-row > :first-child { flex: 1 1 260px; min-width: 0; }
.panel .empty { padding: 1.5rem; color: var(--muted); }
.table { --bs-table-bg: transparent; margin: 0; }
.panel > .table-responsive:first-child { border-radius: 1rem 1rem 0 0; }
.panel > .table-responsive:last-child { border-radius: 0 0 1rem 1rem; }
.panel > .table-responsive:only-child { border-radius: 1rem; }
.panel tbody tr:last-child > td { border-bottom: 0; }
.table > :not(caption) > * > * { padding: 0.8rem 1rem; border-color: var(--line); }
.table thead th { color: var(--muted); font-weight: 600; font-size: 0.85rem; background: var(--paper); }
.table td { font-variant-numeric: tabular-nums; }

/* ---------- Bloco de data (elemento de identidade) */
.date-block {
  color: var(--ink);
  flex: none; width: 64px; border-radius: 0.8rem; overflow: hidden; text-align: center;
  background: var(--surface); border: 1px solid var(--line); line-height: 1;
}
.date-block .month { display: block; background: var(--brand); color: var(--brand-contrast); font-size: 0.75rem; font-weight: 700; padding: 0.3rem 0; letter-spacing: 0.02em; }
.date-block .day { display: block; font-size: 1.65rem; font-weight: 800; padding: 0.4rem 0 0.15rem; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.date-block .weekday { display: block; font-size: 0.7rem; color: var(--muted); padding-bottom: 0.4rem; }
.date-block.sm { width: 50px; border-radius: 0.65rem; }
.date-block.sm .month { font-size: 0.68rem; padding: 0.22rem 0; }
.date-block.sm .day { font-size: 1.25rem; padding: 0.3rem 0 0.35rem; }
.date-block.lg { width: 84px; border-radius: 1rem; }
.date-block.lg .day { font-size: 2.3rem; }

/* ---------- Selos de situação */
.pill { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.78rem; font-weight: 700; padding: 0.25rem 0.6rem; border-radius: 999px; white-space: nowrap; }
.pill-open { background: #e3f4ea; color: var(--ok); }
.pill-few { background: #fdf0d5; color: #855400; }
.pill-wait { background: #fdf0d5; color: #855400; }  /* var(--warn) dá 4,4:1 neste fundo; o mínimo é 4,5:1 */
.pill-closed, .pill-muted { background: #eceff3; color: var(--muted); }
.pill-soon { background: var(--brand-soft); color: var(--brand); }
.pill-danger { background: #fbe4e4; color: #a12828; }
.type-label { font-size: 0.82rem; font-weight: 700; color: var(--brand); }

/* ---------- Barra de vagas */
.capacity { height: 6px; background: #e6ebf1; border-radius: 999px; overflow: hidden; }
.capacity > span { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.capacity.full > span { background: var(--accent-strong); }
.capacity-text { font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Card de atividade */
.event-card {
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.event-card:hover, .event-card:focus-within { border-color: rgba(var(--brand-rgb), 0.45); box-shadow: 0 10px 28px rgba(28, 37, 51, 0.08); }
.event-cover { position: relative; aspect-ratio: 16 / 7; background: var(--brand); }
.event-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.event-cover.placeholder-cover {
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.16) 0 18%, transparent 19%),
    radial-gradient(circle at 70% 120%, rgba(255, 255, 255, 0.1) 0 35%, transparent 36%),
    var(--brand);
  display: flex; align-items: flex-start; justify-content: flex-end; padding: 0.9rem 1rem; color: rgba(255, 255, 255, 0.85);
  font-size: 1.6rem;
}
.event-card .date-block { position: absolute; left: 1rem; bottom: -1.6rem; box-shadow: 0 4px 14px rgba(28, 37, 51, 0.12); }
.event-body { padding: 2.1rem 1.15rem 1.15rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.event-title { font-size: 1.12rem; font-weight: 700; letter-spacing: -0.01em; margin: 0; line-height: 1.3; }
.event-title a { color: var(--ink); text-decoration: none; }
.event-meta { list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: 0.9rem; display: grid; gap: 0.15rem; }
.event-meta .bi { width: 1.2rem; display: inline-block; }
.event-foot { margin-top: auto; padding-top: 0.6rem; display: grid; gap: 0.4rem; }

/* ---------- Home */
.hero { padding: 3rem 0 2.5rem; }
.hero h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem); max-width: 16ch; }
.hero .lead { max-width: 46ch; }
.search-box { display: flex; gap: 0.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 0.9rem; padding: 0.4rem; max-width: 560px; }
.search-box .form-control { border: 0; box-shadow: none; }
.search-box .bi-search { align-self: center; padding-left: 0.6rem; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.4rem 0.8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 0.9rem; text-decoration: none; }
.chip:hover { border-color: rgba(var(--brand-rgb), 0.5); color: var(--brand); }
.chip.active { background: var(--brand); border-color: var(--brand); color: var(--brand-contrast); }
.agenda { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; }
.agenda-head { padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); font-weight: 700; display: flex; justify-content: space-between; align-items: baseline; }
.agenda-item { display: flex; gap: 0.9rem; align-items: center; padding: 0.85rem 1.25rem; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line); }
.agenda-item:first-of-type { border-top: 0; }
.agenda-item:hover { background: var(--paper); color: var(--ink); }
.agenda-item strong { display: block; line-height: 1.3; }
.agenda-item small { color: var(--muted); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.25rem; }
.section-head h2 { font-size: 1.4rem; margin: 0; }

/* ---------- Página da atividade */
.event-hero { background: var(--surface); border-bottom: 1px solid var(--line); }
.event-hero-cover { height: 220px; background: var(--brand); }
.event-hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.event-hero-cover.placeholder-cover { height: 120px; background: radial-gradient(circle at 90% 0%, rgba(255, 255, 255, 0.16) 0 22%, transparent 23%), var(--brand); }
.event-hero-body { display: flex; gap: 1.25rem; align-items: flex-start; margin-top: -2.5rem; padding-bottom: 1.5rem; }
.event-hero-body > div:last-child { padding-top: 3.1rem; min-width: 0; }
.event-hero-body .date-block { box-shadow: 0 6px 18px rgba(28, 37, 51, 0.14); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.fact { position: relative; padding-left: 1.85rem; }
.fact dt .bi { position: absolute; left: 0; top: 0; font-size: 1.15rem; color: var(--brand); line-height: 1.3; }
.fact dt { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.fact dd { margin: 0; font-weight: 600; }
.signup-card { position: sticky; top: 92px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: 1rem; align-items: center; padding: 0.85rem 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; }

/* ---------- Credencial (Minhas inscrições) */
.ticket { display: grid; grid-template-columns: 1fr 190px; background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; position: relative; overflow: hidden; height: 100%; }
.ticket-main { padding: 1.35rem 1.5rem; display: flex; flex-direction: column; gap: 0.55rem; }
.ticket-stub {
  border-left: 2px dashed var(--line); padding: 1.1rem; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: 0.4rem; background: #fbfcfd; position: relative;
}
.ticket-stub::before, .ticket-stub::after {
  content: ''; position: absolute; left: -11px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--line);
}
.ticket-stub::before { top: -11px; }
.ticket-stub::after { bottom: -11px; }
.ticket-stub img.qr { width: 140px; height: 140px; image-rendering: pixelated; }
.ticket-stub .stub-big { font-size: 2.2rem; font-weight: 800; color: var(--warn); line-height: 1; font-variant-numeric: tabular-nums; }
.ticket-stub small { color: var(--muted); font-size: 0.78rem; }
.ticket.is-muted .ticket-main { opacity: 0.75; }
.ticket.is-muted .ticket-stub { color: var(--muted); }
@media (max-width: 575.98px) {
  .ticket { grid-template-columns: 1fr; }
  .ticket-stub { border-left: 0; border-top: 2px dashed var(--line); }
  .ticket-stub::before, .ticket-stub::after { display: none; }
}

/* ---------- Autenticação */
.auth-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); min-height: calc(100vh - 66px); }
.auth-side { background: var(--brand); color: var(--brand-contrast); padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::after { content: ''; position: absolute; right: -120px; bottom: -120px; width: 360px; height: 360px; border-radius: 50%; border: 48px solid rgba(255, 255, 255, 0.08); }
.auth-side h2 { color: inherit; font-size: clamp(1.6rem, 1rem + 1.8vw, 2.3rem); max-width: 14ch; }
.auth-side p { opacity: 0.85; max-width: 38ch; }
.auth-logo { background: #fff; border-radius: 0.8rem; padding: 0.6rem 0.9rem; display: inline-block; }
.auth-logo img { max-height: 44px; max-width: 200px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; }
.auth-form { width: 100%; max-width: 420px; }
@media (max-width: 991.98px) {
  .auth-wrap { grid-template-columns: 1fr; min-height: 0; }
  .auth-side { padding: 1.5rem; }
  .auth-side::after, .auth-side .auth-extra { display: none; }
}

/* ---------- Abas */
.nav-tabs { border-color: var(--line); }
.nav-tabs .nav-link { color: var(--muted); font-weight: 600; border: 0; border-bottom: 2px solid transparent; }
.nav-tabs .nav-link.active { color: var(--brand); background: transparent; border-bottom-color: var(--brand); }

/* ---------- Rodapé */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 3rem; padding: 1.75rem 0; color: var(--muted); font-size: 0.9rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--brand); }
.site-footer .footer-logo { max-height: 30px; max-width: 120px; object-fit: contain; }

/* ---------- Estado vazio */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state .bi { font-size: 2.2rem; color: rgba(var(--brand-rgb), 0.5); display: block; margin-bottom: 0.6rem; }

/* ---------- Diversos */
.qr-reader { border-radius: 0.8rem; overflow: hidden; }
#reader { border: 0 !important; }
.color-swatch { width: 1.1rem; height: 1.1rem; border-radius: 4px; display: inline-block; vertical-align: -3px; border: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Emissão avulsa */
.steps { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; list-style: none; padding: 0; margin: 0.75rem 0 0; }
.steps li { display: flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.steps li + li::before { content: ''; width: 1.5rem; height: 1px; background: var(--line); }
.steps .dot { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #eceff3; color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.steps li.current { color: var(--ink); font-weight: 600; }
.steps li.current .dot { background: var(--brand); color: var(--brand-contrast); }
.steps li.done .dot { background: #e3f4ea; color: var(--ok); }
.stat-row { display: flex; gap: 2rem; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-value { font-size: 2rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.85rem; color: var(--muted); }
.preview-table tr.row-error td { background: #fdf3f3; }
.preview-table tr.row-error td .fw-semibold { color: #a12828; }
.choice-list .form-check { margin-bottom: 0.35rem; }

/* Página do evento */
.notice { border-left: 4px solid var(--brand); background: var(--brand-soft, #eef3f9); border-radius: 0.5rem; padding: 0.75rem 1rem; margin-bottom: 0.6rem; }
.speaker { display: flex; gap: 0.9rem; align-items: flex-start; }
.speaker-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: 0 0 56px; }
.speaker-initials { display: grid; place-items: center; background: var(--brand-soft, #eef3f9); color: var(--brand); font-weight: 700; font-size: 1.3rem; }
.btn-whatsapp { background: #19763f; border-color: #19763f; color: #fff; } /* contraste 5,7:1 com o texto branco */
.btn-whatsapp:hover, .btn-whatsapp:focus { background: #135c31; border-color: #135c31; color: #fff; }
.share-card .dropdown-item .bi { margin-right: 0.5rem; }
/* Pesquisa de satisfação */
.score-scale { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 0.35rem; }
.score-scale input { position: absolute; opacity: 0; pointer-events: none; }
.score-scale label { display: grid; place-items: center; height: 2.75rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; }
.score-scale input:checked + label { background: var(--brand); border-color: var(--brand); color: var(--brand-contrast); }
.score-scale input:focus-visible + label { outline: 3px solid rgba(var(--brand-rgb), 0.35); outline-offset: 2px; }
.score-legend { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); margin-top: 0.35rem; }
.nps-bars { display: grid; grid-template-columns: repeat(11, 1fr); gap: 0.3rem; align-items: end; height: 90px; }
.nps-bars .bar { background: rgba(var(--brand-rgb), 0.75); border-radius: 0.25rem 0.25rem 0 0; min-height: 2px; }
.nps-bars .bar.low { background: #c0504d; } .nps-bars .bar.mid { background: #d9a400; } .nps-bars .bar.high { background: #2f8f5b; }
.nps-axis { display: grid; grid-template-columns: repeat(11, 1fr); gap: 0.3rem; text-align: center; font-size: 0.75rem; color: var(--muted); }
@media (max-width: 420px) { .score-scale { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.category-list { list-style: none; padding: 0; margin: 0.6rem 0 0; font-size: 0.875rem; }
.category-list li { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.3rem 0; border-top: 1px dashed var(--line); }

/* Check-in como aplicativo */
.checkin-app { background: #0b1220; color: #e8edf5; min-height: 100vh; padding-bottom: env(safe-area-inset-bottom); }
.checkin-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 0.75rem; padding: calc(0.7rem + env(safe-area-inset-top)) 1rem 0.7rem; background: var(--brand); color: var(--brand-contrast); }
.checkin-bar-title { flex: 1; min-width: 0; line-height: 1.2; }
.checkin-bar-title strong, .checkin-bar-title span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.checkin-bar-title span { font-size: 0.8rem; opacity: 0.85; }
.checkin-link { color: inherit; text-decoration: none; font-size: 1.1rem; }
.checkin-main { max-width: 560px; margin: 0 auto; padding: 1rem; }
.checkin-counter { text-align: center; padding: 0.5rem 0 1rem; }
.checkin-big { font-size: 3.5rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.checkin-of { font-size: 1.5rem; color: #9fb0c8; font-variant-numeric: tabular-nums; }
.checkin-label { color: #9fb0c8; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; }
.checkin-pending { display: inline-flex; gap: 0.4rem; align-items: center; margin-top: 0.6rem; font-size: 0.85rem; color: #7fd6a5; }
.checkin-pending.is-waiting { color: #ffd166; }
.checkin-reader { background: #000; border-radius: 1rem; overflow: hidden; border: 0 !important; min-height: 0; }
.checkin-reader video { width: 100% !important; display: block; }
.checkin-reader button, .checkin-reader select { margin: 0.4rem; border-radius: 0.5rem; border: 0; padding: 0.4rem 0.8rem; }
.checkin-reader a { color: #9fb0c8; }
.checkin-msg { margin-top: 1rem; padding: 1rem; border-radius: 0.9rem; font-weight: 600; font-size: 1.05rem; background: #172238; text-align: center; }
.checkin-msg.is-ok { background: #1f8f4d; color: #fff; }
.checkin-msg.is-warn { background: #b07d00; color: #fff; }
.checkin-msg.is-error { background: #a12828; color: #fff; }
.net { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.75rem; padding: 0.25rem 0.55rem; border-radius: 999px; background: rgba(255,255,255,0.18); }
.net.net-off { background: #ffd166; color: #3a2a00; }
.checkin-hint { color: #9fb0c8; font-size: 0.85rem; }
.checkin-problems { margin-top: 1rem; background: #172238; border-radius: 0.75rem; padding: 0.75rem 1rem; font-size: 0.85rem; }
.checkin-list { display: grid; gap: 0.6rem; }
.checkin-card { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 1rem; border-radius: 0.9rem; background: #172238; color: inherit; text-decoration: none; }
.checkin-card-title { font-weight: 700; }
.checkin-card-sub { color: #9fb0c8; font-size: 0.85rem; }
.checkin-empty { color: #9fb0c8; text-align: center; padding: 2rem 0; }

/* Números da atividade */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.75rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: 1rem 1.1rem; display: flex; flex-direction: column; }
.kpi-value { font-size: 1.9rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink); }
.kpi-label { font-size: 0.85rem; color: var(--ink); margin-top: 0.2rem; }
.kpi-sub { font-size: 0.78rem; color: var(--muted); }
.chart-legend { display: flex; gap: 1rem; color: var(--muted); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 0.35rem; vertical-align: -1px; }
.swatch-new, .bar-new { background: #2a78d6; }
.swatch-drop, .bar-drop { background: #eb6834; }
.day-chart { display: flex; align-items: flex-end; gap: 2px; height: 180px; overflow-x: auto; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.day-col { flex: 1 0 18px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; cursor: default; }
.day-col:hover .day-bars span { filter: brightness(1.15); }
.day-bars { display: flex; align-items: flex-end; gap: 2px; height: 100%; }
.day-bars span { flex: 1; min-height: 0; border-radius: 4px 4px 0 0; }
.day-label { position: absolute; bottom: -1.3rem; left: 50%; transform: translateX(-50%); font-size: 0.68rem; color: var(--muted); white-space: nowrap; }
.day-col:not(:first-child):not(:last-child):not(:nth-child(7n)) .day-label { visibility: hidden; }
.hbar { margin-bottom: 0.7rem; }
.hbar-text { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.875rem; margin-bottom: 0.2rem; }
.hbar-track { height: 8px; background: #eef1f5; border-radius: 4px; overflow: hidden; }
.hbar-track span { display: block; height: 100%; background: var(--brand); border-radius: 4px; }

/* Diálogo de confirmação do portal (static/js/app.js, askConfirm) */
.confirm-dialog { border: 1px solid var(--line); border-radius: 1rem; padding: 1.5rem; max-width: min(440px, calc(100vw - 2rem)); box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25); color: var(--ink); }
.confirm-dialog::backdrop { background: rgba(15, 23, 42, 0.45); }
.confirm-dialog p { margin: 0 0 1.25rem; font-size: 1rem; }
.confirm-dialog-actions { display: flex; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap; }

/* Botão de check-in no celular (organização e equipe): fica no canto, acima do rodapé. */
.quick-scan {
  position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 1030;
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.1rem; border-radius: 999px;
  background: var(--brand); color: var(--brand-contrast); font-weight: 700; text-decoration: none;
  box-shadow: 0 6px 18px rgba(11, 18, 32, 0.28);
}
.quick-scan .bi { font-size: 1.3rem; line-height: 1; }
.quick-scan:hover, .quick-scan:focus-visible { color: var(--brand-contrast); filter: brightness(1.08); }
.quick-scan:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
body:has(.quick-scan) .site-footer { padding-bottom: 5rem; }
@media print { .quick-scan { display: none !important; } }
