/* Menubalk onderin (alleen op de telefoon). Zie navbalk.js. */
.ep-nav { display: none; }
@media (max-width: 760px) {
  body.ep-met-nav { --ep-nav-h: 64px; padding-bottom: calc(var(--ep-nav-h) + env(safe-area-inset-bottom)); }
  .ep-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    display: grid; grid-template-columns: repeat(var(--ep-nav-kolommen, 5), minmax(0, 1fr));
    height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: #fff; border-top: 1px solid #e3e8ef; box-shadow: 0 -4px 18px rgba(20, 35, 70, .08);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  }
  .ep-nav a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: #8a93a3; text-decoration: none; font-size: .72rem; font-weight: 600; min-width: 0;
    -webkit-tap-highlight-color: transparent;
  }
  .ep-nav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
  .ep-nav a svg { width: 25px; height: 25px; }
  .ep-nav a.actief { color: #202c54; }
  .ep-nav a.actief svg { color: #e38d2e; stroke-width: 2.1; }
  .ep-nav a:active { background: #f3f5f9; }
  body.ep-nav-weg .ep-nav { display: none; }
  body.ep-nav-weg.ep-met-nav { padding-bottom: 0; }

  /* Balken die onderaan 'plakken' boven de menubalk houden */
  body.ep-met-nav .ins-opslaan { bottom: calc(var(--ep-nav-h) + 10px); }
  body.ep-met-nav .opslaan-balk { bottom: calc(var(--ep-nav-h) + 12px); }
  body.ep-met-nav .opslaan { bottom: var(--ep-nav-h); }
  body.ep-met-nav .toast { bottom: calc(var(--ep-nav-h) + 16px); }
  body.ep-met-nav.ep-nav-weg .ins-opslaan { bottom: 10px; }
  body.ep-met-nav.ep-nav-weg .opslaan-balk { bottom: 12px; }
  body.ep-met-nav.ep-nav-weg .opslaan { bottom: 0; }
}

/* Dossierbalk bovenaan (zie dossierbalk.js): het dossier waarin je werkt, met de modules als tabbladen. */
.ep-dossier {
  position: relative; z-index: 41; display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap;
  padding: 6px 12px; background: #202c54; color: #fff; border-bottom: 2px solid #e38d2e;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 13px; line-height: 1.3;
}
.ep-dossier .ep-d-kop { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.ep-dossier .ep-d-nr { font-weight: 700; font-size: 14px; white-space: nowrap; color: #fff; text-decoration: none; }
.ep-dossier a.ep-d-nr:hover { text-decoration: underline; }
.ep-dossier .ep-d-info { color: #d5dcec; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
.ep-dossier .ep-d-status { background: rgba(255, 255, 255, .16); border-radius: 999px; padding: 1px 9px; font-size: 12px; white-space: nowrap; }
.ep-dossier .ep-d-tabs { display: flex; gap: 4px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ep-dossier .ep-d-tabs::-webkit-scrollbar { display: none; }
.ep-dossier .ep-d-tabs a {
  color: #fff; text-decoration: none; white-space: nowrap; padding: 4px 10px; border-radius: 7px;
  background: rgba(255, 255, 255, .1); font-weight: 600;
}
.ep-dossier .ep-d-tabs a:hover { background: rgba(255, 255, 255, .22); }
.ep-dossier .ep-d-tabs a.actief { background: #fff; color: #202c54; }
.ep-dossier .ep-d-sluit {
  margin-left: auto; flex: 0 0 auto; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 14px; line-height: 1; cursor: pointer;
}
.ep-dossier .ep-d-sluit:hover { background: rgba(255, 255, 255, .3); }
/* Schermvullende startschermen (container-indeling) beginnen onder de balk */
body.ep-met-dossier .startscherm { top: var(--ep-dossier-h, 0px); }
/* Telefoon: het dossier op de eerste regel (klantnaam afgekapt), de modules op de tweede; die schuift opzij */
@media (max-width: 760px) {
  .ep-dossier { gap: 4px 8px; padding: 5px 10px; }
  .ep-dossier .ep-d-kop { flex: 1 1 0; flex-wrap: nowrap; }
  .ep-dossier .ep-d-info { min-width: 0; flex: 0 1 auto; }
  .ep-dossier .ep-d-sluit { order: 2; width: 26px; height: 26px; }
  .ep-dossier .ep-d-tabs { order: 3; flex: 1 0 100%; }
}
@media print { .ep-dossier { display: none !important; } }
