/* Esteira de Conteúdo · visual Apple/Shopify, monocromático.
   Cinza claro de fundo, cartões brancos, preto como única cor de ação; cor só para erro e ações destrutivas.
   Fonte do sistema (SF Pro no Mac/iPhone). Tema escuro no padrão do iOS. */
:root {
  color-scheme: light;
  --bg: #f2f2f4;
  --surface: #ffffff;
  --surface-2: #f7f7f8;
  --sunken: #ebebee;
  --hover: #f0f0f2;
  --line: #e3e3e6;
  --line-strong: #d1d1d6;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --faint: #8e8e93;
  --track: #e5e5ea;
  --ink: #1d1d1f;        /* botão principal, seleção, destaque */
  --on-ink: #ffffff;
  --fill: rgba(120, 120, 128, .12);
  --fill-2: rgba(120, 120, 128, .08);
  --danger: #d70015; --danger-bg: #fff1f1; --danger-line: #f5c2c2;
  --shadow-1: 0 1px 0 rgba(0, 0, 0, .04), 0 1px 3px rgba(0, 0, 0, .06);
  --shadow-2: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .07);
  --shadow-3: 0 2px 8px rgba(0, 0, 0, .06), 0 24px 64px rgba(0, 0, 0, .16);
  --vidro: rgba(242, 242, 244, .78);
  --vidro-cartao: rgba(255, 255, 255, .78);
  --backdrop: rgba(0, 0, 0, .28);
  --avatar: linear-gradient(180deg, #a6a6ab, #85858a);
  --p-atencao: #1d1d1f; --p-autoridade: #8e8e93; --p-conexao: #c7c7cc;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  --raio: 14px; --raio-m: 12px; --raio-p: 9px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --lateral: 244px;
}
:root[data-tema="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #232325;
  --sunken: #111113;
  --hover: #2c2c2e;
  --line: #2c2c2e;
  --line-strong: #3a3a3c;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --faint: #8e8e93;
  --track: #3a3a3c;
  --ink: #f5f5f7;
  --on-ink: #000000;
  --fill: rgba(120, 120, 128, .24);
  --fill-2: rgba(120, 120, 128, .16);
  --danger: #ff453a; --danger-bg: #2a1212; --danger-line: #5a2020;
  --shadow-1: 0 0 0 1px rgba(255, 255, 255, .02);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, .4);
  --shadow-3: 0 24px 64px rgba(0, 0, 0, .6);
  --vidro: rgba(0, 0, 0, .72);
  --vidro-cartao: rgba(28, 28, 30, .78);
  --backdrop: rgba(0, 0, 0, .5);
  --avatar: linear-gradient(180deg, #6c6c70, #4a4a4e);
  --p-atencao: #f5f5f7; --p-autoridade: #98989d; --p-conexao: #545458;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html.trocando-tema * { transition: background-color .3s, border-color .3s, color .3s !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--sans); letter-spacing: -.008em; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); letter-spacing: -.022em; font-weight: 650; }
h3.secao { margin: 32px 2px 12px; font-size: 17px; }
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--text); }
small, .dica { color: var(--muted); }
.dica { margin: 4px 0 0; font-size: 13.5px; }
.dica.intro { margin: 0 0 20px; max-width: 720px; }
.ico { display: inline-flex; width: 18px; height: 18px; flex: 0 0 auto; }
.ico svg { width: 100%; height: 100%; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--ink) 25%, transparent); outline-offset: 2px; }
.sobretitulo { font-size: 13px; font-weight: 500; color: var(--muted); margin: 0 0 1px; }

/* ---------- controles ---------- */
input, select, textarea {
  font: inherit; font-size: 15px; color: var(--text); background: var(--surface); width: 100%;
  border: 1px solid var(--line-strong); border-radius: var(--raio-p); padding: 10px 12px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--fill); }
select { appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='14' viewBox='0 0 10 14'%3E%3Cpath d='M1.5 5l3.5-3.5L8.5 5M1.5 9l3.5 3.5L8.5 9' stroke='%238e8e93' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }

.btn, button {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap;
  border: 1px solid var(--line-strong); border-radius: var(--raio-p); padding: 8px 14px; min-height: 36px;
  background: var(--surface); box-shadow: var(--shadow-1); transition: transform .15s, background .15s, opacity .15s;
}
.btn svg, button svg { width: 16px; height: 16px; }
.btn:hover, button:hover { background: var(--surface-2); }
.btn:active, button:active { transform: scale(.97); }
/* Shopify: o principal é preto com um brilho sutil por cima */
.btn.primario, .btn.gradiente, .btn.ok {
  background: var(--ink); border-color: var(--ink); color: var(--on-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(0, 0, 0, .18);
}
.btn.primario:hover, .btn.gradiente:hover, .btn.ok:hover { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
.btn.escuro { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn.suave { background: var(--fill-2); border-color: transparent; box-shadow: none; }
.btn.suave:hover { background: var(--fill); }
.btn.perigo { color: var(--danger); }
.btn.perigo:hover { background: var(--danger-bg); border-color: var(--danger-line); }
.btn.grande { width: 100%; min-height: 46px; font-size: 15px; border-radius: 11px; }
.btn.mini { padding: 5px 10px; min-height: 30px; font-size: 13px; }
.btn.icone { width: 32px; padding: 0; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.cartao { background: var(--surface); border: 1px solid var(--line); border-radius: var(--raio); padding: 20px; box-shadow: var(--shadow-1); }
.linha { display: flex; gap: 10px; flex-wrap: wrap; }
.linha > * { flex: 1; min-width: 140px; }
.linha > button { flex: 0 0 auto; }
.formulario { display: flex; flex-direction: column; gap: 10px; }
.formulario h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.formulario h3 .ico { color: var(--muted); }
.formulario .btn { align-self: flex-start; }
.faixa { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.faixa b { font-family: var(--display); font-size: 16px; }
.faixa .dica { margin: 2px 0 0; }
.duas-colunas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
@media (min-width: 901px) and (max-width: 1280px) { .duas-colunas { grid-template-columns: 1fr 1fr; } .duas-colunas > :last-child { grid-column: 1 / -1; } }
.escolha-pilar { margin: 0; display: flex; }
.escolha-pilar button { flex: 1; }
.destaque-tendencia { background: var(--surface); }
.grade-cartoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }

.tag {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 550; line-height: 1.5; padding: 1px 8px;
  border-radius: 6px; background: var(--fill-2); color: var(--muted); white-space: nowrap;
}
.tag.ideia, .tag.pedir_roteiro, .tag.comando, .tag.pesquisar { background: var(--ink); color: var(--on-ink); }
.tag.erro { background: var(--danger-bg); color: var(--danger); }

.selo { font-size: 12px; font-weight: 550; padding: 3px 9px; border-radius: 99px; display: inline-flex; align-items: center; gap: 6px; background: var(--fill-2); color: var(--muted); }
.selo::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.selo.ativo { color: var(--text); }
.selo.ativo::before { animation: pulso 2s infinite; }

.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto; display: inline-grid; place-items: center;
  font-family: var(--display); font-weight: 600; font-size: 11.5px; letter-spacing: 0; color: #fff; background: var(--avatar);
}
.avatar.grande { width: 52px; height: 52px; font-size: 19px; }
.chip-expert { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 550; color: var(--muted); }
.chip-expert .avatar { width: 18px; height: 18px; font-size: 9px; }

/* ---------- entrada ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.login-fundo { display: none; }
.login-cartao {
  width: min(380px, 100%); padding: 34px 28px 26px; border-radius: 20px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2);
  display: flex; flex-direction: column; gap: 12px; animation: entra .45s var(--ease);
}
.login-icone { width: 64px; height: 64px; border-radius: 15px; margin: 0 auto 6px; box-shadow: var(--shadow-2); }
.login-cartao .eyebrow { font-size: 13px; color: var(--muted); font-weight: 500; }
.login-cartao h1 { font-size: 24px; }
.login-cartao p { margin: -4px 0 10px; color: var(--muted); font-size: 14px; }
.erro { color: var(--danger); min-height: 1.2em; margin: 0 !important; font-size: 13.5px; }

/* ---------- estrutura (lateral estilo Shopify) ---------- */
.lateral {
  position: fixed; inset: 0 auto 0 0; width: var(--lateral); padding: 18px 12px 14px; display: flex; flex-direction: column; gap: 14px;
  background: var(--sunken); border-right: 1px solid var(--line); z-index: 20; overflow-y: auto; scrollbar-width: none;
}
.lateral::-webkit-scrollbar { display: none; }
.marca { display: flex; align-items: center; gap: 10px; padding: 2px 8px 6px; }
.marca .marca-icone { width: 30px; height: 30px; border-radius: 8px; box-shadow: var(--shadow-1); }
.marca b { display: block; font-family: var(--display); font-size: 15px; letter-spacing: -.02em; line-height: 1.15; }
.marca small { display: block; font-size: 12px; }
.rotulo-lateral { font-size: 12px; font-weight: 600; color: var(--faint); margin: 6px 10px -8px; }
.menu { display: grid; gap: 1px; }
.menu button {
  justify-content: flex-start; gap: 10px; padding: 7px 10px; min-height: 0; border: 0; border-radius: 8px; box-shadow: none;
  background: transparent; color: var(--text); font-weight: 500; font-size: 14px;
}
.menu button svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--muted); }
.menu button:hover { background: var(--fill-2); }
.menu button.ativa { background: var(--surface); box-shadow: var(--shadow-1); font-weight: 600; }
.menu button.ativa svg { color: var(--text); }
.contador { margin-left: auto; font-size: 12px; font-weight: 600; min-width: 20px; padding: 0 6px; border-radius: 99px; text-align: center; background: var(--fill); color: var(--muted); }
.contador:empty { display: none; }
.contador.alerta { background: var(--ink); color: var(--on-ink); }
.lateral-pe { margin-top: auto; display: flex; flex-direction: column; gap: 1px; padding-top: 10px; border-top: 1px solid var(--line); }
.pilula { justify-content: flex-start; background: transparent; border: 0; box-shadow: none; color: var(--muted); padding: 7px 10px; min-height: 0; font-weight: 500; font-size: 13px; border-radius: 8px; }
.pilula:hover { background: var(--fill-2); color: var(--text); }
.pilula svg { width: 16px; height: 16px; }
.lateral-pe .selo { align-self: flex-start; margin: 8px 10px 0; }

.experts-troca { display: grid; gap: 1px; }
.experts-troca button {
  justify-content: flex-start; gap: 10px; padding: 6px 10px; min-height: 0; border: 0; border-radius: 8px; box-shadow: none;
  background: transparent; font-weight: 500; font-size: 14px; color: var(--text);
}
.experts-troca button:hover { background: var(--fill-2); }
.experts-troca button.ativa { background: var(--surface); box-shadow: var(--shadow-1); font-weight: 600; }
.experts-troca .avatar { width: 22px; height: 22px; font-size: 9.5px; }
.experts-troca .todos { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--muted); }
.experts-troca .todos svg { width: 13px; height: 13px; }

