/* Split login — strict 50% / 50% on md+, scales with viewport; stacks on small screens */

.login-body {
  margin: 0;
  min-height: 100vh;
  background: #fff;
  overflow-x: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #374151;
}

/* Fills viewport when views use the split shell */
.login-root {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.login-root > .login-page {
  flex: 1 1 auto;
}

.login-page {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

.login-page__left {
  box-sizing: border-box;
  flex: 1 1 50%;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(1.25rem, 4vw, 3rem);
}

/* Form column stays readable inside its half */
.login-page__left > * {
  width: 100%;
  max-width: min(26rem, 100%);
}

.login-page__right {
  box-sizing: border-box;
  display: none;
  flex: 1 1 50%;
  width: 100%;
  min-width: 0;
  position: relative;
  min-height: min(42vh, 320px);
  /* Fallback while image loads */
  background-color: #1e293b;
  background-image: url("/images/login-hero.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.login-page__right::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Tie to white form column + keep photo readable */
  background: linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.28) 0%,
    rgba(0, 0, 0, 0) 42%
  ),
  linear-gradient(
    to top,
    rgba(0, 0, 0, 0.38) 0%,
    rgba(0, 0, 0, 0.06) 55%
  );
  pointer-events: none;
}

/* Two columns: exact half width each, full viewport height */
@media (min-width: 768px) {
  .login-page {
    flex-direction: row;
    align-items: stretch;
  }

  .login-page__left {
    flex: 0 0 50%;
    width: 50%;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .login-page__right {
    display: block;
    flex: 0 0 50%;
    width: 50%;
    min-height: 100vh;
    min-height: 100dvh;
    background-size: cover;
    background-position: center;
  }
}

/* Stacked: share vertical space */
@media (max-width: 767.98px) {
  .login-page__right {
    display: block;
    flex: 1 1 auto;
    min-height: clamp(200px, 38vh, 360px);
    background-size: cover;
    background-position: center top;
  }
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.login-brand__text {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.02em;
}

.login-lead {
  font-size: clamp(0.875rem, 1.5vw, 0.98rem);
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 1.75rem;
}

.login-field-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.35rem;
}

.login-input-wrap {
  position: relative;
}

.login-page__left .form-control {
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  border: 1px solid #d4d4d8;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-page__left .form-control:hover {
  border-color: #c4c4ca;
}

.login-page__left .form-control:focus {
  border-color: #ff8c42;
  box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.22);
}

.login-toggle-pwd {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  padding: 0.25rem;
  color: #94a3b8;
  cursor: pointer;
  line-height: 0;
}

.login-toggle-pwd:hover {
  color: #64748b;
}

.login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}

.login-link-accent {
  color: #ea580c !important;
  font-size: 0.875rem;
  font-weight: 600;
}

.login-link-accent:hover {
  color: #c2410c !important;
}

.login-btn-primary {
  --bs-btn-bg: #ff8c42;
  --bs-btn-border-color: #ff8c42;
  --bs-btn-hover-bg: #f97316;
  --bs-btn-hover-border-color: #f97316;
  --bs-btn-active-bg: #ea580c;
  --bs-btn-active-border-color: #ea580c;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-weight: 600;
  border: none;
}

.login-footer-links {
  margin-top: 1.75rem;
  font-size: 0.875rem;
  color: #64748b;
  text-align: center;
}

.login-footer-links a {
  color: #ea580c;
  font-weight: 600;
}

.login-legal-note {
  font-size: 0.8125rem;
  line-height: 1.5;
}
