/* =========================================================================
   EMAD AFANDI ENTERPRISE SECURITY & IP PROTECTION SUITE
   Anti-Screenshot • Anti-Copy • GPS Geofence • Station PIN • QR Lock • Watermark
   ========================================================================= */

/* --- 1. Global Anti-Copy & Anti-Selection Lockdown --- */
*, *::before, *::after {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}

/* Allow text input only where strictly needed */
input, textarea {
  -webkit-user-select: auto !important;
  user-select: auto !important;
}

/* Block dragging images and SVGs */
img, svg {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

/* Interactive elements retain click pointer events */
button, a, input, .card, .drink-card, .btn-detail-view, .menu-cat-pill, .sop-step-card, label {
  pointer-events: auto !important;
}

/* --- 2. Forensic Dynamic Watermark Pattern Overlay --- */
.forensic-watermark-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99998;
  overflow: hidden;
  opacity: 0.055;
  display: flex;
  flex-wrap: wrap;
  align-content: space-around;
  justify-content: space-around;
  transform: rotate(-18deg) scale(1.3);
  transition: opacity 0.3s ease;
}

.watermark-stamp {
  font-family: 'Outfit', 'Cairo', sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  color: #ffd700;
  white-space: nowrap;
  padding: 18px 24px;
  letter-spacing: 0.8px;
}

/* --- 3. Anti-Capture Privacy Curtain (App-Switch / Screenshot Blocker) --- */
#anti-capture-curtain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #030406;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

#anti-capture-curtain.active {
  opacity: 1;
  pointer-events: auto;
}

.curtain-logo {
  width: 90px;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.5));
}

.curtain-msg {
  color: #d4af37;
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* --- 4. Master Security Overlays (QR / GPS / PIN) --- */
.security-fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, #0f121a 0%, #040507 100%);
  z-index: 999990;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  text-align: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s ease;
}

.security-fullscreen-overlay.active {
  opacity: 1;
  visibility: visible;
}

.security-card-box {
  background: rgba(13, 16, 24, 0.92);
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.15);
  border-radius: 28px;
  padding: 32px 24px;
  max-width: 390px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.security-card-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ffd700, transparent);
}

.security-brand-logo {
  width: 82px;
  height: auto;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.4));
}

.security-badge-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.12);
  border: 1.5px solid #d4af37;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffd700;
  margin-bottom: 16px;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
}

.security-badge-icon.alert {
  background: rgba(239, 68, 68, 0.12);
  border-color: #ef4444;
  color: #ef4444;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.25);
}

.security-card-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}

.security-card-desc {
  font-size: 0.86rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin: 0 0 22px;
}

/* --- 5. Luxury PIN Pad Component --- */
.pin-display-dots {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  justify-content: center;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.8px solid rgba(212, 175, 55, 0.6);
  background: rgba(0, 0, 0, 0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pin-dot.filled {
  background: #ffd700;
  border-color: #ffd700;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
  transform: scale(1.15);
}

.pin-keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 270px;
  margin: 0 auto;
  direction: ltr !important;
}

.pin-btn {
  height: 56px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.2px solid rgba(212, 175, 55, 0.28);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.pin-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: #ffd700;
  color: #ffd700;
  transform: translateY(-2px);
}

.pin-btn:active {
  background: #d4af37;
  color: #000000;
  transform: scale(0.95);
}

.pin-btn.action {
  font-family: 'Cairo', sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  color: #cbd5e1;
}

.pin-error-msg {
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 12px;
  min-height: 20px;
}

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

.pin-shake {
  animation: pin-shake 0.4s ease;
}

/* --- 6. Security Buttons & Actions --- */
.btn-security-action {
  background: linear-gradient(135deg, #fce59c 0%, #d4af37 55%, #9e7b16 100%);
  color: #0d0f17;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-security-action:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.btn-security-action:active {
  transform: scale(0.98);
}

/* --- 7. Checklist Google Sheets Sync Extensions --- */
.checklist-inspector-input {
  width: 100%;
  box-sizing: border-box;
  background: #080a0f;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 10px;
  padding: 10px 14px;
  color: #ffffff;
  font-family: 'Cairo', sans-serif;
  font-size: 0.86rem;
  margin-bottom: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.checklist-inspector-input:focus {
  border-color: #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.sync-status-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #111520;
  border: 1.5px solid #d4af37;
  color: #ffffff;
  padding: 12px 22px;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 20px rgba(212, 175, 55, 0.3);
  font-family: 'Cairo', sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999999;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.sync-status-toast.show {
  transform: translateX(-50%) translateY(0);
}

/* Manager Settings Gear / Trigger (Subtle footer trigger) */
.manager-lock-trigger {
  opacity: 0.25;
  transition: opacity 0.2s;
  cursor: pointer;
}
.manager-lock-trigger:hover {
  opacity: 1;
}
