/* =========================================================
   Screen Lock Overlay - Bloqueo de pantalla POS / app
   ========================================================= */
.screen-lock-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.screen-lock-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.screen-lock-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-radius: 20px;
  padding: 2rem 2rem 1.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(255, 255, 255, 0.06);
  text-align: center;
  animation: screenLockPanelIn 0.35s ease-out;
}

@keyframes screenLockPanelIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.screen-lock-brand {
  margin-bottom: 1.25rem;
}

.screen-lock-logo {
  max-height: 56px;
  max-width: 180px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.screen-lock-logo-placeholder {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.5rem;
  background: linear-gradient(135deg, #4B1C71 0%, #6D28D9 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
}

.screen-lock-app-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0;
  letter-spacing: -0.02em;
}

.screen-lock-icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: rgba(99, 102, 241, 0.2);
  border: 2px solid rgba(99, 102, 241, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen-lock-icon {
  font-size: 1.75rem;
  color: #818cf8;
}

.screen-lock-title-text {
  font-size: 1.35rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 0.35rem;
}

.screen-lock-subtitle {
  font-size: 0.9rem;
  color: #94a3b8;
  margin: 0 0 0.75rem;
  line-height: 1.4;
}

.screen-lock-user {
  font-size: 0.95rem;
  font-weight: 600;
  color: #cbd5e1;
  margin: 0 0 0.5rem;
}

.screen-lock-datetime {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 1.5rem;
}

.screen-lock-form .form-group {
  margin-bottom: 1rem;
}

.screen-lock-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.8);
  color: #f1f5f9;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.screen-lock-input::placeholder {
  color: #64748b;
}

.screen-lock-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  outline: none;
}

.screen-lock-error {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #f87171;
}

.screen-lock-btn-unlock {
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #4B1C71 0%, #6D28D9 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.4);
}

.screen-lock-btn-unlock:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(109, 40, 217, 0.45);
  color: #fff;
}

.screen-lock-btn-unlock:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.screen-lock-hint {
  font-size: 0.75rem;
  color: #64748b;
  margin: 1rem 0 0.75rem;
  line-height: 1.35;
}

.screen-lock-footer-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.screen-lock-link-logout {
  font-size: 0.875rem;
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s;
}

.screen-lock-link-logout:hover {
  color: #f87171;
}

/* Cuando el overlay está visible, bloquear interacción con el contenido de atrás */
body.screen-locked {
  overflow: hidden;
}

body.screen-locked .screen-lock-overlay {
  display: flex !important;
}

/* Impedir clicks en el contenido de fondo; el overlay y su contenido siguen activos */
body.screen-locked .wrapper {
  pointer-events: none !important;
}

body.screen-locked .screen-lock-overlay {
  pointer-events: auto !important;
}

body.screen-locked .screen-lock-overlay * {
  pointer-events: auto !important;
}

/* Responsive */
@media (max-width: 480px) {
  .screen-lock-overlay {
    padding: 16px;
  }
  .screen-lock-panel {
    padding: 1.5rem 1.25rem 1.25rem;
  }
  .screen-lock-title-text {
    font-size: 1.2rem;
  }
  .screen-lock-subtitle {
    font-size: 0.85rem;
  }
}
