/**
 * Premium Authentication Styles (Pro Max Edition)
 * Modern, Dynamic, and Enterprise-Ready
 */

:root {
  --primary-50: #f0f1ff;
  --primary-100: #e5e6ff;
  --primary-200: #cfd1ff;
  --primary-300: #a7abff;
  --primary-400: #7d80ff;
  --primary-500: #6c72ff;
  --primary-600: #5356ff;
  --primary-700: #4647f0;
  --primary-800: #3a3bc4;
  --primary-900: #33349d;
  --secondary: #080f25;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Outfit", sans-serif;
  overflow-x: hidden;
}

/* --- MESH BACKGROUND (Fixed Layer for backdrop-filter stability) --- */
.bg-mesh-fixed {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -20;
  pointer-events: none;
  background-color: #f8fafc;
  background-image:
    radial-gradient(at 0% 0%, rgba(108, 114, 255, 0.08) 0%, transparent 50%),
    radial-gradient(at 100% 0%, rgba(87, 195, 255, 0.08) 0%, transparent 50%),
    radial-gradient(at 100% 100%, rgba(108, 114, 255, 0.05) 0%, transparent 50%),
    radial-gradient(at 0% 100%, rgba(87, 195, 255, 0.05) 0%, transparent 50%);
}

.dark .bg-mesh-fixed {
  background-color: #09090b;
  background-image:
    radial-gradient(at 0% 0%, rgba(108, 114, 255, 0.05) 0%, transparent 50%),
    radial-gradient(at 100% 0%, rgba(87, 195, 255, 0.03) 0%, transparent 50%),
    radial-gradient(at 100% 100%, rgba(108, 114, 255, 0.02) 0%, transparent 50%);
}

.bg-auth {
  background-color: transparent !important;
  background-image: none !important;
}

/* --- BILATERAL LAYOUT --- */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  overflow: hidden;
}

.auth-side-branding {
  display: none;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  background: linear-gradient(135deg, var(--secondary) 0%, #0c1435 100%);
  position: relative;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .auth-side-branding {
    display: flex;
    width: 45%;
  }
  .auth-side-form {
    width: 55%;
  }
}

.auth-side-branding::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgba(108, 114, 255, 0.15) 0%,
    transparent 70%
  );
  filter: blur(80px);
  animation: pulseGlow 10s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: -1;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.auth-side-form {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  z-index: 10;
}

/* --- GLASS PANEL 2.0 --- */
.glass-panel {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow:
    0 20px 40px -10px rgba(0, 0, 0, 0.05),
    0 0 0 1px rgba(0, 0, 0, 0.02);
  border-radius: 2rem;
}

.dark .glass-panel {
  background: rgba(24, 24, 27, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
}

/* --- INPUTS PREMIUM --- */
.input-premium {
  width: 100%;
  padding: 1rem 1.5rem;
  background-color: rgba(255, 255, 255, 0.5);
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  outline: 2px solid transparent;
  outline-offset: 2px;
  font-weight: 600;
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.dark .input-premium {
  background-color: rgba(24, 24, 27, 0.3);
  border-color: #27272a;
  color: #e2e8f0;
}

.input-premium:focus {
  box-shadow: 0 0 0 4px rgba(108, 114, 255, 0.1);
  border-color: var(--primary-500);
}

/* --- ANIMATIONS --- */
@keyframes pulseGlow {
  from {
    transform: scale(1) translate(0, 0);
    opacity: 0.5;
  }
  to {
    transform: scale(1.2) translate(10%, 10%);
    opacity: 0.8;
  }
}

.animate-fade-in-up {
  will-change: transform, opacity;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  backface-visibility: hidden;
}

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

/* --- DROPDOWN CUSTOM --- */
.dropdown-container {
  position: relative;
}

.dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border-radius: 1.5rem;
  margin-top: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  z-index: 100;
  max-height: 250px;
  overflow-y: auto;
  display: none;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.dark .dropdown-list {
  background: rgba(39, 39, 42, 0.95);
  border-color: rgba(255, 255, 255, 0.05);
}

.dropdown-list.show {
  display: block;
  animation: dropdownSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s;
  color: #475569;
}

.dark .dropdown-item {
  color: #a1a1aa;
}

.dropdown-item:hover {
  background: var(--primary-50);
  color: var(--primary-600);
  padding-left: 1.5rem;
}

.dark .dropdown-item:hover {
  background: rgba(108, 114, 255, 0.1);
  color: var(--primary-400);
}

/* --- ALERT CUSTOM --- */
#custom-alert {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(-250%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 2rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 320px;
  max-width: 90vw;
}

.dark #custom-alert {
  background: rgba(24, 24, 27, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

#custom-alert.show {
  transform: translateX(-50%) translateY(0);
}

.custom-alert-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

#custom-alert-content {
    display: flex;
    flex-direction: column;
}

#custom-alert-title {
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}

#alert-message {
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
}

.dark #alert-message {
    color: #94a3b8;
}

/* Status Variants */
#custom-alert.alert-success .custom-alert-icon {
    background: #ecfdf5;
    color: #10b981;
}
.dark #custom-alert.alert-success .custom-alert-icon { background: rgba(16, 185, 129, 0.2); }
#custom-alert.alert-success #custom-alert-title { color: #10b981; }

#custom-alert.alert-error .custom-alert-icon {
    background: #fef2f2;
    color: #ef4444;
}
.dark #custom-alert.alert-error .custom-alert-icon { background: rgba(239, 68, 68, 0.2); }
#custom-alert.alert-error #custom-alert-title { color: #ef4444; }

#custom-alert.alert-warning .custom-alert-icon {
    background: #fffbeb;
    color: #f59e0b;
}
.dark #custom-alert.alert-warning .custom-alert-icon { background: rgba(245, 158, 11, 0.2); }
#custom-alert.alert-warning #custom-alert-title { color: #f59e0b; }

/* --- CHECKBOX PREMIUM --- */
.checkbox-premium {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  background: white;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.dark .checkbox-premium {
  border-color: #27272a;
  background: #18181b;
}

.checkbox-premium:checked {
  background: var(--primary-500);
  border-color: var(--primary-500);
}

.checkbox-premium:checked::after {
  content: "\EB81"; /* mgc_check_line if using iconic fonts, or just a CSS check */
  font-family: "MingCute";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.75rem;
}
