/* Suppress browser password-manager UI */
html,
body,
.auth-body {
  margin: 0;
  min-height: 100%;
}

body.auth-body {
  background: #EAF6F5;
}

.login-page {
  min-height: 100vh;
  background-color: #EAF6F5;
}

.auth-footer {
  padding: 1rem;
  text-align: center;
  color: #64748b;
  font-size: .85rem;
}

.login-password-input::-ms-reveal,
.login-password-input::-ms-clear {
  display: none;
}

.login-password-input::-webkit-credentials-auto-fill-button {
  visibility: hidden;
  display: none !important;
  pointer-events: none;
}

/* Main container - full-screen flex split */
.custom-login-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  font-family: "Poppins", "Segoe UI", Tahoma, Arial, sans-serif;
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 60%, #f0f4ff 100%);
}

/* Left panel - illustration + logo */
.custom-login-left {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  gap: 28px;
  min-height: 100vh;
}

.custom-login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-login-logo img {
  height: 90px;
  width: auto;
  display: block;
}

.custom-login-illustration {
  width: 100%;
  max-width: 480px;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Right panel - login card */
.custom-login-right {
  flex: 0 0 auto;
  width: min(500px, 46%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  min-height: 100vh;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-left: 1px solid rgba(73, 126, 228, 0.15);
}

.custom-login-card {
  background: #ffffff;
  width: 100%;
  max-width: 420px;
  padding: 44px 44px 36px;
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(73, 126, 228, 0.14), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.custom-login-card h1 {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 28px;
  color: #0f172a;
}

.custom-login-alert {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  font-size: 14px;
}

.custom-login-session-check {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 172px;
  color: #374151;
  font-weight: 600;
}

.custom-login-session-check .custom-login-spinner {
  border-color: rgba(73, 126, 228, 0.25);
  border-top-color: #497EE4;
}

/* Form elements */
.custom-input-group {
  margin-bottom: 18px;
}

.custom-input-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #374151;
}

.custom-input-field {
  display: flex;
  align-items: center;
  background: #f1f5ff;
  border: 1.5px solid #c3d6f7;
  border-radius: 12px;
  width: 100%;
  height: 52px;
  padding: 8px 14px;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.custom-input-field:focus-within {
  border-color: #497EE4;
  box-shadow: 0 0 0 3px rgba(73, 126, 228, 0.15);
  background: #fff;
}

.custom-login-input {
  border: none;
  background: transparent;
  box-shadow: none;
  outline: none;
  width: 100%;
  min-height: 36px;
  padding: 0;
  font-size: 14px;
  color: #111827;
}

.custom-login-input:focus {
  box-shadow: none;
}

.input-icon {
  color: #497EE4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  margin-right: 10px;
}

.login-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.custom-password-toggle {
  border: none;
  background: transparent;
  color: #6b7280;
  padding: 0 6px;
  min-height: 36px;
  width: auto;
  cursor: pointer;
  font-weight: 600;
}

.custom-password-toggle:hover,
.custom-password-toggle:focus,
.custom-password-toggle:active {
  border: none;
  background: transparent;
  color: #497EE4;
  box-shadow: none;
}

.custom-login-options {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  gap: 8px;
}

.custom-login-options input {
  accent-color: #497EE4;
  width: 16px;
  height: 16px;
}

.custom-login-options label {
  margin: 0;
  color: #4b5563;
}

/* Buttons */
.custom-login-btn,
.custom-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  gap: 8px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  padding: 0 24px;
  transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
}

.custom-login-btn {
  margin-bottom: 14px;
  background: linear-gradient(135deg, #497EE4, #2b5cb8);
  color: #fff;
  box-shadow: 0 6px 18px rgba(73, 126, 228, 0.35);
}

.custom-login-btn:hover,
.custom-login-btn:focus {
  background: linear-gradient(135deg, #3a6fd6, #1e4494);
  color: #fff;
  box-shadow: 0 8px 22px rgba(73, 126, 228, 0.45);
  transform: translateY(-1px);
}

.custom-login-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(73, 126, 228, 0.3);
}

.custom-login-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 999px;
  animation: custom-login-spin .8s linear infinite;
}

@keyframes custom-login-spin {
  to {
    transform: rotate(360deg);
  }
}

.custom-back-wrap {
  margin-top: 0 !important;
}

.custom-back-btn {
  background: #e9ecef;
  color: #6b7280;
  text-decoration: none;
  border: none;
  box-shadow: none;
}

.custom-back-btn:hover,
.custom-back-btn:focus,
.custom-back-btn:active {
  background: #d1d5db;
  color: #374151;
  text-decoration: none;
  border: none;
  outline: none;
}

/* Responsive: tablet */
@media (max-width: 900px) {
  .custom-login-container {
    flex-direction: column;
    align-items: center;
    background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%);
  }

  .custom-login-left {
    flex: none;
    width: 100%;
    min-height: auto;
    padding: 32px 20px 0;
    gap: 16px;
  }

  .custom-login-illustration {
    max-width: 280px;
  }

  .custom-login-right {
    flex: none;
    width: 100%;
    min-height: auto;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-left: none;
    padding: 20px 20px 40px;
  }

  .custom-login-card {
    max-width: 480px;
    padding: 32px 28px;
    border-radius: 20px;
  }

  .custom-login-card h1 {
    font-size: 26px;
    margin-bottom: 20px;
  }
}

/* Responsive: mobile */
@media (max-width: 480px) {
  .custom-login-left {
    padding: 24px 16px 0;
  }

  .custom-login-logo img {
    height: 64px;
  }

  .custom-login-illustration {
    max-width: 200px;
  }

  .custom-login-card {
    padding: 24px 20px;
    border-radius: 16px;
  }

  .custom-login-card h1 {
    font-size: 22px;
    margin-bottom: 16px;
  }

  .custom-input-field {
    height: 48px;
  }

  .custom-login-btn,
  .custom-back-btn {
    height: 48px;
    font-size: 15px;
  }
}
