﻿/* Click ERP Cinematic Aesthetic Preloader */
#click-erp-preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(circle at 50% 40%, #0A345B 0%, #071C2F 65%, #001224 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', 'Cairo', sans-serif;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.7s;
  overflow: hidden;
}

#click-erp-preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Background Cyber Matrix Grid */
.loader-grid-bg {
  position: absolute;
  inset: -100px;
  background-image: 
    linear-gradient(rgba(0, 110, 242, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 110, 242, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 50%, black 30%, transparent 75%);
  pointer-events: none;
  animation: gridFloat 20s linear infinite;
}

@keyframes gridFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(40px); }
}

/* Glowing Rotating Tech Rings */
.loader-logo-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  border: 2px dashed rgba(0, 110, 242, 0.5);
  animation: ringSpin 10s linear infinite;
}

.loader-ring-gold {
  position: absolute;
  inset: -8px;
  border-radius: 34px;
  border: 1.5px solid rgba(240, 192, 68, 0.35);
  animation: ringSpinRev 14s linear infinite;
}

@keyframes ringSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes ringSpinRev {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

.loader-badge-core {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background: linear-gradient(135deg, #001F3C 0%, #0057C2 50%, #006EF2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 35px rgba(0, 110, 242, 0.5), inset 0 0 15px rgba(255, 255, 255, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}

/* Main Typewriter Typography */
.loader-typewriter-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-bottom: 8px;
}

.loader-typewriter-text {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(90deg, #FFFFFF 0%, #A7C9F8 50%, #F0C044 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 25px rgba(0, 110, 242, 0.4);
}

.loader-cursor {
  display: inline-block;
  width: 3px;
  height: 28px;
  background: #F0C044;
  margin-left: 6px;
  border-radius: 2px;
  box-shadow: 0 0 10px #F0C044;
  animation: cursorBlink 0.7s infinite ease-in-out;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Diagnostic Subtitle */
.loader-diagnostic {
  font-size: 13px;
  color: #7C9DCA;
  font-family: 'Courier New', Courier, monospace;
  letter-spacing: 0.5px;
  margin-bottom: 22px;
  min-height: 20px;
  text-align: center;
}

/* Progress Container */
.loader-progress-container {
  width: 280px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.loader-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0057C2 0%, #006EF2 60%, #F0C044 100%);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(0, 110, 242, 0.8);
  transition: width 0.15s ease-out;
}

.loader-percent-badge {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #F0C044;
  letter-spacing: 1px;
}

/* Skip Button */
.loader-skip-btn {
  margin-top: 32px;
  padding: 6px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #A7C9F8;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
}

.loader-skip-btn:hover {
  background: rgba(0, 110, 242, 0.2);
  border-color: #006EF2;
  color: #ffffff;
}
