/* Utility helpers */
.hidden{ display:none !important; }

.sr-only{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}

/* FUGA Admin (Carbon Steel-ish) */
/* Aileron (Light) – standaard UI-font */
@font-face {
  font-family: "Aileron";
  src: url("/assets/fonts/aileron/Aileron-Light.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root{
  --bg0:#0a0d11;
  --bg1:#11161d;
  --card:#151c24;
  --card2:#121820;
  --ink:rgba(240,244,248,0.94);
  --muted:rgba(240,244,248,0.60);
  --line:rgba(240,244,248,0.12);
  --line2:rgba(240,244,248,0.18);
  --accent:rgba(240,244,248,0.88);
  --danger:#b23a3a;
  --danger2:#d25151;
  --shadow: 0 12px 40px rgba(0,0,0,0.42);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: "Aileron", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";}

*{ box-sizing:border-box; }

/* Fix: voorkom zwarte “unpainted” vlakken onderaan bij lange pagina’s */
html, body{ height:100%; }

html{
  /* fallback: als body om wat voor reden dan ook niet tot scrollHeight “mee verft” */
  background:
    radial-gradient(1200px 800px at 20% 0%, rgba(255,255,255,0.06), transparent 55%),
    radial-gradient(900px 700px at 90% 20%, rgba(255,255,255,0.05), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

body.bg{
  min-height:100%;
  margin:0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 800px at 20% 0%, rgba(255,255,255,0.06), transparent 55%),
    radial-gradient(900px 700px at 90% 20%, rgba(255,255,255,0.05), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

/* =========================================================
   Header v2
   - parallel aan de oude .topbar-structuur
   - alleen actief op pagina's die body.fuga-header-v2 dragen
   - laat bestaande .topbar-regels elders intact
   ========================================================= */

body.fuga-header-v2 > .header{
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(240,244,248,0.08);
  background:
    linear-gradient(180deg, rgba(8,12,16,0.96), rgba(8,12,16,0.88));
  backdrop-filter: blur(10px);
}

body.fuga-header-v2 > .header .wrap.nav{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding-top: 12px;
  padding-bottom: 12px;
}

body.fuga-header-v2 > .header .links{
  min-width: 0;
  display: flex;
  gap: 12px;
}

body.fuga-header-v2 > .header .nav-left{
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}

body.fuga-header-v2 > .header .nav-right{
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  min-width: 0;
  gap: 10px;
}

body.fuga-header-v2 > .header .nav-brand-text{
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(240,244,248,0.82);
  white-space: nowrap;
}

body.fuga-header-v2 > .header .nav-links-row{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

body.fuga-header-v2 > .header .nav-links-row-right{
  justify-content: flex-end;
}

body.fuga-header-v2 > .header .header-logo{
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding-top: 2px;
}

body.fuga-header-v2 > .header .header-logo .brandMark{
  width: 36px;
  height: 36px;
  display: block;
  flex: 0 0 auto;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}

body.fuga-header-v2 > .header .nav-auth-block{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

body.fuga-header-v2 > .header #who{
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  max-width: 100%;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(240,244,248,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(240,244,248,0.82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.fuga-header-v2 > .header .btn{
  min-height: 34px;
  padding: 0 14px;
}

body.fuga-header-v2 > .header .btn.secondary{
  min-height: 34px;
}

@media (max-width: 1180px){
  body.fuga-header-v2 > .header .wrap.nav{
    grid-template-columns: 1fr;
    align-items: center;
    gap: 10px;
  }

  body.fuga-header-v2 > .header .header-logo{
    order: 1;
  }

  body.fuga-header-v2 > .header .nav-left{
    order: 2;
    justify-content: center;
    flex-wrap: wrap;
  }

  body.fuga-header-v2 > .header .nav-right{
    order: 3;
    align-items: center;
  }

  body.fuga-header-v2 > .header .nav-links-row,
  body.fuga-header-v2 > .header .nav-links-row-right,
  body.fuga-header-v2 > .header .nav-auth-block{
    justify-content: center;
  }
}

@media (max-width: 820px){
  body.fuga-header-v2 > .header .wrap.nav{
    padding-top: 10px;
    padding-bottom: 10px;
  }

  body.fuga-header-v2 > .header .nav-left{
    gap: 10px;
  }

  body.fuga-header-v2 > .header .nav-brand-text{
    width: 100%;
    justify-content: center;
  }

  body.fuga-header-v2 > .header .nav-links-row,
  body.fuga-header-v2 > .header .nav-auth-block{
    width: 100%;
    justify-content: center;
  }

  body.fuga-header-v2 > .header #who{
    max-width: min(100%, 320px);
  }
}

/* Forceer consistente Schriftart voor form-controls (Chrome/Safari UA defaults omzeilen) */
button, input, select, textarea{
  font: inherit;
}

/* Technisch: command/structure velden mogen mono blijven */
#structureChatIn,
#structureCmd{
  font-family: var(--mono);
  font-size: 12px;
}

a{ color: inherit; }
.muted{ color: var(--muted); }
.mono{ font-family: var(--mono); }
.small{ font-size: 12px; }

.topbar{
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(240,244,248,0.08);
  background:
    linear-gradient(180deg, rgba(8,12,16,0.96), rgba(8,12,16,0.88));
  backdrop-filter: blur(10px);
}

.topbarLeft,
.topLeft,
.topbarCenter,
.brandCenter,
.topbarRight,
.actions{
  min-width: 0;
  display: flex;
  align-items: center;
}

.topbarLeft,
.topLeft{
  justify-content: flex-start;
  gap: 14px;
}

.topLeft > .brand{
  order: 1;
}

.topLeft > .btn.mini{
  order: 2;
}

.topbarCenter,
.brandCenter{
  justify-content: center;
}

.topbarRight,
.actions{
  justify-content: flex-end;
  gap: 8px;
}

.topnav,
.topbarNav{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.topnavLink,
.topbarNavBtn,
.topbarAction,
.topLeft > .btn.mini{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(240,244,248,0.16);
  background: transparent;
  color: rgba(240,244,248,0.92);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition:
    background 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    transform 80ms ease,
    box-shadow 120ms ease;
}

.topnavLink:hover,
.topbarNavBtn:hover,
.topbarAction:hover,
.topLeft > .btn.mini:hover{
  background: rgba(46,230,163,.22);
  border-color: #245645;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 0 0 1px rgba(46,230,163,.08);
}

.topnavLink:active,
.topbarNavBtn:active,
.topbarAction:active,
.topLeft > .btn.mini:active{
  transform: translateY(1px);
}

.topnavLink:focus-visible,
.topbarNavBtn:focus-visible,
.topbarAction:focus-visible,
.topLeft > .btn.mini:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(46,230,163,.12);
}.brand,
.brandBlock{
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.brand{
  gap: 8px;
  align-items: baseline;
}

.brandBlock{
  gap: 10px;
  padding: 4px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(240,244,248,0.08);
}

.brandMark{
  width: 34px;
  height: 34px;
  display: block;
  flex: 0 0 auto;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
  opacity: 0.96;
}

.brandText{
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.logo{
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.05;
  white-space: nowrap;
  font-size: 18px;
  color: #79e3bc;
  text-transform: uppercase;
}

.brandSub,
.brand .muted{
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: none;
  color: rgba(240,244,248,0.72);
  line-height: 1.1;
}

.topbarBtn{
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.wrap{
  max-width: 1480px;
  margin: 0 auto;
  padding: 12px 14px 24px;
}

@media (max-width: 820px){
  .topbar{
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 12px;
  }

  .topbarLeft,
  .topLeft,
  .topbarCenter,
  .brandCenter,
  .topbarRight,
  .actions{
    justify-content: center;
  }

  .topLeft,
  .topbarNav,
  .topbarRight,
  .actions{
    flex-wrap: wrap;
  }

  .topLeft{
    gap: 10px;
  }

  .topLeft > .brand{
    width: 100%;
    justify-content: center;
  }

  .brandBlock{
    width: 100%;
    justify-content: center;
  }
}
html, body{
  overflow-x: hidden;
  overscroll-behavior: none;
}
pre, code, .mono{ max-width: 100%; overflow-x: auto; }
.tablewrap, table{ max-width:100%; overflow-x:auto; }


.grid{
  display:grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;

  grid-template-areas:
    "client client"
    "map map"
    "graph graph"
    "upload upload"
    "project project"
    "explorer explorer"
    "tests tests";
}

#secClient{ grid-area: client; }
#secMap{ grid-area: map; }
#secGraph{ grid-area: graph; }
#secProject{ grid-area: project; }
#secUpload{ grid-area: upload; }
#secExplorer{ grid-area: explorer; }
#secTests{ grid-area: tests; }

@media (max-width: 980px){
  .grid{
    grid-template-columns: 1fr;
    grid-template-areas:
      "client"
      "map"
      "graph"
      "upload"
      "project"
      "explorer"
      "tests";
  }
}

/* Client/evidence bestanden: turquoise achtergrond in de project-files tabel */
.filesTable tr.fileRowClient td{
  background: rgba(64, 224, 208, 0.12);
}
.filesTable tr.fileRowClient:hover td{
  background: rgba(64, 224, 208, 0.18);
}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent 40%), var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 26px rgba(0,0,0,0.25);
}

.card.compact{
  padding-top: 10px;
  padding-bottom: 10px;
}
.card.compact .row{
  margin: 8px 0;
}

/* FUGA client: grafiek staat als eigen, randloze laag tussen twee kaarten. */
#secGraph{
  position: relative;
  z-index: 1;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  overflow: visible;
}

#secGraph > .mapStack{
  margin: 0;
}

#secGraph > .mapStack > .mapFrame{
  border: 0;
  border-radius: 0;
}

.card h2{
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(240,244,248,0.80);
}
.span2{ grid-column: 1 / span 2; }

.row{
  display:flex;
  gap: 10px;
  align-items:center;
  margin: 10px 0;
}
.row.right{ justify-content:flex-end; }

.row.between{ justify-content: space-between; }

.wraprow{ flex-wrap: wrap; }

.lbl{
  display:block;
  font-size: 12px;
  color: rgba(240,244,248,0.62);
  margin-top: 10px;
  margin-bottom: 6px;
}
.hint{
  font-size: 12px;
  line-height: 1.35;
  margin-top: 6px;
}

.inp, .sel, .file, textarea{
  width: 100%;
  background: rgba(0,0,0,0.20);
  color: var(--ink);
  border: 1px solid var(--line2);
  border-radius: 12px;
  padding: 10px 10px;
  outline: none;
}
textarea{ resize: vertical; }
.sel{ padding: 10px; }

.btn{
  border: 1px solid rgba(240,244,248,0.16);
  background: rgba(255,255,255,0.06);
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 12px;
  cursor:pointer;
  white-space:nowrap;
}
.btn:hover{ background: rgba(255,255,255,0.09); }
.btn:active{ transform: translateY(1px); }
.btn.secondary{
  background: rgba(0,0,0,0.22);
}
.btn.secondary.expandHint{
  border-color: rgba(64, 224, 208, 0.38);
  background: rgba(64, 224, 208, 0.16);
  color: rgba(230, 255, 250, 0.92);
}
.btn.secondary.expandHint:hover{
  background: rgba(64, 224, 208, 0.22);
}
.btn.danger{
  border-color: rgba(210,81,81,0.38);
  background: rgba(210,81,81,0.14);
}
.btn.danger:hover{
  background: rgba(210,81,81,0.20);
}

.chk{
  display:flex;
  align-items:center;
  gap: 8px;
  font-size: 13px;
  color: rgba(240,244,248,0.82);
  user-select:none;
}
.chk input{ transform: translateY(1px); }

#secMap .chk{
  position: relative;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(240,244,248,0.14);
  background: rgba(0,0,0,0.16);
  font-size: 11px;
  line-height: 1.15;
  letter-spacing: 0;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

#secMap .chk span{
  font-size: inherit;
  font-weight: 500;
  letter-spacing: 0;
}

#secMap .chk input{
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transform: none;
}

#secMap .chk:hover{
  background: rgba(255,255,255,0.06);
}

#secMap .chk:focus-within{
  outline: 2px solid rgba(61,205,183,0.55);
  outline-offset: 2px;
}

#secMap .chk:has(input:checked){
  background: rgba(61,205,183,0.18);
  border-color: rgba(61,205,183,0.35);
  box-shadow: inset 0 0 0 1px rgba(61,205,183,0.20);
}

#secMap .chk:has(input:checked) span{
  color: rgba(236,255,250,0.96);
  font-weight: 700;
}

.box{
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(240,244,248,0.14);
  border-radius: 12px;
  padding: 10px;
  overflow:auto;
  max-height: 260px;
}

.box.warn{
  border-color: rgba(255, 200, 80, 0.32);
  background: rgba(255, 200, 80, 0.06);
}

.box.small{ max-height: 210px; }

#mapLegend{
  white-space: pre-wrap;
  line-height: 1.35;
}

