/* FEBRABAN TECH 2026 — dashboard (tema único, escuro) */

:root {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface-1: #1a1a19;
  --surface-2: #212120;
  --surface-3: #292927;
  --text-primary: #ffffff;
  --text-secondary: #c3c2b7;
  --muted: #898781;
  --grid: #2c2c2a;
  --baseline: #383835;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);

  --series-1: #3987e5; /* blue */
  --series-2: #d95926; /* orange */
  --series-3: #199e70; /* aqua */
  --series-4: #c98500; /* yellow */
  --series-5: #d55181; /* magenta */
  --series-6: #3fae3f; /* green */
  --series-7: #9085e9; /* violet */
  --series-8: #e66767; /* red */

  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --youtube: #ff3b30;

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; overflow-x: clip; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--page);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 18.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

button { font-family: inherit; cursor: pointer; }

/* ---------- topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 10px; margin-right: auto;
  background: transparent; border: none; padding: 0; font: inherit; text-align: left; text-decoration: none;
  color: var(--text-primary);
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--series-1), var(--series-7));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16.5px; color: #fff;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 18px; }

.topnav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.topnav a {
  text-decoration: none; color: var(--text-secondary); font-size: 17.5px;
  padding: 8px 12px; border-radius: 999px; transition: background .15s, color .15s;
}
.topnav a:hover { background: var(--surface-2); color: var(--text-primary); }

.topnav-logout {
  background: transparent; border: 1px solid var(--border-strong); color: var(--text-secondary);
  border-radius: 999px; padding: 8px 16px; font-size: 16.5px; font-weight: 600; white-space: nowrap;
}
.topnav-logout:hover { background: var(--surface-2); color: var(--text-primary); }

.icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 999px; flex-shrink: 0;
  background: transparent; border: 1px solid var(--border-strong); color: var(--text-secondary);
  text-decoration: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text-primary); }
.topnav a.icon-btn { padding: 0; }
#nav-admin-link.icon-btn { border-color: var(--series-1); color: var(--series-1); }
#nav-admin-link.icon-btn:hover { background: rgba(57, 135, 229, .12); color: var(--series-1); }

.nav-toggle {
  display: none; background: transparent; border: 1px solid var(--border-strong); color: var(--text-primary);
  width: 38px; height: 38px; border-radius: var(--radius-sm); align-items: center; justify-content: center; flex-shrink: 0;
}
.nav-toggle:hover { background: var(--surface-2); }
.nav-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 55; }

.btn-ask {
  display: flex; align-items: center; gap: 8px;
  background: var(--series-1); color: #fff; border: none;
  padding: 9px 16px; border-radius: 999px; font-size: 17.5px; font-weight: 600;
  white-space: nowrap;
  transition: transform .15s, box-shadow .15s;
}
.btn-ask:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -6px rgba(57,135,229,.6); }

/* ---------- layout ---------- */

main { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { padding: 56px 0 24px; scroll-margin-top: 84px; border-top: 1px solid var(--border); }
.section:first-of-type { border-top: none; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin-bottom: 20px;
}
.section-head h2 { margin: 0 0 6px; font-size: 37px; font-weight: 800; letter-spacing: -0.01em; }
.count-badge { font-size: 20px; font-weight: 600; color: var(--muted); letter-spacing: normal; }
.section-sub { margin: 0; color: var(--muted); font-size: 17.5px; }
.section-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px;
}

.btn-secondary {
  background: var(--surface-2); color: var(--text-primary);
  border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 9px 18px; font-size: 16.5px; font-weight: 600;
}
.btn-secondary:hover { background: var(--surface-3); }
.load-more-wrap { display: flex; justify-content: center; margin: 20px 0 8px; }

/* ---------- hero / stat tiles ---------- */

