html, body {
  margin: 0 auto;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background-color: #f7f8fa;
  color: #111;
}

/* Estado inicial (antes do carregamento completo) */
body.fade-in {
  opacity: 0;
  transform: scale(0.98) translateY(5px);
  transition: opacity 1s ease, transform 1s ease, filter 1s ease;
}

/* Estado carregado */
body.loaded {
  opacity: 1;
  transform: scale(1) translateY(0);
}

body.fade-out {
  opacity: 0;
  transform: scale(0.98) translateY(5px);
  filter: blur(1px) brightness(0.9);
  transition: opacity 1s ease-in-out, transform 1s ease-in-out, filter 1s ease-in-out;
  pointer-events: none;
  user-select: none;
}

body {
  background: linear-gradient(180deg, #fdfdfd 0%, #e8ebf0 100%);
  user-select: none;
  height: 100vh;
}

.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-box {
  background: white;
  position: absolute;
  top: 15%;
  padding: 40px;
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  width: 70%;
  max-width: 420px;
  text-align: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  will-change: transform, box-shadow;
}
.login-box:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
}
.login-box:active {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05);
}
@media (max-width: 768px) {
  .login-box {
    top: 10%;
  }
}

.logo img {
  max-width: 200px;
  transition: transform 0.4s ease, filter 0.4s ease;
  will-change: transform, filter;
}

.logo img:hover {
  transform: scale(1.05) rotate(0.5deg);
}

.login-title {
  font-size: 18px;
  font-weight: 600;
  margin-top: 0px;
  margin-bottom: 20px;
}

.input-group {
  text-align: left;
  margin-bottom: 20px;
}

.input-group label {
  font-size: 14px;
  margin-bottom: 6px;
  display: block;
  color: #333;
}

.input-group input {
  width: 92%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 15px;
  background-color: #f8f9fb;
  transition: border-color 0.3s ease;
}

.input-group input:focus {
  border-color: #001959;
  outline: none;
}

.options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 20px;
}

.options .remember input {
  margin-right: 6px;
}

.options .forgot {
  color: #001959;
  text-decoration: none;
}

.options .forgot:hover {
  text-decoration: underline;
}

.btn-primary,
.btn-secondary {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: background-color 0.3s ease;
}

.btn-primary {
  background-color: #001959;
  color: #fff;
  margin-bottom: 12px;
}

.btn-primary:hover {
  background-color: #003094;
}

.btn-secondary {
  background-color: #f1f3f6;
  color: #333;
}

.btn-secondary:hover {
  background-color: #e2e5e9;
}

.login-message {
  margin-top: 10px;
  margin-bottom: 20px;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.login-message.show {
  opacity: 1;
  transform: translateY(0);
}

.login-message.success {
  background-color: #e8f9f1;
  color: #1c6e4a;
  box-shadow: 0 4px 12px rgba(28, 110, 74, 0.15);
}

.login-message.error {
  background-color: #ffe8e8;
  color: #911f1f;
  box-shadow: 0 4px 12px rgba(145, 31, 31, 0.15);
}

.login-footer {
  text-align: center;
  padding: 20px;
  font-size: 13px;
  color: #999;
}

.password-wrapper {
  position: relative;
}
.password-wrapper .toggle-password {
  position: absolute;
  top: 70%;
  right: 5%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #888;
  padding: 4px;
  z-index: 2;
  transition: color 0.3s;
}
.password-wrapper .toggle-password:hover {
  color: #333;
}
.password-wrapper .toggle-password i {
  pointer-events: none;
}
@media (width <= 440px) {
  .password-wrapper .toggle-password {
    right: 2%;
  }
}

.security-icons {
  position: fixed;
  bottom: 0;
  margin-top: 12px;
  width: 100%;
  background-color: #f5f5f5;
  padding: 10px 0 25px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  user-select: none;
}

.icon-container {
  display: flex;
  flex-wrap: nowrap; /* impede quebra de linha */
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  min-width: max-content;
  user-select: none;
}

.icon-container img {
  height: 52px;
  width: auto;
  flex-shrink: 0; /* impede que se deformem */
  transition: transform 0.3s ease;
  pointer-events: auto;
  user-select: none;
  -webkit-user-drag: none; /* Safari/Chrome */
  -khtml-user-drag: none; /* Konqueror */
  -moz-user-drag: none; /* Firefox */
  -o-user-drag: none; /* Opera */
}

.icon-container img:hover {
  transform: scale(1.8);
}

.security-icons::-webkit-scrollbar {
  display: none;
}

.security-icons {
  -ms-overflow-style: none; /* IE e Edge */
  scrollbar-width: none; /* Firefox */
}
