/* ADVSA Login v3 — identidade oficial aplicada sobre a composição curva Aurora. */
:root {
  --auth-navy: #0b1d36;
  --auth-navy-deep: #031326;
  --auth-ink: #0b1d36;
  --auth-gold: #c49a3a;
  --auth-teal: #0fa38a;
  --auth-paper: #f7f8f9;
  --auth-muted: #65738a;
  --auth-line: #d8dee6;
  --auth-danger: #9b3232;
  --auth-success: #316b4c;
  --auth-ui: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --auth-display: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  background: var(--auth-paper);
}

body.advsa-login {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--auth-ink);
  font-family: var(--auth-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.login-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--auth-paper);
  isolation: isolate;
}

.login-brand {
  position: absolute;
  z-index: 2;
  inset: 0 auto 0 0;
  width: 56.5vw;
  min-width: 720px;
  overflow: hidden;
  color: #fff;
  border-right: 2px solid rgba(15, 163, 138, 0.95);
  border-radius: 0 16% 16% 0 / 0 50% 50% 0;
  background:
    radial-gradient(circle at 72% 45%, rgba(15, 163, 138, 0.15), transparent 33%),
    radial-gradient(circle at 10% 70%, rgba(14, 70, 118, 0.38), transparent 44%),
    linear-gradient(135deg, #020c1b 0%, #071b33 48%, #0b2743 100%);
  box-shadow:
    inset -5px 0 0 rgba(196, 154, 58, 0.72),
    16px 0 38px rgba(15, 163, 138, 0.22);
}

.login-brand__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='520' viewBox='0 0 420 520'%3E%3Cg fill='none' stroke='%231a7893' stroke-width='.9'%3E%3Cpath d='M-30 425c64-80 128-80 192 0s128 80 192 0 128-80 192 0'/%3E%3Cpath d='M-30 443c64-80 128-80 192 0s128 80 192 0 128-80 192 0'/%3E%3Cpath d='M-30 461c64-80 128-80 192 0s128 80 192 0 128-80 192 0'/%3E%3Cpath d='M-30 479c64-80 128-80 192 0s128 80 192 0 128-80 192 0'/%3E%3C/g%3E%3C/svg%3E");
  background-position: left bottom;
  background-repeat: repeat-x;
  pointer-events: none;
}

.login-brand__glow {
  position: absolute;
  z-index: 0;
  right: -80px;
  top: 10%;
  width: 190px;
  height: 80%;
  border-radius: 50%;
  background: rgba(15, 163, 138, 0.18);
  filter: blur(35px);
  pointer-events: none;
}

.login-brand__content {
  position: relative;
  z-index: 1;
  width: min(49vw, 720px);
  height: 100%;
  min-height: 680px;
  padding: clamp(30px, 4.3vh, 58px) clamp(42px, 4.2vw, 68px) 32px;
}

.login-brand__signature {
  position: relative;
  z-index: 3;
  display: block;
  width: clamp(330px, 28vw, 445px);
  height: auto;
  margin-left: clamp(125px, 12vw, 190px);
}

.login-brand__message {
  position: relative;
  z-index: 3;
  width: clamp(310px, 26vw, 405px);
  margin: clamp(44px, 7vh, 82px) 0 0 clamp(215px, 18vw, 285px);
}

.login-brand__eyebrow {
  margin: 0 0 15px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.login-brand__eyebrow span {
  margin: 0 7px;
  color: var(--auth-teal);
}

.login-brand h1 {
  margin: 0;
  color: #fff;
  font-family: var(--auth-display);
  font-size: clamp(36px, 3.25vw, 54px);
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: -0.035em;
}

.login-brand h1 em,
.login-brand h1 strong {
  display: block;
  font-weight: 500;
  font-style: normal;
}

.login-brand h1 em {
  color: #e0b24b;
}

.login-brand h1 strong {
  color: #22c0aa;
}

.login-brand__promise {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--auth-display);
  font-size: clamp(20px, 1.65vw, 27px);
  line-height: 1.2;
}

.login-brand__rule {
  display: block;
  width: 66px;
  height: 2px;
  margin: 23px 0;
  background: var(--auth-gold);
}

.login-brand__support {
  max-width: 380px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(13px, 1.1vw, 16px);
  line-height: 1.55;
}