.elementsWrap{
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.elCard{
  border: 1px solid rgba(240,244,248,0.12);
  background: rgba(0,0,0,0.18);
  border-radius: 12px;
  padding: 10px;
}
.elTop{
  display:flex;
  justify-content:space-between;
  gap: 10px;
}
.elKind{
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(240,244,248,0.70);
}
.elMeta{
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(240,244,248,0.50);
}
.elText{
  margin-top: 8px;
  line-height: 1.36;
  font-size: 13px;
  color: rgba(240,244,248,0.90);
}

/* Ingest bar */
.ingestProgressWrap{
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.ingestProgressMeta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 18px;
}

.ingestProgressPart,
.ingestProgressPct{
  color: rgba(240,244,248,0.72);
  font-variant-numeric: tabular-nums;
}

.ingestProgressPart{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ingestProgressPct{
  flex: 0 0 auto;
  text-align: right;
}

.bar{
  height: 10px;
  border-radius: 999px;
  background: rgba(240,244,248,0.08);
  border: 1px solid rgba(240,244,248,0.12);
  overflow:hidden;
  margin-top: 0;
}

.barFill{
  height: 100%;
  width: 0%;
  background: rgba(240,244,248,0.55);
  transition: width 120ms linear;
}

.note{
  font-size: 12px;
  line-height: 1.3;
}

.ingestStats{
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.ingestStatsRow{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.bar.pulsing .barFill{
  background: linear-gradient(
    90deg,
    rgba(240,244,248,0.22) 0%,
    rgba(240,244,248,0.70) 50%,
    rgba(240,244,248,0.22) 100%
  );
  background-size: 200% 100%;
  animation: ingestPulse 900ms linear infinite;
}

@keyframes ingestPulse{
  0%   { background-position: 200% 0; }
  100% { background-position:   0% 0; }
}

/* Segmented control */
.seg{
  display:flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(240,244,248,0.14);
  border-radius: 12px;
  overflow:hidden;
  background: rgba(0,0,0,0.20);
}
.segItem{
  position: relative;
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor:pointer;
  user-select:none;
  font-size: 13px;
  color: rgba(240,244,248,0.82);
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.segItem input{
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.segItem:hover{ background: rgba(255,255,255,0.06); }
.segItem:focus-within{
  outline: 2px solid rgba(61,205,183,0.55);
  outline-offset: 2px;
}
.segItem:has(input:checked){
  background: rgba(61,205,183,0.18);
  box-shadow: inset 0 0 0 1px rgba(61,205,183,0.28);
}
.segItem:has(input:checked) span{
  color: rgba(236,255,250,0.96);
  font-weight: 700;
}
/* Map */
.mapStack{
  display:flex;
  flex-direction:column;
  gap: 10px;

  /* Geen kunstmatig hoge container meer:
     laat de inhoud de hoogte bepalen, zodat er geen groot leeg vlak onder de kaart ontstaat. */
  height: auto;
  min-height: 0;
}

.mapFrame{
  position: relative;
  width: 100%;
  background: #030405;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow:hidden;
  flex: 0 0 auto;

  /* De kaart krijgt meer aanwezigheid, zonder zichtbaar kader eromheen. */
  height: clamp(480px, 62vh, 900px);
  min-height: 480px;
}

@media (min-width: 1200px){
  .mapFrame{
    height: clamp(560px, 68vh, 980px);
  }
}

@media (max-width: 980px){
  .mapFrame{
    height: clamp(400px, 52vh, 620px);
    min-height: 400px;
  }
}

#clusterCanvas{
  display:block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}
#clusterCanvas:active{ cursor: grabbing; }

/* Gesloten extra-grafiekinformatie moet compact blijven */
.mapInfoBlock{
  margin: 0;
}

.mapInfoBlock > summary{
  margin: 0;
}

.mapInfoBlock:not([open]){
  padding-bottom: 0;
}

.pill{
  padding: 8px 10px;
  border: 1px solid rgba(240,244,248,0.14);
  background: rgba(0,0,0,0.18);
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--mono);
  color: rgba(240,244,248,0.70);
}
.hoverTip{
  position:absolute;
  pointer-events:none;
  z-index: 3;
  font-family: var(--mono);
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(240,244,248,0.14);
  background: rgba(0,0,0,0.76);
  color: rgba(240,244,248,0.92);
  max-width: min(520px, 72vw);
  box-shadow: var(--shadow);
}

.details{
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.35;
  overflow: auto;
  max-height: none;
  height: var(--mapDetailsH, 220px);
}

/* Details: minimalistische 2-koloms layout (als JS HTML rendert) */
.details .dTitle{
  font-size: 12px;
  letter-spacing: 0.02em;
  color: rgba(240,244,248,0.86);
  margin: 0 0 10px;
}

.details .dSub{
  font-size: 11px;
  color: rgba(240,244,248,0.60);
  margin: -6px 0 10px;
}

.details .dGrid{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
}

.details .dRow{
  display: contents; /* label/value als “cells” */
}

.details .dK{
  color: rgba(240,244,248,0.60);
}

.details .dV{
  color: rgba(240,244,248,0.86);
  text-align: right;
  font-variant-numeric: tabular-nums;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.details .dSep{
  height: 1px;
  background: rgba(240,244,248,0.10);
  margin: 10px 0 12px;
}

.hsplit{
  height: 10px;
  border-radius: 10px;
  cursor: ns-resize;
  background: rgba(240,244,248,0.06);
  border: 1px solid rgba(240,244,248,0.10);
  touch-action: none;
}
.hsplit:hover{
  background: rgba(240,244,248,0.10);
}
body.dragging{ cursor: ns-resize; }

/* Modal */
.modal{
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow: hidden;
  overscroll-behavior: contain;
}
.modalBackdrop{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
}
.modalCard{
  position: relative;
  max-width: 520px;
  margin: 12vh auto 0;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent 50%), rgba(10,14,20,0.96);
  border: 1px solid rgba(240,244,248,0.14);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.modalTitle{
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.modalText{
  color: rgba(240,244,248,0.72);
  font-size: 13px;
  line-height: 1.4;
}
.fugaWelcomeSteps{
  margin: 14px 0 0;
  padding-left: 22px;
  color: rgba(240,244,248,0.86);
}
.fugaWelcomeSteps li{
  margin: 0 0 10px;
  line-height: 1.5;
}
.err{
  margin-top: 10px;
  color: rgba(210,81,81,0.94);
  background: rgba(210,81,81,0.12);
  border: 1px solid rgba(210,81,81,0.24);
  padding: 10px;
  border-radius: 12px;
}

.foot{
  margin-top: 16px;
  font-size: 12px;
  padding: 10px 4px;
}

@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr; }
  .span2{ grid-column: 1; }
  .row{ flex-wrap: wrap; }
}


/* --- Additions: files list + responsive --- */
.filesList{ width:100%; overflow-x:auto; }
#filesList{ height: var(--filesListH, 260px); overflow: auto; }
.filesTable{ width:100%; border-collapse: collapse; }
.filesTable th, .filesTable td{
  padding:10px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.filesTable th{
  text-align:left;
  font-weight:600;
  font-size:12px;
  letter-spacing:0.03em;
  color: rgba(240,244,248,0.70);
}
.filesTable td{
  font-size:13px;
  color: rgba(240,244,248,0.88);
}
.filesActions{ display:flex; gap:8px; flex-wrap:wrap; }
.preBox{
  max-height:65vh;
  overflow:auto;
  white-space:pre-wrap;
  word-break:break-word;
  background: rgba(0,0,0,0.35);
  padding:12px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.modalCard.wide{
  width: min(980px, calc(100vw - 26px));
}

#fugaCommunityModal,
#fugaCommunityPreviewModal{
  box-sizing:border-box;
  overflow:hidden;
  padding: 14px 0;
}

.modalCard.wide.fugaCommunityModalCard{
  box-sizing:border-box;
  letter-spacing: 0.018em;
  margin: 0 auto 14px;
  max-height: calc(100vh - 28px);
  max-width: 1280px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 52px 56px 46px;
  width: min(1280px, calc(100vw - 40px));
}

.fugaCommunityModalCard .modalHeader{
  padding-right: 56px;
  position:relative;
}

#fugaCommunityCloseIcon{
  position:absolute;
  right: 0;
  top: 0;
}

.fugaCommunityInlineBtn{
  background: linear-gradient(180deg, rgba(203,232,255,0.92), rgba(174,216,250,0.86));
  border: 1px solid rgba(102,160,220,0.42);
  box-shadow: 0 14px 28px rgba(86, 148, 210, 0.16);
  color: rgba(15,42,68,0.92);
  width: 100%;
  justify-content: center;
  margin: 0 0 10px;
}

.fugaCommunityInlineBtn:hover{
  background: linear-gradient(180deg, rgba(214,238,255,0.98), rgba(187,224,255,0.90));
  border-color: rgba(102,160,220,0.56);
}

.fugaCommunityHero{
  align-items:center;
  display:flex;
  gap: 14px;
  min-width: 0;
}

.fugaCommunityLogo{
  flex: 0 0 auto;
  height: 92px;
  object-fit: contain;
  padding: 0;
  width: 92px;
}

.fugaCommunityTitle{
  font-size: clamp(28px, 3.6vw, 48px);
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.fugaCommunityTitle::after{
  display:none;
}

.fugaCommunityIntro{
  background:
    linear-gradient(135deg, rgba(61,205,183,0.18), rgba(80,149,220,0.10)),
    rgba(255,255,255,0.04);
  border: 1px solid rgba(61,205,183,0.22);
  border-radius: 22px;
  color: rgba(240,244,248,0.88);
  display: inline-flex;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
  margin: 12px 0 0;
  max-width: min(980px, 100%);
  padding: 10px 16px;
}

.fugaCommunityStatus{
  margin: 12px 0 14px;
  border-color: rgba(61, 205, 183, 0.26);
  background:
    linear-gradient(135deg, rgba(61,205,183,0.13), rgba(80,149,220,0.08)),
    rgba(0,0,0,0.22);
}

.fugaCommunityStatus[data-tone="error"]{
  border-color: rgba(255,119,119,0.34);
  background: rgba(122, 24, 24, 0.22);
}

.fugaCommunityStatus[data-tone="enabled"]{
  display:none !important;
  border-color: rgba(61,205,183,0.42);
}

.fugaCommunityPanel{
  display:flex;
  flex-direction:column;
  gap: 16px;
  margin-top: 16px;
}

.fugaCommunityPanel[hidden]{
  display:none !important;
}

.fugaCommunityToolbar,
.fugaCommunityUploadForm{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  align-items:center;
}

.fugaCommunityToolbar{
  display:grid;
  gap: 12px;
}

.fugaCommunityToolbarRow{
  align-items:stretch;
  display:grid;
  gap: 12px;
  width:100%;
}

.fugaCommunityToolbarRowTop{
  grid-template-columns: minmax(168px, 0.75fr) minmax(220px, 1fr) minmax(300px, 1.35fr) minmax(300px, 1.2fr);
}

.fugaCommunityToolbarRowBottom{
  grid-template-columns: minmax(220px, 0.95fr) minmax(280px, 1.1fr) minmax(300px, 1.35fr) minmax(220px, auto);
}

.fugaCommunityToolbar .inp,
.fugaCommunityToolbar .sel,
.fugaCommunityUploadForm .inp,
.fugaCommunityUploadForm .sel{
  min-width: 160px;
}

.fugaCommunityCountry{
  min-width: 0 !important;
  width:100%;
}

.fugaCommunitySearch,
.fugaCommunityFieldWithPin,
.fugaCommunityToolbarRow > .sel{
  min-width: 0 !important;
  width:100%;
}

.fugaCommunityFieldWithPin{
  align-items:center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 14px;
  display:grid;
  gap: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 42px;
  overflow:hidden;
  width:100%;
}

.fugaCommunityFieldWithPin .sel{
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  min-width: 0 !important;
  width:100%;
}

.fugaCommunityFieldWithPin .sel:focus-visible{
  box-shadow: none;
  outline: none;
}

.fugaCommunityPinBtn{
  min-width: 42px !important;
  align-self: stretch;
  border: none;
  border-left: 1px solid rgba(255,255,255,0.10);
  border-radius: 0;
  box-shadow: none;
  min-height: 42px;
  padding-left: 12px;
  padding-right: 12px;
}

.fugaCommunityPairedSelectors{
  display:grid;
  gap: 8px;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr);
  min-width: min(360px, 100%);
}

.fugaCommunityPairedSelectors .sel{
  width:100%;
}

.fugaCommunitySortSel{
  min-width: 180px !important;
  width: 180px;
}

.fugaCommunitySortWrap{
  align-items:center;
  display:flex;
  gap: 8px;
  justify-content:flex-end;
  justify-self:end;
  min-width: 0;
  width:auto;
}

.fugaCommunitySortWrap span{
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align:right;
  white-space:nowrap;
}

.fugaCommunityYearRange{
  align-items:center;
  background:rgba(61,205,183,0.10);
  border:1px solid rgba(61,205,183,0.24);
  border-radius:18px;
  display:grid;
  gap:12px;
  grid-template-columns: auto minmax(0, 1fr);
  min-height:44px;
  min-width:0;
  padding:8px 12px;
  width:100%;
}

.fugaCommunityYearRange span{
  color:var(--muted);
  font-size:12px;
  font-weight:700;
  min-width:92px;
  white-space:nowrap;
}

.fugaCommunityYearRange input[type="range"]{
  -webkit-appearance:none;
  appearance:none;
  accent-color:#0d9488;
  background: transparent;
  inset: 0;
  margin: 0;
  max-width:none;
  pointer-events:none;
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  width:100%;
}

.fugaCommunityYearRange input[type="range"]::-webkit-slider-runnable-track{
  background: transparent;
  height: 6px;
}

.fugaCommunityYearRange input[type="range"]::-moz-range-track{
  background: transparent;
  height: 6px;
}

.fugaCommunityYearRange input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none;
  appearance:none;
  background: #e8fff9;
  border: 2px solid rgba(13,148,136,0.92);
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.28);
  height: 18px;
  margin-top: -6px;
  pointer-events:auto;
  width: 18px;
}

.fugaCommunityYearRange input[type="range"]::-moz-range-thumb{
  background: #e8fff9;
  border: 2px solid rgba(13,148,136,0.92);
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.28);
  height: 18px;
  pointer-events:auto;
  width: 18px;
}

.fugaCommunityDualRange{
  align-items:center;
  background:
    linear-gradient(90deg, rgba(61,205,183,0.26), rgba(80,149,220,0.30)),
    rgba(255,255,255,0.06);
  border: 1px solid rgba(61,205,183,0.26);
  border-radius:999px;
  display:flex;
  height:30px;
  min-width:180px;
  padding: 0 10px;
  position:relative;
}

.fugaCommunityPinBtn[aria-pressed="true"]{
  background: rgba(61,205,183,0.24);
  border-color: rgba(61,205,183,0.46);
}

body.fuga-ui-alpha #filesList table.filesTable th:nth-child(4),
body.fuga-ui-alpha #filesList table.filesTable td:nth-child(4),
body.fuga-ui-alpha #filesList table.filesTable th:nth-child(6),
body.fuga-ui-alpha #filesList table.filesTable td:nth-child(6){
  display:none !important;
}

body.fuga-ui-alpha #fugaProjKv,
body.fuga-ui-alpha #fugaProjRaw,
body.fuga-ui-alpha #projSummary,
body.fuga-ui-alpha .fuga-proj-summary,
body.fuga-ui-alpha .dossierSummaryCard .dossierEssentials,
body.fuga-ui-alpha .dossierSummaryCard .dossierExtra{
  display:none !important;
}

