html, body { height: 100%; }
#map { height: calc(100vh - 56px); }
.controls {
  position: absolute;
  z-index: 1000;
  top: 70px;
  left: 12px;
  background: white;
  padding: 10px;
  border-radius: 8px;
}
.controls select, .controls button { margin: 2px; }
.legend {
  position: absolute;
  z-index: 1000;
  bottom: 20px;
  right: 12px;
  background: white;
  padding: 8px;
  border-radius: 8px;
}
.legend i {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin: 0 8px 0 3px;
}
.good { background: #2e8b57; }
.moderate { background: #f0ad4e; }
.bad { background: #d9534f; }
code { user-select: all; }
.payload {
  max-height: 70vh;
  overflow: auto;
  background: #f5f5f5;
  padding: 1rem;
}

/* Shared admin interface */
body { background: #f4f6f9; color: #20262e; }
main.container { max-width: 1480px; }
.page-header { display:flex; justify-content:space-between; align-items:flex-start; gap:1.5rem; margin-bottom:1.5rem; }
.page-header h1 { margin:0; font-size:clamp(1.8rem,3vw,2.65rem); font-weight:750; letter-spacing:-.035em; }
.eyebrow { margin:0 0 .35rem; color:#0d6efd; font-size:.78rem; font-weight:750; text-transform:uppercase; letter-spacing:.11em; }
.admin-card { border-radius:1rem; overflow:visible; }
.section-heading { display:flex; justify-content:space-between; align-items:center; gap:1rem; }
.table thead th { color:#667085; font-size:.78rem; text-transform:uppercase; letter-spacing:.055em; border-bottom-width:1px; white-space:nowrap; }
.table tbody td { padding-top:.9rem; padding-bottom:.9rem; }
.empty-state { padding:2rem !important; text-align:center; color:#667085; }
.quality-pills { display:flex; flex-wrap:wrap; gap:.4rem; }
.quality-pill, .status-badge { display:inline-flex; align-items:center; border-radius:999px; padding:.28rem .62rem; font-size:.78rem; font-weight:700; line-height:1.2; white-space:nowrap; }
.quality-good { background:#dcfce7; color:#166534; }
.quality-warn { background:#fef3c7; color:#92400e; }
.quality-bad { background:#fee2e2; color:#991b1b; }
.quality-empty { background:#e9ecef; color:#495057; }
.status-active { background:#dcfce7; color:#166534; }
.status-closed { background:#e9ecef; color:#495057; }
.status-warning { background:#fef3c7; color:#92400e; }
.stat-card { height:100%; min-height:105px; border-radius:1rem; padding:1.1rem 1.25rem; background:#fff; box-shadow:0 .3rem 1rem rgba(16,24,40,.07); display:flex; flex-direction:column; justify-content:space-between; border-left:4px solid #d0d5dd; }
.stat-card span { color:#667085; font-size:.85rem; font-weight:650; }
.stat-card strong { font-size:2rem; line-height:1; }
.stat-card .stat-text { font-size:1.05rem; line-height:1.25; }
.stat-good { border-left-color:#22c55e; }.stat-warn { border-left-color:#f59e0b; }.stat-bad { border-left-color:#ef4444; }.stat-empty { border-left-color:#98a2b3; }
.archived-runs summary { cursor:pointer; list-style:none; }.archived-runs summary::-webkit-details-marker { display:none; }
.details-summary { cursor:pointer; display:flex; justify-content:space-between; gap:1rem; list-style:none; }.details-summary::-webkit-details-marker{display:none;}
.code-block { display:block; padding:.9rem 1rem; background:#f8fafc; border:1px solid #e4e7ec; border-radius:.75rem; overflow:auto; }
.role-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.55rem; }
.role-option { display:flex; gap:.55rem; align-items:flex-start; border:1px solid #e4e7ec; border-radius:.75rem; padding:.7rem; cursor:pointer; background:#fff; }
.role-option:hover { border-color:#84adff; background:#f8fbff; }.role-option small{display:block;color:#667085;font-size:.72rem;line-height:1.25;margin-top:.15rem;}
.floor-map-shell,.map-panel { position:relative; width:100%; max-width:1200px; margin-inline:auto; overflow:hidden; border:1px solid #e4e7ec; border-radius:1rem; background:#fff; }
.floor-map-image { display:block; width:100%; height:auto; max-height:78vh; object-fit:contain; }
.point { position:absolute; transform:translate(-50%,-50%); width:2rem; height:2rem; border-radius:50%; display:flex; align-items:center; justify-content:center; color:#fff; font-size:.78rem; font-weight:800; text-decoration:none; border:3px solid #fff; box-shadow:0 2px 8px rgba(0,0,0,.35); z-index:5; }
.point:hover { color:#fff; transform:translate(-50%,-50%) scale(1.12); z-index:6; }
.point-good { background:#198754; }.point-warn { background:#f59e0b; }.point-bad { background:#dc3545; }.point-not_measured,.point-neutral { background:#0d6efd; }
.point-number { display:inline-flex; width:1.85rem; height:1.85rem; align-items:center; justify-content:center; border-radius:50%; background:#eef4ff; color:#175cd3; font-weight:800; }
.dropdown-menu form { margin:0; }.dropdown-menu form .dropdown-item { width:100%; text-align:left; }
@media (max-width: 991.98px) { .page-header{flex-direction:column;}.role-grid{grid-template-columns:1fr;} }
[data-local-datetime] {
  white-space: nowrap;
}

/* Indoor dashboard en formulieren */
.breadcrumb {
  --bs-breadcrumb-divider: "›";
  font-size: .9rem;
}

.breadcrumb a {
  color: #667085;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #0d6efd;
}

.floor-upload-preview {
  padding: 1rem;
  border: 1px solid #e4e7ec;
  border-radius: 1rem;
  background: #f8fafc;
}

.floor-upload-preview img {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: contain;
  border-radius: .75rem;
  background: #fff;
}

.results-map-wrap {
  width: fit-content;
  max-width: 100%;
}

.results-map-wrap .floor-map-image {
  width: auto;
  max-width: 100%;
  max-height: 72vh;
  margin-inline: auto;
}

.results-map-point {
  padding: 0;
  cursor: pointer;
}

.measurement-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
}

.measurement-detail {
  min-width: 0;
  padding: .9rem 1rem;
  border: 1px solid #e4e7ec;
  border-radius: .8rem;
  background: #f8fafc;
}

.measurement-detail span {
  display: block;
  margin-bottom: .25rem;
  color: #667085;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.measurement-detail strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: .98rem;
}

.quality-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
}

.quality-summary-item {
  padding: .8rem;
  border-radius: .75rem;
  background: #f2f4f7;
}

.quality-summary-item span {
  display: block;
  color: #667085;
  font-size: .72rem;
  font-weight: 700;
}

.quality-summary-item strong {
  display: block;
  margin-top: .15rem;
  font-size: 1.35rem;
}

.quality-summary-good {
  background: #dcfce7;
  color: #166534;
}

.quality-summary-warn {
  background: #fef3c7;
  color: #92400e;
}

.quality-summary-bad {
  background: #fee2e2;
  color: #991b1b;
}

.quality-summary-empty {
  background: #e9ecef;
  color: #495057;
}

.modal-header .eyebrow {
  line-height: 1;
}

@media (max-width: 991.98px) {
  .measurement-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quality-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .measurement-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* Outdoor beheer en webhooklog */
.webhook-table-wrapper {
  border: 1px solid #e4e7ec;
  border-radius: .85rem;
}

.webhook-table {
  min-width: 1080px;
}

.webhook-table thead th {
  background: #f8fafc;
}

.webhook-table th:first-child,
.webhook-table td:first-child {
  padding-left: 1rem;
}

.webhook-table th:last-child,
.webhook-table td:last-child {
  padding-right: 1rem;
}

.webhook-time {
  min-width: 175px;
}

.webhook-device {
  min-width: 210px;
}

.webhook-eui {
  display: inline-block;
  margin-top: .18rem;
  color: #c0266d;
  background: transparent;
  font-size: .82rem;
}

.webhook-reason {
  min-width: 300px;
  max-width: 620px;
  overflow-wrap: anywhere;
}

.webhook-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .3rem .65rem;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 750;
  line-height: 1.15;
  white-space: nowrap;
}

.webhook-status-ok {
  color: #166534;
  background: #dcfce7;
}

.webhook-status-ignored {
  color: #92400e;
  background: #fef3c7;
}

.webhook-status-error {
  color: #991b1b;
  background: #fee2e2;
}

.webhook-status-neutral {
  color: #344054;
  background: #eaecf0;
}

.webhook-endpoint {
  display: inline-flex;
  padding: .25rem .5rem;
  border-radius: .45rem;
  color: #344054;
  background: #f2f4f7;
  font-size: .8rem;
  font-weight: 700;
}

.webhook-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.webhook-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

.webhook-meta-grid > div {
  padding: .9rem 1rem;
  border: 1px solid #e4e7ec;
  border-radius: .75rem;
  background: #f8fafc;
}

.webhook-meta-grid span {
  display: block;
  margin-bottom: .2rem;
  color: #667085;
  font-size: .76rem;
  font-weight: 700;
}

.webhook-meta-grid strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: .9rem;
}

.webhook-detail-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.webhook-detail-list > div {
  padding: .85rem 0;
  border-bottom: 1px solid #e4e7ec;
}

.webhook-detail-list > div:first-child {
  padding-top: 0;
}

.webhook-detail-list > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.webhook-detail-list dt {
  margin-bottom: .25rem;
  color: #667085;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.webhook-detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.webhook-payload {
  min-height: 420px;
  margin-bottom: 0;
  border: 1px solid #e4e7ec;
  border-radius: .75rem;
  color: #101828;
  background: #f8fafc;
  font-size: .82rem;
  line-height: 1.55;
}

.position-badge {
  display: inline-flex;
  min-width: 2.5rem;
  justify-content: center;
  padding: .3rem .55rem;
  border-radius: 999px;
  color: #175cd3;
  background: #eef4ff;
  font-size: .8rem;
  font-weight: 800;
}

@media (max-width: 767.98px) {
  .webhook-meta-grid {
    grid-template-columns: 1fr;
  }

  .webhook-status-legend {
    display: none;
  }
}

/* Template batch 1: login, credentials en parserprofielen */
.login-shell {
  min-height: calc(100vh - 12rem);
  display: grid;
  place-items: center;
  padding: 2rem 0;
}

.login-card {
  width: min(100%, 31rem);
}

.login-icon {
  width: 3.75rem;
  height: 3.75rem;
  display: grid;
  place-items: center;
  margin: 0 auto 1.25rem;
  border-radius: 1rem;
  background: #eef4ff;
  color: #0d6efd;
  font-size: 1.65rem;
  font-weight: 700;
}

.credential-warning-icon {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ffc107;
  color: #212529;
  font-weight: 800;
}

.credential-list {
  display: grid;
  gap: 1rem;
}

.credential-item {
  padding: 1.1rem;
  border: 1px solid #e4e7ec;
  border-radius: .85rem;
  background: #fafbfc;
}

.credential-item-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}

.code-block {
  display: block;
  width: 100%;
  padding: .85rem 1rem;
  border: 1px solid #dfe3e8;
  border-radius: .7rem;
  background: #f5f7fa;
  color: #1f2937;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.code-block-secret {
  color: #c0266d;
}

.code-editor {
  min-height: 14rem;
  resize: vertical;
  line-height: 1.45;
  tab-size: 2;
}

.profile-list {
  display: grid;
  gap: .75rem;
}

.profile-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  color: inherit;
  text-decoration: none;
  border: 1px solid #e4e7ec;
  border-radius: .85rem;
  background: #fff;
  transition:
    border-color .15s ease,
    box-shadow .15s ease,
    transform .15s ease;
}

.profile-list-item:hover {
  color: inherit;
  border-color: #9ec5fe;
  box-shadow: 0 .3rem 1rem rgba(17, 24, 39, .07);
  transform: translateY(-1px);
}

.profile-list-arrow {
  flex: 0 0 auto;
  color: #0d6efd;
  font-size: 1.35rem;
}

.json-output {
  max-height: 65vh;
  margin: 0;
  padding: 1rem;
  overflow: auto;
  border: 1px solid #dfe3e8;
  border-radius: .85rem;
  background: #111827;
  color: #e5e7eb;
  font-size: .9rem;
  line-height: 1.5;
}

@media (max-width: 575.98px) {
  .credential-item-header {
    display: block;
  }

  .credential-item-header .btn {
    margin-top: .75rem;
  }

  .login-shell {
    min-height: auto;
    padding: 1rem 0;
  }
}

/* Indoor verdieping vanuit gebouwbeheer openen */
.floor-result-section {
  scroll-margin-top: 6rem;
}

/* Indoor runselectie en historiegrafieken */
.run-selector-card form {
  width: 100%;
}

.run-selector-card .form-select {
  margin-top: .55rem;
  min-width: 12rem;
  border-color: #d7dce3;
  background-color: transparent;
}

.history-chart-card {
  padding: 1.25rem;
  border: 1px solid #e2e6ec;
  border-radius: 1rem;
  background: #f8fafc;
}

.history-chart-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.history-chart-wrap {
  position: relative;
  height: 320px;
}

.history-chart-wrap-small {
  height: 240px;
}

@media (max-width: 767.98px) {
  .history-chart-wrap {
    height: 260px;
  }

  .history-chart-wrap-small {
    height: 220px;
  }
}

/* Modalweergave tabs */
.floor-modal-view-tabs {
  flex-wrap: wrap;
}

.floor-modal-view-tabs .btn {
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .floor-modal-view-tabs {
    width: 100%;
  }

  .floor-modal-view-tabs .btn {
    flex: 1 1 auto;
  }
}

/* Modalweergave tabs */
.floor-modal-view-tabs {
  flex-wrap: wrap;
}

.floor-modal-view-tabs .btn {
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .floor-modal-view-tabs {
    width: 100%;
  }

  .floor-modal-view-tabs .btn {
    flex: 1 1 auto;
  }
}

/* Indoor punteditor en kaartschaal */
.floor-editor-map-stage,
.point-editor-stage {
  display: flex;
  justify-content: center;
  width: 100%;
  overflow: auto;
}

.floor-editor-map,
.point-editor-map {
  position: relative;
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  line-height: 0;
  border: 1px solid #e4e7ec;
  border-radius: 1rem;
  background: #fff;
  overflow: hidden;
}

.floor-editor-map-image,
.point-editor-map-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 78vh;
  object-fit: initial;
}

.point-editor-map-image {
  cursor: crosshair;
}

.point-editor-preview {
  display: flex;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  background: #d9822b;
  pointer-events: none;
}

.point-editor-preview.d-none {
  display: none !important;
}

@media (max-width: 1199.98px) {
  .floor-editor-map-image,
  .point-editor-map-image {
    max-height: none;
  }
}

/* Outdoor validatiestatistieken */
.validation-stat {
  height: 100%;
  padding: 1rem .75rem;
  border: 1px solid #e4e7ec;
  border-radius: .85rem;
  background: #f8fafc;
}

.validation-stat strong {
  display: block;
  font-size: 1.65rem;
  line-height: 1.1;
}

.validation-stat span {
  display: block;
  margin-top: .35rem;
  color: #667085;
  font-size: .82rem;
  font-weight: 650;
}

.validation-stat-good {
  border-color: #abefc6;
  background: #ecfdf3;
}

.validation-stat-warning {
  border-color: #fedf89;
  background: #fffaeb;
}

.validation-stat-bad {
  border-color: #fecdca;
  background: #fef3f2;
}

/* Indoor testerpagina */
.tester-point-done {
  background: #198754;
}

.tester-point-current {
  background: #d97706;
}

.tester-point-pending {
  background: #98a2b3;
  opacity: .72;
}

/* Systeemstatus dashboard */
.health-grid {
  display: grid;
  grid-template-columns: repeat(
    3,
    minmax(0, 1fr)
  );
  gap: .85rem;
}

.health-check {
  padding: 1rem;
  border: 1px solid #e4e7ec;
  border-radius: .85rem;
  background: #f8fafc;
}

.health-check-heading {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .4rem;
}

.health-check p {
  color: #667085;
  font-size: .85rem;
}

.health-dot {
  width: .65rem;
  height: .65rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #98a2b3;
}

.health-check-ok {
  border-color: #abefc6;
  background: #ecfdf3;
}

.health-check-ok .health-dot {
  background: #12b76a;
}

.health-check-warning {
  border-color: #fedf89;
  background: #fffaeb;
}

.health-check-warning .health-dot {
  background: #f79009;
}

.health-check-error {
  border-color: #fecdca;
  background: #fef3f2;
}

.health-check-error .health-dot {
  background: #f04438;
}

.health-badge {
  display: inline-flex;
  align-items: center;
  padding: .35rem .7rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 750;
}

.health-warning {
  color: #93370d;
  background: #fef0c7;
}

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

/* Compacte systeemstatuskaart */
.compact-health-list {
  display: grid;
  gap: .55rem;
}

.compact-health-item {
  display: grid;
  grid-template-columns: .7rem minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  padding: .55rem .7rem;
  border: 1px solid #e4e7ec;
  border-radius: .7rem;
  background: #f8fafc;
}

.compact-health-dot {
  width: .65rem;
  height: .65rem;
  border-radius: 50%;
  background: #98a2b3;
}

.compact-health-dot-ok {
  background: #12b76a;
}

.compact-health-dot-warning {
  background: #f79009;
}

.compact-health-dot-error {
  background: #f04438;
}

.compact-health-label {
  min-width: 0;
  font-weight: 650;
}

.compact-health-result {
  color: #667085;
  font-size: .82rem;
  font-weight: 650;
}

/* Geïntegreerde servermonitoring */
.monitor-assessment-indicator {
  width: .85rem;
  height: .85rem;
  flex: 0 0 auto;
  margin-top: .3rem;
  border-radius: 50%;
  background: #98a2b3;
}

.monitor-assessment-ok {
  border-left: 4px solid #12b76a !important;
}

.monitor-assessment-ok .monitor-assessment-indicator {
  background: #12b76a;
}

.monitor-assessment-warning {
  border-left: 4px solid #f79009 !important;
}

.monitor-assessment-warning .monitor-assessment-indicator {
  background: #f79009;
}

.monitor-assessment-error {
  border-left: 4px solid #f04438 !important;
}

.monitor-assessment-error .monitor-assessment-indicator {
  background: #f04438;
}

.monitor-period-selector {
  flex-wrap: wrap;
}

.monitor-chart {
  position: relative;
  min-height: 280px;
  margin-top: 1.25rem;
  overflow: hidden;
}

.monitor-chart canvas {
  display: block;
  width: 100%;
  height: 280px;
}

.monitor-chart-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.monitor-service-grid {
  display: grid;
  grid-template-columns: repeat(
    3,
    minmax(0, 1fr)
  );
  gap: 1rem;
}

.monitor-service {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 1rem;
  border: 1px solid #e4e7ec;
  border-radius: .85rem;
  background: #f8fafc;
}

.monitor-service > div {
  display: grid;
  gap: .15rem;
}

.monitor-service > div span {
  color: #667085;
  font-size: .85rem;
}

.monitor-service-dot {
  width: .75rem;
  height: .75rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #98a2b3;
}

.monitor-service-dot-ok {
  background: #12b76a;
}

.monitor-service-dot-error {
  background: #f04438;
}

@media (max-width: 991.98px) {
  .monitor-service-grid {
    grid-template-columns: 1fr;
  }

  .monitor-period-selector {
    width: 100%;
    margin-top: 1rem;
  }

  .monitor-period-selector .btn {
    flex: 1 1 auto;
  }
}

/* Actieknoppen op modulehoofdpagina's */
.module-header-actions {
  min-width: 20rem;
}

@media (max-width: 767.98px) {
  .module-header-actions {
    width: 100%;
    min-width: 0;
  }

  .module-header-actions > div {
    justify-content: flex-start !important;
  }
}


/*
 * Centrale parserprofielbouwer
 */

.profile-builder-dialog {
  width: min(1320px, calc(100vw - 2rem));
  max-width: 1320px;
  height: calc(100vh - 2rem);
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.profile-builder-dialog .modal-content {
  max-height: calc(100vh - 2rem);
  overflow: hidden;
}

.profile-builder-dialog .modal-header,
.profile-builder-dialog .modal-footer {
  flex: 0 0 auto;
  background: #fff;
  z-index: 2;
}

.profile-builder-dialog .modal-body {
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 2rem;
}

.profile-builder-dialog #new-profile-payload {
  min-height: 18rem;
  max-height: 25rem;
  resize: vertical;
}

.profile-builder-dialog #profile-builder-fields {
  scroll-margin-top: 1rem;
}

.profile-builder-footer {
  justify-content: flex-end;
  gap: .5rem;
  border-top: 1px solid var(--bs-border-color);
}

@media (max-width: 991.98px) {
  .profile-builder-dialog {
    width: calc(100vw - 1rem);
    height: calc(100vh - 1rem);
    margin: .5rem;
  }

  .profile-builder-dialog .modal-content {
    max-height: calc(100vh - 1rem);
  }

  .profile-builder-dialog #new-profile-payload {
    min-height: 14rem;
  }
}


/*
 * Parserprofielbouwer: vaste kop en footer,
 * alleen het middendeel scrolt.
 */

#new-profile-modal .profile-builder-dialog {
  width: min(1320px, calc(100vw - 2rem));
  max-width: 1320px;
  height: calc(100dvh - 2rem);
  max-height: calc(100dvh - 2rem);
  margin: 1rem auto;
}

#new-profile-modal .profile-builder-dialog .modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

#new-profile-modal .modal-header {
  flex: 0 0 auto;
}

#new-profile-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#new-profile-modal .modal-footer {
  flex: 0 0 auto;
  margin-top: 0;
  background: #fff;
  border-top: 1px solid var(--bs-border-color);
}

#new-profile-modal #new-profile-payload {
  min-height: 15rem;
  max-height: 22rem;
  resize: vertical;
}

#new-profile-modal #profile-builder-fields {
  scroll-margin-top: 1rem;
  padding-bottom: 1rem;
}

@media (max-width: 991.98px) {
  #new-profile-modal .profile-builder-dialog {
    width: calc(100vw - 1rem);
    height: calc(100dvh - 1rem);
    max-height: calc(100dvh - 1rem);
    margin: .5rem auto;
  }

  #new-profile-modal .modal-body {
    padding: 1rem;
  }

  #new-profile-modal #new-profile-payload {
    min-height: 12rem;
    max-height: 18rem;
  }
}


/*
 * Definitieve scrollindeling parserprofielbouwer.
 * Het formulier zit tussen modal-content en modal-body
 * en moet daarom zelf de flex-container zijn.
 */

#new-profile-modal .profile-builder-dialog {
  height: calc(100dvh - 2rem);
  max-height: calc(100dvh - 2rem);
}

#new-profile-modal .modal-content {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

#new-profile-modal .profile-builder-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

#new-profile-modal .profile-builder-form > .modal-header {
  flex: 0 0 auto;
}

#new-profile-modal .profile-builder-form > .modal-body {
  flex: 1 1 0;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

#new-profile-modal .profile-builder-form > .modal-footer {
  flex: 0 0 auto;
  margin-top: 0;
  background: #fff;
}

@media (max-width: 991.98px) {
  #new-profile-modal .profile-builder-dialog {
    height: calc(100dvh - 1rem);
    max-height: calc(100dvh - 1rem);
  }
}


/*
 * Definitieve scrollindeling parserprofielbouwer.
 * Het formulier zit tussen modal-content en modal-body
 * en moet daarom zelf de flex-container zijn.
 */

#new-profile-modal .profile-builder-dialog {
  height: calc(100dvh - 2rem);
  max-height: calc(100dvh - 2rem);
}

#new-profile-modal .modal-content {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

#new-profile-modal .profile-builder-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

#new-profile-modal .profile-builder-form > .modal-header {
  flex: 0 0 auto;
}

#new-profile-modal .profile-builder-form > .modal-body {
  flex: 1 1 0;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

#new-profile-modal .profile-builder-form > .modal-footer {
  flex: 0 0 auto;
  margin-top: 0;
  background: #fff;
}

@media (max-width: 991.98px) {
  #new-profile-modal .profile-builder-dialog {
    height: calc(100dvh - 1rem);
    max-height: calc(100dvh - 1rem);
  }
}


