:root {
  --color-primary-dark: #14324b;
  --color-primary-medium: #1f5e7a;
  --color-primary-light: #d7e8f2;
  --color-accent-blue: #2d7ff0;
  --color-light-blue: #8bb5cf;
  --color-very-light-blue: #edf5fb;
  --color-accent: #0f8c82;
  --color-success: #1f8f5f;
  --color-warning: #c97a1b;
  --color-danger: #c14953;
  --color-info: #0b79a8;
  --color-page-bg: #eef3f8;
  --color-bg-light: #f6f9fc;
  --color-surface: #ffffff;
  --color-surface-muted: #f3f7fb;
  --color-surface-subtle: #f9fbfd;
  --color-surface-hover: #edf3f8;
  --color-surface-inverse: #102235;
  --color-text-dark: #132033;
  --color-text-primary: #21344b;
  --color-text-secondary: #64758b;
  --color-text-muted: #8795a7;
  --color-text-on-dark: #f7fbff;
  --color-border: #d7e1ea;
  --color-border-strong: #bccad8;
  --color-border-soft: #e7edf3;
  --shadow-sm: 0 1px 2px rgba(11, 30, 48, .04);
  --shadow-md: 0 8px 22px rgba(20, 50, 75, .07);
  --shadow-lg: 0 14px 32px rgba(16, 34, 53, .1);
  --shadow-xl: 0 20px 48px rgba(16, 34, 53, .14);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 999px;
  --gradient-primary: linear-gradient(135deg, #14324b 0%, #1f5e7a 100%);
  --gradient-header: linear-gradient(135deg, #14324b 0%, #245067 55%, #2d7ff0 100%);
  --gradient-page: radial-gradient(circle at top left, rgba(45, 127, 240, .12), transparent 32%), linear-gradient(180deg, #f8fbfe 0%, #eef3f8 100%);
  --font-family: 'Montserrat', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --transition-fast: 160ms ease;
  --transition-normal: 240ms ease;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  min-width: 1240px;
  background: var(--gradient-page);
  color: var(--color-text-primary);
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.4;
  overflow: hidden;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
svg { width: 16px; height: 16px; flex-shrink: 0; }
h1, h2, h3, p { margin: 0; }
h1 { color: var(--color-text-dark); font-size: 1.55rem; line-height: 1.15; }
h2 { color: var(--color-text-dark); font-size: 1rem; }
h3 { color: var(--color-text-dark); font-size: .86rem; }
p { color: var(--color-text-secondary); }
small, .small { font-size: .74rem; }
.muted { color: var(--color-text-muted); }

.navbar {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  background: rgba(246, 249, 252, .86);
  border-bottom: 1px solid rgba(188, 202, 216, .7);
  box-shadow: 0 10px 28px rgba(16, 34, 53, .05);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand,
.navbar-link,
.account-button {
  border: 0;
  background: transparent;
  color: inherit;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-primary-dark);
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--gradient-header);
  color: white;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.navbar-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: .84rem;
  font-weight: 700;
}

.navbar-link:hover { background: rgba(31, 94, 122, .08); color: var(--color-text-primary); }
.navbar-link.active {
  background: var(--gradient-primary);
  border-color: rgba(20, 50, 75, .28);
  color: white;
  box-shadow: 0 4px 12px rgba(20, 50, 75, .14);
}
.navbar-link.muted-nav { opacity: .7; }
/* Mock-links: zichtbaar voor de demo, bewust zonder gedrag. */
.mock-link { cursor: default; user-select: none; }
.mock-link:hover { background: transparent; color: var(--color-text-secondary); }

.account-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 4px 8px 4px 4px;
  border: 1px solid rgba(188, 202, 216, .8);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .88);
  color: var(--color-text-dark);
  font-size: .82rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.account-avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary-medium), var(--color-accent-blue));
  color: white;
}

#screen {
  height: calc(100vh - 64px);
  overflow: hidden;
}

.btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: .86rem;
  font-weight: 750;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary { background: var(--gradient-primary); color: white; }
.btn-secondary { background: rgba(255, 255, 255, .92); border-color: var(--color-border); color: var(--color-text-primary); }
.btn-secondary.active { background: rgba(31, 94, 122, .1); border-color: rgba(31, 94, 122, .25); color: var(--color-primary-dark); }
.btn-danger { background: #c14953; border-color: #c14953; color: white; }
.btn-icon { width: 36px; padding: 0; }
.full { width: 100%; justify-content: flex-start; }
.count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--color-accent-blue); color: white; font-size: .72rem; }

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(188, 202, 216, .74);
  border-radius: 10px;
  background: rgba(255, 255, 255, .78);
}
.segmented button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-secondary);
  font-size: .78rem;
  font-weight: 800;
}
.segmented button.active { background: var(--color-primary-dark); color: white; }
.planner-sidebar .segmented { display: flex; width: 100%; }
.planner-sidebar .segmented button { flex: 1; min-width: 0; justify-content: center; padding: 0 6px; font-size: .74rem; }
.planner-sidebar .segmented button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.planning-page {
  height: 100%;
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
}
.planning-page.with-backlog { grid-template-columns: 304px minmax(0, 1fr) 360px; }
.planning-page.with-rail { grid-template-columns: 304px minmax(0, 1fr) 34px; }

/* Dichtgeklapte "In te plannen": dunne uitklapbalk rechts. */
.backlog-rail {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border: 1px solid rgba(188, 202, 216, .72);
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 4px 14px rgba(20, 50, 75, .06);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.backlog-rail:hover { background: var(--color-very-light-blue); color: var(--color-primary-medium); }
.backlog-rail svg { width: 16px; height: 16px; flex-shrink: 0; }
.backlog-rail-label {
  writing-mode: vertical-rl;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .04em;
}
.backlog-rail-count {
  min-width: 20px;
  padding: 2px 0;
  border-radius: 999px;
  background: var(--color-primary-dark);
  color: white;
  font-size: .68rem;
  font-weight: 900;
  text-align: center;
}

.planner-sidebar,
.workbench-shell,
.backlog-panel {
  min-height: 0;
  border: 1px solid rgba(188, 202, 216, .72);
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 4px 14px rgba(20, 50, 75, .06);
}

.planner-sidebar {
  overflow-y: auto;
  padding: 10px;
}

.sidebar-actions,
.sidebar-section,
.selector-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border-soft);
}
.section-label {
  color: var(--color-text-muted);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text-dark);
  font-weight: 800;
}

.planning-lens {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(188, 202, 216, .72);
  border-radius: 10px;
  background: var(--color-surface-muted);
}
.planning-lens button {
  min-height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-secondary);
  font-size: .76rem;
  font-weight: 800;
}
.planning-lens button.active { background: white; color: var(--color-primary-medium); box-shadow: var(--shadow-sm); }

.switch-row,
.selector-row {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgba(255, 255, 255, .72);
  color: var(--color-text-primary);
  text-align: left;
  font-size: .8rem;
  font-weight: 700;
}
.selector-row:hover,
.switch-row:hover { border-color: rgba(31, 94, 122, .18); background: rgba(31, 94, 122, .05); }
.selector-row.compact { min-height: 32px; }
.selector-main { min-width: 0; display: flex; align-items: center; gap: 8px; flex: 1; }
.selector-main span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.color-dot,
.project-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--project, var(--color-primary-medium));
  flex-shrink: 0;
}
.access-icon {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(100, 117, 139, .2);
  border-radius: 8px;
  color: var(--color-primary-medium);
  background: rgba(255, 255, 255, .72);
  flex-shrink: 0;
}
.access-icon svg { width: 14px; height: 14px; }
.switch {
  width: 32px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  background: #cbd5e1;
  margin-left: auto;
  flex-shrink: 0;
}
.switch span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  transition: transform var(--transition-fast);
}
.switch.on { background: var(--color-primary-medium); }
.switch.on span { transform: translateX(14px); }

.mark-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mark-buttons button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--color-border);
  border-radius: 9px;
  background: white;
  color: var(--color-text-primary);
  font-size: .76rem;
  font-weight: 800;
}
.mark-buttons button.active { background: var(--color-primary-medium); border-color: var(--color-primary-medium); color: white; }
.highlight-status { min-height: 20px; color: var(--color-text-muted); font-size: .74rem; }

.planning-flash {
  min-height: 50px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--color-border-soft);
  background: linear-gradient(90deg, rgba(15, 140, 130, .12), rgba(45, 127, 240, .08));
}
.planning-flash > span {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(15, 140, 130, .14);
  color: var(--color-accent);
}
.planning-flash strong {
  color: var(--color-text-dark);
  font-size: .82rem;
}
.planning-flash small {
  min-width: 0;
  overflow: hidden;
  color: var(--color-text-secondary);
  font-size: .74rem;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.metric-section { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mini-metric {
  padding: 10px;
  border: 1px solid var(--color-border-soft);
  border-radius: 10px;
  background: var(--color-surface-subtle);
}
.mini-metric span { display: block; color: var(--color-primary-dark); font-size: 1.25rem; font-weight: 850; }
.mini-metric small { color: var(--color-text-muted); font-weight: 700; }

.planning-workbench { min-width: 0; min-height: 0; }
.workbench-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.planning-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border-soft);
  background: linear-gradient(180deg, rgba(248, 251, 253, .98), rgba(243, 247, 251, .98));
}
.planning-header-right { display: flex; justify-content: flex-end; }
.date-nav { display: inline-flex; align-items: center; gap: 8px; justify-content: center; }
.date-nav strong { min-width: 160px; text-align: center; color: var(--color-text-dark); }

.planning-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--color-border-soft);
  background: rgba(249, 251, 253, .88);
}
.planning-summary div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 12px;
  border-right: 1px solid var(--color-border-soft);
}
.summary-value { color: var(--color-primary-dark); font-size: 1.05rem; font-weight: 850; }
.summary-label { color: var(--color-text-muted); font-size: .75rem; font-weight: 700; }
.planning-content { flex: 1; min-height: 0; overflow: auto; }

