* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
}

body {
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-bottom: 60px; /* espaço para o footer fixo */
}

.login-container {
  background: #1c1c1c;
  padding: 30px 25px;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  width: 100%;
  max-width: 370px;
  text-align: center;
  color: #fff;
}

.logo-wrapper {
  background-color: white;
  padding: 5px;
  border-radius: 12px;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.login-container img {
  max-width: 180px;
  margin-bottom: 20px;
}

h2 {
  margin-bottom: 25px;
  color: #ffffff;
}

input[type="text"], input[type="password"] {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #555;
  background: #2c2c2c;
  color: #fff;
  border-radius: 5px;
  font-size: 15px;
  transition: 0.3s;
}

input:focus {
  border-color: #00c853;
  outline: none;
  background: #333;
}

button {
  width: 100%;
  padding: 12px;
  background-color: #00c853;
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  position: relative;
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.spinner {
  border: 3px solid #eee;
  border-top: 3px solid white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  animation: spin 1s linear infinite;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
}

@keyframes spin {
  0% { transform: translateY(-50%) rotate(0deg); }
  100% { transform: translateY(-50%) rotate(360deg); }
}

#mensagem {
  margin-top: 15px;
  font-size: 14px;
  font-weight: bold;
}

footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background-color: #111;
  color: #bbb;
  text-align: center;
  padding: 10px 0;
  font-size: 13px;
}

@media (max-width: 400px) {
  .login-container {
    padding: 20px 15px;
  }

  .login-container img {
    max-width: 140px;
  }
}
