.cms-body {
  min-height: 100vh;
  background: #f6f9ff !important;
  color: #444;
  font-family: "Open Sans", sans-serif;
}

#cms {
  width: 100%;
  max-width: none;
  margin: 0;
}

#cms .cms-header {
  height: 60px;
  width: 100%;
  margin: 0;
  padding: 0 24px;
  background: #fff;
  box-shadow: 0 2px 20px rgba(1, 41, 112, 0.1);
}

#cms .cms-header .logo {
  width: auto;
}

#cms .cms-header .logo img {
  max-height: 30px;
  margin-right: 10px;
}

#cms .cms-header .logo span {
  color: #012970;
  font-size: 1.05rem;
  font-weight: 700;
}

#cms .cms-header ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#cms .cms-logout-btn,
#cms .cms-header-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #012970;
  background: #fff;
  font-size: 1rem;
  font-style: normal;
  font-weight: 600;
  cursor: pointer;
}

#cms .cms-header-action {
  border: 1px solid #d7ddff;
  color: #4154f1;
}

#cms .cms-logout-btn:hover,
#cms .cms-header-action:hover {
  background: #f6f9ff;
  color: #4154f1;
}

#cms .cms-office-menu {
  width: min(420px, calc(100vw - 24px));
  padding: 14px;
}

#cms .cms-office-search {
  position: relative;
  margin-bottom: 10px;
}

#cms .cms-office-search i {
  position: absolute;
  top: 50%;
  left: 12px;
  z-index: 1;
  color: #798eb3;
  font-size: 1.05rem;
  transform: translateY(-50%);
}

#cms .cms-office-search .form-control {
  width: 100%;
  min-height: 38px;
  margin-left: 0;
  padding-left: 38px;
}

#cms .cms-office-menu #ListKantoren {
  max-height: min(52vh, 420px);
}

#cms .cms-main {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 86px 0 32px;
}

#cms .cms-select-main {
  width: min(900px, calc(100% - 32px));
}

#cms .cms-page-title {
  margin-bottom: 18px;
}

#cms .cms-page-title h1 {
  margin: 0 0 4px;
  color: #012970;
  font-family: "Nunito", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
}

#cms .cms-page-title p {
  margin: 0;
  color: #5d6b82;
  font-size: 0.95rem;
}

#cms .cms-card {
  overflow: hidden;
  border: 0;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 0 30px rgba(1, 41, 112, 0.1);
}

/* #cms .cms-card + .cms-card {
  margin-top: 18px;
} */

#cms .cms-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid #ebeef4;
  background: #fff;
}

#cms .cms-card-header h3 {
  margin: 0;
  color: #012970;
  font-family: "Poppins", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
}

#cms .cms-card-header span {
  display: block;
  margin-top: 2px;
  color: #798eb3;
  font-size: 0.88rem;
}

#cms .cms-card-body {
  padding: 18px;
}

#cms .cms-tabs {
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 2px solid #ebeef4;
}

#cms .cms-tabs .nav-link {
  margin-bottom: -2px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-left: 0;
  color: #2c384e;
  font-weight: 600;
  cursor: pointer;
}

#cms .cms-tabs .nav-link:hover,
#cms .cms-tabs .nav-link:focus {
  margin-left: 0;
  border-left: 0;
  color: #4154f1;
}

#cms .cms-tabs .nav-link.active {
  border-bottom-color: #4154f1;
  color: #4154f1;
  background: transparent;
}

#cms .cms-logo-card {
  margin-bottom: 18px;
}

#cms .cms-logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 18px;
}

#cms .cms-logo-upload {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

#cms .cms-logo-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  min-height: 74px;
  padding: 12px;
  border: 1px solid #ebeef4;
  border-radius: 5px;
  background: #fff;
}

#cms .cms-logo-preview img {
  max-width: 100%;
  max-height: 56px;
  object-fit: contain;
}

#cms .cms-logo-preview-icon {
  width: 96px;
}

#cms .cms-logo-preview-icon img {
  max-width: 48px;
  max-height: 48px;
}

#cms .cms-logo-control {
  flex: 1 1 260px;
  min-width: 240px;
}

#cms .cms-logo-control .col-form-label {
  color: #344767;
  font-weight: 600;
}

#cms .cms-search-field {
  position: relative;
  margin-bottom: 12px;
}

#cms .cms-search-field i {
  position: absolute;
  top: 50%;
  left: 12px;
  z-index: 1;
  color: #798eb3;
  font-size: 1.05rem;
  transform: translateY(-50%);
}

