/* =====================================================================
   Design system — Imediato Nexway
   Tokens travados pelo manual da marca: azul #001F40 (base), verde #00AA80
   (ACENTO, ~5–8% da área), cinza #DADADA (divisores), família única Prompt.
   Verde nunca carrega texto pequeno sobre branco (contraste ~2,6:1).
   Motivo gráfico = órbitas cruzadas do ícone, nunca cunhas angulares.
   ===================================================================== */

/* Prompt servida pelo próprio servidor — a aplicação funciona em rede interna
   sem saída para a internet. Regenerar com: node scripts/baixar-fontes.mjs */
@import url('/css/fontes.css');

:root {
  --azul: #001F40;
  --verde: #00AA80;
  --cinza: #DADADA;
  --branco: #FFFFFF;

  --azul-80: #1A3555;
  --azul-60: #4D6379;
  --papel: #F4F6F8;
  --linha: #E2E7EC;
  --ct: #4A5561;
  --hint: #8A939D;
  --verde-claro: #E8F7F3;
  --amarelo: #B8860B;
  --vermelho: #B0344A;

  --r: 14px;
  --sombra: 0 1px 2px rgba(0, 31, 64, .04), 0 12px 30px rgba(0, 31, 64, .06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--papel);
  color: var(--ct);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--azul); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ------------------------------------------------------ casca / lateral */

/* A barra lateral é fixa e a coluna do grid reserva o espaço dela: assim o
   conteúdo rola sozinho, sem a navegação subir junto. */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 276px minmax(0, 1fr); }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 276px; height: 100dvh;
  display: flex; flex-direction: column; overflow: hidden; z-index: 20;
  background: var(--azul); color: #fff;
}
/* O filete da marca — verde nos primeiros 84px, cinza no resto — virado na
   vertical. É o mesmo gesto do cabeçalho dos documentos. */
.sidebar::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 3px;
  background: linear-gradient(to bottom, var(--verde) 84px, rgba(255,255,255,.10) 84px);
}
.sidebar__orbit { position: absolute; right: -74px; top: -66px; width: 200px; height: 200px; opacity: .5; pointer-events: none; }

