/* Meetinho — tema (paleta verde #00db00, layout, dark mode) */

:root {
  /* Verde da marca */
  --brand-green: #00db00;
  --brand-green-rgb: 0, 219, 0;
  --brand-green-dark: #00a800;
  --brand-green-darker: #007a00;
  --brand-ink: #0a0f0a;
  /* Texto sobre a cor da marca (tinta no verde; branco nos outros temas) */
  --brand-on: var(--brand-ink);
  --brand-gradient: linear-gradient(135deg, #007a00 0%, #00db00 100%);

  /* Bootstrap overrides */
  --bs-primary: #00a800;
  --bs-primary-rgb: 0, 168, 0;
  --bs-link-color: #007a00;
  --bs-link-color-rgb: 0, 122, 0;
  --bs-link-hover-color: #00db00;
  --bs-link-hover-color-rgb: 0, 219, 0;
  --bs-body-bg: #f7f9f7;
  --bs-border-color: #e2e8e2;

  /* Layout */
  --ct-topbar-height: 60px;
  --ct-radius: 14px;
}

[data-bs-theme="dark"] {
  --brand-gradient: linear-gradient(135deg, #003d00 0%, #00db00 100%);

  --bs-primary: #00db00;
  --bs-primary-rgb: 0, 219, 0;
  --bs-link-color: #35ea35;
  --bs-link-color-rgb: 53, 234, 53;
  --bs-link-hover-color: #7bf57b;
  --bs-link-hover-color-rgb: 123, 245, 123;
  --bs-body-bg: #0d100d;
  --bs-body-color: #e6ece6;
  --bs-emphasis-color: #ffffff;
  --bs-secondary-bg: #171c17;
  --bs-tertiary-bg: #141914;
  --bs-border-color: #2a322a;
}

/* --- Cor da comunidade (Community::THEMES; o atributo vem do layout) ---
   Cada tema redefine as mesmas variáveis do verde, nos dois modos. As cores
   espelham a tabela do model, que a arte dos meetups usa. */
[data-community-theme="blue"] {
  --brand-green: #2f7cf6;
  --brand-green-rgb: 47, 124, 246;
  --brand-green-dark: #1b5fd1;
  --brand-green-darker: #12419a;
  --brand-on: #ffffff;
  --brand-gradient: linear-gradient(135deg, #12419a 0%, #2f7cf6 100%);
  --bs-primary: #1b5fd1;
  --bs-primary-rgb: 27, 95, 209;
  --bs-link-color: #1b5fd1;
  --bs-link-color-rgb: 27, 95, 209;
  --bs-link-hover-color: #2f7cf6;
  --bs-link-hover-color-rgb: 47, 124, 246;
}
[data-bs-theme="dark"][data-community-theme="blue"] {
  --brand-gradient: linear-gradient(135deg, #0b2a66 0%, #2f7cf6 100%);
  --bs-primary: #2f7cf6;
  --bs-primary-rgb: 47, 124, 246;
  --bs-link-color: #6ea4ff;
  --bs-link-color-rgb: 110, 164, 255;
  --bs-link-hover-color: #a3c4ff;
  --bs-link-hover-color-rgb: 163, 196, 255;
}

[data-community-theme="red"] {
  --brand-green: #e5322d;
  --brand-green-rgb: 229, 50, 45;
  --brand-green-dark: #c0261f;
  --brand-green-darker: #8f1a15;
  --brand-on: #ffffff;
  --brand-gradient: linear-gradient(135deg, #8f1a15 0%, #e5322d 100%);
  --bs-primary: #c0261f;
  --bs-primary-rgb: 192, 38, 31;
  --bs-link-color: #c0261f;
  --bs-link-color-rgb: 192, 38, 31;
  --bs-link-hover-color: #e5322d;
  --bs-link-hover-color-rgb: 229, 50, 45;
}
[data-bs-theme="dark"][data-community-theme="red"] {
  --brand-gradient: linear-gradient(135deg, #5c0f0c 0%, #e5322d 100%);
  --bs-primary: #e5322d;
  --bs-primary-rgb: 229, 50, 45;
  --bs-link-color: #ff7b76;
  --bs-link-color-rgb: 255, 123, 118;
  --bs-link-hover-color: #ffa8a5;
  --bs-link-hover-color-rgb: 255, 168, 165;
}

/* Preto e branco: tinta no claro, branco no escuro. */
[data-community-theme="mono"] {
  --brand-green: #111111;
  --brand-green-rgb: 17, 17, 17;
  --brand-green-dark: #000000;
  --brand-green-darker: #000000;
  --brand-on: #ffffff;
  --brand-gradient: linear-gradient(135deg, #000000 0%, #2a2a2a 100%);
  --bs-primary: #111111;
  --bs-primary-rgb: 17, 17, 17;
  --bs-link-color: #111111;
  --bs-link-color-rgb: 17, 17, 17;
  --bs-link-hover-color: #444444;
  --bs-link-hover-color-rgb: 68, 68, 68;
}
[data-bs-theme="dark"][data-community-theme="mono"] {
  --brand-green: #ffffff;
  --brand-green-rgb: 255, 255, 255;
  --brand-green-dark: #e6e6e6;
  --brand-green-darker: #cccccc;
  --brand-on: #111111;
  --brand-gradient: linear-gradient(135deg, #000000 0%, #2a2a2a 100%);
  --bs-primary: #ffffff;
  --bs-primary-rgb: 255, 255, 255;
  --bs-link-color: #ffffff;
  --bs-link-color-rgb: 255, 255, 255;
  --bs-link-hover-color: #cccccc;
  --bs-link-hover-color-rgb: 204, 204, 204;
}
[data-community-theme="mono"] .ct-topbar .navbar-brand .bi { color: #fff; }

body {
  background-color: var(--bs-body-bg);
  min-height: 100vh;
}

/* --- Botões da marca --- */
.btn-brand {
  background-color: var(--brand-green);
  border-color: var(--brand-green);
  color: var(--brand-on);
  font-weight: 600;
}

.btn-brand:hover,
.btn-brand:focus {
  background-color: var(--brand-green-dark);
  border-color: var(--brand-green-dark);
  color: #fff;
}

.btn-brand:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(var(--brand-green-rgb), 0.35);
}

.btn-outline-brand {
  border-color: var(--brand-green);
  color: var(--bs-link-color);
  font-weight: 600;
}

.btn-outline-brand:hover {
  background-color: var(--brand-green);
  border-color: var(--brand-green);
  color: var(--brand-on);
}

/* --- Topbar --- */
.ct-topbar {
  min-height: var(--ct-topbar-height);
  background: var(--brand-gradient);
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.ct-topbar .navbar-brand {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.ct-topbar .navbar-brand .bi {
  color: var(--brand-green);
  background: var(--brand-ink);
  border-radius: 8px;
  padding: 0.2rem 0.35rem;
  font-size: 1.05rem;
}

.ct-topbar .nav-link {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 500;
}

.ct-topbar .nav-link:hover,
.ct-topbar .nav-link.active {
  color: #fff;
}

.ct-topbar .nav-link.active {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

/* Site da comunidade (subdomínio): a marca é a comunidade — logo e nome. O
   Meetinho só assina no rodapé (.ct-site-footer). */
.ct-site-brand {
  --ct-site-logo: 36px;
  display: flex;
  margin-right: 1.75rem;
  align-items: center;
  min-width: 0;
}

.ct-site-brand .navbar-brand {
  gap: 0.65rem;
  margin-right: 0;
  padding: 0;
  line-height: 1.15;
  font-size: 1.1rem;
}

.ct-site-brand .ct-site-logo {
  width: var(--ct-site-logo);
  height: var(--ct-site-logo);
  font-size: 0.8rem;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}

/* O disco de iniciais usa a cor da marca e sumiria no gradiente do topo: aqui ele vai de tinta. */
.ct-site-brand .ct-site-logo:not(.ct-avatar-image) {
  background: var(--brand-ink);
  color: #fff;
}

.ct-site-brand-name {
  max-width: min(18rem, calc(100vw - 11rem));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* --- Hero --- */
/* No tema claro o hero é claro (fundo branco com o brilho verde); no escuro,
   tinta. Tudo que tem cor aqui usa as variáveis abaixo — nada de text-white. */
.ct-hero {
  --hero-bg: #ffffff;
  --hero-fg: var(--brand-ink);
  --hero-muted: #5c665c;
  --hero-accent: var(--brand-green-dark);
  --hero-glow: rgba(var(--brand-green-rgb), 0.28);
  background: var(--hero-bg);
  color: var(--hero-fg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--ct-radius);
  padding: 3rem 2rem;
  position: relative;
  overflow: hidden;
}
[data-bs-theme="dark"] .ct-hero {
  --hero-bg: var(--brand-ink);
  --hero-fg: #fff;
  --hero-muted: rgba(255, 255, 255, .7);
  --hero-accent: var(--brand-green);
  --hero-glow: rgba(var(--brand-green-rgb), 0.45);
  border-color: transparent;
}
.ct-hero-lead { color: var(--hero-muted); }
.ct-hero .ct-stat-value { color: var(--hero-fg); }
.ct-hero .ct-stat-label { color: var(--hero-muted); }
.ct-hero-secondary { color: var(--hero-fg); border-color: currentColor; }
.ct-hero-secondary:hover { color: var(--hero-fg); background: rgba(var(--brand-green-rgb), .12); border-color: currentColor; }

.ct-hero::after {
  content: "";
  position: absolute;
  inset: auto -60px -120px auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, var(--hero-glow) 0%, transparent 65%);
  pointer-events: none;
}

.ct-hero h1 {
  font-weight: 800;
  letter-spacing: -0.03em;
}

.ct-hero .ct-hero-accent {
  color: var(--hero-accent);
}

/* Ações do organizador no topo da página da comunidade */
.ct-organizer-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }

/* --- Cards --- */
.ct-card {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--ct-radius);
  background: var(--bs-body-bg);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

[data-bs-theme="dark"] .ct-card {
  background: var(--bs-secondary-bg);
}

.ct-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-green);
  box-shadow: 0 8px 24px rgba(var(--brand-green-rgb), 0.14);
}

.ct-card a.stretched-link {
  color: inherit;
  text-decoration: none;
}

/* --- Data e badges --- */
.ct-date-badge {
  background: var(--brand-green);
  color: var(--brand-on);
  border-radius: 10px;
  width: 56px;
  padding: 0.35rem 0;
  text-align: center;
  font-weight: 700;
  line-height: 1.1;
  flex-shrink: 0;
}

.ct-date-badge .ct-date-day {
  font-size: 1.35rem;
  display: block;
}

.ct-date-badge .ct-date-month {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-brand {
  background-color: rgba(var(--brand-green-rgb), 0.16);
  color: var(--bs-link-color);
  border: 1px solid rgba(var(--brand-green-rgb), 0.35);
  font-weight: 600;
}

[data-bs-theme="dark"] .badge-brand {
  color: var(--brand-green);
}

/* --- Avatar --- */
.ct-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-green);
  color: var(--brand-on);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.ct-avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 1.25rem;
}

/* --- Stats --- */
.ct-stat {
  border-left: 3px solid var(--brand-green);
  padding-left: 1rem;
}

.ct-stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.ct-stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bs-secondary-color);
}

/* --- Seções e empty states --- */
.ct-section-title {
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ct-empty {
  border: 1px dashed var(--bs-border-color);
  border-radius: var(--ct-radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--bs-secondary-color);
}

/* --- Formulários --- */
.form-control:focus,
.form-select:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 0.2rem rgba(var(--brand-green-rgb), 0.2);
}

/* --- Footer --- */
.ct-footer {
  border-top: 1px solid var(--bs-border-color);
  color: var(--bs-secondary-color);
  font-size: 0.875rem;
  padding: 2rem 0;
  margin-top: 4rem;
}

/* Rodapé do site da comunidade: marca, páginas e links externos em colunas, e
   embaixo a assinatura "Feito com Meetinho" — o único Meetinho visível no site. */
.ct-site-footer {
  padding: 2.5rem 0 1.5rem;
}

.ct-site-footer a {
  color: var(--bs-secondary-color);
  text-decoration: none;
}

.ct-site-footer a:hover {
  color: var(--bs-body-color);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ct-site-footer a.ct-site-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--bs-body-color);
}

.ct-site-footer-logo {
  font-size: 0.85rem;
}

.ct-site-footer-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-body-color);
  margin-bottom: 0.75rem;
}

.ct-site-footer-bottom {
  border-top: 1px solid var(--bs-border-color);
  margin-top: 2rem;
  padding-top: 1.25rem;
}

/* A assinatura é a marca do Meetinho, não a da comunidade: o selo fica sempre no
   verde do Meetinho sobre tinta, seja qual for a cor (data-community-theme) do site. */
.ct-site-powered .bi {
  color: #00db00;
  background: #0a0f0a;
  border-radius: 6px;
  padding: 0.15rem 0.3rem;
  font-size: 0.85rem;
}

.ct-site-powered strong {
  color: var(--bs-body-color);
}

/* --- Auth (login / cadastro) --- */
.ct-auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background: radial-gradient(circle at 20% 20%, rgba(var(--brand-green-rgb), 0.12), transparent 45%), var(--bs-body-bg);
}

.ct-auth-card {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--ct-radius);
  background: var(--bs-body-bg);
  padding: 2rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

[data-bs-theme="dark"] .ct-auth-card {
  background: var(--bs-secondary-bg);
}

/* --- Paginação Kaminari --- */
.pagination .page-link {
  color: var(--bs-link-color);
}

.pagination .page-item.active .page-link {
  background-color: var(--brand-green);
  border-color: var(--brand-green);
  color: var(--brand-on);
}

/* --- Imagens enviadas (logo, capa, avatar) --- */
/* O verde do .ct-avatar é para as iniciais; atrás de PNG transparente ele vazaria na imagem. */
.ct-avatar-image {
  object-fit: cover;
  padding: 0;
  background: #fff;
}

.ct-cover {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: var(--ct-radius);
  display: block;
}

.ct-card-cover {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.ct-image-preview {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--bs-border-color);
}

/* --- Respostas dos campos de inscrição na lista de participantes --- */
.ct-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  color: var(--bs-body-color);
}

