/* ==========================================================================
   NPK SELF-SERVICE - FUTURISTIC SCI-FI AUTH DESIGN SYSTEM
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600;700&display=swap');

:root {
  --npk-bg-dark: #070a12;
  --npk-bg-card: rgba(15, 23, 42, 0.78);
  --npk-border: rgba(16, 185, 129, 0.28);
  --npk-border-hover: rgba(16, 185, 129, 0.6);
  --npk-emerald: #10b981;
  --npk-emerald-dark: #059669;
  --npk-cyan: #06b6d4;
  --npk-blue: #3b82f6;
  --npk-glow-emerald: rgba(16, 185, 129, 0.35);
  --npk-glow-cyan: rgba(6, 182, 212, 0.25);
  --npk-text-primary: #f8fafc;
  --npk-text-secondary: #94a3b8;
  --npk-text-muted: #64748b;
  --npk-font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --npk-font-mono: 'JetBrains Mono', monospace;
}

/* Base Body Styling */
body.bg-auth,
body.futuristic-auth-body {
  background-color: var(--npk-bg-dark) !important;
  font-family: var(--npk-font-sans) !important;
  color: var(--npk-text-primary) !important;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  position: relative;
}

/* Background Animated Cyber Mesh & Glowing Orbs */
.cyber-bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  background: 
    radial-gradient(circle at 15% 20%, rgba(16, 185, 129, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(6, 182, 212, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.9) 0%, #070a12 100%);
}

.cyber-grid-lines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 30%, transparent 80%);
}

/* Floating Ambient Orbs Animation */
.cyber-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.5;
  animation: orbFloat 18s ease-in-out infinite alternate;
}
.cyber-orb-1 {
  width: 350px;
  height: 350px;
  background: var(--npk-emerald);
  top: -80px;
  left: -80px;
}
.cyber-orb-2 {
  width: 400px;
  height: 400px;
  background: var(--npk-cyan);
  bottom: -100px;
  right: -100px;
  animation-delay: -9s;
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.1); }
  100% { transform: translate(-40px, 80px) scale(0.95); }
}

/* Top Neon Line */
.border-top-primary,
body.border-top-2 {
  border-top: 3px solid transparent !important;
  border-image: linear-gradient(90deg, #10b981 0%, #06b6d4 50%, #3b82f6 100%) 1 !important;
}

/* Container Structure */
.auth-wrapper {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* Glassmorphism Card Container */
.cyber-card {
  background: var(--npk-bg-card);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid var(--npk-border);
  border-radius: 20px;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.7),
    0 0 25px var(--npk-glow-emerald),
    inset 0 1px 1px rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cyber-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--npk-emerald), var(--npk-cyan), transparent);
}

.cyber-card-body {
  padding: 2.5rem;
}

@media (max-width: 576px) {
  .cyber-card-body {
    padding: 1.75rem 1.25rem;
  }
}

/* Brand Header Logo */
.auth-brand-wrapper {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

.auth-brand-logo {
  max-width: 280px;
  height: auto;
  filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.4));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.auth-brand-logo:hover {
  transform: scale(1.03);
  filter: drop-shadow(0 0 18px rgba(16, 185, 129, 0.65));
}

/* Sci-Fi HUD Badge */
.hud-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 50px;
  font-family: var(--npk-font-mono);
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--npk-emerald);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 0.75rem;
}

.hud-pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--npk-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--npk-emerald);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}

/* Headings & Text */
.auth-title {
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  color: var(--npk-text-secondary);
  font-size: 0.925rem;
  margin-bottom: 2rem;
  font-weight: 400;
}

/* Form Control Styling */
.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--npk-text-secondary);
  margin-bottom: 0.5rem;
  display: block;
  letter-spacing: 0.02em;
}

