/*
 * hrrecht.nl, huisstijl
 * Handgeschreven CSS met custom properties. Geen build-stap nodig.
 * Kleuren: indigo als merkkleur, mintgroen als accent, warm grijs als neutraal.
 */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/Inter-Medium.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/Inter-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/Inter-Bold.woff2") format("woff2"); }

:root {
  /* Merkkleuren */
  --indigo-900: #1E1B4B;
  --indigo-800: #2A2670;
  --indigo-700: #3730A3;
  --indigo-600: #4338CA;
  --indigo-500: #4F46E5;
  --indigo-100: #E0E7FF;
  --indigo-50: #EEF2FF;
  --mint-700: #047857;   /* mint voor tekst op licht (contrast 5,5:1) */
  --mint-500: #34D399;
  --mint-200: #A7F3D0;
  --mint-100: #D1FAE5;
  --mint-50: #ECFDF5;

  /* Neutraal (warm grijs) */
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;

  /* Signaal */
  --red-700: #B91C1C;
  --red-50: #FEF2F2;
  --amber-800: #92400E;
  --amber-50: #FFFBEB;

  /* Toepassing */
  --text: var(--gray-900);
  --text-muted: var(--gray-600);
  --heading: var(--indigo-900);
  --link: var(--indigo-500);
  --link-hover: var(--indigo-700);
  --surface: #FFFFFF;
  --surface-soft: var(--gray-50);
  --border: var(--gray-200);
  --focus: var(--indigo-500);

  --font: "Inter", "Source Sans 3", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-lg: 0 10px 30px rgba(30, 27, 75, .10);
  --content: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { color: var(--heading); line-height: 1.25; margin: 0 0 .6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 1em; }
small, .small { font-size: .875rem; }
.muted { color: var(--text-muted); }
.lead { font-size: 1.15rem; color: var(--gray-700); max-width: 44rem; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--indigo-900); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { left: 8px; color: #fff; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

.container { width: 100%; max-width: var(--content); margin: 0 auto; padding: 0 20px; }
.stack > * + * { margin-top: 1rem; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.flex { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.flex-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; line-height: 1; }
.logo svg { width: 32px; height: 32px; flex: none; }
.logo .logo-hr { color: var(--indigo-900); }
.logo .logo-recht { color: var(--mint-700); font-weight: 600; }
.logo--dark .logo-hr { color: #fff; }
.logo--dark .logo-recht { color: var(--mint-500); }

/* Knoppen */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.2;
  padding: 11px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
  background: var(--indigo-500); color: #fff;
}
.btn:hover { background: var(--indigo-700); color: #fff; }
.btn-secondary { background: #fff; color: var(--indigo-700); border-color: var(--gray-300); }
.btn-secondary:hover { background: var(--indigo-50); color: var(--indigo-900); border-color: var(--indigo-100); }
.btn-mint { background: var(--mint-500); color: var(--indigo-900); }
.btn-mint:hover { background: var(--mint-200); color: var(--indigo-900); }
.btn-ghost { background: transparent; color: var(--indigo-700); padding-left: 8px; padding-right: 8px; }
.btn-ghost:hover { background: var(--indigo-50); color: var(--indigo-900); }
.btn-danger { background: #fff; color: var(--red-700); border-color: #FCA5A5; }
.btn-danger:hover { background: var(--red-50); color: var(--red-700); }
.btn-sm { padding: 7px 12px; font-size: .85rem; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn[disabled], .btn.is-disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; cursor: pointer; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--gray-100); color: var(--gray-700); white-space: nowrap; }
.badge-mint { background: var(--mint-100); color: var(--indigo-900); }
.badge-indigo { background: var(--indigo-100); color: var(--indigo-900); }
.badge-amber { background: var(--amber-50); color: var(--amber-800); border: 1px solid #FCD34D; }
.badge-red { background: var(--red-50); color: var(--red-700); }
.badge-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge-demo { background: var(--mint-100); color: var(--indigo-900); text-transform: lowercase; letter-spacing: .02em; }

/* Kaarten en vlakken */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h2, .card h3 { margin-top: 0; }
.card-soft { background: var(--mint-50); border-color: var(--mint-200); box-shadow: none; }
.card-indigo { background: var(--indigo-900); color: #fff; border-color: var(--indigo-900); }
.card-indigo h2, .card-indigo h3 { color: #fff; }
.card-indigo .muted { color: var(--indigo-100); }
.card-link { display: block; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.card-link:hover { border-color: var(--indigo-500); box-shadow: var(--shadow-lg); color: inherit; }
.panel-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.panel-title h2, .panel-title h3 { margin: 0; }

.icon { width: 40px; height: 40px; border-radius: 10px; background: var(--mint-100); color: var(--indigo-900); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.icon svg { width: 22px; height: 22px; }

/* Meldingen */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-soft); margin-bottom: 16px; }
.alert-success { background: var(--mint-50); border-color: var(--mint-200); color: var(--indigo-900); }
.alert-error { background: var(--red-50); border-color: #FECACA; color: var(--red-700); }
.alert-info { background: var(--indigo-50); border-color: var(--indigo-100); color: var(--indigo-900); }
.alert-warning { background: var(--amber-50); border-color: #FCD34D; color: var(--amber-800); }
.notice { display: flex; gap: 10px; align-items: flex-start; font-size: .875rem; color: var(--gray-700); background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; }
.notice svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--mint-700); }

/* Formulieren */
.form-row { margin-bottom: 18px; }
label, .label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--gray-800); }
.hint { display: block; font-size: .825rem; color: var(--text-muted); margin-top: 4px; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel], input[type=search], input[type=file], select, textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--text);
  padding: 10px 12px; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); background: #fff;
}
input[type=file] { padding: 8px; background: var(--surface-soft); }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--indigo-500); box-shadow: 0 0 0 3px rgba(79, 70, 229, .18); }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.checkbox input { margin-top: 5px; width: 16px; height: 16px; flex: none; accent-color: var(--indigo-500); }
.form-inline { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.form-inline > * { margin-bottom: 0; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.inline-form { display: inline; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin: 0 0 18px; }
legend { font-weight: 600; padding: 0 6px; color: var(--heading); }

/* Tabellen */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .925rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); font-weight: 600; background: var(--surface-soft); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tfoot td { font-weight: 600; background: var(--surface-soft); }
.table-plain { border: 0; }
.table-plain th { background: none; }

dl.meta { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; font-size: .925rem; }
dl.meta dt { color: var(--text-muted); }
dl.meta dd { margin: 0; font-weight: 500; }

/* Publieke site */
.site-header { border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, .96); position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(1.2) blur(6px); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { color: var(--gray-700); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 8px 12px; border-radius: var(--radius-sm); }
.site-nav a:hover, .site-nav a[aria-current=page] { color: var(--indigo-900); background: var(--indigo-50); }
.site-nav .btn { margin-left: 8px; color: #fff; }
.site-nav .btn:hover { background: var(--indigo-700); color: #fff; }
.site-nav .nav-login { color: var(--indigo-700); }
.nav-toggle { display: none; background: none; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); padding: 8px 10px; cursor: pointer; color: var(--indigo-900); }

.hero { padding: 80px 0 64px; background: linear-gradient(180deg, var(--mint-50) 0%, #fff 100%); }
.hero h1 { max-width: 46rem; }
.hero .lead { margin-bottom: 28px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--mint-700); margin-bottom: 14px; }
.section { padding: 72px 0; }
.section-soft { background: var(--surface-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-indigo { background: var(--indigo-900); color: #E0E7FF; }
.section-indigo h2, .section-indigo h3 { color: #fff; }
.section-head { max-width: 42rem; margin-bottom: 36px; }
.feature h3 { margin-top: 14px; }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.steps li::before { counter-increment: step; content: counter(step); display: inline-flex; width: 34px; height: 34px; border-radius: 50%; background: var(--indigo-900); color: #fff; font-weight: 700; align-items: center; justify-content: center; margin-bottom: 12px; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--mint-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%231E1B4B' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.crosslist { list-style: none; padding: 0; margin: 0; }
.crosslist li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.crosslist li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--gray-200) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6.5 6.5l7 7M13.5 6.5l-7 7' fill='none' stroke='%23475569' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.cta-band { background: var(--indigo-900); color: #E0E7FF; border-radius: var(--radius-lg); padding: 44px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { margin: 0; }
.mock-chat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 18px; font-size: .9rem; }
.mock-chat .bubble { margin-bottom: 10px; }
.page-head { padding: 56px 0 24px; background: var(--mint-50); border-bottom: 1px solid var(--mint-100); }
.page-head .lead { margin-bottom: 0; }
.prose { max-width: 46rem; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .35rem; }
.placeholder-note { background: var(--amber-50); border: 1px dashed #F59E0B; color: var(--amber-800); padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 24px; font-size: .9rem; }

.price-table td:first-child { font-weight: 500; }
.calculator { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.calculator output { display: block; }
.calc-total { display: block; margin: 2px 0 4px; font-size: 2rem; font-weight: 700; color: var(--indigo-900); letter-spacing: -0.02em; line-height: 1.2; }
.calc-lines { width: 100%; font-size: .9rem; }
.calc-lines td { padding: 6px 0; border-bottom: 1px dashed var(--border); }
.calc-lines td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.range-row { display: flex; gap: 14px; align-items: center; }
.range-row input[type=range] { flex: 1; accent-color: var(--indigo-500); }
.range-row input[type=number] { width: 120px; }

.site-footer { background: var(--indigo-900); color: #C7D2FE; padding: 56px 0 28px; margin-top: 0; font-size: .925rem; }
.site-footer a { color: #E0E7FF; text-decoration: none; }
.site-footer a:hover { color: var(--mint-500); text-decoration: underline; }
.site-footer h3 { color: #fff; font-size: .95rem; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.1fr 1fr 1fr; gap: 28px; }
.footer-bottom { border-top: 1px solid rgba(224, 231, 255, .15); margin-top: 40px; padding-top: 20px; font-size: .85rem; color: #A5B4FC; }

/* Portaal en admin */
.app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; background: var(--surface-soft); }
.sidebar { background: var(--indigo-900); color: #C7D2FE; padding: 22px 16px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .logo { padding: 0 8px; }
.sidebar-tenant { padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .06); font-size: .85rem; }
.sidebar-tenant strong { display: block; color: #fff; font-weight: 600; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav .nav-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #A5B4FC; padding: 14px 12px 6px; }
.side-nav a { display: flex; align-items: center; gap: 10px; color: #E0E7FF; text-decoration: none; padding: 9px 12px; border-radius: var(--radius-sm); font-size: .925rem; font-weight: 500; }
.side-nav a svg { width: 18px; height: 18px; opacity: .85; flex: none; }
.side-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.side-nav a[aria-current=page] { background: var(--mint-500); color: var(--indigo-900); }
.side-nav a[aria-current=page] svg { opacity: 1; }
.side-nav .count { margin-left: auto; font-size: .75rem; background: rgba(255, 255, 255, .14); padding: 1px 8px; border-radius: 999px; }
.sidebar-foot { margin-top: auto; font-size: .85rem; border-top: 1px solid rgba(224, 231, 255, .15); padding-top: 16px; }
.sidebar-foot a, .sidebar-foot button { color: #E0E7FF; }
.sidebar-foot .user-name { color: #fff; font-weight: 600; display: block; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.content { padding: 32px 40px 56px; max-width: 1240px; width: 100%; }
.page-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-title h1 { font-size: 1.65rem; margin-bottom: 4px; }
.page-title p { margin: 0; color: var(--text-muted); }
.breadcrumb { font-size: .85rem; color: var(--text-muted); margin-bottom: 6px; }
.breadcrumb a { color: var(--text-muted); }
.stat { padding: 18px 20px; }
.stat .stat-value { font-size: 1.7rem; font-weight: 700; color: var(--indigo-900); line-height: 1.2; }
.stat .stat-label { font-size: .85rem; color: var(--text-muted); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 12px 0; border-bottom: 1px solid var(--border); display: flex; gap: 12px; justify-content: space-between; align-items: center; }
.list li:last-child { border-bottom: 0; }
.list .title { font-weight: 600; color: var(--indigo-900); text-decoration: none; }
.list .title:hover { text-decoration: underline; }
.empty { text-align: center; padding: 36px 16px; color: var(--text-muted); }
.starter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.starter { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.starter:hover { border-color: var(--mint-500); box-shadow: 0 0 0 3px var(--mint-100); color: var(--text); }
.starter strong { color: var(--indigo-900); }
.starter span { font-size: .85rem; color: var(--text-muted); }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--gray-600); border-bottom: 2px solid transparent; font-weight: 500; font-size: .925rem; }
.tabs a[aria-current=page] { color: var(--indigo-900); border-color: var(--indigo-500); }
.tag-list { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: .8rem; padding: 3px 10px; border-radius: 999px; background: var(--indigo-50); color: var(--indigo-700); text-decoration: none; }
.tag:hover, .tag[aria-current=true] { background: var(--indigo-500); color: #fff; }
.status-check { list-style: none; margin: 0; padding: 0; }
.status-check li { display: grid; grid-template-columns: 24px 220px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.status-check .dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 6px; }
.dot-ok { background: var(--mint-500); }
.dot-let_op { background: #F59E0B; }
.dot-fout { background: #DC2626; }

/* Chat */
.chat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.chat { display: flex; flex-direction: column; gap: 16px; }
.message { display: flex; gap: 12px; align-items: flex-start; }
.message .avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; }
.message-user .avatar { background: var(--indigo-100); color: var(--indigo-900); }
.message-assistant .avatar { background: var(--indigo-900); }
.message-assistant .avatar svg { width: 22px; height: 22px; }
.bubble { min-width: 0; flex: 1; border-radius: var(--radius); padding: 14px 18px; border: 1px solid var(--border); background: #fff; }
.message-assistant .bubble { background: var(--mint-50); border-color: var(--mint-200); }
.bubble-meta { display: flex; gap: 10px; align-items: center; justify-content: space-between; font-size: .8rem; color: var(--text-muted); margin-bottom: 6px; flex-wrap: wrap; }
.bubble-meta strong { color: var(--gray-800); font-weight: 600; }
.bubble-body { overflow-wrap: anywhere; }
.bubble-body > :last-child { margin-bottom: 0; }
.bubble-body h1, .bubble-body h2 { font-size: 1.1rem; margin-top: 1.1em; }
.bubble-body h3 { font-size: 1rem; margin-top: 1em; }
.bubble-body h1:first-child, .bubble-body h2:first-child, .bubble-body h3:first-child { margin-top: 0; }
.bubble-body ul, .bubble-body ol { padding-left: 1.3rem; margin: 0 0 1em; }
.bubble-body li { margin-bottom: .25rem; }
.bubble-body table { margin: .5em 0 1em; font-size: .875rem; background: #fff; }
.bubble-body pre, .bubble-body code { white-space: pre-wrap; font-size: .875rem; }
.bubble-body.is-streaming { white-space: pre-wrap; }
.bubble-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--mint-200); }
.message-user .bubble-body { white-space: pre-wrap; }
.typing { display: inline-flex; gap: 4px; align-items: center; padding: 4px 0; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--indigo-500); animation: blink 1.2s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.composer { position: sticky; bottom: 0; background: linear-gradient(180deg, rgba(248, 250, 252, 0) 0%, var(--surface-soft) 22%); padding-top: 20px; margin-top: 8px; }
.composer form { background: #fff; border: 1px solid var(--gray-300); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); }
.composer textarea { border: 0; min-height: 70px; padding: 6px 8px; box-shadow: none; }
.composer textarea:focus { box-shadow: none; }
.composer-bar { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 4px 2px; }
.chat-side .card { padding: 18px; }
.chat-side .card + .card { margin-top: 16px; }
.file-list { list-style: none; padding: 0; margin: 0 0 12px; font-size: .875rem; }
.file-list li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); align-items: center; }
.file-list a { overflow-wrap: anywhere; }
.agent-error { border: 1px solid #FECACA; background: var(--red-50); color: var(--red-700); border-radius: var(--radius-sm); padding: 10px 14px; font-size: .9rem; }

/* Berichtenthread DHKV */
.thread { display: flex; flex-direction: column; gap: 12px; }
.thread-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; background: #fff; }
.thread-item.staff { background: var(--indigo-50); border-color: var(--indigo-100); }
.thread-item .bubble-body { white-space: pre-wrap; }

/* Authenticatie */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; background: linear-gradient(160deg, var(--mint-50) 0%, #fff 55%, var(--indigo-50) 100%); }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .card { padding: 32px; }
.auth-card .logo { margin-bottom: 28px; }
.qr { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; display: inline-block; }
.secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .95rem; letter-spacing: .08em; background: var(--surface-soft); padding: 6px 10px; border-radius: var(--radius-sm); word-break: break-all; }

.mail-view { white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; background: #fff; border: 1px solid var(--border); padding: 16px; border-radius: var(--radius); }
.pagination { display: flex; gap: 8px; margin-top: 16px; }
.danger-zone { border: 1px solid #FECACA; background: var(--red-50); }
.danger-zone h3 { color: var(--red-700); }

/* Responsief */
@media (max-width: 1024px) {
  .chat-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero-grid, .grid-2, .grid-3, .calculator { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 40px; }
  .section { padding: 52px 0; }
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); flex-direction: column; align-items: stretch; padding: 12px 16px 18px; box-shadow: var(--shadow-lg); }
  .site-nav.is-open { display: flex; }
  .site-nav .btn { margin: 8px 0 0; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 30% 0 0; z-index: 50; transform: translateX(-100%); transition: transform .2s; height: 100vh; }
  .sidebar.is-open { transform: none; box-shadow: var(--shadow-lg); }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
  .content { padding: 20px 16px 48px; }
  .status-check li { grid-template-columns: 20px 1fr; }
  .status-check li > :last-child { grid-column: 2; }
  .cta-band { padding: 28px; }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  dl.meta { grid-template-columns: 1fr; }
  dl.meta dd { margin-bottom: 8px; }
  .container { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
/* Bronnencontrole onder een antwoord van de agent */
.source-check { margin-top: 14px; border: 1px solid var(--mint-200); border-radius: var(--radius-sm); background: var(--mint-50); font-size: .875rem; }
.source-check-warn { border-color: #FCD34D; background: var(--amber-50); }
.source-check summary { cursor: pointer; padding: 8px 12px; display: flex; align-items: center; gap: 8px; color: var(--mint-700); font-weight: 600; list-style: none; }
.source-check summary::-webkit-details-marker { display: none; }
.source-check-warn summary { color: var(--amber-800); }
.source-check summary svg { width: 16px; height: 16px; flex: none; }
.source-list { list-style: none; margin: 0; padding: 0 12px 4px; }
.source-list li { display: grid; grid-template-columns: 130px 1fr; gap: 2px 10px; padding: 6px 0; border-top: 1px solid rgba(15, 23, 42, .06); }
.source-status { font-weight: 600; font-size: .8125rem; }
.source-list .is-ok .source-status { color: var(--mint-700); }
.source-list .is-warn .source-status { color: var(--red-700); }
.source-list .is-neutral .source-status { color: var(--gray-600); }
.source-note { grid-column: 2; color: var(--text-muted); font-size: .8125rem; }
.source-explain { margin: 4px 12px 10px; color: var(--text-muted); font-size: .8125rem; }
@media (max-width: 640px) {
  .source-list li { grid-template-columns: 1fr; }
  .source-note { grid-column: 1; }
}

/* Kennisbank: voorproefje en afgeschermde artikelen */
.badge-lock { display: inline-flex; align-items: center; gap: 4px; background: var(--indigo-50); color: var(--indigo-700); border: 1px solid var(--indigo-100); }
.badge-lock svg { width: 12px; height: 12px; }
.card-locked h3 { color: var(--gray-700); }
.kb-excerpt { position: relative; max-height: none; }
.kb-excerpt::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(to bottom, rgba(255,255,255,0), var(--surface)); pointer-events: none; }
.kb-locked { margin-top: -24px; position: relative; }
.kb-locked-box { background: var(--indigo-50); border: 1px solid var(--indigo-100); border-radius: var(--radius-lg); padding: 28px; }
.kb-locked-box h2 { margin: 10px 0 8px; }
.kb-locked-box .flex { margin: 16px 0 12px; }

@media print {
  .sidebar, .topbar, .composer, .site-header, .site-footer, .chat-side, .bubble-actions { display: none !important; }
  .app { display: block; }
}

/* Eenvoudige navigatie zonder uitklapmenu (accountpagina) */
.site-nav.is-static { display: flex; position: static; flex-direction: row; box-shadow: none; border: 0; padding: 0; background: none; }
.d-block { display: block; }
@media (max-width: 1000px) { .content .grid-2, .content .grid-3 { grid-template-columns: 1fr; } }
.nav-toggle svg { width: 22px; height: 22px; }

/* Kennisbank (publiek en portaal) */
.kb-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; }
.kb-toolbar { margin-bottom: 16px; }
.kb-toolbar .form-inline { display: flex; gap: 8px; flex-wrap: wrap; }
.kb-toolbar input[type=search] { flex: 1 1 260px; }
.grid-article { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.kb-article { max-width: 46rem; }
.kb-article table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 1rem 0; }
.kb-article th, .kb-article td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.kb-article th { background: var(--surface-soft); }
.kb-aside { display: grid; gap: 16px; position: sticky; top: 24px; }
.kb-related { list-style: none; padding: 0; margin: 0; }
.kb-related li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.kb-related li:last-child { border-bottom: 0; }
.kb-footer { border-top: 1px solid var(--border); padding-top: 16px; }
.faq-narrow { max-width: 52rem; margin: 0 auto; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 10px; background: #fff; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details[open] summary { margin-bottom: 8px; }
.compare { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.compare th, .compare td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; font-size: .95rem; }
.compare th { background: var(--surface-soft); }
.compare td:first-child { font-weight: 600; width: 24%; }
@media (max-width: 900px) { .grid-article { grid-template-columns: 1fr; } .kb-aside { position: static; } }

/* HR-portaal */
.form-row-grow { flex: 1; min-width: 220px; margin: 0; }
.form-row-tight { margin: 0; }
.hr-timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.hr-timeline li { position: relative; padding: 0 0 16px 20px; }
.hr-timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--indigo-500); border: 2px solid #fff; }
.hr-timeline li.is-done::before { background: var(--mint-500); }
.hr-timeline li.is-late::before { background: var(--red-700); }
.hr-progress { height: 8px; background: var(--gray-100); border-radius: 999px; overflow: hidden; }
.hr-progress span { display: block; height: 100%; background: var(--indigo-500); }
.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.module-tile { display: block; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; text-decoration: none; color: inherit; }
.module-tile:hover { border-color: var(--indigo-500); color: inherit; }
.module-tile strong { display: block; color: var(--indigo-900); margin-bottom: 4px; }
.module-tile span { font-size: .875rem; color: var(--text-muted); }
.text-amber { color: var(--amber-800); }

/* Cookiebanner */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; padding: 1rem; background: var(--indigo-900); color: #fff; box-shadow: 0 -8px 30px rgba(30, 27, 75, 0.25); }
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner { max-width: 1120px; margin: 0 auto; display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cookie-banner-title { font-weight: 600; margin: 0 0 0.25rem; }
.cookie-banner-text { margin: 0; font-size: 0.9375rem; line-height: 1.5; color: var(--indigo-100); max-width: 70ch; }
.cookie-banner-text a { color: #fff; text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.cookie-banner .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.cookie-banner .btn-secondary:hover { background: rgba(255, 255, 255, 0.1); }
@media (max-width: 640px) { .cookie-banner-actions { width: 100%; } .cookie-banner-actions .btn { flex: 1 1 auto; } }

/* Salarissysteem */
dl.facts { display: grid; grid-template-columns: minmax(140px, 42%) 1fr; gap: 8px 16px; margin: 0 0 12px; }
dl.facts dt { color: var(--text-muted); font-size: .925rem; }
dl.facts dd { margin: 0; }
@media (max-width: 640px) { dl.facts { grid-template-columns: 1fr; gap: 2px; } dl.facts dd { margin-bottom: 8px; } }
.signal { border-left: 3px solid var(--border, #E2E8F0); padding-left: 12px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 8px 0; border-bottom: 1px solid var(--border, #E2E8F0); }
.timeline li:last-child { border-bottom: 0; }