.ct-chip-label {
  color: var(--bs-secondary-color);
}

/* Bootstrap deixa o outline-secondary quase ilegível sobre o fundo escuro. */
[data-bs-theme="dark"] .btn-outline-secondary {
  --bs-btn-color: #ced6ce;
  --bs-btn-border-color: #4a544a;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #2a322a;
  --bs-btn-hover-border-color: #6b756b;
}

/* --- Transmissão e acervo --- */
.ct-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--ct-radius);
  overflow: hidden;
  background: #000;
}

.ct-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.ct-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #d61f1f;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.ct-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: ct-pulse 1.6s ease-in-out infinite;
}

@keyframes ct-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

@media (prefers-reduced-motion: reduce) {
  .ct-live-dot { animation: none; }
}

.ct-question {
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
  padding: 0.6rem;
  background: var(--bs-body-bg);
}

[data-bs-theme="dark"] .ct-question {
  background: var(--bs-tertiary-bg);
}

.ct-question-answered {
  border-color: rgba(var(--brand-green-rgb), 0.5);
}

.ct-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.ct-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ct-thumb-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 2.5rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  opacity: 0.85;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.ct-card:hover .ct-thumb-play {
  opacity: 1;
  transform: scale(1.08);
  color: var(--brand-green);
}

.ct-thumb-time {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
}

/* --- Transcrição --- */
.ct-transcript {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.ct-transcript-block {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--bs-border-color);
}

.ct-transcript-block:first-child {
  border-top: 0;
}

.ct-transcript-time {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--bs-link-color);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

.ct-transcript-time:hover {
  text-decoration: underline;
}

mark {
  background: rgba(var(--brand-green-rgb), 0.25);
  color: inherit;
  padding: 0 0.15rem;
  border-radius: 3px;
}

/* --- Resumo gerado a partir da transcrição --- */
.ct-summary {
  border-left: 3px solid var(--brand-green);
  padding: 0.5rem 0 0.5rem 0.75rem;
  background: rgba(var(--brand-green-rgb), 0.05);
  border-radius: 0 8px 8px 0;
}

.ct-summary-tag {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bs-secondary-color);
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  padding: 0 0.4rem;
}

