/* Levernet platform */
:root {
  --ink: #0f1b2d; --ink-2: #24324a; --yellow: #ffc21a; --yellow-2: #f0b000; --yellow-soft: #fff6d9;
  --muted: #5b6677; --line: #e2e6eb; --soft: #f4f5f7; --bg: #f7f8fa; --white: #fff;
  --green: #137a4b; --green-soft: #e3f4ec; --blue: #1f5fbf; --blue-soft: #e6eefb; --red: #b42318; --red-soft: #fdecea; --grey-soft: #eceef2;
  --radius: 10px; --shadow: 0 1px 2px rgba(15,27,45,.06), 0 1px 1px rgba(15,27,45,.04);
  --font: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); display: flex; flex-direction: column; min-height: 100vh; }
a { color: var(--ink); text-decoration-color: var(--yellow-2); text-underline-offset: 3px; }
a:hover { color: #000; text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 .75em; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 50; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.block { display: block; }

/* Topbalk */
.topbar { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 20; }
.topbar-in { max-width: 1240px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 32px; }
.logo { font-weight: 800; font-size: 23px; letter-spacing: -.03em; color: #fff; text-decoration: none; display: inline-flex; align-items: baseline; }
.logo:hover { color: #fff; }
.logo .dot { display: inline-block; width: 8px; height: 8px; background: var(--yellow); margin-left: 2px; border-radius: 1px; }
.mainnav { display: flex; gap: 4px; height: 100%; }
.mainnav a { color: rgba(255,255,255,.78); text-decoration: none; font-weight: 600; padding: 0 12px; display: flex; align-items: center; border-bottom: 3px solid transparent; border-top: 3px solid transparent; }
.mainnav a:hover { color: #fff; }
.mainnav a[aria-current] { color: #fff; border-bottom-color: var(--yellow); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.bell { position: relative; color: rgba(255,255,255,.85); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; }
.bell:hover { background: rgba(255,255,255,.08); color: #fff; }
.bell-n { position: absolute; top: 3px; right: 1px; background: var(--yellow); color: var(--ink); font-size: 11px; font-weight: 800; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
.usermenu { position: relative; }
.usermenu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary:hover { background: rgba(255,255,255,.08); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--yellow); color: var(--ink); font-weight: 800; display: grid; place-items: center; }
.um-name { font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-pop { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; color: var(--ink); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(15,27,45,.18); min-width: 240px; padding: 8px; }
.um-pop a, .um-pop .linkbtn { display: block; padding: 8px 10px; border-radius: 6px; text-decoration: none; width: 100%; text-align: left; }
.um-pop a:hover, .um-pop .linkbtn:hover { background: var(--soft); }
.um-who { padding: 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: 14px; }
.topbar .btn.ghost { color: #fff; border-color: rgba(255,255,255,.35); background: transparent; }

/* Layout */
.wrap { max-width: 1240px; width: 100%; margin: 0 auto; padding: 28px 24px 48px; flex: 1; }
.wrap.narrow { max-width: 860px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.cols.even { grid-template-columns: 1fr 1fr; }
.cols > .main, .cols > .side { min-width: 0; }
.side > * + * { margin-top: 20px; }
.main > * + * { margin-top: 20px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card + .card, .card + .cols, .cols + .card, .stats + .card, .notice + .card, .notice + .cols, .pagehead + .cols { margin-top: 20px; }
.cardhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.cardhead h2 { margin: 0; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.pagehead h1 { margin-bottom: 4px; }
.pagehead .lead { margin: 0; color: var(--muted); }
.pagehead-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lead { color: var(--muted); font-size: 16px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.sticky { position: sticky; top: 84px; }
.count { display: inline-block; background: var(--soft); border-radius: 10px; font-size: 13px; padding: 1px 8px; margin-left: 6px; color: var(--muted); font-weight: 600; vertical-align: 2px; }

/* Knoppen */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 700; background: var(--yellow); color: var(--ink); border: 1px solid var(--yellow); border-radius: 8px; padding: 10px 18px; cursor: pointer; text-decoration: none; line-height: 1.2; white-space: nowrap; }
.btn:hover { background: var(--yellow-2); border-color: var(--yellow-2); color: var(--ink); text-decoration: none; }
.btn.ghost { background: #fff; border-color: #c9cfd8; }
.btn.ghost:hover { background: var(--soft); border-color: #aeb6c2; }
.btn.link { background: none; border-color: transparent; text-decoration: underline; font-weight: 600; }
.btn.sm { padding: 6px 12px; font-size: 14px; }
.btn.full { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-decoration-color: #c9cfd8; text-underline-offset: 3px; cursor: pointer; }
.linkbtn.danger, .danger { color: var(--red); }
form.inline { display: inline; }

/* Formulieren */
.form .field { margin-bottom: 16px; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.req { color: var(--red); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel], input[type=url], input:not([type]), select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #c9cfd8; border-radius: 8px; padding: 10px 12px; min-height: 42px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(255,194,26,.45); }
.hint { font-size: 13px; color: var(--muted); margin: 5px 0 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.checks { margin-bottom: 18px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; cursor: pointer; padding: 3px 0; }
.check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.check.single { margin-bottom: 10px; }
.checkrow { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 8px; }
.formsub { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 8px 0 14px; padding-top: 6px; }
.formsub:not(:first-of-type) { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 10px; }
.formactions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.sticky-bottom { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 18px 0 8px; }
.filters { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 20px; }
.filters .field { margin: 0; min-width: 200px; }
.filters .check.single { margin: 0 0 10px; }
.cardhead .filters { margin: 0; }
.cardhead .filters .field label { display: none; }
.cardhead .filters .field { min-width: 150px; }

/* Auth */
body.bare .wrap { padding-top: 48px; }
.authcard { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 36px; max-width: 460px; margin: 0 auto; box-shadow: 0 10px 40px rgba(15,27,45,.07); }
.authcard.wide { max-width: 760px; }
.authcard h1 { font-size: 26px; }
.authalt { margin-top: 20px; text-align: center; font-size: 14px; }
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.roles legend { grid-column: 1 / -1; }
.role { display: flex; gap: 10px; border: 1.5px solid var(--line); border-radius: 10px; padding: 14px; cursor: pointer; font-size: 14px; }
.role input { accent-color: var(--ink); margin-top: 3px; }
.role:has(input:checked) { border-color: var(--ink); background: var(--yellow-soft); }

/* Meldingen */
.flash, .notice { border-radius: var(--radius); padding: 12px 16px; margin-bottom: 18px; border: 1px solid; font-size: 14px; }
.flash ul, .notice ul { margin: 6px 0 0; padding-left: 20px; }
.flash.ok, .notice.ok { background: var(--green-soft); border-color: #b7e0cb; color: #0c4f31; }
.flash.error { background: var(--red-soft); border-color: #f5c2bd; color: #7a1a12; }
.notice { background: var(--blue-soft); border-color: #c4d6f3; color: #173f7d; }
.notice.warn { background: var(--yellow-soft); border-color: #f5dc8f; color: #5a4300; }
.card .notice { margin: 16px 0 0; }

/* Badges en tags */
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 20px; background: var(--grey-soft); color: var(--ink-2); white-space: nowrap; vertical-align: 1px; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.yellow { background: var(--yellow-soft); color: #7a5a00; }
.badge.grey { background: var(--grey-soft); color: var(--muted); }
.tag { display: inline-block; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; padding: 2px 8px; margin: 0 4px 4px 0; font-weight: 600; }
.tags { margin: 8px 0; }

/* Tabellen */
.tablewrap { overflow-x: auto; margin: 0 -2px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--soft); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:hover { background: #fbfbfc; }
.table .num { text-align: right; white-space: nowrap; }
.table .actions { white-space: nowrap; text-align: right; }
.table .actions > * + * { margin-left: 10px; }
.table tr.unread td:first-child { box-shadow: inset 3px 0 0 var(--yellow); }
.table tr.sub td { background: var(--soft); }
.table tr.total td { background: var(--soft); font-size: 15px; border-top: 2px solid var(--ink); }
.table tfoot td { background: var(--soft); }
.compare th.num { text-align: right; min-width: 150px; white-space: normal; }
.compare td:first-child { min-width: 200px; }
.actionsrow td { border-bottom: 0; }
.dev { display: inline-block; background: var(--yellow-soft); color: #6a4e00; border-radius: 6px; font-size: 12px; padding: 2px 7px; margin: 4px 4px 0 0; font-weight: 600; }
.dev.block { display: block; text-align: left; }
.ok { color: var(--green); font-size: 13px; font-weight: 600; }
details.more summary { font-size: 12px; color: var(--muted); cursor: pointer; margin-top: 4px; }
.spec { display: grid; grid-template-columns: 1fr; gap: 4px; margin: 8px 0 0; font-size: 13px; }
.spec div { display: grid; grid-template-columns: 150px 1fr; gap: 10px; }
.spec.wide div { grid-template-columns: 220px 1fr; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; }
.facts { margin: 0; display: grid; gap: 12px; }
.facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.facts dd { margin: 2px 0 0; }
.notes { background: var(--soft); border-radius: 8px; padding: 12px; margin-top: 14px; font-size: 14px; white-space: pre-line; }

/* Offerteformulier */
.quote input.price { max-width: 130px; text-align: right; margin-left: auto; display: block; }
.quote .devinput { margin-top: 4px; font-size: 13px; min-height: 34px; padding: 6px 10px; }
.quote .check.single { margin: 0; }
.quote tr.conform .devinput { display: none; }

/* Matches */
.matches { display: grid; gap: 10px; }
.match { display: flex; gap: 14px; border: 1.5px solid var(--line); border-radius: 10px; padding: 14px 16px; cursor: pointer; background: #fff; }
.match:hover { border-color: #aeb6c2; }
.match:has(input:checked) { border-color: var(--ink); background: var(--yellow-soft); }
.match input { width: 19px; height: 19px; accent-color: var(--ink); margin-top: 2px; flex: none; }
.match-body { display: grid; gap: 4px; min-width: 0; }
.match-top { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.match-meta { font-size: 13px; color: var(--muted); }
.excluded summary { cursor: pointer; font-weight: 600; }
.excluded ul { margin-top: 12px; }
.selcount { font-size: 14px; font-weight: 600; min-height: 1.2em; }
.selcount.over { color: var(--red); }

/* Lijsten */
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: 10px 0; border-bottom: 1px solid var(--line); }
ul.plain li:last-child { border-bottom: 0; }
ul.files { list-style: none; margin: 0 0 12px; padding: 0; }
ul.files li { padding: 6px 0; display: flex; gap: 8px; align-items: baseline; border-bottom: 1px solid var(--line); font-size: 14px; word-break: break-all; }
.upload { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.upload .hint { width: 100%; }
.filepick { position: relative; display: inline-flex; border: 1px dashed #aeb6c2; border-radius: 8px; padding: 6px 12px; font-size: 14px; font-weight: 600; cursor: pointer; background: var(--soft); max-width: 100%; }
.filepick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.qa .q { border-bottom: 1px solid var(--line); padding: 12px 0; }
.qa .q:first-child { padding-top: 0; }
.q-meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.qa .a { background: var(--soft); border-left: 3px solid var(--yellow); border-radius: 0 8px 8px 0; padding: 10px 12px; margin-top: 8px; }
.qa .a p:last-child { margin: 0; }
.notifs { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.notifs li { display: flex; justify-content: space-between; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.notifs li:last-child { border-bottom: 0; }
.notifs li.unread { background: var(--yellow-soft); }
.notifs li.unread a { font-weight: 700; }

/* Dashboard */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; text-decoration: none; display: grid; box-shadow: var(--shadow); }
.stat:hover { border-color: #aeb6c2; }
.stat-n { font-size: 30px; font-weight: 800; line-height: 1.1; }
.stat-l { color: var(--muted); font-size: 14px; }
.hero-card { background: var(--ink); color: #fff; border: 0; padding: 30px; }
.hero-card h2 { font-size: 22px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 18px 0 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.steps li { counter-increment: s; display: grid; gap: 4px; font-size: 14px; color: rgba(255,255,255,.75); }
.steps li strong { color: #fff; font-size: 15px; }
.steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--yellow); color: var(--ink); font-weight: 800; display: grid; place-items: center; margin-bottom: 6px; }

/* Leveranciers */
.supgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.supcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.supcard-top { display: flex; justify-content: space-between; gap: 10px; }
.supcard h3 { margin: 0 0 4px; }
.supcard h3 a { text-decoration: none; }
.star { background: none; border: 0; font-size: 22px; line-height: 1; color: #c9cfd8; cursor: pointer; padding: 0 2px; }
.star.on, .star:hover { color: var(--yellow-2); }

/* Leeg en fout */
.empty { text-align: center; padding: 48px 20px; background: #fff; border: 1px dashed #c9cfd8; border-radius: var(--radius); }
.card .empty { border: 0; padding: 28px 10px; }
.empty p { color: var(--muted); max-width: 460px; margin: 0 auto 16px; }
.errorpage { text-align: center; padding: 40px 0; }
.errcode { font-size: 56px; font-weight: 800; color: var(--yellow-2); margin: 0; }

/* Footer */
.foot { border-top: 1px solid var(--line); background: #fff; font-size: 13px; color: var(--muted); }
.foot-in { display: flex; justify-content: space-between; gap: 12px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; }
.foot a { color: var(--muted); }

@media (max-width: 980px) {
  .cols, .cols.even { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .steps { grid-template-columns: 1fr 1fr; }
  .mainnav { position: fixed; bottom: 0; left: 0; right: 0; height: 58px; background: var(--ink); justify-content: space-around; z-index: 30; border-top: 1px solid rgba(255,255,255,.1); }
  .mainnav a { padding: 0 6px; font-size: 13px; border-top-width: 3px; border-bottom: 0; }
  .mainnav a[aria-current] { border-top-color: var(--yellow); }
  body:has(.mainnav) { padding-bottom: 58px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .topbar-in { padding: 0 16px; gap: 12px; }
  .wrap { padding: 20px 16px 40px; }
  .um-name { display: none; }
  .grid2, .grid3, .roles { grid-template-columns: 1fr; }
  .authcard { padding: 24px 18px; }
  h1 { font-size: 24px; }
  .card { padding: 16px; }
  .spec div, .spec.wide div { grid-template-columns: 1fr; gap: 0; }
  .steps { grid-template-columns: 1fr; }
  .topbar .btn.sm { padding: 6px 10px; }
  .pagehead { align-items: flex-start; }
}

/* Verfijningen */
.table th .badge { text-transform: none; letter-spacing: 0; }
.table td.actions { font-size: 13px; }
.table td.actions > * { display: block; margin: 0 0 4px; }
.table td.actions > * + * { margin-left: 0; }
.positions td:nth-child(2) { min-width: 180px; }
@media (max-width: 640px) { .compare td:first-child { min-width: 150px; } .compare th.num { min-width: 130px; } }