.week-grid {
  min-width: 720px;
  display: grid;
  grid-template-columns: 168px repeat(var(--days, 5), minmax(112px, 1fr));
  align-items: stretch;
}
.week-grid.compact-grid { min-height: 52%; border-bottom: 1px solid var(--color-border); }
.week-head {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-muted);
  color: var(--color-text-secondary);
  font-size: .78rem;
  font-weight: 800;
}
.week-head.member { justify-content: flex-start; }
.week-head.today { background: var(--color-very-light-blue); color: var(--color-primary-dark); }
.member-cell {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border-soft);
  background: rgba(249, 251, 253, .82);
  position: relative;
}
.company-strip {
  position: absolute;
  inset: 8px auto 8px 0;
  width: 4px;
  border-radius: 0 999px 999px 0;
}
.member-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.member-text strong { color: var(--color-text-dark); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-text span { color: var(--color-text-muted); font-size: .68rem; }
.day-cell {
  min-height: 40px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 3px;
  border-right: 1px solid var(--color-border-soft);
  border-bottom: 1px solid var(--color-border-soft);
  background: rgba(255, 255, 255, .62);
  position: relative;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.day-cell:hover { background: var(--color-very-light-blue); }

.work-order-card,
.task-card,
.kanban-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 7px 9px;
  border: 1px solid var(--color-border-soft);
  border-left: 4px solid var(--project);
  border-radius: 8px;
  background: white;
  color: var(--color-text-primary);
  text-align: left;
  box-shadow: 0 2px 8px rgba(16, 34, 53, .08);
  transition: opacity var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.work-order-card {
  gap: 2px;
  min-height: 38px;
  padding: 5px 7px;
  border-left-width: 3px;
}
.work-order-card:hover,
.task-card:hover,
.kanban-card:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(16, 34, 53, .1); }
.task-card-action {
  gap: 0;
  padding: 0;
  overflow: hidden;
  position: relative;
}
.task-card-action.selected {
  border-color: rgba(45, 127, 240, .5);
  box-shadow: 0 0 0 3px rgba(45, 127, 240, .1), var(--shadow-sm);
}
.task-select-toggle {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  background: rgba(255, 255, 255, .96);
  color: var(--color-primary-dark);
}
.task-card-main {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 7px 9px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding-right: 42px;
}
.quick-plan-btn {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-top: 1px solid var(--color-border-soft);
  background: var(--color-surface-subtle);
  color: var(--color-primary-dark);
  font-size: .76rem;
  font-weight: 850;
}
.quick-plan-btn:hover { background: var(--color-very-light-blue); }
.wo-title,
.task-card-title { color: var(--color-text-dark); font-size: .78rem; font-weight: 850; line-height: 1.2; }
.wo-title {
  font-size: .7rem;
  line-height: 1.15;
  max-height: 2.3em;
  overflow: hidden;
}
.wo-meta,
.wo-foot,
.task-card-sub,
.task-card-foot { color: var(--color-text-muted); font-size: .68rem; font-weight: 700; }
.wo-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-size: .62rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wo-foot,
.task-card-sub,
.task-card-foot,
.kanban-card-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.task-card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* Uitlichten: alle items van dezelfde taak/project/klant krijgen samen hetzelfde effect,
   met een zachte overgang zodat het niet abrupt aanvoelt. */
.planning-page [data-task-id],
.planning-page [data-project-id],
.planning-page [data-customer-id] {
  transition: box-shadow .3s ease, transform .3s ease;
}
.lit {
  position: relative;
  z-index: 3;
  border-radius: 9px;
  box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 3px rgba(45, 127, 240, .8), 0 8px 18px rgba(45, 127, 240, .15);
  transform: translateY(-1px);
}

.project-week {
  min-width: 760px;
  display: grid;
  grid-template-columns: 230px repeat(var(--days, 5), minmax(118px, 1fr));
}
.project-week.compact-project-week { min-height: 48%; }
.project-week-head {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-muted);
  color: var(--color-text-secondary);
  font-size: .74rem;
  font-weight: 850;
}
.project-week-head.day { justify-content: center; }
.project-week-label {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 0;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border-soft);
  background: white;
  color: var(--color-text-primary);
  text-align: left;
}
.project-week-label.project-row { background: var(--color-surface-subtle); }
.project-week-label.task-row-label { padding-left: 28px; }
.project-week-label span:not(.project-dot) { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.project-week-label strong { color: var(--color-text-dark); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-week-label small { color: var(--color-text-muted); font-weight: 700; }
.project-week-track {
  grid-column: span var(--days, 5);
  position: relative;
  min-height: 48px;
  display: grid;
  grid-template-columns: repeat(var(--days, 5), 1fr);
  border-bottom: 1px solid var(--color-border-soft);
  background: rgba(255, 255, 255, .68);
}
.project-week-track span { border-right: 1px solid var(--color-border-soft); }
.timeline-bar {
  position: absolute;
  top: 50%;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--project);
  color: white;
  transform: translateY(-50%);
  font-size: .68rem;
  font-weight: 850;
  overflow: hidden;
  white-space: nowrap;
}

.split-planning { min-height: 100%; display: flex; flex-direction: column; }

.day-planner {
  min-width: 920px;
  display: flex;
  flex-direction: column;
}
.day-summary-strip {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(5, minmax(112px, 1fr));
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--color-border-soft);
  background: rgba(249, 251, 253, .96);
}
.day-summary-strip button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--color-border-soft);
  border-radius: 10px;
  background: white;
  color: var(--color-text-primary);
  text-align: left;
}
.day-summary-strip button > svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--color-primary-medium);
}
.day-summary-strip button > span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.day-summary-strip strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--color-primary-dark);
  font-size: .98rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.day-summary-strip small {
  color: var(--color-text-muted);
  font-size: .68rem;
  font-weight: 850;
  line-height: 1;
}
.day-hours,
.day-person-row {
  display: grid;
  grid-template-columns: 190px minmax(680px, 1fr);
}
.day-hours {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 42px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-muted);
}
.day-hours > div {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  align-items: center;
}
.day-hours span {
  color: var(--color-text-muted);
  font-size: .68rem;
  font-weight: 850;
  text-align: center;
}
.day-person-row {
  min-height: 68px;
  border-bottom: 1px solid var(--color-border-soft);
}
.day-person-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-right: 1px solid var(--color-border);
  background: var(--color-surface-subtle);
  color: var(--color-text-primary);
  text-align: left;
  position: relative;
}
.day-person-label span:not(.company-strip):not(.avatar) {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.day-person-label strong {
  color: var(--color-text-dark);
  font-size: .78rem;
}
.day-person-label small {
  color: var(--color-text-muted);
  font-size: .68rem;
  font-weight: 800;
}
.day-lane {
  position: relative;
  min-height: 68px;
  background:
    linear-gradient(90deg, rgba(215, 225, 234, .78) 1px, transparent 1px) 0 0 / calc(100% / 12) 100%,
    rgba(255, 255, 255, .74);
}
.day-lane-add {
  position: absolute;
  inset: 0 14px 0 auto;
  display: inline-flex;
  align-items: center;
  color: var(--color-text-muted);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}
.day-lane:hover .day-lane-add { opacity: .5; }
.day-lane-add svg { width: 18px; height: 18px; }
.day-lane-order {
  position: absolute;
  left: var(--left);
  top: 12px;
  width: var(--width);
  min-width: 46px;
  max-width: calc(100% - var(--left));
  height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 0 7px;
  border: 1px solid color-mix(in srgb, var(--project) 48%, #ffffff);
  border-left: 4px solid var(--project);
  border-radius: 8px;
  background: color-mix(in srgb, var(--project) 12%, #ffffff);
  color: var(--color-text-dark);
  text-align: left;
  overflow: hidden;
}
.day-lane-order:hover,
.day-lane-order:focus-visible {
  z-index: 2;
  border-color: color-mix(in srgb, var(--project) 72%, #ffffff);
  box-shadow: var(--shadow-md);
}
.day-lane-order.fresh {
  z-index: 2;
  border-color: rgba(15, 140, 130, .85);
  background:
    linear-gradient(90deg, rgba(15, 140, 130, .14), rgba(255, 255, 255, .92)),
    color-mix(in srgb, var(--project) 12%, #ffffff);
  box-shadow: inset 0 0 0 1px rgba(15, 140, 130, .22), 0 8px 22px rgba(15, 140, 130, .14);
}
.day-lane-order.fresh::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 6px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(15, 140, 130, .12);
}
.day-lane-order strong,
.day-lane-order small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.day-lane-order strong { font-size: .72rem; }
.day-lane-order small { color: var(--color-text-muted); font-size: .64rem; font-weight: 850; }
.day-balance-loads,
.day-suggestion-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.day-balance-load {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto 96px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--color-border-soft);
  border-radius: 10px;
  background: white;
  color: var(--color-text-primary);
  text-align: left;
}
.day-balance-load.busy {
  border-color: rgba(201, 122, 27, .24);
  background: #fffaf2;
}
.day-balance-load span {
  min-width: 0;
}
.day-balance-load strong {
  display: block;
  overflow: hidden;
  color: var(--color-text-dark);
  font-size: .8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.day-balance-load small,
.day-balance-load em {
  color: var(--color-text-muted);
  font-size: .72rem;
  font-style: normal;
  font-weight: 850;
}
.day-balance-load i {
  height: 8px;
  border-radius: 999px;
  background: var(--color-border-soft);
  overflow: hidden;
}
.day-balance-load i b {
  display: block;
  width: var(--load);
  height: 100%;
  border-radius: inherit;
  background: var(--avatar);
}
.day-suggestion {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--color-border-soft);
  border-left: 4px solid var(--project);
  border-radius: 10px;
  background: white;
}
.day-suggestion > span:not(.project-dot) {
  min-width: 0;
}
.day-suggestion strong {
  display: block;
  overflow: hidden;
  color: var(--color-text-dark);
  font-size: .8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.day-suggestion small {
  display: block;
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: .72rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.day-suggestion button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid rgba(45, 127, 240, .24);
  border-radius: 8px;
  background: var(--color-very-light-blue);
  color: var(--color-primary-dark);
  font-size: .74rem;
  font-weight: 900;
  white-space: nowrap;
}
.empty-state {
  min-height: 160px;
  display: grid;
  place-items: center;
  gap: 8px;
  color: var(--color-text-muted);
  font-weight: 850;
}

.planning-month-view {
  min-width: 860px;
  padding: 10px;
}
.planning-month-view .month-weekdays {
  margin-bottom: 6px;
}
.planning-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(108px, 1fr));
  gap: 6px;
}
.planning-month-day {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--color-border-soft);
  border-radius: 10px;
  background: white;
  color: var(--color-text-primary);
  text-align: left;
}
.planning-month-day.outside { opacity: .45; }
.planning-month-day.weekend { background: #fff8ed; }
.planning-month-day.today {
  border-color: rgba(45, 127, 240, .45);
  box-shadow: inset 0 0 0 1px rgba(45, 127, 240, .14);
}
.month-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.month-day-top strong { color: var(--color-text-dark); font-size: .9rem; }
.month-day-top small {
  min-width: 22px;
  min-height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--color-primary-dark);
  color: white;
  font-size: .68rem;
  font-weight: 900;
}
.month-day-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.month-day-body i,
.month-day-body em,
.muted-mini {
  min-height: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: .64rem;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.month-day-body i {
  border-left: 3px solid var(--project);
  background: var(--color-surface-subtle);
  color: var(--color-text-primary);
}
.month-day-body em {
  background: #eef1f5;
  color: var(--color-text-secondary);
}
.muted-mini { color: var(--color-text-muted); }
.planning-year-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 10px;
  padding: 12px;
}
.year-month-card {
  min-height: 122px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: white;
  color: var(--color-text-primary);
  text-align: left;
  box-shadow: var(--shadow-sm);
}
.year-month-card strong {
  display: block;
  color: var(--color-text-dark);
  text-transform: capitalize;
}
.year-month-card small,
.year-month-meta {
  color: var(--color-text-muted);
  font-size: .72rem;
  font-weight: 850;
}
.year-load {
  height: 9px;
  display: block;
  border-radius: 999px;
  background: var(--color-surface-muted);
  overflow: hidden;
}
.year-load i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--color-accent-blue);
}

