﻿:root{
  --bg:#0a0d14;
  --panel:#0f131b;
  --panel2:#121827;
  --text:#e7ebff;
  --muted: rgba(231,235,255,0.68);
  --border: rgba(231,235,255,0.10);
  --accent:#7c5cff;
  --danger:#ff4d6d;
  --ok:#46ffa0;
  --shadow: 0 20px 60px rgba(0,0,0,0.55);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: radial-gradient(1200px 700px at 20% -10%, rgba(124,92,255,0.22), transparent 55%),
              radial-gradient(900px 600px at 110% 0%, rgba(0,255,190,0.09), transparent 50%),
              var(--bg);
  color: var(--text);
  overflow: auto; /* was hidden */
}


.app-shell{
  min-height: 100vh;
  display:grid;
  grid-template-columns: 280px 1fr;
}

.sidebar{
  background: linear-gradient(180deg, rgba(15,19,27,0.95), rgba(10,13,20,0.95));
  border-right: 1px solid var(--border);
  padding: 18px;
  display:flex;
  flex-direction:column;
  gap: 16px;
}

.brand{
  display:flex;
  gap: 12px;
  align-items:center;
  padding: 10px 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(18,24,39,0.55);
}

.brand-dot{
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(124,92,255,0.12);
}

.brand-title{ font-weight: 900; letter-spacing:0.2px; }
.brand-sub{ font-size: 12px; color: var(--muted); margin-top: 2px; }
.brand-text{ display:flex; flex-direction:column; }

.nav{ display:flex; flex-direction:column; gap: 8px; }

.nav-item{
  width:100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  border-radius: 14px;
  padding: 10px 12px;
  display:flex;
  align-items:center;
  gap: 10px;
  cursor:pointer;
  font-weight: 700;
  opacity: 0.9;
}
.nav-item:hover{
  background: rgba(124,92,255,0.10);
  border-color: rgba(124,92,255,0.25);
  opacity: 1;
}
.nav-item.active{
  background: rgba(124,92,255,0.16);
  border-color: rgba(124,92,255,0.32);
}
.nav-icon{
  width: 24px;
  height: 24px;
  display:grid;
  place-items:center;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  font-size: 12px;
}

.sidebar-footer{
  margin-top:auto;
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.pill{
  display:flex;
  align-items:center;
  gap: 10px;
  border: 1px solid var(--border);
  background: rgba(18,24,39,0.55);
  border-radius: 999px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--muted);
}
.pill-dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,80,80,0.95);
  box-shadow: 0 0 0 6px rgba(255,80,80,0.14);
}
.pill-dot.ok{
  background: rgba(70,255,160,0.95);
  box-shadow: 0 0 0 6px rgba(70,255,160,0.14);
}

.main{ display:flex; flex-direction:column; min-width:0; }

.topbar{
  border-bottom: 1px solid var(--border);
  background: rgba(15,19,27,0.65);
  backdrop-filter: blur(10px);
  padding: 16px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}

.page-title{ font-weight: 950; letter-spacing: 0.2px; }
.crumb{ margin-top: 4px; font-size: 12px; color: var(--muted); }

.topbar-right{ display:flex; align-items:center; gap: 10px; }

.search{
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(18,24,39,0.55);
}
.search input{
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  width: 260px;
}
.search input::placeholder{ color: rgba(231,235,255,0.45); }

.workspace{ flex:1; min-height:0; display:block; }

.row{ display:flex; align-items:center; gap: 10px; }
.muted{ color: var(--muted); font-size: 13px; }
.muted.tiny{ font-size: 12px; }

.btn{
  border: 1px solid rgba(124,92,255,0.35);
  background: rgba(124,92,255,0.18);
  color: var(--text);
  border-radius: 14px;
  padding: 10px 12px;
  cursor:pointer;
  font-weight: 900;
}
.btn:hover{ background: rgba(124,92,255,0.24); }
.btn.secondary{
  border-color: var(--border);
  background: rgba(255,255,255,0.06);
}
.btn.secondary:hover{ background: rgba(255,255,255,0.10); }
.btn.full{ width:100%; }
.btn.small{ padding: 8px 10px; border-radius: 12px; font-size: 12px; }

