
:root {
  --verde: #164e3d;
  --verde-oscuro: #103b2e;
  --dorado: #c5a451;
  --fondo: #f3f5f2;
  --blanco: #ffffff;
  --texto: #26352e;
  --gris: #6c7771;
  --borde: #e0e6e1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--fondo);
  color: var(--texto);
}

[hidden] {
  display: none !important;
}

.topbar {
  background: var(--verde);
  color: white;
  padding: 18px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 4px solid var(--dorado);
}

.marca {
  display: flex;
  align-items: center;
  gap: 13px;
}

.logo {
  background: var(--dorado);
  color: var(--verde-oscuro);
  font-weight: bold;
  font-size: 21px;
  padding: 12px;
  border-radius: 8px;
}

.marca h1 {
  font-size: 17px;
  margin: 0 0 5px;
}

.marca small {
  color: #e4d8b5;
}

.contenedor {
  width: min(1150px, 94%);
  margin: 35px auto;
}

.bienvenida {
  background: var(--verde);
  color: white;
  border-left: 6px solid var(--dorado);
  border-radius: 10px;
  padding: 28px;
  margin-bottom: 30px;
}

.bienvenida h2 {
  margin: 10px 0;
}

.bienvenida p {
  color: #e5eadd;
  margin-bottom: 0;
}

.etiqueta {
  color: #e4cb86;
  font-size: 12px;
  letter-spacing: 2px;
}

h3 {
  color: var(--verde);
}

.estadisticas {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin: 20px 0 30px;
}

.estadistica {
  background: white;
  border-radius: 10px;
  padding: 22px;
  border-bottom: 3px solid var(--dorado);
}

.estadistica span {
  display: block;
  color: var(--gris);
  font-size: 14px;
}

.estadistica strong {
  display: block;
  color: var(--verde);
  font-size: 32px;
  margin-top: 10px;
}

.tarjeta {
  background: white;
  padding: 25px;
  border-radius: 10px;
  margin-bottom: 24px;
  box-shadow: 0 3px 12px #00000008;
}

.login {
  max-width: 480px;
  margin: 60px auto;
}

label {
  display: block;
  margin: 17px 0 7px;
  font-weight: bold;
  font-size: 14px;
}

input, select, textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--borde);
  border-radius: 6px;
  font-size: 15px;
  background: white;
}

textarea {
  min-height: 85px;
  resize: vertical;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--dorado);
  border-color: var(--dorado);
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
}

.check input {
  width: auto;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 12px 18px;
  font-weight: bold;
}

button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-principal {
  width: 100%;
  margin-top: 20px;
  background: var(--verde);
  color: white;
}

.btn-principal:hover {
  background: var(--verde-oscuro);
}

.btn-secundario {
  background: #eee7d4;
  color: var(--verde);
}

.btn-salir {
  background: var(--dorado);
  color: var(--verde-oscuro);
}