a.ct-chip:hover {
  border-color: var(--brand-green);
  color: var(--bs-link-hover-color);
}

/* --- Aviso de agenda (informativo, não bloqueia) --- */
.ct-agenda-warning {
  border: 1px solid rgba(var(--brand-green-rgb), 0.35);
  border-left: 3px solid var(--brand-green);
  background: rgba(var(--brand-green-rgb), 0.06);
  border-radius: 0 10px 10px 0;
  padding: 0.75rem;
}

.ct-agenda-warning .bi {
  color: var(--brand-green);
}

/* --- Relatório do meetup --- */
.ct-report-section {
  margin-bottom: 2rem;
}

.ct-report-header {
  border-bottom: 2px solid var(--brand-green);
  padding-bottom: 1rem;
}

.ct-report-footer {
  border-top: 1px solid var(--bs-border-color);
  padding-top: 1rem;
  margin-top: 2rem;
}

.ct-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--bs-tertiary-bg);
  overflow: hidden;
}

.ct-bar-fill {
  height: 100%;
  background: var(--brand-green);
}

.ct-sponsor-logo {
  max-height: 48px;
  max-width: 120px;
  object-fit: contain;
}

/* Impressão: o relatório é feito para virar PDF pelo navegador. */
@media print {
  .d-print-none,
  .ct-topbar,
  .ct-footer {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .ct-card {
    border-color: #ccc;
    break-inside: avoid;
  }

  .ct-report-section {
    break-inside: avoid;
  }

  .ct-bar-fill {
    background: #666;
    print-color-adjust: exact;
  }
}

/* --- Passaporte --- */
.ct-timeline {
  position: relative;
  padding-left: 28px;
}

.ct-timeline::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--bs-border-color);
}

.ct-timeline-item {
  position: relative;
  margin-bottom: 0.75rem;
}

.ct-timeline-marker {
  position: absolute;
  left: -28px;
  top: 12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand-green);
  color: var(--brand-on);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  border: 2px solid var(--bs-body-bg);
}

.ct-timeline-marker-talk {
  background: var(--brand-ink);
  color: var(--brand-green);
  border-color: var(--brand-green);
}

/* --- Painel da plataforma (admin) --- */
.ct-spark {
  min-height: 130px;
}

.ct-spark-bar {
  background: var(--brand-green);
  border-radius: 4px 4px 0 0;
  margin-top: 0.25rem;
}

