/* Universal PIN Guard Overlay (Desktop & Tablet) */
.pin-guard-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 17, 0.96);
  backdrop-filter: blur(25px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

/* Only display when authorization is required and NOT authorized */
html.pin-required:not(.pin-authorized) .pin-guard-overlay:not(.unlocked) {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.pin-guard-overlay.unlocked,
html.pin-authorized .pin-guard-overlay {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.pin-guard-card {
  width: 100%;
  max-width: 360px;
  background: rgba(16, 23, 38, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  animation: pgCardPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pgCardPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.pin-guard-icon {
  font-size: 38px;
  margin-bottom: 10px;
  display: inline-block;
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.4));
}

.pin-guard-title {
  font-size: 20px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.pin-guard-sub {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
  margin-bottom: 22px;
}

.pin-guard-dots {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}

.pg-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #64748b;
  transition: all 0.2s ease;
}

.pg-dot.filled {
  background: #38bdf8;
  border-color: #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.8);
  transform: scale(1.2);
}

.pin-guard-error {
  font-size: 12px;
  color: #ef4444;
  min-height: 20px;
  margin-bottom: 18px;
  font-weight: 600;
}

.pin-guard-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  justify-items: center;
}

.pg-key {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-size: 24px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.pg-key:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.pg-key:active {
  background: #38bdf8;
  color: #000;
  transform: scale(0.92);
}

.pg-key-special {
  font-size: 18px;
  background: rgba(255, 255, 255, 0.02);
  color: #94a3b8;
}

.pg-key-special:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}
