/* Casca Alçada */
#loading-container {
  background-color: #0b1f3a !important;
}
html,
body {
  background-color: #0b1f3a;
  overflow-x: clip;
  max-width: 100%;
}

/* Splash do chat é cartão branco: lockup azul. Login navy continua no logo.png. */
div.mt-6.h-10.w-full.bg-cover {
  height: 4.6rem !important;
  margin-top: 2rem !important;
  margin-bottom: 0.75rem !important;
  background-color: transparent !important;
  background-image: url("/images/alcada/logo-claro.png") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
  border-radius: 0 !important;
  padding: 0 !important;
  animation: none !important;
  transform: none !important;
  filter: none !important;
}
/* Logo clara (ex. wordmark branco) some no cartão do login; placa navy só nesse caso. */
div.mt-6.h-10.w-full.bg-cover.alcada-login-logo-clara {
  background-color: #0b1f3a !important;
  border-radius: 0.55rem !important;
  max-width: 18rem;
  margin-left: auto;
  margin-right: auto;
  height: 5.2rem !important;
  padding: 0.45rem 0.85rem !important;
  box-sizing: content-box;
}
div.mt-6.h-10.w-full.bg-cover img,
div.mt-6 img[src*="logo.svg"],
div.mt-6 img[src*="logo.png"],
img[src="assets/logo.svg"],
img[src="assets/logo.png"] {
  opacity: 0 !important;
}
body:has(#alcada-login-pack) [class*="min-h-screen"] {
  justify-content: flex-start !important;
  gap: 0.9rem !important;
}
#alcada-login-pack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  overflow: visible !important;
  transform: none !important;
  animation: none !important;
}
#alcada-login-pack > a,
#alcada-login-pack > button {
  width: auto !important;
  max-width: 20rem !important;
  align-self: center !important;
}
body:has(#alcada-login-pack) button:has(.lucide-sun),
body:has(#alcada-login-pack) button:has(.lucide-moon),
body:has(#alcada-login-pack) [aria-label*="theme" i],
body:has(#alcada-login-pack) [aria-label*="tema" i],
body:has(#alcada-login-pack) [aria-label*="Dark" i],
body:has(#alcada-login-pack) [aria-label*="Light" i] {
  display: none !important;
}
#alcada-login-welcome {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 1.25rem;
  text-align: left;
  position: relative;
  z-index: 1;
  overflow: visible !important;
}
#alcada-login-welcome .alcada-welcome-mark {
  flex-shrink: 0;
  margin-top: 0.2rem;
}
#alcada-login-welcome p {
  margin: 0;
  color: #0b1f3a;
  font-size: 0.95rem;
  line-height: 1.4;
  white-space: pre-line;
  overflow: visible !important;
}
em.alcada-welcome-trust {
  font-style: italic;
  font-weight: inherit;
}
.alcada-login-cursor {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-left: 0.35rem;
  vertical-align: middle;
  background: url("/images/alcada/cursor.svg") center / contain no-repeat;
  animation: alcada-login-cursor-op 0.9s ease-in-out infinite;
  transform: none;
}
@keyframes alcada-login-cursor-op {
  0%,
  100% { opacity: 0.35; }
  50% { opacity: 1; }
}
@media (max-width: 900px) {
  #alcada-login-welcome,
  #alcada-login-welcome p {
    white-space: pre-line;
  }
}

/* Gostei / não gostei: ícone próprio do canal (path do SVG), sem classe lucide. */
.message-render button:has(svg.lucide-thumbs-up),
.message-render button:has(svg.lucide-thumbs-down),
.message-render button:has(svg path[d^="M12.1318"]),
.message-render button:has(svg path[d^="M12.592"]),
.message-render button:has(svg path[d^="M11.8727"]),
.message-render button:has(svg path[d^="M11.4079"]) {
  display: none !important;
}
button[data-alcada-reportar] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: inherit;
  cursor: pointer;
  pointer-events: auto !important;
  position: relative;
  z-index: 2;
}
button[data-alcada-reportar].reportado {
  opacity: 0.5;
}
#alcada-toast {
  position: fixed;
  left: 50%;
  bottom: 5.5rem;
  z-index: 5000;
  transform: translateX(-50%);
  max-width: 22rem;
  padding: 0.55rem 0.9rem;
  border-radius: 0.75rem;
  background: #0b1f3a;
  color: #f4f0e8;
  font-size: 0.875rem;
  box-shadow: 0 8px 24px rgba(11, 31, 58, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
#alcada-toast.ligado {
  opacity: 1;
}
/* TTS lê o path do /media no vídeo/arquivo. Some nessas msgs. */
.message-render:has(video) button:has(svg[class*="lucide-volume"]),
.message-render:has(audio) button:has(svg[class*="lucide-volume"]),
.message-render:has(img[src*="/media/"]) button:has(svg[class*="lucide-volume"]),
.message-render:has(a[href*="/media/"]) button:has(svg[class*="lucide-volume"]) {
  display: none !important;
}

