/* ==========================================================================
   Brandtpunt klantportaal · portal.css
   Licht werkvlak, navy zijbalk, groene accenten · zelfde tokens als het theme
   ========================================================================== */

@font-face {
	font-family: "Archivo";
	src: url("../fonts/archivo-var.woff2") format("woff2");
	font-weight: 100 900;
	font-stretch: 62% 125%;
	font-display: swap;
}
@font-face {
	font-family: "Jakarta";
	src: url("../fonts/jakarta-var.woff2") format("woff2");
	font-weight: 200 800;
	font-display: swap;
}

:root {
	color-scheme: light;
	--navy-950: #070B1F;
	--navy-900: #0B1130;
	--navy-800: #111A45;
	--navy-700: #1A2563;
	--ink: #0B1130;
	--text: #4B5680;
	--muted: #8A93B2;
	--light: #EEF2FB;
	--light-2: #F6F8FD;
	--line: #D6DCEC;
	--lime: #C6FF3A;
	--mint: #3DF5B4;
	--green-dark: #12B07A;
	--good: #0E8F63;
	--bad: #C93B4B;
	--warn: #B7791F;
	--blue: #3B6CFF;
	--grad: linear-gradient(90deg, var(--lime), var(--mint));

	--f-display: "Archivo", "Arial Black", system-ui, sans-serif;
	--f-body: "Jakarta", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

	--radius: 18px;
	--radius-sm: 12px;
	--shadow: 0 18px 40px -26px rgba(11, 17, 48, .28), 0 1px 3px rgba(11, 17, 48, .05);
	--ease: cubic-bezier(.2, .7, .2, 1);
	--side: 256px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--light-2);
	color: var(--text);
	font-family: var(--f-body);
	font-size: 14.5px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 .8em; }
p:last-child { margin-bottom: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 2px; border-radius: 6px; }

h1, h2, h3 {
	margin: 0;
	color: var(--ink);
	font-family: var(--f-display);
	font-stretch: 118%;
	font-weight: 800;
	letter-spacing: -.04em;
	line-height: 1.02;
}
h1 { font-size: clamp(26px, 3vw, 34px); }
h2 { font-size: 18px; letter-spacing: -.03em; }
h3 { font-size: 15px; letter-spacing: -.02em; }

.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ico { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; }
.logo__mark { width: 28px; height: 28px; }
.logo__mark svg { width: 100%; height: 100%; }
.logo__text { font-family: var(--f-display); font-size: 20px; font-stretch: 112%; font-weight: 800; letter-spacing: -.045em; line-height: 1; }
.logo__tag {
	margin-left: 2px;
	padding: 4px 7px;
	border-radius: 99px;
	background: var(--grad);
	color: var(--navy-950);
	font-size: 9.5px;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
}

/* ---------- Knoppen ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 42px;
	padding: 0 18px;
	border: 0;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	white-space: nowrap;
	text-decoration: none;
	transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn--primary { background: var(--grad); color: var(--navy-950); box-shadow: 0 10px 24px -12px rgba(61, 245, 180, .8), inset 0 0 0 1px rgba(255, 255, 255, .35); }
.btn--dark { background: var(--navy-900); color: #fff; }
.btn--soft { background: var(--light); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn--danger { background: transparent; color: var(--bad); box-shadow: inset 0 0 0 1px rgba(201, 59, 75, .35); }
.btn--sm { height: 34px; padding: 0 14px; font-size: 11px; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Login ---------- */
.login {
	display: grid;
	place-items: center;
	min-height: 100vh;
	padding: 24px 16px;
	background:
		radial-gradient(600px 400px at 85% 10%, rgba(61, 245, 180, .14), transparent 70%),
		radial-gradient(500px 380px at 10% 90%, rgba(198, 255, 58, .10), transparent 70%),
		var(--navy-950);
}
.login__card {
	width: 100%;
	max-width: 420px;
	padding: 34px 30px;
	border-radius: 26px;
	background: #fff;
	box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6);
}
.login__brand { margin-bottom: 26px; }
.login__brand .logo { color: var(--ink); }
.login h1 { margin-bottom: 10px; }
.login p { margin-bottom: 20px; }
.login__demo { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }

