:root {
  --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  --accent-color: #60a5fa;
  --bg-dark: #020617;
  --glass-bg: rgba(15, 23, 42, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --error-bg: rgba(239, 68, 68, 0.15);
  --error-border: rgba(239, 68, 68, 0.4);
  --success-color: #10b981;
  --info-color: #3b82f6;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  height: 100%;
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow: hidden;
}

.bg-blur {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 30%, #1e3a8a 0%, transparent 40%),
              radial-gradient(circle at 80% 70%, #172554 0%, transparent 40%);
  filter: blur(80px);
  z-index: -1;
}

.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 20px;
}

.glass-container {
  display: flex;
  width: 100%;
  max-width: 1000px;
  min-height: 600px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.left-panel {
  flex: 1.2;
  padding: 50px;
  display: flex;
  flex-direction: column;
}

.right-panel {
  flex: 0.8;
  background: url("/assets/img/large/familiaJovemComprandoCarro.jpg") no-repeat center center;
  background-size: cover;
  position: relative;
  display: none; /* Hidden on small screens */
}

@media (min-width: 992px) {
  .right-panel { display: block; }
}

.right-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to right, var(--glass-bg), transparent);
}

.overlay-content {
  position: absolute;
  bottom: 50px;
  left: 40px;
  right: 40px;
  color: white;
}

.overlay-content h2 {
  font-size: 28px;
  margin-bottom: 12px;
  font-weight: 700;
}

.overlay-content p {
  font-size: 16px;
  color: #cbd5e1;
  line-height: 1.5;
}

.brand img {
  height: 48px;
  margin-bottom: 40px;
}

.welcome-text h1 {
  font-size: 32px;
  margin-bottom: 8px;
  font-weight: 700;
}

.welcome-text p {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 32px;
}

.modern-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-group label i {
  color: var(--accent-color);
}

.input-group input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px 16px;
  color: white;
  font-size: 16px;
  font-family: inherit;
  transition: all 0.3s ease;
}

.input-group input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.form-options {
  display: flex;
  justify-content: flex-end;
}

.forgot-link {
  font-size: 14px;
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s;
}

.forgot-link:hover {
  color: #93c5fd;
}

.btn-primary-modern {
  background: var(--primary-gradient);
  background-size: 200% auto;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 10px 15px -3px rgba(37, 99, 235, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-primary-modern::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: 0.5s;
}

.btn-primary-modern:hover {
  background-position: right center;
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.4);
}

.btn-primary-modern:hover::after {
  left: 100%;
}

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

.signup-prompt {
  margin-top: auto;
  padding-top: 40px;
  font-size: 15px;
  color: var(--text-muted);
  text-align: center;
}

.signup-prompt a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
}

.alert-custom {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.alert-error {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: #fca5a5;
  box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.1);
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-15px); }
  to { opacity: 1; transform: translateX(0); }
}

.mfa-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  gap: 12px;
}

.btn-link-modern {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px;
  transition: all 0.2s;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.btn-link-modern:hover {
  color: var(--accent-color);
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

.captcha-wrapper {
  margin: 10px 0;
  display: flex;
  justify-content: center;
}

/* Enterprise Toast System */
.toast-enterprise {
  min-width: 320px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 16px;
  color: white;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  animation: toastIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  pointer-events: auto;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%) scale(0.9); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.toast-leaving {
  animation: toastOut 0.3s forwards;
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(100%) scale(0.9); }
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast-icon {
  font-size: 20px;
}

.toast-message {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.toast-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
}

.toast-progress::after {
  content: '';
  position: absolute;
  top: 0; left: 0; height: 100%; width: 100%;
  background: var(--accent-color);
  animation: toastProgress 5s linear forwards;
}

@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0%; }
}

/* Toast Variants */
.toast-success .toast-icon { color: var(--success-color); }
.toast-success .toast-progress::after { background: var(--success-color); }

.toast-error .toast-icon { color: var(--error-color); }
.toast-error .toast-progress::after { background: var(--error-color); }

.toast-warning .toast-icon { color: var(--warning-color); }
.toast-warning .toast-progress::after { background: var(--warning-color); }

.toast-info .toast-icon { color: var(--info-color); }
.toast-info .toast-progress::after { background: var(--info-color); }

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}