/* Header do chat: some a pena. A marca vai na lateral. */
header svg.lucide-feather,
.sticky.top-0 svg.lucide-feather {
  display: none !important;
}

/* Reserva no painel Chats (nav ao lado da faixa de ícones). Header do fio não mexe. */
nav.bg-surface-primary-alt.flex-1 {
  padding-top: 3rem !important;
  padding-bottom: 2.5rem !important;
}

#alcada-admin {
  position: fixed;
  z-index: 40;
  display: none;
  box-sizing: border-box;
  padding: 0.45rem 0.75rem;
  font-family: Segoe UI, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #1e5aa8;
  text-decoration: none;
  border-radius: 10px;
  pointer-events: auto;
}
#alcada-admin:hover {
  background: #e8eef6;
  color: #0b1f3a;
}

#alcada-marca {
  position: fixed;
  z-index: 40;
  display: none;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 36px;
  max-height: 36px;
  max-width: 180px;
  flex: 0 0 auto;
  margin: 0;
  padding: 4px 8px;
  text-decoration: none;
  color: #1e5aa8;
  overflow: hidden;
  pointer-events: auto;
}
#alcada-marca svg {
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}
#alcada-marca span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
}
#alcada-marca.fino span {
  display: none;
}
#alcada-marca img {
  display: block;
  width: auto;
  height: 22px;
  max-width: 140px;
  object-fit: contain;
}
#alcada-marca:not(.fino) {
  width: auto;
}
#alcada-marca:not(.fino) img {
  height: 22px;
  max-width: 140px;
}
#alcada-marca.logo-clara {
  background: #0b1f3a;
  border-radius: 8px;
  padding: 4px 8px;
}
#alcada-marca.logo-escura {
  background: #f4f0e8;
  border-radius: 8px;
  padding: 4px 6px;
}

#alcada-aviso {
  display: none !important;
}

/* Recado do órgão: abaixo do seletor, acima do fio. Não é overlay. */
#alcada-org-aviso {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.15rem 0.6rem;
  margin: 0.45rem 1rem 0.2rem;
  padding: 0.55rem 0.7rem 0.55rem 0.85rem;
  border-radius: 12px;
  border: 1px solid #d7e0ea;
  border-left: 4px solid #1e5aa8;
  background: #f7fafc;
  color: #0b1f3a;
  font-family: Segoe UI, system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 0 1px 0 rgba(11, 31, 58, 0.04);
}
#alcada-org-aviso[data-severity="warning"] {
  border-left-color: #c4a35a;
  background: #fbf7ee;
}
#alcada-org-aviso[data-severity="critical"] {
  border-left-color: #b42318;
  background: #fdf4f3;
}
#alcada-org-aviso strong {
  grid-column: 1;
  font-size: 13px;
  font-weight: 650;
}
#alcada-org-aviso span {
  grid-column: 1;
  color: #3d4b5c;
}
#alcada-org-aviso button {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  border: 0;
  background: transparent;
  color: #5c6670;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.1rem;
}
#alcada-org-aviso button:hover {
  color: #0b1f3a;
}

/* Aviso entra no fluxo do [role=main]. Sem isso o h-full do fio
   soma com a faixa e aparece segunda barra / some o composer. */