.icon-btn{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  cursor:pointer;
  color: var(--text);
}
.icon-btn:hover{ background: rgba(255,255,255,0.10); }

.card{
  border: 1px solid var(--border);
  background: rgba(18,24,39,0.55);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.28);
}
.h1{ font-size: 16px; font-weight: 950; }

.media-top{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 12px;
  flex-wrap:wrap;
}
.media-controls{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap:wrap;
}

.chip{
  border:1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: rgba(231,235,255,0.85);
  border-radius: 999px;
  padding: 8px 10px;
  font-weight:900;
  font-size: 12px;
  cursor:pointer;
}
.chip.active{
  border-color: rgba(124,92,255,0.35);
  background: rgba(124,92,255,0.18);
}

.media-grid{
  margin-top: 14px;
  display:grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 1500px){ .media-grid{ grid-template-columns: repeat(5, minmax(0,1fr)); } }
@media (max-width: 1300px){ .media-grid{ grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (max-width: 1100px){ .media-grid{ grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 900px){ .media-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); } }

.media-card{
  border:1px solid var(--border);
  background: rgba(18,24,39,0.55);
  border-radius: 18px;
  overflow:hidden;
  cursor:pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}
.media-card:hover{
  transform: translateY(-2px);
  border-color: rgba(124,92,255,0.32);
  background: rgba(124,92,255,0.10);
}
.thumb{
  position:relative;
  aspect-ratio: 16/9;
  background: rgba(0,0,0,0.25);
}
.thumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}
.thumb .type-pill{
  position:absolute;
  left:10px;
  top:10px;
  border-radius:999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 950;
  border:1px solid var(--border);
  background: rgba(10,13,20,0.70);
  backdrop-filter: blur(8px);
}
.media-meta{ padding: 10px 12px 12px 12px; }
.media-name{
  font-weight: 950;
  font-size: 13px;
  line-height: 1.2;
  max-height: 32px;
  overflow:hidden;
}
.media-sub{
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
}

.modal-overlay.hidden{ display:none; }
.modal-overlay{ position: fixed; inset:0; z-index: 2000; }
.modal-backdrop{ position:absolute; inset:0; background: rgba(0,0,0,0.62); }

.modal{
  position:absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1180px;
  max-width: calc(100vw - 28px);
  height: 740px;
  max-height: calc(100vh - 28px);
  border-radius: 20px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(15,19,27,0.96);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.modal-top{
  padding: 14px 14px;
  border-bottom: 1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
.modal-title{ font-weight: 950; font-size: 14px; }
.modal-sub{ margin-top: 4px; font-size: 12px; color: var(--muted); }

.modal-body{
  flex:1;
  min-height:0;
  display:grid;
  grid-template-columns: 360px 1fr;
}
.modal-left{
  border-right: 1px solid var(--border);
  padding: 14px;
  display:flex;
  flex-direction:column;
  gap: 12px;
  min-width:0;
}
.modal-right{
  padding: 14px;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.thumb-big{
  position:relative;
  border-radius: 16px;
  overflow:hidden;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.25);
  aspect-ratio: 16/9;
}
.thumb-big img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}
.thumb-badge{
  position:absolute;
  left: 10px;
  top: 10px;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 950;
  font-size: 12px;
  border:1px solid var(--border);
  background: rgba(10,13,20,0.70);
}
.mini-actions{ display:flex; flex-direction:column; gap: 10px; }

.card-lite{
  border:1px solid var(--border);
  background: rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 12px;
}

.tabs{ display:flex; gap: 8px; flex-wrap:wrap; }
.tab{
  border:1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: rgba(231,235,255,0.85);
  border-radius: 999px;
  padding: 8px 10px;
  font-weight: 950;
  font-size: 12px;
  cursor:pointer;
}
.tab.active{
  border-color: rgba(124,92,255,0.35);
  background: rgba(124,92,255,0.18);
}
.tab.danger{ border-color: rgba(255,77,109,0.28); }
.tab.danger.active{
  border-color: rgba(255,77,109,0.45);
  background: rgba(255,77,109,0.16);
}

.tab-panels{ flex:1; min-height:0; }
.tab-panel{
  display:none;
  height:100%;
  overflow:auto;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  border-radius: 16px;
  padding: 12px;
}
.tab-panel.active{ display:block; }

.field{
  display:flex;
  flex-direction:column;
  gap: 6px;
  margin: 10px 0;
}
.field label{
  font-size: 12px;
  color: rgba(231,235,255,0.70);
  font-weight: 900;
}
.field input, .field select, .field textarea{
  border: 1px solid var(--border);
  background: rgba(10,13,20,0.55);
  color: var(--text);
  border-radius: 14px;
  padding: 10px 12px;
  outline:none;
}
.field textarea{ min-height: 110px; resize: vertical; }

.modal-bottom{
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}

/* Automation grid */
.auto-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap: 10px;
}
.auto-ops{
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
}
.auto-grid{
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow:hidden;
}
.auto-head{
  display:grid;
  grid-template-columns: 68px repeat(24, 1fr);
  background: rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(231,235,255,0.10);
}
.auto-head div{
  padding: 8px 6px;
  font-size: 11px;
  color: rgba(231,235,255,0.70);
  font-weight: 900;
  text-align:center;
  border-right: 1px solid rgba(231,235,255,0.08);
}
.auto-head div:first-child{ text-align:left; padding-left: 10px; }

