﻿body {
      font-family: Arial, sans-serif;
      background:
        radial-gradient(circle at top, rgba(32, 114, 57, 0.07), transparent 28%),
        linear-gradient(180deg, #f3f7f4 0%, #eef4f0 100%);
      padding: 18px;
      color: #183b25;
    }

    .container {
      background: #fff;
      padding: 24px 26px 12px;
      border-radius: 18px;
      margin: 30px auto;
      box-shadow: 0 0 14px #b5d8c2;
      border-top: 10px solid #207239;
      border-bottom: 10px solid #207239;
      width: 100%;
      max-width: 1200px;
      box-sizing: border-box;
    }

    .logo-dpe {
      display: flex;
      justify-content: center;
      align-items: center;
      margin-bottom: 6px;
    }

    .logo-dpe img {
      height: 150px;
      width: auto;
      display: block;
      object-fit: contain;
      image-rendering: auto;
      filter: none;
    }

    .container > .logo-dpe + h2 {
      color: #207239;
      text-align: center;
      font-size: 1.5em;
      margin: 8px 0 18px 0;
      letter-spacing: 0.4px;
      font-weight: bold;
    }

    .container > .logo-dpe + h2 + p {
      text-align:center;
      color:#619c73;
      font-size:0.88em;
      margin:-10px 0 18px 0;
    }
    .topo-atalho {
      display: flex;
      justify-content: center;
      margin: -6px 0 18px;
    }
    .atalho-central {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 8px 14px;
      border-radius: 999px;
      border: 1px solid #b5d8c2;
      background: #f0fdf4;
      color: #175728;
      text-decoration: none;
      font-size: 0.82em;
      font-weight: 700;
      transition: all .18s;
    }
    .atalho-central:hover {
      background: #dcf0e3;
      border-color: #207239;
    }

    hr.divisor {
      margin: 20px 0 16px 0;
      border: 1px solid #e0e0e0;
    }

    .form-row,
    .form-row-destaque {
      display: flex;
      flex-wrap: wrap;
      gap: 15px;
      margin-bottom: 12px;
      align-items: flex-end;
    }

    .form-row-destaque {
      background: #f7faf8;
      padding: 10px;
      border-radius: 8px;
      border: 1px solid #b5d8c2;
      margin-top: 10px;
    }

    .form-group {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-width: 180px;
    }

    .form-group > label {
      font-weight: bold;
      margin-bottom: 4px;
      color: #207239;
      font-size: 0.85em;
    }

    .form-group input,
    .form-group select {
      padding: 8px 6px;
      font-size: 0.92em;
      border: 1.2px solid #b5d8c2;
      border-radius: 5px;
      color: #207239;
      background: #fff;
      width: 100%;
      box-sizing: border-box;
    }

    .form-group input:read-only {
      background: #e8f3ec;
      color: #175728;
      font-weight: bold;
      cursor: not-allowed;
    }

.form-row-btn-center {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.acao-principal-main {
  display: flex;
  justify-content: center;
}

.acao-principal-spacer {
  justify-self: end;
  width: 1px;
  min-height: 1px;
}

    #periodosSection {
      width: 100%;
      max-width: 100%;
      margin-top: 15px;
      box-sizing: border-box;
    }
    #periodosSection .main-periodo-label {
      font-weight: bold;
      margin-bottom: 8px;
      color: #207239;
      font-size: 0.9em;
      display: block;
    }
    #periodosContainer {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
      gap: 15px;
    }
    .periodo-row {
      display: flex;
      gap: 10px;
      align-items: flex-end;
      padding: 12px;
      border: 1px solid #e0e0e0;
      border-radius: 8px;
      background-color: #fdfdfd;
    }
    .periodo-row .form-group {
      min-width: 120px;
    }
    .remove-periodo-btn {
      background: #d9534f;
      color: white;
      border: none;
      border-radius: 50%;
      cursor: pointer;
      width: 30px;
      height: 30px;
      font-size: 1.2em;
      font-weight: bold;
      line-height: 30px;
      padding: 0;
      text-align: center;
      flex-shrink: 0;
      transition: background-color 0.2s;
    }
    .remove-periodo-btn:hover {
      background: #c9302c;
    }
    #addPeriodoBtn {
      background: #f0fdf4;
      border: 1.5px dashed #b5d8c2;
      color: #207239;
      padding: 8px 12px;
      border-radius: 5px;
      cursor: pointer;
      font-size: 0.9em;
      margin-top: 15px;
      width: 100%;
      text-align: center;
      transition: background-color 0.2s;
    }
    #addPeriodoBtn:hover {
      background: #e8f3ec;
    }

    #calcularBtn, #gerarTabelaVariavelBtn,
    #presc_calcularBtn, #presc_detectarBtn,
    #dosi_calcularBtn {
      border: none;
      background: #207239;
      color: #fff;
      border-radius: 8px;
      cursor: pointer;
      font-weight: 700;
      transition: background 0.18s, transform 0.18s;
    }

    #calcularBtn:hover, #gerarTabelaVariavelBtn:hover,
    #presc_calcularBtn:hover, #presc_detectarBtn:hover,
    #dosi_calcularBtn:hover {
      background: #175728;
      transform: translateY(-1px);
    }

    #calcularBtn {
      padding: 11px 20px;
      font-size: 0.94em;
      font-weight: bold;
    }

    #presc_calcularBtn, #dosi_calcularBtn {
      padding: 11px 20px;
      font-size: 0.94em;
      font-weight: bold;
    }

    #pdfBtn {
      margin: 0;
      padding: 10px 12px;
      font-size: 0.82em;
    }

    #presc_pdfBtn, #dosi_pdfBtn {
      margin: 0;
      padding: 10px 12px;
      font-size: 0.82em;
    }

    #gerarTabelaVariavelBtn {
      width: 100%;
      padding: 10px;
      margin-top: 15px;
      font-size: 0.95em;
    }

    table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 18px;
      table-layout: fixed;
    }

    #areaParcelas,
    #atDebito_resultado,
    #tabelaResultadosDias {
      overflow-x: auto;
    }

    th, td {
      border: 1px solid #b5d8c2;
      padding: 6px 8px;
      text-align: center;
      vertical-align: middle;
      line-height: 1.3;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    th {
      background: #207239;
      color: #fff;
      font-weight: bold;
      font-size: 0.88em;
      letter-spacing: 0.01em;
      text-align: center;
    }

    .powered-by {
      text-align: right;
      font-size: 0.85em;
      color: #619c73;
      margin: 6px 2px 0 2px;
      letter-spacing: 0.03em;
    }

    @media (max-width: 1280px) {
      .container {
        max-width: 1100px;
      }

      #areaParcelas .calc-report-meta {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
      }

      #areaParcelas .calc-report-table th,
      #areaParcelas .calc-report-table td {
        padding: 4px 5px;
        font-size: 0.82em;
      }

      #areaParcelas .calc-report-table th {
        font-size: 0.78em;
      }

      #areaParcelas .calc-report-table td.input-coluna {
        min-width: 80px;
      }
    }

    @media (max-width: 920px) {
      body {
        padding: 10px;
      }

      .container {
        padding: 18px 14px 12px;
        margin: 16px auto;
        border-top-width: 6px;
        border-bottom-width: 6px;
      }

      .logo-dpe img {
        height: 96px;
      }

      #periodosContainer {
        grid-template-columns: 1fr;
      }

      .periodo-row {
        flex-direction: column;
        align-items: stretch;
      }

      .periodo-row .form-group {
        width: 100%;
      }

      .remove-periodo-btn {
        align-self: flex-end;
      }

      #calcularBtn,
      #pdfBtn,
      #atDebito_calcularBtn,
      #atDebito_pdfBtn,
      #presc_calcularBtn,
      #presc_pdfBtn,
      #presc_copiarTextoBtn,
      #execucao_limparBtn,
      #atDebito_limparBtn,
      #presc_limparBtn,
      #dosi_calcularBtn,
      #dosi_pdfBtn,
      #dosi_limparBtn,
      #dosi_copiarTextoBtn,
      #dosi_copiarSentencaBtn,
      #dosi_copiarAlegacoesBtn,
      #dosi_copiarApelacaoBtn {
        width: 100%;
        min-width: 0;
      }

      #areaParcelas .calc-report-header {
        padding: 14px 12px;
      }

      #areaParcelas .calc-report-meta {
        grid-template-columns: 1fr 1fr;
      }

      #areaParcelas .calc-report-table th,
      #areaParcelas .calc-report-table td {
        padding: 4px;
        font-size: 0.8em;
      }

      #areaParcelas .calc-report-table th {
        font-size: 0.76em;
      }

      #atDebito_resumo {
        grid-template-columns: 1fr 1fr;
      }

      .powered-by {
        text-align: center;
      }
    }
    .acao-com-instrucoes {
      display: flex;
      align-items: flex-start;
      gap: 20px;
      margin-top: 12px;
      flex-wrap: wrap;
    }

    .instrucoes-box {
      flex: 1;
      font-size: 0.92em;
      color: #207239;
      background: #f8f8f8;
      padding: 12px 16px;
      border-radius: 6px;
      border: 1px solid #ccc;
      max-width: 600px;
      min-width: 250px;
    }

    .instrucoes-box ol, .instrucoes-box li {
      padding-left: 18px;
      margin: 0;
      margin-bottom: 6px;
      font-weight: 500;
    }

    .instrucoes-box strong {
      color: #175728;
      font-weight: bold;
    }

    #telaPensaoDias {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 25px;
      margin-top: 20px;
    }
    .calc-card {
      background: #fdfdfd;
      border: 1px solid #e0e0e0;
      border-radius: 8px;
      padding: 20px;
    }
    .calc-card h3 {
      text-align: center;
      color: #207239;
      margin-top: 0;
      margin-bottom: 20px;
      font-size: 1.1em;
    }
    .calc-sub-card {
      margin-bottom: 20px;
    }
    .calc-sub-card:last-child {
      margin-bottom: 0;
    }
    .result-display {
      background-color: #e8f3ec;
      border-radius: 5px;
      padding: 8px;
      text-align: center;
      font-weight: bold;
      color: #175728;
      margin-top: 10px;
      min-height: 37px;
    }

    .tabela-dias-calc {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0 7px;
      margin-top: 20px;
      background: none;
    }
    .tabela-dias-calc tr td:first-child {
      color: #207239;
      font-weight: bold;
      font-size: 1em;
      padding: 6px 0 6px 6px;
      background: none;
      border: none;
      text-align: left !important;
      width: 50%;
    }
    .tabela-dias-calc .resultado-valor.align-left {
      text-align: left !important;
      padding-left: 15px;
      font-size: 1.1em;
      font-weight: bold;
      color: #207239;
      background: none;
      border: none;
    }
    
    #resultado-extenso-box {
        margin-top: 25px;
        padding: 12px;
        font-size: 1.2em;
    }
