/* RESET */
* {
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
}

/* BODY */
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.05), transparent 35%),
    linear-gradient(180deg, #062a5c 0%, #031c3d 100%);
  color: #222;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* CONTAINER */
.container {
  flex: 1;
  max-width: 1200px;
  margin: 10px auto 8px;
  background: rgba(255, 255, 255, 0.97);
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
  width: calc(100% - 40px);
}

/* TOPO LOGIN */
.top-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.top-bar-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.top-bar-logo img {
  width: 118px;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.menu-mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #d9e4ef;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 100%);
  box-shadow: 0 8px 18px rgba(18, 58, 99, 0.08);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.menu-mobile-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #123a63;
  display: block;
}

.top-bar-direita {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #d9e4ef;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 100%);
  box-shadow: 0 10px 24px rgba(18, 58, 99, 0.08);
}

.login-topo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#btnGoogleLogin {
  min-width: 84px;
  padding: 8px 14px;
  min-height: 38px;
  font-size: 13px;
}

.login-email-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.login-email-box input {
  height: 38px;
  min-width: 170px;
  padding: 0 12px;
  border: 1px solid #cfd6dd;
  border-radius: 10px;
  font-size: 13px;
  font-family: Arial, Helvetica, sans-serif;
  background: #fff;
  color: #222;
}

.login-email-box input:focus {
  border-color: #0b63c9;
  box-shadow: 0 0 0 2px rgba(11, 99, 201, 0.15);
  outline: none;
}

