/*
  Pedroza Certificadora
  Atlas Authentication & Security System v1.0
  Concepcao, Design e Desenvolvimento: Marcos Henrique Pedroza
*/

html.auth-check-pending body {
  visibility: hidden;
}

.auth-page {
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: #18324f;
  background:
    radial-gradient(circle at 78% 18%, rgba(19, 134, 255, .24), transparent 28%),
    radial-gradient(circle at 18% 82%, rgba(27, 193, 127, .13), transparent 28%),
    linear-gradient(145deg, #020817 0%, #031a3a 56%, #07519a 100%);
}

.auth-shell {
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 500px);
  align-items: stretch;
  overflow-x: hidden;
}

.auth-brand-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: clamp(24px, 4vw, 56px);
  color: #fff;
}

.auth-brand-panel::after {
  content: "";
  position: absolute;
  right: -140px;
  bottom: -180px;
  width: 480px;
  height: 480px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255, 255, 255, .025), 0 0 0 140px rgba(255, 255, 255, .02);
}

.auth-logo {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: min(430px, 82%);
  min-height: 150px;
  padding: 8px 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, .98);
  border: 1px solid rgba(255, 255, 255, .92);
  border-radius: 20px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .24);
}

.auth-logo::after {
  position: absolute;
  left: 13%;
  right: 13%;
  bottom: 10px;
  height: 14px;
  content: "";
  background: radial-gradient(ellipse, rgba(0, 31, 74, .20), transparent 70%);
  filter: blur(7px);
  pointer-events: none;
}

.auth-logo img {
  position: relative;
  z-index: 1;
  display: block;
  width: min(370px, 100%);
  height: 132px;
  object-fit: contain;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,.8)) drop-shadow(0 7px 10px rgba(0,31,74,.18));
}

.auth-brand-copy {
  position: relative;
  z-index: 1;
  max-width: 650px;
  margin: clamp(26px, 5vh, 44px) 0;
}

.auth-kicker {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 7px 12px;
  color: #dff5ff;
  background: rgba(7, 72, 157, .62);
  border: 1px solid rgba(92, 171, 255, .30);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.auth-brand-copy h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(38px, 4.8vw, 62px);
  line-height: 1.02;
  letter-spacing: -2.5px;
}

.auth-brand-copy h1 em {
  display: block;
  color: transparent;
  background: linear-gradient(90deg, #1386ff, #35b9ff);
  background-clip: text;
  -webkit-background-clip: text;
  font-style: normal;
}

.auth-brand-copy p {
  max-width: 610px;
  margin: 18px 0 0;
  color: #d6e4f5;
  font-size: 16px;
  line-height: 1.65;
}

.auth-security-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.auth-security-list li {
  padding: 10px 13px;
  color: #d9ebff;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.auth-brand-footer {
  position: relative;
  z-index: 1;
  color: #9eb7d3;
  font-size: 12px;
}

.auth-form-panel {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 3vw, 34px);
  background: rgba(247, 250, 253, .98);
  box-shadow: -24px 0 80px rgba(0, 9, 30, .20);
}

.auth-card {
  width: 100%;
  max-width: 410px;
  padding: clamp(26px, 3.2vh, 34px);
  background: #fff;
  border: 1px solid #dce8f3;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(24, 50, 79, .12);
}

.auth-card-badge {
  display: inline-flex;
  padding: 7px 10px;
  color: #0878ff;
  background: #eef7ff;
  border: 1px solid #d4e8fa;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-card h2 {
  margin: 12px 0 7px;
  color: #092750;
  font-size: 28px;
  letter-spacing: -.7px;
}

.auth-card-intro {
  margin: 0 0 20px;
  color: #667b90;
  font-size: 14px;
  line-height: 1.65;
}