.backlog-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.backlog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--color-border-soft);
  background: var(--color-surface-muted);
}
.backlog-header h2 { display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.backlog-header span { color: var(--color-text-muted); font-size: .76rem; font-weight: 700; }
.quick-task {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border-soft);
}
.quick-task button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 9px;
  background: var(--color-primary-dark);
  color: white;
  font-weight: 800;
}
.quick-task span { color: var(--color-text-muted); font-size: .74rem; }
.filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border-soft);
}
.filter-chips button {
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid var(--color-border-soft);
  border-radius: 999px;
  background: var(--color-surface-muted);
  color: var(--color-text-secondary);
  font-size: .74rem;
  font-weight: 800;
}
.filter-chips button.active { background: var(--color-very-light-blue); border-color: var(--color-primary-light); color: var(--color-primary-dark); }
.backlog-bulk-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--color-border-soft);
  background: #eef6ff;
}
.backlog-bulk-bar button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 7px;
  border: 1px solid rgba(45, 127, 240, .22);
  border-radius: 8px;
  background: white;
  color: var(--color-primary-dark);
  font-size: .68rem;
  font-weight: 900;
  white-space: nowrap;
}
.backlog-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px; }

.badge {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 850;
  white-space: nowrap;
}
.status-todo, .neutral { background: #eef1f5; color: #64758b; }
.status-planned { background: #e6f0fb; color: #2563c9; }
.status-busy { background: #fdf0df; color: #b8690f; }
.status-done { background: #e3f4ec; color: #1f8f5f; }
.priority-critical { background: #b23a44; color: #fff; }
.priority-high { background: #f9e6e8; color: #b23a44; }
.priority-medium { background: #fdf0df; color: #b8690f; }
.priority-low { background: #eef1f5; color: #64758b; }
.project-quote { background: #f0ecfb; color: #7c3aed; }
.project-running { background: #e6f0fb; color: #2563c9; }
.project-finished { background: #e3f4ec; color: #1f8f5f; }
.project-invoiced, .project-service { background: #eef1f5; color: #64758b; }

.avatar {
  display: inline-grid;
  place-items: center;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--avatar, var(--color-primary-medium));
  color: white;
  font-weight: 850;
  line-height: 1;
  flex: 0 0 auto;
}
.avatar-stack { display: inline-flex; align-items: center; }
.avatar-stack .avatar:not(:first-child) { margin-left: -8px; }
.avatar.extra { width: 28px; height: 28px; background: var(--color-text-muted); font-size: .7rem; }

.page {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  overflow: auto;
}
.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.page-toolbar p { margin-top: 3px; font-size: .9rem; }
.toolbar-actions { display: flex; align-items: center; gap: 8px; }
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag-row span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--color-surface-muted);
  color: var(--color-text-secondary);
  font-size: .68rem;
  font-weight: 850;
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 12px;
}
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(230px, 1fr));
  gap: 10px;
  align-items: start;
}
.kanban-column {
  min-height: 140px;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  background: rgba(243, 247, 251, .88);
  overflow: hidden;
  transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.task-kanban-column.drop-ready {
  border-color: color-mix(in srgb, var(--color-accent-blue) 45%, var(--color-border));
  background: color-mix(in srgb, var(--color-accent-blue) 8%, #fff);
  box-shadow: inset 0 0 0 2px rgba(45, 127, 240, .1);
}
.kanban-column header {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border-soft);
}
.kanban-column header strong { color: var(--color-text-dark); font-size: .84rem; }
.kanban-column header span {
  padding: 1px 8px;
  border-radius: 999px;
  background: white;
  color: var(--color-text-muted);
  font-size: .72rem;
  font-weight: 850;
}
.kanban-column > div,
.kanban-dropzone {
  min-height: 108px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
}
.kanban-card { border-top: 3px solid var(--project); border-left-width: 1px; cursor: grab; }
.kanban-card:active,
.kanban-card.dragging { cursor: grabbing; }
.kanban-card.dragging { opacity: .55; transform: rotate(.6deg); }
.kanban-card-row { justify-content: space-between; color: var(--color-text-muted); font-size: .72rem; font-weight: 750; }
.kanban-empty {
  min-height: 62px;
  display: grid;
  place-items: center;
  gap: 6px;
  border: 1px dashed var(--color-border);
  border-radius: 10px;
  color: var(--color-text-muted);
  font-size: .76rem;
  font-weight: 800;
}
.kanban-empty svg { width: 17px; height: 17px; }

.table-wrap {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-md);
  overflow: auto;
}
.data-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}
.data-table th {
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  text-align: left;
  font-size: .72rem;
  font-weight: 850;
  text-transform: uppercase;
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border-soft);
  color: var(--color-text-primary);
  font-size: .84rem;
}
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover { background: var(--color-surface-hover); }
.data-table small { display: block; margin-top: 3px; color: var(--color-text-muted); font-weight: 700; }
.table-title { display: flex; align-items: center; gap: 9px; color: var(--color-text-dark); font-weight: 850; }

.progress {
  width: 112px;
  height: 8px;
  display: inline-block;
  border-radius: 999px;
  background: var(--color-surface-muted);
  overflow: hidden;
  vertical-align: middle;
}
.progress span { display: block; height: 100%; border-radius: inherit; }

/* ---- Cockpit-layout: zijbalk + werkblad, zoals de planning ---- */
.cockpit-page {
  height: 100%;
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
}
.cockpit-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cockpit-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border-soft);
}
.cockpit-count { margin-left: auto; color: var(--color-text-muted); font-size: .78rem; font-weight: 800; white-space: nowrap; }
.cockpit-content { flex: 1; min-height: 0; overflow: auto; padding: 12px; }
.cockpit-empty {
  min-height: 180px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: var(--color-text-muted);
  font-weight: 800;
}
.cockpit-empty svg { width: 26px; height: 26px; opacity: .6; }
.progress.full { width: 100%; }
.card-period { display: inline-flex; align-items: center; gap: 6px; }
.card-period svg { width: 13px; height: 13px; }
.nowrap { white-space: nowrap; }

/* ---- Portfolio-tijdlijn op echte datums ---- */
.pf-timeline {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.pf-row {
  display: grid;
  grid-template-columns: 250px 1fr;
  border-bottom: 1px solid var(--color-border-soft);
}
.pf-row:last-child { border-bottom: 0; }
.pf-scale-row { background: var(--color-surface-subtle); }
.pf-scale-spacer { border-right: 1px solid var(--color-border); }
.pf-scale { display: flex; }
.pf-scale span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 0;
  border-right: 1px solid var(--color-border-soft);
  color: var(--color-text-muted);
  font-size: .68rem;
  font-weight: 850;
  text-transform: capitalize;
}
.pf-label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 0;
  border-right: 1px solid var(--color-border);
  background: var(--color-surface-subtle);
  color: var(--color-text-dark);
  text-align: left;
}
.pf-label:hover { background: var(--color-surface-hover); }
.pf-label-text { min-width: 0; }
.pf-label-text strong { display: block; font-size: .82rem; font-weight: 850; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-label-text small { display: block; color: var(--color-text-muted); font-size: .7rem; font-weight: 700; }
.pf-track {
  position: relative;
  display: flex;
  min-height: 52px;
  background: white;
}
.pf-month-cell { border-right: 1px solid var(--color-border-soft); }
.pf-today {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-accent-blue, #2D7FF0);
  opacity: .55;
  z-index: 1;
}
.pf-bar {
  position: absolute;
  top: 50%;
  height: 26px;
  min-width: 34px;
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--project) 22%, white);
  transform: translateY(-50%);
  overflow: hidden;
  cursor: pointer;
  z-index: 2;
  transition: box-shadow var(--transition-fast), filter var(--transition-fast);
}
.pf-bar:hover { box-shadow: 0 0 0 2px color-mix(in srgb, var(--project) 45%, white); filter: saturate(1.1); }
.pf-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--project);
  border-radius: inherit;
}
.pf-bar-label {
  position: relative;
  margin-left: 10px;
  color: var(--color-text-dark);
  font-size: .68rem;
  font-weight: 900;
  text-shadow: 0 0 4px rgba(255, 255, 255, .8);
}

