/* ============================================================
   Van Dorp Bonaire Dashboard — app stylesheet
   Brand colours & font derived from the company house style.
   ============================================================ */

:root {
  --yellow: #ffd200;
  --navy:   #212f3c;
  --light:  #faf5e9;
  --white:  #ffffff;
  --grey:   #d0dce4;
  --red:    #e63727;
  --row-hover: #fdf0bb;

  --header-h: 78px;
  --maxw: 1600px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: 'Titillium Web', 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--navy);
  background: var(--light);
  min-height: 100vh;
  -webkit-user-select: none;
  user-select: none;
}

/* Tekst in de Hub is standaard niet selecteerbaar.
   Formuliervelden blijven wel selecteerbaar; gebruik .selectable
   om later specifieke tekst (bijv. voor kopiëren) wél te kunnen selecteren. */
input, textarea, select, [contenteditable="true"], .selectable {
  -webkit-user-select: text;
  user-select: text;
}

/* ---- Top header ---- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 4px solid var(--yellow);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}
.app-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.app-header__logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
  line-height: 1;
}
.app-header__logo svg {
  height: 44px;
  width: auto;
  display: block;
}
/* "Bonaire" line, top-left above the wordmark (matches the website) */
.logo-bonaire {
  display: block;
  color: var(--white);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: .74rem;
  font-weight: 400;
  letter-spacing: .25em;
  margin-bottom: 4px;
}
/* wordmark white on the navy header (triangle stays yellow, line red) */
.vandorp-logo__name,
.vandorp-logo__subtitle { fill: var(--white); }

.app-header__title {
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .04em;
  white-space: nowrap;
}
.app-header__title span { color: var(--yellow); }

/* ---- Top menu ---- */
.app-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}
.app-nav__link {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  padding: 8px 12px;
  border-radius: 4px;
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.app-nav__link:hover { color: var(--yellow); }
.app-nav__link.is-active {
  color: var(--navy);
  background: var(--yellow);
}

/* ---- Sub-navigatie (Beheer) ---- */
.subnav {
  background: var(--white);
  border-bottom: 1px solid var(--grey);
}
.subnav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
.subnav__link {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  padding: 12px 14px;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.subnav__link:hover { border-bottom-color: var(--grey); }
.subnav__link.is-active { border-bottom-color: var(--yellow); }

/* ---- Tegels (Beheer-overzicht) ---- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}
.tile {
  display: block;
  background: var(--white);
  border-top: 4px solid var(--yellow);
  border-radius: 4px;
  box-shadow: 0 1px 6px rgba(33, 47, 60, .08);
  padding: 20px;
  text-decoration: none;
  color: var(--navy);
  transition: transform .15s, box-shadow .15s;
}
.tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(33, 47, 60, .14);
}
.tile h3 { font-size: 1.1rem; margin-bottom: 4px; }
.tile h3 i { color: var(--navy); opacity: .45; margin-right: 8px; width: 20px; text-align: center; }
.tile p { font-size: .85rem; opacity: .6; margin: 0; max-width: none; }

/* ---- Main ---- */
.app-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px;
}

.card {
  background: var(--white);
  border-top: 4px solid var(--yellow);
  border-radius: 4px;
  box-shadow: 0 1px 6px rgba(33, 47, 60, .08);
  padding: 32px;
}
.card + .card { margin-top: 24px; }
.card h1 {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: .4em;
}
.card h1 span { color: var(--yellow); }
.card p { max-width: 680px; margin-bottom: 1em; }
.card p:last-child { margin-bottom: 0; }

.muted { color: var(--navy); opacity: .6; }

/* small status pill */
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 14px;
  background: var(--grey);
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 600;
}
.status__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--red);
}
.status.is-ok .status__dot { background: #2e9e5b; }

/* ---- Page heading ---- */
.page-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.page-title .title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--yellow);
  color: var(--navy);
  border-radius: 8px;
  font-size: 1.15rem;
  flex-shrink: 0;
}

/* ---- Dashboard ---- */
.dash-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.dash-account { display: flex; align-items: center; gap: 14px; }
.dash-account__info { display: flex; flex-direction: column; text-align: right; line-height: 1.3; }
.dash-account__name { font-weight: 700; font-size: 1.05rem; color: var(--navy); }
.dash-account__role { font-size: .85rem; color: var(--navy); opacity: .6; }
.dash-avatar {
  width: 106px;
  height: 106px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--yellow);
  flex-shrink: 0;
}
/* Eerste onderwerpen = volledige-breedte BANDEN (rijen); daaronder de rest in KOLOMMEN.
   In een band staan de sub-blokken naast elkaar → een lang blok verlengt alleen z'n
   eigen band, niet de andere onderwerpen. */
.dash-rows {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 28px;
}
.dash-rows .dash-section {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px 24px;
}
.dash-rows .dash-section__title { flex: 0 0 100%; margin-bottom: 0; }
.dash-rows .dash-block { flex: 1 1 240px; margin-bottom: 0; min-width: 0; }
/* De overige onderwerpen: klassieke kolom-grid. */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
/* Verbindingsstatus onderaan de pagina, links */
.dash-bottom { margin-top: 28px; display: flex; justify-content: flex-start; }
.dash-section {
  background: var(--white);
  border-top: 4px solid var(--yellow);
  border-radius: 4px;
  box-shadow: 0 1px 6px rgba(33, 47, 60, .08);
  padding: 22px;
}
.dash-section__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.dash-section__title i { color: var(--navy); opacity: .45; font-size: 1rem; }
.dash-section--soon { opacity: .7; }
.dash-block { margin-bottom: 18px; }
.dash-block:last-child { margin-bottom: 0; }
.dash-block h3 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  opacity: .55;
  margin-bottom: 8px;
}
.dash-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.dash-list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding: 9px 12px;
  background: var(--light);
  border-radius: 6px;
}
.dash-list__ref { font-weight: 700; min-width: 64px; }
.dash-list__oms { font-weight: 600; }
.dash-list__klant { opacity: .6; font-size: .9rem; }
.dash-list__when { margin-left: auto; font-size: .85rem; font-weight: 600; opacity: .65; }
.dash-list__info {
  flex-basis: 100%;
  font-size: .85rem;
  color: #b5600f;
  font-weight: 600;
}

