/* Sem overflow:hidden aqui — este arquivo também é carregado por páginas de
   formulário longo (qualidade/inspecao_final*, gente_gestao/acess_colaborador),
   e travar o scroll de html/body globalmente deixava essas páginas sem rolagem.
   Quem precisa travar é a tela de login/registro, via .auth-body. */
html, body {
  height: 100%;
  margin: 0;
  font-family: "Red Hat Display", sans-serif;
  font-optical-sizing: auto;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001s !important;
  }
}

@keyframes auth-spin { to { transform: rotate(360deg); } }
@keyframes auth-wipe { from { transform: translateX(-106%); } to { transform: translateX(0); } }
@keyframes auth-wipe-vertical { from { transform: translateY(-106%); } to { transform: translateY(0); } }
@keyframes auth-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- shell / diagonal split ---------- */

.auth-body {
  height: 100vh;
  overflow: hidden;
  background: #6f7167;
}

.auth-shell {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: #6f7167;
}

.auth-media {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--bg-surface) 0, #fff 70px, #fff calc(100% - 70px), var(--bg-surface) 100%);
  clip-path: polygon(0 0, 46% 0, 32% 100%, 0 100%);
  overflow: hidden;
}

.auth-media img {
  position: absolute;
  left: -1%;
  top: 50%;
  transform: translateY(-50%);
  width: 40%;

  display: block;
}

.auth-media-gif { opacity: 0; transition: opacity .25s ease; }
.auth-media-gif.is-ready { opacity: 1; }
.auth-media-poster.is-hidden { opacity: 0; }

.auth-brand-mark {
  position: absolute;
  top: 36px;
  left: 40px;
  z-index: 2;
}

.auth-brand-mark img {
  position: static;
  width: auto;
  min-width: 0;
  height: 24px;
  filter: brightness(0);
  opacity: .72;
}

.auth-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 46%;
  right: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 48px;
}

.auth-panel-inner {
  width: 100%;
  max-width: 302px;
}

.auth-title-row {
  display: contents;
}

.auth-logo {
  height: 78px;
  display: block;
  margin: 0 auto 20px;
  filter: brightness(0) invert(1);
  opacity: .95;
}

.auth-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  letter-spacing: -.015em;
}

.auth-subtitle {
  margin: 0 0 26px;
  font-size: 13.5px;
  color: rgba(255,255,255,.85);
  text-align: center;
}

/* ---------- fields ---------- */

.auth-label {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  display: block;
  margin-bottom: 6px;
  letter-spacing: .04em;
}

.auth-field {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 10px;
  padding: 0 12px;
  margin-bottom: 12px;
  background: #fff;
  transition: box-shadow .15s ease;
}

.auth-field:focus-within {
  box-shadow: 0 0 0 3px rgba(255,255,255,.45);
}

.auth-field.auth-field-error {
  border: 1.5px solid #9E3B32;
}

.auth-field > i {
  color: #84867B;
  font-size: 15px;
  flex-shrink: 0;
}

.auth-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: #111;
  padding: 10px 0;
}

.auth-field-pass { padding-right: 8px; }