.fugaCommunityGrid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.fugaCommunityBox{
  border: 1px solid rgba(61,205,183,0.20);
  background:
    linear-gradient(135deg, rgba(61,205,183,0.09), rgba(80,149,220,0.05)),
    rgba(0,0,0,0.18);
  border-radius: 14px;
  padding: 12px;
}

.fugaCommunityBoxTitle{
  color: rgba(244,248,252,0.96);
  font-size: 17px;
  font-weight: 850;
  letter-spacing: 0.015em;
  line-height: 1.2;
  margin-bottom: 11px;
}

.fugaCommunityDocs{
  display:flex;
  flex-direction:column;
  gap: 8px;
  max-height: 620px;
  min-height: 340px;
  overflow:auto;
}

.fugaCommunityDocsFrame{
  min-height: 520px;
}

.fugaCommunityDoc{
  border: 1px solid rgba(61,205,183,0.20);
  background: rgba(10,28,32,0.34);
  border-radius: 12px;
  padding: 10px;
}

.fugaCommunityDocTitle{
  font-weight: 800;
  line-height: 1.28;
  margin-bottom: 8px;
}

.fugaCommunityDocTitleBtn{
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: block;
  font: inherit;
  padding: 0;
  text-align: left;
  width: 100%;
}

.fugaCommunityDocTitleBtn:hover{
  text-decoration: underline;
}

.fugaCommunityDocTitleBtn:focus-visible{
  outline: 2px solid rgba(61,205,183,0.42);
  outline-offset: 3px;
  border-radius: 6px;
}

.fugaCommunityDocMeta,
.fugaCommunityDocSub{
  color: rgba(240,244,248,0.72);
  font-size: 12px;
  letter-spacing: 0.012em;
  line-height: 1.35;
}

.fugaCommunityDocActions{
  display:flex;
  flex-wrap:wrap;
  gap: 6px;
  margin-top: 8px;
}

.fugaCommunityDocActions .btn[aria-pressed="true"]{
  background: rgba(61,205,183,0.26);
  border-color: rgba(61,205,183,0.48);
}

.fugaCommunityFeedbackGroup{
  display:inline-flex;
  gap:0;
}

.fugaCommunityFeedbackGroup .btn{
  border-radius:0;
  font-size:11px;
  min-height:28px;
  padding: 5px 8px;
}

.fugaCommunityFeedbackGroup .btn:first-child{
  border-radius: 9px 0 0 9px;
}

.fugaCommunityFeedbackGroup .btn + .btn{
  margin-left: -1px;
}

.fugaCommunityFeedbackGroup .btn:last-child{
  border-radius: 0 9px 9px 0;
}

.fugaCommunityFeedbackGroup .btn[data-vote="like"],
.fugaCommunityStatLike{
  color: #23a36f;
}

.fugaCommunityFeedbackGroup .btn[data-vote="dislike"],
.fugaCommunityStatDislike{
  color: #c94d4d;
}

.fugaCommunityDocActions .fugaCommunityMiniAction{
  font-size: 11px;
  min-height: 28px;
  padding: 5px 8px;
}

.fugaCommunityPreview{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,252,250,0.98));
  border: 1px solid rgba(26,50,58,0.12);
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.28);
  color: rgba(20,32,38,0.94);
  font-family: "Aileron", Georgia, "Times New Roman", serif;
  font-size: 16px;
  letter-spacing: 0.01em;
  line-height: 1.68;
  margin: 0 auto;
  max-height: min(72vh, 760px);
  max-width: 820px;
  overflow:auto;
  padding: 54px 64px;
  white-space:normal;
  word-break:normal;
}

.fugaCommunityPreview h2{
  margin: 0 0 1.2em;
  color: rgba(14,26,34,0.98);
  font-size: 1.45em;
  font-weight: 700;
  line-height: 1.18;
}

.fugaCommunityPreview p{
  margin: 0 0 1.05em;
}

.fugaCommunityPreview p:last-child{
  margin-bottom: 0;
}

.fugaCommunityPreviewModalCard{
  margin: 0 auto 18px;
  max-height: calc(100vh - 36px);
  max-width: 1080px;
  overflow: auto;
  overscroll-behavior: contain;
  width: min(1080px, calc(100vw - 28px));
}

.fugaCommunityPreviewModalCard .modalBody{
  background: rgba(185,194,190,0.24);
  border: 1px solid rgba(240,244,248,0.08);
  border-radius: 14px;
  max-height: calc(100vh - 124px);
  overflow: auto;
  padding: 24px;
}

.fugaCommunityUploadDetails{
  border: 1px solid rgba(61,205,183,0.20);
  border-radius: 13px;
  padding: 13px 14px;
  width:100%;
}

.fugaCommunityUploadDetails > summary{
  cursor:pointer;
  color: rgba(246,250,255,0.96);
  list-style:none;
  min-height: 36px;
  margin-bottom: 0;
}

.fugaCommunityUploadDetails > summary::-webkit-details-marker{
  display:none;
}

.fugaCommunityUploadDetails > summary::after{
  background: linear-gradient(180deg, rgba(211,237,255,0.98), rgba(183,220,250,0.94));
  border: 1px solid rgba(77,135,186,0.38);
  border-radius: 999px;
  color: rgba(15,42,68,0.96);
  content:"Uitklappen";
  float:right;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 4px 10px;
}

.fugaCommunityUploadDetails[open] > summary::after{
  content:"Inklappen";
}

.fugaCommunityUploadDetails .fugaCommunityUploadForm{
  margin-top: 10px;
}

.fugaCommunityUploadScope{
  display:flex;
  flex-direction:column;
  gap:8px;
  width:100%;
}

.fugaCommunityUploadScopeRow{
  display:grid;
  gap:8px;
  grid-template-columns: minmax(170px, 0.9fr) minmax(220px, 1.1fr);
  width:100%;
}

.fugaCommunityUploadScopeRowCourse{
  grid-template-columns: minmax(220px, 1.25fr) minmax(150px, 0.75fr);
}

.fugaCommunityCreateCourseActions{
  display:flex;
  justify-content:flex-start;
}

.fugaCommunityCreateCourseRow{
  display:grid;
  gap:8px;
  grid-template-columns: minmax(220px, 1fr) auto;
  width:100%;
}

.fugaCommunityCreateCourseRow[hidden]{
  display:none !important;
}

html[data-fuga-theme="light"] body.fuga-client-exact .fugaCommunityBox{
  border-color: rgba(31,142,131,0.20);
  background:
    linear-gradient(135deg, rgba(61,205,183,0.16), rgba(80,149,220,0.08)),
    rgba(255,255,255,0.50);
}

html[data-fuga-theme="light"] body.fuga-client-exact .fugaCommunityDoc{
  background: rgba(255,255,255,0.66);
  border-color: rgba(31,142,131,0.18);
}

html[data-fuga-theme="light"] body.fuga-client-exact .fugaCommunityDocMeta,
html[data-fuga-theme="light"] body.fuga-client-exact .fugaCommunityDocSub{
  color: rgba(20,32,38,0.70);
}

