/* Dash · identidade Fone Ninja (mesmos tokens do admin do MCP), só escuro.
   Poppins (SIL OFL 1.1) servida daqui mesmo: a CSP só permite font-src 'self'. */

@font-face { font-family: Poppins; font-style: normal; font-weight: 300; font-display: swap; src: url(../fonts/poppins-300.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/poppins-400.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/poppins-600.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/poppins-700.woff2) format("woff2"); }

:root {
  color-scheme: dark;

  --bg: #222222;
  --window: #2a2a2a;
  --field: #1b1b1b;
  --elev: #303030;

  --label-1: #ffffff;
  --label-2: rgba(255, 255, 255, 0.62);
  --label-3: rgba(255, 255, 255, 0.35);

  --fill-2: rgba(255, 255, 255, 0.08);
  --fill-3: rgba(255, 255, 255, 0.05);
  --hairline: rgba(255, 255, 255, 0.08);
  --edge: rgba(255, 255, 255, 0.1);
  --field-edge: rgba(255, 255, 255, 0.16);

  --neon: #51f37c;
  --on-neon: #222222;
  --neon-tint: rgba(81, 243, 124, 0.12);
  --neon-edge: rgba(81, 243, 124, 0.24);
  --focus: rgba(81, 243, 124, 0.45);

  --red-tint: rgba(255, 92, 92, 0.14);
  --red-text: #ff8a8a;

  --shadow-window: 0 24px 64px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4);
  --r-window: 24px;
  --r-field: 12px;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at center, #222222 0, #222222 22%, rgba(34, 34, 34, 0) 88%),
    linear-gradient(rgba(81, 243, 124, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(81, 243, 124, 0.05) 1px, transparent 1px);
  background-size: 100% 100%, 56px 56px, 56px 56px;
  background-attachment: fixed;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--label-1);
  font: 400 14px/20px Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Ícones */
.icone {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Marca */
.marca { font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; color: var(--label-1); }
.marca b { font-weight: 700; color: var(--neon); }

.produto {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--neon-edge);
  background: var(--neon-tint);
  color: var(--neon);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Botões */
.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 16px;
  border: 1px solid var(--field-edge);
  border-radius: 999px;
  background: transparent;
  color: var(--label-1);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, filter 0.15s, transform 0.15s;
}
.botao .icone { width: 16px; height: 16px; }
.botao:hover { background: var(--fill-2); }
.botao:active { transform: scale(0.98); }
.botao--neon { border-color: transparent; background: var(--neon); color: var(--on-neon); }
.botao--neon:hover { background: var(--neon); filter: brightness(1.08); }
.botao--cheio { width: 100%; height: 46px; margin-top: 24px; font-size: 15px; }

/* Entrar */
.entrar {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.folha {
  width: 100%;
  max-width: 400px;
  padding: 32px;
  border: 1px solid var(--edge);
  border-radius: var(--r-window);
  background: var(--window);
  box-shadow: var(--shadow-window);
  animation: surgir 0.35s ease-out both;
}

.folha__topo { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.folha__topo .marca { font-size: 22px; line-height: 28px; }
.folha__titulo { margin: 0 0 8px; font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.02em; }

.aviso {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  padding: 10px 12px;
  border-radius: var(--r-field);
  background: var(--red-tint);
  color: var(--red-text);
  font-size: 13px;
  font-weight: 600;
}

.campo { display: block; margin-top: 16px; }
.campo__rotulo { display: block; margin-bottom: 6px; color: var(--label-2); font-size: 13px; font-weight: 600; }

.campo__caixa {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--field-edge);
  border-radius: var(--r-field);
  background: var(--field);
  color: var(--label-3);
  transition: border-color 0.15s, box-shadow 0.15s, color 0.15s;
}
.campo__caixa:focus-within { border-color: var(--neon); box-shadow: 0 0 0 3px var(--focus); color: var(--neon); }

.campo__caixa input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--label-1);
  font: inherit;
  font-size: 15px;
}
.campo__caixa input:-webkit-autofill {
  -webkit-text-fill-color: var(--label-1);
  -webkit-box-shadow: 0 0 0 100px var(--field) inset;
  caret-color: var(--label-1);
}

/* Barra do app */
.topo {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--hairline);
  background: rgba(34, 34, 34, 0.82);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}

.topo__barra {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px 20px;
  width: min(72rem, 100% - 32px);
  margin: 0 auto;
  padding: 10px 0;
}

.topo__marca { justify-self: start; display: inline-flex; align-items: center; gap: 10px; font-size: 18px; line-height: 24px; text-decoration: none; }
.topo__lado { justify-self: end; display: flex; align-items: center; gap: 8px; }
.topo__lado form { margin: 0; }

.seg {
  justify-self: center;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
}
.seg__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  color: var(--label-2);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.seg__item .icone { width: 16px; height: 16px; }
.seg__item:hover { background: var(--fill-2); color: var(--label-1); }
.seg__item.is-on { background: var(--neon); color: var(--on-neon); font-weight: 700; }

.usuario {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--fill-3);
  color: var(--label-2);
  font-size: 13px;
  font-weight: 600;
}
.usuario .icone { width: 16px; height: 16px; }

