:root {
  --vc-primary: #0f4c81;
  --vc-primary-dark: #0b3d68;
  --vc-bg: #f4f6fb;
  --vc-text: #111827;
  --vc-muted: #6b7280;
  --vc-border: #e5e7eb;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: 'Poppins', Arial, sans-serif;
  color: var(--vc-text);
  background-image: url('../img/background5.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.validate-wrap {
  width: 100%;
  max-width: 1250px;
}

/* Header independiente */
.validate-card {
  background: #ffffff;
  border: 1px solid var(--vc-border);
  border-radius: 24px;
  padding: 18px 34px;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.13);
}

.validate-header-card {
  margin: 0 auto 34px;
}

.brand-box {
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 28px;
  margin-bottom: 0;
  text-align: left;
}

.brand-icon {
  width: 130px;
  height: auto;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon img {
  max-width: 100%;
  max-height: 70px;
  object-fit: contain;
  display: block;
}

.brand-title {
  margin: 0;
  font-size: 25px;
  line-height: 1.2;
  font-weight: 700;
}

.brand-subtitle {
  margin: 5px 0 0;
  color: var(--vc-muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Alertas */
.alert {
  max-width: 900px;
  margin: 0 auto 18px;
  border-radius: 14px;
  font-size: 14px;
}

/* Bloques principales */
.validation-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 54px;
  align-items: stretch;
  margin: 0 auto;
}

.validation-section {
  min-height: 360px;
  padding: 26px 24px;
  border: 1px solid var(--vc-border);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.query-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: var(--vc-text);
}

.query-subtitle,
.form-hint {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--vc-muted);
}

.form-label {
  font-weight: 600;
  color: #374151;
}

.form-control {
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.form-control:focus {
  border-color: var(--vc-primary);
  box-shadow: 0 0 0 .25rem rgba(15, 76, 129, .15);
}

.form-select {
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px;
  color: var(--vc-text);
  border-color: #dee2e6;
}

.form-select:focus {
  border-color: var(--vc-primary);
  box-shadow: 0 0 0 .25rem rgba(15, 76, 129, .15);
}

#dni_alumno {
  letter-spacing: 1px;
  text-transform: uppercase;
}

#primer_nombre {
  letter-spacing: 1px;
  text-transform: uppercase;
}

.btn-validate {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 14px 18px;
  background: #191a45;
  color: #ffffff;
  font-weight: 700;
  transition: background .2s ease, transform .2s ease;
}

.btn-validate:hover,
.btn-validate:focus {
  background: #6367ff;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Texto inferior */
.help-text {
  margin: 28px auto 0;
  padding: 10px 24px;
  color: var(--vc-muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--vc-border);
  border-radius: 999px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

/* Resultados */
.cert-results {
  max-width: 900px;
  margin: 0 auto;
  padding: 26px 24px;
  border: 1px solid var(--vc-border);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  text-align: left;
}

.student-summary {
  margin: 8px 0 18px;
  padding: 16px;
  border: 1px solid var(--vc-border);
  border-radius: 16px;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.student-summary span {
  font-size: 12px;
  font-weight: 600;
  color: var(--vc-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.student-summary strong {
  font-size: 18px;
  line-height: 1.35;
  color: var(--vc-text);
}

.student-summary small {
  font-size: 13px;
  color: var(--vc-muted);
}

.cert-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cert-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--vc-border);
  border-radius: 16px;
  background: #ffffff;
}

.cert-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  line-height: 1.45;
  color: #374151;
}

.cert-info strong {
  margin-bottom: 2px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--vc-text);
}

.cert-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  min-width: 135px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.status-active {
  color: #166534;
  background: #dcfce7;
}

.status-revoked {
  color: #991b1b;
  background: #fee2e2;
}

.cert-actions .btn {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
  white-space: nowrap;
}

.btn-new-query {
  width: 100%;
  margin-top: 18px;
  border-radius: 14px;
  padding: 13px 18px;
  background: #111827;
  color: #ffffff;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.btn-new-query:hover,
.btn-new-query:focus {
  background: #005740;
  color: #ffffff;
}

/* Responsive */
@media (max-width: 767px) {
  body {
    align-items: flex-start;
    padding: 18px;
  }

  .validate-wrap {
    max-width: 100%;
  }

  .validate-header-card {
    margin-bottom: 18px;
  }

  .validate-card {
    padding: 24px 20px;
  }

  .brand-box {
    flex-direction: column;
    gap: 10px;
    text-align: start;
  }

  .brand-icon {
    width: 95px;
  }

  .brand-title {
    font-size: 22px;
  }

  .validation-options {
    grid-template-columns: 1fr;
    gap: 18px;
    max-width: 100%;
  }

  .validation-section {
    min-height: auto;
    padding: 22px 18px;
  }

  .help-text {
    border-radius: 18px;
    padding: 12px 16px;
  }

  .cert-results {
    padding: 22px 18px;
  }

  .cert-item {
    flex-direction: column;
  }

  .cert-actions {
    align-items: flex-start;
    min-width: 100%;
  }

  .cert-actions .btn {
    width: 100%;
    text-align: center;
  }
}