/* =====================================================================
   FLEXELA ONE — gedeeld ontwerpsysteem
   Donker premium palet, glaspanelen, merkaccenten uit het Flexela-logo.
   ===================================================================== */
:root {
  --bg: #0e1630;
  --bg-2: #131d3c;
  --navy: #152450;
  --navy-2: #1b2d60;
  --surface: rgba(255, 255, 255, .055);
  --surface-2: rgba(255, 255, 255, .085);
  --surface-3: rgba(255, 255, 255, .12);
  --glass: rgba(22, 32, 64, .72);
  --line: rgba(255, 255, 255, .11);
  --line-2: rgba(255, 255, 255, .18);
  --text: #f4f6fb;
  --muted: #bcc4d6;
  --dim: #8d97ae;
  --green: #22b33a; --yellow: #ffc914; --orange: #ff8a1f; --red: #e01e2c; --purple: #7a21d1; --blue: #1f63ff;
  --ok: #34c759; --warn: #ffb020; --bad: #ff453a; --info: #4f8bff;
  --warm: #ffb46b;
  --grad: linear-gradient(100deg, #ffa31a 0%, #ef2a4a 40%, #7a21d1 72%, #1f63ff 100%);
  --grad-soft: linear-gradient(100deg, rgba(255,163,26,.18), rgba(239,42,74,.16) 40%, rgba(122,33,209,.16) 72%, rgba(31,99,255,.18));
  --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 28px;
  --shadow: 0 24px 60px rgba(4, 8, 24, .45);
  --shadow-sm: 0 8px 24px rgba(4, 8, 24, .35);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Outfit", "Inter", system-ui, sans-serif;
  --nav-h: 68px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 400 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.app { background: radial-gradient(1200px 600px at 80% -10%, rgba(31, 99, 255, .18), transparent 60%),
  radial-gradient(900px 500px at -10% 10%, rgba(122, 33, 209, .14), transparent 60%), var(--bg); background-attachment: fixed; }
body.office-mode { background: radial-gradient(1100px 600px at 80% -10%, rgba(255, 180, 107, .16), transparent 60%), var(--bg); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(34px, 5vw, 60px); }
h2 { font-size: clamp(26px, 3.4vw, 42px); }
h3 { font-size: 20px; }
h4 { font-size: 16px; }
p { margin: 0; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid #6ea0ff; outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(31, 99, 255, .45); }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font: 600 12px/1 var(--font); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap-row { flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- merk ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { height: 26px; width: auto; }
.brand .one { font: 700 12px/1 var(--display); letter-spacing: .28em; padding: 5px 0 4px 2px; }
.brand-stack img { width: min(420px, 78vw); height: auto; }
.dots { display: inline-flex; gap: .4em; }
.dots i { width: .55em; height: .55em; border-radius: 50%; display: block; }
.dots i:nth-child(1) { background: var(--green); } .dots i:nth-child(2) { background: var(--yellow); }
.dots i:nth-child(3) { background: var(--orange); } .dots i:nth-child(4) { background: var(--red); }
.dots i:nth-child(5) { background: var(--purple); } .dots i:nth-child(6) { background: var(--blue); }

/* ---------- knoppen ---------- */
.btn {
  --h: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h);
  padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2);
  color: var(--text); font-weight: 500; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: background .2s, border-color .2s, transform .2s, opacity .2s, box-shadow .2s; user-select: none;
}
.btn:hover { background: var(--surface-3); border-color: rgba(255, 255, 255, .22); }
.btn:active { transform: scale(.98); }
.btn[disabled], .btn.is-busy { opacity: .5; pointer-events: none; }
.btn.primary { background: #fff; color: #07090f; border-color: #fff; }
.btn.primary:hover { background: #e9edf6; }
.btn.brand { background: var(--grad); border: 0; color: #fff; box-shadow: 0 10px 30px rgba(122, 33, 209, .35); }
.btn.brand:hover { filter: brightness(1.08); }
.btn.warm { background: linear-gradient(100deg, #ffb46b, #ff8a1f); border: 0; color: #1a0e02; }
.btn.danger { background: rgba(255, 69, 58, .14); border-color: rgba(255, 69, 58, .45); color: #ff8c84; }
.btn.danger:hover { background: rgba(255, 69, 58, .24); }
.btn.ok { background: rgba(52, 199, 89, .16); border-color: rgba(52, 199, 89, .5); color: #7ee29a; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { --h: 34px; padding: 0 14px; font-size: 13.5px; }
.btn.lg { --h: 54px; padding: 0 28px; font-size: 16px; }
.btn.block { width: 100%; }
.btn.icon { width: var(--h); padding: 0; }
.btn svg { width: 18px; height: 18px; flex: none; }
.link { color: #8fb3ff; } .link:hover { text-decoration: underline; }

/* ---------- kaarten & panelen ---------- */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .025));
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px;
}
.card.glass { background: var(--glass); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%); box-shadow: var(--shadow); }
.card.pad-lg { padding: 30px; }
.card.hover { transition: transform .25s, border-color .25s, background .25s; }
.card.hover:hover { transform: translateY(-2px); border-color: var(--line-2); background: rgba(255, 255, 255, .055); }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-title h3 { font-size: 17px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: 0; }

/* ---------- formulieren ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span, .label { font-size: 13px; color: var(--muted); font-weight: 500; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background-color: rgba(255, 255, 255, .04); color: var(--text); outline: none; font-size: 15.5px;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: #5c8dff; background-color: rgba(255, 255, 255, .06); box-shadow: 0 0 0 4px rgba(31, 99, 255, .18); }
.input::placeholder, .textarea::placeholder { color: var(--dim); }
.select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23a1a9bb' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.select option, .select optgroup { background: #111522; color: var(--text); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: #1f63ff; flex: none; }
.form-error { color: #ff8c84; font-size: 13.5px; min-height: 1em; }
.form-ok { color: #7ee29a; font-size: 13.5px; }
.hint { font-size: 12.5px; color: var(--dim); }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: rgba(255, 255, 255, .14); transition: .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { transform: translateX(18px); }

/* ---------- labels, status ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); letter-spacing: .02em; white-space: nowrap; }
.badge.demo { color: #ffd479; border-color: rgba(255, 201, 20, .35); background: rgba(255, 201, 20, .08); }
.badge.blue { color: #8fb3ff; border-color: rgba(79, 139, 255, .4); background: rgba(31, 99, 255, .12); }
.badge.green { color: #7ee29a; border-color: rgba(52, 199, 89, .4); background: rgba(52, 199, 89, .1); }
.badge.warm { color: var(--warm); border-color: rgba(255, 180, 107, .4); background: rgba(255, 180, 107, .1); }
.badge.red { color: #ff8c84; border-color: rgba(255, 69, 58, .4); background: rgba(255, 69, 58, .1); }
.chip { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2);
  background: var(--surface); font-size: 13px; color: var(--muted); cursor: pointer; transition: .2s; white-space: nowrap; }
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, .25); }
.chip.on { background: #fff; color: #07090f; border-color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; background: var(--dim); box-shadow: 0 0 0 3px rgba(255, 255, 255, .05); }
.sdot.available { background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 199, 89, .18), 0 0 12px rgba(52, 199, 89, .6); }
.sdot.online { background: var(--info); box-shadow: 0 0 0 3px rgba(79, 139, 255, .18); }
.sdot.in_meeting, .sdot.busy { background: var(--warn); box-shadow: 0 0 0 3px rgba(255, 176, 32, .18); }
.sdot.away { background: #c9a227; }
.sdot.offline { background: #4b5263; }

/* ---------- avatar ---------- */
.avatar { --s: 40px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; overflow: hidden; display: grid; place-items: center;
  font: 600 calc(var(--s) * .38)/1 var(--display); color: #fff; background: var(--grad); position: relative; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sq { border-radius: 12px; }
.avatar.lg { --s: 96px; } .avatar.md { --s: 52px; } .avatar.sm { --s: 32px; } .avatar.xs { --s: 26px; }

/* ---------- navigatie ---------- */
.nav { position: sticky; top: 0; z-index: 60; height: var(--nav-h); display: flex; align-items: center;
  background: rgba(14, 22, 48, .66); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--line); }
.nav.transparent { position: fixed; inset: 0 0 auto 0; background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; transition: background .3s, border-color .3s; }
.nav.transparent.scrolled { background: rgba(14, 22, 48, .72); border-color: var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.nav .wrap { display: flex; align-items: center; gap: 22px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 10px; }
.nav-links a { padding: 8px 12px; border-radius: 99px; color: var(--muted); font-size: 14.5px; transition: color .2s, background .2s; white-space: nowrap; }
.nav-links a:hover { color: var(--text); }
.nav-links a.on { color: var(--text); background: var(--surface-2); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lang { display: inline-flex; border: 1px solid var(--line-2); border-radius: 99px; padding: 3px; }
.lang button { border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .06em; padding: 5px 9px; border-radius: 99px; cursor: pointer; }
.lang button.on { background: var(--surface-3); color: var(--text); }
.nav-burger { display: none; }
.bell { position: relative; }
.bell .count { position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--red);
  color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.menu { position: absolute; top: calc(100% + 10px); right: 0; min-width: 240px; padding: 8px; border-radius: 16px; z-index: 80;
  background: rgba(24, 34, 66, .96); border: 1px solid var(--line-2); box-shadow: var(--shadow); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 0; background: transparent;
  color: var(--text); font-size: 14px; text-align: left; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--surface-2); }
.menu .sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu .head { padding: 10px 12px 12px; }
.pop { position: relative; }
.notif-list { width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; }
.notif { display: flex; gap: 12px; padding: 12px; border-radius: 12px; cursor: pointer; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: rgba(31, 99, 255, .08); }
.notif .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); flex: none; }

.mobile-menu { position: fixed; inset: var(--nav-h) 0 0 0; z-index: 70; background: rgba(14, 22, 48, .97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  padding: 18px 16px 40px; display: flex; flex-direction: column; gap: 4px; overflow: auto; }
.mobile-menu a { padding: 14px 12px; border-radius: 12px; font-size: 18px; font-family: var(--display); }
.mobile-menu a:hover { background: var(--surface-2); }
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
}
@media (max-width: 560px) {
  .nav .hide-sm { display: none !important; }
}

/* ---------- app-layout ---------- */
.page { padding: 34px 0 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { font-size: clamp(28px, 3.6vw, 40px); }
.page-head p { color: var(--muted); margin-top: 8px; }
.layout-side { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.layout-side.right { grid-template-columns: minmax(0, 1fr) 320px; }
@media (max-width: 960px) { .layout-side, .layout-side.right { grid-template-columns: 1fr; } }
.side-nav { position: sticky; top: calc(var(--nav-h) + 20px); display: flex; flex-direction: column; gap: 2px; }
.side-nav a, .side-nav button { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; color: var(--muted); border: 0; background: transparent; cursor: pointer; text-align: left; font-size: 14.5px; }
.side-nav a:hover, .side-nav button:hover { color: var(--text); background: var(--surface); }
.side-nav .on { color: var(--text); background: var(--surface-2); }
@media (max-width: 960px) { .side-nav { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 4px; } .side-nav a, .side-nav button { white-space: nowrap; } }

.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); overflow-x: auto; max-width: 100%; }
.tabs button { border: 0; background: transparent; color: var(--muted); padding: 8px 16px; border-radius: 99px; cursor: pointer; font-size: 14px; font-weight: 500; white-space: nowrap; }
.tabs button.on { background: #fff; color: #07090f; }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; color: var(--dim); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: rgba(255, 255, 255, .02); }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .ic { width: 52px; height: 52px; border-radius: 16px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--surface-2); }
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat b { font: 600 30px/1 var(--display); letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 13px; }

/* ---------- tegels dashboard ---------- */
.tile { display: flex; flex-direction: column; gap: 14px; min-height: 168px; position: relative; overflow: hidden; }
.tile .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); }
.tile .ic svg { width: 22px; height: 22px; }
.tile h3 { font-size: 17px; letter-spacing: .02em; }
.tile p { color: var(--muted); font-size: 14px; }
.tile .go { margin-top: auto; display: flex; align-items: center; gap: 6px; color: #8fb3ff; font-size: 14px; font-weight: 500; }
.tile.office { border-color: rgba(255, 180, 107, .3); background: linear-gradient(160deg, rgba(255, 180, 107, .12), rgba(255, 138, 31, .03) 60%); }

/* ---------- modaal & toast ---------- */
.modal-back { position: fixed; inset: 0; z-index: 200; background: rgba(6, 10, 26, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 16px; animation: fade .2s ease; }
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 22px; padding: 26px;
  background: rgba(24, 34, 66, .97); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: pop .25s cubic-bezier(.2, .9, .3, 1.2); }
.modal.wide { width: min(760px, 100%); }
.modal h3 { font-size: 21px; margin-bottom: 8px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
/* afbeelding bijsnijden */
.crop-stage { position: relative; width: 100%; overflow: hidden; border-radius: 14px; background: #0b0f1e;
  background-image: linear-gradient(45deg, rgba(255,255,255,.06) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.06) 75%), linear-gradient(45deg, rgba(255,255,255,.06) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.06) 75%);
  background-size: 20px 20px; background-position: 0 0, 10px 10px; touch-action: none; cursor: grab; user-select: none; }
.crop-stage:active { cursor: grabbing; }
.crop-stage canvas { display: block; width: 100%; height: 100%; }
.crop-frame { position: absolute; pointer-events: none; box-shadow: 0 0 0 9999px rgba(6, 10, 26, .55); border: 2px solid #fff; border-radius: 6px; }
.crop-frame.round { border-radius: 50%; }
.crop-tools { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.crop-tools input[type=range] { flex: 1; min-width: 140px; accent-color: #3f6cf0; }
.crop-tools .seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 99px; padding: 3px; }
.crop-tools .seg button { border: 0; background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 99px; font-size: 13px; cursor: pointer; }
.crop-tools .seg button.on { background: var(--primary-bg, #fff); color: var(--primary-fg, #161a35); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.toasts { position: fixed; z-index: 300; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); }
.toast { pointer-events: auto; max-width: 520px; padding: 12px 18px; border-radius: 14px; background: rgba(28, 38, 72, .97); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-sm); font-size: 14px; display: flex; gap: 10px; align-items: center; animation: pop .25s ease; }
.toast.err { border-color: rgba(255, 69, 58, .5); }
.toast.ok { border-color: rgba(52, 199, 89, .5); }

/* ---------- kantoor-vergrendeling (World niet beschikbaar tijdens kantoorsessie) ---------- */
.lock-screen { min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; padding: 30px 16px; }
.lock-card { width: min(560px, 100%); text-align: center; padding: 40px 30px; border-radius: 28px; border: 1px solid rgba(255, 180, 107, .3);
  background: linear-gradient(170deg, rgba(255, 180, 107, .12), rgba(22, 32, 64, .9) 55%); box-shadow: var(--shadow); }
.lock-card .ic { width: 70px; height: 70px; margin: 0 auto 20px; border-radius: 22px; display: grid; place-items: center; background: rgba(255, 180, 107, .15); color: var(--warm); }
.lock-card h2 { font-size: 28px; margin-bottom: 12px; }
.lock-card p { color: var(--muted); }
.office-banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 16px; margin-bottom: 22px; flex-wrap: wrap;
  border: 1px solid rgba(255, 180, 107, .35); background: linear-gradient(100deg, rgba(255, 180, 107, .14), rgba(255, 138, 31, .04)); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 50px 0 40px; color: var(--muted); font-size: 14px; }
.footer .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 30px; }
.footer h4 { color: var(--text); font-size: 14px; margin-bottom: 14px; font-family: var(--font); font-weight: 600; }
.footer a { display: block; padding: 4px 0; } .footer a:hover { color: var(--text); }
@media (max-width: 760px) { .footer .cols { grid-template-columns: 1fr 1fr; } }

/* ---------- auth-schermen ---------- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { position: relative; overflow: hidden; background: #101a38; }
.auth-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.auth-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 22, 48, 0) 40%, var(--bg)), linear-gradient(0deg, rgba(14, 22, 48, .8), transparent 50%); }
.auth-art .cap { position: absolute; left: 40px; bottom: 40px; right: 40px; z-index: 2; }
.auth-main { display: flex; flex-direction: column; justify-content: center; padding: 40px clamp(20px, 6vw, 80px); }
.auth-box { width: min(440px, 100%); }
@media (max-width: 900px) { .auth-shell { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* ---------- bewegingen ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } .reveal { opacity: 1; transform: none; } }

/* ---------- chat ---------- */
.chat { display: flex; flex-direction: column; min-height: 0; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 18px; background: var(--surface-2); font-size: 14.5px; line-height: 1.45; word-wrap: break-word; white-space: pre-wrap; }
.bubble.me { align-self: flex-end; background: #1f63ff; color: #fff; border-bottom-right-radius: 6px; }
.bubble.them { align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble .meta { display: block; font-size: 11px; opacity: .65; margin-top: 4px; }
.chat-form { display: flex; gap: 10px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form .input { border-radius: 99px; }

/* ---------- video ---------- */
.video-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.vtile { position: relative; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: #121c3a; border: 1px solid var(--line); }
.vtile video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.vtile .nm { position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: 99px; background: rgba(0, 0, 0, .55); font-size: 12.5px; }
.vtile .ph { position: absolute; inset: 0; display: grid; place-items: center; }
.vtile.me video { transform: scaleX(-1); }
.call-bar { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 14px; }
.call-bar .btn.off { background: rgba(255, 69, 58, .2); border-color: rgba(255, 69, 58, .5); }
svg { flex: none; }
.go svg { width: 16px; height: 16px; }
.list-item > svg { width: 18px; height: 18px; color: var(--dim); }
.fx-dark-tiles { filter: invert(1) hue-rotate(180deg) brightness(.82) contrast(.92) saturate(.55); }
.fx-dark-tiles img.leaflet-tile { width: 256.6px !important; height: 256.6px !important; }
.leaflet-container { isolation: isolate; }
@media (max-width: 560px) { .nav .nav-right > .lang { display: none; } .nav .wrap { gap: 10px; } }

/* =====================================================================
   LICHT THEMA (publieke website) — warm daglicht, glaspanelen en
   zonsondergang-accenten uit de Flexela-campusfoto's. Activeren met <body class="light">.
   ===================================================================== */
.brand .logo-b { display: none; }
body.light {
  --bg: #f7f3ee; --bg-2: #fffaf4;
  --surface: rgba(24, 28, 58, .035); --surface-2: rgba(24, 28, 58, .06); --surface-3: rgba(24, 28, 58, .1);
  --glass: rgba(255, 255, 255, .62);
  --glass-line: rgba(255, 255, 255, .85);
  --line: rgba(24, 28, 58, .09); --line-2: rgba(24, 28, 58, .16);
  --text: #161a35; --muted: #555c76; --dim: #80869c;
  --warm: #d9681a; --accent: #2a5bd7;
  --btn-bg: rgba(255, 255, 255, .7); --btn-bg-h: #fff;
  --primary-bg: #161a35; --primary-fg: #fff;
  --shadow: 0 24px 60px rgba(70, 45, 110, .13); --shadow-sm: 0 8px 24px rgba(70, 45, 110, .09);
  --sunset: linear-gradient(100deg, #ffb347 0%, #ff7a59 30%, #e8508a 58%, #8b4fd8 82%, #3f6cf0 100%);
  color-scheme: light;
  background:
    radial-gradient(900px 600px at 105% 8%, rgba(255, 170, 90, .22), transparent 60%),
    radial-gradient(800px 600px at -10% 35%, rgba(120, 140, 255, .16), transparent 60%),
    radial-gradient(900px 700px at 100% 75%, rgba(232, 80, 138, .12), transparent 60%),
    radial-gradient(800px 600px at 0% 100%, rgba(255, 190, 110, .16), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
/* donkere/gekleurde vlakken binnen het lichte thema (hero, CTA, foto's) */
body.light .on-dark, body.light .nav.transparent:not(.scrolled) {
  --text: #fff; --muted: rgba(255, 255, 255, .86); --dim: rgba(255, 255, 255, .7);
  --line: rgba(255, 255, 255, .22); --line-2: rgba(255, 255, 255, .34);
  --surface-2: rgba(255, 255, 255, .14); --surface-3: rgba(255, 255, 255, .24);
  --btn-bg: rgba(255, 255, 255, .14); --btn-bg-h: rgba(255, 255, 255, .24);
  --primary-bg: #fff; --primary-fg: #161a35;
  color: var(--text);
}
body.light ::selection { background: rgba(232, 80, 138, .25); }
body.light :focus-visible { outline-color: #3f6cf0; }
body.light .grad-text { background: var(--sunset); -webkit-background-clip: text; background-clip: text; }
body.light .brand .logo-w { display: none; }
body.light .brand .logo-b { display: block; }
body.light .nav.transparent:not(.scrolled) .brand .logo-w { display: block; }
body.light .nav.transparent:not(.scrolled) .brand .logo-b { display: none; }

/* knoppen */
body.light .btn { background: var(--btn-bg); border-color: var(--line-2); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); }
body.light .btn:hover { background: var(--btn-bg-h); border-color: var(--line-2); }
body.light .btn.primary { background: var(--primary-bg); color: var(--primary-fg); border-color: var(--primary-bg); }
body.light .btn.primary:hover { background: var(--primary-bg); filter: brightness(1.12); }
body.light .btn.brand { background: var(--sunset); color: #fff; border: 0; box-shadow: 0 12px 30px rgba(232, 80, 138, .3); }
body.light .btn.warm { background: linear-gradient(100deg, #ffb347, #ff7a2f); color: #2a1300; border: 0; box-shadow: 0 10px 26px rgba(255, 122, 47, .28); }
body.light .btn.ghost { background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.light .btn.ghost:hover { background: var(--surface-2); }
body.light .btn.danger { color: #c62f27; }
body.light .btn.ok { color: #1d8a3a; }
body.light .link, body.light .tile .go { color: var(--accent); }

/* glaspanelen */
body.light .card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .55));
  border: 1px solid var(--glass-line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 14px 40px rgba(70, 45, 110, .08);
  backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
}
body.light .card.hover:hover { background: rgba(255, 255, 255, .85); border-color: #fff; box-shadow: 0 18px 50px rgba(70, 45, 110, .13); }

/* formulieren */
body.light .input, body.light .select, body.light .textarea { background-color: rgba(255, 255, 255, .8); border-color: var(--line-2); }
body.light .input:focus, body.light .select:focus, body.light .textarea:focus { background-color: #fff; border-color: #6a8cf5; box-shadow: 0 0 0 4px rgba(63, 108, 240, .15); }
body.light .select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23555c76' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); }
body.light .select option, body.light .select optgroup { background: #fff; color: var(--text); }
body.light .form-error { color: #c62f27; }
body.light .form-ok { color: #1d8a3a; }
body.light .switch span { background: rgba(24, 28, 58, .16); }

/* labels */
body.light .badge { background: rgba(255, 255, 255, .7); }
body.light .badge.demo { color: #8a5d00; border-color: rgba(214, 160, 0, .4); background: rgba(255, 201, 20, .16); }
body.light .badge.blue { color: #2a5bd7; border-color: rgba(42, 91, 215, .28); background: rgba(63, 108, 240, .1); }
body.light .badge.green { color: #1d8a3a; border-color: rgba(29, 138, 58, .3); background: rgba(52, 199, 89, .12); }
body.light .badge.warm { color: #c25a12; border-color: rgba(217, 104, 26, .32); background: rgba(255, 170, 90, .16); }
body.light .badge.red { color: #c62f27; border-color: rgba(198, 47, 39, .3); background: rgba(255, 69, 58, .1); }
body.light .on-dark .badge { color: #fff; background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .32); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
body.light .chip:hover { border-color: var(--line-2); }
body.light .chip.on, body.light .tabs button.on { background: var(--primary-bg); color: var(--primary-fg); border-color: var(--primary-bg); }
body.light .tabs { background: rgba(255, 255, 255, .6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
body.light .skeleton { background: linear-gradient(90deg, rgba(24, 28, 58, .04), rgba(24, 28, 58, .08), rgba(24, 28, 58, .04)); background-size: 200% 100%; }
body.light .table tr:hover td { background: rgba(24, 28, 58, .025); }

/* navigatie, menu's, modaal */
body.light .nav, body.light .nav.transparent.scrolled { background: rgba(255, 252, 248, .72); border-color: rgba(24, 28, 58, .07); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); }
body.light .nav.transparent:not(.scrolled) { background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.light .lang button.on { background: var(--primary-bg); color: var(--primary-fg); }
body.light .menu, body.light .modal, body.light .toast { background: rgba(255, 255, 255, .94); border-color: rgba(24, 28, 58, .1); color: var(--text); }
/* menu binnen de transparante hero-nav: niet de witte on-dark kleuren erven */
body.light .nav .menu {
  --text: #161a35; --muted: #555c76; --dim: #80869c;
  --line: rgba(24, 28, 58, .09); --line-2: rgba(24, 28, 58, .16);
  --surface-2: rgba(24, 28, 58, .06); --surface-3: rgba(24, 28, 58, .1);
  background: rgba(255, 255, 255, .98); color: var(--text);
}
body.light .modal-back { background: rgba(30, 24, 60, .35); }
body.light .mobile-menu { background: rgba(250, 247, 243, .96); color: var(--text); }
body.light .footer { background: rgba(255, 255, 255, .45); border-color: rgba(24, 28, 58, .07); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }

/* auth-schermen */
body.light .auth-art { background: #2b3270; }
body.light .auth-art img { opacity: 1; }
body.light .auth-art::after { background: linear-gradient(0deg, rgba(25, 20, 60, .82), rgba(25, 20, 60, .2) 50%, transparent 70%); }
body.light .auth-main { background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .2)); }
