/* ============================================================
   C-ERP Platform — Top-nav "Planning" (portefeuille)
   ============================================================ */
:root { --plh-lane: 300px; }

/* ---- tabs ---- */
.plh-tabs { display: flex; gap: 4px; margin-bottom: 22px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.plh-tab { display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; font-size: 13px; font-weight: 500; color: var(--text-2); border-bottom: 2.5px solid transparent; white-space: nowrap; background: none; cursor: pointer; }
.plh-tab svg { color: var(--text-3); }
.plh-tab:hover { color: var(--text); }
.plh-tab.is-on { color: var(--brand); border-bottom-color: var(--brand); }
.plh-tab.is-on svg { color: var(--brand); }

/* ---- header tools / legend ---- */
.plh-tools { display: flex; align-items: center; gap: 14px; }
.plh-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; font-size: 12px; font-weight: 500; color: var(--text-2); background: var(--bg-2); border: 1px solid var(--line); border-radius: 7px; cursor: pointer; white-space: nowrap; }
.plh-btn:hover { color: var(--text); border-color: var(--line-strong); }
.plh-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 11.5px; color: var(--text-2); }
.plh-legend span { display: inline-flex; align-items: center; gap: 6px; }
.plh-legend i { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }
.plh-legend--inline { gap: 12px; }

.plh-foot { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; font-size: 11.5px; color: var(--text-3); padding: 13px 18px; border-top: 1px solid var(--line); margin: 0; }
.plh-foot svg { color: var(--text-3); }
.plh-empty { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 40px 18px; font-size: 13px; color: var(--text-3); }
.plh-empty svg { color: var(--text-3); opacity: .7; }