/* ---------------------------------------------------------
   Indoor vaste testers
   --------------------------------------------------------- */

.test-device-card {
  min-height: 390px;
}

.test-device-card .card-body {
  overflow: visible;
}

.test-device-table-wrap {
  position: relative;
  overflow: visible;
}

.test-device-table {
  width: 100%;
}

.test-device-table td,
.test-device-table th {
  vertical-align: middle;
}

.test-device-table .dropdown {
  position: static;
}

.test-device-table .dropdown-menu {
  z-index: 1080;
}

@media (max-width: 1199.98px) {
  .test-device-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 10rem;
  }

  .test-device-table {
    min-width: 1180px;
  }
}

.iotnet-brand {
  display: inline-flex;
  align-items: center;
  padding: 0;
  line-height: 1;
}

.iotnet-brand-logo {
  display: block;
  height: 34px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

/* Realtime RF Monitor */
.rf-floorplan-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  border: 1px solid #e4e7ec;
  border-radius: 1rem;
  background: #fff;
  overflow: hidden;
}

.rf-floorplan-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 76vh;
  object-fit: contain;
}

.rf-anchor-dot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #0d6efd;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 800;
  text-decoration: none;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  z-index: 5;
}

.rf-anchor-dot:hover {
  color: #fff;
  transform: translate(-50%, -50%) scale(1.12);
  z-index: 6;
}

