/* SCP V4 — abertura e login. Estilos limitados à tela de acesso. */
body.scp-login-v4 {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: radial-gradient(ellipse at 18% 14%, #176eb1 0, transparent 55%),
    linear-gradient(135deg, #0a477e 0%, #073664 58%, #06264b 100%) !important;
}
body.scp-entry-v4-running { overflow: hidden; }
#scpEntryV4[hidden], #loginView #scpPasswordToggleV4[hidden] { display: none !important; }
/* O sinal do head evita pintar o login antes de o controlador estar pronto. */
html.scp-entry-v4-pending #scpEntryV4[hidden] { display: grid !important; }
html.scp-entry-v4-pending #loginView { visibility: hidden; }
#scpEntryV4 {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 28px 20px;
  color: #fff;
  background: radial-gradient(ellipse at 50% 35%, #176eb1 0, transparent 60%),
    linear-gradient(135deg, #0a477e 0%, #073664 58%, #06264b 100%);
  opacity: 1;
  transition: none;
}
.scp-entry-v4__content {
  width: min(100%, 540px);
  text-align: center;
  animation: none;
}
.scp-entry-v4__logo-box {
  display: grid;
  place-items: center;
  width: 164px;
  height: 164px;
  margin: 0 auto 30px;
  border: 1px solid #ffffffb3;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 18px 60px #021c4538;
}
#scpEntryV4 .scp-entry-v4__logo {
  display: block;
  width: 136px !important;
  height: 136px !important;
  object-fit: contain !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
#scpEntryV4 h1 {
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(28px, 6vw, 42px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: .11em;
}
.scp-entry-v4__company {
  margin: 0;
  color: #dbeafa;
  font-size: clamp(10px, 2.6vw, 13px);
  line-height: 1.6;
  letter-spacing: .16em;
}
.scp-entry-v4__product { margin: 28px 0 24px; color: #fff; font-size: 16px; line-height: 1.6; }
#scpEntryV4 .scp-entry-v4__countdown { margin: 0; color: #dbeafa; font-size: 13px; line-height: 1.6; }
#scpEntryV4 .scp-entry-v4__fallback { color: #176eb1; font-size: 34px; font-weight: 800; letter-spacing: .06em; }
#scpEntryV4:focus { outline: none; }
#loginView.login.card {
  width: 100%;
  max-width: 540px;
  margin: auto !important;
  padding: 34px;
  border: 1px solid #dce5ed;
  border-top: 4px solid #15824a;
  border-radius: 20px;
  background: #fff;
  color: #17344d;
  box-shadow: 0 22px 70px #02182d45;
}
#loginView .scp-v34733-login {
  align-items: center !important;
  gap: 18px !important;
  margin: 0 0 26px !important;
  padding-bottom: 24px;
  border-bottom: 1px solid #e6edf3;
}
#loginView #scpV34733SchLogin,
#loginView #scpV34733SchLogin.scp-v34745-sch-login {
  flex: 0 0 86px;
  width: 86px !important;
  height: 86px !important;
  min-width: 86px !important;
  max-width: 86px !important;
  max-height: 86px !important;
  object-fit: contain !important;
}
#loginView .scp-v34733-login div { min-width: 0; gap: 7px; }
#loginView .scp-v34733-login b {
  color: #177052 !important;
  font-size: 10px !important;
  line-height: 1.6 !important;
  letter-spacing: .055em !important;
}
#loginView .scp-v34733-login span {
  color: #17344d !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
}
#loginView h2 { margin: 0 0 8px; color: #17344d; font-size: 26px; line-height: 1.25; }
#loginView .scp-login-v4__intro { margin: 0 0 25px; color: #627488; font-size: 14px; line-height: 1.6; }
#loginView .scp-login-v4__fields { display: grid; gap: 20px; }
#loginView .field label { margin: 0 0 8px; color: #284760; font-size: 13px; font-weight: 700; }
#loginView .field input {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 12px 14px;
  border: 1px solid #bacbd8 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #17344d;
  font: inherit;
  font-size: 16px;
}
#loginView .field input:focus {
  border-color: #2675b5 !important;
  outline: 3px solid #2675b529 !important;
  outline-offset: 1px;
  box-shadow: none !important;
}
#loginView .scp-login-v4__password { position: relative; }
#loginView #password { padding-right: 58px; }
#loginView #password::-ms-reveal, #loginView #password::-ms-clear { display: none; }
#loginView #scpPasswordToggleV4 {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #45617a;
  cursor: pointer;
}
#loginView #scpPasswordToggleV4:hover { background: #edf4fa; color: #145e98; }
#loginView #scpPasswordToggleV4:focus-visible { outline: 2px solid #2675b5; outline-offset: -2px; }
#loginView #scpPasswordToggleV4 svg { width: 22px; height: 22px; pointer-events: none; }
#scpPasswordToggleV4 .scp-password-toggle-v4__slash { display: none; }
#scpPasswordToggleV4[aria-pressed="true"] .scp-password-toggle-v4__slash { display: block; }
#loginView #loginMsg { font-size: 13px; line-height: 1.5; }
#loginView #loginMsg:empty { display: none; }
#loginView .scp-login-v4__enter {
  width: 100%;
  min-height: 50px;
  margin-top: 24px;
  border: 0;
  border-radius: 10px;
  background: #087840;
  color: #fff;
  font-size: 14px;
  letter-spacing: .025em;
}
#loginView .scp-login-v4__enter:hover { background: #076635; }
#loginView .scp-login-v4__enter:focus-visible { outline: 3px solid #2675b5; outline-offset: 3px; }
#loginView .scp-login-v4__note { margin: 20px 0 0; color: #627488; font-size: 11px; line-height: 1.6; }
@media (max-width: 520px) {
  body.scp-login-v4 { padding: 22px 14px; }
  #loginView.login.card { padding: 25px 22px; border-radius: 16px; }
  #loginView .scp-v34733-login { gap: 12px !important; margin-bottom: 22px !important; padding-bottom: 20px; }
  #loginView #scpV34733SchLogin,
  #loginView #scpV34733SchLogin.scp-v34745-sch-login { flex-basis: 68px; width: 68px !important; min-width: 68px !important; height: 68px !important; }
  #loginView .scp-v34733-login b { font-size: 9px !important; }
  #loginView .scp-v34733-login span { font-size: 17px !important; }
  #loginView h2 { font-size: 23px; }
  .scp-entry-v4__logo-box { width: 144px; height: 144px; margin-bottom: 26px; }
  #scpEntryV4 .scp-entry-v4__logo { width: 116px !important; height: 116px !important; }
}
@media (prefers-reduced-motion: reduce) {
  #scpEntryV4 { transition: none; }
  .scp-entry-v4__content { animation: none; }
}