.login-brand__note {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(100%, 380px);
  margin-top: clamp(26px, 4.5vh, 45px);
  padding: 13px 17px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.13);
  backdrop-filter: blur(7px);
}

.login-brand__note-icon {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  flex: 0 0 45px;
  border: 1px solid var(--auth-gold);
  border-radius: 50%;
  color: #e2b34b;
}

.login-brand__note-icon svg {
  width: 25px;
  height: 25px;
}

.login-brand__note p,
.login-brand__note b,
.login-brand__note small {
  display: block;
  margin: 0;
}

.login-brand__note b {
  color: #fff;
  font-size: 13px;
}

.login-brand__note small {
  margin-top: 4px;
  color: #28bca8;
  font-size: 12px;
}

.login-brand__mascot {
  position: absolute;
  z-index: 2;
  left: clamp(-65px, -3vw, -25px);
  bottom: clamp(58px, 8vh, 95px);
  width: clamp(285px, 25vw, 385px);
  max-height: 67vh;
  object-fit: contain;
  object-position: left bottom;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.28));
}

.login-brand__footer {
  position: absolute;
  z-index: 3;
  left: clamp(200px, 17vw, 270px);
  bottom: 25px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}

.login-brand__footer span {
  width: 35px;
  height: 1px;
  background: rgba(196, 154, 58, 0.85);
}

.login-access {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  margin-left: 48.5vw;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 30px 4vw 100px 9vw;
  background:
    radial-gradient(circle at 62% 48%, rgba(255, 255, 255, 0.96), rgba(247, 248, 249, 0.82) 52%, transparent 72%),
    #f7f8f9;
}

.login-access__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.46;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='300' viewBox='0 0 520 300'%3E%3Cg fill='none' stroke='%23d8d9d5' stroke-width='.65' opacity='.7'%3E%3Cpath d='M-30 54c54-43 108-43 162 0s108 43 162 0 108-43 162 0 108 43 162 0'/%3E%3Cpath d='M-30 73c54-43 108-43 162 0s108 43 162 0 108-43 162 0 108 43 162 0'/%3E%3Cpath d='M-30 92c54-43 108-43 162 0s108 43 162 0 108-43 162 0 108 43 162 0'/%3E%3Cpath d='M-30 213c54-43 108-43 162 0s108 43 162 0 108-43 162 0 108 43 162 0'/%3E%3Cpath d='M-30 232c54-43 108-43 162 0s108 43 162 0 108-43 162 0 108 43 162 0'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 520px 300px;
  pointer-events: none;
}

.login-mobile-brand {
  display: none;
}

.login-card {
  position: relative;
  z-index: 2;
  width: min(535px, 100%);
  min-height: 660px;
  padding: 31px 36px 24px;
  border: 1px solid rgba(196, 154, 58, 0.3);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow:
    0 20px 48px rgba(15, 35, 58, 0.14),
    0 0 34px rgba(196, 154, 58, 0.07);
  transform: translateY(-10px);
  backdrop-filter: blur(10px);
}

.login-card__header {
  text-align: center;
}

.login-card__header > img {
  display: block;
  width: 68px;
  height: 65px;
  margin: 0 auto 13px;
  object-fit: contain;
}

.login-card h2 {
  margin: 0;
  color: var(--auth-ink);
  font-family: var(--auth-display);
  font-size: clamp(36px, 3vw, 42px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.026em;
}

.login-card__subtitle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin: 10px 0 27px;
  color: var(--auth-muted);
}

.login-card__subtitle span {
  width: 38px;
  height: 1px;
  background: var(--auth-gold);
}

.login-card__subtitle p {
  margin: 0;
  font-size: 13px;
  white-space: nowrap;
}

.login-alerts {
  display: grid;
  gap: 7px;
  margin: -12px 0 13px;
}

.login-alert {
  padding: 9px 11px;
  border: 1px solid #cbd9e4;
  border-radius: 8px;
  background: #eff6fb;
  color: #36576f;
  font-size: 12px;
  line-height: 1.4;
}

.login-alert--success {
  border-color: #b9dbc7;
  background: #eaf5ef;
  color: var(--auth-success);
}