.multa-checkbox-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9em;
  color: #207239;
}

.multa-checkbox-wrapper input {
  cursor: pointer;
  width: 16px;
  height: 16px;
}
#areaAcaoCalculo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

#linhaMultaPenhora {
  text-align: center;
}

/* === INÍCIO: Bloco de estilo para a Tabela de Resultados === */
/* SUBSTITUA OU ADICIONE ESTE BLOCO NO SEU CSS */

#areaParcelas .calc-report {
    margin-top: 18px;
}
#areaParcelas .calc-report-sheet {
    width: 100%;
}
#areaParcelas .calc-report-sheet.table-valor-fixo {
    min-width: 980px;
}
#areaParcelas .calc-report-sheet.table-salario {
    min-width: 1040px;
}
#areaParcelas .calc-report-sheet.table-renda {
    min-width: 1260px;
}
#areaParcelas .calc-report-header {
    background: linear-gradient(180deg, #f7faf8 0%, #eef6f1 100%);
    border: 1px solid #b5d8c2;
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 14px;
}
#areaParcelas .calc-report-title {
    margin: 0;
    color: #175728;
    font-size: 1.18em;
    line-height: 1.2;
    font-weight: 800;
}
#areaParcelas .calc-report-subtitle {
    margin: 8px 0 0 0;
    color: #407553;
    font-size: 0.9em;
    line-height: 1.5;
}
#areaParcelas .calc-report-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-top: 16px;
}
#areaParcelas .calc-report-meta-item {
    background: #fff;
    border: 1px solid #d7eadf;
    border-radius: 10px;
    padding: 11px 13px;
    min-height: 76px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