@keyframes surgir {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .folha { padding: 24px; }
  .campo__caixa input { font-size: 16px; }
  .produto, .usuario { display: none; }
  .topo__barra { gap: 8px; }
  .topo .botao span { display: none; }
  .topo .botao { width: 34px; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------------------------------
   Telas internas: página, cartões, configurações, lista e formulário
   --------------------------------------------------------------------------------------- */

:root {
  --neon-soft: rgba(81, 243, 124, 0.08);
  --r-card: 18px;
}

.botao-redondo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--field-edge);
  border-radius: 999px;
  color: var(--label-2);
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.botao-redondo .icone { width: 18px; height: 18px; }
.botao-redondo:hover { background: var(--fill-2); color: var(--label-1); }
.botao-redondo.is-on { border-color: var(--neon-edge); background: var(--neon-tint); color: var(--neon); }
.botao-redondo--neon { border-color: transparent; background: var(--neon); color: var(--on-neon); }
.botao-redondo--neon:hover { background: var(--neon); color: var(--on-neon); filter: brightness(1.08); }

.botao--perigo { border-color: rgba(255, 92, 92, 0.35); color: var(--red-text); }
.botao--perigo:hover { background: var(--red-tint); }
.botao--perigo.is-armado { border-color: transparent; background: #e5484d; color: #ffffff; }

.pagina { width: min(72rem, 100% - 32px); margin: 0 auto; padding: 32px 0 64px; }
.pagina__topo { margin-bottom: 24px; }
.pagina__titulo { margin: 0; font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -0.02em; }

/* Monograma da fonte */
.monograma {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--neon-edge);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(81, 243, 124, 0.2), rgba(41, 130, 66, 0.12));
  color: var(--neon);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.monograma--grande { width: 52px; height: 52px; border-radius: 15px; font-size: 16px; }

.pilula {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--fill-3);
  color: var(--label-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.pilula .icone { width: 14px; height: 14px; }
.pilula--ok { background: var(--neon-tint); color: var(--neon); }

/* Cartões */
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.cartao {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--edge);
  border-radius: var(--r-card);
  background: var(--window);
  color: var(--label-1);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.cartao__topo { display: flex; align-items: center; gap: 12px; }
.cartao__nome { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.cartao__nome h2, .cartao__nome h3 { margin: 0; font-size: 16px; line-height: 22px; font-weight: 700; }
.cartao__texto { flex: 1; margin: 0; color: var(--label-2); font-size: 13px; line-height: 19px; }
.cartao__acoes { display: flex; }
.cartao__seta { color: var(--label-3); }
.cartao--link:hover { border-color: var(--neon-edge); transform: translateY(-1px); }
.cartao--link:hover .cartao__seta { color: var(--neon); }

/* Configurações */
.config { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; }
.config__titulo { margin: 0 0 16px; font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.02em; }
.config__menu nav { display: flex; flex-direction: column; gap: 2px; }
.config__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--label-2);
  font-weight: 600;
  text-decoration: none;
}
.config__item:hover { background: var(--fill-3); color: var(--label-1); }
.config__item.is-on { background: var(--neon-tint); color: var(--neon); }
.config__conteudo { min-width: 0; }
.config__conteudo > .aviso { margin: 0 0 16px; }

.secao__topo { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.secao__titulo { margin: 0; font-size: 20px; line-height: 26px; font-weight: 700; letter-spacing: -0.01em; }
.secao__sub { margin: 2px 0 0; color: var(--label-2); font-size: 13px; }

.voltar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 14px;
  color: var(--label-2);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.voltar .icone { width: 16px; height: 16px; }
.voltar:hover { color: var(--neon); }

.etiqueta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  margin-bottom: 14px;
  padding: 0 8px 0 12px;
  border: 1px solid var(--neon-edge);
  border-radius: 999px;
  background: var(--neon-tint);
  color: var(--neon);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.etiqueta .icone { width: 14px; height: 14px; }

/* Lista (sem fio entre as linhas; destaque no hover) */
.lista { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.linha {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 16px;
  padding: 12px 12px 12px 14px;
  border: 1px solid var(--edge);
  border-radius: 16px;
  background: var(--window);
  transition: border-color 0.15s, background-color 0.15s;
}
.linha:hover { border-color: rgba(255, 255, 255, 0.16); background: var(--elev); }
.linha.is-off .monograma { filter: grayscale(1); opacity: 0.55; }
.linha__nome { display: flex; flex-direction: column; min-width: 0; color: var(--label-1); text-decoration: none; }
.linha__nome strong { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.linha__nome span { color: var(--label-2); font-size: 12px; }
.linha__quando { color: var(--label-3); font-size: 12px; white-space: nowrap; }
.lapis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--neon);
}
.lapis:hover { background: var(--neon-tint); }

.vazio {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 16px;
  border: 1px solid var(--edge);
  border-radius: var(--r-card);
  background: var(--window);
  color: var(--label-2);
  text-align: center;
}
.vazio p { margin: 0; }
.icone--grande { width: 32px; height: 32px; color: var(--label-3); }

/* Formulário */
.folha--form { max-width: 560px; padding: 28px; animation: none; }
.folha--centro { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.folha--centro .marca { font-size: 22px; line-height: 28px; }
.form__topo { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.form__autoria { margin: 20px 0 0; color: var(--label-3); font-size: 12px; line-height: 17px; }
.form__rodape { display: flex; align-items: center; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--hairline); }
.form__espaco { flex: 1; }

.campo__rotulo em { color: var(--label-3); font-style: normal; font-weight: 400; }
.campo__erro { display: block; margin-top: 6px; color: var(--red-text); font-size: 12px; font-weight: 600; }
.campo__dica { display: block; margin-top: 6px; color: var(--label-3); font-size: 12px; }
.campo.is-erro .campo__caixa { border-color: rgba(255, 92, 92, 0.6); }

.aviso--ok { background: var(--neon-tint); color: var(--neon); }

/* Chave liga/desliga (checkbox com pele da casa) */
.chave { position: relative; display: inline-flex; align-items: center; gap: 10px; margin-top: 20px; font-weight: 600; cursor: pointer; }
.chave input { position: absolute; opacity: 0; pointer-events: none; }
.chave__trilho {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--fill-2);
  transition: background-color 0.15s;
}
.chave__trilho::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  content: "";
  transition: transform 0.18s ease;
}
.chave input:checked + .chave__trilho { background: var(--neon); }
.chave input:checked + .chave__trilho::after { transform: translateX(18px); }
.chave input:focus-visible + .chave__trilho { outline: 3px solid var(--focus); outline-offset: 2px; }

@media (max-width: 860px) {
  .config { grid-template-columns: 1fr; gap: 16px; }
  .config__menu nav { flex-direction: row; }
  .config__titulo { margin-bottom: 8px; }
  .linha { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .linha__quando { display: none; }
}

@media (max-width: 640px) {
  .pagina { padding-top: 24px; }
  .seg__item span { display: none; }
  .seg__item { padding: 5px 10px; }
  .linha { gap: 10px; }
  .linha .pilula { display: none; }
  .folha--form { padding: 20px; }
  .form__rodape { flex-wrap: wrap; }
}

/* ---------------------------------------------------------------------------------------
   v1.2: barra só com marca + versão e o avatar; menu da conta; busca; sugestões
   --------------------------------------------------------------------------------------- */

.topo__barra { display: flex; justify-content: space-between; }
.topo .produto { display: inline-flex; letter-spacing: 0.04em; }

/* Avatar redondo (estilo Apple), degradê neon -> verde da marca */
.conta { position: relative; }
.conta > summary { list-style: none; }
.conta > summary::-webkit-details-marker { display: none; }
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(145deg, #51f37c 0%, #3fcf68 45%, #298242 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 10px rgba(0, 0, 0, 0.35);
  color: #0d2a15;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.avatar:hover { transform: scale(1.05); }
.conta[open] .avatar { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 0 3px var(--focus); }

.conta__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  min-width: 210px;
  padding: 6px;
  border: 1px solid var(--edge);
  border-radius: 16px;
  background: rgba(42, 42, 42, 0.96);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-window);
  animation: surgir 0.15s ease-out both;
}
.conta__menu form { margin: 0; }
.conta__nome {
  margin: 0;
  padding: 8px 10px 8px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 4px;
  color: var(--label-2);
  font-size: 12px;
  font-weight: 600;
}
.conta__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--label-1);
  font: inherit;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.conta__item:hover { background: var(--fill-2); }
.conta__item .icone { color: var(--neon); }

/* Busca com lupa, largura fixa */
.secao__acoes { display: flex; align-items: center; gap: 10px; }
.busca {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 260px;
  height: 36px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--field-edge);
  border-radius: 999px;
  background: var(--field);
  color: var(--label-3);
  transition: border-color 0.15s, box-shadow 0.15s, color 0.15s;
}
.busca:focus-within { border-color: var(--neon); box-shadow: 0 0 0 3px var(--focus); color: var(--neon); }
.busca .icone { width: 16px; height: 16px; }
.busca input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--label-1);
  font: inherit;
  font-size: 14px;
}
.busca input::-webkit-search-cancel-button { display: none; }
.busca__limpar { display: inline-flex; color: var(--label-3); }
.busca__limpar:hover { color: var(--label-1); }

/* Sugestões v2: lista em linhas como a de Webhooks, abas por situação e o ⋯ com
   Concluir, Rejeitar (motivo abre no próprio menu), Reabrir e Excluir */
.linha.sugestao { grid-template-columns: auto minmax(0, 1fr) auto; }
.linha.sugestao--concluida,
.linha.sugestao--rejeitada { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.sugestao--rejeitada .monograma { filter: grayscale(1); opacity: 0.55; }
.sugestao__corpo { display: flex; flex-direction: column; min-width: 0; }
.sugestao__corpo > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugestao__corpo strong { font-weight: 600; }
.sugestao__texto { color: var(--label-2); font-size: 13px; line-height: 19px; }
.sugestao__meta { margin-top: 2px; color: var(--label-3); font-size: 12px; line-height: 17px; }
.sugestao__corpo > .sugestao__motivo {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--label-2);
  font-size: 12px;
  line-height: 17px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.sugestao__motivo em { color: var(--label-3); font-style: normal; }
.sugestao__fecho { display: flex; align-items: center; gap: 10px; color: var(--label-3); font-size: 12px; white-space: nowrap; }
.linha .sugestao__fecho .pilula { display: inline-flex; }

.linha.sugestao .conta__menu { min-width: 240px; }
.submenu > summary { list-style: none; }
.submenu > summary::-webkit-details-marker { display: none; }
.submenu[open] > summary { background: var(--fill-2); }
.submenu__form { display: flex; flex-direction: column; gap: 8px; padding: 8px 4px 6px; }
.submenu__campo {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--field-edge);
  border-radius: 10px;
  outline: 0;
  background: var(--field);
  color: var(--label-1);
  font: inherit;
  font-size: 14px;
}
.submenu__campo::placeholder { color: var(--label-3); }
.submenu__campo:focus { border-color: var(--neon); box-shadow: 0 0 0 3px var(--focus); }
.submenu__form .botao { align-self: flex-end; height: 32px; }

@media (max-width: 640px) {
  .linha.sugestao--concluida,
  .linha.sugestao--rejeitada { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 8px; }
  .sugestao__fecho { flex-wrap: wrap; grid-column: 2; grid-row: 2; row-gap: 4px; }
  .submenu__campo { font-size: 16px; }
}

.monograma .icone { width: 22px; height: 22px; }

