/* MipIT Webcam Platform – ontwerpsysteem voor login en klantportal */
:root {
  --bg: #f4f7f9;
  --surface: #ffffff;
  --surface-2: #f8fafb;
  --text: #14232b;
  --muted: #5b6b74;
  --line: #e0e7eb;
  --brand: #007f99;
  --brand-strong: #00647a;
  --brand-soft: #e5f5f9;
  --brand-ink: #ffffff;
  --ok: #067a55;       --ok-soft: #e0f6ed;
  --bad: #c0283f;      --bad-soft: #fdebee;
  --warn: #93610a;     --warn-soft: #fff3d8;
  --idle: #5b6b74;     --idle-soft: #eef2f4;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 35, 43, .05), 0 8px 24px rgba(20, 35, 43, .06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0f171b;
  --surface: #172127;
  --surface-2: #1c2830;
  --text: #e8eff2;
  --muted: #9fb0b8;
  --line: #2a3941;
  --brand: #3fc6e0;
  --brand-strong: #6fd6ea;
  --brand-soft: #14323b;
  --brand-ink: #062229;
  --ok: #45dba7;   --ok-soft: #0d3a2f;
  --bad: #ff8a9a;  --bad-soft: #43202b;
  --warn: #f2c265; --warn-soft: #3a3020;
  --idle: #9fb0b8; --idle-soft: #22303a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.55 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }

/* Knoppen en formulieren */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn-block { width: 100%; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; flex: none; }

.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 14px; }
.input {
  width: 100%; min-height: 44px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent); }
.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; }
.alert-error { background: var(--bad-soft); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); }

/* Statuslabels */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-online { color: var(--ok); background: var(--ok-soft); }
.pill-offline { color: var(--bad); background: var(--bad-soft); }
.pill-unknown, .pill-disabled { color: var(--idle); background: var(--idle-soft); }
.pill-online::before { animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .pill-online::before { animation: none; } * { transition: none !important; } }

/* Inlogpagina */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-aside {
  position: relative; overflow: hidden; color: #fff; padding: 48px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  background:
    radial-gradient(900px 500px at 85% 0%, rgba(30, 169, 201, .35), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(14, 90, 120, .45), transparent 65%),
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px) 0 0 / 44px 44px,
    #07161d;
}
.aside-logo { display: inline-block; width: fit-content; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .55)) drop-shadow(0 0 18px rgba(0, 0, 0, .35)); }
.aside-logo:hover { text-decoration: none; }
.auth-aside h2, .auth-aside p, .auth-points { text-shadow: 0 1px 14px rgba(0, 0, 0, .55); }
.auth-aside h2 { font-size: clamp(28px, 3.2vw, 40px); max-width: 15ch; }
.auth-aside p { color: rgba(255, 255, 255, .78); max-width: 42ch; margin-top: 14px; font-size: 16px; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: rgba(255, 255, 255, .85); font-size: 14.5px; }
.auth-points li { display: flex; gap: 10px; align-items: center; }
.auth-points svg { width: 18px; height: 18px; color: #3fc6e0; flex: none; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: min(100%, 400px); display: grid; gap: 22px; }
.auth-card h1 { font-size: 27px; }
.auth-card form { display: grid; gap: 16px; }
.auth-foot { text-align: center; font-size: 13px; color: var(--muted); }
.auth-mobile-logo { display: none; }
@media (max-width: 860px) {
  /* Op de telefoon: fotobanner bovenaan, het formulier als kaart eroverheen */
  .auth { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
  .auth-aside { min-height: 290px; padding: 22px 22px 52px; gap: 14px; }
  .auth-aside .aside-logo .logo { height: 52px; width: auto; }
  .auth-aside .aside-copy p, .auth-aside .auth-points { display: none; }
  .auth-aside h2 { font-size: 24px; max-width: 16ch; }
  .auth-main { flex: 1; position: relative; margin-top: -26px; background: var(--bg); border-radius: 24px 24px 0 0; padding: 28px 20px 40px; place-items: start center; box-shadow: 0 -10px 30px rgba(0, 0, 0, .12); }
}

/* Merk en logo */
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 700; }
.brand:hover { text-decoration: none; }
.logo { display: block; height: auto; }
.brand .logo { height: auto; width: auto; max-height: 44px; }
.logo-on-dark { display: none; }
html[data-theme="dark"] .logo-on-light { display: none; }
html[data-theme="dark"] .logo-on-dark { display: block; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn svg { width: 19px; height: 19px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 13px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(24px, 2.6vw, 30px); }
.page-head p { margin-top: 6px; color: var(--muted); font-size: 15px; }
.crumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.stat span { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.stat b { display: block; font-size: 30px; letter-spacing: -.02em; margin-top: 4px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cam { display: flex; flex-direction: column; color: inherit; transition: transform .15s, border-color .15s; }
.cam:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); text-decoration: none; }
.thumb { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--surface-2), var(--idle-soft)); display: grid; place-items: center; color: var(--muted); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb svg { width: 34px; height: 34px; opacity: .55; }
.thumb .pill { position: absolute; top: 12px; left: 12px; background: color-mix(in srgb, var(--surface) 90%, transparent); }
.cam-body { padding: 16px 18px 18px; display: grid; gap: 4px; }
.cam-body h3 { font-size: 16.5px; }
.cam-body p { color: var(--muted); font-size: 13.5px; display: flex; gap: 6px; align-items: center; }
.cam-body p svg { width: 16px; height: 16px; flex: none; }
.btn svg, .icon-btn svg { flex: none; }
.cam-meta { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.tag { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }

.empty { text-align: center; padding: 56px 24px; display: grid; gap: 8px; justify-items: center; }
.empty svg { width: 44px; height: 44px; color: var(--muted); }
.empty h2 { font-size: 20px; }

/* Cameradetail */
.detail { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 960px) { .detail { grid-template-columns: 1fr; } }
.player { aspect-ratio: 16 / 9; background: #05090b; position: relative; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-off { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #b8c6cc; padding: 24px; }
.panel { padding: 20px; display: grid; gap: 14px; }
.panel h2 { font-size: 16px; }
.dl { display: grid; gap: 10px; margin: 0; }
.dl div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.dl div:last-child { border: 0; padding: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 600; text-align: right; }
.code { width: 100%; min-height: 110px; padding: 12px; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); resize: vertical; }
.toast { font-size: 13px; color: var(--ok); min-height: 1.2em; }


/* Tabellen en werkbalk */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.toolbar .search { position: relative; flex: 1 1 260px; max-width: 420px; }
.toolbar .search svg { position: absolute; left: 13px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--muted); }
.toolbar .search .input { padding-left: 40px; }
select.input { padding-right: 34px; width: auto; min-width: 170px; }
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.cell-main { display: flex; align-items: center; gap: 12px; color: inherit; font-weight: 600; }
.cell-main:hover { text-decoration: none; color: var(--brand); }
.mini-thumb { width: 64px; aspect-ratio: 16 / 9; border-radius: 7px; background: linear-gradient(135deg, var(--surface-2), var(--idle-soft)); display: grid; place-items: center; color: var(--muted); overflow: hidden; position: relative; flex: none; }
.mini-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mini-thumb svg { width: 20px; height: 20px; opacity: .6; }
.sub { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.pill-active { color: var(--ok); background: var(--ok-soft); }
.pill-failed { color: var(--bad); background: var(--bad-soft); }
.pill-inactive { color: var(--idle); background: var(--idle-soft); }

/* Dashboard */
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 0; }
.card-head h2 { font-size: 16.5px; }
.list { list-style: none; margin: 0; padding: 8px 8px 12px; display: grid; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; }
.list li:hover { background: var(--surface-2); }
.list .ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.list .ico svg { width: 18px; height: 18px; }
.ico-bad { background: var(--bad-soft); color: var(--bad); }
.ico-warn { background: var(--warn-soft); color: var(--warn); }
.ico-ok { background: var(--ok-soft); color: var(--ok); }
.list b { display: block; font-size: 14.5px; }
.list small { color: var(--muted); font-size: 13px; }
.checks { display: grid; gap: 0; padding: 8px 20px 18px; }
.checks div { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.checks div:last-child { border: 0; }
.checks dt { color: var(--muted); }
.checks dd { margin: 0; }
.cards-tight { padding: 0; }
/* Formulieren */
.alert-success { background: var(--ok-soft); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.alert-error { font-weight: 500; }
.form-card { overflow: visible; }
.form-section { display: grid; gap: 20px; padding: 28px; border-bottom: 1px solid var(--line); }
.form-section > header h2 { font-size: 17px; }
.form-section > header p { color: var(--muted); margin-top: 3px; font-size: 13.5px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } .form-section { padding: 20px; } }
.field .hint, .hint { color: var(--muted); font-size: 13px; }
textarea.input { min-height: 130px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; padding: 20px 28px; background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); flex-wrap: wrap; }
fieldset.plain { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 12px; }
fieldset.plain legend { font-weight: 700; font-size: 14.5px; padding: 0; margin-bottom: 8px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.choice { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.choice:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice input[type="checkbox"], .choice input[type="radio"] { flex: none; margin-top: 3px; width: 19px; height: 19px; accent-color: var(--brand); }
.choice b { display: block; font-size: 14.5px; }
.choice small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.choice[hidden] { display: none; }
.warn-box { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn); font-size: 13.5px; }
.empty-inline { padding: 18px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius-sm); }
.empty-inline[hidden] { display: none; }

/* Detailpagina's */
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; padding: 0 20px 20px; }
.tile { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); display: grid; gap: 4px; }
.tile span { color: var(--muted); font-size: 13px; font-weight: 600; }
.tile b { font-size: 16px; }
.tile small { color: var(--muted); font-size: 12.5px; }
.preview { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--surface-2), var(--idle-soft)); display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.preview svg { width: 44px; height: 44px; opacity: .5; }
.preview .pill { position: absolute; top: 14px; left: 14px; background: color-mix(in srgb, var(--surface) 92%, transparent); }
.preview-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 14px; flex-wrap: wrap; }
.side-stack { display: grid; gap: 20px; }
.link-list { display: grid; gap: 4px; padding: 8px 12px 14px; }
.link-list a, .link-list button { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 12px; border-radius: 10px; color: var(--text); font: inherit; font-weight: 600; background: none; border: 0; cursor: pointer; text-align: left; }
.link-list a:hover, .link-list button:hover:not(:disabled) { background: var(--surface-2); text-decoration: none; }
.link-list button:disabled { color: var(--muted); cursor: not-allowed; font-weight: 500; }