.auth-field {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.auth-field > span,
.auth-field-label {
  color: #173655;
  font-size: 12px;
  font-weight: 800;
}

.auth-input-wrap {
  position: relative;
}

.auth-field input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: #18324f;
  background: #f8fbfe;
  border: 1px solid #cfddea;
  border-radius: 10px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.auth-field input:focus {
  background: #fff;
  border-color: #1386ff;
  box-shadow: 0 0 0 4px rgba(19, 134, 255, .12);
}

.auth-password-input {
  padding-right: 78px !important;
}

.auth-toggle-password {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  padding: 7px 8px;
  color: #0878ff;
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.auth-helper {
  margin: 6px 0 0;
  color: #7a5c10;
  font-size: 11px;
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 15px;
  font-size: 12px;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #526a81;
  cursor: pointer;
}

.auth-check input {
  width: 16px;
  height: 16px;
  accent-color: #0878ff;
}

.auth-link {
  color: #0878ff;
  font-weight: 800;
  text-decoration: none;
}

.auth-submit {
  position: relative;
  width: 100%;
  min-height: 47px;
  margin-top: 18px;
  color: #fff;
  background: linear-gradient(135deg, #0878ff, #075cc7);
  border: 0;
  border-radius: 10px;
  box-shadow: 0 13px 28px rgba(8, 120, 255, .23);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.auth-submit:disabled {
  cursor: wait;
  opacity: .78;
}

.auth-submit.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 15px;
  height: 15px;
  margin-top: -8px;
  border: 2px solid rgba(255, 255, 255, .42);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin .7s linear infinite;
}

@keyframes auth-spin { to { transform: rotate(360deg); } }

.auth-feedback {
  margin: 18px 0 0;
  padding: 12px 13px;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.5;
}

.auth-feedback-error { color: #8b2734; background: #fff0f2; border: 1px solid #f3cbd1; }
.auth-feedback-success { color: #17613d; background: #edfbf4; border: 1px solid #c9ecd9; }
.auth-feedback-info { color: #24547f; background: #eef7ff; border: 1px solid #d4e8fa; }

.auth-card-note {
  margin: 18px 0 0;
  padding-top: 15px;
  color: #73869a;
  border-top: 1px solid #e4edf5;
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.auth-center-card {
  text-align: center;
}

.auth-center-card .auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.auth-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 6px 11px;
  color: #173655;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(117, 173, 244, .35);
  border-radius: 10px;
  font-size: 11px;
}

.auth-user-chip strong,
.auth-user-chip small { display: block; }
.auth-user-chip small { color: #71849a; font-size: 9px; }
.auth-logout-button { white-space: nowrap; }

.auth-session-warning[hidden] { display: none; }
.auth-session-warning {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(2, 8, 23, .72);
  backdrop-filter: blur(8px);
}

.auth-session-dialog {
  width: min(100%, 430px);
  padding: 30px;
  background: #fff;
  border: 1px solid #dce8f3;
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0, 9, 30, .35);
  text-align: center;
}

.auth-session-dialog h2 { margin: 0 0 10px; color: #092750; }
.auth-session-dialog p { color: #61758a; line-height: 1.6; }
.auth-session-countdown { color: #0878ff; font-size: 32px; font-weight: 900; }
.auth-session-actions { display: flex; gap: 10px; margin-top: 20px; }
.auth-session-actions > * { flex: 1; }
.auth-secondary-button {
  min-height: 46px;
  color: #24547f;
  background: #eef7ff;
  border: 1px solid #cfe4f7;
  border-radius: 9px;
  font-weight: 800;
  cursor: pointer;
}
body.auth-modal-open { overflow: hidden; }

@media (min-width: 981px) {
  .auth-page {
    height: 100vh;
    height: 100svh;
    overflow: hidden;
  }

  .auth-shell {
    height: 100vh;
    height: 100svh;
  }

  .auth-brand-panel,
  .auth-form-panel {
    min-height: 0;
  }
}

@media (max-height: 760px) and (min-width: 981px) {
  .auth-brand-panel { padding-top: 22px; padding-bottom: 22px; }
  .auth-logo { width: 210px; height: 68px; }
  .auth-logo img { width: 198px; height: 64px; }
  .auth-brand-copy { margin: 18px 0; }
  .auth-kicker { margin-bottom: 12px; padding: 5px 10px; }
  .auth-brand-copy h1 { font-size: clamp(36px, 4.2vw, 54px); }
  .auth-brand-copy p { margin-top: 14px; font-size: 14px; line-height: 1.55; }
  .auth-security-list { margin-top: 16px; }
  .auth-security-list li { padding: 8px 11px; }
  .auth-card { padding: 24px 28px; }
  .auth-card-intro { margin-bottom: 15px; }
  .auth-field { margin-top: 11px; }
  .auth-options { margin-top: 12px; }
  .auth-submit { margin-top: 14px; }
  .auth-card-note { margin-top: 14px; padding-top: 12px; }
}

@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand-panel { min-height: auto; padding: 34px 28px; }
  .auth-brand-copy { margin: 40px 0 12px; }
  .auth-brand-copy h1 { font-size: clamp(38px, 9vw, 58px); }
  .auth-security-list, .auth-brand-footer { display: none; }
  .auth-form-panel { padding: 34px 20px 48px; box-shadow: none; }
}

@media (max-width: 560px) {
  .auth-brand-panel { padding: 24px 20px 30px; }
  .auth-brand-copy { margin: 28px 0 0; }
  .auth-brand-copy p { font-size: 14px; }
  .auth-form-panel { padding: 22px 14px 34px; }
  .auth-card { padding: 26px 20px; border-radius: 16px; }
  .auth-options { align-items: flex-start; flex-direction: column; gap: 12px; }
  .auth-session-actions { flex-direction: column; }
  .auth-user-chip { display: none; }
}

/* AASS 4.6.6 - acesso universal a Minha Conta */
.auth-account-button{white-space:nowrap}
@media(max-width:1280px){.auth-account-button{padding-inline:12px;font-size:11px}}

/* Sprint 4.6.9 — refinamento institucional do login */
@media (max-height: 760px) and (min-width: 901px) {
  .auth-logo { width: min(390px, 78%); min-height: 124px; padding: 5px 20px; }
  .auth-logo img { width: min(338px, 100%); height: 112px; }
}
@media (max-width: 900px) {
  .auth-logo { width: min(390px, 88vw); min-height: 132px; }
  .auth-logo img { width: min(340px, 100%); height: 116px; }
}
@media (max-width: 520px) {
  .auth-logo { width: min(330px, 92vw); min-height: 112px; padding: 4px 14px; border-radius: 16px; }
  .auth-logo img { width: min(292px, 100%); height: 98px; }
}