#areaParcelas .calc-report-meta-label {
    display: block;
    font-size: 0.74em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #5b896a;
    margin-bottom: 4px;
}
#areaParcelas .calc-report-meta-value {
    display: block;
    color: #175728;
    font-weight: 700;
    line-height: 1.35;
}
#areaParcelas .calc-report-table {
    margin-top: 0;
    table-layout: auto;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 0 0 1px #b5d8c2 inset;
    width: 100%;
}
#areaParcelas .calc-report-table.table-valor-fixo {
    min-width: 0;
}
#areaParcelas .calc-report-table.table-salario {
    min-width: 0;
}
#areaParcelas .calc-report-table.table-renda {
    min-width: 0;
}
#areaParcelas .calc-report-table td.valor-coluna,
#areaParcelas .calc-report-table th.valor-coluna {
    text-align: right;
    white-space: normal;
    word-break: break-word;
}
#areaParcelas .calc-report-table td.texto-coluna,
#areaParcelas .calc-report-table th.texto-coluna {
    text-align: left;
    word-break: break-word;
}
#areaParcelas .calc-report-table td.input-coluna {
    min-width: 92px;
}
#areaParcelas .calc-report-table td.input-coluna input {
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}
#areaParcelas .calc-report-table .saldo-coluna {
    font-weight: 700;
    color: #175728;
}
#areaParcelas .calc-report-table th,
#areaParcelas .calc-report-table td {
    padding: 6px 8px;
    font-size: 0.84em;
    line-height: 1.25;
}
#areaParcelas .calc-report-table input.dinheiro {
    padding: 4px 6px;
    font-size: 0.9em;
    text-align: right;
}
#areaParcelas .calc-report-table th {
    font-size: 0.76em;
    line-height: 1.18;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