/* Rijen met avatar (klanten, gebruikers, camera's) */
.rows { display: grid; }
.row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.3fr) auto auto auto; gap: 16px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); color: inherit; }
.row:last-child { border: 0; }
.row:hover { background: var(--surface-2); text-decoration: none; }
.row[hidden] { display: none; }
.row-head { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; background: var(--surface-2); padding-top: 12px; padding-bottom: 12px; }
.row-head:hover { background: var(--surface-2); }
.row .who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.row .who b { display: block; font-size: 14.5px; }
.row .who small { color: var(--muted); font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; }
.row .num { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; min-width: 3ch; }
@media (max-width: 860px) { .row { grid-template-columns: 1fr auto; } .row > :nth-child(n+3):not(:last-child) { display: none; } .row-head { display: none; } }
.avatar-lg { width: 44px; height: 44px; font-size: 16px; flex: none; }
.count-badge { padding: 2px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 13px; }
.assigned { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; padding: 16px 20px 20px; }
.assigned a { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: inherit; background: var(--surface); }
.assigned a:hover { border-color: var(--brand); text-decoration: none; }
.assigned b { font-size: 13px; color: var(--brand); }
.assigned span { font-weight: 600; font-size: 14.5px; }
.assigned small { color: var(--muted); font-size: 13px; }
.relation { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 20px 20px; }
.relation div { text-align: center; padding: 18px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.relation b { display: block; font-size: 26px; }
.relation span { color: var(--muted); font-size: 13.5px; }
.customer-link { display: grid; gap: 2px; margin: 0 20px 20px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: inherit; background: var(--surface-2); }
.customer-link:hover { border-color: var(--brand); text-decoration: none; }
.customer-link span { color: var(--muted); font-size: 14px; }
.customer-link b { font-size: 16px; }
.customer-link small { color: var(--brand); font-weight: 600; }

/* Streamserver */
.server-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.server-card { padding: 22px; display: grid; gap: 18px; }
.server-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.server-card h2 { font-size: 17.5px; }
.server-card header p { color: var(--muted); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
.mini-stats div { padding: 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.mini-stats dt { color: var(--muted); font-size: 12.5px; }
.mini-stats dd { margin: 2px 0 0; font-weight: 700; font-size: 16px; }
.gauge { display: grid; gap: 10px; padding: 18px 20px; }
.gauge span { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.gauge b { font-size: 25px; letter-spacing: -.02em; }
.gauge small { color: var(--muted); font-size: 13px; }
.bar { height: 8px; border-radius: 99px; background: var(--idle-soft); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.bar i.hot { background: var(--bad); }
.cam-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); color: inherit; }
.cam-row:last-child { border: 0; }
.cam-row:hover { background: var(--surface-2); text-decoration: none; }
.cam-row b { display: block; }
.cam-row small { color: var(--muted); font-size: 13px; }
@media (max-width: 720px) { .cam-row { grid-template-columns: auto 1fr; } .cam-row .pill:nth-of-type(n+2) { display: none; } }
.error-page { display: grid; place-items: center; text-align: center; gap: 12px; padding: 72px 20px; }
.error-page strong { font-size: 64px; color: var(--brand); letter-spacing: -.03em; line-height: 1; }
.error-page h1 { font-size: 26px; max-width: 30ch; }
.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.filter-bar .count { margin-left: auto; color: var(--muted); font-size: 13.5px; }.search-field { position: relative; flex: 1 1 280px; max-width: 420px; }
.search-field svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search-field .input { padding-left: 44px; }
.form-grid { align-items: start; }

/* Themakeuze */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .18); padding: 6px; z-index: 50; display: grid; gap: 2px; }
.menu-title { margin: 0; padding: 8px 10px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.menu-pop button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 8px; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.menu-pop button:hover { background: var(--surface-2); }
.menu-pop button b { display: block; font-size: 14px; }
.menu-pop button small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.menu-pop button[aria-checked="true"] { background: var(--brand-soft); }
.menu-pop button[aria-checked="true"] b { color: var(--brand); }
.menu-pop button[aria-checked="true"]::after { content: ""; width: 16px; height: 16px; flex: none; background: var(--brand); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center / contain no-repeat; }
.theme-menu .ti { display: none; }
html[data-theme-pref="auto"] .theme-menu .ti-auto, html[data-theme-pref="light"] .theme-menu .ti-light, html[data-theme-pref="dark"] .theme-menu .ti-dark { display: grid; place-items: center; }
.auth-foot a { font-weight: 600; }
.auth-card form + .auth-foot { margin-top: -6px; }

/* Themamenu op de inlogpagina's */
.auth-main { position: relative; }
.auth-theme { position: absolute; top: 18px; right: 18px; z-index: 5; }
.auth-theme .menu-pop { right: 0; }

/* Aan/uit-schakelaar en platform toevoegen */
.switch-form { margin: 0; display: flex; }
.switch { position: relative; display: inline-block; width: 44px; height: 26px; cursor: pointer; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: var(--idle-soft); border: 1px solid var(--line); transition: background .15s, border-color .15s; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s; }
.switch input:checked + .track { background: var(--brand); border-color: var(--brand); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
.add-output { margin: 8px 20px 0; }
.add-output > summary { list-style: none; cursor: pointer; width: fit-content; }
.add-output > summary::-webkit-details-marker { display: none; }
.add-output-form { display: grid; gap: 16px; padding: 16px 0 4px; }
/* Beschikbaarheid, account en grafiek */
.uptime { font-variant-numeric: tabular-nums; }
.uptime-online { color: var(--ok); }
.uptime-warn { color: var(--warn); }
.uptime-offline { color: var(--bad); }
button.choice { font: inherit; color: inherit; text-align: left; width: 100%; }
.choice[aria-checked="true"] { border-color: var(--brand); background: var(--brand-soft); }
.legend { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.chart { padding: 8px 20px 16px; }
.chart svg { width: 100%; height: 150px; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-axis { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); padding-top: 4px; }
/* Camera-instellingen */
.logo-preview { width: 150px; height: 90px; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: var(--surface-2); overflow: hidden; color: var(--muted); font-size: 13px; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.switch-line { display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 400; margin-top: 8px; cursor: pointer; }
.switch-line input { width: 17px; height: 17px; accent-color: var(--brand); }
/* Livestream-pop-up */
.preview-play { position: absolute; inset: 0; display: grid; place-items: center; border: 0; padding: 0; background: rgba(5, 9, 11, .18); cursor: pointer; }
.preview-play span { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #10242c; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); transition: transform .15s; }
.preview-play:hover span { transform: scale(1.08); }
.preview-play svg { width: 30px; height: 30px; opacity: 1; }
/* Bediening (camera en YouTube) */
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.btn-danger:hover { background: var(--bad-soft); }
.ctl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--line); }
.ctl-row:first-of-type { border-top: 0; }
.ctl-info { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.ctl-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ctl-form { margin: 0; }
.ctl-link { border-top: 1px solid var(--line); padding: 4px 20px; }
.ctl-link summary { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 10px 0; font-size: 14px; font-weight: 600; color: var(--brand); list-style: none; }
.ctl-link summary::-webkit-details-marker { display: none; }
.ctl-link summary svg { width: 18px; height: 18px; }
.ctl-link form { display: grid; gap: 12px; padding: 4px 0 16px; }
.ctl-link .muted { font-size: 13px; margin: 0; }
.ctl-link .btn { justify-self: start; }
button[disabled][data-busy] { opacity: .6; cursor: progress; }.preview-play { flex-direction: column; gap: 10px; align-content: center; justify-content: center; display: flex; align-items: center; }
.preview-play em { font-style: normal; font-weight: 600; font-size: 13px; color: #fff; background: rgba(5, 9, 11, .6); padding: 5px 12px; border-radius: 999px; }
/* Weer */
.weather-place { color: var(--muted); font-size: 13px; }
.weather-body { padding: 4px 20px 18px; display: grid; gap: 16px; }
.w-now { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.w-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); flex: none; }
.w-icon svg { width: 36px; height: 36px; }
.w-temp { font-size: 38px; line-height: 1; font-weight: 700; letter-spacing: -.02em; }
.w-desc { color: var(--muted); font-size: 14px; margin-top: 4px; }
.w-range { margin-left: auto; display: grid; gap: 3px; text-align: right; font-size: 13px; color: var(--muted); }
.w-range b { color: var(--text); font-weight: 600; }
.w-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0; }
.w-tiles > div { padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.w-tiles dt { font-size: 12px; color: var(--muted); }
.w-tiles dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; }
.w-tiles small { font-weight: 500; color: var(--muted); font-size: 12px; }
.w-hours { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; text-align: center; }
.w-hours li { display: grid; justify-items: center; gap: 4px; font-size: 12.5px; }
.w-hours span { color: var(--muted); }
.w-hours svg { width: 22px; height: 22px; color: var(--brand); }
.w-hours b { font-weight: 600; }
.w-hours small { color: var(--brand); font-size: 11px; min-height: 13px; }
.w-foot { margin: 0; font-size: 12px; color: var(--muted); }
.w-foot a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.weather-empty { display: grid; gap: 12px; justify-items: start; padding-top: 6px; }
.weather-empty p { margin: 0; color: var(--muted); font-size: 14px; }
.weather-skeleton { display: grid; gap: 10px; }
.weather-skeleton span { height: 44px; border-radius: 10px; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: weather-shimmer 1.4s linear infinite; }
@keyframes weather-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .weather-skeleton span { animation: none; } }
.place-current { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px 9px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); max-width: 460px; }
.place-current[hidden], .place-search[hidden] { display: none; }
.place-current span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.place-current svg { width: 18px; height: 18px; color: var(--brand); flex: none; }
.place-search { position: relative; max-width: 460px; }
.place-results { position: absolute; z-index: 5; inset: calc(100% + 6px) 0 auto 0; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: 0 12px 32px rgba(0, 0, 0, .18); }
.place-results[hidden] { display: none; }
.place-results button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.place-results button:hover, .place-results button:focus-visible { background: var(--brand-soft); outline: none; }
.place-results small { color: var(--muted); font-size: 12.5px; }
.place-none { padding: 10px; color: var(--muted); font-size: 14px; }
.weather-setup { display: grid; gap: 20px; }
/* Telefoon */
@media (max-width: 560px) {
  .weather-place { display: none; }
  .w-range { margin-left: 0; text-align: left; }
  .card-head { flex-wrap: wrap; gap: 8px; }
}

/* Tabellen worden op een telefoon lijstjes met kaartjes */
@media (max-width: 720px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table tr { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 10px 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .table tr:last-child { border-bottom: 0; }
  .table td { padding: 0; border: 0; min-width: 0; }
  .table td:first-child { grid-column: 1 / -1; }
  .table td[data-label]:not(:first-child):not(:empty)::before { content: attr(data-label); display: block; margin-bottom: 4px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
  .table tbody tr:hover td { background: none; }
}
.split-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 900px) { .split-even { grid-template-columns: minmax(0, 1fr); } }
/* Statistieken */
.stat-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stat-filters form { margin: 0; }
.stat-filters select.input { min-width: 190px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.seg { display: inline-flex; padding: 4px; gap: 2px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.seg a { padding: 7px 14px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 14px; }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg a[aria-current="true"] { background: var(--surface); color: var(--brand); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.live-count { display: inline-flex; align-items: center; gap: 8px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 50%, transparent); animation: live-pulse 2s infinite; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.chart-body { padding: 14px 20px 18px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 170px; border-bottom: 1px solid var(--line); }
.bar { position: relative; flex: 1; height: var(--h); min-height: 0; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--brand) 78%, var(--surface)); transition: background .15s; }
.bar:hover { background: var(--brand); }
.bars-axis { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted); }
.share-list { list-style: none; margin: 0; padding: 12px 20px 6px; display: grid; gap: 14px; }
.share-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; font-size: 14px; }
.share-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-num { font-weight: 600; text-align: right; }
.share-num small { color: var(--muted); font-weight: 500; margin-left: 4px; }
.share-bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--surface-2); position: relative; overflow: hidden; order: 3; }
.share-bar::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: var(--brand); }
.stat-note { font-size: 13px; padding: 4px 20px 16px; }
p.stat-note:not(.card *) { padding: 0; }
@media (max-width: 720px) { .stat-filters { width: 100%; } .stat-filters select.input { flex: 1; } .seg { width: 100%; } .seg a { flex: 1; text-align: center; padding: 9px 4px; } }
.bars { justify-content: space-around; }
.bar { max-width: 56px; }

