:root {
  --primary: #00659d;
  --primary-light: #36c6d6;
  --accent: #f6c23e;
  --bg-main: #f8fafc;
  --visual-dark: #002d45;
  --visual-light: #0087d1;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --white: #ffffff;

  /* Glassmorphism Tokens */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 1);
  --glass-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.2);

  --radius-lg: 3rem;
  --radius-md: 1.5rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
}

/* --- Layout Structure --- */
.ultimate-login-wrapper {
  display: flex;
  height: 100vh;
  width: 100%;
}

/* --- Visual Side (Left) --- */
.visual-side {
  position: relative;
  flex: 1.2;
  background: var(--visual-dark);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px;
  overflow: hidden;
  color: white; /* Restored to white for dark theme */
}

.mesh-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: radial-gradient(at 0% 0%, var(--visual-light) 0px, transparent 50%),
    radial-gradient(at 100% 0%, var(--primary) 0px, transparent 50%),
    radial-gradient(at 100% 100%, var(--primary-light) 0px, transparent 50%),
    radial-gradient(at 0% 100%, var(--visual-dark) 0px, transparent 50%);
  animation: meshFlow 20s ease infinite alternate;
}

@keyframes meshFlow {
  0% {
    transform: scale(1) rotate(0deg);
  }

  100% {
    transform: scale(1.1) rotate(2deg);
  }
}

.particles-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 2;
  opacity: 0.4;
}

/* Floating Glass Panes */
.glass-pane {
  position: absolute;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  z-index: 3;
  animation: floatPane 10s infinite linear alternate;
}

.pane-1 {
  width: 300px;
  height: 300px;
  top: -50px;
  left: -100px;
  transform: rotate(15deg);
}

.pane-2 {
  width: 250px;
  height: 250px;
  bottom: 10%;
  right: -50px;
  transform: rotate(-10deg);
  animation-delay: -3s;
}

.pane-3 {
  width: 150px;
  height: 150px;
  top: 40%;
  left: 30%;
  transform: rotate(45deg);
  animation-delay: -6s;
  opacity: 0.5;
}

@keyframes floatPane {
  0% {
    transform: translate(0, 0) rotate(10deg);
  }

  100% {
    transform: translate(20px, 30px) rotate(15deg);
  }
}

.visual-content {
  position: relative;
  z-index: 10;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  padding: 12px 24px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 40px;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.hero-text-container h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(40px, 5vw, 68px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 25px;
  letter-spacing: -2px;
}

.hero-text-container h1 span {
  color: var(--primary-light);
  display: block;
}

.hero-text-container p {
  font-size: 18px;
  opacity: 0.9;
  max-width: 520px;
  margin-bottom: 60px;
  font-weight: 500;
}

/* Feature Icons with Glow */
.feature-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 20px;
}

.feature-icon {
  width: 54px;
  height: 54px;
  min-width: 54px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 22px;
  color: var(--primary-light);
  box-shadow: 0 0 20px rgba(54, 198, 214, 0.2);
}

.feature-info h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.95);
}

.feature-info p {
  font-size: 13px;
  opacity: 0.7;
  margin: 0;
}

/* --- Form Side (Right) --- */
.form-side {
  flex: 1;
  background: var(--bg-main);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  position: relative;
}

/* Background Highlight for Form Side */
.form-side::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: var(--primary-light);
  filter: blur(150px);
  opacity: 0.05;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.form-scroll-container {
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 10;
}

/* Frosted Glass Card with Sophisticated Security Node Glow (Only on login area) */
.login-auth-card {
  background: var(--glass-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  padding: 60px;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(14, 165, 233, 0.5); /* Glowing border effect retained */
  position: relative;
  box-shadow: 
    0 40px 100px -20px rgba(0, 101, 157, 0.15),
    0 0 15px 2px rgba(14, 165, 233, 0.1);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  animation: card-pulse-glow 8s infinite ease-in-out;
}

@keyframes card-pulse-glow {
  0%, 100% {
    box-shadow: 
      0 40px 100px -20px rgba(0, 101, 157, 0.15),
      0 0 15px 2px rgba(14, 165, 233, 0.1);
  }
  50% {
    box-shadow: 
      0 40px 100px -20px rgba(0, 101, 157, 0.15),
      0 0 40px 12px rgba(14, 165, 233, 0.2); /* Pulsating Halo */
  }
}

.login-auth-card:hover {
  transform: translateY(-8px) scale(1.005);
  border-color: rgba(14, 165, 233, 0.8);
  box-shadow: 
    0 60px 120px -30px rgba(0, 101, 157, 0.2),
    0 0 50px 15px rgba(14, 165, 233, 0.25);
}

.form-top-logo {
  text-align: center;
  margin-bottom: 35px;
  animation: floatingLogo 4s ease-in-out infinite;
}

@keyframes floatingLogo {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.form-top-logo img {
  max-height: 65px;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
}

.form-greeting {
  margin-bottom: 38px;
}

.form-greeting h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 15px;
  color: var(--primary);
}

/* --- Integrated Input Styles (Internal Label) --- */
.modern-form-integrated {
  margin-top: 15px;
}

.elite-input-group {
  margin-bottom: 25px;
}

.modern-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.4);
  border: 2px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-md);
  padding: 0 16px;
  height: 64px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.field-prefix {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 12px;
  color: var(--text-muted);
  user-select: none;
  flex-shrink: 0;
}