#areaParcelas .calc-report-notes {
    margin-top: 14px;
    padding: 14px 16px;
    background: #f7faf8;
    border: 1px solid #d7eadf;
    border-radius: 10px;
    color: #2f5d3f;
    font-size: 0.88em;
    line-height: 1.6;
}
#areaParcelas .calc-report-notes strong {
    color: #175728;
}
#areaParcelas .calc-report-totals {
    margin-top: 12px;
    border: 1px solid #b5d8c2;
    border-radius: 14px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}
#areaParcelas .calc-report-totals-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 130px;
}
#areaParcelas .calc-report-totals-row + .calc-report-totals-row {
    border-top: 1px solid #b5d8c2;
}
#areaParcelas .calc-report-totals-label,
#areaParcelas .calc-report-totals-value {
    padding: 7px 14px;
    background: #e8f3ec;
    color: #175728;
    font-weight: 700;
}
#areaParcelas .calc-report-totals-label {
    text-align: right;
}
#areaParcelas .calc-report-totals-value {
    text-align: right;
    border-left: 1px solid #b5d8c2;
    white-space: nowrap;
}
#areaParcelas .calc-report-totals-row.multa-row .calc-report-totals-label,
#areaParcelas .calc-report-totals-row.multa-row .calc-report-totals-value {
    color: #b42318;
}
#areaParcelas .calc-report-totals-row.total-row .calc-report-totals-label,
#areaParcelas .calc-report-totals-row.total-row .calc-report-totals-value {
    background: #b5d8c2;
    font-size: 1.04em;
}

/* Efeito "Zebra" para linhas do corpo da tabela */
#areaParcelas tbody tr:nth-child(odd) td {
    background-color: #f7faf8; /* Verde bem claro */
}

/* Estilo para o rodapé da tabela */
#areaParcelas tfoot td {
    background-color: #e8f3ec;
    font-weight: bold;
    color: #175728;
}

/* Destaque para a linha final do TOTAL EXECUTÁVEL */
#areaParcelas tfoot tr:last-child td {
    background-color: #b5d8c2;
    color: #175728;
    font-size: 1.1em;
}

/* === FIM: Bloco de estilo para a Tabela de Resultados === */

/* === ATUALIZAÇÃO DE DÉBITO === */
#atDebito_tabelaResultado th,
#atDebito_tabelaResultado td {
  border: 1px solid #b5d8c2;
  padding: 10px 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: middle;
}
#atDebito_tabelaResultado {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate !important;
  border-spacing: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 1px #b5d8c2 inset;
}
#atDebito_tabelaResultado tbody tr:nth-child(odd) td { background-color: #f7faf8; }
#atDebito_tabelaResultado th:nth-child(1),
#atDebito_tabelaResultado td:nth-child(1) {
  width: 31%;
  text-align: left;
}
#atDebito_tabelaResultado th:nth-child(2),
#atDebito_tabelaResultado td:nth-child(2) {
  width: 18%;
  text-align: right;
}
#atDebito_tabelaResultado th:nth-child(3),
#atDebito_tabelaResultado td:nth-child(3) {
  width: 51%;
  text-align: left;
}
#atDebito_tabelaResultado thead th {
  background-color: #207239;
  color: #fff;
  font-size: 0.82em;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.2;
}
#atDebito_tabelaResultado tfoot td {
  background-color: #b5d8c2;
  font-weight: bold;
  color: #175728;
  font-size: 0.98em;
}
#atDebito_tabelaResultado .row-destaque td {
  background-color: #e8f3ec !important;
  font-weight: bold;
}
#atDebito_tabelaResultado .row-total td {
  background-color: #207239 !important;
  color: #fff !important;
  font-size: 1.02em;
  font-weight: bold;
}
#atDebito_resumo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
#atDebito_resumo .resumo-card {
  background: linear-gradient(180deg, #f7faf8 0%, #eef6f1 100%);
  border: 1px solid #d7eadf;
  border-radius: 10px;
  padding: 11px 13px;
  min-height: 74px;
}
#atDebito_resumo .resumo-label {
  display: block;
  font-size: 0.74em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5b896a;
  margin-bottom: 4px;
}
#atDebito_resumo .resumo-value {
  display: block;
  color: #175728;
  font-weight: 700;
  line-height: 1.35;
}
#atDebito_tabelaResultado .row-saldo td {
  background-color: #fff3cd !important;
  color: #856404 !important;
  font-weight: bold;
}
#tabelaResultadosDias {
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 1px #b5d8c2 inset;
}
#tabelaResultadosDias th,
#tabelaResultadosDias td {
  padding: 8px 10px;
  font-size: 0.88em;
  line-height: 1.3;
}
#tabelaResultadosDias th {
  font-size: 0.78em;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
