/* css/components/auth.css — UPGRADED PREMIUM VERSION
   ───────────────────────────────────────────────── */

/* ── Wrapper ─────────────────────────────────────── */
#auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 4rem);
}

/* ── Card — Nu met subtle gradient en interactieve glow ── */
#auth-card {
  width: 100%;
  max-width: 420px;
  background-color: var(--color-surface);
  
  /* Subtiel verloop voor diepte */
  background-image: linear-gradient(135deg, var(--color-surface) 0%, #13151b 100%);
  
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);

  /* Trage transitie voor de interactieve gloed */
  transition: box-shadow var(--transition-slow);

  /* Subtiele inkomst-animatie */
  animation: card-in 400ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Interactie: Gloed van de card reageert op focus in input */
#auth-card:focus-within {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6), 0 0 24px rgba(99, 102, 241, 0.2);
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Header ────────────────────────────────────────── */
#auth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

/* Meer sparkle op het logo */
#auth-logo {
  font-size: 2rem;
  color: var(--color-accent);
  /* VEEL intensere gloed */
  text-shadow: 0 0 30px rgba(99, 102, 241, 1), 0 0 60px rgba(99, 102, 241, 0.5);
  line-height: 1;
  margin-bottom: var(--space-2);
}

#auth-header h1 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.03em;
}

#auth-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* ── Input Group (Voor betere interactie) ── */
/* Om dit te laten werken moeten we JS lichtjes aanpassen,
   we slaan dit voor nu even over in JS om code-errors te voorkomen.
   De CSS hieronder reageert op het input-veld zelf. */

/* ── Labels (Nu toegankelijker) ─────────────────── */
#auth-card label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  /* De nieuwe lichtere tekst-kleur secondary */
  color: var(--color-text-secondary);
  margin-bottom: calc(var(--space-1) * -1);
  transition: color var(--transition-fast);
}

/* Interactie: Label oplichten als input veld actief is */
/* Helaas werkt label:has(+ input:focus) nog niet in alle browsers,
   dus we kunnen dit later via JS polijsten. */

/* ── Inputs — Met subtiele hover state ──────────────── */
#auth-card input[type="email"],
#auth-card input[type="password"] {
  appearance: none;
  outline: none;
  border: none;
  width: 100%;
  padding: var(--space-3) var(--space-5); /* iets meer padding */
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  border: 1px solid var(--color-border);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

#auth-card input::placeholder {
  /* De nieuwe lichtere tekst-kleur muted */
  color: var(--color-text-muted);
  opacity: 0.8;
}

/* Hover-state: border kleurt subtiel paars */
#auth-card input:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

#auth-card input:focus {
  border-color: var(--color-border-focus);
  box-shadow: var(--shadow-accent);
  background: rgba(34, 38, 58, 0.5); /* iets donkerder achtergrond bij focus */
}

/* ── Foutmelding (Onveranderd, ziet er al goed uit) ──── */
#auth-error {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-error-muted);
  border: 1px solid var(--color-error);
  color: var(--color-error);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  animation: error-in 200ms ease both;
}

#auth-error::before { content: '⚠'; flex-shrink: 0; }
@keyframes error-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* ── Submit-knop — Iets groter en meer gloed ──────────────── */
#auth-submit {
  appearance: none;
  border: none;
  cursor: pointer;
  width: 100%;
  padding: var(--space-4); /* Iets groter */
  border-radius: var(--radius-md);
  margin-top: var(--space-3); /* Meer afstand */
  background: var(--color-accent);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.02em;
  transition: background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast), opacity var(--transition-fast);
}

#auth-submit:hover:not(:disabled) {
  background: var(--color-accent-hover);
  /* Meer intense gloed */
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.5), 0 0 12px rgba(99, 102, 241, 0.2);
}

#auth-submit:active:not(:disabled) { transform: scale(0.98); }
#auth-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 480px) { #auth-card { border-radius: var(--radius-lg); padding: var(--space-6); } }