/* Deadline-markering — offertes-lijst (tekst) + dashboard (pill) */
.off-deadline { font-variant-numeric: tabular-nums; }
.off-deadline--oranje { color: #b5600f; font-weight: 700; }
.off-deadline--rood { color: #b32519; font-weight: 700; }
.dash-deadline {
  margin-left: auto;
  align-self: center;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
  padding: 1px 9px;
  border-radius: 50px;
}
.dash-deadline--oranje { background: #fde0c6; color: #b5600f; }
.dash-deadline--rood { background: #f7dcd9; color: #b32519; }
.dash-chip {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 50px;
  background: var(--grey);
  color: var(--navy);
}
.dash-sep { opacity: .35; }

/* Actie-item (bijv. Uren-maand die ingediend moet worden) */
.dash-list__item--actie { background: #fdf3d0; }
.dash-list__item--actie .dash-list__oms { color: #7a5d00; }
.dash-list__item--actie .fa-triangle-exclamation { color: #b5600f; margin-right: 6px; }
.dash-link { margin-left: auto; font-size: .85rem; font-weight: 700; text-decoration: none; color: var(--navy); opacity: .8; }
.dash-link:hover { opacity: 1; color: var(--red); }

/* ---- Chips (bijv. projecten per medewerker) ---- */
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
  background: var(--light);
  border: 1px solid var(--grey);
  color: var(--navy);
}
.chip button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--red);
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}

/* Sectiekop boven een lijst (bijv. Medewerkers In/Uit dienst) */
.list-heading {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 26px 0 12px;
}

/* big date on the dashboard */
.today {
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: capitalize;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.today .vrij-badge { text-transform: none; }
.today-label {
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .55;
  margin-bottom: 4px;
}

/* ---- Month navigator (Uren) ---- */
.maand-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.maand-nav__btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--grey);
  background: var(--white);
  color: var(--navy);
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition: background .15s, border-color .15s;
}
.maand-nav__btn:hover:not(:disabled) {
  background: var(--yellow);
  border-color: var(--yellow);
}
.maand-nav__btn:disabled { opacity: .35; cursor: default; }

.maand-nav select {
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  color: var(--navy);
  padding: 8px 12px;
  border: 1px solid var(--grey);
  border-radius: 6px;
  background: var(--white);
  cursor: pointer;
}
.maand-nav__periode {
  margin-left: auto;
  font-size: 1.1rem;
  font-weight: 700;
}

/* ---- Workflows ---- */
.wf-intro { margin: -6px 0 18px; }
.wf-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 560px;
}
.wf-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
  color: var(--navy);
  padding: 15px 18px;
  border: 1px solid var(--grey);
  border-radius: 9px;
  background: var(--white);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .05s;
}
.wf-row:hover { border-color: var(--navy); box-shadow: 0 4px 14px rgba(33, 47, 60, .1); }
.wf-row:active { transform: translateY(1px); }
.wf-row__icon { width: 26px; text-align: center; font-size: 1.15rem; color: var(--red); flex-shrink: 0; }
.wf-row__label { flex: 1; font-weight: 700; }
.wf-row__tag {
  font-size: .72rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--light);
  border: 1px solid var(--grey);
  border-radius: 50px;
  padding: 2px 10px;
}
.wf-row__go { color: var(--navy); opacity: .35; flex-shrink: 0; }
.wf-row:hover .wf-row__go { opacity: .7; }
.wf-row.is-todo { opacity: .72; }
.wf-row.is-todo .wf-row__icon { color: var(--navy); opacity: .6; }
.wf-diagram {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 8px;
  min-height: 100%;
}
.wf-diagram svg { max-width: 100%; height: auto; }
.wf-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 12px 24px 4px;
  flex-shrink: 0;
}
.wf-legend__label { font-size: .82rem; font-weight: 700; color: var(--navy); opacity: .65; margin-right: 2px; }
.wf-note { padding: 4px 24px 0; font-size: .85rem; color: var(--navy); opacity: .72; flex-shrink: 0; }
.wf-note i { opacity: .55; margin-right: 5px; }
.wf-leeg {
  margin: auto;
  text-align: center;
  color: var(--navy);
  padding: 40px 20px;
}
.wf-leeg i { font-size: 2.4rem; opacity: .3; margin-bottom: 14px; }
.wf-leeg p { margin: 4px 0; }

/* Print: alléén het open workflow-venster (via de Print-knop in het venster) */
@media print {
  @page { margin: 12mm; }
  body > *:not(#wf-dialog) { display: none !important; }
  dialog#wf-dialog {
    position: static !important;
    display: block !important;
    inset: auto !important;
    margin: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    box-shadow: none !important;
    border: none !important;
    color: #212f3c;
  }
  dialog#wf-dialog::backdrop { display: none !important; }
  #wf-dialog .modal__box { height: auto !important; }
  #wf-dialog .modal__body { overflow: visible !important; min-height: 0 !important; }
  #wf-dialog .modal__actions { display: none !important; }
  #wf-dialog .wf-diagram { min-height: 0 !important; display: block !important; padding: 0 !important; }
  #wf-dialog .wf-diagram svg { max-width: 100% !important; height: auto !important; }
  #wf-dialog .wf-note, #wf-dialog .wf-legend { break-inside: avoid; }
}

