/* ============================================================
   Roostersysteem — hoofdstylesheet (bouwbrief §10)
   Flat, clean, geen frameworks.
   ============================================================ */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #f1f0ed;
  color: #222;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 13px;
}

a { color: #2E74B5; }

/* --- Topbar + navigatie --- */
.topbar {
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 6px;
}
.app-naam { font-size: 16px; font-weight: 600; color: #2E74B5; }
.app-naam-blok { display: flex; flex-direction: column; line-height: 1.2; }
.app-versie { font-size: 10px; font-weight: 400; color: #999; margin-left: 6px; }
.app-ondertitel { font-size: 11px; color: #888; }
.topbar-gebruiker { font-size: 12px; color: #555; }
.rol-badge {
  background: #eef4fa;
  color: #2E74B5;
  border-radius: 3px;
  padding: 1px 6px;
  margin: 0 8px;
  font-size: 11px;
}
.uitlog-link { margin-left: 4px; }

.hoofdnav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 0 12px;
}
.hoofdnav a {
  display: inline-block;
  padding: 8px 10px;
  color: #444;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  font-size: 12px;
}
.hoofdnav a:hover { color: #2E74B5; }
.hoofdnav a.actief {
  color: #2E74B5;
  font-weight: 600;
  border-bottom: 2px solid #2E74B5;
}

.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  display: inline-block;
  padding: 8px 10px;
  color: #444;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}
.nav-dropdown-toggle:hover { color: #2E74B5; }
.nav-dropdown-toggle.actief {
  color: #2E74B5;
  font-weight: 600;
  border-bottom: 2px solid #2E74B5;
}
.nav-dropdown-pijl { font-size: 9px; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 50;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  box-shadow: 0 3px 12px rgba(0,0,0,.12);
  min-width: 160px;
  flex-direction: column;
  padding: 4px 0;
}
.nav-dropdown.open .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu a {
  padding: 7px 14px;
  color: #444;
  text-decoration: none;
  font-size: 12px;
  border-bottom: none;
}
.nav-dropdown-menu a:hover { background: #f4f8fc; color: #2E74B5; }
.nav-dropdown-menu a.actief { color: #2E74B5; font-weight: 600; background: #eef4fa; }

/* --- Pagina-indeling --- */
.inhoud { padding: 16px; max-width: 100%; }
.pagina-titel { font-size: 18px; margin: 0 0 14px; }

.paneel {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 14px;
  margin-bottom: 16px;
}
.paneel h2 { font-size: 14px; margin: 0 0 10px; }

.panelen-naast-elkaar {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.panelen-naast-elkaar > .paneel { flex: 1 1 480px; min-width: 0; }

/* --- Meldingen --- */
.melding {
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
  font-size: 12px;
}
.melding-ok { background: #d4edda; color: #155724; border: 1px solid #b9dfc3; }
.melding-fout { background: #f8d7da; color: #721c24; border: 1px solid #eec3c8; }
.melding-waarschuwing { background: #fdebd0; color: #7d5a1e; border: 1px solid #f3ddb5; }

/* --- Knoppen en formulieren --- */
.knop {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  background: #fafafa;
  color: #333;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
}
.knop:hover { background: #f0f0f0; }
.knop-primair {
  background: #2E74B5;
  border-color: #2E74B5;
  color: #fff;
}
.knop-primair:hover { background: #265f95; }
.knop-klein { padding: 3px 8px; font-size: 11px; }
.knop-gevaar { color: #a02020; border-color: #d8b0b0; }

label { font-size: 12px; }
input[type="text"], input[type="email"], input[type="date"], input[type="time"],
input[type="number"], input[type="color"], select, textarea {
  padding: 5px 7px;
  border: 1px solid #cfcfcf;
  border-radius: 3px;
  font-size: 12px;
  font-family: inherit;
  background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #bcd6ec; }

.form-raster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px 16px;
}
.form-veld { display: flex; flex-direction: column; gap: 3px; }
.form-veld-inline { display: flex; align-items: center; gap: 6px; }
.form-acties { margin-top: 14px; }

/* --- Standaardtabellen (beheer) --- */
.tabel {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  background: #fff;
}
.tabel th, .tabel td {
  border: 1px solid #e4e4e4;
  padding: 5px 8px;
  text-align: left;
  vertical-align: top;
}
.tabel th { background: #f8f8f7; font-size: 11px; }
.tabel tr:hover td { background: #fbfbfa; }
.tabel th form { margin: 0; }

.th-sorteer {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 700;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.th-sorteer:hover { color: #2E74B5; }
.th-sorteer-icoon { color: #999; font-weight: 400; }

.drag-greep {
  display: inline-grid;
  grid-template-columns: repeat(2, 4px);
  grid-auto-rows: 4px;
  gap: 2px;
  padding: 4px;
  cursor: grab;
}
.drag-greep span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #999;
}
.tabel tr.rij-sleept { opacity: 0.4; }

.cap-stip {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 3px;
  background: #d5d5d5;
}
.cap-stip.aan { background: #2E74B5; }

.tijd-opener { color: #2E74B5; font-weight: 700; }

/* --- Login --- */
.login-pagina { background: #f1f0ed; }
.login-kader {
  display: flex;
  justify-content: center;
  padding-top: 12vh;
}
.login-paneel { width: 340px; text-align: center; }
.login-paneel h1 { font-size: 18px; color: #2E74B5; }
.login-sub { color: #777; margin-top: -6px; }
.login-knop { margin: 14px 0 8px; width: 100%; }
.login-hint { font-size: 11px; color: #888; }

.fout-pagina { max-width: 480px; margin: 8vh auto; }

.voettekst {
  padding: 10px 16px 20px;
  color: #999;
  font-size: 11px;
}

/* --- Toast (AJAX-feedback) --- */
#toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 300;
  display: none;
  max-width: 380px;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
#toast.ok { display: block; background: #d4edda; color: #155724; }
#toast.fout { display: block; background: #f8d7da; color: #721c24; }
#toast.waarschuwing { display: block; background: #fdebd0; color: #7d5a1e; }

/* --- Help-pagina --- */
.help-toc ul { columns: 2; column-gap: 24px; margin: 8px 0; padding-left: 18px; }
.help-toc li { font-size: 12px; margin-bottom: 4px; break-inside: avoid; }
.help-kop { font-size: 15px; margin: 20px 0 8px; scroll-margin-top: 12px; }
.help-kop:first-of-type { margin-top: 0; }
.help-stappen { padding-left: 20px; }
.help-stappen li { margin-bottom: 10px; line-height: 1.5; }
