:root {
  color-scheme: light;
  --page: #f3f7fc;
  --surface: #ffffff;
  --text: #172033;
  --muted: #657188;
  --line: #dce5f0;
  --blue: #0877e1;
  --blue-dark: #005fbe;
  --blue-soft: #edf6ff;
  --danger: #c53f3a;
  --success: #0d7a55;
  --shadow: 0 32px 80px rgba(30, 76, 126, 0.16);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
}

body {
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--page);
  letter-spacing: 0;
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  content: "";
  pointer-events: none;
}

body::before {
  inset: 8% auto 8% 7%;
  width: 1px;
  background: rgba(8, 119, 225, 0.12);
}

body::after {
  inset: auto 5% 12% 5%;
  height: 1px;
  background: rgba(8, 119, 225, 0.1);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 5;
  padding: 9px 12px;
  border-radius: 6px;
  color: #ffffff;
  background: var(--blue-dark);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.auth-shell {
  display: grid;
  grid-template-rows: 1fr auto;
  width: min(100%, 1120px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(28px, 6vh, 64px) 32px max(24px, env(safe-area-inset-bottom));
}

.auth-panel {
  align-self: center;
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(440px, 1.08fr);
  width: 100%;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(34, 80, 128, 0.14);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 44px 46px 40px;
  overflow: hidden;
  color: #ffffff;
  background: var(--blue);
}

.auth-intro::before,
.auth-intro::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.auth-intro::before {
  top: 112px;
  right: -92px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  transform: rotate(24deg);
}

.auth-intro::after {
  right: 54px;
  bottom: 112px;
  width: 74px;
  height: 74px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  border-left: 1px solid rgba(255, 255, 255, 0.24);
}

.auth-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 7px);
  grid-template-rows: repeat(2, 7px);
  gap: 4px;
  width: 40px;
  height: 40px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.brand-mark span {
  display: block;
  border-radius: 2px;
  background: #ffffff;
}

.brand-mark span:last-child {
  opacity: 0.54;
}

.brand-name,
.brand-meta,
.section-label,
.intro-copy p,
.auth-copy p,
.form-message,
.password-help,
.auth-footer {
  margin: 0;
}

.brand-name {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.25;
}

.brand-meta {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 500;
}

.intro-copy {
  position: relative;
  z-index: 1;
  width: min(100%, 340px);
  margin: auto 0;
  padding: 72px 0;
}

.section-label {
  color: var(--blue);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.auth-intro .section-label {
  color: rgba(255, 255, 255, 0.7);
}

.intro-copy h1 {
  margin: 18px 0 0;
  max-width: 320px;
  font-size: clamp(40px, 4.2vw, 58px);
  font-weight: 680;
  line-height: 1.08;
  text-wrap: balance;
}

.intro-copy > p:last-child {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.7;
}

.intro-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.intro-line {
  width: 28px;
  height: 1px;
  background: rgba(255, 255, 255, 0.48);
}

.auth-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 64px clamp(46px, 7vw, 84px);
  background: var(--surface);
}

.auth-copy {
  margin-bottom: 34px;
}

.auth-copy h2 {
  margin: 10px 0 0;
  font-size: 34px;
  font-weight: 680;
  line-height: 1.14;
  text-wrap: balance;
}

.auth-copy > p:last-child {
  margin-top: 12px;
  max-width: 36ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.field + .field {
  margin-top: 20px;
}

.field-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

label {
  display: block;
  margin-bottom: 9px;
  color: #344158;
  font-size: 13px;
  font-weight: 650;
}

input {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  color: var(--text);
  background: #f9fbfd;
  font-size: 16px;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

input:hover {
  border-color: #b9c9dc;
}

input:focus {
  border-color: rgba(8, 119, 225, 0.64);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(8, 119, 225, 0.11);
}

.text-action,
.help-toggle {
  padding: 0;
  border: 0;
  color: var(--blue-dark);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.text-action {
  margin-bottom: 9px;
}

.text-action:hover,
.help-toggle:hover {
  color: var(--blue);
}

.text-action:focus-visible,
.help-toggle:focus-visible,
.primary-button:focus-visible,
.button-link:focus-visible {
  outline: 3px solid rgba(8, 119, 225, 0.24);
  outline-offset: 3px;
}

.form-message {
  min-height: 24px;
  margin-top: 14px;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.55;
}

.form-message.is-success {
  color: var(--success);
}

.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 52px;
  padding: 13px 18px;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  background: var(--blue);
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.primary-button:hover {
  background: var(--blue-dark);
  box-shadow: 0 12px 28px rgba(8, 119, 225, 0.23);
  transform: translateY(-1px);
}

.primary-button:active {
  transform: translateY(1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.62;
  box-shadow: none;
  transform: none;
}

.button-arrow {
  font-size: 19px;
  font-weight: 400;
  line-height: 1;
}

.help-toggle {
  display: block;
  margin: 20px 0 0 auto;
}

.password-help {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 2px solid var(--blue);
  color: var(--muted);
  background: var(--blue-soft);
  font-size: 12px;
  line-height: 1.6;
}

.auth-result {
  align-items: flex-start;
}

.auth-result .auth-copy {
  margin: 22px 0 30px;
}

.result-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(8, 119, 225, 0.2);
  border-radius: 8px;
  background: var(--blue-soft);
}

.result-mark span {
  width: 16px;
  height: 16px;
  border: 2px solid var(--blue);
  border-top-color: transparent;
  border-radius: 50%;
  animation: auth-spin 800ms linear infinite;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

.auth-footer {
  display: flex;
  justify-content: space-between;
  padding: 20px 4px 0;
  color: #7b8799;
  font-size: 11px;
}

@media (max-width: 820px) {
  .auth-shell {
    width: min(100%, 600px);
    padding: 20px 18px max(18px, env(safe-area-inset-bottom));
  }

  .auth-panel {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .auth-intro {
    min-height: 228px;
    padding: 30px 30px 26px;
  }

  .auth-intro::before {
    top: 30px;
    right: -70px;
    width: 190px;
    height: 190px;
  }

  .auth-intro::after {
    display: none;
  }

  .intro-copy {
    margin: auto 0 0;
    padding: 30px 0 0;
  }

  .intro-copy h1 {
    margin-top: 10px;
    font-size: 34px;
  }

  .intro-copy > p:last-child,
  .intro-foot {
    display: none;
  }

  .auth-form-panel {
    padding: 38px 30px 34px;
  }

  .auth-copy {
    margin-bottom: 28px;
  }

  .auth-copy h2 {
    font-size: 29px;
  }
}

@media (max-width: 460px) {
  .auth-shell {
    padding: 0 0 max(16px, env(safe-area-inset-bottom));
  }

  .auth-panel {
    border-width: 0 0 1px;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-intro {
    min-height: 212px;
    padding: max(24px, env(safe-area-inset-top)) 24px 24px;
  }

  .auth-form-panel {
    padding: 34px 24px 36px;
  }

  .auth-footer {
    padding-inline: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
