:root {
  color-scheme: dark;
  --ie-frontdoor-bg: #050913;
  --ie-frontdoor-shell: #07111f;
  --ie-frontdoor-shell-border: rgba(131, 160, 255, 0.18);
  --ie-frontdoor-text: #e6eeff;
  --ie-frontdoor-muted: #93a6c8;
  --ie-frontdoor-accent: #3b82ff;
  --ie-frontdoor-accent-strong: #1d5ff0;
  --ie-frontdoor-accent-soft: rgba(59, 130, 255, 0.18);
  --ie-frontdoor-panel: rgba(8, 16, 31, 0.78);
  --ie-frontdoor-panel-border: rgba(131, 160, 255, 0.22);
  --ie-frontdoor-field: rgba(5, 10, 23, 0.72);
  --ie-frontdoor-field-border: rgba(130, 160, 255, 0.34);
  --ie-frontdoor-error: #ffb4b4;
  --ie-frontdoor-error-bg: rgba(153, 27, 27, 0.18);
  --ie-frontdoor-notice: #9ff6df;
  --ie-frontdoor-notice-bg: rgba(15, 118, 110, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(120% 120% at 15% 10%, rgba(67, 109, 255, 0.22) 0%, transparent 38%),
    radial-gradient(140% 120% at 90% 90%, rgba(17, 85, 204, 0.18) 0%, transparent 42%),
    linear-gradient(180deg, #0a1223 0%, #050913 100%);
  color: var(--ie-frontdoor-text);
}

body.ie-frontdoor-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.ie-frontdoor-stage {
  position: relative;
  width: min(1180px, 96vw);
  min-height: min(700px, calc(100vh - 56px));
  display: block;
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(140% 130% at 60% 14%, #182753 0%, #0b1430 42%, #060a15 100%);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.48),
    0 0 0 1px var(--ie-frontdoor-shell-border);
}

.ie-frontdoor__background {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ie-frontdoor__background::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(4, 8, 18, 0.36) 0%, rgba(4, 8, 18, 0.28) 26%, rgba(4, 8, 18, 0.12) 58%, rgba(4, 8, 18, 0.08) 100%),
    radial-gradient(120% 140% at 18% 50%, rgba(7, 13, 26, 0.44) 0%, transparent 44%);
}

.ie-frontdoor__background canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.92;
  filter: saturate(0.98) brightness(0.98);
}

.ie-frontdoor {
  position: relative;
  z-index: 2;
  min-height: 100%;
}

.ie-frontdoor {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  background: transparent;
}

.ie-frontdoor__panel {
  width: 100%;
  max-width: 493px;
  padding: 51px 60px 43px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

.ie-frontdoor__title {
  margin: 0;
  font-size: clamp(1.44rem, 1.84vw, 2.18rem);
  line-height: 1.03;
  letter-spacing: -0.03em;
  color: #edf4ff;
}

.ie-frontdoor__subtitle {
  margin: 6px 0 0;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--ie-frontdoor-muted);
}

.ie-frontdoor__form {
  margin-top: 28px;
  display: grid;
  gap: 16px;
}

.ie-frontdoor__viewer {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(131, 160, 255, 0.16);
  display: grid;
  gap: 14px;
}

.ie-frontdoor__viewer-head {
  display: grid;
  gap: 6px;
}

.ie-frontdoor__viewer-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #dce9ff;
}

.ie-frontdoor__viewer-copy {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ie-frontdoor-muted);
}

.ie-frontdoor__viewer-actions {
  display: flex;
  justify-content: stretch;
}

.ie-frontdoor__viewer-feedback {
  min-height: 48px;
  display: grid;
  align-content: start;
  gap: 6px;
}

.ie-frontdoor__viewer-status {
  min-height: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ie-frontdoor-muted);
}

.ie-frontdoor__viewer-status.is-error {
  color: var(--ie-frontdoor-error);
}

.ie-frontdoor__field {
  display: grid;
  gap: 8px;
}

.ie-frontdoor__field label,
.ie-frontdoor__field > span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9ab0df;
}

.ie-frontdoor__input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--ie-frontdoor-field-border);
  border-radius: 8px;
  background: var(--ie-frontdoor-field);
  padding: 11px 13px;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.ie-frontdoor__input-row:focus-within {
  border-color: rgba(126, 195, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(46, 122, 255, 0.22);
}

.ie-frontdoor__field input[type="text"],
.ie-frontdoor__field input[type="password"] {
  width: 100%;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ie-frontdoor-text);
  font: inherit;
}

.ie-frontdoor__field input::placeholder {
  color: #6f89be;
}

.ie-frontdoor__field-error {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ie-frontdoor-error);
}

.ie-frontdoor__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.ie-frontdoor__meta--compact {
  margin-top: -8px;
}

.ie-frontdoor__checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ie-frontdoor-muted);
}

.ie-frontdoor__checkbox input {
  accent-color: var(--ie-frontdoor-accent);
}

