*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body.auth-page {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: #172033;
  background:
    radial-gradient(
      circle at 12% 12%,
      rgba(15, 95, 143, 0.12),
      transparent 30%
    ),
    radial-gradient(
      circle at 88% 88%,
      rgba(245, 158, 11, 0.11),
      transparent 28%
    ),
    #edf2f7;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input {
  font: inherit;
}

.auth-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
}

.auth-card {
  width: min(1180px, 100%);
  min-height: 690px;
  display: grid;
  grid-template-columns:
    minmax(0, 1.06fr)
    minmax(430px, 0.94fr);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 30px;
  background-color: #fff;
  box-shadow:
    0 35px 90px rgba(15, 23, 42, 0.14),
    0 10px 30px rgba(15, 23, 42, 0.08);
}

.auth-intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(42px, 6vw, 76px);
  color: #fff;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--auth-primary) 94%, #000 6%),
    color-mix(in srgb, var(--auth-primary) 68%, var(--auth-secondary) 32%)
  );
}

.auth-intro::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
}

.auth-decoration {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(6px);
}

.auth-decoration-one {
  top: -130px;
  right: -130px;
  width: 360px;
  height: 360px;
}

.auth-decoration-two {
  right: 60px;
  bottom: -140px;
  width: 290px;
  height: 290px;
}

.auth-intro-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 15px;
  color: inherit;
  text-decoration: none;
}

.auth-brand:hover {
  color: inherit;
}

.auth-brand-logo,
.auth-mobile-logo {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  color: var(--auth-primary);
  background-color: #fff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
}

.auth-brand-logo {
  width: 72px;
  height: 72px;
  border-radius: 21px;
}

.auth-brand-logo img,
.auth-mobile-logo img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 7px;
  object-fit: contain;
}

.auth-brand-logo i {
  font-size: 2rem;
}

.auth-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.auth-brand-text strong {
  max-width: 360px;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.auth-brand-text small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
}

.auth-intro-copy {
  max-width: 570px;
  margin: auto 0;
  padding: 54px 0 48px;
}

.auth-eyebrow,
.auth-form-eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.auth-eyebrow {
  padding: 9px 14px;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.auth-intro-copy h1 {
  max-width: 590px;
  margin: 24px 0 18px;
  color: #fff;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  font-weight: 780;
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.auth-intro-copy p {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.75;
}

.auth-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.auth-feature {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  background-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.auth-feature > span {
  width: 34px;
  height: 34px;
  display: inline-grid;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 10px;
  color: var(--auth-primary);
  background-color: #fff;
}

.auth-feature div {
  min-width: 0;
}

.auth-feature strong,
.auth-feature small {
  display: block;
}

.auth-feature strong {
  margin-bottom: 3px;
  font-size: 0.85rem;
}

.auth-feature small {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.72rem;
  line-height: 1.45;
}

.auth-form-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(42px, 6vw, 74px) clamp(34px, 6vw, 72px);
  background-color: #fff;
}

.auth-mobile-brand {
  display: none;
}

.auth-form-heading {
  margin-bottom: 28px;
}

.auth-form-eyebrow {
  margin-bottom: 15px;
  padding: 7px 11px;
  color: var(--auth-primary);
  background: color-mix(in srgb, var(--auth-primary) 10%, #fff 90%);
}

.auth-form-heading h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  font-weight: 760;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.auth-form-heading p {
  max-width: 440px;
  margin: 12px 0 0;
  color: #64748b;
  line-height: 1.65;
}

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 13px;
  font-size: 0.9rem;
}

.auth-alert > i {
  margin-top: 3px;
}

.auth-form {
  display: grid;
  gap: 21px;
}

.auth-field .form-label {
  margin-bottom: 8px;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 700;
}

.auth-security-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #94a3b8;
  font-size: 0.72rem;
}

.auth-input-group {
  position: relative;
}

.auth-input-icon {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 17px;
  display: inline-flex;
  color: #94a3b8;
  transform: translateY(-50%);
  pointer-events: none;
}

.auth-input-group .form-control {
  min-height: 56px;
  padding: 13px 52px 13px 48px;
  border: 1px solid #d9e2ec;
  border-radius: 14px;
  color: #172033;
  background-color: #f8fafc;
  box-shadow: none;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.auth-input-group .form-control::placeholder {
  color: #9aa8b9;
}

.auth-input-group .form-control:hover {
  border-color: #bac7d5;
  background-color: #fff;
}

.auth-input-group .form-control:focus {
  border-color: var(--auth-primary);
  background-color: #fff;
  box-shadow: 0 0 0 4px
    color-mix(in srgb, var(--auth-primary) 13%, transparent 87%);
}

.auth-input-group:focus-within .auth-input-icon {
  color: var(--auth-primary);
}

.auth-password-toggle {
  position: absolute;
  z-index: 4;
  top: 50%;
  right: 9px;
  width: 39px;
  height: 39px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: #64748b;
  background-color: transparent;
  transform: translateY(-50%);
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
  color: var(--auth-primary);
  background: color-mix(in srgb, var(--auth-primary) 9%, #fff 91%);
  outline: none;
}

.auth-submit {
  min-height: 56px;
  margin-top: 3px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--auth-primary),
    color-mix(in srgb, var(--auth-primary) 72%, var(--auth-secondary) 28%)
  );
  box-shadow: 0 14px 28px
    color-mix(in srgb, var(--auth-primary) 24%, transparent 76%);
  font-weight: 750;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease;
}

.auth-submit:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 18px 34px
    color-mix(in srgb, var(--auth-primary) 31%, transparent 69%);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-submit:disabled {
  opacity: 0.75;
  cursor: wait;
}

.auth-submit-content,
.auth-submit-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-submit-content i {
  transition: transform 160ms ease;
}

.auth-submit:hover .auth-submit-content i {
  transform: translateX(4px);
}

.auth-role-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.auth-role-info span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #64748b;
  background-color: #f8fafc;
  font-size: 0.75rem;
  font-weight: 650;
}

