:root {
  --brand-primary: #e81a85;
  --brand-accent: #b02ce0;
  --brand-muted: #8b8792;
  --brand-gray: #c9c6cf;
  --brand-dark: #14131a;
  --brand-bg: #ffffff;
  --brand-bg-soft: #fbfafc;
  --brand-border: #efedf1;
  --brand-grad: linear-gradient(120deg, #e81a85, #b02ce0);
  --ok: #1f9d55;
  --warn: #c77700;
  --bad: #d12c2c;
  --font-head: 'Poppins', sans-serif;
  --font-main: 'Poppins', sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-main); color: var(--brand-dark); background: var(--brand-bg); font-size: 15px; line-height: 1.55; }
a { color: var(--brand-primary); text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 28px 24px 80px; }

header.top { display: flex; align-items: center; gap: 28px; padding: 14px 24px; border-bottom: 3px solid transparent; border-image: var(--brand-grad) 1; position: sticky; top: 0; background: #fff; z-index: 10; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { height: 22px; }
.product { font-family: var(--font-head); font-weight: 700; font-size: 18px; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1 1 480px; }
nav a { color: var(--brand-dark); padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; }
nav a.active, nav a:hover { background: var(--brand-bg-soft); color: var(--brand-primary); }
.who { font-size: 13px; color: var(--brand-muted); text-align: right; }

.banner { background: #fff6e5; border-bottom: 1px solid #f3dfb4; color: #7a4b00; padding: 8px 24px; font-size: 13px; }

h1 { font-family: var(--font-head); font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 4px; }
h2 { font-family: var(--font-head); font-size: 20px; font-weight: 700; margin: 32px 0 12px; }
.subtitle { color: var(--brand-muted); margin-bottom: 22px; }
.muted { color: var(--brand-muted); }
.small { font-size: 12.5px; }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 18px 0 8px; }
.kpi { background: var(--brand-bg-soft); border: 1px solid var(--brand-border); border-radius: 12px; padding: 16px 18px; }
.kpi .value { font-family: var(--font-head); font-size: 26px; font-weight: 700; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kpi .label { font-size: 13px; color: var(--brand-muted); margin-top: 4px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0 18px; }
th { background: var(--brand-grad); color: #fff; font-weight: 600; text-align: left; padding: 9px 12px; white-space: nowrap; }
th.num, td.num { text-align: right; }
td { padding: 9px 12px; border-bottom: 1px solid var(--brand-border); vertical-align: top; }
tbody tr:nth-child(even) { background: var(--brand-bg-soft); }
td.waste { font-weight: 700; color: var(--brand-primary); }
td .sub { display: block; font-size: 12.5px; color: var(--brand-muted); }

.bars { display: grid; gap: 8px; margin: 10px 0 20px; }
.bar-row { display: grid; grid-template-columns: 200px 1fr 110px; gap: 12px; align-items: center; font-size: 14px; }
.bar { height: 14px; border-radius: 7px; background: var(--brand-primary); min-width: 2px; }
.bar-row .num { text-align: right; font-weight: 700; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 8px 0 14px; }
select, input[type=text] { font: inherit; padding: 7px 10px; border: 1px solid var(--brand-border); border-radius: 8px; background: #fff; }
button { font: inherit; font-weight: 600; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--brand-border); background: #fff; cursor: pointer; color: var(--brand-dark); }
button:hover { border-color: var(--brand-gray); }
button.primary { background: var(--brand-grad); color: #fff; border: 0; }
button.danger { color: var(--bad); }
button:disabled { opacity: .5; cursor: default; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--brand-bg-soft); border: 1px solid var(--brand-border); white-space: nowrap; }
.pill.kids, .pill.mfa, .pill.games, .pill.app, .pill.datacenter, .pill.bot { color: var(--brand-primary); border-color: #f7c2de; background: #fff2f9; }
.pill.open { color: var(--brand-accent); }
.pill.applied, .pill.approved { color: var(--ok); }
.pill.rejected, .pill.reverted { color: var(--brand-muted); }
.pill.failed { color: var(--bad); }
.score { font-weight: 800; }
.score.fraud { color: var(--bad); }
.score.suspicious { color: var(--warn); }

.card { border: 1px solid var(--brand-border); border-radius: 12px; padding: 18px 20px; margin: 14px 0; background: #fff; }
code, .code { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; background: var(--brand-bg-soft); border: 1px solid var(--brand-border); border-radius: 6px; padding: 8px 10px; display: block; white-space: pre-wrap; word-break: break-all; }
details summary { cursor: pointer; color: var(--brand-muted); font-size: 13px; }

.toast { position: fixed; bottom: 22px; right: 22px; background: var(--brand-dark); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; max-width: 420px; }
@media (max-width: 720px) { .bar-row { grid-template-columns: 1fr 1fr; } .bar-row .bar-wrap { display: none; } }

/* Pijlers: bescherming (roze) vs optimalisatie (paars) */
.pillar { border: 1px solid var(--brand-border); border-left: 4px solid var(--brand-primary); border-radius: 12px; padding: 4px 20px 16px; margin: 22px 0; }
.pillar.optimize { border-left-color: var(--brand-accent); }
.pillar.optimize .bar { background: var(--brand-accent); }
.pillar h2 { margin-top: 16px; }
.tabs { display: flex; gap: 6px; margin: 10px 0 6px; border-bottom: 1px solid var(--brand-border); }
.tabs .tab { padding: 8px 14px; font-weight: 700; color: var(--brand-muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs .tab.active { color: var(--brand-dark); border-image: var(--brand-grad) 1; border-bottom: 3px solid; }
.period { margin-top: 4px; }
input[type=date] { font: inherit; padding: 6px 8px; border: 1px solid var(--brand-border); border-radius: 8px; }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 80px; }
.spark div { flex: 1; background: var(--brand-primary); border-radius: 2px 2px 0 0; min-height: 1px; opacity: .85; }
.card h3 { font-family: var(--font-head); font-size: 15px; margin-bottom: 10px; }
.report-head { display: flex; align-items: center; gap: 16px; }
.printonly { display: none; }
td .actions { flex-direction: column; align-items: flex-start; }

@media print {
  header.top, .banner, .noprint, .toast, button, details summary { display: none !important; }
  .printonly { display: block; }
  .report-head .logo { height: 24px; }
  .container { padding: 0; max-width: none; }
  body { font-size: 12px; }
  .pillar, table, .card, .kpi-row { page-break-inside: avoid; }
  a { color: inherit; }
}
.pillar.exclusions { border-left-color: var(--brand-primary); }
.pillar.signals { border-left-color: var(--brand-accent); }
.pillar.signals .bar { background: var(--brand-accent); }
.pillar.fraud { border-left-color: var(--brand-dark); }
.pillar.fraud .bar { background: var(--brand-dark); }
.ctx { margin-top: 6px; padding: 6px 8px; background: var(--brand-bg-soft); border: 1px solid var(--brand-border); border-radius: 6px; font-size: 12.5px; }
@media (max-width: 1000px) { header.top { position: static; } }

/* Klantdashboard klikfraude */
.hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin: 16px 0; }
.hero > div { border: 1px solid var(--brand-border); border-radius: 14px; padding: 20px 22px; background: #fff; }
.hero-main { display: flex; gap: 16px; align-items: center; }
.shield { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-grad); color: #fff; display: grid; place-items: center; font-size: 28px; font-weight: 800; flex: none; }
.hero-title { font-family: var(--font-head); font-size: 22px; font-weight: 700; }
.hero-sub { margin-top: 6px; color: var(--brand-muted); }
.hero-sub b { color: var(--brand-dark); }
.calc { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.calc span { font-size: 20px; color: var(--brand-muted); }
.calc input { width: 90px; font: inherit; padding: 6px 8px; border: 1px solid var(--brand-border); border-radius: 8px; }
.grid2 { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.chart { width: 100%; height: auto; }
.chart .axis { font-size: 11px; fill: var(--brand-muted); }
.legend { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.legend.inline { flex-direction: row; gap: 16px; margin-top: 6px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.donut { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.donut-n { font-family: var(--font-head); font-size: 26px; font-weight: 700; fill: var(--brand-dark); }
.donut-l { font-size: 11px; fill: var(--brand-muted); }
.meter { margin: 8px 0; }
.meter-bar { height: 10px; background: var(--brand-bg-soft); border: 1px solid var(--brand-border); border-radius: 6px; overflow: hidden; margin-top: 4px; }
.meter-bar > div { height: 100%; border-radius: 6px; }
table.mini { margin: 0; font-size: 13px; }
table.mini td { padding: 6px 4px; }
@media (max-width: 900px) { .hero, .grid2, .grid3 { grid-template-columns: 1fr; } }

/* ═════════ Klikfraude: nieuwe stijl (kaarten, rustig, huisstijl) ═════════ */
body.fx-page { background: #f6f4f8; }
body.fx-page header.top { background: #fff; }
.fx { --fx-card: #fff; --fx-line: #ebe8ef; --fx-soft: #8b8792; --fx-ink: #14131a; --fx-pink: #e81a85; --fx-purple: #b02ce0; --fx-pink-bg: #fde8f3; --fx-purple-bg: #f4e6fb; font-size: 14px; }
.fx .eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--fx-soft); }
.fx h1.fx-title { font-family: var(--font-head); font-size: 30px; font-weight: 700; text-transform: uppercase; letter-spacing: 0; margin: 4px 0 6px; }
.fx .fx-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.fx .fx-lead { color: var(--fx-soft); max-width: 620px; line-height: 1.5; }
.fx .fx-lead b { color: var(--fx-ink); }
.fx .fx-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fx .seg { display: inline-flex; border: 1px solid var(--fx-line); border-radius: 10px; background: #fff; overflow: hidden; }
.fx .seg a, .fx .seg button { border: 0; border-radius: 0; padding: 7px 13px; font-size: 13px; font-weight: 600; color: var(--fx-ink); background: none; cursor: pointer; }
.fx .seg a + a, .fx .seg button + button { border-left: 1px solid var(--fx-line); }
.fx .seg .on { background: var(--fx-ink); color: #fff; }
.fx .btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--fx-line); background: #fff; border-radius: 10px; padding: 7px 13px; font-weight: 600; font-size: 13px; color: var(--fx-ink); }
.fx .btn.grad { background: var(--brand-grad); color: #fff; border: 0; }
.fx .muted-note { font-size: 12px; color: var(--fx-soft); }

.fx .card2 { background: var(--fx-card); border: 1px solid var(--fx-line); border-radius: 14px; padding: 20px 22px; }
.fx .card2 h3, .fx .h3 { font-family: var(--font-head); font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; margin: 0 0 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.fx .card2 h3 .aside { font-family: var(--font-main); text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12.5px; color: var(--fx-soft); }
.fx .row { display: grid; gap: 14px; margin-bottom: 14px; }
.fx .r4 { grid-template-columns: repeat(4, 1fr); }
.fx .r3 { grid-template-columns: repeat(3, 1fr); }
.fx .r21 { grid-template-columns: 2fr 1fr; }
.fx .r12 { grid-template-columns: 1.5fr 1fr; }
@media (max-width: 980px) { .fx .r4 { grid-template-columns: repeat(2, 1fr); } .fx .r3, .fx .r21, .fx .r12 { grid-template-columns: 1fr; } }

.fx .alert { background: #fff; border: 1px solid var(--fx-line); border-left: 4px solid var(--fx-pink); border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; display: flex; gap: 12px; align-items: flex-start; }
.fx .alert .tag { background: var(--fx-pink-bg); color: var(--fx-pink); font-weight: 700; font-size: 11.5px; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.fx .alert .txt { color: var(--fx-soft); font-size: 13px; }
.fx .alert .txt b { color: var(--fx-ink); }

.fx .stat .lbl { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--fx-soft); }
.fx .stat .big { display: flex; align-items: center; gap: 10px; margin: 10px 0 6px; }
.fx .stat .big .v { font-family: var(--font-head); font-size: 32px; font-weight: 600; letter-spacing: -.01em; line-height: 1; }
.fx .stat .big .v.grad { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fx .chip { font-size: 11.5px; font-weight: 700; padding: 3px 7px; border-radius: 6px; background: var(--fx-purple-bg); color: var(--fx-purple); white-space: nowrap; }
.fx .chip.pink { background: var(--fx-pink-bg); color: var(--fx-pink); }
.fx .chip.gray { background: #f1eff4; color: var(--fx-soft); }
.fx .stat .sub { font-size: 12.5px; color: var(--fx-soft); }

/* Staafgrafiek per dag */
.fx .bars2 { width: 100%; height: auto; display: block; }
.fx .bars2 .gl { stroke: var(--fx-line); }
.fx .bars2 .ax { font-size: 11px; fill: var(--fx-soft); font-family: var(--font-main); }
.fx .lg { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.fx .lg span { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--fx-line); border-radius: 8px; padding: 4px 9px; font-size: 12px; font-weight: 600; }
.fx .lg i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* Lijst-rijen (zoals 'Accounts') */
.fx .list .li { display: grid; grid-template-columns: minmax(220px, 1.6fr) repeat(5, minmax(80px, 1fr)); gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--fx-line); }
.fx .list .li:first-of-type { border-top: 0; }
.fx .list .who2 { display: flex; gap: 12px; align-items: center; min-width: 0; }
.fx .avatar { width: 38px; height: 38px; border-radius: 10px; background: var(--brand-grad); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 15px; flex: none; }
.fx .avatar.off { background: #ebe8ef; color: var(--fx-soft); }
.fx .who2 .nm { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx .who2 .ds { font-size: 12px; color: var(--fx-soft); }
.fx .kv .k { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--fx-soft); }
.fx .kv .v { font-weight: 700; font-size: 15px; margin-top: 3px; }
.fx .kv .v.hl { color: var(--fx-pink); }
.fx a.li { color: inherit; }
.fx a.li:hover .nm { color: var(--fx-pink); }
@media (max-width: 900px) { .fx .list .li { grid-template-columns: 1fr 1fr; } .fx .list .who2 { grid-column: 1 / -1; } }

/* Horizontale balkjes (redenen, campagnes, landen, apparaat) */
.fx .hb { margin: 0 0 12px; }
.fx .hb .t { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 5px; }
.fx .hb .t span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx .hb .t b { white-space: nowrap; }
.fx .hb .track { height: 8px; background: #f1eff4; border-radius: 6px; overflow: hidden; display: flex; }
.fx .hb .track i { display: block; height: 100%; }

/* Tabel nieuwe stijl */
.fx table.t2 { margin: 0; font-size: 13.5px; }
.fx table.t2 th { background: none; color: var(--fx-soft); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; border-bottom: 1px solid var(--fx-line); padding: 8px 10px; }
.fx table.t2 td { padding: 11px 10px; border-bottom: 1px solid var(--fx-line); }
.fx table.t2 tbody tr:nth-child(even) { background: none; }
.fx table.t2 tbody tr:last-child td { border-bottom: 0; }
.fx table.t2 .mono { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }

/* Hero klantpagina */
.fx .shield2 { width: 58px; height: 58px; border-radius: 16px; background: var(--brand-grad); display: grid; place-items: center; flex: none; }
.fx .hero2 { display: flex; gap: 18px; align-items: center; }
.fx .hero2 .nm { font-family: var(--font-head); font-size: 24px; font-weight: 700; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fx .hero2 .facts { display: flex; gap: 22px; margin-top: 8px; flex-wrap: wrap; font-size: 14px; color: var(--fx-soft); }
.fx .hero2 .facts b { color: var(--fx-ink); font-size: 16px; }
.fx .calc2 { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: end; gap: 10px; text-align: center; }
.fx .calc2 .k { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--fx-soft); margin-bottom: 6px; }
.fx .calc2 .v { font-family: var(--font-head); font-size: 24px; font-weight: 700; }
.fx .calc2 .op { font-size: 20px; color: var(--fx-soft); padding-bottom: 4px; }
.fx .calc2 input { width: 100%; max-width: 110px; font: inherit; font-weight: 700; font-size: 16px; text-align: center; padding: 6px 8px; border: 1px solid var(--fx-line); border-radius: 8px; }
.fx .donut-n { font-family: var(--font-head); }
@media print { body.fx-page { background: #fff; } .fx .card2 { break-inside: avoid; } }

/* Iconen, kaart en klantportaal */
.fx .ico { flex: none; }
.fx .h3t { display: inline-flex; align-items: center; gap: 8px; }
.fx .h3t .ico { color: var(--fx-pink); }
.fx .stat .lbl { display: flex; justify-content: space-between; align-items: center; }
.fx .ibox { width: 32px; height: 32px; border-radius: 9px; background: var(--fx-pink-bg); color: var(--fx-pink); display: grid; place-items: center; }
.fx .hero2 .facts span { display: inline-flex; align-items: center; gap: 6px; }
.fx .hero2 .facts .ico { color: var(--fx-pink); }
.fx .btn .ico { margin-right: 2px; }
.fx .map { width: 100%; height: auto; display: block; border-radius: 10px; }
.fx .maplg { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--fx-soft); margin-top: 8px; }
.fx .maplg span { display: inline-flex; align-items: center; gap: 5px; }
.fx .maplg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
body.portal header.portal-top { justify-content: space-between; }
body.portal .who { display: flex; align-items: center; color: var(--brand-dark); font-weight: 600; }
body.portal .who .btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #ebe8ef; background: #fff; border-radius: 10px; padding: 6px 12px; font-size: 13px; }
.login-wrap { min-height: 70vh; display: grid; place-items: center; }
.fx .login { width: 100%; max-width: 400px; padding: 32px 30px; }
.fx .login label { display: block; font-size: 12.5px; font-weight: 700; color: var(--fx-soft); margin-bottom: 12px; }
.fx .login input { display: block; width: 100%; margin-top: 5px; font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--fx-line); border-radius: 10px; color: var(--fx-ink); }
.fx .login input:focus { outline: 2px solid var(--fx-pink-bg); border-color: var(--fx-pink); }
.login-err { background: #fde8f3; color: #b3125f; font-size: 13px; font-weight: 600; padding: 8px 10px; border-radius: 8px; margin-bottom: 12px; }
@media print { body.portal .who { display: none; } }
.fx .cc-wrap { position: relative; }
.fx .hv { cursor: crosshair; }
.fx .tip { position: absolute; pointer-events: none; background: #14131a; color: #fff; border-radius: 10px; padding: 9px 12px; font-size: 12.5px; line-height: 1.6; box-shadow: 0 6px 20px rgba(20,19,26,.18); white-space: nowrap; z-index: 5; }
.fx .tip > b { display: block; font-size: 12px; opacity: .75; font-weight: 600; margin-bottom: 2px; }
.fx .tip div { display: flex; align-items: center; gap: 6px; }
.fx .tip div b { margin-left: auto; padding-left: 14px; }
.fx .tip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.fx .tip span { opacity: .65; font-size: 11.5px; }