.viewers-now { display: flex; align-items: center; gap: 10px; padding: 8px 20px 20px; font-size: 14.5px; color: var(--muted); }
.viewers-now b { font-size: 30px; line-height: 1; color: var(--text); letter-spacing: -.02em; }

/* Maandrapport */
.report { padding: 28px; display: grid; gap: 22px; }
.report-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 2px solid var(--brand); }
.report-kicker { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); font-weight: 700; }
.report-head h2 { font-size: 26px; margin: 4px 0 6px; }
.report-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.report-summary > div { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.report-summary span { display: block; font-size: 12px; color: var(--muted); }
.report-summary b { display: block; margin-top: 3px; font-size: 20px; }
.report-camera { display: grid; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); break-inside: avoid; }
.report-camera h3 { font-size: 17px; }
.report-camera h3 small { font-weight: 400; color: var(--muted); font-size: 14px; margin-left: 6px; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 18px; margin: 0; }
.report-grid dt { font-size: 12px; color: var(--muted); }
.report-grid dd { margin: 2px 0 0; font-weight: 650; font-size: 16px; }
.report-grid dd small { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.report-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.report-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.report-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); }
.report-foot { font-size: 12.5px; color: var(--muted); padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 720px) { .report { padding: 18px; } .report-head { flex-direction: column-reverse; } .report-table { display: block; overflow-x: auto; } }
@media print {
  @page { margin: 14mm; }
  html, body { background: #fff !important; color: #111 !important; }
  .sidebar, .app-header, .mobile-menu, .menu-toggle, .no-print { display: none !important; }
  .app { display: block; }
  .workspace { padding: 0 !important; max-width: none; }
  .card.report { border: 0; box-shadow: none; padding: 0; }
  .logo-on-dark { display: none !important; } .logo-on-light { display: block !important; }
  .report-summary > div { background: #fff; }
}
/* Snelzoeken */
.palette { width: min(600px, calc(100vw - 24px)); margin: 12vh auto auto; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .4); overflow: hidden; }
.palette::backdrop { background: rgba(5, 9, 11, .55); }
.pal-bar { display: flex; align-items: center; gap: 12px; padding: 4px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.pal-bar svg { width: 20px; height: 20px; flex: none; }
.pal-bar input { flex: 1; min-width: 0; padding: 16px 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 16px; outline: none; }
.pal-bar input::-webkit-search-cancel-button { display: none; }
.pal-bar kbd { padding: 2px 7px; border: 1px solid var(--line); border-radius: 6px; font: 12px inherit; color: var(--muted); }
.pal-list { list-style: none; margin: 0; padding: 8px; max-height: min(52vh, 420px); overflow-y: auto; }
.pal-list a { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border-radius: 10px; color: var(--text); }
.pal-list a:hover { text-decoration: none; }
.pal-list a[aria-selected="true"] { background: var(--brand-soft); }
.pal-list a[aria-selected="true"] b { color: var(--brand); }
.pal-list b { font-size: 15px; }
.pal-list small { color: var(--muted); font-size: 13px; }
.pal-empty { padding: 18px 12px; text-align: center; color: var(--muted); font-size: 14px; }
.search-open { gap: 10px; }
.search-open kbd { margin-left: auto; padding: 1px 6px; border: 1px solid var(--line); border-radius: 6px; font: 11.5px inherit; color: var(--muted); }

/* Landenkaart */
.geo { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr); gap: 8px 24px; align-items: center; padding: 6px 20px 4px; }
.world { width: 100%; height: auto; }
.world path { fill: var(--surface-2); stroke: var(--surface); stroke-width: .35; }
.world path.has { fill: color-mix(in srgb, var(--brand) calc(var(--i) * 100%), var(--surface-2)); }
.world path.has:hover { stroke: var(--text); stroke-width: .8; }
.country-list { list-style: none; margin: 0; padding: 0; }
.cc { display: inline-grid; place-items: center; min-width: 28px; height: 20px; margin-right: 8px; padding: 0 4px; border-radius: 5px; background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
@media (max-width: 900px) { .geo { grid-template-columns: minmax(0, 1fr); } }

/* Timelapse */
.tl-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-lengths { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.tl-limit { margin-right: auto; font-size: 13px; }
.tl-list { display: grid; gap: 14px; padding: 14px 20px 20px; }
.tl-job { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.tl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tl-head b { display: block; font-size: 15px; }
.tl-head .muted { font-size: 13px; }
.tl-progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.tl-progress span { display: block; height: 100%; border-radius: inherit; background: var(--brand); transition: width .4s ease; }
.tl-msg { margin: 0; font-size: 13.5px; }
.tl-video { width: 100%; max-height: 460px; border-radius: 10px; background: #05090b; }
.tl-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13.5px; }
.tl-error { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--bad-soft); color: var(--bad); font-size: 14px; }
@media (max-width: 720px) { .tl-limit { width: 100%; } }
/* Tweestapsverificatie */
.mfa-body { display: grid; gap: 14px; padding: 14px 20px 20px; }
.mfa-body p { margin: 0; }
.code-input { font-size: 20px; letter-spacing: .18em; text-align: center; max-width: 260px; font-variant-numeric: tabular-nums; }
.auth-card .code-input { max-width: none; }
.recovery-list { list-style: none; margin: 0; padding: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 16px; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: var(--surface-2); font: 600 15px ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .04em; }
.mfa-steps ol { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 22px; }
.mfa-steps li { counter-increment: step; position: relative; display: grid; gap: 8px; padding-left: 44px; justify-items: start; }
.mfa-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.secret-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.secret-box code { font: 600 17px ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; word-break: break-all; }
.mfa-confirm { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
@media print { body:has(.recovery-list) .card:not([aria-label="Herstelcodes"]) { display: none !important; } }
.qr-box { width: 208px; max-width: 100%; padding: 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); line-height: 0; }
.qr-box svg { width: 100%; height: auto; display: block; }
/* Passkeys */
.passkey-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.passkey-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.passkey-list li > span:nth-child(2) { flex: 1; min-width: 0; }
.passkey-list b { display: block; font-size: 14.5px; }
.passkey-list small { display: block; color: var(--muted); font-size: 12.5px; }
.passkey-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); flex: none; }
.passkey-icon svg { width: 19px; height: 19px; }
.passkey-add { display: flex; gap: 10px; flex-wrap: wrap; }
.passkey-add .input { flex: 1; min-width: 200px; }
.passkey-add[hidden], .passkey-button[hidden] { display: none; }
.passkey-login { display: grid; gap: 14px; }
.passkey-button { padding: 14px; font-size: 16px; }
.or-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.mfa-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; padding: 16px 20px 20px; }
.mfa-choice { display: grid; gap: 12px; align-content: start; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.mfa-choice p { margin: 0; font-size: 14px; }
.mfa-choice-head { display: flex; align-items: center; gap: 12px; }
.mfa-choice-head b { display: block; font-size: 16px; }
/* Logboek */
.audit-filters { display: grid; gap: 12px; padding: 16px 20px 6px; }
.audit-search { display: flex; gap: 10px; align-items: center; }
.search-wrap { position: relative; flex: 1; max-width: 420px; }
.search-wrap svg { position: absolute; left: 13px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search-wrap .input { padding-left: 40px; width: 100%; }
.seg-wrap { flex-wrap: wrap; justify-self: start; }
.audit-table td { vertical-align: top; }
.audit-time, .audit-who { display: grid; gap: 1px; line-height: 1.3; }
.audit-time small, .audit-who small { color: var(--muted); font-size: 12.5px; }
.audit-what { display: flex; align-items: flex-start; gap: 9px; font-weight: 600; }
.audit-dot { flex: none; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--idle); }
.audit-dot.audit-inloggen { background: var(--brand); } .audit-dot.audit-beveiliging { background: var(--bad); } .audit-dot.audit-camera { background: var(--ok); }
.audit-dot.audit-streamen { background: var(--warn); } .audit-dot.audit-beheer { background: #7c5cd6; }
.audit-target { color: var(--muted); overflow-wrap: anywhere; }
.audit-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 20px 18px; font-size: 13.5px; border-top: 1px solid var(--line); }
@media (max-width: 720px) { .audit-search { flex-wrap: wrap; } .search-wrap { max-width: none; } }
/* Opmaak-controle: rustiger en gelijkmatiger */
.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tiles { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.card-head { padding: 18px 20px 6px; }


/* Tabellen: kolommen naast de naam blijven op één regel */
.table td:first-child { min-width: 200px; }
.table td:not(:first-child) { white-space: nowrap; }
.audit-table td { white-space: normal; }
.audit-table td:first-child { min-width: 0; }

/* Bediening: naam en status bovenaan, knoppen eronder, in elke rij hetzelfde */
.ctl-row { display: grid; justify-content: stretch; gap: 10px; }
.ctl-row .ctl-actions { justify-content: flex-start; }
.ctl-row .ctl-actions:empty { display: none; }

/* Bestandskeuze in dezelfde stijl als de knoppen */
input[type="file"].input { padding: 7px; }
input[type="file"]::file-selector-button { margin-right: 12px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
input[type="file"]::file-selector-button:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }

/* Uitleg onder velden mag de volle breedte gebruiken */
.field .hint { max-width: none; }
.viewers-now b:empty::before { content: '–'; }
/* Tabellen: compacter, zodat namen niet in drieën breken */
.table th, .table td { padding-left: 12px; padding-right: 12px; }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.table td:first-child { min-width: 0; }
.cell-main > span:last-child { min-width: 120px; }
.mini-thumb { width: 56px; }
@media (max-width: 1240px) { .table .col-server { display: none; } }
/* Lijsten (klanten, gebruikers): vaste kolombreedtes, zodat kop en rijen precies onder elkaar staan (alleen op brede schermen) */
@media (min-width: 861px) { .row { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.3fr) 130px 130px 90px; } }
.row-head span:nth-child(n+3):not(.num) { justify-self: start; }
.stat-tiles { padding: 0; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.stat-tiles .tile { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); padding: 16px 18px; }
.stat-tiles .tile b { font-size: 24px; letter-spacing: -.02em; }
.stat-tiles .tile b { font-size: 20px; white-space: nowrap; }
.report-summary b { font-size: 18px; white-space: nowrap; }
/* Detailpagina's en lijsten op kleine schermen: alles onder elkaar, niets over elkaar heen */
.row-users { grid-template-columns: minmax(0, 2fr) auto auto; }
.row-output { grid-template-columns: auto minmax(0, 2fr) auto auto; }
.split-detail { grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); }
@media (max-width: 960px) { .split-detail { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .row-users { grid-template-columns: minmax(0, 1fr) auto; }
  .row-output { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
  .row-output > * { display: revert; }
  .row-output > :nth-child(2) { flex: 1 1 150px; min-width: 0; }
}
.field, .form-grid > *, .split > *, .detail > *, .page > *, .workspace > * { min-width: 0; }
input, select, textarea { max-width: 100%; }
img, video, svg { max-width: 100%; }
.choice-grid { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.tl-lengths { grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); }
.assigned { grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); }
/* Lijsten op een telefoon: alleen de naam en het laatste getal, nooit meer kolommen dan er ruimte is */
@media (max-width: 860px) {
  .row:not(.row-users):not(.row-output) { grid-template-columns: minmax(0, 1fr) auto; }
  .row:not(.row-users):not(.row-output) > :nth-child(n+2):not(:last-child) { display: none; }
}
/* Kleine schermen: kaarten nooit breder dan het scherm, meldingen mogen afbreken */
.server-cards { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); }
.grid { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.list li { flex-wrap: wrap; }
.list li > div { flex: 1 1 200px; min-width: 0; }
/* Timelapses als kleine kaartjes, meerdere naast elkaar */
.tl-list { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); align-items: start; }
.tl-video { aspect-ratio: 16 / 9; max-height: none; object-fit: contain; }
.tl-head { flex-wrap: wrap; }
.tl-head > div { min-width: 0; flex: 1 1 150px; }
.tl-actions .head-actions { margin-left: auto; }
.tl-modes { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
[data-tl-to-field][hidden] { display: none; }

/* Streamen: platformen per camera en het overzicht van alle camera's */
.pf-intro { padding: 6px 20px 0; margin: 0; font-size: 14px; }
.pf-note { padding: 12px 20px 0; }
.pf-list { display: grid; margin-top: 14px; }
.pf-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; padding: 14px 20px; border-top: 1px solid var(--line); }
.pf-meta { display: flex; align-items: center; gap: 14px; }
.pf-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pf-name > span:last-child { display: grid; min-width: 0; }
.pf-name b { font-size: 15px; }
.pf-name small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.pf-mark { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.pf-mark svg { width: 20px; height: 20px; }
.pf-mark.pf-youtube { color: #d92d20; background: color-mix(in srgb, #d92d20 10%, var(--surface)); border-color: color-mix(in srgb, #d92d20 22%, var(--line)); }
.pf-actions { display: flex; gap: 8px; justify-content: flex-end; }
.pf-actions form { margin: 0; }
.pf-form { display: grid; gap: 12px; padding: 16px 20px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }
.pf-form[hidden] { display: none; }
.pf-list + .add-output, .pf-list + .pf-note { margin: 16px 20px 20px; padding: 0; }
.pf-list + .pf-note { margin-top: 16px; }
/* Op een smalle kaart (telefoon of naast het beeld): naam bovenaan, status en knop eronder */
.pf-list { container-type: inline-size; }
@container (max-width: 560px) {
  .pf-name { grid-column: 2 / -1; }
  .pf-meta { grid-column: 2 / -1; flex-wrap: wrap; justify-content: space-between; }
}

.sv-list { display: grid; }
.sv-item { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr) auto; align-items: center; gap: 12px 20px; padding: 16px 20px; border-top: 1px solid var(--line); color: inherit; }
.sv-item:first-child { border-top: 0; }
.sv-item:hover { background: var(--surface-2); text-decoration: none; }
.sv-cam { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sv-title { display: grid; min-width: 0; }
.sv-title b { font-size: 15px; }
.sv-title small { color: var(--muted); font-size: 13px; }
.sv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sv-side { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 600; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--idle); flex: none; }
.chip-live { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.chip-live i { background: var(--ok); }
.chip-fail { color: var(--bad); background: var(--bad-soft); border-color: transparent; }
.chip-fail i { background: var(--bad); }
@media (max-width: 1180px) {
  .sv-item { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "cam side" "chips chips"; }
  .sv-cam { grid-area: cam; }
  .sv-chips { grid-area: chips; }
  .sv-side { grid-area: side; }
}
@media (max-width: 560px) {
  .sv-item { grid-template-columns: minmax(0, 1fr); grid-template-areas: "cam" "chips" "side"; }
  .sv-side { justify-content: space-between; }
}
.add-output { container-type: inline-size; }
@container (max-width: 520px) { .add-output-form .form-grid { grid-template-columns: minmax(0, 1fr); } }

/* Menu met extra mogelijkheden per platform */
.card:has(.pf-menu) { overflow: visible; }
.pf-menu { position: relative; }
.pf-menu > summary { list-style: none; cursor: pointer; }
.pf-menu > summary::-webkit-details-marker { display: none; }
.pf-more { width: 38px; padding: 0; justify-content: center; }
.pf-more svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.pf-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 230px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 16px 40px rgba(15, 23, 42, .16); display: grid; gap: 2px; }
.pf-pop form { margin: 0; }
.pf-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; text-decoration: none; }
.pf-item svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.pf-item:hover, .pf-item:focus-visible { background: var(--surface-2); text-decoration: none; }
.pf-danger, .pf-danger svg { color: var(--bad); }
.pf-sep { height: 1px; margin: 4px 6px; background: var(--line); }
.pf-name small.pf-bad { color: var(--bad); }
.pf-actions .btn svg { width: 16px; height: 16px; }
.pf-cardactions { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 20px 20px; }
.pf-cardactions .btn svg { width: 16px; height: 16px; }

