* {
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.auth {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #1e1e1e, #2a2a2a);
  color: #fff;
  padding: 20px;
  transition: opacity 0.5s ease;
}

body.loaded .container {
  opacity: 1;
  transform: translateY(0);
}

.container {
  background: #121212;
  padding: 40px 30px;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
  width: 100%;
  max-width: 420px;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.logo-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.logo-wrapper img {
  max-height: 70px;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.1));
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.logo-wrapper img:hover {
  transform: scale(1.05);
}

h1 {
  font-size: 28px;
  margin-bottom: 8px;
  color: #ffffff;
}

.subtitle {
  color: #b0b0b0;
  margin-bottom: 25px;
  font-size: 16px;
}

.input-group {
  margin-bottom: 20px;
  text-align: left;
}

.input-wrapper {
  position: relative;
  border-radius: 8px;
  transition: all 0.3s ease;
  border: 1px solid #333;
  background: #222;
  overflow: hidden;
}

.input-wrapper:focus-within {
  border-color: #f26722;
  box-shadow: 0 0 0 2px rgba(242, 103, 34, 0.2);
}

.input-wrapper.valido {
  border-color: #4CAF50;
}

.input-wrapper.invalido {
  border-color: #f44336;
}

.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  font-size: 16px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 14px 15px 14px 45px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 15px;
}

input:focus {
  outline: none;
}

input::placeholder {
  color: #888;
  transition: opacity 0.3s;
}

input:focus::placeholder {
  opacity: 0.5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.mensagem {
  font-size: 13px;
  color: #f44336;
  text-align: left;
  margin-top: 5px;
  min-height: 18px;
  transition: all 0.3s ease;
}

.senha-wrapper {
  position: relative;
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  cursor: pointer;
  background: transparent;
  border: none;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  width: 36px;
  border-radius: 50%;
  transition: background-color 0.3s;
}

.toggle-password:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.toggle-password:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(242, 103, 34, 0.2);
}

.linha-opcoes {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
  margin-bottom: 30px;
  padding: 0 2px;
  gap: 8px;
  flex-wrap: nowrap;
}

.lembrar {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #ccc;
  gap: 8px;
  white-space: nowrap;
  cursor: pointer;
}

.lembrar input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #f26722;
  margin: 0;
  cursor: pointer;
}

.esqueci {
  font-size: 14px;
  color: #ccc;
  text-decoration: none;
  font-weight: normal;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.3s;
  padding: 5px;
  border-radius: 4px;
}

.esqueci:hover {
  color: #fff;
  text-decoration: underline;
}

.esqueci:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(242, 103, 34, 0.2);
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: #f26722;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background: #d45513;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(242, 103, 34, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(242, 103, 34, 0.3);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-icon {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.btn-primary:hover .btn-icon {
  transform: translateX(3px);
}

.btn-primary.loading {
  background: #d45513;
}

.btn-primary.loading .btn-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 25px 0 20px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #333;
}

.divider span {
  margin: 0 12px;
  color: #888;
  font-size: 14px;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  background-color: #fff;
  color: #444;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.google-btn:hover {
  background-color: #f5f5f5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.google-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.google-btn:focus {
  outline: none;
  border-color: #4285F4;
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.3);
}

.google-btn img {
  width: 20px;
  height: 20px;
}

.erro-container {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: rgba(244, 67, 54, 0.1);
  color: #f44336;
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: left;
  border-left: 3px solid #f44336;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-link {
  margin-top: 25px;
  font-size: 14px;
  color: #b0b0b0;
}

.login-link a {
  color: #f26722;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s;
  padding: 3px;
  border-radius: 4px;
}

.login-link a:hover {
  text-decoration: underline;
  color: #ff7e3f;
}

.login-link a:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(242, 103, 34, 0.2);
}

@media (max-width: 480px) {
  .container {
    padding: 30px 20px;
  }
  
  h1 {
    font-size: 24px;
  }
  
  .subtitle {
    font-size: 14px;
  }
  
  .linha-opcoes {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .esqueci {
    align-self: flex-end;
  }
}

@media (min-width: 768px) {
  .container {
    padding: 45px 35px;
  }
  
  .google-btn {
    color: #222;
  }
}

/* Animações de transição */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Melhorias de acessibilidade para foco */
a:focus, button:focus, input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(242, 103, 34, 0.4);
}

/* Estilo para quando o JavaScript estiver desativado */
.no-js .container {
  opacity: 1;
  transform: none;
}
