/* GBPOS · formulario de ingreso (login/index.html)
   Colores y tipografía del manual de marca (docs/marca/). El modo noche cambia las variables con
   <body data-tema="noche">. */

:root {
  --tinta: #2B173F;
  --texto: #2C2C2C;
  --apagado: #6E6679;
  --linea: #E6E1EE;
  --fondo: #FFFFFF;
  --fondo-2: #F3F2F8;
  --campo: #FFFFFF;
  --amarillo: #FFC008;
  --ambar: #F8A510;
  --error: #D93F55;
  --error-suave: #FDECEE;
  --ok: #1F9D63;
  --ok-suave: #E6F6EE;
}
body[data-tema="noche"] {
  --tinta: #FFFFFF;
  --texto: #F1EEF6;
  --apagado: #B9AECB;
  --linea: #3D3C44;
  --fondo: #1A191E;
  --fondo-2: #25232B;
  --campo: #2C2A33;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--fondo);
  color: var(--texto);
  font: 400 16px/1.5 "Baloo 2", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.ingreso { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.ingreso__panel { display: flex; flex-direction: column; padding: 28px 32px; }
/* Panel de marca: siempre morado con el logo amarillo, también en modo noche */
.ingreso__arte {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
  padding: 56px clamp(40px, 7vw, 96px);
  background: #2B173F;
}
.ingreso__arte img { position: relative; width: min(42%, 220px); }
.ingreso__frase {
  position: relative;
  margin: 0;
  font: 700 clamp(26px, 2.6vw, 38px)/1.15 "Baloo 2", sans-serif;
  text-transform: uppercase;
  color: #FFC008;
}
.ingreso__frase span { display: block; margin-top: 10px; color: #FFFFFF; }
.ingreso__frase span::before { content: "— "; }
/* Arcos de las esquinas, como en el manual de marca */
.ingreso__arte::before,
.ingreso__arte::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 320px;
  border: 44px solid rgba(255, 255, 255, .12);
  border-radius: 999px 999px 0 0;
}
.ingreso__arte::before { right: -70px; top: -120px; transform: rotate(180deg); }
.ingreso__arte::after { left: -60px; bottom: -150px; }

/* En computador el logo va en el panel; arriba a la izquierda solo en celular */
@media (min-width: 801px) { .ingreso__logo { visibility: hidden; } }

.ingreso__arriba { display: flex; justify-content: space-between; align-items: center; }
.ingreso__logo { width: 76px; }
.tema { display: inline-flex; border: 1px solid var(--linea); border-radius: 999px; overflow: hidden; }
.tema button { display: grid; place-items: center; width: 40px; height: 32px; border: 0; background: transparent; cursor: pointer; }
.tema button img { width: 17px; }
body[data-tema="noche"] .tema button img { filter: invert(1); }
.tema button[aria-pressed="true"] { background: var(--fondo-2); }

.formulario { width: 100%; max-width: 400px; margin: auto; padding: 32px 0; }
.formulario h1 { margin: 0; font: 700 34px/1.15 "Baloo 2", sans-serif; color: var(--tinta); }
.formulario .sub { margin: 6px 0 28px; color: var(--apagado); }

.campo { display: grid; gap: 6px; margin-bottom: 16px; }
.campo label { font-weight: 600; color: var(--tinta); }
.campo input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--linea);
  border-radius: 12px;
  background: var(--campo);
  color: var(--texto);
  font: 500 16px "Baloo 2", sans-serif;
}
.campo input:focus { outline: none; border-color: var(--amarillo); box-shadow: 0 0 0 3px rgba(255, 192, 8, .25); }
.campo--clave { position: relative; }
.campo--clave input { padding-right: 48px; }
.ver-clave {
  position: absolute;
  right: 6px;
  bottom: 5px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--apagado);
  cursor: pointer;
}
.ver-clave:hover { color: var(--tinta); }
.ver-clave svg { width: 20px; height: 20px; }

.olvide { display: flex; justify-content: flex-end; margin: -6px 0 18px; }
.enlace { padding: 0; border: 0; background: none; color: var(--tinta); font: 600 14px "Baloo 2", sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.enlace:hover { color: var(--ambar); }

.mensaje { margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.mensaje[hidden] { display: none; }
.mensaje--error { background: var(--error-suave); color: var(--error); }
.mensaje--ok { background: var(--ok-suave); color: var(--ok); }

.boton {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 12px;
  background: var(--amarillo);
  color: #2B173F;
  font: 700 18px "Baloo 2", sans-serif;
  box-shadow: 0 6px 18px -8px rgba(248, 165, 16, .8);
  cursor: pointer;
}
.boton:hover { background: var(--ambar); }
.boton:disabled { opacity: .6; cursor: wait; }

.cambio { margin: 22px 0 0; text-align: center; color: var(--apagado); }

/* Modo "crear cuenta": se muestra la confirmación de clave y se oculta "Olvidé mi clave" */
.solo-crear { display: none; }
.formulario[data-modo="crear"] .solo-crear { display: grid; }
.formulario[data-modo="crear"] .solo-ingresar { display: none; }

@media (max-width: 800px) {
  .ingreso { grid-template-columns: 1fr; }
  .ingreso__arte { display: none; }
  .ingreso__panel { padding: 20px 20px; }
  .formulario h1 { font-size: 30px; }
}