.campo__caixa--area { height: auto; padding: 10px 14px; align-items: stretch; }
.campo__caixa--area textarea {
  flex: 1;
  min-height: 110px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--label-1);
  font: inherit;
  font-size: 15px;
  line-height: 21px;
  resize: vertical;
}

@media (max-width: 640px) {
  .secao__topo { flex-wrap: wrap; }
  .secao__acoes { width: 100%; }
  .busca { flex: 1; width: auto; }
}

/* ---------------------------------------------------------------------------------------
   v1.3: teste de conexão, webhooks (endereço copiável, escolha da fonte, entregas)
   --------------------------------------------------------------------------------------- */

.pilula--erro { background: var(--red-tint); color: var(--red-text); }
.linha__pilulas { display: inline-flex; gap: 6px; }
.aviso--erro { background: var(--red-tint); color: var(--red-text); }

.teste {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 20px;
  padding: 14px;
  border: 1px solid var(--edge);
  border-radius: var(--r-field);
  background: var(--fill-3);
}
.teste__info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.teste__texto { color: var(--label-2); font-size: 12px; }

.copiavel {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 14px;
  border: 1px solid var(--neon-edge);
  border-radius: var(--r-field);
  background: var(--field);
}
.copiavel__texto {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--neon);
  font: 13px/18px ui-monospace, "SF Mono", Menlo, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: all;
}
.botao.is-copiado { border-color: var(--neon-edge); background: var(--neon-tint); color: var(--neon); }

.escolha { margin: 16px 0 0; padding: 0; border: 0; }
.escolha .campo__rotulo { padding: 0; }
.escolha__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--field-edge);
  border-radius: var(--r-field);
  background: var(--field);
  cursor: pointer;
}
.escolha__item input { position: absolute; opacity: 0; pointer-events: none; }
.escolha__item span { flex: 1; }
.escolha__marca { color: var(--label-3); opacity: 0; }
.escolha__item:has(input:checked) { border-color: var(--neon); box-shadow: 0 0 0 3px var(--focus); }
.escolha__item:has(input:checked) .escolha__marca { color: var(--neon); opacity: 1; }

