@font-face {
  font-family: "Google Sans";
  src: url("/painel/static/fonts/google-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0a1850;
  --navy-deep: #060d30;
  --navy-mid: #101f5f;
  --navy-light: #16226b;
  --navy-lighter: #24339c;
  --contraste: #ffffff;
  --bg: #f4f6fb;
  --card: #ffffff;
  --border: #e4e7f0;
  --text: #1c2233;
  --text-muted: #6b7189;
  --erro: #b3261e;
  --erro-bg: #fdecea;
  --sucesso: #1e7e34;
  --sucesso-bg: #e9f7ec;
  --radius: 10px;
  --sombra: 0 1px 3px rgba(10, 24, 80, 0.08), 0 1px 2px rgba(10, 24, 80, 0.06);
  --sombra-hover: 0 6px 16px rgba(10, 24, 80, 0.14);

  /* Escala tipográfica única — usar sempre uma destas variáveis em vez de
     valores soltos em rem, para não voltar a ter dezenas de tamanhos
     quase iguais (0.85/0.86/0.87/0.88rem etc.) espalhados pelo CSS. */
  --fs-2xs: 0.7rem; /* 11px — menor badge/pill possível */
  --fs-xs: 0.75rem; /* 12px — legendas, rótulos em maiúsculas, texto auxiliar */
  --fs-sm: 0.8125rem; /* 13px — texto secundário, botões, campos de formulário */
  --fs-base: 0.875rem; /* 14px — texto padrão do corpo, tabelas, links de menu */
  --fs-md: 0.9375rem; /* 15px — texto de destaque leve */
  --fs-lg: 1.0625rem; /* 17px — h2 / títulos de card */
  --fs-xl: 1.5rem; /* 24px — h1 / título de marca */
  --fs-2xl: 1.875rem; /* 30px — números grandes de destaque (cartões do dashboard) */
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Google Sans", "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: var(--fs-base);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Layout ---------- */

.app-shell {
  --sidebar-largura: 240px;
  --sidebar-largura-recolhida: 68px;
  min-height: 100vh;
}

.sidebar-recolhida {
  --sidebar-largura: var(--sidebar-largura-recolhida);
}

.app-corpo {
  min-height: 100vh;
  margin-left: var(--sidebar-largura);
  display: flex;
  flex-direction: column;
  transition: margin-left 0.16s ease;
}

/* ---------- Sidebar única e retrátil ---------- */
/* position: fixed (não sticky) de propósito — com a sidebar dentro de um
   contêiner flex, "sticky" ficou sujeito a inconsistências de repaint em
   alguns navegadores/engines; fixed é inequívoco e é o padrão usual para
   esse tipo de layout (sidebar + topbar sempre visíveis, conteúdo rola
   por baixo). */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-largura);
  background: linear-gradient(180deg, var(--navy-mid) 0%, var(--navy-deep) 100%);
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 8px rgba(6, 13, 48, 0.25);
  z-index: 20;
  transition: width 0.16s ease;
  overflow: hidden;
}

.sidebar-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1rem;
  flex: 0 0 auto;
}

.sidebar-marca {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow: hidden;
  white-space: nowrap;
}

/* Logo real da Bimark (wordmark) quando a sidebar está expandida; o
   quadrado com "B" fica reservado para o estado recolhido, onde só cabe
   um ícone quadrado — não temos uma versão só-símbolo do logo ainda. */
.sidebar-marca-icone {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: none;
  align-items: center;
  justify-content: center;
}

.sidebar-marca-logo {
  height: 26px;
  width: auto;
  display: block;
}

