.blk-mission-wrap {
  background: radial-gradient(circle at 50% 20%, #0d1e38 0%, #030816 60%, #01040a 100%) !important;
  color: #fff;
  padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)) !important;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.blk-mission-wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    linear-gradient(rgba(56, 189, 248, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.04) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}

.mission-container {
  width: 100%;
  max-width: min(620px, 100%);
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  text-align: center;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

/* Header */
.mission-header {
  margin-bottom: 20px;
}

.classified-stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.2);
  border: 1.5px solid #ef4444;
  color: #f87171;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 3px;
  padding: 5px 16px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-family: 'Courier New', Courier, monospace;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.mission-title {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 8px 0;
  letter-spacing: 1px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.mission-agents {
  font-size: 0.9rem;
  color: #94a3b8;
  margin: 0 0 20px 0;
}

.mission-agents strong {
  color: #38bdf8;
}

/* Typewriter Briefing Terminal Box */
.typewriter-briefing-box {
  background: rgba(2, 6, 23, 0.95);
  border: 1.5px solid #1e293b;
  border-radius: 14px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.1);
  overflow: hidden;
  text-align: left;
}

.terminal-bar {
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.term-dot.red { background: #ef4444; }
.term-dot.yellow { background: #f59e0b; }
.term-dot.green { background: #10b981; }

.term-title {
  font-family: monospace;
  font-size: 0.72rem;
  color: #64748b;
  margin-left: 8px;
  font-weight: 700;
  letter-spacing: 1px;
}

.typewriter-content {
  padding: 16px 20px;
  position: relative;
  min-height: 85px;
}

.typewriter-content p {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #38bdf8;
  margin: 0;
  display: inline;
}

.typewriter-cursor {
  color: #38bdf8;
  animation: curBlink 0.8s infinite;
}

@keyframes curBlink {
  50% { opacity: 0; }
}

/* Security Lock Box */
.keypad-lock-box {
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid #0284c7;
  border-radius: 24px;
  padding: 28px 24px;
  box-shadow: 0 0 40px rgba(2, 132, 199, 0.3);
  backdrop-filter: blur(16px);
}

.lock-icon-box {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(2, 132, 199, 0.15);
  border: 2px solid #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #38bdf8;
  margin: 0 auto 16px;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.4);
}

.lock-prompt {
  font-size: 0.95rem;
  color: #e2e8f0;
  margin: 0 0 6px 0;
}

.lock-hint {
  font-size: 0.82rem;
  color: #38bdf8;
  margin-bottom: 20px;
  font-style: italic;
}

/* Keypad Screen */
.keypad-screen {
  background: #020617;
  border: 2px solid #1e293b;
  border-radius: 14px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.9);
  position: relative;
}

.keypad-screen.shake {
  animation: shakeScreen 0.35s ease;
  border-color: #ef4444;
}

@keyframes shakeScreen {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.keypad-cursor {
  font-family: monospace;
  font-size: 1.6rem;
  color: #38bdf8;
  animation: curBlink 1s infinite;
}

.keypad-digits {
  font-family: monospace;
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: 8px;
  color: #38bdf8;
}

.btn-toggle-mask {
  position: absolute;
  right: 14px;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 1.1rem;
  cursor: pointer;
}

.btn-toggle-mask:hover { color: #38bdf8; }

.keypad-feedback {
  font-size: 0.82rem;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 20px;
  min-height: 20px;
}

.keypad-feedback.error {
  color: #f87171;
}

.keypad-feedback.success {
  color: #34d399;
}

/* 12-Key Grid */
.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 280px;
  margin: 0 auto 24px;
  width: 100%;
  box-sizing: border-box;
}

.kp-btn {
  background: #1e293b;
  border: 1.5px solid #334155;
  border-radius: 14px;
  min-height: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.15s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.kp-btn:hover {
  background: #334155;
  border-color: #38bdf8;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(56, 189, 248, 0.3);
}

.kp-btn:active {
  transform: translateY(1px);
  background: #0284c7;
}

.kp-clear {
  background: #7f1d1d !important;
  border-color: #b91c1c !important;
  color: #fca5a5 !important;
}

.kp-enter {
  background: #065f46 !important;
  border-color: #059669 !important;
  color: #6ee7b7 !important;
}

/* Biometric Fingerprint Section */
.biometric-scan-wrapper {
  margin-top: 10px;
}

.biometric-divider {
  position: relative;
  text-align: center;
  margin-bottom: 16px;
}

.biometric-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.biometric-divider span {
  position: relative;
  background: #0f172a;
  padding: 0 12px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 1.5px;
}

.fingerprint-scan-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #020617;
  border: 2.5px solid #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  user-select: none;
  box-shadow: 0 0 20px rgba(2, 132, 199, 0.3);
  transition: transform 0.2s;
}

.fingerprint-scan-btn:hover {
  transform: scale(1.05);
}

.fingerprint-icon {
  font-size: 2.4rem;
  color: #38bdf8;
  transition: color 0.3s;
}

.laser-scanner-line {
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  background: #34d399;
  box-shadow: 0 0 10px #34d399, 0 0 20px #34d399;
  top: 0;
  opacity: 0;
}

.laser-scanner-line.active {
  opacity: 1;
  animation: laserScan 1.2s infinite alternate ease-in-out;
}

@keyframes laserScan {
  0% { top: 5%; }
  100% { top: 90%; }
}

.fingerprint-scan-btn.scanning {
  border-color: #34d399;
  box-shadow: 0 0 30px rgba(52, 211, 153, 0.6);
}

.fingerprint-scan-btn.scanning .fingerprint-icon {
  color: #34d399;
}

.fingerprint-scan-btn.granted {
  border-color: #34d399;
  background: rgba(52, 211, 153, 0.15);
}

.fingerprint-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

/* Dossier Box */
.mission-dossier-box {
  background: rgba(15, 23, 42, 0.95);
  border: 2px solid #38bdf8;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 0 45px rgba(56, 189, 248, 0.35);
  text-align: left;
  animation: dFadeIn 0.4s ease;
}

@keyframes dFadeIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.dossier-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.dossier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #38bdf8;
  color: #38bdf8;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 5px 14px;
  border-radius: 6px;
}

.dossier-stamp-red {
  border: 2px solid #ef4444;
  color: #ef4444;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 4px 10px;
  border-radius: 4px;
  transform: rotate(-5deg);
}

.dossier-title {
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  margin: 0 0 8px 0;
}

.dossier-intro {
  font-size: 0.92rem;
  color: #cbd5e1;
  margin: 0 0 22px 0;
  line-height: 1.45;
}

/* Date Form */
.mission-date-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 480px) {
  .form-row-2 { grid-template-columns: 1fr; }
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 6px;
}

.mission-input {
  width: 100%;
  padding: 12px 16px;
  background: #020617;
  border: 1.5px solid #334155;
  border-radius: 12px;
  color: #fff;
  font-size: 0.95rem;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.mission-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.btn-accept-mission {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 16px 24px;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(2, 132, 199, 0.45);
  margin-top: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-accept-mission:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 35px rgba(2, 132, 199, 0.6);
}

/* ==========================================================================
   CYBER VIP AGENT PASS RESULT CARD
   ========================================================================== */
.mission-pass-wrapper {
  text-align: center;
}

.cyber-agent-card {
  background: radial-gradient(circle at top left, #051329 0%, #020817 60%, #000208 100%);
  border: 2px solid #38bdf8;
  border-radius: 20px;
  padding: 8px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(56, 189, 248, 0.35);
  position: relative;
  text-align: left;
  max-width: 580px;
  margin: 0 auto;
  overflow: hidden;
}

.card-inner-frame {
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  border-radius: 14px;
  padding: 22px 20px;
  position: relative;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.04) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.card-agency-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid #38bdf8;
  color: #38bdf8;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 5px 12px;
  border-radius: 6px;
}

.card-seal-stamp {
  border: 1.5px solid #ef4444;
  color: #ef4444;
  font-weight: 900;
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 4px;
  transform: rotate(5deg);
  letter-spacing: 1px;
}

.card-agents-title {
  font-size: clamp(1.3rem, 3.5vw, 1.7rem);
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 4px 0;
  letter-spacing: 1px;
}

.card-mission-codename {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #64748b;
  margin-bottom: 16px;
}

.card-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 480px) {
  .card-info-grid { grid-template-columns: 1fr; }
}

.info-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
}