.ct-spark-value {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.ct-spark-month {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--bs-secondary-color);
  margin-top: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ct-admin-table td,
.ct-admin-table th {
  vertical-align: middle;
}

.ct-admin-tabs .nav-link {
  color: var(--bs-body-color);
}

.ct-admin-tabs .nav-link:hover {
  background-color: rgba(var(--brand-green-rgb), 0.12);
}

.ct-admin-tabs .nav-link.active {
  background-color: var(--brand-green);
  color: var(--brand-on);
}

/* Modelo de descrição do meetup: linha longa quebra em vez de esticar a
   página, que é o que um <pre> faria por padrão. */
.ct-template-preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Barra de resultado da enquete. */
.ct-poll-bar {
  height: 8px;
  background-color: var(--bs-secondary-bg);
}

.ct-poll-bar .progress-bar {
  background-color: var(--brand-green);
}

/* Pergunta de nota (1 a 5): botões de rádio em linha. */
.ct-scale {
  display: flex;
  gap: 0.5rem;
}

.ct-scale-btn {
  flex: 1 1 0;
  min-width: 2.75rem;
}

.ct-scale-tick {
  width: 1.25rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ct-scale-count {
  width: 2rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* --- Toasts (flash) --- */
.ct-toaster {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1090;
  display: flex;
  flex-direction: column;
  gap: .625rem;
  width: min(380px, calc(100vw - 2rem));
  pointer-events: none;
}

.ct-toast {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .875rem .875rem 1rem 1rem;
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--ct-radius);
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .06);
  pointer-events: auto;
  touch-action: pan-y;
  user-select: none;
  opacity: 0;
  transform: translateY(12px) scale(.98);
  transition: opacity .25s ease, transform .3s cubic-bezier(.2, .9, .3, 1.2);
}

[data-bs-theme="dark"] .ct-toast {
  background: var(--bs-secondary-bg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}

.ct-toast.is-visible { opacity: 1; transform: none; }
.ct-toast.is-leaving { opacity: 0; transform: translateX(110%); transition: opacity .25s ease, transform .3s ease-in; }

.ct-toast-icon { font-size: 1.15rem; line-height: 1.3; }
.ct-toast-success .ct-toast-icon { color: var(--brand-green-dark); }
[data-bs-theme="dark"] .ct-toast-success .ct-toast-icon { color: var(--brand-green); }
.ct-toast-error .ct-toast-icon { color: var(--bs-danger); }

.ct-toast-message { flex: 1; font-size: .925rem; line-height: 1.4; padding-top: .1rem; }

.ct-toast-close {
  border: 0;
  background: transparent;
  color: var(--bs-secondary-color);
  padding: .125rem .25rem;
  border-radius: 6px;
  line-height: 1;
}
.ct-toast-close:hover { color: var(--bs-body-color); background: var(--bs-tertiary-bg); }

.ct-toast-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  transform-origin: left;
  animation: ct-toast-progress linear forwards paused;
}
.ct-toast-success .ct-toast-progress { background: var(--brand-green); }
.ct-toast-error .ct-toast-progress { background: var(--bs-danger); }

@keyframes ct-toast-progress { from { transform: scaleX(1); } to { transform: scaleX(0); } }

@media (max-width: 575.98px) {
  .ct-toaster {
    right: 50%;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    transform: translateX(50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ct-toast, .ct-toast.is-leaving { transition: opacity .2s ease; transform: none; }
  .ct-toast-progress { display: none; }
}

/* --- Switch de publicação --- */
.ct-switch .form-check-input {
  width: 2.75em;
  height: 1.5em;
  cursor: pointer;
}
.ct-switch .form-check-input:checked {
  background-color: var(--brand-green);
  border-color: var(--brand-green);
}
.ct-switch .form-check-input:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 .25rem rgba(var(--brand-green-rgb), .25);
}
.ct-switch .form-check-input:disabled { cursor: not-allowed; }
.ct-switch .form-check-label { cursor: pointer; padding-top: .15em; }
.ct-switch.form-check-reverse { padding-right: 3.5em; }
.ct-switch.form-check-reverse .form-check-input { margin-right: -3.5em; }

/* --- Barra de pré-visualização --- */
.ct-preview-bar {
  position: sticky;
  top: calc(var(--ct-topbar-height) + .75rem);
  z-index: 1020;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  border-radius: var(--ct-radius);
  background: var(--brand-ink);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
}
.ct-preview-bar .bi-eye { color: var(--brand-green); }
[data-bs-theme="dark"] .ct-preview-bar { background: var(--bs-secondary-bg); border: 1px solid var(--bs-border-color); }

.ct-publication-actions { border-top: 1px solid var(--bs-border-color); }
.ct-publication-actions .btn { white-space: nowrap; }

/* --- Inscrição no meetup --- */
.ct-back-link { display: inline-flex; align-items: center; gap: .35rem; color: var(--bs-secondary-color); text-decoration: none; font-size: .9rem; }
.ct-back-link:hover { color: var(--bs-link-color); }
.ct-register-lead { font-size: 1.1rem; }
.ct-register-card { overflow: hidden; }
.ct-register-who {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: 1rem 1.5rem;
  background: var(--bs-tertiary-bg);
  border-bottom: 1px solid var(--bs-border-color);
}
.ct-register-body { padding: 1.5rem; }
.ct-register-footer { padding: 1.5rem; border-top: 1px solid var(--bs-border-color); background: var(--bs-tertiary-bg); }
.ct-register-simple { display: flex; gap: .875rem; align-items: center; }
.ct-register-simple .bi { font-size: 1.5rem; color: var(--brand-green-dark); }
[data-bs-theme="dark"] .ct-register-simple .bi { color: var(--brand-green); }
.ct-register-card .form-label { font-weight: 600; margin-bottom: .35rem; }
.ct-register-card .form-control, .ct-register-card .form-select { padding: .65rem .875rem; }
.ct-register-card .form-control:focus, .ct-register-card .form-select:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 .25rem rgba(var(--brand-green-rgb), .2);
}
.ct-choice-tile {
  position: relative;
  display: flex;
  gap: .75rem;
  margin: 0;
  padding: .875rem 1rem .875rem 2.75rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--ct-radius);
  transition: border-color .15s ease, background-color .15s ease;
}
.ct-choice-tile:hover { border-color: var(--brand-green); }
.ct-choice-tile:has(.form-check-input:checked) { border-color: var(--brand-green); background: rgba(var(--brand-green-rgb), .08); }
.ct-choice-tile .form-check-input { position: absolute; left: 1rem; top: 1.05rem; margin: 0; }
.ct-choice-tile .form-check-input:checked { background-color: var(--brand-green); border-color: var(--brand-green); }
.ct-choice-tile .form-check-label { font-weight: 600; cursor: pointer; }
.ct-capacity-bar { height: 6px; border-radius: 999px; background: var(--bs-border-color); overflow: hidden; }
.ct-capacity-bar > span { display: block; height: 100%; background: var(--brand-green); border-radius: 999px; }
.ct-register-perks { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.ct-register-perks li { display: flex; gap: .75rem; align-items: flex-start; font-size: .9rem; color: var(--bs-secondary-color); }
.ct-register-perks .bi { font-size: 1.1rem; line-height: 1.3; color: var(--brand-green-dark); }
[data-bs-theme="dark"] .ct-register-perks .bi { color: var(--brand-green); }

.ct-register-guest { display: block; }
.ct-avatar-guest { background: var(--bs-secondary-bg); color: var(--bs-body-color); border: 1px dashed var(--bs-border-color); }
.ct-account-invite {
  padding: 1rem;
  border: 1px solid rgba(var(--brand-green-rgb), .4);
  border-radius: var(--ct-radius);
  background: rgba(var(--brand-green-rgb), .06);
}
.ct-account-invite .bi-stars { color: var(--brand-green-dark); }
[data-bs-theme="dark"] .ct-account-invite .bi-stars { color: var(--brand-green); }

/* Convite para ativar as notificações push (push_subscriptions/_prompt). */
.ct-push-prompt {
  padding: .875rem 1rem;
  border: 1px solid rgba(var(--brand-green-rgb), .4);
  border-radius: var(--ct-radius);
  background: rgba(var(--brand-green-rgb), .06);
}
.ct-push-prompt-icon { font-size: 1.25rem; line-height: 1; color: var(--brand-green-dark); }
[data-bs-theme="dark"] .ct-push-prompt-icon { color: var(--brand-green); }

/* Caixinha fixa embaixo que convida a ativar as notificações (layouts/_push_banner).
   Fica à esquerda, longe do botão do chat; sobe quando a barra de ações do meetup existe. */
.ct-push-banner {
  position: fixed;
  left: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 1034;
  width: min(420px, calc(100% - 6.5rem));
  padding: 1rem;
  border: 1px solid rgba(var(--brand-green-rgb), .5);
  border-radius: var(--ct-radius);
  background: var(--bs-body-bg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
  animation: ct-push-banner-in .35s ease-out;
}
[data-bs-theme="dark"] .ct-push-banner { background: var(--bs-secondary-bg); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.ct-push-banner-icon { font-size: 1.5rem; line-height: 1; color: var(--brand-green-dark); }
[data-bs-theme="dark"] .ct-push-banner-icon { color: var(--brand-green); }
body:has(.ct-action-bar) .ct-push-banner { bottom: calc(6.5rem + env(safe-area-inset-bottom)); }
@keyframes ct-push-banner-in {
  from { transform: translateY(1rem); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* --- Ingresso (QR code) e tela de check-in --- */
.ct-ticket {
  max-width: 480px;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--ct-radius);
  background: var(--bs-body-bg);
  overflow: hidden;
}
.ct-ticket-head { padding: 1.25rem 1.5rem; border-bottom: 1px dashed var(--bs-border-color); }
.ct-ticket-body { padding: 1.5rem; }
.ct-ticket-foot { padding: 1rem 1.5rem; border-top: 1px dashed var(--bs-border-color); background: var(--bs-tertiary-bg); }
.ct-ticket-foot .ct-account-invite { margin-top: 0 !important; }

/* Fundo branco sempre: leitor de QR code não entende modo escuro. */
.ct-qr-frame {
  display: inline-block;
  padding: .75rem;
  margin-bottom: 1rem;
  background: #fff;
  border-radius: var(--ct-radius);
  border: 1px solid var(--bs-border-color);
}
.ct-qr { display: block; width: min(260px, 70vw); height: auto; }

.ct-ticket-mini { display: flex; gap: .875rem; align-items: center; margin: .75rem 0; }
.ct-ticket-mini .ct-qr-frame { padding: .35rem; margin: 0; flex-shrink: 0; }
.ct-ticket-mini .ct-qr { width: 84px; }

/* --- Programação do meetup --- */
.ct-program { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.ct-talk { display: flex; gap: .875rem; align-items: flex-start; }
.ct-talk-body {
  flex: 1;
  min-width: 0;
  padding: .875rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--ct-radius);
  background: var(--bs-body-bg);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ct-talk-body:hover { border-color: rgba(var(--brand-green-rgb), .6); box-shadow: 0 6px 18px rgba(0, 0, 0, .06); }
.ct-talk-art {
  flex-shrink: 0;
  display: block;
  width: 220px;
  aspect-ratio: 1200 / 630;
  height: auto;
  border-radius: calc(var(--ct-radius) - 4px);
  overflow: hidden;
  background: var(--bs-secondary-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ct-talk-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Prévias na página de artes da talk */
.ct-art-preview { display: block; border-radius: calc(var(--ct-radius) - 4px); overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.ct-art-preview img { display: block; width: 100%; height: auto; }
.ct-talk-art:hover { transform: scale(1.03); box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
@media (max-width: 575.98px) {
  /* No celular a arte vira banner em cima do texto, em vez de um retângulo ilegível. */
  .ct-talk-body { flex-wrap: wrap; }
  .ct-talk-art { width: 100%; }
}
.ct-talk-title { font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.ct-talk-speaker { display: flex; align-items: center; gap: .4rem; margin-top: .25rem; font-size: .9rem; color: var(--bs-secondary-color); }
.ct-talk-speaker .bi { font-size: 1.1rem; }
.ct-talk-play {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  padding: .3rem .6rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--brand-on);
  background: var(--brand-green);
  white-space: nowrap;
}
.ct-talk-play:hover { background: var(--brand-green-dark); color: var(--brand-on); }
.ct-call-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .875rem;
  padding: .875rem 1rem;
  border: 1px solid rgba(var(--brand-green-rgb), .4);
  border-radius: var(--ct-radius);
  background: rgba(var(--brand-green-rgb), .06);
}
.ct-call-banner-icon { font-size: 1.4rem; color: var(--brand-green-dark); }
[data-bs-theme="dark"] .ct-call-banner-icon { color: var(--brand-green); }
.ct-program-empty {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border: 1px dashed rgba(var(--brand-green-rgb), .5);
  border-radius: var(--ct-radius);
  background: rgba(var(--brand-green-rgb), .04);
}
.ct-program-empty-muted { border-color: var(--bs-border-color); background: transparent; color: var(--bs-secondary-color); }
.ct-program-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto .75rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--brand-green-dark);
  background: rgba(var(--brand-green-rgb), .14);
}
[data-bs-theme="dark"] .ct-program-empty-icon { color: var(--brand-green); }
.ct-program-empty-muted .ct-program-empty-icon { color: var(--bs-secondary-color); background: var(--bs-secondary-bg); }

/* Seletor de cor da comunidade (formulário) */
.ct-theme-picker { display: flex; flex-wrap: wrap; gap: .75rem; }
.ct-theme-option { position: relative; cursor: pointer; }
.ct-theme-option input { position: absolute; opacity: 0; inset: 0; }
.ct-theme-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  width: 96px;
  padding: .6rem .5rem;
  border: 2px solid var(--bs-border-color);
  border-radius: var(--ct-radius);
  font-size: .8rem;
  text-align: center;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ct-theme-swatch > span:first-child { width: 36px; height: 36px; border-radius: 50%; }
.ct-theme-option input:checked + .ct-theme-swatch { border-color: var(--bs-body-color); box-shadow: 0 0 0 3px rgba(var(--brand-green-rgb), .25); }
.ct-theme-option input:focus-visible + .ct-theme-swatch { outline: 2px solid var(--bs-link-color); outline-offset: 2px; }

/* --- Skeleton de imagem (image_load_controller) ---
   Enquanto a imagem não carrega, o próprio <img> mostra um brilho no lugar;
   ao carregar, o fundo some e a imagem aparece com um fade. */
@keyframes ct-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
.ct-img-skeleton:not(.is-loaded) {
  background: linear-gradient(90deg, var(--bs-tertiary-bg) 25%, var(--bs-secondary-bg) 50%, var(--bs-tertiary-bg) 75%);
  background-size: 200% 100%;
  animation: ct-shimmer 1.4s ease-in-out infinite;
  color: transparent; /* esconde o alt enquanto carrega */
}
[data-bs-theme="dark"] .ct-img-skeleton:not(.is-loaded) {
  background-image: linear-gradient(90deg, #1b211b 25%, #262e26 50%, #1b211b 75%);
}
.ct-img-skeleton { transition: opacity .25s ease; }
/* Bloco inteiro como skeleton: o conteúdo fica invisível e o fundo brilha
   até a imagem de dentro (com image-load) carregar. */
[data-skeleton-host]:not(.is-loaded) {
  background: linear-gradient(90deg, var(--bs-tertiary-bg) 25%, var(--bs-secondary-bg) 50%, var(--bs-tertiary-bg) 75%) !important;
  background-size: 200% 100% !important;
  animation: ct-shimmer 1.4s ease-in-out infinite;
  border-color: transparent !important;
}
[data-bs-theme="dark"] [data-skeleton-host]:not(.is-loaded) {
  background-image: linear-gradient(90deg, #1b211b 25%, #262e26 50%, #1b211b 75%) !important;
}
[data-skeleton-host]:not(.is-loaded) > *,
[data-skeleton-host]:not(.is-loaded)::before { visibility: hidden; }
[data-skeleton-host] > * { transition: opacity .3s ease; }
.ct-img-skeleton-rounded:not(.is-loaded) { border-radius: 14px; }
@media (prefers-reduced-motion: reduce) {
  .ct-img-skeleton:not(.is-loaded) { animation: none; }
}

/* --- Páginas de erro (400/404/406/422/500) --- */
.ct-error {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 3rem;
  align-items: center;
  min-height: calc(100vh - var(--ct-topbar-height) - 3rem);
}

@media (max-width: 991.98px) {
  .ct-error {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    min-height: 0;
    padding-top: 1rem;
  }
}

.ct-error-code {
  font-family: var(--bs-font-monospace);
  font-size: clamp(4rem, 14vw, 7.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--brand-green-dark) 0%, var(--brand-green) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ct-error-code span {
  font-size: 0.45em;
  vertical-align: middle;
  opacity: 0.6;
}

.ct-error-title {
  font-weight: 800;
  letter-spacing: -0.03em;
}

.ct-error-message {
  color: var(--bs-secondary-color);
  font-size: 1.1rem;
  max-width: 34rem;
}

.ct-error .btn code {
  color: inherit;
  font-size: 0.9em;
}

/* Terminal: escuro nos dois temas, como um terminal de verdade. */
.ct-terminal {
  background: var(--brand-ink);
  border: 1px solid #1f2a1f;
  border-radius: var(--ct-radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(var(--brand-green-rgb), 0.08);
  overflow: hidden;
}

.ct-terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  background: #131a13;
  border-bottom: 1px solid #1f2a1f;
}

.ct-terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
}

.ct-terminal-dot:nth-child(2) { background: #febc2e; }
.ct-terminal-dot:nth-child(3) { background: #28c840; }

.ct-terminal-name {
  flex: 1;
  text-align: center;
  margin-right: 3rem;
  color: #7d8a7d;
  font-family: var(--bs-font-monospace);
  font-size: 0.8rem;
}

.ct-terminal-body {
  margin: 0;
  padding: 1.25rem 1.25rem 1.5rem;
  color: #d7e2d7;
  font-size: 0.9rem;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ct-terminal .ct-prompt { color: var(--brand-green); font-weight: 700; }
.ct-terminal .ct-out-err { color: #ff6b6b; }
.ct-terminal .ct-out-ok { color: #7bf57b; }
.ct-terminal .ct-out-out { color: #d7e2d7; }
.ct-terminal .ct-out-dim { color: #7d8a7d; }

.ct-cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  vertical-align: text-bottom;
  background: var(--brand-green);
  animation: ct-blink 1.1s steps(1) infinite;
}

@keyframes ct-blink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ct-cursor { animation: none; }
}

/* --- Anotações internas (editor colaborativo) --- */
.ct-notes { overflow: hidden; }

.ct-notes-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.25rem .75rem;
}

.ct-notes-presence { display: flex; }
.ct-notes-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: -6px;
  border: 2px solid var(--bs-body-bg);
  border-radius: 50%;
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
}
.ct-notes-avatar:first-child { margin-left: 0; }

.ct-notes-status { font-size: .8rem; color: var(--bs-secondary-color); white-space: nowrap; }
.ct-notes-status::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: .4rem;
  border-radius: 50%;
  vertical-align: middle;
  background: var(--bs-secondary-color);
}
.ct-notes-status[data-state="saved"]::before { background: var(--brand-green); }
.ct-notes-status[data-state="pending"]::before { background: var(--bs-warning); }
.ct-notes-status[data-state="offline"]::before { background: var(--bs-danger); }

.ct-notes-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .125rem;
  padding: .375rem 1rem;
  border-top: 1px solid var(--bs-border-color);
  border-bottom: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
}
.ct-notes-tool {
  border: 0;
  background: transparent;
  color: var(--bs-body-color);
  padding: .3rem .5rem;
  border-radius: 6px;
  line-height: 1;
}
.ct-notes-tool:hover { background: var(--bs-secondary-bg); }
.ct-notes-tool.active { background: rgba(var(--brand-green-rgb), .18); color: var(--brand-green-darker); }
[data-bs-theme="dark"] .ct-notes-tool.active { color: var(--brand-green); }
.ct-notes-divider { width: 1px; height: 1.25rem; margin: 0 .25rem; background: var(--bs-border-color); }

.ct-notes-editor { padding: 1rem 1.25rem 1.25rem; }
.ct-notes-content { min-height: 220px; outline: none; }
.ct-notes-content > :first-child { margin-top: 0; }
.ct-notes-content h2 { font-size: 1.25rem; margin-top: 1.25rem; }
.ct-notes-content h3 { font-size: 1.05rem; margin-top: 1rem; }
.ct-notes-content blockquote { border-left: 3px solid var(--brand-green); padding-left: .75rem; color: var(--bs-secondary-color); }
.ct-notes-content p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  height: 0;
  pointer-events: none;
  color: var(--bs-secondary-color);
}

.ct-notes-content ul[data-type="taskList"] { list-style: none; padding-left: .25rem; }
.ct-notes-content ul[data-type="taskList"] li { display: flex; align-items: flex-start; gap: .5rem; }
.ct-notes-content ul[data-type="taskList"] li > label { margin-top: .2rem; }
.ct-notes-content ul[data-type="taskList"] li > div { flex: 1; }
.ct-notes-content ul[data-type="taskList"] li > div > p { margin-bottom: .25rem; }
.ct-notes-content ul[data-type="taskList"] li[data-checked="true"] > div { text-decoration: line-through; color: var(--bs-secondary-color); }
.ct-notes-content ul[data-type="taskList"] input[type="checkbox"] { accent-color: var(--brand-green); }

/* Cursores de quem está editando junto */
.collaboration-carets__caret {
  position: relative;
  margin-left: -1px;
  margin-right: -1px;
  border-left: 1px solid;
  border-right: 1px solid;
  word-break: normal;
  pointer-events: none;
}
.collaboration-carets__label {
  position: absolute;
  top: -1.35em;
  left: -1px;
  padding: .05rem .35rem;
  border-radius: 4px 4px 4px 0;
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  user-select: none;
}

/* --- Página do meetup e da comunidade (estilo evento) --- */
.ct-card-static:hover { transform: none; border-color: var(--bs-border-color); box-shadow: none; }

.ct-event-title {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.ct-count-pill {
  display: inline-block;
  min-width: 1.75rem;
  padding: .1rem .5rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  text-align: center;
  color: var(--bs-secondary-color);
  vertical-align: middle;
}

.ct-inline-action { font-weight: 600; text-decoration: none; }
.ct-inline-action:hover { text-decoration: underline; }

.ct-community-byline {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  max-width: 100%;
  color: inherit;
  text-decoration: none;
}
.ct-community-byline:hover { color: inherit; }
.ct-community-byline:hover .fw-semibold { color: var(--bs-link-color); }
.ct-community-byline .bi-arrow-right-short { color: var(--brand-green-dark); transition: transform .15s ease; }
.ct-community-byline:hover .bi-arrow-right-short { transform: translateX(3px); }
/* Logo inteiro num quadrado arredondado (ver community_logo_tag shape: :rounded) */
.ct-avatar-rounded { border-radius: 10px; }
.ct-avatar-rounded.ct-avatar-image { object-fit: contain; padding: 3px; background: #fff; border: 1px solid var(--bs-border-color); }

/* Capa: imagem ou cartão "save the date" */
.ct-event-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: calc(var(--ct-radius) + 4px);
  background: var(--bs-tertiary-bg);
}
.ct-event-cover-hero { box-shadow: 0 18px 40px rgba(0, 0, 0, .12); transform: rotate(-1deg); }
.ct-event-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Lateral fixa */
@media (min-width: 992px) {
  .ct-sticky-aside { position: sticky; top: calc(var(--ct-topbar-height) + 1.25rem); }
}
.ct-info-row { display: flex; gap: .875rem; padding: .75rem 0; }
.ct-info-row + .ct-info-row { border-top: 1px solid var(--bs-border-color); }
.ct-info-icon { font-size: 1.25rem; color: var(--brand-green-dark); line-height: 1.2; }
[data-bs-theme="dark"] .ct-info-icon { color: var(--brand-green); }

/* Vitrine de apoio: logo em tile branco em qualquer tema (logo de marca pressupõe fundo claro). */
.ct-sponsors-icon { color: var(--brand-green-dark); }
[data-bs-theme="dark"] .ct-sponsors-icon { color: var(--brand-green); }
.ct-sponsor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.ct-sponsor-card {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.ct-sponsor-card:hover { color: inherit; }
.ct-sponsor-card-featured { grid-column: 1 / -1; }
.ct-sponsor-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 88px;
  padding: .75rem 1rem;
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--ct-radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ct-sponsor-card-featured .ct-sponsor-logo-box { height: 128px; padding: 1rem 1.5rem; }
a.ct-sponsor-card:hover .ct-sponsor-logo-box { border-color: var(--brand-green); box-shadow: 0 0 0 .2rem rgba(0, 219, 0, .15); }
.ct-sponsor-showcase-logo { max-width: 100%; max-height: 100%; object-fit: contain; }
.ct-sponsor-wordmark { font-weight: 700; font-size: 1.125rem; color: #1a1a1a; text-align: center; overflow-wrap: anywhere; }
.ct-sponsor-card-featured .ct-sponsor-wordmark { font-size: 1.5rem; }
.ct-sponsor-caption { text-align: center; line-height: 1.3; }

.ct-utm-builder { border-top: 1px solid var(--bs-border-color); padding-top: 1rem; }
.ct-utm-preview { display: block; padding: .375rem .5rem; background: var(--bs-tertiary-bg); border-radius: .375rem; min-height: 2rem; }

.ct-map { overflow: hidden; border: 1px solid var(--bs-border-color); border-radius: var(--ct-radius); aspect-ratio: 16 / 10; }
.ct-map iframe { width: 100%; height: 100%; border: 0; display: block; }
[data-bs-theme="dark"] .ct-map iframe { filter: invert(.9) hue-rotate(180deg); }

/* Leia mais */
.ct-read-more { position: relative; max-height: 16rem; overflow: hidden; }
.is-clamped:not(.is-expanded) .ct-read-more::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 5rem;
  background: linear-gradient(to bottom, transparent, var(--bs-body-bg));
}
.is-expanded .ct-read-more { max-height: none; }

/* Participantes */
.ct-people-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .75rem; }
.ct-person-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding: 1rem .5rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--ct-radius);
  background: var(--bs-body-bg);
  color: inherit;
  text-align: center;
}
[data-bs-theme="dark"] .ct-person-card { background: var(--bs-secondary-bg); }
.ct-person-card-more { justify-content: center; cursor: pointer; }
.ct-person-card-more:hover { border-color: var(--brand-green); }
.ct-person-name { font-size: .85rem; font-weight: 600; line-height: 1.2; }
/* Lista de participantes da comunidade: o card inteiro é o link para a pessoa. */
.ct-people-directory { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ct-person-card-link { transition: border-color .15s, transform .15s; }
.ct-person-card-link:hover { border-color: var(--brand-green); transform: translateY(-2px); }
.ct-person-links { display: flex; gap: .4rem; font-size: .9rem; min-height: 1.2em; }
.ct-person-name a { color: inherit; }
.ct-role-pill {
  display: inline-block;
  padding: .05rem .45rem;
  border-radius: 999px;
  background: rgba(var(--brand-green-rgb), .15);
  color: var(--brand-green-darker);
  font-size: .68rem;
  font-weight: 700;
}
[data-bs-theme="dark"] .ct-role-pill { color: var(--brand-green); }

.ct-avatar-stack { display: inline-flex; }
.ct-avatar-stack-item { margin-left: -8px; border: 2px solid var(--bs-body-bg); box-sizing: content-box; }
.ct-avatar-stack-item:first-child { margin-left: 0; }
.ct-avatar-more { background: var(--bs-secondary-bg); color: var(--bs-body-color); }

/* Diálogos */
.ct-dialog {
  width: min(480px, calc(100vw - 2rem));
  max-height: min(640px, calc(100vh - 4rem));
  padding: 0;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--ct-radius);
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
}
.ct-dialog-wide { width: min(640px, calc(100vw - 2rem)); }
.ct-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.ct-dialog-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--bs-border-color); }
.ct-dialog-body { padding: .5rem 1.25rem 1rem; overflow-y: auto; }

/* Fotos */
.ct-photo-strip { position: relative; }
.ct-photo-track { display: flex; gap: .75rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: .25rem; }
.ct-photo-track::-webkit-scrollbar { display: none; }
.ct-photo-track .ct-photo { flex: 0 0 min(42%, 220px); scroll-snap-align: start; }
.ct-photo { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--ct-radius); background: var(--bs-tertiary-bg); }
.ct-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.ct-photo:hover img { transform: scale(1.04); }
.ct-photo-remove {
  position: absolute;
  top: .4rem;
  right: .4rem;
  border: 0;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  opacity: 0;
  transition: opacity .15s ease;
}
.ct-photo:hover .ct-photo-remove, .ct-photo-remove:focus { opacity: 1; }
@media (hover: none) { .ct-photo-remove { opacity: 1; } }
.ct-strip-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(10, 15, 10, .8);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}
.ct-strip-prev { left: -12px; }
.ct-strip-next { right: -12px; }
.ct-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; }

.ct-lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, .92);
  color: #fff;
}
.ct-lightbox[open] { display: flex; align-items: center; justify-content: center; }
.ct-lightbox::backdrop { background: transparent; }
.ct-lightbox img { max-width: calc(100vw - 7rem); max-height: calc(100vh - 6rem); object-fit: contain; border-radius: 8px; }
.ct-lightbox-close, .ct-lightbox-nav {
  position: absolute;
  border: 0;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 1.25rem;
}
.ct-lightbox-close:hover, .ct-lightbox-nav:hover { background: rgba(255, 255, 255, .25); }
.ct-lightbox-close { top: 1rem; right: 1rem; }
.ct-lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.ct-lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.ct-lightbox-counter { position: absolute; bottom: 1.25rem; left: 50%; transform: translateX(-50%); font-size: .85rem; opacity: .8; }
@media (max-width: 575.98px) {
  .ct-lightbox img { max-width: 100vw; border-radius: 0; }
  .ct-lightbox-nav { top: auto; bottom: 1rem; transform: none; }
}