[role="main"] {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  min-height: 0 !important;
}
[role="main"] > header {
  flex: 0 0 auto;
}
[role="main"] > header ~ *:not(#alcada-org-aviso) {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
}
[role="main"] form {
  flex: 0 0 auto;
}

/* Celular: o fio e a mídia cabem na tela. Sem scroll lateral. */
.scrollbar-gutter-stable {
  overflow-x: hidden !important;
  scrollbar-gutter: auto !important;
}
[role="presentation"],
#root,
#root > div {
  max-width: 100%;
  overflow-x: clip;
}
.markdown img,
.prose img,
[data-testid="message-content"] img,
.message-content img,
.markdown video,
.prose video,
.markdown audio,
.prose audio,
audio,
video {
  max-width: 100% !important;
  height: auto !important;
}

html body .message-render .markdown p:has(img),
html body .message-render .markdown p:has(video),
html body .message-render .markdown p:has(audio),
html body .message-render .prose p:has(img),
html body .message-render .prose p:has(video),
html body .message-render .prose p:has(audio),
html body .message-render [data-testid="message-content"] p:has(img),
html body .message-render [data-testid="message-content"] p:has(video),
html body .message-render [data-testid="message-content"] p:has(audio) {
  margin-top: 0.15rem !important;
  margin-bottom: 0.15rem !important;
  line-height: 0 !important;
}
html body .message-render .markdown > p:only-child:has(img),
html body .message-render .markdown > p:only-child:has(video),
html body .message-render .markdown > p:only-child:has(audio),
html body .message-render .prose > p:only-child:has(img),
html body .message-render .prose > p:only-child:has(video),
html body .message-render .prose > p:only-child:has(audio) {
  margin: 0 !important;
}
html body .message-render [data-testid="message-body"] img:not([src*="logo-"]):not([src*="/images/alcada/"]),
html body .message-render [data-testid="message-body"] video,
html body .message-render [data-testid="message-body"] audio {
  display: block !important;
  margin-top: 0.1rem !important;
  margin-bottom: 0.1rem !important;
}
html body .message-render [data-testid="message-body"] div:has(> img[src*="/media/"]),
html body .message-render [data-testid="message-body"] div:has(> img[src*="/images/"]),
html body .message-render [data-testid="message-body"] figure {
  margin-top: 0.15rem !important;
  margin-bottom: 0.15rem !important;
}

/* Player nativo no fio: áudio/vídeo de /media, sem plugin. */
.alcada-player {
  display: block;
  width: 100%;
  max-width: 36rem;
  margin: 0.15rem 0;
}
.alcada-player video,
.alcada-player-video video {
  display: block;
  width: 100%;
  max-height: min(70vh, 28rem);
  object-fit: contain;
  background: #0b1f3a;
  border-radius: 0.75rem;
}
.alcada-player-audio audio {
  display: block;
  width: 100%;
  height: 2.75rem !important;
}
.message-render a[data-alcada-player] {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.85em;
}

/* Tabela markdown: rola por dentro. Não aplicar overflow no .markdown inteiro —
   isso corta a frase do perímetro no chat vazio. */
.markdown table,
.prose table,
[data-testid="message-content"] table {
  display: block;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 0.6rem 0;
}
div:has(> [data-alcada-welcome]) {
  flex-wrap: wrap !important;
  align-items: center !important;
  max-width: 100% !important;
  overflow: visible !important;
}
div:has(> [data-alcada-welcome]) p.split-parent {
  overflow: visible !important;
  max-width: min(46rem, 100%);
  white-space: normal;
  word-wrap: break-word;
}
span.alcada-welcome-trust {
  font-style: italic;
}
.markdown th,
.markdown td,
.prose th,
.prose td,
[data-testid="message-content"] th,
[data-testid="message-content"] td {
  border: 1px solid rgba(196, 163, 90, 0.35);
  padding: 0.4rem 0.65rem;
  vertical-align: top;
}
.markdown thead th,
.prose thead th,
[data-testid="message-content"] thead th {
  background: #0b1f3a;
  color: #f4f0e8;
  font-weight: 600;
}