/* ---- Tijdlijn: per taak een rij, agenda-items als compacte blokjes op hun dag ---- */
.tl {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-md);
  overflow: auto;
}
.tl-row {
  display: grid;
  grid-template-columns: 230px repeat(var(--cols), minmax(66px, 1fr));
  min-width: calc(230px + var(--cols) * 66px);
  border-bottom: 1px solid var(--color-border-soft);
}
.tl-row:last-child { border-bottom: 0; }
.tl-scale { background: var(--color-surface-muted); border-bottom: 1px solid var(--color-border); }
.tl-corner {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-right: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: .7rem;
  font-weight: 900;
  text-transform: uppercase;
}
.tl-day-head {
  min-height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-right: 1px solid var(--color-border-soft);
  color: var(--color-text-muted);
}
.tl-day-head small { font-size: .56rem; font-weight: 900; text-transform: uppercase; }
.tl-day-head strong { color: var(--color-text-dark); font-size: .8rem; }
.tl-day-head.today { background: var(--color-very-light-blue); box-shadow: inset 0 -2px 0 var(--color-accent-blue, #2D7FF0); }
.tl-day-head.today strong { color: var(--color-primary-medium); }
.tl-day-head.weekend { background: #fff8ed; }
.tl-task {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 0;
  border-right: 1px solid var(--color-border);
  background: rgba(249, 251, 253, .98);
  color: var(--color-text-primary);
  text-align: left;
}
.tl-task:hover { background: #fff; }
.tl-task-text { min-width: 0; }
.tl-task-text strong {
  display: block;
  overflow: hidden;
  color: var(--color-text-dark);
  font-size: .8rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tl-task-text small {
  display: block;
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: .68rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tl-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 4px 3px;
  border-right: 1px solid var(--color-border-soft);
}
.tl-cell.today { background: rgba(237, 245, 251, .55); }
.tl-cell.weekend { background: #fffcf5; }
.tl-item {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 4px;
  border: 0;
  border-left: 3px solid var(--project);
  border-radius: 6px;
  background: color-mix(in srgb, var(--project) 12%, #fff);
  font-size: .62rem;
  white-space: nowrap;
  overflow: hidden;
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
}
.tl-item strong { color: var(--color-text-dark); font-weight: 900; }
.tl-item span { color: var(--color-text-secondary); font-weight: 750; }
.tl-item:hover { background: color-mix(in srgb, var(--project) 20%, #fff); box-shadow: var(--shadow-sm); }
.project-kicker { display: flex; align-items: center; gap: 8px; color: var(--color-text-muted); font-size: .8rem; font-weight: 850; }
.alert-strip {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid #f1d4a8;
  border-radius: var(--radius-md);
  background: #fdf0df;
  color: #8a5512;
  font-weight: 850;
}

/* ---- Projectdetail: header-kaart + taakoppervlak in het werkblad ---- */
.project-page {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
}
.pd-card {
  padding: 14px 16px 16px;
  border: 1px solid rgba(188, 202, 216, .72);
  border-top: 4px solid var(--project);
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 4px 14px rgba(20, 50, 75, .06);
}
.pd-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.pd-back {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: white;
  color: var(--color-primary-medium);
  font-size: .8rem;
  font-weight: 850;
}
.pd-back:hover { border-color: var(--color-border-strong); background: var(--color-surface-subtle); }
.pd-back svg { width: 15px; height: 15px; }
.pd-actions { display: flex; align-items: center; gap: 8px; }
.pd-title-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pd-title-row .project-dot { width: 14px; height: 14px; border-radius: 4px; }
.pd-title-row h1 { font-size: 1.35rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin-top: 8px;
  color: var(--color-text-secondary);
  font-size: .8rem;
  font-weight: 750;
}
.pd-meta-row > span { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; }
.pd-meta-row svg { width: 14px; height: 14px; color: var(--color-text-muted); }
.pd-desc {
  max-width: 860px;
  margin-top: 8px;
  color: var(--color-text-muted);
  font-size: .82rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pd-progress-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.pd-progress-row .progress { width: 220px; }
.project-page .progress > span { background: var(--project); }
.pd-progress-label { color: var(--color-text-muted); font-size: .78rem; font-weight: 800; }
.project-page .cockpit-main { flex: 1; min-height: 0; }

.inline-planning,
.material-list,
.sibling-list,
.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.inline-planning button,
.sibling-list button,
.schedule-list button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--color-border-soft);
  border-radius: 9px;
  background: var(--color-surface-subtle);
  color: var(--color-text-primary);
  text-align: left;
}
.inline-planning button { flex-direction: column; align-items: flex-start; }
.inline-planning span,
.inline-planning small { color: var(--color-text-muted); font-size: .72rem; font-weight: 750; }

.control-list { display: flex; flex-direction: column; gap: 10px; }
.control-task {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.control-task header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-top: 4px solid var(--project);
  border-bottom: 1px solid var(--color-border-soft);
  background: var(--color-surface-subtle);
}
.control-task header div:nth-child(2) { flex: 1; }
.control-task header p { font-size: .78rem; }
.control-state { display: flex; align-items: center; gap: 8px; color: var(--color-text-muted); font-weight: 850; }
.control-task-action {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: 9px;
  background: white;
  color: var(--color-primary-dark);
  font-size: .74rem;
  font-weight: 900;
  white-space: nowrap;
}
.control-order {
  width: calc(100% - 20px);
  min-height: 54px;
  display: grid;
  grid-template-columns: auto 1fr 1.4fr auto;
  align-items: center;
  gap: 10px;
  margin: 10px;
  padding: 9px 10px;
  border: 1px solid var(--color-border-soft);
  border-radius: 10px;
  background: white;
  color: var(--color-text-primary);
  text-align: left;
}
.control-order small { display: block; color: var(--color-text-muted); font-size: .72rem; }
.material-summary { color: var(--color-text-muted); font-size: .78rem; font-weight: 700; }
.task-control-context {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.task-control-context span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid var(--color-border-soft);
  border-radius: 999px;
  background: white;
  color: var(--color-text-secondary);
  font-size: .72rem;
  font-weight: 850;
}
.task-control-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.task-control-order {
  min-height: 56px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(110px, .8fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--color-border-soft);
  border-radius: 10px;
  background: white;
  color: var(--color-text-primary);
  text-align: left;
}
.task-control-order.checked {
  border-color: rgba(31, 143, 95, .2);
  background: #f2fbf6;
}
.task-control-order span,
.task-control-order em {
  min-width: 0;
}
.task-control-order strong {
  display: block;
  overflow: hidden;
  color: var(--color-text-dark);
  font-size: .8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-control-order small,
.task-control-order em {
  display: block;
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: .72rem;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(16, 34, 53, .42);
  backdrop-filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}
.overlay.open { opacity: 1; pointer-events: auto; }
.panel {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 90;
  width: min(760px, calc(100vw - 32px));
  max-height: min(780px, calc(100vh - 32px));
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(16, 34, 53, .28);
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  transform: translate(-50%, -48%) scale(.98);
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}
.panel.wide { width: min(920px, calc(100vw - 32px)); }
.panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.panel-head {
  position: relative;
  padding: 18px 56px 16px 22px;
  border-top: 4px solid var(--project);
  border-bottom: 1px solid var(--color-border);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--project) 9%, #ffffff), #ffffff 42%),
    #ffffff;
}
.panel-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: white;
  color: var(--color-text-secondary);
}
.panel-close:hover { background: var(--color-surface-muted); color: var(--color-text-dark); }
.panel-head h2 { margin-top: 6px; font-size: 1.28rem; line-height: 1.18; padding-right: 10px; }
.panel-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
  overscroll-behavior: contain;
}
.panel-section { margin-bottom: 18px; }
.panel-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--color-text-muted);
  font-size: .74rem;
  font-weight: 850;
  text-transform: uppercase;
}
.panel-section p { font-size: .86rem; color: var(--color-text-primary); }

.create-chooser {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.create-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: white;
  color: var(--color-text-primary);
  text-align: left;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}
.create-choice:hover {
  border-color: var(--c);
  box-shadow: 0 6px 16px rgba(16, 34, 53, .1);
  transform: translateY(-1px);
}
.create-choice-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--c) 14%, white);
  color: var(--c);
  flex-shrink: 0;
}
.create-choice-icon svg { width: 20px; height: 20px; }
.create-choice-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.create-choice-text strong { color: var(--color-text-dark); font-size: .9rem; font-weight: 850; }
.create-choice-text small { color: var(--color-text-muted); font-size: .76rem; }
.create-choice > svg:last-child { color: var(--color-text-muted); flex-shrink: 0; }
.kv {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--color-border-soft);
  font-size: .84rem;
}
.kv span { color: var(--color-text-secondary); }
.kv strong { color: var(--color-text-dark); text-align: right; }
/* Eigenschappen-grid in detailmodals: 2 kolommen, icoon + label boven waarde. */
.kv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px 16px;
}
.kv-cell { min-width: 0; }
.kv-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-muted);
  font-size: .66rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.kv-label svg { width: 13px; height: 13px; }
