:root {
  /* Cores Modernas - Palette Médica Premium */
  --primary: #0f62fe;        /* Azul vibrante mas sério */
  --primary-hover: #0050e6;
  --bg-visual: #001b44;      /* Azul marinho profundo */
  
  --surface: #ffffff;
  --surface-alt: #f4f7fb;
  
  --text-main: #1a1f36;
  --text-muted: #697386;
  --text-light: #ffffff;
  
  --border: #e0e6eb;
  --focus-ring: rgba(15, 98, 254, 0.25);
  
  --danger: #d93025;
  --danger-bg: #ffebe9;
  
  --radius-lg: 16px;
  --radius-md: 10px;
  
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  background-color: var(--surface);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

.login-wrapper {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 1fr;
}

/* --- Lado Esquerdo (Visual) --- */
.visual-side {
  display: none; /* Mobile first: escondido em telas pequenas */
  position: relative;
  background-color: var(--bg-visual);
  /* Gradiente elegante */
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(90, 167, 255, 0.2), transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(15, 98, 254, 0.3), transparent 40%);
  color: var(--text-light);
  overflow: hidden;
}

.visual-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.visual-heading {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.visual-text {
  font-size: 1.125rem;
  line-height: 1.6;
  opacity: 0.9;
  max-width: 480px;
  margin-bottom: 48px;
}


.brand-logo {
  position: absolute;
  top: 40px;
  left: 60px;
  height: 48px; /* Ajuste a altura conforme necessário */
  width: auto;  /* Mantém a proporção */
  z-index: 10;  /* Garante que fique acima da imagem de fundo */
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
  transition: transform 0.3s ease;
}

.brand-logo:hover {
  transform: scale(1.05);
}

/* Card de Vidro Decorativo */
.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  gap: 16px;
  width: fit-content;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.glass-icon {
  background: rgba(255,255,255,0.2);
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
}

.glass-title { display: block; font-weight: 600; font-size: 14px; }
.glass-desc { display: block; font-size: 12px; opacity: 0.8; }

/* --- Lado Direito (Formulário) --- */
.form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--surface);
}

.form-container {
  width: 100%;
  max-width: 400px;
  animation: fadeIn 0.6s ease-out;
}

.header-mobile {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: bold;
  margin-bottom: 24px;
}

.auth-header { margin-bottom: 32px; }
.auth-header h2 { font-size: 28px; font-weight: 700; margin: 0 0 8px 0; color: var(--text-main); }
.auth-header p { margin: 0; color: var(--text-muted); font-size: 15px; }

.auth-form { display: flex; flex-direction: column; gap: 20px; }

.input-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 16px 12px 44px; /* Espaço para ícone */
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  color: var(--text-main);
  transition: all 0.2s;
  font-family: inherit;
}

.input-wrapper input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.2s;
}

.input-wrapper input:focus + .input-icon { color: var(--primary); }

.eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  display: grid; place-items: center;
}
.eye-btn:hover { color: var(--text-main); }

.actions {
  display: flex;
  justify-content: flex-end;
}

.forgot-pass {
  font-size: 14px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.forgot-pass:hover { text-decoration: underline; }

.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active { transform: scale(0.98); }

.auth-footer {
  margin-top: 32px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}
.auth-footer a { color: var(--text-main); font-weight: 600; text-decoration: none; }

.error-message {
  background: var(--danger-bg);
  border: 1px solid rgba(217, 48, 37, 0.2);
  color: var(--danger);
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

.hidden { display: none !important; }

/* Loader Simples */
.loader {
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top: 2px solid #fff;
  width: 18px; height: 18px;
  animation: spin 1s linear infinite;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shake { 10%, 90% { transform: translate3d(-1px, 0, 0); } 20%, 80% { transform: translate3d(2px, 0, 0); } 30%, 50%, 70% { transform: translate3d(-4px, 0, 0); } 40%, 60% { transform: translate3d(4px, 0, 0); } }

/* Desktop View */
@media (min-width: 900px) {
  .login-wrapper { grid-template-columns: 1.1fr 0.9fr; }
  .visual-side { display: block; }
  .header-mobile { display: none; }
}

.header-mobile-logo {
  height: 40px;
  width: auto;
  margin-bottom: 24px;
  display: block; /* Garante que apareça */
}

/* Esconder o logo grande em telas pequenas (já está no CSS anterior, mas reforçando) */
@media (max-width: 899px) {
  .visual-side { display: none; }
}

/* Esconder o logo mobile em telas grandes */
@media (min-width: 900px) {
  .header-mobile-logo { display: none; }
}