/* YouTube-log */
.yt-logs { display: grid; }
.yt-log { padding: 16px 20px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.yt-log-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.yt-log-head > div { display: grid; gap: 2px; min-width: 0; }
.yt-log-head .muted { font-size: 13px; }
.yt-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.yt-steps li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; }
.yt-steps small { display: block; color: var(--bad); font-size: 12.5px; overflow-wrap: anywhere; }
.yt-dot { width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--ok); flex: none; }
.yt-steps .bad .yt-dot { background: var(--bad); }
/* Klanten en teams: tabbladen, niveaus en camerakeuze */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; text-decoration: none; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }
.tab-count { padding: 1px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.level-grid { grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); align-items: stretch; }
.level-choice > span { display: grid; gap: 6px; }
.level-can { margin: 4px 0 0; padding: 0 0 0 18px; color: var(--muted); font-size: 12.5px; display: grid; gap: 2px; }
.level-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; padding: 14px 20px 20px; }
.level-legend p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
[data-member-cameras][hidden] { display: none; }
.sv-item .sv-side form { margin: 0; }
/* Klantenlijst op middelbrede schermen: de kolom "Bijgewerkt" vervalt, zodat niets over elkaar loopt */
@media (min-width: 861px) and (max-width: 1240px) {
  .row-customers { grid-template-columns: minmax(0, 2fr) 120px 90px 90px; }
  .row-customers > :nth-child(2) { display: none; }
}
.tabs { overflow-y: hidden; }
/* Acties in lijsten mogen op smalle schermen naar een volgende regel */
.sv-side { flex-wrap: wrap; }
.sv-side .btn { white-space: nowrap; }
@media (max-width: 560px) { .sv-side { justify-content: flex-start; } }

