/* ula2026.css — Correo funcionarios ULagos */

:root {
  --naranja: #0055b7;
  --naranja-oscuro: #013d82;
  --naranja-suave: #0b73e9cd;
  --texto: #1f2328;
  --texto-suave: #5b636e;
  --fondo: #f4f5f7;
  --tarjeta: #ffffff;
  --borde: #d9dde3;
  --error: #587aa0;

  
  --exito: #1e7b4a;
  --radio: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --texto: #e8eaed;
    --texto-suave: #a9b0ba;
    --fondo: #15171a;
    --tarjeta: #1f2226;
    --borde: #343a42;
    --naranja-suave: #2d1d15;
    --error: #ff8a80;
    --exito: #3ddc97;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--fondo);
  color: var(--texto);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

/* Encabezado */
header {
  background: var(--naranja);
  color: #fff;
  padding: 1rem 1.25rem;
  text-align: center;
}
header .marca { font-weight: 700; font-size: 1.05rem; }
header .sub { opacity: .9; font-size: .85rem; }

/* Contenedor principal */
main {
  flex: 1;
  display: grid;
  place-items: start center;
  padding: 2rem 1rem;
  gap: 1.25rem;
}

.tarjeta {
  width: 100%;
  max-width: 480px;
  background: var(--tarjeta);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
  padding: clamp(1.25rem, 4vw, 2rem);
}
h1 { font-size: 1.35rem; margin: 0 0 .25rem; }
.intro { color: var(--texto-suave); margin: 0 0 1.25rem; font-size: .95rem; }

.aviso {
  background: var(--naranja-suave);
  border-left: 4px solid var(--naranja);
  border-radius: 8px;
  padding: .75rem .9rem;
  font-size: .88rem;
  margin-bottom: 1.25rem;
}
.aviso a { color: var(--naranja-oscuro); font-weight: 600; }

/* Campos */
.campo { margin-bottom: 1rem; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.fila { display: flex; gap: .5rem; align-items: center; }
.fila .guion { color: var(--texto-suave); font-weight: 600; }
.ayuda { font-size: .8rem; color: var(--texto-suave); margin-top: .35rem; }
.entrada { position: relative; display: flex; align-items: center; }
.entrada .sufijo {
  position: absolute;
  right: .9rem;
  color: var(--texto-suave);
  font-size: .9rem;
  pointer-events: none;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: .75rem .9rem;
  font: inherit;
  color: var(--texto);
  background: var(--fondo);
  border: 1.5px solid var(--borde);
  border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}
input.rut-num { width: 8.5rem; flex: 0 0 auto; }
input.rut-dv { width: 3.5rem; flex: 0 0 auto; text-align: center; text-transform: uppercase; }
input.con-sufijo { padding-right: 6.5rem; }

input:focus {
  outline: none;
  border-color: var(--naranja);
  box-shadow: 0 0 0 3px rgba(32, 86, 221, 0.2);
}
input.invalido { border-color: var(--error); }
input.valido { border-color: var(--exito); }

/* Medidor del plugin pstrength */
.pstrength-minchar, .pstrength-bar { font-size: .8rem; color: var(--texto-suave); margin-top: .35rem; }

/* Lista de requisitos en vivo */
.requisitos {
  list-style: none;
  padding: 0;
  margin: .5rem 0 1rem;
  display: grid;
  gap: .35rem;
  font-size: .85rem;
}
.requisitos li {
  display: flex;
  gap: .5rem;
  align-items: center;
  color: var(--texto-suave);
}
.requisitos li::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--borde);
  flex-shrink: 0;
}
.requisitos li.cumple { color: var(--exito); }
.requisitos li.cumple::before { background: var(--exito); border-color: var(--exito); }

.error-form { color: var(--error); font-size: .85rem; min-height: 1.2em; margin: .5rem 0 0; }

/* Botón principal */
.boton {
  width: 100%;
  margin-top: 1rem;
  padding: .85rem;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--naranja);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s, transform .05s;
}
.boton:hover { background: var(--naranja-oscuro); }
.boton:active { transform: translateY(1px); }
.boton:focus-visible { outline: 3px solid rgba(255,111,55,.4); outline-offset: 2px; }

/* Resultado del servidor */
.resultado {
  margin-top: 1rem;
  padding: .75rem .9rem;
  border-radius: 10px;
  font-size: .9rem;
  background: rgba(40, 24, 180, 0.1);
  color: var(--error);
}
.resultado p { margin: 0; }

/* Recomendaciones */
.recomendaciones {
  width: 100%;
  max-width: 480px;
  background: var(--naranja);
  color: #fff;
  border-radius: var(--radio);
  padding: 1.25rem 1.5rem;
  font-size: .9rem;
}
.recomendaciones h2 { font-size: 1rem; margin: 0 0 .5rem; }
.recomendaciones ul { margin: 0; padding-left: 1.1rem; }
.recomendaciones li { margin-bottom: .4rem; }

footer {
  text-align: center;
  font-size: .8rem;
  color: var(--texto-suave);
  padding: 1.25rem;
}

/* Responsivo */
@media (max-width: 480px) {
  .tarjeta { border-radius: 12px; }
  input.con-sufijo { padding-right: 5.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
