/*------------------------------------
  Fuentes y Reseteo básico
-------------------------------------*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

* {
  box-sizing: border-box;
}

body {
  background: linear-gradient(to right, #e0f2fe, #f1f5f9);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  font-family: 'Inter', sans-serif;
  height: 100vh;
  margin: 0;
}

/*------------------------------------
  Logo arriba del login
-------------------------------------*/
.logo-wrapper {
  margin: 20px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-principal {
  width: 100px;
  height: auto;
  filter: drop-shadow(0px 0px 4px rgba(0, 0, 0, 0.1));
  border-radius: 8px;
  object-fit: contain;
}

/*------------------------------------
  Titulares y texto general
-------------------------------------*/
h2 {
  font-weight: 600;
  margin-bottom: 15px;
  color: #1e293b;
  font-size: 1.4rem;
}

/*------------------------------------
  Inputs base
-------------------------------------*/
input {
  background-color: #e2e8f0;
  border: none;
  padding: 10px;
  margin: 6px 0;
  width: 100%;
  border-radius: 5px;
  font-size: 0.95rem;
}

/*------------------------------------
  Botones base y hover
-------------------------------------*/
button {
  border-radius: 25px;
  border: none;
  background-color: #2563eb;
  color: white;
  padding: 10px 35px;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

button:hover {
  background-color: #1e40af;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Botón estilo ghost (transparente con borde blanco) */
button.ghost {
  background-color: transparent;
  border: 2px solid white;
  color: white;
}

/*------------------------------------
  Contenedor principal del login
-------------------------------------*/
.container {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  width: 750px;
  max-width: 95%;
  min-height: 380px;
}

/*------------------------------------
  Formularios (Sign In y CMMS) 
  posición y transición para animar
-------------------------------------*/
.form-container {
  position: absolute;
  top: 0;
  height: 100%;
  transition: all 0.6s ease-in-out;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50%;
}

form {
  background-color: white;
  display: flex;
  flex-direction: column;
  padding: 0 30px;
  height: 100%;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
}

/* Formulario Sign-In visible por defecto */
.sign-inventario {
  left: 0;
  z-index: 2;
}

/* Formulario CMMS oculto por defecto */
.sign-cmms {
  left: 0;
  opacity: 0;
  z-index: 1;
}

/* Cuando activamos el panel derecho, intercambiamos formularios */
.container.right-panel-active .sign-inventario {
  transform: translateX(100%);
  opacity: 0;
  z-index: 1;
}

.container.right-panel-active .sign-cmms {
  transform: translateX(100%);
  opacity: 1;
  z-index: 2;
}

/*------------------------------------
  Panel overlay para transición lateral
-------------------------------------*/
.overlay-container {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  overflow: hidden;
  transition: transform 0.6s ease-in-out;
  z-index: 100;
}

.overlay {
  background: linear-gradient(to right, #2563eb, #1e40af);
  color: white;
  position: relative;
  left: -100%;
  height: 100%;
  width: 200%;
  transform: translateX(0);
  transition: transform 0.6s ease-in-out;
  display: flex;
}

/* Animación del panel overlay cuando está activo */
.container.right-panel-active .overlay-container {
  transform: translateX(-100%);
}

.container.right-panel-active .overlay {
  transform: translateX(50%);
}

/*------------------------------------
  Contenido dentro del overlay: textos, botones, etc.
-------------------------------------*/
.overlay-panel {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 40px;
  height: 100%;
  width: 50%;
  transition: all 0.6s ease-in-out;
}

/* Panel izquierdo del overlay (texto) */
.overlay-left {
  transform: translateX(-20%);
  left: 0;
}

/* Panel derecho del overlay (texto) */
.overlay-right {
  right: 0;
  transform: translateX(0);
}

/* Ajustes en estado activo para los textos */
.container.right-panel-active .overlay-left {
  transform: translateX(0);
}

.container.right-panel-active .overlay-right {
  transform: translateX(20%);
}

/*------------------------------------
  Footer simple y sobrio
-------------------------------------*/
footer {
  margin-top: 15px;
  font-size: 0.85rem;
  color: #64748b;
}

/* Branding debajo del logo para identidad visual */
.branding {
  font-size: 0.95rem;
  color: #475569;
  margin-top: -10px;
  margin-bottom: 20px;
  text-align: center;
}

/*------------------------------------
  Loader central moderno
-------------------------------------*/
.loader {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 40px;
  margin: -30px 0 0 -30px;
  border-radius: 50%;
  border: 6px solid #e0f2fe;
  border-top: 6px solid #2563eb;
  animation: spin 1s linear infinite;
  z-index: 999;
  background: transparent;
}

.loader.hidden {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/*------------------------------------
  Mensajes de error y estado
-------------------------------------*/
.error-message {
  color: #dc2626;
  font-size: 0.85rem;
  margin-top: 5px;
}

.status-message {
  color: #16a34a;
  font-size: 0.85rem;
  margin-top: 3px;
}

/*------------------------------------
  Compatibilidad con autofill de navegador
-------------------------------------*/
input:-webkit-autofill {
  box-shadow: 0 0 0 1000px white inset !important;
  -webkit-text-fill-color: #000 !important;
  transition: background-color 9999s ease-out;
  transition-delay: 9999s;
}