/* Tema Duda para o LibreChat (marca do produto).
   Remapeia os acentos do tema ativo para a paleta Coral Vivo, sem recompilar
   o front. tinta #222A45 / coral #FF5C4D / coral claro #FFB4A8 / fundo #FBF6F1. */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@600;700&family=Inter:wght@400;500;600;700&display=swap');

html,
html.dark,
:root {
  /* Botao primario (Continuar, Enviar, acoes principais) */
  --surface-submit: #ff5c4d;        /* coral */
  --surface-submit-hover: #e64a3c;  /* coral escuro (hover) */

  /* Destaque de marca */
  --brand-purple: #ff5c4d;          /* coral */

  /* Anel de foco e detalhes */
  --ring-primary: #222a45;
}

/* ===================== Tela de login (split-screen Duda) ===================== */
#duda-auth-panel {
  position: fixed;
  left: 0;
  top: 0;
  width: 48%;
  height: 100vh;
  background: #222a45;
  color: #fbf6f1;
  padding: 56px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  z-index: 5;
  font-family: 'Inter', 'Segoe UI', sans-serif;
}

/* Telas de autenticacao sao sempre claras (controles nativos inclusive). */
html[data-duda-auth] {
  color-scheme: light;
}

/* Empurra a area do LibreChat para a metade direita, sobre fundo claro quente. */
html[data-duda-auth] body,
html[data-duda-auth] #root,
html[data-duda-auth] #root > div {
  background: #fbf6f1 !important;
}
html[data-duda-auth] main {
  margin-left: 48%;
  background: #fbf6f1 !important;
}
/* Cartao do formulario: sem caixa branca, integra ao fundo. */
html[data-duda-auth] main > div,
html[data-duda-auth] main .bg-white {
  background: transparent !important;
  box-shadow: none !important;
}
/* Titulo do formulario na fonte da marca. */
html[data-duda-auth] main h1,
html[data-duda-auth] main h2 {
  font-family: 'Bricolage Grotesque', sans-serif !important;
  color: #222a45 !important;
}
/* Esconde o logo no topo do form (a marca ja esta no painel da Duda).
   O img do logo fica fora do main, por isso o seletor por alt. */
html[data-duda-auth] main img,
html[data-duda-auth] img[alt$='Logo'] {
  display: none !important;
}
/* Campos no estilo Duda. */
html[data-duda-auth] main input {
  background: #fffcf9 !important;
  border: 1px solid #f0dfd6 !important;
  border-radius: 10px !important;
  color: #222a45 !important;
}
/* Links (Inscrever-se, Esqueceu a senha) em coral. */
html[data-duda-auth] main a {
  color: #ff5c4d !important;
}

/* Mobile: o painel vira uma faixa de marca compacta no topo. */
@media (max-width: 880px) {
  #duda-auth-panel {
    position: static;
    width: 100%;
    height: auto;
    padding: 18px 24px;
    display: block;
  }
  #duda-auth-panel .duda-mark,
  #duda-auth-panel .duda-avatar,
  #duda-auth-panel .duda-copy,
  #duda-auth-panel .duda-foot {
    display: none;
  }
  html[data-duda-auth] main { margin-left: 0; }
}

/* Role USER: esconde o painel "Anexar arquivos" da sidebar esquerda. O
   LibreChat adiciona esse botao sem checar permissao nem config, entao a
   unica forma de tirar por role e via CSS + deteccao de role no duda-auth.js. */
html[data-duda-role='USER'] [data-testid='nav-panel-files'] {
  display: none !important;
}