.cyber-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.cyber-input {
  width: 100%;
  background: rgba(30, 41, 59, 0.6) !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
  border-radius: 12px !important;
  padding: 0.85rem 1.15rem !important;
  font-size: 0.95rem !important;
  color: #ffffff !important;
  font-family: var(--npk-font-sans) !important;
  transition: all 0.25s ease !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.cyber-input::placeholder {
  color: #475569 !important;
}

.cyber-input:focus {
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: var(--npk-emerald) !important;
  outline: none !important;
  box-shadow: 
    0 0 0 3px rgba(16, 185, 129, 0.25),
    inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* Password Toggle Icon */
.password-toggle-btn {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--npk-text-secondary);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.2s ease;
  z-index: 5;
}

.password-toggle-btn:hover {
  color: var(--npk-emerald);
  transform: scale(1.1);
}

/* Action Button */
.btn-cyber-primary {
  width: 100%;
  background: linear-gradient(135deg, #059669 0%, #10b981 50%, #06b6d4 100%) !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 0.9rem 1.5rem !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  letter-spacing: 0.5px !important;
  cursor: pointer !important;
  position: relative !important;
  overflow: hidden !important;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
}

.btn-cyber-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.btn-cyber-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.5) !important;
}

.btn-cyber-primary:hover::before {
  left: 100%;
}

.btn-cyber-primary:active {
  transform: translateY(1px) !important;
}

/* Links */
.auth-link {
  color: var(--npk-emerald) !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  transition: color 0.2s ease, text-shadow 0.2s ease !important;
}

.auth-link:hover {
  color: var(--npk-cyan) !important;
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.5) !important;
}

/* Futuristic Split Screen Layout for Login */
.login-split-card {
  max-width: 1040px;
  width: 100%;
  display: flex;
  flex-direction: row;
}

.login-form-side {
  flex: 1;
  padding: 3rem;
}

.login-hero-side {
  flex: 1.1;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(7, 10, 18, 0.95));
  border-left: 1px solid rgba(16, 185, 129, 0.15);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

@media (max-width: 991px) {
  .login-split-card {
    flex-direction: column;
    max-width: 480px;
  }
  .login-hero-side {
    display: none;
  }
  .login-form-side {
    padding: 2.25rem 1.5rem;
  }
}

/* Sci-Fi Hero Visual Elements */
.sci-fi-ring-graphic {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.ring-outer {
  position: absolute;
  width: 220px;
  height: 220px;
  border: 2px stroke transparent;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--npk-emerald), var(--npk-cyan), transparent 60%);
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), black calc(100% - 2px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), black calc(100% - 2px));
  animation: spinRing 12s linear infinite;
}

.ring-inner {
  position: absolute;
  width: 160px;
  height: 160px;
  border: 1.5px stroke transparent;
  border-radius: 50%;
  background: conic-gradient(from 180deg, var(--npk-cyan), transparent 70%);
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), black calc(100% - 1px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), black calc(100% - 1px));
  animation: spinRing 8s linear infinite reverse;
}

@keyframes spinRing {
  to { transform: rotate(360deg); }
}

.sci-fi-hero-icon {
  font-size: 3.5rem;
  color: var(--npk-emerald);
  filter: drop-shadow(0 0 20px var(--npk-emerald));
}

.sci-fi-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
  margin-top: 1.5rem;
}

.sci-fi-feature-card {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}

.sci-fi-feature-card i {
  font-size: 1.4rem;
  color: var(--npk-cyan);
  margin-bottom: 0.5rem;
  display: block;
}

.sci-fi-feature-card span {
  font-size: 0.775rem;
  font-family: var(--npk-font-mono);
  color: var(--npk-text-secondary);
}

/* OTP Code Box Grid */
.otp-input-wrapper {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.otp-box {
  width: 52px;
  height: 60px;
  text-align: center;
  font-size: 1.5rem !important;
  font-family: var(--npk-font-mono) !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}

/* Alert Styling */
.cyber-alert {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  border-radius: 12px;
  padding: 0.85rem 1.15rem;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.cyber-alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

/* Reduced Motion Safety */
@media (prefers-reduced-motion: reduce) {
  .cyber-orb,
  .hud-pulse-dot,
  .ring-outer,
  .ring-inner {
    animation: none !important;
  }
}
