.main {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  overflow-x: hidden;
  overflow-y: auto;
  background-image: url("../../public/images/auth/bg.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center right;
  padding: clamp(12px, 2.5vw, 28px);
  box-sizing: border-box;
}

.main .left {
  width: 65%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
}

@media (max-width: 991px) {
  .main .left {
    display: none;
  }
}

/* Auth card — fluid width so it fits tablets and short windows */
.main .right {
  width: min(900px, 100%);
  max-width: 100%;
  min-height: calc(100vh - clamp(24px, 5vw, 56px));
  min-height: calc(100dvh - clamp(24px, 5vw, 56px));
  height: auto;
  background-color: var(--brand-surface, #f0eee9);
  background-image: none;
  border: 1px solid var(--brand-border, rgba(29, 66, 138, 0.2));
  box-shadow: 0 12px 28px rgba(29, 66, 138, 0.18);
  border-radius: 18px;
  padding: clamp(1.25rem, 4vw, 6rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
}

/* Heading block above the form (Welcome Back) */
.main .right > .textGroup {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(6px, 1vh, 12px);
}

.heading {
  font-size: clamp(28px, 4.5vw, 56px);
  font-weight: 700;
  color: #1e1e1e;
  text-align: center;
  font-family: var(--brand-font-bold, "Gotham", sans-serif);
  letter-spacing: -0.02em;
  line-height: 1.15;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.heading img {
  width: clamp(24px, 3.5vw, 40px);
  height: auto;
}

.text {
  font-size: clamp(14px, 1.8vw, 20px);
  text-align: center;
  margin-bottom: 10px;
  color: var(--gryColor);
  line-height: 1.4;
  padding: 0 4px;
}

.main .right .form_wrapper {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  gap: clamp(28px, 5vh, 70px);
  margin-top: clamp(0.75rem, 2vh, 2rem);
}

.main .right .form_wrapper .textGroup {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.5vh, 28px);
  width: 100%;
}

.form_wrapper .formGroup {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 10px;
}

.form_wrapper .formGroup .inputLable {
  margin-left: 12px;
  font-size: clamp(14px, 1.5vw, 18px);
}

.form_wrapper .formGroup .input_group {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 52px;
  height: clamp(52px, 7vh, 65px);
  border-radius: 16px;
  background-color: #fff;
  border: 1px solid rgba(29, 66, 138, 0.2);
  box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.08);
  padding: 0 0.8rem;
  gap: 10px;
  transition: 0.2s;
  box-sizing: border-box;
}

.form_wrapper .formGroup .input_group .icon2 {
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.form_wrapper .formGroup .input_group:hover,
.form_wrapper .formGroup .input_group:focus-within {
  border-color: #1d428a;
}

.form_wrapper .formGroup .input_group img {
  width: clamp(18px, 2.5vw, 28px);
  height: auto;
  flex-shrink: 0;
}

.form_wrapper .formGroup .input_group input {
  width: 100%;
  min-width: 0;
  flex: 1;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--brand-font, Gotham, sans-serif);
  font-size: clamp(14px, 1.6vw, 18px);
  font-weight: 400;
}

.form_wrapper .inlineGroup {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #1e1e1e;
  gap: 12px;
  flex-wrap: wrap;
}

.form_wrapper .inlineGroup a {
  text-decoration: underline;
  font-size: clamp(14px, 1.5vw, 18px);
  color: var(--brand-primary, #1d428a);
  transition: 0.3s;
  white-space: nowrap;
}

.form_wrapper .inlineGroup a:hover {
  opacity: 0.8;
}

.form_wrapper .inlineGroup .inputWrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.form_wrapper .inlineGroup .inputWrapper input {
  height: 100%;
  width: 20px;
  opacity: 0;
  position: absolute;
  left: 0px;
  z-index: 11111;
  cursor: pointer;
}

.form_wrapper .inlineGroup .inputWrapper label {
  font-size: clamp(14px, 1.5vw, 18px);
  color: #1e1e1e;
  cursor: pointer;
  padding-left: 10px;
  transition: 0.3s;
}

.form_wrapper .inlineGroup .inputWrapper label:hover {
  opacity: 0.8;
}

.form_wrapper .inlineGroup .inputWrapper .checkmark {
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #1d428a;
  box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  position: relative;
  flex-shrink: 0;
}

.form_wrapper .inlineGroup .inputWrapper > .checkmark::before {
  content: "✔";
  position: absolute;
  top: -2px;
  left: 2px;
  border-radius: 0%;
  transform: scale(0);
  transition: all 0.3s;
  color: #1d428a;
}

.form_wrapper
  .inlineGroup
  .inputWrapper
  .checkboxButton:checked
  ~ .checkmark::before {
  transform: scale(1);
}

.form_wrapper .formBTN {
  display: flex;
  justify-content: flex-start;
  flex-direction: column;
  gap: clamp(14px, 2vh, 25px);
  width: 100%;
}

.form_wrapper button {
  position: relative;
  width: 100%;
  height: var(--btn-height-lg, 48px);
  min-height: 44px;
  border: 1px solid var(--brand-primary-deep, #152e61);
  outline: none;
  border-radius: var(--btn-radius, 8px);
  font-size: clamp(14px, 1.6vw, 18px);
  line-height: 1.2;
  color: #fff;
  font-family: var(--brand-font-bold, "Gotham", sans-serif);
  font-weight: 700;
  background: var(--brand-primary, #1d428a);
  background: var(
    --brand-gradient,
    linear-gradient(126deg, #1d428a 0%, #152e61 100%)
  );
  box-shadow: var(--btn-shadow, 0 2px 6px rgba(15, 23, 42, 0.1));
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.form_wrapper button:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: var(--btn-shadow-hover, 0 4px 12px rgba(15, 23, 42, 0.16));
}

.form_wrapper button:active:not(:disabled) {
  opacity: 1;
  transform: translateY(0);
  box-shadow: var(--btn-shadow, 0 2px 6px rgba(15, 23, 42, 0.1));
}

.form_wrapper button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.form_wrapper button.SecondBtn {
  background: transparent;
  border: 1px solid #7b7b7b;
  box-shadow: 0 16px 24px 0 rgba(29, 66, 138, 0.24);
  color: #7b7b7b;
}

.otpDiv {
  height: auto;
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
  margin: 10px auto;
  box-sizing: border-box;
}

.otpDiv > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.otpDiv > div > input {
  width: 1em;
  text-align: center;
  min-width: clamp(40px, 10vw, 55px);
  height: clamp(40px, 10vw, 55px);
  margin-right: 0;
  border-radius: 10px;
  border: 1px solid rgba(29, 66, 138, 1);
  font-size: clamp(16px, 3vw, 20px);
  background: #ffffff;
  color: #000;
  margin-bottom: 12px;
  transition: all 0.3s;
  outline: none !important;
  box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.08);
}

.expireCode {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex-wrap: wrap;
  gap: 4px;
}

.expireCode p {
  font-size: clamp(14px, 1.8vw, 20px);
  color: #1e1e1e;
}

.expireCode > p > span {
  color: #1d428a;
  font-family: var(--brand-font-bold);
  font-weight: 700;
}

/* Tablet / mid widths — card filled right side without overflow */
@media screen and (max-width: 1100px) {
  .main {
    justify-content: center;
  }

  .main .right {
    width: min(100%, 720px);
  }
}

/* Short viewports (laptop height, split screen) */
@media screen and (max-height: 720px) {
  .main .right {
    min-height: auto;
    justify-content: flex-start;
    padding-top: clamp(1rem, 3vh, 2rem);
    padding-bottom: clamp(1rem, 3vh, 2rem);
  }

  .main .right .form_wrapper {
    gap: 24px;
    margin-top: 0.75rem;
  }

  .main .right .form_wrapper .textGroup {
    gap: 14px;
  }

  .form_wrapper .formGroup .input_group {
    height: 48px;
    min-height: 48px;
  }
}

/* Mobile */
@media screen and (max-width: 600px) {
  .main {
    padding: 12px;
    align-items: stretch;
  }

  .main .right {
    width: 100%;
    max-width: 100%;
    min-height: calc(100dvh - 24px);
    margin: 0;
    padding: 24px 16px;
    border-radius: 14px;
    justify-content: center;
  }

  .heading {
    font-size: 24px;
    gap: 6px;
  }

  .heading img {
    width: 24px;
  }

  .text {
    font-size: 14px;
    margin-top: 0.25rem;
    margin-bottom: 0;
  }

  .text br {
    display: none;
  }

  .form_wrapper .formGroup .input_group {
    height: 48px;
    min-height: 48px;
    border-radius: 12px;
  }

  .form_wrapper .formGroup .inputLable {
    font-size: 14px;
    margin-left: 8px;
  }

  .form_wrapper .formGroup {
    gap: 6px;
  }

  .form_wrapper .formGroup .input_group img {
    width: 18px;
  }

  .form_wrapper .formGroup .input_group input {
    font-size: 14px;
  }

  .form_wrapper .inlineGroup {
    margin-top: 0.25rem;
    row-gap: 10px;
  }

  .form_wrapper .inlineGroup .inputWrapper label,
  .form_wrapper .inlineGroup a {
    font-size: 14px;
  }

  .form_wrapper .inlineGroup .inputWrapper .checkmark {
    width: 16px;
    height: 16px;
  }

  .form_wrapper .inlineGroup .inputWrapper input {
    width: 16px;
  }

  .form_wrapper
    .inlineGroup
    .inputWrapper
    .checkboxButton:checked
    ~ .checkmark::before {
    transform: scale(0.8);
  }

  .form_wrapper .inlineGroup .inputWrapper > .checkmark::before {
    top: -4px;
    left: 0px;
  }

  .form_wrapper button {
    height: 48px;
    font-size: 15px;
  }

  .main .right .form_wrapper {
    gap: 22px;
    margin-top: 1rem;
  }

  .main .right .form_wrapper .textGroup {
    gap: 16px;
  }

  .form_wrapper .formBTN {
    gap: 12px;
  }

  .otpDiv > div > input {
    min-width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .expireCode p {
    font-size: 14px;
  }
}

/* Very small phones */
@media screen and (max-width: 380px) {
  .main {
    padding: 8px;
  }

  .main .right {
    padding: 18px 12px;
    min-height: calc(100dvh - 16px);
  }

  .heading {
    font-size: 22px;
  }

  .form_wrapper .inlineGroup {
    flex-direction: column;
    align-items: flex-start;
  }
}