.rf-anchor-muted {
  background: #6c757d;
}


/* Compacte rechtenweergave in gebruikersbeheer */
.role-grid-compact {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.role-grid-compact .role-option {
  min-width: 8.8rem;
  max-width: 10.5rem;
  min-height: 3.15rem;
  align-items: flex-start;
  gap: .45rem;
  padding: .5rem .55rem;
}

.role-grid-compact .role-option .form-check-input {
  margin-top: .12rem;
  flex: 0 0 auto;
}

.role-grid-compact .role-option strong {
  display: block;
  font-size: .9rem;
  line-height: 1.15;
}

.role-grid-compact .role-option small {
  display: block;
  margin-top: .1rem;
  font-size: .68rem;
  line-height: 1.12;
}

@media (min-width: 1400px) {
  .role-grid-compact .role-option {
    min-width: 9.6rem;
  }
}

@media (max-width: 991.98px) {
  .role-grid-compact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .role-grid-compact .role-option {
    max-width: none;
  }
}

/* Rustige rechtenweergave in gebruikersbeheer */
.role-summary-panel {
  border: 1px solid #e4e7ec;
  border-radius: .9rem;
  background: #fff;
  padding: .75rem .85rem;
}

.role-summary-panel summary {
  display: flex;
  align-items: center;
  gap: .75rem;
  cursor: pointer;
  list-style: none;
}

.role-summary-panel summary::-webkit-details-marker {
  display: none;
}

.role-summary-title {
  flex: 0 0 auto;
  color: #344054;
  font-weight: 750;
}

.role-summary-title::before {
  content: "▸";
  display: inline-block;
  margin-right: .35rem;
  color: #667085;
  transition: transform .15s ease;
}

.role-summary-panel[open] .role-summary-title::before {
  transform: rotate(90deg);
}

.role-summary-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  min-width: 0;
}