/* ---- Buttons (generiek) ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.2;
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--navy); color: var(--white); }
.btn--primary:hover { background: #1a2530; }
.btn--accent { background: var(--yellow); color: var(--navy); }
.btn--accent:hover { background: #e6bd00; }
.btn--ghost { background: var(--white); color: var(--navy); border-color: var(--grey); }
.btn--ghost:hover { border-color: var(--navy); }
.btn--danger { background: var(--red); color: var(--white); }
.btn--danger:hover { background: #c52d1f; }
.btn--icon { padding: 7px 10px; font-size: .9rem; gap: 0; }

/* ---- Toolbar ---- */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.toolbar__title { font-size: .95rem; font-weight: 600; opacity: .6; }
.toolbar__right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.check-inline input { width: auto; cursor: pointer; }

/* ---- Data table ---- */
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(33, 47, 60, .08);
}
.data-table thead th {
  text-align: left;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--navy);
  background: var(--grey);
  padding: 12px 16px;
  white-space: nowrap;
}
.data-table th.sortable { cursor: pointer; }
.data-table th.sortable:hover { color: #000; }
.data-table th .sort-ic { margin-left: 6px; font-size: .72em; opacity: .35; }
.data-table th.is-sorted .sort-ic { opacity: .9; }
.data-table tbody td {
  padding: 11px 16px;
  border-top: 1px solid var(--grey);
  font-size: .95rem;
  vertical-align: middle;
}
.data-table tbody tr { cursor: default; }
.data-table tbody tr:hover { background: var(--row-hover); }
.data-table tr.is-inactive td { opacity: .55; }
.data-table .col-actions { text-align: right; white-space: nowrap; }
.data-table .row-actions { display: inline-flex; gap: 6px; }
.data-table tfoot td {
  padding: 12px 16px;
  border-top: 2px solid var(--navy);
  font-weight: 600;
  background: var(--light);
}

/* ---- Badge ---- */
.badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 50px;
  background: var(--navy);
  color: var(--white);
  vertical-align: middle;
}
.badge--muted { background: var(--grey); color: var(--navy); }

/* ---- Modal (native <dialog>) ---- */
dialog.modal {
  position: fixed;
  inset: 0;
  margin: auto;
  height: fit-content;
  max-height: calc(100vh - 40px);
  border: none;
  padding: 0;
  border-radius: 10px;
  max-width: 520px;
  width: calc(100% - 32px);
  color: var(--navy);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  overflow: auto;
}
dialog.modal::backdrop { background: rgba(33, 47, 60, .55); }
.modal__box { display: flex; flex-direction: column; }
.modal__title { font-size: 1.25rem; font-weight: 700; padding: 22px 24px 0; }
.modal__body { padding: 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.modal__body p { margin: 0; }
.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px;
}

/* ---- Form fields (generiek) ---- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: .85rem; font-weight: 600; }
.field__hint { font-weight: 400; opacity: .55; }
.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: .95rem;
  color: var(--navy);
  padding: 9px 12px;
  border: 1px solid var(--grey);
  border-radius: 6px;
  background: var(--white);
  width: 100%;
}
.field textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); }

/* Type-cel (Contacten: Bedrijf / Persoon) */
.type-cell i { margin-right: 7px; opacity: .55; width: 14px; text-align: center; }

/* Notitie-preview in een lijst (afgekapt met …) */
.data-table td.cell-note {
  max-width: 460px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: .8;
}