/* Beheeroverzicht: laatste activiteit, camera's nu en weergaven per dag */
.stat-of { font-size: 16px; font-weight: 600; color: var(--muted); }
.feed { list-style: none; margin: 0; padding: 6px 20px 14px; display: grid; }
.feed li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.feed li:first-child { border-top: 0; }
.feed li > div { flex: 1; min-width: 0; display: grid; }
.feed b { font-size: 14px; }
.feed small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.feed time { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.feed .audit-dot { margin-top: 6px; flex: none; }
.cam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 16px; padding: 16px 20px 20px; }
.cam-card { display: grid; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: inherit; text-decoration: none; align-content: start; }
.cam-card:hover { background: var(--surface-2); text-decoration: none; }
.cam-card.cam-off { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.cam-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 7px; overflow: hidden; background: linear-gradient(135deg, var(--surface-2), var(--idle-soft)); display: grid; place-items: center; color: var(--muted); }
.cam-thumb > svg { width: 28px; height: 28px; opacity: .5; }
.cam-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-off .cam-thumb img { filter: grayscale(1); opacity: .55; }
.cam-viewers { position: absolute; right: 8px; top: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: rgba(15, 23, 27, .72); color: #fff; font-size: 12.5px; font-weight: 700; }
.cam-viewers svg { width: 14px; height: 14px; }
.cam-info { display: grid; padding: 0 2px; }
.cam-info b { font-size: 15px; }
.cam-info small { color: var(--muted); font-size: 13px; }
.cam-pills { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 2px 2px; }
.bars { padding: 8px 20px 18px; }
.bars svg { width: 100%; height: auto; display: block; }
.bar-value { font-size: 11px; font-weight: 700; fill: var(--text); }
.bar-label { font-size: 11px; fill: var(--muted); }
.stack { display: grid; gap: 20px; align-content: start; min-width: 0; }
.bars svg { max-height: 240px; }
.bar-value { font-size: 13px; }
.bar-label { font-size: 12.5px; }

/* Camerapagina: de speler staat direct in de pagina */
.preview-embed { background: var(--surface); border-radius: inherit; overflow: hidden; line-height: 0; }
.preview-embed iframe { display: block; width: 100%; aspect-ratio: 16 / 11; border: 0; }

/* ===== Platformschil: één opbouw voor beheerders en klanten (zijbalk, bovenbalk, menu op telefoon) ===== */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.app-main { min-width: 0; display: flex; flex-direction: column; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 18px 14px; background: var(--surface); border-right: 1px solid var(--line); }
.sidebar .brand { flex-direction: column; align-items: flex-start; gap: 4px; padding: 2px 8px 18px; }
.sidebar .brand span { font-size: 12.5px; color: var(--muted); font-weight: 600; padding-left: 2px; }
.sidebar .brand .logo { max-height: 46px; }
.brand span { white-space: nowrap; }
.brand-compact, .menu-toggle, .mobile-menu { display: none; }

.nav-groups { display: grid; gap: 18px; }
.nav-group { display: grid; gap: 2px; }
.nav-caption { margin: 0; padding: 4px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nav-groups a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; font-size: 14.5px; font-weight: 600; color: var(--muted); }
.nav-groups a svg { width: 19px; height: 19px; flex: none; }
.nav-groups a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-groups a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }

.app-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px clamp(14px, 3vw, 40px); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.profile-btn { display: flex; align-items: center; gap: 10px; padding: 3px 10px 3px 4px; border: 1px solid transparent; border-radius: 999px; cursor: pointer; color: var(--text); }
.profile-btn:hover, .profile[open] > .profile-btn { background: var(--surface-2); border-color: var(--line); }
.user-text { min-width: 0; max-width: 200px; line-height: 1.25; }
.user-text b, .user-text span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-text b { font-size: 14px; }
.user-text span { font-size: 12.5px; color: var(--muted); }
.menu-who { margin: 0; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-who b, .menu-who small { display: block; overflow: hidden; text-overflow: ellipsis; }
.menu-who small { font-size: 12.5px; color: var(--muted); }
.menu-pop a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text); font-weight: 500; }
.menu-pop a:hover { background: var(--surface-2); text-decoration: none; }
.menu-pop a svg, .menu-pop form button svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.menu-pop form { margin: 0; }
.menu-pop form button { justify-content: flex-start; }

.workspace { min-width: 0; width: 100%; max-width: 2400px; padding: 32px clamp(14px, 3vw, 56px) 64px; display: grid; gap: 28px; align-content: start; }

.menu-toggle { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); place-items: center; cursor: pointer; flex: none; }
.menu-toggle:hover { background: var(--surface-2); }
.mt-bars { position: relative; display: block; width: 18px; height: 12px; }
.mt-bars i { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease, opacity .15s ease, top .2s ease; }
.mt-bars i:nth-child(1) { top: 0; } .mt-bars i:nth-child(2) { top: 5px; } .mt-bars i:nth-child(3) { top: 10px; }
.menu-toggle[aria-expanded="true"] i:nth-child(1) { top: 5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] i:nth-child(3) { top: 5px; transform: rotate(-45deg); }
.mobile-menu { position: absolute; left: 0; right: 0; top: 100%; padding: 10px 14px 16px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px rgba(0, 0, 0, .18); max-height: calc(100vh - 72px); max-height: calc(100dvh - 72px); overflow-y: auto; overscroll-behavior: contain; }
.mobile-menu:not([hidden]) { animation: mm-in .18s ease-out; }
@keyframes mm-in { from { opacity: 0; transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .mobile-menu:not([hidden]) { animation: none; } .mt-bars i { transition: none; } }
.mobile-menu .nav-groups a { padding: 12px; font-size: 16px; gap: 14px; }
.mobile-menu .nav-groups a svg { width: 21px; height: 21px; }
.mobile-menu .nav-groups a { color: var(--text); }
.mobile-menu .nav-groups a svg { color: var(--muted); }
.mobile-menu .nav-groups a[aria-current="page"], .mobile-menu .nav-groups a[aria-current="page"] svg { color: var(--brand); }

@media (max-width: 1100px) { .user-text { display: none; } .profile-btn { padding-right: 4px; } }
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .menu-toggle { display: grid; }
  .brand-compact { display: flex; }
  .brand-compact .logo { max-height: 32px; }
  .mobile-menu:not([hidden]) { display: block; }
  .workspace { padding: 20px 14px 48px; gap: 20px; }
}
@media (max-width: 560px) { .app-header .menu-pop { max-width: calc(100vw - 28px); } }

