body:has(.enterprise-login) {
  margin: 0;
  background: var(--enterprise-canvas);
  color-scheme: light;
}

.enterprise-login {
  --login-ink: var(--enterprise-text);
  --login-muted: var(--enterprise-text-muted);
  --login-line: var(--enterprise-control-border);
  --login-frame: var(--enterprise-canvas);
  --login-accent: var(--enterprise-primary);
  --login-wash: var(--enterprise-primary-soft);
  --login-error: var(--enterprise-danger);
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(462px, 1fr);
  min-height: 100dvh;
  padding: 14px;
  color: var(--login-ink);
  background: var(--login-frame);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

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

.enterprise-login :is(a, button, input):focus-visible {
  outline: 2px solid var(--login-accent);
  outline-offset: 3px;
}

.enterprise-login-skip {
  position: fixed;
  z-index: 1;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  transform: translateY(-160%);
  background: #fff;
  color: var(--login-accent);
  border-radius: 8px;
}
.enterprise-login-skip:focus { transform: none; }

.enterprise-login-image {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-width: 0;
  min-height: 550px;
  overflow: hidden;
  background-color: var(--enterprise-rail);
  border-radius: 18px;
  padding: clamp(24px, 4vw, 64px);
}

@media (min-width: 821px) {
  .enterprise-login-image {
    background-image: linear-gradient(5deg, #081d29 0%, #0c2431cc 15%, #15384d10 58%), url("./assets/offshore-dawn-20260913.png");
    background-position: center, 70% center;
    background-size: cover;
  }
}

.enterprise-login-image-copy strong {
  display: block;
  margin-bottom: 6px;
  color: #fff;
  font-size: clamp(28px, 3.2vw, 49px);
  font-weight: 620;
  letter-spacing: .04em;
  line-height: 1.23;
}

.enterprise-login-image-copy p { margin: 0; color: #d9eaed; font-size: 15px; }

.enterprise-login-panel { display: flex; flex-direction: column; min-width: 0; padding: 12px clamp(28px, 4vw, 64px) 16px; }
.enterprise-login-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.enterprise-login-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  color: var(--login-ink);
  text-decoration: none;
}

.enterprise-login-logo { display: grid; width: 40px; height: 40px; place-items: center; flex: none; border-radius: 10px; background: var(--enterprise-rail); }
.enterprise-login-logo img { display: block; width: 25px; height: 25px; object-fit: contain; }
.enterprise-login-brand strong { display: block; font-size: 16px; letter-spacing: .04em; }
.enterprise-login-brand small { display: none; color: var(--login-muted); font-size: 12px; }
.enterprise-login-exhibit { display: inline-flex; min-height: 44px; align-items: center; gap: 5px; padding: 0 3px; color: var(--login-muted); font-size: 13px; text-decoration: none; white-space: nowrap; }
.enterprise-login-exhibit:hover { color: var(--login-accent); text-decoration: underline; text-underline-offset: 3px; }
.enterprise-login-exhibit svg { width: 16px; height: 16px; }

.enterprise-login-content { width: min(100%, 400px); margin: auto; padding: 28px 0; }
.enterprise-login-heading { margin-bottom: 24px; }
.enterprise-login-heading h1 { color: var(--login-ink); margin: 0 0 7px; font-size: clamp(29px, 3.1vw, 40px); font-weight: 650; line-height: 1.25; letter-spacing: .01em; }
.enterprise-login-heading p { margin: 0; color: var(--login-muted); font-size: 14px; }
.enterprise-login-field { margin: 0 0 14px; }
.enterprise-login-field label { display: block; margin-bottom: 6px; color: var(--login-ink); font-size: 13px; font-weight: 600; }

.enterprise-login .enterprise-login-field input:not([type=hidden]) {
  display: block;
  width: 100%;
  height: 48px;
  min-width: 0;
  margin: 0;
  padding: 0 11px;
  color: var(--login-ink);
  font: inherit;
  font-size: 16px;
  background: #fff;
  border: 1px solid var(--login-line);
  border-radius: 8px;
}

.enterprise-login .enterprise-login-field input[aria-invalid=true] { border-color: var(--login-error); }
.enterprise-login-field input::placeholder { color: var(--login-muted); font-size: 13px; opacity: 1; }

.enterprise-login-field-error { display: block; margin-top: 4px; color: var(--login-error); font-size: 12px; }
.enterprise-login-field-error:empty { display: none; }

.enterprise-login .enterprise-login-password {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
}
.enterprise-login .enterprise-login-password > input:not([type=hidden]) { padding-inline-end: 49px; }
.enterprise-login .enterprise-login-password .password-toggle {
  position: absolute;
  inset: 2px 2px auto auto;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  transform: none;
  color: var(--login-muted);
  background: #fff;
  border: 0;
  border-radius: 6px;
  box-shadow: none;
  cursor: pointer;
}
.enterprise-login .enterprise-login-password .password-toggle:hover { color: var(--login-accent); background: var(--login-wash); }
.enterprise-login .password-toggle svg { width: 18px; height: 18px; }

.enterprise-login-captcha { display: grid; grid-template-columns: minmax(0,1fr) 126px; gap: 8px; }
.enterprise-login-captcha-button {
  display: flex;
  min-height: 48px;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  background: var(--enterprise-surface-subtle);
  color: var(--enterprise-primary-hover);
  border: 1px solid var(--login-line);
  border-radius: 8px;
  cursor: pointer;
}
.enterprise-login-captcha-button:hover { background: var(--enterprise-primary-soft); }
.enterprise-login-captcha-button:disabled { cursor: wait; opacity: .68; }
.enterprise-login-captcha-button span { font: 650 17px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .09em; }
.enterprise-login-captcha-button span.is-pending { font: inherit; letter-spacing: 0; font-size: 12px; }
.enterprise-login-captcha-button small { font-size: 11px; white-space: nowrap; }

.enterprise-login-submit {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 0;
  color: #fff;
  background: var(--login-accent);
  font-size: 15px;
  font-weight: 650;
  border: 1px solid var(--login-accent);
  border-radius: 8px;
  cursor: pointer;
}
.enterprise-login-submit:hover:not(:disabled) { background: var(--enterprise-primary-hover); border-color: var(--enterprise-primary-hover); }
.enterprise-login-submit:disabled { cursor: wait; opacity: .72; }
.enterprise-login-submit svg { width: 18px; height: 18px; }

.enterprise-login-message { color: var(--login-muted); margin: 9px 0 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.enterprise-login-message:empty { margin: 0; }
.enterprise-login-message[data-error=true] { color: var(--login-error); }
.enterprise-login-help { display: block; min-height: 44px; padding: 5px 1px; margin: 4px 0 0; color: var(--enterprise-primary-hover); background: none; border: 0; border-radius: 5px; font-size: 13px; cursor: pointer; }
.enterprise-login-help:hover { text-decoration: underline; text-underline-offset: 3px; }
.enterprise-login-footer { color: var(--login-muted); font-size: 12px; }

@media (max-width: 820px) {
  .enterprise-login { display: flex; flex-direction: column; padding: 0; }
  .enterprise-login-image { display: none; }
  .enterprise-login-panel { flex: 1; padding: 16px clamp(18px, 5vw, 44px) 20px; }
  .enterprise-login-brand small { display: block; }
  .enterprise-login-content { padding: 30px 0; margin-top: clamp(28px, 7svh, 60px); }
}
@media (max-width: 380px) {
  .enterprise-login-captcha { grid-template-columns: minmax(0,1fr) 112px; }
}

.enterprise-login-panel {
  padding-inline: clamp(24px, 4vw, 60px);
}

.enterprise-login-heading h1 { text-wrap: balance; }
.enterprise-login-heading p { text-wrap: pretty; }

.enterprise-login-content {
  width: min(100%, 29rem);
  padding: clamp(20px, 2.5vw, 32px);
  border: 1px solid var(--enterprise-border);
  border-radius: 16px;
  background: var(--enterprise-surface);
  box-shadow: 0 10px 28px var(--enterprise-shadow-subtle);
}

.enterprise-login-field label { font-size: .875rem; }

.enterprise-login :is(.enterprise-login-submit, .enterprise-login-captcha-button) {
  min-block-size: 48px;
}

@media (max-width: 820px) {
  .enterprise-login-panel { padding-inline: clamp(14px, 5vw, 34px); }
  .enterprise-login-content { margin-top: clamp(22px, 7svh, 54px); }
}

@media (max-width: 380px) {
  .enterprise-login-content { padding-inline: 14px; }
  .enterprise-login-captcha { grid-template-columns: minmax(0, 1fr) 104px; }
}

@media (pointer: coarse) {
  .enterprise-login :is(.enterprise-login-brand, .enterprise-login-exhibit, .enterprise-login-help) {
    min-block-size: 44px;
  }
}