/* ---------- Formulieren ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { color: var(--ink); font-size: 12.5px; font-weight: 700; }
.field small { color: var(--muted); font-size: 12px; }
.input, .select, .textarea {
	width: 100%;
	min-height: 44px;
	padding: 10px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: #fff;
	color: var(--ink);
	outline: none;
	transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--green-dark); box-shadow: 0 0 0 3px rgba(18, 176, 122, .15); }
.checks-row { display: flex; flex-wrap: wrap; gap: 8px; }
.check {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border: 1px solid var(--line);
	border-radius: 99px;
	background: #fff;
	color: var(--ink);
	font-size: 13px;
	cursor: pointer;
}
.check input { accent-color: var(--green-dark); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }

/* ---------- App-layout ---------- */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; background: linear-gradient(90deg, var(--navy-900) var(--side), transparent var(--side)); }
.side {
	position: sticky;
	top: 0;
	display: flex;
	flex-direction: column;
	gap: 22px;
	height: 100vh;
	padding: 22px 16px;
	background:
		radial-gradient(260px 220px at 100% 0%, rgba(61, 245, 180, .10), transparent 70%),
		var(--navy-900);
	color: rgba(255, 255, 255, .72);
	overflow-y: auto;
}
.side__brand { padding: 2px 8px; }
.side__client { display: grid; gap: 6px; padding: 0 4px; }
.side__client label { color: rgba(255, 255, 255, .45); font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.side__client .select { min-height: 40px; border-color: rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06); color: #fff; }
.side__client .select option { color: var(--ink); }
.side__client-name { color: #fff; font-family: var(--f-display); font-size: 15px; font-stretch: 112%; font-weight: 800; letter-spacing: -.03em; }
.nav { display: grid; gap: 2px; }
.nav__group { margin: 14px 10px 6px; color: rgba(255, 255, 255, .4); font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.nav a {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 10px 12px;
	border-radius: 12px;
	color: rgba(255, 255, 255, .75);
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color .2s, color .2s;
}
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.is-active { background: var(--grad); color: var(--navy-950); }
.nav__count { margin-left: auto; padding: 1px 8px; border-radius: 99px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 11px; }
.nav a.is-active .nav__count { background: var(--navy-950); color: var(--lime); }
.side__foot { margin-top: auto; padding: 14px 8px 0; border-top: 1px dashed rgba(255, 255, 255, .14); font-size: 12.5px; }
.side__foot strong { display: block; overflow: hidden; color: #fff; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.side__foot button { margin-top: 6px; padding: 0; border: 0; background: none; color: rgba(255, 255, 255, .55); font-size: 12.5px; text-decoration: underline; }
.side__foot button:hover { color: #fff; }

.topbar { display: none; }

.main { min-width: 0; padding: 30px 34px 60px; }
.demo-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	margin-bottom: 22px;
	padding: 10px 16px;
	border-radius: var(--radius-sm);
	background: var(--navy-900);
	color: rgba(255, 255, 255, .8);
	font-size: 13px;
}
.demo-banner b { color: var(--lime); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head p { margin: 6px 0 0; }
.eyebrow { display: block; margin-bottom: 8px; color: var(--green-dark); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

/* Periodekeuze */
.seg { display: inline-flex; padding: 4px; border-radius: 99px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.seg button { height: 32px; padding: 0 14px; border: 0; border-radius: 99px; background: none; color: var(--text); font-size: 12.5px; font-weight: 700; }
.seg button.is-active { background: var(--navy-900); color: #fff; }

/* ---------- Kaarten ---------- */
.grid { display: grid; gap: 16px; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.stack { display: grid; gap: 16px; align-content: start; }
.section { margin-top: 16px; }

.card {
	min-width: 0;
	padding: 20px 22px;
	border: 1px solid #E3E8F4;
	border-radius: var(--radius);
	background: #fff;
	box-shadow: var(--shadow);
}
.card--tint { background: var(--light); border-color: transparent; box-shadow: none; }
.card--navy { background: var(--navy-900); border-color: transparent; color: rgba(255, 255, 255, .75); }
.card--navy h2, .card--navy h3 { color: #fff; }
.card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card__head p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.card__src { color: var(--muted); font-size: 11.5px; }

/* KPI-tegels */
.kpi { display: grid; gap: 4px; }
.kpi__label { color: var(--text); font-size: 12.5px; font-weight: 600; }
.kpi__value { color: var(--ink); font-family: var(--f-display); font-size: 28px; font-stretch: 112%; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; }
.delta svg { width: 12px; height: 12px; }
.delta--up { color: var(--good); }
.delta--down { color: var(--bad); }
.delta--flat { color: var(--muted); }
.kpi__sub { color: var(--muted); font-size: 12px; font-weight: 500; }

/* Grafiek */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: #E6EAF4; stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-size: 11px; font-family: var(--f-body); }
.chart .line { fill: none; stroke: var(--navy-700); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: url(#chartFill); }
.chart .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .dot { fill: var(--navy-700); stroke: #fff; stroke-width: 2; }
.chart__tip {
	position: absolute;
	top: 0;
	z-index: 2;
	padding: 8px 10px;
	border-radius: 10px;
	background: var(--navy-900);
	color: #fff;
	font-size: 12px;
	line-height: 1.35;
	white-space: nowrap;
	pointer-events: none;
	transform: translateX(-50%);
}
.chart__tip b { display: block; font-size: 14px; }
.metric-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.metric-tabs button { height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--text); font-size: 12px; font-weight: 700; }
.metric-tabs button.is-active { border-color: var(--navy-900); background: var(--navy-900); color: #fff; }

/* Tabellen */
.table-wrap { overflow-x: auto; margin: 0 -6px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 8px 6px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 10px 6px; border-bottom: 1px solid #EEF1F8; color: var(--ink); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.trunc { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-pill { display: inline-block; min-width: 38px; padding: 2px 8px; border-radius: 99px; background: var(--light); color: var(--ink); font-weight: 700; text-align: center; }
.pos-pill--top { background: rgba(18, 176, 122, .14); color: var(--good); }

/* Balkjes (kanalen) */
.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 120px 1fr 54px; align-items: center; gap: 10px; font-size: 13px; }
.bar__track { height: 10px; border-radius: 99px; background: var(--light); overflow: hidden; }
.bar__fill { height: 100%; border-radius: 99px; background: var(--navy-700); }
.bar__val { color: var(--ink); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

/* Snelheid */
.gauge { display: flex; align-items: center; gap: 16px; }
.gauge__ring { position: relative; width: 84px; height: 84px; flex: none; }
.gauge__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge__ring span { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); font-family: var(--f-display); font-size: 24px; font-stretch: 112%; font-weight: 800; }
.vitals { display: grid; gap: 8px; margin-top: 16px; }
.vital { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--light-2); font-size: 13px; }
.vital b { color: var(--ink); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status--good { color: var(--good); }
.status--ni { color: var(--warn); }
.status--poor { color: var(--bad); }

/* Tijdlijn */
.timeline { position: relative; display: grid; gap: 14px; }
.timeline::before { content: ""; position: absolute; top: 6px; bottom: 6px; left: 7px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-left: 30px; }
.tl-item::before { content: ""; position: absolute; top: 22px; left: 1px; width: 14px; height: 14px; border: 3px solid var(--light-2); border-radius: 50%; background: var(--navy-700); }
.tl-item--maand::before { background: var(--grad); }
.tl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.tag { display: inline-block; padding: 3px 9px; border-radius: 99px; background: var(--light); color: var(--ink); font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.tag--grad { background: var(--grad); color: var(--navy-950); }
.tag--warn { background: rgba(183, 121, 31, .14); color: var(--warn); }
.tl-body { white-space: pre-line; }

/* Actiepunten */
.task { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid #EEF1F8; }
.task:last-child { border-bottom: 0; }
.task__box {
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	flex: none;
	margin-top: 1px;
	border: 2px solid var(--line);
	border-radius: 8px;
	background: #fff;
	color: var(--navy-950);
}
.task__box svg { width: 14px; height: 14px; opacity: 0; }
.task.is-done .task__box { border-color: transparent; background: var(--grad); }
.task.is-done .task__box svg { opacity: 1; }
.task.is-done .task__title { color: var(--muted); text-decoration: line-through; }
.task__title { color: var(--ink); font-weight: 700; }
.task__desc { margin-top: 2px; font-size: 13px; }
.task__due { margin-left: auto; flex: none; color: var(--muted); font-size: 12px; white-space: nowrap; }

/* Bestanden */
.file { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #EEF1F8; }
.file:last-child { border-bottom: 0; }
.file__ico { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--light); color: var(--navy-700); }
.file__name { color: var(--ink); font-weight: 700; word-break: break-word; }
.file__actions { margin-left: auto; display: flex; gap: 6px; }

/* Lege staat en meldingen */
.empty { padding: 28px 10px; color: var(--muted); text-align: center; }
.notice { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--light); color: var(--ink); font-size: 13px; }
.notice--warn { background: rgba(183, 121, 31, .12); color: #7A4F12; }
.skeleton { height: 120px; border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--light) 0%, var(--light-2) 50%, var(--light) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
.toast {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 50;
	max-width: calc(100vw - 40px);
	padding: 12px 16px;
	border-radius: 12px;
	background: var(--navy-900);
	color: #fff;
	font-size: 13.5px;
	box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .5);
	animation: toastIn .25s var(--ease);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* Beheer */
.admin-list { display: grid; gap: 8px; }
.admin-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--light-2); }
.admin-row strong { color: var(--ink); }
.admin-row .btn-row { margin-left: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 99px; background: var(--light); color: var(--ink); font-size: 12.5px; }
.chip button { display: grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: #fff; color: var(--muted); font-size: 13px; line-height: 1; }
.question { padding: 14px 0; border-bottom: 1px solid #EEF1F8; }
.question:last-child { border-bottom: 0; }

/* ---------- Responsief ---------- */
@media (max-width: 1180px) {
	.grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.grid--main { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
	.app { grid-template-columns: 1fr; background: none; }
	.side {
		position: fixed;
		inset: 0 auto 0 0;
		z-index: 40;
		width: min(300px, 86vw);
		transform: translateX(-100%);
		transition: transform .3s var(--ease);
	}
	.app.nav-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(7, 11, 31, .5); }
	.topbar {
		position: sticky;
		top: 0;
		z-index: 30;
		display: flex;
		align-items: center;
		justify-content: space-between;
		height: 60px;
		padding: 0 16px;
		background: var(--navy-900);
	}
	.topbar button { display: grid; gap: 4px; padding: 10px; border: 0; background: none; }
	.topbar button span { display: block; width: 20px; height: 2px; border-radius: 2px; background: #fff; }
	.main { padding: 20px 16px 50px; }
	.grid--3, .grid--2 { grid-template-columns: 1fr; }
	.form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
	.grid--4 { grid-template-columns: 1fr 1fr; gap: 10px; }
	.card { padding: 16px; }
	.kpi__value { font-size: 23px; }
	.bar { grid-template-columns: 90px 1fr 44px; }
	.task__due { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