.sidebar-toggle {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 7px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s ease, transform 0.16s ease;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.sidebar-toggle svg {
  width: 16px;
  height: 16px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.4rem 0.7rem;
}

.sidebar-rodape {
  flex: 0 0 auto;
  padding: 0.6rem 0.7rem 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-grupo-titulo {
  color: rgba(255, 255, 255, 0.38);
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 600;
  padding: 0.9rem 0.6rem 0.4rem;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  font-size: var(--fs-base);
  margin-bottom: 0.15rem;
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  transition: background 0.14s ease, color 0.14s ease;
}

.sidebar-link svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sidebar-link.ativo {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 600;
}

.sidebar-logout-form {
  margin: 0;
}

/* Sidebar recolhida: só ícones, com tooltip nativo (title=""), texto/labels
   escondidos sem re-fluir o layout (mesma largura de linha, só encolhe a
   coluna). --sidebar-largura já é redefinida no #app-shell (regra acima),
   .sidebar e .app-corpo herdam o novo valor automaticamente. */
.sidebar-recolhida .sidebar-marca-logo,
.sidebar-recolhida .sidebar-link-texto,
.sidebar-recolhida .sidebar-grupo-titulo {
  display: none;
}

.sidebar-recolhida .sidebar-marca-icone {
  display: flex;
}

.sidebar-recolhida .sidebar-topo {
  justify-content: center;
}

.sidebar-recolhida .sidebar-toggle {
  transform: rotate(180deg);
}

.sidebar-recolhida .sidebar-link {
  justify-content: center;
}

/* ---------- Barra superior (topbar) ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-menu-mobile {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.topbar-busca {
  position: relative;
  flex: 1;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
}

.topbar-busca svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  color: var(--text-muted);
}

.topbar-busca input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-size: var(--fs-base);
  font-family: inherit;
  color: var(--text);
}

.topbar-busca-resultados {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--sombra-hover);
  overflow: hidden;
  z-index: 30;
}

.topbar-busca-item {
  display: block;
  padding: 0.6rem 0.9rem;
  font-size: var(--fs-base);
  color: var(--text);
  text-decoration: none;
}

.topbar-busca-item:hover {
  background: var(--bg);
}

.topbar-busca-vazio {
  padding: 0.6rem 0.9rem;
  font-size: var(--fs-base);
  color: var(--text-muted);
}

.topbar-acoes {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.topbar-icone-botao {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.topbar-icone-botao svg {
  width: 19px;
  height: 19px;
}

.topbar-icone-botao:hover {
  background: var(--bg);
  color: var(--navy);
}

.topbar-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--erro);
  color: #fff;
  font-size: var(--fs-2xs);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.topbar-dropdown-wrap {
  position: relative;
}

.topbar-usuario {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
}

.topbar-usuario:hover {
  background: var(--bg);
}

.topbar-usuario-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: var(--fs-base);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
}

.topbar-usuario-nome {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-usuario svg {
  width: 15px;
  height: 15px;
  color: var(--text-muted);
}

.topbar-dropdown {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  min-width: 260px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--sombra-hover);
  padding: 0.4rem;
  z-index: 30;
}

.topbar-dropdown-titulo {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.5rem 0.6rem 0.3rem;
}

.topbar-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.6rem;
  border-radius: 7px;
  color: var(--text);
  text-decoration: none;
  font-size: var(--fs-base);
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.topbar-dropdown-item:hover {
  background: var(--bg);
}

.topbar-dropdown-item-titulo {
  display: block;
  font-weight: 600;
}

.topbar-dropdown-item-sub {
  display: block;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.topbar-dropdown-vazio {
  padding: 0.6rem;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.topbar-dropdown-rodape {
  display: block;
  text-align: center;
  padding: 0.55rem 0.6rem 0.35rem;
  font-size: var(--fs-sm);
  color: var(--navy-lighter);
  text-decoration: none;
  font-weight: 500;
}

.topbar-dropdown-rodape:hover {
  text-decoration: underline;
}

.topbar-dropdown form {
  margin: 0;
}

.topbar-dropdown-item-botao {
  width: 100%;
}

.conteudo {
  flex: 1;
  padding: 2rem 2.5rem;
  min-width: 0;
}

.conteudo-sem-sidebar {
  flex: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 15% 20%, rgba(16, 31, 95, 0.05), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(16, 31, 95, 0.05), transparent 40%),
    var(--bg);
}

/* ---------- Tipografia ---------- */

h1 {
  color: var(--navy);
  font-size: var(--fs-xl);
  font-weight: 700;
  margin: 0 0 1.5rem;
  letter-spacing: -0.01em;
}

h2 {
  color: var(--navy);
  font-size: var(--fs-lg);
  font-weight: 600;
  margin: 0 0 0.75rem;
}

/* ---------- Cards ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--sombra);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.25rem;
}

/* Quando um formulário vem logo depois de texto/tabela dentro do mesmo
   card (ex.: dados do cliente + formulário de edição embaixo; lista de
   acessos do portal + formulário de convite embaixo), as margens
   colapsavam para os mesmos ~16px usados entre qualquer parágrafo —
   ficava tudo grudado, sem indicar que é uma seção diferente (dado
   exibido vs. ação de editar/criar). Uma linha divisória com respiro
   deixa isso claro. */
.card > p + form.formulario,
.card > .tabela-responsiva + form.formulario {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

/* ---------- Dashboard ---------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: linear-gradient(155deg, #ffffff 0%, #f8f9fd 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--sombra);
  padding: 1.1rem 1.3rem;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border-top: 3px solid var(--navy);
}

.stat-card:hover {
  box-shadow: var(--sombra-hover);
  transform: translateY(-2px);
}

.stat-card .numero {
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.stat-card .rotulo {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.stat-card.alerta {
  border-top-color: var(--erro);
}

.stat-card.alerta .numero {
  color: var(--erro);
}

.secao-titulo {
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
  margin: 1.75rem 0 0.6rem;
}

.dashboard-graficos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.grafico-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.grafico-card:hover {
  box-shadow: var(--sombra-hover);
  transform: translateY(-2px);
}

/* Altura fixa é essencial: o Chart.js (responsive + maintainAspectRatio
   false) mede a altura do elemento-pai do canvas para se redimensionar —
   sem essa altura fixa aqui, o pai cresce para caber o canvas e o canvas
   cresce para caber o pai, num loop que aumenta o gráfico a cada
   repintura até ocupar a tela toda. */
.grafico-wrapper {
  position: relative;
  height: 240px;
  width: 100%;
}

.grafico-card canvas {
  max-width: 100%;
}

.dashboard-tabelas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.dashboard-tabelas .card tbody tr {
  cursor: pointer;
}

/* ---------- Tabelas ---------- */

/* Toda tabela do painel fica dentro deste contêiner: a rolagem horizontal
   (quando necessária em telas estreitas) acontece só na tabela, nunca
   força a página inteira a rolar de lado. */
.tabela-responsiva {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--sombra);
}

.tabela-responsiva table {
  box-shadow: none;
  min-width: 560px;
}

/* Link "Ver todos..." logo depois de uma tabela (dashboard, listas
   resumidas) ficava colado embaixo dela, sem respiro nenhum — mesmo
   problema de fundo do card > p + form corrigido acima, agora para
   tabela + link. */
.tabela-responsiva + a.link {
  display: block;
  margin-top: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--sombra);
}

th, td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-base);
}