/* ============ master-Gantt ============ */
.plh-gantt { padding: 0 18px 6px; }
.plh-axis { padding-top: 12px; }
.plh-axis__track { position: relative; display: flex; height: 30px; border-bottom: 1px solid var(--line); }
.plh-axis__cell { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; position: relative; min-width: 0; padding-bottom: 5px; }
.plh-axis__cell.is-now { background: color-mix(in srgb, var(--amber) 9%, transparent); }
.plh-axis__maand { position: absolute; top: -2px; left: 3px; font-size: 10px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.plh-axis__w { font-size: 9.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.plh-axis__cell.is-now .plh-axis__w { color: var(--amber-tekst); font-weight: 600; }
.plh-axis__today { position: absolute; top: 26px; transform: translateX(-50%); }
.plh-axis__today em { font-size: 9.5px; font-style: normal; color: var(--amber-tekst); font-weight: 600; white-space: nowrap; }

.plh-pgroup { border-bottom: 1px solid var(--line); }
.plh-pgroup:last-child { border-bottom: none; }

/* categorie-secties */
.plh-cat { border-bottom: 1px solid var(--line-strong); }
.plh-cat:last-child { border-bottom: none; }
.plh-catrow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 16px; background: color-mix(in srgb, var(--bg-2) 70%, transparent); border: none; border-bottom: 1px solid var(--line); cursor: pointer; text-align: left; }
.plh-catrow > svg { color: var(--text-2); flex-shrink: 0; }
.plh-catrow b { font-size: 12.5px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: .03em; }
.plh-cathint { font-size: 11.5px; color: var(--text-3); }
.plh-catcount { margin-left: auto; font-size: 11.5px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.plh-cat .plh-pgroup:last-child { border-bottom: none; }

.plh-legend__dia { width: 0 !important; height: 0 !important; border: 5px solid transparent !important; border-bottom-color: var(--brand) !important; border-radius: 0 !important; transform: translateY(-3px); }

/* facturatie-termijn-rail */
.plh-termrow { min-height: 26px; background: color-mix(in srgb, var(--bg-2) 30%, transparent); }
.plh-tlane { width: var(--plh-lane); flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px 5px 32px; font-size: 10.5px; font-weight: 500; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.plh-tlane svg { color: var(--text-3); }
.plh-term { position: absolute; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; width: 13px; height: 13px; border-radius: 3px; outline: none; }
.plh-term i { width: 9px; height: 9px; border: 1px solid; transform: rotate(45deg); border-radius: 1.5px; }
.plh-term em { position: absolute; left: 50%; transform: translateX(-50%); font-size: 9px; font-style: normal; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; line-height: 11px; }
.plh-term--onder em, .plh-term--verborgen em { top: calc(100% + 1px); }
.plh-term--boven em { bottom: calc(100% + 1px); }
.plh-term--verborgen em { display: none; }
.plh-term:hover, .plh-term:focus-visible { z-index: 3; }
.plh-term:focus-visible { box-shadow: 0 0 0 2px var(--brand); }
.plh-term--verborgen:hover em, .plh-term--verborgen:focus-visible em { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.plh-termrow .plh-track { min-height: 30px; }
.plh-termrow .plh-track--twee { min-height: 44px; }

/* optionele subproject-tak */
.plh-subrow { background: color-mix(in srgb, var(--brand) 4%, transparent); }
.plh-sublane { display: flex; align-items: center; gap: 7px; }
.plh-subtag { font-size: 8.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); background: var(--brand-soft); border: 1px solid color-mix(in srgb,var(--brand) 30%,transparent); padding: 1px 6px; border-radius: 4px; }
.plh-subbar { position: absolute; top: 50%; transform: translateY(-50%); height: 15px; border-radius: 4px; border: 1.5px dashed var(--brand); background: color-mix(in srgb,var(--brand) 12%,transparent); display: flex; align-items: center; overflow: hidden; }
.plh-subbar em { font-size: 9px; font-style: normal; color: var(--brand); padding-left: 7px; white-space: nowrap; }
.plh-grow { display: flex; align-items: stretch; min-height: 30px; }
.plh-grow--proj { background: color-mix(in srgb, var(--bg-2) 45%, transparent); }
.plh-glane { width: var(--plh-lane); flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 4px; background: none; border: none; cursor: pointer; text-align: left; color: var(--text); min-width: 0; }
.plh-glane > svg { color: var(--text-3); flex-shrink: 0; }
.plh-bv { width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0; }
.plh-pmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.plh-pname { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plh-ptags { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; }
.plh-ptags i { font-style: normal; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.plh-pvg { font-weight: 700 !important; }
.plh-glanewrap { width: var(--plh-lane); flex-shrink: 0; display: flex; align-items: center; min-width: 0; padding-right: 12px; }
.plh-glanewrap > .plh-glane { width: auto; flex: 1; padding-right: 8px; }
.plh-popen { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; padding: 3px; border: none; background: none; cursor: pointer; border-radius: 5px; color: var(--text-3); flex-shrink: 0; }
.plh-popen:hover { background: var(--bg-2); color: var(--brand); }

.plh-blane { width: var(--plh-lane); flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 14px 6px 32px; font-size: 12px; color: var(--text-2); }
.plh-blane i { font-style: normal; font-size: 10.5px; color: var(--text-3); font-variant-numeric: tabular-nums; flex-shrink: 0; white-space: nowrap; }

.plh-track { flex: 1; position: relative; border-left: 1px solid var(--line); margin: 4px 0; min-width: 0; }
.plh-track__today { position: absolute; top: -4px; bottom: -4px; width: 1.5px; background: color-mix(in srgb, var(--amber) 60%, transparent); transform: translateX(-50%); z-index: 1; }
.plh-bar { position: absolute; top: 50%; transform: translateY(-50%); height: 15px; border-radius: 4px; display: flex; align-items: center; min-width: 8px; }
.plh-bar__now { font-size: 9px; font-style: normal; font-weight: 700; color: #fff; padding-left: 6px; letter-spacing: .03em; }
.plh-sumbar { position: absolute; top: 50%; transform: translateY(-50%); height: 17px; border: 1px solid; border-radius: 5px; overflow: hidden; display: flex; align-items: center; }
.plh-sumbar i { position: absolute; left: 0; top: 0; bottom: 0; opacity: .55; }
.plh-sumbar em { position: relative; font-size: 9.5px; font-style: normal; color: var(--text-2); padding-left: 7px; white-space: nowrap; }

/* ============ week-staafgrafiek ============ */
.plh-wb { padding-top: 8px; }
.plh-wb__plot { position: relative; display: flex; align-items: flex-end; height: 168px; gap: 0; border-bottom: 1px solid var(--line-strong); }
.plh-wb__now { position: absolute; top: 0; bottom: 0; width: 1.5px; background: color-mix(in srgb, var(--amber) 55%, transparent); transform: translateX(-50%); }
.plh-wb__col { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; position: relative; min-width: 0; padding: 0 2px; }
.plh-wb__col.is-now { background: color-mix(in srgb, var(--amber) 8%, transparent); }
.plh-wb__amt { font-size: 9px; color: var(--text-2); font-variant-numeric: tabular-nums; margin-bottom: 3px; white-space: nowrap; font-weight: 500; }
.plh-wb__col.is-tesmal .plh-wb__amt { visibility: hidden; }
.plh-wb__col.is-tesmal:hover .plh-wb__amt, .plh-wb__col.is-tesmal:focus-visible .plh-wb__amt { visibility: visible; position: relative; z-index: 3; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.plh-wb__col:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.plh-wb__noot { margin: 6px 0 0; font-size: 11px; color: var(--text-3); }
.plh-wb__stack { width: 64%; max-width: 30px; min-height: 2px; display: flex; flex-direction: column; border-radius: 3px 3px 0 0; overflow: hidden; }
.plh-wb__stack i { width: 100%; flex-shrink: 0; }
.plh-wb__xaxis { display: flex; margin-top: 6px; }
.plh-wb__x { flex: 1; text-align: center; font-size: 9.5px; color: var(--text-3); font-variant-numeric: tabular-nums; min-width: 0; }
.plh-wb__x.is-now { color: var(--amber-tekst); font-weight: 700; }

.plh-bigweek { display: flex; flex-direction: column; align-items: flex-end; }
.plh-bigweek span { font-size: 11px; color: var(--text-3); }
.plh-bigweek b { font-size: 18px; font-weight: 600; }

/* ============ week-lijst (facturatie / betalingen) ============ */
.plh-wklist { display: flex; flex-direction: column; }
.plh-wkrow { display: flex; gap: 0; border-top: 1px solid var(--line); }
.plh-wkrow:first-child { border-top: none; }
.plh-wkrow.is-now { background: color-mix(in srgb, var(--amber) 6%, transparent); }
.plh-wkhead { width: 150px; flex-shrink: 0; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-right: 1px solid var(--line); }
.plh-wknum { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.plh-wknum em { font-size: 9px; font-style: normal; font-weight: 700; color: #fff; background: var(--amber); padding: 1px 6px; border-radius: 99px; letter-spacing: .03em; }
.plh-wkdate { font-size: 11px; color: var(--text-3); }
.plh-wktot { font-size: 14px; font-weight: 600; color: var(--text); margin-top: 4px; font-variant-numeric: tabular-nums; }
.plh-wkitems { flex: 1; display: flex; flex-direction: column; padding: 7px 0; min-width: 0; }

.plh-item { display: flex; align-items: center; gap: 11px; padding: 7px 16px; background: none; border: none; cursor: pointer; text-align: left; width: 100%; min-width: 0; border-radius: 6px; }
.plh-item:hover { background: var(--bg-2); }
.plh-item--flat { cursor: default; }
.plh-item--flat:hover { background: none; }
.plh-item__bar { width: 4px; align-self: stretch; min-height: 26px; border-radius: 3px; flex-shrink: 0; }
.plh-soort { flex-shrink: 0; width: 40px; text-align: center; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; padding: 4px 0; border-radius: 5px; }
.plh-item__main { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.plh-item__main b { font-size: 12.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plh-item__main i { font-size: 11px; font-style: normal; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plh-item__pill { flex-shrink: 0; font-size: 10.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; }
.plh-item__amt { flex-shrink: 0; font-size: 13px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; min-width: 92px; text-align: right; }

@media (max-width: 920px) {
  .plh-wkhead { width: 116px; }
  :root { --plh-lane: 220px; }
}
/* smal scherm (h19): volledige bedragen op de cent passen door de opbouw te wijzigen, niet door af te ronden */
@media (max-width: 600px) {
  .plh-wkrow { flex-direction: column; }
  .plh-wkhead { width: auto; flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 10px; padding: 10px 14px; border-right: none; border-bottom: 1px solid var(--line); }
  .plh-wktot { margin-top: 0; margin-left: auto; }
  .plh-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 10px; row-gap: 4px; align-items: center; padding: 7px 12px; }
  .plh-item > :first-child { grid-column: 1; grid-row: 1 / span 2; }
  .plh-item > .plh-item__main { grid-column: 2 / -1; grid-row: 1; }
  .plh-item > :not(:first-child):not(.plh-item__main):not(.plh-item__amt) { grid-column: 2; grid-row: 2; justify-self: start; }
  .plh-item > .plh-item__amt { grid-column: 3; grid-row: 2; min-width: 0; }
  .plh-wb__x:nth-child(even) { visibility: hidden; }
  /* hoofdplanning: tijdas houdt een leesbare breedte en scrolt zelf horizontaal */
  .plh-gantt { overflow-x: auto; padding: 0 8px 6px; }
  .plh-gantt > * { min-width: 720px; }
  .plh-catrow { flex-wrap: wrap; row-gap: 2px; }
}
