/*
 * Serviço da Proteção de Dados do CSM — pedidos-siric
 * Autor: Filipe Matias
 *
 * Estilos simples e institucionais para a PWA.
 */

:root {
  color: #17212b;
  background: #f4f7fb;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #f4f7fb;
}

html.tema-noite body {
  background: #101820;
  color: #dfe8f1;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 48px;
}

.cabecalho {
  padding-bottom: 24px;
}

.blocos-cabecalho {
  display: grid;
  gap: 14px;
  width: 100%;
}

.marca {
  margin: 0 0 8px;
  color: #4f6578;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  color: #17324d;
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 22px;
  color: #17324d;
  font-size: 1.35rem;
}

.aviso-privacidade {
  justify-self: start;
  width: max-content;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 14px 16px;
  border-left: 5px solid #2f6f8f;
  background: #e7f1f6;
  color: #17324d;
  font-size: 0.95rem;
  line-height: 1.5;
}

.instrucoes-envio {
  margin: 0;
  padding: 14px 16px;
  border-left: 5px solid #6f7f8d;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(23, 50, 77, 0.06);
  color: #22384d;
  line-height: 1.55;
}

.instrucoes-envio h2 {
  margin: 0 0 6px;
  color: #17324d;
  font-size: 1.05rem;
  line-height: 1.25;
}

.instrucoes-envio p {
  margin: 0;
}

.instrucoes-envio strong {
  color: #17324d;
  font-weight: 700;
}