.auth-help {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 22px;
  padding: 13px 15px;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  color: #64748b;
  background-color: #f8fafc;
  font-size: 0.8rem;
}

.auth-help i {
  margin-top: 3px;
  color: var(--auth-primary);
}

.auth-help p {
  margin: 0;
  line-height: 1.55;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  margin-top: 22px;
  color: var(--auth-primary);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.auth-back-link:hover {
  color: color-mix(in srgb, var(--auth-primary) 78%, #000 22%);
}

.auth-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 28px;
  color: #94a3b8;
  font-size: 0.72rem;
  line-height: 1.5;
}

.auth-footer-divider {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background-color: #cbd5e1;
}

.invalid-feedback {
  margin-top: 6px;
  font-size: 0.76rem;
}

.was-validated .form-control:invalid {
  border-color: #dc3545;
  box-shadow: none;
}

@media (max-width: 1050px) {
  .auth-card {
    grid-template-columns:
      minmax(0, 0.95fr)
      minmax(400px, 1.05fr);
  }

  .auth-features {
    grid-template-columns: 1fr;
  }

  .auth-feature small {
    display: none;
  }
}

@media (max-width: 820px) {
  .auth-shell {
    display: block;
    padding: 0;
  }

  .auth-card {
    min-height: 100vh;
    min-height: 100svh;
    grid-template-columns: 1fr;
    border: 0;
    border-radius: 0;
  }

  .auth-intro {
    display: none;
  }

  .auth-form-panel {
    min-height: 100vh;
    min-height: 100svh;
    justify-content: flex-start;
    padding: max(32px, env(safe-area-inset-top))
      max(28px, env(safe-area-inset-right))
      max(28px, env(safe-area-inset-bottom))
      max(28px, env(safe-area-inset-left));
  }

  .auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: clamp(42px, 10vh, 84px);
  }

  .auth-mobile-logo {
    width: 54px;
    height: 54px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    color: var(--auth-primary);
    background-color: #fff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  }

  .auth-mobile-logo i {
    font-size: 1.4rem;
  }

  .auth-mobile-brand div {
    display: flex;
    min-width: 0;
    flex-direction: column;
  }

  .auth-mobile-brand strong {
    overflow: hidden;
    color: #172033;
    font-size: 0.98rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .auth-mobile-brand small {
    color: #94a3b8;
    font-size: 0.74rem;
  }

  .auth-form-heading {
    margin-bottom: 25px;
  }

  .auth-form-heading p {
    max-width: none;
  }

  .auth-footer {
    margin-top: auto;
    padding-top: 34px;
  }
}

@media (max-width: 480px) {
  .auth-form-panel {
    padding-right: 20px;
    padding-left: 20px;
  }

  .auth-mobile-brand {
    margin-bottom: 45px;
  }

  .auth-form-heading h2 {
    font-size: 1.75rem;
  }

  .auth-input-group .form-control,
  .auth-submit {
    min-height: 54px;
  }

  .auth-role-info {
    justify-content: center;
  }

  .auth-back-link {
    align-self: center;
  }

  .auth-footer {
    justify-content: center;
    text-align: center;
  }
}

@media (max-height: 720px) and (min-width: 821px) {
  .auth-shell {
    align-items: start;
  }

  .auth-card {
    min-height: 640px;
  }

  .auth-intro,
  .auth-form-panel {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .auth-intro-copy {
    padding-top: 36px;
    padding-bottom: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
