/* ============================================================
   PREMIUM ADMIN LOGIN GATE STYLES (admin-login-system.css)
   ============================================================ */

/* Full Screen Container */
.admin-login-gate {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #0b0e14 0%, #050608 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  font-family: 'Inter', 'Outfit', sans-serif;
  overflow: hidden;
  box-sizing: border-box;
}

/* Background Glowing Orbs */
.login-bg-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 1;
}
.orb-indigo {
  width: 500px;
  height: 500px;
  background: #6366f1;
  top: -10%;
  left: -10%;
  animation: floatOrb1 25s infinite alternate ease-in-out;
}
.orb-purple {
  width: 600px;
  height: 600px;
  background: #a855f7;
  bottom: -15%;
  right: -10%;
  animation: floatOrb2 30s infinite alternate ease-in-out;
}
.orb-cyan {
  width: 400px;
  height: 400px;
  background: #06b6d4;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.08;
}

@keyframes floatOrb1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(80px, 50px) scale(1.1); }
}
@keyframes floatOrb2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-100px, -60px) scale(1.05); }
}

/* Glass Card Box */
.login-card-wrapper {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 16px;
  z-index: 5;
  box-sizing: border-box;
}

.login-card {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(30px) saturate(190%);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 
    0 4px 30px rgba(0, 0, 0, 0.3),
    0 24px 64px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

/* Card Entrance Animation */
@keyframes cardEntrance {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}
.login-card-wrapper {
  animation: cardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Shake Animation (Error Feedback) */
@keyframes cardShake {
  0%, 100% { transform: translateX(0); }
  15%, 45%, 75% { transform: translateX(-8px); }
  30%, 60%, 90% { transform: translateX(8px); }
}
.login-shake {
  animation: cardShake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  border-color: rgba(239, 68, 68, 0.35) !important;
  box-shadow: 
    0 0 40px rgba(239, 68, 68, 0.15),
    0 24px 64px rgba(0, 0, 0, 0.5) !important;
}

/* Header UI Elements */
.login-header-logo {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.15);
}
.login-header-logo svg {
  width: 32px;
  height: 32px;
  color: #818cf8;
}

.login-title {
  margin: 0 0 8px 0;
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
  font-family: 'Outfit', sans-serif;
}
.login-title span {
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-subtitle {
  margin: 0 0 32px 0;
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.5;
}

/* Custom Styled Error Alerts */
.login-error-container {
  display: none;
  align-items: center;
  gap: 10px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 24px;
  color: #fca5a5;
  font-size: 0.85rem;
  text-align: left;
  line-height: 1.4;
  animation: fadeInAlert 0.3s ease;
}
@keyframes fadeInAlert {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.login-error-container svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: #f87171;
}

/* Form Groups & Glass Inputs */
.login-form-group {
  margin-bottom: 20px;
  text-align: left;
}
.login-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.login-input-container {
  position: relative;
  display: flex;
  align-items: center;
}
.login-input-icon {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  color: #64748b;
  pointer-events: none;
  transition: color 0.3s;
}

.login-input {
  width: 100%;
  height: 48px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 0 16px 0 46px;
  color: #ffffff;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}
.login-input::placeholder {
  color: #475569;
}
.login-input:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
}
.login-input:focus {
  outline: none;
  border-color: #6366f1;
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.25);
}
.login-input-container:focus-within .login-input-icon {
  color: #818cf8;
}

/* Show/Hide Password Eye Button */
.login-password-toggle {
  position: absolute;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.login-password-toggle:hover {
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
}
.login-password-toggle svg {
  width: 18px;
  height: 18px;
}

/* Remember Me Options */
.login-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 30px 0;
  font-size: 0.85rem;
}

.login-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
}
.login-checkbox {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: all 0.2s;
}
.login-checkbox:checked {
  background: #6366f1;
  border-color: #6366f1;
}
.login-checkbox::before {
  content: "";
  width: 8px;
  height: 6px;
  clip-path: polygon(14% 44%, 0 58%, 38% 95%, 100% 16%, 83% 0%, 38% 68%);
  background-color: white;
  transform: scale(0);
  transition: 120ms transform ease-in-out;
}
.login-checkbox:checked::before {
  transform: scale(1);
}

