/* ============================================================
   TrainVision — sistema de interface
   Layout, tokens e componentes derivados do mock de referência
   (neoventures/portfolio/docs/mock/styles.css).

   Para trocar a cor da marca, troque as cinco variáveis --primary-*.
   Todo o resto do sistema deriva delas.
   ============================================================ */


@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  /* --- primária do tenant Startupes --- */
  --primary-300: #b893df;
  --primary-400: #8544c8;
  --primary-500: #522680;
  --primary-600: #200f31;
  --primary-700: #000000;

  /* --- escala neutra (idêntica em todos os tenants) --- */
  --neutral-50:  #ffffff;
  --neutral-100: #f7f7f7;
  --neutral-200: #efefef;
  --neutral-300: #e0e0e0;
  --neutral-400: #cfcfcf;
  --neutral-500: #b5b5b5;
  --neutral-600: #8c8c8c;
  --neutral-700: #5f5f5f;
  --neutral-800: #303030;
  --neutral-900: #141414;

  /* --- tokens semânticos --- */
  --primary:        var(--primary-500);
  --primary-hover:  var(--primary-600);
  --primary-active: var(--primary-700);
  /* No app este token satura para branco (bug do gerador de escala); aqui
     usamos uma mistura leve, que é o que de fato aparece nos fundos suaves. */
  --primary-bg:     color-mix(in srgb, var(--primary) 10%, #fff);

  --bg:           var(--neutral-50);
  --bg-secondary: var(--neutral-100);
  --bg-tertiary:  var(--neutral-200);

  --text:           #262626;
  --text-secondary: var(--neutral-700);
  --text-muted:     var(--neutral-500);
  --text-inverse:   #ffffff;

  --border:        var(--neutral-200);
  --border-strong: var(--neutral-400);

  --hover:   var(--neutral-200);
  --active:  var(--neutral-300);
  --focus:   var(--primary-400);
  --surface: var(--neutral-100);
  --surface-hover: var(--neutral-200);

  --success: #4ade80;
  --warning: #fbbf24;
  --error:   #f87171;
  --danger:  #f87171;
  --info:    var(--primary-500);

  /* Tons escuros o bastante para texto sobre fundo claro. O app usa os
     tokens acima em barras e pontos, onde contraste de texto não se aplica. */
  --success-text: #15803d;
  --warning-text: #a16207;
  --error-text:   #b91c1c;
  --info-text:    var(--primary-600);

  --success-bg: color-mix(in srgb, var(--success) 16%, #fff);
  --warning-bg: color-mix(in srgb, var(--warning) 18%, #fff);
  --error-bg:   color-mix(in srgb, var(--error) 14%, #fff);
  --info-bg:    var(--primary-bg);

  /* --- forma (medida no app) --- */
  --banner-h:  0px;
  --radius:    8px;   /* item de menu, inputs */
  --radius-sm: 6px;   /* botões */
  --radius-lg: 10px;  /* cards e callouts */
  --radius-xl: 12px;  /* hero */
  --shadow-sm: 0 1px 2px rgba(20, 20, 20, .04);
  --shadow:    0 2px 8px rgba(20, 20, 20, .06);
  --shadow-lg: 0 8px 28px rgba(20, 20, 20, .12);

  --gradient-hero: linear-gradient(135deg, var(--primary-400) 0%, var(--primary) 100%);

  /* --- nomes legados usados pelos <style> das páginas --- */
  --brand:       var(--primary);
  --brand-dark:  var(--primary-hover);
  --brand-soft:  var(--primary-bg);
  --text-soft:   var(--text-secondary);
  --text-mute:   var(--text-muted);
  --bg-card:     var(--bg);
  --bg-soft:     var(--bg-secondary);
  --border-soft: var(--border);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg-secondary);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.015em; color: var(--text); }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); }

/* ========== Layout shell ========== */
.shell {
  display: grid;
  grid-template-columns: 225px 1fr;
  min-height: 100vh;
  transition: grid-template-columns .2s ease;
}
.shell.sidebar-collapsed { grid-template-columns: 76px 1fr; }

.sidebar {
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 0 0 8px;
  /* fixa na viewport, como no app: o rodapé encosta embaixo e só o
     miolo do menu rola quando a lista é longa */
  position: sticky;
  top: 0;
  height: calc(100vh - var(--banner-h));
  align-self: start;
  overflow: hidden;
}
.sidebar .brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 76px;
  padding: 0 12px;
  margin-bottom: 8px;
  position: relative;
  box-sizing: border-box;
}
.sidebar .brand .brand-mark {
  font-weight: 800;
  font-size: 22px;
  color: var(--primary);
  letter-spacing: -.03em;
}
.sidebar .brand .menu-toggle {
  background: transparent;
  border: 0;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  line-height: 1;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  transition: background .15s, color .15s;
}
.sidebar .brand .menu-toggle:hover { background: var(--hover); color: var(--primary); }
.shell.sidebar-collapsed .sidebar .brand .menu-toggle { position: static; transform: rotate(180deg); }

.sidebar nav { padding: 0 12px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; scrollbar-width: thin; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px;
  min-height: 42px;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.sidebar nav a i { font-size: 16px; color: var(--text-secondary); flex: none; }
.sidebar nav a:hover { background: var(--hover); color: var(--text); }
.sidebar nav a:hover i { color: var(--text); }
.sidebar nav a.active i { color: #fff; }
.sidebar nav a.active {
  /* o app usa color-mix sobre a primária no item selecionado do menu */
  /* o app pinta o item selecionado com a primária a 70%; como esta primária
     é escura, o texto inverte para manter contraste */
  background: color-mix(in srgb, var(--primary) 70%, transparent);
  color: #fff;
  font-weight: 600;
}
.sidebar nav .group {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  font-weight: 700;
  padding: 18px 12px 6px;
}

/* colapsada: fica só o ícone */
.shell.sidebar-collapsed .sidebar nav a { justify-content: center; padding: 10px 0; }
.shell.sidebar-collapsed .sidebar nav a span { display: none; }
.shell.sidebar-collapsed .sidebar nav a i { font-size: 17px; }
.shell.sidebar-collapsed .sidebar nav .group { font-size: 0; padding: 12px 0 4px; }
.shell.sidebar-collapsed .sidebar nav .group::before {
  content: ""; display: block; height: 1px; background: var(--border); margin: 0 14px;
}
.shell.sidebar-collapsed .sidebar .brand { justify-content: center; }
.shell.sidebar-collapsed .sidebar .brand .brand-mark { font-size: 20px; }

.main { display: flex; flex-direction: column; min-width: 0; background: var(--bg-secondary); }

.topbar {
  height: 40px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px 0 24px;
  position: sticky; top: 0; z-index: 20;
}
.topbar .user { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 13.5px; }
.topbar .client { display: flex; align-items: center; gap: 8px; }
.topbar .client .badge-client {
  background: var(--primary-bg); color: var(--primary-hover);
  padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600;
}

/* O conteúdo fica centralizado na área útil, como a tela do assistente no
   mock de referência (`.content.ask`): em monitor largo o texto não gruda
   na sidebar e as duas margens ficam iguais. */
.content { padding: 28px 24px 64px; max-width: 1360px; width: 100%; margin-inline: auto; }
.content > h1 { margin-bottom: 4px; }
.lede { color: var(--text-secondary); margin: 0 0 24px; font-size: 14.5px; }

.mobile-menu-toggle {
  display: none;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); width: 36px; height: 36px;
  font-size: 18px; cursor: pointer; color: var(--text-secondary);
}

/* ========== Seletor de Ambiente / Espaço ========== */
.scope-picker { display: flex; align-items: center; gap: 0; }
.scope-pill {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px 10px;
  cursor: pointer;
  position: relative;
  transition: border-color .15s, background .15s;
}
.scope-pill:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.scope-pill .label {
  font-size: 9px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--text-muted); font-weight: 700; line-height: 1.3;
}
.scope-pill .value { font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.25; }
.scope-pill .caret { color: var(--text-muted); font-size: 11px; }
.scope-pill .icon { font-size: 16px; }
.scope-pill .info { display: flex; flex-direction: column; }
.scope-pill.hub { background: var(--primary-bg); border-color: color-mix(in srgb, var(--primary) 22%, transparent); }
.scope-pill.hub:hover { border-color: var(--primary); }
.scope-pill.hub .label { color: color-mix(in srgb, var(--primary-hover) 70%, transparent); }
.scope-pill.hub .value { color: var(--primary-hover); }
.scope-pill.hub .icon { color: var(--primary); }
.scope-arrow { color: var(--text-muted); margin: 0 8px; font-size: 14px; }
.scope-picker > .scope-pill + .scope-pill,
.scope-picker > .scope-pill:first-child + .scope-pill { margin-left: 0; }

.scope-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 292px; padding: 6px; z-index: 40; display: none;
}
.scope-menu.open { display: block; }
.scope-menu-header {
  font-size: 10px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--text-muted); font-weight: 700; padding: 10px 12px 6px;
}
.scope-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius); cursor: pointer;
  transition: background .15s;
}
.scope-menu-item:hover { background: var(--hover); }
.scope-menu-item.active { background: var(--primary-bg); }
.scope-menu-item.active .smi-title { color: var(--primary-hover); font-weight: 700; }
.scope-menu-item.active .smi-icon { color: var(--primary); }
.scope-menu-item.disabled { opacity: .45; cursor: not-allowed; }
.scope-menu-item.disabled:hover { background: transparent; }
.smi-icon { font-size: 16px; width: 20px; text-align: center; }
.smi-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.smi-title { font-size: 13.5px; line-height: 1.3; font-weight: 600; color: var(--text); }
.smi-subtitle { font-size: 11.5px; line-height: 1.3; color: var(--text-muted); }
.smi-check { color: var(--primary); font-weight: 700; }

/* ========== Cards ========== */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.card.clickable { cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.card.clickable:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-1px); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--border); margin: 16px 0; border: 0; }
.muted { color: var(--text-muted); font-size: 12.5px; }

/* ========== Botões ========== */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 6px 14px;
  min-height: 32px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--hover); color: var(--text); border-color: transparent; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #e54f4f; border-color: #e54f4f; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12.5px; }

/* ========== Tags e badges ========== */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  white-space: nowrap;
}
.tag-brand   { background: var(--primary-bg); color: var(--primary-hover); }
.tag-success { background: var(--success-bg); color: var(--success-text); }
.tag-warning { background: var(--warning-bg); color: var(--warning-text); }
.tag-error   { background: var(--error-bg);   color: var(--error-text); }
.tag-info    { background: var(--info-bg);    color: var(--info-text); }