.kv-value {
  display: block;
  margin-top: 4px;
  color: var(--color-text-dark);
  font-size: .86rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.kv-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-primary-medium);
  font-size: .86rem;
  font-weight: 850;
  cursor: pointer;
}
.kv-link:hover { text-decoration: underline; }
.material-list span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--color-surface-muted);
  color: var(--color-text-primary);
  font-size: .82rem;
  font-weight: 700;
}
.sibling-list button.active { background: var(--color-very-light-blue); border-color: var(--color-primary-light); }
.sibling-list button span:not(.avatar),
.schedule-list button span:not(.avatar) { flex: 1; min-width: 0; }
.sibling-list small,
.schedule-list small { display: block; color: var(--color-text-muted); font-size: .72rem; }
.planning-empty {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(201, 122, 27, .24);
  border-radius: 10px;
  background: #fff8ed;
}
.planning-empty strong { color: var(--color-text-dark); }
.planning-empty span { color: var(--color-text-secondary); font-size: .8rem; font-weight: 700; }
.planning-empty .btn { align-self: flex-start; }
.inline-link {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: var(--color-accent-blue);
  font-weight: 850;
}
.rollup {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--color-primary-light);
  border-radius: 10px;
  background: var(--color-very-light-blue);
  color: var(--color-text-primary);
  font-size: .82rem;
}
.rollup span { display: flex; align-items: center; gap: 7px; }
.rollup strong { color: var(--color-primary-dark); }
.panel-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--color-border);
  background: rgba(249, 251, 253, .96);
}
.panel-foot .btn { flex: 0 1 auto; }
.input {
  width: 100%;
  min-height: 38px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 9px;
  background: white;
  color: var(--color-text-primary);
}
textarea.input { min-height: 92px; resize: vertical; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.editor-section {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--color-border-soft);
  border-radius: 12px;
  background: #fff;
}
.editor-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--color-text-dark);
  font-size: .82rem;
  font-weight: 900;
  text-transform: none;
}
.danger-zone {
  border-color: rgba(193, 73, 83, .28);
  background: #fff1f2;
}
.danger-zone h3 { color: #a3313b; }
.field-label {
  margin: 10px 0 6px;
  color: var(--color-text-muted);
  font-size: .7rem;
  font-weight: 900;
  text-transform: uppercase;
}
.quick-choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.quick-title {
  min-height: 46px;
  font-size: .96rem;
  font-weight: 850;
}
.quick-preset-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 8px;
}
.quick-preset-grid button {
  min-height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 5px;
  border: 1px solid var(--color-border);
  border-radius: 9px;
  background: white;
  color: var(--color-text-primary);
  font-size: .72rem;
  font-weight: 900;
  text-align: center;
}
.quick-preset-grid button.active {
  border-color: rgba(15, 140, 130, .38);
  background: rgba(15, 140, 130, .1);
  color: var(--color-accent);
}
.quick-preset-grid svg {
  width: 18px;
  height: 18px;
}
.planning-task-picker {
  max-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 10px;
  overflow: auto;
}
.planning-task-option {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--color-border-soft);
  border-left: 4px solid var(--project);
  border-radius: 10px;
  background: white;
  color: var(--color-text-primary);
  text-align: left;
}
.planning-task-option.active {
  border-color: color-mix(in srgb, var(--project) 54%, #ffffff);
  background: color-mix(in srgb, var(--project) 10%, #ffffff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--project) 22%, #ffffff);
}
.planning-task-option > span:not(.project-dot) {
  min-width: 0;
}
.planning-task-option strong,
.planning-task-summary strong {
  display: block;
  overflow: hidden;
  color: var(--color-text-dark);
  font-size: .8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.planning-task-option small,
.planning-task-summary small {
  display: block;
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: .7rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.planning-task-summary {
  min-height: 46px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--project) 26%, #ffffff);
  border-radius: 10px;
  background: color-mix(in srgb, var(--project) 7%, #ffffff);
}
.planning-item-preview {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--color-border-soft);
  border-radius: 11px;
}
.planning-item-preview.ok {
  border-color: rgba(31, 143, 95, .24);
  background: #eef9f3;
}
.planning-item-preview.warning {
  border-color: rgba(201, 122, 27, .32);
  background: #fff8ed;
}
.planning-item-preview > span {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  background: white;
  color: var(--color-primary-medium);
  flex: 0 0 auto;
}
.planning-item-preview.warning > span { color: var(--color-warning); }
.planning-item-preview strong {
  display: block;
  color: var(--color-text-dark);
  font-size: .84rem;
}
.planning-item-preview small {
  display: block;
  color: var(--color-text-secondary);
  font-size: .72rem;
  font-weight: 800;
}
.quick-choice-group button,
.control-check-grid button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: white;
  color: var(--color-text-primary);
  font-size: .76rem;
  font-weight: 850;
}
.quick-choice-group button.active,
.control-check-grid button.active {
  border-color: rgba(31, 94, 122, .35);
  background: var(--color-primary-dark);
  color: white;
}
.person-choice-group button { padding-left: 5px; }
.token-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.token-grid button {
  min-width: 0;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: white;
  color: var(--color-text-primary);
  text-align: left;
}
.token-grid button.active {
  border-color: rgba(31, 94, 122, .42);
  background: var(--color-very-light-blue);
}
.token-grid button span:not(.avatar) {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.token-grid strong {
  color: var(--color-text-dark);
  font-size: .74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.token-grid small {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--color-text-muted);
  font-size: .64rem;
  font-weight: 800;
}
.token-grid small i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.material-token-grid,
.control-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 8px;
}
.material-token-grid button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: white;
  color: var(--color-text-primary);
  font-size: .73rem;
  font-weight: 850;
}
.material-token-grid button.active {
  border-color: rgba(31, 143, 95, .34);
  background: #e3f4ec;
  color: #1f6f4a;
}

.schedule-composer {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.schedule-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--project) 24%, var(--color-border));
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, var(--project) 7%, #ffffff) 100%);
}
.schedule-hero strong {
  display: block;
  margin-top: 4px;
  color: var(--color-text-dark);
  font-size: .95rem;
}
.coverage-box {
  min-width: 92px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--color-surface-inverse);
  color: white;
  text-align: center;
}
.coverage-box span {
  display: block;
  font-size: 1.1rem;
  font-weight: 900;
}
.coverage-box small { color: rgba(255, 255, 255, .76); font-weight: 800; }
.scheduler-block {
  padding: 12px;
  border: 1px solid var(--color-border-soft);
  border-radius: 12px;
  background: var(--color-surface-subtle);
}
.scheduler-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.scheduler-block-head h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--color-text-dark);
  font-size: .82rem;
  font-weight: 900;
  text-transform: none;
}
.scheduler-block-head > button,
.mode-pills button,
.time-presets button,
.time-nudges button,
.duration-pills button,
.duration-step {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: white;
  color: var(--color-text-primary);
  font-size: .74rem;
  font-weight: 850;
}
.scheduler-block-head > button { padding: 0 10px; color: var(--color-primary-dark); }
.mode-pills,
.time-presets,
.time-nudges,
.duration-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.mode-pills button,
.time-presets button,
.duration-pills button { padding: 0 10px; }
.mode-pills button.active,
.time-presets button.active,
.duration-pills button.active {
  border-color: rgba(31, 94, 122, .35);
  background: var(--color-primary-dark);
  color: white;
}
.person-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.person-chip {
  min-width: 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: white;
  color: var(--color-text-primary);
  text-align: left;
}
.person-chip > span:not(.avatar) {
  min-width: 0;
  flex: 1;
}
.person-chip strong {
  display: block;
  color: var(--color-text-dark);
  font-size: .76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.person-chip small {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--color-text-muted);
  font-size: .66rem;
  font-weight: 800;
  white-space: nowrap;
}
.person-chip small i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.person-chip.selected {
  border-color: rgba(31, 94, 122, .45);
  background: var(--color-very-light-blue);
  box-shadow: inset 0 0 0 1px rgba(31, 94, 122, .08);
}
.person-chip.has-conflict { border-color: rgba(201, 122, 27, .42); background: #fff8ed; }
.date-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(58px, 1fr));
  gap: 7px;
}
.date-chip {
  min-height: 62px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  place-items: center;
  padding: 7px 4px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: white;
  color: var(--color-text-secondary);
  position: relative;
}
.date-chip span,
.date-chip small {
  font-size: .64rem;
  font-weight: 850;
  text-transform: uppercase;
}
.date-chip strong {
  color: var(--color-text-dark);
  font-size: 1.04rem;
  line-height: 1;
}
.date-chip.preferred::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-warning);
}
.date-chip.selected {
  border-color: rgba(31, 94, 122, .42);
  background: var(--color-primary-dark);
  color: white;
}
.date-chip.selected strong { color: white; }
.schedule-month {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--color-border-soft);
  border-radius: 10px;
  background: white;
}
.schedule-month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.schedule-month-head strong { color: var(--color-text-dark); font-size: .82rem; }
.schedule-month-head span { color: var(--color-text-muted); font-size: .72rem; font-weight: 850; }
.month-weekdays,
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.month-weekdays span {
  text-align: center;
  color: var(--color-text-muted);
  font-size: .64rem;
  font-weight: 900;
  text-transform: uppercase;
}
.month-day {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-border-soft);
  border-radius: 8px;
  background: var(--color-surface-subtle);
  color: var(--color-text-primary);
  font-size: .74rem;
  font-weight: 850;
  position: relative;
}
.month-day.outside { opacity: .36; }
.month-day.weekend { background: #f8f1e8; }
.month-day.selected {
  border-color: var(--color-primary-dark);
  background: var(--color-primary-dark);
  color: white;
}
.month-day svg {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 11px;
  height: 11px;
}
.selected-team {
  min-width: 0;
  max-width: 260px;
  color: var(--color-text-muted);
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.time-tools {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.time-tools > .time-presets {
  justify-content: flex-start;
}
.time-nudges { justify-content: flex-end; }
.time-rail {
  height: 104px;
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(215, 225, 234, .8) 1px, transparent 1px) 0 0 / calc(100% / 12) 100%,
    linear-gradient(180deg, #ffffff 0%, #f6f9fc 100%);
  overflow: hidden;
  touch-action: none;
}
.time-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--left);
  width: 1px;
  background: rgba(215, 225, 234, .72);
}
.time-tick small {
  position: absolute;
  top: 7px;
  left: 4px;
  color: var(--color-text-muted);
  font-size: .61rem;
  font-weight: 800;
  white-space: nowrap;
}
.busy-slot {
  position: absolute;
  left: var(--left);
  top: 43px;
  width: var(--width);
  height: 22px;
  border-radius: 999px;
  background: repeating-linear-gradient(45deg, rgba(201, 122, 27, .2), rgba(201, 122, 27, .2) 5px, rgba(201, 122, 27, .32) 5px, rgba(201, 122, 27, .32) 10px);
  border: 1px solid rgba(201, 122, 27, .25);
}
.time-block {
  position: absolute;
  left: var(--left);
  top: 34px;
  width: var(--width);
  min-width: 72px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--project) 56%, #ffffff);
  background: color-mix(in srgb, var(--project) 15%, #ffffff);
  color: var(--color-text-dark);
  box-shadow: 0 8px 18px rgba(16, 34, 53, .16);
  user-select: none;
  touch-action: none;
}
.time-block-label {
  font-size: .74rem;
  font-weight: 900;
  white-space: nowrap;
}
.time-block-duration {
  color: var(--project);
  font-size: .68rem;
  font-weight: 900;
}
.time-handle {
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 10px;
  border-radius: 999px;
  background: var(--project);
  opacity: .86;
}
.time-handle.left { left: 4px; cursor: ew-resize; }
.time-handle.right { right: 4px; cursor: ew-resize; }
.duration-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
}
.duration-pills {
  justify-content: center;
}
.duration-step { padding: 0; }
.schedule-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--color-border-soft);
}
.schedule-preview.ok {
  border-color: rgba(31, 143, 95, .24);
  background: #eef9f3;
}
.schedule-preview.warning {
  border-color: rgba(201, 122, 27, .32);
  background: #fff8ed;
}
.schedule-preview strong {
  display: block;
  color: var(--color-text-dark);
  font-size: .86rem;
}
.schedule-preview small {
  display: block;
  color: var(--color-text-secondary);
  font-size: .72rem;
  font-weight: 800;
}
.quick-schedule-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.quick-schedule-list button {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--color-border-soft);
  border-left: 4px solid var(--project);
  border-radius: 10px;
  background: white;
  color: var(--color-text-primary);
  text-align: left;
}
.quick-schedule-list button span:not(.project-dot) {
  min-width: 0;
  flex: 1;
}
.quick-schedule-list strong {
  display: block;
  color: var(--color-text-dark);
  font-size: .82rem;
}
.quick-schedule-list small {
  display: block;
  color: var(--color-text-muted);
  font-size: .7rem;
  font-weight: 800;
}
.search-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.quick-command-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.quick-command-row button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: 9px;
  background: var(--color-surface-subtle);
  color: var(--color-text-primary);
  font-size: .76rem;
  font-weight: 850;
}
.slot-task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bulk-plan-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.bulk-plan-list span {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--color-border-soft);
  border-radius: 9px;
  background: white;
}
.bulk-plan-list strong {
  color: var(--color-text-dark);
  font-size: .78rem;
}
.bulk-plan-list small {
  color: var(--color-text-muted);
  font-weight: 850;
}
.slot-task-card {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--color-border-soft);
  border-left: 4px solid var(--project);
  border-radius: 10px;
  background: white;
  color: var(--color-text-primary);
  text-align: left;
}
.slot-task-card > span:not(.project-dot) {
  min-width: 0;
  flex: 1;
}
.slot-task-card strong {
  display: block;
  color: var(--color-text-dark);
  font-size: .82rem;
}
.slot-task-card small {
  display: block;
  color: var(--color-text-muted);
  font-size: .7rem;
  font-weight: 800;
}
.slot-availability-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.slot-availability-list button,
.availability-line {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--color-border-soft);
  border-radius: 9px;
  background: white;
  color: var(--color-text-primary);
  text-align: left;
}
.slot-availability-list strong,
.availability-line strong { color: var(--color-text-dark); font-size: .78rem; }
.slot-availability-list span,
.availability-line small { color: var(--color-text-muted); font-size: .72rem; font-weight: 800; }
.availability-line span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-success);
}