#cms .cms-search-field .form-control {
  width: 100%;
  min-height: 40px;
  margin-left: 0;
  margin-bottom: 0;
  padding-left: 38px;
}

#cms .form-control,
#cms .selectize-input {
  width: 100%;
  margin-left: 0;
  border: 1px solid #dce3f0;
  border-radius: 5px;
  color: #2c384e;
  box-shadow: none;
}

#cms .form-control:focus,
#cms .selectize-input.focus {
  border-color: #9aa8ff;
  box-shadow: 0 0 0 0.2rem rgba(65, 84, 241, 0.12);
}

#cms .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 5px;
  font-weight: 600;
}

#cms .cms-add-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 8px 10px;
  border: 1px solid #dce3f0;
  border-radius: 5px;
  color: #4154f1;
  background: #f6f9ff;
  font-style: normal;
  font-weight: 600;
  cursor: pointer;
}

#cms .cms-add-action:hover {
  border-color: #b7c0ff;
  background: #eef2ff;
}

#cms .cms-list {
  max-height: 62vh;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  border: 1px solid #ebeef4;
  border-radius: 5px;
}

#cms .cms-list .list-group-item,
#cms .cms-list li {
  width: 100%;
  border-right: 0;
  border-left: 0;
  color: #2c384e;
  cursor: pointer;
}

#cms .cms-list .list-group-item:first-child,
#cms .cms-list li:first-child {
  border-top: 0;
}

#cms .cms-list .list-group-item:last-child,
#cms .cms-list li:last-child {
  border-bottom: 0;
}

#cms .cms-list .list-group-item:hover,
#cms .cms-list li:hover {
  background: #f6f9ff;
}

#cms .cms-list .list-group-item.active,
#cms .cms-list li.active {
  border-color: #d7ddff;
  background: #eef2ff;
  color: #012970;
  font-weight: 700;
}

#cms .cms-company-layout,
#cms .cms-two-column {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

#cms .cms-query-card {
  margin-bottom: 18px;
}

#cms .cms-table-card .cms-card-body {
  padding: 0;
}

#cms .cms-table-card table {
  margin-bottom: 0;
}

#cms .cms-table-card th {
  color: #012970;
  font-weight: 700;
  white-space: nowrap;
}

#cms .cms-table-card .dataTables_wrapper {
  padding: 14px 18px 18px;
}

#cms .cms-table-card .dataTables_wrapper table {
  width: 100% !important;
}

#cms .cms-table-card .dataTables_filter input,
#cms .cms-table-card .dataTables_length select {
  border: 1px solid #dce3f0;
  border-radius: 5px;
  color: #2c384e;
}

#cms .cms-table-card .dt-buttons {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 10px;
  margin-bottom: 10px;
}

#cms .cms-table-card .dt-button {
  border: 1px solid #dce3f0;
  border-radius: 5px;
  background: #f6f9ff;
  color: #012970;
  font-weight: 600;
}

#cms #tblBeheerCms td.beheer-relatie-zo {
  cursor: pointer;
}

#cms .beheer-ponto-icon {
  margin-left: 6px;
  color: #16a34a;
  font-size: 1.15rem;
  vertical-align: middle;
}

#cms .beheer-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

#cms .beheer-actions i {
  color: #4154f1;
  font-size: 1.2rem;
  cursor: pointer;
}

#cms .beheer-actions i.bx-trash {
  color: #dc3545;
}

#cms .beheer-settings-bar {
  padding: 16px 18px;
  border-bottom: 1px solid #ebeef4;
  background: #fff;
}

#cms .beheer-mailadres-maandelijks {
  max-width: 560px;
}

#cms .beheer-mailadres-maandelijks label {
  display: block;
  margin: 0 0 6px;
  color: #344767;
  font-weight: 600;
}

#cms .beheer-mailadres-input {
  display: flex;
  gap: 10px;
  align-items: center;
}

#cms .beheer-mailadres-input .form-control {
  flex: 1 1 auto;
  min-width: 220px;
  margin-bottom: 0;
}

.beheer-mail-form label {
  margin: 0 0 4px;
  color: #344767;
  font-weight: 600;
}

