/* Estilos de la pantalla de ingreso. Se sirve sin sesion, asi que no depende de styles.css. */

/* Misma paleta de marca que styles.css, repetida acá porque el login se sirve
 * sin sesión y no comparte hoja con el panel. */

:root {
  --fondo: #f7f3f5;
  --superficie: #ffffff;
  --borde: #e5dae0;
  --borde-suave: #efe7eb;
  --texto: #1b181c;
  --texto-suave: #6b616a;
  --acento: #9e1259;
  --acento-fuerte: #7d0e46;
  --boton-degradado: linear-gradient(135deg, #9e1259 0%, #b74f84 100%);
  --boton-hover: #7d0e46;
  --error: #b42318;
  --error-fondo: #fdecea;
  --sombra: 0 18px 40px rgba(45, 15, 30, 0.14);
}

:root[data-theme='oscuro'] {
  --fondo: #161114;
  --superficie: #201a1f;
  --borde: #3e333b;
  --borde-suave: #322830;
  --texto: #f3e9ee;
  --texto-suave: #b5a5ae;
  --acento: #d9679f;
  --acento-fuerte: #e88bb8;
  --boton-degradado: linear-gradient(135deg, #9e1259 0%, #b7357a 100%);
  --boton-hover: #b7357a;
  --error: #ff9c92;
  --error-fondo: #3a1d1a;
  --sombra: 0 18px 40px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

/* Misma precaucion que en styles.css: el atributo hidden tiene que ganarle a
 * cualquier display que declare la hoja. */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--fondo);
  color: var(--texto);
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-size: 15px;
}

.tarjeta-login {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 32px 28px 28px;
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: 16px;
  box-shadow: var(--sombra);
}

.marca {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

/* El logo trae partes blancas, asi que va siempre sobre una pastilla blanca. */
.marca-logo {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 58px;
  padding: 4px 9px;
  background: #fff;
  border-radius: 9px;
  box-shadow: inset 0 0 0 1px var(--borde-suave);
}

.marca-logo img {
  height: 100%;
  width: auto;
  display: block;
}

.marca h1 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.2px;
}

.subtitulo {
  margin: 2px 0 0;
  color: var(--texto-suave);
  font-size: 13px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--texto-suave);
}

input[type='text'],
input[type='password'] {
  width: 100%;
  padding: 11px 12px;
  margin-bottom: 16px;
  background: var(--fondo);
  border: 1px solid var(--borde);
  border-radius: 9px;
  color: var(--texto);
  font-size: 15px;
  font-family: inherit;
}

input[type='text']:focus,
input[type='password']:focus {
  outline: 2px solid var(--acento);
  outline-offset: 1px;
  border-color: var(--acento);
}

.campo-clave {
  position: relative;
}

.campo-clave input {
  padding-right: 58px;
}

.ver-clave {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 6px 10px;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--acento);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.ver-clave:hover {
  background: var(--fondo);
}

.recordar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-weight: 500;
  color: var(--texto);
  cursor: pointer;
}

.recordar input {
  width: 16px;
  height: 16px;
  accent-color: var(--acento);
  margin: 0;
}

.mensaje-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  background: var(--error-fondo);
  border-radius: 9px;
  color: var(--error);
  font-size: 13px;
}

.boton-primario {
  width: 100%;
  padding: 12px;
  background-color: var(--acento);
  background-image: var(--boton-degradado);
  border: 0;
  border-radius: 9px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.boton-primario:hover:not(:disabled) {
  background-image: none;
  background-color: var(--boton-hover);
}

.boton-primario:disabled {
  opacity: 0.6;
  cursor: default;
}

.boton-tema {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--borde);
  border-radius: 9px;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.boton-tema:hover {
  background: var(--fondo);
}

/* Se muestra el icono de lo que el boton va a hacer, no el del tema actual. */
:root[data-theme='claro'] [data-icono-claro],
:root[data-theme='oscuro'] [data-icono-oscuro] {
  display: none;
}