@media (max-width: 1320px) {
  body { min-width: 1180px; }
  .planning-page.with-backlog { grid-template-columns: 292px minmax(0, 1fr) 330px; }
  .planner-sidebar { padding: 8px; }
  .cockpit-page { grid-template-columns: 292px minmax(0, 1fr); }
}

/* ---- Zoekbare dropdown ---- */
.search-select { position: relative; width: 100%; margin-bottom: 8px; }
.ss-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.ss-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px 3px 9px;
  border-radius: 999px;
  background: var(--color-very-light-blue);
  color: var(--color-primary-dark);
  font-size: .74rem;
  font-weight: 800;
}
.ss-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  opacity: .65;
}
.ss-chip-remove:hover { opacity: 1; background: rgba(31, 94, 122, .12); }
.ss-chip-remove svg { width: 12px; height: 12px; }
.ss-trigger {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--color-border);
  border-radius: 9px;
  background: white;
  color: var(--color-text-muted);
  text-align: left;
  font-size: .84rem;
  font-weight: 700;
}
.ss-trigger:hover { border-color: rgba(31, 94, 122, .3); }
.ss-trigger.has-value { color: var(--color-text-dark); }
.ss-trigger-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.ss-trigger-actions { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; color: var(--color-text-muted); }
.ss-clear { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; }
.ss-clear:hover { background: rgba(16, 34, 53, .08); color: var(--color-text-dark); }
.ss-clear svg, .ss-trigger-actions svg { width: 15px; height: 15px; }
.ss-dropdown {
  position: fixed;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(16, 34, 53, .2);
  overflow: hidden;
}
.ss-search-wrapper {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--color-border-soft);
  color: var(--color-text-muted);
}
.ss-search-wrapper svg { width: 15px; height: 15px; flex-shrink: 0; }
.ss-options { max-height: 244px; overflow-y: auto; padding: 5px; }
.ss-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 7px;
  cursor: pointer;
  font-size: .84rem;
}
.ss-option:hover { background: var(--color-very-light-blue); }
.ss-option.selected { background: var(--color-very-light-blue); }
.ss-check { display: inline-flex; color: var(--color-primary-medium); }
.ss-check svg { width: 16px; height: 16px; }
.ss-option-content { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.ss-option-label { color: var(--color-text-dark); font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-option-sub { color: var(--color-text-muted); font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-no-results { padding: 16px; text-align: center; color: var(--color-text-muted); font-size: .8rem; }

/* ---- Kleurkiezer ---- */
.color-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid white;
  background: var(--c);
  box-shadow: 0 0 0 1px var(--color-border);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.color-swatch:hover { transform: scale(1.08); }
.color-swatch.active { box-shadow: 0 0 0 2px var(--c); transform: scale(1.08); }

/* ---- Smal nummerveld ---- */
.num-input { width: 96px; max-width: 96px; }

/* ---- Agenda-item composer: gedeelde bouwstenen ---- */
.month-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  background: white;
  color: var(--color-text-secondary);
}
.month-nav:hover { background: var(--color-surface-muted); color: var(--color-text-dark); }
.day-dot {
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

/* Tijd-selects (gedeeld met de taakplanner) */
.agenda-time-row { display: flex; gap: 16px; margin-bottom: 10px; }
.time-field { display: flex; flex-direction: column; gap: 4px; }
.time-field .field-label { margin: 0 0 2px; }
.time-selects { display: flex; align-items: center; gap: 6px; }
.time-select { width: 68px; max-width: 68px; flex: 0 0 auto; margin-bottom: 0; text-align: center; }
.time-sep { color: var(--color-text-muted); font-weight: 900; }

.compact-textarea { min-height: 70px; }

@media (max-width: 760px) {
  .panel,
  .panel.wide {
    width: calc(100vw - 18px);
    max-height: calc(100vh - 18px);
    border-radius: 14px;
  }
  .panel-head { padding: 16px 52px 14px 16px; }
  .panel-body { padding: 14px; }
  .panel-foot { justify-content: stretch; }
  .panel-foot .btn { flex: 1 1 140px; }
  .form-grid { grid-template-columns: 1fr; }
  .agenda-person-months { grid-template-columns: 1fr; }
}

.field-hint { margin: 6px 2px 0; color: var(--color-text-muted); font-size: .72rem; }

/* ---- Agenda modal v2: compacte composer ---- */
.panel.wide { width: min(980px, calc(100vw - 32px)); }
.panel-head {
  padding: 12px 52px 10px 18px;
  border-top-width: 3px;
}
.panel-close {
  top: 9px;
  right: 12px;
  width: 30px;
  height: 30px;
}
.panel-head h2 {
  margin-top: 2px;
  font-size: 1.08rem;
  line-height: 1.15;
}
.panel-meta { margin-top: 6px; }
.panel-body { padding: 14px 18px; }

/* Gedeelde modalformulier-stijl (agenda, project, taak): rustige secties, kleine labels. */
.form-v2 {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.form-v2 .editor-section {
  margin-bottom: 0;
  padding: 14px 15px;
  border-radius: 12px;
}
.form-v2 .editor-section h3 {
  margin-bottom: 13px;
  font-size: .74rem;
}
.form-v2 .field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 5px;
  font-size: .66rem;
}
.label-opt {
  color: var(--color-text-muted);
  font-size: .82em;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}
.req-star { color: var(--color-danger); font-weight: 900; }
.form-v2 .input,
.form-v2 .search-select {
  margin-bottom: 0;
}

/* Rustige, voorspelbare uitlijning: elk veld is vol of een nette kolom. */
.agenda-form { display: flex; flex-direction: column; gap: 13px; }
.agenda-field { min-width: 0; display: block; }
.agenda-grid {
  display: grid;
  gap: 13px 14px;
  align-items: start;
}
.agenda-grid-even { grid-template-columns: 1fr 1fr; }
.agenda-grid-task { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.form-v2 textarea.input,
.form-v2 .compact-textarea {
  min-height: 62px;
  max-height: 110px;
  resize: vertical;
}

.agenda-task-context {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: -4px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--project) 24%, var(--color-border-soft));
  border-radius: 9px;
  background: color-mix(in srgb, var(--project) 7%, #fff);
  color: var(--color-text-secondary);
  font-size: .76rem;
  font-weight: 750;
}
.agenda-task-context .project-dot { background: var(--project); flex-shrink: 0; }
.agenda-task-context > span:not(.project-dot) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-context-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border: 0; border-radius: 6px;
  background: transparent;
  color: var(--color-text-muted);
  flex-shrink: 0;
}
.agenda-context-clear:hover { background: color-mix(in srgb, var(--project) 16%, #fff); color: var(--color-text-dark); }
.agenda-context-clear svg { width: 14px; height: 14px; }

/* Segment-keuze voor status en type */
.seg-group { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
  color: var(--color-text-secondary);
  font-size: .76rem;
  font-weight: 800;
  white-space: nowrap;
  transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}
.seg-pill .color-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.seg-pill:hover { border-color: var(--color-border-strong); background: var(--color-surface-subtle); }
.seg-pill.active {
  border-color: rgba(31, 94, 122, .35);
  background: var(--color-primary-dark);
  color: #fff;
}
.seg-pill.active .color-dot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }

.agenda-planning-section {
  background: linear-gradient(180deg, #ffffff 0%, var(--color-surface-subtle) 100%);
}
.agenda-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.agenda-section-head h3 { margin-bottom: 0; }
.agenda-section-hint { color: var(--color-text-muted); font-size: .72rem; font-weight: 800; }
.agenda-people-select {
  padding: 9px;
  border: 1px solid var(--color-border-soft);
  border-radius: 11px 11px 0 0;
  background: #fff;
}
.agenda-people-select .search-select { margin-bottom: 0; }
.agenda-composer-v2 .agenda-person-months {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 9px;
  padding: 9px;
  border: 1px solid var(--color-border-soft);
  border-top: 0;
  border-radius: 0 0 11px 11px;
  background: var(--color-surface-subtle);
}
.agenda-composer-v2 .agenda-person-months:empty,
.agenda-composer-v2 #agendaMonthHost > .muted {
  display: block;
}
.agenda-composer-v2 .agenda-person-months .agenda-month {
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 11px;
  border: 1px solid var(--color-border-soft);
  border-radius: 12px;
  background: #fff;
}
.agenda-composer-v2 .agenda-person-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border-soft);
}
.agenda-person-head .aph-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.agenda-person-head .aph-text strong {
  overflow: hidden;
  color: var(--color-text-dark);
  font-size: .8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agenda-person-head .aph-text small { color: var(--color-text-muted); font-size: .66rem; font-weight: 800; }
.aph-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px; height: 27px;
  border: 1px solid var(--color-border-soft);
  border-radius: 7px;
  background: #fff;
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}
.aph-remove:hover { border-color: rgba(193, 73, 83, .4); background: #fff1f2; color: var(--color-danger); }
.aph-remove svg { width: 15px; height: 15px; }
.agenda-composer-v2 .agenda-month .schedule-month-head { margin-bottom: 8px; }
.agenda-composer-v2 .agenda-month .schedule-month-head strong { font-size: .74rem; }
.agenda-composer-v2 .agenda-month .month-weekdays,
.agenda-composer-v2 .agenda-month .month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}
.agenda-composer-v2 .agenda-month .month-weekdays span { font-size: .56rem; }
.agenda-composer-v2 .agenda-month .month-day {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  min-height: 0;
  padding: 0;
  font-size: .68rem;
  border-radius: 7px;
}
.agenda-composer-v2 .agenda-month .month-day svg { width: 10px; height: 10px; right: 3px; bottom: 3px; }

.agenda-time-section { background: #fff; }
.agenda-time-card { display: grid; gap: 12px; }

/* Keuze: hele dag vs. specifieke uren — compacte segment-balk */
.agenda-allday-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: 11px;
  background: var(--color-surface-subtle);
}
.aat-seg {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-secondary);
  font-size: .82rem;
  font-weight: 850;
  transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}
