/* Eleska Mail - Premium Login Overhaul Stylesheet */

:root {
  --login-card-bg-light: rgba(255, 255, 255, 0.85);
  --login-card-bg-dark: rgba(15, 23, 42, 0.7);
  --login-border-light: rgba(226, 232, 240, 0.8);
  --login-border-dark: rgba(30, 41, 59, 0.6);
  --login-glow-color: rgba(0, 120, 212, 0.15);
}

/* Page Reset for Full Screen Experience */
body.login-body {
  margin: 0;
  padding: 0;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
  font-family: var(--font-family);
  background-color: var(--bg-base);
  transition: background-color var(--transition-normal);
}

/* Two Column Split Container */
.login-split-container {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* LEFT SIDE: Visual Panel */
.login-feature-side {
  flex: 1.1;
  background: linear-gradient(135deg, #090d16 0%, #101f30 50%, #0b3c5d 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3.5rem;
  overflow: hidden;
  color: #ffffff;
}

/* Glowing Decorative Blobs */
.login-feature-side::before,
.login-feature-side::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 1;
  opacity: 0.45;
  pointer-events: none;
  animation: float-blobs 20s infinite alternate ease-in-out;
}

.login-feature-side::before {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #0078d4 0%, rgba(0, 120, 212, 0) 70%);
  top: -50px;
  left: -50px;
}

.login-feature-side::after {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #005a9e 0%, rgba(0, 90, 158, 0) 70%);
  bottom: -100px;
  right: -50px;
  animation-delay: -5s;
}

@keyframes float-blobs {
  0% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(30px) scale(1.1) translateX(20px);
  }

  100% {
    transform: translateY(-20px) scale(0.9) translateX(-10px);
  }
}