.hero { padding-top: 40px; }
.hero-text { margin-bottom: 28px; }
.hero-text h1 { font-size: 50.5px; font-weight: 800; line-height: 1.15; margin: 0 0 10px; letter-spacing: -0.01em; }
.hero-text p { color: var(--text-secondary); font-size: 19.5px; margin: 0; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat-tile {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 16px 18px; width: 100%; text-align: left; color: inherit; font: inherit;
  transition: border-color .15s, transform .15s;
}
.stat-tile:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.stat-tile .value { font-size: 34.5px; font-weight: 700; }
.stat-tile .label { font-size: 16px; color: var(--muted); margin-top: 2px; }

/* ---------- chips / filters / tabs ---------- */

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-secondary);
  border-radius: 999px; padding: 6px 13px; font-size: 16px; font-weight: 500;
}
.chip.active { background: var(--series-1); border-color: var(--series-1); color: #fff; }
.chip .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

select, input[type="search"], input[type="text"], input[type="password"] {
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text-primary);
  border-radius: var(--radius-sm); padding: 9px 12px; font-size: 17.5px; font-family: inherit;
}
select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23898781' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px 14px;
}
select:focus, input:focus { outline: 2px solid var(--series-1); outline-offset: 1px; }

.filters.card { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.filters input[type="search"] { flex: 1 1 260px; min-width: 0; }

.filters.card input[type="search"] { font-size: 15px; padding: 7px 10px; flex: 1 1 200px; }
.filters.card select {
  font-size: 15px; padding: 7px 30px 7px 10px; flex: 0 1 170px; min-width: 0; max-width: 100%;
  text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
}

.toggle-field { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text-secondary); flex: 0 0 auto; }
.switch {
  position: relative; width: 40px; height: 24px; border-radius: 999px; flex-shrink: 0;
  background: var(--surface-3); border: 1px solid var(--border-strong); padding: 0;
  transition: background .2s, border-color .2s;
}
.switch .switch-knob {
  position: absolute; top: 1px; left: 1px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--text-secondary); transition: transform .2s, background .2s;
}
.switch.active { background: var(--series-1); border-color: var(--series-1); }
.switch.active .switch-knob { transform: translateX(16px); background: #fff; }

.tabs { display: flex; gap: 6px; background: var(--surface-2); padding: 4px; border-radius: 999px; }
.tab { background: transparent; border: none; color: var(--text-secondary); padding: 7px 16px; border-radius: 999px; font-size: 16.5px; font-weight: 600; }
.tab.active { background: var(--series-1); color: #fff; }

.view-toggle { display: flex; gap: 2px; background: var(--surface-2); padding: 3px; border-radius: 8px; }
.view-btn { background: transparent; border: none; color: var(--muted); padding: 6px 8px; border-radius: 6px; display: flex; }
.view-btn.active { background: var(--surface-3); color: var(--text-primary); }

/* ---------- treemap ---------- */

.treemap { position: relative; width: 100%; height: 420px; }
.tile {
  position: absolute; border-radius: 6px; overflow: hidden;
  border: 2px solid var(--surface-1);
  padding: 8px 10px; display: flex; flex-direction: column; justify-content: flex-end;
  transition: filter .15s, transform .15s; cursor: pointer;
}
.tile:hover { filter: brightness(1.12); transform: scale(1.01); z-index: 2; }
.tile .tile-name { font-weight: 700; font-size: 16px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .tile-count { font-size: 14.5px; color: rgba(255,255,255,.85); }

.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 15.5px; color: var(--muted); }
.legend-swatch { width: 10px; height: 10px; border-radius: 3px; }

/* ---------- bar chart (barras horizontais) ---------- */

.chart-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; font-size: 17.5px; font-weight: 600; color: var(--text-secondary); }

.bar-chart { display: flex; flex-direction: column; gap: 12px; padding: 4px; }
.bar-row { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.bar-row .bar-row-label {
  flex: 0 0 34%; max-width: 220px; font-size: 15px; color: var(--muted); text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bar-row .bar-row-track { flex: 1 1 auto; min-width: 0; height: 22px; background: var(--surface-2); border-radius: 5px; }
.bar-row .bar-row-fill {
  height: 100%; min-width: 4px; background: var(--series-1); border-radius: 5px;
  transition: filter .15s;
}
.bar-row:hover .bar-row-fill { filter: brightness(1.2); }
.bar-row .bar-row-value { flex: 0 0 auto; min-width: 26px; font-size: 15px; font-weight: 600; color: var(--text-secondary); }
.bar-row[data-active="1"] .bar-row-fill { background: var(--series-2); }

.table-wrap { overflow-x: auto; }
.table-wrap-scroll { max-height: 420px; overflow-y: auto; }
.table-wrap-scroll table.data-table thead th { position: sticky; top: 0; background: var(--surface-1); z-index: 1; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 16.5px; }
table.data-table th, table.data-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data-table th { color: var(--muted); font-weight: 600; font-size: 15.5px; text-transform: uppercase; letter-spacing: .02em; }
table.data-table tbody tr:hover { background: var(--surface-2); }
table.data-table td.num { font-variant-numeric: tabular-nums; text-align: right; }

.mention-card {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
}
/* Palestra à esquerda (~1/3), citações à direita (~2/3). A altura das citações
   é travada (via JS, layoutMentionCitations) na altura da palestra — o que não
   couber rola dentro da própria caixa em vez de quebrar para outra faixa. */
.mention-card-top { display: flex; align-items: flex-start; }
.mention-talk { cursor: pointer; display: flex; flex-direction: column; width: 34%; flex: 0 0 34%; min-width: 0; }
.mention-talk .thumb-wrap { position: relative; aspect-ratio: 16/9; background: var(--surface-2); }
.mention-talk .thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }
.mention-talk .no-video { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: 15.5px; }
.mention-talk .body { padding: 14px 16px 4px; display: flex; flex-direction: column; gap: 8px; }
.mention-talk h3 { margin: 0; font-size: 18.5px; line-height: 1.4; color: var(--text-primary); }
.mention-talk:hover h3 { color: var(--series-1); }
.mention-talk .summary { font-size: 16px; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mention-talk .speakers-row { display: flex; align-items: center; }
.mention-citations-side {
  width: 66%; flex: 0 0 66%; min-width: 0; display: flex; flex-direction: column;
  padding: 12px 16px 16px; border-left: 1px solid var(--border); overflow-y: auto;
}
.mention-citation {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0 0;
}
.mention-citation:first-child { padding-top: 0; }
.mention-citation + .mention-citation { border-top: 1px solid var(--border); margin-top: 10px; }
.mention-citation-text { min-width: 0; }
.mention-citation .mention-quote { font-size: 34.5px; line-height: 1.35; color: var(--text-secondary); margin: 0 0 6px; }
.mention-citation .mention-meta { font-size: 15.5px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mention-citation .yt-link { flex-shrink: 0; }
@media (max-width: 700px) {
  .mention-card-top { flex-direction: column; }
  .mention-talk, .mention-citations-side { width: 100%; flex-basis: auto; }
  .mention-citations-side { border-left: none; border-top: 1px solid var(--border); }
  .mention-citation { flex-wrap: wrap; align-items: flex-start; }
  .mention-citation-text { flex-basis: 100%; }
  .mention-citation .mention-quote { font-size: 21px; }
  .mention-citation .yt-link { margin-top: 4px; }
}

/* ---------- insights (perguntas expansíveis) ---------- */

.insights-groups { display: flex; flex-direction: column; gap: 26px; }
.insights-category-title { font-size: 16px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin: 0 0 10px; }
.insight-list { display: flex; flex-direction: column; gap: 10px; }
.insight-item {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden;
}
.insight-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: transparent; border: none; color: var(--text-primary);
  padding: 15px 18px; font-size: 18px; font-weight: 600; text-align: left;
}
.insight-question:hover { background: var(--surface-2); }
.insight-chevron { color: var(--muted); flex-shrink: 0; transition: transform .2s; }
.insight-item.open .insight-chevron { transform: rotate(180deg); }
.insight-collapse { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s ease; }
.insight-item.open .insight-collapse { grid-template-rows: 1fr; }
.insight-collapse > .insight-answer-clip { overflow: hidden; }
.insight-answer { padding: 0 18px 18px; border-top: 1px solid var(--border); }
.insight-loading { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 16px; padding-top: 16px; }
.insight-answer .chat-bubble { background: var(--surface-2); border: 1px solid var(--border); margin-top: 14px; }
.insight-answer .mention-card { margin-top: 14px; }
.insight-answer .mention-card + .mention-card { margin-top: 10px; }

.topic-count-badge {
  font-size: 15px; font-weight: 700; color: var(--series-1); white-space: nowrap;
  background: rgba(57, 135, 229, .12); border-radius: 999px; padding: 3px 11px;
}

/* ---------- youtube link chip ---------- */

.yt-link {
  display: inline-flex; align-items: center; gap: 6px;
  appearance: none;
  background: rgba(255, 59, 48, 0.12); color: #ff6a60;
  border: 1px solid rgba(255, 59, 48, 0.35);
  border-radius: 999px; padding: 4px 10px 4px 6px; font-size: 15.5px; font-weight: 700;
  text-decoration: none; white-space: nowrap;
}
.yt-link:hover { background: rgba(255, 59, 48, 0.22); }
.yt-link svg { flex-shrink: 0; }

/* ---------- talk grid / cards ---------- */

.talk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.talk-card {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; cursor: pointer; transition: transform .15s, border-color .15s;
  display: flex; flex-direction: column;
}
.talk-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.talk-card .thumb-wrap { position: relative; aspect-ratio: 16/9; background: var(--surface-2); }
.talk-card .thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }
.talk-card .duration { position: absolute; bottom: 6px; right: 6px; background: rgba(0,0,0,.75); color: #fff; font-size: 14.5px; padding: 2px 6px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.talk-card .no-video { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: 15.5px; }
.talk-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.talk-card .trail-tag { align-self: flex-start; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--series-1); }
.talk-card h3 { margin: 0; font-size: 18.5px; line-height: 1.4; }
.talk-card .summary { font-size: 16px; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.talk-card .speakers-row { display: flex; align-items: center; margin-top: auto; padding-top: 6px; }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 2px solid var(--surface-1);
  background: var(--surface-3); margin-left: -8px;
}
.avatar:first-child { margin-left: 0; }
.speakers-row .names { margin-left: 10px; font-size: 15px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- quote wall ---------- */

.quote-wall { columns: 3 280px; column-gap: 16px; }
@media (max-width: 900px) { .quote-wall { columns: 2 240px; } }
@media (max-width: 560px) { .quote-wall { columns: 1; } }
.quote-card {
  break-inside: avoid; margin-bottom: 16px;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
.quote-card .quote-text { font-size: 18.5px; line-height: 1.5; color: var(--text-primary); margin: 0; }
.quote-card .quote-text::before { content: "“"; color: var(--series-1); font-weight: 700; }
.quote-card .quote-text::after { content: "”"; color: var(--series-1); font-weight: 700; }
.quote-card .quote-who { display: flex; align-items: center; gap: 10px; }
.quote-card .quote-who .avatar { width: 32px; height: 32px; margin: 0; }
.quote-card .who-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.quote-card .who-text strong { font-size: 16px; }
.quote-card .who-text span { font-size: 15px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-card .quote-source { margin-top: -2px; }

/* ---------- speakers ---------- */

#speaker-filters input[type="search"] { flex: 1 1 100%; }
.speaker-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media (max-width: 900px) { .speaker-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .speaker-grid { grid-template-columns: repeat(2, 1fr); } }
.speaker-card {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 14px; text-align: center; cursor: pointer;
}
.speaker-card:hover { border-color: var(--border-strong); }
.speaker-card img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; background: var(--surface-3); }
.speaker-card .sp-name { font-size: 16.5px; font-weight: 600; }
.speaker-card .sp-company { font-size: 15.5px; font-weight: 700; color: var(--series-1); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.speaker-card .sp-role { font-size: 15px; color: var(--muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.speaker-card .sp-count { margin-top: 8px; font-size: 14px; color: var(--muted); font-weight: 700; }

/* ---------- speaker modal (lista de palestras) ---------- */

.speaker-modal-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.speaker-modal-head img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--surface-3); flex-shrink: 0; }
.speaker-modal-head h2 { font-size: 23px; margin: 0; }
.speaker-modal-head .section-sub { margin: 2px 0 0; }
.speaker-talk-list { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.speaker-talk-item {
  display: flex; align-items: center; gap: 14px; text-align: left;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 10px; width: 100%;
}
.speaker-talk-item:hover { border-color: var(--border-strong); background: var(--surface-3); }
.speaker-talk-item .thumb-wrap { position: relative; width: 120px; aspect-ratio: 16/9; background: var(--surface-3); border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.speaker-talk-item .thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }
.speaker-talk-item .no-video { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: 14px; }
.speaker-talk-item .body { min-width: 0; }
.speaker-talk-item h4 { margin: 0 0 4px; font-size: 16.5px; color: var(--text-primary); line-height: 1.35; }
.speaker-talk-item span { font-size: 15px; color: var(--muted); }

/* ---------- modal / drawer ---------- */

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(2px);
  align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-backdrop:not([hidden]) { display: flex; }
[hidden] { display: none !important; }
.modal {
  background: var(--surface-1); border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  max-width: 780px; width: 100%; max-height: 88vh; overflow-y: auto; position: relative; padding: 28px;
}
.company-modal, .talk-modal { max-width: 1200px; width: min(1200px, 95vw); max-height: 90vh; }
.video-modal { max-width: none; width: min(1800px, 96vw, calc((96vh - 96px) * 16 / 9)); max-height: 96vh; padding: 24px; }
.video-modal-frame { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; border-radius: var(--radius-sm); overflow: hidden; }
.video-modal-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.modal-close {
  position: absolute; top: 16px; right: 16px; background: var(--surface-2); border: 1px solid var(--border-strong);
  color: var(--text-secondary); width: 32px; height: 32px; border-radius: 50%; font-size: 17.5px; z-index: 2;
}
.modal-close:hover { color: var(--text-primary); background: var(--surface-3); }
.modal-back {
  position: absolute; top: 16px; left: 16px; background: var(--surface-2); border: 1px solid var(--border-strong);
  color: var(--text-secondary); width: 32px; height: 32px; border-radius: 50%; z-index: 2;
  display: flex; align-items: center; justify-content: center;
}
.modal-back:hover { color: var(--text-primary); background: var(--surface-3); }

.talk-detail-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 18px; }
.talk-detail-head .thumb-wrap { position: relative; width: 100%; aspect-ratio: 16/9; background: var(--surface-2); border-radius: var(--radius-sm); overflow: hidden; }
.talk-detail-head .thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.talk-detail-head .thumb-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.talk-detail-meta { min-width: 0; }
.talk-detail-meta h2 { margin: 0 0 8px; font-size: 24px; }
.talk-detail-meta .meta-line { font-size: 16px; color: var(--muted); margin-bottom: 10px; }
.talk-detail-meta .talk-detail-tags { margin-top: 10px; }
.talk-detail-body p { font-size: 17.5px; color: var(--text-secondary); line-height: 1.6; }
.talk-detail-body .insight-list { margin-top: 20px; }
.talk-detail-body ul { margin: 0; padding-left: 20px; font-size: 17.5px; color: var(--text-secondary); line-height: 1.6; }
.talk-detail-body li { margin-bottom: 6px; }
.speaker-block { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; }
.speaker-block-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.speaker-block-head img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.speaker-block-head strong { font-size: 17.5px; }
.speaker-block-head span { font-size: 15.5px; color: var(--muted); display: block; }
.quote-item { font-size: 16.5px; color: var(--text-secondary); border-left: 2px solid var(--series-1); padding-left: 10px; margin: 8px 0; line-height: 1.5; }
.tag-pill { display: inline-block; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 999px; padding: 3px 10px; font-size: 14.5px; color: var(--text-secondary); margin: 0 6px 6px 0; }

.company-drawer-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.company-drawer-head .sector-dot { width: 12px; height: 12px; border-radius: 4px; }
.company-drawer-head h2 { font-size: 24px; margin: 0; }
.drawer-h { font-size: 16px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin: 22px 0 10px; }
/* Retrato do palestrante à esquerda (~1/3), citações à direita (~2/3) —
   mesmo padrão usado nos cards de menção dos Insights (.mention-card-top).
   Citações do mesmo palestrante ficam agrupadas num único card. */
.company-quote-wall { display: flex; flex-direction: column; gap: 16px; margin: 4px 0; }
.company-quote-wall .quote-card {
  flex-direction: row; align-items: stretch; gap: 0; padding: 0; margin-bottom: 0; overflow: hidden;
}
.company-quote-wall .quote-portrait {
  position: relative; width: 16.5%; flex: 0 0 16.5%; aspect-ratio: 1/1;
  background: var(--surface-2); border-radius: 0; overflow: hidden;
}
.company-quote-wall .quote-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.company-quote-side { width: auto; flex: 1 1 auto; min-width: 0; padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.company-quote-side .who-text strong { font-size: 17px; }
.company-quote-item + .company-quote-item { border-top: 1px solid var(--border); margin-top: 10px; padding-top: 10px; }
.company-quote-wall .quote-card .quote-text { font-size: 22px; line-height: 1.4; }
.company-quote-wall .quote-card .yt-link { align-self: flex-start; }
@media (max-width: 560px) {
  .company-quote-wall .quote-card { flex-direction: column; }
  .company-quote-wall .quote-portrait, .company-quote-side { width: 100%; flex-basis: auto; }
}
.company-modal-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.btn-primary {
  background: var(--series-1); color: #fff; border: 1px solid var(--series-1);
  border-radius: 999px; padding: 13px 26px; font-size: 18.5px; font-weight: 600;
}
.btn-primary:hover { filter: brightness(1.1); }

/* ---------- chat ---------- */

.chat-fab {
  position: fixed; bottom: 24px; right: 24px; width: 58px; height: 58px; border-radius: 50%;
  background: var(--series-1); color: #fff; border: none; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px -8px rgba(57,135,229,.7); z-index: 90; transition: transform .15s;
}
.chat-fab:hover { transform: scale(1.06); }

.chat-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.65); backdrop-filter: blur(3px); z-index: 94;
}

.chat-panel {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(1080px, 96vw); height: min(920px, 94vh);
  background: var(--surface-1); border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.8);
  display: flex; flex-direction: column; z-index: 95; overflow: hidden;
}
.chat-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); position: relative; }
.chat-panel-head strong { display: block; font-size: 18px; }
.chat-panel-head span { font-size: 15px; color: var(--muted); }
.chat-panel-head .modal-close { position: static; }
.chat-panel-actions { display: flex; align-items: center; gap: 8px; }
.chat-clear-btn {
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text-secondary);
  border-radius: var(--radius-sm); padding: 6px 12px; font-size: 14px; cursor: pointer;
}
.chat-clear-btn:hover { color: var(--text-primary); background: var(--surface-3); }