.side-brand {
  min-height: 82px; display: grid; grid-template-columns: 1fr 32px;
  align-items: center; gap: 10px 12px; padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.09); position: relative; z-index: 1;
}
.side-brand a { display: block; min-width: 0; }
.side-brand img { width: 100%; max-width: 158px; height: auto; display: block; }
.side-brand .marca-icone { display: none; width: 34px; height: 34px; max-width: none; }
.brand-copy { grid-column: 1 / -1; min-width: 0; }
.brand-copy b { display: block; font-size: 12.5px; font-weight: 600; color: #fff; line-height: 1.25; }
.brand-copy span { display: block; margin-top: 2px; font-size: 11px; color: rgba(255,255,255,.55); }

.side-toggle {
  width: 32px; height: 32px; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.14); border-radius: 9px;
  background: rgba(255,255,255,.07); color: #d9e4ef; font-size: 19px; line-height: 1;
}
.side-toggle:hover { background: rgba(255,255,255,.14); color: #fff; }

/* Nova proposta — a única entrada do menu que CRIA algo, então tem peso
   próprio: fundo verde sobre o azul da barra, acima da navegação. O verde é
   acento na marca (5-8% da área), e aqui ele cabe justamente porque é um
   elemento só. */
.side-acao {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 14px 12px 0; padding: 11px 14px; border-radius: 10px;
  background: var(--verde); color: #fff; font-size: 13.5px; font-weight: 600;
  text-decoration: none; position: relative; z-index: 1; transition: filter .15s;
}
.side-acao:hover { filter: brightness(1.08); }
.side-acao.is-ativo { box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }
.side-acao__mais { font-size: 16px; line-height: 1; }
/* Recolhida, sobra só o "+" — o rótulo sairia cortado. */
.sidebar-collapsed .side-acao { margin: 14px 10px 0; padding: 11px 0; }
.sidebar-collapsed .side-acao__mais { font-size: 18px; }

.side-nav { display: flex; flex-direction: column; gap: 4px; padding: 14px 12px; flex: 1; min-height: 0; overflow-y: auto; position: relative; z-index: 1; }
.side-nav a, .side-status, .side-config {
  min-height: 42px; width: 100%; display: flex; align-items: center; gap: 12px;
  border: 0; border-radius: 10px; padding: 10px 12px; background: transparent;
  color: rgba(255,255,255,.72); font-size: 13px; font-family: inherit; text-align: left;
}
.side-nav a:hover, .side-status:hover, .side-config:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.side-nav a.is-active, .side-config.is-active { background: rgba(0,170,128,.18); color: #fff; box-shadow: inset 3px 0 0 var(--verde); }
/* Fica no rodapé, acima da conta: é ajuste, não navegação do trabalho. Uma
   linha o separa da identificação de quem está logado. */
.side-config { margin-bottom: 6px; }
.nav-ico { width: 22px; min-width: 22px; display: inline-flex; align-items: center; justify-content: center; }
.nav-ico svg { width: 17px; height: 17px; display: block; }
.nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.side-footer { padding: 12px; border-top: 1px solid rgba(255,255,255,.09); position: relative; z-index: 1; }
.side-status .nav-label { display: flex; flex-direction: column; gap: 1px; line-height: 1.3; }
.side-status b { font-size: 12.5px; font-weight: 600; color: #fff; }
.side-status small { font-size: 10.5px; color: rgba(255,255,255,.5); }
.pin-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--cinza); }
.pin-dot.on { background: var(--verde); box-shadow: 0 0 0 3px rgba(0,170,128,.22); }

.workspace { grid-column: 2; min-width: 0; }

/* Barra de cima só existe no celular, onde a lateral vira gaveta. */
.mobile-topbar { display: none; align-items: center; gap: 12px; padding: 10px 14px; background: var(--azul); position: sticky; top: 0; z-index: 15; }
.mobile-topbar img { height: 24px; width: auto; display: block; }
.mobile-topbar span { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.menu-backdrop { display: none; position: fixed; inset: 0; border: 0; padding: 0; background: rgba(0,31,64,.5); z-index: 18; }

/* ---- recolhida: só os ícones ---- */
.sidebar-collapsed { grid-template-columns: 84px minmax(0, 1fr); }
.sidebar-collapsed .sidebar { width: 84px; }
.sidebar-collapsed .side-brand { grid-template-columns: 1fr; justify-items: center; padding: 16px 12px; gap: 10px; }
.sidebar-collapsed .side-brand .marca-completa { display: none; }
.sidebar-collapsed .side-brand .marca-icone { display: block; }
.sidebar-collapsed .brand-copy, .sidebar-collapsed .nav-label { display: none; }
.sidebar-collapsed .side-nav a, .sidebar-collapsed .side-status { justify-content: center; padding: 10px; }
.sidebar-collapsed .side-nav a.is-active { box-shadow: inset 0 -3px 0 var(--verde); }

/* Em tela estreita a lateral já nasce recolhida, sem depender da preferência. */
@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 84px minmax(0, 1fr); }
  .app-shell .sidebar { width: 84px; }
  .app-shell .side-brand { grid-template-columns: 1fr; justify-items: center; padding: 16px 12px; gap: 10px; }
  .app-shell .side-brand .marca-completa { display: none; }
  .app-shell .side-brand .marca-icone { display: block; }
  .app-shell .brand-copy, .app-shell .nav-label { display: none; }
  .app-shell .side-nav a, .app-shell .side-status { justify-content: center; padding: 10px; }
}

/* No celular vira gaveta: por cima do conteúdo, com os rótulos de volta. */
@media (max-width: 860px) {
  .app-shell, .sidebar-collapsed { display: block; }
  .sidebar, .sidebar-collapsed .sidebar {
    width: 84px; transform: translateX(-100%);
    transition: transform .18s ease; box-shadow: 10px 0 30px rgba(0,31,64,.25);
  }
  /* Aberta, a gaveta precisa vencer o `.app-shell .sidebar { width: 84px }` da
     faixa de 1180px, que também vale aqui — daí o seletor mais específico. */
  .app-shell.mobile-menu-open .sidebar { transform: translateX(0); width: 284px; max-width: 84%; }
  .app-shell.mobile-menu-open .brand-copy,
  .app-shell.mobile-menu-open .nav-label { display: block; }
  .app-shell.mobile-menu-open .side-status .nav-label { display: flex; }
  .app-shell.mobile-menu-open .side-brand { grid-template-columns: 1fr 32px; justify-items: stretch; padding: 18px 18px 16px; gap: 10px 12px; }
  .app-shell.mobile-menu-open .side-brand .marca-completa { display: block; }
  .app-shell.mobile-menu-open .side-brand .marca-icone { display: none; }
  .app-shell.mobile-menu-open .side-nav a,
  .app-shell.mobile-menu-open .side-status { justify-content: flex-start; padding: 10px 12px; }
  /* A gaveta cobre o canto do ☰, então o fundo clicável é a única saída. */
  .app-shell.mobile-menu-open .menu-backdrop { display: block; }
  .mobile-topbar { display: flex; }
  .workspace { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

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

.wrap { max-width: 1240px; margin: 0 auto; padding: 30px 28px 72px; }
.wrap--narrow { max-width: 960px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head__eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--azul); opacity: .5; margin-bottom: 5px; }
h1 { font-size: 25px; font-weight: 700; color: var(--azul); line-height: 1.2; letter-spacing: -.015em; }
h2 { font-size: 16px; font-weight: 600; color: var(--azul); letter-spacing: -.005em; }
.lead { font-size: 13.5px; color: var(--ct); max-width: 68ch; margin-top: 6px; }

.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid--2, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid--2, .grid--4 { grid-template-columns: minmax(0, 1fr); } }

