:root {
  --blue: #0577dd;
  --blue-dark: #1e6fc4;
  --orange: #f47c20;
  --red: #ec2a2a;
  --ink: #111111;
  --text: #3d3d3d;
  --white: #ffffff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  font-family: "Outfit", system-ui, sans-serif;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ---------- Layout ---------- */
.page {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  overflow-x: hidden;
}

.blue-panel {
  position: absolute;
  inset: 0;
  background: var(--blue);
  clip-path: polygon(41.5% 0, 100% 0, 100% 100%, 62.5% 100%);
  z-index: 0;
}

/* Dot grids */
.dots {
  position: absolute;
  width: 90px;
  height: 90px;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.45) 2.2px, transparent 2.4px);
  background-size: 12px 12px;
}

.dots--top {
  top: clamp(40px, 6vh, 68px);
  right: clamp(40px, 5vw, 76px);
}

.dots--bottom {
  bottom: clamp(40px, 6vh, 64px);
  left: 57%;
  background-image: radial-gradient(circle, rgba(5, 119, 221, 0.18) 2.2px, transparent 2.4px);
  z-index: 1;
}

.waves {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 44%;
  height: 52%;
}

/* ---------- Left side ---------- */
.info {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: clamp(32px, 5vh, 56px) 40px clamp(28px, 4vh, 44px);
}

/* Slider (pure CSS) */
.slider {
  margin-top: auto;
  margin-bottom: auto;
  width: 100%;
  max-width: 620px;
  text-align: center;
}

.slider input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.slides {
  display: grid;
  overflow: hidden;
}

.slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s;
}

#slide-1:checked~.slides .slide:nth-child(1),
#slide-2:checked~.slides .slide:nth-child(2),
#slide-3:checked~.slides .slide:nth-child(3) {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.slide img {
  display: block;
  width: clamp(260px, 24vh, 340px);
  max-width: 100%;
  max-height: clamp(170px, 26vh, 230px);
  object-fit: contain;
  margin: 0 auto clamp(16px, 2.5vh, 28px);
  mix-blend-mode: multiply;
}

.slide h2 {
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 700;
  margin-bottom: clamp(8px, 1.5vh, 14px);
}

.slide p {
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.45;
  color: var(--text);
  font-weight: 400;
  max-width: 490px;
  margin: 0 auto;
}

.slider__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: clamp(14px, 2vh, 22px);
}

.slider__dots label {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d4d4d4;
  cursor: pointer;
  align-self: center;
  transition: all 0.3s ease;
}

#slide-1:checked~.slider__dots label:nth-child(1),
#slide-2:checked~.slider__dots label:nth-child(2),
#slide-3:checked~.slider__dots label:nth-child(3) {
  width: 18px;
  height: 18px;
  background: #333333;
}

/* ---------- Right side ---------- */
.auth {
  position: relative;
  z-index: 2;
  color: var(--white);
  padding: clamp(36px, 5vh, 60px) clamp(48px, 6vw, 90px) clamp(28px, 4vh, 44px) 0;
  display: flex;
  flex-direction: column;
}

.auth__title {
  font-family: "Roboto Condensed", "Arial Narrow", sans-serif;
  font-weight: 700;
  font-size: clamp(44px, 4.2vw, 56px);
  letter-spacing: 1px;
  line-height: 1;
  margin-left: 6%;
  margin-top: 20px;
}

.auth__card {
  margin: auto clamp(24px, 4vw, 70px) auto auto;
  width: 100%;
  max-width: 350px;
}