.chat-messages { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.chat-msg { display: flex; }
.chat-msg-user { justify-content: flex-end; }
.chat-bubble { max-width: 90%; padding: 10px 14px; border-radius: 14px; font-size: 17.5px; line-height: 1.55; }
.chat-msg-assistant .chat-bubble { background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-msg-user .chat-bubble { background: var(--series-1); color: #fff; border-bottom-right-radius: 4px; }
.chat-answer { display: flex; flex-direction: column; gap: 12px; max-width: 100%; width: 100%; }
.chat-answer .chat-bubble { max-width: 100%; }
.chat-answer .data-table th, .chat-answer .data-table td { white-space: normal; }
.chat-answer-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.chat-sources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.chat-source-card { display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px; }
.chat-source-card .src-thumb { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--surface-3); flex-shrink: 0; }
.chat-source-card .src-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-source-card .src-thumb-time {
  position: absolute; right: 5px; bottom: 5px; background: rgba(0,0,0,.75); color: #fff;
  font-size: 12.5px; padding: 1px 6px; border-radius: 3px; font-variant-numeric: tabular-nums;
}
.chat-source-card .src-body { min-width: 0; }
.chat-source-card .src-title {
  font-size: 15.5px; font-weight: 600; color: var(--text-primary); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.chat-source-card .src-speaker { font-size: 14px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-source-card .src-quote {
  font-size: 14.5px; color: var(--text-secondary); font-style: italic; line-height: 1.4; margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.chat-speakers { display: flex; gap: 8px; flex-wrap: wrap; }
.chat-speaker-chip { display: flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px 4px 4px; font-size: 15px; }
.chat-speaker-chip img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }

.chat-typing { display: flex; gap: 4px; padding: 6px 0; }
.chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite ease-in-out; }
.chat-typing span:nth-child(2) { animation-delay: .2s; }
.chat-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.chat-suggestions { display: flex; flex-direction: column; gap: 8px; padding: 0 18px 14px; }
.chat-suggestion { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-secondary); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 17px; text-align: left; }
.chat-suggestion:hover { background: var(--surface-3); }

.chat-input-row { display: flex; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--border); }
.chat-input-row input { flex: 1; }
#chat-send { background: var(--series-1); border: none; color: #fff; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
#chat-send:disabled { opacity: .5; cursor: default; }

/* ---------- misc ---------- */

.empty-state { color: var(--muted); font-size: 16.5px; padding: 24px; text-align: center; }

/* ---------- menu sanduíche (mobile) ---------- */

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .topnav {
    position: fixed; top: 0; right: 0; height: 100dvh; width: min(300px, 84vw);
    background: var(--surface-1); border-left: 1px solid var(--border-strong);
    flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 2px;
    padding: 76px 16px 20px; transform: translateX(100%); transition: transform .25s ease;
    z-index: 56; overflow-y: auto;
  }
  .topnav.open { transform: translateX(0); }
  .topnav a, .topnav-logout { width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--radius-sm); }
  .topnav-logout { order: 11; margin-top: 6px; }
  .topnav a.icon-btn, .topnav button.icon-btn { width: 38px; padding: 0; border-radius: 999px; align-self: flex-start; }
  #nav-admin-link.icon-btn { order: 10; margin-top: 10px; }
  #nav-logout.icon-btn { order: 11; margin-top: 6px; }
}

