:root {
  --navbar-height: 56px;
  --sidebar-width: 280px;
}

/* ========================================= GLOBAL BASICS ========================================= */
html, body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
  color: #006bb7;
}

.btn-primary {
  color: #fff;
  background: #1b6ec2;
  border-color: #1861ac;
}

/* ========================================= DEVEXPRESS POPUP EDITFORM (CRM) ========================================= */

/* Popup-Breite (Desktop) */
.crm-popup-editform {
  width: 60vw !important;
  min-width: 60vw !important;
  max-width: 60vw !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  /* Bezugspunkt fuer absolute Footer-Buttons */
  position: relative !important;
}

/* Popup-Hoehe */
.dxbl-popup,
.dxbl-dialog,
.dxbl-dialog-scrollable {
  height: 80vh !important;
  max-height: 80vh !important;
}

/* Mobile: Popup fast volle Breite + mehr Hoehe */
@media (max-width: 767.98px) {
  .dxbl-popup,
  .dxbl-dialog,
  .dxbl-dialog-scrollable {
    height: 95vh !important;
    max-height: 95vh !important;
  }

  .crm-popup-editform {
    width: 98vw !important;
    min-width: 98vw !important;
    max-width: 98vw !important;
    margin: 0 auto !important;
    border-radius: 0 !important;
  }
}

/* Innenraender im Popup-Formular */
.crm-editform-pad {
  padding-left: 0;
  padding-right: 0;
}

/* ab >= 768px mehr Rand links/rechts */
@media (min-width: 768px) {
  .crm-popup-editform .crm-editform-pad {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
}

/* Textboxen im Formular auf volle Breite */
.crm-popup-editform .dxbl-textbox {
  width: 100%;
}

/* =========================================================
   DevExpress Standard-Footer (Save/Cancel) ausblenden
========================================================= */
.crm-popup-editform .dxbl-grid-edit-form-buttons {
  display: none !important;
}

/* =========================================================
   Platz unten fuer eigene "klebende" Footer-Leiste schaffen
   (damit Buttons keine Felder ueberdecken)
========================================================= */
.crm-popup-editform .dxbl-popup-content,
.crm-popup-editform .dxbl-dialog-body,
.crm-popup-editform .dxbl-dialog-content {
  padding-bottom: 4.75rem !important; /* Reserve fuer Footer */
  box-sizing: border-box !important;
  overflow: auto; /* Formular darf scrollen */
}

/* Mobile: etwas mehr Platz, falls Buttons umbrechen */
@media (max-width: 767.98px) {
  .crm-popup-editform .dxbl-popup-content,
  .crm-popup-editform .dxbl-dialog-body,
  .crm-popup-editform .dxbl-dialog-content {
    padding-bottom: 6.75rem !important;
  }
}

/* =========================================================
   Eigene Footer-Buttons: links (Extra) und rechts (Cancel/Save)
========================================================= */

/* Links unten: Extra-Buttons */
.crm-popup-editform .crm-extra-footer-buttons {
  position: absolute !important;
  left: 1.5rem;
  bottom: 1rem;
  display: flex !important;
  gap: .5rem;
  z-index: 50;
}

/* Rechts unten: Cancel/Save */
.crm-popup-editform .crm-footer-buttons {
  position: absolute !important;
  right: 1.5rem;
  bottom: 1rem;
  display: flex !important;
  gap: .5rem;
  z-index: 50;
}

/* Mobile: beide Gruppen auf eine Zeile mit Platz dazwischen */
@media (max-width: 767.98px) {
  .crm-popup-editform .crm-extra-footer-buttons,
  .crm-popup-editform .crm-footer-buttons {
    left: 1rem !important;
    right: 1rem !important;
    bottom: .75rem !important;
  }

  .crm-popup-editform .crm-extra-footer-buttons {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .crm-popup-editform .crm-footer-buttons {
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}

/* ========================================= ACCORDION STYLE ========================================= */
.accordion .accordion-item {
  border: 1px solid #bdbdbd;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: .25rem;
}

.accordion .accordion-button {
  background-color: #9a9a9a;
  color: #fff;
  font-weight: 500;
  font-size: .95rem;
  line-height: 1.2;
  padding: .35rem .75rem;
  border: none;
  box-shadow: none;
  transition: background-color .2s ease, color .2s ease;
}

  .accordion .accordion-button:hover {
    background-color: #8a8a8a;
  }

  .accordion .accordion-button:not(.collapsed) {
    background-color: #7a7a7a;
  }

  .accordion .accordion-button::after {
    display: none !important;
  }

.accordion .accordion-body {
  background-color: #f5f5f5;
  padding: .4rem .4rem;
  border-top: 1px solid #bdbdbd;
}