.auto-row{
  display:grid;
  grid-template-columns: 68px repeat(24, 1fr);
}
.day-label{
  padding: 10px 10px;
  font-size: 12px;
  font-weight: 950;
  color: rgba(231,235,255,0.80);
  border-right: 1px solid rgba(231,235,255,0.10);
  background: rgba(255,255,255,0.03);
}
.auto-cell{
  height: 34px;
  border-right: 1px solid rgba(231,235,255,0.06);
  border-top: 1px solid rgba(231,235,255,0.06);
  cursor:pointer;
  background: rgba(10,13,20,0.30);
  transition: background 80ms ease;
}
.auto-cell.on{ background: rgba(124,92,255,0.32); }
.auto-cell:hover{ background: rgba(124,92,255,0.22); }

/* Toasts */
.toast-host{
  position: fixed;
  right: 16px;
  bottom: 16px;
  display:flex;
  flex-direction:column;
  gap: 10px;
  z-index: 2200;
}
.toast{
  width: 380px;
  max-width: calc(100vw - 32px);
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(15,19,27,0.95);
  box-shadow: var(--shadow);
  padding: 12px 12px;
}
.toast-title{ font-weight: 950; font-size: 13px; }
.toast-text{ color: var(--muted); font-size: 12px; margin-top: 4px; }

@media (max-width: 980px){
  .app-shell{ grid-template-columns: 92px 1fr; }
  .brand-text{ display:none; }
  .nav-item span:last-child{ display:none; }
  .nav-item{ justify-content:center; }
  .search input{ width: 160px; }
  .modal{ height: 82vh; }
  .modal-body{ grid-template-columns: 1fr; }
  .modal-left{ border-right:none; border-bottom:1px solid var(--border); }
}

/* Hard kill voor overlays die per ongeluk clicks blokkeren */
.hidden {
  display: none !important;
}

/* Modal overlay mag alleen clicks vangen als hij zichtbaar is */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.modal-overlay.hidden {
  display: none !important;
}

/* Toast host mag NOOIT clicks blokkeren */
.toast-host {
  pointer-events: none;
}

.toast-host .toast {
  pointer-events: auto;
}

/* Zorg dat de app kan scrollen als content hoger is */
html, body {
  height: 100%;
}

body {
  overflow: hidden;
}

/* Settings tabs */
.settings-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.settings-tab {
  border: 1px solid rgba(231,235,255,0.12);
  background: rgba(255,255,255,0.04);
  color: inherit;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 900;
  cursor: pointer;
}

.settings-tab.active {
  background: rgba(255,255,255,0.10);
  border-color: rgba(231,235,255,0.22);
}

.settings-panel {
  display: none;
  margin-top: 14px;
}

.settings-panel.active {
  display: block;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 1100px) {
  .settings-grid { grid-template-columns: 1fr; }
}

