/* =========================================================
   Login
   ========================================================= */

.auth-page {
  min-height: 100vh;
  min-height: 100svh;

  display: grid;
  grid-template-columns:
    minmax(0, 1.08fr)
    minmax(420px, .92fr);

  background: #f5f4f0;
}


/* ---------------------------------------------------------
   Painel de marca
   --------------------------------------------------------- */

.auth-brand-panel {
  position: relative;

  min-width: 0;

  overflow: hidden;

  padding:
    clamp(32px, 4vw, 64px);

  display: flex;
  flex-direction: column;

  color: #fff;

  background:
    linear-gradient(
      145deg,
      #0d2831 0%,
      #123740 48%,
      #1d5054 100%
    );
}

.auth-brand-panel::before {
  content: "";

  position: absolute;

  width: 460px;
  height: 460px;

  right: -210px;
  bottom: -210px;

  border:
    76px solid
    rgba(240, 197, 75, .10);

  border-radius: 50%;

  pointer-events: none;
}

.auth-brand-panel::after {
  content: "";

  position: absolute;

  width: 220px;
  height: 220px;

  left: -120px;
  top: 26%;

  border:
    1px solid
    rgba(255, 255, 255, .06);

  border-radius: 50%;

  pointer-events: none;
}


/* ---------------------------------------------------------
   Marca
   --------------------------------------------------------- */

.auth-brand,
.auth-mobile-brand {
  position: relative;

  z-index: 1;

  display: flex;
  align-items: center;

  gap: 12px;
}

.auth-brand-mark {
  width: 46px;
  height: 46px;

  flex: 0 0 46px;

  border-radius: 13px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #fff;

  background:
    linear-gradient(
      145deg,
      #1fae9d,
      #119589
    );

  box-shadow:
    0 8px 24px
    rgba(0, 0, 0, .16);

  font-size: 13px;
  font-weight: 900;

  letter-spacing: -.02em;
}

.auth-brand > div,
.auth-mobile-brand > div {
  min-width: 0;

  display: grid;

  gap: 2px;
}

.auth-brand strong,
.auth-mobile-brand strong {
  font-size: 17px;
  font-weight: 850;

  letter-spacing: -.02em;
}

.auth-brand > div > span {
  color: #a9c8c9;

  font-size: 12px;
}

.auth-mobile-brand > div > span {
  color: var(--text-secondary);

  font-size: 12px;
}


/* ---------------------------------------------------------
   Texto principal
   --------------------------------------------------------- */

.auth-brand-copy {
  position: relative;

  z-index: 1;

  width: min(650px, 100%);

  margin:
    auto
    0
    clamp(48px, 8vh, 90px);
}

.auth-brand-eyebrow {
  display: block;

  margin-bottom: 12px;

  color: #f0c54b;

  font-size: 11px;
  font-weight: 900;

  letter-spacing: .12em;

  text-transform: uppercase;
}

.auth-brand-copy h1 {
  max-width: 620px;

  margin: 0;

  color: #fff;

  font-size:
    clamp(
      40px,
      4.2vw,
      66px
    );

  line-height: 1.02;

  letter-spacing: -.052em;
}

.auth-brand-copy p {
  max-width: 580px;

  margin:
    20px
    0
    0;

  color: #b9d0d1;

  font-size: 15px;
  line-height: 1.65;
}


/* ---------------------------------------------------------
   Recursos
   --------------------------------------------------------- */

.auth-feature-grid {
  position: relative;

  z-index: 1;

  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 10px;
}

.auth-feature {
  min-width: 0;

  padding: 14px;

  border:
    1px solid
    rgba(255, 255, 255, .09);

  border-radius: 14px;

  display: grid;
  grid-template-columns:
    36px
    minmax(0, 1fr);

  align-items: start;

  gap: 11px;

  background:
    rgba(255, 255, 255, .045);

  backdrop-filter:
    blur(5px);
}

.auth-feature-icon {
  width: 36px;
  height: 36px;

  border-radius: 10px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #f0c54b;

  background:
    rgba(240, 197, 75, .09);
}

.auth-feature > div {
  min-width: 0;

  display: grid;

  gap: 4px;
}

.auth-feature strong {
  color: #fff;

  font-size: 13px;
  font-weight: 800;
}

.auth-feature > div > span {
  color: #a9c5c6;

  font-size: 11.5px;
  line-height: 1.45;
}


/* ---------------------------------------------------------
   Painel do formulário
   --------------------------------------------------------- */

.auth-form-panel {
  min-width: 0;

  padding:
    clamp(24px, 5vw, 72px);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  background:
    radial-gradient(
      circle at top right,
      rgba(31, 174, 157, .06),
      transparent 36%
    ),
    #f5f4f0;
}