/* Chat novo: placas Alçada na frase do perímetro. Seletor/mensagens ficam com a logo do modelo. */
div.relative.size-10[data-alcada-welcome],
div.relative.w-10.h-10[data-alcada-welcome] {
  display: flex;
  align-items: center;
  justify-content: center;
}
.alcada-welcome-mark {
  display: block !important;
  width: auto !important;
  height: 28px !important;
  max-width: 4.5rem !important;
  object-fit: contain;
  filter: none !important;
}
.alcada-welcome-mark.clara {
  background: #0b1f3a;
  border-radius: 4px;
  padding: 3px 5px;
  box-sizing: content-box;
}
#alcada-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 0.4rem;
  width: min(40rem, calc(100% - 2rem));
  margin: 0;
  padding: 0.2rem 0;
  position: fixed;
  left: 50%;
  bottom: 4.5rem;
  top: auto;
  transform: translateX(-50%);
  z-index: 4000;
  pointer-events: auto;
  box-sizing: border-box;
}
#alcada-cards .card {
  display: inline-flex;
  align-items: center;
  background: #4a86e8;
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  font: 500 0.82rem/1.2 Outfit, Segoe UI, sans-serif;
}
#alcada-cards .card:hover,
#alcada-cards .card.ativo {
  background: #1e5aa8;
  outline: none;
}

img[src*="logo-xai.svg"],
img[src*="logo-openai.svg"],
img[src*="logo-anthropic.svg"],
img[src*="logo-google.svg"] {
  width: 18px;
  height: 18px;
  object-fit: contain;
}
.dark img[src*="logo-xai.svg"],
.dark img[src*="logo-openai.svg"],
.dark img[src*="logo-anthropic.svg"],
.dark img[src*="logo-google.svg"] {
  filter: invert(1);
}

