/* ==========================================================================
   iOS Lock Screen & Security PIN Passcode System
   Protects company financials and restricts access to authorized persons only
   ========================================================================== */

.ios-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(11, 15, 25, 0.96);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y pinch-zoom;
  padding: 24px 16px;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(32px, env(safe-area-inset-bottom));
  color: var(--text-primary);
  user-select: none;
  -webkit-user-select: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.ios-lock-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.05);
}

.lock-logo-badge {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #0b0f19;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
  margin-bottom: 12px;
}

/* Clean Corporate Brand Logo Container for PIN Lock Screen */
.lock-brand-card {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  margin-bottom: 16px;
  position: relative;
  overflow: visible;
}

.lock-brand-card img#lockScreenLogo,
img#lockScreenLogo {
  max-height: 88px !important;
  max-width: 220px !important;
  width: auto !important;
  height: auto !important;
  border-radius: 14px !important;
  object-fit: contain !important;
  background: #ffffff !important;
  padding: 6px 12px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
  border: none !important;
  outline: none !important;
  display: block;
}

.lock-brand-card::before,
.lock-brand-card::after,
.lock-brand-card *::before,
.lock-brand-card *::after {
  content: none !important;
  display: none !important;
  border: none !important;
}

.lock-brand-card.skeleton-shimmer {
  background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
  background-size: 200% 100%;
  animation: lockShimmer 1.5s infinite;
  min-width: 180px;
  min-height: 75px;
}

@keyframes lockShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.lock-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.lock-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
  text-align: center;
}

/* PIN Dots Display */
.pin-dots-container {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--border-light);
  background: transparent;
  transition: all 0.15s ease;
}

.pin-dot.filled {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
  transform: scale(1.15);
}

.pin-dot.error {
  background: #ff3b30;
  border-color: #ff3b30;
  box-shadow: 0 0 12px rgba(255, 59, 48, 0.6);
}

/* iOS Circular Numeric Keypad */
.ios-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px 24px;
  max-width: 280px;
  width: 100%;
}

.keypad-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 26px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  transition: all 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}

.keypad-btn:active {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(0.9);
}

.keypad-sub {
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  margin-top: -2px;
  font-weight: 700;
}

.keypad-btn.action {
  background: transparent;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}
.keypad-btn.action:active {
  background: transparent;
  transform: scale(0.92);
  color: var(--primary);
}

/* Shake Animation on Wrong PIN */
@keyframes shakeLock {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}

.shake {
  animation: shakeLock 0.35s ease;
}

/* Active User Badge in Top Bar */
.user-auth-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}
.user-auth-badge:active {
  background: rgba(255, 255, 255, 0.16);
}