#tabelaResultadosDias td:first-child,
#tabelaResultadosDias th:first-child {
  text-align: left;
  width: 62%;
}
#tabelaResultadosDias td:last-child,
#tabelaResultadosDias th:last-child {
  text-align: left;
  width: 38%;
}
#tabelaResultadosDias tbody tr:nth-child(odd) td {
  background-color: #f7faf8;
}
.deposito-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background-color: #fdfdfd;
  margin-bottom: 8px;
}
.deposito-row .form-group { min-width: 160px; }

/* Layout unificado */
:root {
  --font-ui: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --surface: #ffffff;
  --surface-soft: #f7faf8;
  --primary: #207239;
  --primary-dark: #175728;
  --text-main: #183b25;
  --text-soft: #5f8670;
  --border: #d6e4db;
  --border-strong: #b5d8c2;
  --warning-bg: #fffbe6;
  --warning-border: #ffe08a;
  --warning-text: #856404;
  --shadow-lg: 0 20px 48px rgba(24, 59, 37, 0.08), 0 8px 18px rgba(32, 114, 57, 0.08);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --container-max: 1160px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  background:
    radial-gradient(circle at top, rgba(32, 114, 57, 0.08), transparent 28%),
    linear-gradient(180deg, #f4f8f5 0%, #eef4f0 100%);
  padding: 24px;
  color: var(--text-main);
  zoom: 0.75;
}

.container {
  background: var(--surface);
  padding: 28px 32px 20px;
  border-radius: var(--radius-lg);
  margin: 24px auto;
  box-shadow: var(--shadow-lg);
  border-top: 8px solid var(--primary);
  border-bottom: 8px solid var(--primary);
  width: 100%;
  max-width: var(--container-max);
}

.logo-dpe {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
  width: 100%;
}

.logo-dpe img {
  height: auto;
  width: auto;
  max-width: min(100%, 180px);
  display: block;
}

.container > .logo-dpe + h2 {
  color: var(--primary);
  text-align: center;
  font-size: clamp(1.55rem, 1.1rem + 1vw, 2rem);
  margin: 10px 0;
  letter-spacing: 0.02em;
  font-weight: 700;
}

.subtitulo,
.container > .logo-dpe + h2 + p {
  max-width: 760px;
  text-align: center;
  color: var(--text-soft);
  font-size: 0.94rem;
  line-height: 1.5;
  margin: 0 auto 22px;
}

.secao {
  background: var(--surface-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 14px;
}

.secao-titulo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 5px 11px;
  border: 1px solid #cfe5d6;
  border-radius: 999px;
  background: #e8f3ec;
  color: var(--primary-dark);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.secao-titulo-compacto {
  margin-bottom: 8px;
}

.secao-titulo-complemento {
  color: var(--text-soft);
  font-size: 0.92em;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
}

.form-row-sem-margem {
  margin-bottom: 0;
}

.form-group-compacta {
  max-width: 200px;
  flex-shrink: 0;
}

.btn-mt-sm {
  margin-top: 10px;
}

.form-row-destaque {
  background: var(--surface-soft);
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
}

.form-group > label {
  color: var(--primary);
}

.form-group input,
.form-group select {
  min-height: 42px;
  padding: 9px 10px;
  font-size: 0.95em;
  border: 1.2px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text-main);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(32, 114, 57, 0.12);
}

.periodo-row {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

#addPeriodoBtn,
#atDebito_addDepositoBtn,
#dosi_addCausaBtn {
  border: 1.5px dashed var(--border-strong);
  color: var(--primary);
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.92em;
  font-family: var(--font-ui);
  font-weight: 600;
  width: 100%;
  text-align: center;
  background: transparent;
}

#addPeriodoBtn:hover,
#atDebito_addDepositoBtn:hover,
#dosi_addCausaBtn:hover {
  background: #e8f3ec;
}

#calcularBtn,
#gerarTabelaVariavelBtn,
#atDebito_calcularBtn,
#presc_calcularBtn,
#presc_detectarBtn,
#dosi_calcularBtn {
  border: none;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-family: var(--font-ui);
  transition: background 0.18s, transform 0.18s;
}

#calcularBtn:hover,
#gerarTabelaVariavelBtn:hover,
#atDebito_calcularBtn:hover,
#presc_calcularBtn:hover,
#presc_detectarBtn:hover,
#dosi_calcularBtn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

