* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 100vw;
  padding: 20px;
  min-height: 100vh;
  background-image: url(PREX.png);
}

.error-box {
  cursor: pointer;
}

.warning {
  font-size: 14px;
  color: #e56b00;

  & .notice {
    color: #f67f01;
    font-weight: bold;
  }
}

.info-footer {
  color: #00bfff;
}

section {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  max-width: 900px;
  width: 100%;
}

main {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 100%;
}

#header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  text-align: center;
  flex-wrap: wrap;
  justify-content: center;
}

#header img {
  height: 80px;
  width: auto;
}

#header h1 {
  font-size: 1.8em;
  color: #333;
}

.input-validation-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
  width: 100%;
  margin-bottom: 20px;
}

.input_label {
  flex-grow: 1;
  height: 3em;
  position: relative;
}

.form_input {
  position: absolute;
  height: 100%;
  width: 100%;
  background: #ffffff;
  border: 2px solid #ddd;
  border-radius: 8px;
  outline: none;
  color: #333;
  padding-left: 1em;
  font-size: 1em;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

label {
  position: absolute;
  background: #fff;
  color: #777;
  font-family: 'Poppins', sans-serif;
  left: 1em;
  top: 0.75em;
  cursor: text;
  transition: top 0.3s ease, font-size 0.3s ease, color 0.3s ease;
  padding: 0 0.2em;
}

.form_input:hover {
  border-color: #f67f01;
}

.form_input:focus {
  border-color: #f67f01;
  box-shadow: 0 0 0 3px rgba(246, 127, 1, 0.2);
}

.form_input:valid ~ label,
.form_input:focus ~ label {
  top: -0.7em;
  font-size: 0.8rem;
  color: #f67f01;
}

.consultar {
  width: auto;
  padding: 10px 25px;
  border: 2px solid #f67f01;
  background-color: #f67f01;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease, transform 0.2s ease;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.consultar:hover {
  background-color: #e56b00;
  border-color: #e56b00;
}

.consultar:active {
  transform: translateY(0);
}

#result-container {
  width: 100%;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
  justify-content: center;
  border: 1px dashed #ccc;
  border-radius: 8px;
  padding: 20px;
  color: #777;
  font-style: italic;
  text-align: center;
  overflow: auto;
  transition: height 350ms ease-in;
}

#result-container.success {
  color: #4caf50;
  border-color: #4caf50;
}

#result-container.error {
  color: #e56b00;
  border-color: #e56b00;
}

#result-container.info {
  color: #777;
  border-color: #777;
}

.result-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.details-button {
  cursor: pointer;
  text-decoration: underline;
  font-size: 14px;
}

.custom-footer {
  margin-top: 40px;
  border-top: 1px solid #eee;
  padding-top: 20px;
  width: 100%;
  text-align: center;
  color: #777;
}

.custom-footer img {
  vertical-align: middle;
  margin-right: 10px !important;
}

.custom-footer span {
  font-size: 0.8em !important;
  line-height: 1.4;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  max-width: 80%;
  width: auto;
  max-height: 80%;
  overflow-y: auto;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-button {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  top: 10px;
  right: 20px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-button:hover,
.close-button:focus {
  color: #333;
  text-decoration: none;
}

.modal-content h2 {
  color: #333;
  margin-bottom: 20px;
  text-align: center;
  font-size: 1.8em;
}

#modalDetailsBody {
  margin-top: 20px;
}

#modalDetailsBody table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

#modalDetailsBody th,
#modalDetailsBody td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
  word-break: break-word;
}

#modalDetailsBody th {
  background-color: #f2f2f2;
  font-weight: 600;
  color: #555;
}

#modalDetailsBody tr:nth-child(even) {
  background-color: #f9f9f9;
}

#modalDetailsBody tr:hover {
  background-color: #f1f1f1;
}

.details-line {
  margin-bottom: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed #eee;
}

.details-line:last-child {
  border-bottom: none;
}

.details-line strong {
  color: #333;
  display: block;
  margin-bottom: 3px;
  font-size: 0.95em;
}

.details-line span {
  color: #555;
  display: block;
  font-size: 0.9em;
  padding-left: 10px;
}

@media (max-width: 768px) {
  section {
    padding: 25px;
    gap: 20px;
  }

  #header h1 {
    font-size: 1.5em;
  }

  .input-validation-section {
    flex-direction: column;
    gap: 15px;
  }

  .input_label {
    width: 100%;
    max-width: none;
  }

  .consultar {
    width: 100%;
  }

  .custom-footer div {
    flex-direction: column;
    text-align: center;
  }

  .custom-footer img {
    margin-right: 0 !important;
    margin-bottom: 10px;
  }

  .modal-content {
    max-width: 95%;
    padding: 20px;
  }
  .modal-content h2 {
    font-size: 1.5em;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  section {
    border-radius: 8px;
  }

  #header img {
    height: 60px;
  }

  #header h1 {
    font-size: 1.2em;
  }

  .form_input {
    font-size: 0.9em;
  }

  label {
    font-size: 0.9em;
  }

  .custom-footer {
    margin-top: 0;
  }

  .modal-content {
    padding: 15px;
  }
  .close-button {
    font-size: 24px;
    top: 5px;
    right: 10px;
  }
  #modalDetailsBody th,
  #modalDetailsBody td {
    padding: 8px;
    font-size: 0.9em;
  }
}