.role-summary-badges .badge {
  font-size: .74rem;
  font-weight: 700;
}

.role-summary-panel:not([open]) {
  min-height: 3.3rem;
  display: flex;
  align-items: center;
}

.role-summary-panel:not([open]) summary {
  width: 100%;
}

.role-summary-panel[open] {
  box-shadow: 0 .35rem 1rem rgba(16, 24, 40, .06);
}

.role-summary-panel[open] .role-grid-compact .role-option {
  min-height: 2.9rem;
}

@media (max-width: 991.98px) {
  .role-summary-panel summary {
    align-items: flex-start;
    flex-direction: column;
    gap: .45rem;
  }
}

/* Gebruikersbeheer: bovenste velden blijven staan bij openklappen rechten */
.user-admin-row {
  align-items: flex-start !important;
}

.user-admin-row > [class*="col-"] {
  align-self: flex-start;
}

.user-admin-row .form-check.form-switch {
  margin-top: 2.15rem;
  padding-bottom: 0 !important;
}

.user-admin-row .d-grid {
  margin-top: 2rem;
}

.user-admin-row .role-summary-panel {
  margin-top: 0;
}

.user-admin-row .role-summary-panel[open] {
  margin-bottom: 0;
}

@media (max-width: 1199.98px) {
  .user-admin-row .form-check.form-switch,
  .user-admin-row .d-grid {
    margin-top: 0;
  }
}