.login-email-acoes {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-secundario-topo {
  background: #eef3f8;
  color: #123a63;
  border: 1px solid #c7d6e6;
}

.btn-secundario-topo:hover {
  background: #e4edf6;
}

.modal-login-conteudo {
  max-width: 300px;
}

.modal-login-conteudo .modal-topo {
  padding: 10px 14px;
  align-items: center;
}

.modal-login-conteudo .modal-topo h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.modal-login-corpo {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.modal-login-google {
  width: 100%;
  min-height: 42px;
}

.modal-login-divisor {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #6a7a8b;
  text-transform: uppercase;
}

.login-email-box-modal {
  width: 100%;
  flex-direction: column;
  align-items: stretch;
}

.login-email-box-modal input {
  width: 100%;
  min-width: 0;
}

.login-email-box-modal .login-email-acoes {
  width: 100%;
}

.login-email-box-modal .login-email-acoes button {
  flex: 1 1 120px;
}

.btn-fechar-modal {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  padding: 0;
  min-width: auto;
  min-height: auto;
  box-shadow: none;
}

.btn-fechar-modal:hover {
  background: transparent;
  transform: none;
}

.btn-link-topo {
  color: #0d2d57;
  font-weight: 700;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #d8b15a, #c79a33);
  border: 1px solid rgba(174, 129, 33, 0.25);
  white-space: nowrap;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  min-width: 84px;
  font-size: 13px;
}

.btn-link-topo:hover {
  background: linear-gradient(135deg, #e4c16e, #d4a743);
  border-color: rgba(174, 129, 33, 0.32);
}

/* FOTO USUÁRIO */
.usuario-foto-wrapper {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: #f3f6fa;
  border: 1.5px solid #dbe4ef;
  display: flex;
  align-items: center;
  justify-content: center;
}

.usuario-foto-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.usuario-nome {
  font-weight: 700;
  color: #123a63;
  white-space: nowrap;
  font-size: 14px;
  margin-right: 2px;
}

/* BOTAO SAIR */
.btn-sair {
  background: #c94a4a;
  color: #fff;
  min-height: 38px;
  min-width: 74px;
  padding: 8px 14px;
  font-size: 13px;
}

.btn-sair:hover {
  background: #a83838;
}

/* TÍTULO */
h1 {
  margin-top: 30px;
  text-align: center;
  color: #123a63;
  font-size: 24px;
}

.home-hero {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  margin: 24px 0 18px;
  padding: 18px 20px;
  border: 1px solid rgba(18, 58, 99, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(234, 243, 255, 0.95), rgba(255, 255, 255, 0.98)),
    radial-gradient(circle at top right, rgba(216, 177, 90, 0.15), transparent 40%);
  box-shadow: 0 10px 28px rgba(18, 58, 99, 0.06);
}

.home-hero h1 {
  margin: 0;
  text-align: center;
  line-height: 1.1;
}

/* FORMULÁRIO */
.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.campo {
  display: flex;
  flex-direction: column;
}

.campo-linha-inteira {
  grid-column: 1 / -1;
  width: 100%;
}

.campo-juros {
  padding: 16px 18px;
  border: 1px solid #dce6f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f9fd 100%);
}

.linha-opcao-juros {
  width: fit-content;
}

.juros-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 0;
}

.campo label {
  font-weight: bold;
  margin-bottom: 6px;
}

.campo input[type="text"],
.campo select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #cfd6dd;
  border-radius: 10px;
  font-size: 15px;
  font-family: Arial, Helvetica, sans-serif;
  background-color: #ffffff;
  color: #222;
  outline: none;
  box-shadow: none;
  display: block;
  appearance: none;
}

.campo input[type="text"]::placeholder {
  color: #7a8694;
}

.campo input[type="text"]:focus,
.campo select:focus {
  border-color: #0b63c9;
  box-shadow: 0 0 0 2px rgba(11, 99, 201, 0.15);
}

/* SETA VISUAL NO CAMPO ÍNDICE SEM ALTERAR LAYOUT */
.campo-select select {
  padding-right: 40px;
  background-image:
    linear-gradient(45deg, transparent 50%, #123a63 50%),
    linear-gradient(135deg, #123a63 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

/* BLOCO DE ESCOLHA */
.campo-estrutura {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #fafcff;
}

.titulo-com-ajuda {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.campo-estrutura .titulo-com-ajuda > label {
  margin-bottom: 0;
}

.bloco-escolha {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 0;
}

.opcao-metodo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.check-label-grupo {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* RADIO */
.linha-opcao {
  display: inline-grid;
  grid-template-columns: 18px auto 18px;
  align-items: center;
  column-gap: 2px;
  cursor: pointer;
  min-height: 46px;
  width: fit-content;
  margin-bottom: 0;
}

.linha-opcao span {
  font-weight: 600;
  margin-right: 0;
}

.campo .linha-opcao {
  margin-bottom: 0;
}

.campo-estrutura .bloco-escolha .linha-opcao {
  padding: 0;
}

.linha-opcao-ajustada {
  display: inline-flex;
  align-items: center;
  min-height: auto;
}

.linha-opcao-ajustada input[type="checkbox"] {
  margin-right: 0;
}

.linha-opcao-ajustada span {
  margin: 0;
}

.btn-ajuda-metodo {
  margin-left: 0;
}

.linha-opcao input[type="radio"],
.linha-opcao input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #0b63c9;
}


/* BOTAO DE AJUDA */
.btn-ajuda-inline {
  width: 18px;
  height: 18px;
  min-width: 18px;
  padding: 0;
  margin-left: 0;
  border-radius: 50%;
  border: 1px solid #bbb;
  background: #fff;
  color: #555;
  font-size: 12px;
  font-weight: bold;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
  transition: 0.15s;
}

.btn-ajuda-inline:hover {
  background: #f0f0f0;
  border-color: #999;
}

/* BOTÕES */
.botoes {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.ai-box {
  margin: 22px 0 18px;
  padding: 22px;
  border: 1px solid #dbe5ef;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(216, 177, 90, 0.18), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 12px 28px rgba(18, 58, 99, 0.06);
}

.ai-box-topo {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.ai-box-topo h2 {
  margin: 0;
  color: #123a63;
  font-size: 22px;
}

.ai-box-subtitulo {
  margin: 8px 0 0;
  color: #617181;
  font-size: 14px;
  line-height: 1.6;
  max-width: 760px;
}

.ai-box-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #123a63;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ia-textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px;
  border: 1px solid #cfd6dd;
  border-radius: 12px;
  font-size: 14px;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  resize: vertical;
  background: #fff;
  color: #222;
}

.ia-textarea:focus {
  border-color: #0b63c9;
  box-shadow: 0 0 0 2px rgba(11, 99, 201, 0.15);
  outline: none;
}

.ai-acoes {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.status-ia {
  min-height: 22px;
  margin-top: 12px;
}

.ai-resposta {
  margin-top: 12px;
  padding: 22px 24px;
  border-radius: 18px;
  border: 1px solid #d8e3ef;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 249, 253, 0.98) 100%);
  color: #243240;
  line-height: 1.75;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 12px 28px rgba(18, 58, 99, 0.08);
}

.ai-resposta p {
  margin: 0 0 12px;
}

.ai-resposta p:last-child {
  margin-bottom: 0;
}

.ai-resposta-titulo {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(18, 58, 99, 0.12);
  color: #123a63;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
}

.ai-resposta strong {
  color: #123a63;
  font-weight: 800;
}

.ai-resposta ul {
  margin: 0 0 14px;
  padding-left: 20px;
}

.ai-resposta li {
  margin-bottom: 8px;
}

.ai-resposta li:last-child {
  margin-bottom: 0;
}

.ai-resposta code {
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(18, 58, 99, 0.08);
  color: #123a63;
  font-size: 0.95em;
  font-family: Consolas, "Courier New", monospace;
}

button {
  border: none;
  background: linear-gradient(135deg, #d8b15a, #c79a33);
  color: #0d2d57;
  padding: 12px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
}

button:hover {
  background: linear-gradient(135deg, #e4c16e, #d4a743);
}

/* STATUS */
.status {
  margin: 10px 0;
  font-weight: bold;
  color: #444;
}

/* RESULTADO */
.resultado {
  margin: 16px 0;
  padding: 14px;
  background: #eef6ff;
  border-left: 5px solid #0b63c9;
  border-radius: 8px;
  font-size: 18px;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ÁREA DO USUÁRIO */
.area-usuario {
  margin: 24px 0;
  padding: 18px;
  border: 1px solid #dde5ee;
  border-radius: 12px;
  background: #fafcff;
}

.area-usuario-topo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.area-usuario-topo h3 {
  margin: 0;
  color: #123a63;
}

.area-usuario-subtitulo {
  margin: 0 0 14px;
  color: #5a6775;
  font-size: 14px;
}

.lista-calculos-usuario {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin: 24px 0 18px;
  padding: 18px 20px;
  border: 1px solid rgba(18, 58, 99, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(234, 243, 255, 0.95), rgba(255, 255, 255, 0.98)),
    radial-gradient(circle at top right, rgba(216, 177, 90, 0.15), transparent 40%);
  box-shadow: 0 10px 28px rgba(18, 58, 99, 0.06);
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.user-page-title {
  margin: 0;
  color: #123a63;
  font-size: 24px;
  line-height: 1.1;
  text-align: left;
}

.user-page-subtitle {
  margin: 8px 0 0;
  color: #617181;
  font-size: 14px;
  line-height: 1.6;
  max-width: 760px;
}

.calculo-card {
  background: #fff;
  border: 1px solid #d8dee6;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.calculo-card-topo {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.calculo-card-titulo {
  font-weight: bold;
  color: #123a63;
  font-size: 16px;
}

.calculo-card-data {
  font-size: 12px;
  color: #6d7884;
}

.calculo-card-linha {
  margin: 4px 0;
  font-size: 14px;
  color: #2b2b2b;
}

.calculo-card-linha strong {
  color: #123a63;
}

.calculo-card-acoes {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.btn-card-acao {
  padding: 10px 14px;
  font-size: 13px;
}

.btn-card-excluir {
  background: linear-gradient(135deg, #d86b6b, #bf4444);
  color: #fff;
}

.btn-card-excluir:hover {
  background: linear-gradient(135deg, #e17a7a, #c94a4a);
}

.item-vazio {
  padding: 14px;
  text-align: center;
  color: #6d7884;
  background: #fff;
  border: 1px dashed #cfd6dd;
  border-radius: 10px;
}

.forum-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin: 24px 0 18px;
  padding: 18px 20px;
  border: 1px solid rgba(18, 58, 99, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(234, 243, 255, 0.95), rgba(255, 255, 255, 0.98)),
    radial-gradient(circle at top right, rgba(216, 177, 90, 0.15), transparent 40%);
  box-shadow: 0 10px 28px rgba(18, 58, 99, 0.06);
}

.forum-hero h1 {
  margin: 0;
  text-align: left;
  font-size: 24px;
  line-height: 1.1;
}

.forum-hero-texto {
  margin: 8px 0 0;
  color: #617181;
  max-width: 760px;
  line-height: 1.6;
}

.forum-criacao,
.forum-lista-area {
  margin: 22px 0;
  padding: 22px;
  border: 1px solid #e3eaf2;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 24px rgba(18, 58, 99, 0.05);
}

.forum-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

#forumTopico,
label[for="forumTopico"] {
  display: none !important;
}

.forum-topicos-escolha {
  margin-top: 10px;
}

.forum-topico-select {
  display: none;
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #cfd6dd;
  border-radius: 12px;
  font-size: 15px;
  font-family: Arial, Helvetica, sans-serif;
  background-color: #ffffff;
  color: #222;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #123a63 50%),
    linear-gradient(135deg, #123a63 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.forum-topicos-escolha .linha-opcao {
  padding: 10px 14px;
  border: 1px solid #dce6f0;
  border-radius: 12px;
  background: #fff;
}

.forum-topicos-escolha .linha-opcao:hover {
  border-color: #c6d8ea;
  background: #f9fbfe;
}

.forum-filtros {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.forum-filtro-btn {
  padding: 7px 12px;
  border: 1px solid #d8e2ec;
  border-radius: 999px;
  background: #f8fbff;
  color: #123a63;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: none;
}

.forum-filtro-btn:hover {
  background: #eef5fc;
  border-color: #cbd8e7;
}

.forum-filtro-btn.ativo {
  background: #123a63;
  border-color: #123a63;
  color: #fff;
}

.forum-textarea {
  width: 100%;
  min-height: 132px;
  padding: 14px;
  border: 1px solid #cfd6dd;
  border-radius: 12px;
  font-size: 14px;
  font-family: Arial, Helvetica, sans-serif;
  resize: vertical;
  line-height: 1.55;
  background: #fff;
}

.forum-textarea:focus {
  border-color: #0b63c9;
  box-shadow: 0 0 0 2px rgba(11, 99, 201, 0.15);
  outline: none;
}

.forum-lista {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.forum-card {
  background: #fff;
  border: 1px solid #e2e9f0;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 20px rgba(18, 58, 99, 0.04);
}

.forum-card-destacado {
  border-color: #d8b15a;
  box-shadow: 0 0 0 2px rgba(216, 177, 90, 0.2);
}

.forum-card-topo {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.forum-card-titulo {
  color: #123a63;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
}

.forum-card-meta {
  margin-top: 6px;
  color: #728191;
  font-size: 12px;
}

.forum-card-texto {
  margin: 16px 0 14px;
  color: #243240;
  line-height: 1.65;
  font-size: 14px;
}

.forum-card-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #edf2f7;
}

.forum-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f3f8ff;
  border: 1px solid #d8e5f4;
  color: #123a63;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.forum-acoes,
.forum-resposta-acoes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.forum-respostas {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #edf2f7;
}

.forum-respostas-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.forum-reply-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f9fbfe;
  border: 1px solid #e5edf5;
}

.forum-reply-meta {
  color: #697887;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}

.forum-reply-texto {
  color: #243240;
  line-height: 1.55;
  font-size: 13px;
}

.forum-lista-topo h2,
.forum-criacao h2 {
  margin: 0;
  color: #123a63;
  font-size: 20px;
}

.forum-lista-topo {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.forum-lista-texto {
  margin: 8px 0 0;
  color: #657484;
  font-size: 14px;
}

.forum-criacao .botoes {
  margin-top: 14px;
  margin-bottom: 0;
}

.forum-acoes .btn-card-acao,
.forum-resposta-acoes .btn-card-acao {
  padding: 7px 11px;
  border: 1px solid #d8e2ec;
  border-radius: 999px;
  background: #f8fbff;
  color: #123a63;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: none;
}

.forum-acoes .btn-card-acao:hover,
.forum-resposta-acoes .btn-card-acao:hover {
  background: #eef5fc;
  border-color: #cbd8e7;
}

.forum-acoes .btn-card-excluir-forum {
  background: #fff5f5;
  border-color: #f0c8c8;
  color: #a33a3a;
}

.forum-acoes .btn-card-excluir-forum:hover {
  background: #fdeaea;
  border-color: #e7b1b1;
}

.forum-resposta-form {
  padding: 12px;
  border-radius: 12px;
  background: #fbfdff;
  border: 1px solid #edf2f7;
}

.forum-textarea-resposta {
  min-height: 88px;
  font-size: 13px;
}

#btnPublicarForum {
  min-width: 180px;
  padding: 11px 16px;
  font-size: 13px;
}

/* TABELA */
.tabela-box {
  overflow-x: auto;
  margin-top: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

thead {
  background: #123a63;
  color: white;
}

th, td {
  padding: 10px 8px;
  border: 1px solid #d8dee6;
  text-align: center;
  font-size: 14px;
}

tbody tr:nth-child(odd) {
  background: #f2f2f2;
}

tbody tr:nth-child(even) {
  background: #e7e7e7;
}

.tabela-resumo-linha {
  background: #f6f9fc !important;
}

.tabela-resumo-label {
  text-align: right;
  font-weight: 700;
  color: #123a63;
  padding-right: 18px;
}

.tabela-resumo-valor {
  font-weight: 700;
  color: #123a63;
  background: #ffffff;
}

.tabela-resumo-total .tabela-resumo-label,
.tabela-resumo-total .tabela-resumo-valor {
  background: #eef6ff;
  color: #0b63c9;
}

/* UTIL */
.oculto {
  display: none !important;
}

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-conteudo {
  width: 100%;
  max-width: 760px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
}

.modal-conteudo.modal-login-conteudo {
  max-width: 400px;
}

.modal-topo {
  display: flex;
  justify-content: space-between;
  background: #123a63;
  color: #fff;
  padding: 14px 18px;
}

.modal-corpo {
  padding: 20px;
}

/* RODAPÉ */
.rodape {
  text-align: center;
  padding: 16px;
  font-size: 12.5px;
  color: #d8b15a;
  background: linear-gradient(180deg, #031c3d, #02142c);
  margin-top: auto;
}

.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  display: flex;
  justify-content: center;
}

.cookie-banner-conteudo {
  width: min(960px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(3, 28, 61, 0.96);
  color: #fff;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(216, 177, 90, 0.35);
}

.cookie-banner-texto {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.cookie-banner-link {
  color: #f4d38b;
  font-weight: 700;
  text-decoration: underline;
}

.cookie-banner-link:hover {
  color: #ffe7b1;
}

.cookie-banner-botao {
  flex-shrink: 0;
  min-width: 132px;
}

/* MOBILE */
@media (max-width: 980px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forum-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .container {
    width: calc(100% - 16px);
    margin: 8px auto 6px;
    padding: 16px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .bloco-escolha {
    flex-direction: column;
    gap: 12px;
  }

  .opcao-metodo {
    gap: 6px;
  }

  .linha-opcao-ajustada {
    min-height: 34px;
  }

  .check-label-grupo {
    gap: 6px;
  }

  .top-bar {
    flex-wrap: wrap;
    align-items: center;
  }

  .juros-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
  }

  .juros-grid > .campo:nth-child(1),
  .juros-grid > .campo:nth-child(2),
  .juros-grid > .campo:nth-child(3) {
    grid-column: span 2;
  }

  .juros-grid > .campo:nth-child(4),
  .juros-grid > .campo:nth-child(5) {
    grid-column: span 3;
  }

  .forum-filtros {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    margin-top: 6px;
    margin-bottom: 10px;
  }

  .forum-filtro-btn {
    width: 100%;
    min-width: 0;
    padding: 7px 2px;
    font-size: 9px;
    letter-spacing: 0;
  }

  .forum-topico-select {
    display: block;
    margin-top: 10px;
  }

  .forum-topicos-escolha {
    display: none;
  }

  .forum-lista {
    margin-top: 10px;
  }

  .top-bar-direita {
    display: none;
    width: 100%;
    justify-content: flex-start;
    padding: 10px;
    border-radius: 14px;
    margin-top: 6px;
  }

  .top-bar-direita.menu-aberto {
    display: flex;
  }

  .top-bar-logo {
    justify-content: flex-start;
  }

  .top-bar-logo img {
    width: 108px;
  }

  .menu-mobile-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .login-topo {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: stretch;
  }

  #loginAutenticado {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 8px;
    row-gap: 10px;
  }

  #loginAutenticado .usuario-foto-wrapper {
    grid-column: 1;
    grid-row: 1;
  }

  #loginAutenticado .usuario-nome {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    white-space: normal;
    margin-right: 0;
  }

  #loginAutenticado .btn-link-topo,
  #loginAutenticado .btn-sair {
    grid-column: 1 / -1;
  }

  .area-usuario-topo {
    align-items: stretch;
  }

  .botoes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .botoes #btnCalcular,
  .botoes #btnPdf,
  .botoes #btnSalvarCalculo {
    min-width: 0;
    width: 100%;
    padding: 10px 8px;
    font-size: 12px;
  }

  .ai-box {
    padding: 16px;
  }

  .ai-box-topo,
  .ai-acoes {
    flex-direction: column;
  }

  .ai-acoes button {
    width: 100%;
  }

  .area-usuario-topo button {
    width: 100%;
  }

  .calculo-card-acoes .btn-card-acao {
    width: 100%;
  }

  .btn-link-topo {
    width: 100%;
    text-align: center;
    min-width: 72px;
    min-height: 34px;
    padding: 6px 10px;
    font-size: 12px;
  }

  #btnGoogleLogin,
  #btnForumHome {
    width: 100%;
  }

  #btnAbrirLogin,
  #btnForumHome,
  .login-topo .btn-link-topo,
  .login-topo .btn-sair {
    width: 100%;
    min-width: 72px;
    min-height: 34px;
    padding: 6px 10px;
    font-size: 12px;
  }

  #loginNaoAutenticado #btnAbrirLogin {
    order: 1;
  }

  #loginNaoAutenticado #btnForumHome,
  #loginNaoAutenticado .btn-link-topo[href="/forum"] {
    order: 2;
  }

  .login-email-box {
    width: 100%;
  }

  .login-email-box input {
    min-width: 0;
    width: 100%;
  }

  .login-email-acoes {
    width: 100%;
  }

  .login-email-acoes button {
    width: 100%;
  }

  .forum-card-topo,
  .forum-hero,
  .forum-acoes,
  .forum-resposta-acoes {
    flex-direction: column;
  }

  .forum-criacao .botoes {
    grid-template-columns: 1fr;
  }

  .forum-criacao #btnPublicarForum {
    width: 100%;
  }

  .forum-acoes .btn-card-acao,
  .forum-resposta-acoes .btn-card-acao {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .cookie-banner-conteudo {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-banner-botao {
    width: 100%;
  }
}
