:root {
  --bg-color: #0f172a;
  --surface-color: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --brand-color: #6366f1; /* Indigo moderno */
  --brand-hover: #4f46e5;
  --error-color: #ef4444;
  --input-bg: #0f172a;
  --input-border: #334155;
  --focus-ring: rgba(99, 102, 241, 0.5);
}

/* Modo Acessibilidade Ativa (Alto Contraste) */
body.a11y-ativa {
  --bg-color: #000000;
  --surface-color: #000000;
  --text-primary: #ffffff;
  --text-secondary: #ffff00;
  --brand-color: #00ff00;
  --brand-hover: #00cc00;
  --input-bg: #000000;
  --input-border: #ffffff;
  --focus-ring: #ffff00;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  transition: all 0.3s ease;
}

/* Layout */
.login-container {
  display: flex;
  width: 100%;
  max-width: 1000px;
  background-color: var(--surface-color);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.login-brand {
  flex: 1;
  background: linear-gradient(135deg, var(--brand-color), #312e81);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

body.a11y-ativa .login-brand {
  background: #000000;
  border-right: 2px solid #ffffff;
}

.brand-content h1 {
  font-size: 3rem;
  margin-bottom: 16px;
}

.brand-content .highlight {
  color: #a5b4fc;
}

body.a11y-ativa .brand-content .highlight { color: #00ff00; }

.login-form-wrapper {
  flex: 1;
  padding: 60px 40px;
  display: flex;
  align-items: center;
}

.form-content { width: 100%; max-width: 360px; margin: 0 auto; }
.form-content h2 { font-size: 1.75rem; margin-bottom: 8px; }
.subtitle { color: var(--text-secondary); margin-bottom: 32px; font-size: 0.95rem; }

/* Inputs */
.input-group { margin-bottom: 20px; }
.input-group label { display: block; margin-bottom: 8px; font-size: 0.875rem; font-weight: 500; }
.input-group input {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus {
  outline: none;
  border-color: var(--brand-color);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

body.a11y-ativa .input-group input { border-width: 2px; }

/* Ações secundárias */
.form-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; font-size: 0.875rem; }
.forgot-password { color: var(--brand-color); text-decoration: none; font-weight: 500; }
.forgot-password:hover { text-decoration: underline; }

/* Botão Principal */
#btn-submit {
  width: 100%;
  padding: 14px;
  background-color: var(--brand-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.2s;
}

body.a11y-ativa #btn-submit { color: #000; }

#btn-submit:hover { background-color: var(--brand-hover); }
#btn-submit:disabled { opacity: 0.7; cursor: not-allowed; }

.error-message { color: var(--error-color); margin-top: 16px; font-size: 0.875rem; text-align: center; min-height: 20px; }

/* Loader Simples */
.loader { border: 3px solid rgba(255,255,255,0.3); border-radius: 50%; border-top: 3px solid #fff; width: 20px; height: 20px; animation: spin 1s linear infinite; }
body.a11y-ativa .loader { border-color: #000; border-top-color: #fff; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Botão A11y Flutuante */
.a11y-toggle { position: fixed; top: 20px; right: 20px; background: var(--surface-color); border: 1px solid var(--input-border); color: var(--text-primary); padding: 10px; border-radius: 50%; cursor: pointer; z-index: 100; }

/* Responsividade */
@media (max-width: 768px) {
  .login-container { flex-direction: column; margin: 20px; }
  .login-brand { padding: 30px; }
}

/* --- ESTILOS DO MODAL --- */
.modal {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(4px);
}

.modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-content {
  background-color: var(--surface-color);
  padding: 40px;
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  position: relative;
  transform: translateY(0);
  transition: transform 0.3s ease;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

body.a11y-ativa .modal-content {
  border: 2px solid #fff;
}

.modal.hidden .modal-content {
  transform: translateY(20px);
}

.close-btn {
  position: absolute;
  top: 16px; right: 16px;
  background: none; border: none;
  font-size: 1.5rem; color: var(--text-secondary);
  cursor: pointer; transition: color 0.2s;
}

.close-btn:hover { color: var(--text-primary); }

#btn-send-reset {
  width: 100%; padding: 12px;
  background-color: var(--brand-color); color: #fff;
  border: none; border-radius: 8px; font-weight: 600;
  cursor: pointer; display: flex; justify-content: center; align-items: center;
  margin-top: 10px;
}
body.a11y-ativa #btn-send-reset { color: #000; }
#btn-send-reset:hover { background-color: var(--brand-hover); }
#btn-send-reset:disabled { opacity: 0.7; cursor: not-allowed; }

.reset-message {
  margin-top: 16px; font-size: 0.875rem; text-align: center; min-height: 20px;
}