@media (max-width: 1179px){
  .modalCard.wide.fugaCommunityModalCard{
    padding: 34px 36px 30px;
    width: min(1100px, calc(100vw - 28px));
  }
  .fugaCommunityToolbarRowTop,
  .fugaCommunityToolbarRowBottom{
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .fugaCommunitySortWrap{
    justify-self:start;
    width:100%;
  }
  .fugaCommunitySortWrap span{
    text-align:left;
  }
}

@media (max-width: 860px){
  .modalCard.wide.fugaCommunityModalCard{
    padding: 24px;
    width: min(100vw - 18px, 1000px);
  }
  .fugaCommunityGrid{
    grid-template-columns: 1fr;
  }
  .fugaCommunityToolbarRowTop,
  .fugaCommunityToolbarRowBottom{
    grid-template-columns: 1fr;
  }
  .fugaCommunityToolbar .inp,
  .fugaCommunityToolbar .sel,
  .fugaCommunityUploadForm .inp,
  .fugaCommunityUploadForm .sel{
    min-width: min(100%, 220px);
  }
  .fugaCommunityFieldWithPin{
    min-height: 44px;
  }
  .fugaCommunityPairedSelectors{
    grid-template-columns: 1fr;
    width:100%;
  }
  .fugaCommunityUploadScopeRow,
  .fugaCommunityUploadScopeRowCourse,
  .fugaCommunityCreateCourseRow{
    grid-template-columns: 1fr;
  }
  .fugaCommunityYearRange{
    width:100%;
  }
  .fugaCommunityYearRange input[type="range"]{
    max-width:none;
    min-width:0;
  }
  .fugaCommunitySortWrap{
    justify-content:space-between;
    justify-self:stretch;
    width:100%;
  }
  .fugaCommunityPreview{
    font-size: 14px;
    padding: 26px 22px;
  }
  .fugaCommunityPreviewModalCard .modalBody{
    padding: 12px;
  }
}

html[data-fuga-theme="light"] body.fuga-client-exact .fugaCommunityIntro{
  background:
    linear-gradient(135deg, rgba(61,205,183,0.22), rgba(80,149,220,0.11)),
    rgba(255,255,255,0.68);
  color: rgba(20,32,38,0.86);
}

html[data-fuga-theme="light"] body.fuga-client-exact .fugaCommunityStatus{
  border-color: rgba(31,142,131,0.24);
  background:
    linear-gradient(135deg, rgba(61,205,183,0.18), rgba(80,149,220,0.11)),
    rgba(255,255,255,0.46);
}
body{ overflow-x:hidden; }

/* Fix: lange LLM/JSON regels mogen nooit de layout oprekken */
pre.box,
pre.mono.box{
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

/* Chat (structuur-assistent) */
.chatLog{
  max-height: 36vh;
  overflow: auto;
  white-space: normal;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chatMsg{
  border: 1px solid rgba(240,244,248,0.12);
  background: rgba(0,0,0,0.18);
  border-radius: 12px;
  padding: 8px 10px;
}

.chatMsg.user{
  background: rgba(255,255,255,0.04);
}

.chatMsg .role{
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(240,244,248,0.60);
  margin-bottom: 4px;
}

.chatMsg .txt{
  font-size: 13px;
  line-height: 1.35;
  color: rgba(240,244,248,0.92);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.chatMsg .cmd{
  margin-top: 8px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(240,244,248,0.12);
  background: rgba(0,0,0,0.25);
  font-family: var(--mono);
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Structure chat: focus + advanced */
.structureChatTop{
  margin-top: 6px;
  margin-bottom: 6px;
}

#structureFocusBadge{
  padding: 5px 10px;
  border: 1px solid rgba(240,244,248,0.16);
  background: rgba(0,0,0,0.22);
}

.structureAdvanced{
  margin-top: 10px;
}

.structureAdvanced > summary,
.segInspector > summary{
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.structureAdvanced > summary::-webkit-details-marker,
.segInspector > summary::-webkit-details-marker{
  display: none;
}

.structureAdvanced > summary{
  font-weight: 650;
  color: rgba(240,244,248,0.86);
}

.structureAdvanced > summary:before{
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  color: rgba(240,244,248,0.55);
  transform: translateY(-1px);
}

.structureAdvanced[open] > summary:before{
  content: "▾";
}

.structureAdvanced[open] > summary{
  margin-bottom: 10px;
}

.segInspector{
  margin-top: 10px;
}

.segInspector > summary{
  color: rgba(240,244,248,0.82);
}

.segInspector > summary:before{
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  color: rgba(240,244,248,0.55);
  transform: translateY(-1px);
}

.segInspector[open] > summary:before{
  content: "▾";
}

.segGrid{
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 12px;
  margin-top: 10px;
}

.segOut{
  max-height: 30vh;
  overflow: auto;
}

@media (max-width: 980px){
  .segGrid{ grid-template-columns: 1fr; }
  .segControls{ order: -1; }
}

/* Chat meta (questions/notes) as collapsible details */
.chatMsg details.chatMeta{
  margin-top: 8px;
  border: 1px solid rgba(240,244,248,0.10);
  border-radius: 10px;
  background: rgba(0,0,0,0.22);
}

.chatMsg details.chatMeta > summary{
  cursor: pointer;
  user-select: none;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(240,244,248,0.62);
  list-style: none;
}

.chatMsg details.chatMeta > summary::-webkit-details-marker{
  display: none;
}

.chatMsg details.chatMeta > summary:before{
  content: "▸";
  display: inline-block;
  width: 14px;
  color: rgba(240,244,248,0.55);
}

.chatMsg details.chatMeta[open] > summary:before{
  content: "▾";
}

.chatMsg .metaBody{
  padding: 0 10px 10px 24px;
  font-size: 12.5px;
  line-height: 1.35;
  color: rgba(240,244,248,0.88);
  white-space: pre-wrap;
}

.chatMsg.tool{
  border-style: dashed;
  background: rgba(0,0,0,0.12);
}

@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr; }
  .span2{ grid-column:auto; }
  .row{ flex-wrap:wrap; }
  .sel,.inp{ width:100%; min-width:0; }
  canvas{ max-width:100%; }
}

.fileLink{
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---- Structure tree ---- */
.structureTree{
  max-height: none;
  min-height: 220px;
  overflow: auto;
  white-space: normal;
}

.structureOut{
  max-height: 42vh;

  /* Voorkom dat lange regels de layout oprekken */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

/* Prevent long LLM output from expanding the page width (chat + debug boxes) */
pre.mono.box,
.structureChatLog{
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

/* Flex children should be allowed to shrink */
#structurePanelBody{ min-width: 0; }

/* Ook het “FUGA heeft hulp nodig” commando kan lange regels bevatten */
#structHelpCmd{
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

.structRoot{ display:flex; flex-direction:column; gap:10px; }

.structNode{
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: rgba(0,0,0,0.18);
}

.structNode.child{ margin-left: 14px; }
.structNode.child2{ margin-left: 28px; }

.structHead{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.structTitle{ font-weight:650; font-size:13px; }
.structMeta{ font-size:12px; color: var(--muted); }

.fileRow{ display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }

.fileChip{
  --chip: #9bb7ff;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(240,244,248,0.18);
  background: color-mix(in oklab, var(--chip) 24%, rgba(0,0,0,0.35));
  color: rgba(240,244,248,0.92);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}
.fileChip:hover{
  border-color: rgba(240,244,248,0.32);
  background: color-mix(in oklab, var(--chip) 34%, rgba(0,0,0,0.35));
}

.fileChip{
  padding-right: 8px;
  cursor: default;
}

.fileChip[draggable="true"]{
  cursor: grab;
}

.fileChip.dragging{
  opacity: .58;
  cursor: grabbing;
}

.fileChip .chipDragHandle{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  margin-left: 4px;
  margin-right: 2px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.78);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  cursor: grab;
  user-select: none;
  text-shadow: 0 1px 1px rgba(0,0,0,0.30);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 1px 2px rgba(0,0,0,0.10);
}

.fileChip:hover .chipDragHandle{
  border-color: rgba(255,255,255,0.46);
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.92);
}

.fileChip.dragging .chipDragHandle{
  cursor: grabbing;
}

.fileChipDragGhost{
  position: fixed;
  left: 0;
  top: 0;
  display: inline-flex;
  max-width: min(440px, calc(100vw - 12px));
  z-index: 2147483647;
  pointer-events: none;
  opacity: .76;
  transform: scale(1.02);
  box-shadow: 0 18px 44px rgba(0,0,0,0.36);
  will-change: left, top;
  white-space: nowrap;
}

.fileChipDragGhost .chipName{
  overflow: hidden;
  text-overflow: ellipsis;
}

.fileChipDragGhost .chipBtns{
  opacity: .72;
}

.fileChipDragGhost.dragImageParked{
  transform: translate(-120vw, -120vh) scale(1.02);
}

.scopeDropZone{
  min-height: 30px;
  border-radius: 12px;
  transition: background .12s ease, outline-color .12s ease, box-shadow .12s ease;
}

.structHead.scopeDropZone{
  min-height: 0;
  padding: 4px 6px;
  margin: -4px -6px 2px;
}

.scopeDropZone.dragOver{
  outline: 2px dashed color-mix(in oklab, var(--chip, #9bb7ff) 64%, #ffffff 36%);
  outline-offset: 3px;
  background: rgba(155,183,255,0.10);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

body.fugaDraggingFile .scopeDropZone{
  cursor: grabbing;
}

html[data-fuga-theme="light"] body.fuga-client-exact .fileChip .chipDragHandle{
  border-color: rgba(26,50,58,0.16);
  background: rgba(26,50,58,0.032);
  color: rgba(20,32,38,0.50);
  text-shadow: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.42), 0 1px 2px rgba(26,50,58,0.08);
}

html[data-fuga-theme="light"] body.fuga-client-exact .fileChip:hover .chipDragHandle{
  border-color: rgba(26,50,58,0.24);
  background: rgba(26,50,58,0.058);
  color: rgba(20,32,38,0.66);
}

.unitKnowledgeBadges{
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 7px;
  vertical-align: -2px;
}

.unitKnowledgeIcon{
  width: 20px;
  height: 20px;
  border-radius: 6px;
  opacity: .88;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.34));
}

.fileChip .chipName{
  font-weight: 650;
}

.fileChip .chipBtns{
  display:inline-flex;
  gap:6px;
  margin-left: 8px;
}

.fileChip .chipBtn{
  border: 1px solid rgba(240,244,248,0.18);
  background: rgba(0,0,0,0.22);
  color: rgba(240,244,248,0.86);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
}

.fileChip .chipBtn:hover{
  background: rgba(255,255,255,0.06);
}

.fileChip .chipBtn.danger{
  border-color: rgba(210,81,81,0.38);
  background: rgba(210,81,81,0.14);
}

.fileChip .chipBtn.danger:hover{
  background: rgba(210,81,81,0.20);
}

/* ---- Structure tree ---- */
.structureTree{
  max-height: 52vh;
  overflow: auto;
  white-space: normal;
}

.structRoot{ display:flex; flex-direction:column; gap:10px; }

.structNode{
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: rgba(0,0,0,0.18);
}

.structNode.child{ margin-left: 14px; }
.structNode.child2{ margin-left: 28px; }

.structHead{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.structTitle{ font-weight:650; font-size:13px; }
.structMeta{ font-size:12px; color: var(--muted); }

.fileRow{ display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }

.fileChip{
  --chip: #9bb7ff;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(240,244,248,0.18);
  background: color-mix(in oklab, var(--chip) 24%, rgba(0,0,0,0.35));
  color: rgba(240,244,248,0.92);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}
.fileChip:hover{
  border-color: rgba(240,244,248,0.32);
  background: color-mix(in oklab, var(--chip) 34%, rgba(0,0,0,0.35));
}

body.structureCollapsed .structureTree{
  max-height: 160px;
}
body.structureCollapsed #structurePanelBody{
  display: none;
}
body.structureCollapsed #structureCmd,
body.structureCollapsed #structureOut{
  display: none;
}

/* Chip knoppen (voor scope/delete zonder ALT/SHIFT) */
.fileChip{
  padding-right: 6px;
}
.fileChip .chipBtns{
  display: inline-flex;
  gap: 6px;
  margin-left: 10px;
}
.fileChip .chipBtn{
  border: 1px solid rgba(240,244,248,0.18);
  background: rgba(0,0,0,0.25);
  color: rgba(240,244,248,0.9);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
}
.fileChip .chipBtn:hover{
  border-color: rgba(240,244,248,0.32);
}
.fileChip .chipBtn.danger{
  border-color: rgba(255,120,120,0.28);
}

/* ---- Experimenteerpaneel (grafiek parameters) ---- */
.expPanelBody{
  margin-top: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(240,244,248,0.12);
  background: rgba(0,0,0,0.16);
}

.expGrid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.expSubTitle{
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(240,244,248,0.72);
  margin: 0 0 8px;
}

.expField{
  border: 1px solid rgba(240,244,248,0.10);
  background: rgba(0,0,0,0.18);
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 8px;
}

.expLabelRow{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 12px;
  color: rgba(240,244,248,0.78);
}

.rangeRow{
  display: flex;
  gap: 8px;
  align-items: center;
}

.range{ width: 100%; }
.expNum{ max-width: 120px; }
.expField .sel{ width: 100%; }

body.expCollapsed #expPanelBody{ display: none; }

@media (max-width: 980px){
  .expGrid{ grid-template-columns: 1fr; }
  .expPreset{ width: 100%; min-width: 0; }
}

/* Extra: experiment info + sim histogram */
.expInfo{
  margin-top: 10px;
  border: 1px solid rgba(240,244,248,0.10);
  background: rgba(0,0,0,0.14);
  border-radius: 12px;
  padding: 10px;
}
.expInfo > summary{
  cursor: pointer;
  user-select: none;
  color: rgba(240,244,248,0.82);
  font-size: 13px;
  list-style: none;
}
.expInfo > summary::-webkit-details-marker{ display:none; }
.expInfoBody{
  margin-top: 10px;
  display: grid;
  gap: 8px;
}
.expInfoBody .spacer{ height: 4px; }

.expHist{
  margin-top: 2px;
  padding-top: 0;
}
.simHistCanvas{
  width: 100%;
  height: 120px;
  display: block;
  border: 1px solid rgba(240,244,248,0.10);
  background: rgba(0,0,0,0.10);
  border-radius: 12px;
}

#simHistMeta{ display:none; }

.mapInfoBlock{
  margin-top: 2px;
  border: 1px solid rgba(240,244,248,0.10);
  border-radius: 14px;
  background: rgba(0,0,0,0.12);
  overflow: hidden;
}

.mapInfoBlock > summary{
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 10px 12px;
  color: rgba(240,244,248,0.82);
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mapInfoBlock > summary::-webkit-details-marker{
  display: none;
}

.mapInfoBlock > summary::before{
  content: "▸";
  color: rgba(240,244,248,0.55);
  transform: translateY(-1px);
}

.mapInfoBlock[open] > summary::before{
  content: "▾";
}

.mapInfoBody{
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 10px 10px;
}

.mapInfoBody .expHist,
.mapInfoBody .fugaCard,
.mapInfoBody #mapSplit,
.mapInfoBody #mapDetails{
  margin-top: 0;
}

/* Upload/analyse panel tweaks */
.row.wraprow{
  flex-wrap: wrap;
}

.fileName{
  flex: 1 1 320px;
  min-width: 220px;
  max-width: min(560px, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ingestStats{
  margin-top: 10px;
    margin-bottom: 10px; /* extra ruimte onder status/files/courses/units/elements, vóór Project */
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ingestStatsRow{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.statChip{
  padding: 7px 10px;
  border: 1px solid rgba(240,244,248,0.14);
  background: rgba(0,0,0,0.18);
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--mono);
  color: rgba(240,244,248,0.72);
}

.statChip.flash{
  animation: statFlash 720ms ease-out 1;
}

@keyframes statFlash{
  0%   { background: rgba(240,244,248,0.22); box-shadow: 0 0 0 0 rgba(240,244,248,0.00); }
  45%  { background: rgba(240,244,248,0.14); box-shadow: 0 0 0 8px rgba(240,244,248,0.06); }
  100% { background: rgba(0,0,0,0.18); box-shadow: 0 0 0 0 rgba(240,244,248,0.00); }
}

/* Extra shimmer overlay while pulsing (subtle, modern) */
.bar{
  position: relative;
}
.bar.pulsing::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(90deg,
    rgba(240,244,248,0.00) 0%,
    rgba(240,244,248,0.10) 45%,
    rgba(240,244,248,0.00) 100%
  );
  background-size: 220% 100%;
  animation: ingestShine 1100ms linear infinite;
  pointer-events: none;
}

@keyframes ingestShine{
  0%   { background-position: 220% 0; }
  100% { background-position:   0% 0; }
}

/* Client/evidence files highlight (turquoise) */
#filesList table.filesTable tbody tr.fileRowClient td{
  background: rgba(0, 210, 200, 0.10);
}
#filesList table.filesTable tbody tr.fileRowClient:hover td{
  background: rgba(0, 210, 200, 0.16);
}
#filesList table.filesTable tbody tr.fileRowClient td:first-child{
  box-shadow: inset 3px 0 0 rgba(0, 210, 200, 0.55);
}

/* Compact card variant (minder verticale padding) */
.card.compact{
  padding-top: 10px;
  padding-bottom: 10px;
}
.card.compact .row{ margin: 8px 0; }

/* Upload layout: main + side (right column narrower) */
.uploadGrid{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 10px;
  align-items: stretch;
}
.uploadMain, .uploadSide{
  min-width: 0;
}
.uploadSide{
  border-left: 1px solid rgba(240,244,248,0.10);
  padding-left: 14px;
}
.uploadSideTitle{
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(240,244,248,0.70);
  margin-bottom: 8px;
}

/* Responsive: stack columns */
@media (max-width: 980px){
  .uploadGrid{ grid-template-columns: 1fr; }
  .uploadSide{ border-left: none; padding-left: 0; border-top: 1px solid rgba(240,244,248,0.10); padding-top: 12px; }
}

/* Client/evidence files highlight (turquoise) */
#filesList table.filesTable tbody tr.fileRowClient td{
  background: rgba(0, 210, 200, 0.10);
}
#filesList table.filesTable tbody tr.fileRowClient:hover td{
  background: rgba(0, 210, 200, 0.16);
}
#filesList table.filesTable tbody tr.fileRowClient td:first-child{
  box-shadow: inset 3px 0 0 rgba(0, 210, 200, 0.55);
}

/* Experimenteerpaneel: als ingeklapt, alleen body weg; simHist staat nu buiten body */
body.expCollapsed #expPanelBody{ display: none; }


.mapCtlGrid{
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 10px;
  align-items: start;
  margin-top: 6px;
}
@media (max-width: 980px){
  .mapCtlGrid{ grid-template-columns: 1fr; }
}

.kvRow{
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  align-items: center;
  margin: 14px 0;}

.kvLabel{
  font-size: 12px;
  color: rgba(240,244,248,0.62);
}
.chk.inline{
  margin: 0;
  gap: 10px;
}

/* Alleen voor de chronologie-toggle (mooier, stabieler) */
#mapChronoOn{
  appearance: none;
  -webkit-appearance: none;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(240,244,248,0.22);
  background: rgba(0,0,0,0.22);
  position: relative;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

#mapChronoOn::after{
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: rgba(240,244,248,0.72);
  transition: transform 160ms ease, background 160ms ease;
}

#mapChronoOn:checked{
  border-color: rgba(64, 224, 208, 0.45);
  background: rgba(64, 224, 208, 0.18);
  box-shadow: 0 0 0 3px rgba(64, 224, 208, 0.10);
}

#mapChronoOn:checked::after{
  transform: translateX(16px);
  background: rgba(230, 255, 250, 0.92);
}

/* Label spacing: geen kunstmatige margin-left meer */
.chk.inline span{ margin-left: 0; }

.mapCtlRight .expPreset{ width: 100%; margin-top: 10px; }
.mapCtlRight .expBtnRow{ margin-top: 8px; }

.clientGrid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}
@media (max-width: 980px){
  .clientGrid{ grid-template-columns: 1fr; }
}

.userSearch{
  min-width: 220px;
  max-width: 320px;
}

.selSm{
  max-width: 320px;
}

.clientGrid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}
@media (max-width: 980px){
  .clientGrid{ grid-template-columns: 1fr; }
}

.userSearch{
  min-width: 220px;
  max-width: 320px;
}

.selSm{
  max-width: 320px;
}

/* --- Files list: stable columns + client highlighting --- */
.filesList { overflow-x: auto; }

