html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

:root {
  --idaron-green: #176344;
  --idaron-green-dark: #104b34;
  --idaron-green-soft: #eaf4ef;
  --page-background: #f4f7f5;
  --text-primary: #1e2d27;
  --text-secondary: #64726c;
  --border-color: #dce5e0;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  color: var(--text-primary);
  background: var(--page-background);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.institutional-navbar {
  padding: 0.7rem 0;
  background: #fff;
  border-bottom: 1px solid var(--border-color);
}

.institutional-brand {
  display: inline-block;
  max-width: 100%;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: min(100%, 395px);
  height: auto;
}

.page-container {
  width: 100%;
  flex: 1;
}

.validation-page {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 4rem 0 5rem;
}

.page-introduction {
  margin: 0 auto 2rem;
}

.institution-label,
.result-eyebrow {
  color: var(--idaron-green);
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.page-introduction h1 {
  margin: 0.55rem 0 0.6rem;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.page-introduction p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.08rem;
}

.validation-card,
.result-card {
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 0.8rem 2.5rem rgba(28, 61, 46, 0.08);
}

.validation-card {
  max-width: 680px;
  margin: 0 auto;
}

.validation-card .card-body {
  padding: 2rem;
}

.form-label {
  margin-bottom: 0.55rem;
  font-weight: 650;
}

.form-control,
.form-select {
  min-height: 3.25rem;
  border-color: #cbd7d1;
  border-radius: 0.65rem;
}

.document-code-input {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  letter-spacing: 0.015em;
}

.form-control:focus,
.form-select:focus,
.btn:focus-visible {
  border-color: var(--idaron-green);
  box-shadow: 0 0 0 0.22rem rgba(23, 99, 68, 0.16);
}

.form-text {
  min-height: 1.3rem;
  margin-top: 0.5rem;
  color: var(--text-secondary);
}

.validation-message {
  display: block;
  margin-top: 0.35rem;
  color: #a12d36;
  font-size: 0.875rem;
}

.validation-summary-valid,
.field-validation-valid {
  display: none;
}

.validation-button {
  width: 100%;
  min-height: 3.2rem;
  border-color: var(--idaron-green);
  border-radius: 0.65rem;
  background: var(--idaron-green);
  font-weight: 650;
}

.recaptcha-container {
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.validation-button:hover,
.validation-button:active {
  border-color: var(--idaron-green-dark) !important;
  background: var(--idaron-green-dark) !important;
}

.result-section {
  margin-top: 2rem;
}

.not-found-card {
  display: flex;
  max-width: 680px;
  margin: 0 auto;
  padding: 1.4rem 1.5rem;
  gap: 1rem;
  align-items: center;
  border: 1px solid #e7d7b6;
  border-radius: 0.9rem;
  background: #fffaf0;
}

.result-icon {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #765317;
  background: #f3e3bd;
  font-weight: 800;
}

.not-found-card h2 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}

.not-found-card p {
  margin: 0;
  color: #725f3e;
}

.result-heading {
  padding: 1.8rem 2rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.result-heading h2 {
  margin: 0.4rem 0 0;
  font-size: 1.55rem;
  font-weight: 700;
}

.result-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  background: var(--idaron-green-soft);
  border-top: 1px solid #cee0d7;
  border-bottom: 1px solid var(--border-color);
}

.result-summary-single {
  grid-template-columns: minmax(0, 1fr);
}

.summary-item {
  min-width: 0;
  padding: 1.3rem 2rem;
}

.summary-item + .summary-item {
  border-left: 1px solid #cee0d7;
}

.summary-item span,
.result-detail dt,
.complementary-item dt,
.stratification-table th {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.summary-item strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}

.status-badge {
  width: fit-content;
  padding: 0.28rem 0.55rem;
  border: 1px solid #c0d4ca;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  font-size: 0.86rem !important;
  font-weight: 650;
}

.result-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 1.7rem 2rem 1.4rem;
  gap: 0;
}

.result-column {
  min-width: 0;
  padding-right: 2.5rem;
}

.result-column + .result-column {
  padding-right: 0;
  padding-left: 2.5rem;
  border-left: 1px solid var(--border-color);
}

.result-group-title {
  margin: 0 0 0.8rem;
  color: var(--idaron-green-dark);
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.result-group-title::before {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.55rem;
  border-radius: 50%;
  background: var(--idaron-green);
  vertical-align: 0.08rem;
}

.result-details,
.complementary-grid {
  margin: 0;
}

.result-detail {
  min-width: 0;
  padding: 0.85rem 0;
  border-bottom: 1px solid #edf1ef;
}

.result-detail:last-child {
  border-bottom: 0;
}

.result-detail dd,
.complementary-item dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text-primary);
  font-size: 0.98rem;
}