/* =========================
   MODAL: left stays, right scrolls
   ========================= */

/* Modal zelf niet meer intern scrollen */
.modal {
  max-height: calc(100vh - 80px);
  overflow: hidden;
}

/* Modal body neemt beschikbare hoogte in */
.modal-body {
  height: calc(100vh - 220px); /* top + bottom ruimte */
  overflow: hidden;            /* scroll zit rechts */
}

/* 2 koloms layout blijft zoals jij had, maar met vaste hoogte */
.modal-body {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  align-items: start;
}

/* Linkerkant blijft staan */
.modal-left {
  position: sticky;
  top: 0;
  align-self: start;
  height: calc(100vh - 220px);
  overflow: hidden; /* links niet scrollen */
}

/* Zorg dat de linkerkant netjes blijft passen */
.thumb-big {
  max-height: 320px;
}
.thumb-big img {
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: cover;
  display: block;
}

/* Rechterkant krijgt scroll */
.modal-right {
  height: calc(100vh - 220px);
  overflow: hidden; /* scroll zit in panels */
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Tabs blijven bovenaan, panels scrollen */
.tabs {
  flex: 0 0 auto;
}

/* Panels container wordt scroll area */
.tab-panels {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;           /* dit is de scroll */
  padding-right: 6px;       /* ruimte voor scrollbar */
}

/* Optioneel: iets prettiger scroll gedrag */
.tab-panels {
  scroll-behavior: smooth;
}

/* Mobile fallback: onder elkaar en alles scrollt weer normaal */
@media (max-width: 980px) {
  .modal-body {
    grid-template-columns: 1fr;
    height: auto;
    overflow: auto;
  }

  .modal-left {
    position: relative;
    height: auto;
  }

  .modal-right {
    height: auto;
  }

  .tab-panels {
    overflow: visible;
    padding-right: 0;
  }

  .modal {
    overflow: auto;
  }
}

/* Single scroll root, keep current layout */
.main { min-height: 0; }
.workspace.scroll-root{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Make sure content is not a nested scroll box */
.content.scroll-content{
  height: auto !important;
  overflow: visible !important;
  min-height: 100%;
}

/* Modal overlay should never block when hidden */
.modal-overlay.hidden{
  display: none !important;
  pointer-events: none !important;
}

.modal-overlay.hidden{ display:none !important; }

/* =========================================================
   MODAL: 1 scroll voor HELE modal body
   Left column sticky thumbnail, right does NOT have own scroll
   ========================================================= */

/* Modal blijft fixed size, geen scroll op modal zelf */
.modal {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Dit wordt de ENIGE scrollcontainer */
.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;     /* HIER zit de scroll */
  overflow-x: hidden;
}

/* Zorg dat sticky werkt binnen de scrollcontainer */
.modal-left {
  position: sticky;
  top: 0;
  align-self: start;
  height: fit-content;  /* belangrijk: niet forceren naar 100vh */
  overflow: visible;    /* links niet scrollen */
}

/* Rechterkant geen eigen scroll, laat de body scrollen */
.modal-right {
  min-height: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

/* Tabs blijven bovenaan, maar geen eigen scroll area */
.tab-panels {
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;    /* BELANGRIJK: geen nested scroll */
  padding-right: 0;
}

/* Tab-panel zelf ook niet scrollen */
.tab-panel {
  height: auto;
  overflow: visible;
}

/* Mobile: modal mag gewoon normaal scrollen */
@media (max-width: 980px) {
  .modal {
    overflow: hidden;
  }
  .modal-body {
    overflow-y: auto;
  }
  .modal-left {
    position: relative;
    top: auto;
  }
}
  
.nav-group { display: block; }

.nav-parent {
  justify-content: space-between;
  gap: 10px;
}

.nav-caret {
  margin-left: auto;
  opacity: 0.75;
  font-weight: 900;
  transition: transform 140ms ease;
}

.nav-group.open .nav-caret {
  transform: rotate(180deg);
}

.nav-sub {
  margin-top: 6px;
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid rgba(231,235,255,0.10);
  display: grid;
  gap: 6px;
}

.nav-sub.hidden { display: none; }

.nav-sub-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: rgba(231,235,255,0.85);
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 850;
}

.nav-sub-item:hover {
  background: rgba(255,255,255,0.06);
}

.nav-sub-item.active {
  background: rgba(255,255,255,0.10);
  color: rgba(231,235,255,0.98);
}

.nav-sub-dot {
  opacity: 0.7;
}

.plb-select{
  border: 1px solid var(--border);
  background: rgba(10,13,20,0.55);
  color: var(--text);
  border-radius: 14px;
  padding: 10px 12px;
  outline: none;
  font-weight: 900;
}

.plb-legend{
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.plb-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  border: 1px solid rgba(231,235,255,0.16);
  background: rgba(255,255,255,0.06);
}
.plb-dot.exists{ background: rgba(70,255,160,0.55); border-color: rgba(70,255,160,0.40); }
.plb-dot.missing{ background: rgba(255,77,109,0.50); border-color: rgba(255,77,109,0.40); }
.plb-dot.selected{ background: rgba(124,92,255,0.55); border-color: rgba(124,92,255,0.40); }

.plb-grid{
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 1100px){
  .plb-grid{ grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (max-width: 700px){
  .plb-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}

.plb-day{
  border: 1px solid var(--border);
  background: rgba(18,24,39,0.45);
  border-radius: 16px;
  padding: 10px;
  cursor: pointer;
  color: var(--text);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}
.plb-day:hover{
  transform: translateY(-1px);
  border-color: rgba(124,92,255,0.28);
  background: rgba(124,92,255,0.10);
}

.plb-day.selected{
  border-color: rgba(124,92,255,0.45);
  background: rgba(124,92,255,0.18);
}

.plb-day.today{
  box-shadow: 0 0 0 2px rgba(231,235,255,0.08) inset;
}

.plb-day.exists{
  border-left: 4px solid rgba(70,255,160,0.70);
}
.plb-day.missing{
  border-left: 4px solid rgba(255,77,109,0.70);
}

.plb-day.checking{
  opacity: 0.75;
}

.plb-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.plb-dow{
  font-weight: 950;
  font-size: 12px;
  opacity: 0.9;
}
.plb-badge{
  font-size: 11px;
  font-weight: 950;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(231,235,255,0.14);
  background: rgba(10,13,20,0.55);
  opacity: 0.9;
}

.plb-date{
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.plb-num{
  font-size: 22px;
  font-weight: 950;
  letter-spacing: 0.2px;
}
.plb-mon{
  font-size: 12px;
  font-weight: 900;
  opacity: 0.8;
}

.dash-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.dash-grid { display:grid; grid-template-columns: 1.2fr 1fr; gap:16px; }
.dash-col { display:flex; flex-direction:column; gap:16px; }

.dash-cards { display:grid; grid-template-columns: 1fr; gap:12px; }
.dash-card { border:1px solid rgba(255,255,255,.08); border-radius:14px; padding:14px; background: rgba(255,255,255,.02); }
.dash-card-top { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.dash-label { font-size:12px; opacity:.8; }
.dash-value { font-size:22px; font-weight:700; margin-top:6px; }
.dash-sub { margin-top:6px; font-size:12px; opacity:.7; }

.dash-pill { font-size:12px; padding:4px 10px; border-radius:999px; border:1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03); }
.dash-pill.ok { border-color: rgba(0,255,180,.35); }
.dash-pill.warn { border-color: rgba(255,200,0,.35); }
.dash-pill.bad { border-color: rgba(255,80,80,.35); }

.dash-actions .h2 { margin-bottom:10px; }
.dash-actions-grid { display:grid; grid-template-columns: 1fr; gap:10px; }

.dash-logs-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:10px; }
.dash-logs { max-height: 360px; overflow:auto; border-radius:12px; border:1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.2); padding:10px; }
.dash-logline { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size:12px; opacity:.9; padding:3px 2px; border-bottom:1px solid rgba(255,255,255,.04); }
.dash-logline:last-child { border-bottom:0; }

@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr; }
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden; /* voorkom dat de hele pagina zelf scrollt */
}

/* shell */
.app-shell {
  height: 100vh;
  display: flex;
  overflow: hidden; /* sidebar + main blijven in viewport */
}

/* main area */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden; /* scroll gebeurt in workspace, niet in main */
}