.conteudo { margin-left: var(--lateral); min-height: 100vh; }
.topo {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 40px 14px; background: var(--vidro); backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.topo.rolou { border-bottom-color: var(--line); }
.topo h1 { font-size: 28px; font-weight: 700; letter-spacing: -.028em; line-height: 1.15; }
.topo-acoes { display: flex; align-items: center; gap: 8px; }
.ia-trabalhando {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 550; padding: 5px 11px 5px 9px;
  border-radius: 99px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); color: var(--muted);
}
.ia-trabalhando i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); animation: pulso 1.2s infinite; }
.btn-tema { width: 34px; min-height: 34px; padding: 0; border-radius: 99px; color: var(--muted); }
.btn-tema svg { width: 17px; height: 17px; }
.so-celular { display: none; }
main { padding: 10px 40px 40px; }
main > section { animation: entra .3s var(--ease); }

.alertas { display: flex; flex-direction: column; gap: 8px; padding: 6px 40px 6px; }
.alertas:empty { display: none; }
.alerta {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--raio-m); font-size: 13.5px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); color: var(--muted);
}
.alerta .ponto { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); flex: 0 0 auto; }
.alerta.acao { cursor: pointer; color: var(--text); }
.alerta.acao .ponto { background: var(--ink); }
.alerta.acao:hover { background: var(--surface-2); }

