:root {
  --inaesp-blue: #293a9e;
  --inaesp-blue-strong: #2455a4;
  --inaesp-yellow: #f4bd00;
  --line-gray: #606060;
  --soft-gray: #eef0f1;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: #fff;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-frame {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.public-header {
  width: min(96%, 1440px);
  margin: 0 auto;
  padding-top: clamp(2rem, 7vw, 6.5rem);
}

.consulta-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  color: var(--inaesp-blue);
}

.consulta-brand__icon {
  width: clamp(3.25rem, 6vw, 5rem);
  color: var(--inaesp-yellow);
}

.consulta-brand__text {
  display: flex;
  flex-direction: column;
  letter-spacing: -0.04em;
  line-height: 0.98;
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: clamp(1rem, 1.9vw, 1.65rem);
}

.consulta-brand__text strong {
  margin-top: 0.2rem;
  font-size: 1.35em;
  font-weight: 500;
}

.public-header__line {
  height: 1px;
  background: var(--line-gray);
  margin-top: clamp(1.5rem, 3vw, 2.4rem);
}

.public-main {
  width: min(92%, 760px);
  margin: 0 auto;
  padding-top: clamp(3.5rem, 8vw, 7.5rem);
  flex: 1;
}

.search-panel {
  width: min(100%, 650px);
  margin: 0 auto;
}

.search-field-group + .search-field-group {
  margin-top: 1.1rem;
}

.search-field-group label {
  display: block;
  margin: 0 0 0.45rem 0.75rem;
  color: #2d2d2d;
  font-size: clamp(1rem, 2.1vw, 1.25rem);
  font-weight: 400;
}

.search-input-row {
  display: grid;
  grid-template-columns: 1fr 3.35rem;
  align-items: center;
  gap: 0.35rem;
}

.search-input-row input {
  width: 100%;
  min-width: 0;
  height: 3.05rem;
  border: 1.5px solid var(--inaesp-blue);
  padding: 0 1rem;
  color: #222;
  outline: none;
  border-radius: 0;
  background: #fff;
}

.search-input-row input::placeholder {
  color: #b5b5b5;
}

.search-input-row input:focus {
  box-shadow: 0 0 0 3px rgba(41, 58, 158, 0.14);
}

.search-icon-button {
  width: 3.15rem;
  height: 3.15rem;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #183d7e;
  padding: 0.1rem;
  transition: transform 140ms ease;
}

.search-icon-button:hover,
.search-icon-button:focus-visible {
  transform: scale(1.06);
  outline: none;
}

.search-icon-button svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(1px 1px 0 #f4bd00);
}

.captcha-simulation {
  width: 270px;
  min-height: 78px;
  margin: clamp(2.7rem, 6vw, 4.4rem) auto 0;
  border: 1px solid #d7d7d7;
  background: #fafafa;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0.9rem;
}

.captcha-simulation__check {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #222;
  font-size: 0.9rem;
}

.captcha-simulation__check input {
  width: 1.6rem;
  height: 1.6rem;
  accent-color: var(--inaesp-blue);
}

.captcha-simulation__mark {
  width: 62px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0.1rem;
  color: #5d78b5;
  font-size: 0.48rem;
  letter-spacing: 0.05em;
}

.captcha-simulation__mark svg {
  width: 2.2rem;
  height: 2.2rem;
}

.feedback {
  margin: 1.25rem auto 0;
  width: min(100%, 650px);
  padding: 0.85rem 1rem;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 0.95rem;
}

.feedback[data-kind="error"] {
  border-color: #fecaca;
  background: #fff1f2;
  color: #9f1239;
}

.feedback[data-kind="success"] {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.results-section,
.details-section {
  width: min(100%, 700px);
  margin: 1.35rem auto 0;
}

.section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.55rem;
}

.section-heading-row h2 {
  color: #334155;
  font-size: 0.94rem;
  font-weight: 700;
}

