:root {
  --dash-text: #0f172a;
  --dash-muted: #64748b;
  --dash-line: rgba(15, 23, 42, 0.10);
  --dash-card: rgba(255, 255, 255, 0.92);
  --dash-primary: #2563eb;
  --dash-bg: #f4f7fb;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--dash-text);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.88), rgba(255,255,255,0) 32rem),
    var(--dash-bg);
}

a { color: inherit; }
button, input { font: inherit; }

.dash-shell {
  width: min(1360px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.dash-card {
  border: 1px solid var(--dash-line);
  border-radius: 28px;
  background: var(--dash-card);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.dash-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding: 28px;
  margin-bottom: 18px;
}

.dash-header-main { max-width: 900px; }
.dash-brand-row { display: flex; align-items: center; gap: 10px; }
.dash-brand-row img { width: 34px; height: 34px; border-radius: 10px; background: #fff; }
.dash-eyebrow {
  margin: 0 0 8px;
  color: var(--dash-primary);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1, h2 { margin: 0; letter-spacing: -0.04em; }
h1 { font-size: clamp(2.2rem, 5vw, 4.6rem); line-height: 0.95; }
h2 { font-size: 1.25rem; }
.dash-lead, .dash-card p { color: var(--dash-muted); line-height: 1.65; }
.dash-lead { max-width: 780px; margin: 16px 0 0; font-size: 1.04rem; }

.dash-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  background: var(--dash-primary);
  color: #fff;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}
.dash-button--ghost { background: rgba(37, 99, 235, 0.10); color: #1d4ed8; }

.dash-actions { display: flex; gap: 10px; align-items: center; }
.dash-flash {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 18px;
  font-weight: 800;
}
.dash-flash--success { background: rgba(22, 163, 74, 0.12); color: #15803d; }
.dash-flash--error { background: rgba(220, 38, 38, 0.12); color: #b91c1c; }

.dash-access-card {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: end;
  padding: 22px;
  margin-bottom: 18px;
}
.dash-access-card h2 { margin-bottom: 4px; }
.dash-access-card p { margin: 0; }
.dash-inline-form { display: flex; gap: 10px; align-items: center; }
.dash-inline-form input, .dash-field input {
  width: 100%;
  border: 1px solid var(--dash-line);
  border-radius: 16px;
  padding: 12px 14px;
  background: #fff;
  color: var(--dash-text);
}
.dash-inline-form input { min-width: 260px; }

.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 30svh;
  grid-auto-flow: row dense;
  gap: 14px;
}
.dash-block {
  grid-column: span var(--dash-block-width, 1);
  grid-row: span var(--dash-block-height, 1);
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--dash-line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  overflow: hidden;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}
.dash-block-head {
  flex: 0 0 auto;
  padding: 22px 22px 16px;
  border-bottom: 1px solid var(--dash-line);
}
.dash-block-head span {
  display: inline-flex;
  margin-bottom: 7px;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(37, 99, 235, 0.10);
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.dash-block-head small { display: block; margin-top: 6px; color: var(--dash-muted); }
.dash-block-scroll { flex: 1; min-height: 0; overflow: auto; padding: 18px 22px 22px; }
.dash-note { margin: 0 0 16px; color: var(--dash-muted); line-height: 1.6; }
.dash-empty {
  padding: 18px;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.96);
  color: var(--dash-muted);
}

.dash-file-list { display: grid; gap: 12px; }
.dash-file-card {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--dash-line);
  border-radius: 20px;
  background: #fff;
}
.dash-file-card img { width: 90px; height: 72px; object-fit: cover; border-radius: 14px; background: #f8fafc; }
.dash-file-card strong { display: block; }
.dash-file-card small { display: block; margin-top: 4px; color: var(--dash-muted); }
.dash-file-icon {
  display: grid;
  place-items: center;
  width: 90px;
  height: 72px;
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.10);
  color: #1d4ed8;
  font-weight: 900;
}
.dash-file-icon--large { width: 120px; height: 96px; margin: 0 auto 18px; font-size: 1.4rem; }
.dash-file-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dash-file-actions a {
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.dash-map-frame-wrap { height: calc(100% - 50px); min-height: 220px; border-radius: 20px; overflow: hidden; background: #eef2ff; border: 1px solid var(--dash-line); }
.dash-map-frame { width: 100%; height: 100%; border: 0; display: block; }
.dash-open-map { margin-top: 12px; }

.dash-d3-visual, .dash-d3-chart { width: 100%; height: 100%; min-height: 220px; }
.dash-d3-chart svg { width: 100%; height: 100%; display: block; }
.dash-d3-chart text { fill: #334155; font-size: 12px; font-weight: 750; paint-order: stroke; stroke: rgba(255,255,255,0.85); stroke-width: 3px; stroke-linejoin: round; }
.dash-d3-chart .tick line, .dash-d3-chart .domain { stroke: rgba(15,23,42,0.12); }
.dash-d3-bar, .dash-d3-node { fill: #2563eb; }
.dash-d3-flow { opacity: 0.42; stroke-linecap: round; }
.dash-d3-slice { stroke: #fff; stroke-width: 2; }
.dash-d3-slice-0 { fill: #2563eb; stroke: #2563eb; }
.dash-d3-slice-1 { fill: #16a34a; stroke: #16a34a; }
.dash-d3-slice-2 { fill: #f97316; stroke: #f97316; }
.dash-d3-slice-3 { fill: #7c3aed; stroke: #7c3aed; }
.dash-d3-slice-4 { fill: #0891b2; stroke: #0891b2; }
.dash-d3-slice-5 { fill: #e11d48; stroke: #e11d48; }
.dash-d3-slice-6 { fill: #ca8a04; stroke: #ca8a04; }
.dash-d3-slice-7 { fill: #475569; stroke: #475569; }
.dash-d3-center-value { font-size: 20px !important; font-weight: 950; fill: #0f172a !important; }
.dash-d3-center-label { font-size: 11px !important; fill: #64748b !important; text-transform: uppercase; letter-spacing: 0.08em; }
.dash-d3-label { font-size: 12px !important; font-weight: 900; fill: #0f172a !important; }
.dash-d3-slice-label { font-size: 11px !important; fill: #fff !important; stroke: rgba(0,0,0,0.2) !important; stroke-width: 2px !important; }

.dash-table-wrap { width: 100%; overflow: auto; border: 1px solid var(--dash-line); border-radius: 18px; background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 420px; }
th, td { border-bottom: 1px solid rgba(15, 23, 42, 0.08); border-right: 1px solid rgba(15, 23, 42, 0.06); padding: 11px 12px; text-align: left; }
th { background: #f8fafc; font-size: 0.82rem; color: #334155; }
td { color: #475569; }

.dash-login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.dash-login-card { width: min(560px, 100%); padding: 28px; }
.dash-login-card h1 { font-size: clamp(2rem, 8vw, 3.6rem); margin-bottom: 12px; }
.dash-login-form { display: grid; gap: 14px; margin-top: 20px; }
.dash-login-form--code { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--dash-line); }
.dash-field { display: grid; gap: 7px; font-weight: 800; }
.dash-field span { color: #334155; }

.dash-viewer-card { padding: 24px; }
.dash-viewer-image { display: block; max-width: 100%; max-height: 75vh; margin: 0 auto; border-radius: 22px; }
.dash-table-wrap--viewer { max-height: 75vh; }
.dash-file-download-panel { text-align: center; padding: 42px 20px; }

@media (max-width: 980px) {
  .dash-header, .dash-access-card { flex-direction: column; align-items: stretch; }
  .dash-inline-form { flex-direction: column; align-items: stretch; }
  .dash-inline-form input { min-width: 0; }
  .dash-grid { grid-template-columns: 1fr; grid-auto-rows: minmax(240px, auto); }
  .dash-block { grid-column: auto; grid-row: auto; min-height: 240px; }
}

@media (max-width: 620px) {
  .dash-shell { width: min(100% - 18px, 1360px); padding-top: 10px; }
  .dash-header, .dash-card, .dash-block { border-radius: 22px; }
  .dash-file-card { grid-template-columns: 1fr; }
  .dash-file-card img, .dash-file-icon { width: 100%; height: 150px; }
}

/* JaBuvo kaartsite aansluiting */
body.dash-site-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.72), rgba(255,255,255,0) 34rem),
    var(--dash-bg, var(--tussenfase));
  color: var(--JaBuvo1);
}

body header nav .dash-nav-link {
  float: right;
  color: var(--JaBuvo2);
  font-weight: 700;
}

.dash-site-main,
.dash-shell {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 0 48px;
}

.dash-shell {
  max-width: 1360px;
}

.dash-card,
.dash-hero,
.dash-block,
.dash-home-hero,
.dash-home-choices {
  border: 1px solid var(--JaBuvo5);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(14px);
}

.dash-home-hero,
.dash-home-choices {
  display: block;
  width: 100%;
  padding: 42px 40px;
  margin: 0 0 32px;
}

.dash-home-hero h1,
.dash-login-card h1,
.dash-header h1 {
  color: var(--JaBuvo1);
}

.dash-home-hero h1 {
  max-width: 780px;
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
}

.dash-home-hero p,
.dash-login-card p,
.dash-lead,
.dash-card p {
  color: var(--tekstZacht);
}

.dash-home-hero > p:not(.dash-eyebrow) {
  max-width: 740px;
  margin: 0 0 24px;
  font-size: 1.08rem;
  line-height: 1.75;
}

.dash-eyebrow {
  color: var(--JaBuvo2);
}

.dash-button {
  background: var(--JaBuvo2);
  color: var(--wit) !important;
  border: 1px solid var(--JaBuvo2);
  border-radius: 10px;
}

.dash-button:hover {
  background: var(--JaBuvo1);
  border-color: var(--JaBuvo1);
  text-decoration: none;
}

.dash-button--ghost {
  background: transparent;
  color: var(--JaBuvo1) !important;
  border-color: var(--JaBuvo5);
}

.dash-button--ghost:hover {
  background: var(--wit);
  color: var(--JaBuvo2) !important;
}

.dash-home-login-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  max-width: 740px;
}

.dash-home-choices h2 {
  color: var(--JaBuvo1);
  margin: 0 0 18px;
  font-size: 2rem;
}

.dash-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dash-choice-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(108, 92, 231, 0.22);
  border-radius: 14px;
  background: #fff;
}

.dash-choice-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dash-choice-title img,
.dash-brand-row img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #fff;
}

.dash-login-card {
  display: block;
  width: min(640px, 100%);
  padding: 34px;
  margin: 0 auto;
}

.dash-login-card h1 {
  margin: 10px 0 12px;
}

.dash-login-wrap {
  min-height: auto;
  display: block;
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 0 48px;
}

.dash-field input,
.dash-inline-form input {
  border-color: rgba(108, 92, 231, 0.28);
  border-radius: 10px;
}

.dash-header,
.dash-access-card {
  border-radius: 16px;
}

.dash-block {
  border-radius: 16px;
}

@media (max-width: 760px) {
  .dash-home-hero,
  .dash-home-choices,
  .dash-login-card {
    padding: 28px 22px;
  }

  .dash-home-login-form,
  .dash-choice-grid {
    grid-template-columns: 1fr;
  }

  .dash-choice-card {
    align-items: stretch;
    flex-direction: column;
  }
}


/* Notitie- en alertblokken */
.dash-text-block {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 120px;
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.74);
  color: var(--dash-text);
  line-height: 1.65;
}

.dash-text-block p {
  margin: 0;
  white-space: pre-wrap;
}

.dash-text-block--alert {
  border-color: rgba(217, 119, 6, 0.32);
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.95), rgba(255, 251, 235, 0.90));
  color: #92400e;
}

.dash-text-block--alert strong {
  color: #78350f;
  font-size: 1rem;
}