/* Some o ⬤. O ícone animado vai no #alcada-cursor-fio (JS). */
html body .result-streaming > :not(ol):not(ul):not(pre):last-child:after,
html body .result-streaming > :not(ol):not(ul):not(pre):last-child > :not(ol):not(ul):not(pre):last-child:after,
html body .result-streaming > pre:last-child code:after,
html body .result-streaming > :is(ul, ol):last-child > li:last-child:after,
html body .result-streaming > :is(ul, ol):last-child > li:last-child:not(:has(> :is(ul, ol, pre))):after,
html body .result-streaming > ol:last-child > li:last-child:after,
html body .result-streaming > ul:last-child > li:last-child:after,
html body .markdown.result-streaming > :last-child:after,
html body .result-streaming.markdown > :last-child:after,
html body .result-streaming p:last-child:after,
html body .result-streaming li:last-child:after {
  content: "" !important;
  display: inline-block !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  margin-left: 0.4rem !important;
  vertical-align: middle !important;
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
  background: url("/images/alcada/cursor.svg") center / contain no-repeat !important;
  animation: alcada-pulso-cursor 0.9s ease-in-out infinite !important;
}
#alcada-cursor-fio {
  position: fixed;
  z-index: 70;
  width: 20px;
  height: 20px;
  pointer-events: none;
  display: none;
}
#alcada-cursor-fio.ligado {
  display: none;
}
#alcada-cursor-fio svg {
  display: block;
  width: 20px;
  height: 20px;
  overflow: visible;
}
@keyframes alcada-pulso-cursor {
  0%,
  100% {
    transform: scale(0.75);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Composer: some busca na web, artefatos e o menu de ferramentas. Fica o anexo. */
#tools-dropdown-button,
#tools-dropdown-menu {
  display: none !important;
}

/* Lateral: some Prompts e Marcadores (ícones da trilha). */
html body [data-testid="nav-panel-prompts"],
html body [data-testid="nav-panel-bookmarks"] {
  display: none !important;
}

/* Ao lado do seletor: some adicionar marcador e multi-conversa. */
html body [data-testid="bookmark-menu"],
html body #bookmark-menu-button,
html body [data-testid="add-multi-convo-button"] {
  display: none !important;
}

/* Nome do modelo no fio: some o "GPT" / "Alçada" em toda mensagem. */
html body .agent-turn > h2,
html body [data-testid="author-header"] h2 {
  display: none !important;
}

.alcada-quando {
  margin: 0 0.35rem 0 0;
  font-size: 11px;
  line-height: 1.2;
  color: #8a93a0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  align-self: center;
  pointer-events: none;
}
html body .agent-turn .alcada-quando {
  margin: 0 0 0 0.35rem;
}

html body [role="main"] div.px-4.py-3:has(.message-render) {
  padding-top: 0.2rem !important;
  padding-bottom: 0.2rem !important;
}

@media (hover: hover) {
  html body .message-render [data-testid="message-body"] + div {
    opacity: 0;
    pointer-events: none;
    min-height: 1.35rem;
    transition: opacity 0.12s ease;
  }
  html body .message-render:hover [data-testid="message-body"] + div,
  html body .message-render:focus-within [data-testid="message-body"] + div {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Primeira resposta do fio e cada troca de modelo. */
html body .message-render.alcada-mudou {
  flex-wrap: wrap;
}
html body .message-render.alcada-mudou::before {
  content: attr(data-alcada-troca);
  flex: 1 0 100%;
  display: block;
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: #5c6670;
  margin: 0.35rem 0 0.45rem 2.15rem;
}

/* Espera: uma linha (placas + frase) na bolha. Nada acima do campo. */
#alcada-camadas-float {
  position: fixed;
  z-index: 80;
  width: 22px;
  height: 22px;
  pointer-events: none;
  display: none;
}
#alcada-camadas-float.ligado {
  display: block;
}
#alcada-camadas-float svg {
  display: block;
  width: 22px;
  height: 22px;
  overflow: visible;
}
#alcada-camadas-float .placa,
#alcada-cursor-fio .placa,
#alcada-estagio .placa {
  transform-box: fill-box;
  transform-origin: center;
  animation: alcada-placa 1.7s ease-in-out infinite !important;
}
#alcada-camadas-float .p1,
#alcada-cursor-fio .p1,
#alcada-estagio .p1 {
  animation-delay: 0s;
}
#alcada-camadas-float .p2,
#alcada-cursor-fio .p2,
#alcada-estagio .p2 {
  animation-delay: 0.2s;
}
#alcada-camadas-float .p3,
#alcada-cursor-fio .p3,
#alcada-estagio .p3 {
  animation-delay: 0.4s;
}
@keyframes alcada-placa {
  0%,
  100% {
    opacity: 0.18;
    transform: translateX(-6px);
  }
  22%,
  68% {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes alcada-pulso {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(30, 90, 168, 0);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(30, 90, 168, 0.28);
  }
}

html body .submitting .result-thinking:empty:last-child:after,
html body .result-thinking:empty:after,
html body.alcada-estagio-on .submitting .result-thinking:empty:last-child:after,
html body.alcada-estagio-on .result-thinking:empty:after,
html body.alcada-estagio-on .result-thinking:after,
html body.alcada-estagio-on .result-streaming:after,
html body.alcada-estagio-on .result-streaming > :last-child:after,
html body.alcada-estagio-on .result-streaming *:after,
html body.alcada-estagio-on .markdown.result-streaming:after {
  content: none !important;
  display: none !important;
  background: none !important;
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  animation: none !important;
}

#alcada-estagio {
  position: fixed;
  z-index: 200;
  display: none;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #4a5560;
  font-family: Segoe UI, system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0.01em;
  pointer-events: none;
  white-space: nowrap;
}
#alcada-estagio.ligado {
  display: flex;
}
#alcada-estagio .marca {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}
#alcada-estagio .marca svg {
  display: block;
  width: 20px;
  height: 20px;
  overflow: visible;
}
#alcada-estagio .fala {
  white-space: nowrap;
}
#alcada-estagio .tempo {
  display: none;
}
#alcada-estagio.fim .placa {
  animation: none !important;
  opacity: 1;
  transform: none;
}
#alcada-estagio.recado {
  align-items: flex-start;
  white-space: normal;
  max-width: min(42rem, calc(100vw - 3rem));
}
#alcada-estagio.recado .fala {
  white-space: normal;
}