.auth__welcome {
  text-align: center;
  font-size: clamp(26px, 2.4vw, 32px);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.auth__subtitle {
  text-align: center;
  font-size: 14px;
  font-weight: 300;
  margin-top: 6px;
}

.form {
  margin-top: clamp(20px, 3vh, 32px);
  display: flex;
  flex-direction: column;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: clamp(14px, 2vh, 18px);
}

.form__group label {
  font-size: 14px;
  font-weight: 500;
}

.form__group input {
  height: clamp(44px, 5.2vh, 48px);
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 5px;
  background: transparent;
  color: var(--white);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form__group input::placeholder {
  color: rgba(255, 255, 255, 0.8);
}

.form__group input[type="password"][placeholder^="•"]::placeholder {
  letter-spacing: 3px;
}

.form__group input:focus {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.form__forgot {
  align-self: flex-end;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  margin-top: -4px;
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.form__forgot:hover,
.form__forgot:focus-visible {
  text-decoration: underline;
}

.form__submit {
  margin-top: clamp(18px, 2.5vh, 26px);
  height: clamp(44px, 5.2vh, 48px);
  border: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--orange), var(--red));
  color: var(--white);
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s;
}

.form__submit:hover {
  filter: brightness(1.05);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.form__submit:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 3px;
}

.brand {
  display: flex;
  justify-content: center;
}

.brand img {
  display: block;
  max-width: 100%;
  width: clamp(260px, 22vw, 320px);
  height: auto;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .auth {
    padding-right: 48px;
  }
}

/* Windows laptops and screens with height <= 780px */
@media (min-width: 901px) and (max-height: 780px) {
  .info {
    padding: 24px 32px 18px;
  }

  .brand img {
    width: 230px;
  }

  .slider {
    max-width: 520px;
  }

  .slide img {
    width: 200px;
    max-height: 140px;
    margin: 0 auto 10px;
  }

  .slide h2 {
    font-size: 20px;
    margin-bottom: 6px;
  }

  .slide p {
    font-size: 13px;
    line-height: 1.4;
    max-width: 440px;
  }

  .slider__dots {
    margin-top: 10px;
  }

  .slider__dots label {
    width: 10px;
    height: 10px;
  }

  #slide-1:checked~.slider__dots label:nth-child(1),
  #slide-2:checked~.slider__dots label:nth-child(2),
  #slide-3:checked~.slider__dots label:nth-child(3) {
    width: 14px;
    height: 14px;
  }

  .auth {
    padding: 24px 50px 18px 0;
  }

  .auth__title {
    font-size: 38px;
  }

  .auth__card {
    margin: auto clamp(18px, 3vw, 44px) auto auto;
    max-width: 310px;
  }

  .auth__welcome {
    font-size: 22px;
  }

  .auth__subtitle {
    font-size: 12.5px;
    margin-top: 4px;
  }

  .form {
    margin-top: 16px;
  }

  .form__group {
    margin-bottom: 12px;
    gap: 4px;
  }

  .form__group input {
    height: 38px;
    font-size: 12.5px;
  }

  .form__forgot {
    font-size: 12.5px;
  }

  .form__submit {
    margin-top: 16px;
    height: 38px;
    font-size: 14px;
  }

  .dots {
    width: 60px;
    height: 60px;
  }
}

/* Mobile Screens (<= 900px) */
@media (max-width: 900px) {

  html,
  body {
    background: var(--white);
  }

  .page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: auto;
    background: var(--white);
    overflow-x: hidden;
  }

  /* 1. Top Info Section (Normal white background, no box around logo or slider) */
  .info {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(24px, 5vw, 32px) 20px clamp(28px, 6vw, 36px);
    background: var(--white);
    width: 100%;
  }

  .brand {
    display: flex;
    justify-content: center;
    margin-bottom: clamp(14px, 3vh, 20px);
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
  }

  .brand img {
    width: clamp(210px, 55vw, 250px);
    max-width: 100%;
    height: auto;
    display: block;
  }

  /* Slider / Carousel (Normal on white background, illustrations fully visible) */
  .slider {
    width: 100%;
    max-width: 480px;
    text-align: center;
    margin: 0 auto;
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    color: var(--ink);
  }

  .slide img {
    width: clamp(200px, 52vw, 240px);
    max-height: 165px;
    margin: 0 auto 14px;
    mix-blend-mode: multiply;
    display: block;
  }

  .slide h2 {
    color: var(--ink);
    font-size: clamp(19px, 4.5vw, 22px);
    font-weight: 700;
    margin-bottom: 8px;
  }

  .slide p {
    color: var(--text);
    font-size: clamp(13px, 3.2vw, 14px);
    line-height: 1.45;
    max-width: 420px;
    margin: 0 auto;
  }

  .slider__dots {
    margin-top: clamp(12px, 2.5vh, 18px);
  }

  .slider__dots label {
    width: 10px;
    height: 10px;
    background: #d4d4d4;
  }

  #slide-1:checked~.slider__dots label:nth-child(1),
  #slide-2:checked~.slider__dots label:nth-child(2),
  #slide-3:checked~.slider__dots label:nth-child(3) {
    width: 16px;
    height: 16px;
    background: #333333;
  }

  /* 2. Bottom Auth Section with Blue Backdrop */
  .auth {
    position: relative;
    z-index: 2;
    background: var(--blue);
    padding: clamp(52px, 9vw, 64px) 18px clamp(48px, 8vw, 64px);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    clip-path: polygon(0 32px, 100% 0, 100% 100%, 0 100%);
    margin-top: -32px;
    flex: 1;
  }

  /* Remove redundant SIGN IN header on mobile */
  .auth__title {
    display: none;
  }

  /* 3. ONLY the login form in a crisp White Box */
  .auth__card {
    background: var(--white);
    color: var(--ink);
    border-radius: 16px;
    padding: clamp(24px, 5vw, 32px) clamp(18px, 4.5vw, 24px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
  }

  .auth__welcome {
    color: var(--ink);
    font-size: clamp(21px, 5vw, 24px);
    font-weight: 700;
    text-align: center;
  }

  .auth__subtitle {
    color: #64748b;
    font-size: 13.5px;
    margin-top: 6px;
    text-align: center;
  }

  .form {
    margin-top: 24px;
  }

  .form__group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .form__group label {
    color: #334155;
    font-size: 13.5px;
    font-weight: 500;
  }

  .form__group input {
    height: 46px;
    background: #f8fafc;
    border: 1px solid #d0d5dd;
    color: var(--ink);
    border-radius: 8px;
    font-size: 14px;
    padding: 0 16px;
  }

  .form__group input::placeholder {
    color: #94a3b8;
  }

  .form__group input:focus {
    background: #ffffff;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(5, 119, 221, 0.15);
  }

  .form__forgot {
    color: var(--blue);
    font-size: 13.5px;
    font-weight: 600;
  }

  .form__submit {
    height: 46px;
    font-size: 15px;
    border-radius: 8px;
    margin-top: 22px;
    box-shadow: 0 6px 18px rgba(236, 42, 42, 0.28);
  }

  /* Background accents */
  .blue-panel {
    display: none;
  }

  .dots--top {
    display: none;
  }

  .dots--bottom {
    display: none;
  }

  .waves {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 200px;
    pointer-events: none;
    opacity: 0.35;
    z-index: 1;
  }
}