/* Gebruikersbeheer: bovenste velden blijven staan bij openklappen rechten */
.user-admin-row {
  align-items: flex-start !important;
}

.user-admin-row > [class*="col-"] {
  align-self: flex-start;
}

.user-admin-row .form-check.form-switch {
  margin-top: 2.15rem;
  padding-bottom: 0 !important;
}

.user-admin-row .d-grid {
  margin-top: 2rem;
}

.user-admin-row .role-summary-panel {
  margin-top: 0;
}

.user-admin-row .role-summary-panel[open] {
  margin-bottom: 0;
}

@media (max-width: 1199.98px) {
  .user-admin-row .form-check.form-switch,
  .user-admin-row .d-grid {
    margin-top: 0;
  }
}

.rf-new-anchor-dot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  background: #0d6efd;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(13, 110, 253, .18);
  pointer-events: none;
  z-index: 5;
}

.rf-floorplan-panel {
  background: #fff;
}

.rf-place-target {
  cursor: crosshair;
}

.rf-floorplan-horizontal {
  min-height: 320px;
  max-height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.rf-floorplan-horizontal .rf-floorplan-image {
  max-height: 600px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.rf-floorplan-panel .form-label {
  font-size: .9rem;
}

@media (min-width: 1400px) {
  .rf-floorplan-horizontal {
    min-height: 380px;
  }
}

@media (max-width: 991.98px) {
  .rf-floorplan-horizontal {
    max-height: none;
  }

  .rf-floorplan-horizontal .rf-floorplan-image {
    max-height: none;
    width: 100%;
  }
}

/* Realtime RF: inklapbare plattegronden */
.rf-floorplan-list {
  display: grid;
  gap: 1rem;
}

.rf-floorplan-row {
  border: 1px solid #e4e7ec;
  border-radius: 1rem;
  background: #fff;
  overflow: hidden;
}

.rf-floorplan-row[open] {
  box-shadow: 0 .35rem 1rem rgba(16,24,40,.06);
}

.rf-floorplan-summary {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.15rem;
  cursor: pointer;
  list-style: none;
}

.rf-floorplan-summary::-webkit-details-marker {
  display: none;
}

.rf-floorplan-summary-main {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.rf-floorplan-summary-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: .45rem .75rem;
  color: #667085;
  font-size: .9rem;
}

.rf-floorplan-row[open] .rf-floorplan-toggle-label {
  color: #fff;
  background: #0d6efd;
  border-color: #0d6efd;
}

.rf-floorplan-row[open] .rf-floorplan-toggle-label::after {
  content: " geopend";
}

.rf-floorplan-detail {
  border-top: 1px solid #e4e7ec;
  padding: 1rem;
}

.rf-floorplan-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: .75rem;
}

.rf-floorplan-large {
  display: block;
  width: 100%;
}

.rf-place-device-form {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) 7rem 7rem 10rem;
  gap: .75rem;
  align-items: end;
}