/* ---- Status-badges ---- */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: .76rem;
  font-weight: 700;
  white-space: nowrap;
}
.st-aangemaakt { background: #e1ecf7; color: #1d5a96; }
.st-offerte    { background: #ece3f7; color: #6a44a8; }
.st-uitvoering { background: #fbeaa6; color: #7a5d00; }
.st-onhold     { background: #fde0c6; color: #b5600f; }
.st-afgerond   { background: #d3eedd; color: #1f7a45; }
.st-afgewezen  { background: #f7dcd9; color: #b32519; }
.st-onbekend   { background: #e4e9ed; color: #5a6b78; }

/* ---- Filterbalk ---- */
.filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.filterbar select {
  font-family: inherit;
  font-size: .92rem;
  font-weight: 600;
  color: var(--navy);
  padding: 8px 12px;
  border: 1px solid var(--grey);
  border-radius: 6px;
  background: var(--white);
  cursor: pointer;
}

/* ---- Lookup-veld (Klant / Locatie) ---- */
.btn--sm { padding: 6px 11px; font-size: .9rem; }
.lookup { display: flex; align-items: stretch; gap: 8px; }
.lookup__value {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid var(--grey);
  border-radius: 6px;
  background: var(--white);
  font-size: .95rem;
  min-height: 40px;
}
.lookup__value.is-empty { color: var(--navy); opacity: .5; }

/* ---- Wide modal + scheiding ---- */
dialog.modal--wide { max-width: 600px; }

/* Groot, scrollbaar workflow-venster: zo min mogelijk scrollen. */
dialog.modal--wf {
  width: min(1040px, calc(100% - 32px));
  max-width: none;
  height: calc(100vh - 40px);
  max-height: calc(100vh - 40px);
  overflow: hidden;
}
dialog.modal--wf .modal__box { height: 100%; }
dialog.modal--wf .modal__body { flex: 1; min-height: 0; overflow: auto; }

/* Bestand-viewer (bonnetje-foto/PDF) in een popup */
dialog.modal--viewer {
  width: min(900px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.viewer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 10px 16px;
  border-bottom: 1px solid var(--grey);
  flex-shrink: 0;
}
.viewer__naam { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer__close {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1.15rem;
  color: var(--navy);
  padding: 4px 9px;
  border-radius: 6px;
  flex-shrink: 0;
}
.viewer__close:hover { background: var(--light); }
.viewer__body {
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: #f4f2ec;
  min-height: 0;
}
.viewer__body img { max-width: 100%; height: auto; display: block; }
.viewer__body iframe { width: 100%; height: 78vh; border: 0; background: #fff; }
.modal__sep { border: none; border-top: 1px solid var(--grey); margin: 4px 0; }

/* ---- Statushistorie (in venster) ---- */
.hist-block { font-size: .9rem; }
.hist-block summary { cursor: pointer; font-weight: 600; }
.hist-lijst { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.hist-rij { display: flex; align-items: center; gap: 10px; }
.hist-datum { font-variant-numeric: tabular-nums; opacity: .7; min-width: 128px; }
.hist-info { opacity: .8; }

/* ---- Picker-popup ---- */
.picker__hint {
  font-size: .85rem;
  background: var(--light);
  border-radius: 6px;
  padding: 8px 12px;
}
.picker__search {
  width: 100%;
  font-family: inherit;
  font-size: .95rem;
  color: var(--navy);
  padding: 10px 12px;
  border: 1px solid var(--grey);
  border-radius: 6px;
  background: var(--white);
}
.picker__search:focus { outline: none; border-color: var(--navy); }
.picker__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
}
.picker__toggle input { width: auto; }
.picker__list {
  list-style: none;
  margin: 0;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  border: 1px solid var(--grey);
  border-radius: 6px;
}

/* Picker-popup houdt vaste afmetingen; alleen de lijst scrollt,
   de Annuleren-knop blijft onderaan. */
dialog.modal--picker {
  width: 460px;
  height: 600px;
  max-width: calc(100% - 32px);
  max-height: calc(100vh - 40px);
  overflow: hidden;
}
dialog.modal--picker .modal__box { height: 100%; }
dialog.modal--picker .modal__body { flex: 1; min-height: 0; }
.picker__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 7px 14px;
  font-size: .88rem;
  cursor: pointer;
  border-bottom: 1px solid var(--grey);
}
.picker__item:last-child { border-bottom: none; }
.picker__item:hover { background: var(--row-hover); }
.picker__label { font-weight: 600; }
.picker__sub { font-size: .8rem; opacity: .6; }
.picker__leeg { padding: 14px; text-align: center; opacity: .6; }
.field-row { display: flex; gap: 14px; }
.field-row .field { flex: 1; }
.field__suffix {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--grey);
  border-radius: 6px;
  overflow: hidden;
}
.field__suffix input { border: none; border-radius: 0; }
.field__suffix span {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--light);
  color: var(--navy);
  opacity: .65;
  font-size: .9rem;
  white-space: nowrap;
}
.field-error { color: var(--red); font-size: .85rem; font-weight: 600; margin: 0; }

/* Snelknoppen onder een pauze-veld (vul 0:30 / 1:00) */
.pauze-snelrij { display: flex; gap: 6px; margin-top: 5px; }
.pauze-snel {
  border: 1px solid var(--grey); background: var(--white); color: var(--navy);
  font: inherit; font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 6px; cursor: pointer;
}
.pauze-snel:hover { background: var(--light); border-color: var(--navy); }

/* ---- Uren: view-schakelaar + dagfilter ---- */
/* Weergave-tabs + filter op één rij */
.ur-topbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px 20px;
  margin-bottom: 18px;
}
.ur-topbar .viewswitch { margin-bottom: 0; }
.ur-topbar .ur-filterbar { margin: 0; }

.viewswitch {
  display: inline-flex;
  border: 1px solid var(--grey);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}
.viewswitch button {
  font-family: inherit;
  font-weight: 600;
  font-size: .95rem;
  padding: 9px 22px;
  border: none;
  border-right: 1px solid var(--grey);
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.viewswitch button:last-child { border-right: none; }
.viewswitch button.is-active { background: var(--navy); color: var(--white); }

.ur-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.ur-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.ur-filter select {
  font-family: inherit;
  font-size: .92rem;
  font-weight: 600;
  color: var(--navy);
  padding: 8px 12px;
  border: 1px solid var(--grey);
  border-radius: 6px;
  background: var(--white);
  cursor: pointer;
}
.daglabel {
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  text-transform: capitalize;
  white-space: nowrap;
  flex-shrink: 0;
}
/* Vaste breedte per weergave = navigator verspringt nooit, en per view afgestemd
   zodat korte labels niet in te veel witruimte zweven. */
#ur-maand-label { width: 130px; }   /* langste: "September 2026" ≈ 121px */
#ur-week-label  { width: 168px; }   /* langste: "20 dec – 26 dec 2026" ≈ 158px */
#ur-dag-label   { width: 235px; }   /* langste: "donderdag 26 september 2026" ≈ 226px */
.vrij-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fbeaa6;
  color: #7a5d00;
  font-weight: 700;
  font-size: .85rem;
  white-space: nowrap;
}
.vrij-badge i { color: #b5600f; }
.vrij-badge[hidden] { display: none; }
.ur-tijd { font-variant-numeric: tabular-nums; }
.ur-werkuren { font-weight: 700; font-size: 1.15rem; }
#ur-dag-lijst .data-table td.cell-note { max-width: 240px; }

/* Klein statusicoon achter de naam: rood = ziek, blauw = met vakantie */
.naam-ic { margin-left: 6px; font-size: .9rem; }
.naam-ic--ziek { color: var(--red); }
.naam-ic--vakantie { color: #2b6cb0; }

/* ---- Nederlandse datumkiezer ---- */
.datepicker { position: relative; display: flex; align-items: stretch; }
.datepicker .datefield { flex: 1; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.datepicker .datefield.is-invalid { border-color: var(--red); }
.datepicker__btn {
  flex: 0 0 auto;
  width: 42px;
  border: 1px solid var(--grey);
  border-left: none;
  border-radius: 0 8px 8px 0;
  background: var(--light);
  color: var(--navy);
  cursor: pointer;
}
.datepicker__btn:hover { background: var(--grey); }
.datepicker__pop {
  position: fixed;
  z-index: 1000;
  width: 280px;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--grey);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(33, 47, 60, .18);
}
.dp-kop { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dp-titel { font-weight: 700; color: var(--navy); text-transform: capitalize; }
.dp-nav {
  width: 30px; height: 30px;
  border: none; border-radius: 7px;
  background: var(--light); color: var(--navy);
  font-size: 1.2rem; line-height: 1; cursor: pointer;
}
.dp-nav:hover { background: var(--grey); }
.dp-weekdagen, .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-weekdagen span { text-align: center; font-size: .72rem; font-weight: 700; color: #7a8894; padding: 4px 0; }
.dp-dag {
  aspect-ratio: 1 / 1;
  border: none; border-radius: 7px;
  background: transparent; color: var(--navy);
  font-size: .9rem; cursor: pointer;
}
.dp-dag:hover { background: var(--row-hover); }
.dp-dag.is-vandaag { box-shadow: inset 0 0 0 1px var(--navy); }
.dp-dag.is-gekozen { background: var(--yellow); font-weight: 700; }
.dp-leeg { aspect-ratio: 1 / 1; }
.dp-voet { display: flex; justify-content: space-between; margin-top: 10px; }
.dp-voet button {
  border: none; background: none; cursor: pointer;
  font-size: .85rem; font-weight: 600; color: var(--navy);
  padding: 4px 6px; border-radius: 6px;
}
.dp-voet button:hover { background: var(--light); }
.dp-vandaag { color: #1d5a96 !important; }

/* Statusicoontjes bij Dashboard-koppen (zelfde als in Uren) */
.ic-ziek { color: var(--red); }
.ic-vakantie { color: #2b6cb0; }

/* Snelkiezer-kalender in de dag-navigator (Uren): alleen de knop tonen */
.ur-datumkiezer .datefield { display: none; }
.ur-datumkiezer .datepicker__btn {
  width: 38px; height: 38px;
  border: 1px solid var(--grey);
  border-radius: 6px;
  background: var(--white);
  font-size: 1rem;
}
.ur-datumkiezer .datepicker__btn:hover { background: var(--yellow); border-color: var(--yellow); }

/* ---- Uren: weekweergave ---- */
.ur-filterbar { margin: 4px 0 18px; }

.ur-week-tabel { width: 100%; border-collapse: collapse; font-size: .9rem; table-layout: fixed; min-width: 780px; }
.ur-week-tabel th, .ur-week-tabel td { padding: 9px 6px; text-align: center; border-bottom: 1px solid var(--grey); }
.ur-week-tabel thead th { border-bottom: 2px solid var(--navy); font-size: .8rem; text-transform: uppercase; letter-spacing: .02em; }
.ur-week-tabel th.ur-wk-naam, .ur-week-tabel td.ur-wk-naam { text-align: left; white-space: nowrap; }
.ur-week-tabel th.ur-wk-tot, .ur-week-tabel td.ur-wk-tot { text-align: right; padding-right: 12px; }
.ur-wk-dag-num { display: block; font-size: .72rem; color: #7a8894; font-weight: 400; }
.ur-week-tabel .ur-wk-vrij { background: #fdf6e3; }
.ur-week-tabel thead th.ur-wk-vrij { color: #7a5d00; }
.ur-wk-cel { cursor: pointer; }
.ur-wk-cel:hover { background: var(--row-hover); }
.ur-wk-werk { font-weight: 700; font-variant-numeric: tabular-nums; }
.ur-wk-over { display: block; font-size: .72rem; font-weight: 700; color: #b5600f; font-variant-numeric: tabular-nums; }
/* Overuren in de dagweergave: zelfde impact als in de week (amber, vet) */
.ur-over { color: #b5600f; font-weight: 700; }
.ur-wk-leeg { color: #c2ccd4; }
/* dagen buiten de getoonde maand: alleen als placeholder */
.ur-week-tabel .ur-wk-buiten { background: repeating-linear-gradient(135deg, #f4f6f8, #f4f6f8 6px, #eef1f4 6px, #eef1f4 12px); cursor: default; }
.ur-week-tabel thead th.ur-wk-buiten { background: #f4f6f8; color: #b8c2cb; font-weight: 400; }
.ur-week-tabel thead th.ur-wk-buiten .ur-wk-dag-num { color: #b8c2cb; }
.ur-week-tabel tfoot td { border-top: 2px solid var(--navy); border-bottom: none; font-weight: 700; }

/* Legenda onder de tabel (buiten de witte kaart) — dag én week */
.ur-legenda-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  align-items: center;
  margin-top: 14px;
  padding: 0 4px;
  font-size: .82rem;
  color: var(--navy);
}
.ur-legenda-bar span { display: inline-flex; align-items: center; gap: 7px; }
.ur-lg-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; background: #fdf6e3; border: 1px solid #e6d9a8; }
.ur-lg-swatch--over { background: #f0b64a; border-color: #d59a2e; }
.ur-lg-wv { color: #b5600f; font-weight: 700; }

/* interval-blok in de week-popup */
.ur-blok { position: relative; border: 1px solid var(--grey); border-radius: 10px; padding: 20px 16px 16px; margin-bottom: 12px; background: var(--light); display: flex; flex-direction: column; gap: 14px; }
.ur-blok__del { position: absolute; top: 5px; right: 5px; }
.ur-edit-samenvatting { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--grey); }
.ur-edit-pauze-veld { max-width: 200px; margin: 0; }
.ur-edit-totalen { display: flex; gap: 30px; }
.ur-edit-totalen > div { display: flex; flex-direction: column; gap: 2px; }
.ur-edit-totalen .muted { font-size: .8rem; }
.ur-edit-totalen strong { font-size: 1.2rem; }
#ur-dag-lijst tbody tr { cursor: pointer; }
.tijdveld { font-variant-numeric: tabular-nums; max-width: 130px; }
.tijdveld.is-invalid { border-color: var(--red); }

/* ---- Uren: maandstatus ---- */
.ur-maand-status {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding: 12px 16px;
  background: var(--white); border: 1px solid var(--grey); border-radius: 12px;
}
.ur-ms-links { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ur-ms-hint { font-size: .8rem; color: #b5600f; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.ur-ms-hint[hidden] { display: none; }
.ur-ms-rechts { display: flex; align-items: center; gap: 10px; }
#ur-indienen:disabled { opacity: .45; cursor: not-allowed; }
.ur-akkoord-btn { background: none; border: none; cursor: pointer; font-size: 1.3rem; line-height: 1; padding: 2px 4px; color: #c9d3db; }
.ur-akkoord-btn:hover { color: #a7b4bf; }
.ur-akkoord-btn.is-ok { color: #1f7a45; }
.ur-akkoord-btn.is-ok:hover { color: #1a6b3c; }
.ur-week-tabel th.ur-mnd-akk, .ur-week-tabel td.ur-mnd-akk { width: 104px; }
.ur-akk-cel { display: flex; align-items: center; justify-content: center; gap: 2px; }
.ur-notitie-btn { background: none; border: none; cursor: pointer; font-size: 1rem; line-height: 1; padding: 2px 4px; color: #c9d3db; }
.ur-notitie-btn:hover { color: #a7b4bf; }
.ur-notitie-btn.has-note { color: #d99a00; }   /* geel = er staat een notitie */
.ur-notitie-btn.has-note:hover { color: #b98400; }
/* statusgeschiedenis */
.ur-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ur-hist li { padding-bottom: 12px; border-bottom: 1px solid var(--grey); }
.ur-hist li:last-child { border-bottom: none; padding-bottom: 0; }
.ur-hist-info { margin-top: 6px; font-size: .9rem; white-space: pre-wrap; }

/* ---- Instellingen: reset demodata ---- */
.reset-status { margin: 16px 0 0; color: #2e7d32; font-weight: 600; }
.reset-status i { margin-right: 6px; }
/* intervallen van dezelfde medewerker aan elkaar koppelen */
.data-table tbody tr.ur-rij:not(.ur-groep-start) td { border-top: none; }

/* ---- Footer ---- */
.app-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px;
  font-size: .85rem;
  color: var(--navy);
  opacity: .7;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ============================================================
   Bonnetjes (kassabonnen / facturen)
   ============================================================ */

/* Type-badges (delen de vorm van .status-badge) */
.bon-type--materialen { background: #e1ecf7; color: #1d5a96; }
.bon-type--benzine    { background: #fde0c6; color: #b5600f; }
.bon-type--eten       { background: #d3eedd; color: #1f7a45; }
.bon-type--anders     { background: #e4e9ed; color: #5a6b78; }

/* Betaal-status */
.bon-pay--open  { background: #fbeaa6; color: #7a5d00; }
.bon-pay--paid  { background: #d3eedd; color: #1f7a45; }

/* Verwerkings-status */
.bon-st--todo { background: #fde0c6; color: #b5600f; }
.bon-st--done { background: #e4e9ed; color: #5a6b78; }

.bon-telling { margin: 0 0 14px; }
.bon-bedrag-cel { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Miniatuur van het bonnetje in de lijst */
.data-table .col-bon { text-align: center; width: 52px; }
.bon-thumb {
  width: 38px; height: 38px;
  object-fit: cover;
  border: 1px solid var(--grey);
  border-radius: 5px;
  cursor: pointer;
  vertical-align: middle;
  background: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bon-thumb:hover { border-color: var(--navy); }
.bon-thumb--pdf  { color: #b32519; font-size: 1.1rem; }
.bon-thumb--leeg { color: var(--navy); opacity: .35; cursor: default; }

/* Upload-veld in het bewerk-venster */
.bon-upload {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px dashed var(--grey);
  border-radius: 8px;
  background: var(--light);
}
.bon-upload__preview {
  width: 84px; height: 108px;
  flex: 0 0 auto;
  border: 1px solid var(--grey);
  border-radius: 6px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}
.bon-upload__preview img { width: 100%; height: 100%; object-fit: contain; }
.bon-upload__leeg { font-size: .75rem; color: var(--navy); opacity: .45; padding: 6px; }
.bon-upload__pdf { font-size: .8rem; color: #b32519; padding: 6px; word-break: break-word; }
.bon-upload__acties { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.bon-upload label.btn { cursor: pointer; }
/* .btn zet display, dus het hidden-attribuut moet expliciet winnen */
.bon-upload__acties .btn[hidden] { display: none; }

/* Bedrag met $-teken */
.bon-bedrag { display: flex; align-items: stretch; }
.bon-bedrag__munt {
  display: flex; align-items: center;
  padding: 0 12px;
  border: 1px solid var(--grey);
  border-right: none;
  border-radius: 6px 0 0 6px;
  background: var(--light);
  font-weight: 700;
  color: var(--navy);
}
.bon-bedrag input { border-radius: 0 6px 6px 0 !important; text-align: right; }

/* Checkbox-labels (Verwerkt / Betaald) */
.bon-check {
  display: flex; align-items: center; gap: 8px;
  font-size: .92rem; font-weight: 600;
  cursor: pointer;
  flex: 1;
}
.bon-check input { width: auto; accent-color: var(--navy); }
.bon-check .field__hint { font-weight: 400; }
.bon-betaal {
  border-left: 3px solid var(--yellow);
  padding-left: 14px;
  margin-top: 2px;
}

/* ============================================================
   Materialen
   ============================================================ */

/* Status-badges (levensfase van bestellen tot op locatie) */
.mat-st--proforma    { background: #f6dcea; color: #9c2c69; }
.mat-st--tebestellen { background: #f7dcd9; color: #b32519; }
.mat-st--besteld     { background: #e1ecf7; color: #1d5a96; }
.mat-st--onderweg    { background: #fbeaa6; color: #7a5d00; }
.mat-st--carrier     { background: #fde0c6; color: #b5600f; }
.mat-st--douane      { background: #ece3f7; color: #6a44a8; }
.mat-st--ophalen     { background: #cdeef0; color: #0f6b73; }
.mat-st--oplocatie   { background: #d3eedd; color: #1f7a45; }
.mat-st--onbekend    { background: #e4e9ed; color: #5a6b78; }

.mat-aantal-cel { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Verbruiksbalk (Gebruikt %) */
.mat-gebruikt { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.mat-bar {
  display: inline-block;
  width: 54px; height: 7px;
  background: var(--grey);
  border-radius: 4px;
  overflow: hidden;
}
.mat-bar > span { display: block; height: 100%; background: var(--navy); border-radius: 4px; }
.mat-bar-tekst { font-size: .8rem; font-variant-numeric: tabular-nums; opacity: .75; min-width: 30px; }

/* ============================================================
   Uren — Excel-achtige rasterweergave (xlg)
   Volledig scherm, eigen look & feel (MS Excel) voor herkenbaarheid.
   ============================================================ */
body.xlg-open { overflow: hidden; }

.xlg {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; flex-direction: column;
  background: #fff;
  font-family: "Segoe UI", Calibri, system-ui, -apple-system, sans-serif;
  color: #333;
}
/* .xlg zet display:flex; het hidden-attribuut moet dat expliciet overrulen */
.xlg[hidden] { display: none; }

/* Bovenbalk (Excel-groen lint) */
.xlg__bar--top {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px;
  padding: 8px 14px;
  background: #217346; color: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.xlg__title { font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.xlg__maand {   /* vaste breedte → ‹ › blijven op hun plek; één regel + ellipsis */
  font-weight: 400; opacity: .9;
  display: inline-block; width: 130px; flex-shrink: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xlg__nav { display: flex; align-items: center; gap: 4px; }
.xlg__navbtn {
  width: 28px; height: 28px; border: none; border-radius: 4px; cursor: pointer;
  background: rgba(255,255,255,.15); color: #fff; font-size: 1.1rem; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.xlg__navbtn:hover { background: rgba(255,255,255,.3); }
.xlg__navbtn--sep { margin-left: 8px; }   /* alles in-/uitklappen iets losser van de maand-navigatie */
.xlg__filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.xlg__seg { display: flex; gap: 2px; background: rgba(255,255,255,.15); border-radius: 5px; padding: 2px; }
.xlg__seg label {
  font-size: .82rem; padding: 3px 9px; border-radius: 4px; cursor: pointer;
  display: flex; align-items: center; gap: 5px;
}
.xlg__seg input { accent-color: #fff; }
.xlg__filters select {
  font-family: inherit; font-size: .85rem; padding: 5px 9px;
  border: 1px solid #1a5c38; border-radius: 4px; background: #fff; color: #333; cursor: pointer;
  max-width: 200px;
}
.xlg__acties { display: flex; gap: 6px; margin-left: auto; }
.xlg__btn {
  font-family: inherit; font-size: .84rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 4px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.12); color: #fff;
}
.xlg__btn:hover:not(:disabled) { background: rgba(255,255,255,.25); }
.xlg__btn:disabled { opacity: .45; cursor: default; }
.xlg__btn--icon { padding: 7px 10px; font-size: .98rem; }   /* alleen-icoon = compacter/vierkanter */

/* Scrollgebied met het raster */
.xlg__scroll { flex: 1; overflow: auto; background: #fff; }

/* Het raster zelf — gridlines, vaste kolombreedtes, horizontale scroll */
.xlg-grid {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;          /* nodig: fixed layout valt terug op auto zonder definitieve breedte */
  min-width: 1520px;    /* daaronder horizontaal scrollen; kolommen blijven leesbaar */
  font-size: .85rem;
}
.xlg-grid th, .xlg-grid td {
  border: 1px solid #d4d4d4;
  padding: 0; height: 30px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.xlg-grid thead th {
  position: sticky; top: 0; z-index: 3;
  background: #f3f2f1; color: #444; font-weight: 700;
  padding: 5px 8px; text-align: left; white-space: nowrap;
  box-shadow: inset 0 -1px 0 #b9b9b9;
}
.xlg-grid td { padding: 0 8px; background: #fff; }
.xlg-grid td.xlg-calc, .xlg-grid td.xlg-tijd-cell, .xlg-grid th.xlg-th-num { text-align: right; font-variant-numeric: tabular-nums; }
/* Zebra-strepen (wit / lichtgrijs), ook op de bevroren kolommen */
.xlg-grid tbody tr.xlg-alt td { background: #f6f6f6; }
.xlg-grid tbody tr.xlg-row:hover td { background: #eef6f0; }
.xlg-grid tbody tr.xlg-row.is-sel td { background: #217346 !important; color: #fff; }   /* Excel-groen = geselecteerd */
.xlg-grid tbody tr.xlg-row.is-sel .xlg-klant { color: #eafaf0; }
.xlg-row.xlg-vrij td.xlg-calc { color: #b5600f; }

/* Rijnummer-gutter (Excel-stijl), bevroren links */
.xlg-gut {
  position: sticky; left: 0; z-index: 2;
  width: 44px; min-width: 44px;
  background: #f3f2f1 !important; color: #888; text-align: center; font-size: .78rem;
}
thead .xlg-gut { z-index: 4; }

/* Bevroren kolommen: Datum (1e) + Medewerker (2e) */
.xlg-frz-datum { position: sticky; left: 44px; z-index: 2; }
.xlg-frz-mw {
  position: sticky; left: 140px; z-index: 2;
  font-weight: 600;
  box-shadow: inset -1px 0 0 #b9b9b9;   /* scheidingslijn met scrollend gebied */
}
thead .xlg-frz-datum, thead .xlg-frz-mw { z-index: 4; background: #f3f2f1 !important; }

/* Lookup-cellen (klik → picker) */
.xlg-lookup { cursor: pointer; }
.xlg-caret { float: right; opacity: .4; margin-top: 8px; font-size: .7rem; }
.xlg-ell { display: inline-block; max-width: calc(100% - 14px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }

/* Tekstblok-cel (Werkzaamheden): ellipsis + klik → dialoog, hover = tooltip */
.xlg-tekstblok { cursor: pointer; }
.xlg-tekstblok .xlg-ell { max-width: 100%; }
.xlg-klant { color: #555; }

/* Inline invoer (tijd + tekst) — celvullend, randloos */
.xlg-inp {
  border: 0; background: transparent; width: 100%; height: 28px;
  font: inherit; color: inherit; padding: 0 8px; box-sizing: border-box;
}
.xlg-tijd-cell .xlg-inp { text-align: right; }
.xlg-inp:focus { outline: 2px solid #217346; outline-offset: -2px; background: #fff; }
.xlg-inp.is-invalid { outline: 2px solid var(--red); background: #fff; }

/* Kolombreedtes (volgorde: Datum · Medewerker · Ref.Nr · Klant · Opdracht · Locatie · Werkzaamheden · …) */
.xlg-col-datum { width: 96px; } .xlg-col-mw { width: 150px; }
.xlg-col-ref { width: 84px; } .xlg-col-klant { width: 150px; } .xlg-col-opd { width: 210px; }
.xlg-col-loc { width: 90px; } .xlg-col-werk { width: 240px; }
.xlg-col-van, .xlg-col-tot, .xlg-col-pauze { width: 70px; }
.xlg-col-uren, .xlg-col-over { width: 80px; }

/* Statusbalk (footer) */
.xlg__bar--status {
  display: flex; align-items: center; gap: 26px;
  padding: 6px 16px;
  background: #f3f2f1; border-top: 1px solid #c9c9c9;
  font-size: .82rem; color: #444;
}
.xlg-stat { display: flex; align-items: baseline; gap: 7px; }
.xlg-stat__l { text-transform: uppercase; letter-spacing: .03em; font-size: .72rem; opacity: .6; }
.xlg-stat__v { font-weight: 700; font-variant-numeric: tabular-nums; }
.xlg-stat__over { color: #b5600f; }
.xlg-stat--right { margin-left: auto; }
.xlg-flash { color: #217346; font-weight: 700; }
.xlg-leeg { padding: 40px; text-align: center; color: #999; }

/* ---- Gegroepeerde weergave (op datum) ---- */
.xlg-grid--grouped { min-width: 1200px; }
.xlg-col-spacer { width: 18px; }   /* lege 'Excel'-kolom zodat de scrollbalk de data niet overlapt */
.xlg-mw { font-weight: 600; }
.xlg-tijd { text-align: right; font-variant-numeric: tabular-nums; }
.xlg-grid .xlg-werk { font-weight: 700; }

/* Datum-kopregel */
.xlg-daterow > td { border: 1px solid #d4d4d4; }
.xlg-grid .xlg-date-head {
  background: #eef1f4;
  padding: 5px 8px !important;   /* rechts 8px = zelfde als de Werkuren-cel, zodat de + eronder uitlijnt */
  white-space: nowrap;
}
.xlg-grid .xlg-daterow.xlg-weekend .xlg-date-head { background: #fbeede; }   /* weekend/feestdag = eigen kleur */
.xlg-date-inner { display: flex; align-items: center; gap: 4px; }
.xlg-collapse {
  border: none; background: transparent; cursor: pointer;
  width: 22px; height: 22px; color: #555; font-size: .8rem; margin-right: 4px;
}
.xlg-collapse:hover { color: #217346; }
.xlg-date-label { font-weight: 700; color: #333; }
.xlg-date-badge { margin-left: 10px; font-size: .78rem; color: #b5600f; font-weight: 600; }
.xlg-date-count { margin-left: 10px; font-size: .78rem; color: #777; }
.xlg-date-leeg { margin-left: 10px; font-size: .78rem; color: #aaa; font-style: italic; }
.xlg-addday {
  margin-left: auto; margin-right: 0; border: 1px solid #cdd6dd; background: #fff; color: #217346;
  font: inherit; font-size: .78rem; font-weight: 600; padding: 2px 9px; border-radius: 4px; cursor: pointer;
  flex: 0 0 auto;
}
.xlg-addday:hover { background: #eafaf0; border-color: #217346; }

/* Nieuw/bewerkt-indicatie: kleurstreep op de rijnummer-cel */
.xlg-row.xlg-nieuw .xlg-gut  { box-shadow: inset 3px 0 0 #217346; }
.xlg-row.xlg-bewerkt .xlg-gut { box-shadow: inset 3px 0 0 #d9822b; }

/* Interval-dialoog */
.ur-int-calc { margin-top: 4px; font-size: .95rem; }
.ur-int-calc strong { font-variant-numeric: tabular-nums; }
input.datefield.is-readonly { background: var(--light); color: var(--navy); opacity: .8; cursor: default; }

/* ---- Dashboard: Links (bullet-lijst, titel = link naar nieuw venster) ---- */
.dash-links { list-style: disc; padding-left: 20px; margin: 2px 0; display: flex; flex-direction: column; gap: 9px; }
.dash-links li { color: var(--navy); }
.dash-links a { color: var(--navy); font-weight: 600; text-decoration: none; }
.dash-links a:hover { color: var(--red); text-decoration: underline; }
.dash-links a i { font-size: .72em; opacity: .5; margin-left: 5px; }

/* ---- Responsive ---- */
@media (max-width: 700px) {
  .app-header__title { display: none; }
  .app-main { padding: 24px 16px; }
  .card { padding: 22px; }
  .card h1 { font-size: 1.5rem; }
  .bon-upload { flex-direction: column; align-items: flex-start; }
  .xlg__acties { margin-left: 0; }
}