.beheer-mail-form .form-control {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.cms-confirm-form label {
  margin: 0 0 4px;
  color: #344767;
  font-weight: 600;
}

.cms-confirm-form .form-control {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-bottom: 0;
  box-sizing: border-box;
}

.adreszoek-popup {
  color: #2c384e;
}

.adreszoek-popup p {
  margin: 0 0 14px;
  line-height: 1.4;
}

.adreszoek-card {
  padding: 12px;
  border: 1px solid #dce3f0;
  border-radius: 6px;
  background: #fff;
}

.adreszoek-title {
  margin-bottom: 10px;
  color: #344767;
  font-weight: 700;
}

.adreszoek-grid {
  display: grid;
  gap: 10px;
}

.adreszoek-grid--postcode {
  grid-template-columns: minmax(0, 1.4fr) minmax(120px, 0.9fr);
}

.adreszoek-grid--adres {
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.2fr);
  margin-top: 10px;
}

.adreszoek-field {
  min-width: 0;
}

.adreszoek-field label {
  display: block;
  margin: 0 0 5px;
  color: #344767;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.2;
}

.adreszoek-field .form-control {
  display: block;
  width: 100%;
  min-height: 40px;
  margin: 0;
  box-sizing: border-box;
}

.adreszoek-separator {
  margin: 10px 0;
  color: #6c757d;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
}

#cms .lst {
  display: block;
  width: auto;
  vertical-align: top;
}

#cms #SearchCompany {
  width: 100%;
  margin-left: 0;
}

#cms #DetailsBedrijven {
  display: none;
  width: 100%;
  min-width: 0;
  margin-left: 0;
}

#cms #DetailsBedrijven .cms-card-body {
  padding-top: 0;
}

#cms #Bedrijfsgegevens,
#cms #Gebruikers {
  padding-top: 18px;
}

#cms #Gebruikers {
  display: none;
  align-items: flex-start;
  gap: 20px;
}

#cms .cms-detail-section .row {
  margin-bottom: 12px;
}

#cms .cms-detail-section .col-form-label {
  color: #344767;
  font-weight: 600;
}

#cms .cms-adreszoek-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

#cms .cms-adreszoek-wrap textarea {
  flex: 1 1 auto;
  min-width: 0;
}

#cms .cms-adreszoek-wrap .btn {
  min-height: 40px;
  flex: 0 0 auto;
}

#cms .cms-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

#cms .cms-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

#cms .cms-user-list {
  flex: 0 0 280px;
  width: min(280px, 100%);
}

#cms #ListGebruikers {
  max-height: 48vh;
}

#cms div[name=GebruikerDetails] {
  display: none;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  margin-left: 0;
  vertical-align: top;
}

#cms .cms-inline-action,
#cms .cms-generate-password i {
  color: #4154f1;
  cursor: pointer;
}

#cms .cms-generate-password {
  display: flex;
  align-items: center;
  min-height: 38px;
  font-size: 1.25rem;
}

#cms #selectBedrijvenGebruikersCms + .selectize-control {
  width: 100%;
}

#cms #listGebruikersCms {
  max-height: 60vh;
}

#cms #ListKantoren {
  max-height: 58vh;
}

#cms .melding,
#cms .meldingpopup {
  position: relative;
  z-index: 1000;
}

@media (max-width: 991px) {
  #cms .cms-main,
  #cms .cms-select-main {
    width: min(100% - 24px, 1000px);
    padding-top: 78px;
  }

  #cms .cms-company-layout,
  #cms .cms-two-column {
    grid-template-columns: 1fr;
  }

  #cms #Gebruikers {
    flex-direction: column;
  }

  #cms div[name=GebruikerDetails] {
    display: none;
    margin-left: 0;
    margin-top: 18px;
  }

  #cms .cms-user-list {
    width: 100%;
  }
}

@media (max-width: 575px) {
  #cms .cms-header {
    padding: 0 12px;
  }

  #cms .cms-logout-btn span,
  #cms .cms-header-action span {
    display: none;
  }

  #cms .cms-card-header,
  #cms .cms-card-body {
    padding: 14px;
  }

  #cms .cms-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  #cms .cms-tabs .nav-link {
    white-space: nowrap;
  }

  #cms .beheer-mailadres-input {
    align-items: stretch;
    flex-direction: column;
  }

  #cms .beheer-mailadres-input .form-control {
    min-width: 0;
  }

  #cms .cms-adreszoek-wrap {
    align-items: stretch;
    flex-direction: column;
  }

  .adreszoek-grid--postcode,
  .adreszoek-grid--adres {
    grid-template-columns: 1fr;
  }
}