/* topbar blijft staan, workspace krijgt de rest */
.topbar {
  flex: 0 0 auto;
}

/* dit is jouw scroll container */
.workspace {
  flex: 1 1 auto;
  min-height: 0;     /* super belangrijk bij flex layouts */
  overflow-y: auto;  /* scroll hier */
  overflow-x: hidden;
}

/* content mag gewoon groeien */
.content {
  padding: 16px;
}




.ag-wrap { display:flex; flex-direction:column; gap:10px; }
.ag-wrap.is-disabled { opacity:0.75; pointer-events:none; }

.ag-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.ag-title { font-weight:600; }
.ag-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.ag-sep { width:1px; height:20px; background:rgba(255,255,255,0.12); margin:0 6px; }

.ag-grid { display:grid; gap:6px; }
.ag-head { display:grid; grid-template-columns:70px repeat(7, 1fr); gap:6px; }
.ag-corner { height:44px; }
.ag-day { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; padding:6px; border-radius:10px; background:rgba(255,255,255,0.04); }
.ag-day-name { font-weight:600; font-size:12px; }
.ag-day-actions { display:flex; gap:6px; }

.ag-mini { border:0; border-radius:8px; padding:4px 8px; cursor:pointer; background:rgba(255,255,255,0.06); color:inherit; font-size:12px; }
.ag-mini:hover { background:rgba(255,255,255,0.10); }