.aat-seg svg { width: 16px; height: 16px; }
.aat-seg:hover { color: var(--color-text-dark); }
.aat-seg.active {
  background: var(--color-primary-dark);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 34, 53, .16);
}

/* Tijd-detail: start → einde + duur, met visuele balk */
.agenda-time-body {
  display: grid;
  gap: 13px;
  padding: 13px;
  border: 1px solid var(--color-border-soft);
  border-radius: 12px;
  background: var(--color-surface-subtle);
}
.agenda-composer-v2 .agenda-time-row {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin: 0;
}
.agenda-composer-v2 .time-field { min-width: 0; }
.agenda-composer-v2 .time-select { width: 56px; max-width: 56px; }
.time-arrow { display: grid; place-items: center; height: 38px; color: var(--color-text-muted); }
.time-arrow svg { width: 16px; height: 16px; }
.time-duration-field { margin-left: auto; align-items: flex-start; }
.time-duration-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 13px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--project) 13%, #fff);
  color: var(--project);
  font-weight: 900;
}
.time-duration-chip svg { width: 15px; height: 15px; }
.time-duration-chip strong { font-size: .84rem; }

@media (max-width: 920px) {
  .agenda-composer-v2 .agenda-person-months { grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); }
}

@media (max-width: 640px) {
  .panel-head { padding: 11px 48px 10px 14px; }
  .panel-body { padding: 12px; }
  .agenda-grid-even,
  .agenda-grid-task { grid-template-columns: 1fr; }
  .agenda-section-head { align-items: stretch; flex-direction: column; gap: 4px; }
  .agenda-composer-v2 .agenda-person-months { grid-template-columns: 1fr; }
  .agenda-composer-v2 .agenda-time-row { flex-wrap: wrap; }
  .time-duration-field { margin-left: 0; }
}

/* ---- Tijdbalk: uur-raster, bezet-strook met conflictdetectie, sleepbaar blok ---- */
.agenda-rail-wrap { display: grid; gap: 8px; }
.agenda-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.arh-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--color-text-secondary);
  font-size: .72rem;
  font-weight: 800;
}
.arh-label svg { width: 14px; height: 14px; color: var(--color-text-muted); }
.arh-label em { color: var(--color-text-muted); font-style: normal; font-weight: 700; }
.arh-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 900;
  flex-shrink: 0;
}
.arh-status svg { width: 13px; height: 13px; }
.arh-status.is-ok { background: #eaf7f0; color: var(--color-success); }
.arh-status.is-conflict { background: #fdecec; color: var(--color-danger); }

.agenda-rail {
  position: relative;
  height: 118px;
  margin: 0;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #f6f9fc 100%);
  overflow: hidden;
  touch-action: none;
  user-select: none;
}
.agenda-rail.has-conflict { border-color: rgba(193, 73, 83, .45); }
.rail-grid { position: absolute; inset: 0; pointer-events: none; }
.rail-tick { position: absolute; top: 0; bottom: 0; width: 1px; }
.rail-tick::before {
  content: ""; position: absolute; top: 18px; bottom: 6px; left: 0;
  border-left: 1px dashed rgba(193, 205, 218, .5);
}
.rail-tick.major::before { border-left-style: solid; border-color: rgba(193, 205, 218, .85); }
.rail-tick small {
  position: absolute; top: 3px; left: 4px;
  color: var(--color-text-muted); font-size: .62rem; font-weight: 800;
}
.rail-busy-lane { position: absolute; top: 22px; left: 0; right: 0; height: 30px; pointer-events: none; }
.rail-busy {
  position: absolute;
  top: 0; height: 30px;
  display: flex; align-items: center;
  padding: 0 7px;
  border-radius: 7px;
  background: var(--c);
  color: #fff;
  font-size: .62rem; font-weight: 800;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
}
.rail-busy.conflict { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--color-danger); z-index: 2; }
.rail-busy span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-busy-empty {
  position: absolute; top: 7px; left: 11px;
  color: var(--color-text-muted); font-size: .68rem; font-weight: 700;
}
.rail-block {
  position: absolute;
  bottom: 10px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--project) 55%, #fff);
  background: color-mix(in srgb, var(--project) 18%, #fff);
  color: var(--color-text-dark);
  box-shadow: 0 6px 16px rgba(16, 34, 53, .14);
  cursor: grab;
}
.agenda-rail.dragging .rail-block { cursor: grabbing; }
.rail-block-label { padding: 0 12px; font-size: .8rem; font-weight: 900; white-space: nowrap; pointer-events: none; }
.rail-handle {
  position: absolute; top: 6px; bottom: 6px; width: 15px;
  display: grid; place-items: center;
  border-radius: 6px;
  background: var(--project);
  cursor: ew-resize;
}
.rail-handle::after {
  content: "";
  width: 6px; height: 16px;
  border-left: 2px solid rgba(255, 255, 255, .75);
  border-right: 2px solid rgba(255, 255, 255, .75);
}
.rail-handle.left { left: 4px; }
.rail-handle.right { right: 4px; }

/* ---- Taak inplannen (meerdere personen) ---- */
.ts-days-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.ts-days-head h3 { margin: 0; }
.ts-month-nav { display: flex; align-items: center; gap: 6px; }
.ts-month-nav strong { font-size: .78rem; color: var(--color-text-dark); min-width: 120px; text-align: center; }
.ts-person {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--color-border-soft);
  border-radius: 10px;
  background: var(--color-surface-subtle);
}
.ts-person-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ts-person-name { flex: 1; min-width: 0; }
.ts-person-head strong { display: block; font-size: .84rem; color: var(--color-text-dark); }
.ts-person-head small { font-size: .7rem; color: var(--color-text-muted); }
.ts-person-remove {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--color-border); border-radius: 7px;
  background: white; color: var(--color-text-muted); flex-shrink: 0;
}
.ts-person-remove:hover { background: var(--color-surface-muted); color: var(--color-text-dark); }
.ts-month { margin: 0; padding: 0; border: 0; background: transparent; }
.ts-allday { margin-top: 8px; }

