html,
body {
  min-height: 100%;
  margin: 0;
}

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

:root {
  --sx-bg: #f6f9ff;
  --sx-panel: #ffffff;
  --sx-ink: #0b1630;
  --sx-muted: #5f6e88;
  --sx-line: #d9e2f0;
  --sx-blue: #1d63ff;
  --sx-blue-dark: #0750f2;
  --sx-surface: #eef3f9;
}

.login-page {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--sx-ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(246, 249, 255, .98)),
    var(--sx-bg);
}

.login-page::before,
.login-page::after {
  content: "";
  position: fixed;
  inset: auto;
  z-index: 0;
  pointer-events: none;
}

.login-page::before {
  right: -10vw;
  top: -20vh;
  width: 74vw;
  height: 78vh;
  border-radius: 0 0 0 80%;
  background: linear-gradient(135deg, rgba(239, 245, 255, .35), rgba(213, 227, 254, .8));
}

.login-page::after {
  left: -16vw;
  bottom: -34vh;
  width: 78vw;
  height: 72vh;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(25deg, rgba(204, 222, 255, .82), rgba(238, 244, 255, .35) 62%, transparent);
}

.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: clamp(26px, 6vh, 76px) 24px;
}

.auth-shell::before,
.auth-shell::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 260px;
  height: 300px;
  background: radial-gradient(circle, rgba(41, 111, 255, .11) 0 1.5px, transparent 1.8px) 0 0 / 24px 24px;
  opacity: .58;
  pointer-events: none;
}

.auth-shell::before {
  left: 0;
  top: 54px;
}

.auth-shell::after {
  right: 48px;
  bottom: 82px;
}

.auth-visual {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  width: 100%;
  color: var(--sx-ink);
}

.brand-lockup {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: clamp(360px, 28vw, 430px);
  height: auto;
  display: block;
  object-fit: contain;
  transform: translateY(-28px);
}

.brand-lockup strong {
  display: block;
  color: var(--sx-ink);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-lockup span {
  display: block;
  margin-top: 6px;
  color: var(--sx-muted);
  font-size: clamp(.62rem, 1.2vw, .72rem);
  font-weight: 700;
  letter-spacing: .14em;
}

.brand-copy {
  display: none;
}

.brand-copy h1 {
  margin: 0;
  color: #f8fbff;
  font-size: clamp(1.65rem, 3.4vw, 2.7rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-copy p {
  max-width: 320px;
  margin: 14px 0 0;
  color: rgba(226, 235, 248, .74);
  font-size: clamp(.86rem, 1.2vw, .96rem);
  line-height: 1.6;
}

.auth-form-panel {
  width: min(100%, 420px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.auth-form {
  width: 100%;
  padding: clamp(24px, 2.6vw, 32px);
  border: 1px solid rgba(207, 216, 231, .92);
  border-radius: 12px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 24px 68px rgba(33, 47, 82, .12);
  backdrop-filter: blur(10px);
}

.form-header {
  margin-bottom: 22px;
}

.form-header h1 {
  margin: 0;
  color: var(--sx-ink);
  font-size: clamp(1.45rem, 2.2vw, 1.75rem);
  line-height: 1.15;
  font-weight: 800;
}

.form-header p {
  margin: 9px 0 0;
  color: var(--sx-muted);
  font-size: .9rem;
  line-height: 1.45;
}

.auth-field {
  margin-bottom: 14px;
}

.auth-field label {
  display: block;
  margin-bottom: 8px;
  color: var(--sx-ink);
  font-size: .8rem;
  font-weight: 700;
}

.input-shell {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 10px;
  color: var(--sx-blue);
  background: #f0f5ff;
  font-size: .92rem;
  pointer-events: none;
}

.auth-form .form-control {
  width: 100%;
  min-height: 48px;
  padding: 10px 44px 10px 56px;
  border: 1px solid #d6dfec;
  border-radius: 13px;
  background: #fff;
  color: var(--sx-ink);
  font-size: .88rem;
  font-weight: 600;
  box-shadow: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.auth-form .form-control::placeholder {
  color: #8792a6;
}

.auth-form .form-control:focus {
  border-color: #7aa7ff;
  box-shadow: 0 0 0 .2rem rgba(21, 93, 252, .13);
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 10px;
  color: #7a8498;
  background: transparent;
  font-size: 1rem;
}

.password-toggle:hover,
.password-toggle:focus {
  color: var(--sx-blue);
  background: #eef4ff;
}

.form-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 18px;
  color: #26324a;
  font-size: .8rem;
}

.remember-option {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.remember-option input {
  width: 15px;
  height: 15px;
  accent-color: var(--sx-blue);
}

.form-options a {
  color: var(--sx-blue-dark);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.form-options a:hover {
  text-decoration: underline;
}

.login-submit {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #216bff, #1557ff);
  color: #fff;
  box-shadow: 0 18px 34px rgba(21, 93, 252, .24);
  font-size: .92rem;
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.login-submit:hover,
.login-submit:focus {
  background: var(--sx-blue-dark);
  box-shadow: 0 16px 32px rgba(21, 93, 252, .28);
  transform: translateY(-1px);
}

.auth-form .alert {
  border-radius: 8px;
  font-size: .76rem;
  font-weight: 600;
}

.invalid-feedback {
  font-weight: 600;
}

.was-validated .auth-field:has(.form-control:invalid) .invalid-feedback {
  display: block;
}

.auth-footer-strip {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  color: var(--sx-muted);
  font-size: .78rem;
  text-align: center;
}

@media (max-width: 860px) {
  .auth-shell {
    gap: 18px;
    padding: 30px 18px;
  }

  .auth-visual {
    text-align: center;
  }

  .brand-copy h1,
  .brand-copy p {
    display: none;
  }

  .auth-form {
    max-width: none;
  }

  .auth-footer-strip {
    max-width: none;
  }
}

@media (max-height: 720px) {
  .auth-shell {
    gap: 18px;
    padding-top: 24px;
  }
}

@media (max-width: 480px) {
  .auth-shell {
    gap: 20px;
    padding: 18px 14px;
  }

  .brand-lockup {
    gap: 10px;
  }

  .brand-logo {
    width: min(78vw, 328px);
  }

  .brand-lockup strong {
    font-size: 1.12rem;
  }

  .brand-lockup span {
    margin-top: 7px;
    font-size: .66rem;
    letter-spacing: .14em;
  }

  .auth-form {
    padding: 22px 16px;
    border-radius: 12px;
  }

  .form-header {
    margin-bottom: 22px;
  }

  .form-header h1 {
    font-size: 1.35rem;
  }

  .form-header p,
  .form-options,
  .auth-footer-strip {
    font-size: .84rem;
  }

  .auth-form .form-control {
    min-height: 46px;
    font-size: .86rem;
    padding-left: 54px;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .auth-footer-strip {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
  }
}