.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex: none;
}
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }

/* ========== Tabelas ========== */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-muted); font-weight: 700;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: var(--bg-secondary);
}
td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-secondary); }

/* ========== Faixa de etapas ========== */
.stage-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.stage-pill {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 14px;
  background: var(--bg);
  min-width: 132px;
}
.stage-pill .kind {
  font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-muted); font-weight: 700;
}
.stage-pill .name { font-weight: 600; font-size: 13.5px; }
.stage-pill .dates { font-size: 11.5px; color: var(--text-muted); }
.stage-pill.current { border-color: var(--primary); background: var(--primary-bg); }
.stage-pill.current .kind { color: var(--primary); }
.stage-pill.done { opacity: .62; }

/* ========== KPIs ========== */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(184px, 100%), 1fr)); gap: 14px; margin-bottom: 26px; }
.kpi {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.kpi .label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-muted); font-weight: 700; margin-bottom: 6px;
}
.kpi .value { font-size: 38px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .delta { font-size: 12px; color: var(--success-text); margin-top: 4px; font-weight: 600; }
.kpi .delta.down { color: var(--error-text); }

/* ========== Árvore de jornada ========== */
.journey { display: flex; flex-direction: column; gap: 14px; }
.j-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.j-col { display: flex; flex-direction: column; gap: 10px; }
.j-node {
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 11px 14px;
  background: var(--bg);
  min-width: 208px;
  box-shadow: var(--shadow-sm);
}
.j-node .kind {
  font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-muted); font-weight: 700;
}
.j-node .title { font-weight: 600; font-size: 13.5px; }
.j-node .meta { font-size: 11.5px; color: var(--text-muted); }
.j-node.challenge { border-left-color: var(--warning); }
.j-node.round     { border-left-color: var(--primary); }
.j-node.solution  { border-left-color: var(--info); }
.j-node.execution { border-left-color: var(--success); }
.j-arrow { color: var(--text-muted); font-size: 18px; }
.j-edge-label { font-size: 11px; color: var(--text-muted); font-style: italic; }

/* ========== Formulários ========== */
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 5px;
}
/* Caixa de texto, seletor e área de texto ocupam a largura do campo — mas
   checkbox e radio não são caixa de texto. Sem a exceção, o quadradinho ficava
   com a largura inteira do painel e empurrava o rótulo para a linha de baixo:
   quem olhava não sabia a qual etiqueta o checkbox pertencia. */
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color .15s, box-shadow .15s;
}
.field input:not([type="checkbox"]):not([type="radio"]):focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 12%, transparent);
}

/* Marcador e rótulo na mesma linha, lado a lado. É o que responde "o que está
   marcado?" — com o rótulo em cima e o quadradinho embaixo, a lista de
   etiquetas de um treino ficava ambígua em cada linha. */
.field input[type="checkbox"], .field input[type="radio"] {
  width: auto; margin: 0; flex: none;
  accent-color: var(--primary);
}
.field label:has(> input[type="checkbox"]),
.field label:has(> input[type="radio"]) {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 0; padding: 3px 0;
  font-weight: 500; color: var(--text);
  cursor: pointer;
}
.radio-row { display: flex; gap: 16px; flex-wrap: wrap; }
.radio-row label { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500; }

/* ========== Modal ========== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .4);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 26px;
  max-width: 560px; width: 100%;
  box-shadow: var(--shadow-lg);
  max-height: 88vh; overflow-y: auto;
}
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

/* ========== Listas ========== */
.list-clean { list-style: none; margin: 0; padding: 0; }
.list-clean li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.list-clean li:last-child { border-bottom: none; }
.list-clean li:first-child { padding-top: 0; }
.list-clean.card li:first-child { padding-top: 12px; }
.list-clean.card li:last-child { padding-bottom: 0; }

/* ========== Banner do protótipo ========== */
.mock-banner {
  background: var(--primary);
  color: var(--primary-700);
  text-align: center;
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .01em;
}

/* ========== Solvy — assistente ========== */
.solvy-fab {
  position: fixed; bottom: 24px; right: 24px;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--primary); color: #fff;
  border: 0; cursor: pointer;
  font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 90;
  transition: transform .18s, background .18s;
}
.solvy-fab:hover { background: var(--primary-hover); transform: scale(1.05); }
.solvy-fab.open { transform: rotate(45deg); }
.solvy-fab .ping {
  position: absolute; top: 2px; right: 2px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--success); border: 2px solid #fff;
}
.solvy-panel {
  position: fixed; bottom: 90px; right: 24px;
  width: 380px; max-width: calc(100vw - 32px);
  height: 540px; max-height: calc(100vh - 130px);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: none; flex-direction: column;
  overflow: hidden; z-index: 91;
}
.solvy-panel.open { display: flex; }
.solvy-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}
.solvy-header .avatar-bot {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.solvy-header .info { flex: 1; }
.solvy-header .name { font-weight: 700; font-size: 14px; }
.solvy-header .status { font-size: 11.5px; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }
.solvy-header .status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--success);
}
.solvy-header button {
  background: transparent; border: 0; cursor: pointer;
  color: var(--text-muted); font-size: 18px;
  width: 28px; height: 28px; border-radius: var(--radius-sm);
}
.solvy-header button:hover { background: var(--hover); color: var(--text); }
.solvy-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.solvy-msg { max-width: 86%; font-size: 13.5px; line-height: 1.5; }
.solvy-msg.bot {
  background: var(--bg-secondary);
  padding: 11px 14px;
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 4px;
  align-self: flex-start;
}
.solvy-msg.bot strong { color: var(--primary-hover); }
.solvy-msg.user {
  background: var(--primary); color: #fff;
  padding: 11px 14px;
  border-radius: var(--radius-lg) var(--radius-lg) 4px var(--radius-lg);
  align-self: flex-end;
}
.solvy-msg.user .meta { color: rgba(255, 255, 255, .75); }
.solvy-msg .meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.solvy-msg ul { margin: 8px 0 0; padding-left: 18px; }
.solvy-msg .pill-action {
  display: inline-block; margin-top: 9px;
  background: var(--bg); border: 1px solid var(--primary);
  color: var(--primary);
  padding: 5px 12px; border-radius: 99px;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.solvy-msg .pill-action:hover { background: var(--primary); color: #fff; }
.solvy-suggestions {
  display: flex; gap: 8px; padding: 10px 16px;
  overflow-x: auto; border-top: 1px solid var(--border);
}
.solvy-suggestions::-webkit-scrollbar { height: 0; }
.solvy-chip {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 16px; padding: 6px 12px;
  font-size: 12px; white-space: nowrap; cursor: pointer;
  color: var(--text-secondary); font-weight: 500;
}
.solvy-chip:hover { border-color: var(--primary); color: var(--primary); }
.solvy-input { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.solvy-input input {
  flex: 1; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 12px; font-size: 13.5px; font-family: inherit; color: var(--text);
}
.solvy-input input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 12%, transparent);
}
.solvy-input button {
  background: var(--primary); border: 0; color: #fff;
  width: 36px; height: 36px; border-radius: var(--radius);
  cursor: pointer; font-size: 15px;
}
.solvy-input button:hover { background: var(--primary-hover); }

/* ========== Responsivo ========== */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .shell.sidebar-open .sidebar {
    display: block; position: fixed; inset: 0 auto 0 0;
    width: 268px; z-index: 60; box-shadow: var(--shadow-lg);
  }
  .mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px 56px; }
  .scope-pill .label { display: none; }
}

/* ========== Faixa de destaque (padrão do app: primária → violeta) ========== */
.hero-banner {
  background: var(--gradient-hero);
  border-radius: var(--radius-xl);
  padding: 28px;
  color: #fff;
  margin-bottom: 24px;
}
.hero-banner h2 { color: #fff; font-size: 22px; margin-bottom: 6px; }
.hero-banner p { color: rgba(255, 255, 255, .88); margin: 0 0 18px; font-size: 14px; }
.hero-banner .hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 12px; }
.hero-banner .hero-stat {
  background: rgba(255, 255, 255, .16);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
}
.hero-banner .hero-stat .n { font-size: 22px; font-weight: 800; line-height: 1; }
.hero-banner .hero-stat .t { font-size: 12px; color: rgba(255, 255, 255, .85); }

/* Ícone de cabeçalho de página — quadrado com o gradiente da marca */
.page-icon {
  width: 44px; height: 44px; border-radius: var(--radius-lg);
  background: var(--gradient-hero);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; flex: none;
}

/* ========== Barra de ações (canto superior direito) ========== */
.topbar-right { display: flex; align-items: center; gap: 18px; }
.action-bar { display: flex; align-items: center; gap: 8px; }
.action-bar .action-icon {
  position: relative;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  background: transparent; border: 0;
  transition: background .15s, color .15s;
}
.action-bar .action-icon:hover { background: var(--hover); color: var(--primary); }
.action-bar .action-icon .dot {
  position: absolute; top: 4px; right: 4px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--error);
  border: 1.5px solid var(--bg);
}
.action-bar .sep { width: 1px; height: 20px; background: var(--border); }
.topbar .user { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 13.5px; }

/* ========== Rodapé da sidebar ========== */
.sidebar { display: flex; flex-direction: column; }
.sidebar nav { flex: 1; }
.sidebar-footer {
  padding: 12px 12px 8px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
  margin-top: auto;
}
.sidebar-footer a {
  display: flex; align-items: center; gap: 10px;
  min-height: 42px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s;
}
.sidebar-footer a:hover { background: var(--hover); color: var(--text); }
.sidebar-footer .avatar-mini {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex: none;
}
.sidebar-footer .brand-foot {
  display: flex; flex-direction: column; align-items: center;
  gap: 1px; padding: 10px 0 2px;
}
.sidebar-footer .brand-foot .mark {
  font-weight: 800; font-size: 18px; color: var(--text-muted); letter-spacing: -.03em;
}
.sidebar-footer .brand-foot .ver { font-size: 12px; color: rgba(0, 0, 0, .25); }

.shell.sidebar-collapsed .sidebar-footer a { justify-content: center; padding: 10px 0; font-size: 0; }
.shell.sidebar-collapsed .sidebar-footer a i { font-size: 16px; }
.shell.sidebar-collapsed .sidebar-footer .brand-foot .ver,
.shell.sidebar-collapsed .sidebar-footer a span { display: none; }

