:root {
  --navy: #0d1b2a;
  --navy-deep: #04152d;
  --blue: #1565ff;
  --teal: #00bfa6;
  --surface: #ffffff;
  --page: #f1f3f5;
  --text: #0d1b2a;
  --muted: #71809c;
  --line: #d9e0ea;
  --danger: #b42318;
}

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

html {
  min-width: 320px;
}

body {
  align-items: center;
  background:
    radial-gradient(circle at 12% 8%, rgba(13, 27, 42, 0.08), transparent 24rem),
    linear-gradient(135deg, #f5f7f9 0%, #eef1f4 100%);
  color: var(--text);
  display: flex;
  font-family: "Poppins", "Segoe UI", sans-serif;
  justify-content: center;
  margin: 0;
  min-height: 100vh;
  padding: 24px;
}

button,
input {
  font: inherit;
}

.login-shell {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 18px 58px rgba(13, 27, 42, 0.15);
  display: grid;
  grid-template-columns: minmax(430px, 46%) minmax(0, 54%);
  min-height: min(952px, calc(100vh - 48px));
  overflow: hidden;
  width: min(1488px, calc(100vw - 48px));
}

.form-panel {
  align-items: center;
  background: #fff;
  display: flex;
  justify-content: center;
  padding: 52px clamp(42px, 6vw, 96px);
  position: relative;
  z-index: 2;
}

.form-wrap {
  width: min(100%, 470px);
}

.login-logo {
  height: 136px;
  margin: 0 0 28px -2px;
  max-width: 390px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.login-logo img {
  display: block;
  height: auto;
  max-width: none;
  position: absolute;
  transform: translate(-42px, -31px);
  width: 390px;
}

.form-heading {
  margin-bottom: 30px;
}

.form-heading h1 {
  font-size: clamp(1.65rem, 2.2vw, 2rem);
  letter-spacing: -0.04em;
  line-height: 1.2;
  margin: 0 0 7px;
}

.form-heading p {
  color: var(--muted);
  font-size: 0.98rem;
  margin: 0;
}

.form-alert {
  align-items: flex-start;
  background: #fff1f0;
  border: 1px solid #fecdca;
  border-radius: 10px;
  color: var(--danger);
  display: flex;
  font-size: 0.78rem;
  gap: 9px;
  margin: -12px 0 20px;
  padding: 11px 13px;
}

.form-alert svg {
  fill: none;
  flex: 0 0 18px;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 18px;
}

.login-form {
  display: grid;
  gap: 20px;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group label {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 500;
}

.input-wrap {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  min-height: 56px;
  padding: 0 15px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.input-wrap:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(21, 101, 255, 0.11);
}

.input-wrap > svg {
  fill: none;
  flex: 0 0 21px;
  height: 21px;
  margin-right: 13px;
  stroke: #8794aa;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 21px;
}

.input-wrap input {
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 0.92rem;
  min-width: 0;
  outline: 0;
  padding: 0;
  width: 100%;
}

.input-wrap input::placeholder {
  color: #9aa5b7;
  opacity: 1;
}

/* O botão da interface substitui o visualizador nativo do Edge. */
.input-wrap input[type="password"]::-ms-reveal,
.input-wrap input[type="password"]::-ms-clear {
  display: none;
}

.has-error .input-wrap {
  border-color: #f04438;
}

.field-error {
  color: var(--danger);
  font-size: 0.75rem;
}

.password-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: #8794aa;
  cursor: pointer;
  display: flex;
  justify-content: center;
  margin: 0 -6px 0 8px;
  padding: 7px;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--blue);
}

.password-toggle:focus-visible {
  border-radius: 6px;
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.password-toggle svg {
  fill: none;
  height: 21px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 21px;
}

.form-options {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  margin-top: -2px;
}

.password-help {
  color: var(--blue);
  font-size: 0.7rem;
  text-align: right;
  text-decoration: none;
}

.password-help:hover {
  text-decoration: underline;
}

.login-button {
  background: linear-gradient(100deg, var(--blue) 0%, #0e72ff 100%);
  border: 0;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(21, 101, 255, 0.18);
  color: #fff;
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 600;
  min-height: 56px;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.login-button:hover {
  box-shadow: 0 11px 24px rgba(21, 101, 255, 0.28);
  transform: translateY(-1px);
}

.login-button:active {
  transform: translateY(0);
}

.login-button:focus-visible {
  outline: 3px solid rgba(21, 101, 255, 0.3);
  outline-offset: 3px;
}

.copyright {
  border-top: 1px solid #e2e7ee;
  color: #7c89a2;
  font-size: 0.72rem;
  margin: 54px 0 0;
  padding-top: 30px;
  text-align: center;
}

.password-reset-shell {
  min-height: min(760px, calc(100vh - 48px));
}

.password-reset-wrap .login-logo {
  margin-bottom: 20px;
}

.password-reset-form {
  margin-top: 24px;
}

.auth-back-link {
  color: var(--blue);
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 22px;
  text-align: center;
  text-decoration: none;
}

.auth-back-link:hover {
  text-decoration: underline;
}

.auth-state-icon {
  align-items: center;
  background: #e9faf6;
  border-radius: 16px;
  color: #008f7c;
  display: flex;
  height: 58px;
  justify-content: center;
  margin-bottom: 22px;
  width: 58px;
}

.auth-state-icon.is-error {
  background: #fff0f2;
  color: var(--danger);
}

.auth-state-icon svg {
  fill: none;
  height: 29px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 29px;
}

.auth-state-heading {
  margin-bottom: 28px;
}

.auth-state-heading p {
  line-height: 1.7;
}

.auth-button-link {
  align-items: center;
  display: flex;
  justify-content: center;
  text-decoration: none;
}

.password-reset-story .story-content {
  justify-content: center;
}

.story-panel {
  background:
    radial-gradient(circle at 17% 13%, rgba(21, 101, 255, 0.1) 0 40px, transparent 41px),
    radial-gradient(circle at 92% 54%, rgba(21, 101, 255, 0.09) 0 175px, transparent 176px),
    linear-gradient(145deg, #03152d 0%, #061d3e 58%, #03162f 100%);
  color: #fff;
  overflow: hidden;
  padding: clamp(74px, 8vh, 105px) clamp(54px, 6vw, 90px) 58px;
  position: relative;
}

.story-panel::before,
.story-panel::after {
  border: 1px solid rgba(21, 101, 255, 0.16);
  border-radius: 45%;
  content: "";
  height: 320px;
  position: absolute;
  right: -150px;
  top: -175px;
  transform: rotate(12deg);
  width: 390px;
}

.story-panel::after {
  height: 265px;
  right: -122px;
  top: -145px;
  width: 330px;
}

.decor {
  border: 1px solid rgba(21, 101, 255, 0.12);
  border-radius: 48%;
  position: absolute;
}

.decor-one {
  height: 260px;
  right: -120px;
  top: -117px;
  width: 300px;
}

.decor-two {
  bottom: -155px;
  height: 350px;
  right: -70px;
  transform: rotate(-30deg);
  width: 470px;
}

.decor-three {
  bottom: -115px;
  height: 270px;
  right: 5px;
  transform: rotate(-30deg);
  width: 390px;
}

.story-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.story-copy {
  max-width: 560px;
}

.story-eyebrow {
  color: var(--teal);
  font-size: 0.77rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  margin: 0 0 26px;
}

.story-copy h2 {
  font-size: clamp(2.1rem, 3.4vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.19;
  margin: 0;
}

.story-copy h2 strong {
  color: var(--blue);
  font-weight: 700;
}

.story-line {
  background: var(--blue);
  display: block;
  height: 3px;
  margin: 30px 0 24px;
  width: 52px;
}

.story-description {
  color: rgba(255, 255, 255, 0.79);
  font-size: 0.93rem;
  line-height: 1.8;
  margin: 0;
  max-width: 480px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 64px;
}

.feature-item {
  align-items: center;
  border-left: 1px solid rgba(255, 255, 255, 0.21);
  display: flex;
  flex-direction: column;
  margin: 0;
  min-width: 0;
  padding: 0 13px;
  text-align: center;
}

.feature-item:first-child {
  border-left: 0;
}

.feature-item svg {
  fill: none;
  height: 47px;
  margin-bottom: 16px;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
  width: 47px;
}

.feature-item p {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(0.64rem, 0.8vw, 0.78rem);
  line-height: 1.65;
  margin: 0;
}

@media (max-height: 820px) and (min-width: 821px) {
  body {
    padding: 16px;
  }

  .login-shell {
    min-height: calc(100vh - 32px);
    width: calc(100vw - 32px);
  }

  .form-panel {
    padding-bottom: 28px;
    padding-top: 28px;
  }

  .login-logo {
    height: 118px;
    margin-bottom: 14px;
    width: 340px;
  }

  .login-logo img {
    transform: translate(-36px, -26px);
    width: 340px;
  }

  .form-heading {
    margin-bottom: 20px;
  }

  .form-heading h1 {
    font-size: 1.55rem;
  }

  .form-heading p {
    font-size: 0.86rem;
  }

  .login-form {
    gap: 14px;
  }

  .input-wrap,
  .login-button {
    min-height: 50px;
  }

  .copyright {
    margin-top: 26px;
    padding-top: 20px;
  }

  .story-panel {
    padding-bottom: 34px;
    padding-top: 48px;
  }

  .story-eyebrow {
    margin-bottom: 18px;
  }

  .story-copy h2 {
    font-size: clamp(1.9rem, 3vw, 2.55rem);
  }

  .story-line {
    margin-bottom: 18px;
    margin-top: 20px;
  }

  .story-description {
    font-size: 0.82rem;
    line-height: 1.65;
  }

  .feature-grid {
    margin-top: 28px;
  }

  .feature-item svg {
    height: 38px;
    margin-bottom: 9px;
    width: 38px;
  }
}

@media (max-width: 1120px) {
  body {
    padding: 16px;
  }

  .login-shell {
    grid-template-columns: minmax(400px, 48%) minmax(0, 52%);
    min-height: calc(100vh - 32px);
    width: calc(100vw - 32px);
  }

  .form-panel {
    padding-left: 46px;
    padding-right: 46px;
  }

  .story-panel {
    padding-left: 48px;
    padding-right: 48px;
  }

  .feature-grid {
    gap: 22px 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-item:nth-child(3) {
    border-left: 0;
  }
}

@media (max-width: 820px) {
  body {
    background: #fff;
    padding: 0;
  }

  .login-shell {
    border-radius: 0;
    box-shadow: none;
    display: block;
    min-height: 100vh;
    width: 100%;
  }

  .form-panel {
    min-height: 100vh;
    padding: 38px 28px;
  }

  .form-wrap {
    width: min(100%, 500px);
  }

  .story-panel {
    display: none;
  }
}

@media (max-width: 480px) {
  .form-panel {
    padding: 28px 20px;
  }

  .login-logo {
    height: 118px;
    margin-bottom: 22px;
    width: 330px;
  }

  .login-logo img {
    transform: translate(-36px, -26px);
    width: 340px;
  }

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

  .password-help {
    text-align: left;
  }

  .copyright {
    margin-top: 40px;
  }
}

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