.ag-row { display:grid; grid-template-columns:70px repeat(7, 1fr); gap:6px; align-items:center; }
.ag-hour { font-size:12px; opacity:0.8; text-align:right; padding-right:8px; }

.ag-cell { height:22px; border-radius:8px; border:1px solid rgba(255,255,255,0.10); background:rgba(255,255,255,0.03); cursor:pointer; }
.ag-cell.on { background:rgba(120, 200, 255, 0.30); border-color:rgba(120, 200, 255, 0.45); }
.ag-cell.off:hover { background:rgba(255,255,255,0.06); }
.ag-cell.on:hover { background:rgba(120, 200, 255, 0.40); }

.ag-hint { margin-top:2px; }

.ag-cell {
    cursor: pointer;
    user-select: none;
}

    .ag-cell.disabled,
    .ag-mini.disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* belangrijk: sommige globale CSS zetten divs of grids op pointer-events none */
.ag-grid, .ag-grid * {
    pointer-events: auto;
}

.ag-wrap,
.ag-grid,
.ag-row,
.ag-head,
.ag-day,
.ag-day-actions,
.ag-cell,
.ag-hour {
    pointer-events: auto !important;
}

.ag-grid {
    position: relative !important;
    z-index: 9999 !important;
}

.ag-head {
    position: sticky; /* mag ook relative, maar sticky is nice */
    top: 0;
    z-index: 10000 !important;
}

.ag-row {
    position: relative !important;
    z-index: 9999 !important;
}

.ag-cell {
    position: relative !important;
    z-index: 10001 !important;
    cursor: pointer !important;
    user-select: none !important;
}

.ag-day-actions .ag-mini {
    position: relative !important;
    z-index: 10002 !important;
    cursor: pointer !important;
}

/* als jouw modal ergens een overlay pseudo-element gebruikt */
.tab-panel::before,
.tab-panel::after,
.modal-right::before,
.modal-right::after,
.field::before,
.field::after {
    pointer-events: none !important;
}

.log-line.lvl-err {
    color: #ff6b6b;
}

.log-line.lvl-warn {
    color: #ffd166;
}

.log-line.lvl-info {
    color: #a8dadc;
}

.log-line.lvl-debug {
    color: #bdb2ff;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 12px;
    gap: 6px;
}

.brand-logo {
    max-width: 170px;
    max-height: 54px;
    object-fit: contain;
}


.user-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name {
    font-size: 13px;
    opacity: 0.85;
}

.user-box {
    display: flex;
    align-items: center;
    width: 100%;
}

.logout-btn {
    margin-left: auto;
}