@media (max-width: 991.98px) {
  .rf-floorplan-summary {
    grid-template-columns: 1fr;
  }

  .rf-floorplan-summary-stats {
    justify-content: flex-start;
  }

  .rf-place-device-form {
    grid-template-columns: 1fr;
  }
}

/* Realtime RF: compacte uplinkhistorie */
.rf-uplink-list {
  display: grid;
  gap: .35rem;
}

.rf-uplink-header,
.rf-uplink-summary {
  display: grid;
  grid-template-columns: minmax(10rem, 1.2fr) .6fr minmax(12rem, 1.4fr) .6fr .6fr .7fr .7fr;
  gap: 1rem;
  align-items: center;
}

.rf-uplink-header {
  padding: 0 .75rem .65rem;
  color: #667085;
  font-size: .78rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .055em;
  border-bottom: 1px solid #e4e7ec;
}

.rf-uplink-row {
  border-bottom: 1px solid #e4e7ec;
}

.rf-uplink-row:last-child {
  border-bottom: 0;
}

.rf-uplink-summary {
  padding: .85rem .75rem;
  list-style: none;
}

details.rf-uplink-row .rf-uplink-summary {
  cursor: pointer;
}

.rf-uplink-summary::-webkit-details-marker {
  display: none;
}

.rf-uplink-row[open] .rf-uplink-summary,
.rf-uplink-row-static:nth-child(even) .rf-uplink-summary {
  background: rgba(248, 250, 252, .9);
}

.rf-uplink-row[open] .rf-uplink-toggle-label {
  color: #fff;
  background: #0d6efd;
  border-color: #0d6efd;
}

.rf-uplink-row[open] .rf-uplink-toggle-label::after {
  content: " sluiten";
}

.rf-uplink-details {
  display: grid;
  gap: .5rem;
  padding: .75rem;
  background: #f8fafc;
}

.rf-uplink-gateway {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) 8rem 8rem;
  gap: 1rem;
  align-items: center;
  padding: .7rem .85rem;
  border: 1px solid #e4e7ec;
  border-radius: .75rem;
  background: #fff;
}

.rf-uplink-gateway-best {
  border-color: #abefc6;
  background: #ecfdf3;
}

@media (max-width: 991.98px) {
  .rf-uplink-header {
    display: none;
  }

  .rf-uplink-summary,
  .rf-uplink-gateway {
    grid-template-columns: 1fr;
    gap: .35rem;
  }

  .rf-uplink-summary > div::before {
    display: block;
    color: #667085;
    font-size: .72rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .055em;
  }

  .rf-uplink-summary > div:nth-child(1)::before { content: "Tijd"; }
  .rf-uplink-summary > div:nth-child(2)::before { content: "Gateways"; }
  .rf-uplink-summary > div:nth-child(3)::before { content: "Beste gateway"; }
  .rf-uplink-summary > div:nth-child(4)::before { content: "RSSI"; }
  .rf-uplink-summary > div:nth-child(5)::before { content: "SNR"; }
  .rf-uplink-summary > div:nth-child(6)::before { content: "Batterij"; }
}

/* Realtime RF Monitor: aparte plattegrondpagina's */
.rf-map-stage {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  border: 1px solid #e4e7ec;
  border-radius: 1rem;
  background: #fff;
  overflow: hidden;
}

.rf-map-image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
}

.rf-place-target {
  cursor: crosshair;
}

.rf-anchor-highlight {
  box-shadow:
    0 0 0 4px rgba(13, 110, 253, .22),
    0 2px 8px rgba(0, 0, 0, .35);
}

@media (max-width: 991.98px) {
  .rf-map-image {
    max-height: none;
  }
}

/* Dropdowns in beheertabellen mogen buiten de tabel/card vallen */
.admin-card,
.admin-card .card-body,
.table-responsive {
  overflow: visible;
}

.dropdown-menu {
  z-index: 2050;
}

@media (max-width: 991.98px) {
  .table-responsive {
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 7rem;
  }
}

.rf-anchor-button {
  padding: 0;
  line-height: 1;
  border: 3px solid #fff;
}

.rf-anchor-button:focus-visible {
  outline: 3px solid rgba(13, 110, 253, .35);
  outline-offset: 3px;
}

/* Realtime RF popup in dezelfde opbouw als Indoor mapper */
.rf-measurement-modal .modal-dialog {
  max-width: 1120px;
}

.rf-measurement-modal .modal-body {
  padding: 1.25rem;
}

.rf-tab-panel {
  display: none;
}

.rf-tab-panel.active {
  display: block;
}

.rf-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
}

.status-bad-soft {
  background: #fee2e2;
  color: #991b1b;
}

.rf-history-card {
  border: 1px solid #e4e7ec;
  border-radius: 1rem;
  background: #f8fafc;
  padding: 1rem;
  margin-bottom: 1rem;
}

.rf-sparkline {
  min-height: 230px;
}

.rf-sparkline svg {
  width: 100%;
  height: 230px;
  display: block;
}

.rf-spark-grid {
  stroke: #d0d5dd;
  stroke-width: 1;
}

.rf-spark-line {
  fill: none;
  stroke: #0d6efd;
  stroke-width: 2.5;
}

.rf-sparkline circle {
  fill: #0d6efd;
  stroke: #ffffff;
  stroke-width: 2;
}

.rf-sparkline text {
  fill: #667085;
  font-size: 12px;
}

@media (max-width: 767.98px) {
  .rf-metric-grid {
    grid-template-columns: 1fr;
  }

  .rf-measurement-modal .btn-group {
    width: 100%;
    display: flex;
  }

  .rf-measurement-modal .btn-group .btn {
    flex: 1 1 auto;
  }
}

