/* =====================================================================
   LOGIN — estilos exclusivos desta página (não usa style.css)
   ===================================================================== */

/* Variáveis locais (página standalone) */
:root {
  --green:       #28a745;
  --green-dark:  #1e7e34;
  --green-brand: #55e535b9;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(135deg, #003304, #1a0000);
  font-family: Arial, sans-serif;
}

/* ── Container ── */
.login-container {
  background-color: #000;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(28, 179, 63, 0.9);
  width: 100%;
  max-width: 380px;
  min-height: 440px;
  box-sizing: border-box;
  text-align: center;
  border: 1px solid rgba(20, 179, 63, 0.9);
  transition: box-shadow 0.3s ease;
  margin: 0 20px;
}

.login-container:hover {
  box-shadow: 0 0 15px 4px rgba(20, 179, 63, 0.9);
}

.login-container h2  { color: #fff; margin-bottom: 20px; }

.login-container .icon {
  width: 220px;
  height: auto;
  display: block;
  margin: 0 auto 20px;
}

/* ── Inputs ── */
.login-container input[type="text"],
.login-container input[type="password"] {
  width: 100%;
  background-color: #333;
  color: #fff;
  padding: 12px 15px;
  margin: 10px 0;
  border: none;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 16px;
}

.login-container input[type="text"]:focus,
.login-container input[type="password"]:focus {
  outline: 2px solid #4caf50;
  background-color: #2b2b2b;
}

/* ── Botão principal ── */
.login-container button {
  width: 100%;
  background-color: var(--green-brand);
  color: #fff;
  padding: 12px 15px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 15px;
  transition: background-color 0.3s ease;
}

/* ── Botão Entrar (com spinner) ── */
#botao-entrar {
  background-color: var(--green);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#botao-entrar.carregando {
  background-color: var(--green-dark);
  cursor: not-allowed;
  position: relative;
}

#botao-entrar.carregando::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  transform: translateY(-50%);
}

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

/* ── Links ── */
.login-container .forgot-password {
  display: block;
  margin-top: 15px;
  font-size: 14px;
  color: #bbb;
  text-decoration: none;
}

.login-container .forgot-password:hover { text-decoration: underline; }

/* ── Subtítulo ── */
.subtitle {
  color: #ccc;
  font-size: 14px;
  margin-bottom: 20px;
  text-align: center;
}

/* ── Toggle senha ── */
.password-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-container input { width: 100%; padding-right: 40px; }

.toggle-password {
  position: absolute;
  right: 10px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.toggle-password:hover         { opacity: 1; }
.toggle-password img           { width: 18px; height: 18px; }

/* ── Formulário ── */
.login-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ── Alertas (standalone — não usa style.css) ── */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin: 15px 0;
  font-size: 0.9rem;
  font-weight: bold;
  text-align: center;
}

.alert-success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error   { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-warning { background-color: #fff3cd; color: #856404; border: 1px solid #ffeeba; }

/* =====================================================================
   RESPONSIVO
   ===================================================================== */
@media (max-width: 768px) {
  .login-container {
    width: 90%;
    max-width: 420px;
    padding: 25px;
    margin: 20px auto;
  }

  .login-container h2 { font-size: 1.4rem; }

  .login-container input,
  .login-container button { font-size: 1rem; padding: 11px 14px; }
}

@media (max-width: 480px) {
  body {
    align-items: flex-start;
    padding-top: 40px;
  }

  .login-container {
    padding: 20px;
    min-height: auto;
    width: 90%;
    max-width: 400px;
    margin: 0 auto;
  }

  .login-container h2 { font-size: 1.2rem; }

  .login-container input,
  .login-container button { font-size: 0.9rem; padding: 10px 12px; }
}

@media (max-width: 360px) {
  .login-container {
    padding: 15px;
    width: 95%;
    max-width: 360px;
    margin: 0 auto;
  }

  .login-container h2 { font-size: 1rem; }

  .login-container input,
  .login-container button { font-size: 0.85rem; padding: 8px 10px; }
}