.ligacao-instrucoes {
  color: #17324d;
  font-weight: 700;
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

.ligacao-instrucoes:hover,
.ligacao-instrucoes:focus-visible {
  color: #23658c;
  text-decoration-color: currentColor;
}

.painel-formulario {
  padding: 28px;
  border: 1px solid #d7e0e8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(23, 50, 77, 0.08);
}

.lista-acessos {
  display: grid;
  gap: 22px;
}

.dados-globais {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #d7e0e8;
}

.acesso-bloco {
  overflow: hidden;
  border: 1px solid #d7e0e8;
  border-radius: 8px;
  background: #fbfdff;
}

.acesso-cabecalho {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid #d7e0e8;
  background: #f7fafc;
}

.acesso-recolhido .acesso-cabecalho {
  border-bottom: 0;
}

.acesso-cabecalho h3 {
  flex: 1 1 auto;
  margin: 0;
  color: #17324d;
  font-size: 1.05rem;
  min-width: 0;
}

.botao-titulo-utilizador {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  max-width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #17324d;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.botao-titulo-utilizador:focus-visible {
  outline: 3px solid rgba(35, 101, 140, 0.24);
  outline-offset: 3px;
}

.icone-colapsar {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #c7d4df;
  border-radius: 999px;
  background: #ffffff;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}

.icone-colapsar::before {
  content: "";
  width: 0.48rem;
  height: 0.48rem;
  border-right: 2px solid #2f6f8f;
  border-bottom: 2px solid #2f6f8f;
  margin-top: -3px;
  transform: rotate(45deg);
  transition: transform 0.12s ease;
}

.botao-titulo-utilizador:hover .icone-colapsar {
  border-color: #1b3b5b;
  background: linear-gradient(180deg, #2a567a 0%, #1b3b5b 100%);
  box-shadow: 0 0 0 3px rgba(35, 101, 140, 0.16);
}

.botao-titulo-utilizador:hover .icone-colapsar::before {
  border-color: #ffffff;
}

.botao-titulo-utilizador[aria-expanded="false"] .icone-colapsar::before {
  margin-top: 0;
  margin-left: -3px;
  transform: rotate(-45deg);
}

.acesso-acoes {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.grelha-campos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.acesso-corpo {
  padding: 18px;
}

.acesso-corpo[hidden] {
  display: none;
}

.campo {
  min-width: 0;
}

.campo label {
  display: block;
  margin-bottom: 7px;
  color: #24384b;
  font-weight: 700;
}

.grupo-tipo-pedido {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  min-height: 46px;
  margin: 0;
  padding: 0;
  border: 0;
}

.grupo-tipo-pedido legend {
  display: block;
  width: 100%;
  margin-bottom: 7px;
  color: #24384b;
  font-weight: 700;
}

.campo .opcao-tipo-pedido {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  margin: 0;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #17212b;
  cursor: pointer;
  font-weight: 600;
  line-height: 1;
}

.campo .opcao-tipo-pedido .form-check-input {
  display: block;
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: #23658c;
  transform: none;
}

.campo .conteudo-tipo-pedido {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 22px;
  line-height: 1;
}

.campo .conteudo-tipo-pedido > span:last-child {
  display: inline-flex;
  align-items: center;
  height: 22px;
}

.campo .opcao-tipo-pedido:focus-within {
  outline: 3px solid rgba(35, 101, 140, 0.24);
  outline-offset: 3px;
  border-radius: 6px;
}

.icone-tipo-pedido {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
}

.icone-conceder {
  background: #1f8f4d;
}

.icone-conceder::before {
  content: "";
  width: 10px;
  height: 6px;
  border-bottom: 2.5px solid #ffffff;
  border-left: 2.5px solid #ffffff;
  transform: translateY(-1px) rotate(-45deg);
}

.icone-revogar {
  background: #b3261e;
}

.icone-revogar::before {
  content: "";
  width: 13px;
  height: 4px;
  border-radius: 999px;
  background: #ffffff;
}

.campo input:not([type="radio"]),
.campo select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #aebdca;
  border-radius: 6px;
  background: #ffffff;
  color: #17212b;
}

.campo input:not([type="radio"]):focus,
.campo select:focus {
  border-color: #23658c;
  outline: 3px solid rgba(35, 101, 140, 0.24);
}

.campo input:not([type="radio"])[aria-invalid="true"],
.campo select[aria-invalid="true"],
.grupo-tipo-pedido[aria-invalid="true"] {
  border-color: #b3261e;
}

.erro-campo {
  min-height: 1.25rem;
  margin: 7px 0 0;
  color: #9a1f18;
  font-size: 0.92rem;
  line-height: 1.35;
}

.acoes {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
  margin-top: 28px;
}

.limpar-dados-area {
  position: relative;
  display: inline-flex;
}

.botao {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}

.botao:focus-visible {
  outline: 3px solid rgba(35, 101, 140, 0.28);
  outline-offset: 2px;
}

.botao:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.botao-primario {
  background: #17324d;
  color: #ffffff;
}

.botao-primario:not(:disabled):hover {
  background: #0f253a;
}

.botao-gerar-destacado {
  --cor-realce-gerar: rgba(35, 101, 140, 0.42);
  animation: destacar-botao-gerar 1.5s ease-out;
}

@keyframes destacar-botao-gerar {
  0% {
    outline: 3px solid var(--cor-realce-gerar);
    outline-offset: 2px;
    box-shadow: 0 0 0 0 var(--cor-realce-gerar);
  }

  55% {
    outline-color: var(--cor-realce-gerar);
    outline-offset: 4px;
    box-shadow: 0 0 0 7px var(--cor-realce-gerar);
  }

  100% {
    outline-color: transparent;
    outline-offset: 8px;
    box-shadow: 0 0 0 12px transparent;
  }
}

.botao-secundario {
  border-color: #aebdca;
  background: #ffffff;
  color: #17324d;
}

.botao-secundario:not(:disabled):hover {
  background: #eef3f7;
}

.botao-ligacao {
  min-height: 36px;
  padding: 6px 10px;
  border-color: #d7e0e8;
  background: transparent;
  color: #17324d;
}

.botao-ligacao:not(:disabled):hover {
  background: #eef3f7;
}

.botao-acao-destrutiva:not(:disabled):hover,
.botao-ligacao.botao-acao-destrutiva:not(:disabled):hover {
  border-color: #b3261e;
  background: #fbefee;
  color: #8a211a;
}

.botao-acao-destrutiva:not(:disabled):focus-visible {
  outline-color: rgba(179, 38, 30, 0.28);
}

.confirmacao-limpeza {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: min(360px, calc(100vw - 32px));
  padding: 9px 12px;
  border: 1px solid #e0b5b1;
  border-radius: 6px;
  background: #fff8f7;
  box-shadow: 0 10px 24px rgba(23, 50, 77, 0.14);
  color: #7d1f18;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  transform: translateX(-50%);
}

.confirmacao-limpeza::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  border-right: 1px solid #e0b5b1;
  border-bottom: 1px solid #e0b5b1;
  background: #fff8f7;
  transform: translateX(-50%) rotate(45deg);
}

.mensagem {
  margin: 22px 0 0;
  padding: 12px 14px;
  border-radius: 6px;
  line-height: 1.45;
}

.mensagem p {
  margin: 0;
}

.mensagem-instrucao {
  margin-top: 6px;
  color: #8a3a34;
  font-size: inherit;
  opacity: 0.95;
}

.mensagem-grupos-erros {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding-left: 0;
  list-style: none;
}

.mensagem-grupo-erro {
  display: grid;
  gap: 6px;
}

.mensagem-grupo-titulo {
  color: #681914;
  font-weight: 700;
}

.mensagem-lista-erros {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.mensagem-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 1px 0;
  border: 0;
  border-bottom: 1px solid rgba(122, 29, 23, 0.28);
  background: transparent;
  color: #7a1d17;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
}

.mensagem-link::before,
.mensagem-link::after {
  content: "";
  width: 10px;
  height: 6px;
  flex: 0 0 auto;
  border: 1.4px solid currentColor;
  border-radius: 999px;
  opacity: 0.74;
  transform: rotate(-28deg);
  order: 2;
}

.mensagem-link::before {
  border-right-color: transparent;
}

.mensagem-link::after {
  margin-left: -10px;
  border-left-color: transparent;
  order: 3;
}

.mensagem-link:hover {
  border-bottom-color: rgba(104, 25, 20, 0.7);
  color: #681914;
}

.mensagem-link:focus-visible {
  outline: 3px solid rgba(138, 33, 26, 0.24);
  outline-offset: 3px;
  border-radius: 4px;
}

.mensagem-sucesso {
  border: 1px solid #8ac0a0;
  background: #edf8f1;
  color: #185b31;
}

.mensagem-erro {
  border: 1px solid #d7a19c;
  background: #fbefee;
  color: #8a211a;
}

.atalhos-scroll {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.botao-scroll {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(174, 189, 202, 0.72);
  border-radius: 999px;
  background: linear-gradient(180deg, #234767 0%, #17324d 100%);
  box-shadow: 0 10px 22px rgba(23, 50, 77, 0.22);
  color: #ffffff;
  cursor: pointer;
  transition:
    background 0.12s ease,
    box-shadow 0.12s ease,
    transform 0.12s ease;
}

.botao-scroll:hover {
  background: linear-gradient(180deg, #2a567a 0%, #1b3b5b 100%);
  box-shadow: 0 12px 26px rgba(23, 50, 77, 0.28);
  transform: translateY(-1px);
}

.botao-scroll:focus-visible {
  outline: 3px solid rgba(35, 101, 140, 0.32);
  outline-offset: 3px;
}

.botao-scroll[hidden] {
  display: none;
}

.botao-scroll span {
  width: 13px;
  height: 13px;
  border-top: 3px solid #ffffff;
  border-left: 3px solid #ffffff;
}

.botao-scroll-inicio span {
  margin-top: 6px;
  transform: rotate(45deg);
}

.botao-scroll-fim span {
  margin-bottom: 6px;
  transform: rotate(225deg);
}

.botao-tema {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(174, 189, 202, 0.72);
  border-radius: 999px;
  background: linear-gradient(180deg, #234767 0%, #17324d 100%);
  box-shadow: 0 10px 22px rgba(23, 50, 77, 0.22);
  color: #ffffff;
  cursor: pointer;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.12s ease,
    color 0.12s ease,
    transform 0.12s ease;
}

.botao-tema:hover {
  background: linear-gradient(180deg, #2a567a 0%, #1b3b5b 100%);
  box-shadow: 0 12px 26px rgba(23, 50, 77, 0.28);
  transform: translateY(-1px);
}

.botao-tema:focus-visible {
  outline: 3px solid rgba(35, 101, 140, 0.32);
  outline-offset: 3px;
}

.icone-tema {
  position: relative;
  display: block;
  width: 21px;
  height: 21px;
}

.icone-tema-modo::before,
.icone-tema-modo::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.icone-tema-modo::before {
  top: 50%;
  left: 50%;
  width: 21px;
  height: 21px;
  margin-top: -10.5px;
  margin-left: -10.5px;
  border: 2.2px solid currentColor;
  border-radius: 999px;
  background: linear-gradient(90deg, currentColor 0 50%, transparent 50% 100%);
  box-sizing: border-box;
}

.icone-tema-modo::after {
  top: 50%;
  left: 50%;
  width: 2.2px;
  height: 17px;
  margin-top: -8.5px;
  margin-left: -1.1px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.9;
}

html.tema-noite body .app-shell {
  color: #dfe8f1;
}

html.tema-noite body .marca,
html.tema-noite body .rodape-app {
  color: #96aabd;
}

html.tema-noite body h1,
html.tema-noite body h2,
html.tema-noite body .acesso-cabecalho h3,
html.tema-noite body .botao-titulo-utilizador {
  color: #f2f7fb;
}

html.tema-noite body .aviso-privacidade {
  border-left-color: #75b7d7;
  background: #142838;
  color: #dcebf5;
}

html.tema-noite body .instrucoes-envio {
  border-left-color: #a8b8c6;
  background: #172331;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
  color: #dfe8f1;
}

html.tema-noite body .instrucoes-envio h2,
html.tema-noite body .instrucoes-envio strong,
html.tema-noite body .ligacao-instrucoes {
  color: #f2f7fb;
}

html.tema-noite body .ligacao-instrucoes:hover,
html.tema-noite body .ligacao-instrucoes:focus-visible {
  color: #b9dcef;
}

html.tema-noite body .painel-formulario {
  border-color: #314354;
  background: #172331;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
}

html.tema-noite body .dados-globais {
  border-bottom-color: #314354;
}

html.tema-noite body .acesso-bloco {
  border-color: #314354;
  background: #14202d;
}

html.tema-noite body .acesso-cabecalho {
  border-bottom-color: #314354;
  background: #1b2a39;
}

html.tema-noite body .icone-colapsar {
  border-color: #4a6075;
  background: #111c27;
}

html.tema-noite body .icone-colapsar::before {
  border-color: #86c2dc;
}

html.tema-noite body .botao-titulo-utilizador:hover .icone-colapsar {
  border-color: rgba(203, 214, 224, 0.92);
  background: linear-gradient(180deg, #ffffff 0%, #edf3f8 100%);
  box-shadow: 0 0 0 3px rgba(223, 234, 243, 0.16);
}

html.tema-noite body .botao-titulo-utilizador:hover .icone-colapsar::before {
  border-color: #17324d;
}

html.tema-noite body .campo label,
html.tema-noite body .grupo-tipo-pedido legend,
html.tema-noite body .campo .opcao-tipo-pedido {
  color: #e9f1f8;
}

html.tema-noite body .campo input:not([type="radio"]),
html.tema-noite body .campo select {
  border-color: #4b6074;
  background: #0f1a25;
  color: #f2f7fb;
}

html.tema-noite body .campo input:not([type="radio"])::placeholder {
  color: #899aad;
}

html.tema-noite body .campo input:not([type="radio"]):focus,
html.tema-noite body .campo select:focus {
  border-color: #89c7e1;
  outline-color: rgba(137, 199, 225, 0.24);
}

html.tema-noite body .campo .opcao-tipo-pedido .form-check-input {
  accent-color: #7fbfe0;
}

html.tema-noite body .botao-primario {
  background: #dfeaf3;
  color: #10263d;
}

html.tema-noite body .botao-primario:not(:disabled):hover {
  background: #ffffff;
}

html.tema-noite body .botao-gerar-destacado {
  --cor-realce-gerar: rgba(185, 220, 239, 0.48);
}

@media (prefers-reduced-motion: reduce) {
  .botao-gerar-destacado {
    animation: none;
    outline: 3px solid var(--cor-realce-gerar);
    outline-offset: 4px;
    box-shadow: 0 0 0 5px var(--cor-realce-gerar);
  }
}

html.tema-noite body .botao-secundario,
html.tema-noite body .botao-ligacao {
  border-color: #4b6074;
  background: #111c27;
  color: #edf4fb;
}

html.tema-noite body .botao-secundario:not(:disabled):hover,
html.tema-noite body .botao-ligacao:not(:disabled):hover {
  background: #1f3041;
}

html.tema-noite body .botao-acao-destrutiva:not(:disabled):hover {
  border-color: #d36b64;
  background: #3a1e20;
  color: #f4c5c0;
}

html.tema-noite body .botao-acao-destrutiva:not(:disabled):focus-visible {
  outline-color: rgba(211, 107, 100, 0.34);
}

html.tema-noite body .confirmacao-limpeza {
  border-color: #8f4a46;
  background: #2b181a;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
  color: #f5d0cc;
}

html.tema-noite body .confirmacao-limpeza::after {
  border-color: #8f4a46;
  background: #2b181a;
}

html.tema-noite body .mensagem-sucesso {
  border-color: #52986d;
  background: #10291d;
  color: #bfe8cb;
}

html.tema-noite body .mensagem-erro {
  border-color: #a85b55;
  background: #321b1c;
  color: #f1c2bd;
}

html.tema-noite body .erro-campo,
html.tema-noite body .mensagem-instrucao,
html.tema-noite body .mensagem-grupo-titulo,
html.tema-noite body .mensagem-link {
  color: #f0b8b2;
}

html.tema-noite body .mensagem-link {
  border-bottom-color: rgba(240, 184, 178, 0.42);
}

html.tema-noite body .mensagem-link:hover {
  border-bottom-color: rgba(255, 213, 209, 0.72);
  color: #ffd5d1;
}

html.tema-noite body .botao-tema,
html.tema-noite body .botao-scroll {
  border-color: rgba(203, 214, 224, 0.92);
  background: linear-gradient(180deg, #ffffff 0%, #edf3f8 100%);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.34);
  color: #17324d;
}

html.tema-noite body .botao-tema:hover,
html.tema-noite body .botao-scroll:hover {
  border-color: #ffffff;
  background: linear-gradient(180deg, #ffffff 0%, #dfeaf3 100%);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4);
  color: #0f253a;
}

html.tema-noite body .botao-scroll span {
  border-top-color: #17324d;
  border-left-color: #17324d;
}

html.tema-noite body .botao-scroll:hover span {
  border-top-color: #0f253a;
  border-left-color: #0f253a;
}

.rodape-app {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 8px;
  row-gap: 3px;
  margin: 16px auto 0;
  color: #6f7f8d;
  font-size: 0.68rem;
  line-height: 1.2;
  text-align: center;
}

.ficha-tecnica-acionador,
.csm-app {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-decoration: none;
}

.ficha-tecnica-acionador {
  margin: 0;
  padding: 4px 0;
  cursor: pointer;
}

.csm-app {
  padding: 4px 0;
}

.copyright-app {
  white-space: nowrap;
}

.ficha-tecnica-acionador:hover,
.csm-app:hover {
  color: #17324d;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ficha-tecnica-acionador:focus-visible,
.csm-app:focus-visible,
.ficha-tecnica-fechar:focus-visible {
  outline: 2px solid #2f6f8f;
  outline-offset: 3px;
}

html.tema-noite body .ficha-tecnica-acionador:hover,
html.tema-noite body .csm-app:hover {
  color: #f2f7fb;
}

.ficha-tecnica-modal {
  width: min(720px, calc(100% - 32px));
  max-height: min(760px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d7e0e8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 28px 72px rgba(15, 37, 58, 0.3);
  color: #22384d;
}

.ficha-tecnica-modal::backdrop {
  background: rgba(15, 24, 32, 0.62);
  backdrop-filter: blur(3px);
}

.ficha-tecnica-cabecalho {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  border-bottom: 3px solid #2f6f8f;
  background: #f4f7fb;
}

.ficha-tecnica-identidade {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.ficha-tecnica-identidade img {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
}

.ficha-tecnica-identidade p,
.ficha-tecnica-identidade h2 {
  margin: 0;
}

.ficha-tecnica-identidade p {
  margin-bottom: 3px;
  color: #607488;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ficha-tecnica-identidade h2 {
  color: #17324d;
  font-size: 1.65rem;
  line-height: 1.1;
}

.ficha-tecnica-fechar {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: #4f6578;
  cursor: pointer;
}

.ficha-tecnica-fechar:hover {
  border-color: #cbd7e1;
  background: #e7edf3;
  color: #17324d;
}

.ficha-tecnica-fechar span::before,
.ficha-tecnica-fechar span::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.ficha-tecnica-fechar span::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.ficha-tecnica-fechar span::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.ficha-tecnica-conteudo {
  display: grid;
  gap: 24px;
  max-height: calc(100dvh - 214px);
  padding: 28px;
  overflow-y: auto;
  scrollbar-color: #7896ad transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.ficha-tecnica-conteudo::-webkit-scrollbar {
  width: 11px;
}

.ficha-tecnica-conteudo::-webkit-scrollbar-track,
.ficha-tecnica-conteudo::-webkit-scrollbar-corner {
  background: transparent;
}

.ficha-tecnica-conteudo::-webkit-scrollbar-thumb {
  min-height: 40px;
  border: 3px solid transparent;
  border-radius: 8px;
  background: #7896ad;
  background-clip: padding-box;
}

.ficha-tecnica-conteudo::-webkit-scrollbar-thumb:hover {
  background: #416d8d;
  background-clip: padding-box;
}

.ficha-tecnica-conteudo h3 {
  margin: 0 0 8px;
  color: #17324d;
  font-size: 1.15rem;
  line-height: 1.3;
}

.ficha-tecnica-conteudo p {
  margin: 0;
  line-height: 1.55;
}

.ficha-tecnica-privacidade {
  padding: 18px 20px;
  border-left: 4px solid #23835b;
  background: #edf8f3;
  color: #185c43;
}

.ficha-tecnica-privacidade h3 {
  color: #185c43;
}

.ficha-tecnica-legenda,
.ficha-tecnica-creditos dt {
  color: #6f7f8d;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ficha-tecnica-autoria > p + p {
  margin-top: 5px;
}

.ficha-tecnica-creditos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid #e3e9ee;
}

.ficha-tecnica-creditos div + div {
  padding-left: 24px;
  border-left: 1px solid #e3e9ee;
}

.ficha-tecnica-creditos dt {
  margin-bottom: 8px;
}

.ficha-tecnica-creditos dd {
  margin: 0 0 4px;
  color: #17212b;
  font-weight: 650;
}

.ficha-tecnica-rodape {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 15px 28px;
  border-top: 1px solid #e3e9ee;
  color: #778897;
  font-size: 0.72rem;
}

.ficha-tecnica-rodape a {
  margin-left: 0;
  color: inherit;
  text-decoration: none;
}

.ficha-tecnica-rodape a:hover {
  color: #17324d;
  text-decoration: underline;
  text-underline-offset: 3px;
}

html.tema-noite body .ficha-tecnica-modal {
  border-color: #33485a;
  background: #172331;
  box-shadow: 0 30px 84px rgba(0, 0, 0, 0.62);
  color: #dfe8f1;
}

html.tema-noite body .ficha-tecnica-cabecalho {
  border-bottom-color: #75b7d7;
  background: #14202b;
}

html.tema-noite body .ficha-tecnica-identidade p,
html.tema-noite body .ficha-tecnica-legenda,
html.tema-noite body .ficha-tecnica-creditos dt,
html.tema-noite body .ficha-tecnica-rodape {
  color: #96aabd;
}

html.tema-noite body .ficha-tecnica-identidade h2,
html.tema-noite body .ficha-tecnica-conteudo h3,
html.tema-noite body .ficha-tecnica-creditos dd {
  color: #f2f7fb;
}

html.tema-noite body .ficha-tecnica-conteudo {
  scrollbar-color: #7699b2 transparent;
}

html.tema-noite body .ficha-tecnica-conteudo::-webkit-scrollbar-thumb {
  background: #7699b2;
  background-clip: padding-box;
}

html.tema-noite body .ficha-tecnica-conteudo::-webkit-scrollbar-thumb:hover {
  background: #a4cce1;
  background-clip: padding-box;
}

html.tema-noite body .ficha-tecnica-fechar {
  color: #b7c7d5;
}

html.tema-noite body .ficha-tecnica-fechar:hover {
  border-color: #40576a;
  background: #223446;
  color: #ffffff;
}

html.tema-noite body .ficha-tecnica-privacidade {
  border-left-color: #55b894;
  background: #16362f;
  color: #cfeee3;
}

html.tema-noite body .ficha-tecnica-privacidade h3 {
  color: #e3f8f1;
}

html.tema-noite body .ficha-tecnica-creditos,
html.tema-noite body .ficha-tecnica-creditos div + div,
html.tema-noite body .ficha-tecnica-rodape {
  border-color: #33485a;
}

html.tema-noite body .ficha-tecnica-rodape a:hover {
  color: #f2f7fb;
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 24px, 960px);
    padding-top: 24px;
  }

  .blocos-cabecalho {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }

  .aviso-privacidade,
  .instrucoes-envio {
    width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .painel-formulario {
    padding: 20px;
  }

  .grelha-campos {
    grid-template-columns: 1fr;
  }

  .acesso-cabecalho {
    align-items: flex-start;
    flex-direction: column;
  }

  .acesso-acoes {
    width: 100%;
  }

  .botao {
    width: 100%;
  }

  .limpar-dados-area {
    width: 100%;
  }

  .confirmacao-limpeza {
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    transform: none;
  }

  .confirmacao-limpeza::after {
    left: 50%;
  }

  .atalhos-scroll {
    right: 14px;
    bottom: 14px;
  }

  .botao-tema {
    top: 14px;
    right: 14px;
  }

  .rodape-app {
    max-width: 300px;
    line-height: 1.45;
  }

  .ficha-tecnica-modal {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px);
  }

  .ficha-tecnica-cabecalho {
    padding: 19px 20px;
  }

  .ficha-tecnica-identidade img {
    width: 44px;
    height: 44px;
  }

  .ficha-tecnica-identidade h2 {
    font-size: 1.4rem;
  }

  .ficha-tecnica-conteudo {
    gap: 20px;
    max-height: calc(100dvh - 190px);
    padding: 22px 20px;
  }

  .ficha-tecnica-creditos {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .ficha-tecnica-creditos div + div {
    padding: 16px 0 0;
    border-top: 1px solid #e3e9ee;
    border-left: 0;
  }

  .ficha-tecnica-rodape {
    justify-content: center;
    padding: 14px 20px;
    text-align: center;
  }

  .ficha-tecnica-rodape a {
    margin-left: 0;
  }
}