.login-forgot-link {
  color: #818cf8;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.login-forgot-link:hover {
  color: #a5b4fc;
}

/* Submit Button & Animations */
.login-btn-submit {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.login-btn-submit:hover {
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.login-btn-submit:active {
  transform: translateY(1px) scale(0.98);
}
.login-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Button Loading Spinner */
.login-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s infinite linear;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Footer Panel */
.login-footer {
  margin-top: 32px;
  font-size: 0.75rem;
  color: #64748b;
  letter-spacing: 0.02em;
}
.login-footer-link {
  color: #94a3b8;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.login-footer-link:hover {
  color: #cbd5e1;
}

/* Exit/Success fade out overlay */
.login-gate-fadeout {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Responsive Overrides */
@media (max-width: 480px) {
  .login-card {
    padding: 30px 24px;
    border-radius: 20px;
  }
  .login-title {
    font-size: 1.5rem;
  }
}

/* Theme Toggle Button Style */
.login-theme-toggle {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #f8fafc;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 100;
}
.login-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

/* Light Theme Variables & Styles */
html[data-theme="light"] .admin-login-gate {
  background: radial-gradient(circle at center, #f8fafc 0%, #e2e8f0 100%) !important;
}
html[data-theme="light"] .login-bg-glow-orb {
  opacity: 0.08;
}
html[data-theme="light"] .login-theme-toggle {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(99, 102, 241, 0.15);
  color: #1e293b;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.05);
}
html[data-theme="light"] .login-theme-toggle:hover {
  background: rgba(99, 102, 241, 0.05);
  border-color: rgba(99, 102, 241, 0.3);
}
html[data-theme="light"] .login-card {
  background: rgba(255, 255, 255, 0.5) !important;
  border: 1px solid rgba(99, 102, 241, 0.12) !important;
  box-shadow: 
    0 4px 30px rgba(99, 102, 241, 0.04),
    0 24px 64px rgba(99, 102, 241, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.7) !important;
}
html[data-theme="light"] .login-title {
  color: #0f172a !important;
}
html[data-theme="light"] .login-subtitle {
  color: #475569 !important;
}
html[data-theme="light"] .login-label {
  color: #475569 !important;
}
html[data-theme="light"] .login-input {
  background: rgba(255, 255, 255, 0.6) !important;
  border-color: rgba(99, 102, 241, 0.15) !important;
  color: #1e293b !important;
}
html[data-theme="light"] .login-input::placeholder {
  color: #94a3b8 !important;
}
html[data-theme="light"] .login-input:hover {
  border-color: rgba(99, 102, 241, 0.25) !important;
  background: rgba(255, 255, 255, 0.8) !important;
}
html[data-theme="light"] .login-input:focus {
  border-color: #6366f1 !important;
  background: #ffffff !important;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.15) !important;
}
html[data-theme="light"] .login-checkbox-label {
  color: #475569 !important;
}
html[data-theme="light"] .login-checkbox {
  border-color: rgba(99, 102, 241, 0.25) !important;
  background: rgba(255, 255, 255, 0.5) !important;
}
html[data-theme="light"] .login-checkbox:checked {
  background: #6366f1 !important;
  border-color: #6366f1 !important;
}
html[data-theme="light"] .login-forgot-link {
  color: #4f46e5 !important;
}
html[data-theme="light"] .login-forgot-link:hover {
  color: #6366f1 !important;
}
html[data-theme="light"] .login-footer {
  color: #94a3b8 !important;
}
html[data-theme="light"] .login-footer-link {
  color: #64748b !important;
}
html[data-theme="light"] .login-footer-link:hover {
  color: #475569 !important;
}
html[data-theme="light"] .login-error-container {
  background: rgba(239, 68, 68, 0.05) !important;
  border-color: rgba(239, 68, 68, 0.15) !important;
  color: #b91c1c !important;
}
html[data-theme="light"] .login-error-container svg {
  color: #ef4444 !important;
}