.filesTable {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.filesTable th, .filesTable td {
  padding: 8px 10px;
  vertical-align: top;
}

.filesTable th:nth-child(1), .filesTable td:nth-child(1) { width: 135px; } /* Toegevoegd */
.filesTable th:nth-child(2), .filesTable td:nth-child(2) { width: 420px; } /* Bestand */
.filesTable th:nth-child(3), .filesTable td:nth-child(3) { width: 260px; } /* Acties */
.filesTable th:nth-child(4), .filesTable td:nth-child(4) { width: 150px; } /* Kwaliteit analyse */
.filesTable th:nth-child(5), .filesTable td:nth-child(5) { width: 95px; }  /* Tekst */
.filesTable th:nth-child(6), .filesTable td:nth-child(6) { width: 95px; }  /* Data */
.filesTable th:nth-child(7), .filesTable td:nth-child(7) { width: 240px; } /* Scope */
.filesTable th:nth-child(8), .filesTable td:nth-child(8) { width: 70px; }  /* Door */
.filesTable th:nth-child(9), .filesTable td:nth-child(9) { width: 70px; }  /* Locked */

.filesTable .fileCell {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.filesTable td.filesActions { white-space: nowrap; }

.filesTable tr.fileRowClient td {
  background: rgba(0, 210, 200, 0.14);
}

.filesTable tr.fileRowClient:hover td {
  background: rgba(0, 210, 200, 0.20);
}

.filesTable tr.fileRowCurriculum td {
  background: rgba(186, 166, 255, 0.10);
}

.filesTable tr.fileRowCurriculum:hover td {
  background: rgba(186, 166, 255, 0.16);
}

/* --- Files list: fouten (ev:0 / el:0) duidelijk markeren --- */
.filesTable tr.fileRowBad td{
  /* “rode lijn onderstreept” over de hele rij */
  border-bottom: 1px solid rgba(255, 70, 70, 0.75);
}

.filesTable td.fileDataBad{
  /* Data-cel extra opvallend */
  background: rgba(255, 70, 70, 0.22) !important;
  color: rgba(255, 210, 210, 0.95);
  font-weight: 700;
}

/* --- Collapse: structuur & documenten --- */
body.structureCollapsed #filesList,
body.structureCollapsed #structureChatLog,
body.structureCollapsed #structureChatIn,
body.structureCollapsed #structureOut,
body.structureCollapsed #structureCmd,
body.structureCollapsed #btnApplyStructureCmd {
  display: none !important;
}

/* --- FilesList: strak kader + sticky header + nette actions --- */
#filesList.filesList.box{
  padding: 0;              /* geen rare “inspringing” rondom de tabel */
  overflow: auto;          /* beide assen */
}

#filesList.filesList.box.small{
  max-height: 320px;       /* iets ruimer dan 210, minder gepropt */
}

#filesList table.filesTable{
  width: 100%;
  border-collapse: collapse; /* voorkom “losse” cell-look */
  border-spacing: 0;
  table-layout: fixed;
}

#filesList table.filesTable thead th[data-sort-key]{
  cursor: pointer;
  user-select: none;
}

#filesList table.filesTable thead th[data-sort-key]:hover{
  text-decoration: underline;
}

#filesList table.filesTable th,
#filesList table.filesTable td{
  padding: 10px 10px;
}

/* Belangrijk: géén display:flex op een <td> (kan tabel-layout breken in Chrome) */
#filesList .filesActions{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;       /* zodat de laatste knop niet uit de cel wordt weggeknipt */
  align-items: center;
}

#filesList .filesActions .btn{
  padding: 6px 10px;     /* iets compacter, helpt bij 4 knoppen */
}

@media (max-width: 980px){
  #filesList .filesActions{ flex-wrap: wrap; }
}

#filesList td.filesActions .btn{
  padding: 6px 10px;     /* iets compacter, helpt bij 4 knoppen */
}

@media (max-width: 980px){
  #filesList td.filesActions{ flex-wrap: wrap; }
}

#filesList td.fileActionsCell{
  white-space: normal;
}

#filesList .filesActionsTop{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 4px;
}

#filesList .fileActionsMenuWrap{
  display: block;
}

#filesList .fileActionsMenu{
  margin-top: 0 !important;
  gap: 8px;
  flex-wrap: wrap;
}

#filesList:empty{ padding: 10px; }

/* --- Map time slider --- */
.mapTimeCtl{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.mapTimeLbl{
  min-width: 96px;
  text-align: right;
  color: rgba(240,244,248,0.72);
}
#mapTime:disabled{ opacity: 0.45; }
#mapRecentGlowRow{ grid-template-columns: 96px auto; }
#mapRecentGlowRow .btn{ width: auto; justify-self: start; max-width: 100%; }

/* --- Map gate (geen cliënt geselecteerd) --- */
.mapFrame { position: relative; }

.mapGate{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index: 6;
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(2px);
  pointer-events: none;
}

.mapGateInner{
  max-width: 520px;
  margin: 0 18px;
  padding: 16px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(10,12,14,0.78);
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
}

.mapGateTitle{
  font-weight: 700;
  letter-spacing: 0.2px;
  margin-bottom: 6px;
}

.mapGateText{
  color: rgba(240,244,248,0.78);
  line-height: 1.45;
}

/* --- Client selector glow wanneer kaart gated is --- */
@keyframes clientPulseGlow{
  0%   { box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 0 18px rgba(240,140,90,0.18); }
  50%  { box-shadow: 0 0 0 1px rgba(255,255,255,0.10), 0 0 26px rgba(240,140,90,0.28); }
  100% { box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 0 18px rgba(240,140,90,0.18); }
}

body.needsClientPick #secClient{
  border-color: rgba(255,255,255,0.14);
  animation: clientPulseGlow 1.6s ease-in-out infinite;
}

body.needsClientPick #userSelect{
  border-color: rgba(240,140,90,0.55);
  box-shadow: 0 0 0 1px rgba(240,140,90,0.18), 0 0 22px rgba(240,140,90,0.18);
}

/* --- Dossier view (niet-mono; raw JSON blijft mono in <pre>) --- */
.dossierView{
  display:flex;
  flex-direction:column;
  gap: 12px;
}

.dossierCard{
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.14);
  border-radius: 14px;
  padding: 12px 12px;
}

.dossierCardTitle{
  font-weight: 700;
  margin-bottom: 8px;
}

.dossierKV{
  display:flex;
  justify-content:space-between;
  gap: 14px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.dossierKV:last-child{ border-bottom: none; }

.dossierK{ color: rgba(240,244,248,0.70); }
.dossierV{ color: rgba(240,244,248,0.92); text-align:right; }

.dossierList{
  display:flex;
  flex-direction:column;
  gap: 10px;
  margin-top: 10px;
}

.dossierItem{
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  background: rgba(0,0,0,0.10);
  padding: 10px 10px;
}

.dossierItemTop{
  display:flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
}

.dossierItemTitle{
  font-weight: 650;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dossierItemMeta{
  color: rgba(240,244,248,0.62);
  font-size: 12px;
  white-space: nowrap;
}

.dossierItemBody{
  margin-top: 8px;
  color: rgba(240,244,248,0.80);
  line-height: 1.45;
}

/* --- Dossier (client) --- */
.dossierView{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dossierCard{
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.10);
}

.dossierCardTitle{
  font-weight: 650;
  margin-bottom: 8px;
}

.dossierKV{
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 10px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.dossierKV:last-child{ border-bottom: none; }

.dossierK{ color: rgba(255,255,255,0.60); font-size: 12px; font-family: var(--mono); }
.dossierV{ font-size: 13px; overflow-wrap: anywhere; }

.dossierList{ display: flex; flex-direction: column; gap: 8px; }

.dossierItem{
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(0,0,0,0.08);
}

.dossierItemTop{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: baseline;
}

.dossierItemTitle{ font-weight: 600; font-size: 13px; }
.dossierItemMeta{ font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,0.55); }
.dossierItemBody{ margin-top: 6px; font-size: 13px; color: rgba(255,255,255,0.78); white-space: pre-wrap; }

.dossierDetails{ padding: 0; }
.dossierDetails > summary{
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 10px 12px;
}
.dossierDetails > summary::-webkit-details-marker{ display:none; }
.dossierDetails[open] > summary{ border-bottom: 1px solid rgba(255,255,255,0.07); }
.dossierDetailsBody{ padding: 10px 12px; }

.dossierDebug{ margin-top: 10px; }
.dossierDebug > summary{ list-style:none; }
.dossierDebug > summary::-webkit-details-marker{ display:none; }

.userProjectsBox{
  margin: 10px 0 0;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 8px 10px;
  background: rgba(0,0,0,0.08);
}
.userProjectsBox summary{
  cursor: pointer;
  user-select: none;
  font-weight: 600;
}
.userProjectsList{
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.userProjectsList .projRow{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.08);
}
.userProjectsList .projRow .projMeta{
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}

/* Dossier-only view (print/tab) */
body.dossierOnly #secMap,
body.dossierOnly #secGraph,
body.dossierOnly #secProject,
body.dossierOnly #secUpload,
body.dossierOnly #secExplorer,
body.dossierOnly #secTests{
  display: none !important;
}

body.dossierOnly #secClient .clientLeft{
  display: none !important;
}

body.dossierOnly #secClient .clientGrid{
  grid-template-columns: 1fr !important;
}

/* In dossier-only: geen dubbele "Dossier" label + geen raw debug */
body.dossierOnly #secClient .clientHeaderRight .sectionTitle{
  display: none !important; /* PDF knop blijft zichtbaar */
}
body.dossierOnly #secClient .dossierDebug{
  display: none !important;
}
body.dossierOnly #btnLoadDossier{
  display: none !important;
}

/* Pulse helper (in-page dossier refresh) */
@keyframes dossierPulseOnce{
  0%   { box-shadow: 0 0 0 1px rgba(255,255,255,0.10), 0 0 0 rgba(0,210,200,0.00); }
  60%  { box-shadow: 0 0 0 1px rgba(0,210,200,0.22), 0 18px 52px rgba(0,210,200,0.10); }
  100% { box-shadow: 0 0 0 1px rgba(255,255,255,0.10), 0 0 0 rgba(0,210,200,0.00); }
}
.dossierView.pulseOnce{
  animation: dossierPulseOnce 0.65s ease-out 1;
}

/* Print: PDF knop moet alleen dossier printen (ook als je per ongeluk in normale view print) */
@media print{
  .topbar,
  #secMap, #secGraph, #secProject, #secUpload, #secExplorer, #secTests{
    display: none !important;
  }
  #secClient .clientLeft{ display: none !important; }
  #secClient .dossierDebug{ display: none !important; }
  #btnLoadDossier{ display: none !important; }

  #secClient{
    border: 0 !important;
    box-shadow: none !important;
  }
}

/* Upload & analyse: 2-koloms layout met rechter zijpaneel */
#secUpload .uploadGrid{
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  grid-template-areas: "side main";
  gap: 14px;
  align-items: start;
}

#secUpload .uploadMain{
  grid-area: main;
  min-width: 0;
  order: 2;
}

#secUpload .uploadSide{
  grid-area: side;
  border-left: 0;
  border-right: 1px solid var(--line);
  padding-right: 14px;
  order: 1;
}

/* We gebruiken class="card uploadSide" voor JS-compatibiliteit,
   maar visueel moet het géén losse card-in-card worden. */
#secUpload .uploadSide.card{
  background: var(--card2);
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  border-radius: 14px;
  padding: 14px;
}

#secUpload .uploadSide h3{
  font-size: 18px;
  line-height: 1.2;
  margin-bottom: 10px;
}

#secUpload .uploadSideTitle{
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(240,244,248,0.80);
}

@media (max-width: 980px){
  #secUpload .uploadGrid{
    grid-template-columns: 1fr;
    grid-template-areas:
      "side"
      "main";
  }
  #secUpload .uploadSide{
    border-right: 0;
    border-top: 1px solid var(--line);
    padding-right: 0;
  }
  #secUpload .uploadSide.card{
    padding: 14px;
  }
}

/* ---------------------------------------------------------------------------
   UI tweaks (2026-03) — compact layout + better controls
--------------------------------------------------------------------------- */

/* Experimenteerpaneel label: iets meer lucht boven selector */
#secMap .mapCtlRight > .muted.small{
  display:block;
  margin-bottom: 10px;
}

/* Uitklap-knoppen: soft lichtgroen-turkois wanneer ingeklapt */
#btnToggleExperiments[aria-expanded="false"],
#btnToggleStructure[aria-expanded="false"]{
  border-color: rgba(0, 210, 200, 0.55);
  color: rgba(190, 255, 246, 0.95);
  box-shadow: 0 0 0 1px rgba(0, 210, 200, 0.10), 0 12px 28px rgba(0, 210, 200, 0.06);
}

/* Resizable panels: mapDetails + inventaris */
#mapDetails.details{
  overflow: auto;
  resize: vertical;
  min-height: 140px;
  max-height: 70vh;
}

#filesList.filesList{
  overflow: auto;
  resize: vertical;
  min-height: 180px;
  max-height: 70vh;
}

/* Inventaris kolombreedtes (Acties tussen Bestand en Kwaliteit analyse) */
#filesList table.filesTable th:nth-child(1),
#filesList table.filesTable td:nth-child(1){ width: 120px; } /* Toegevoegd iets smaller */

#filesList table.filesTable th:nth-child(2),
#filesList table.filesTable td:nth-child(2){ width: 420px; } /* Bestand */

#filesList table.filesTable th:nth-child(3),
#filesList table.filesTable td:nth-child(3){ width: 300px; } /* Acties compacter maar nog bruikbaar */

#filesList table.filesTable th:nth-child(4),
#filesList table.filesTable td:nth-child(4){ width: 150px; }  /* Kwaliteit analyse */

#filesList table.filesTable th:nth-child(5),
#filesList table.filesTable td:nth-child(5){ width: 95px; }  /* Tekst */

#filesList table.filesTable th:nth-child(6),
#filesList table.filesTable td:nth-child(6){ width: 95px; }  /* Data */

#filesList table.filesTable th:nth-child(7),
#filesList table.filesTable td:nth-child(7){ width: 260px; } /* Scope */

#filesList table.filesTable th:nth-child(8),
#filesList table.filesTable td:nth-child(8){ width: 70px; }  /* Door */

#filesList table.filesTable th:nth-child(9),
#filesList table.filesTable td:nth-child(9){ width: 70px; }  /* Locked */

.fileQualityGood{
  color: rgba(45, 138, 77, 0.98);
  font-weight: 700;
}

.fileQualityMid{
  color: rgba(186, 127, 31, 0.98);
  font-weight: 700;
}

.fileQualityBad{
  color: rgba(182, 53, 53, 0.98);
  font-weight: 700;
}

.fileQualityUnknown{
  color: rgba(73, 96, 118, 0.96);
  font-weight: 700;
}

/* Recent glow knop in tijd-row iets compacter */
#btnRecentGlow.btnGlow{
  padding: 6px 10px;
  white-space: nowrap;
}

@media print{
  #btnDossierPdf,
  #btnRecentGlow{ display:none !important; }
}

/* Tijd-UI: range + label netjes op één regel */
.mapTimeCtl{
  display:flex;
  align-items:center;
  gap: 10px;
  width: 100%;
}

.mapTimeCtl .range{
  flex: 1 1 auto;
  min-width: 140px;
}

.mapTimeLbl{
  min-width: 44px;
  text-align: right;
}

/* Section titles (Dossier / Structuur / Experimenteerpaneel) */
.sectionTitle{
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(240,244,248,0.88);
}