/* ---------- números ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--raio); padding: 18px 20px 16px;
  box-shadow: var(--shadow-1); transition: transform .2s var(--ease), box-shadow .2s;
}
.kpi.clicavel { cursor: pointer; }
.kpi.clicavel:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.kpi .rotulo { font-size: 13px; font-weight: 550; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .rotulo svg { width: 15px; height: 15px; }
.kpi .valor { font-family: var(--display); font-size: 34px; font-weight: 650; letter-spacing: -.035em; line-height: 1.15; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kpi .detalhe { font-size: 13px; color: var(--faint); margin-top: 1px; }
.kpi.destaque { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.kpi.destaque .rotulo, .kpi.destaque .detalhe { color: color-mix(in srgb, var(--on-ink) 70%, transparent); }

/* ---------- pilares de conteúdo ---------- */
.selo-pilar {
  position: relative; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 550; line-height: 1.5;
  padding: 1px 8px 1px 7px; border-radius: 6px; background: var(--fill-2); color: var(--text); white-space: nowrap; cursor: pointer;
}
.selo-pilar svg { width: 13px; height: 13px; }
.selo-pilar.sem { color: var(--faint); background: transparent; border: 1px dashed var(--line-strong); padding: 0 7px; }
.selo-pilar select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; padding: 0; border: 0; }
.selo-pilar:hover { background: var(--fill); }
.modal-capa .meta .selo-pilar { font-size: 12px; }
.pilares {
  display: grid; grid-template-columns: minmax(200px, .8fr) 1fr 1fr; gap: 24px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--raio); box-shadow: var(--shadow-1);
  padding: 14px 20px; margin: -12px 0 22px;
}
.pilares:empty { display: none; }
.pilares-cabeca b { display: block; font-family: var(--display); font-size: 15px; }
.pilares-cabeca small { display: block; font-size: 12px; line-height: 1.4; margin-top: 2px; }
.pilares-cabeca .btn { margin-top: 8px; }
.pilar-topo { display: flex; align-items: baseline; gap: 8px; font-size: 13px; margin-bottom: 6px; white-space: nowrap; }
.pilar-topo b { font-weight: 600; }
.pilar-topo small { color: var(--faint); }
.pilar-falta { margin-left: auto; font-size: 12px; font-weight: 550; color: var(--text); background: var(--fill-2); padding: 0 7px; border-radius: 6px; }
.pilar-barra { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--track); }
.pilar-barra i { min-width: 0; transition: flex .6s var(--ease); }
.pilar-legenda { display: flex; gap: 14px; margin-top: 7px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.pilar-legenda span { display: inline-flex; align-items: center; gap: 5px; }
.pilar-legenda i { width: 8px; height: 8px; border-radius: 2px; }
.pilar-legenda b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.seg-atencao { background: var(--p-atencao); }
.seg-autoridade { background: var(--p-autoridade); }
.seg-conexao { background: var(--p-conexao); }
.pilar-filtro { margin-top: -8px; }
#aba-esteira:has(.pilares:not(:empty)) .kanban { height: calc(100vh - 404px); }
@media (min-width: 901px) and (max-width: 1280px) {
  .pilares { grid-template-columns: 1fr 1fr; gap: 12px 24px; }
  .pilares-cabeca { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; }
  .pilares-cabeca small { margin: 0; }
  #aba-esteira:has(.pilares:not(:empty)) .kanban { height: calc(100vh - 440px); }
}

/* ---------- quadro ---------- */
/* o quadro ocupa o resto da tela: cada coluna rola por dentro, como num app */
.kanban {
  display: flex; gap: 12px; overflow-x: auto;
  height: calc(100vh - 318px); min-height: 440px; padding: 2px 2px 14px;
  scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.coluna {
  flex: 1 1 0; min-width: 220px; transition: flex-basis .3s var(--ease);
  scroll-snap-align: start; background: var(--sunken); border-radius: var(--raio); padding: 10px; min-height: 0;
  display: flex; flex-direction: column; gap: 8px; overflow-y: auto; scrollbar-width: none;
}
.coluna::-webkit-scrollbar { display: none; }
/* coluna vazia vira uma faixa fina com o nome na vertical: o quadro inteiro cabe na tela */
.coluna.vazia { flex: 0 0 52px; min-width: 52px; padding: 10px 0; align-items: center; overflow: hidden; }
.coluna.vazia .coluna-topo { position: static; margin: 0; padding: 6px 0; background: none; writing-mode: vertical-rl; transform: rotate(180deg); gap: 10px; color: var(--muted); font-weight: 550; }
.coluna.vazia .coluna-topo .qtd { margin: 0; }
.coluna.vazia .vazio-coluna { display: none; }
.coluna-topo { position: sticky; top: -10px; z-index: 1; margin: -10px -10px 0; padding: 14px 16px 8px; background: var(--sunken); border-radius: var(--raio) var(--raio) 0 0; }
.coluna-topo { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.coluna-topo .bolinha { display: none; }
.coluna-topo .qtd { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--fill); padding: 0 7px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.vazio-coluna { margin: auto; text-align: center; color: var(--faint); font-size: 13px; padding: 22px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.vazio-coluna svg { width: 22px; height: 22px; opacity: .55; }

.item {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--raio-m); padding: 13px 14px; cursor: pointer;
  box-shadow: var(--shadow-1); transition: transform .2s var(--ease), box-shadow .2s; animation: entra .3s var(--ease) both;
}
.item:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.item:active { transform: scale(.985); }
.item .topo-item { display: flex; align-items: center; gap: 10px; }
.item .titulo { font-weight: 600; font-size: 14px; line-height: 1.38; margin: 8px 0 10px; letter-spacing: -.012em; }
.item .rodape { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); flex-wrap: wrap; }
.item .codigo { font-size: 12px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }
.item.novo { animation: brilha 1.6s var(--ease); }
.item-ideia .acoes-item { margin-top: 10px; display: flex; gap: 6px; }

/* anel da nota: só preto/cinza; nota baixa fica em cinza claro */
.anel { --p: 0; width: 40px; height: 40px; flex: 0 0 auto; position: relative; margin-left: auto; color: var(--text); }
.anel svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.anel circle { fill: none; stroke-width: 3.5; }
.anel .trilho { stroke: var(--track); }
.anel .barra { stroke: currentColor; stroke-linecap: round; stroke-dasharray: 113.1; stroke-dashoffset: calc(113.1 - 113.1 * var(--p)); transition: stroke-dashoffset 1s var(--ease); }
.anel span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 650; font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--text); }
.anel.media .barra { stroke: var(--muted); }
.anel.ruim .barra { stroke: var(--faint); }
.anel.grande { width: 84px; height: 84px; }
.anel.grande circle { stroke-width: 4; }
.anel.grande span { font-family: var(--display); font-size: 24px; letter-spacing: -.03em; }