.text-action {
  border: 0;
  background: transparent;
  color: var(--inaesp-blue);
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.results-table-wrap {
  border: 1px solid #c9ced1;
  overflow-x: auto;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.results-table thead {
  background: #e6e9e9;
  color: var(--inaesp-blue);
  text-align: left;
}

.results-table th,
.results-table td {
  border-right: 1px solid #c9ced1;
  border-bottom: 1px solid #c9ced1;
  padding: 0.72rem 0.8rem;
  vertical-align: middle;
}

.results-table th:last-child,
.results-table td:last-child {
  border-right: 0;
}

.results-table tbody tr:nth-child(odd) {
  background: #fff;
}

.results-table tbody tr:nth-child(even) {
  background: #e9ebeb;
}

.results-table tbody tr:hover {
  background: #fff7d5;
}

.results-table__action {
  width: 46px;
  text-align: center;
}

.open-detail-button {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: 50%;
  background: var(--inaesp-yellow);
  color: #1b4d98;
}

.open-detail-button svg {
  width: 1.1rem;
  height: 1.1rem;
}

.pagination {
  min-height: 2.4rem;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid #c9ced1;
  border-top: 0;
}

.pagination button {
  min-width: 2rem;
  height: 2rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--inaesp-blue);
  font-weight: 700;
  font-size: 0.8rem;
}

.pagination button[aria-current="page"] {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #1e293b;
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.details-section {
  margin-top: 1.55rem;
}

.details-titlebar {
  min-height: 3.15rem;
  padding: 0.6rem 1rem;
  background: var(--inaesp-blue-strong);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.details-titlebar h2 {
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  font-weight: 700;
  line-height: 1.35;
}

.details-titlebar button {
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.28);
}

.details-titlebar button:hover,
.details-titlebar button:focus-visible {
  color: #fff;
  outline: none;
}

.details-pattern {
  padding: 1.3rem;
  background-color: #f8f8f6;
  background-image:
    radial-gradient(circle at 15px 15px, rgba(41, 58, 158, 0.07) 0 2px, transparent 2.5px),
    linear-gradient(45deg, transparent 47%, rgba(41, 58, 158, 0.04) 48% 52%, transparent 53%);
  background-size: 30px 30px, 45px 45px;
}

.details-card {
  border: 3px double #d4d4d0;
  background: rgba(255, 255, 255, 0.97);
  padding: clamp(1.35rem, 4vw, 2.1rem);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 6vw, 4.5rem);
  box-shadow: inset 0 0 0 1px #efefec;
}

.details-column {
  display: flex;
  flex-direction: column;
  gap: 1.45rem;
}

.detail-item {
  position: relative;
  padding-left: 0.9rem;
}

.detail-item::before {
  content: "⌄";
  position: absolute;
  left: 0;
  top: -0.1rem;
  color: #a3a3a3;
  font-size: 0.8rem;
}

.detail-item span {
  display: block;
  color: #898989;
  font-size: 0.78rem;
  line-height: 1.35;
}

.detail-item strong {
  display: block;
  margin-top: 0.25rem;
  color: #2e54a8;
  font-size: 0.98rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.public-footer {
  display: flex;
  justify-content: center;
  padding: clamp(4rem, 9vw, 8rem) 1rem clamp(2.2rem, 5vw, 4.5rem);
}

.institution-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--inaesp-blue);
}

.institution-brand svg {
  width: clamp(3.25rem, 6vw, 5.4rem);
}

.institution-brand strong {
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(2rem, 5vw, 4.1rem);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.hidden {
  display: none !important;
}

@media (max-width: 680px) {
  .public-header {
    width: 92%;
    padding-top: 2rem;
  }

  .public-main {
    padding-top: 3rem;
  }

  .search-field-group label {
    margin-left: 0;
    font-size: 0.98rem;
  }

  .search-input-row {
    grid-template-columns: 1fr 2.85rem;
  }

  .search-icon-button {
    width: 2.75rem;
    height: 2.75rem;
  }

  .results-table {
    min-width: 520px;
  }

  .details-pattern {
    padding: 0.7rem;
  }

  .details-card {
    grid-template-columns: 1fr;
    gap: 1.45rem;
  }
}
