/* ============================================================
   LAGENCO — Login & Dashboard styling
   ============================================================ */

/* === LOGIN PAGINA === */
.auth-body {
  background: var(--bg-primary);
  min-height: 100vh;
  font-family: var(--font-sans);
  overflow-x: hidden;
}

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 40px 24px;
  overflow: hidden;
}

/* Achtergrond effecten */
.auth-bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
  pointer-events: none;
}

.auth-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.auth-particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  animation: authParticleFloat 20s infinite linear;
}
@keyframes authParticleFloat {
  0%   { transform: translateY(100vh) translateX(0); opacity: 0; }
  10%  { opacity: 0.5; }
  90%  { opacity: 0.5; }
  100% { transform: translateY(-100vh) translateX(50px); opacity: 0; }
}

/* Terug knop */
.auth-back {
  position: fixed;
  top: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  transition: var(--transition);
  z-index: 10;
}
.auth-back:hover {
  color: white;
  border-color: var(--border-strong);
  background: var(--accent-soft);
  transform: translateX(-3px);
}
.auth-back svg {
  width: 16px;
  height: 16px;
}

/* Login card */
.auth-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  background: rgba(31, 35, 51, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  animation: cardSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes cardSlideUp {
  0%   { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Logo sectie */
.auth-logo-section {
  text-align: center;
  margin-bottom: 40px;
}
.auth-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  background: var(--accent-soft);
  border-radius: 24px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  position: relative;
}
.auth-logo-wrap::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  z-index: -1;
}
.auth-logo {
  width: 56px;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
  animation: logoFloat 4s ease-in-out infinite;
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

.auth-title {
  font-size: 36px;
  font-weight: 200;
  letter-spacing: 8px;
  text-transform: uppercase;
  color: white;
  margin-bottom: 8px;
  padding-left: 8px;
}
.auth-title .letter-l {
  font-weight: 700;
  letter-spacing: 10px;
  padding-right: 2px;
  background: linear-gradient(180deg, #ffffff 0%, #c7cbd8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 500;
}

/* Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.auth-form .form-group { margin-bottom: 0; }

.auth-form label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.auth-form label svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.auth-form input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: white;
  font-family: var(--font-sans);
  font-size: 15px;
  transition: var(--transition);
}
.auth-form input::placeholder {
  color: var(--text-muted);
}
.auth-form input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

/* Password wrap met toggle */
.password-wrap {
  position: relative;
}
.password-wrap input {
  padding-right: 50px;
}
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: var(--transition);
}
.password-toggle:hover {
  color: white;
  background: var(--accent-soft);
}
.password-toggle svg {
  width: 18px;
  height: 18px;
}

/* Form options */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-top: 4px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  user-select: none;
}
.checkbox-label input {
  display: none;
  width: auto;
  padding: 0;
  margin: 0;
}
.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-strong);
  border-radius: 5px;
  position: relative;
  transition: var(--transition);
}
.checkbox-label input:checked + .checkbox-custom {
  background: white;
  border-color: white;
}
.checkbox-label input:checked + .checkbox-custom::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: solid var(--bg-primary);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.forgot-link {
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.forgot-link:hover { color: white; }

/* Submit button */
.auth-submit {
  position: relative;
  width: 100%;
  padding: 16px;
  background: white;
  color: var(--bg-primary);
  border: none;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
  margin-top: 8px;
}
.auth-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.25);
}
.auth-submit:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}
.auth-submit.success {
  background: #10b981;
  color: white;
}
.btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}
.btn-arrow {
  width: 18px;
  height: 18px;
  transition: var(--transition);
}
.auth-submit:hover:not(:disabled) .btn-arrow {
  transform: translateX(4px);
}
.auth-submit.loading .btn-content { opacity: 0; }
.auth-submit.loading::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(25, 29, 42, 0.3);
  border-top-color: var(--bg-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.btn-loader {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(25, 29, 42, 0.3);
  border-top-color: var(--bg-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Feedback */
.form-feedback {
  font-size: 13px;
  text-align: center;
  min-height: 20px;
  padding: 0;
  transition: var(--transition);
}
.form-feedback.success { color: #10b981; }
.form-feedback.error { color: #ef4444; }
.form-feedback.info {
  color: var(--text-secondary);
  text-align: left;
  padding: 14px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  line-height: 1.6;
}
.form-feedback code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: white;
}
.form-feedback strong { color: white; }
.form-feedback em { color: var(--text-muted); }

/* Security notice */
.auth-notice {
  margin-top: 24px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}
.auth-notice svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-secondary);
}

/* Shake animatie bij foute login */
.shake {
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

/* Footer */
.auth-footer {
  position: absolute;
  bottom: 20px;
  left: 0; right: 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 480px) {
  .auth-card {
    padding: 36px 24px;
    border-radius: 20px;
  }
  .auth-logo-wrap {
    width: 72px; height: 72px;
  }
  .auth-logo { width: 44px; }
  .auth-title { font-size: 28px; letter-spacing: 6px; }
  .auth-back {
    top: 16px; left: 16px;
    padding: 8px 12px;
    font-size: 12px;
  }
  .form-options {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
}

/* ============================================================
   DASHBOARD PAGINA
   ============================================================ */
.dashboard-body {
  background: var(--bg-primary);
  min-height: 100vh;
  font-family: var(--font-sans);
  overflow: hidden;
}

.dashboard-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  background: rgba(25, 29, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.dashboard-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dashboard-header-logo {
  height: 32px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
}
.dashboard-header-title {
  font-size: 18px;
  font-weight: 600;
  color: white;
  letter-spacing: 1px;
}
.dashboard-header-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 8px;
}
.dashboard-header-module {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.dashboard-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: var(--transition);
}
.user-info:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-strong);
}
.user-avatar {
  width: 32px;
  height: 32px;
  background: white;
  color: var(--bg-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}
.user-name {
  font-size: 13px;
  color: white;
  font-weight: 500;
}
.user-role {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.logout-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}
.logout-btn svg {
  width: 14px;
  height: 14px;
}

.dashboard-iframe-wrap {
  position: fixed;
  top: 64px;
  left: 0; right: 0; bottom: 0;
  background: var(--bg-primary);
}
.dashboard-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Loading state */
.dashboard-loading {
  position: fixed;
  top: 64px; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: var(--bg-primary);
  z-index: 50;
  transition: opacity 0.5s ease-out;
}
.dashboard-loading.hidden {
  opacity: 0;
  pointer-events: none;
}
.dashboard-loading-logo {
  width: 64px;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.2));
  animation: logoFloat 2s ease-in-out infinite;
}
.dashboard-loading-text {
  color: var(--text-muted);
  font-size: 14px;
  letter-spacing: 1px;
}
.dashboard-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-strong);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .dashboard-header {
    height: 56px;
    padding: 0 16px;
  }
  .dashboard-iframe-wrap {
    top: 56px;
  }
  .dashboard-header-title {
    font-size: 16px;
  }
  .dashboard-header-module {
    display: none;
  }
  .dashboard-header-divider {
    display: none;
  }
  .user-info {
    padding: 4px 10px 4px 4px;
  }
  .user-name {
    display: none;
  }
  .user-role {
    display: none;
  }
  .logout-btn span {
    display: none;
  }
  .logout-btn {
    padding: 8px;
  }
}

/* ============================================================
   NAVBAR LOGIN KNOP
   ============================================================ */
.nav-link.nav-login {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-strong);
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-link.nav-login:hover {
  background: white;
  color: var(--bg-primary);
}
.nav-link.nav-login svg {
  width: 14px;
  height: 14px;
}

/* Als gebruiker is ingelogd, toon "Dashboard" knop ipv "Login" */
.nav-link.nav-dashboard {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-link.nav-dashboard:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}
.nav-link.nav-dashboard svg {
  width: 14px;
  height: 14px;
}