/* Realtime RF popup in dezelfde opbouw als Indoor mapper */
.rf-measurement-modal .modal-dialog {
  max-width: 1120px;
}

.rf-measurement-modal .modal-body {
  padding: 1.25rem;
}

.rf-tab-panel {
  display: none;
}

.rf-tab-panel.active {
  display: block;
}

.rf-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
}

.status-bad-soft {
  background: #fee2e2;
  color: #991b1b;
}

.rf-history-card {
  border: 1px solid #e4e7ec;
  border-radius: 1rem;
  background: #f8fafc;
  padding: 1rem;
  margin-bottom: 1rem;
}

.rf-sparkline {
  min-height: 230px;
}

.rf-sparkline svg {
  width: 100%;
  height: 230px;
  display: block;
}

.rf-spark-grid {
  stroke: #d0d5dd;
  stroke-width: 1;
}

.rf-spark-line {
  fill: none;
  stroke: #0d6efd;
  stroke-width: 2.5;
}

.rf-sparkline circle {
  fill: #0d6efd;
  stroke: #ffffff;
  stroke-width: 2;
}

.rf-sparkline text {
  fill: #667085;
  font-size: 12px;
}

@media (max-width: 767.98px) {
  .rf-metric-grid {
    grid-template-columns: 1fr;
  }

  .rf-measurement-modal .btn-group {
    width: 100%;
    display: flex;
  }

  .rf-measurement-modal .btn-group .btn {
    flex: 1 1 auto;
  }
}

/* Realtime RF popup in dezelfde opbouw als Indoor mapper */
.rf-measurement-modal .modal-dialog {
  max-width: 1120px;
}

.rf-measurement-modal .modal-body {
  padding: 1.25rem;
}

.rf-tab-panel {
  display: none;
}

.rf-tab-panel.active {
  display: block;
}

.rf-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
}

.status-bad-soft {
  background: #fee2e2;
  color: #991b1b;
}

.rf-history-card {
  border: 1px solid #e4e7ec;
  border-radius: 1rem;
  background: #f8fafc;
  padding: 1rem;
  margin-bottom: 1rem;
}

.rf-sparkline {
  min-height: 230px;
}

.rf-sparkline svg {
  width: 100%;
  height: 230px;
  display: block;
}

.rf-spark-grid {
  stroke: #d0d5dd;
  stroke-width: 1;
}

.rf-spark-line {
  fill: none;
  stroke: #0d6efd;
  stroke-width: 2.5;
}

.rf-sparkline circle {
  fill: #0d6efd;
  stroke: #ffffff;
  stroke-width: 2;
}

.rf-sparkline text {
  fill: #667085;
  font-size: 12px;
}

@media (max-width: 767.98px) {
  .rf-metric-grid {
    grid-template-columns: 1fr;
  }

  .rf-measurement-modal .btn-group {
    width: 100%;
    display: flex;
  }

  .rf-measurement-modal .btn-group .btn {
    flex: 1 1 auto;
  }
}

/* Realtime RF historie-filter */
.rf-measurement-modal.rf-history-mode .modal-footer {
  display: none;
}

.rf-time-range-picker {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rf-time-range-picker .btn {
  min-width: 3.1rem;
  font-weight: 700;
}

.rf-sparkline .empty-state {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 767.98px) {
  .rf-time-range-picker {
    justify-content: flex-start;
    width: 100%;
    margin-top: .75rem;
  }
}

/* Realtime RF historie-filter */
.rf-measurement-modal.rf-history-mode .modal-footer {
  display: none;
}

.rf-time-range-picker {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rf-time-range-picker .btn {
  min-width: 3.1rem;
  font-weight: 700;
}

.rf-sparkline .empty-state {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 767.98px) {
  .rf-time-range-picker {
    justify-content: flex-start;
    width: 100%;
    margin-top: .75rem;
  }
}

/* Realtime RF historie-tab */
.rf-measurement-modal.rf-history-mode .modal-footer {
  display: none;
}

.rf-time-range-picker {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rf-time-range-picker .btn {
  min-width: 3.1rem;
  font-weight: 700;
}

.rf-sparkline .empty-state {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 767.98px) {
  .rf-time-range-picker {
    width: 100%;
    justify-content: flex-start;
    margin-top: .75rem;
  }
}

/* Realtime RF modal historie periodefilter */
.rf-history-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-top: -.25rem;
}

.rf-time-range-picker {
  flex-wrap: wrap;
}

.rf-time-range-picker .btn {
  min-width: 3.1rem;
  font-weight: 750;
}

.rf-sparkline .empty-state {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 767.98px) {
  .rf-history-toolbar {
    justify-content: flex-start;
  }
}

/* Realtime RF modal historie periodefilter */
.rf-history-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-top: -.25rem;
}

.rf-time-range-picker {
  flex-wrap: wrap;
}

.rf-time-range-picker .btn {
  min-width: 3.1rem;
  font-weight: 750;
}

.rf-sparkline .empty-state {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 767.98px) {
  .rf-history-toolbar {
    justify-content: flex-start;
  }
}

/* RF modal: footer in popups alleen sluiten */
.rf-measurement-modal .modal-footer a {
  display: none !important;
}

.rf-measurement-modal .modal-footer {
  justify-content: flex-end;
}

/* RF modal: periodefilter historische data */
.rf-history-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-top: -.25rem;
}

.rf-time-range-picker {
  flex-wrap: wrap;
}

.rf-time-range-picker .btn {
  min-width: 3.1rem;
  font-weight: 750;
}

.rf-sparkline .empty-state {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 767.98px) {
  .rf-history-toolbar {
    justify-content: flex-start;
  }
}

/* RF popup: footer altijd zichtbaar en alleen sluiten */
.rf-measurement-modal .modal-content {
  max-height: calc(100vh - 2rem);
}

.rf-measurement-modal .modal-footer,
.rf-measurement-modal .rf-modal-footer-clean {
  position: sticky;
  bottom: 0;
  z-index: 10;
  background: #fff;
  border-top: 1px solid #e4e7ec;
  justify-content: flex-end;
}

.rf-measurement-modal .modal-footer a {
  display: none !important;
}

/* RF historische periodeknoppen */
.rf-history-toolbar {
  display: flex;
  justify-content: flex-end;
}

.rf-time-range-picker {
  flex-wrap: wrap;
}

