/* FONTS-START */
@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("/fonts/plus-jakarta-sans.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
/* FONTS-END */
/* TaskBrick huisstijl: Deep Carbon, Slate Surface, Electric Cyan, Pure White, Cool Grey */
:root {
  --bg: #121417; --surface: #1e2228; --surface-2: #262c34; --fg: #e9edf1; --muted: #8f98a3; --line: #2f3640;
  --accent: #00c2ff; --accent-fg: #04202c; --accent-soft: rgba(0, 194, 255, .12); --glow: rgba(0, 194, 255, .38);
  --hoog: #ff7b72; --hoog-soft: rgba(255, 123, 114, .14); --mid: #ffb84d; --mid-soft: rgba(255, 184, 77, .14);
  --laag: #a7b1bd; --laag-soft: rgba(143, 152, 163, .16); --ok: #38d9a0; --ok-soft: rgba(56, 217, 160, .14); --scrim: rgba(5, 7, 9, .66);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font: 400 15px/1.45 var(--font);
  padding-block: 0 56px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.boot { text-align: center; color: var(--muted); padding-top: 25vh; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; padding-top: 18px; }
.muted { color: var(--muted); }

/* knoppen */
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 8px 14px; cursor: pointer; font-weight: 500; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); font-weight: 600; box-shadow: 0 0 18px var(--glow); }
.btn.primary:hover { filter: brightness(1.08); box-shadow: 0 0 24px var(--glow); }
.btn { transition: border-color .15s, box-shadow .15s; }
.btn:hover { box-shadow: 0 0 0 1px var(--accent); }
.btn.danger { color: var(--hoog); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.linkbtn { all: unset; cursor: pointer; color: var(--accent); text-decoration: underline; }
.linkbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* kop en navigatie */
.bar { background: var(--surface); border-bottom: 1px solid var(--line); margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding: 10px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
.bar .in { max-width: 1120px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.brand { font-family: var(--font-head); font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 10px; margin-right: auto; padding-bottom: 8px; }
.who { display: flex; gap: 10px; align-items: center; padding-bottom: 8px; font-size: 13.5px; }
.nav { display: flex; gap: 2px; flex-basis: 100%; overflow-x: auto; }
.nav a { padding: 8px 12px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; font-weight: 500; white-space: nowrap; }
.nav a:hover { color: var(--fg); }
.nav a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); box-shadow: 0 8px 14px -10px var(--glow); }
.top { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; justify-content: space-between; }
.top h1 { font-size: 28px; line-height: 1.1; }
.top p { margin: 4px 0 0; color: var(--muted); }
.acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* inlogkaart */
.auth { max-width: 420px; margin: 0 auto; padding-top: max(6vh, 24px); display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.card h1 { font-size: 22px; }
.card.wide { max-width: 560px; }
.logo { font-family: var(--font-head); font-weight: 800; letter-spacing: -.01em; color: var(--fg); font-size: 30px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.brandlogo { background: #fff; border-radius: 6px; padding: 4px 8px; display: inline-flex; align-items: center; border: 1px solid var(--line); }
.brandlogo img { height: 34px; max-width: 200px; object-fit: contain; display: block; }
.logo .brandlogo img { height: 56px; max-width: 260px; }
.brand { display: flex; align-items: center; gap: 12px; }
.llist { list-style: none; margin: 0; padding: 0; }
.lrow { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.lrow:first-child { border-top: 0; }
.lrow .nm { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.lrow input[type=text] { flex: 1 1 200px; }
.addrow { display: flex; gap: 8px; }
.addrow input { flex: 1; min-width: 0; }
.logoprev { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.banner { border-radius: 6px; padding: 9px 12px; font-size: 14px; background: var(--accent-soft); color: var(--fg); }
.banner.ok { background: var(--ok-soft); }
.banner.warn { background: var(--mid-soft); }
.banner.bad { background: var(--hoog-soft); color: var(--hoog); }
.qr { display: block; margin: 0 auto; background: #fff; padding: 6px; border-radius: 6px; width: 220px; height: 220px; }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; word-break: break-all; background: var(--laag-soft); padding: 6px 10px; border-radius: 6px; font-size: 14px; }
.codes { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 6px; font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--laag-soft); padding: 10px; border-radius: 6px; }
.big { font-size: 22px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.strength { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.strength i { display: block; height: 100%; width: 0; background: var(--hoog); transition: width .15s; }

/* formulieren */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > .l, .field > label.l { font-weight: 500; font-size: 13.5px; }
.field .h { color: var(--muted); font-size: 12.5px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=number], select, textarea {
  width: 100%; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px;
}
.row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; flex: 1 1 150px; }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.opt span { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; background: var(--surface); min-width: 0; height: 100%; }
.opt span small { color: var(--muted); font-size: 12px; }
.opt input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.opt input:disabled + span { opacity: .6; }
.tagbox { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 6px; padding: 6px; background: var(--surface); }
.tagbox input { border: 0 !important; flex: 1 1 140px; min-width: 100px; padding: 4px !important; background: transparent !important; }
.tagbox input:focus-visible { outline: none; }
.tagbox:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.tagbox .chip button { all: unset; cursor: pointer; font-weight: 600; padding: 0 2px; }
.tagbox .chip button:focus-visible { outline: 2px solid var(--accent); }
.err { color: var(--hoog); font-size: 13.5px; }
.check { display: flex; gap: 8px; align-items: flex-start; }
.check input { margin-top: 4px; }

.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 1px 9px; font-size: 12.5px; font-weight: 500; background: var(--laag-soft); color: var(--laag); white-space: nowrap; }
.chip.late { background: var(--hoog-soft); color: var(--hoog); }
.chip.soon { background: var(--mid-soft); color: var(--mid); }
.chip.acc { background: var(--accent-soft); color: var(--accent); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }

/* alarm */
.alarm { background: var(--hoog-soft); border: 1px solid var(--hoog); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.alarm.soon { background: var(--mid-soft); border-color: var(--mid); }
.alarm h2 { font-size: 18px; color: var(--hoog); }
.alarm.soon h2 { color: var(--mid); }
.alarm ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.alarm li button { all: unset; cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 3px 0; width: 100%; }
.alarm li button:hover .at { text-decoration: underline; }
.alarm li button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.alarm .at { font-weight: 500; }
.alarm .am { color: var(--muted); }
.alarm .al { margin-left: auto; font-weight: 600; color: var(--hoog); }
.alarm.soon .al { color: var(--mid); }

/* panden */
.panden { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.pand { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pand:hover { border-color: var(--accent); }
.pand[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.pand b { font-size: 16px; font-weight: 650; }
.pand .cnt { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 13px; }

/* filters en lijst */
.filters { display: grid; grid-template-columns: minmax(180px, 2fr) repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.filters label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); letter-spacing: .02em; text-transform: uppercase; min-width: 0; }
.sumline { color: var(--muted); font-size: 13px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.klus { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; padding: 14px 16px 14px 20px; border-top: 1px solid var(--line); cursor: pointer; }
.klus:first-child { border-top: 0; }
.klus:hover { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--accent), 0 0 16px -4px var(--glow); }
.klus::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: transparent; }
.klus[data-level="late"]::before { background: var(--hoog); }
.klus[data-level="soon"]::before { background: var(--mid); }
.klus[data-open="0"] { opacity: .68; }
.klus .main { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.klus .tt { all: unset; cursor: pointer; font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.klus .tt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.klus .meta { color: var(--muted); font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 2px 14px; }
.klus .tags { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.klus .side { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; text-align: right; }
.klus .side select { padding: 4px 8px; font-size: 13.5px; max-width: 100%; width: auto; }
.prio { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.prio i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--laag); }
.prio.hoog i { background: var(--hoog); }
.prio.midden i { background: var(--mid); }
.term { font-size: 13.5px; color: var(--muted); }
.term.late { color: var(--hoog); font-weight: 600; }
.term.soon { color: var(--mid); font-weight: 600; }
.term.done { color: var(--ok); }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.empty b { color: var(--fg); font-size: 18px; font-weight: 650; }
.empty p { margin: 0; max-width: 46ch; }

/* tabellen (beheer) */
.tablewrap { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
th { border-top: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; white-space: nowrap; }
td .sub { color: var(--muted); font-size: 13px; }
tr.off td { opacity: .6; }
.tags2 { display: flex; gap: 5px; flex-wrap: wrap; }

/* zijpaneel */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 20; display: flex; justify-content: flex-end; }
.sheet { background: var(--surface); width: min(560px, 100%); height: 100%; display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.sheet header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; padding-top: calc(14px + env(safe-area-inset-top, 0px)); border-bottom: 1px solid var(--line); }
.sheet header h2 { font-size: 20px; }
.sheet .body { overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.sheet footer { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 18px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.sheet footer .sp { flex: 1; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.ph { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: var(--laag-soft); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.ph button.x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; line-height: 1; }
.ph.busy { display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.notes { display: flex; flex-direction: column; gap: 6px; }
.note { border-left: 3px solid var(--line); padding: 2px 10px; font-size: 13.5px; overflow-wrap: anywhere; }
.note small { color: var(--muted); display: block; }
.note.auto { color: var(--muted); }
.noteadd { display: flex; gap: 8px; }
.noteadd input { flex: 1; min-width: 0; }
.lightbox { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.88); display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); background: var(--fg); color: var(--bg); padding: 9px 16px; border-radius: 6px; z-index: 50; max-width: calc(100% - 32px); }
.termgrid { display: grid; grid-template-columns: 1fr 110px; gap: 10px 14px; align-items: center; max-width: 420px; }
.linkbox { word-break: break-all; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: var(--laag-soft); padding: 8px 10px; border-radius: 6px; user-select: all; }
.section { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.section h2 { font-size: 18px; }

@media (max-width: 640px) {
  .top h1 { font-size: 24px; }
  .klus { grid-template-columns: 1fr; }
  .klus .side { flex-direction: row; flex-wrap: wrap; align-items: center; text-align: left; gap: 6px 14px; }
}
@media (prefers-reduced-motion: no-preference) {
  .sheet { animation: slide .18s ease-out; }
  @keyframes slide { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
}

/* installatiebedrijven en planmatig onderhoud */
.tagbox.pick { gap: 6px; }
.pickchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; background: var(--surface); }
.pickchip input { margin: 0; flex: none; width: auto; }
.pickchip.on { background: var(--accent-soft); border-color: var(--accent); }
.pickchip:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.navbadge { display: inline-block; margin-left: 6px; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--hoog); color: #fff; font-size: 11.5px; line-height: 18px; text-align: center; font-weight: 700; }
.tagbox .pickchip input { flex: 0 0 auto; width: 16px !important; min-width: 0; padding: 0 !important; background: initial !important; }
.filters .check { text-transform: none; font-size: 14px; color: var(--fg); letter-spacing: 0; }
.pnr { font-weight: 600; color: var(--accent); }
.brand .platform, #brand .platform { margin-left: 10px; font-weight: 500; font-size: 12px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; align-self: center; }

/* merk: kubus-icoon met vinkje */
.mark { display: block; width: 28px; height: 28px; flex: none; }
.logo .mark { width: 64px; height: 64px; filter: drop-shadow(0 0 14px var(--glow)); }
.logo .wordmark { line-height: 1; }
.brand .platform { text-transform: none; letter-spacing: 0; font-family: var(--font-head); font-weight: 600; }
.card { box-shadow: 0 0 0 1px rgba(0, 194, 255, .04), 0 12px 30px -18px rgba(0, 0, 0, .8); }
.chip.acc, .tags .chip.acc { border: 1px solid rgba(0, 194, 255, .28); color: var(--accent); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
::selection { background: rgba(0, 194, 255, .3); }