/* Só aparece quando o painel esquerdo some. */

.auth-mobile-brand {
  display: none;

  width: min(430px, 100%);

  margin-bottom: 22px;

  color: var(--text-primary);
}


/* ---------------------------------------------------------
   Card
   --------------------------------------------------------- */

.auth-card {
  width: min(430px, 100%);

  margin: 0;

  padding:
    clamp(24px, 3vw, 34px);

  border:
    1px solid
    var(--border-subtle);

  border-radius: 20px;

  background: var(--surface-card);

  box-shadow:
    0 22px 55px
    rgba(17, 43, 50, .10);
}

.auth-card-header {
  display: grid;
  grid-template-columns:
    44px
    minmax(0, 1fr);

  gap: 13px;

  align-items: start;

  margin-bottom: 24px;
}

.auth-card-icon {
  width: 44px;
  height: 44px;

  border-radius: 12px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: var(--brand-700);

  background: var(--brand-100);
}

.auth-card-header h2 {
  margin:
    3px
    0
    6px;

  color: var(--text-primary);

  font-size: 28px;
  line-height: 1.1;

  letter-spacing: -.025em;
}

.auth-card-header p {
  margin: 0;

  color: var(--text-secondary);

  font-size: 13px;
  line-height: 1.5;
}


/* ---------------------------------------------------------
   Erro de autenticação
   --------------------------------------------------------- */

.auth-error-summary {
  margin-bottom: 18px;

  padding: 12px 14px;

  border:
    1px solid
    #e7bbb7;

  border-radius: 10px;

  color: var(--danger-700);

  background: var(--danger-100);

  font-size: 13px;
  line-height: 1.45;
}

.auth-error-summary .errorlist {
  margin: 0;
  padding-left: 18px;

  color: inherit;
}


/* ---------------------------------------------------------
   Campos
   --------------------------------------------------------- */

.auth-fields {
  display: grid;

  gap: 15px;
}

.auth-card .form-field {
  margin: 0;
}

.auth-card .form-field label {
  display: block;

  margin-bottom: 7px;
}

.auth-card input {
  width: 100%;

  min-height: 46px;
}

.auth-card .errorlist {
  margin:
    6px
    0
    0;

  color: var(--danger-700);

  font-size: 12px;
}


/* ---------------------------------------------------------
   Entrar
   --------------------------------------------------------- */

.auth-submit {
  margin-top: 20px;

  min-height: 48px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 8px;
}

.auth-submit svg {
  transition:
    transform var(--motion-fast);
}

.auth-submit:hover svg {
  transform: translateX(2px);
}


/* ---------------------------------------------------------
   Rodapé
   --------------------------------------------------------- */

.auth-form-footer {
  width: min(430px, 100%);

  margin:
    16px
    0
    0;

  color: var(--text-tertiary);

  font-size: 11px;
  font-weight: 700;

  text-align: center;
}


/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 1040px) {

  .auth-page {
    grid-template-columns:
      minmax(0, .92fr)
      minmax(400px, 1.08fr);
  }

  .auth-brand-panel {
    padding: 34px;
  }

  .auth-feature-grid {
    grid-template-columns: 1fr;
  }

  .auth-brand-copy h1 {
    font-size:
      clamp(
        38px,
        5vw,
        52px
      );
  }

}


/* =========================================================
   Mobile / tablet estreito
   ========================================================= */

@media (max-width: 820px) {

  .auth-page {
    display: block;

    min-height: 100vh;
    min-height: 100svh;
  }

  .auth-brand-panel {
    display: none;
  }

  .auth-form-panel {
    min-height: 100vh;
    min-height: 100svh;

    padding:
      max(
        26px,
        env(safe-area-inset-top)
      )
      18px
      max(
        26px,
        env(safe-area-inset-bottom)
      );
  }

  .auth-mobile-brand {
    display: flex;
  }

}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 480px) {

  .auth-form-panel {
    align-items: stretch;

    padding-inline: 14px;
  }

  .auth-mobile-brand,
  .auth-card,
  .auth-form-footer {
    width: 100%;
  }

  .auth-mobile-brand {
    margin-bottom: 18px;
  }

  .auth-brand-mark {
    width: 42px;
    height: 42px;

    flex-basis: 42px;
  }

  .auth-card {
    padding: 22px 18px;

    border-radius: 17px;
  }

  .auth-card-header {
    grid-template-columns:
      40px
      minmax(0, 1fr);

    margin-bottom: 21px;
  }

  .auth-card-icon {
    width: 40px;
    height: 40px;
  }

  .auth-card-header h2 {
    font-size: 25px;
  }

}