:root {
  --ras-brand: #133c4a;
  --ras-accent: #c45c26;
  --ras-menu-width: 16.25rem;
}

body {
  background: #f5f5f9;
  color: #384551;
}

.layout-wrapper { min-height: 100vh; }
.layout-container { display: flex; min-height: 100vh; }

.layout-menu {
  width: var(--ras-menu-width);
  min-height: 100vh;
  background: #fff;
  border-right: 1px solid #e6e6e8;
  position: sticky;
  top: 0;
  flex-shrink: 0;
  z-index: 1030;
  overflow-y: auto;
}

.app-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid #eef0f2;
}

.app-brand-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: inherit;
}

.app-brand-logo {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .65rem;
  background: var(--ras-brand);
  color: #fff;
  font-weight: 700;
  font-size: .75rem;
}

.app-brand-text { font-weight: 700; letter-spacing: .02em; }

.menu-inner {
  list-style: none;
  margin: 0;
  padding: .75rem 0 1.5rem;
}

.menu-header {
  padding: 1rem 1.25rem .35rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #a1acb8;
  font-weight: 700;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1.25rem;
  color: #697a8d;
  text-decoration: none;
}

.menu-link:hover { color: var(--ras-brand); background: #f8fafb; }
.menu-item.active > .menu-link {
  color: var(--ras-brand);
  background: rgba(19, 60, 74, .08);
  border-right: 3px solid var(--ras-accent);
  font-weight: 600;
}
.menu-icon { width: 1.1rem; }

.layout-page { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.layout-navbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: rgba(255,255,255,.9) !important;
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #e6e6e8;
  padding: .85rem 1.25rem;
  margin: .75rem 1rem 0;
  border-radius: .75rem;
}
.content-wrapper { display: flex; flex-direction: column; flex: 1; }
.container-p-y { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.content-footer { border-top: 1px solid #e6e6e8; margin-top: auto; background: transparent; }
.card { border: 0; box-shadow: 0 .25rem 1rem rgba(161, 172, 184, .18); border-radius: .75rem; }

.layout-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 44, 54, .35);
  z-index: 1025;
}

@media (max-width: 1199.98px) {
  .layout-menu {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-105%);
    transition: transform .2s ease;
  }
  body.menu-open .layout-menu { transform: translateX(0); }
  body.menu-open .layout-overlay { display: block; }
  .layout-navbar { margin: .5rem; }
}

/* Vuexy-achtige timeline (Relatiekaart Historie) */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 1.15rem;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 2px;
  background: #e7e7e8;
}
.timeline-item {
  position: relative;
  padding-left: 3.25rem;
  padding-bottom: 1.35rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-indicator {
  position: absolute;
  left: 0.4rem;
  top: 0.15rem;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 2px solid #d9dee3;
  color: #697a8d;
  font-size: .85rem;
  z-index: 1;
}
.timeline-indicator-crm { border-color: #133c4a; color: #133c4a; }
.timeline-indicator-offertes { border-color: #c45c26; color: #c45c26; }
.timeline-indicator-abonnementen { border-color: #28c76f; color: #28c76f; }
.timeline-indicator-orders { border-color: #00cfe8; color: #00cfe8; }
.timeline-event {
  background: #f8f8f9;
  border-radius: .65rem;
  padding: .85rem 1rem;
}
.timeline-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .35rem;
}
.timeline-header h6 { font-size: .95rem; font-weight: 600; }
.timeline-meta {
  font-size: .8rem;
  color: #8592a3;
}
.timeline-meta .bi { margin-right: .2rem; }
.timeline-indicator-success { border-color: #28c76f; color: #28c76f; background: #e8f9f0; }
.timeline-indicator-secondary { border-color: #d9dee3; color: #a1acb8; }

/* Portaal polish */
.portal-breadcrumb {
  background: transparent;
  padding: 0;
  font-size: .85rem;
}
.portal-breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: #a1acb8; }
.portal-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: #8592a3;
}
.portal-empty .bi { font-size: 1.75rem; display: block; margin-bottom: .5rem; color: #c7cdd4; }
.portal-kpi-card { transition: transform .15s ease, box-shadow .15s ease; }
.portal-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 .35rem 1.15rem rgba(161, 172, 184, .28);
}
.portal-table-actions { white-space: nowrap; }
@media (max-width: 767.98px) {
  .portal-table-stack thead { display: none; }
  .portal-table-stack tbody tr {
    display: block;
    border-bottom: 1px solid #eef0f2;
    padding: .85rem 1rem;
  }
  .portal-table-stack tbody td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border: 0 !important;
    padding: .2rem 0 !important;
  }
  .portal-table-stack tbody td::before {
    content: attr(data-label);
    color: #8592a3;
    font-size: .8rem;
    flex: 0 0 40%;
  }
  .portal-table-stack tbody td.portal-table-actions {
    justify-content: flex-end;
    margin-top: .35rem;
  }
  .portal-table-stack tbody td.portal-table-actions::before { display: none; }
  .layout-navbar .badge.text-bg-secondary { display: none; }
}
/* Track & Trace (P1.1) */
.portal-track-icoon { width: 2.25rem; height: 2.25rem; flex: 0 0 2.25rem; }
.portal-track-compact .portal-track-icoon { width: 1.5rem; height: 1.5rem; flex-basis: 1.5rem; font-size: .75rem; }
.portal-track-stap { position: relative; }
@media (min-width: 768px) {
  .portal-track-stap + .portal-track-stap::before {
    content: ""; position: absolute; top: 1.125rem; right: 50%; width: 100%; height: 2px;
    background: #dee2e6; z-index: 0; transform: translateX(-1.125rem);
  }
  .portal-track-compact .portal-track-stap + .portal-track-stap::before { top: .75rem; transform: translateX(-.75rem); }
  .portal-track-stap.is-bereikt + .portal-track-stap.is-bereikt::before { background: #71dd37; }
  .portal-track-icoon { position: relative; z-index: 1; }
}
/* PORTAL-018 Vandaag-dashboard */
.portal-vandaag-groet { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); font-weight: 700; letter-spacing: -.01em; }
.portal-vandaag-samenvatting { font-size: 1.125rem; max-width: 46rem; }
.portal-leverkaart { border: 0; border-radius: 1rem; box-shadow: 0 .5rem 1.5rem rgba(67, 89, 113, .12); background: linear-gradient(135deg, #ffffff 0%, #f4f6ff 100%); }
.portal-leverkaart .portal-klantstatus { font-size: .9rem; padding: .5em .8em; }
.portal-leverkaart-feiten .fs-4 { line-height: 1.2; }
.portal-zaken li + li { border-top: 1px solid #eceef1; }
.portal-zaak { display: flex; align-items: center; gap: .75rem; padding: .75rem .25rem; color: inherit; text-decoration: none; }
.portal-zaak:hover { background: #f5f5f9; border-radius: .5rem; }
.portal-zaak .bi { font-size: 1.25rem; color: #696cff; width: 1.5rem; text-align: center; }
.portal-zaak span { flex: 1 1 auto; }
.portal-zaak strong { white-space: nowrap; }
