/* ===========================================
   factuPRO ERP Cloud – Login Full Optimized
   Fondo LQIP / Glass Buttons / Video Left
   =========================================== */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  overflow: hidden;

  /* Fallback + LQIP (instantáneo) */
  background-color: #e5d6c4;
  background: #e5d6c4;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-image .8s ease-out;
}

/* Cuando carga → fondo HD */
body.loaded {
  background-image: url('../img/organic-normal.webp');
}

.container {
  display: flex;
  width: 100vw;
  height: 100vh;
}

/* =========================
   IZQUIERDA — VIDEO HERO
   ========================= */
.left-side {
  width: 50%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.left-side video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 35% center; /* ★ CORRECCIÓN CLAVE */
  filter: brightness(0.7);
}

/* Textos sobre el video */
.overlay {
  position: absolute;
  bottom: 10%;
  left: 8%;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.overlay h1 {
  font-size: 2rem;
  margin-bottom: 8px;
  line-height: 1.3em;
}

.overlay p {
  font-size: 1rem;
  opacity: 0.9;
}

/* =========================
   CAROUSEL DE TEXTOS
   ========================= */

.carousel-text {
  position: absolute;
  bottom: 36%;
  left: 8%;
  width: 80%;
  color: #fff;
  opacity: 0;
  transition: opacity 1.5s ease;
  z-index: 10;
}

.carousel-text.visible { opacity: 1; }

.carousel-text .slide {
  position: absolute;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.carousel-text .slide.active { opacity: 1; }

.carousel-text h2 {
  font-size: 1.9rem;
  font-weight: 600;
  margin: 0;
  text-shadow: 0 2px 10px rgba(0,0,0,0.7);
  animation: fadeSlide 1.2s ease forwards;
}

.carousel-text p {
  font-size: 1rem;
  opacity: .9;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
  animation: fadeSlide 1.6s ease forwards;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.progress-bar {
  position: absolute;
  left: 8%;
  bottom: 31%;
  width: 5%;
  height: 4px;
  border-radius: 3px;
  background: linear-gradient(90deg, #00b4ff, #00ff9c);
  box-shadow: 0 0 10px rgba(0,255,180,0.4);
  animation: fillBar 10s linear infinite;
  z-index: 9999;
}

@keyframes fillBar {
  from { width: 0%; }
  to { width: 100%; }
}

/* =========================
   DERECHA — PANEL + GLASS
   ========================= */

.right-side {
  width: 50%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;       /* centra vertical */
  align-items: center;           /* centra horizontal */

  text-align: center;
  padding: 0;

  background-image: url('../img/organic-normal.webp');
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.right-side > * {
  width: 100%;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}



/* Login Box */
.login-box {
  width: 90%;
  max-width: 420px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  animation: fadeIn 1.5s ease;
}

/* Logo */
.logo {
  width: 75px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
  opacity: 0.8;
}

.logo::after {
  content: "";
  display: block;
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #bbb, transparent);
  margin: 12px auto 0;
  border-radius: 2px;
}

/* Inputs */
.login-box input {
  width: 100%;
  max-width: 380px;
  padding: 14px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
}

/* Botón Login */
.login-box button {
  width: 100%;
  max-width: 380px;
  padding: 14px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  margin-top: 12px;
  transition: .3s;
}

.login-box button:hover {
  background: #333;
  transform: scale(1.02);
}

/* =========================
   WATERMARK
   ========================= */
.watermark {
  position: absolute;
  top: 20px;
  left: 25px;
  font-family: "Arial Black";
  font-size: 42px;
  font-weight: 900;
  color: rgba(255,255,255,0.10);
  letter-spacing: 2px;
  z-index: 9999;
  pointer-events: none;
}

/* =========================
   POST-LOGIN PANEL
   ========================= */

.welcome-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;     /* ⭐ centra horizontal */
  justify-content: flex-start;
  padding-top: 20px;
  gap: 25px;               /* ⭐ espacio parejo */
}



.welcome-header {
  background: rgba(255,255,255,0.15);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 25px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.25);
}

.modules-grid {
  display: grid;

  /* 4 columnas EXACTAS */
  grid-template-columns: repeat(4, 180px);

  gap: 28px;

  /* 🔥 Centrado REAL DEL BLOQUE 🔥 */
  width: 100%;
  max-width: 900px;
  margin: 0 auto;

  /* 🔥 Asegura centrar cada botón en la celda */
  justify-content: center;
  justify-items: center;

  padding: 10px 0 40px 0;
}




/* =========================
   GLASS BUTTON (Módulos ERP)
   ========================= */

.glass-btn {
  width: 180px;
  height: 130px;

  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border-radius: 26px;
  border: 2px solid rgba(255, 255, 255, 0.22);

  box-shadow: 0 6px 26px rgba(0,0,0,0.18);

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  cursor: pointer;
  text-align: center;
  transition: .25s ease;
}

.glass-btn:hover {
  transform: translateY(-6px) scale(1.02);
  background: rgba(255,255,255,0.15);
  box-shadow: 0 10px 36px rgba(0,0,0,0.28);
}

.glass-btn .title {
  font-family: "Arial Black";
  font-size: 18px;
  color: #222;
}

.glass-btn .subtitle {
  font-size: 11px;
  opacity: .7;
  margin-top: 6px;
}

/* Estado ENABLED */
.glass-btn.enabled {
  opacity: 1;
  cursor: pointer;
  filter: none;
  pointer-events: auto;
}

.glass-btn.enabled:hover {
  transform: translateY(-6px) scale(1.03);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 38px rgba(0,0,0,0.25);
}


/* Estado DISABLED */
.glass-btn.disabled {
  opacity: 0.45;
  filter: grayscale(100%) brightness(0.8);
  cursor: not-allowed;
  pointer-events: none;     /* ✔ NO clics */
  transform: none !important; /* ✔ NO movimiento */
  box-shadow: none !important; /* ✔ sin sombras activas */
  background: rgba(255,255,255,0.12) !important; /* ✔ queda estático */
}

.logout-btn {
  width: 100%;
  max-width: 380px;       /* ⭐ Igual que el botón de login */
  padding: 14px;
  background: #000;        /* ⭐ mismo color */
  color: #fff;
  border: none;
  border-radius: 6px;      /* ⭐ misma curva */
  cursor: pointer;
  font-size: 16px;
  transition: .3s;
}

.logout-btn:hover {
  background: #333;        /* ⭐ mismo hover */
  transform: scale(1.02);  /* ⭐ mismo efecto */
}


.user-header {
  background: rgba(255,255,255,0.20);
  padding: 18px 22px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.28);
  backdrop-filter: blur(12px);

  margin: 0 auto 28px auto; /* ⭐ CENTRADO REAL */
  text-align: center;

  width: 100%;
  max-width: 420px; /* ⭐ bloquecito perfecto */
}


.user-header h2 {
  font-size: 22px;
  margin: 0 0 10px 0;
  font-weight: 700;
}

.user-header p {
  font-size: 14px;
  margin: 0;
  line-height: 1.4em;
}

.footer {
  margin-top: 10px;
  font-size: 13px;
  color: #555;
  opacity: 0.8;
  text-align: center;
}

.obs {
  margin-top: 10px;
  font-size: 11px;
  color: #555;
  opacity: 0.8;
  text-align: center;
}

/* ============================
   TOAST POPUP ELEGANTE
   ============================ */

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 14px 22px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  border-radius: 12px;
  font-size: 15px;
  opacity: 0;
  transform: translateX(40px);
  pointer-events: none;
  transition: opacity .4s ease, transform .4s ease;
  z-index: 999999;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

/* PANEL DESLIZANTE MASTER DATA */
.master-panel {
  position: fixed;
  top: 0;
  right: -380px;
  width: 380px;
  height: 100vh;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(14px);
  box-shadow: -4px 0 12px rgba(0,0,0,0.3);
  border-left: 1px solid rgba(255,255,255,0.2);
  transition: right 0.35s ease;
  z-index: 9999;
  padding: 20px;
}

.master-panel.open {
  right: 0;
}

.master-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.master-header h2 {
  margin: 0;
  font-size: 1.4rem;
}

.close-btn {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: #fff;
  cursor: pointer;
}

.master-body {
  margin-top: 20px;
}

.master-option {
  padding: 14px;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: 0.2s;
  border: 1px solid rgba(255,255,255,0.2);
}

.master-option:hover {
  background: rgba(255,255,255,0.25);
  transform: translateX(4px);
}

/* === OTP INPUTS ESTILO factuPRO === */
/* Inputs OTP iguales a los inputs de login */
.otp-wrapper {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.otpDigit {
    width: 45px;               /* cuadrado y proporcionado */
    height: 25px;              /* <-- MISMO ALTO QUE INPUTS DE USUARIO */
    font-size: 20px;
    text-align: center;

    border: 1px solid #ccc;
    border-radius: 6px;        /* mismo borde suave */
    background: #fff;

    outline: none;
    transition: 0.2s;
}

.otpDigit:focus {
    border-color: #2a7cff;
    box-shadow: 0 0 4px rgba(0, 102, 255, 0.35);
}

/* === BOTÓN VERIFICAR – ESTADO DISABLED === */
#verificarBtn.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    background: #666 !important;        /* gris elegante */
    transform: none !important;
}




