/* Instellingen → Mijn aanpassingen (eigen-paneel.js). Strak-tokens uit os-strak.css,
   dus Helder en Avond gaan vanzelf mee. Dicht en rustig: een lijst, geen kaarten. */

/* stip bij Instellingen: op de avatar en in het profielmenu */
#btn-profiel.eg-heeft-stip { position: relative; }
#btn-profiel.eg-heeft-stip::after {
  content: ""; position: absolute; top: -1px; right: -1px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--oker); box-shadow: 0 0 0 2px var(--grond);
}
.pm-menu .pm-item .pm-tekst { flex: 1; }
.pm-menu .pm-stip { width: 8px; height: 8px; border-radius: 50%; background: var(--oker); flex: none; }

.eg-overlay {
  position: fixed; inset: 0; z-index: 9100; display: grid; place-items: center; padding: 16px;
  background: rgba(14,19,21,.32); opacity: 0; transition: opacity .18s ease;
}
.eg-overlay.zicht { opacity: 1; }
.eg-paneel {
  position: relative; width: min(620px, 100%); max-height: min(86vh, 760px); display: flex; flex-direction: column;
  background: var(--vlak); color: var(--inkt); border: 1px solid var(--lijn); border-radius: var(--r3);
  box-shadow: var(--sh-m); font: 14px/1.45 var(--f); overflow: hidden;
  transform: translateY(6px); transition: transform .22s cubic-bezier(.16,1,.3,1);
}
.eg-overlay.zicht .eg-paneel { transform: none; }
.eg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--lijn); }
.eg-kicker { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--inkt3); }
.eg-head h2 { margin: 2px 0 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.eg-sluit {
  width: 32px; height: 32px; display: grid; place-items: center; border: none; border-radius: var(--r1);
  background: none; color: var(--inkt2); cursor: pointer; transition: background .14s, color .14s;
}
.eg-sluit:hover { background: var(--vlak2); color: var(--inkt); }
.eg-sluit svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.eg-body { overflow-y: auto; padding: 4px 20px 16px; overscroll-behavior: contain; }

.eg-sectie { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--lijn); }
.eg-tekst { flex: 1; min-width: 0; }
.eg-hoofdtitel { font-weight: 600; }
.eg-uitleg { font-size: 13px; color: var(--inkt2); margin-top: 2px; }

/* schakelaar */
.eg-schakel {
  position: relative; flex: none; width: 38px; height: 22px; border-radius: 11px; border: none; padding: 0;
  background: var(--lijn2); cursor: pointer; transition: background .16s;
}
.eg-schakel span {
  position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .18s cubic-bezier(.16,1,.3,1);
}
.eg-schakel.aan { background: var(--teal); }
.eg-schakel.aan span { transform: translateX(16px); }
.eg-schakel:focus-visible, .eg-knop:focus-visible, .eg-sluit:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.eg-schakel:disabled, .eg-knop:disabled { opacity: .55; cursor: default; }