.encabezado-lista {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.tabla-contenedor {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

th, td {
  padding: 13px;
  text-align: left;
  border-bottom: 1px solid var(--borde);
  font-size: 14px;
}

th {
  color: var(--verde);
  background: #f5f7f4;
}

.estado {
  color: var(--verde);
  font-weight: bold;
}

footer {
  text-align: center;
  padding: 25px;
  color: var(--gris);
  font-size: 13px;
}

@media (max-width: 750px) {
  .estadisticas {
    grid-template-columns: repeat(2, 1fr);
  }

  .encabezado-lista {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    padding: 15px;
  }

  .marca h1 {
    font-size: 14px;
  }

  .tarjeta {
    padding: 18px;
  }
}

/* =====================================
   DISEÑO DEL FORMULARIO PÚBLICO
   UT TARAHUMARA
===================================== */

.pagina-registro {
  min-height: 100vh;
  background: #f3f5f2;
  font-family: Arial, sans-serif;
}

/* Encabezado institucional */

.encabezado-publico {
  background: #164e3d;
  border-bottom: 5px solid #c5a451;
  padding: 22px 5%;
}

.identidad-institucional {
  width: min(100%, 1050px);
  margin: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.contenedor-logo {
  width: 75px;
  height: 75px;
  background: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  flex-shrink: 0;
}

.contenedor-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nombre-institucion h1 {
  color: white;
  font-size: 19px;
  margin: 0 0 5px;
}

.nombre-institucion p {
  color: #e5d5a7;
  font-size: 15px;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* Contenido principal */

.contenedor-publico {
  width: min(650px, 92%);
  margin: 38px auto;
}

/* Bienvenida */

.bienvenida-publica {
  background: #164e3d;
  color: white;
  padding: 30px;
  border-radius: 14px;
  border-left: 5px solid #c5a451;
  margin-bottom: 25px;
}

.etiqueta-publica {
  color: #e5d5a7;
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: bold;
}

.bienvenida-publica h2 {
  font-size: 27px;
  margin: 12px 0;
}

.bienvenida-publica p {
  color: #e8eee9;
  line-height: 1.6;
  margin: 0;
}

/* Tarjeta del formulario */

.tarjeta-registro {
  background: white;
  padding: 32px;
  border-radius: 14px;
  box-shadow: 0 5px 25px #173b2b12;
  border: 1px solid #e6ebe7;
}

.titulo-formulario {
  border-bottom: 1px solid #e5eae6;
  padding-bottom: 18px;
  margin-bottom: 20px;
}

.titulo-formulario h2 {
  color: #164e3d;
  font-size: 21px;
  margin: 0 0 7px;
}

.titulo-formulario p {
  color: #6c7771;
  font-size: 13px;
  margin: 0;
}

/* Campos */

.campo-formulario {
  margin-bottom: 19px;
}

.campo-formulario label {
  display: block;
  color: #26352e;
  font-size: 14px;
  font-weight: bold;
  margin: 0 0 8px;
}

.campo-formulario input,
.campo-formulario select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #dce4de;
  border-radius: 8px;
  background: #fbfcfb;
  color: #26352e;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.campo-formulario input:focus,
.campo-formulario select:focus {
  outline: none;
  border-color: #c5a451;
  box-shadow: 0 0 0 3px #c5a45130;
}

/* Botón */

.boton-registro {
  width: 100%;
  min-height: 50px;
  margin-top: 8px;
  border: none;
  border-radius: 8px;
  background: #164e3d;
  color: white;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.boton-registro:hover {
  background: #103b2e;
}

.boton-registro:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* Mensajes de registro */

.mensaje-registro {
  display: none;
  margin-top: 20px;
  padding: 16px;
  border-radius: 9px;
  font-size: 14px;
  line-height: 1.5;
}

.mensaje-registro.exito {
  display: block;
  color: #155c36;
  background: #e8f5ec;
  border: 1px solid #b8dfc4;
}

.mensaje-registro.error {
  display: block;
  color: #9c2929;
  background: #fff0f0;
  border: 1px solid #efcaca;
}

.mensaje-registro.cargando {
  display: block;
  color: #164e3d;
  background: #f0f4f1;
  border: 1px solid #dce4de;
}

/* Nota y pie */

.nota-privacidad {
  margin-top: 23px;
  padding-top: 17px;
  border-top: 1px solid #e5eae6;
  text-align: center;
}

.nota-privacidad span {
  color: #164e3d;
  font-size: 13px;
  font-weight: bold;
}

.nota-privacidad p {
  color: #6c7771;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 0;
}

.pie-publico {
  text-align: center;
  padding: 25px 15px;
  color: #6c7771;
  font-size: 13px;
  line-height: 1.7;
}

/* Adaptación a celulares */

@media (max-width: 600px) {

  .encabezado-publico {
    padding: 16px;
  }

  .contenedor-logo {
    width: 58px;
    height: 58px;
  }

  .nombre-institucion h1 {
    font-size: 15px;
  }

  .nombre-institucion p {
    font-size: 12px;
    letter-spacing: 1px;
  }

  .contenedor-publico {
    width: 92%;
    margin: 22px auto;
  }

  .bienvenida-publica {
    padding: 23px 20px;
  }

  .bienvenida-publica h2 {
    font-size: 23px;
  }

  .tarjeta-registro {
    padding: 22px 18px;
  }

  .campo-formulario input,
  .campo-formulario select {
    font-size: 16px;
  }

  .pie-publico {
    padding: 20px 12px;
  }
}