.ie-frontdoor__link {
  color: #a7c2ff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.ie-frontdoor__link:hover,
.ie-frontdoor__link:focus-visible {
  color: #dce9ff;
  text-decoration: underline;
  outline: none;
}

.ie-frontdoor__submit {
  margin-top: 4px;
  height: 42px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(180deg, #2f7cff 0%, #1f5ff0 100%);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(29, 95, 255, 0.34);
  transition:
    transform 90ms ease,
    box-shadow 120ms ease,
    filter 120ms ease;
}

.ie-frontdoor__submit:hover,
.ie-frontdoor__submit:focus-visible {
  filter: brightness(1.06);
  outline: 2px solid rgba(126, 195, 255, 0.88);
  outline-offset: 1px;
  box-shadow:
    0 0 0 3px rgba(46, 122, 255, 0.28),
    0 12px 28px rgba(29, 95, 255, 0.42);
}

.ie-frontdoor__submit:active {
  transform: translateY(1px) scale(0.99);
}

.ie-frontdoor__secondary,
.ie-frontdoor__tertiary {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 90ms ease,
    box-shadow 120ms ease,
    filter 120ms ease;
}

.ie-frontdoor__secondary {
  border: none;
  background: linear-gradient(180deg, #2f7cff 0%, #1f5ff0 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(29, 95, 255, 0.34);
}

.ie-frontdoor__viewer-actions .ie-frontdoor__secondary {
  width: 100%;
}

.ie-frontdoor__secondary:hover,
.ie-frontdoor__secondary:focus-visible,
.ie-frontdoor__tertiary:hover,
.ie-frontdoor__tertiary:focus-visible {
  filter: brightness(1.06);
  outline: 2px solid rgba(126, 195, 255, 0.88);
  outline-offset: 1px;
}

.ie-frontdoor__secondary:active,
.ie-frontdoor__tertiary:active {
  transform: translateY(1px) scale(0.99);
}

.ie-frontdoor__tertiary {
  border: 1px solid rgba(131, 160, 255, 0.26);
  background: rgba(12, 22, 42, 0.74);
  color: #dce9ff;
}

.ie-frontdoor__error,
.ie-frontdoor__notice {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
}

.ie-frontdoor__viewer-feedback .ie-frontdoor__error,
.ie-frontdoor__viewer-feedback .ie-frontdoor__notice {
  margin-top: 0;
}

.ie-frontdoor__error {
  border: 1px solid rgba(255, 180, 180, 0.22);
  background: var(--ie-frontdoor-error-bg);
  color: var(--ie-frontdoor-error);
}

.ie-frontdoor__notice {
  border: 1px solid rgba(159, 246, 223, 0.18);
  background: var(--ie-frontdoor-notice-bg);
  color: var(--ie-frontdoor-notice);
}

.ie-frontdoor__help {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ie-frontdoor-muted);
}

.ie-frontdoor-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 11, 22, 0.62);
  backdrop-filter: blur(2px);
}

.ie-frontdoor-modal.ie-hidden {
  display: none !important;
}

.ie-frontdoor-modal__card {
  width: min(460px, 96vw);
  border: 1px solid rgba(131, 160, 255, 0.26);
  border-radius: 14px;
  background: linear-gradient(180deg, #101a35 0%, #0a1328 100%);
  color: #e6eeff;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.45);
}

.ie-frontdoor-modal__head {
  padding: 16px 20px 14px;
  border-bottom: 1px solid rgba(131, 160, 255, 0.18);
}

.ie-frontdoor-modal__head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.ie-frontdoor-modal__body {
  padding: 18px 20px 12px;
  display: grid;
  gap: 14px;
}

.ie-frontdoor-modal__copy {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #b1c2e6;
}

.ie-frontdoor-modal__actions {
  padding: 0 20px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.ie-password-peek-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.ie-frontdoor__input-row .ie-password-peek-wrap {
  flex: 1 1 auto;
}

.ie-password-peek-input {
  width: 100%;
  min-width: 0;
  padding-right: 36px !important;
}

.ie-password-peek-btn {
  position: absolute;
  top: 50%;
  right: 4px;
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #8db5ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  cursor: pointer;
}

.ie-password-peek-btn svg {
  width: 17px;
  height: 17px;
  display: block;
  pointer-events: none;
}

.ie-password-peek-btn:hover {
  background: rgba(83, 126, 208, 0.24);
  color: #c6ddff;
}

.ie-password-peek-btn.is-active {
  background: rgba(83, 126, 208, 0.34);
  color: #ecf4ff;
}

.ie-password-peek-btn:focus-visible {
  outline: 1px solid rgba(126, 195, 255, 0.88);
  outline-offset: 0;
}

@media (max-width: 1024px) {
  .ie-frontdoor-stage {
    min-height: auto;
  }

  .ie-frontdoor__panel {
    max-width: none;
    padding: 29px 32px 27px;
  }
}

@media (max-width: 640px) {
  body.ie-frontdoor-page {
    padding: 0;
  }

  .ie-frontdoor-stage {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
  }

  .ie-frontdoor__panel {
    padding: 23px 24px 27px;
  }

  .ie-frontdoor__title {
    font-size: 1.5rem;
  }

  .ie-frontdoor-modal__actions {
    flex-direction: column;
  }

  .ie-frontdoor__secondary,
  .ie-frontdoor__tertiary {
    width: 100%;
  }
}