/* lijst */
.eg-lijst { list-style: none; margin: 0; padding: 0; }
.eg-rij { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--lijn); }
.eg-rij:last-child { border-bottom: none; }
.eg-rij .eg-schakel { margin-top: 1px; }
.eg-stip { flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--groen); }
.eg-rij.st-botsing .eg-stip { background: var(--oker); }
.eg-rij.st-fout .eg-stip { background: var(--warn); }
.eg-rij.st-uit .eg-stip { background: var(--lijn2); }
.eg-rij.st-wacht .eg-stip { background: var(--teal); }
.eg-titel { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 8px; }
.eg-naam { font-weight: 600; }
.eg-chip {
  font-size: 11px; line-height: 18px; padding: 0 6px; border-radius: 5px;
  background: var(--vlak2); border: 1px solid var(--lijn); color: var(--inkt2);
}
.eg-status { font-size: 12px; font-weight: 500; color: var(--groen); }
.eg-rij.st-botsing .eg-status { color: var(--oker); }
.eg-rij.st-fout .eg-status { color: var(--warn); }
.eg-rij.st-uit .eg-status { color: var(--inkt3); }
.eg-rij.st-wacht .eg-status { color: var(--teal); }
.eg-rij.st-uit .eg-naam { color: var(--inkt2); }
.eg-pad, .eg-mono { font-family: var(--m); font-size: 11.5px; }
.eg-pad { color: var(--inkt3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eg-melding { font-size: 13px; color: var(--inkt2); margin-top: 4px; }
.eg-rij.st-fout .eg-melding, .eg-rij.st-botsing .eg-melding { color: var(--inkt); }
.eg-acties { display: flex; gap: 8px; margin-top: 8px; }
.eg-knop {
  height: 28px; padding: 0 10px; border-radius: var(--r1); border: 1px solid var(--lijn2);
  background: var(--vlak); color: var(--inkt); font: 500 12.5px var(--f); cursor: pointer; transition: background .14s, border-color .14s;
}
.eg-knop:hover { background: var(--vlak2); }
.eg-knop.eg-primair { background: var(--teal); border-color: var(--teal); color: #fff; }
.eg-knop.eg-primair:hover { background: var(--teal2); }

/* verschil */
.eg-verschil { margin-top: 10px; border: 1px solid var(--lijn); border-radius: var(--r1); overflow: hidden; background: var(--vlak2); }
.eg-vkop { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; border-bottom: 1px solid var(--lijn); font-size: 12px; color: var(--inkt2); }
.eg-legenda { display: flex; gap: 6px; align-items: baseline; white-space: nowrap; }
.eg-legenda .eg-min { color: var(--warn); font-weight: 600; }
.eg-legenda .eg-plus { color: var(--groen); font-weight: 600; margin-left: 6px; }
.eg-diff { margin: 0; max-height: 300px; overflow: auto; padding: 6px 0; font: 11.5px/1.55 var(--m); font-variant-ligatures: none; tab-size: 2; }
.eg-diff span { display: block; padding: 0 10px; white-space: pre; }
.eg-d-plus { background: rgba(47,138,91,.12); }
.eg-d-min { background: rgba(194,74,66,.12); }
.eg-d-gelijk { color: var(--inkt2); }
.eg-d-skip { color: var(--inkt3); text-align: center; }
.eg-d-skip em { font-style: normal; }
.eg-kanten { display: grid; grid-template-columns: 1fr 1fr; }
.eg-kant + .eg-kant { border-left: 1px solid var(--lijn); }
.eg-kantkop { padding: 4px 10px; font-size: 11px; font-weight: 600; color: var(--inkt3); text-transform: uppercase; letter-spacing: .04em; }

.eg-leeg { padding: 28px 4px; color: var(--inkt2); font-size: 13px; }
.eg-leeg-kop { color: var(--inkt); font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.eg-leeg-klein { padding: 8px 10px; font-size: 12px; color: var(--inkt3); }

/* geschiedenis */
.eg-log { margin-top: 8px; border-top: 1px solid var(--lijn); padding-top: 10px; }
.eg-log summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--inkt3); text-transform: uppercase; letter-spacing: .04em; }
.eg-log ol { list-style: none; margin: 8px 0 0; padding: 0; max-height: 220px; overflow: auto; }
.eg-log li { display: grid; grid-template-columns: 112px 92px 1fr; gap: 8px; padding: 3px 0; font-size: 12px; color: var(--inkt2); }
.eg-log .eg-tijd { color: var(--inkt3); }
.eg-log .eg-logpad { font-family: var(--m); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eg-log .eg-loguit { grid-column: 3; color: var(--inkt3); }

.eg-toast {
  position: absolute; left: 50%; bottom: 14px; transform: translate(-50%, 8px); opacity: 0; pointer-events: none;
  padding: 7px 12px; border-radius: var(--r1); background: var(--inkt); color: var(--vlak); font-size: 13px;
  transition: opacity .16s, transform .16s;
}
.eg-toast.zicht { opacity: 1; transform: translate(-50%, 0); }
.eg-toast.fout { background: var(--warn); color: #fff; }

@media (max-width: 560px) {
  .eg-overlay { padding: 0; place-items: end stretch; }
  .eg-paneel { width: 100%; max-height: 92vh; border-radius: var(--r3) var(--r3) 0 0; }
  .eg-kanten { grid-template-columns: 1fr; }
  .eg-kant + .eg-kant { border-left: none; border-top: 1px solid var(--lijn); }
  .eg-log li { grid-template-columns: 1fr; gap: 0; }
  .eg-log .eg-loguit { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .eg-overlay, .eg-paneel, .eg-schakel span, .eg-toast { transition: none; }
}
