/* =====================================================================
   SEMIO MED - ajustes da revisao geral (23/11/2026)
   Carregado por ultimo: cada bloco corrige um item da lista da revisao.
   ===================================================================== */

/* [1] Botoes escuros com texto branco (bg-slate-950/900): o tema trocava o
   fundo por um degrade e outra regra apagava todo degrade - o botao ficava
   transparente com texto branco (Metricas: "Comecar agora"). */
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace :is(button, a)[class~="bg-slate-950"][class~="text-white"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace :is(button, a)[class~="bg-slate-900"][class~="text-white"] {
  background-color: var(--brand, #103868) !important;
  border-color: var(--brand, #103868) !important;
  color: #fff !important;
}
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace :is(button, a)[class~="bg-slate-950"][class~="text-white"]:hover:not(:disabled),
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace :is(button, a)[class~="bg-slate-900"][class~="text-white"]:hover:not(:disabled) {
  background-color: #0b2f59 !important;
}
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace :is(button, a)[class~="bg-slate-950"][class~="text-white"] *,
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace :is(button, a)[class~="bg-slate-900"][class~="text-white"] * { color: #fff !important; }

/* Botoes bg-cyan-300 (Tutor: "Compilar documento final", "Proxima secao"):
   o tema poe azul-medio no fundo, mas o texto continuava quase preto. */
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace :is(button, a)[class~="bg-cyan-300"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace :is(button, a)[class~="bg-cyan-300"] * {
  color: #fff !important;
}
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace :is(button, a)[class~="bg-cyan-300"] {
  background-color: var(--brand, #103868) !important;
}

/* [2] Agenda: chips de evento pensados para o tema escuro (texto rosa,
   ambar ou verde quase branco) ficavam ilegiveis sobre fundo claro. */
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace button[class*="group/chip"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace button[class*="group/chip"] span:not([class*="rounded-full"]) {
  color: #1d2b44 !important;
}
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace button[class*="group/chip"] {
  background-color: #f3f6fa !important;
  border-color: #d5dde8 !important;
}

/* [8] Agenda: "Novembro De 2026" e "Segunda-Feira, 23 De Novembro" - o
   capitalize poe maiuscula em toda palavra. Fica so a primeira letra. */
html.semiomed-smooth body #root .semiomed-workspace h2.capitalize { text-transform: none !important; }
html.semiomed-smooth body #root .semiomed-workspace h2.capitalize::first-letter { text-transform: uppercase; }

/* [10] SEMIO Scan: o cabecalho fixo deixava o texto passar por tras. */
html.semiomed-smooth .scan-header { background: #ffffff !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html.semiomed-smooth.dark .scan-header { background: #0b1220 !important; }

/* [12] Contrastes no limite */
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace .semio-home-support-copy > span:last-child { color: #4d5d72 !important; }
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace p[class*="text-[10px]"][class*="text-slate-400"] { color: #4d5d72 !important; }
html .scor-aba { color: #475467; }

/* [13] Glossario: 600 cartoes na mesma pagina. O navegador so desenha os
   que estao perto da tela (a rolagem fica bem mais leve no celular). */
html.semiomed-smooth body #root .semiomed-workspace article[class*="rounded-[1.35rem]"] {
  content-visibility: auto;
  contain-intrinsic-size: auto 170px;
}

@media (max-width: 768px) {
  /* [4] Alvos de toque de pelo menos ~40 px */
  html body .semiomed-topbar button { min-width: 40px !important; min-height: 40px !important; }
  html body .medical-humanity__button { width: 36px !important; height: 36px !important; }
  html.semiomed-smooth body #root .semiomed-workspace button[aria-label^="Marcar "] { width: 40px !important; height: 40px !important; }

  /* [5] Textos muito pequenos no celular (9-10 px) */
  html.semiomed-smooth body #root .semiomed-workspace :is(button, a)[class*="inline-flex"] { font-size: 0.82rem !important; }
  html.semiomed-smooth body #root .semiomed-workspace [class*="text-[9px]"],
  html.semiomed-smooth body #root .semiomed-workspace [class*="text-[10px]"] { font-size: 11px !important; }
  html.semiomed-smooth body #root .semiomed-workspace .semio-home-support-copy > span:last-child { font-size: 11px !important; }
  html.semiomed-smooth body #root .semiomed-workspace button[class*="group/chip"] span { font-size: 10.5px !important; }

  /* [7] Agenda: o "+" flutuante cobria os dias; fica menor, mais alto e a
     pagina ganha folga embaixo. */
  html body .semiomed-agenda-new-event.fixed { width: 48px !important; height: 48px !important; bottom: 18px !important; right: 14px !important; }
  html body .semiomed-workspace:has(.semiomed-agenda-new-event.fixed) { padding-bottom: 88px !important; }

  /* [9] Filas que rolam de lado (filtros da Agenda, abas do ECG): um
     degrade na borda mostra que tem mais para o lado. */
  html body #root .semiomed-workspace .flex[class*="overflow-x-auto"][class*="gap-2"],
  html body .secg-abas {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%);
            mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%);
    padding-right: 24px !important;
  }

  /* [11] Biblioteca: cartoes de entrada compactos (icone ao lado do titulo) */
  html.semiomed-smooth .semiomed-library-choice-card {
    display: grid !important;
    grid-template-columns: 52px minmax(0, 1fr);
    column-gap: 14px;
    align-items: center;
    min-height: 0 !important;
    padding: 16px !important;
  }
  html.semiomed-smooth .semiomed-library-choice-card > :first-child { grid-row: span 3; align-self: start; }
  html.semiomed-smooth .semiomed-library-choice-illustration { width: 52px !important; height: 52px !important; border-radius: 14px !important; }
  html.semiomed-smooth .semiomed-library-choice-icon { width: 26px !important; height: 26px !important; }
  html.semiomed-smooth .semiomed-library-choice-card > :not(:first-child) { margin-top: 0 !important; }
  html.semiomed-smooth .semiomed-library-choice-title { font-size: 17px !important; margin: 0 0 2px !important; }
}

/* [6] Tutor: secao ainda nao iniciada nao mostra o "certo" (o JS marca). */
.semiomed-tutor-nav-item[data-sm-pendente] .lucide-check { opacity: 0 !important; }

/* [12] mais contrastes no limite */
.sau-barra-texto small { color: var(--sau-suave, #a7b6cc) !important; }
.secg-placar { color: #475467 !important; }
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace span[class*="bg-slate-200"][class*="text-slate-600"] { color: #3a475a !important; }

/* [2b] Etiquetas com texto pastel (feitas para o tema escuro) ficavam
   quase brancas no tema claro - ex.: "CONFIRMADO" da Agenda. */
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-emerald-100"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-emerald-200"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-emerald-300"] { color: #067647 !important; }
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-rose-100"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-rose-200"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-rose-300"] { color: #b42318 !important; }
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-amber-100"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-amber-200"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-amber-300"] { color: #93540a !important; }
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-sky-100"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-sky-200"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-sky-300"] { color: #075985 !important; }
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-violet-100"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-violet-200"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-violet-300"] { color: #5b21b6 !important; }
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-cyan-100"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-cyan-200"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-cyan-300"] { color: #155e75 !important; }
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-red-100"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-red-200"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-red-300"] { color: #b42318 !important; }
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-orange-100"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-orange-200"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-orange-300"] { color: #9a3412 !important; }
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-fuchsia-100"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-fuchsia-200"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-fuchsia-300"] { color: #86198f !important; }
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-pink-100"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-pink-200"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-pink-300"] { color: #9d174d !important; }
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-lime-100"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-lime-200"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-lime-300"] { color: #3f6212 !important; }
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-teal-100"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-teal-200"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace [class~="text-teal-300"] { color: #115e59 !important; }

/* Janelas (modais) dentro das telas: no tema claro o painel ficava
   transparente e a pagina aparecia por tras do formulario (Agenda: novo evento). */
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace div.fixed.inset-0 > button.absolute.inset-0 {
  background-color: rgba(15, 23, 42, 0.5) !important;
}
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace div.fixed.inset-0 > :is(section, div, form)[class*="bg-slate-9"] {
  background-color: #ffffff !important;
  border-color: #d5dde8 !important;
  box-shadow: 0 24px 60px -20px rgba(15, 23, 42, 0.45) !important;
}
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace div.fixed.inset-0[class*="bg-slate-950/"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace div.fixed.inset-0[class*="bg-slate-900/"],
html.semiomed-smooth:not(.dark) body #root .semiomed-workspace div.fixed.inset-0[class*="bg-black/"] {
  background-color: rgba(15, 23, 42, 0.5) !important;
}