#calcularBtn:active,
#gerarTabelaVariavelBtn:active,
#atDebito_calcularBtn:active,
#presc_calcularBtn:active,
#presc_detectarBtn:active,
#dosi_calcularBtn:active {
  transform: translateY(0);
  filter: brightness(0.93);
}

#calcularBtn,
#atDebito_calcularBtn,
#presc_calcularBtn,
#dosi_calcularBtn {
  padding: 11px 20px;
  font-size: 0.94em;
}

#pdfBtn,
#atDebito_pdfBtn,
#presc_pdfBtn,
#dosi_pdfBtn {
  background: #f0fdf4;
  color: #175728;
  border: 1.5px solid #b5d8c2;
  padding: 10px 12px;
  font-size: 0.82em;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: background .15s, border-color .15s;
}

#pdfBtn:hover,
#atDebito_pdfBtn:hover,
#presc_pdfBtn:hover,
#dosi_pdfBtn:hover {
  background: #dcf0e3;
  border-color: #207239;
}

/* Limpar — botão secundário neutro */
#execucao_limparBtn,
#atDebito_limparBtn,
#presc_limparBtn,
#dosi_limparBtn {
  background: transparent;
  border: 1.5px solid #ccc;
  color: #888;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88em;
  font-family: var(--font-ui);
  font-weight: 600;
  transition: border-color .18s, color .18s;
  justify-self: start;
}
#execucao_limparBtn:hover,
#atDebito_limparBtn:hover,
#presc_limparBtn:hover,
#dosi_limparBtn:hover {
  border-color: #999;
  color: #555;
}

.painel-acoes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.painel-acoes-inline {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  width: 100%;
}

.nota-alerta {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 0.83em;
  color: var(--warning-text);
}

.tela-topo {
  text-align: center;
  margin-bottom: 18px;
}

.tela-topo h3 {
  color: var(--primary);
  font-size: 1.15em;
  margin: 0 0 4px;
}

.tela-topo p {
  color: var(--text-soft);
  font-size: 0.88em;
  margin: 0;
}

.acao-principal {
  margin-top: 20px;
}

.acao-secundaria {
  margin-top: 16px;
  gap: 8px;
}

@media (max-width: 900px) {
  .form-row-btn-center {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .acao-principal {
    justify-content: center;
  }

  #dosi_limparBtn {
    justify-self: auto;
  }

  .acao-principal-main {
    width: 100%;
  }

  .acao-principal-spacer {
    display: none;
  }
}

.resultado-bloco-titulo {
  color: var(--primary);
  text-align: center;
  margin-bottom: 14px;
  font-size: 1.05rem;
}

.resultado-tabela {
  width: 100%;
  margin-bottom: 10px;
}

.resultado-tabela .th-left {
  text-align: left;
}

.resultado-tabela .th-right {
  text-align: right;
}

.resultado-card {
  background: var(--surface-soft);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.82em;
  color: var(--primary-dark);
  margin-top: 8px;
  line-height: 1.6;
}

