/* ==========================================================================
   Login Page — Split-screen layout
   ========================================================================== */

/* Reset container padding from base_no_sidebar.html for full-viewport layout */
#layoutNoSide_content > main > .container-fluid {
  padding: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
}

#layoutNoSide_content > main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* ===== SCREEN WRAPPER ===== */
.login-screen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ==========================================================================
   HERO — left column
   ========================================================================== */
.login-hero-panel {
  padding: 1.5rem;
  display: flex;
  align-items: stretch;
}

.login-hero {
  position: relative;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  background-color: #0b1d4a;
  background-size: cover;
  background-position: center center;
  display: flex;
  flex-direction: column;
}

.login-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(11, 29, 74, 0.25) 0%,
    rgba(11, 29, 74, 0.55) 55%,
    rgba(11, 29, 74, 0.92) 100%
  );
}

.login-hero-content {
  position: relative;
  z-index: 1;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

/* Brand mark top-left on hero */
.login-hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.login-hero-brand-img {
  height: 32px;
  width: auto;
  opacity: 0.9;
}

/* Badge #1 */
.login-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 100px;
  padding: 0.35rem 0.9rem;
  font-family: "Sora", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
  width: fit-content;
  margin-bottom: 0.9rem;
}

.login-hero-badge i {
  color: #fbbf24;
  font-size: 0.8rem;
}

/* Title at bottom */
.login-hero-title {
  font-family: "Sora", sans-serif;
  font-size: clamp(1.5rem, 2.2vw, 2.1rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  margin: 0;
}

/* ==========================================================================
   FORM — right column
   ========================================================================== */
.login-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  background: #ffffff;
}

.login-form-inner {
  width: 100%;
  max-width: 380px;
}

/* Logo badge */
.login-form-logo {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.1rem;
  border-radius: 14px;
  margin-bottom: 2.25rem;
}

.login-form-logo img {
  height: 100px;
  width: auto;
}

/* Heading */
.login-form-heading {
  font-family: "Sora", sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.login-form-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* ===== FIELD ===== */
.login-field {
  margin-bottom: 1.25rem;
}

.login-field > label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.45rem;
  letter-spacing: 0.01em;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 1rem;
  color: #9ca3af;
  font-size: 0.875rem;
  pointer-events: none;
  z-index: 1;
}

/* Override allauth/crispy input rendering */
.login-input-wrap input[type="email"],
.login-input-wrap input[type="text"],
.login-input-wrap input[type="password"] {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem !important;
  border: 1.5px solid #e5e7eb !important;
  border-radius: 12px !important;
  font-size: 0.875rem;
  font-family: "Sora", sans-serif;
  color: #111827;
  background: #f9fafb !important;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  line-height: 1.5;
}

.login-input-wrap input[type="email"]:focus,
.login-input-wrap input[type="text"]:focus,
.login-input-wrap input[type="password"]:focus {
  border-color: #0b1d4a !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(11, 29, 74, 0.09) !important;
}

.login-input-wrap input[type="email"]:focus ~ .login-input-icon,
.login-input-wrap input[type="text"]:focus ~ .login-input-icon,
.login-input-wrap input[type="password"]:focus ~ .login-input-icon {
  color: #0b1d4a;
}

/* Password field — extra right padding for toggle */
.login-input-wrap.has-toggle input[type="password"],
.login-input-wrap.has-toggle input[type="text"] {
  padding-right: 3rem !important;
}

/* Toggle button */
.login-toggle-btn {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1;
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.login-toggle-btn:hover {
  color: #0b1d4a;
}

/* ===== REMEMBER ME ===== */
.login-remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  margin-top: 0.25rem;
}

.login-remember input[type="checkbox"] {
  width: 17px;
  height: 17px;
  border-radius: 5px;
  accent-color: #0b1d4a;
  cursor: pointer;
  flex-shrink: 0;
}

.login-remember label {
  font-size: 0.8125rem;
  color: #4b5563;
  cursor: pointer;
  margin: 0;
  user-select: none;
}

/* ===== ERROR STATES ===== */
.login-field-errors {
  margin-top: 0.35rem;
  font-size: 0.775rem;
  color: #dc2626;
  list-style: none;
  padding: 0;
}

.login-non-field-errors {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 12px;
  padding: 0.7rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
  color: #dc2626;
  line-height: 1.5;
}

.login-non-field-errors p {
  margin: 0;
}

/* ===== CTA BUTTON ===== */
.login-submit-btn {
  width: 100%;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-family: "Sora", sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: not-allowed;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  transition:
    background 0.2s,
    box-shadow 0.2s,
    transform 0.15s;
  background: #e5e7eb;
  color: #9ca3af;
  letter-spacing: 0.01em;
}

.login-submit-btn.is-active {
  background: linear-gradient(135deg, #0b1d4a 0%, #1e3a8a 100%);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(11, 29, 74, 0.28);
}

.login-submit-btn.is-active:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(11, 29, 74, 0.38);
}

.login-submit-btn.is-active:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(11, 29, 74, 0.25);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767.98px) {
  .login-screen {
    grid-template-columns: 1fr;
    background: #ffffff;
  }

  .login-hero-panel {
    display: none;
  }

  .login-form-panel {
    padding: 2rem 1.5rem;
    min-height: calc(100vh - 58px);
  }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .login-hero-title {
    font-size: 1.5rem;
  }

  .login-form-panel {
    padding: 2.5rem 1.5rem;
  }
}
