/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
}

body.login {
  min-height: 100vh;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: #17352d;
  /* Override any Bootstrap body background */
  background-color: #f4f8f4 !important;
  background-image: none !important;
}

/* === Page Shell === */
.login-shell {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  overflow: hidden;
  /* Blobs via box decoration — using pseudo-elements below */
}

/* === Background Blobs === */
.login-shell::before,
.login-shell::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.login-shell::before {
  width: 800px;
  height: 800px;
  top: -300px;
  left: -260px;
  background: radial-gradient(circle at 40% 40%, rgba(83, 163, 24, 0.14) 0%, transparent 60%);
}

.login-shell::after {
  width: 500px;
  height: 500px;
  bottom: -160px;
  right: -120px;
  background: radial-gradient(circle at 55% 55%, rgba(83, 163, 24, 0.09) 0%, transparent 65%);
}

/* === Two-Column Stage === */
.login-stage {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: stretch;
}

/* === Left Brand Column === */
.login-stage__brand {
  display: flex;
  align-items: stretch;
}

.login-brand {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.login-brand__logo {
  width: 120px;
  height: auto;
  display: block;
  margin-bottom: 44px;
  border: 0;
  flex-shrink: 0;
}

.login-brand__eyebrow {
  margin: 0 0 14px;
  padding: 0;
  color: #53a318;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
}

.login-brand__title {
  margin: 0 0 20px;
  padding: 0;
  font-size: clamp(30px, 3.6vw, 48px);
  font-weight: 800;
  line-height: 1.06;
  color: #0d1a12;
  letter-spacing: -0.025em;
}

.login-brand__desc {
  margin: 0 0 28px;
  padding: 0;
  font-size: 15px;
  line-height: 1.7;
  color: #4a5e54;
}

/* === Feature List === */
.login-features {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-feature {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 0;
  padding: 0;
}

.login-feature__icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(83, 163, 24, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #53a318;
  font-size: 16px;
}

.login-feature__body {
  padding-top: 1px;
  min-width: 0;
}

.login-feature__title {
  margin: 0 0 3px;
  padding: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #17352d;
  line-height: 1.3;
}

.login-feature__desc {
  margin: 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #627369;
}

/* === Right Form Column === */
.login-stage__form {
  display: flex;
  align-items: stretch;
}

/* === Auth Card === */
.auth-card {
  width: 100%;
  padding: 44px 40px;
  background: #ffffff !important;
  border-radius: 24px !important;
  border: 1px solid rgba(83, 163, 24, 0.08);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.03),
    0 4px 12px rgba(15, 40, 25, 0.05),
    0 20px 48px rgba(15, 40, 25, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: visible;
}

.auth-card__header {
  margin: 0 0 0 0;
}

.auth-card__eyebrow {
  margin: 0 0 10px;
  padding: 0;
  color: #53a318;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
}

.auth-card__title {
  margin: 0;
  padding: 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  color: #0d1a12;
  letter-spacing: -0.02em;
}

.auth-card__subtitle {
  margin: 10px 0 0;
  padding: 0;
  color: #627369;
  font-size: 14px;
  line-height: 1.65;
}

/* === Messages === */
.auth-card__messages {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Override Bootstrap alert styles inside the card */
.auth-card__messages .alert {
  margin: 0 !important;
  border: 0 !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  box-shadow: none !important;
  font-size: 13.5px;
  line-height: 1.5;
}

/* === Form === */
.auth-form {
  margin-top: 28px;
}

/* Override Bootstrap .form tag styles */
.auth-form.form-horizontal .form-group,
.auth-form .form-group {
  margin: 0;
}

.auth-form__stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-field {
  display: flex;
  flex-direction: column;
}

.auth-field__label {
  display: block !important;
  margin: 0 0 8px !important;
  padding: 0;
  color: #1e3d32;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1;
}

/* === Inputs — Override Bootstrap .form-control completely === */
.auth-input,
.auth-password__input {
  display: block !important;
  width: 100% !important;
  height: 52px !important;
  min-height: 52px !important;
  padding: 0 18px !important;
  margin: 0 !important;
  border: 1.5px solid #d8e5d8 !important;
  border-radius: 12px !important;
  background-color: #ffffff !important;
  background-image: none !important;
  color: #17352d !important;
  font-size: 15px !important;
  font-family: inherit !important;
  line-height: 52px !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  outline: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
  -webkit-transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
  appearance: none;
  -webkit-appearance: none;
}

.auth-input::placeholder,
.auth-password__input::placeholder {
  color: #aab9b2 !important;
  opacity: 1;
}

.auth-input:focus,
.auth-password__input:focus {
  border-color: #53a318 !important;
  box-shadow: 0 0 0 3.5px rgba(83, 163, 24, 0.14) !important;
  -webkit-box-shadow: 0 0 0 3.5px rgba(83, 163, 24, 0.14) !important;
  outline: 0 !important;
}

/* === Password wrapper === */
.auth-password {
  position: relative;
}

.auth-password__input {
  padding-right: 52px !important;
}

.auth-password__toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  -webkit-transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #8ea89f;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  line-height: 1;
  transition: background-color 0.15s ease, color 0.15s ease;
  box-shadow: none !important;
}

.auth-password__toggle:hover,
.auth-password__toggle:focus {
  background: rgba(83, 163, 24, 0.10) !important;
  color: #53a318 !important;
  outline: none !important;
  box-shadow: none !important;
}

/* === Field errors === */
.auth-field__errors,
.auth-form__errors {
  margin-top: 6px;
  padding: 0;
  color: #c0392b;
  font-size: 12px;
  line-height: 1.4;
}

.auth-field__errors ul,
.auth-form__errors ul {
  margin: 0;
  padding-left: 16px;
}

/* === Submit button — Override Bootstrap .btn completely === */
.auth-submit,
input.auth-submit,
input[type="submit"].auth-submit {
  display: block !important;
  width: 100% !important;
  height: 54px !important;
  min-height: 54px !important;
  margin: 22px 0 0 !important;
  padding: 0 24px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: #53a318 !important;
  background-image: none !important;
  color: #ffffff !important;
  font-size: 15.5px !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  letter-spacing: 0.025em;
  line-height: 54px !important;
  text-align: center;
  cursor: pointer !important;
  box-shadow: 0 2px 4px rgba(83, 163, 24, 0.12), 0 8px 20px rgba(83, 163, 24, 0.20) !important;
  -webkit-box-shadow: 0 2px 4px rgba(83, 163, 24, 0.12), 0 8px 20px rgba(83, 163, 24, 0.20) !important;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease !important;
  -webkit-transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease !important;
  -webkit-appearance: none;
  appearance: none;
  white-space: nowrap;
  text-transform: none !important;
  text-decoration: none;
  vertical-align: top;
}

.auth-submit:hover,
input.auth-submit:hover,
input[type="submit"].auth-submit:hover {
  background: #489614 !important;
  transform: translateY(-1px);
  -webkit-transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(83, 163, 24, 0.16), 0 14px 32px rgba(83, 163, 24, 0.24) !important;
  -webkit-box-shadow: 0 4px 8px rgba(83, 163, 24, 0.16), 0 14px 32px rgba(83, 163, 24, 0.24) !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

.auth-submit:focus,
input.auth-submit:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(83, 163, 24, 0.30) !important;
  -webkit-box-shadow: 0 0 0 3px rgba(83, 163, 24, 0.30) !important;
}

.auth-submit:active,
input.auth-submit:active {
  transform: translateY(0) !important;
  -webkit-transform: translateY(0) !important;
  box-shadow: 0 2px 4px rgba(83, 163, 24, 0.12) !important;
  -webkit-box-shadow: 0 2px 4px rgba(83, 163, 24, 0.12) !important;
}

/* === Footer text === */
.auth-card__footer {
  margin: 20px 0 0;
  padding: 0;
  color: #8ea89f;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

/* === Responsive: Tablet (≤ 900px) === */
@media (max-width: 900px) {
  .login-stage {
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 520px;
    margin: 0 auto;
  }

  .login-stage__brand {
    order: 2;
  }

  .login-stage__form {
    order: 1;
  }

  .login-brand__logo {
    margin-bottom: 32px;
  }

  .login-brand__desc {
    max-width: 100%;
    margin-bottom: 28px;
  }

  .auth-card {
    padding: 36px 32px;
  }
}

/* === Responsive: Mobile (≤ 600px) === */
@media (max-width: 600px) {
  .login-shell {
    padding: 20px 16px;
  }

  .login-brand__logo {
    height: 28px;
    margin-bottom: 28px;
  }

  .login-brand__title {
    font-size: 28px;
  }

  .login-brand__desc {
    font-size: 14px;
    margin-bottom: 24px;
  }

  .login-features {
    gap: 16px;
  }

  .login-feature__icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    font-size: 14px;
    border-radius: 8px;
  }

  .auth-card {
    padding: 28px 22px;
    border-radius: 20px !important;
  }

  .auth-card__title {
    font-size: 26px;
  }
}
