/* ===== Admin idle PIN lock (lock.js) ===== */
/* Full-viewport lock overlay — z-index deliberately above every other layer
   (highest existing is 10000; notif-dropdown 250, old modals 9999) so nothing
   behind it is visible or clickable while the session is locked. */
.lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 6, 6, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.lock-overlay.hidden { display: none; }
.lock-card {
  width: 100%;
  max-width: 300px;
  padding: 28px 24px 24px;
  border-radius: 18px;
  background: var(--bg-secondary, #3e1616);
  border: 1px solid var(--glass-border, rgba(255,255,255,0.1));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  text-align: center;
}
.lock-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary, #fff);
  margin-bottom: 4px;
}
.lock-sub {
  font-size: 0.82rem;
  color: var(--text-muted, #bbb);
  margin-bottom: 20px;
}
/* Face ID unlock button — rendered ABOVE the PIN boxes, revealed by lock.js
   only when a WebAuthn credential is enrolled AND the device has a platform
   authenticator. The PIN pad below stays the always-available fallback. */
.lock-faceid-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--glass-border, rgba(255,255,255,0.14));
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary, #fff);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.lock-faceid-btn:hover { background: rgba(255, 255, 255, 0.12); }
.lock-faceid-btn.hidden { display: none; }
/* 4 masked boxes + the transparent, focus-trapped PIN input overlaid on top.
   The input covers the boxes (inset:0) so a tap on a box IS a tap on the input —
   native focus + the mobile keypad, no extra JS. Its own text is invisible
   (masked + transparent colour); the boxes are the visible masked state. */
.lock-pinwrap {
  position: relative;
  width: max-content;
  margin: 0 auto 16px;
}
.lock-boxes {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.lock-box {
  width: 44px;
  height: 54px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.12s;
}
.lock-box.filled { border-color: var(--accent-red, #ff6b6b); }
.lock-box.filled::after {
  content: '';
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent-red, #ff6b6b);
}
.lock-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  text-align: center;
  font-size: 16px;           /* 16px avoids iOS focus-zoom */
  -webkit-text-security: disc;
  outline: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lock-input:focus { outline: none; }
.lock-msg {
  min-height: 18px;
  font-size: 0.78rem;
  color: var(--text-muted, #bbb);
  margin-bottom: 14px;
}
.lock-msg-err { color: var(--accent-red, #ff6b6b); }
.lock-shake { animation: lockShake 0.34s ease; }
@keyframes lockShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* Set / change PIN — inside the profile dropdown */
.lock-setpin-row { margin-top: 8px; }
.lock-setpin-toggle {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--glass-border, rgba(255,255,255,0.1));
  background: transparent;
  color: var(--text-muted, #bbb);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.lock-setpin-toggle:hover { border-color: rgba(255,255,255,0.2); color: var(--text-secondary, #ccc); }
.lock-setpin-form { margin-top: 8px; }
.lock-setpin-form.hidden { display: none; }
.lock-setpin-field { margin-bottom: 8px; text-align: left; }
.lock-setpin-field label {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted, #bbb);
  margin-bottom: 3px;
}
.lock-setpin-field input {
  width: 100%;
  padding: 7px 10px;
  border-radius: 7px;
  border: 1px solid var(--glass-border, rgba(255,255,255,0.1));
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-primary, #fff);
  font-size: 0.95rem;
  letter-spacing: 0.25em;
}
.lock-setpin-msg { min-height: 14px; font-size: 0.7rem; color: var(--text-muted, #bbb); text-align: center; margin-bottom: 6px; }
.lock-setpin-msg-err { color: var(--accent-red, #ff6b6b); }
.lock-setpin-msg-ok { color: #6bff96; }
.lock-setpin-actions { display: flex; gap: 8px; }
.lock-setpin-actions button {
  flex: 1;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--glass-border, rgba(255,255,255,0.1));
}
.lock-setpin-cancel { background: transparent; color: var(--text-muted, #bbb); }
.lock-setpin-save { background: var(--accent-red, #ff6b6b); color: #fff; border-color: transparent; }
.lock-setpin-save:disabled { opacity: 0.6; cursor: default; }