.sectionTitle.subtle{
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  color: rgba(240,244,248,0.78);
}

/* Client grid: dossier column higher / tighter */
.clientGrid{
  align-items: start;
}

.clientRight{
  align-self: start;
}

.clientRight .row.between{
  margin-top: 0 !important;
}

/* Allow filesList to grow much larger; height is controlled via --filesListH */
#filesList.filesList.box.small{
  max-height: none !important;
}
#filesList{
  max-height: none !important; /* override older 70vh clamps */
}
/* Resizable structure tree */
#structureTree.structureTree.box{
  height: var(--structureTreeH, 340px);
  min-height: 220px;
  max-height: none !important;
  overflow: auto;
}
.mapTimeMeta{
  margin-top: 8px;
  color: rgba(240,244,248,0.72);
  text-align: left;
}

/* We show the exact cutoff time in the right column instead */
#mapTimeLbl{
  display: none;
}
.clientRight .row.between{
  margin-top: 0 !important;
}
.dossierSummaryCard .dossierToggle{
  cursor: pointer;
  user-select: none;
}
.dossierSummaryCard .dossierExtra{
  display: none;
  margin-top: 10px;
}
.dossierSummaryCard.expanded .dossierExtra{
  display: block;
}
.dossierSummaryMetrics{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.dossierMetric{
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 12px 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)),
    rgba(0,0,0,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.dossierMetricLabel{
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.56);
}
.dossierMetricValue{
  margin-top: 8px;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.08;
  font-weight: 700;
  color: rgba(255,255,255,0.96);
}
.dossierMetricMeta{
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.62);
}
.dossierMetric.is-activity .dossierMetricValue{
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.35;
}
@media (max-width: 720px){
  .dossierSummaryMetrics{
    grid-template-columns: 1fr;
  }
}

.clientHeader{
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 10px; /* vergelijkbaar met h2 margin-bottom */
}

.clientHeaderRight{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

/* omdat h2 nu binnen .clientHeader zit */
.clientHeader h2{
  margin: 0;
}

#mapTimeMeta{
  display: block;
}
#mapTimeLbl{
  display: none;
}

/* Tijd rechts: optisch uitlijnen met de tijdbalk zonder de slider te beïnvloeden */
.mapTimeMeta{
  display: flex;
  align-items: center;   /* baseline/center geeft stabiele uitlijning */
  min-height: 28px;      /* voorkomt “springen” bij wisselende teksthoogte */
  padding-top: 10px;     /* <-- hoofdcorrectie: lager zetten */
  line-height: 1.1;
}

/* als je #mapTimeMeta al styling heeft, maar je wilt alleen de offset: */
#mapTimeMeta{
  margin-top: 0;
}

/* Collapsible cards (Tests paneel) */
.card details.collapsible{
  margin: 0;
}

.card details.collapsible > summary{
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(240,244,248,0.80);

  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
}

.card details.collapsible > summary::-webkit-details-marker{
  display: none;
}

.card details.collapsible > summary::after{
  content: "▸";
  opacity: 0.7;
  transform: translateY(-1px);
}

.card details.collapsible[open] > summary::after{
  content: "▾";
}

.testsHelp{
  margin: 2px 0 12px;
  line-height: 1.45;
}

/* -------------------- Structuur-assistent UI (één chatkader) -------------------- */

.structureComposer{
  margin-top: 10px;
}

.structureToolbar{
  margin-top: 8px;
  gap: 8px;
  align-items: center;
}

.pill.small{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  opacity: 0.95;
}

.inp.small{
  max-width: 180px;
  padding: 8px 10px;
  font-size: 12px;
}

.advDetails{
  margin-top: 12px;
}

.advDetails > summary{
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Compact chat rendering */
.structureChatLog{
  padding: 10px 12px;
}

.chatMsg{
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 9px 10px;
  margin: 8px 0;
  background: rgba(0,0,0,0.18);
}

.chatMsg.user{
  background: rgba(255,255,255,0.03);
}

.chatMsg.pending{
  border-color: rgba(255,255,255,0.11);
  background: rgba(255,255,255,0.025);
}

.chatMeta{
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 6px;
  opacity: 0.85;
  font-size: 12px;
}

.chatRole{
  font-weight: 700;
  letter-spacing: 0.01em;
}

.chatTs{
  opacity: 0.65;
}

.chatBody{
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.42;
}

.typingDots{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
}

.typingDots span{
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(240,244,248,0.82);
  animation: fugaTypingPulse 1.05s ease-in-out infinite;
}

html[data-fuga-theme="light"] body.fuga-client-exact .typingDots span{
  background: rgba(20,32,38,0.56);
}

.typingDots span:nth-child(2){
  animation-delay: 0.14s;
}

.typingDots span:nth-child(3){
  animation-delay: 0.28s;
}

@keyframes fugaTypingPulse{
  0%, 80%, 100%{
    opacity: 0.28;
    transform: translateY(0);
  }
  40%{
    opacity: 1;
    transform: translateY(-2px);
  }
}

.msgDetails{
  margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 6px;
}

.msgDetails > summary{
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  opacity: 0.85;
}

.msgDetails pre{
  margin: 8px 0 0;
  padding: 8px 9px;
  border-radius: 12px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.06);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* --- Organisatie-assistent: tijdelijke melding (toast) --- */
.structureToast{
  position: sticky;
  top: 10px;
  z-index: 6;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(0, 210, 200, 0.40);
  background: rgba(0, 210, 200, 0.18);
  color: rgba(230, 255, 252, 0.95);
  font-size: 12.5px;
  line-height: 1.3;
  box-shadow: 0 8px 26px rgba(0,0,0,0.25);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 420ms ease, transform 420ms ease;
}

.structureToast.fadeOut{
  opacity: 0;
  transform: translateY(-4px);
}

/* --- Organisatie-assistent: highlight van "extracted units" regels in details --- */
.msgDetails pre .lineExtractedUnits{
  display: block;
  margin: 2px 0;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(0, 210, 200, 0.18);
  border: 1px solid rgba(0, 210, 200, 0.22);
  color: rgba(230, 255, 252, 0.95);
}

@media (max-width: 980px) {
  .inp.small{
    max-width: 140px;
  }
}

/* Chronologische focus panel */
.focusBox{
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.focusBox .kvRow{
  margin-top: 8px;
}

#focusHint{
  margin-top: 6px;
}

    /* ---------------------------------------------------------
       Compacte UI: Focuspunt + Experimenteerpaneel
       --------------------------------------------------------- */

    /* Focuspunt instellen (details/summary) */
    #focusBox > summary{
      list-style: none;
      cursor: pointer;
      user-select: none;
    }
    #focusBox > summary::-webkit-details-marker{ display:none; }
    #focusBox[open] > summary{ margin-bottom: 10px; }

    /* Experimenteerpaneel compacter + 1-regel layout */
    :root{
      --expLabelW: 190px;  /* <- gelijke linkergrens/labelbreedte */
      --expNumW: 92px;
      --expRowGap: 6px;
    }

    #expPanelBody .expField{
      margin: 0 0 var(--expRowGap) 0;
      padding: 0;
      display: grid;
      grid-template-columns: var(--expLabelW) 1fr;
      align-items: center;
      column-gap: 12px;
    }

    /* Label links; hide de “dubbele” waarde (…Val) rechts in labelrow */
    #expPanelBody .expField .expLabelRow{
      margin: 0;
      padding: 0;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    #expPanelBody .expField .expLabelRow > span:last-child{
      display: none; /* verberg expSimKVal / expSimMinVal / etc. -> geen dubbele waarde */
    }

    /* Range + nummer in dezelfde regel rechts */
    #expPanelBody .expField .rangeRow{
      margin: 0;
      padding: 0;
      display: grid;
      grid-template-columns: 1fr var(--expNumW);
      align-items: center;
      gap: 10px;
    }

    /* Sliders op 1 regel; voorkom extra verticale ruimte */
    #expPanelBody .expField input.range{
      margin: 0;
    }
    #expPanelBody .expField .inp.expNum{
      width: var(--expNumW);
      margin: 0;
    }

    /* Ook dropdownvelden (zoals "Weergave") netjes 1-regelig naast label */
    #expPanelBody .expField > select.sel{
      margin: 0;
      width: 100%;
    }

    /* Subtitels/preset/knoppen iets compacter */
    #expPanelBody .expSubTitle{ margin: 0 0 8px 0; }
    .mapCtlRight .expBtnRow{ margin-top: 6px; }

    :root{
  --fuga-bg: var(--bg0, #0b0d10);
  --fuga-surface: rgba(255,255,255,0.035);
  --fuga-surface2: rgba(255,255,255,0.022);
  --fuga-border: rgba(255,255,255,0.085);
  --fuga-border2: rgba(255,255,255,0.06);
  --fuga-text: var(--fg0, rgba(255,255,255,0.92));
  --fuga-muted: rgba(255,255,255,0.62);
  --fuga-muted2: rgba(255,255,255,0.48);
  --fuga-accent: rgba(120, 210, 210, 0.95); /* subtiel turkoois */
  --fuga-radius: 16px;
}

.fugaMetaGrid{
  display: grid;
  grid-template-columns: repeat(2, minmax(360px, 1fr));
  gap: 12px;
  align-items: start;
}

@media (max-width: 920px){
  .fugaMetaGrid{ grid-template-columns: 1fr; }
}

.fugaCard{
  border: 1px solid var(--fuga-border);
  border-radius: var(--fuga-radius);
  background:
    linear-gradient(180deg, var(--fuga-surface), var(--fuga-surface2));
  box-shadow:
    0 10px 30px rgba(0,0,0,0.35),
    0 1px 0 rgba(255,255,255,0.06) inset;
  overflow: hidden;
}

.fugaCardHead{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--fuga-border2);
}

.fugaKicker{
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fuga-muted2);
  line-height: 1.1;
}

.fugaTitle{
  font-size: 16px;
  font-weight: 600;
  color: var(--fuga-text);
  line-height: 1.25;
  margin-top: 3px;
}

.fugaHeadActions{
  display: flex;
  align-items: center;
  gap: 10px;
}

.fugaBtn{
  appearance: none;
  border: 1px solid var(--fuga-border);
  background: rgba(255,255,255,0.03);
  color: var(--fuga-text);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12.5px;
  cursor: pointer;
}

.fugaBtn:hover{
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.045);
}

.fugaBadge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--fuga-border);
  background: rgba(255,255,255,0.03);
  color: var(--fuga-text);
  font-size: 12.5px;
  white-space: nowrap;
}

.fugaBadge.isReady{
  border-color: rgba(120, 210, 210, 0.35);
  box-shadow: 0 0 0 3px rgba(120, 210, 210, 0.08);
}

.fugaKvGrid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 12px;
  padding: 12px 14px 10px;
}

.fugaKv{
  border: 1px solid rgba(255,255,255,0.055);
  border-radius: 12px;
  padding: 10px 10px;
  background: rgba(0,0,0,0.10);
  min-width: 0;
}