#alcada-uso {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  align-items: center;
  justify-content: center;
  background: rgba(11, 31, 58, 0.55);
  font-family: Segoe UI, system-ui, sans-serif;
}
#alcada-uso.ligado {
  display: flex;
}
#alcada-uso .cartao {
  width: min(22rem, calc(100vw - 2rem));
  background: #fff;
  color: #0b1f3a;
  border-radius: 12px;
  padding: 1.25rem 1.35rem 1.1rem;
  box-shadow: 0 16px 40px rgba(11, 31, 58, 0.28);
}
#alcada-uso h2 {
  margin: 0 0 0.85rem;
  font-size: 1.15rem;
  font-weight: 650;
}
#alcada-uso .linha {
  margin: 0 0 0.7rem;
}
#alcada-uso .linha span {
  display: block;
  font-size: 12px;
  color: #5c6670;
}
#alcada-uso .linha strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #0b1f3a;
  margin-top: 0.12rem;
}
#alcada-uso .nota {
  margin: 0.75rem 0 0;
  font-size: 12px;
  color: #5c6670;
  line-height: 1.4;
}
#alcada-uso .acoes {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.85rem;
}
#alcada-uso .fechar {
  border: 0;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  cursor: pointer;
  background: #0b1f3a;
  color: #fff;
}
body:has(#alcada-login-pack) #alcada-uso {
  display: none !important;
}

@media (max-width: 640px) {
  #alcada-estagio {
    max-width: calc(100vw - 1.2rem);
    overflow: hidden;
  }
  #alcada-org-aviso {
    margin: 0.35rem 0.55rem 0.15rem;
  }
  [role="contentinfo"] {
    display: none !important;
  }
  [role="contentinfo"] > span:nth-of-type(1),
  [role="contentinfo"] > div[class*="border-r"] {
    display: none !important;
  }
}

[data-alcada-data="1"] {
  overflow: visible !important;
  text-overflow: unset !important;
  min-width: 6.6em;
  flex-shrink: 0 !important;
  white-space: nowrap;
}

html[data-alcada-sem-ajuda="1"] .account-settings-popover [role="menuitem"]:has(.lucide-circle-help),
html[data-alcada-sem-ajuda="1"] .account-settings-popover [role="menuitem"]:has(.lucide-chevron-right),
html[data-alcada-sem-ajuda="1"] .popover-from-left {
  display: none !important;
}

.account-settings-popover [data-alcada-atalhos]:hover,
.account-settings-popover [data-alcada-atalhos]:focus,
.account-settings-popover [data-alcada-atalhos][data-active-item],
.account-settings-popover [data-alcada-senha]:hover,
.account-settings-popover [data-alcada-senha]:focus,
.account-settings-popover [data-alcada-senha][data-active-item],
.account-settings-popover [data-alcada-uso]:hover,
.account-settings-popover [data-alcada-uso]:focus,
.account-settings-popover [data-alcada-uso][data-active-item] {
  background-color: #e3e3e3;
  background-color: rgb(var(--surface-hover));
  color: rgb(var(--text-primary));
}

#alcada-senha {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  align-items: center;
  justify-content: center;
  background: rgba(11, 31, 58, 0.55);
  font-family: Segoe UI, system-ui, sans-serif;
}
#alcada-senha.ligado {
  display: flex;
}
#alcada-senha .cartao {
  width: min(22rem, calc(100vw - 2rem));
  background: #fff;
  color: #0b1f3a;
  border-radius: 12px;
  padding: 1.25rem 1.35rem 1.1rem;
  box-shadow: 0 16px 40px rgba(11, 31, 58, 0.28);
}
#alcada-senha h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 650;
}
#alcada-senha .lead {
  margin: 0 0 0.9rem;
  font-size: 0.85rem;
  color: #4a5560;
  line-height: 1.35;
}
#alcada-senha label {
  display: grid;
  gap: 0.3rem;
  margin: 0 0 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
}
#alcada-senha input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #c5d0dc;
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  font-size: 0.95rem;
  font-weight: 400;
  color: #0b1f3a;
}
#alcada-senha input:focus {
  outline: 2px solid #1e5aa8;
  outline-offset: 1px;
}
#alcada-senha .erro {
  margin: 0 0 0.7rem;
  font-size: 0.8rem;
  color: #9b1c1c;
}
#alcada-senha .acoes {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
#alcada-senha .acoes button {
  border: 0;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  cursor: pointer;
}
#alcada-senha .cancelar {
  background: transparent;
  color: #4a5560;
}
#alcada-senha .guardar {
  background: #0b1f3a;
  color: #fff;
}
#alcada-senha .guardar:disabled {
  opacity: 0.6;
  cursor: wait;
}