/* Hoofdonderdelen in de bovenbalk */
.nav-section { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; padding: 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.nav-section svg { width: 16px; height: 16px; }
.nav-section:first-child { margin-top: 4px; }
.sidebar .brand { padding-bottom: 14px; }

/* Dienstenoverzicht en dienstpagina's */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.svc-tile { display: grid; align-content: start; gap: 6px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); }
.svc-tile:hover { text-decoration: none; border-color: var(--brand); }
.svc-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 6px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.svc-icon svg { width: 22px; height: 22px; }
.svc-tile b { font-size: 17px; }
.svc-text { color: var(--muted); font-size: 14px; line-height: 1.5; }
.svc-pages { margin-top: 6px; font-size: 12.5px; color: var(--brand); font-weight: 600; }
.alert-info { background: var(--brand-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); }
.pill-warn { color: var(--warn, #b45309); background: var(--warn-soft, #fef3c7); }
.stat small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.service-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; padding: 16px 20px 20px; }
.service-pick > div { grid-column: 1 / -1; }
.service-check { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; }
.service-check svg { width: 18px; height: 18px; color: var(--muted); }
.service-check:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

@media (min-width: 1800px) { .app { grid-template-columns: 272px minmax(0, 1fr); } .workspace { font-size: 15.5px; } }
.nav-groups { gap: 14px; }
.nav-collapsed { margin-top: -10px; }
.side-title { display: flex; align-items: center; gap: 10px; margin: 0; padding: 4px 12px 12px; font-size: 16px; font-weight: 700; }
.side-title svg { width: 20px; height: 20px; color: var(--brand); }
.nav-groups { gap: 0; }
/* Bedrijfsgegevens */
.company-form { display: grid; gap: 20px; }
.cf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding: 16px 20px 20px; align-items: start; }
.incasso { margin: 0 20px 4px; padding: 16px 0 4px; border-top: 1px solid var(--line); }
.incasso h3 { font-size: 15px; margin: 0 0 4px; }
.incasso .cf-grid { padding: 12px 0; }
.incasso[hidden] { display: none; }
.mandate-check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: 14px; line-height: 1.5; cursor: pointer; }
.mandate-check input { margin-top: 4px; }
.mandate.ok { margin: 4px 0 12px; padding: 10px 14px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); font-size: 14px; font-weight: 600; }
.form-actions { padding: 8px 20px 20px; }