.powered-by {
  text-align: right;
  color: var(--text-soft);
  margin-top: 16px;
  font-size: 0.73rem;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.powered-by-spaced {
  margin-top: 16px;
}

@media (max-width: 920px) {
  body {
    padding: 12px;
    zoom: 1;
  }

  .powered-by {
    text-align: right;
  }

  .container {
    padding: 20px 16px 14px;
    margin: 16px auto;
    border-top-width: 6px;
    border-bottom-width: 6px;
  }

  .logo-dpe img {
    max-width: min(100%, 140px);
  }

  .subtitulo,
  .container > .logo-dpe + h2 + p {
    font-size: 0.89rem;
    margin-bottom: 18px;
  }

  .form-group-compacta {
    max-width: none;
  }
}
.remove-deposito-btn {
  background: #d9534f; color: white; border: none; border-radius: 50%;
  cursor: pointer; width: 30px; height: 30px; font-size: 1.2em;
  font-weight: bold; line-height: 30px; padding: 0; text-align: center;
  flex-shrink: 0;
}
.remove-deposito-btn:hover { background: #c9302c; }
/* === FIM ATUALIZAÇÃO DE DÉBITO === */

/* =====================================================
   MÓDULO: CALCULADORA DE PRESCRIÇÃO DE PENA
   ===================================================== */

/* Inputs de pena (anos + meses lado a lado) */
.presc-pena-inputs {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 4px;
  flex-wrap: wrap;
}
.presc-pena-campo {
  display: flex;
  align-items: center;
  gap: 6px;
}
.presc-pena-campo input[type="number"] {
  width: 72px;
  text-align: center;
  padding: 8px 6px;
  font-size: 0.92em;
  border: 1.2px solid #b5d8c2;
  border-radius: 5px;
  color: #207239;
  background: #fff;
  box-sizing: border-box;
}
.presc-pena-campo input[type="number"]:focus {
  outline: none;
  border-color: #207239;
  box-shadow: 0 0 0 2px rgba(32,114,57,0.15);
}
.presc-pena-unidade {
  color: #619c73;
  font-size: 0.85em;
  white-space: nowrap;
}

/* Erros de validação */
.presc-erros {
  background: #fdf2f2;
  border: 1.5px solid #e74c3c;
  border-radius: 8px;
  padding: 14px 18px;
  color: #c0392b;
  margin-top: 12px;
}
.presc-erros ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
}
.presc-erros li {
  margin-bottom: 4px;
  font-size: 0.9em;
}

/* Card de detecção de modalidade */
.presc-deteccao-card {
  background: #f0fdf4;
  border: 1.5px solid #b5d8c2;
  border-radius: 10px;
  padding: 16px 18px;
  margin-top: 12px;
}
.presc-deteccao-header {
  margin-bottom: 10px;
}
.presc-fundamento {
  font-size: 0.9em;
  color: #333;
  margin: 0;
  line-height: 1.55;
}

/* Badges de modalidade */
.presc-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.8em;
  font-weight: bold;
  letter-spacing: 0.3px;
}
.presc-badge-abstrata { background: #d4ecd4; color: #1a5e2a; border: 1px solid #a5d6a7; }
.presc-badge-concreta { background: #fff3cd; color: #856404; border: 1px solid #ffc107; }
.presc-badge-ppe      { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.presc-badge-indefinida { background: #e2e3e5; color: #383d41; border: 1px solid #d6d8db; }

/* Bloco de identificação (processo / réu) */
.presc-identificacao {
  border: 1px solid #cfe5d6;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: #f7faf8;
}

/* Card de resultado principal */
.presc-resultado-card {
  background: #fff;
  border: 1.5px solid #b5d8c2;
  border-radius: 12px;
  padding: 20px 22px;
  margin-top: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.presc-resultado-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.presc-resultado-header h4 {
  margin: 0;
  color: #207239;
  font-size: 1em;
  font-weight: bold;
}

/* Resumo do cálculo */
.presc-resumo {
  background: #f7faf8;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.presc-campo {
  display: flex;
  gap: 8px;
  font-size: 0.88em;
  margin-bottom: 7px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.presc-campo:last-child { margin-bottom: 0; }
.presc-campo span {
  color: #619c73;
  min-width: 200px;
  flex-shrink: 0;
}
.presc-campo strong { color: #183b25; }
.presc-campo-destaque strong { color: #207239; }

/* Seção de períodos */
.presc-periodos-titulo {
  font-weight: bold;
  color: #207239;
  font-size: 0.9em;
  margin: 16px 0 10px 0;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 6px;
}
.presc-periodos {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Card de período */
.presc-periodo {
  border-radius: 8px;
  border: 1.5px solid #e0e0e0;
  overflow: hidden;
}
.presc-periodo-ok       { border-color: #b5d8c2; }
.presc-periodo-prescrito { border-color: #e74c3c; }
.presc-periodo-bloqueado { border-color: #ccc; opacity: 0.85; }

.presc-periodo-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f7faf8;
  flex-wrap: wrap;
}
.presc-periodo-prescrito .presc-periodo-header { background: #fdf2f2; }
.presc-periodo-bloqueado .presc-periodo-header { background: #f5f5f5; }

.presc-periodo-tipo {
  font-size: 0.74em;
  font-weight: bold;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e0f0e8;
  color: #175728;
  white-space: nowrap;
  flex-shrink: 0;
}
.presc-tipo-bloqueado { background: #e2e3e5; color: #6c757d; }

.presc-periodo-desc {
  font-size: 0.88em;
  color: #333;
  font-weight: 500;
  flex: 1;
  min-width: 160px;
}

.presc-status {
  font-size: 0.8em;
  font-weight: bold;
  padding: 3px 12px;
  border-radius: 999px;
  white-space: nowrap;
  margin-left: auto;
  flex-shrink: 0;
}
.presc-status-sim { background: #fde8e8; color: #c0392b; }
.presc-status-nao { background: #e8f5e9; color: #1b5e20; }

.presc-periodo-body { padding: 12px 14px; }

.presc-campos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 6px 16px;
}

/* Notas informativas */
.presc-nota {
  font-size: 0.82em;
  color: #555;
  background: #f5f5f5;
  border-radius: 5px;
  padding: 7px 10px;
  margin-top: 10px;
  line-height: 1.55;
}
.presc-nota-aviso { background: #fff3cd; color: #856404; }

/* Conclusão final */
.presc-conclusao {
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 0.95em;
  font-weight: bold;
  margin-top: 16px;
  text-align: center;
  line-height: 1.4;
}
.presc-conclusao-prescrita     { background: #fde8e8; border: 2px solid #e74c3c; color: #c0392b; }
.presc-conclusao-nao-prescrita { background: #e8f5e9; border: 2px solid #27ae60; color: #1b5e20; }

/* Nota legal rodapé */
.presc-nota-legal {
  font-size: 0.78em;
  color: #777;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #e0e0e0;
  line-height: 1.5;
}

/* Campo de suspensão (dentro do card de período) */
.presc-campo-suspensao strong { color: #856404; }

/* Bloco de causas suspensivas (ANPP etc.) */
.presc-suspensoes {
  margin: 16px 0;
}
.presc-suspensao-item {
  background: #fffbea;
  border: 1px solid #f0cc6a;
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 8px;
}

/* Botões copiar — outline verde (padrão btnSec) */
#presc_copiarTextoBtn,
#dosi_copiarTextoBtn,
#dosi_copiarSentencaBtn,
#dosi_copiarAlegacoesBtn,
#dosi_copiarApelacaoBtn {
  background: #f0fdf4;
  border: 1.5px solid #b5d8c2;
  color: #175728;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.82em;
  font-weight: 600;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
#presc_copiarTextoBtn:hover,
#dosi_copiarTextoBtn:hover,
#dosi_copiarSentencaBtn:hover,
#dosi_copiarAlegacoesBtn:hover,
#dosi_copiarApelacaoBtn:hover {
  background: #dcf0e3;
  border-color: #207239;
}

/* Responsividade */
@media (max-width: 600px) {
  .presc-periodo-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .presc-status { margin-left: 0; }
  .presc-campo span { min-width: 0; width: 100%; }
  .presc-pena-inputs { flex-direction: column; align-items: flex-start; }
  #presc_copiarTextoBtn { width: 100%; }
  .acao-secundaria { flex-direction: column; align-items: center; gap: 8px !important; }
}
/* === FIM PRESCRIÇÃO DE PENA === */

/* =====================================================
   SELETOR VISUAL DE CALCULADORAS (sel-card)
   ===================================================== */

.calc-sel-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.calc-rito-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 220px));
  gap: 8px;
  margin-top: 6px;
  justify-content: center;
}

.calc-rito-grid .sel-card,
.calc-base-grid .sel-card {
  padding: 7px 6px 6px;
  min-height: 46px;
  font-size: 0.74em;
  border-radius: 9px;
}

.calc-rito-grid .sel-card .ico,
.calc-base-grid .sel-card .ico {
  font-size: 1.1em;
  margin-bottom: 3px;
}

.calc-base-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.sel-sub {
  display: block;
  font-weight: 400;
  font-size: 0.88em;
  opacity: 0.82;
  margin-top: 2px;
}

#baseCalculoGroup {
  flex-direction: column;
  gap: 8px;
}

.sel-card {
  border: 2px solid #b5d8c2;
  background: #fff;
  border-radius: 12px;
  padding: 10px 6px 9px;
  cursor: pointer;
  text-align: center;
  font-family: Arial, sans-serif;
  font-size: 0.76em;
  font-weight: 600;
  color: #207239;
  transition: all 0.18s ease;
  line-height: 1.3;
  min-height: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sel-card:hover {
  background: #e8f3ec;
  border-color: #207239;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(32, 114, 57, 0.15);
}

.sel-card.ativo {
  background: #207239;
  color: #fff;
  border-color: #175728;
  box-shadow: 0 3px 8px rgba(32, 114, 57, 0.3);
}

.sel-card .ico {
  font-size: 1.4em;
  display: block;
  margin-bottom: 4px;
  line-height: 1;
}

@media (max-width: 700px) {
  .calc-sel-grid  { grid-template-columns: repeat(3, 1fr); }
  .calc-base-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .calc-sel-grid  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .calc-rito-grid { grid-template-columns: 1fr; }
}
/* === FIM SELETOR VISUAL === */


/* ── Dosimetria da Pena ──────────────────────────────────────────────────── */
.dosi-causa-row{border:1px solid #d8eadc;border-radius:12px;padding:14px;margin-bottom:14px;background:#fbfefc;}
.dosi-causa-acoes{justify-content:flex-end;}
.dosi-report .calc-report-meta-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px;margin:14px 0;}
.dosi-pre{white-space:pre-wrap;font-family:inherit;font-size:.96rem;line-height:1.55;margin:10px 0 0 0;}
.dosi-box{border:1px solid #d8eadc;border-radius:12px;padding:14px;background:#fbfefc;margin-top:12px;}
.dosi-export-row{flex-wrap:wrap;}
