.regab-app-share-open-button,
.regab-app-share-row-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #43566d !important;
  background: #fff !important;
  border: 1px solid #d8e2ec !important;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  white-space: nowrap;
}

/* Match Dokument erstellen / Bearbeiten / Teilen height in detail header */
.page-heading-actions > .secondary-button,
.page-heading-actions > .primary-button,
.page-heading-actions > button,
.project-heading-actions > .secondary-button,
.project-heading-actions > .primary-button,
.project-heading-actions > button {
  min-height: 40px;
  height: 40px;
  box-sizing: border-box;
  padding: 0 14px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.regab-app-share-icon-button {
  position: relative;
  z-index: 6;
  min-width: 40px;
  min-height: 40px;
  padding-inline: 14px !important;
  font-weight: 600;
  pointer-events: auto !important;
  cursor: pointer;
}

.regab-app-share-icon-button svg,
.regab-app-share-icon-label {
  display: block;
  flex: 0 0 auto;
  pointer-events: none;
}

.regab-app-share-body {
  gap: 12px !important;
}

.regab-app-share-section {
  display: grid;
  gap: 8px;
}

.regab-app-share-section.is-compact {
  gap: 6px;
}

.regab-app-share-label {
  font-size: 12px;
  font-weight: 700;
  color: #6b7c90;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.regab-app-share-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.regab-app-share-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 12px;
  line-height: 1.2;
}

.regab-app-share-chip strong {
  font-weight: 700;
}

.regab-app-share-note {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d5dee8;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-weight: 500;
  color: #172437;
  background: #fff;
}

.regab-app-share-message {
  display: grid;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.regab-app-share-message textarea {
  width: 100%;
  resize: vertical;
  min-height: 64px;
  border: 1px solid #d5dee8;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 500;
  color: #172437;
  background: #fff;
}

.regab-app-share-open-button:hover,
.regab-app-share-open-button:focus-visible,
.regab-app-share-row-button:hover,
.regab-app-share-row-button:focus-visible {
  color: #172437 !important;
  background: #f8fafc !important;
  border-color: #c8d6e3 !important;
}

.regab-app-share-row-button {
  margin-left: 6px;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 8px;
}

.regab-app-share-overlay {
  position: fixed;
  inset: 0;
  z-index: 90020;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(10px);
}

.regab-app-share-dialog {
  width: min(560px, 100%);
  max-height: min(860px, calc(100vh - 48px));
  overflow: auto;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #d7e0ea;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
  color: #172437;
}

.regab-app-share-dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 12px;
  border-bottom: 1px solid #e7eef5;
}

.regab-app-share-kicker {
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6b7c90;
  font-weight: 700;
}

.regab-app-share-dialog h2 {
  margin: 4px 0 6px;
  font-size: 20px;
  line-height: 1.25;
}

.regab-app-share-dialog-head p,
.regab-app-share-hint {
  margin: 0;
  color: #607387;
  font-size: 13px;
  line-height: 1.45;
}

.regab-app-share-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #f3f6f9;
  color: #334155;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.regab-app-share-body {
  padding: 16px 22px 8px;
  display: grid;
  gap: 18px;
}

.regab-app-share-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.regab-app-share-search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d5dee8;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
}

.regab-app-share-list {
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
  padding-right: 2px;
}

.regab-app-share-person {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e3ebf3;
  border-radius: 12px;
  background: #fbfcfd;
  cursor: pointer;
}

.regab-app-share-person.is-shared {
  opacity: .78;
  cursor: default;
}

.regab-app-share-person strong {
  display: block;
  font-size: 14px;
}

.regab-app-share-person small {
  color: #6b7c90;
}

.regab-app-share-badge {
  font-size: 11px;
  font-weight: 700;
  color: #1d4f91;
  background: #eaf2ff;
  border-radius: 999px;
  padding: 4px 8px;
  white-space: nowrap;
}

.regab-app-share-current {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.regab-app-share-current li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f5f8fb;
  border: 1px solid #e7eef5;
  font-size: 13px;
}

.regab-app-share-remove {
  border: 0;
  background: transparent;
  color: #8a4b4b;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.regab-app-share-empty {
  padding: 18px 12px;
  text-align: center;
  color: #6b7c90;
  border: 1px dashed #d7e0ea;
  border-radius: 12px;
}

.regab-app-share-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px 20px;
  border-top: 1px solid #e7eef5;
}

.regab-app-share-actions > button {
  flex: 1 1 0;
  min-height: 40px;
  height: 40px;
  min-width: 0;
  box-sizing: border-box;
  padding: 0 16px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

.regab-app-share-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90040;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 12px;
  background: #17324d;
  color: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .28);
  font-size: 13px;
}

.regab-app-share-toast.is-error {
  background: #7f1d1d;
}

.regab-app-share-toast.is-success {
  background: #14532d;
}

html.theme-dark .regab-app-share-dialog,
html[data-theme="dark"] .regab-app-share-dialog,
body.theme-dark .regab-app-share-dialog {
  background: #152033;
  border-color: #2a3b52;
  color: #e8eef7;
}

html.theme-dark .regab-app-share-dialog-head,
html.theme-dark .regab-app-share-actions,
html[data-theme="dark"] .regab-app-share-dialog-head,
html[data-theme="dark"] .regab-app-share-actions,
body.theme-dark .regab-app-share-dialog-head,
body.theme-dark .regab-app-share-actions {
  border-color: #2a3b52;
}