.login-alert--warning {
  border-color: #e7d49e;
  background: #fff8e8;
  color: #705a1f;
}

.login-alert--error {
  border-color: #e4b8b8;
  background: #fbecec;
  color: var(--auth-danger);
}

.login-form {
  display: grid;
}

.login-form > label {
  margin: 0 0 8px;
  color: #111c2e;
  font-size: 14px;
  font-weight: 750;
}

.login-field {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 23px;
  padding: 0 16px;
  border: 1px solid #d1d8e1;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.96);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.login-field:focus-within {
  border-color: #4e8f89;
  box-shadow: 0 0 0 4px rgba(15, 163, 138, 0.13);
}

.login-field--error {
  border-color: #c56f6f;
}

.login-field > svg {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  color: #7287a4;
}

.login-field input {
  width: 100%;
  height: 56px;
  min-width: 0;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  color: var(--auth-ink);
  background: transparent !important;
  box-shadow: none !important;
  font-size: 15px;
}

.login-field input::placeholder {
  color: #8291a6;
  opacity: 1;
}

.login-field input:-webkit-autofill {
  -webkit-text-fill-color: var(--auth-ink);
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  caret-color: var(--auth-ink);
}

.login-password-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #6f83a0;
  background: transparent;
  cursor: pointer;
}

.login-password-toggle:hover {
  background: #f1f4f7;
}

.login-password-toggle:focus-visible {
  outline: 3px solid rgba(15, 163, 138, 0.25);
}

.login-password-toggle svg {
  width: 23px;
  height: 23px;
}

.login-field-error {
  margin: -16px 0 15px;
  color: var(--auth-danger);
  font-size: 12px;
}

.login-form__options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 24px;
  font-size: 14px;
}

.login-form__options a {
  color: #087f70;
  text-decoration: none;
  font-weight: 650;
}

.login-form__options a:hover {
  text-decoration: underline;
}

.login-remember {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.login-checkbox {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--auth-teal);
  cursor: pointer;
}