/* --------------------------------------------------------------- cards */

.card {
  background: var(--branco); border: 1px solid var(--linha);
  border-radius: var(--r); box-shadow: var(--sombra);
}
.card__head {
  padding: 15px 20px; border-bottom: 1px solid var(--linha);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.card__body { padding: 20px; }
.card__title { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--azul); display: flex; align-items: center; gap: 9px; }
.card__title::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--verde); flex-shrink: 0; }
.card__sub { font-size: 12px; color: var(--hint); }

/* barra de seção numerada — mesmo componente do documento */
.section-bar {
  background: var(--azul); color: #fff; padding: 8px 16px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  border-radius: 2px; position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 9px;
}
.section-bar::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--verde); }
.section-bar .num { color: var(--verde); }

/* ----------------------------------------------------------------- kpi */

.kpi { background: var(--branco); border: 1px solid var(--linha); border-radius: var(--r); padding: 16px 18px; position: relative; overflow: hidden; }
.kpi::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--cinza); }
.kpi--accent::after { background: var(--verde); }
.kpi__n { font-size: 30px; font-weight: 700; color: var(--azul); line-height: 1; letter-spacing: -.02em; }
.kpi__l { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--hint); margin-top: 7px; }

/* -------------------------------------------------------------- botões */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 12.5px; font-weight: 600; letter-spacing: .02em;
  padding: 9px 18px; border-radius: var(--r); border: 1px solid transparent;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s, opacity .15s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--primary { background: var(--azul); color: #fff; }
.btn--primary:hover:not(:disabled) { background: #002d5c; }
/* Verde só como plano de fundo sólido com texto branco — nunca texto verde miúdo */
.btn--go { background: var(--verde); color: #fff; }
.btn--go:hover:not(:disabled) { background: #009170; }
.btn--ghost { background: transparent; color: var(--azul); border-color: var(--linha); }
.btn--ghost:hover:not(:disabled) { border-color: var(--azul-60); background: #fff; }
.btn--danger { background: transparent; color: var(--vermelho); border-color: #E8D4D8; }
.btn--danger:hover:not(:disabled) { background: #FCF4F5; }
.btn--sm { padding: 6px 12px; font-size: 11.5px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------------------ formulário */

.field { margin-bottom: 18px; }
.field__label { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--azul); margin-bottom: 4px; padding-left: 11px; position: relative; }
.field__label::before { content: ''; position: absolute; left: 0; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--verde); }
.field__label .opt { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--hint); font-size: 11px; margin-left: 6px; }
/* Dica de preenchimento: orienta, não preenche. */
.field__hint { display: block; font-size: 11.5px; font-style: italic; color: var(--hint); margin-bottom: 7px; line-height: 1.45; }

/* `search`, `tel` e `url` faltavam: fora desta regra o campo cai no tamanho
   padrão do navegador — foi o que deixou a busca do acervo com 173px numa
   coluna de 592px. */
input[type=text], input[type=email], input[type=date], input[type=number],
input[type=password], input[type=search], input[type=tel], input[type=url],
textarea, select {
  width: 100%; font-family: inherit; font-size: 13.5px; color: var(--azul);
  background: #fff; border: 1px solid var(--linha); border-radius: 10px;
  padding: 10px 13px; transition: border-color .15s, box-shadow .15s, background .15s;
}
input:hover, textarea:hover, select:hover { border-color: #B9C7D4; }
textarea { resize: vertical; min-height: 78px; line-height: 1.55; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--verde); box-shadow: 0 0 0 3px rgba(0,170,128,.13);
}
input::placeholder, textarea::placeholder { color: #B4BBC2; }
/* O X nativo do campo de busca destoa do resto dos controles. */
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
input:disabled, textarea:disabled, select:disabled { background: #F7F9FA; color: var(--azul-60); cursor: not-allowed; }

.counter { font-size: 11px; color: var(--hint); text-align: right; margin-top: 3px; }
.counter.over { color: var(--vermelho); font-weight: 600; }

/* Seletor de esforço — dot indicator, nunca caixas com borda (regra da marca) */
.effort { display: flex; gap: 28px; flex-wrap: wrap; padding-top: 2px; }
.effort label { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.effort input { position: absolute; opacity: 0; pointer-events: none; }
.effort .dot { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--cinza); background: #fff; flex-shrink: 0; transition: all .15s; }
.effort input:checked + .dot { background: var(--verde); border-color: var(--verde); box-shadow: 0 0 0 3px rgba(0,170,128,.16); }
.effort .mark { font-size: 13px; font-weight: 500; color: var(--ct); }
.effort input:checked ~ .mark { color: var(--azul); font-weight: 700; }
.effort .unit { font-size: 11px; color: var(--hint); }

/* --------------------------------------------------------------- badges */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 2px; border: 1px solid; white-space: nowrap;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge--rascunho   { color: var(--hint);     border-color: var(--linha);  background: #F7F9FA; }
.badge--submetida  { color: var(--azul);     border-color: #C9D6E4;       background: #EEF3F8; }
.badge--em_revisao { color: var(--amarelo);  border-color: #E8DCC0;       background: #FBF6E9; }
.badge--aprovado   { color: #00775A;         border-color: #B7E3D6;       background: var(--verde-claro); }
.badge--backlog    { color: var(--azul-60);  border-color: var(--cinza);  background: #F2F4F6; }
.badge--recusado   { color: var(--vermelho); border-color: #E8D4D8;       background: #FCF4F5; }

/* --------------------------------------------------------------- listas */

.plist { display: flex; flex-direction: column; }
.prow {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto auto;
  gap: 16px; align-items: center;
  padding: 13px 20px; border-bottom: 1px solid var(--linha);
  transition: background .12s;
}
.prow:last-child { border-bottom: none; }
.prow:hover { background: #FBFCFD; }
.prow__code { min-width: 0; }
/* Número grande, ano miúdo: o "PRJ-2026-" repetido em toda linha ocupava a
   largura sem informar nada, e deixava o número — o que as pessoas falam em voz
   alta — pequeno demais para ler. */
.cod { display: block; line-height: 1.1; }
.cod b { display: block; font-size: 16px; font-weight: 700; color: var(--azul); letter-spacing: -.01em; }
.cod span { display: block; margin-top: 1px; font-size: 9.5px; font-weight: 600; letter-spacing: .1em; color: var(--hint); }
.prow__name { font-size: 14px; font-weight: 600; color: var(--azul); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow__meta { font-size: 11.5px; color: var(--hint); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow__score { font-size: 17px; font-weight: 700; color: var(--azul); text-align: right; min-width: 46px; }
.prow__score small { display: block; font-size: 9.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--hint); }
@media (max-width: 760px) {
  .prow { grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; }
  .prow__code, .prow__score { grid-column: 1 / -1; text-align: left; }
}

.empty { padding: 46px 20px; text-align: center; color: var(--hint); font-size: 13px; }
.empty svg { display: block; margin: 0 auto 14px; opacity: .5; }

/* --------------------------------------------------------------- matriz */

.matrix { position: relative; padding: 0 0 34px 34px; }
.matrix__plot {
  position: relative; aspect-ratio: 2.4 / 1; min-height: 320px; max-height: 440px;
  border: 1px solid var(--linha); background: #fff;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
}
.quad { position: relative; padding: 11px 13px; border: 0; }
.quad + .quad { border-left: 1px dashed var(--cinza); }
.quad:nth-child(3), .quad:nth-child(4) { border-top: 1px dashed var(--cinza); }
.quad:nth-child(3) { border-left: none; }
.quad__name { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--azul); opacity: .42; }
.quad__act { font-size: 10.5px; color: var(--hint); font-style: italic; }
.quad--top-left  { background: linear-gradient(135deg, rgba(0,170,128,.07), transparent 62%); }
.quad--top-right { background: linear-gradient(225deg, rgba(0,31,64,.045), transparent 62%); }

/* Diâmetro proporcional à pontuação: --dotp-size é definido inline em home.js. */
.dotp {
  position: absolute; width: var(--dotp-size, 13px); height: var(--dotp-size, 13px);
  border-radius: 50%;
  background: var(--verde); border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,170,128,.55), 0 2px 6px rgba(0,31,64,.2);
  transform: translate(-50%, 50%); cursor: pointer; z-index: 3;
  transition: transform .15s;
}
.dotp:hover { transform: translate(-50%, 50%) scale(1.35); z-index: 5; }

/* Rótulo permanente ao lado do ponto, para identificar o projeto sem hover. */
.dotp__rotulo {
  position: absolute; left: calc(100% + 6px); top: 50%;
  transform: translateY(-50%);
  font-size: 10px; font-weight: 600; line-height: 1.15;
  color: var(--azul); white-space: nowrap;
  pointer-events: none; z-index: 4;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff;
}
/* Perto da borda direita o rótulo vira para a esquerda do ponto. */
.dotp--rot-esq .dotp__rotulo { left: auto; right: calc(100% + 6px); }
.dotp--backlog  { background: var(--azul-60); box-shadow: 0 0 0 1px rgba(77,99,121,.5), 0 2px 6px rgba(0,31,64,.2); }
.dotp--recusado { background: #fff; box-shadow: 0 0 0 1.5px var(--vermelho), 0 2px 6px rgba(0,31,64,.15); }
.dotp--submetida{ background: #fff; box-shadow: 0 0 0 1.5px var(--cinza), 0 2px 6px rgba(0,31,64,.12); }

.dotp__tip {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--azul); color: #fff; font-size: 11px; font-weight: 500;
  padding: 7px 11px; border-radius: var(--r);
  /* O balão é filho do ponto, que tem ~20px. Sem `width: max-content` ele
     encolhe para essa largura e quebra uma palavra por linha; sem `max-width`
     ele estica até 470px e empurra a página, mesmo invisível. Os dois juntos
     dão a caixa larga que cabe. */
  /* Largura em px, não em vw: `vw` que resolva para 0 vira `max-width: 0` e
     colapsa o balão numa coluna de uma palavra por linha. Media query cuida
     da tela estreita, e nunca zera. */
  width: max-content; max-width: 280px;
  white-space: normal; text-wrap: balance; line-height: 1.4;
  opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 9;
  box-shadow: 0 6px 18px rgba(0,31,64,.24);
}
.dotp__tip b { display: block; font-weight: 600; }
.dotp__tip span { color: rgba(255,255,255,.6); font-size: 10px; }
.dotp:hover .dotp__tip { opacity: 1; }

.axis-y {
  position: absolute; left: 0; top: 0; bottom: 34px; width: 34px;
  display: flex; align-items: center; justify-content: center;
}
.axis-y span {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: 9.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--azul); opacity: .5;
}
.axis-x {
  position: absolute; left: 34px; right: 0; bottom: 0; height: 34px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 6px;
}
.axis-x span { font-size: 9.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--azul); opacity: .5; }

.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 11.5px; color: var(--hint); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

/* --------------------------------------------------------------- tabela */

table.grid-t { width: 100%; border-collapse: collapse; }
.grid-t th {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #fff; background: var(--azul); text-align: left; padding: 9px 12px;
}
.grid-t th:last-child, .grid-t td:last-child { text-align: right; }
.grid-t td { padding: 10px 12px; border-bottom: 1px solid var(--linha); font-size: 13px; color: var(--ct); vertical-align: middle; }
.grid-t tbody tr:last-child td { border-bottom: none; }
.grid-t tfoot td { background: #EEF3F8; font-weight: 700; color: var(--azul); font-size: 14px; border-top: 2px solid var(--azul); }
.grid-t td b { color: var(--azul); font-weight: 600; }

/* --------------------------------------------------------------- avisos */

.note {
  border-left: 3px solid var(--verde); background: var(--verde-claro);
  padding: 11px 15px; border-radius: 0 2px 2px 0; font-size: 12.5px; color: var(--azul);
}
.note--warn { border-left-color: var(--amarelo); background: #FBF6E9; }
.note--err  { border-left-color: var(--vermelho); background: #FCF4F5; }
/* Informativo, sem carga: o fato é digno de nota mas não é problema. */
.note--neutro { border-left-color: var(--cinza); background: #F5F6F8; }
.note b { display: block; font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; opacity: .6; margin-bottom: 3px; }
.note ul { margin: 5px 0 0 16px; }

/* --------------------------------------------------------------- outros */

.doc-frame {
  width: 100%; border: 1px solid var(--linha); background: #e6e9ec;
  border-radius: var(--r); display: block;
}

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(120%);
  background: var(--azul); color: #fff; font-size: 13px; font-weight: 500;
  padding: 12px 22px; border-radius: var(--r); box-shadow: 0 10px 34px rgba(0,31,64,.3);
  z-index: 90; transition: transform .28s cubic-bezier(.22,1,.36,1); max-width: 88vw;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--verde); margin-right: 9px; vertical-align: 2px; }

.modal-bg {
  position: fixed; inset: 0; background: rgba(0,31,64,.55); backdrop-filter: blur(2px);
  display: none; align-items: center; justify-content: center; padding: 24px; z-index: 80;
}
.modal-bg.show { display: flex; }
.modal { background: #fff; border-radius: var(--r); max-width: 460px; width: 100%; box-shadow: 0 24px 64px rgba(0,31,64,.32); overflow: hidden; }
.modal__head { background: var(--azul); color: #fff; padding: 15px 22px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; position: relative; }
.modal__head::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--verde); }
.modal__body { padding: 22px; }
.modal__foot { padding: 0 22px 22px; display: flex; gap: 10px; justify-content: flex-end; }

/* --------------------------------------------------------- autenticação */

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg, var(--azul) 0%, #00477c 100%); }
.login-card { width: min(100%, 460px); background: #fff; border-radius: var(--r); overflow: hidden; box-shadow: 0 24px 64px rgba(0,31,64,.34); }
.login-logo { display: block; width: 220px; height: auto; padding: 26px 28px; background: var(--azul); }
.login-body { padding: 28px; }
.login-body .lead { max-width: none; }
.btn--msft { width: 100%; background: #fff; color: var(--azul); border-color: var(--linha); }
.btn--msft:hover { background: #f7f9fa; border-color: #8ea3b8; }
.btn--msft:disabled { opacity: .55; background: #f5f7f8; color: var(--hint); border-color: var(--linha); }
.login-botao { width: 100%; justify-content: center; }
/* O "ou" entre as duas portas de entrada. As linhas saem de ::before/::after
   para o rótulo poder ficar no meio sem um elemento vazio só para isso. */
.login-divisor { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--hint); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; }
.login-divisor::before, .login-divisor::after { content: ''; flex: 1; height: 1px; background: var(--linha); }
.login-status { margin: 12px 0 0; text-align: center; color: var(--hint); font-size: 11.5px; line-height: 1.45; }
.login-voltar { display: block; margin-top: 16px; text-align: center; color: var(--hint); font-size: 12px; }
.table-wrap { overflow-x: auto; }
.grid--3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(160px, .55fr); align-items: end; }
.grid-t td small { display: block; margin-top: 3px; color: var(--hint); font-size: 11px; }
.grid-t td input, .grid-t td select { min-width: 130px; font-size: 12px; padding: 7px 9px; }
.linha-inativa { opacity: .58; }
.table-actions { justify-content: flex-end; flex-wrap: nowrap; }
@media (max-width: 900px) { .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid--3 { grid-template-columns: minmax(0, 1fr); } .table-actions { justify-content: flex-start; } }

/* -------------------------------------------------- proposta guiada */

.proposal-page { max-width: 1080px; }
.proposal-progress { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0 0 22px; }
.proposal-progress__item { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 11px 10px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--hint); text-align: left; font: inherit; cursor: pointer; }
.proposal-progress__item:hover { background: #EDF3F7; color: var(--azul); }
.proposal-progress__item.is-active { background: var(--azul); color: #fff; box-shadow: 0 8px 18px rgba(0,31,64,.16); }
.proposal-progress__item.is-ready:not(.is-active) { color: #00775A; background: var(--verde-claro); }
.proposal-progress__icon { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(0,31,64,.08); font-size: 15px; font-weight: 700; }
.proposal-progress__icon svg { width: 15px; height: 15px; display: block; }
.proposal-progress__item.is-active .proposal-progress__icon { background: var(--verde); color: #fff; }
.proposal-progress__item.is-ready:not(.is-active) .proposal-progress__icon { background: #C8EDE2; }
.proposal-progress b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; letter-spacing: .03em; }
.proposal-progress small { display: block; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; opacity: .72; }
.proposal-step { overflow: hidden; }
.proposal-step__head { min-height: 92px; display: flex; align-items: center; gap: 14px; padding: 18px 22px; background: linear-gradient(115deg, var(--azul), #06325c); color: #fff; position: relative; overflow: hidden; }
.proposal-step__head::after { content: ''; position: absolute; width: 160px; height: 160px; right: -60px; top: -88px; border: 2px solid rgba(0,170,128,.42); border-radius: 50%; box-shadow: -25px 35px 0 -22px rgba(0,170,128,.36); }
.proposal-step__number { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; background: var(--verde); color: #fff; font-size: 14px; font-weight: 700; }
.proposal-step__eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.62); }
.proposal-step__head h2 { color: #fff; margin-top: 1px; font-size: 19px; }
.proposal-step__icon { margin-left: auto; position: relative; z-index: 1; line-height: 1; color: var(--verde); flex-shrink: 0; }
.proposal-step__icon svg { width: 30px; height: 30px; display: block; stroke-width: 1.4; }
.proposal-step__body { padding: 24px; }
.proposal-step__intro { margin: -2px 0 23px; color: var(--hint); font-size: 13px; }
.proposal-fields { gap: 0 22px; }
.proposal-fields .field { margin-bottom: 22px; }
.proposal-fields textarea { min-height: 120px; }
.optional-panel { margin-top: 4px; border: 1px solid var(--linha); border-radius: 12px; background: #FAFCFD; overflow: hidden; }
.optional-panel summary { display: flex; align-items: center; gap: 8px; padding: 14px 16px; color: var(--azul); font-size: 12.5px; font-weight: 600; cursor: pointer; list-style: none; }
.optional-panel summary::-webkit-details-marker { display: none; }
.optional-panel summary span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--verde-claro); color: #00775A; }
.optional-panel summary small { color: var(--hint); font-weight: 400; }
.optional-panel[open] summary { border-bottom: 1px solid var(--linha); background: #fff; }
.optional-panel .card { margin: 16px; border-radius: 10px; box-shadow: none; }
.proposal-actions { position: sticky; bottom: 12px; z-index: 10; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 13px 15px; border: 1px solid rgba(0,31,64,.12); border-radius: 14px; background: rgba(255,255,255,.94); box-shadow: 0 12px 32px rgba(0,31,64,.13); backdrop-filter: blur(14px); }
.proposal-actions__nav, .proposal-actions__final { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.proposal-actions__final { margin-left: auto; }
.proposal-actions__hint, .proposal-actions__save { color: var(--hint); font-size: 11px; }
.proposal-actions__save { flex-basis: 100%; margin: -2px 0 0; }
@media (max-width: 800px) { .proposal-progress { grid-template-columns: minmax(0, 1fr); gap: 4px; } .proposal-progress__item { padding: 9px 11px; } .proposal-actions__final { margin-left: 0; } }

/* -------------------------------------------------- gestão de pessoas */

.users-card { overflow: hidden; }
.users-list { display: grid; gap: 9px; padding: 14px; background: #F6F9FA; }
.user-row { display: grid; grid-template-columns: 42px minmax(180px, 1.25fr) minmax(150px, .85fr) auto auto; align-items: center; gap: 13px; padding: 12px 13px; border: 1px solid #E1E9ED; border-radius: 12px; background: #fff; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.user-row:hover { border-color: #B9DDD3; box-shadow: 0 7px 18px rgba(0,31,64,.07); transform: translateY(-1px); }
.user-avatar { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; background: linear-gradient(135deg, var(--verde), #007F65); color: #fff; box-shadow: inset 0 0 0 3px #E6F7F1; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.user-row__main { min-width: 0; }
.user-row__main b { display: block; overflow: hidden; color: var(--azul); text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.user-row__main span, .user-row__meta small { display: block; overflow: hidden; margin-top: 3px; color: var(--hint); text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.user-row__meta { min-width: 0; }
.role-pill { display: inline-flex; align-items: center; width: fit-content; padding: 4px 8px; border-radius: 999px; background: #EAF1F6; color: var(--azul); font-size: 10px; font-weight: 700; letter-spacing: .03em; }
.role-pill--admin { background: #DDF4EC; color: #006D52; }
.user-row__actions { display: flex; gap: 6px; justify-content: flex-end; }
.user-edit-preview { display: flex; align-items: center; gap: 10px; margin: -2px 0 18px; padding: 11px; border: 1px solid #DDEBE7; border-radius: 10px; background: #F5FBF8; }
.user-edit-preview b, .user-edit-preview small { display: block; color: var(--azul); font-size: 12px; }
.user-edit-preview small { margin-top: 3px; color: var(--hint); font-size: 10px; }
@media (max-width: 880px) { .user-row { grid-template-columns: 42px minmax(0, 1fr) auto; } .user-row__meta { grid-column: 2; } .user-row > .badge { justify-self: end; } .user-row__actions { grid-column: 2 / -1; grid-row: 3; justify-content: flex-start; } }
@media (max-width: 540px) { .users-list { padding: 9px; } .user-row { gap: 9px; padding: 11px; } .user-row__main span { max-width: 180px; } .user-row__actions .btn { padding: 7px 9px; font-size: 11px; } }

.hidden { display: none !important; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 10px; } .mt-2 { margin-top: 18px; } .mt-3 { margin-top: 28px; }
.mb-2 { margin-bottom: 18px; }
.muted { color: var(--hint); }
.right { text-align: right; }

/* reveal escalonado no load — micro-movimento, CSS-first */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .45s cubic-bezier(.22,1,.36,1) both; }
.rise:nth-child(2) { animation-delay: .05s; }
.rise:nth-child(3) { animation-delay: .1s; }
.rise:nth-child(4) { animation-delay: .15s; }
@media (prefers-reduced-motion: reduce) { .rise { animation: none; } }

/* ------------------------------------------- visor do Business Case */

/* No preview o documento cabe na coluna encolhido a 40–55% — legível como
   miniatura, não para ler. O visor abre a mesma folha por cima, com zoom. */
.btn__ico { display: inline-flex; align-items: center; margin-right: 2px; }
.side-toggle svg { margin: 0 auto; }
/* Linha da tira de dados: métrica, valor e o botão de remover. */
.tira-linha { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) 34px; gap: 8px; margin-bottom: 8px; align-items: start; }
.tira-linha [data-remover-linha] { padding: 8px 0; }
@media (max-width: 560px) { .tira-linha { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 30px; gap: 6px; } }

.doc-holder--amplia { cursor: zoom-in; }
.doc-holder--amplia iframe { pointer-events: none; }

.visor {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column;
  background: rgba(0, 31, 64, .82); backdrop-filter: blur(2px);
}
.visor__barra {
  flex-shrink: 0; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: var(--azul); color: #fff;
  border-bottom: 3px solid var(--verde); flex-wrap: wrap;
}
.visor__titulo {
  flex: 1; min-width: 0; font-size: 12px; font-weight: 600;
  letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.visor__zoom { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.visor__nivel { min-width: 46px; text-align: center; font-size: 11.5px; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.8); }
.visor__bt {
  min-width: 32px; height: 32px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.16); border-radius: 9px;
  background: rgba(255,255,255,.08); color: #fff;
  font: inherit; font-size: 15px; line-height: 1; cursor: pointer; text-decoration: none;
}
.visor__bt--txt { font-size: 11.5px; font-weight: 600; }
.visor__bt:hover { background: rgba(255,255,255,.18); text-decoration: none; color: #fff; }
.visor__fechar { font-size: 13px; }

/* O palco rola nos dois eixos: com zoom alto a folha passa da janela. */
/* `margin: auto` num filho flex centraliza SEM cortar: com `place-items:
   center`, quando a folha passa do palco o topo dela fica inalcançável. */
.visor__palco { flex: 1; min-height: 0; overflow: auto; display: flex; padding: 16px; }
.visor__folha { margin: auto; flex-shrink: 0; overflow: hidden; box-shadow: 0 18px 50px rgba(0,0,0,.45); background: #fff; }
.visor__folha iframe { width: 794px; height: 1123px; border: 0; display: block; transform-origin: top left; }

@media (max-width: 700px) {
  .visor__barra { gap: 6px; padding: 8px 10px; }
  .visor__titulo { flex-basis: 100%; order: -1; }
  .visor__bt--txt { padding: 0 8px; }
}

/* =====================================================================
   Telas estreitas
   -----------------------------------------------------------------
   Um item de grid tem `min-width: auto` e por isso NÃO encolhe abaixo do
   próprio min-content: um conteúdo largo (o iframe A4 de 794px, uma tabela,
   um texto sem ponto de quebra) estica a coluna e empurra a página inteira.
   Por isso todo grid que colapsa usa `minmax(0, 1fr)` e os contêineres de
   conteúdo largo levam `min-width: 0` — sem isso volta a rolagem lateral.
   ===================================================================== */

.card__title, .card__sub { min-width: 0; overflow-wrap: anywhere; }

/* O preview é uma folha A4 de largura fixa, escalada por transform — que não
   altera o tamanho de layout. Sem isto ele dita a largura da página. */
.doc-holder { min-width: 0; max-width: 100%; }

@media (max-width: 760px) {
  /* aspect-ratio 2.4/1 com min-height 320px equivale a exigir 768px de largura.
     Em tela estreita a matriz vira quase quadrada e cabe. */
  .matrix { padding: 0 0 30px 26px; }
  .matrix__plot { aspect-ratio: 1 / 1; min-height: 0; max-height: none; }
  .quad__act { display: none; }

  .wrap { padding: 22px 16px 56px; }
  .card__head { flex-wrap: wrap; gap: 4px 12px; }

  /* Na lista, o nome passa a quebrar. Cortar com reticências numa coluna
     estreita escondia justamente o que identifica a proposta. */
  .prow__name, .prow__meta {
    white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere;
  }
  .prow__code { overflow-wrap: anywhere; }

  /* O min-width de 130px serve aos formulários em tabela do desktop; no
     celular é ele que faz a tabela empurrar a página. */
  .grid-t td input, .grid-t td select { min-width: 0; width: 100%; }

  /* Última saída: não cabendo, a tabela rola dentro do card. */
  .card__body > table.grid-t { display: block; overflow-x: auto; }
}

@media (max-width: 560px) {
  .dotp__tip { max-width: 200px; }
  .wrap { padding: 18px 12px 48px; }
  .btn-row { flex-wrap: wrap; }
  .login-logo { width: 100%; max-width: 220px; }
}

/* Os três cenários de automação, lado a lado — a ordem na tela é a do
   otimismo crescente, e o papel de cada um fica escrito embaixo do nome:
   sem isso, três campos de % parecem intercambiáveis. */
.cenarios { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; }
.cenario { display: block; min-width: 0; }
.cenario__nome { display: block; font-size: 12px; font-weight: 600; color: var(--azul); }
.cenario__papel { display: block; margin-bottom: 5px; font-size: 10.5px; color: var(--hint); font-style: italic; }
.cenario input { width: 100%; }
