/* ====== Reset & Layout base ====== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100vh;              /* viewport exacto */
  margin: 0;
  overflow: hidden;           /* NO scrollbars en login */
}

body {
  background-color: #1D617A;
  position: relative;
  font: 400 16px 'Source Sans Pro', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ====== Card (form) centrado ====== */
form {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0;
  padding: 2.25em;
  background: #FFF;
  border: 1px solid #DDD;
  border-radius: .5em;
}

/* ====== Avatar ====== */
.svgContainer {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 1em;
  border-radius: 50%;
  background: none;
  border: 2.5px solid #3A5E77;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.svgContainer div {
  position: relative;
  width: 100%;
  height: 0;
  overflow: hidden;
  padding-bottom: 100%;
}
.mySVG {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ====== Grupos de inputs ====== */
.inputGroup {
  position: relative;
  margin: 0 0 2em;
  padding: 0;
  z-index: 2;                 /* por encima del svg */
}
.inputGroup:last-of-type { margin-bottom: 0; }

label {
  display: block;
  margin: 0 0 12px;
  font: 700 1.25em inherit;
  color: #217093;
}

/* ====== Inputs ====== */
input[type="email"],
input[type="text"],
input[type="password"] {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 56px;
  margin: 0;
  padding: 12px 16px;
  background: #f3fafd;
  border: 2px solid #217093;
  border-radius: 4px;
  font: 600 1.35em/1.1 'Source Sans Pro', sans-serif;
  color: #353538;
  transition: box-shadow .2s linear, border-color .25s ease-out;
}

input[type="email"]:focus,
input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
  border-color: #4eb8dd;
}

/* Campo usuario con helper “placeholder” flotante */
input[type="email"],
input[type="text"] {
  padding-top: 14px;          /* deja aire al helper */
}
.inputGroup1 .helper { 
  position: absolute; 
  z-index: 1; 
  font-family: inherit; 
}
.inputGroup1 .helper1 {
  top: 0; left: 0;
  transform: translate(1.2em, 2.1em) scale(.9);
  transform-origin: 0 0;
  color: #217093;
  font-weight: 400;
  font-size: 1.1em;
  opacity: .65;
  pointer-events: none;
  transition: transform .2s ease-out, opacity .2s linear;
}
.inputGroup1.focusWithText .helper {
  transform: translate(1.4em, 2.0em) scale(.65);
  opacity: 1;
}

/* Placeholder nativo: se oculta al enfocar o al escribir */
input::placeholder { opacity: .6; transition: opacity .15s ease; }
input:focus::placeholder,
input:not(:placeholder-shown)::placeholder { opacity: 0; }

/* ====== Botón principal (Log in) ====== */
button:not(.toggle-eye) {
  display: block;
  width: 100%;
  height: 65px;
  margin: 0;
  padding: .65em 1em 1em;
  background-color: #4eb8dd;
  border: none;
  border-radius: 4px;
  font: 600 1.55em 'Source Sans Pro', sans-serif;
  color: #FFF;
  transition: background-color .2s ease-out;
}
button:not(.toggle-eye):hover,
button:not(.toggle-eye):active { 
  background-color: #217093; 
}
button:focus { outline: none; }

/* ====== Botón “ojito” dentro del input password ====== */
.inputGroup2 { position: relative; }
.inputGroup2 .password { padding-right: 52px; } /* espacio para el ojito */

.toggle-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-10%);
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: #217093;
  display: grid;
  place-items: center;
  cursor: pointer;
  line-height: 0;
}
.toggle-eye svg { width: 22px; height: 22px; }
.toggle-eye:focus { outline: none; }

/* ====== Accesibilidad menor ====== */
input:focus-visible,
button:focus-visible { outline: 2px solid #4eb8dd; outline-offset: 2px; }

/* ====== Responsive pequeño ====== */
@media (max-width: 420px) {
  form { 
    max-width: 92vw; 
    padding: 1.75em; 
  }
  .svgContainer { width: 160px; height: 160px; }
  input[type="email"], input[type="text"], input[type="password"] { height: 52px; }
  button:not(.toggle-eye) { height: 60px; font-size: 1.35em; }
}
/* === Botón secundario (Crear cuenta) === */
.extra-actions {
  margin-top: 1em;
  text-align: center;
}

.btn-secondary {
  display: inline-block;
  width: auto;               /* no ocupa todo el ancho */
  min-width: 180px;
  padding: .65em 1.5em;
  border-radius: 4px;
  font-size: 1.2em;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background-color: transparent;
  border: 2px solid #4eb8dd;
  color: #4eb8dd;
  transition: all .2s ease-out;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: #4eb8dd;
  color: #fff;
  outline: none;
}