#filename-filter {
  max-width: 100%;
}
[role="region"]:has(#filename-filter) table.table-fixed th:last-child,
[role="region"]:has(#filename-filter) table.table-fixed td:last-child {
  width: 7.4em !important;
  max-width: none !important;
  overflow: visible !important;
  text-overflow: unset !important;
  white-space: nowrap !important;
}
[role="region"]:has(#filename-filter) table.table-fixed th:first-child,
[role="region"]:has(#filename-filter) table.table-fixed td:first-child {
  width: auto !important;
  max-width: none !important;
}

/* Cara de app: smartphone e tablet. Desktop (≥1024) não entra. */
@media (max-width: 1023px) {
  #alcada-cards {
    width: calc(100% - 1.5rem);
    gap: 0.35rem;
  }
  #alcada-cards .card {
    font-size: 0.78rem;
    padding: 0.38rem 0.7rem;
  }
  html {
    height: 100%;
    height: 100dvh;
  }
  html,
  body {
    overscroll-behavior: none;
    -webkit-text-size-adjust: 100%;
  }
  body {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
  }
  body:has(#alcada-login-pack) {
    overflow: auto;
    height: auto;
    min-height: 100dvh;
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  }
  #root,
  #root > div {
    height: 100%;
    max-height: 100dvh;
    max-width: 100%;
  }
  body:has(#alcada-login-pack) #root,
  body:has(#alcada-login-pack) #root > div {
    height: auto;
    max-height: none;
    min-height: 100dvh;
  }
  header.sticky,
  .sticky.top-0 {
    padding-top: env(safe-area-inset-top, 0px);
  }
  html,
  body,
  #root,
  #root > div {
    background: #fff;
  }
  [role="contentinfo"] {
    display: none !important;
  }
  [role="main"] form {
    padding-bottom: max(0.55rem, env(safe-area-inset-bottom, 0px)) !important;
    margin-bottom: 0 !important;
  }
  #alcada-uso {
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  }
  #messages-end {
    height: 1px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  [data-testid="stop-generation-button"],
  [data-testid="during-run-send-button"],
  [role="main"] form button.rounded-full {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    line-height: 0 !important;
  }
  [data-testid="stop-generation-button"] svg,
  [data-testid="during-run-send-button"] svg,
  [role="main"] form button.rounded-full svg {
    display: block !important;
    margin: 0 !important;
  }
  .alcada-legal-menu {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.45rem 0.85rem 0.65rem;
    border-top: 1px solid rgba(11, 31, 58, 0.08);
  }
  .alcada-legal-menu a {
    color: #1e5aa8;
    font-size: 0.88rem;
    text-decoration: none;
    padding: 0.35rem 0;
  }
  [role="main"] textarea,
  [role="main"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
    font-size: 16px !important;
  }
  [role="main"] form button {
    min-width: 44px;
    min-height: 44px;
  }
  #alcada-toast {
    bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }
  #alcada-senha {
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  }
  #alcada-marca,
  #alcada-admin {
    top: calc(0.55rem + env(safe-area-inset-top, 0px));
  }
  .alcada-welcome-copy,
  div:has(> [data-alcada-welcome]) p.split-parent {
    max-width: min(46rem, calc(100vw - 2.5rem));
  }
  button,
  a,
  [role="button"] {
    -webkit-tap-highlight-color: transparent;
  }
}

#alcada-operado {
  text-align: center;
  font-size: 11px;
  color: #6b7c8d;
  padding: 0.35rem 0.75rem 0.7rem;
  font-family: Segoe UI, system-ui, sans-serif;
}