@media (max-width: 720px) {
  .hero-text h1 { font-size: 34.5px; }
  .section-head h2 { font-size: 28.5px; }

  .chat-panel {
    top: 0; left: 0; transform: none;
    width: 100vw; height: 100dvh; max-height: 100dvh;
    border-radius: 0;
  }
  .chat-panel-head { padding: max(14px, env(safe-area-inset-top)) 16px 14px; }
  .chat-messages { padding: 14px; gap: 12px; }
  .chat-bubble { max-width: 96%; }
  .chat-answer-card { padding: 10px; }
  .chat-sources { grid-template-columns: 1fr; }
  .chat-suggestions { padding: 0 14px 10px; }
  .chat-input-row { padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
  .chat-fab { bottom: calc(24px + env(safe-area-inset-bottom)); }
}

/* ---------- login ---------- */

.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
.auth-card {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); padding: 32px; width: 100%; max-width: 360px;
}
.auth-card h1 { font-size: 27.5px; margin: 0 0 4px; }

#login-form label, #user-form label {
  display: block; font-size: 16px; color: var(--muted); margin-bottom: 14px;
}
#login-form input, #user-form input, #user-form select {
  display: block; width: 100%; margin-top: 6px;
}
.field-hint { display: block; margin-top: 4px; font-size: 15px; color: var(--muted); }
.form-error { color: var(--critical); font-size: 16px; margin: 4px 0 0; }
.form-success { color: var(--good); font-size: 16px; margin: 4px 0 0; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 6px; }