/* ========== Logo ========== */
.brand-logo { width: 99px; height: auto; display: block; }
.brand-logo-foot { width: 60px; height: auto; display: block; opacity: .38; }
.shell.sidebar-collapsed .brand-logo { width: 40px; object-fit: cover; object-position: left; }
.shell.sidebar-collapsed .brand-logo-foot { display: none; }

/* ============================================================
   Início — busca conversacional
   A pergunta vem antes do menu: o usuário diz o que procura e o
   sistema responde com o que existe no ecossistema.
   ============================================================ */
.content.ask { max-width: 1120px; margin-inline: auto; }

.ask-hero {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: clamp(44px, 9vh, 104px) 0 8px;
}
.ask-mark {
  width: 60px; height: 60px; border-radius: var(--radius-lg);
  background: var(--gradient-hero);
  display: grid; place-items: center;
  color: #fff; font-size: 27px;
  margin-bottom: 24px;
}
.ask-title {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.12;
  max-width: 20ch;
  margin-bottom: 22px;
}
.ask-title em {
  font-style: normal;
  background: var(--gradient-hero);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.eco-scale {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  justify-content: center;
  font-size: 14.5px; color: var(--text-secondary);
  margin-bottom: 34px;
}
.eco-scale b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.eco-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--border-strong); }

.ask-box {
  display: flex; align-items: center; gap: 10px;
  width: 100%; max-width: 820px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 10px 10px 10px 22px;
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.ask-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent), var(--shadow);
}
.ask-box .ask-icon { color: var(--text-muted); font-size: 17px; flex: none; }
.ask-box input {
  flex: 1; border: 0; outline: none; background: transparent;
  font-family: inherit; font-size: 17px; color: var(--text);
  padding: 10px 0;
}
.ask-box input::placeholder { color: var(--text-muted); }
.ask-send {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: #fff;
  border: 0; cursor: pointer; flex: none;
  display: grid; place-items: center; font-size: 17px;
  transition: background .15s;
}
.ask-send:hover { background: var(--primary-hover); }
.ask-box.docked { max-width: 100%; margin-top: 22px; box-shadow: none; }

.ask-chips {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  margin-top: 18px;
}
.ask-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; padding: 7px 15px;
  font-family: inherit; font-size: 13px; font-weight: 500;
  color: var(--text-secondary); cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.ask-chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.ask-chip i { font-size: 14px; }
.ask-chip.sm { padding: 5px 12px; font-size: 12.5px; }

.ask-footnote {
  margin-top: 26px; font-size: 12.5px; color: var(--text-muted);
  max-width: 62ch;
}

/* --- resposta --- */
[hidden] { display: none !important; }
.ask-thread { padding: 24px 0 8px; display: flex; flex-direction: column; gap: 20px; }
.ask-turn { display: flex; gap: 12px; }
.ask-turn.user { justify-content: flex-end; }
.ask-turn.user .bubble {
  background: var(--primary); color: #fff;
  padding: 11px 16px; border-radius: 16px 16px 4px 16px;
  font-size: 14.5px; max-width: 72%;
}
.ask-turn.bot .bot-avatar {
  width: 34px; height: 34px; border-radius: var(--radius);
  background: var(--gradient-hero); color: #fff;
  display: grid; place-items: center; font-size: 16px; flex: none;
}
.ask-turn.bot .bot-body { flex: 1; min-width: 0; }
.ask-turn.bot .bot-body > p { font-size: 15px; margin-bottom: 16px; }

.answer-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(272px, 100%), 1fr));
  gap: 12px;
}
.answer-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: var(--shadow-sm);
}
.answer-card .ac-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.answer-card h4 { font-size: 15.5px; }
.answer-card > p.muted { margin-top: -4px; }
.ac-proof {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  font-size: 12.5px; color: var(--text-secondary);
  line-height: 1.5;
}
.ac-proof i { color: var(--success-text); font-size: 14px; margin-right: 5px; vertical-align: -1px; }
.ac-proof strong { color: var(--text); }
.ac-actions { display: flex; gap: 8px; margin-top: 2px; }

.answer-next {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 16px;
}
.answer-trace {
  margin-top: 14px; font-size: 12px; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.answer-trace i { font-size: 13px; }

/* --- resumo discreto --- */
.ask-glance {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(168px, 100%), 1fr));
  gap: 14px; margin-top: 52px;
  padding-top: 24px; border-top: 1px solid var(--border);
}
.glance {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 15px 17px;
  color: var(--text); transition: border-color .15s, transform .15s;
}
.glance:hover { border-color: var(--primary); transform: translateY(-1px); color: var(--text); }
.glance .g-n { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.glance .g-t { font-size: 12.5px; color: var(--text-muted); }

/* ========== Seletor de papel (só no protótipo) ========== */
.role-switch {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 5px;
  background: var(--bg);
}
.role-switch label {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-muted); font-weight: 700;
}
.role-switch select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--text); background: var(--bg-secondary);
  cursor: pointer;
}
.role-switch select:focus { outline: none; border-color: var(--primary); }
.shell.sidebar-collapsed .role-switch { display: none; }

/* Aviso quando o papel escolhido não alcança a tela */
.role-block {
  max-width: 560px; margin: 80px auto; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg); padding: 36px 32px;
}
.role-block i { font-size: 30px; color: var(--text-muted); }
.role-block h3 { margin: 14px 0 8px; font-size: 18px; }
.role-block p { color: var(--text-secondary); font-size: 14.5px; }

/* ========== Etapa com progresso dentro da tabela ========== */
.stage-mini { display: flex; flex-direction: column; gap: 5px; min-width: 118px; }
.stage-mini span { font-size: 12.5px; font-weight: 600; color: var(--text); }
.mini-bar { height: 4px; border-radius: 99px; background: var(--bg-tertiary); overflow: hidden; }
.mini-bar div { height: 100%; background: var(--primary); border-radius: 99px; }

/* ========== Abas de tela (padrão do app) ========== */
.page-tabs {
  display: flex; gap: 26px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.page-tab {
  background: none; border: 0; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 500;
  color: var(--text-secondary);
  padding: 10px 0 11px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.page-tab:hover { color: var(--text); }
.page-tab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }

/* ========== Grupos por etapa (aba Iniciativas) ========== */
.stage-group {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin-bottom: 12px;
  overflow: hidden;
}
.stage-group summary {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; cursor: pointer; list-style: none;
}
.stage-group summary::-webkit-details-marker { display: none; }
.stage-group summary:hover { background: var(--bg-secondary); }
.stage-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; flex: none;
}
.stage-name { font-size: 15px; font-weight: 600; }
.stage-table { overflow-x: auto; border-top: 1px solid var(--border); }
.stage-table table { min-width: 860px; }
.stage-table th { background: var(--bg-secondary); }

/* ========== Gráficos em CSS ========== */
.bar-chart { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 116px 1fr 28px; gap: 10px; align-items: center; }
.bar-label { font-size: 12.5px; color: var(--text-secondary); }
.bar-track { height: 20px; background: var(--bg-tertiary); border-radius: var(--radius-sm); overflow: hidden; }
.bar-fill { height: 100%; background: var(--primary); border-radius: var(--radius-sm); }
.bar-fill.done { background: var(--success-text); }
.bar-val { font-size: 13px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

.risk-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-secondary); margin-bottom: 10px; }
.risk-legend .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.risk-legend .dot.ok { background: var(--success-text); }
.risk-legend .dot.warn { background: var(--warning); }
.risk-legend .dot.bad { background: var(--error); }
.risk-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--bg-tertiary); }
.risk-bar .seg.ok { background: var(--success-text); }
.risk-bar .seg.warn { background: var(--warning); }
.risk-bar .seg.bad { background: var(--error); }

.gantt { font-size: 12px; }
.gantt-head { display: grid; grid-template-columns: 172px repeat(12, 1fr); color: var(--text-muted); margin-bottom: 8px; }
.gantt-head span { text-align: center; }
.gantt-row { display: grid; grid-template-columns: 172px 1fr; align-items: center; gap: 10px; margin-bottom: 8px; }
.g-name { font-size: 12.5px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-track { position: relative; height: 18px; background: var(--bg-tertiary); border-radius: var(--radius-sm); }
.g-bar { position: absolute; top: 0; height: 100%; background: var(--primary); border-radius: var(--radius-sm); }
.g-bar.late { background: var(--error); }

/* ========== Callout e linhas de configuração ========== */
.callout-info {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--bg); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); padding: 14px 18px; margin-bottom: 16px;
}
.callout-info i { font-size: 18px; color: var(--text-secondary); margin-top: 1px; }
.callout-info strong { font-size: 14.5px; }
.callout-info p { font-size: 13.5px; color: var(--text-secondary); margin-top: 2px; }

.setting-link {
  display: flex; align-items: center; gap: 16px; justify-content: space-between;
  background: var(--bg-secondary); border: 1px solid transparent;
  border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 10px;
  color: var(--text); transition: border-color .15s, background .15s;
}
.setting-link:hover { border-color: var(--primary); background: var(--bg); color: var(--text); }
.setting-link strong { font-size: 14.5px; }
.setting-link p { font-size: 13px; color: var(--text-secondary); margin-top: 3px; max-width: 84ch; }
.setting-link i { font-size: 18px; color: var(--text-muted); flex: none; }