/* Dashboard, tickets en mededelingen */
.badge { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--brand); color: #fff; font: 700 11.5px/18px inherit; font-style: normal; text-align: center; }
.badge-dot { margin-left: 2px; min-width: 0; width: 8px; height: 8px; padding: 0; background: var(--warn); }
.pill-info { color: var(--brand); background: var(--brand-soft); }
.notice { display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--radius); background: var(--surface); }
.notice b { display: block; }
.notice p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.notice small { display: block; margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.notice .btn { margin-top: 10px; }
.notice-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }
.notice-icon svg { width: 18px; height: 18px; }
.notice-info { border-left-color: var(--brand); }
.notice-maintenance { border-left-color: var(--warn); }
.notice-maintenance .notice-icon { background: var(--warn-soft); color: var(--warn); }
.notice-incident { border-left-color: var(--bad); }
.notice-incident .notice-icon { background: var(--bad-soft); color: var(--bad); }
.stat small { color: var(--muted); }
.stat small a { color: var(--brand); font-weight: 600; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 20px; align-items: start; }
.svc-status, .dash-list { list-style: none; margin: 0; padding: 4px 0 8px; }
.svc-status a, .dash-list a, .dash-list li > span:only-child { display: flex; align-items: center; gap: 14px; padding: 12px 20px; color: var(--text); }
.svc-status a:hover, .dash-list a:hover { background: var(--surface-2); text-decoration: none; }
.svc-status .svc-icon { width: 38px; height: 38px; margin: 0; flex: none; }
.svc-name { flex: 1; min-width: 0; }
.svc-name small, .dash-list small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.dash-list li > a > span:first-child, .dash-list li > span:first-child { flex: 1; min-width: 0; }
.dash-list b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-amount { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; font-weight: 600; }
.alert-demo { padding: 0 20px; font-size: 12.5px; }
.quick-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; padding: 12px 20px 20px; }
.quick-links a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); font-weight: 600; font-size: 14px; }
.quick-links a:hover { border-color: var(--brand); text-decoration: none; background: var(--brand-soft); }
.quick-links svg { width: 18px; height: 18px; color: var(--brand); flex: none; }
.dist { list-style: none; margin: 0; padding: 8px 20px 18px; display: grid; gap: 12px; }
.dist li { display: grid; grid-template-columns: minmax(130px, 200px) 1fr 32px; gap: 12px; align-items: center; font-size: 14px; }
.dist-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }
.dist-label svg { width: 16px; height: 16px; }
.dist-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.dist-bar i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.dist b { text-align: right; }
.tickets-filter { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.tickets-filter .input[type=search] { flex: 1 1 220px; max-width: 360px; }
.ticket-form { padding: 20px; display: grid; gap: 16px; max-width: 900px; }
.ticket-form .cf-grid { padding: 0; }
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.ticket-thread { display: grid; gap: 14px; }
.ticket-side { display: grid; gap: 16px; }
.ticket-admin { display: grid; gap: 12px; padding: 16px 20px 20px; }
.ticket-admin label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.msg { padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.msg-staff { border-left: 4px solid var(--brand); }
.msg-internal { background: var(--warn-soft); border-color: transparent; border-left: 4px solid var(--warn); }
.msg header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 10px; font-size: 14px; }
.msg header time { margin-left: auto; font-size: 12.5px; }
.msg .avatar { width: 30px; height: 30px; font-size: 12px; }
.msg-body { line-height: 1.6; overflow-wrap: anywhere; }
.reply-form { padding: 16px; display: grid; gap: 12px; }
.reply-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.inline-check { display: flex; align-items: center; gap: 8px; margin-right: auto; font-size: 13.5px; color: var(--muted); }
.announce-row { display: flex; gap: 12px; align-items: center; }
.announce-form { display: grid; gap: 16px; padding: 16px 20px 20px; }
@media (max-width: 1000px) { .ticket-layout { grid-template-columns: minmax(0, 1fr); } .dist li { grid-template-columns: 1fr 32px; } .dist .dist-bar { grid-column: 1 / -1; order: 3; } }
.table td a b { white-space: nowrap; }
/* Hoofdonderdelen in de bovenbalk */
.top-tabs { display: flex; align-items: center; gap: 4px; min-width: 0; margin-left: 8px; }
.top-tabs a { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 15px; white-space: nowrap; }
.top-tabs a svg { width: 18px; height: 18px; flex: none; }
.top-tabs a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.top-tabs a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.top-tabs .badge { margin-left: 2px; }
.side-back { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; padding: 6px 12px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.side-back:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.side-back svg { width: 14px; height: 14px; transform: rotate(90deg); }
.mobile-top { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
@media (max-width: 900px) { .top-tabs { display: none; } .header-actions { margin-left: auto; } }
@media (max-width: 1100px) { .top-tabs a { padding: 10px 11px; } .top-tabs a svg { display: none; } }
