/* ==============================================================
   COMPATIBILIDAD ENTRE NAVEGADORES
   Se carga después de los estilos de cada pantalla.
============================================================== */

:root {
  color-scheme: light;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

body,
button,
input,
select,
textarea {
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

fieldset {
  min-width: 0;
}

legend {
  max-width: 100%;
  white-space: normal;
}

button,
input,
select,
textarea {
  margin: 0;
  letter-spacing: normal;
}

button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  -webkit-appearance: none;
  appearance: none;
}

button::-moz-focus-inner,
input::-moz-focus-inner {
  padding: 0;
  border: 0;
}

input::placeholder,
textarea::placeholder {
  opacity: 1;
}

/* Select consistente en Chrome, Edge, Firefox y Safari. */
select:not([multiple]) {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2324312c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 16px 16px;
}

select::-ms-expand {
  display: none;
}

/* Radios consistentes. */
input[type="radio"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  flex: 0 0 20px;
  width: 20px !important;
  min-width: 20px;
  height: 20px !important;
  min-height: 20px !important;
  padding: 0;
  border: 2px solid #87948e;
  border-radius: 50%;
  background: #fff;
  vertical-align: middle;
}

input[type="radio"]:checked {
  border: 5px solid var(--primario, var(--verde, #007b5e));
  background: #fff;
}

input[type="radio"]:focus-visible,
input[type="checkbox"]:focus-visible {
  outline: 3px solid rgba(0, 123, 94, .20);
  outline-offset: 2px;
}

/* Checkbox consistente sin depender de la apariencia nativa. */
input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  flex: 0 0 20px;
  width: 20px !important;
  min-width: 20px;
  height: 20px !important;
  min-height: 20px !important;
  padding: 0;
  border: 2px solid #87948e;
  border-radius: 4px;
  background: #fff;
  vertical-align: middle;
}

input[type="checkbox"]:checked {
  border-color: var(--primario, var(--verde, #007b5e));
  background-color: var(--primario, var(--verde, #007b5e));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
}

input[type="date"] {
  min-height: 46px;
  line-height: 1.2;
}

input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: .72;
}

/* Fallbacks para navegadores que manejan diferente min(), max() o clamp(). */
.contenedor {
  width: calc(100% - 32px);
  max-width: 1180px;
}

.barra-superior {
  padding-left: 20px;
  padding-right: 20px;
}

.encabezado h1 {
  font-size: 36px;
  font-size: clamp(26px, 4vw, 36px);
}

/* SVG locales del login: evita depender de Google Fonts o Font Awesome. */
.icono svg,
.icon-login svg,
.input > svg,
.ver-contrasena svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icono svg,
.icon-login svg {
  margin: auto;
}

.input > svg {
  flex: 0 0 26px;
  width: 20px;
  height: 20px;
  color: var(--verde, #0b6b4a);
}

.ver-contrasena svg {
  width: 19px;
  height: 19px;
}

@media (min-width: 1220px) {
  .barra-superior {
    padding-left: calc((100vw - 1180px) / 2);
    padding-right: calc((100vw - 1180px) / 2);
  }
}

@media (max-width: 700px) {
  .contenedor {
    width: calc(100% - 20px);
  }
}