.login-feature-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.feature-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.feature-logo-icon {
  background: linear-gradient(135deg, #0078d4, #005a9e);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.5rem;
  box-shadow: 0 8px 20px rgba(0, 120, 212, 0.4);
}

.feature-brand-name {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.feature-hero {
  margin-top: auto;
  margin-bottom: auto;
  max-width: 500px;
  animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -1px;
  background: linear-gradient(to right, #ffffff 40%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.feature-hero p {
  font-size: 1.05rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

/* Feature List Cards */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.feature-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 1.15rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  backdrop-filter: blur(8px);
  transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.feature-icon-box {
  background: rgba(0, 120, 212, 0.15);
  color: #60a5fa;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
  border: 1px solid rgba(96, 165, 250, 0.15);
}

.feature-item-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  color: #f8fafc;
}

.feature-item-text p {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
}

.feature-footer {
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* RIGHT SIDE: Form Panel */
.login-form-side {
  flex: 0.9;
  background-color: var(--bg-base);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 2.5rem;
  transition: background-color var(--transition-normal);
}

/* Floating Switcher */
.theme-switch-floating {
  position: absolute;
  top: 2rem;
  right: 2rem;
  z-index: 10;
}

.btn-theme-toggle {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.btn-theme-toggle:hover {
  background-color: var(--hover-bg);
  color: var(--text-main);
  transform: scale(1.05);
}

.btn-theme-toggle svg {
  width: 20px;
  height: 20px;
  transition: transform 0.5s ease;
}

.btn-theme-toggle:hover svg {
  transform: rotate(20deg);
}

/* Card Container */
.login-card-container {
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 2;
}

.login-card {
  background-color: var(--login-card-bg-light);
  border: 1px solid var(--login-border-light);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.02);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background-color var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal), transform 0.1s ease;
}

/* Dark mode adjustment for card */
html[data-theme="dark"] .login-card {
  background-color: var(--login-card-bg-dark);
  border: 1px solid var(--login-border-dark);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.03);
}

/* Brand styling inside card (shown on mobile or when screen is small) */
.mobile-brand-header {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.mobile-logo-icon {
  background: linear-gradient(135deg, #0078d4, #005a9e);
  color: white;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

.mobile-brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

/* Card Header content */
.login-header-group {
  margin-bottom: 2.25rem;
}

.login-title-h {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}

.login-subtitle-p {
  font-size: 0.925rem;
  color: var(--text-muted);
}

/* Custom Interactive Fields */
.form-group-custom {
  position: relative;
  margin-bottom: 1.75rem;
}

.form-label-custom {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  transition: color var(--transition-fast);
}

.input-container-interactive {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-icon-left-side {
  position: absolute;
  left: 1.15rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-icon-left-side svg {
  width: 18px;
  height: 18px;
}

.input-field-custom {
  width: 100%;
  padding: 0.95rem 1.25rem 0.95rem 2.85rem;
  font-size: 0.95rem;
  color: var(--text-main);
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

#login-password {
  padding-right: 2.75rem !important;
}

/* Focus and active styles */
.input-field-custom:focus {
  border-color: #0078d4;
  box-shadow: 0 0 0 4px var(--login-glow-color);
  background-color: var(--bg-surface);
}

.form-group-custom:focus-within .form-label-custom {
  color: #0078d4;
}

.form-group-custom:focus-within .input-icon-left-side {
  color: #0078d4;
}

/* Password Toggle styling */
.btn-password-toggle {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.btn-password-toggle:hover {
  color: var(--text-main);
  background-color: var(--hover-bg);
}

.btn-password-toggle svg {
  width: 18px;
  height: 18px;
}

/* Security Server status badge */
.login-status-badge {
  background-color: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

html[data-theme="dark"] .login-status-badge {
  background-color: rgba(16, 185, 129, 0.03);
  border-color: rgba(16, 185, 129, 0.1);
}

.login-status-badge svg {
  color: #10b981;
  flex-shrink: 0;
  margin-top: 1px;
}

.login-status-badge p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* Custom Submit button */
.btn-login-premium {
  background: linear-gradient(135deg, #0078d4 0%, #005a9e 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  padding: 0.95rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 120, 212, 0.3);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-login-premium:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 120, 212, 0.4);
  color: #ffffff;
}

.btn-login-premium:active {
  transform: translateY(1px);
}

.btn-login-premium:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Shake Animation for Validation Errors */
.shake-element {
  animation: shake-anim 0.4s ease-in-out;
}

@keyframes shake-anim {

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

  20%,
  60% {
    transform: translateX(-8px);
  }

  40%,
  80% {
    transform: translateX(8px);
  }
}

/* Fade in up helper */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

/* Alerts custom spacing & border radius */
.login-card .alert {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
  animation: fade-in-up 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  body.login-body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
  }

  .login-split-container {
    flex-direction: column;
    height: auto;
    overflow-y: auto;
  }

  .login-feature-side {
    display: flex !important;
    order: 2;
    padding: 2.5rem 1.5rem;
    min-height: auto;
    flex: none;
  }

  .login-form-side {
    order: 1;
    flex: none;
    min-height: 100vh;
    padding: 2.5rem 1.5rem;
    background: radial-gradient(circle at 10% 20%, var(--bg-base) 0%, var(--hover-bg) 100%);
  }

  .login-card {
    padding: 2.5rem 1.75rem;
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.08);
  }

  .mobile-brand-header {
    display: flex;
  }

  .theme-switch-floating {
    top: 1.5rem;
    right: 1.5rem;
  }
}

@media (max-width: 480px) {
  .login-form-side {
    padding: 1rem;
  }

  .login-card {
    padding: 2rem 1.25rem;
    border-radius: 20px;
  }

  .login-title-h {
    font-size: 1.5rem;
  }
}

/* WhatsApp support links under password */
.login-links-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
}

.login-link-whatsapp {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.login-link-whatsapp svg {
  width: 15px;
  height: 15px;
}

.login-link-whatsapp:hover {
  color: var(--primary-color);
  transform: translateY(-1px);
}

/* Floating WhatsApp support button */
.whatsapp-support-float {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff !important;
  padding: 0.85rem 1.4rem;
  border-radius: 50px;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 999;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  animation: slide-in-float 0.8s ease-out forwards;
}

.whatsapp-support-float i.fa-whatsapp {
  font-size: 1.35rem;
}

.whatsapp-support-float:hover {
  transform: scale(1.08) translateY(-3px);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.5);
  color: #ffffff !important;
}

.whatsapp-support-float:active {
  transform: scale(1.02) translateY(-1px);
}

@keyframes slide-in-float {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.8);
  }

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

/* Hide WhatsApp float on extremely small screens if it overlaps card input fields */
@media (max-width: 480px) {
  .whatsapp-support-float {
    right: 1rem;
    bottom: 1rem;
    padding: 0.75rem 1.15rem;
    font-size: 0.85rem;
  }
}