.fugaKey{
  font-size: 12px;
  color: var(--fuga-muted2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.fugaVal{
  font-size: 13.5px;
  color: var(--fuga-text);
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.fugaValMono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.fugaChips{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.fugaChip{
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.85);
}

.fugaLegend{
  padding: 0 14px 12px;
}

.fugaLegendRow{
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  border-top: 1px dashed rgba(255,255,255,0.07);
}

.fugaLegendRow:first-child{ border-top: none; }

.fugaLegendLabel{
  font-size: 12px;
  color: var(--fuga-muted2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fugaBar{
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  overflow: hidden;
}

.fugaBar > i{
  display: block;
  height: 100%;
  width: 100%;
}

.fugaDetails{
  border-top: 1px solid var(--fuga-border2);
  padding: 10px 14px;
}

.fugaDetails summary{
  cursor: pointer;
  color: var(--fuga-muted);
  font-size: 12.5px;
}

.fugaRaw{
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(0,0,0,0.18);
  color: rgba(255,255,255,0.86);
  font-size: 12.5px;
  line-height: 1.35;
  overflow: auto;
}

/* FUGA meta cards: compactere kv layout */
.fugaKvGrid{
  gap: 6px;
  margin-top: 8px;
}
.fugaKv{
  padding: 6px 10px;
  border-radius: 10px;
}
.fugaKv .k{
  margin-bottom: 2px;
  line-height: 1.15;
}
.fugaKv .v{
  line-height: 1.2;
}

/* Meer Luft onder console-snippets */
#structChatLog pre,
.structChatLog pre,
pre.structHelpCmd,
pre.fugaCodeBlock{
  margin: 10px 0 14px;
}

/* ---------------------------------------------------------
   FUGA client page theme system (frontpage-achtige sfeer)
   - licht is standaard
   - donker blijft beschikbaar via toggle
   - geen !important nodig
--------------------------------------------------------- */

html[data-fuga-theme="light"]{
  --bg0: #d7ddd7;
  --bg1: #b9c4bc;
  --card: rgba(248, 250, 247, 0.64);
  --card2: rgba(242, 246, 242, 0.52);
  --ink: rgba(20, 32, 38, 0.96);
  --muted: rgba(20, 32, 38, 0.62);
  --line: rgba(26, 50, 58, 0.12);
  --line2: rgba(26, 50, 58, 0.18);
  --accent: rgba(20, 32, 38, 0.90);
  --shadow: 0 18px 48px rgba(28, 44, 50, 0.14);

  --page-glow-1: rgba(244, 248, 244, 0.98);
  --page-glow-2: rgba(191, 211, 204, 0.54);
  --page-glow-3: rgba(165, 185, 180, 0.22);

  --topbar-bg-start: rgba(233, 238, 234, 0.72);
  --topbar-bg-end: rgba(219, 227, 221, 0.56);
  --topbar-border: rgba(26, 50, 58, 0.10);

  --btn-bg: rgba(255,255,255,0.34);
  --btn-bg-hover: rgba(195, 224, 212, 0.78);
  --btn-border: rgba(26, 50, 58, 0.14);
  --btn-border-hover: rgba(72, 118, 110, 0.42);
  --btn-secondary-bg: rgba(247, 250, 247, 0.48);

  --field-bg: rgba(255,255,255,0.42);
  --box-bg: rgba(248, 250, 247, 0.48);
  --soft-bg: rgba(244, 247, 244, 0.40);
  --map-bg: rgba(247, 249, 246, 0.44);
  --tooltip-bg: rgba(242, 246, 243, 0.96);

  --brand-color: #1d7062;
  --hover-ring: rgba(72, 118, 110, 0.12);
  --theme-toggle-glow: rgba(72, 118, 110, 0.12);

  --fuga-surface: rgba(255,255,255,0.34);
  --fuga-surface2: rgba(255,255,255,0.18);
  --fuga-border: rgba(26, 50, 58, 0.12);
  --fuga-border2: rgba(26, 50, 58, 0.08);
  --fuga-text: rgba(20, 32, 38, 0.94);
  --fuga-muted: rgba(20, 32, 38, 0.64);
  --fuga-muted2: rgba(20, 32, 38, 0.48);
}

html[data-fuga-theme="light"] body.fuga-client-exact{
  --card: #f5f7f4;
  --card2: #edf2ee;
  --shadow: 0 18px 42px rgba(28, 44, 50, 0.12);
}

html[data-fuga-theme="light"] body.fuga-client-exact .card{
  background: #f5f7f4 !important;
  border-color: rgba(26, 50, 58, 0.12);
}

html[data-fuga-theme="light"] body.fuga-client-exact .box{
  background: rgba(245, 247, 244, 0.94);
  border-color: rgba(26, 50, 58, 0.12);
}

html[data-fuga-theme="dark"]{
  --bg0: #151a1e;
  --bg1: #0f1418;
  --card: rgba(24, 31, 37, 0.84);
  --card2: rgba(19, 25, 31, 0.78);
  --ink: rgba(238, 244, 244, 0.94);
  --muted: rgba(238, 244, 244, 0.62);
  --line: rgba(238, 244, 244, 0.12);
  --line2: rgba(238, 244, 244, 0.18);
  --accent: rgba(238, 244, 244, 0.88);
  --shadow: 0 16px 44px rgba(0, 0, 0, 0.34);

  --page-glow-1: rgba(73, 94, 90, 0.20);
  --page-glow-2: rgba(94, 116, 111, 0.10);
  --page-glow-3: rgba(23, 31, 34, 0.00);

  --topbar-bg-start: rgba(18, 23, 27, 0.84);
  --topbar-bg-end: rgba(15, 20, 24, 0.68);
  --topbar-border: rgba(238, 244, 244, 0.08);

  --btn-bg: rgba(255,255,255,0.06);
  --btn-bg-hover: rgba(72, 143, 127, 0.24);
  --btn-border: rgba(238, 244, 244, 0.16);
  --btn-border-hover: rgba(87, 156, 140, 0.40);
  --btn-secondary-bg: rgba(0, 0, 0, 0.20);

  --field-bg: rgba(0, 0, 0, 0.20);
  --box-bg: rgba(0, 0, 0, 0.22);
  --soft-bg: rgba(255,255,255,0.04);
  --map-bg: rgba(0, 0, 0, 0.28);
  --tooltip-bg: rgba(10, 14, 18, 0.94);

  --brand-color: #7ad8c0;
  --hover-ring: rgba(72, 143, 127, 0.10);
  --theme-toggle-glow: rgba(72, 143, 127, 0.10);

  --fuga-surface: rgba(255,255,255,0.04);
  --fuga-surface2: rgba(255,255,255,0.02);
  --fuga-border: rgba(255,255,255,0.08);
  --fuga-border2: rgba(255,255,255,0.06);
  --fuga-text: rgba(238, 244, 244, 0.94);
  --fuga-muted: rgba(238, 244, 244, 0.62);
  --fuga-muted2: rgba(238, 244, 244, 0.48);
}

html[data-fuga-theme="light"],
html[data-fuga-theme="dark"]{
  background:
    radial-gradient(1200px 820px at 14% -4%, var(--page-glow-1), transparent 56%),
    radial-gradient(900px 700px at 92% 14%, var(--page-glow-2), transparent 60%),
    radial-gradient(720px 480px at 50% 100%, var(--page-glow-3), transparent 62%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

body.fuga-client-exact{
  background:
    radial-gradient(1200px 820px at 14% -4%, var(--page-glow-1), transparent 56%),
    radial-gradient(900px 700px at 92% 14%, var(--page-glow-2), transparent 60%),
    radial-gradient(720px 480px at 50% 100%, var(--page-glow-3), transparent 62%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  color: var(--ink);
}

body.fuga-client-exact .topbar{
  border-bottom: 1px solid var(--topbar-border);
  background: linear-gradient(180deg, var(--topbar-bg-start), var(--topbar-bg-end));
  backdrop-filter: blur(18px);
}

body.fuga-client-exact .topbarTitle{
  color: var(--brand-color);
}

body.fuga-client-exact .topnavLink,
body.fuga-client-exact .topbarNavBtn,
body.fuga-client-exact .topbarAction,
body.fuga-client-exact .topLeft > .btn.mini,
body.fuga-client-exact .btn{
  border-color: var(--btn-border);
  background: var(--btn-bg);
  color: var(--ink);
}

body.fuga-client-exact .topnavLink:hover,
body.fuga-client-exact .topbarNavBtn:hover,
body.fuga-client-exact .topbarAction:hover,
body.fuga-client-exact .topLeft > .btn.mini:hover,
body.fuga-client-exact .btn:hover{
  background: var(--btn-bg-hover);
  border-color: var(--btn-border-hover);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--hover-ring);
}

body.fuga-client-exact .btn.secondary{
  background: var(--btn-secondary-bg);
}

body.fuga-client-exact .inp,
body.fuga-client-exact .sel,
body.fuga-client-exact .file,
body.fuga-client-exact textarea{
  background: var(--field-bg);
  color: var(--ink);
  border-color: var(--line2);
}

body.fuga-client-exact .inp::placeholder,
body.fuga-client-exact textarea::placeholder{
  color: var(--muted);
}

body.fuga-client-exact .box,
body.fuga-client-exact .seg,
body.fuga-client-exact .preBox,
body.fuga-client-exact .structNode,
body.fuga-client-exact .chatMsg,
body.fuga-client-exact .dossierCard,
body.fuga-client-exact .dossierItem,
body.fuga-client-exact .userProjectsBox,
body.fuga-client-exact .userProjectsList .projRow,
body.fuga-client-exact .elCard,
body.fuga-client-exact .fugaKv,
body.fuga-client-exact .fugaRaw,
body.fuga-client-exact .msgDetails pre{
  background: var(--soft-bg);
  border-color: var(--line);
  color: var(--ink);
}

body.fuga-client-exact .mapFrame{
  background: var(--map-bg);
  border-color: var(--line);
}

body.fuga-client-exact .hoverTip,
body.fuga-client-exact .modalCard{
  background: var(--tooltip-bg);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--shadow);
}

body.fuga-client-exact .muted,
body.fuga-client-exact .brandSub,
body.fuga-client-exact .brand .muted,
body.fuga-client-exact .kvLabel,
body.fuga-client-exact .structMeta,
body.fuga-client-exact .fugaKicker{
  color: var(--muted);
}

body.fuga-client-exact .sectionTitle,
body.fuga-client-exact h2,
body.fuga-client-exact h3,
body.fuga-client-exact .lbl,
body.fuga-client-exact .structTitle,
body.fuga-client-exact .chipName,
body.fuga-client-exact .chipScope{
  color: var(--ink);
}

body.fuga-client-exact .structNode.child2 > .structHead > .structMeta{
  display: none;
}

body.fuga-client-exact .fileChip{
  border-color: var(--line2);
  color: var(--ink);
}

html[data-fuga-theme="light"] body.fuga-client-exact .fileChip{
  background: color-mix(in oklab, rgba(255,255,255,0.62) 72%, #9bb7ff 28%);
}

body.fuga-client-exact .chipBtn{
  background: var(--btn-secondary-bg);
  border-color: var(--line2);
  color: var(--ink);
}

body.fuga-client-exact #themeToggle{
  min-width: 86px;
}

body.fuga-client-exact #themeToggle[aria-pressed="true"]{
  box-shadow: 0 0 0 3px var(--theme-toggle-glow);
}

html[data-fuga-theme="light"] body.fuga-client-exact #clusterCanvas{
  filter: saturate(0.92) contrast(0.94);
}

/* ---------------------------------------------------------
   FUGA licht thema – leesbaarheid + projecttabel + footer
--------------------------------------------------------- */

.foot{
  text-align: center;
}

html[data-fuga-theme="light"] body.fuga-client-exact #filesList.filesList.box{
  background: rgba(250, 252, 249, 0.52);
  border-color: rgba(26, 50, 58, 0.12);
}

html[data-fuga-theme="light"] body.fuga-client-exact #filesList table.filesTable thead th{
  background: rgba(244, 247, 244, 0.96);
  color: rgba(20, 32, 38, 0.82);
  border-bottom: 1px solid rgba(26, 50, 58, 0.12);
  box-shadow: inset 0 -1px 0 rgba(26, 50, 58, 0.08);
}

html[data-fuga-theme="light"] body.fuga-client-exact .filesTable th,
html[data-fuga-theme="light"] body.fuga-client-exact .filesTable td,
html[data-fuga-theme="light"] body.fuga-client-exact .filesTable .fileCell,
html[data-fuga-theme="light"] body.fuga-client-exact .filesTable .mono,
html[data-fuga-theme="light"] body.fuga-client-exact .filesTable a{
  color: rgba(20, 32, 38, 0.92);
}

html[data-fuga-theme="light"] body.fuga-client-exact .filesTable tr td{
  border-bottom-color: rgba(26, 50, 58, 0.10);
}

html[data-fuga-theme="light"] body.fuga-client-exact .filesTable tr.fileRowClient td{
  background: rgba(0, 160, 150, 0.10);
}

html[data-fuga-theme="light"] body.fuga-client-exact .filesTable tr.fileRowClient:hover td{
  background: rgba(0, 160, 150, 0.16);
}

html[data-fuga-theme="light"] body.fuga-client-exact .filesTable tr.fileRowCurriculum td{
  background: rgba(194, 180, 255, 0.11);
}

html[data-fuga-theme="light"] body.fuga-client-exact .filesTable tr.fileRowCurriculum:hover td{
  background: rgba(194, 180, 255, 0.17);
}

html[data-fuga-theme="light"] body.fuga-client-exact .filesActions .btn,
html[data-fuga-theme="light"] body.fuga-client-exact #btnToggleExperiments,
html[data-fuga-theme="light"] body.fuga-client-exact #btnToggleStructure,
html[data-fuga-theme="light"] body.fuga-client-exact #btnDossierCurriculum,
html[data-fuga-theme="light"] body.fuga-client-exact #btnDossierMacro,
html[data-fuga-theme="light"] body.fuga-client-exact #btnDossierCourse{
  color: rgba(20, 32, 38, 0.94);
  border-color: rgba(26, 50, 58, 0.16);
  background: rgba(255, 255, 255, 0.42);
}

html[data-fuga-theme="light"] body.fuga-client-exact .filesActions .btn:hover,
html[data-fuga-theme="light"] body.fuga-client-exact #btnToggleExperiments:hover,
html[data-fuga-theme="light"] body.fuga-client-exact #btnToggleStructure:hover,
html[data-fuga-theme="light"] body.fuga-client-exact #btnDossierCurriculum:hover,
html[data-fuga-theme="light"] body.fuga-client-exact #btnDossierMacro:hover,
html[data-fuga-theme="light"] body.fuga-client-exact #btnDossierCourse:hover{
  background: rgba(195, 224, 212, 0.58);
  border-color: rgba(72, 118, 110, 0.30);
}

html[data-fuga-theme="light"] body.fuga-client-exact .seg{
  background: rgba(255,255,255,0.34);
  border-color: rgba(26, 50, 58, 0.12);
}

html[data-fuga-theme="light"] body.fuga-client-exact .segItem{
  color: rgba(20, 32, 38, 0.84);
}

html[data-fuga-theme="light"] body.fuga-client-exact .segItem:hover{
  background: rgba(195, 224, 212, 0.34);
}

html[data-fuga-theme="light"] body.fuga-client-exact .segItem:has(input:checked){
  background: rgba(195, 224, 212, 0.62);
  box-shadow: inset 0 0 0 1px rgba(72, 118, 110, 0.24);
}

html[data-fuga-theme="light"] body.fuga-client-exact .segItem:has(input:checked) span{
  color: rgba(20, 32, 38, 0.96);
  font-weight: 700;
}

/* ---------------------------------------------------------
   FUGA – bovenste dossierblok in 3 kolommen
--------------------------------------------------------- */

#secClient .clientGrid{
  display: grid;
  align-items: start;
  gap: 12px;
  grid-template-columns:
    minmax(240px, 0.88fr)
    minmax(300px, 1fr)
    minmax(240px, 0.82fr);
}

#secClient .clientLeft,
#secClient .clientMid,
#secClient .clientRight{
  min-width: 0;
  align-self: start;
}

#secClient .clientMid,
#secClient .clientRight,
#secClient .dossierTail{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#secClient .clientMid #dossierView{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#secClient .clientRight .dossierDebug{
  margin-top: 0;
}

@media (max-width: 1280px){
  #secClient .clientGrid{
    grid-template-columns: 1fr 1fr;
  }

  #secClient .clientRight{
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px){
  #secClient .clientGrid{
    grid-template-columns: 1fr;
  }

  #secClient .clientRight{
    grid-column: auto;
  }
}

/* ---------------------------------------------------------
   Admin FUGA — light theme contrast fix for clusterkaart controls
   Alleen voor adminpagina (body.fuga-header-v2), zodat fuga.html
   en oudere topbar-structuren niet onbedoeld mee verschuiven.
--------------------------------------------------------- */

html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .seg{
  background: rgba(255,255,255,0.40);
  border-color: rgba(26, 50, 58, 0.14);
}

html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .segItem{
  color: rgba(20, 32, 38, 0.88);
}

html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .segItem:hover{
  background: rgba(195, 224, 212, 0.30);
}

html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .segItem:has(input:checked){
  background: rgba(195, 224, 212, 0.58);
  box-shadow: inset 0 0 0 1px rgba(72, 118, 110, 0.22);
}

html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .segItem:has(input:checked) span{
  color: rgba(20, 32, 38, 0.96);
  font-weight: 700;
}

html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .chk,
html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .chk span,
html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .kvLabel,
html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .muted,
html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .muted.small,
html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .expSubTitle,
html[data-fuga-theme="light"] body.fuga-header-v2 #secMap #mapTimeMeta,
html[data-fuga-theme="light"] body.fuga-header-v2 #secMap #mapTimeLbl{
  color: rgba(20, 32, 38, 0.82);
}