/* ========== Cursos ========== */
.course-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(268px, 100%), 1fr)); gap: 16px;
}
.course-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.course-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.course-cover {
  height: 104px; display: grid; place-items: center; position: relative;
}
.course-cover > span:not(.course-badge) { font-size: 38px; }
.course-cover.c1 { background: linear-gradient(135deg, #8544c8, #2e1065); }
.course-cover.c2 { background: linear-gradient(135deg, #0f766e, #134e4a); }
.course-cover.c3 { background: linear-gradient(135deg, #2563eb, #1e3a8a); }
.course-cover.c4 { background: linear-gradient(135deg, #b45309, #451a03); }
.course-cover.c5 { background: linear-gradient(135deg, #db2777, #500724); }
.course-cover.c6 { background: linear-gradient(135deg, #0891b2, #134e4a); }
.course-cover.c7 { background: linear-gradient(135deg, #525252, #1f1f1f); }
.course-cover.c8 { background: linear-gradient(135deg, #16a34a, #14532d); }
.course-cover .course-badge, .course-badge {
  position: absolute; top: 10px; right: 10px;
  font-size: 10px; line-height: 1.6;
  background: var(--warning); color: #4a3208;
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 99px; text-transform: uppercase;
}
.course-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.course-body h4 { font-size: 15px; line-height: 1.3; }
.course-body > p.muted { margin-top: -3px; }
.course-meta { display: flex; gap: 14px; font-size: 12px; color: var(--text-muted); }
.course-meta i { margin-right: 3px; }
.course-link {
  font-size: 11.5px; color: var(--primary-hover);
  background: var(--primary-bg); border-radius: var(--radius-sm);
  padding: 6px 9px; line-height: 1.4;
}
.course-progress { display: flex; flex-direction: column; gap: 4px; margin-top: 2px; }
.course-progress span { font-size: 11.5px; color: var(--text-muted); }
.course-foot { padding: 0 16px 14px; }
.course-foot .btn { width: 100%; justify-content: center; }

.tab-count {
  background: var(--primary); color: #fff;
  font-size: 10.5px; font-weight: 700;
  padding: 1px 7px; border-radius: 99px; margin-left: 5px;
  vertical-align: 1px;
}

/* ========== Inscrição ========== */
.crumb { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.crumb a { color: var(--text-secondary); }
.crumb a:hover { color: var(--primary); }

.apply-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }

/* assistente */
.assist {
  display: flex; gap: 14px; position: relative;
  background: var(--primary-bg);
  border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent);
  border-radius: var(--radius-lg); padding: 20px 22px; margin-bottom: 20px;
}
.assist.compact { padding: 18px 22px; }
.assist-avatar {
  width: 36px; height: 36px; border-radius: var(--radius); flex: none;
  background: var(--gradient-hero); color: #fff;
  display: grid; place-items: center; font-size: 17px;
}
.assist-body { flex: 1; min-width: 0; }
.assist-body h3 { font-size: 16.5px; }
.assist-body > p { font-size: 14px; color: var(--text-secondary); margin-top: 5px; max-width: 76ch; }
.assist-close {
  position: absolute; top: 12px; right: 12px;
  background: none; border: 0; cursor: pointer; color: var(--text-muted);
  font-size: 17px; width: 26px; height: 26px; border-radius: var(--radius-sm);
}
.assist-close:hover { background: var(--hover); color: var(--text); }

.assist-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(212px, 100%), 1fr)); gap: 10px; margin-top: 14px; }
.assist-opt {
  position: relative; text-align: left; cursor: pointer;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; font-family: inherit;
  display: flex; flex-direction: column; gap: 4px;
  transition: border-color .15s, transform .15s;
}
.assist-opt:hover { border-color: var(--primary); transform: translateY(-1px); }
.assist-opt.recommended { border-color: var(--primary); }
.assist-opt > i { font-size: 18px; color: var(--primary); margin-bottom: 2px; }
.ao-title { font-size: 14px; font-weight: 650; color: var(--text); }
.ao-sub { font-size: 12.5px; color: var(--text-muted); line-height: 1.4; }
.ao-flag {
  position: absolute; top: 10px; right: 10px;
  background: var(--primary); color: #fff;
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 2px 7px; border-radius: 99px;
}

.pick-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.pick {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; cursor: pointer; font-family: inherit; text-align: left;
  transition: border-color .15s;
}
.pick:hover { border-color: var(--primary); }
.pick-main { display: flex; flex-direction: column; gap: 2px; }
.pick-main strong { font-size: 14px; }
.pick-main .muted { font-size: 12px; }

/* layout do formulário */
.apply-grid { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
@media (max-width: 980px) { .apply-grid { grid-template-columns: 1fr; } }
.apply-form h3 { font-size: 15.5px; }
.apply-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 56px; }

.filled-note, .dup-warn {
  display: flex; gap: 10px; align-items: flex-start;
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 18px;
  font-size: 13.5px; line-height: 1.5;
}
.filled-note { background: var(--primary-bg); color: var(--ink-2); }
.filled-note i { color: var(--primary); font-size: 16px; margin-top: 1px; }
.filled-note em { font-style: normal; font-weight: 650; }
.dup-warn { background: var(--warning-bg); margin: 18px 0 0; }
.dup-warn i { color: var(--warning-text); font-size: 17px; margin-top: 1px; }
.dup-warn p { font-size: 13px; color: var(--text-secondary); margin-top: 3px; }

/* campos preenchidos pela IA e campos exclusivos da chamada */
.field.filled input, .field.filled textarea {
  background: color-mix(in srgb, var(--primary) 5%, #fff);
  border-color: color-mix(in srgb, var(--primary) 32%, transparent);
}
.field.filled label::after {
  content: "preenchido do catálogo";
  margin-left: 8px; font-size: 10px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--primary); background: var(--primary-bg);
  padding: 2px 7px; border-radius: 99px;
}
.field .req {
  margin-left: 8px; font-size: 10px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--warning-text); background: var(--warning-bg);
  padding: 2px 7px; border-radius: 99px;
}
.apply-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }

.check-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.check-list li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-secondary); }
.check-list li i { color: var(--border-strong); font-size: 15px; }
.check-list li.done { color: var(--text); }
.check-list li.done i { color: var(--success-text); }

.crit-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.crit-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; }

/* ========== Aula ========== */
.course-layout { display: grid; grid-template-columns: 1fr 336px; gap: 20px; align-items: start; }
@media (max-width: 1040px) { .course-layout { grid-template-columns: 1fr; } }

.player {
  background: linear-gradient(135deg, #241a2e, #0d0a12);
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 9;
  display: grid; place-items: center;
  position: relative; overflow: hidden;
}
.player-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.play-btn {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255,255,255,.14); border: 1.5px solid rgba(255,255,255,.5);
  color: #fff; font-size: 30px; cursor: pointer;
  display: grid; place-items: center;
  transition: background .15s, transform .15s;
}
.play-btn:hover { background: rgba(255,255,255,.24); transform: scale(1.05); }
.player-cap { color: rgba(255,255,255,.66); font-size: 12.5px; }

.lesson-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 18px; }
.lesson-head h1 { font-size: 24px; margin-top: 8px; }

.bullet { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; color: var(--text-secondary); font-size: 14.5px; }
.reply { margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--border); font-size: 13.5px; }

/* índice */
.course-index {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  position: sticky; top: 56px;
  max-height: calc(100vh - 76px); overflow-y: auto;
}
.idx-head { padding: 18px; border-bottom: 1px solid var(--border); }
.idx-head h3 { font-size: 15.5px; }
.idx-head p { font-size: 12.5px; }
.idx-flag {
  margin-top: 12px; font-size: 12px; font-weight: 600;
  background: var(--warning-bg); color: var(--warning-text);
  padding: 6px 10px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; gap: 6px;
}

.module { border-bottom: 1px solid var(--border); }
.module:last-child { border-bottom: none; }
.module > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 18px; cursor: pointer; list-style: none;
  font-size: 13.5px; font-weight: 650;
}
.module > summary::-webkit-details-marker { display: none; }
.module > summary:hover { background: var(--bg-secondary); }
.m-count { font-size: 11.5px; font-weight: 600; color: var(--text-muted); flex: none; }

.lesson {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 18px 10px 20px;
  color: var(--text-secondary); font-size: 13px;
  border-left: 2px solid transparent;
}
.lesson:hover { background: var(--bg-secondary); color: var(--text); }
.lesson > i { font-size: 16px; flex: none; margin-top: 1px; color: var(--text-muted); }
.l-txt { display: flex; flex-direction: column; gap: 2px; }
.l-name { line-height: 1.35; }
.l-dur { font-size: 11.5px; color: var(--text-muted); }
.lesson.done > i { color: var(--success-text); }
.lesson.done .l-name { color: var(--text-muted); }
.lesson.current {
  background: var(--primary-bg);
  border-left-color: var(--primary);
  color: var(--text);
}
.lesson.current > i { color: var(--primary); }
.lesson.current .l-name { font-weight: 650; }

/* ========== Feed ========== */
/* mesmo enquadramento da tela inicial: o conteúdo fica centrado na página */
.content.feed-view { max-width: 1040px; margin-inline: auto; }
.feed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .feed-layout { grid-template-columns: 1fr; } }
.feed-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.feed-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 56px; }

.composer {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 16px;
}
.composer-input {
  flex: 1; text-align: left; cursor: pointer;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 999px; padding: 10px 16px;
  font-family: inherit; font-size: 13.5px; color: var(--text-muted);
}
.composer-input:hover { border-color: var(--primary); color: var(--text-secondary); }

.feed-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.feed-filters .ask-chip.active { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }

.post {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.post-head { display: flex; align-items: center; gap: 10px; }
.post-who { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.post-who strong { font-size: 14px; }
.post-who .muted { font-size: 12px; }
.post-body { font-size: 14.5px; color: var(--ink-2); line-height: 1.55; }
.post-body strong { color: var(--text); }

.avatar.av-brand  { background: var(--primary); }
.avatar.av-supply { background: var(--supply, #17654F); }
.avatar.av-demand { background: var(--demand, #7A3E86); }

.post-card {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px 15px;
}
.pc-icon {
  width: 34px; height: 34px; border-radius: var(--radius-sm); flex: none;
  background: var(--bg); border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--primary); font-size: 17px;
}
.pc-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pc-txt strong { font-size: 14px; }
.pc-txt .muted { font-size: 12.5px; }
.pc-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: var(--text-muted); }
.pc-meta i { margin-right: 3px; }

.post-foot { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--border); padding-top: 11px; }
.post-act {
  background: none; border: 0; cursor: pointer;
  font-family: inherit; font-size: 13px; color: var(--text-muted);
  padding: 6px 10px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; gap: 6px;
}
.post-act:hover { background: var(--hover); color: var(--primary); }
.post-act i { font-size: 15px; }

.feed-end { text-align: center; font-size: 13px; color: var(--text-muted); padding: 18px 0 4px; }

.side-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.side-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm); color: var(--text); font-size: 13.5px;
}
.side-list a:hover { background: var(--bg-secondary); color: var(--text); }
.side-list.orgs a { justify-content: flex-start; }
.so-txt { display: flex; flex-direction: column; line-height: 1.3; }
.so-txt .muted { font-size: 11.5px; }
.side-course strong { font-size: 14px; }
.side-course .muted { font-size: 12px; }

/* ========== Funil ========== */
.funnel { display: flex; flex-direction: column; gap: 10px; }
.fn-step { display: grid; grid-template-columns: 154px 1fr 42px; gap: 10px; align-items: center; }
.fn-lbl { font-size: 12.5px; color: var(--text-secondary); }
.fn-bar {
  height: 26px; border-radius: var(--radius-sm);
  background: var(--primary); min-width: 44px;
  display: flex; align-items: center; padding-left: 10px;
}
.fn-bar.done { background: var(--success-text); }
.fn-bar span { color: #fff; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fn-pct { font-size: 12px; color: var(--text-muted); text-align: right; font-variant-numeric: tabular-nums; }

/* ============================================================
   Visualização de dados
   Paleta categórica validada (CVD all-pairs ΔE 9.2; normal 24.0).
   O aqua fica abaixo de 3:1 sobre branco — por isso as bolhas
   levam rótulo direto, que é o alívio exigido.
   ============================================================ */
.viz-root {
  --s1: #2a78d6;   /* Technology */
  --s2: #eb6834;   /* Pessoas    */
  --s3: #1baf7a;   /* AI         */
  --surface: var(--bg);
}
.viz { width: 100%; height: auto; display: block; }
.viz-scroll { overflow-x: auto; }
.viz-scroll .viz { min-width: 560px; }
.viz-axis { stroke: var(--border-strong); stroke-width: 1; }
.viz-grid { stroke: var(--border); stroke-width: 1; }
.viz-ref  { stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 4 4; }
.viz-reflbl { font-size: 10px; fill: var(--text-muted); font-family: var(--sans); }
.viz-tick { font-size: 10.5px; fill: var(--text-muted); font-family: var(--sans); }
.viz-lbl  { font-size: 11px; fill: var(--text-secondary); font-family: var(--sans); }
.viz-lbl.strong { fill: var(--text); font-weight: 700; font-size: 12.5px; }
.viz circle { transition: fill-opacity .15s; }
.viz circle:hover { fill-opacity: 1; }

.viz-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-secondary); }
.viz-legend .lg { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 5px; }

/* escala ordinal: uma hue, mais escura à frente */
.bar-chart.ordinal .bar-fill.o1 { background: color-mix(in srgb, var(--primary) 26%, #fff); }
.bar-chart.ordinal .bar-fill.o2 { background: color-mix(in srgb, var(--primary) 38%, #fff); }
.bar-chart.ordinal .bar-fill.o3 { background: color-mix(in srgb, var(--primary) 50%, #fff); }
.bar-chart.ordinal .bar-fill.o4 { background: color-mix(in srgb, var(--primary) 64%, #fff); }
.bar-chart.ordinal .bar-fill.o5 { background: color-mix(in srgb, var(--primary) 78%, #fff); }
.bar-chart.ordinal .bar-fill.o6 { background: color-mix(in srgb, var(--primary) 90%, #fff); }
.bar-chart.ordinal .bar-fill.o7 { background: var(--primary); }

/* número que o painel lidera */
.hero-kpi {
  display: grid; grid-template-columns: minmax(min(280px, 100%), 1fr) auto; gap: 24px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px 28px;
  align-items: center;
}
@media (max-width: 860px) { .hero-kpi { grid-template-columns: 1fr; } }
.hk-main { display: flex; flex-direction: column; gap: 3px; }
.hk-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--text-muted); font-weight: 700;
}
.hk-value {
  font-size: 58px; font-weight: 800; letter-spacing: -.04em; line-height: 1;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.hk-unit { font-size: 30px; color: var(--primary); margin-left: 2px; }
.hk-sub { font-size: 14px; color: var(--text-secondary); margin-top: 6px; }
.hk-side { display: grid; grid-template-columns: repeat(2, minmax(min(112px, 100%), 1fr)); gap: 1px; background: var(--border); border-radius: var(--radius); overflow: hidden; }
.hk-stat { background: var(--bg); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.hks-n { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hks-t { font-size: 11.5px; color: var(--text-muted); line-height: 1.3; }
.hk-stat.warn .hks-n { color: var(--warning-text); }

/* ========== Mídia no feed ========== */
.media { border-radius: var(--radius); overflow: hidden; position: relative; }

.media-gallery { display: grid; gap: 4px; }
.media-gallery.g2 { grid-template-columns: 1fr 1fr; }
.media-gallery.g3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.media-gallery.g3 .a { grid-row: span 2; }
.media-gallery .ph {
  min-height: 108px; display: grid; place-items: center;
  color: rgba(255,255,255,.85); font-size: 26px;
}
.media-gallery.g3 .a { min-height: 220px; }
.media-gallery.g2 .ph { min-height: 168px; }
.ph.a { background: linear-gradient(135deg, #6d4b9c, #2e1a4a); }
.ph.b { background: linear-gradient(135deg, #b45309, #6b3410); }
.ph.c { background: linear-gradient(135deg, #1f2937, #0b1220); }
.ph.d { background: linear-gradient(135deg, #6b7280, #374151); }
.ph.e { background: linear-gradient(135deg, #0f766e, #134e4a); }
.ph .more { color: #fff; font-size: 19px; font-weight: 700; }
.ph-tag {
  position: absolute; bottom: 10px; left: 10px;
  background: rgba(0,0,0,.55); color: #fff;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 4px 9px; border-radius: 99px;
}

.media.video {
  background: linear-gradient(135deg, #241a2e, #0d0a12);
  aspect-ratio: 16 / 9; display: grid; place-items: center;
}
.media-play {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,.16); border: 1.5px solid rgba(255,255,255,.55);
  color: #fff; font-size: 26px; cursor: pointer;
  display: grid; place-items: center; transition: background .15s, transform .15s;
}
.media-play:hover { background: rgba(255,255,255,.28); transform: scale(1.06); }
.media-dur {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(0,0,0,.66); color: #fff;
  font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 5px;
}
.media-cap {
  position: absolute; bottom: 10px; left: 12px; right: 76px;
  color: rgba(255,255,255,.9); font-size: 12.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.media-doc {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.doc-icon {
  width: 42px; height: 42px; border-radius: var(--radius-sm); flex: none;
  background: var(--bg); border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--error-text); font-size: 21px;
}
.doc-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.doc-txt strong { font-size: 14px; }
.doc-txt .muted { font-size: 12.5px; }

/* imagens reais dentro da mídia do feed */
.media-gallery .media { display: block; background: var(--bg-tertiary); }
.media-gallery .media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-gallery.g3 .a { min-height: 220px; }
.media-gallery.g3 .b, .media-gallery.g3 .c { min-height: 108px; }
.media-gallery.g2 .media { min-height: 168px; }
.media-gallery .media.c { position: relative; }
.media-gallery .media.c .more {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(12,10,18,.55); color: #fff; font-size: 19px; font-weight: 700;
}

/* poster e player do vídeo */
.media.video { position: relative; }
.media.video .video-poster { width: 100%; height: 100%; object-fit: cover; display: block; }
.media.video .media-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.media.video .media-play:hover { transform: translate(-50%, -50%) scale(1.06); }
.media.video::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.1) 40%, rgba(0,0,0,.62));
  pointer-events: none;
}
.media.video .media-play, .media.video .media-dur, .media.video .media-cap { z-index: 1; }
.media.video iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ========== Perfil ========== */
.profile-head {
  display: flex; align-items: center; gap: 18px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px 24px; margin-bottom: 18px;
}
.profile-head .avatar.lg { width: 62px; height: 62px; font-size: 21px; }
.ph-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ph-txt h1 { font-size: 25px; }
.ph-link { font-size: 13px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }
.req-star { color: var(--error-text); }
.field select {
  width: 100%; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-family: inherit; font-size: 13.5px; color: var(--text); background: var(--bg);
}
.field select:focus { outline: none; border-color: var(--primary); }

/* vínculos */
.bond {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 10px;
}
.bond-txt { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bond-txt strong { font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bond-txt .muted { font-size: 13px; }
.bond-scope {
  font-size: 12.5px; color: var(--text-secondary);
  background: var(--bg-secondary); border-radius: var(--radius-sm);
  padding: 6px 10px; margin-top: 4px; display: inline-flex; align-items: center; gap: 6px;
}
.bond-scope i { color: var(--primary); font-size: 14px; }
.bond-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.bond-side .muted { font-size: 11.5px; }
.sidebar-footer a.active { background: color-mix(in srgb, var(--primary) 70%, transparent); color: #fff; font-weight: 600; }
.sidebar-footer a.active i { color: #fff; }

/* ========== Times ========== */
.team {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 12px;
}
.team-head { display: flex; align-items: center; gap: 14px; }
.team-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.team-txt strong { font-size: 15px; }
.team-txt .muted { font-size: 12.5px; }
.team-people {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border);
}
.person {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 12px 4px 4px;
  font-size: 13px; color: var(--text);
}
.person em { font-style: normal; font-size: 11.5px; color: var(--text-muted); }
.person.add {
  cursor: pointer; font-family: inherit; padding: 6px 13px;
  border-style: dashed; color: var(--text-secondary);
}
.person.add:hover { border-color: var(--primary); color: var(--primary); }
.team-foot {
  display: flex; gap: 18px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-muted);
}
.team-foot i { margin-right: 4px; }
.muted-team { background: var(--bg-secondary); }

/* ========== Suporte ========== */
.sup-hero {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 12px 0 28px;
}
.sup-mark {
  width: 48px; height: 48px; border-radius: var(--radius-lg);
  background: var(--gradient-hero); color: #fff;
  display: grid; place-items: center; font-size: 23px; margin-bottom: 16px;
}
.sup-hero h1 { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -.03em; }
.sup-sub { font-size: 14.5px; color: var(--text-secondary); margin: 8px 0 20px; max-width: 58ch; }

.sup-grid { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
@media (max-width: 980px) { .sup-grid { grid-template-columns: 1fr; } }
.sup-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 56px; }

.kb-list { display: flex; flex-direction: column; gap: 2px; }
.kb-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 12px; border-radius: var(--radius);
  color: var(--text); transition: background .15s;
}
.kb-item:hover { background: var(--bg-secondary); color: var(--text); }
.kb-item > i:first-child { font-size: 18px; color: var(--primary); flex: none; }
.kb-txt { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.kb-txt strong { font-size: 14px; font-weight: 600; }
.kb-txt .muted { font-size: 12px; }
.kb-go { color: var(--text-muted); font-size: 16px; flex: none; }

.chan {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; color: var(--text);
  border-bottom: 1px solid var(--border);
}
.chan:last-of-type { border-bottom: none; }
.chan:hover { color: var(--primary); }
.chan-ic {
  width: 34px; height: 34px; border-radius: var(--radius-sm); flex: none;
  background: var(--bg-secondary); display: grid; place-items: center;
  font-size: 17px; color: var(--text-secondary); position: relative;
}
.chan-ic.on::after {
  content: ""; position: absolute; top: -2px; right: -2px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--success-text); border: 2px solid var(--bg);
}
.chan-txt { display: flex; flex-direction: column; gap: 1px; }
.chan-txt strong { font-size: 14px; }
.chan-txt .muted { font-size: 12px; }

.tk-list { display: flex; flex-direction: column; gap: 10px; }
.ticket {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 15px 18px;
  color: var(--text); transition: border-color .15s;
}
.ticket:hover { border-color: var(--primary); color: var(--text); }
.tk-num {
  font-family: var(--mono); font-size: 12.5px; font-weight: 700;
  color: var(--text-muted); flex: none;
}
.tk-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tk-txt strong { font-size: 14.5px; }
.tk-txt .muted { font-size: 12.5px; }
.tk-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.tk-side .muted { font-size: 11.5px; }

.status-head {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: 16px;
}
.status-head > div { flex: 1; }
.status-head h3 { font-size: 16px; }
.st-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.st-dot.ok { background: var(--success-text); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success-text) 18%, transparent); }

/* card de curso dentro do feed */
.course-post {
  display: flex; gap: 0; overflow: hidden;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  transition: border-color .15s;
}
.course-post:hover { border-color: var(--primary); color: var(--text); }
.course-post img { width: 168px; height: auto; object-fit: cover; flex: none; align-self: stretch; }
.cp-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cp-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
.cp-body strong { font-size: 15px; }
.cp-body .muted { font-size: 12.5px; }
.cp-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: var(--text-muted); }
.cp-meta i { margin-right: 4px; }
@media (max-width: 560px) {
  .course-post { flex-direction: column; }
  .course-post img { width: 100%; height: 130px; }
}

/* ========== Post fixado ========== */
.post.pinned {
  position: relative;
  padding-top: 26px;
  border-color: color-mix(in srgb, var(--primary) 34%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 7%, transparent);
}
.pin-flag {
  position: absolute; top: -1px; left: 16px;
  background: var(--primary); color: #fff;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  display: inline-flex; align-items: center; gap: 5px;
}
.pin-flag i { font-size: 12px; }
.media.anniversary { display: block; background: #0b0b0d; border-radius: var(--radius); }
.media.anniversary img { width: 100%; height: auto; display: block; }

/* ========== Coluna lateral do feed ========== */
.side-me { padding-bottom: 0; overflow: hidden; }
.me-top { display: flex; align-items: center; gap: 12px; }
.me-top .avatar.lg { width: 46px; height: 46px; font-size: 16px; }
.me-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.me-txt strong { font-size: 15px; }
.me-txt .muted { font-size: 12px; }
.me-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--border); margin: 14px -20px 0;
}
.me-stats a {
  background: var(--bg); padding: 11px 6px; text-align: center;
  display: flex; flex-direction: column; gap: 1px; color: var(--text);
}
.me-stats a:hover { background: var(--bg-secondary); color: var(--text); }
.me-stats b { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.me-stats span { font-size: 10.5px; color: var(--text-muted); }

.todo {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 10px; margin: 0 -10px; border-radius: var(--radius);
  color: var(--text); transition: background .15s;
}
.todo:hover { background: var(--bg-secondary); color: var(--text); }
.todo-ic {
  width: 30px; height: 30px; border-radius: var(--radius-sm); flex: none;
  background: var(--bg-secondary); display: grid; place-items: center;
  color: var(--text-secondary); font-size: 15px;
}
.todo.urgent .todo-ic { background: var(--error-bg); color: var(--error-text); }
.todo-txt { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.todo-txt strong { font-size: 13.5px; }
.todo-txt .muted { font-size: 11.5px; }
.todo > i:last-child { color: var(--text-muted); font-size: 15px; }

.match-mini { display: flex; align-items: center; gap: 11px; padding: 9px 0; color: var(--text); }
.match-mini:hover { color: var(--text); }
.match-mini:hover .mm-txt strong { color: var(--primary); }
.mm-score {
  font-size: 12px; font-weight: 800; flex: none;
  background: var(--success-bg); color: var(--success-text);
  padding: 5px 8px; border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums;
}
.mm-score.mid { background: var(--warning-bg); color: var(--warning-text); }
.mm-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mm-txt strong { font-size: 13.5px; }
.mm-txt .muted { font-size: 11.5px; line-height: 1.35; }

.deadline { display: flex; align-items: center; gap: 12px; padding: 10px 0; color: var(--text); }
.deadline:hover { color: var(--text); }
.deadline:hover .dl-txt strong { color: var(--primary); }
.dl-txt { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dl-txt strong { font-size: 13.5px; }
.dl-bar { display: block; height: 3px; border-radius: 99px; background: var(--bg-tertiary); overflow: hidden; }
.dl-bar span { display: block; height: 100%; background: var(--primary); border-radius: 99px; }

.card.live { border-color: color-mix(in srgb, var(--success-text) 40%, transparent); }
.live-top {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--success-text); margin-bottom: 8px;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--success-text);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--success-text) 22%, transparent);
}

.org-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.org-row .so-txt { flex: 1; }
.side-more {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-secondary);
}
.side-more:hover { color: var(--primary); }
.course-badge.new { background: var(--primary); color: #fff; }
.featured-course { grid-column: span 2; }
@media (max-width: 720px) { .featured-course { grid-column: span 1; } }

/* ========== Alocação de avaliadores ========== */
.kpis-alloc { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi-f {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px 16px 14px 19px; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 2px; position: relative; overflow: hidden;
  font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
.kpi-f::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--border-strong); }
.kpi-f:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.kpi-f .v { font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-f .l { font-size: 12px; color: var(--text-secondary); line-height: 1.3; }
.kpi-f.crit::before { background: var(--error); } .kpi-f.crit .v { color: var(--error-text); }
.kpi-f.warn::before { background: var(--warning); } .kpi-f.warn .v { color: var(--warning-text); }
.kpi-f.ok::before   { background: var(--success-text); } .kpi-f.ok .v { color: var(--success-text); }
.kpi-f.acc::before  { background: var(--primary); } .kpi-f.acc .v { color: var(--primary); }

.cov-track { height: 8px; border-radius: 99px; background: var(--bg-tertiary); display: flex; overflow: hidden; }
.cov-track i { display: block; height: 100%; }
.cov-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--text-secondary); margin-top: 10px; }
.cov-legend > span > i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 6px; }

.cover-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; }
.cover-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }

.seg { display: inline-flex; background: var(--bg-tertiary); border-radius: 7px; padding: 3px; gap: 3px; }
.seg button {
  padding: 6px 14px; border-radius: 5px; font-size: 13px; font-family: inherit;
  color: var(--text-secondary); background: none; border: 0; cursor: pointer;
}
.seg button.on { background: var(--bg); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }

.tablewrap { overflow-x: auto; }
.tablewrap table { min-width: 820px; }
.c-check { width: 42px; }
.cb {
  width: 16px; height: 16px; border: 1.5px solid var(--border-strong); border-radius: 4px;
  display: inline-block; vertical-align: middle; background: var(--bg); cursor: pointer;
}
.cb:hover { border-color: var(--primary); }
.pname { font-weight: 600; line-height: 1.3; display: block; font-size: 13.5px; }
.psub { font-size: 11.5px; color: var(--text-muted); }
.cell-mid { font-size: 13px; color: var(--text-secondary); }

.avs { display: inline-flex; align-items: center; }
.avs b {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 10.5px; font-weight: 700; color: #fff; border: 2px solid var(--bg); margin-left: -8px;
}
.avs b:first-child { margin-left: 0; }
.avs em { font-style: normal; font-size: 12px; color: var(--text-secondary); margin-left: 9px; white-space: nowrap; }
.avs .none { font-size: 12px; color: var(--text-muted); font-style: italic; }

.bar { width: 84px; height: 6px; border-radius: 99px; background: var(--bg-tertiary); overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 8px; }
.bar i { display: block; height: 100%; background: var(--primary); }
.bar.ok i { background: var(--success-text); }
.bar.warn i { background: var(--warning); }
.progress { display: inline-flex; align-items: center; font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.progress.muted { color: var(--text-muted); }

.bulk-bar {
  position: fixed; left: 50%; bottom: 22px; z-index: 40;
  transform: translateX(-50%);
  background: var(--bg); border: 1px solid var(--primary); border-radius: 10px;
  box-shadow: var(--shadow-lg); padding: 12px 16px;
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  max-width: calc(100vw - 32px);
}
.bb-lbl { display: flex; flex-direction: column; }
.bb-lbl strong { font-size: 13.5px; }
.bb-lbl .muted { font-size: 11.5px; }

/* modelos de organização */
.alloc-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 12px; }
.alloc-mode {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px 18px; transition: border-color .15s, background .15s;
}
.alloc-mode:hover { border-color: var(--primary); }
.alloc-mode.on { border-color: var(--primary); background: var(--primary-bg); }
.alloc-mode input { display: none; }
.am-radio {
  width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--border-strong);
  flex: none; margin-top: 2px; position: relative; background: var(--bg);
}
.alloc-mode.on .am-radio { border-color: var(--primary); }
.alloc-mode.on .am-radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--primary); }
.am-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.am-top { display: flex; align-items: center; gap: 8px; }
.am-top i { color: var(--primary); font-size: 17px; }
.am-top strong { font-size: 14.5px; }
.am-desc { font-size: 13px; color: var(--ink-2); }
.am-how, .am-when { font-size: 12px; color: var(--text-muted); line-height: 1.45; }
.am-how b, .am-when b { color: var(--text-secondary); font-weight: 600; }

/* ========== Linha de configuração (global) ========== */
.setting-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--border); gap: 16px;
}
.setting-row:last-child { border-bottom: 0; }
.setting-row .info { flex: 1; min-width: 0; }
.setting-row .info strong { font-size: 14.5px; display: block; }
.setting-row .info p { font-size: 13px; color: var(--text-secondary); margin-top: 3px; max-width: 76ch; }
.setting-row .control { flex: none; display: flex; align-items: center; gap: 8px; }

.stepper { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.stepper .sbtn {
  width: 28px; height: 28px; border: 1px solid var(--border-strong); border-radius: 6px;
  display: grid; place-items: center; font-size: 15px; line-height: 1;
  background: var(--bg); cursor: pointer; font-family: inherit; color: var(--text);
}
.stepper .sbtn:hover { border-color: var(--primary); color: var(--primary); }
.stepper .val { font-family: var(--mono); min-width: 24px; text-align: center; font-size: 14px; font-weight: 600; }

.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; }
.switch input { display: none; }
.switch .slider {
  position: absolute; inset: 0; background: var(--border-strong);
  border-radius: 11px; cursor: pointer; transition: background .15s;
}
.switch .slider::before {
  content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .15s;
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(16px); }

/* ========== Alocação: drawer, modal, seleção ========== */
.chips-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; min-height: 26px; }
.chip-f {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-bg); color: var(--primary-hover);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  border-radius: 99px; padding: 3px 6px 3px 11px; font-size: 12px;
}
.chip-f button { width: 16px; height: 16px; border-radius: 50%; border: 0; background: none;
  cursor: pointer; font-size: 11px; color: var(--primary); display: grid; place-items: center; }
.chip-f button:hover { background: color-mix(in srgb, var(--primary) 22%, transparent); }
.chip-count { margin-left: auto; font-size: 12px; color: var(--text-muted); }

.cb.mixed { background: var(--primary); border-color: var(--primary); position: relative; }
.cb.mixed::after { content: ""; position: absolute; left: 3px; top: 6px; width: 8px; height: 2px; background: #fff; }
.cb.on { background: var(--primary); border-color: var(--primary); position: relative; }
.cb.on::after { content: ""; position: absolute; left: 4.5px; top: 1px; width: 4px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(42deg); }
.cb.off { opacity: .35; cursor: not-allowed; }
tbody tr { cursor: pointer; }
tbody tr.sel { background: var(--primary-bg); }
.vazio { padding: 48px 20px; text-align: center; color: var(--text-muted); font-size: 13px; }

.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: opacity .22s; z-index: 50; }
.scrim.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(470px, 100vw);
  background: var(--bg); z-index: 60; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; transform: translateX(101%);
  transition: transform .26s cubic-bezier(.2,.8,.3,1);
}
.drawer.show { transform: none; }
.modal-box {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-47%);
  width: min(580px, calc(100vw - 32px)); max-height: 88vh;
  background: var(--bg); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  z-index: 60; display: flex; flex-direction: column; opacity: 0; pointer-events: none; transition: .2s;
}
.modal-box.show { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%); }
.dh { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dh h3 { font-size: 16.5px; }
.dh p { font-size: 12.5px; color: var(--text-secondary); margin-top: 2px; }
.db { padding: 16px 20px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.df { padding: 13px 20px; border-top: 1px solid var(--border); background: var(--bg-secondary);
      display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; }

.quick { display: flex; gap: 7px; flex-wrap: wrap; }
.quick button {
  font-size: 12px; padding: 5px 12px; border-radius: 99px;
  border: 1px solid var(--border-strong); color: var(--text-secondary);
  background: var(--bg); cursor: pointer; font-family: inherit;
}
.quick button.on { background: var(--primary-bg); border-color: var(--primary); color: var(--primary); }

.picks { display: flex; flex-direction: column; gap: 8px; }
.pick {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); cursor: pointer; font-family: inherit; transition: .12s;
}
.pick:hover { border-color: var(--primary); background: var(--bg-secondary); }
.pick.on { border-color: var(--primary); background: var(--primary-bg); }
.pick .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pick .who b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick .who span { font-size: 11.5px; color: var(--text-secondary); }
.pick .delta { font-family: var(--mono); font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.pick.on .delta { color: var(--primary); font-weight: 700; }
.av-g { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
        font-size: 11px; font-weight: 700; color: #fff; flex: none; }

.resumo {
  border: 1px solid var(--border); background: var(--bg-secondary);
  border-radius: var(--radius); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 7px; font-size: 13px;
}
.resumo .r { display: flex; justify-content: space-between; gap: 14px; }
.resumo .r b { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.resumo .r.muted { color: var(--text-secondary); font-size: 12px; }
.resumo .r.total { border-top: 1px solid var(--border); padding-top: 8px; }
.resumo .r.total b { color: var(--primary); }

.hint {
  font-size: 12px; color: var(--text-secondary); background: var(--primary-bg);
  border-left: 3px solid var(--primary); padding: 10px 12px; border-radius: 0 6px 6px 0;
}
.sec-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); font-weight: 700; }

.linha-av { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.linha-av.off { opacity: .6; }
.linha-av .who b { display: block; font-size: 13.5px; font-weight: 600; }
.linha-av .who span { font-size: 11.5px; color: var(--text-secondary); }
.estado { font-size: 11px; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.estado.neutro { background: var(--bg-tertiary); color: var(--text-secondary); }
.estado.ok { background: var(--success-bg); color: var(--success-text); }
.estado.bad { background: var(--error-bg); color: var(--error-text); }

.opt {
  display: flex; gap: 11px; align-items: flex-start; padding: 12px;
  border: 1px solid var(--border); border-radius: var(--radius); width: 100%;
  text-align: left; background: var(--bg); cursor: pointer; font-family: inherit;
}
.opt.on { border-color: var(--primary); background: var(--primary-bg); }
.radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--border-strong);
         flex: none; margin-top: 2px; position: relative; background: var(--bg); }
.opt.on .radio { border-color: var(--primary); }
.opt.on .radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--primary); }
.opt b { display: block; font-size: 13.5px; font-weight: 600; }
.opt span span { font-size: 12px; color: var(--text-secondary); }

.preview {
  font-family: var(--mono); font-size: 11.5px; background: var(--bg-secondary);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 12px;
  overflow-x: auto; white-space: pre; color: var(--text-secondary);
}

.toast {
  position: fixed; bottom: 22px; left: 22px; z-index: 70;
  background: var(--neutral-900); color: var(--neutral-50);
  border-radius: var(--radius); padding: 12px 16px;
  display: flex; gap: 18px; align-items: center; font-size: 13px;
  box-shadow: var(--shadow-lg); max-width: calc(100vw - 44px);
}
.toast button { color: #fff; text-decoration: underline; font-size: 13px; font-weight: 600;
  background: none; border: 0; cursor: pointer; white-space: nowrap; font-family: inherit; }

/* ========== Kanban de etapas ========== */
.kb-board {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(min(268px, 100%), 1fr);
  gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start;
}
.kb-col {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px; display: flex; flex-direction: column; gap: 10px;
  min-width: 268px;
}
.kb-col.current { background: var(--primary-bg); border-color: color-mix(in srgb, var(--primary) 34%, transparent); }
.kb-col.done { opacity: .82; }
.kb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.kb-title { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.kb-title > i { font-size: 18px; color: var(--primary); flex: none; margin-top: 1px; }
.kb-title strong { font-size: 14.5px; display: block; line-height: 1.25; }
.kb-title .muted { font-size: 11.5px; }
.kb-gear {
  width: 28px; height: 28px; border-radius: var(--radius-sm); flex: none;
  display: grid; place-items: center; color: var(--text-secondary);
  border: 1px solid transparent; font-size: 16px;
}
.kb-gear:hover { background: var(--bg); border-color: var(--border); color: var(--primary); }
.kb-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kb-count { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
.kb-extra { font-size: 12px; color: var(--text-secondary); }
.kb-cards { display: flex; flex-direction: column; gap: 8px; }
.kb-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; color: var(--text);
  transition: border-color .15s, transform .15s;
}
.kb-card:hover { border-color: var(--primary); transform: translateY(-1px); color: var(--text); }
.kbc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.kbc-top strong { font-size: 13px; line-height: 1.3; }
.kb-card .muted { font-size: 11.5px; }
.kb-more, .kb-empty {
  font-size: 12px; color: var(--text-muted); text-align: center;
  padding: 10px; border: 1px dashed var(--border-strong); border-radius: var(--radius);
}

/* ========== Cursos: retomada e trilhas ========== */
.resume {
  display: grid; grid-template-columns: 210px 1fr auto; gap: 20px; align-items: center;
  background: var(--bg); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  border-radius: var(--radius-lg); padding: 16px; color: var(--text);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 6%, transparent);
  transition: border-color .15s, transform .15s;
}
.resume:hover { border-color: var(--primary); transform: translateY(-1px); color: var(--text); }
@media (max-width: 760px) { .resume { grid-template-columns: 1fr; } .resume .rs-cta { justify-self: start; } }
.rs-img { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/10; background: var(--bg-tertiary); }
.rs-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rs-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.rs-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--primary);
}
.rs-body h3 { font-size: 20px; }
.rs-body .muted { font-size: 13px; }
.rs-bar { height: 5px; border-radius: 99px; background: var(--bg-tertiary); overflow: hidden; margin-top: 6px; max-width: 420px; }
.rs-bar div { height: 100%; background: var(--primary); border-radius: 99px; }
.rs-meta { font-size: 12px; color: var(--text-muted); }
.rs-cta { white-space: nowrap; }

.track { margin-top: 26px; }
.track-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.track-head h3 { font-size: 17px; }
.track-head .muted { font-size: 13px; margin-top: 2px; }

/* capa com imagem real */
.course-cover { position: relative; overflow: hidden; background: var(--bg-tertiary); }
.course-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.course-cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,10,18,0) 45%, rgba(12,10,18,.45));
  pointer-events: none;
}
.course-badge { z-index: 1; }

/* ========== Agentes ========== */
.agent-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 14px; }
.agent {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 12px;
}
.agent.off { background: var(--bg-secondary); }
.agent.off .agent-ic { background: var(--bg-tertiary); color: var(--text-muted); }
.agent.off .rule-txt { color: var(--text-muted); }
.agent-head { display: flex; align-items: center; gap: 12px; }
.agent-ic {
  width: 36px; height: 36px; border-radius: var(--radius); flex: none;
  background: var(--primary-bg); color: var(--primary);
  display: grid; place-items: center; font-size: 18px;
}
.agent-txt { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.agent-txt strong { font-size: 15px; }
.agent-txt .muted { font-size: 11.5px; }

.agent-rule {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: stretch;
  background: var(--bg-secondary); border-radius: var(--radius); padding: 12px 14px;
}
@media (max-width: 520px) { .agent-rule { grid-template-columns: 1fr; } .rule-arrow { transform: rotate(90deg); justify-self: center; } }
.rule-part { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rule-lbl {
  font-size: 10px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-muted); font-weight: 700;
}
.rule-txt { font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.rule-txt b { color: var(--text); font-weight: 650; }
.rule-arrow { color: var(--text-muted); font-size: 16px; align-self: center; }

.agent-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 12px; color: var(--text-muted);
}
.agent-foot i { margin-right: 5px; color: var(--success-text); }

.did-list { display: flex; flex-direction: column; gap: 10px; }
.did {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 15px 18px;
}
.did-ic {
  width: 34px; height: 34px; border-radius: var(--radius); flex: none;
  background: var(--primary-bg); color: var(--primary);
  display: grid; place-items: center; font-size: 17px; margin-top: 1px;
}
.did-txt { flex: 1; min-width: 0; }
.did-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.did-top strong { font-size: 14px; }
.did-top .muted { font-size: 11.5px; }
.did-txt p { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; line-height: 1.5; }
.did-txt p b { color: var(--text); font-weight: 650; }
.did .btn { flex: none; margin-top: 2px; }

/* ========== Aprendizados (memória de fracasso) ========== */
.lessons-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 14px; }
.lesson-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px; display: flex; flex-direction: column; gap: 8px;
  border-top: 3px solid var(--warning);
}
.lc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lc-tag {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  background: var(--warning-bg); color: var(--warning-text);
  padding: 3px 9px; border-radius: 99px;
}
.lc-head .muted { font-size: 11.5px; }
.lesson-card h4 { font-size: 15.5px; line-height: 1.3; }
.lesson-card > p.muted { font-size: 12.5px; margin-top: -4px; }
.lc-why { background: var(--bg-secondary); border-radius: var(--radius); padding: 11px 13px; }
.lc-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .09em; color: var(--text-muted); font-weight: 700; }
.lc-why p { font-size: 13px; color: var(--ink-2); margin-top: 4px; line-height: 1.5; }
.lc-lesson {
  display: flex; gap: 9px; align-items: flex-start;
  background: var(--primary-bg); border-radius: var(--radius); padding: 11px 13px;
}
.lc-lesson i { color: var(--primary); font-size: 15px; margin-top: 1px; flex: none; }
.lc-lesson p { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.repeat {
  font-size: 12px; color: var(--error-text);
  display: flex; align-items: center; gap: 6px;
}
.kpi.good .value { color: var(--success-text); }

/* ========== Compositor de publicação social (feed) ========== */
.post-social { display: inline-flex; gap: 2px; }
.post-act.social i { font-size: 16px; }
.post-act.social.ig:hover { color: #c13584; background: color-mix(in srgb, #c13584 10%, transparent); }
.post-act.social.li:hover { color: #0a66c2; background: color-mix(in srgb, #0a66c2 12%, transparent); }

.sc-overlay {
  position: fixed; inset: 0; z-index: 80; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: color-mix(in srgb, var(--primary-600) 46%, transparent);
}
.sc-overlay.open { display: flex; }
.sc-modal {
  background: var(--bg); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: min(920px, 100%); max-height: calc(100vh - 48px);
  display: flex; flex-direction: column; overflow: hidden;
}
.sc-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.sc-head .sc-title { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.sc-head strong { font-size: 15px; }
.sc-head .muted { font-size: 12px; }
.sc-close { background: none; border: 0; cursor: pointer; font-size: 22px; line-height: 1;
  color: var(--text-muted); padding: 2px 6px; border-radius: var(--radius-sm); }
.sc-close:hover { background: var(--hover); color: var(--text); }

.sc-tabs { display: flex; gap: 6px; padding: 12px 18px 0; }
.sc-tab {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text-secondary);
  background: none; border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px;
}
.sc-tab i { font-size: 15px; }
.sc-tab:hover { background: var(--hover); }
.sc-tab.on.ig { color: #c13584; border-color: #c13584; background: color-mix(in srgb, #c13584 8%, transparent); }
.sc-tab.on.li { color: #0a66c2; border-color: #0a66c2; background: color-mix(in srgb, #0a66c2 9%, transparent); }

.sc-body { display: grid; grid-template-columns: 300px 1fr; gap: 20px; padding: 16px 18px; overflow-y: auto; }
.sc-col-lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--text-muted); font-weight: 700; margin-bottom: 8px; }

/* preview Instagram */
.ig-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.ig-bar { display: flex; align-items: center; gap: 8px; padding: 9px 10px; font-size: 12.5px; font-weight: 600; }
.ig-bar .avatar { width: 26px; height: 26px; font-size: 10px; }
.ig-shot { aspect-ratio: 1; background: var(--bg-secondary); position: relative; overflow: hidden; }
.ig-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-gen { width: 100%; height: 100%; padding: 22px; display: flex; flex-direction: column;
  justify-content: space-between; background: var(--gradient-hero); color: #fff; }
.ig-gen .g-kicker { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; opacity: .8; }
.ig-gen .g-txt { font-size: 17px; font-weight: 700; line-height: 1.3; }
.ig-gen .g-foot { font-size: 11.5px; opacity: .85; }
.ig-acts { display: flex; gap: 12px; padding: 9px 10px 4px; color: var(--text); font-size: 16px; }
.ig-cap { padding: 0 10px 11px; font-size: 12px; line-height: 1.45; color: var(--text-secondary);
  white-space: pre-wrap; word-break: break-word; }
.ig-cap b { color: var(--text); }

/* preview LinkedIn */
.li-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); overflow: hidden; }
.li-head { display: flex; gap: 9px; padding: 11px 11px 8px; align-items: flex-start; }
.li-head .avatar { width: 38px; height: 38px; font-size: 12px; }
.li-who strong { display: block; font-size: 13px; }
.li-who span { display: block; font-size: 11.5px; line-height: 1.35; color: var(--text-muted); }
.li-txt { padding: 0 11px 10px; font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.li-shot { aspect-ratio: 16/9; background: var(--bg-secondary); overflow: hidden; }
.li-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.li-link { border-top: 1px solid var(--border); padding: 9px 11px; background: var(--bg-secondary); }
.li-link strong { display: block; font-size: 12.5px; }
.li-link span { font-size: 11px; color: var(--text-muted); }
.li-acts { display: flex; border-top: 1px solid var(--border); }
.li-acts span { flex: 1; text-align: center; padding: 8px 0; font-size: 11.5px;
  color: var(--text-muted); font-weight: 600; }

/* formulário */
.sc-form { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sc-form label.sc-lbl { font-size: 12.5px; font-weight: 600; display: block; margin-bottom: 5px; }
.sc-form textarea {
  width: 100%; min-height: 190px; resize: vertical; font-family: inherit; font-size: 13px;
  line-height: 1.5; color: var(--text); padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg);
}
.sc-form textarea:focus { outline: 2px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 1px; }
.sc-meta { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--text-muted); }
.sc-meta .sc-regen { margin-left: auto; background: none; border: 0; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 600; color: var(--primary);
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 6px; border-radius: var(--radius-sm); }
.sc-meta .sc-regen:hover { background: var(--primary-bg); }
.sc-hash { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-hash button {
  font-family: inherit; font-size: 12px; cursor: pointer; padding: 5px 10px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text-secondary);
}
.sc-hash button.on { background: var(--primary-bg); border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  color: var(--primary-hover); font-weight: 600; }
.sc-opts { display: flex; flex-direction: column; gap: 8px; }
.sc-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-secondary); cursor: pointer; }
.sc-note { display: flex; gap: 8px; font-size: 12px; color: var(--text-secondary);
  background: var(--bg-secondary); border-radius: var(--radius); padding: 10px 12px; }
