/* Layout elegante para a página de login
   Usa variáveis CSS para manter as cores do projeto caso já existam.
   Troque valores de fallback (--primary, --bg, etc.) conforme necessário. */

:root{
  --primary:        var(--primary-color, #0d6efd); /* fallback azul */
  --card-bg:        rgba(255,255,255,0.95);
  --muted:          #6c757d;
  --text:           #0b1720;
  --shadow:         0 10px 30px rgba(12, 24, 40, 0.15);
  --radius:         0px;
  --glass-border:   rgba(255,255,255,0.6);
  --accent-gradient: linear-gradient(135deg, rgba(13,110,253,0.08), rgba(29,78,216,0.06));
}

/* Background: mantém sua imagem de fundo — troque a URL se necessário */
.login-bg {
  min-height: 100vh;
  display: flex;
  justify-content: start;
  background-image: url('./img/background.jpeg'); /* mantenha sua imagem de fundo real */
  background-size: cover;
  background-position: center;
  position: relative;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: var(--text);
}

/* Dim overlay for contrast */
.login-bg::before{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.25));
  z-index: 0;
}

/* Wrapper */
.login-wrapper{
  position: relative;
  z-index: 2;
  width: min(1100px, 95%);
  margin: 40px auto;
}

/* Card */
.login-card{
  display: flex;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--card-bg);
  backdrop-filter: blur(6px) saturate(120%);
  border: 1px solid var(--glass-border);
}

/* Form pane */
.login-form-pane{
  padding: 40px;
  flex: 1 1 520px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 320px;
}

/* Brand */
.brand{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 200px;
  position: relative;
}
.brand-icon{
  aspect-ratio: 1;
  height: 100%;
  object-fit: contain;
  border-radius: 0px;
}
.brand-name{
  font-size: 1.15rem;
  margin: 0;
  color: var(--primary);
  letter-spacing: 0.2px;
}

/* Lead text */
.lead{
  margin: 6px 0 14px 0;
  color: var(--muted);
}

/* Form */
.login-form{
  display: grid;
  gap: 12px;
}
.login-form input[type="text"],
.login-form input[type="email"],
.login-form input[type="password"]{
  width: 100%;
  padding: 12px 14px;
  border-radius: 0px;
  border: 1px solid rgba(11,23,32,0.08);
  background: transparent;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.login-form input:focus{
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 60%, black 10%);
  box-shadow: 0 6px 18px rgba(13,110,253,0.08);
}

/* Password row with toggle */
.password-row{
  display: flex;
  align-items: center;
  gap: 8px;
}
.password-row .toggle-password{
  background: transparent;
  border: 1px solid rgba(11,23,32,0.06);
  padding: 8px 10px;
  border-radius: 0px;
  cursor: pointer;
  font-size: 0.95rem;
}

/* Meta row */
.form-meta{
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  color: var(--muted);
}
.remember input[type="checkbox"]{ margin-right: 8px; }

/* Button */
.btn-primary{
  margin-top: 4px;
  background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 90%, black 8%));
  color: white;
  padding: 12px 16px;
  border: none;
  border-radius: 0px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(13,110,253,0.14);
  transition: transform .08s ease, box-shadow .12s ease, opacity .12s ease;
}
.btn-primary:active{ transform: translateY(1px); }
.btn-primary:disabled{ opacity: 0.6; cursor: not-allowed; }

/* Footer */
.login-footer{
  margin-top: auto;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Image pane (lado direito do card) */
.login-image-pane{
  width: 420px;
  min-height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  background: var(--accent-gradient);
}
.datacenter-img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* um pouco de filtro para integração com o card */
  filter: saturate(0.95) contrast(1.02);
}

/* Responsividade */
@media (max-width: 900px){
  .login-card{
    flex-direction: column;
  }
  .login-image-pane{
    height: 220px;
    width: 100%;
  }
  .login-form-pane{
    padding: 28px;
  }
}

/* Acessibilidade: utilitário sr-only */
.sr-only{
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Alert messages */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
}

.alert-error {
  background-color: #fee;
  border: 1px solid #fcc;
  color: #c33;
}

.alert-success {
  background-color: #efe;
  border: 1px solid #cfc;
  color: #3c3;
}

/* Question box styling */
.question-box {
  background: #f8f9fa;
  border-left: 4px solid #0066cc;
  padding: 16px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.question-box h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  line-height: 1.5;
}

/* Form footer */
.form-footer {
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
}

.form-footer a {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.2s;
}

.form-footer a:hover {
  color: #0052a3;
  text-decoration: underline;
}

/* Screen reader only (for accessibility) */
.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;
}

/* Input validation states */
input:invalid:not(:placeholder-shown) {
  border-color: #dc3545;
}

input:valid:not(:placeholder-shown) {
  border-color: #28a745;
}

/* Focus states for better accessibility */
input:focus,
button:focus {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

/* Button hover state */
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary:active {
  transform: translateY(0);
}