html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .chk input{
  accent-color: #1d7062;
}

html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .btn,
html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .btn.secondary,
html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .sel,
html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .pill{
  color: rgba(20, 32, 38, 0.94);
  border-color: rgba(26, 50, 58, 0.16);
  background: rgba(255, 255, 255, 0.46);
}

html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .btn:hover,
html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .btn.secondary:hover{
  background: rgba(195, 224, 212, 0.58);
  border-color: rgba(72, 118, 110, 0.30);
  color: rgba(20, 32, 38, 0.96);
}

html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .sel{
  box-shadow: none;
}

html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .sel option{
  background: rgb(242, 246, 242);
  color: rgba(20, 32, 38, 0.96);
}

html[data-fuga-theme="light"] body.fuga-header-v2 #secMap #mapStatus{
  background: rgba(244, 247, 244, 0.72);
  color: rgba(20, 32, 38, 0.88);
  border-color: rgba(26, 50, 58, 0.14);
}

html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .expInfo,
html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .mapInfoBlock{
  background: rgba(250, 252, 249, 0.34);
  border-color: rgba(26, 50, 58, 0.12);
}

html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .expInfo > summary,
html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .mapInfoBlock > summary{
  color: rgba(20, 32, 38, 0.84);
}

html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .expField{
  background: rgba(250, 252, 249, 0.30);
  border-color: rgba(26, 50, 58, 0.10);
}

html[data-fuga-theme="light"] body.fuga-header-v2 #secMap .expLabelRow{
  color: rgba(20, 32, 38, 0.82);
}
/* ---------------------------------------------------------
   FUGA client page — light theme contrast fix for clusterkaart controls
   Gericht op fuga.html (body.fuga-client-exact), zodat de toggles
   "Toon cliënt activiteit", "Labels" en "Animatie" leesbaar blijven.
--------------------------------------------------------- */

html[data-fuga-theme="light"] body.fuga-client-exact #secMap .seg{
  background: rgba(255,255,255,0.44);
  border-color: rgba(26, 50, 58, 0.16);
}

html[data-fuga-theme="light"] body.fuga-client-exact #secMap .segItem{
  color: rgba(20, 32, 38, 0.90);
}

html[data-fuga-theme="light"] body.fuga-client-exact #secMap .segItem:hover{
  background: rgba(195, 224, 212, 0.30);
}

html[data-fuga-theme="light"] body.fuga-client-exact #secMap .segItem:has(input:checked){
  background: rgba(195, 224, 212, 0.58);
  box-shadow: inset 0 0 0 1px rgba(72, 118, 110, 0.22);
}

html[data-fuga-theme="light"] body.fuga-client-exact #secMap .segItem:has(input:checked) span{
  color: rgba(20, 32, 38, 0.97);
  font-weight: 700;
}

html[data-fuga-theme="light"] body.fuga-client-exact #secMap .chk{
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.34);
  border: 1px solid rgba(26, 50, 58, 0.12);
  color: rgba(20, 32, 38, 0.90);
  font-size: 13px;
  line-height: 1.2;
  min-height: 38px;
}

html[data-fuga-theme="light"] body.fuga-client-exact #secMap .chk:hover{
  background: rgba(195, 224, 212, 0.30);
}

html[data-fuga-theme="light"] body.fuga-client-exact #secMap .chk:has(input:checked){
  background: rgba(195, 224, 212, 0.58);
  border-color: rgba(72, 118, 110, 0.22);
  box-shadow: inset 0 0 0 1px rgba(72, 118, 110, 0.16);
}

html[data-fuga-theme="light"] body.fuga-client-exact #secMap .chk:has(input:checked) span{
  color: rgba(20, 32, 38, 0.97);
  font-weight: 700;
}

html[data-fuga-theme="light"] body.fuga-client-exact #secMap .chk span{
  font-size: 13px;
  line-height: 1.2;
}

html[data-fuga-theme="light"] body.fuga-client-exact #secMap .chk span,
html[data-fuga-theme="light"] body.fuga-client-exact #secMap .kvLabel,
html[data-fuga-theme="light"] body.fuga-client-exact #secMap .muted,
html[data-fuga-theme="light"] body.fuga-client-exact #secMap .muted.small,
html[data-fuga-theme="light"] body.fuga-client-exact #secMap .expSubTitle,
html[data-fuga-theme="light"] body.fuga-client-exact #secMap #mapTimeMeta,
html[data-fuga-theme="light"] body.fuga-client-exact #secMap #mapTimeLbl{
  color: rgba(20, 32, 38, 0.84);
}

html[data-fuga-theme="light"] body.fuga-client-exact #secMap .chk input{
  accent-color: #1d7062;
}

html[data-fuga-theme="light"] body.fuga-client-exact #secUpload .bar{
  background: rgba(255,255,255,0.62);
  border-color: rgba(120, 132, 188, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.40),
    0 1px 8px rgba(120, 132, 188, 0.06);
}

html[data-fuga-theme="light"] body.fuga-client-exact #secUpload .barFill{
  background: linear-gradient(
    90deg,
    color-mix(in oklab, white 72%, #9bb7ff 28%) 0%,
    color-mix(in oklab, white 54%, #9bb7ff 46%) 100%
  );
  box-shadow:
    inset 0 0 0 1px rgba(120, 132, 188, 0.10),
    0 0 14px rgba(155, 183, 255, 0.12);
}

html[data-fuga-theme="light"] body.fuga-client-exact #secUpload .bar.pulsing .barFill{
  background: linear-gradient(
    90deg,
    color-mix(in oklab, white 78%, #9bb7ff 22%) 0%,
    color-mix(in oklab, white 52%, #9bb7ff 48%) 50%,
    color-mix(in oklab, white 78%, #9bb7ff 22%) 100%
  );
  background-size: 200% 100%;
}

html[data-fuga-theme="light"] body.fuga-client-exact #secUpload .bar.pulsing::after{
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.00) 0%,
    rgba(155, 183, 255, 0.16) 45%,
    rgba(255,255,255,0.00) 100%
  );
}

html[data-fuga-theme="light"] body.fuga-client-exact #secMap .btn,
html[data-fuga-theme="light"] body.fuga-client-exact #secMap .btn.secondary,
html[data-fuga-theme="light"] body.fuga-client-exact #secMap .sel,
html[data-fuga-theme="light"] body.fuga-client-exact #secMap .pill{
  color: rgba(20, 32, 38, 0.95);
  border-color: rgba(26, 50, 58, 0.16);
  background: rgba(255, 255, 255, 0.48);
}

html[data-fuga-theme="light"] body.fuga-client-exact #secMap .btn:hover,
html[data-fuga-theme="light"] body.fuga-client-exact #secMap .btn.secondary:hover{
  background: rgba(195, 224, 212, 0.58);
  border-color: rgba(72, 118, 110, 0.30);
  color: rgba(20, 32, 38, 0.97);
}

html[data-fuga-theme="light"] body.fuga-client-exact #secMap .sel{
  box-shadow: none;
}

html[data-fuga-theme="light"] body.fuga-client-exact #secMap .sel option{
  background: rgb(242, 246, 242);
  color: rgba(20, 32, 38, 0.96);
}

html[data-fuga-theme="light"] body.fuga-client-exact #secMap #mapStatus{
  background: rgba(244, 247, 244, 0.74);
  color: rgba(20, 32, 38, 0.89);
  border-color: rgba(26, 50, 58, 0.14);
}


/* 2026-04-02 — client-page polish */
body.fuga-client-exact .uploadSideHead{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 10px;
}

body.fuga-client-exact .uploadSideHead h3{
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

body.fuga-client-exact .uploadSideTitle{
  margin: 0;
}

body.fuga-client-exact .uploadSide .lbl:first-of-type{
  margin-top: 2px;
}

body.fuga-client-exact{
  /* Keep the compact desktop client scale. 0.8 is the intended FUGA desktop zoom. */
  --fuga-desktop-scale: 0.8;
}

body.fuga-client-exact .wrap{
  max-width: 1180px;
  padding: 8px 10px 18px;
}

body.fuga-client-exact .topbar{
  padding: 8px 12px;
}

body.fuga-client-exact .topnavLink,
body.fuga-client-exact .topbarNavBtn,
body.fuga-client-exact .topbarAction,
body.fuga-client-exact .topLeft > .btn.mini{
  min-height: 24px;
  padding: 0 9px;
}

body.fuga-client-exact .btn,
body.fuga-client-exact .inp,
body.fuga-client-exact .sel,
body.fuga-client-exact .file,
body.fuga-client-exact textarea{
  font-size: 11px;
  border-radius: 9px;
  padding: 7px 9px;
}

body.fuga-client-exact .card{
  padding: 8px;
  border-radius: 12px;
}

body.fuga-client-exact .row{
  gap: 8px;
  margin: 8px 0;
}

body.fuga-client-exact .pill{
  padding: 5px 7px;
  font-size: 10px;
}

body.fuga-client-exact .segItem{
  padding: 6px 7px;
  font-size: 11px;
}

body.fuga-client-exact #secMap .chk{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 10px;
  font-size: 11px;
  line-height: 1.05;
}

body.fuga-client-exact #secMap .chk span{
  font-size: 11px;
  line-height: 1.05;
}

body.fuga-client-exact #focusBox{
  margin-top: 4px;
  padding-top: 8px;
}

body.fuga-client-exact #secMap .mapCtlGrid{
  margin-top: 0;
  gap: 10px;
}

body.fuga-client-exact #secMap .mapCtlRight{
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: -10px;
}

body.fuga-client-exact #secMap .mapCtlRight > .muted.small{
  margin-bottom: 0;
}

body.fuga-client-exact #secMap .mapCtlRight .expPreset{
  margin-top: 0;
}

body.fuga-client-exact #secMap .mapCtlRight .expBtnRow{
  margin-top: 2px;
}

body.fuga-client-exact #secMap{
  position: relative;
  overflow: visible;
  z-index: 4;
  margin-bottom: -20px;
}

body.fuga-client-exact #secMap > h2,
body.fuga-client-exact #secMap > .row.wraprow,
body.fuga-client-exact #secMap > .mapCtlGrid,
body.fuga-client-exact #secMap > #expPanelBody{
  position: relative;
  z-index: 2;
}

body.fuga-client-exact #secGraph{
  position: relative;
  z-index: 1;
  margin-top: -8px;
  margin-bottom: 0;
}

body.fuga-client-exact #secGraph > .mapStack{
  width: 108vw;
  max-width: 108vw;
  margin-left: calc(50% - 54vw);
  margin-right: calc(50% - 54vw);
}

body.fuga-client-exact #secGraph > .mapStack > .mapFrame{
  width: 108vw;
  max-width: 108vw;
  height: clamp(560px, 70vh, 790px);
  min-height: 560px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background:
    radial-gradient(1200px 780px at 50% 38%, rgba(255,255,255,0.045), transparent 58%),
    linear-gradient(180deg, #050709, #030405 58%, #040608);
}

@media (min-width: 1180px){
  body.fuga-client-exact{
    zoom: var(--fuga-desktop-scale);
  }

  body.fuga-client-exact #secUpload{
    position: relative;
    z-index: 4;
    margin-top: -56px;
  }
}

@media (max-width: 1179px){
  body.fuga-client-exact .wrap{
    max-width: 100%;
    padding: 8px 10px 18px;
  }

  body.fuga-client-exact #secMap{
    margin-bottom: -14px;
  }

  body.fuga-client-exact #secGraph{
    margin-top: -6px;
    margin-bottom: 0;
  }

  body.fuga-client-exact #secGraph > .mapStack > .mapFrame{
    width: 108vw;
    max-width: 108vw;
    margin-left: calc(50% - 54vw);
    margin-right: calc(50% - 54vw);
    height: clamp(340px, 46vh, 500px);
    min-height: 340px;
  }

  body.fuga-client-exact #secUpload{
    margin-top: -34px;
  }
}

body.fuga-client-exact #btnFugaCommunity{
  background: linear-gradient(180deg, rgba(220,238,255,0.98), rgba(184,218,255,0.96));
  border-color: rgba(95, 150, 205, 0.44);
  color: rgba(20, 46, 74, 0.96);
  box-shadow: 0 10px 24px rgba(92, 155, 214, 0.18);
}

body.fuga-client-exact .userProjectsBox details > summary{
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.1;
  padding: 7px 10px;
}

body.fuga-client-exact #userProjectsCount{
  font: inherit;
  font-weight: 400;
  letter-spacing: 0;
}

body.fuga-client-exact .fugaCommunityPreviewLead{
  color: rgba(255,255,255,0.86);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 14px;
}

body.fuga-client-exact .fugaCommunityPreviewMeta{
  color: rgba(255,255,255,0.60);
  font-size: 12px;
  line-height: 1.4;
  margin: -2px 0 18px;
}

body.fuga-client-exact .fugaCommunityPreview p{
  margin: 0 0 12px;
  line-height: 1.6;
}

body.fuga-client-exact .fugaCommunityPreview ul{
  margin: 0 0 14px 18px;
  padding: 0;
}

body.fuga-client-exact .fugaCommunityPreview li{
  margin: 0 0 8px;
  line-height: 1.55;
}

body.fuga-client-exact .fugaCommunityPreview h2,
body.fuga-client-exact .fugaCommunityPreview h3{
  margin: 0 0 12px;
  line-height: 1.25;
}

html[data-fuga-theme="light"] body.fuga-client-exact .fugaCommunityPreviewLead{
  color: rgba(20, 32, 38, 0.86);
}

html[data-fuga-theme="light"] body.fuga-client-exact .fugaCommunityPreviewMeta{
  color: rgba(20, 32, 38, 0.62);
}

body.fuga-client-exact #btnFugaCommunity:hover{
  background: linear-gradient(180deg, rgba(231,244,255,1), rgba(194,224,255,0.98));
  border-color: rgba(80, 139, 199, 0.52);
  color: rgba(16, 38, 63, 0.98);
  box-shadow: 0 12px 28px rgba(92, 155, 214, 0.24);
}

body.fuga-client-exact #btnFugaCommunity:active{
  transform: translateY(1px);
}

body.fuga-client-exact #secExplorer{
  display: none !important;
}

body.fuga-client-exact #btnDossierPdf{
  display: none !important;
}