th {
  background: #f7f8fc;
  color: var(--text-muted);
  font-weight: 600;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: #fafbff;
}

a.link {
  color: var(--navy-lighter);
  font-weight: 500;
  text-decoration: none;
}

a.link:hover {
  text-decoration: underline;
}

/* ---------- Pills de status ---------- */

.pill {
  display: inline-block;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 600;
  background: #eef0f7;
  color: var(--text-muted);
  white-space: nowrap;
}

.pill-navy {
  background: var(--navy);
  color: #fff;
}

.pill-alerta {
  background: var(--erro-bg);
  color: var(--erro);
}

.pill-ok {
  background: var(--sucesso-bg);
  color: var(--sucesso);
}

/* ---------- Formulários ---------- */

form.formulario label {
  display: block;
  margin-top: 0.85rem;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-weight: 500;
}

form.formulario input,
form.formulario select,
form.formulario textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: var(--fs-md);
  margin-top: 0.25rem;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}

form.formulario input:focus,
form.formulario select:focus,
form.formulario textarea:focus {
  outline: none;
  border-color: var(--navy-lighter);
  box-shadow: 0 0 0 3px rgba(36, 51, 156, 0.15);
}

button.botao-primario {
  background: linear-gradient(135deg, var(--navy-mid), var(--navy-deep));
  color: #fff;
  border: none;
  padding: 0.6rem 1.3rem;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 1.1rem;
  font-size: var(--fs-md);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(10, 24, 80, 0.25);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

button.botao-primario:hover {
  box-shadow: 0 4px 10px rgba(10, 24, 80, 0.32);
  transform: translateY(-1px);
}

button.botao-perigo {
  background: #fff;
  color: var(--erro);
  border: 1px solid var(--erro);
  padding: 0.6rem 1.3rem;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 1.1rem;
  font-size: var(--fs-md);
  font-weight: 600;
  transition: background 0.15s ease;
}

button.botao-perigo:hover {
  background: var(--erro-bg);
}

/* ---------- Ações de revisão (relatórios) ---------- */

.acoes-revisao {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.acoes-revisao form {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.acoes-revisao button {
  margin-top: 0;
}

/* ---------- Mensagens ---------- */

.mensagem-erro {
  background: var(--erro-bg);
  color: var(--erro);
  border: 1px solid rgba(179, 38, 30, 0.25);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: var(--fs-base);
}

.mensagem-sucesso {
  background: var(--sucesso-bg);
  color: var(--sucesso);
  border: 1px solid rgba(30, 126, 52, 0.25);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: var(--fs-base);
}

/* ---------- Login ---------- */

.login-box {
  width: 100%;
  max-width: 360px;
  padding: 2.5rem;
  border: 1px solid var(--border);
}

.login-box .marca-login {
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-box .marca-login .nome {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--navy);
  display: block;
  letter-spacing: -0.01em;
}

.login-box .marca-login .sub {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- Formulário recolhível "+ Nova oportunidade" ---------- */

details.nova-oportunidade summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--navy);
  display: block;
  user-select: none;
}

details.nova-oportunidade summary::-webkit-details-marker {
  display: none;
}

details.nova-oportunidade summary::marker {
  content: "";
}

details.nova-oportunidade summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.5rem;
  transition: transform 0.12s ease;
}

details.nova-oportunidade[open] summary::before {
  transform: rotate(90deg);
}

details.nova-oportunidade[open] summary {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.formulario-grade {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 1.25rem;
}

.formulario-grade-full {
  grid-column: 1 / -1;
}

/* ---------- Kanban CRM (Funil) ---------- */

/* Grid em vez de flex com largura fixa: as colunas esticam para
   preencher toda a largura disponível (mesma largura da faixa do
   formulário "+ Nova oportunidade" logo acima, alinhadas de ponta a
   ponta) sempre que couberem 220px+ por coluna; em telas mais estreitas
   o grid quebra para menos colunas por linha, sem cortar nada. */
.kanban {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  align-items: start;
}

.kanban-coluna {
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  border-top: 3px solid var(--text-muted);
}

.kanban-coluna--slate { border-top-color: #64748b; }
.kanban-coluna--azul { border-top-color: #2563eb; }
.kanban-coluna--ambar { border-top-color: #d97706; }
.kanban-coluna--roxo { border-top-color: #7c3aed; }
.kanban-coluna--verde { border-top-color: #15803d; }

.kanban-coluna.arrastando-sobre {
  background: #eef1fb;
  border-top-width: 4px;
}

.kanban-coluna-cabecalho {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.kanban-coluna h2 {
  font-size: var(--fs-base);
  color: var(--navy);
  margin: 0;
}

.kanban-coluna-contagem {
  background: rgba(16, 31, 95, 0.08);
  color: var(--navy);
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
}

.kanban-coluna-total {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-weight: 600;
  padding-bottom: 0.6rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.kanban-coluna-corpo {
  min-height: 60px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.kanban-coluna-vazia {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-align: center;
  padding: 1rem 0;
  margin: 0;
}

.oportunidade-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.75rem 0.85rem;
  font-size: var(--fs-base);
  line-height: 1.45;
  box-shadow: var(--sombra);
  cursor: grab;
  transition: box-shadow 0.14s ease, transform 0.14s ease, opacity 0.14s ease;
}

.oportunidade-card:hover {
  box-shadow: var(--sombra-hover);
  transform: translateY(-1px);
}

.oportunidade-card.arrastando {
  opacity: 0.4;
}

.oportunidade-card-topo {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.oportunidade-marca {
  font-weight: 700;
  color: var(--text);
}

.oportunidade-avatar {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: #fff;
  font-size: var(--fs-2xs);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.oportunidade-avatar--0 { background: #2563eb; }
.oportunidade-avatar--1 { background: #7c3aed; }
.oportunidade-avatar--2 { background: #d97706; }
.oportunidade-avatar--3 { background: #15803d; }
.oportunidade-avatar--4 { background: #db2777; }
.oportunidade-avatar--5 { background: #0891b2; }

.oportunidade-prospect {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin-bottom: 0.4rem;
}

.oportunidade-valor {
  display: inline-block;
  background: var(--sucesso-bg);
  color: var(--sucesso);
  font-weight: 700;
  font-size: var(--fs-sm);
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  margin-bottom: 0.4rem;
}

.oportunidade-obs {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin-bottom: 0.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.oportunidade-mover {
  margin: 0.4rem 0 0;
}

.oportunidade-card select {
  width: 100%;
  padding: 0.3rem;
  border-radius: 5px;
  border: 1px solid var(--border);
  font-size: var(--fs-sm);
  background: #fff;
}

/* ---------- Responsivo ---------- */

@media (max-width: 900px) {
  .topbar-usuario-nome {
    display: none;
  }
  .topbar-busca {
    max-width: 220px;
  }
}

@media (max-width: 780px) {
  .app-shell {
    position: relative;
  }
  .topbar-menu-mobile {
    display: flex;
  }
  .topbar-busca {
    max-width: none;
  }
  /* Em telas estreitas a sidebar vira um painel deslizante por cima do
     conteúdo (não empurra mais o conteúdo com margin-left), aberto pelo
     botão de menu da topbar — em vez do modo "ícones + submenu lado a
     lado" de antes, que não cabia numa tela de celular. */
  .app-corpo {
    margin-left: 0;
  }
  .sidebar {
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.18s ease;
    z-index: 40;
  }
  .sidebar-aberta-mobile .sidebar {
    transform: translateX(0);
  }
  /* Especificidade igual à regra ".sidebar-recolhida .sidebar-link-texto"
     (2 classes) para conseguir vencê-la aqui embaixo no arquivo — no
     celular o texto do menu aparece sempre que o painel deslizante está
     aberto, mesmo que o estado "recolhida" do modo desktop esteja salvo
     no navegador do usuário. */
  .app-shell .sidebar-marca-logo {
    display: block;
  }
  .app-shell .sidebar-marca-icone {
    display: none;
  }
  .app-shell .sidebar-link-texto,
  .app-shell .sidebar-grupo-titulo {
    display: block;
  }
  .sidebar-toggle {
    display: none;
  }
  .conteudo {
    padding: 1.25rem;
  }
  .topbar {
    padding: 0.6rem 1rem;
  }
}