/* Cards de evento (grade) */
.ct-event-card { position: relative; }
.ct-event-card .ct-event-cover { transition: transform .2s ease, box-shadow .2s ease; }
.ct-event-card:hover .ct-event-cover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 0, 0, .12); }
.ct-event-card-link { color: inherit; text-decoration: none; }
.ct-event-card:hover .ct-event-card-link { color: var(--bs-link-color); }

.ct-more-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .875rem 1.25rem;
  border-radius: var(--ct-radius);
  background: var(--bs-tertiary-bg);
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}
.ct-more-link:hover { background: var(--bs-secondary-bg); color: inherit; }

/* Barra fixa de inscrição */
.ct-action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  padding: 0 1rem calc(.75rem + env(safe-area-inset-bottom));
  pointer-events: none;
}
.ct-action-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: .75rem .75rem .75rem 1.5rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  background: var(--bs-body-bg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
  pointer-events: auto;
}
[data-bs-theme="dark"] .ct-action-bar-inner { background: var(--bs-secondary-bg); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.ct-action-bar .btn { border-radius: 999px; padding-inline: 1.25rem; white-space: nowrap; }
.ct-action-bar-info { flex: 1; min-width: 0; }
.ct-action-bar-share { width: 44px; height: 44px; padding: 0 !important; background: rgba(var(--brand-green-rgb), .12); color: var(--brand-green-darker); }
[data-bs-theme="dark"] .ct-action-bar-share { color: var(--brand-green); }
.ct-action-bar-status { font-weight: 700; color: var(--brand-green-darker); padding: 0 .75rem; white-space: nowrap; }
[data-bs-theme="dark"] .ct-action-bar-status { color: var(--brand-green); }
.ct-action-bar-cta { display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.ct-action-bar-spots { font-size: .75rem; font-weight: 600; line-height: 1; color: var(--brand-green-darker); white-space: nowrap; }
[data-bs-theme="dark"] .ct-action-bar-spots { color: var(--brand-green); }

/* Botão de inscrição pulsando: um anel na cor da comunidade que se expande e some. */
.ct-cta-pulse { animation: ct-cta-pulse 2s ease-out infinite; }
.ct-cta-pulse:hover, .ct-cta-pulse:focus-visible { animation: none; }
@keyframes ct-cta-pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--brand-green-rgb), .55); transform: scale(1); }
  15% { transform: scale(1.04); }
  30% { transform: scale(1); }
  70%, 100% { box-shadow: 0 0 0 14px rgba(var(--brand-green-rgb), 0); }
}
@media (prefers-reduced-motion: reduce) {
  .ct-cta-pulse { animation: none; }
}
body:has(.ct-action-bar) main { padding-bottom: 7rem !important; }
body:has(.ct-action-bar) .ct-toaster { bottom: 6.5rem; }
@media (max-width: 575.98px) {
  .ct-action-bar-inner { border-radius: var(--ct-radius); padding: .6rem .6rem .6rem 1rem; gap: .5rem; }
  .ct-action-bar .btn { padding-inline: .9rem; }
  .ct-action-bar-share { width: 38px; height: 38px; }
  .ct-event-cover-hero { transform: none; }
  .ct-action-bar-inner .small { font-size: .7rem; }
  body:has(.ct-action-bar) .ct-toaster { bottom: calc(6.5rem + env(safe-area-inset-bottom)); }
}

