/* ==============================================
   EPIC PERFEX CRM ADMIN LOGIN THEME
   Inspired by glassmorphism, animated gradients & dark elegance
   Compatible with PolyUtilities & Multi Theme modules [[1]][[2]][[7]]
   ============================================== */

/* Global Reset & Variables */
:root {
  --primary: #6a11cb;
  --secondary: #2575fc;
  --accent: #00c9ff;
  --glass-bg: rgba(20, 20, 35, 0.75);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-light: #f0f4ff;
  --text-muted: #a0a7c2;
  --success: #00e676;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Full Background with Dynamic Overlay */
body.login_admin {
  background: 
    linear-gradient(125deg, rgba(10, 5, 25, 0.92), rgba(5, 10, 30, 0.95)),
    url('https://crm.kaboglobal.co.za/media/strategic-management.jpeg') center/cover fixed no-repeat !important;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Segoe UI', 'Inter', sans-serif;
  overflow: hidden;
  position: relative;
}

/* Animated gradient orb in background */
body.login_admin::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary), transparent 70%);
  border-radius: 50%;
  top: -200px;
  right: -200px;
  opacity: 0.15;
  z-index: -1;
  animation: pulse 12s infinite alternate;
}

body.login_admin::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  border-radius: 50%;
  bottom: -150px;
  left: -150px;
  opacity: 0.1;
  z-index: -1;
  animation: pulse 15s infinite alternate-reverse;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.1; }
  100% { transform: scale(1.3); opacity: 0.25; }
}

/* Login Container – Glassmorphism Card */
.login_wrapper {
  width: 95%;
  max-width: 480px;
  padding: 40px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  transition: var(--transition);
}

.login_wrapper:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* Glowing border on focus */
.login_wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 24px;
  padding: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent), var(--primary));
  background-size: 300% 300%;
  z-index: -1;
  animation: gradient-border 8s ease infinite;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: destination-out;
  mask-composite: subtract;
}

@keyframes gradient-border {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Logo & Branding */
.login_logo {
  text-align: center;
  margin-bottom: 30px;
}

.login_logo img {
  max-height: 70px;
  filter: drop-shadow(0 4px 12px rgba(37, 117, 252, 0.4));
  transition: var(--transition);
}

.login_logo img:hover {
  transform: scale(1.05);
}

/* Form Inputs – Elegant & Animated */
.form-group {
  margin-bottom: 24px;
  position: relative;
}

.form-control {
  width: 100%;
  padding: 16px 20px;
  background: rgba(15, 15, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: var(--text-light);
  font-size: 16px;
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(37, 117, 252, 0.3);
  background: rgba(20, 20, 40, 0.8);
}

.form-control::placeholder {
  color: var(--text-muted);
}

/* Login Button – Gradient & Shine */
.btn-login {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-weight: 600;
  font-size: 17px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 6px 20px rgba(37, 117, 252, 0.4);
}

.btn-login::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: 0.6s;
}

.btn-login:hover::before {
  left: 100%;
}

.btn-login:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(37, 117, 252, 0.6);
}

.btn-login:active {
  transform: translateY(0);
}

/* Footer & Links */
.login-footer {
  text-align: center;
  margin-top: 25px;
  color: var(--text-muted);
  font-size: 14px;
}

.login-footer a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

.login-footer a:hover {
  color: var(--secondary);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 576px) {
  .login_wrapper {
    padding: 30px 20px;
    margin: 15px;
  }
  
  .form-control {
    padding: 14px 16px;
  }
  
  .btn-login {
    padding: 14px;
  }
}