html.theme-dark .regab-app-share-person,
html.theme-dark .regab-app-share-current li,
html[data-theme="dark"] .regab-app-share-person,
html[data-theme="dark"] .regab-app-share-current li,
body.theme-dark .regab-app-share-person,
body.theme-dark .regab-app-share-current li {
  background: #1b2940;
  border-color: #2f425c;
}

html.theme-dark .regab-app-share-search,
html.theme-dark .regab-app-share-note,
html[data-theme="dark"] .regab-app-share-search,
html[data-theme="dark"] .regab-app-share-note,
body.theme-dark .regab-app-share-search,
body.theme-dark .regab-app-share-note {
  background: #121c2c;
  border-color: #2f425c;
  color: #e8eef7;
}

html.theme-dark .regab-app-share-chip,
html[data-theme="dark"] .regab-app-share-chip,
body.theme-dark .regab-app-share-chip {
  background: #1b2940;
  border-color: #2f425c;
  color: #d7e3f2;
}

html.theme-dark .regab-app-share-message,
html[data-theme="dark"] .regab-app-share-message,
body.theme-dark .regab-app-share-message {
  color: #d7e3f2;
}

html.theme-dark .regab-app-share-message textarea,
html[data-theme="dark"] .regab-app-share-message textarea,
body.theme-dark .regab-app-share-message textarea {
  background: #121c2c;
  border-color: #2f425c;
  color: #e8eef7;
}

html.theme-dark .regab-app-share-open-button,
html.theme-dark .regab-app-share-row-button,
html[data-theme="dark"] .regab-app-share-open-button,
html[data-theme="dark"] .regab-app-share-row-button,
body.theme-dark .regab-app-share-open-button,
body.theme-dark .regab-app-share-row-button {
  color: #d7e3f2 !important;
  background: #1b2940 !important;
  border-color: #334860 !important;
}


.projects-table td .regab-app-share-row-button,
.responsive-table td .regab-app-share-row-button {
  margin-top: 6px;
  margin-left: 0;
}

/* Auftragsliste: Export, Archiv, Karte und Auftrag anlegen gleich groß */
.page-heading .project-heading-actions {
  align-items: center;
  gap: 10px;
}

.page-heading .project-heading-actions > .secondary-button,
.page-heading .project-heading-actions > .primary-button,
.page-heading .project-heading-actions > button,
.page-heading .project-heading-actions > a {
  box-sizing: border-box !important;
  width: 210px !important;
  min-width: 210px !important;
  max-width: 210px !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  padding: 0 12px !important;
  border-width: 1px !important;
  border-style: solid !important;
  border-radius: 11px !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-shadow: none !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease !important;
}

.page-heading .project-heading-actions > .secondary-button:hover,
.page-heading .project-heading-actions > .secondary-button:focus-visible,
.page-heading .project-heading-actions > button:not(.primary-button):hover,
.page-heading .project-heading-actions > button:not(.primary-button):focus-visible,
.page-heading .project-heading-actions > a:not(.primary-button):hover,
.page-heading .project-heading-actions > a:not(.primary-button):focus-visible {
  color: #172437 !important;
  background: #f3f6fa !important;
  border-color: #c5d3e0 !important;
}

.page-heading .project-heading-actions > .primary-button:hover,
.page-heading .project-heading-actions > .primary-button:focus-visible {
  color: #fff !important;
  background: #2a62c9 !important;
  border-color: transparent !important;
}

body.theme-dark .page-heading .project-heading-actions > .secondary-button:hover,
body.theme-dark .page-heading .project-heading-actions > .secondary-button:focus-visible,
body.theme-dark .page-heading .project-heading-actions > button:not(.primary-button):hover,
body.theme-dark .page-heading .project-heading-actions > button:not(.primary-button):focus-visible,
body.theme-dark .page-heading .project-heading-actions > a:not(.primary-button):hover,
body.theme-dark .page-heading .project-heading-actions > a:not(.primary-button):focus-visible,
html.theme-dark .page-heading .project-heading-actions > .secondary-button:hover,
html.theme-dark .page-heading .project-heading-actions > .secondary-button:focus-visible,
html.theme-dark .page-heading .project-heading-actions > button:not(.primary-button):hover,
html.theme-dark .page-heading .project-heading-actions > button:not(.primary-button):focus-visible,
html.theme-dark .page-heading .project-heading-actions > a:not(.primary-button):hover,
html.theme-dark .page-heading .project-heading-actions > a:not(.primary-button):focus-visible {
  color: #e8eef7 !important;
  background: #243652 !important;
  border-color: #3d5678 !important;
}

.page-heading .project-heading-actions > .primary-button {
  border-color: transparent !important;
}

.page-heading .project-heading-actions svg,
.page-heading .project-heading-actions span[aria-hidden="true"] {
  width: 16px !important;
  height: 16px !important;
  flex: 0 0 16px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-size: 16px !important;
  line-height: 1 !important;
  overflow: hidden;
}

@media (max-width: 780px) {
  .page-heading .project-heading-actions > .secondary-button,
  .page-heading .project-heading-actions > .primary-button,
  .page-heading .project-heading-actions > button,
  .page-heading .project-heading-actions > a {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }
}