@media (prefers-reduced-motion: reduce) {

  .slide,
  .form__submit,
  .slider__dots label {
    transition: none;
  }
}

/* ---------- Steps, messages and links (J-CORE) ---------- */
.view[hidden] {
  display: none !important;
}

.auth__note {
  text-align: center;
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.45;
  margin-top: 8px;
}

.msg {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.msg[hidden] {
  display: none;
}

.msg--error {
  background: #fff1f0;
  color: #b42318;
  border: 1px solid #fecdca;
}

.msg--ok {
  background: #ecfdf3;
  color: #067647;
  border: 1px solid #a6f4c5;
}

.form__submit:disabled {
  opacity: .65;
  cursor: wait;
  transform: none;
}

.form__links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--white);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.link-btn:hover,
.link-btn:focus-visible {
  text-decoration: underline;
}

.link-btn:disabled {
  opacity: .55;
  cursor: default;
  text-decoration: none;
}

.form__group input.otp {
  letter-spacing: 8px;
  font-size: 18px;
  text-align: center;
}

.form__hint {
  font-size: 12.5px;
  font-weight: 300;
  margin: -6px 0 12px;
}

@media (max-width: 900px) {
  .auth__note {
    color: #475569;
  }

  .link-btn {
    color: var(--blue);
  }

  .form__hint {
    color: #64748b;
  }
}