/* ---------- ideias ---------- */
.segmentos { display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--fill); margin-bottom: 18px; max-width: 100%; overflow-x: auto; }
.segmentos { scrollbar-width: none; }
.segmentos::-webkit-scrollbar { display: none; }
.segmentos button { background: transparent; border: 0; box-shadow: none; color: var(--text); padding: 5px 14px; min-height: 0; border-radius: 7px; font-weight: 500; font-size: 13.5px; }
.segmentos button:hover { background: transparent; }
.segmentos button.ativa { background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); font-weight: 600; }
.cartao-ideia { display: flex; flex-direction: column; gap: 8px; padding: 18px; animation: entra .3s var(--ease) both; transition: box-shadow .2s; }
.cartao-ideia:hover { box-shadow: var(--shadow-2); }
.cartao-ideia .cabeca { display: flex; align-items: center; gap: 8px; }
.cartao-ideia .num { font-size: 12px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }
.cartao-ideia h4 { font-size: 15.5px; line-height: 1.38; letter-spacing: -.015em; }
.cartao-ideia .angulo { font-size: 13.5px; color: var(--muted); margin: 0; }
.cartao-ideia .motivo { font-size: 13px; padding: 8px 11px; border-radius: var(--raio-p); background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.cartao-ideia .pergunta { font-size: 13px; padding: 8px 11px; border-radius: var(--raio-p); background: var(--fill-2); color: var(--text); font-weight: 500; }
.cartao-ideia .rodape { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.cartao-ideia .rodape select { width: auto; padding: 4px 28px 4px 9px; font-size: 13px; border-radius: 7px; }
.cartao-ideia .rodape .direita { margin-left: auto; display: flex; gap: 6px; }

/* ---------- conversa do grupo ---------- */
.conversa { display: flex; flex-direction: column; gap: 18px; max-width: 860px; }
.msg { display: grid; grid-template-columns: 34px 1fr; gap: 12px; animation: entra .3s var(--ease) both; }
.msg .avatar { width: 34px; height: 34px; }
.msg .quem { font-size: 13px; color: var(--faint); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.msg .quem b { color: var(--text); font-weight: 600; }
.balao { margin-top: 4px; padding: 9px 14px; border-radius: 18px 18px 18px 6px; background: var(--fill); white-space: pre-line; max-width: 640px; width: fit-content; }
.resposta-ia {
  margin: 6px 0 0 auto; padding: 10px 14px; border-radius: 18px 18px 6px 18px; max-width: 600px; width: fit-content; white-space: pre-line;
  background: var(--ink); color: var(--on-ink); font-size: 14px;
}
.decisao { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.decisao select { width: auto; padding: 3px 26px 3px 9px; font-size: 12px; margin-left: auto; border-radius: 7px; }
.id-zap { font: 11px var(--mono); color: var(--faint); cursor: copy; }

/* ---------- playbook / ia / experts ---------- */
.evolucao { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 20px; }
.linha-do-tempo { display: flex; flex-direction: column; gap: 12px; }
.versao summary { cursor: pointer; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; list-style: none; }
.versao summary::-webkit-details-marker { display: none; }
.versao.proposta { border-color: var(--ink); }
.versao pre, .modal-secao pre { white-space: pre-wrap; font: 14px/1.65 var(--sans); background: var(--surface-2); border: 1px solid var(--line); padding: 16px; border-radius: var(--raio-m); margin: 14px 0 0; }
.tarefa-ia { display: flex; flex-direction: column; gap: 10px; }
.tarefa-ia h4 { font-size: 15px; text-transform: capitalize; }
.tarefa-ia .rec { font-size: 12.5px; color: var(--muted); font-weight: 550; display: flex; gap: 6px; align-items: center; }
.lista-simples { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--raio); overflow: hidden; box-shadow: var(--shadow-1); }
.lista-simples .lin { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.lista-simples .lin:last-child { border-bottom: 0; }
.lista-simples .lin small { margin-left: auto; text-align: right; }
.lista-simples .lin svg { width: 18px; height: 18px; color: var(--muted); flex: 0 0 auto; }
.status-ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex: 0 0 auto; }
.status-ponto.feita { background: var(--ink); }
.status-ponto.rodando { background: var(--ink); animation: pulso 1.2s infinite; }
.status-ponto.erro { background: var(--danger); }

.experts-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; margin-bottom: 16px; }
.perfil-cartao { display: flex; flex-direction: column; gap: 14px; }
.perfil-cabeca { display: flex; align-items: center; gap: 14px; }
.perfil-cabeca h3 { font-size: 19px; }
.perfil-cabeca > b { margin-left: auto; font-family: var(--display); font-size: 20px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.progresso { height: 4px; border-radius: 4px; background: var(--track); overflow: hidden; }
.progresso i { display: block; height: 100%; border-radius: inherit; background: var(--ink); transition: width .8s var(--ease); }
.perfil-cartao details summary { cursor: pointer; font-weight: 600; font-size: 14px; list-style: none; display: inline-flex; gap: 6px; align-items: center; }
.perfil-cartao details summary::-webkit-details-marker { display: none; }
.perfil-cartao form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.perfil-cartao label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 550; color: var(--muted); }

.ajustes-lista { display: flex; flex-direction: column; gap: 22px; max-width: 720px; }
.grupo-ajuste { background: var(--surface); border: 1px solid var(--line); border-radius: var(--raio); overflow: hidden; box-shadow: var(--shadow-1); }
.item-ajuste { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.item-ajuste:last-child { border-bottom: 0; }
.item-ajuste b { display: block; font-weight: 550; font-size: 15px; }
.item-ajuste small { display: block; font-size: 13px; color: var(--faint); }
.item-ajuste select, .item-ajuste input { width: 150px; flex: 0 0 auto; }
.ajustes-lista > .btn { align-self: flex-start; }

/* ---------- folha (roteiro e diálogos) ---------- */
dialog.folha {
  border: 0; padding: 0; width: min(860px, calc(100vw - 32px)); max-height: 90vh; border-radius: 20px;
  background: var(--bg); color: var(--text); box-shadow: var(--shadow-3); overflow: hidden;
}
dialog.folha.pequena { width: min(460px, calc(100vw - 32px)); background: var(--surface); }
dialog.folha[open] { animation: sobe .3s var(--ease); }
dialog::backdrop { background: var(--backdrop); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
#modal-corpo { max-height: 90vh; overflow-y: auto; }
.modal-capa { position: relative; padding: 26px 28px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.modal-capa .fechar { position: absolute; top: 16px; right: 16px; width: 30px; height: 30px; min-height: 0; padding: 0; border-radius: 50%; border: 0; box-shadow: none; background: var(--fill); color: var(--muted); }
.modal-capa .fechar svg { width: 14px; height: 14px; }
.modal-capa h2 { font-size: 24px; letter-spacing: -.026em; max-width: calc(100% - 130px); line-height: 1.22; }
.modal-capa .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.modal-capa .meta span { font-size: 12px; font-weight: 550; padding: 1px 8px; border-radius: 6px; background: var(--fill-2); color: var(--muted); }
.modal-capa .meta a { color: inherit; }
.modal-capa .anel { position: absolute; right: 62px; top: 20px; }
.etapas { display: flex; gap: 4px; margin-top: 20px; }
.etapas i { flex: 1; height: 4px; border-radius: 4px; background: var(--track); }
.etapas i.feita { background: var(--ink); }
.etapas-nomes { display: flex; justify-content: space-between; font-size: 11px; font-weight: 500; margin-top: 7px; color: var(--faint); }
.modal-miolo { padding: 20px 28px 28px; display: flex; flex-direction: column; gap: 12px; }
.modal-secao { background: var(--surface); border: 1px solid var(--line); border-radius: var(--raio); padding: 16px 18px; box-shadow: var(--shadow-1); }
.modal-secao h4 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.modal-secao h4 svg { width: 14px; height: 14px; }
.modal-secao p.texto { margin: 0; white-space: pre-line; font-size: 16px; line-height: 1.65; }
.modal-secao textarea { font-size: 15px; }
.criterios { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px 22px; }
.criterio { font-size: 13px; }
.criterio div { display: flex; justify-content: space-between; font-weight: 550; margin-bottom: 5px; font-variant-numeric: tabular-nums; }
.filtro-lin { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.filtro-lin:last-child { border-bottom: 0; }
.historico { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--muted); }
.historico div { display: flex; gap: 10px; }
.historico b { color: var(--text); font-weight: 550; }
.barra-acoes {
  position: sticky; bottom: 0; display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 28px calc(12px + env(safe-area-inset-bottom));
  background: var(--vidro-cartao); backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px); border-top: 1px solid var(--line);
}
.barra-acoes .btn.primeira { margin-right: auto; }
#dialogo-corpo { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
#dialogo-corpo h3 { font-size: 19px; }
#dialogo-corpo label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 550; color: var(--muted); }
#dialogo-corpo .botoes { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }

/* ---------- avisos (toast escuro, estilo Shopify/iOS) ---------- */
.toasts { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column-reverse; gap: 8px; width: min(420px, calc(100vw - 24px)); pointer-events: none; align-items: center; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border-radius: 14px; max-width: 100%;
  background: rgba(29, 29, 31, .94); color: #fff; box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); animation: toast-entra .4s var(--ease); cursor: pointer;
}
:root[data-tema="dark"] .toast { background: rgba(58, 58, 60, .94); }
.toast.sai { animation: toast-sai .3s var(--ease) forwards; }
.toast .icone-toast { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: rgba(255, 255, 255, .14); }
.toast .icone-toast svg { width: 16px; height: 16px; }
.toast.ok .icone-toast { background: #fff; color: #1d1d1f; }
.toast.erro .icone-toast { background: #ff453a; color: #fff; }
.toast b { display: block; font-size: 14px; font-weight: 600; }
.toast small { display: block; font-size: 13px; line-height: 1.35; color: rgba(255, 255, 255, .7); }
#confete { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 999; }

/* ---------- monitores grandes ---------- */
@media (min-width: 1600px) {
  :root { --lateral: 264px; }
  .topo { padding: 28px 56px 18px; }
  .topo h1 { font-size: 34px; }
  .alertas { padding: 6px 56px 8px; }
  main { padding: 12px 56px 48px; }
  .kpis { gap: 18px; margin-bottom: 30px; }
  .kpi { padding: 22px 26px 20px; border-radius: 16px; }
  .kpi .valor { font-size: 42px; }
  .kanban { gap: 14px; height: calc(100vh - 362px); }
  #aba-esteira:has(.pilares:not(:empty)) .kanban { height: calc(100vh - 452px); }
  .item { padding: 15px 16px; }
  .item .titulo { font-size: 15px; }
  .grade-cartoes { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
  .experts-lista { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
}

/* ---------- celular ---------- */
.barra-abas { display: none; }
@media (max-width: 900px) {
  .lateral { display: none; }
  .conteudo { margin-left: 0; }
  .topo { padding: calc(10px + env(safe-area-inset-top)) 16px 10px; }
  .topo h1 { font-size: 30px; letter-spacing: -.03em; }
  .so-celular { display: block; width: auto; padding: 6px 30px 6px 12px; font-weight: 600; font-size: 14px; border-radius: 99px; }
  main { padding: 6px 16px calc(100px + env(safe-area-inset-bottom)); }
  .alertas { padding: 4px 16px 6px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px 16px; }
  .kpi .valor { font-size: 28px; }
  .kanban { margin: 0 -16px; padding: 2px 16px 18px; scroll-padding: 16px; height: auto; min-height: 0; scroll-snap-type: x mandatory; }
  .coluna { flex: 0 0 84vw; overflow: visible; min-height: 300px; }
  .coluna.vazia { flex: 0 0 48px; min-width: 48px; min-height: 300px; }
  .coluna-topo { position: static; margin: 0; padding: 4px 6px 6px; }
  .duas-colunas { grid-template-columns: 1fr; }
  .pilares { grid-template-columns: 1fr; gap: 14px; margin: -4px 0 18px; padding: 14px 16px; }
  .grade-cartoes, .experts-lista { grid-template-columns: 1fr; }
  .segmentos { display: flex; }
  .barra-abas {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; justify-content: space-around;
    padding: 6px 4px calc(4px + env(safe-area-inset-bottom)); background: var(--vidro-cartao);
    backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px); border-top: .5px solid var(--line-strong);
  }
  .barra-abas button {
    flex: 1; flex-direction: column; gap: 2px; padding: 4px 0; min-height: 0; border: 0; box-shadow: none; background: transparent;
    color: var(--faint); font-size: 10.5px; font-weight: 550; border-radius: 8px;
  }
  .barra-abas button:hover { background: transparent; }
  .barra-abas button svg { width: 24px; height: 24px; }
  .barra-abas button.ativa { color: var(--text); }
  .barra-abas button.ativa svg { stroke-width: 2.1; }
  dialog.folha { width: 100vw; max-width: 100vw; max-height: 94vh; margin: auto 0 0; border-radius: 16px 16px 0 0; }
  dialog.folha[open] { animation: sobe-folha .35s var(--ease); }
  .modal-capa { padding: 22px 18px 16px; }
  .modal-capa h2 { font-size: 20px; max-width: calc(100% - 96px); }
  .modal-capa .anel { right: 56px; top: 18px; width: 56px; height: 56px; }
  .modal-capa .anel span { font-size: 16px; }
  .modal-miolo { padding: 14px; }
  .barra-acoes { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  .barra-acoes .btn { flex: 1; }
  .item-ajuste { flex-direction: column; align-items: stretch; }
  .item-ajuste select, .item-ajuste input { width: 100%; }
  .toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .etapas-nomes { display: none; }
}

/* ---------- animações ---------- */
@keyframes entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sobe { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes sobe-folha { from { transform: translateY(100%); } to { transform: none; } }
@keyframes toast-entra { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-sai { to { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes pulso { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes brilha { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ink) 35%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- card da ideia: de onde ela veio ---------- */
.cartao-ideia .origem { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 0; padding: 9px 11px;
  border-radius: var(--raio-p); background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; line-height: 1.45; }
.cartao-ideia .origem-rotulo { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); }
.cartao-ideia .origem b { font-weight: 600; }
.cartao-ideia .origem span:not(.origem-rotulo) { color: var(--muted); overflow-wrap: anywhere; }
.cartao-ideia .origem a { white-space: nowrap; }

/* Link do formulário de perfil (aba Experts) */
.link-perfil { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 4px; padding: 10px 12px;
  border-radius: var(--raio-m); background: var(--fill-2); }
.link-perfil > div { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; }
.link-perfil small { color: var(--muted); }

/* Roteiro em tópicos (cada número é um take) */
ol.topicos { margin: 0; padding-left: 26px; display: flex; flex-direction: column; gap: 8px; }
ol.topicos li { line-height: 1.45; padding-left: 4px; }
ol.topicos li::marker { color: var(--faint); font-weight: 600; font-variant-numeric: tabular-nums; }
ol.topicos.alt { list-style: upper-alpha; }
ol.topicos.alt li::marker { content: counter(list-item, upper-alpha) ") "; }
.acao-topico { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.dica-topicos { font-weight: 400; color: var(--faint); font-size: 11.5px; margin-left: 6px; text-transform: none; letter-spacing: 0; }

/* Vídeos gravados pelo teleprompter (um por tópico) */
.takes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.take { display: flex; flex-direction: column; gap: 6px; }
.take video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: var(--raio-m); background: #000; }
.take > div { display: flex; flex-direction: column; gap: 4px; }
.take small { color: var(--muted); }
.take .btn { align-self: flex-start; }

/* ---------- celular: barra de etapas + uma coluna por vez (14/10) ---------- */
.etapas-movel { display: none; }
@media (max-width: 900px) {
  #aba-esteira:not([hidden]) { display: flex; flex-direction: column; }
  #kpis { order: 0; margin-bottom: 14px; }
  .etapas-movel { order: 1; }
  #kanban { order: 2; }
  #pilares { order: 3; margin: 18px 0 0; }
  .kpi { padding: 12px 14px; }
  .kpi .valor { font-size: 24px; margin-top: 4px; }
  .kpi .detalhe { font-size: 12px; }
  .etapas-movel {
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; position: sticky; top: var(--altura-topo, 64px); z-index: 6;
    margin: 0 -16px 12px; padding: 8px 16px; background: var(--bg);
  }
  .etapas-movel::-webkit-scrollbar { display: none; }
  .chip-etapa {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 14px; border-radius: 99px;
    border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 600 14px var(--sans); box-shadow: none;
  }
  .chip-etapa b { font-size: 12px; font-weight: 650; min-width: 20px; padding: 1px 6px; border-radius: 99px; background: var(--fill); font-variant-numeric: tabular-nums; }
  .chip-etapa.zerada { color: var(--faint); }
  .chip-etapa.ativa { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
  .chip-etapa.ativa b { background: color-mix(in srgb, var(--on-ink) 22%, transparent); }
  .kanban { display: block; margin: 0; padding: 0; height: auto !important; min-height: 0; overflow: visible; scroll-snap-type: none; }
  .coluna, .coluna.vazia { display: none; }
  .coluna.ativa, .coluna.vazia.ativa {
    display: flex; flex-direction: column; gap: 10px; background: transparent; padding: 0; min-height: 45vh;
    overflow: visible; width: auto; min-width: 0; align-items: stretch;
  }
  .coluna.ativa .coluna-topo { display: none; }
  .coluna.vazia.ativa .vazio-coluna { display: flex; padding: 48px 8px; }
  .coluna.ativa .item { padding: 14px 16px; }
  .coluna.ativa .item .titulo { font-size: 16px; }
  .coluna.ativa .acoes-item .btn { min-height: 40px; padding: 0 16px; }
}

/* Notificações neste aparelho (aba Ajustes) */
#caixa-push .item-ajuste b svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 4px; }
#caixa-push > small { display: block; padding: 4px 16px 14px; color: var(--muted); line-height: 1.55; }
.acoes-push { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 16px 14px; }