.field-prefix i {
  font-size: 18px;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.internal-label {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.form-control-integrated {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  padding: 10px 0;
  height: 100%;
}

.form-control-integrated:focus {
  outline: none;
}

.modern-input-wrapper:focus-within {
  background: white;
  border-color: var(--primary-light);
  box-shadow: 0 10px 30px rgba(54, 198, 214, 0.15);
  transform: translateY(-2px);
}

.modern-input-wrapper:focus-within .field-prefix {
  color: var(--primary);
}

.modern-input-wrapper:focus-within .field-prefix i {
  transform: scale(1.1);
  opacity: 1;
}

.password-toggle-integrated {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13.65px;
  font-weight: 600;
  padding: 6px 0 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.3px;
  transition: color 0.2s ease;
  margin-top: 2px;
}

.password-toggle-integrated:hover {
  color: var(--primary);
}

/* Eye blink animation */
@keyframes eyeBlink {

  0%,
  90%,
  100% {
    transform: scaleY(1);
  }

  95% {
    transform: scaleY(0.08);
  }
}

.password-toggle-integrated .ph-eye,
.password-toggle-integrated .ph-eye-slash {
  display: inline-block;
  animation: eyeBlink 4s ease-in-out infinite;
  transform-origin: center;
}

/* --- Ultimate Button with Glow --- */
.btn-ultimate-submit {
  width: 100%;
  height: 68px;
  padding: 0 10px 0 28px;
  background: linear-gradient(135deg, var(--primary) 0%, #004a74 100%);
  color: white;
  border: none;
  border-radius: 100px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 15px 35px -5px rgba(0, 101, 157, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-ultimate-submit::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  transition: 0.5s;
}

.btn-ultimate-submit:hover::after {
  left: 100%;
}

.btn-ultimate-submit:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 25px 50px -10px rgba(0, 101, 157, 0.5);
  filter: brightness(1.1);
}

.btn-icon-box {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* --- Responsive adjustments --- */
@media (max-width: 1024px) {
  .visual-side {
    display: none;
  }

  .form-side {
    flex: 1;
    min-height: 100vh;
    background: var(--visual-dark);
    padding: 20px;
    align-items: flex-start;
  }

  .form-side::before {
    opacity: 0.1;
  }

  .login-auth-card {
    background: rgba(255, 255, 255, 0.98);
    padding: 40px 30px;
    margin-top: 20px;
    margin-bottom: 20px;
  }

  .form-greeting h2 {
    font-size: 26px;
  }
}

@media (max-width: 480px) {
  .login-auth-card {
    padding: 30px 20px;
    border-radius: 2rem;
  }
  
  .modern-input-wrapper {
    height: 56px;
  }
  
  .internal-label {
    display: none;
  }
  
  .btn-ultimate-submit {
    height: 60px;
  }
}

/* --- Security Alerts & Pulsating Effects --- */
.premium-alert {
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 25px;
  font-size: 14px;
  font-weight: 800;
  animation: alertIn 0.4s ease, alertPulseMain 2s infinite ease-in-out !important;
}

.alert-danger {
  background: #fff1f0 !important;
  color: #cf1322 !important;
  border: 1.5px solid #ffa39e !important;
  text-transform: uppercase;
  text-align: center;
}

.alert-success {
  background: #f6ffed;
  color: #389e0d;
  border: 1px solid #b7eb8f;
}

.attempts-warning {
  text-align: center;
  margin-bottom: 25px;
  font-size: 15px;
  font-weight: 800;
  color: #cf1322 !important;
  text-transform: uppercase;
  animation: textPulseElite 1.5s infinite ease-in-out !important;
}

@keyframes alertPulseMain {
  0% {
    transform: scale(1);
    box-shadow: 0 5px 15px rgba(207, 19, 34, 0.1);
  }

  50% {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(207, 19, 34, 0.3);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 5px 15px rgba(207, 19, 34, 0.1);
  }
}

@keyframes textPulseElite {
  0% {
    transform: scale(1);
    opacity: 1;
    text-shadow: 0 0 0 rgba(207, 19, 34, 0);
  }

  50% {
    transform: scale(1.05);
    opacity: 0.8;
    text-shadow: 0 0 10px rgba(207, 19, 34, 0.2);
  }

  100% {
    transform: scale(1);
    opacity: 1;
    text-shadow: 0 0 0 rgba(207, 19, 34, 0);
  }
}

@keyframes alertIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Remember Me Styles */
.remember-me-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 15px 0 20px 0;
  padding: 0 5px;
}

.remember-me-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.remember-me-checkbox input {
  display: none;
}

.remember-check-box {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  border-radius: 4px;
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.remember-me-checkbox input:checked + .remember-check-box {
  background: #00659d;
  border-color: #00659d;
}

.remember-check-box::after {
  content: '\f00c';
  font-family: 'FontAwesome';
  color: white;
  font-size: 12px;
  display: none;
}

.remember-me-checkbox input:checked + .remember-check-box::after {
  display: block;
}

.remember-me-text {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.session-timeout-info {
  color: #94a3b8;
  font-size: 14px;
  cursor: help;
  transition: color 0.2s;
}

.session-timeout-info:hover {
  color: #00659d;
}