.rf-time-range-picker .btn {
  min-width: 3.1rem;
  font-weight: 750;
}

.rf-sparkline .empty-state {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 767.98px) {
  .rf-history-toolbar {
    justify-content: flex-start;
  }
}

/* RF modal: periodeknoppen historische data */
.rf-history-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-top: -.25rem;
}

.rf-time-range-picker {
  flex-wrap: wrap;
  gap: .25rem;
}

.rf-time-range-picker .btn {
  min-width: 3.1rem;
  font-weight: 750;
}

/* RF modal: footer alleen sluiten, sticky onderin */
.rf-measurement-modal .modal-content {
  max-height: calc(100vh - 2rem);
}

.rf-measurement-modal .modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: #fff;
  border-top: 1px solid #e4e7ec;
}

.rf-measurement-modal .modal-footer a {
  display: none !important;
}

.rf-measurement-modal .modal-footer .btn[data-bs-dismiss="modal"] {
  margin-left: auto;
}

.rf-sparkline .empty-state {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* RF modal historieperiode */
.rf-history-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-top: -.25rem;
}

.rf-time-range-picker {
  flex-wrap: wrap;
  gap: .25rem;
}

.rf-time-range-picker .btn {
  min-width: 3.1rem;
  font-weight: 750;
}

/* RF modal: alleen sluitknop onderaan */
.rf-measurement-modal .modal-content {
  max-height: calc(100vh - 2rem);
}

.rf-measurement-modal .modal-footer,
.rf-modal-footer-clean {
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: #fff;
  border-top: 1px solid #e4e7ec;
}

.rf-measurement-modal .modal-footer a,
.rf-modal-footer-clean a {
  display: none !important;
}

.rf-measurement-modal .modal-footer .btn[data-bs-dismiss="modal"],
.rf-modal-footer-clean .btn[data-bs-dismiss="modal"] {
  margin-left: auto;
}

.rf-sparkline .empty-state {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Indoor partial-run selectie */
.run-scope-card,
.tester-card,
.selection-row {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  width: 100%;
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  padding: .85rem .95rem;
  background: #fff;
  cursor: pointer;
}

.run-scope-card:hover,
.tester-card:hover,
.selection-row:hover {
  background: #f8fafc;
}

.run-scope-card strong,
.tester-card strong,
.selection-row strong {
  display: block;
}

.run-scope-card span,
.selection-row small,
.tester-card small {
  display: block;
  color: #667085;
}

.selection-panel {
  border: 1px solid var(--bs-border-color);
  border-radius: 16px;
  padding: 1rem;
  background: #f8fafc;
}

.selection-panel .selection-row {
  background: #fff;
  margin-top: .5rem;
}

.run-point-list {
  max-height: 420px;
  overflow: auto;
  padding-right: .25rem;
}

/* Indoor punt toevoegen: bestaande punten + zoom */
.indoor-point-map-scroll {
  width: 100%;
  max-height: 72vh;
  overflow: auto;
  border: 1px solid var(--bs-border-color);
  border-radius: 16px;
  background: #fff;
  padding: 1rem;
  text-align: center;
}

.indoor-point-map-stage {
  position: relative;
  display: inline-block;
  min-width: min-content;
}

.indoor-point-map-image {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  transition: width .15s ease;
}

.existing-map-point {
  z-index: 3;
  transform: translate(-50%, -50%);
}

.point-new {
  z-index: 4;
  transform: translate(-50%, -50%);
  background: #ff2d8d !important;
  color: #fff !important;
  border-color: #fff !important;
  box-shadow: 0 0 0 4px rgba(255, 45, 141, .2);
}

/* Indoor punt toevoegen: echte kaartachtige zoom */
.indoor-point-map-scroll {
  position: relative;
  width: 100%;
  max-height: 72vh;
  overflow: auto;
  border: 1px solid var(--bs-border-color);
  border-radius: 16px;
  background: #fff;
  padding: 1rem;
  text-align: left;
}

.indoor-point-map-stage {
  position: relative;
  display: block;
  margin: 0 auto;
}

.indoor-point-map-image {
  display: block;
  max-width: none;
  width: auto;
  height: auto;
  user-select: none;
}

.indoor-map-zoom-controls {
  position: sticky;
  top: .75rem;
  left: .75rem;
  z-index: 20;
  display: inline-flex;
  gap: .25rem;
  margin-bottom: .5rem;
}

.indoor-map-zoom-controls .btn {
  border-color: #98a2b3;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
  font-weight: 800;
}

.existing-map-point,
.point-new {
  transform: translate(-50%, -50%);
}

.existing-map-point {
  z-index: 3;
}

.point-new {
  z-index: 4;
  background: #ff2d8d !important;
  color: #fff !important;
  border-color: #fff !important;
  box-shadow: 0 0 0 4px rgba(255, 45, 141, .2);
}

/* Indoor punt toevoegen: rustig pannen */
.indoor-point-map-scroll {
  cursor: grab;
  overscroll-behavior: contain;
  touch-action: none;
}

.indoor-point-map-scroll.is-panning {
  cursor: grabbing;
}

.indoor-point-map-scroll .existing-map-point,
.indoor-point-map-scroll .point-new {
  cursor: pointer;
}

/* Indoor punt toevoegen: simpele pan/zoom */
.indoor-point-map-scroll {
  cursor: grab;
  overscroll-behavior: contain;
  user-select: none;
}

.indoor-point-map-scroll.is-panning {
  cursor: grabbing;
}

.indoor-point-map-scroll img {
  pointer-events: none;
}

.indoor-point-map-scroll .existing-map-point,
.indoor-point-map-scroll .point-new {
  pointer-events: auto;
}

/* Indoor testerpagina auto-refresh */
.tester-refresh-control {
  width: auto;
  min-width: 155px;
}

.tester-refresh-control .form-select {
  min-width: 85px;
}

@media (max-width: 640px) {
  .tester-refresh-control {
    width: 100%;
  }

  .tester-refresh-control .form-select {
    width: 100%;
  }
}

/* Indoor testerpagina auto-refresh */
.tester-refresh-control {
  width: auto;
  min-width: 155px;
}

.tester-refresh-control .form-select {
  min-width: 85px;
}

@media (max-width: 640px) {
  .tester-refresh-control {
    width: 100%;
  }

  .tester-refresh-control .form-select {
    width: 100%;
  }
}