.entregas { max-width: 760px; margin-top: 32px; }
.entrega {
  margin-bottom: 6px;
  border: 1px solid var(--edge);
  border-radius: 14px;
  background: var(--window);
}
.entrega > summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  list-style: none;
  cursor: pointer;
}
.entrega > summary::-webkit-details-marker { display: none; }
.entrega__hora { color: var(--label-2); font-size: 12px; white-space: nowrap; }
.entrega__tipo { flex: 1; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.entrega__tamanho { color: var(--label-3); font-size: 12px; }
.entrega__seta { width: 16px; height: 16px; color: var(--label-3); transition: transform 0.15s; }
.entrega[open] .entrega__seta { transform: rotate(90deg); color: var(--neon); }
.json {
  max-height: 420px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border-top: 1px solid var(--hairline);
  color: var(--mint, #ddfbe1);
  font: 12px/18px ui-monospace, "SF Mono", Menlo, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .linha__pilulas .pilula:first-child:not(:last-child) { display: none; }
  .copiavel { flex-wrap: wrap; }
}

/* ---------------------------------------------------------------------------------------
   v1.4: menu ⋯ nas linhas, resumo e cabeçalhos das entregas
   --------------------------------------------------------------------------------------- */

.icone .cheio { fill: currentColor; stroke: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu[open] > .botao-redondo { border-color: var(--neon-edge); background: var(--neon-tint); color: var(--neon); }
.linha .conta__menu { z-index: 30; min-width: 220px; }
.conta__item--perigo, .conta__item--perigo .icone { color: var(--red-text); }
.conta__item--perigo.is-armado { background: #e5484d; color: #ffffff; }
.conta__item--perigo.is-armado .icone { color: #ffffff; }
.conta__item.is-copiado { color: var(--neon); }

.entrega__cabecalhos {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--hairline);
  color: var(--label-3);
  font: 11px/16px ui-monospace, "SF Mono", Menlo, monospace;
}

/* v1.5: Visualizar do webhook só leitura; copiar o conteúdo de cada entrega */
.webhook .form__topo { align-items: center; }
.webhook__titulo { flex: 1; min-width: 0; }
.webhook__ativo { margin: 0; }
.webhook__ativo .chave { margin-top: 0; }
.botao-icone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--label-3);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.botao-icone .icone { width: 16px; height: 16px; }
.botao-icone span:empty { display: none; }
.botao-icone:hover { background: var(--fill-2); color: var(--label-1); }
.botao-icone.is-copiado { background: var(--neon-tint); color: var(--neon); }
@media (max-width: 640px) {
  .webhook .form__topo { flex-wrap: wrap; }
}

/* v1.5.1: cabeça do Visualizar numa linha só (nome · link com copiar · Ativo/Inativo) */
.webhook-cabeca {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: none;
  padding: 16px 20px;
  animation: none;
}
.webhook-cabeca .webhook__titulo { flex: 0 1 auto; min-width: 0; }
.webhook-cabeca .secao__titulo { white-space: nowrap; }
.webhook__link { flex: 1; min-width: 180px; padding: 4px 4px 4px 14px; }
.webhook__link .botao-icone { height: 32px; }
.webhook-cabeca .webhook__ativo .chave { margin-top: 0; white-space: nowrap; }
@media (max-width: 860px) {
  .webhook-cabeca { flex-wrap: wrap; }
  .webhook__link { order: 3; flex-basis: 100%; }
  .webhook-cabeca .webhook__ativo { margin-left: auto; }
}
@media (max-width: 860px) {
  .config__menu nav { flex-wrap: wrap; }
  .webhook-cabeca .webhook__titulo { flex: 1 1 0; }
  .webhook-cabeca .secao__titulo { white-space: normal; }
}

/* v1.6: etiqueta do funil (vem do link) na linha da entrega */
.entrega__funil { flex: none; height: 22px; font-size: 11px; background: var(--neon-tint); color: var(--neon); }
@media (max-width: 640px) { .entrega__funil { display: none; } }

/* ---------------------------------------------------------------------------------------
   v1.7: governança — Clientes, ficha do cliente, Contatos, números e importação do Clint
   --------------------------------------------------------------------------------------- */

.topo__barra { display: grid; grid-template-columns: 1fr auto 1fr; }
.topo .conta { justify-self: end; }
.topo__nav .seg__item { padding: 6px 16px; }

.gov__aviso { margin: 0 0 16px; }
.pagina .secao__topo { margin-bottom: 16px; }

/* Filtro em pílulas, com o número de cada um */
.seg--filtro { display: inline-flex; margin-bottom: 16px; }
.seg--filtro .seg__item b { margin-left: 2px; color: var(--label-3); font-weight: 600; }
.seg--filtro .seg__item.is-on b { color: var(--on-neon); opacity: 0.7; }

/* Tabela (sem fio entre as linhas; destaque no hover) */
.tabela-caixa {
  overflow-x: auto;
  border: 1px solid var(--edge);
  border-radius: var(--r-card);
  background: var(--window);
}
.tabela { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 18px; }
.tabela th {
  padding: 12px 14px 8px;
  color: var(--label-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.tabela td { padding: 9px 14px; vertical-align: middle; }
.tabela tbody tr { transition: background-color 0.12s; }
.tabela tbody tr:hover { background: var(--fill-3); }
.tabela tbody tr:last-child td { padding-bottom: 12px; }
.tabela .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabela strong { font-weight: 600; }
.fraco { color: var(--label-3); }
.ganhos { color: var(--neon); font-size: 12px; }
.pilulas { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.codigo { color: var(--neon); font: 12px/18px ui-monospace, "SF Mono", Menlo, monospace; }
.ligacao { display: block; margin-top: 2px; font-size: 12px; text-decoration: none; }
.ligacao:hover { color: var(--neon); }

/* Pessoa: iniciais redondas + nome (cliente com conta ganha o neon) */
.pessoa { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--label-1); text-decoration: none; }
.pessoa strong { overflow: hidden; max-width: 320px; text-overflow: ellipsis; white-space: nowrap; }
.pessoa:hover strong { color: var(--neon); }
.iniciais {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--fill-2);
  color: var(--label-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.iniciais--cliente { background: linear-gradient(145deg, #51f37c, #298242); color: var(--on-neon); }
.iniciais--grande { width: 52px; height: 52px; font-size: 17px; }

/* Páginas */
.paginas { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.paginas__conta { margin-right: 4px; color: var(--label-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.botao-redondo.is-desligado { opacity: 0.35; }

/* Importação do Clint (última rodada + bolinha) */
.importacao { display: flex; align-items: center; gap: 8px; }
.importacao form { margin: 0; }
.importacao__quando { color: var(--label-3); font-size: 12px; white-space: nowrap; }
.importacao .botao-redondo { background: transparent; font: inherit; cursor: pointer; }
.importacao .botao-redondo:disabled { cursor: default; }
.is-girando .icone { color: var(--neon); animation: girar 1.1s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.pulso { width: 7px; height: 7px; border-radius: 999px; background: var(--neon); animation: pulsar 1.2s ease-in-out infinite; }
@keyframes pulsar { 50% { opacity: 0.25; } }

/* Ficha do cliente */
.pagina > .voltar { margin-bottom: 14px; }
.ficha { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.ficha__nome { flex: 1; min-width: 0; }
.ficha__nome .pagina__titulo { overflow-wrap: anywhere; }

.numeros {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 0 0 28px;
}
.numero {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--edge);
  border-radius: 16px;
  background: var(--window);
  color: var(--label-1);
  text-decoration: none;
}
.numero dt { color: var(--label-2); font-size: 12px; font-weight: 600; }
.numero dd { margin: 0; font-size: 24px; line-height: 30px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.numero--link { transition: border-color 0.15s, transform 0.15s; }
.numero--link:hover { border-color: var(--neon-edge); transform: translateY(-1px); }
.numero--link:hover dd { color: var(--neon); }

.bloco { margin-bottom: 28px; }
.bloco__titulo { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 16px; line-height: 22px; font-weight: 700; }
.bloco__titulo .icone { width: 18px; height: 18px; color: var(--neon); }
.bloco__vazio { margin: 0; padding: 16px; border: 1px dashed var(--edge); border-radius: 14px; color: var(--label-3); }
.bloco__sub { display: block; margin-top: 2px; font-size: 11px; }
.bloco__sobre { display: block; font-size: 11px; letter-spacing: 0.02em; text-transform: uppercase; }

.grade--contatos { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.contato { gap: 10px; padding: 14px 16px; }
.contato__topo { display: flex; align-items: center; gap: 10px; }
.contato__topo strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contato__topo .fraco { font-size: 12px; white-space: nowrap; }

.pontos { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; padding: 0; list-style: none; }
.pontos--lista { flex-direction: column; gap: 2px; }
.ponto { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--label-2); font-size: 12px; white-space: nowrap; }
.ponto .icone { flex: none; width: 14px; height: 14px; color: var(--label-3); }
.pontos--lista .ponto { gap: 8px; color: var(--label-1); font-size: 13px; }
.pontos--lista .ponto > span { overflow: hidden; text-overflow: ellipsis; }
.pontos--lista .botao-icone { height: 26px; margin-left: auto; opacity: 0; }
.pontos--lista .ponto:hover .botao-icone, .pontos--lista .botao-icone:focus-visible, .pontos--lista .botao-icone.is-copiado { opacity: 1; }

@media (max-width: 860px) {
  .col-opc { display: none; }
}
@media (max-width: 640px) {
  .topo__barra { grid-template-columns: auto 1fr auto; }
  .topo__nav { justify-self: center; }
  .topo__nav .seg__item { padding: 5px 10px; }
  .topo .produto { display: none; }
  .seg--filtro { display: flex; }
  .seg--filtro .seg__item { flex: 1; justify-content: center; }
  .importacao__quando { display: none; }
  .pessoa strong { max-width: 160px; }
  .ficha { flex-wrap: wrap; }
  .numeros { grid-template-columns: repeat(2, 1fr); }
  .pontos--lista .botao-icone { opacity: 1; }
}

/* ---------------------------------------------------------------------------------------
   v1.8: barra Dashboard | Base; Dashboard (Geral, Comercial, Marketing, TV); a Base,
   uma tabela só com entidade, busca, ⋯ de filtros e colunas, etiquetas e esqueleto
   --------------------------------------------------------------------------------------- */

:root {
  --linha-hover: #353535; /* fill-3 sobre a janela: a 1ª coluna fixa acompanha o hover */
  --osso: rgba(255, 255, 255, 0.06);
  --osso-brilho: rgba(255, 255, 255, 0.15);
}

/* Dashboard */
.dash__ola { margin: 0 0 2px; color: var(--label-2); font-size: 14px; line-height: 20px; }
.dash__ola strong { color: var(--neon); font-weight: 600; }
.dash__abas { margin-bottom: 20px; }
.numeros--geral { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.numero--neon dd { color: var(--neon); }
.vazio__titulo { color: var(--label-1); font-size: 16px; font-weight: 700; }

/* TV: tela cheia, legível de longe */
.tv {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.6vw, 40px);
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(16px, 3vw, 48px);
}
.tv__topo { display: flex; align-items: center; gap: 16px; }
.tv__topo .marca { font-size: clamp(18px, 2vw, 30px); line-height: 1.2; }
.tv__hora { margin-left: auto; color: var(--label-3); font-size: clamp(13px, 1.2vw, 20px); font-variant-numeric: tabular-nums; }
.tv__sair {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--label-3);
  opacity: 0.5;
  text-decoration: none;
  transition: opacity 0.15s, background-color 0.15s, color 0.15s;
}
.tv__sair:hover, .tv__sair:focus-visible { background: var(--fill-2); color: var(--label-1); opacity: 1; }

/* Base: cabeçalho (título + entidade à esquerda; busca + ⋯ à direita) */
.base__cabeca { margin: 0; }
.base__titulo { min-width: 0; }
.base__linha { display: flex; align-items: center; gap: 12px; }

.entidade > summary { list-style: none; }
.entidade > summary::-webkit-details-marker { display: none; }
.entidade__botao {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--neon-edge);
  border-radius: 999px;
  background: var(--neon-tint);
  color: var(--neon);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.15s, box-shadow 0.15s;
}
.entidade__botao .icone { width: 16px; height: 16px; }
.entidade__botao:hover { background: rgba(81, 243, 124, 0.18); }
.entidade[open] .entidade__botao { box-shadow: 0 0 0 3px var(--focus); }
.entidade__seta { transition: transform 0.15s; }
.entidade[open] .entidade__seta { transform: rotate(180deg); }
.entidade__menu { right: auto; left: 0; z-index: 30; min-width: 220px; }
.conta__item.is-on { color: var(--neon); }
.entidade__marca { margin-left: auto; }

/* ⋯: painel de filtros e colunas */
.ajustes .painel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: 340px;
  max-height: min(72vh, 600px);
  border: 1px solid var(--edge);
  border-radius: 20px;
  background: rgba(42, 42, 42, 0.97);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-window);
  animation: surgir 0.15s ease-out both;
}
.painel__corpo { flex: 1; min-height: 0; padding: 6px 10px 10px; overflow-y: auto; overscroll-behavior: contain; }
.painel__titulo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 6px 8px;
  color: var(--label-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 16px;
  text-transform: uppercase;
}
.painel__titulo .icone { width: 14px; height: 14px; color: var(--neon); }
.painel__grupo { display: flex; flex-direction: column; gap: 2px; padding: 4px; border-radius: 14px; background: var(--fill-3); }
.painel__rodape { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--hairline); }
.painel__rodape .botao { flex: 1; }

.filtro > summary { list-style: none; }
.filtro > summary::-webkit-details-marker { display: none; }
.filtro__linha {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}
.filtro__linha:hover { background: var(--fill-2); }
.filtro__linha.is-off { color: var(--label-3); cursor: default; }
.filtro__linha.is-off:hover { background: transparent; }
.filtro__rotulo { flex: none; }
.filtro__valor {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--label-2);
  font-weight: 400;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filtro__valor.is-on { color: var(--neon); font-weight: 600; }
.filtro__seta { width: 14px; height: 14px; color: var(--label-3); transition: transform 0.15s; }
.filtro[open] .filtro__seta { color: var(--neon); transform: rotate(90deg); }
.filtro__opcoes {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: 232px;
  margin: 2px 0 6px;
  padding: 4px;
  overflow-y: auto;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.24);
  overscroll-behavior: contain;
}

/* Opção da casa (rádio ou caixa): o input nativo fica escondido, a marca mostra a escolha */
.opcao {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--label-2);
  cursor: pointer;
}
.opcao:hover { background: var(--fill-2); color: var(--label-1); }
.opcao input { position: absolute; opacity: 0; pointer-events: none; }
.opcao__texto { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.opcao__texto small { display: block; color: var(--label-3); font-size: 11px; line-height: 14px; text-transform: uppercase; letter-spacing: 0.02em; }
.opcao__marca { width: 16px; height: 16px; color: var(--neon); opacity: 0; }
.opcao:has(input:checked) { color: var(--label-1); font-weight: 600; }
.opcao:has(input:checked) .opcao__marca { opacity: 1; }
.opcao:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: -2px; }
.opcao__caixa {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--field-edge);
  border-radius: 999px;
  transition: background-color 0.12s, border-color 0.12s;
}
.opcao__caixa .icone { width: 13px; height: 13px; stroke-width: 2.4; color: var(--on-neon); opacity: 0; }
.opcao:has(input:checked) .opcao__caixa { border-color: var(--neon); background: var(--neon); }
.opcao:has(input:checked) .opcao__caixa .icone { opacity: 1; }
.opcao.is-fixa { cursor: default; }
.opcao.is-fixa:hover { background: transparent; }
.opcao.is-fixa .opcao__caixa { opacity: 0.45; }

/* Filtros ativos: etiquetas que tiram o filtro */
.etiquetas { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 16px; }
.etiqueta--filtro { height: 30px; margin: 0; padding: 0 8px 0 12px; transition: background-color 0.15s; }
.etiqueta--filtro span { color: var(--label-2); font-weight: 500; }
.etiqueta--filtro b { color: var(--neon); font-weight: 700; }
.etiqueta--filtro .icone { color: var(--neon); }
.etiqueta--filtro:hover { background: rgba(81, 243, 124, 0.2); }
.etiqueta--filtro:hover .icone { color: var(--label-1); }
.etiquetas__limpar { padding: 0 6px; color: var(--label-2); font-size: 12px; font-weight: 600; text-decoration: none; }
.etiquetas__limpar:hover { color: var(--neon); }

/* Carregando: esqueleto com brilho no lugar da tabela. Sem animação (ou com movimento
   reduzido) a tabela aparece direto; o esqueleto só vive enquanto a animação dura. */
.carga { display: grid; }
.carga > * { grid-area: 1 / 1; min-width: 0; }
.carga__esqueleto { align-self: start; visibility: hidden; pointer-events: none; animation: carga-esqueleto 0.35s step-end; }
.carga__conteudo { animation: carga-revela 0.25s ease-out 0.35s backwards; }
@keyframes carga-esqueleto {
  0%, 100% { visibility: visible; }
}
@keyframes carga-revela {
  from { opacity: 0; transform: translateY(4px); }
}
.carga.is-carregando .carga__esqueleto { visibility: visible; animation: none; }
.carga.is-carregando .carga__conteudo { visibility: hidden; animation: none; }

.osso {
  display: inline-block;
  width: 72px;
  height: 10px;
  border-radius: 999px;
  vertical-align: middle;
  background: linear-gradient(100deg, var(--osso) 30%, var(--osso-brilho) 50%, var(--osso) 70%) 0 0 / 300% 100%;
  animation: brilho 1.4s ease-in-out infinite;
}
.osso--1 { width: 64px; }
.osso--2 { width: 96px; }
.osso--3 { width: 44px; }
.osso--4 { width: 120px; }
.osso--num { width: 28px; }
.osso--bola { width: 30px; height: 30px; margin-right: 10px; }
.carga__esqueleto td { height: 48px; }
@keyframes brilho {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}

/* A tabela da Base: uma linha por registro, a 1ª coluna fica parada ao rolar para o lado */
.tabela--base th, .tabela--base td { white-space: nowrap; }
.tabela--base th:first-child, .tabela--base td:first-child { position: sticky; left: 0; z-index: 1; background: var(--window); }
.tabela--base tbody tr:hover td:first-child { background: var(--linha-hover); }
.tabela--base tr[data-href] { cursor: pointer; }
.tabela--base .pilulas { flex-wrap: nowrap; }
.pessoa__nome { display: flex; flex-direction: column; min-width: 0; }
.pessoa__nome small { overflow: hidden; color: var(--label-3); font-size: 11px; line-height: 14px; text-overflow: ellipsis; }
.duas-linhas { display: flex; flex-direction: column; }
.duas-linhas small { color: var(--label-3); font-size: 10px; letter-spacing: 0.03em; line-height: 14px; text-transform: uppercase; }
.col-ultimo, .col-desde, .col-criado, .col-fechado { color: var(--label-2); }
.tabela--base th, .tabela--base td { padding-right: 12px; padding-left: 12px; }
.duas-linhas > span, .duas-linhas small { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }

/* Abas em pílula: no celular ocupam a largura toda (o Chrome novo centraliza bloco com
   justify-self, herdado do .seg da barra) */
.seg--filtro { justify-self: start; }

@media (max-width: 860px) {
  .numeros--geral { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .numeros--geral { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .numeros--geral > :last-child { grid-column: span 2; }
  .dash__abas .seg__item { padding: 5px 8px; }
  .seg--filtro { justify-self: stretch; }
  .dash__topo { flex-wrap: nowrap; align-items: flex-end; }
  .dash__topo .secao__acoes { width: auto; }
  .base__titulo { width: 100%; }
  .ajustes[open]::before { position: fixed; inset: 0; z-index: 29; background: rgba(0, 0, 0, 0.5); content: ""; }
  .ajustes .painel { position: fixed; top: auto; right: 16px; bottom: 16px; left: 16px; width: auto; max-height: min(78vh, 640px); }
}

/* Tabela de verdade pede largura: barra e página crescem juntas, alinhadas */
.topo__barra, .pagina { width: min(80rem, 100% - 32px); }

/* ---------------------------------------------------------------------------------------
   v1.9: Fontes como entidade única (linhas que abrem), sino de notificações, Atualizações
   e a pílula da versão como link
   --------------------------------------------------------------------------------------- */

.topo__marca .marca { text-decoration: none; }
.topo .produto { text-decoration: none; transition: background-color 0.15s, border-color 0.15s; }
.topo .produto:hover { border-color: var(--neon); background: rgba(81, 243, 124, 0.2); }

/* Sino */
.sino__botao { position: relative; background: transparent; }
.sino__numero {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--neon);
  box-shadow: 0 0 0 2px var(--bg);
  color: var(--on-neon);
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.sino__menu { width: 340px; max-height: min(70vh, 520px); overflow-y: auto; overscroll-behavior: contain; }
.sino__lista { margin: 0; padding: 0; list-style: none; }
/* Cada notificação é um botão: verde enquanto nova; clicou, fica cinza (lida) */
.sino__item {
  display: flex;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--label-2);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.sino__item:hover { background: var(--fill-2); }
.sino__item.is-nova { color: var(--label-1); }
.sino__ponto { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 999px; background: var(--label-3); }
.sino__item.is-nova .sino__ponto { background: var(--neon); box-shadow: 0 0 8px rgba(81, 243, 124, 0.6); }
.sino__item--erro.is-nova .sino__ponto { background: #ff5c5c; box-shadow: none; }
.sino__cabeca { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sino__cabeca form { margin: 0; }
.sino__limpar {
  padding: 4px 10px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: transparent;
  color: var(--label-2);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.sino__limpar:hover { background: var(--fill-2); color: var(--label-1); }
.sino__item--erro strong { color: var(--red-text); }
.sino__texto { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sino__texto strong { font-size: 13px; font-weight: 600; line-height: 18px; }
.sino__detalhe { overflow: hidden; color: var(--label-2); font-size: 12px; line-height: 17px; text-overflow: ellipsis; white-space: nowrap; }
.sino__texto small { color: var(--label-3); font-size: 11px; line-height: 15px; }
.sino__vazio { margin: 0; padding: 20px 10px; color: var(--label-3); text-align: center; }

/* Fontes: uma linha por fonte, que abre como pergunta de FAQ */
.fontes { gap: 8px; }
.fonte { border: 1px solid var(--edge); border-radius: 16px; background: var(--window); transition: border-color 0.15s; }
.fonte[open] { border-color: rgba(255, 255, 255, 0.16); }
.fonte > summary { list-style: none; }
.fonte > summary::-webkit-details-marker { display: none; }
.fonte__linha {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 15px;
  cursor: pointer;
  transition: background-color 0.15s;
}
.fonte__linha:hover { background: var(--elev); }
.fonte__nome { display: flex; flex-direction: column; min-width: 0; }
.fonte__nome strong { font-weight: 600; }
.fonte__nome span { overflow: hidden; color: var(--label-2); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.fonte__pilulas { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.fonte__seta { width: 16px; height: 16px; color: var(--label-3); transition: transform 0.15s; }
.fonte[open] .fonte__seta { color: var(--neon); transform: rotate(90deg); }
.fonte__corpo { display: grid; gap: 18px; padding: 6px 14px 16px 70px; }
.fonte__bloco-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; margin-bottom: 8px; }
.fonte__bloco-topo h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 700; }
.fonte__bloco-topo h3 .icone { width: 16px; height: 16px; color: var(--neon); }
.fonte__nota { margin: 0; color: var(--label-3); font-size: 12px; }
.bloco__vazio--erro { border-color: rgba(255, 92, 92, 0.3); color: var(--red-text); overflow-wrap: anywhere; }
.botao--mini { gap: 5px; height: 30px; padding: 0 12px; font-size: 12px; }
.botao--mini .icone { width: 14px; height: 14px; }

.sublista { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 4px; border-radius: 12px; background: var(--fill-3); list-style: none; }
.subitem {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 6px 12px;
  border-radius: 10px;
}
.subitem:hover { background: var(--fill-2); }
.subitem__nome { display: flex; flex-direction: column; min-width: 0; color: var(--label-1); text-decoration: none; }
.subitem__nome strong { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.subitem__nome span { color: var(--label-3); font-size: 12px; }
.subitem__nome:hover strong { color: var(--neon); }
.subitem.is-off .subitem__nome strong { color: var(--label-2); }
.subitem__pilulas { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.subitem .conta__menu { z-index: 30; min-width: 220px; }

/* Atualizações */
.versoes { gap: 8px; max-width: 780px; }
.versao { padding: 14px 16px; border: 1px solid var(--edge); border-radius: 16px; background: var(--window); }
.versao__topo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.versao__numero { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.versao__data { margin-left: auto; color: var(--label-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.versao__lado { height: 22px; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.versao__lado--front { background: var(--neon-tint); color: var(--neon); }
.versao__lado--back { background: var(--fill-2); color: var(--label-1); }
.versao__tipo { height: 22px; font-size: 11px; }
/* Novidade verde neon · Reestruturação amarelo · Correção vermelho */
.versao__tipo--novidade { border: 1px solid var(--neon-edge); background: transparent; color: var(--neon); }
.versao__tipo--reestruturacao { border: 1px solid rgba(255, 210, 74, 0.45); background: transparent; color: #ffd659; }
.versao__tipo--correcao { border: 1px solid rgba(255, 92, 92, 0.4); background: transparent; color: var(--red-text); }
.versoes__legenda { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -6px 0 18px; color: var(--label-3); font-size: 12px; }
.versoes__legenda .pilula + .pilula, .versoes__legenda .pilula { margin-left: 6px; }
.versoes__legenda .pilula:first-child { margin-left: 0; }
.versao__itens { margin: 10px 0 0; padding: 0 0 0 18px; color: var(--label-2); font-size: 13px; line-height: 20px; }
.versao__itens li::marker { color: var(--neon); }
.aviso--info { background: var(--fill-3); color: var(--label-2); }

@media (max-width: 640px) {
  .topo__lado { gap: 6px; }
  .sino__menu { position: fixed; top: 60px; right: 16px; left: 16px; width: auto; }
  .fonte__linha { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 12px; }
  .fonte__pilulas { grid-column: 2 / -1; grid-row: 2; justify-content: flex-start; }
  .fonte__seta { grid-column: 3; grid-row: 1; }
  .fonte__corpo { padding: 4px 10px 14px; }
  .subitem { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; }
  .subitem__pilulas { grid-column: 1; grid-row: 2; }
  .subitem > .lapis, .subitem > .menu { grid-column: 2; grid-row: 1 / span 2; }
  .versao__data { width: 100%; margin-left: 0; }
}

/* Cor por produto na pílula (formatting.cor_produto): fundo translúcido + texto da cor */
.prod--fone-ninja { background: var(--neon-tint); color: var(--neon); }
.prod--america { background: rgba(125, 196, 255, 0.14); color: #8ecdff; }
.prod--america-usa { background: rgba(38, 132, 150, 0.28); color: #5cc2d3; }
.prod--liqd, .prod--main { background: rgba(255, 210, 74, 0.14); color: #ffd659; }

/* Avatar em degradê (formatting.avatar): a mesma pessoa tem sempre a mesma cor */
.iniciais[class*="av-"] { color: #ffffff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.av-1 { background: linear-gradient(135deg, #8b5cf6, #3b82f6); }
.av-2 { background: linear-gradient(135deg, #f97316, #3b82f6); }
.av-3 { background: linear-gradient(135deg, #ec4899, #f97316); }
.av-4 { background: linear-gradient(135deg, #14b8a6, #3b82f6); }
.av-5 { background: linear-gradient(135deg, #a855f7, #ec4899); }
.av-6 { background: linear-gradient(135deg, #22c55e, #0ea5e9); }
.av-7 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.av-8 { background: linear-gradient(135deg, #06b6d4, #8b5cf6); }

/* ---------------------------------------------------------------------------------------
   v1.10: Atualizar na ficha, link discreto para o Clint, Empresas e o giro do esqueleto
   --------------------------------------------------------------------------------------- */

/* Ficha: bolinha Atualizar à direita das pílulas */
.ficha__atualizar { margin: 0; }
.ficha__atualizar .botao-redondo { background: transparent; font: inherit; cursor: pointer; }
.ficha__atualizar .botao-redondo[aria-busy="true"] { cursor: progress; }

/* Abrir no Clint: ícone pequeno, fraco, acende no hover */
.link-clint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 4px;
  border-radius: 999px;
  color: var(--label-3);
  vertical-align: middle;
  transition: color 0.15s, background-color 0.15s;
}
.link-clint .icone { width: 14px; height: 14px; }
.link-clint:hover, .link-clint:focus-visible { background: var(--neon-tint); color: var(--neon); }
.duas-linhas { display: inline-flex; vertical-align: middle; }
.contato__topo strong .link-clint { margin-left: 2px; }

/* Giro verde no meio do esqueleto: aparece e some junto com ele */
.carga__esqueleto { position: relative; }
.carga__giro {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 3px solid rgba(81, 243, 124, 0.18);
  border-top-color: var(--neon);
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(81, 243, 124, 0.25);
  animation: girar 0.8s linear infinite;
}

/* Sem resultado: o vazio aparece direto, sem o esqueleto de entrada por cima */
.carga--vazia .carga__esqueleto { animation: none; }
.carga--vazia .carga__conteudo { animation: none; }
.tabela--base .codigo { color: var(--label-2); }
.ficha__atualizar { flex: none; }
@media (max-width: 640px) {
  /* nome inteiro na 1ª linha; pílulas e Atualizar descem juntos */
  .ficha__nome { flex: 1 1 calc(100% - 68px); }
  .ficha__atualizar { margin-left: auto; }
}

/* ---------------------------------------------------------------------------------------
   v1.11: entrar por link (e-mail), papéis (admin e leitor) e Usuários
   --------------------------------------------------------------------------------------- */

.folha__texto { margin: 0 0 4px; color: var(--label-2); font-size: 15px; line-height: 22px; }
.folha__rodape { margin: 18px 0 0; text-align: center; }
.discreto { color: var(--label-3); font-size: 13px; text-decoration: none; }
.discreto:hover { color: var(--neon); }
.folha__selo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  border: 1px solid var(--neon-edge);
  border-radius: 16px;
  background: var(--neon-tint);
  color: var(--neon);
}
.folha__selo .icone { width: 24px; height: 24px; }
.folha__selo--erro { border-color: rgba(255, 92, 92, 0.35); background: var(--red-tint); color: var(--red-text); }
.folha section > .botao--cheio, .folha > .botao--cheio { margin-top: 20px; }

/* Menu da conta: nome, e-mail e papel */
.conta__quem {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-bottom: 4px;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--hairline);
}
.conta__quem strong { font-size: 13px; font-weight: 600; }
.conta__quem span { overflow: hidden; max-width: 240px; color: var(--label-2); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.conta__quem .conta__papel {
  display: inline-flex;
  align-items: center;
  height: 20px;
  margin-top: 6px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--fill-3);
  color: var(--label-2);
  font-size: 11px;
  font-weight: 600;
}
.conta__quem .conta__papel.is-admin { background: var(--neon-tint); color: var(--neon); }

/* Usuários */
.usuario-linha .iniciais { width: 40px; height: 40px; font-size: 13px; }
.usuario-linha .linha__nome em { font-style: normal; font-weight: 400; }
.usuario-linha.is-off .iniciais { filter: grayscale(1); opacity: 0.55; }
.escolha__papel { display: flex; flex-direction: column; }
.escolha__papel small { color: var(--label-2); font-size: 12px; }

.link-acesso {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--neon-edge);
  border-radius: var(--r-card);
  background: linear-gradient(150deg, rgba(81, 243, 124, 0.08), var(--window) 60%);
}
.link-acesso__topo { display: flex; align-items: center; gap: 12px; }
.link-acesso__topo div { display: flex; flex-direction: column; min-width: 0; }
.link-acesso__topo span:not(.iniciais) { color: var(--label-2); font-size: 12px; }
.link-acesso .copiavel { flex-wrap: wrap; }
.link-acesso .copiavel__texto { flex: 1 1 260px; }

@media (max-width: 640px) {
  .usuario-linha .linha__pilulas { display: inline-flex; }
  .usuario-linha .linha__pilulas .pilula:first-child { display: inline-flex; }
  .usuario-linha .linha__pilulas .pilula:last-child { display: none; }
}

/* Ficha: excluídos no Clint (histórico recolhido, abre como as entregas) */
.excluidos > summary { list-style: none; }
.excluidos > summary::-webkit-details-marker { display: none; }
.excluidos__linha {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--edge);
  border-radius: 14px;
  background: var(--window);
  color: var(--label-2);
  font-weight: 600;
  cursor: pointer;
}
.excluidos__linha:hover { background: var(--elev); }
.excluidos__linha .icone { width: 16px; height: 16px; color: var(--label-3); }
.excluidos__seta { margin-left: auto; transition: transform 0.15s; }
.excluidos[open] .excluidos__seta { color: var(--neon); transform: rotate(90deg); }
.excluidos__nota { margin: 10px 0; font-size: 12px; }
.excluidos .tabela { opacity: 0.78; }

/* Toast: "deu certo" pequeno no canto de baixo, entra, fica uns segundos e some (só CSS) */
.toasts {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
  margin: 0;
  padding: 9px 14px 9px 11px;
  border: 1px solid var(--neon-edge);
  border-radius: 999px;
  background: var(--window);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  color: var(--label-1);
  font-size: 13px;
  font-weight: 600;
  animation: toast-entra 0.22s ease-out both, toast-sai 0.3s ease-in 3.2s forwards;
}
.toast--longo { border-radius: 14px; animation-delay: 0s, 6s; }
.toast .icone { flex: none; width: 16px; height: 16px; color: var(--neon); }
@keyframes toast-entra { from { opacity: 0; transform: translateY(10px); } }
@keyframes toast-sai { to { opacity: 0; transform: translateY(6px); visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .toast { animation: toast-sai 0.01s linear 3.2s forwards; }
  .toast--longo { animation-delay: 6s; }
}
@media (max-width: 640px) {
  .toasts { right: 16px; bottom: 16px; left: 16px; align-items: center; }
}

/* Auditoria: entrada e saída numa lista só (linhas que abrem, como as entregas) */
.auditoria__resumo { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 18px; }
.numero--erro dd { color: var(--red-text); }
.auditoria__filtros { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.requisicao > summary { gap: 12px; }
.requisicao .entrega__hora { min-width: 132px; font-variant-numeric: tabular-nums; }
.requisicao__oque { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.requisicao__oque strong { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.requisicao__oque span { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.requisicao__lado { height: 22px; font-size: 11px; }
.requisicao__lado--entrada { background: rgba(120, 190, 255, 0.14); color: #8cc8ff; }
.requisicao__lado--saida { background: var(--fill-3); color: var(--label-2); }
.requisicao__resultado { height: 22px; font-size: 11px; white-space: nowrap; }
.requisicao__resultado--ok { background: var(--neon-tint); color: var(--neon); }
.requisicao__resultado--falhou { background: var(--red-tint); color: var(--red-text); }
.requisicao__resultado--na_fila { background: rgba(255, 210, 74, 0.14); color: #ffd659; }
.requisicao__resultado--ignorado { background: var(--fill-3); color: var(--label-3); }
.requisicao--falhou { border-color: rgba(255, 92, 92, 0.3); }
.requisicao__detalhes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px 18px;
  margin: 0;
  padding: 4px 14px 12px;
}
.requisicao__detalhes dt { color: var(--label-3); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.requisicao__detalhes dd { margin: 2px 0 0; overflow-wrap: anywhere; font-size: 13px; }
.requisicao__detalhes a { color: var(--neon); }
.requisicao__erro { grid-column: 1 / -1; }
.requisicao__erro dd { color: var(--red-text); }
.requisicao__caminho { overflow-wrap: anywhere; }
.requisicao__conteudo { position: relative; padding: 0 14px 14px; }
.requisicao__conteudo .botao-icone { position: absolute; top: 8px; right: 22px; }
@media (max-width: 900px) {
  .auditoria__resumo { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .requisicao .entrega__hora { min-width: 0; }
  .requisicao .entrega__tamanho, .requisicao__lado { display: none; }
}

/* Base: cliente mais estreito e contas uma embaixo da outra (duas por linha) */
.tabela--base .pessoa strong { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabela--base .pilulas { display: inline-grid; grid-template-columns: repeat(2, max-content); gap: 4px; }
.tabela--base .pilulas .pilula { height: 22px; font-size: 11px; }

/* ---------------------------------------------------------------------------------------
   TV: números finos, o último de cada (cliente, lead, negócio, ganho), as últimas vendas e o
   Personalizar de cada pessoa. Cartões numa linha que quebra: P = 1 parte, M = 2, G = 4.
   --------------------------------------------------------------------------------------- */

.tv { gap: clamp(12px, 1.6vw, 28px); }
.tv__acao {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: transparent;
  color: var(--label-3);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s, background-color 0.15s, color 0.15s;
}
.tv__acao .icone { width: 16px; height: 16px; }
.tv__acao:hover, .tv__acao:focus-visible { background: var(--fill-2); color: var(--label-1); opacity: 1; }
.tv__acao[hidden], .tv.is-editando .tv__acao { display: none; }

.tv__corpo { display: flex; flex: 1; flex-direction: column; gap: clamp(12px, 1.6vw, 28px); min-height: 0; }
.tv__bloco { display: flex; flex-direction: column; gap: clamp(8px, 0.9vw, 16px); min-width: 0; }
.tv__bloco--vendas { flex: 1; min-height: 0; }

.tv__numeros, .tv__ultimos { display: flex; flex-wrap: wrap; gap: clamp(8px, 0.9vw, 18px); margin: 0; padding: 0; list-style: none; }
.tv__cartao {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--edge);
  border-radius: clamp(14px, 1.3vw, 24px);
  background: var(--window);
  container-type: inline-size;
}

.tv__numero { flex: 2 1 150px; justify-content: center; gap: 0.15em; padding: clamp(10px, 0.9vw, 18px) clamp(14px, 1.2vw, 24px); }
.tv__numero.tv__cartao--p { flex: 1 1 96px; }
.tv__numero.tv__cartao--g { flex: 4 1 280px; }
.tv__numero dt { color: var(--label-2); font-size: clamp(11px, 0.85vw, 17px); font-weight: 600; line-height: 1.25; }
.tv__numero dd {
  margin: 0;
  font-size: 30px;
  font-size: clamp(20px, min(16cqi, 6.5vh, 9vw), 120px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.tv__numero--neon, .tv__ultimo--ganho { border-color: var(--neon-edge); background: linear-gradient(150deg, rgba(81, 243, 124, 0.1), var(--window) 62%); }
.tv__numero--neon dd { color: var(--neon); }

.tv__ultimo { flex: 2 1 220px; gap: 4px; padding: clamp(10px, 1vw, 20px) clamp(14px, 1.2vw, 24px); }
.tv__ultimo.tv__cartao--p { flex: 1 1 160px; }
.tv__ultimo.tv__cartao--g { flex: 4 1 380px; }
.tv__ultimo p { margin: 0; min-width: 0; }
.tv__ultimo-rotulo { color: var(--label-3); font-size: clamp(10px, 0.75vw, 15px); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.tv__ultimo-nome {
  overflow: hidden;
  font-size: 18px;
  font-size: clamp(15px, min(8cqi, 3.4vh, 6vw), 44px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tv__ultimo-pe { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--label-3); font-size: clamp(12px, 0.85vw, 17px); }
.tv__ultimo-pe .pilula { height: auto; padding: 0.2em 0.75em; font-size: clamp(11px, 0.75vw, 15px); }
.tv__ultimo-valor { color: var(--neon); font-weight: 700; font-variant-numeric: tabular-nums; }
.tv__ultimo-quando { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }

.tv__titulo { display: flex; align-items: center; gap: 8px; margin: 0; font-size: clamp(14px, 1.05vw, 22px); line-height: 1.3; font-weight: 700; }
.tv__titulo .icone { width: 1.1em; height: 1.1em; color: var(--neon); }
.tv__vendas-caixa { flex: 1; overflow: auto; border: 1px solid var(--edge); border-radius: clamp(14px, 1.3vw, 24px); background: var(--window); }
.tv__vendas { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: clamp(13px, min(1vw, 2vh), 22px); line-height: 1.3; }
.tv__vendas th {
  padding: clamp(10px, 0.9vw, 16px) clamp(12px, 1.2vw, 24px) 6px;
  color: var(--label-3);
  font-size: 0.68em;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
}
.tv__vendas th:nth-child(1) { width: 30%; }
.tv__vendas th:nth-child(4) { width: 18%; }
.tv__vendas th:nth-child(5) { width: 16%; }
.tv__vendas td { overflow: hidden; padding: clamp(6px, 0.62vw, 12px) clamp(12px, 1.2vw, 24px); border-top: 1px solid var(--hairline); text-overflow: ellipsis; white-space: nowrap; }
.tv__vendas td:nth-child(2), .tv__vendas td:nth-child(3) { color: var(--label-2); }
.tv__vendas strong { font-weight: 600; }
.tv__vendas .num { text-align: right; font-variant-numeric: tabular-nums; }
.tv__vendas td.num { color: var(--neon); font-weight: 700; }
.tv__vendas .pilula { height: auto; padding: 0.2em 0.75em; font-size: 0.72em; }
.tv__sem { margin: 0; padding: clamp(12px, 1.2vw, 24px); border: 1px dashed var(--edge); border-radius: clamp(14px, 1.3vw, 24px); color: var(--label-2); font-size: clamp(14px, 1.1vw, 22px); }

/* Personalizar: oculto some da TV, mas aparece apagado enquanto se edita */
.tv__ctrl, .tv__bloco-ctrl, .tv__barra { display: none; }
.tv:not(.is-editando) .is-oculto { display: none; }
.tv.is-editando { padding-bottom: 104px; }
.tv.is-editando .tv__bloco { padding: 10px; border: 1px dashed var(--field-edge); border-radius: clamp(16px, 1.5vw, 28px); }
.tv.is-editando .tv__bloco-ctrl { display: flex; align-items: center; gap: 4px; color: var(--label-2); font-size: 13px; }
.tv.is-editando .tv__bloco-ctrl strong { margin-right: auto; color: var(--label-1); }
.tv.is-editando .tv__ctrl { display: flex; align-items: center; gap: 2px; margin: -2px -6px 8px; }
.tv__ctrl .tv__alca { display: none; } /* o cartão inteiro arrasta */
.tv.is-editando .tv__bloco--vendas .tv__titulo { display: none; } /* o nome já está no controle */
.tv.is-editando [draggable="true"] { cursor: grab; }
.tv.is-editando .is-oculto { opacity: 0.4; border-style: dashed; }
.tv .is-arrastando { opacity: 0.5; outline: 2px dashed var(--neon); outline-offset: 2px; }
.tv__alca { display: inline-flex; color: var(--label-3); }
.tv__alca .icone { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.tv__tamanhos { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--hairline); border-radius: 999px; background: rgba(0, 0, 0, 0.32); }
.tv__tamanhos button, .tv__mover, .tv__olho {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--label-2);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.tv__tamanhos button:hover, .tv__mover:hover, .tv__olho:hover { background: var(--fill-2); color: var(--label-1); }
.tv__tamanhos button[aria-pressed="true"] { background: var(--neon); color: var(--on-neon); }
.tv__mover { font-size: 16px; }
.tv__bloco-ctrl .tv__mover { transform: rotate(90deg); }
.tv__ctrl .tv__olho { margin-left: auto; }
.tv__olho .icone { width: 16px; height: 16px; }
.tv__olho[aria-pressed="false"] .icone:last-child, .tv__olho[aria-pressed="true"] .icone:first-child { display: none; }
.tv__olho[aria-pressed="true"] { color: var(--label-3); }
.tv.is-editando .tv__barra {
  position: fixed;
  bottom: 16px;
  left: 50%;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: max-content;
  max-width: calc(100% - 32px);
  margin: 0;
  padding: 8px 8px 8px 20px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: var(--elev);
  box-shadow: var(--shadow-window);
  transform: translateX(-50%);
}
.tv__barra-dica { flex: 1 1 260px; margin: 0 8px 0 0; color: var(--label-2); font-size: 13px; line-height: 18px; }

@media (max-width: 640px) {
  .tv__hora { display: none; }
  .tv__acao { margin-left: auto; }
  .tv__acao { width: 36px; padding: 0; justify-content: center; }
  .tv__acao span { display: none; }
  .tv__vendas { table-layout: auto; }
  .tv__vendas td { max-width: 180px; }
  .tv.is-editando .tv__barra { width: auto; border-radius: 20px; padding: 12px; }
  .tv__barra-dica { flex-basis: 100%; margin: 0 0 4px; }
}

/* TV: barrinha até a próxima atualização, legenda de cada número, o "?" e o número que sobe */
.tv__topo { position: relative; }
.tv__progresso { position: absolute; right: 0; bottom: -10px; left: 0; height: 3px; overflow: hidden; border-radius: 999px; background: var(--fill-2); }
.tv__progresso i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--neon); opacity: 0.7; }
.tv__progresso i.is-andando { animation: tv-progresso 15s linear forwards; }
@keyframes tv-progresso { from { width: 0; } to { width: 100%; } }
.tv.is-editando .tv__progresso { visibility: hidden; }
.tv__numero dt, .tv__ultimo-rotulo, .tv__titulo { display: flex; align-items: center; gap: 6px; }
.tv__dica {
  position: relative;
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  color: var(--label-3);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}
.tv__dica:hover, .tv__dica:focus-visible { border-color: var(--neon-edge); color: var(--neon); outline: none; }
/* o "?" só aparece com o mouse em cima do cartão (na TV, sem mouse, nem aparece) */
.tv__dica { opacity: 0; transition: opacity 0.15s; }
.tv__cartao:hover .tv__dica, .tv__bloco:hover .tv__titulo .tv__dica, .tv__dica:focus-visible { opacity: 1; }
.tv__dica-texto {
  position: absolute;
  top: calc(100% + 8px);
  left: -8px;
  z-index: 30;
  width: 280px;
  padding: 10px 12px;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: var(--elev);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  color: var(--label-1);
  font-size: 13px;
  font-weight: 500;
  line-height: 19px;
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.12s;
}
.tv__dica:hover .tv__dica-texto, .tv__dica:focus-visible .tv__dica-texto { visibility: visible; opacity: 1; }
.tv .is-subindo { color: var(--neon); text-shadow: 0 0 18px rgba(81, 243, 124, 0.45); transition: color 0.4s, text-shadow 0.4s; }
/* venda nova: pisca verde e volta ao normal */
.tv__vendas tr.is-nova td { animation: tv-pisca 3s ease-out; }
@keyframes tv-pisca { 0%, 30% { background: var(--neon-tint); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) {
  .tv__progresso i.is-andando { animation: none; width: 100%; }
}
