/* 
  Design System Baseado em Material Design 3 (Dark Mode)
  Foco em Mobile-First, Performance e Visual Premium 
*/

/* ================================
   LOGIN SCREEN COMPONENT
   ================================ */

.login-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 24px;
  background-color: var(--md-sys-color-background);
  position: relative;
  overflow: hidden;
}

/* Background Glows (Mesh Gradients para combinar com a Landing Page) */
.login-layout::before, .login-layout::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  z-index: 0;
  opacity: 0.12;
  pointer-events: none;
}
.login-layout::before {
  width: 400px;
  height: 400px;
  background: var(--md-sys-color-primary);
  top: -10%;
  right: -10%;
}
.login-layout::after {
  width: 500px;
  height: 500px;
  background: #60a5fa;
  bottom: -15%;
  left: -10%;
}

.login-card {
  position: relative;
  z-index: 1;
  background: rgba(18, 19, 24, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--shape-extra-large);
  padding: 48px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--elevation-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Botões do Rodapé de Login */
.login-footer-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 420px;
  margin-top: 20px;
}

.btn-footer-home,
.btn-footer-whatsapp {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--shape-full, 9999px);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.btn-footer-home {
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.btn-footer-home:hover {
  background-color: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-footer-whatsapp {
  background-color: #4ade80;
  border: 1px solid #4ade80;
  color: #0c0d12;
}

.btn-footer-whatsapp:hover {
  background-color: #22c55e;
  border-color: #22c55e;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(74, 222, 128, 0.35);
  color: #0c0d12;
}

@media (max-width: 480px) {
  .login-footer-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .btn-footer-home,
  .btn-footer-whatsapp {
    width: 100%;
  }
}

.login-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--shape-small);
  margin-bottom: 24px;
  object-fit: contain;
}

.login-title {
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.login-subtitle {
  font-size: 14px;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 36px;
}

.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-field {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.input-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 6px;
  padding-left: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-field input {
  height: 56px;
  border-radius: var(--shape-medium);
  border: 1px solid var(--md-sys-color-outline);
  background: rgba(255, 255, 255, 0.03);
  padding: 0 16px;
  font-size: 16px;
  color: #ffffff;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-field input:focus {
  outline: none;
  border: 2px solid var(--md-sys-color-primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
  padding: 0 15px; /* adjust for border width */
}

.btn-primary {
  height: 50px;
  border-radius: 25px; /* rounded-full */
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
  margin-top: 12px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover {
  background-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  background-color: var(--md-sys-color-surface-variant);
  color: var(--md-sys-color-on-surface-variant);
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}

.error-message {
  color: #fca5a5;
  font-size: 13px;
  font-weight: 600;
  background-color: rgba(185, 26, 26, 0.15);
  border: 1px solid rgba(185, 26, 26, 0.3);
  padding: 12px;
  border-radius: var(--shape-small);
  display: none; /* hidden by default */
  text-align: left;
}

/* Spinner for loading state */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--md-sys-color-on-primary);
  border-bottom-color: transparent;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

@keyframes rotation {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Custom Autofill Styles for Dark Theme Inputs */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #1c1e24 inset !important;
    -webkit-text-fill-color: #ffffff !important;
    transition: background-color 5000s ease-in-out 0s;
}