.login-submit {
  height: 62px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 18px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(105deg, #071b35, #0b1d36 72%, #0a263f);
  box-shadow:
    0 8px 16px rgba(3, 21, 45, 0.19),
    0 2px 0 rgba(196, 154, 58, 0.48);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.login-submit span {
  grid-column: 2;
  font-family: var(--auth-display);
  font-size: 26px;
}

.login-submit svg {
  grid-column: 3;
  justify-self: end;
  width: 27px;
  height: 27px;
}

.login-submit:hover {
  transform: translateY(-1px);
  box-shadow:
    0 11px 20px rgba(3, 21, 45, 0.23),
    0 2px 0 rgba(196, 154, 58, 0.6);
}

.login-submit:focus-visible {
  outline: 3px solid rgba(15, 163, 138, 0.42);
  outline-offset: 3px;
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.78;
  transform: none;
}

.login-card__security {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 24px 0 13px;
  color: #667c98;
}

.login-card__security span {
  height: 1px;
  flex: 1;
  background: #d7dde5;
}

.login-card__security svg {
  width: 20px;
  height: 20px;
}

.login-card__legal {
  margin: 0;
  text-align: center;
  color: #657894;
  font-size: 13px;
}

.login-card__version {
  display: block;
  margin-top: 10px;
  text-align: center;
  color: #8391a4;
  font-size: 10px;
  letter-spacing: 0.13em;
}

.login-welcome {
  position: absolute;
  z-index: 4;
  right: 4.2vw;
  bottom: 24px;
  width: min(435px, calc(100% - 42px));
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 9px 13px;
  border: 1px solid #e1e4e7;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 9px 27px rgba(25, 43, 62, 0.16);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.login-welcome__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  padding: 8px;
  border-radius: 50%;
  background: #f4f6f7;
  box-shadow: inset 0 0 0 1px rgba(196, 154, 58, 0.35);
}

.login-welcome__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-welcome p,
.login-welcome b,
.login-welcome small {
  display: block;
  margin: 0;
}

.login-welcome p {
  min-width: 0;
  flex: 1;
}

.login-welcome b {
  color: #111c31;
  font-size: 14px;
}

.login-welcome small {
  margin-top: 4px;
  color: #71829b;
  font-size: 12px;
  line-height: 1.3;
}

.login-welcome button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #657a97;
  background: transparent;
  font-size: 23px;
  cursor: pointer;
}

.login-welcome button:hover {
  background: #f1f3f5;
}

.login-welcome.is-leaving {
  opacity: 0;
  transform: translateY(10px);
}

@media (max-width: 1320px) {
  .login-brand {
    width: 54vw;
    min-width: 650px;
  }

  .login-brand__content {
    width: 48vw;
    padding-left: 34px;
  }

  .login-brand__signature {
    width: 340px;
    margin-left: 115px;
  }

  .login-brand__message {
    width: 330px;
    margin-left: 205px;
  }

  .login-brand__mascot {
    left: -52px;
    width: 315px;
  }

  .login-brand__footer {
    left: 185px;
  }

  .login-access {
    margin-left: 46.5vw;
    padding-left: 8.5vw;
    padding-right: 3vw;
  }
}

@media (max-height: 820px) and (min-width: 1181px) {
  .login-brand__content {
    padding-top: 25px;
  }

  .login-brand__signature {
    width: 310px;
  }

  .login-brand__message {
    margin-top: 26px;
  }

  .login-brand h1 {
    font-size: 38px;
  }

  .login-brand__promise {
    margin-top: 10px;
    font-size: 20px;
  }

  .login-brand__rule {
    margin: 15px 0;
  }

  .login-brand__note {
    margin-top: 20px;
  }

  .login-brand__mascot {
    bottom: 48px;
    width: 275px;
  }

  .login-card {
    min-height: 0;
    padding-top: 23px;
    transform: translateY(-4px) scale(0.94);
  }

  .login-welcome {
    bottom: 15px;
  }
}

@media (max-width: 1180px) {
  .login-shell {
    overflow: visible;
  }

  .login-brand {
    display: none;
  }

  .login-access {
    min-height: 100vh;
    min-height: 100dvh;
    margin-left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 27px 22px 112px;
  }

  .login-mobile-brand {
    position: relative;
    z-index: 2;
    display: grid;
    justify-items: center;
    gap: 7px;
    width: min(360px, 84vw);
    margin: 0 auto 20px;
  }

  .login-mobile-brand img {
    display: block;
    width: 250px;
    max-height: 78px;
  }

  .login-mobile-brand p {
    margin: 0;
    color: #4e5e72;
    font-family: var(--auth-display);
    font-size: 16px;
    text-align: center;
  }

  .login-card {
    min-height: 0;
    transform: none;
  }

  .login-welcome {
    left: 50%;
    right: auto;
    bottom: 22px;
    transform: translateX(-50%);
  }

  .login-welcome.is-leaving {
    transform: translate(-50%, 10px);
  }
}

@media (max-width: 560px) {
  .login-access {
    display: block;
    padding: 18px 13px 108px;
  }

  .login-mobile-brand {
    margin-bottom: 14px;
  }

  .login-mobile-brand img {
    width: 205px;
    max-height: 62px;
  }

  .login-mobile-brand p {
    font-size: 14px;
  }

  .login-card {
    width: 100%;
    padding: 25px 20px 22px;
    border-radius: 16px;
  }

  .login-card__header > img {
    width: 56px;
    height: 54px;
  }

  .login-card h2 {
    font-size: 34px;
  }

  .login-card__subtitle {
    margin-bottom: 23px;
  }

  .login-card__subtitle span {
    width: 20px;
  }

  .login-card__subtitle p {
    font-size: 12px;
  }

  .login-field {
    height: 55px;
    margin-bottom: 20px;
  }

  .login-field input {
    height: 53px;
  }

  .login-form__options {
    align-items: flex-start;
    font-size: 13px;
  }

  .login-submit {
    height: 58px;
  }

  .login-submit span {
    font-size: 24px;
  }

  .login-welcome {
    width: calc(100% - 26px);
  }
}

@media (max-width: 390px) {
  .login-card {
    padding-right: 16px;
    padding-left: 16px;
  }

  .login-card h2 {
    font-size: 31px;
  }

  .login-card__subtitle {
    gap: 8px;
  }

  .login-card__subtitle span {
    width: 12px;
  }

  .login-form__options {
    gap: 12px;
  }
}

@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;
  }
}
