/* ===== Estilos base ===== */
body {
  font-family: "Open Sans", sans-serif;
  background-color: #ffffff;
  color: #212529;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

form {
  width: 100%;
  max-width: 700px;
  background: #fff;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

h2 {
  font-weight: 600;
  text-align: center;
  color: #073DA3;
  margin-bottom: 28px;
}

/* ===== Inputs y selects ===== */
label {
  font-weight: 600;
  font-size: 14px;
  display: block;
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="date"],
select {
  width: 100%;
  background-color: #F7F7F7;
  border: 1px solid #EDEEEE;
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 16px;
  color: #212529;
  min-height: 48px;
  box-sizing: border-box;
  transition: all 0.3s ease;
  appearance: none;
}

input::placeholder,
select:invalid {
  color: #A6A8A9;
}

input:focus,
select:focus {
  outline: none;
  border: 1px solid #8EA1FF;
  box-shadow: 0 0 4px rgba(142,161,255,0.4);
  background-color: #fff;
}

/* Flecha dropdown */
select {
  background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" fill="%238EA1FF" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 20px;
}

/* ===== Mensajes de error ===== */
.invalid-feedback {
  color: #E0115F;
  font-size: 12px;
  display: none;
  margin-top: 4px;
}
/* Mostrar el mensaje aunque haya nodos intermedios insertados por plugins */
.is-invalid + .invalid-feedback,
.is-invalid ~ .invalid-feedback,
.is-invalid + * + .invalid-feedback {
  display: block;
}

/* ===== Grillas responsivas ===== */
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.form-col {
  flex: 1;
  min-width: 220px;
}

/* ===== Checkbox ===== */
.checkbox-group {
  margin-top: 12px;
}

.checkbox-group label {
  font-size: 12px;
  font-weight: 400;
  color: #212529;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.checkbox-group input[type="checkbox"] {
  accent-color: #8EA1FF;
  margin-top: 3px;
}

.checkbox-group a {
  color: #E0115F;
  text-decoration: none;
  font-weight: 600;
}

/* ===== Botón principal ===== */
button {
  width: 100%;
  background-color: #073DA3;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 16px;
}

button:hover {
  background-color: #052F7B;
}

/* ===== Espaciado ===== */
.form-group {
  margin-bottom: 16px;
}

/* ===== ajuste calendario ===== */
/* ===== Corrección visual del calendario Flatpickr ===== */
.flatpickr-calendar {
  font-family: "Open Sans", sans-serif !important;
  z-index: 9999 !important;
}

.flatpickr-months {
  height: auto !important;
  min-height: 38px !important;
  overflow: visible !important;
}

.flatpickr-month {
  line-height: normal !important;
  padding: 6px 0 !important;
}

.flatpickr-current-month {
  font-size: 16px !important;
  transform: translateY(0) !important;
}

.flatpickr-current-month .cur-month,
.flatpickr-current-month .numInputWrapper {
  vertical-align: middle !important;
  transform: translateY(0) !important;
}

  .form-row {
  display: flex;
  gap: 20px;
}

.form-col {
  flex: 1;
}

/* Cuando Sede desaparece, el campo Periodo se vuelve el único y toma todo el ancho */
.form-col.expand {
  flex: 1 1 100%;
}