/* Comunidade */
.ct-community-cover { position: relative; aspect-ratio: 16 / 9; container-type: inline-size; }
.ct-community-cover > img, .ct-community-cover-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--ct-radius) + 4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .12);
}

/* Sem capa: a mesma composição da arte "save the date" do meetup (Meetups::CoverImage),
   em CSS. Medidas em cqw para a peça escalar como uma imagem. */
.ct-community-cover-placeholder {
  --cover-bg: #fbfcfb;
  /* Tons derivados da cor da marca, para seguirem o tema da comunidade. */
  --cover-disc: rgba(var(--brand-green-rgb), .10);
  --cover-dot: rgba(var(--brand-green-rgb), .20);
  --cover-name: var(--brand-green-dark);
  --cover-muted: #5c665c;
  position: relative;
  overflow: hidden;
  background: var(--cover-bg);
  border: 1px solid var(--bs-border-color);
}
[data-bs-theme="dark"] .ct-community-cover-placeholder {
  --cover-bg: #121712;
  --cover-disc: rgba(var(--brand-green-rgb), .14);
  --cover-dot: rgba(var(--brand-green-rgb), .12);
  --cover-name: var(--brand-green);
  --cover-muted: #8a968a;
}
/* O pontinho verde-claro do canto, como na arte. */
.ct-community-cover-placeholder::before {
  content: "";
  position: absolute;
  width: 16cqw;
  height: 16cqw;
  border-radius: 50%;
  background: var(--cover-dot);
  left: 56cqw;
  top: -4cqw;
}
/* O disco grande sai pela borda direita; o conteúdo fica deslocado para a parte visível. */
.ct-community-cover-disc {
  position: absolute;
  width: 66cqw;
  height: 66cqw;
  border-radius: 50%;
  right: -31cqw;
  top: 50%;
  transform: translateY(-50%);
  background: var(--cover-disc);
  box-shadow: 0 0 0 1.2cqw var(--cover-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 30cqw;
}
.ct-community-cover-disc-logo { width: 28cqw; height: 28cqw; object-fit: contain; display: block; }
.ct-community-cover-disc-initials {
  width: 100%;
  height: 100%;
  margin-right: -30cqw;
  padding-right: 30cqw;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-green-darker) 100%);
  color: var(--brand-on);
  font-weight: 800;
  font-size: 18cqw;
  letter-spacing: -.03em;
}
.ct-community-cover-text {
  position: absolute;
  left: 6cqw;
  right: 42cqw;
  bottom: 5.5cqw;
}
.ct-community-cover-name {
  color: var(--cover-name);
  font-weight: 800;
  font-size: 5.6cqw;
  line-height: 1.1;
  letter-spacing: -.03em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ct-community-cover-meta { margin-top: 1.4cqw; color: var(--cover-muted); font-size: 2.2cqw; font-weight: 600; letter-spacing: .08em; }
.ct-community-cover-site { margin-top: 2.4cqw; color: var(--cover-muted); font-size: 1.9cqw; }
.ct-community-cover-logo { position: absolute; right: -10px; top: -10px; padding: 4px; border-radius: 18px; background: var(--bs-body-bg); box-shadow: 0 6px 18px rgba(0, 0, 0, .15); }
.ct-community-cover-logo .ct-avatar { border-radius: 14px; }
.ct-community-facts li { display: flex; gap: .5rem; align-items: baseline; margin-bottom: .35rem; color: var(--bs-secondary-color); }
.ct-community-facts i { color: var(--brand-green-dark); }

.ct-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--bs-border-color);
  border-radius: 50%;
  color: var(--bs-body-color);
  text-decoration: none;
}
.ct-icon-button:hover { border-color: var(--brand-green); color: var(--brand-green-dark); }

