:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #172033;
  background: #f3f6fa;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
main { width: min(100% - 2rem, 1050px); margin: 0 auto; padding: 2rem 0; }
.narrow { width: min(100% - 2rem, 620px); text-align: center; padding-top: 8vh; }
h1 { font-size: clamp(2rem, 6vw, 3.2rem); margin: 0 0 1rem; }
h2 { margin-top: 0; }
.card { background: white; border-radius: 18px; padding: clamp(1.25rem, 4vw, 2rem); box-shadow: 0 6px 28px #23314a1c; margin-bottom: 1.25rem; }
.hidden { display: none !important; }
.status { min-height: 1.8em; font-size: 1.12rem; font-weight: 600; }
.error { color: #a31212; }
.success { color: #146b36; }
button, input, select { font: inherit; }
button { min-height: 54px; border: 0; border-radius: 12px; padding: .75rem 1.15rem; background: #185abd; color: white; font-weight: 700; font-size: 1.08rem; cursor: pointer; }
button:hover { background: #104897; }
button:focus-visible, input:focus-visible { outline: 4px solid #f0b429; outline-offset: 2px; }
button:disabled { opacity: .5; cursor: not-allowed; }
.primary-large { width: 100%; min-height: 78px; font-size: clamp(1.3rem, 4vw, 1.7rem); margin-top: 1rem; }
.danger { background: #b42318; }
.danger:hover { background: #8e1b13; }
.secondary { background: #49576d; }
.approve { background: #16733d; }
.controls { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 1rem; }
label { display: block; text-align: left; font-weight: 700; margin-bottom: .4rem; }
input { width: 100%; min-height: 52px; border: 2px solid #8a96a8; border-radius: 10px; padding: .6rem .8rem; margin-bottom: 1rem; }
select { width: 100%; min-height: 50px; border: 2px solid #8a96a8; border-radius: 10px; padding: .5rem; background: white; margin-bottom: 1rem; }
.device-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; padding-top: 1rem; }
.invite-row { display: flex; gap: .6rem; }
.invite-row input { margin: 0; }
.videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.video-box { position: relative; background: #151a23; border-radius: 16px; overflow: hidden; min-height: 230px; }
.video-box video { width: 100%; height: 100%; min-height: 230px; object-fit: cover; display: block; }
.video-box span { position: absolute; left: .7rem; bottom: .7rem; color: white; background: #000a; padding: .3rem .6rem; border-radius: 7px; }
.video-box.no-camera::after { content: "Geen camera"; position: absolute; inset: 0; display: grid; place-items: center; color: white; font-size: 1.3rem; font-weight: 700; pointer-events: none; }
.sharing { border: 5px solid #f0b429; }
.call-menu { margin: 1rem 0; padding: .75rem 1rem; background: white; border-radius: 18px; box-shadow: 0 6px 28px #23314a1c; text-align: left; }
.call-menu summary { cursor: pointer; font-size: 1.1rem; font-weight: 700; padding: .75rem; }
.call-actions { display: none; }
.menu-panel { padding: .5rem; }
.in-call { overflow: hidden; background: #000; }
.in-call main > .card:not(#call-area), .in-call #dashboard > .card:not(#call-area) { display: none; }
.in-call #call-area { display: block !important; position: fixed; inset: 0; z-index: 20; margin: 0; padding: 0; border-radius: 0; background: #000; box-shadow: none; }
.in-call #call-area .videos { display: block; width: 100%; height: 100%; }
.in-call .remote-box { position: absolute; inset: 0; min-height: 0; border-radius: 0; }
.in-call .remote-box video { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.in-call .local-preview { position: fixed; z-index: 24; width: clamp(145px, 20vw, 280px); aspect-ratio: 4 / 3; min-height: 0; border: 3px solid white; border-radius: 12px; box-shadow: 0 5px 22px #0009; cursor: grab; touch-action: none; user-select: none; }
.in-call .local-preview:active { cursor: grabbing; }
.in-call .local-preview video { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.in-call .corner-tl { top: 1rem; left: 1rem; right: auto; bottom: auto; }
.in-call .corner-tr { top: 1rem; right: 1rem; left: auto; bottom: auto; }
.in-call .corner-bl { bottom: 1rem; left: 1rem; right: auto; top: auto; }
.in-call .corner-br { right: 1rem; bottom: 1rem; left: auto; top: auto; }
.in-call .call-menu { position: fixed; z-index: 30; top: 1rem; right: 1rem; margin: 0; }
.in-call .call-actions { display: flex; }
.in-call .call-menu summary { display: block; color: white; background: #172033e8; border: 2px solid white; border-radius: 10px; list-style: none; text-align: center; }
.in-call .call-menu summary::-webkit-details-marker { display: none; }
.in-call .call-menu[open] summary { border-radius: 10px 10px 0 0; }
.in-call .menu-panel { width: min(92vw, 760px); max-height: calc(100vh - 5rem); overflow: auto; padding: 1rem; color: #172033; background: #fffffff2; border-radius: 10px 0 10px 10px; box-shadow: 0 8px 30px #0008; }
.in-call .call-menu:not([open]) .menu-panel { display: none; }
.warning { background: #fff4d6; border-left: 5px solid #f0b429; padding: .9rem; text-align: left; }
@media (max-width: 700px) {
  .videos { grid-template-columns: 1fr; }
  .device-grid { grid-template-columns: 1fr; gap: 0; }
  .invite-row { flex-direction: column; }
  main { padding-top: 1rem; }
  .in-call .local-preview { width: clamp(120px, 34vw, 180px); }
  .in-call .call-menu { top: .5rem; right: .5rem; }
}