.gta-document-data {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gta-species-data {
  min-width: 0;
  padding-right: 2.5rem;
}

.gta-validation-data {
  min-width: 0;
  padding-left: 2.5rem;
  border-left: 1px solid var(--border-color);
}

.validation-code-value {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.result-lower-section {
  margin: 0 2rem;
  padding: 1.35rem 0 1.8rem;
  border-top: 1px solid var(--border-color);
}

.table-responsive {
  border: 1px solid var(--border-color);
  border-radius: 0.55rem;
}

.stratification-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.stratification-table th,
.stratification-table td {
  padding: 0.8rem 1rem;
  text-align: left;
}

.stratification-table th {
  display: table-cell;
  margin: 0;
  background: #f7faf8;
  border-bottom: 1px solid var(--border-color);
}

.stratification-table th:last-child,
.stratification-table td:last-child {
  width: 30%;
  border-left: 1px solid var(--border-color);
}

.stratification-table tbody tr + tr td {
  border-top: 1px solid #edf1ef;
}

.complementary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 0.55rem;
}

.complementary-item {
  min-width: 0;
  padding: 0.9rem 1rem;
}

.complementary-item:nth-child(even) {
  border-left: 1px solid var(--border-color);
}

.complementary-item:nth-child(n + 3) {
  border-top: 1px solid var(--border-color);
}

.complementary-item dt {
  margin-bottom: 0.4rem;
}

.document-images {
  display: flex;
  margin-top: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.document-image {
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 0.55rem;
  background: #fff;
}

.document-image-label {
  color: var(--idaron-green-dark);
  font-weight: 700;
}

.document-image-description {
  margin-top: 0.2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.declaration-brand-image {
  display: block;
  max-width: 180px;
  max-height: 140px;
  margin-top: 0.65rem;
  padding: 0.3rem;
  border: 1px solid var(--border-color);
  background: #fff;
  object-fit: contain;
}

/* Resultado em formato documental */
.validation-result {
  padding: 1.75rem 2rem;
  border: 1px solid #cfd6d2;
  background: #fff;
  color: #202522;
}

.validation-result h2 {
  margin: 0;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #aeb8b3;
  color: #202522;
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.result-found-message,
.result-not-found-message {
  margin: 0.9rem 0 1rem;
  font-size: 0.98rem;
  font-weight: 600;
}

.result-status-indicator {
  margin-right: 0.35rem;
  color: var(--idaron-green);
  font-weight: 800;
}

.validation-result-not-found {
  max-width: 680px;
  margin: 0 auto;
}

.validation-result-not-found > p:last-child {
  margin: 0;
  color: #4f5954;
}

.result-not-found-message {
  color: #8b252d;
}

.result-not-found-message span {
  display: inline-block;
  margin-right: 0.35rem;
  font-weight: 800;
}

.document-summary,
.document-fields {
  margin: 0;
}

.document-summary {
  padding-top: 0.2rem;
}

.document-field {
  display: grid;
  grid-template-columns: minmax(9.5rem, 28%) minmax(0, 1fr);
  padding: 0.5rem 0;
  border-bottom: 1px solid #e2e6e4;
  gap: 1rem;
  break-inside: avoid;
}

.document-field dt,
.document-field dd {
  margin: 0;
}

.document-field dt {
  color: #4f5954;
  font-size: 0.84rem;
  font-weight: 650;
}

.document-field dd {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #202522;
}

.result-document-body {
  padding-top: 0.35rem;
}

.document-section {
  margin-top: 1.35rem;
  break-inside: avoid-page;
}

.document-section-title {
  margin: 0 0 0.25rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #bfc7c3;
  color: #303733;
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.document-group-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.document-identification .document-field dd,
.validation-code-value {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.validation-result .table-responsive {
  border: 0;
  border-radius: 0;
}

.validation-result .stratification-table {
  color: #202522;
}

.validation-result .stratification-table th,
.validation-result .stratification-table td {
  padding: 0.55rem 0.65rem;
}

.validation-result .stratification-table th {
  background: #f7f8f7;
  color: #4f5954;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.validation-result .stratification-table th:last-child,
.validation-result .stratification-table td:last-child {
  border-left: 0;
  text-align: right;
}

.document-image-section {
  border-top: 0;
}

.validation-result .document-images {
  margin-top: 0.7rem;
  gap: 1.25rem;
}

.validation-result .document-image {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.document-image figcaption {
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
}

.document-image figcaption strong,
.document-image figcaption span {
  display: block;
}

.document-image figcaption span {
  color: #4f5954;
}

.validation-result .declaration-brand-image {
  margin-top: 0;
  padding: 0.2rem;
  border-color: #cfd6d2;
}

.document-download {
  margin-top: 1.4rem;
}

.document-download .btn {
  padding: 0.45rem 0.8rem;
  border-radius: 0.25rem;
  font-size: 0.9rem;
}

.result-document-footer {
  margin-top: 1.7rem;
  padding-top: 0.9rem;
  border-top: 1px solid #aeb8b3;
  color: #4f5954;
  font-size: 0.82rem;
}

.consultation-time {
  margin: 0;
  color: #303733;
}

.institutional-notice,
.declaration-institutional-notice,
.consultation-address {
  max-width: 76ch;
  margin: 0 0 0.65rem;
  line-height: 1.5;
}

.consultation-address a {
  color: inherit;
  overflow-wrap: anywhere;
}

.site-footer {
  padding: 1.4rem 0;
  color: #fff;
  background: #000f20;
  font-size: 0.9rem;
}

.site-footer .container {
  text-align: center;
}

@media (max-width: 767.98px) {
  .validation-page {
    padding: 2.5rem 0 3.5rem;
  }

  .validation-card .card-body,
  .result-heading {
    padding: 1.4rem;
  }

  .result-summary,
  .result-columns,
  .complementary-grid {
    grid-template-columns: 1fr;
  }

  .summary-item {
    padding: 1rem 1.4rem;
  }

  .summary-item + .summary-item {
    border-top: 1px solid #cee0d7;
    border-left: 0;
  }

  .result-columns {
    padding: 1.2rem 1.4rem;
  }

  .result-column {
    padding-right: 0;
  }

  .result-column + .result-column {
    margin-top: 1.2rem;
    padding-top: 1.4rem;
    padding-left: 0;
    border-top: 1px solid var(--border-color);
    border-left: 0;
  }

  .result-lower-section {
    margin: 0 1.4rem;
  }

  .gta-document-data {
    grid-template-columns: 1fr;
  }

  .gta-species-data {
    padding-right: 0;
  }

  .gta-validation-data {
    margin-top: 1rem;
    padding-top: 1rem;
    padding-left: 0;
    border-top: 1px solid var(--border-color);
    border-left: 0;
  }

  .complementary-item:nth-child(even) {
    border-left: 0;
  }

  .complementary-item + .complementary-item {
    border-top: 1px solid var(--border-color);
  }

  .validation-result {
    padding: 1.25rem 1.1rem;
  }

  .document-group-columns {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .document-field {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

@media (max-width: 420px) {
  .g-recaptcha {
    margin-bottom: -0.7rem;
    transform: scale(0.86);
    transform-origin: top left;
  }

}

@media print {
  @page {
    size: A4;
    margin: 14mm;
  }

  html,
  body {
    color: #000;
    background: #fff;
    font-size: 10pt;
  }

  body {
    display: block;
  }

  .page-introduction,
  .validation-card,
  .document-download,
  .site-footer {
    display: none !important;
  }

  .institutional-navbar {
    padding: 0 0 7mm;
    border-bottom: 1px solid #777;
  }

  .institutional-navbar .container,
  .page-container {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .brand-logo {
    width: 260px;
  }

  .validation-page {
    width: 100%;
    padding: 8mm 0 0;
  }

  .result-section {
    margin-top: 0;
  }

  .validation-result {
    padding: 0;
    border: 0;
  }

  .result-found-message,
  .result-status-indicator,
  .document-field dt,
  .document-field dd,
  .document-section-title,
  .result-document-footer,
  .result-not-found-message,
  .validation-result-not-found > p:last-child {
    color: #000;
  }

  .document-group-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12mm;
  }

  .document-field,
  .document-section,
  .document-image,
  .stratification-table tr,
  .result-document-footer {
    break-inside: avoid;
  }

  .validation-result .stratification-table th {
    color: #000;
    background: #fff;
  }

  .validation-result .declaration-brand-image {
    max-width: 45mm;
    max-height: 35mm;
  }
}

.transport-table {
    width: 100%;
    border-collapse: collapse;
}

    .transport-table th {
        text-align: left;
        font-weight: 600;
        padding: 8px;
        border-bottom: 1px solid #d5d5d5;
    }

    .transport-table td {
        text-align: left;
        padding: 10px 8px;
        min-height: 32px;
    }

    .transport-table th,
    .transport-table td {
        width: 16.666%;
    }