.ct-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--bs-border-color);
  scroll-margin-top: calc(var(--ct-topbar-height) + 1rem);
}
.ct-tabs { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; }
.ct-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  padding: .5rem 1rem .75rem;
  border-bottom: 3px solid transparent;
  color: var(--bs-secondary-color);
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.ct-tab i { font-size: 1.25rem; }
.ct-tab:hover { color: var(--bs-body-color); }
.ct-tab.active { color: var(--bs-body-color); border-bottom-color: var(--brand-green); }
.ct-tab.active i { color: var(--brand-green-dark); }
@media (max-width: 575.98px) {
  .ct-tabs-bar { flex-direction: column; align-items: stretch; }
  .ct-tab { flex: 1; padding-inline: .5rem; }
}

.ct-member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 1.25rem .75rem; }
.ct-member { display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; min-width: 0; }
.ct-member a { color: inherit; }
.ct-member-mini-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; justify-items: center; }

/* Utilitário usado em flex para permitir text-truncate */
.min-w-0 { min-width: 0; }

/* --- Estúdio de transmissão --- */
.ct-studio-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  min-height: 240px;
  padding: 0.75rem;
  border-radius: var(--ct-radius);
  background: #0a0f0a;
}

.ct-studio-tiles:empty::after {
  content: "Ninguém com câmera ou tela ligada ainda.";
  grid-column: 1 / -1;
  align-self: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
}