.auth-toggle-pass {
  border: none;
  background: transparent;
  padding: 4px;
  cursor: pointer;
  display: flex;
  color: #A5A397;
  font-size: 15px;
  flex-shrink: 0;
}
.auth-toggle-pass:hover { color: #84867B; }

.auth-capslock {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: -4px 0 8px;
  font-size: 11.5px;
  color: rgba(255,255,255,.85);
}
.auth-capslock[hidden] { display: none; }

.auth-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.auth-link {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-decoration: underline;
}
.auth-link:hover { color: #fff; opacity: .85; }

.auth-link-disabled {
  color: rgba(255,255,255,.5);
  text-decoration: none;
  cursor: not-allowed;
  user-select: none;
}
.auth-link-disabled:hover { color: rgba(255,255,255,.5); opacity: 1; }

/* ---------- captcha ---------- */

.auth-captcha-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.cf-turnstile { min-width: 300px; }

/* ---------- alerts ---------- */

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff;
  border-left: 3px solid #9E3B32;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.auth-alert i { color: #9E3B32; font-size: 14px; margin-top: 1px; flex-shrink: 0; }
.auth-alert-text { font-size: 13px; font-weight: 700; color: #9E3B32; }

.auth-alert.auth-alert-success { border-left-color: #2f6d3f; }
.auth-alert.auth-alert-success i,
.auth-alert.auth-alert-success .auth-alert-text { color: #2f6d3f; }

.auth-alert.auth-alert-inline {
  display: none;
  margin-bottom: 16px;
}
.auth-alert.auth-alert-inline.is-visible { display: flex; }

/* ---------- submit ---------- */

.auth-submit {
  width: 100%;
  border: none;
  background: #fff;
  color: #3f4039;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 11px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-submit:hover { background: #f2f2f2; }

.auth-submit:disabled {
  background: rgba(255,255,255,.7);
  cursor: not-allowed;
}

.auth-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(63,64,57,.3);
  border-top-color: #3f4039;
  border-radius: 50%;
  animation: auth-spin .7s linear infinite;
  display: none;
}

.auth-submit[aria-busy="true"] .auth-spinner { display: inline-block; }
.auth-submit[aria-busy="true"] .auth-submit-label { display: none; }

.auth-footer {
  margin-top: 14px;
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,.7);
  line-height: 1.6;
}

.auth-secondary {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
}
.auth-secondary a { color: #fff; font-weight: 700; text-decoration: underline; }

/* ---------- transição de login ---------- */

.auth-transition {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.auth-transition.is-active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.auth-transition-wipe {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 112%;
  background: #fff;
  clip-path: polygon(0 0, 100% 0, calc(100% - 200px) 100%, 0 100%);
  transform: translateX(-106%);
}

.auth-transition.is-active .auth-transition-wipe {
  animation: auth-wipe .8s cubic-bezier(.7,0,.2,1) forwards;
}

.auth-transition-brand {
  position: absolute;
  top: 36px;
  left: 40px;
  z-index: 2;
}
.auth-transition-brand img {
  height: 24px;
  filter: brightness(0);
  opacity: .72;
}

.auth-transition-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
}

.auth-transition.is-active .auth-transition-content {
  animation: auth-fade .45s ease .6s both;
}

.auth-transition-content img {
  width: var(--loading-gif-xl);
  display: block;
}

.auth-transition-title {
  font-size: 18px;
  font-weight: 800;
  color: #33342f;
}

.auth-transition-subtitle {
  font-size: 13px;
  color: #6b7575;
}

/* .lp-bar/.lp-bar-fill (utils-loading.css) reaproveitados aqui — só a
   largura precisa de override, já que o contexto não é o card de 200px do
   popup global. */
.auth-transition-content .lp-bar {
  width: 240px;
  background: #EFEDE6;
  margin-top: 14px;
}
.auth-transition-content .lp-bar-fill { background: #84867B; }

/* ---------- viewports baixos: compacta em vez de rolar ---------- */

@media (max-height: 760px) {
  .auth-logo { height: 52px; margin-bottom: 12px; }
  .auth-title { font-size: 24px; margin-bottom: 4px; }
  .auth-subtitle { margin-bottom: 16px; text-align: start; }
  .auth-field { margin-bottom: 10px; }
  .auth-capslock { margin: -4px 0 8px; }
  .auth-captcha-wrap { margin-bottom: 12px; }
  .auth-footer { margin-top: 12px; }
  .auth-secondary { margin-top: 10px; }
}

@media (max-height: 600px) {
  .auth-logo { height: 36px; margin-bottom: 8px; }
  .auth-title { font-size: 19px; }
  .auth-subtitle { font-size: 12px; margin-bottom: 10px; text-align: start;}
  .auth-field { padding: 0 12px; }
  .auth-input { padding: 9px 0; }
  .auth-submit { padding: 10px; }
}

/* ---------- mobile ---------- */

@media (max-width: 900px) {
  .auth-shell {
    display: flex;
    flex-direction: column;
  }
  .auth-media {
    position: relative;
    background: #fff;
    clip-path: polygon(0 0, 100% 0, 100% 78%, 0 100%);
    height: 260px;
    flex-shrink: 0;
    inset: auto;
  }
  .auth-media img {
    left: 50%;
    top: 52%;
    transform: translate(-50%, -50%);
    width: 60%;
  }
  .auth-brand-mark {
    top: 22px;
    left: 24px;
  }
  .auth-brand-mark img { height: 20px; }

  .auth-transition-brand {
    left: 50%;
    transform: translateX(-50%);
  }

  .auth-panel {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    height: auto;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    align-items: flex-start;
    justify-content: center;
    padding: 28px 26px 24px;
  }
  .auth-title-row {
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 4px;
  }
  .auth-title {
    font-size: 20px;
    text-align: left;
    padding-right: 76px;
  }
  .auth-logo {
    position: absolute;
    right: 0;
    top: 0%;
    transform: translateY(-50%);
    height: 52px;
    margin: 0;
  }
  .auth-subtitle {text-align: start; }

  .auth-transition-wipe {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    clip-path: none;
    transform: translateY(-100%);
  }
  .auth-transition.is-active .auth-transition-wipe {
    animation-name: auth-wipe-vertical;
  }
}

@media (max-width: 900px) and (max-height: 700px) {
  .auth-media { height: 220px; }
}

@media (max-width: 900px) and (max-height: 560px) {
  .auth-media { height: 100px; }
  .auth-brand-mark img { height: 16px; }
  .auth-logo { height: 44px; }
  .auth-title { font-size: 19px; padding-right: 56px; }
}