.info-cell.full {
  grid-column: 1 / -1;
}

.info-lbl {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.info-val {
  font-size: 0.98rem;
  font-weight: 800;
  color: #ffffff;
}

.info-note {
  font-size: 0.88rem;
  font-style: italic;
  color: #93c5fd;
  line-height: 1.3;
}

.card-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed rgba(56, 189, 248, 0.35);
  padding-top: 12px;
}

.agent-barcode {
  text-align: left;
}

.barcode-font {
  font-family: monospace;
  font-size: 1.1rem;
  letter-spacing: -2px;
  color: #38bdf8;
  font-weight: 900;
  opacity: 0.85;
}

.barcode-serial {
  font-size: 0.65rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 1px;
}

.agent-clearance-seal {
  text-align: right;
}

.agent-clearance-seal span {
  display: block;
  font-size: 0.6rem;
  color: #64748b;
  letter-spacing: 1px;
}

.agent-clearance-seal strong {
  font-size: 0.74rem;
  color: #38bdf8;
  font-weight: 900;
}

/* Action Buttons */
.pass-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-pass-act {
  padding: 12px 20px;
  border-radius: 25px;
  font-weight: 800;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-download-cyber {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
}

.btn-whatsapp-cyber {
  background: #25d366;
  color: #fff;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
}

.btn-pass-act.ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn-pass-act:hover {
  transform: translateY(-2px);
}

/* ==========================================================================
   MOBILE RESPONSIVENESS & SAFE AREA
   ========================================================================== */
@media (max-width: 640px) {
  .keypad-lock-box {
    padding: 22px 16px;
    border-radius: 20px;
    width: 100%;
    box-sizing: border-box;
  }

  .keypad-screen {
    padding: 12px 16px;
  }

  .keypad-digits {
    font-size: 1.6rem;
    letter-spacing: 6px;
  }

  .typewriter-briefing-box {
    padding: 16px 14px;
    font-size: 0.86rem;
    border-radius: 12px;
  }

  .cyber-agent-card {
    padding: 4px;
    border-radius: 18px;
    width: 100%;
    box-sizing: border-box;
  }

  .card-inner-frame {
    padding: 16px 14px;
    border-radius: 14px;
  }

  .card-info-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .pass-actions-row {
    flex-direction: column;
    width: 100%;
  }

  .btn-pass-act {
    width: 100%;
    min-height: 48px;
    justify-content: center;
    box-sizing: border-box;
  }

  .btn-mission-primary, .btn-scan-trigger {
    min-height: 48px;
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
}

@media (max-width: 380px) {
  .keypad-grid {
    max-width: 250px;
    gap: 8px;
  }
  .kp-btn {
    min-height: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
}