.ct-tile {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #141814;
}

.ct-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ct-tile.is-local video { transform: scaleX(-1); }
.ct-tile.is-screen video { object-fit: contain; background: #000; }
.ct-tile.is-screen.is-local video { transform: none; }

.ct-tile .ct-tile-name {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  max-width: calc(100% - 1rem);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: rgba(10, 15, 10, 0.72);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ct-tile .ct-tile-badges {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  display: flex;
  gap: 0.25rem;
}

.ct-tile.is-speaking { outline: 3px solid var(--brand-green); outline-offset: -3px; }

.ct-tile .ct-tile-avatar {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-on);
  background: var(--brand-gradient);
}

.ct-studio-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.ct-studio-control {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  min-width: 5.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  font-size: 0.72rem;
}

.ct-studio-control .bi { font-size: 1.2rem; }

.ct-studio-control[aria-pressed="true"] {
  background: var(--brand-green);
  border-color: var(--brand-green);
  color: var(--brand-on);
}

.ct-studio-control-leave { color: var(--bs-danger); }

.ct-studio-devices { min-width: 18rem; }

.ct-studio-preview iframe { pointer-events: none; }

.ct-studio-layouts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.5rem;
}

.ct-studio-layout input { position: absolute; opacity: 0; pointer-events: none; }

.ct-studio-layout span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
  font-size: 0.8rem;
  cursor: pointer;
}

.ct-studio-layout input:checked + span {
  border-color: var(--brand-green);
  background: rgba(var(--brand-green-rgb), 0.14);
  font-weight: 600;
}

.ct-studio-layout input:focus-visible + span { box-shadow: 0 0 0 0.2rem rgba(var(--brand-green-rgb), 0.3); }

.ct-studio-swatch {
  width: 44px;
  height: 28px;
  border: 2px solid var(--bs-border-color);
  border-radius: 8px;
  padding: 0;
}

.ct-studio-swatch.is-active { border-color: var(--brand-green); box-shadow: 0 0 0 2px rgba(var(--brand-green-rgb), 0.35); }

/* Pré-voo da transmissão: uma bolinha por dependência (livestreams/_readiness). */
.ct-ready-list { display: grid; gap: 0.6rem; font-size: 0.85rem; }
.ct-ready-item { display: flex; align-items: flex-start; gap: 0.6rem; }
.ct-ready-dot {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  margin-top: 0.3rem;
  border-radius: 50%;
  background: var(--bs-secondary-color);
}
.ct-ready-dot.is-ok {
  background: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(var(--brand-green-rgb), 0.25);
}
.ct-ready-dot.is-off { background: #d61f1f; box-shadow: 0 0 0 3px rgba(214, 31, 31, 0.2); }
.ct-ready-dot.is-unknown { background: var(--bs-secondary-color); opacity: 0.6; }
.ct-ready-dot.is-optional { background: transparent; border: 2px solid var(--bs-secondary-color); opacity: 0.7; }

/* Transmissão para o site (/live): <video> no lugar do iframe do YouTube. */
.ct-player video { position: absolute; inset: 0; width: 100%; height: 100%; }
.ct-player-waiting {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: #fff;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
.ct-player-waiting[hidden] { display: none; }
.ct-ready-command {
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  font-size: 0.85rem;
  user-select: all;
}

.ct-roster-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
}

.ct-roster-row .ct-roster-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ct-roster-row .ct-roster-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-size: 0.72rem;
}

.ct-roster-row.is-speaking .ct-avatar { box-shadow: 0 0 0 3px var(--brand-green); }

.ct-roster-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  width: 100%;
  margin-top: 0.4rem;
}

.ct-roster-actions .btn { font-size: 0.72rem; padding: 0.15rem 0.5rem; }

.ct-roster-hand { color: #e0a800; animation: ct-pulse 1.4s ease-in-out infinite; }

/* --- Chat: painel flutuante de conversas (layouts/_chat, chat_controller.js) --- */
.ct-chat-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1040;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: var(--brand-green);
  color: var(--brand-on);
  font-size: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s;
}
.ct-chat-fab:hover { transform: scale(1.06); }
.ct-chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e5322d;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  line-height: 22px;
  border: 2px solid var(--bs-body-bg);
}
.ct-chat-badge[hidden] { display: none; }
.ct-chat-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 5.75rem;
  z-index: 1040;
  width: min(380px, calc(100vw - 2.5rem));
  height: min(560px, calc(100vh - 7.5rem));
  border: 1px solid var(--bs-border-color);
  border-radius: var(--ct-radius);
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
  overflow: hidden;
}
.ct-chat-panel[hidden] { display: none; }
.ct-chat-panel turbo-frame { display: flex; flex-direction: column; height: 100%; }
@media (max-width: 575.98px) {
  .ct-chat-panel { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; }
  .ct-chat-panel ~ .ct-chat-fab { display: none; }
}
/* Na página inteira do chat (/conversas) o frame vira um cartão. */
main > turbo-frame#chat { display: flex; flex-direction: column; max-width: 640px; height: min(640px, calc(100vh - 8rem)); margin: 0 auto; border: 1px solid var(--bs-border-color); border-radius: var(--ct-radius); overflow: hidden; }
main > turbo-frame#chat .ct-chat-close { display: none; }

.ct-chat-header { display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; border-bottom: 1px solid var(--bs-border-color); }
.ct-chat-back { color: inherit; font-size: 1.1rem; line-height: 1; }
.ct-chat-list { flex: 1; overflow-y: auto; }
.ct-chat-row { display: flex; align-items: center; gap: .75rem; padding: .7rem 1rem; color: inherit; text-decoration: none; border-bottom: 1px solid var(--bs-border-color); }
.ct-chat-row:hover { background: var(--bs-tertiary-bg); color: inherit; }
.ct-chat-row-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ct-chat-row-name { font-weight: 600; }
.ct-chat-row-time { font-size: .72rem; color: var(--bs-secondary-color); white-space: nowrap; }
.ct-chat-row-preview { font-size: .85rem; color: var(--bs-secondary-color); }
.ct-chat-row-unread .ct-chat-row-preview { color: inherit; font-weight: 600; }
.ct-chat-unread { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand-green); color: var(--brand-on); font-size: .72rem; font-weight: 700; text-align: center; line-height: 20px; }
.ct-chat-empty { padding: 2rem 1.25rem; text-align: center; color: var(--bs-secondary-color); font-size: .9rem; }
.ct-chat-thread { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.ct-chat-thread-empty { margin: auto; }
.ct-chat-thread-empty:not(:only-child) { display: none; }
.ct-chat-msg { display: flex; flex-direction: column; max-width: 82%; }
.ct-chat-msg-mine { align-self: flex-end; align-items: flex-end; }
.ct-chat-msg-theirs { align-self: flex-start; align-items: flex-start; }
.ct-chat-bubble { padding: .5rem .8rem; border-radius: 1rem; background: var(--bs-tertiary-bg); font-size: .92rem; overflow-wrap: anywhere; }
.ct-chat-bubble p { margin: 0; }
.ct-chat-bubble p + p { margin-top: .4rem; }
.ct-chat-msg-mine .ct-chat-bubble { background: var(--brand-green); color: var(--brand-on); border-bottom-right-radius: .3rem; }
.ct-chat-msg-theirs .ct-chat-bubble { border-bottom-left-radius: .3rem; }
.ct-chat-msg-time { font-size: .68rem; color: var(--bs-secondary-color); margin-top: .15rem; }
.ct-chat-form { padding: .6rem .75rem .5rem; border-top: 1px solid var(--bs-border-color); }
.ct-chat-form-row { display: flex; gap: .5rem; align-items: flex-end; }
.ct-chat-input { resize: none; max-height: 120px; }
.ct-chat-send { width: 42px; height: 38px; padding: 0; flex-shrink: 0; }
.ct-chat-form-hint { font-size: .68rem; color: var(--bs-secondary-color); margin-top: .3rem; }
.ct-chat-form-error { margin-bottom: .4rem; }

/* Zona de perigo: ação irreversível, visualmente apartada do formulário */
.ct-danger-zone {
  border: 1px solid var(--bs-danger-border-subtle);
  border-radius: var(--ct-radius);
  background: var(--bs-danger-bg-subtle);
  padding: 1rem 1.25rem;
}