.auth-toggle { text-align: center; margin: 16px 0 0; font-size: 15.5px; }
.auth-toggle a { color: var(--series-1); font-weight: 600; text-decoration: none; }
.auth-toggle a:hover { text-decoration: underline; }

/* ---------- admin ---------- */

.admin-tabs-wrap { padding: 32px 0 0; }

.row-actions { display: flex; gap: 6px; }
.row-actions button {
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text-secondary);
  border-radius: 6px; padding: 5px 10px; font-size: 15.5px;
}
.row-actions button:hover { background: var(--surface-3); color: var(--text-primary); }
.row-actions button.danger:hover { color: #ff6a60; border-color: #ff6a60; }

.btn-danger {
  background: rgba(255, 59, 48, 0.1); color: #ff6a60; border: 1px solid rgba(255, 59, 48, 0.4);
  border-radius: 999px; padding: 9px 18px; font-size: 16.5px; font-weight: 600; white-space: nowrap;
}
.btn-danger:hover { background: rgba(255, 59, 48, 0.2); }

.badge-admin, .badge-normal {
  display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 14.5px; font-weight: 700;
}
.badge-admin { background: rgba(57, 135, 229, .15); color: var(--series-1); border: 1px solid rgba(57, 135, 229, .4); }
.badge-normal { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border-strong); font-weight: 600; }

.truncate-cell { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