.sc-note i { color: var(--primary); font-size: 15px; flex-shrink: 0; }

.sc-foot { display: flex; align-items: center; gap: 10px; padding: 13px 18px;
  border-top: 1px solid var(--border); background: var(--bg-secondary); }
.sc-foot .sc-conta { font-size: 12px; color: var(--text-muted); flex: 1; }
.sc-foot .sc-conta i { margin-right: 4px; }

@media (max-width: 780px) {
  .sc-body { grid-template-columns: 1fr; }
}

/* ========== Perfil: redes conectadas ========== */
.net-row { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--border-soft); }
.net-row:last-of-type { border-bottom: 0; }
.net-icon { width: 40px; height: 40px; border-radius: var(--radius); display: grid; place-items: center;
  font-size: 21px; flex-shrink: 0; }
.net-icon.li { color: #0a66c2; background: color-mix(in srgb, #0a66c2 11%, transparent); }
.net-icon.ig { color: #c13584; background: color-mix(in srgb, #c13584 10%, transparent); }
.net-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.net-txt strong { font-size: 13.5px; }
.net-txt .net-state { font-size: 12.5px; }
.net-perm { font-size: 11.5px; color: var(--text-muted); }
.net-row.off .net-icon { color: var(--text-muted); background: var(--bg-secondary); }
.net-row.off .net-perm { display: none; }
.net-note { display: flex; gap: 9px; align-items: flex-start; margin-top: 14px;
  background: var(--bg-secondary); border-radius: var(--radius); padding: 11px 13px;
  font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.net-note i { color: var(--success); font-size: 15px; flex-shrink: 0; }

/* ========== Perfil: meu catálogo ========== */
.cat-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; margin: 16px 0 22px; }
.cat-kpi { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 2px; }
.cat-kpi strong { font-size: 21px; line-height: 1.15; }
.cat-kpi span { font-size: 11.5px; color: var(--text-muted); }

.cat-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 26px 0 12px; }
.cat-head h2 { margin: 0 0 2px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 14px; }

.cat-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 15px 16px; display: flex; flex-direction: column; gap: 9px;
  border-left: 3px solid var(--primary); }
.cat-card.desafio { border-left-color: var(--warning); }
.cat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cat-top strong { font-size: 14px; line-height: 1.35; }
.cat-selos { display: flex; gap: 5px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.cat-desc { font-size: 12.5px; line-height: 1.55; color: var(--text-secondary); margin: 0; }
.cat-meta { display: flex; gap: 5px; flex-wrap: wrap; }
.cat-foot { display: flex; align-items: center; gap: 14px; padding-top: 9px;
  border-top: 1px solid var(--border-soft); font-size: 11.5px; color: var(--text-muted); }
.cat-foot span { display: inline-flex; align-items: center; gap: 5px; }
.cat-foot i { font-size: 13px; }
.cat-acao { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--primary); }

.cx-par { font-size: 13px; padding: 3px 0; }
.cx-lado { display: inline-block; min-width: 128px; font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.cx-lado.desafio { color: var(--warning-text); }
.cx-lado.solucao { color: var(--primary); }
