/* Algemene stijl */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  position: relative;
  min-height: 100vh;
  padding-bottom: 2.5rem;
}

main {
  padding: 1rem;
  padding-bottom: 3rem;
}

/* Navigatiebalk */
.navbar {
  background-color: #333;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  position: relative;
}

.menu {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.menu li {
  position: relative;
}

.menu li a {
  color: white;
  text-decoration: none;
  padding: 1rem;
  display: block;
}

.menu li a:hover {
  background-color: #444;
}

.disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* Dropdown - Basisstijlen */
.dropdown-menu {
  display: none;
  position: absolute;
  background-color: #444;
  top: 100%;
  left: 0;
  min-width: 160px;
  z-index: 1000;
  flex-direction: column;
}

/* Dropdown - Desktop hover */
@media (min-width: 769px) {
  .dropdown:hover .dropdown-menu {
    display: flex;
  }
}

/* Dropdown - Mobiel klik */
@media (max-width: 768px) {
  .dropdown.open .dropdown-menu {
    display: flex;
    position: static;
  }
}

.dropdown-menu li a {
  padding: 0.75rem 1rem;
  white-space: nowrap;
}

/* Menu toggle (hamburger) */
.menu-toggle {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  color: white;
}

/* Formulieren (algemeen) */
.formulier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.formulier-veld, .formulier-groep {
  display: flex;
  flex-direction: column;
}

.formulier-veld label, .formulier-label {
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #4a5568;
}

.formulier-veld input, 
.formulier-veld select, 
.formulier-veld textarea,
.formulier-input,
.formulier-select {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

.formulier-acties {
  grid-column: span 2;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Knoppen (algemeen) */
.btn, .knop {
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn:hover, .knop:hover {
  opacity: 0.9;
}

/* Specifieke knoppen */
.btn-primary, .btn {
  background-color: #2c7be5;
  color: white;
}

.btn-primary:hover, .btn:hover {
  background-color: #1a5dbb;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background-color: #565e64;
}

.btn-danger, .knop.gevaar {
  background-color: #dc3545;
  color: white;
}

.btn-danger:hover, .knop.gevaar:hover {
  background-color: #b52a37;
}

/* Meldingen */
.foutmelding, .alert-error, .error {
  color: #c53030;
  background-color: #fff5f5;
  padding: 1rem;
  margin-bottom: 1rem;
  border-left: 3px solid #e53e3e;
  border-radius: 5px;
}

.success, .alert-success {
  color: #2f855a;
  background-color: #f0fff4;
  padding: 1rem;
  margin-bottom: 1rem;
  border-left: 3px solid #38a169;
  border-radius: 5px;
}

.waarschuwing, .db-status.waarschuwing {
  background-color: #fffaf0;
  color: #dd6b20;
  border-left: 3px solid #ed8936;
}

/* Tabellen */
.table-responsive {
  overflow-x: auto;
  margin-top: 1rem;
}

.adres-tabel {
  width: 100%;
  border-collapse: collapse;
}

.adres-tabel th,
.adres-tabel td {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: left;
}

.adres-tabel th {
  background-color: #f4f4f4;
}

/* Ingelogde gebruiker tekst */
li.logged-in-text {
  padding: 0.5rem 1rem;
  color: #B7E1E4;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
}

li.logged-in-text::before {
  content: "👤";
  margin-right: 0.5rem;
  font-size: 1rem;
  color: #2d3748;
}

/* Info pagina specifiek */
.pagina-titel, .gebruiker-titel {
  text-align: center;
  margin: 2rem 0;
  font-size: 1.8rem;
  color: #2d3748;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.informatie-blok, .gebruiker-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid #4299e1;
}

.informatie-blok h2, .sectie-titel {
  color: #2d3748;
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rechten-lijst {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.rechten-lijst li {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid #edf2f7;
}

.rechten-lijst li:last-child {
  border-bottom: none;
}

/* Status icons */
.rechten-lijst li:has(✅) { color: #2f855a; }
.rechten-lijst li:has(❌) { color: #c53030; }
.rechten-lijst li:has(⚠️) { color: #dd6b20; }

/* Footer */
.footer-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  padding: 0.5rem 0;
  background-color: #333;
  color: #B7E1E4;
  font-size: 0.8rem;
}

/* Responsieve aanpassingen */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .menu {
    display: none;
    flex-direction: column;
    background-color: #333;
    width: 100%;
    position: absolute;
    top: 60px;
    left: 0;
  }

  .menu.active {
    display: flex;
  }

  .menu li {
    width: 100%;
  }

  .formulier-grid {
    grid-template-columns: 1fr;
  }

  .formulier-acties {
    grid-column: span 1;
    flex-direction: column;
    align-items: stretch;
  }

  .btn, .knop {
    width: 100%;
    text-align: center;
  }

  .formulier-veld, .formulier-groep {
    margin-bottom: 1rem;
  }

  .adres-tabel,
  .adres-tabel thead,
  .adres-tabel tbody,
  .adres-tabel th,
  .adres-tabel td,
  .adres-tabel tr {
    display: block;
  }

  .adres-tabel thead tr {
    display: none;
  }

  .adres-tabel td {
    position: relative;
    padding-left: 50%;
    border: 1px solid #ccc;
    margin-bottom: 0.5rem;
  }

  .adres-tabel td::before {
    content: attr(data-label);
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    color: #555;
  }

  .pagina-titel, .gebruiker-titel {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .login-container {
    margin: 1rem;
    padding: 1.5rem;
  }
}

/* Specifieke login-form stijlen */
.login-container {
  max-width: 400px;
  margin: 3rem auto;
  padding: 2rem;
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.login-container h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #2d3748;
}

.login-form .form-group {
  margin-bottom: 1.5rem;
}

.login-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #4a5568;
}

.login-form input {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  transition: border-color 0.3s;
}

.login-form input:focus {
  border-color: #4299e1;
  outline: none;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

.login-form button {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  background-color: #4299e1;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s;
}

.login-form button:hover {
  background-color: #3182ce;
}

/* Welkomstpagina stijlen */
.welcome-card {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  max-width: 800px;
  margin: 2rem auto;
}

.welcome-title {
  color: #2c3e50;
  text-align: center;
  margin-bottom: 1.5rem;
}

.user-greeting {
  margin-top: 1.5rem;
}

.welcome-text {
  font-size: 1.2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.role-info {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 6px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-item span {
  font-size: 1.5rem;
}

.guest-message {
  text-align: center;
  margin-top: 2rem;
}

.guest-message p {
  margin-bottom: 1.5rem;
}

/* Kleuraccenten op basis van rol */
.info-item.admin { border-left: 4px solid #3498db; }
.info-item.user { border-left: 4px solid #2ecc71; }
.info-item.reader { border-left: 4px solid #f39c12; }
.info-item.unknown { border-left: 4px solid #e74c3c; }