/* ---- Backlog zoekbalk ---- */
.backlog-search {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 10px 8px;
  padding: 7px 10px;
  border: 1px solid var(--color-border);
  border-radius: 9px;
  background: white;
  color: var(--color-text-muted);
}
.backlog-search svg { width: 15px; height: 15px; flex-shrink: 0; }
.backlog-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: .84rem; color: var(--color-text-dark); }

/* ---- "Nieuw" dropdownmenu ---- */
[data-create-btn] { justify-content: flex-start; gap: 8px; }
[data-create-btn] svg:last-child { margin-left: auto; }
.create-menu {
  position: fixed;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(16, 34, 53, .2);
}
.create-menu button {
  display: flex;
  align-items: center;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  color: var(--color-text-dark);
  font-size: .86rem;
  font-weight: 800;
}
.create-menu button:hover { background: var(--color-surface-muted); }

/* ---- Maand/jaar matrix (per persoon per dag/maand) ---- */
.planning-matrix {
  display: grid;
  grid-template-columns: 160px repeat(var(--cols, 30), minmax(44px, 1fr));
  align-items: stretch;
  min-width: max-content;
}
.month-matrix { grid-template-columns: 168px repeat(var(--cols, 30), 108px); }
.year-matrix { grid-template-columns: 200px repeat(12, minmax(64px, 1fr)); min-width: 100%; }
.matrix-head {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 4px;
  border-right: 1px solid var(--color-border-soft);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-muted);
  color: var(--color-text-secondary);
  font-size: .68rem;
  font-weight: 800;
  text-transform: capitalize;
}
.matrix-head.day span { font-size: .56rem; text-transform: uppercase; color: var(--color-text-muted); }
.matrix-head.day strong { font-size: .82rem; color: var(--color-text-dark); }
.matrix-head.weekend { background: #fbf3e8; }
.matrix-head.today { background: var(--color-very-light-blue); color: var(--color-primary-dark); }
.matrix-corner {
  left: 0;
  z-index: 4;
  flex-direction: row;
  justify-content: flex-start;
  text-transform: none;
}
.matrix-person {
  position: sticky;
  left: 0;
  z-index: 1;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border-soft);
  background: rgba(249, 251, 253, .97);
}
.matrix-cell {
  min-height: 40px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 3px;
  padding: 3px;
  border-right: 1px solid var(--color-border-soft);
  border-bottom: 1px solid var(--color-border-soft);
  background: rgba(255, 255, 255, .6);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.matrix-cell:hover { background: var(--color-very-light-blue); }
.matrix-cell.weekend { background: #fdf7ef; }
.matrix-cell.today { box-shadow: inset 0 0 0 1px rgba(45, 127, 240, .3); }

/* Maandweergave: ruimere, duidelijk klikbare chips met tijd + titel */
.month-matrix .matrix-cell { min-height: 54px; gap: 4px; padding: 4px; }
.month-matrix .matrix-item {
  width: 100%;
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--project) 26%, var(--color-border-soft));
  border-left: 3px solid var(--project);
  border-radius: 7px;
  background: color-mix(in srgb, var(--project) 11%, #fff);
  color: var(--color-text-dark);
  font-size: .68rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
/* Bij hover groeit de chip tot de volledige titel leesbaar is (zweeft over de buurcellen). */
.month-matrix .matrix-item:hover {
  background: color-mix(in srgb, var(--project) 20%, #fff);
  border-color: color-mix(in srgb, var(--project) 50%, #fff);
  box-shadow: 0 5px 12px rgba(16, 34, 53, .2);
  transform: translateY(-1px);
  position: relative;
  z-index: 6;
  width: max-content;
  min-width: 100%;
  max-width: 380px;
  overflow: visible;
}
.month-matrix .matrix-item:hover .mi-label { overflow: visible; text-overflow: clip; }
.matrix-item .mi-time {
  display: inline-flex;
  align-items: center;
  color: var(--project);
  font-weight: 900;
  flex-shrink: 0;
}
.matrix-item .mi-time svg { width: 13px; height: 13px; }
.matrix-item .mi-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.matrix-item svg { width: 12px; height: 12px; }

.year-cell {
  position: relative;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-right: 1px solid var(--color-border-soft);
  border-bottom: 1px solid var(--color-border-soft);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--color-accent-blue) 34%, #fff), color-mix(in srgb, var(--color-accent-blue) 22%, #fff)) bottom / 100% var(--load, 0%) no-repeat,
    rgba(255, 255, 255, .55);
  color: var(--color-text-dark);
  font-size: .82rem;
  font-weight: 900;
  cursor: pointer;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}
.year-cell b {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-sm);
}
.year-cell:hover { box-shadow: inset 0 0 0 2px rgba(45, 127, 240, .55); transform: translateY(-1px); z-index: 2; }
.year-cell.is-empty { color: var(--color-text-muted); }
.year-cell.is-empty b { background: transparent; box-shadow: none; }
.matrix-empty { grid-column: 1 / -1; }

/* ---- Validatie: verplicht veld leeg ---- */
.input.input-error {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(193, 73, 83, .14);
}

/* ---- Toast-notificaties ---- */
.toast-host {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(460px, calc(100vw - 32px));
  padding: 11px 12px 11px 14px;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-success);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-xl);
  color: var(--color-text-dark);
  font-size: .84rem;
  font-weight: 750;
  opacity: 0;
  transform: translateY(12px) scale(.98);
  transition: opacity var(--transition-normal), transform var(--transition-normal);
}
.toast.show { opacity: 1; transform: translateY(0) scale(1); }
.toast.hide { opacity: 0; transform: translateY(8px) scale(.98); }
.toast-icon { display: grid; place-items: center; flex-shrink: 0; }
.toast-icon svg { width: 18px; height: 18px; }
.toast-msg { flex: 1; min-width: 0; }
.toast-success { border-left-color: var(--color-success); }
.toast-success .toast-icon { color: var(--color-success); }
.toast-info { border-left-color: var(--color-info); }
.toast-info .toast-icon { color: var(--color-info); }
.toast-danger { border-left-color: var(--color-danger); }
.toast-danger .toast-icon { color: var(--color-danger); }
.toast-action {
  flex-shrink: 0;
  padding: 6px 11px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface-subtle);
  color: var(--color-primary-medium);
  font-size: .78rem;
  font-weight: 850;
}
.toast-action:hover { background: var(--color-very-light-blue); border-color: var(--color-primary-light); }
.toast-close {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--color-text-muted);
}
.toast-close:hover { background: var(--color-surface-muted); color: var(--color-text-dark); }
.toast-close svg { width: 15px; height: 15px; }

/* ---- Voet-knoppen: links/rechts splitsen ---- */
.panel-foot .btn.foot-push { margin-right: auto; }

/* ---- Subtiele verwijder-knop ---- */
.btn.btn-ghost-danger {
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-danger);
}
.btn.btn-ghost-danger:hover {
  border-color: rgba(193, 73, 83, .35);
  background: #fff1f2;
}

/* ---- Inline status-chip + dropdown ---- */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 2px 6px 2px 10px;
  border: 0;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 850;
  cursor: pointer;
  transition: filter var(--transition-fast), box-shadow var(--transition-fast);
}
.status-chip .color-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-chip svg { width: 13px; height: 13px; opacity: .65; }
.status-chip:hover { filter: brightness(.98); box-shadow: 0 0 0 1px rgba(16, 34, 53, .14); }

.status-menu {
  position: fixed;
  z-index: 130;
  padding: 5px;
  border: 1px solid var(--color-border);
  border-radius: 11px;
  background: #fff;
  box-shadow: var(--shadow-xl);
  animation: statusMenuIn .14s ease;
}
@keyframes statusMenuIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.status-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 6px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-primary);
  font-size: .8rem;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}
.status-menu-item:hover { background: var(--color-surface-muted); }
.status-menu-item.selected { color: var(--color-text-dark); font-weight: 850; }
.status-menu-item > span:not(.color-dot) { flex: 1; min-width: 0; }
.status-menu-item svg { width: 15px; height: 15px; color: var(--color-primary-medium); flex-shrink: 0; }
.status-menu-item .color-dot,

.priority-chip {
  padding-left: 8px;
}
.priority-chip svg:first-child {
  opacity: .82;
}

.section-pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--color-surface-muted);
  color: var(--color-text-secondary);
  font-size: .68rem;
  font-weight: 900;
  text-transform: none;
}
.task-detail-planning {
  margin-bottom: 0;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-soft);
}
.task-detail-planning .schedule-list,
.task-detail-planning .planning-empty {
  max-height: 230px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
