.panel {
  font-size: 14px !important;
  color: #063f6c !important;
  background-color: #ffffff !important;
  height: 100% !important;
  min-width: 400px !important;
  outline: none !important;
  box-shadow: none !important;
  appearance: none !important;
  display: flex !important;
  padding-top: 60px !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  -webkit-appearance: none !important;
}

/* Gemeinsames Layout für Adressen und Projekte */
#adressen-page-root.address-page,
#projekte-page-root.address-page,
.address-page {
  height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  background: #f5f7fb !important;
  box-sizing: border-box !important;
}

/* Suchbereich kompakt wie Login-Eingaben */
.address-searchbar {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 10px 14px 7px 14px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-sizing: border-box;
}

.address-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.address-searchbar-inner {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  min-width: 0;
  order: 1;
}

.address-search-row .address-searchbar-inner {
  flex: 1 1 auto;
}

.address-search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  pointer-events: none;
}

.address-search-icon svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: currentColor;
}

.address-search-input {
  width: 100%;
  height: 30px;
  min-height: 30px;
  box-sizing: border-box;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  background: #fafafa;
  color: #0f172a;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
  padding: 5px 34px 5px 30px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.address-search-input::-webkit-search-decoration,
.address-search-input::-webkit-search-cancel-button,
.address-search-input::-webkit-search-results-button,
.address-search-input::-webkit-search-results-decoration {
  display: none;
  -webkit-appearance: none;
}

.address-search-input::placeholder {
  color: #94a3b8;
}

.address-search-input:focus {
  border-color: var(--color-primary);
  background: #ffffff;
  box-shadow: none;
}

.address-search-clear {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 2px;
  background: transparent;
  color: #64748b;
  font-size: 19px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.address-search-clear:hover {
  background: #edf2f7;
  color: #0f172a;
}

/* Alt-Struktur aus der Adressenliste unterstuetzen: Suchfeld links, Button rechts, Info darunter */
.address-list-toolbar {
  display: contents;
}

.address-result-info {
  flex: 1 0 100%;
  order: 3;
  margin-top: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.25;
}

/* Aktionsbutton neben dem Suchfeld */
.address-new-button,
.address-list-toolbar .address-edit-button-primary {
  flex: 0 0 auto;
  order: 2;
  min-width: 0;
  height: 30px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--color-primary);
  border-radius: 2px;
  background: var(--color-primary);
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: none;
}

.address-new-button:hover,
.address-list-toolbar .address-edit-button-primary:hover {
  filter: brightness(1.08);
}

.address-new-button:active,
.address-list-toolbar .address-edit-button-primary:active {
  transform: translateY(1px);
}

.address-new-button-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

/* Liste */
.address-results {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 10px 10px 10px;
  box-sizing: border-box;
}

.address-list-status {
  flex: 0 0 auto;
  min-height: 0;
  padding: 0 14px 7px 14px;
  color: #64748b;
  font-size: 12px;
  background: #f5f7fb;
  box-sizing: border-box;
}

.address-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
}

/* List row interaction: list-rows.css. */

.address-row-content {
  min-width: 0;
}

.address-row-main {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.address-row-sub {
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.address-row-meta {
  margin-top: 0;
  max-width: 140px;
  padding: 3px 7px;
  border-radius: 2px;
  background: #eef3f8;
  color: #475569;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.address-row-arrow {
  color: #94a3b8;
  font-size: 22px;
  line-height: 1;
  padding-left: 2px;
}

/* Detailseite */
.address-single-page {
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  padding: 12px;
  background: #f5f7fb;
  overflow: hidden;
}

.address-single-card {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  padding: 14px;
  max-width: 1100px;
  box-sizing: border-box;
  overflow: hidden;
}

.address-single-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.address-single-header {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.address-single-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.address-single-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
}

.address-single-back,
.address-single-edit {
  height: 30px;
  border: 1px solid #d5dee8;
  border-radius: 2px;
  padding: 0 10px;
  background: #eef3f8;
  color: #123;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.address-single-edit {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

.address-single-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.address-single-section {
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 10px;
  background: #fbfdff;
}

.address-single-section-wide {
  margin-top: 10px;
}

.address-single-section-title {
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
}

.address-single-field {
  display: grid;
  grid-template-columns: minmax(0, 120px) minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  padding: 6px 0;
  border-top: 1px solid #edf2f7;
}

.address-single-field:first-of-type {
  border-top: none;
}

.address-single-field span {
  color: #64748b;
  font-size: 12px;
}

.address-single-field strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.address-single-field > span,
.address-single-field > strong,
.address-single-note {
  min-width: 0;
  max-width: 100%;
}

.address-single-title,
.address-single-subtitle,
.address-single-section-title,
.address-single-section-subtitle,
.address-single-note,
.leistung-detail-text,
.leistung-detail-longtext,
.geraet-detail-content {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.address-single-note {
  min-height: 34px;
  padding: 6px 0 2px 0;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.address-single-loading,
.address-single-error,
.address-single-empty {
  padding: 14px;
  color: #475569;
}

.address-single-error {
  color: #991b1b;
  background: #fef2f2;
  border-radius: 3px;
}

.address-single-card > .address-single-loading,
.address-single-card > .address-single-error {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

/* Tabellen */
.address-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.address-single-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  color: #0f172a;
}

.address-single-table th,
.address-single-table td {
  padding: 7px 9px;
  border-top: 1px solid #edf2f7;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}

.address-single-table th {
  color: #64748b;
  font-weight: 700;
  background: #f8fafc;
  border-top: none;
  white-space: nowrap;
}

.address-single-table tbody tr:hover td {
  background: #f9fbff;
}

.address-table-main {
  font-weight: 700;
}

.address-table-empty {
  color: #64748b;
  font-style: italic;
  text-align: center !important;
}

/* Bearbeiten-Overlay kompakter */
.address-edit-open {
  overflow: hidden;
}

.address-edit-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(2px);
}


.address-inline-edit-overlay {
  z-index: 100001;
}

.address-edit-dialog {
  width: min(920px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 5px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.24);
  overflow: hidden;
  padding: 0;
}

.address-edit-header {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.address-edit-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.address-edit-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
}

.address-edit-close {
  width: 30px;
  height: 30px;
  border: 1px solid #d5dee8;
  border-radius: 2px;
  background: #f8fafc;
  color: #334155;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.address-edit-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 12px 16px 14px 16px;
  background: #f8fafc;
}

.address-edit-section-title {
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
}

.address-edit-section-title-gap {
  margin-top: 14px;
}

.address-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.address-edit-field,
.address-edit-check {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.address-edit-field-wide {
  grid-column: span 2;
}

.address-edit-field span,
.address-edit-check span {
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

.address-edit-control,
.address-edit-field input,
.address-edit-field textarea,
.project-address-picker-row input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--color-border) !important;
  border-radius: 2px !important;
  background: #fafafa;
  color: #0f172a;
  font-family: inherit;
  font-size: 14px !important;
  line-height: 1.25;
  padding: 4px 8px !important;
  outline: none !important;
  box-shadow: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.address-edit-field input.edit,
.project-address-picker-row input.edit {
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  align-self: start;
}

.address-edit-field textarea.edit {
  height: auto !important;
  min-height: 64px !important;
}

.address-edit-control:focus,
.address-edit-field input:focus,
.address-edit-field textarea:focus,
.project-address-picker-row input:focus {
  border-color: var(--color-primary) !important;
  background: #ffffff;
  box-shadow: none !important;
}

.address-edit-field textarea {
  resize: vertical;
  min-height: 64px;
  line-height: 1.35;
}

.address-edit-check {
  justify-content: center;
  flex-direction: row;
  align-items: center;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  background: #ffffff;
  box-sizing: border-box;
}

.address-edit-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--color-primary);
}

.address-edit-hint {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid #d9e2ef;
  border-radius: 3px;
  background: #ffffff;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.address-edit-error {
  margin: 10px 16px 0 16px;
  padding: 8px 10px;
  border: 1px solid #fecaca;
  border-radius: 3px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 12px;
  font-weight: 600;
}

.address-edit-footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.address-edit-button {
  min-width: 92px;
  height: 30px;
  border-radius: 2px;
  padding: 0 12px;
  border: 1px solid #d5dee8;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.address-edit-button:disabled,
.address-edit-close:disabled {
  opacity: 0.65;
  cursor: default;
}

.address-edit-button-secondary {
  background: #eef3f8;
  color: #123;
}

.address-edit-button-primary {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

/* Projekt-Adressauswahl */
.project-address-picker-row {
  height: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 8px;
  align-items: start;
  min-width: 0;
}

.project-address-picker-row input[readonly] {
  background: #f1f5f9 !important;
  color: #52677c !important;
  cursor: default;
}

.project-address-clear {
  min-width: 104px;
}

.project-address-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-top: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.project-address-filter input {
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  min-height: 15px !important;
  margin: 0 !important;
  padding: 0 !important;
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.project-address-filter span {
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

.project-address-results {
  margin-top: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  background: #ffffff;
  max-height: 180px;
  overflow: auto;
}

.project-address-result,
.project-address-result-empty {
  padding: 7px 9px;
  border-top: 1px solid #edf2f7;
  font-size: 12px;
}

.project-address-result:first-child,
.project-address-result-empty:first-child {
  border-top: none;
}

.project-address-result {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border-left: none;
  border-right: none;
  border-bottom: none;
  border-top: 1px solid #edf2f7;
  background: #ffffff;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.project-address-result:hover {
  background: #f8fafc;
}

.project-address-result-title {
  font-weight: 600;
  color: #0f172a;
}

.project-address-result-sub {
  margin-top: 2px;
  color: #64748b;
}

.project-address-result-empty {
  display: block;
  width: 100%;
  box-sizing: border-box;
  color: #64748b;
  font-style: italic;
}


.project-file-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(2px);
}

.project-file-dialog {
  width: min(520px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 5px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.24);
  overflow: hidden;
  padding: 0;
}

.project-file-dialog-head {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.project-file-dialog-title {
  color: #0f172a;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.project-file-dialog-subtitle {
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.project-file-dialog-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 16px 14px 16px;
  background: #f8fafc;
}

.project-file-dialog-text {
  color: #26384a;
  font-size: 14px;
  line-height: 1.45;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.project-file-dialog-text strong {
  display: block;
  color: #0f172a;
  font-weight: 600;
  margin-bottom: 8px;
}

.project-file-dialog-warning {
  max-width: 100%;
  box-sizing: border-box;
  border-left: 3px solid #b91c1c;
  background: #fff7f7;
  color: #7f1d1d;
  padding: 8px 10px;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.project-file-dialog-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  max-width: 340px;
  min-width: 0;
  margin-top: 12px;
  box-sizing: border-box;
}

.project-file-dialog-input-wrap .address-edit-control {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  display: block;
}

.project-file-dialog-input-wrap span {
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

.project-file-dialog-error {
  margin: 10px 0 0 0;
}

.project-file-dialog-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.project-file-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(2px);
}

.project-file-preview-dialog {
  width: min(1120px, calc(100vw - 36px));
  height: min(780px, calc(100vh - 36px));
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 5px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.24);
  overflow: hidden;
}

.project-file-preview-head {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.project-file-preview-title {
  color: #0f172a;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-file-preview-subtitle {
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-file-preview-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  background: #f1f5f9;
}

.project-file-preview-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

.project-file-preview-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  align-self: center;
  justify-self: center;
}

.project-file-preview-download-error {
  position: absolute;
  z-index: 4;
  top: 14px;
  left: 16px;
  right: 16px;
  max-width: 760px;
  margin: 0 auto;
  padding: 11px 14px;
  box-sizing: border-box;
  border: 1px solid #fecaca;
  border-left: 4px solid #b42318;
  border-radius: 6px;
  background: #fff7f7;
  color: #991b1b;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  overflow-wrap: anywhere;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
}

.project-file-preview-message {
  align-self: center;
  max-width: 620px;
  margin: auto;
  padding: 18px 22px;
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  overflow-wrap: anywhere;
}

.project-file-preview-unsupported {
  border-left: 3px solid #063f6c;
  background: #ffffff;
  color: #26384a;
  text-align: left;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}

.project-file-preview-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.project-file-context-menu {
  position: fixed;
  z-index: 13000;
  min-width: 190px;
  padding: 6px;
  border: 1px solid #d7e2ec;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .18);
}

.project-file-context-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #26384a;
  font: inherit;
  font-size: 13px;
  line-height: 1.25;
  text-align: left;
  padding: 8px 9px;
  cursor: pointer;
}

.project-file-context-item:hover {
  background: #f3f7fb;
  color: #063f6c;
}

.project-file-context-danger {
  color: #9f1239;
}

.project-file-context-danger:hover {
  background: #fff1f2;
  color: #be123c;
}

.project-file-context-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M2.75 4h10.5M6.25 2.5h3.5M5 6.25v5M8 6.25v5M11 6.25v5M4 4l.55 9.1A1.5 1.5 0 0 0 6.05 14h3.9a1.5 1.5 0 0 0 1.5-1.4L12 4' stroke='%239f1239' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

@media (max-width: 900px) {
  .address-single-header {
    grid-template-columns: 1fr;
  }

  .address-single-grid {
    grid-template-columns: 1fr;
  }

  .address-single-field {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

@media (max-width: 760px) {
  .panel {
    min-width: 0 !important;
  }

  .address-searchbar {
    padding: 8px 8px 6px 8px;
  }

  .address-search-row {
    gap: 6px;
  }

  .address-new-button,
  .address-list-toolbar .address-edit-button-primary {
    min-width: 34px;
    width: 34px;
    padding: 0;
  }

  .address-new-button span:last-child {
    display: none;
  }

  .address-results {
    padding: 7px 7px 10px 7px;
  }

  .address-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .address-row-meta {
    display: none;
  }

  .address-edit-overlay {
    padding: 10px;
  }

  .address-edit-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    border-radius: 4px;
  }

  .address-edit-grid {
    grid-template-columns: 1fr;
  }

  .address-edit-field-wide {
    grid-column: span 1;
  }

  .address-edit-footer {
    flex-direction: column-reverse;
  }

  .address-edit-button {
    width: 100%;
  }

  .project-address-picker-row {
    grid-template-columns: 1fr;
  }
}

/* Adresse: kompakter Abschnittskopf mit Geo-Button */
.address-edit-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.address-edit-section-head .address-edit-section-title {
  margin-bottom: 0;
}

.address-edit-mini-button {
  flex: 0 0 auto;
  height: 30px;
  min-height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  color: var(--color-primary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 0 10px;
  cursor: pointer;
  white-space: nowrap;
}

.address-edit-mini-button:hover {
  background: #eef3f8;
  border-color: #b8c7dc;
}

/* Straße / PLZ / Ort mit Geo-Button in einer Zeile */
.address-edit-address-line {
  grid-column: span 2;
  display: grid;
  grid-template-columns: minmax(220px, 2fr) 90px minmax(180px, 1.4fr) auto;
  gap: 8px 10px;
  align-items: end;
}

.address-edit-address-line .address-edit-field {
  min-width: 0;
}

.address-edit-street-field,
.address-edit-plz-field,
.address-edit-ort-field {
  grid-column: auto;
}



/* PLZ -> Ort: sichtbarer Sperr-/Ladezustand während der Ortsabfrage */
.address-edit-ort-field {
  position: relative;
}

.address-edit-ort-field.is-plz-lookup-loading > span {
  color: var(--color-primary) !important;
  font-weight: 700 !important;
}

.address-edit-ort-field.is-plz-lookup-loading .address-edit-control {
  background: #eef5fb !important;
  border-color: #8fb1d0 !important;
  color: #52677c !important;
  cursor: progress !important;
  padding-right: 30px !important;
}

.address-edit-ort-field.is-plz-lookup-loading::after {
  content: "";
  position: absolute;
  right: 9px;
  bottom: 7px;
  width: 11px;
  height: 11px;
  box-sizing: border-box;
  border: 2px solid rgba(6, 63, 108, .22);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  pointer-events: none;
  animation: address-plz-ort-spin .7s linear infinite;
}

@keyframes address-plz-ort-spin {
  to { transform: rotate(360deg); }
}

 .address-edit-address-search-button {
  align-self: start;
  height: 28px !important;
  min-height: 28px !important;
  box-sizing: border-box;
  margin: 19px 0 0 0;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Geoapify Adresssuche als separates Overlay im Bearbeitungsdialog */
.address-geo-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.28);
}

.address-geo-dialog {
  width: min(620px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #d8e0ea;
  border-radius: 6px;
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.address-geo-header {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.address-geo-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.address-geo-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.3;
}

.address-geo-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px 16px;
  background: #f8fafc;
  overflow: auto;
}

.address-geo-footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.address-geo-location-button {
  width: auto;
  min-width: 210px;
  height: 34px;
  white-space: nowrap;
}

.address-geo-suggestions {
  margin-top: 6px;
  width: 100%;
  box-sizing: border-box;
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  border: 1px solid #d1d5db;
  border-radius: 3px;
  background: #ffffff;
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.address-geo-suggestion {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
  background: #ffffff;
  color: #0f172a;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  white-space: normal;
}

.address-geo-suggestion:last-child {
  border-bottom: 0;
}

.address-geo-suggestion:hover,
.address-geo-suggestion:focus {
  background: #eef3f8;
  outline: none;
}

.address-geo-suggestion-title {
  display: block;
  width: 100%;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.address-geo-suggestion-sub {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.address-geo-hint {
  margin-top: 6px;
  font-size: 11.5px;
  line-height: 1.3;
  color: #64748b;
}

@media (max-width: 760px) {
  .address-edit-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .address-edit-mini-button {
    width: 100%;
  }

  .address-geo-overlay {
    padding: 10px;
  }

  .address-geo-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .address-geo-footer {
    flex-direction: column;
  }

  .address-geo-location-button {
    width: 100%;
    min-width: 0;
  }
  .address-edit-address-line {
  grid-template-columns: 1fr;
  grid-column: span 1;
}

.address-edit-address-search-button {
  width: 100%;
}
}

/* AdresseSingle: wiederverwendbare Overlay-, Switch- und Feld-Layouts
   Diese Regeln ersetzen die zuletzt im Pascal-HTML eingefügten Inline-Styles. */
.address-overlay-close {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  background: transparent !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  color: #31516f !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease !important;
}

.address-overlay-close:hover {
  background: #eef5fb !important;
  border-color: #c8d5e2 !important;
  color: #063f6c !important;
}

.address-overlay-close:active {
  background: #dfeaf5 !important;
  color: #052f52 !important;
}

.address-overlay-close:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(11, 79, 138, .18) !important;
}

.address-overlay-close-icon {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
}

.address-overlay-close-icon path {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.2 !important;
  stroke-linecap: round !important;
}

.address-edit-switch {
  position: relative;
  display: inline-flex;
  width: 38px;
  height: 22px;
  margin: 0;
  cursor: pointer;
  vertical-align: middle;
}

.address-edit-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.address-edit-switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d7e0ea;
  border: 1px solid #c4d0dc;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.address-edit-switch-track::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .22);
  transition: transform .16s ease;
}

.address-edit-switch input:checked + .address-edit-switch-track {
  background: #0b4f8a;
  border-color: #0b4f8a;
}

.address-edit-switch input:checked + .address-edit-switch-track::before {
  transform: translateX(16px);
}

.address-edit-switch input:focus + .address-edit-switch-track {
  box-shadow: 0 0 0 3px rgba(11, 79, 138, .16);
}

.address-customer-options-grid {
  align-items: start;
  column-gap: 24px;
  row-gap: 14px;
}

.address-customer-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 7px 10px;
  gap: 16px;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  background: #f7f9fc;
  color: #17324d;
  font-size: 13px;
  font-weight: 600;
}

.address-customer-toggle .address-edit-switch {
  flex: 0 0 38px;
}

.address-edit-status-block {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.address-edit-status-title {
  display: block;
  margin-bottom: 10px;
}

.address-edit-compact-pairs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.address-edit-compact-pair {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid #d8e1ec;
  border-radius: 12px;
  background: #f7f9fc;
}

.address-edit-status-cell,
.address-edit-compact-number {
  display: grid !important;
  grid-template-rows: 16px 28px;
  row-gap: 6px;
  align-items: start;
}

.address-edit-status-cell {
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0;
}

.address-edit-compact-number {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  min-width: 0;
  transition: opacity .16s ease;
}

.address-edit-status-label,
.address-edit-compact-number > span {
  display: flex !important;
  align-items: center;
  height: 16px;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 16px !important;
  color: #0b2f53 !important;
}

.address-edit-status-control {
  height: 28px;
  display: flex;
  align-items: center;
}

.address-edit-number-edit-row {
  height: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: start;
  gap: 8px;
  min-width: 0;
}

.address-edit-number-edit-row > .address-edit-control {
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  box-sizing: border-box !important;
  min-width: 0;
  align-self: start;
}

.address-edit-number-edit-row > .address-edit-control[readonly] {
  background: #f1f5f9;
  color: #52677c;
}

.address-edit-number-action {
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: start !important;
  margin: 0 !important;
  padding: 0 10px !important;
  border: 1px solid #c8d5e2;
  border-radius: 4px;
  background: #ffffff;
  color: #0b2f53;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.address-edit-number-action:hover {
  background: #eef5fb;
  border-color: #9fb5cb;
  color: #063f6c;
}

.address-edit-number-action:disabled {
  opacity: .62;
  cursor: default;
  background: #f3f6f9;
}

.address-edit-address-line {
  display: grid !important;
  grid-template-columns: minmax(220px, 1.4fr) 90px minmax(160px, 1fr) max-content !important;
  gap: 10px !important;
  align-items: start !important;
}

.address-edit-address-line > .address-edit-field,
.address-edit-search-button-field {
  display: grid !important;
  grid-template-rows: 16px 28px !important;
  row-gap: 4px !important;
  align-items: start !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  min-width: 0 !important;
}

.address-edit-address-line > .address-edit-field > span,
.address-edit-search-button-field > span {
  display: flex !important;
  align-items: center !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 16px !important;
  font-size: 12px !important;
}

.address-edit-search-button-field > span {
  visibility: hidden !important;
}

.address-edit-address-line > .address-edit-field > .address-edit-control,
.address-edit-address-search-button {
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  box-sizing: border-box !important;
  align-self: start !important;
  margin: 0 !important;
}

.address-edit-address-search-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 10px !important;
  border: 1px solid #c8d5e2 !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  color: #0b2f53 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

.address-edit-address-search-button:hover {
  background: #eef5fb !important;
  border-color: #9fb5cb !important;
  color: #063f6c !important;
}

.address-geo-location-preview {
  border: 1px solid #d7dee8;
  border-radius: 12px;
  padding: 12px;
  margin-top: 10px;
  background: #f8fafc;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.address-geo-location-preview,
.address-geo-location-preview * {
  max-width: 100%;
  box-sizing: border-box;
}

.address-geo-location-preview-label {
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 12px;
  color: #475569;
}

.address-geo-location-preview-sub {
  margin-top: 4px;
}

.address-geo-location-preview-accuracy,
#geoLocationPreviewAccuracy {
  margin-top: 8px;
  display: block !important;
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  line-height: 1.35 !important;
}

.address-geo-location-preview-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

@media (max-width: 760px) {
  .address-edit-address-line {
    grid-template-columns: 1fr !important;
    grid-column: span 1;
  }

  .address-edit-address-search-button {
    width: 100%;
  }

  .address-edit-compact-pair {
    grid-template-columns: 82px minmax(0, 1fr);
  }
}

/* AdresseSingle: Anzeige-Modus Eingabe für Kommunikation und Ansprechpartner */
.address-single-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.address-single-section-head .address-single-section-title {
  margin-bottom: 0;
}

/* Kleine Hinzufuegen-Aktion direkt neben dem Abschnittstitel. */
.address-single-section-head.address-single-section-head-inline-action {
  justify-content: flex-start;
  gap: 7px;
}

.address-section-action {
  height: 28px;
  min-height: 28px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid #c8d5e2;
  border-radius: 4px;
  background: #ffffff;
  color: #0b2f53;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.address-section-action:hover {
  background: #eef5fb;
  border-color: #9fb5cb;
  color: #063f6c;
}

.address-small-dialog {
  width: min(680px, calc(100vw - 40px));
}

.address-edit-field select,
.address-edit-control select,
select.address-edit-control {
  width: 100%;
  height: 28px !important;
  min-height: 28px !important;
  box-sizing: border-box;
  border: 1px solid var(--color-border) !important;
  border-radius: 2px !important;
  background: #fafafa;
  color: #0f172a;
  font-family: inherit;
  font-size: 14px !important;
  line-height: 1.25;
  padding: 4px 8px !important;
  outline: none !important;
  box-shadow: none !important;
}

.address-edit-field select:focus,
select.address-edit-control:focus {
  border-color: var(--color-primary) !important;
  background: #ffffff;
  box-shadow: none !important;
}

@media (max-width: 720px) {
  .address-small-dialog {
    width: calc(100vw - 20px);
  }

  .address-single-section-head {
    align-items: flex-start;
  }
}


.address-communication-link {
  color: #063f6c;
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.address-communication-link:hover {
  color: #0b4f8a;
  text-decoration: underline;
}

.address-communication-inline-item {
  overflow-wrap: anywhere;
}

/* AdresseSingle: Bearbeiten/Löschen im Anzeige-Modus */
.address-table-actions-head,
.address-table-actions {
  width: 1%;
  white-space: nowrap;
}

.address-table-actions-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.address-table-action {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #c8d5e2;
  border-radius: 6px;
  background: #ffffff;
  color: #0b2f53;
  font-family: inherit;
  font-size: 0;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}


.address-action-icon {
  width: 15px;
  height: 15px;
  display: block;
}

.address-action-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.address-table-action:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 79, 138, .16);
}

.address-table-action:hover {
  background: #eef5fb;
  border-color: #9fb5cb;
  color: #063f6c;
}

.address-table-action-danger {
  color: #8a1f1f;
  border-color: #e2c2c2;
}

.address-table-action-danger:hover {
  background: #fff1f1;
  border-color: #d48c8c;
  color: #6f1111;
}

.address-section-action-muted {
  font-weight: 600;
  color: #475569;
}

.address-person-communication-editor {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #d8e1ec;
}

.address-person-communication-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.address-person-communication-hint {
  margin-top: 2px;
}

.address-person-communication-form {
  display: grid;
  grid-template-columns: 130px minmax(180px, 1fr) minmax(160px, 1fr) max-content;
  gap: 10px;
  align-items: end;
}

.address-person-communication-actions {
  display: inline-flex;
  align-items: end;
  gap: 6px;
  padding-bottom: 0;
}

.address-person-communication-rows {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.address-person-communication-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  background: #f8fafc;
}

.address-person-communication-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.address-person-communication-main strong {
  color: #0b2f53;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.address-person-communication-main span,
.address-person-communication-empty {
  color: #64748b;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.address-person-communication-empty {
  padding: 8px 10px;
  border: 1px dashed #c8d5e2;
  border-radius: 8px;
  background: #f8fafc;
}

@media (max-width: 860px) {
  .address-person-communication-form,
  .address-person-communication-row {
    grid-template-columns: 1fr;
  }

  .address-table-actions-wrap,
  .address-person-communication-actions {
    flex-wrap: wrap;
  }
}

/* AdresseSingle: Kommunikation/Ansprechpartner im Bearbeiten-Overlay */
.address-edit-related-sections {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.address-edit-related-section {
  margin-top: 0;
}

.address-edit-related-section .address-single-section-head {
  margin-bottom: 8px;
}

.address-edit-related-section .address-table-wrap {
  margin-top: 0;
}

.address-edit-related-section .address-single-table {
  min-width: 760px;
}

/* AdresseSingle: Laender-Suche */
.address-land-combo {
  position: relative;
}

.address-land-suggestions {
  position: absolute;
  z-index: 100030;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .16);
}

.address-land-suggestion {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #0b2f53;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.address-land-suggestion:hover,
.address-land-suggestion:focus {
  outline: none;
  background: #eef5fb;
}

.address-land-suggestion small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.address-land-suggestion-empty {
  padding: 8px 9px;
  color: #64748b;
  font-size: 12px;
}

.address-row-arrow-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.address-row-arrow-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}




/* Projekt: mehrzeilige Bezeichnung */
.project-description-textarea {
  min-height: 76px !important;
}

.project-description-value {
  white-space: pre-line !important;
}

/* Projekt: kompakter Switch für abweichende Baustellenanschrift */
.project-site-toggle {
  grid-column: span 2;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start;
  gap: 10px !important;
  min-height: 28px;
  margin: 0;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.project-site-toggle-label {
  color: #0b2f53 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 16px !important;
}

.project-site-switch {
  flex: 0 0 auto;
}

/* Projekt: Status und abweichende Baustellenanschrift */
.project-site-display {
  display: grid;
  gap: 6px;
}

.project-site-fields {
  display: grid;
  gap: 8px;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.project-site-extra-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) max-content;
  gap: 8px 10px;
  align-items: start;
  min-width: 0;
}

.project-site-clear-button {
  min-width: 72px;
}

.project-site-address-line {
  margin-top: 2px;
}

.project-site-land-field input[readonly] {
  background: #f1f5f9 !important;
  color: #52677c !important;
  cursor: default;
}

@media (max-width: 760px) {
  .project-site-extra-row {
    grid-template-columns: 1fr;
  }

  .project-site-clear-button {
    width: 100%;
  }
}


/* ProjektSingle: Aktionen im Ansichtmodus */
.project-single-section-head {
  align-items: flex-start;
}

.project-view-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.project-view-action {
  min-width: 0;
}

@media (max-width: 760px) {
  .project-single-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .project-view-actions {
    justify-content: flex-start;
  }
}

.address-single-section-head + .address-single-field {
  border-top: none;
}

/* AdresseSingle: Projektliste */
.address-project-table th:nth-child(2),
.address-project-table td:nth-child(2) {
  min-width: 220px;
}

.address-project-empty {
  color: #64748b;
  font-style: italic;
  text-align: center !important;
}

.address-table-action-view {
  color: #063f6c;
}

/* ProjektSingle: Dateiablage */
.project-files-section {
  overflow: visible;
}

.project-files-head {
  gap: 12px;
}

.project-files-actions {
  flex-shrink: 0;
}

.project-files-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
}

.project-file-breadcrumb {
  border: 0;
  background: transparent;
  color: #31516f;
  padding: 2px 3px;
  border-radius: 5px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.project-file-breadcrumb:hover {
  background: #eef4f8;
  color: #063f6c;
}

.project-file-breadcrumb-sep {
  color: #94a3b8;
}

.project-files-explorer {
  display: grid;
  grid-template-columns: minmax(210px, 285px) minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
  min-height: 300px;
}

.project-files-tree-panel,
.project-files-content-panel {
  border: 1px solid #dbe5ee;
  border-radius: 12px;
  background: #ffffff;
  min-width: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}

.project-files-tree-panel {
  overflow: hidden;
  background: #fbfdff;
}

.project-files-tree {
  padding: 10px 8px 10px;
  max-height: 460px;
  overflow: auto;
}

.project-files-tree-node {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 12px 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #496277;
  font: inherit;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.25;
  text-align: left;
  padding: 6px 8px;
  cursor: pointer;
}

.project-files-tree-node:hover {
  background: #f3f8fc;
  border-color: #e0ebf3;
  color: #063f6c;
}

.project-files-tree-node.is-active {
  background: #edf5fb;
  border-color: #c9dbe8;
  color: #063f6c;
  font-weight: 500;
}

.project-files-tree-marker {
  color: #9ab0c2;
  font-size: 9px;
  text-align: center;
}

.project-files-tree-icon,
.project-file-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.project-files-tree-icon-folder,
.project-files-tree-icon-root,
.project-file-icon-folder {
  width: 18px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='16' viewBox='0 0 20 16' fill='none'%3E%3Cpath d='M1.75 5A2 2 0 0 1 3.75 3h3.3l1.55 1.6H16.25A2 2 0 0 1 18.25 6.6v5.65a2 2 0 0 1-2 2H3.75a2 2 0 0 1-2-2V5Z' stroke='%23063f6c' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.project-files-tree-icon-root {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='16' viewBox='0 0 20 16' fill='none'%3E%3Cpath d='M1.75 5A2 2 0 0 1 3.75 3h3.3l1.55 1.6H16.25A2 2 0 0 1 18.25 6.6v5.65a2 2 0 0 1-2 2H3.75a2 2 0 0 1-2-2V5Z' stroke='%23063f6c' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M5.5 8.15h5' stroke='%23063f6c' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.project-files-tree-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-files-content-panel {
  position: relative;
  padding: 10px;
  background: #ffffff;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.project-files-drop-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px dashed #cad8e5;
  border-radius: 10px;
  background: #f8fbfd;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
  padding: 8px 10px;
  margin-bottom: 9px;
}

.project-files-drop-hint::before {
  content: "\2193";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #eef4f8;
  color: #31516f;
  font-weight: 700;
}

.project-files-dragging .project-files-content-panel,
.project-files-dragging .project-files-tree-node {
  border-color: #b9cad8;
}

.project-file-drop-active {
  border-color: #063f6c !important;
  background: #eef6fc !important;
  box-shadow: 0 0 0 3px rgba(6, 63, 108, .10) !important;
}

.project-files-status {
  margin-bottom: 8px;
  color: #64748b;
  font-size: 12px;
}

.project-files-status-error {
  color: #b91c1c !important;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 8px 10px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.project-files-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.project-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #ffffff;
  padding: 6px 7px;
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}

.project-file-row:hover {
  background: #f6f9fc;
  border-color: #d8e6f1;
}

.project-file-folder-row {
  background: #ffffff;
}

.project-file-main {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.project-file-main:hover strong {
  color: #063f6c;
}

.project-file-icon {
  width: 22px;
  min-width: 22px;
  height: 20px;
}

.project-file-icon-folder {
  width: 18px;
  min-width: 18px;
  height: 16px;
}

.project-file-icon-file {
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none'%3E%3Cpath d='M5 1.75h5.2l3.05 3.05v9.45A1.75 1.75 0 0 1 11.5 16H5A1.75 1.75 0 0 1 3.25 14.25v-10.75A1.75 1.75 0 0 1 5 1.75Z' stroke='%23063f6c' stroke-width='1.4' stroke-linejoin='round'/%3E%3Cpath d='M10.2 1.75V4.8h3.05' stroke='%23063f6c' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.project-file-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.project-file-text strong,
.project-file-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-file-text strong {
  color: #1f3447;
  font-size: 13px;
  font-weight: 500;
}

.project-file-folder-row .project-file-text strong {
  color: #28485f;
  font-weight: 500;
}

.project-file-text span {
  color: #75869a;
  font-size: 11px;
}

.project-file-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  opacity: .78;
}

.project-file-row:hover .project-file-row-actions {
  opacity: 1;
}

.project-file-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  border: 1px solid #d8e2ec;
  background: #ffffff;
  color: #31516f;
  border-radius: 7px;
  padding: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.project-file-action:hover {
  background: #eef4f8;
  color: #063f6c;
}

.project-file-action-danger {
  color: #9f1239;
  border-color: #f4c7d0;
}

.project-file-action-danger:hover {
  background: #fff1f2;
  color: #be123c;
}

@media (max-width: 900px) {
  .project-files-explorer {
    grid-template-columns: 1fr;
  }

  .project-files-tree {
    max-height: 220px;
  }
}

@media (max-width: 760px) {
  .project-files-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-files-actions {
    width: 100%;
  }

  .project-files-actions .project-view-action {
    flex: 1 1 auto;
  }

  .project-file-row {
    grid-template-columns: 1fr;
  }

  .project-file-row-actions {
    justify-content: flex-start;
    opacity: 1;
  }

  .project-file-action {
    width: 34px;
    height: 30px;
  }
}

.project-file-context-separator {
  height: 1px;
  margin: 5px 3px;
  background: #edf2f7;
}

.project-file-context-icon-open {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M5.25 3.25h-1.5A1.5 1.5 0 0 0 2.25 4.75v7.5a1.5 1.5 0 0 0 1.5 1.5h7.5a1.5 1.5 0 0 0 1.5-1.5v-1.5' stroke='%23063f6c' stroke-width='1.35' stroke-linecap='round'/%3E%3Cpath d='M8.25 2.25h5.5v5.5M13.5 2.5 7.25 8.75' stroke='%23063f6c' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.project-file-context-icon-download {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M8 2.25v7.1M8 9.35 5.25 6.6M8 9.35l2.75-2.75M3.25 10.75v1.5a1.5 1.5 0 0 0 1.5 1.5h6.5a1.5 1.5 0 0 0 1.5-1.5v-1.5' stroke='%23063f6c' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.project-file-context-icon-move {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M8 2.25v11.5M8 2.25 5.8 4.45M8 2.25l2.2 2.2M8 13.75l-2.2-2.2M8 13.75l2.2-2.2M2.25 8h11.5M2.25 8l2.2-2.2M2.25 8l2.2 2.2M13.75 8l-2.2-2.2M13.75 8l-2.2 2.2' stroke='%23063f6c' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.project-file-context-icon-copy {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M5.25 5.25h6A1.5 1.5 0 0 1 12.75 6.75v5.5a1.5 1.5 0 0 1-1.5 1.5h-6a1.5 1.5 0 0 1-1.5-1.5v-5.5a1.5 1.5 0 0 1 1.5-1.5Z' stroke='%23063f6c' stroke-width='1.35'/%3E%3Cpath d='M6.25 2.25h-1.5A1.5 1.5 0 0 0 3.25 3.75v1.5M10.75 5.25v-1.5a1.5 1.5 0 0 0-1.5-1.5h-3' stroke='%23063f6c' stroke-width='1.35' stroke-linecap='round'/%3E%3C/svg%3E");
}

.project-file-context-icon-paste {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M5.25 3.75h5.5M6.25 2.25h3.5a1 1 0 0 1 1 1v1h-5.5v-1a1 1 0 0 1 1-1Z' stroke='%23063f6c' stroke-width='1.25' stroke-linejoin='round'/%3E%3Cpath d='M4.25 4.25h-1a1.5 1.5 0 0 0-1.5 1.5v7a1.5 1.5 0 0 0 1.5 1.5h9.5a1.5 1.5 0 0 0 1.5-1.5v-7a1.5 1.5 0 0 0-1.5-1.5h-1' stroke='%23063f6c' stroke-width='1.35' stroke-linecap='round'/%3E%3Cpath d='M8 7.25v4M6.25 9.5 8 11.25 9.75 9.5' stroke='%23063f6c' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.project-file-context-icon-delete {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M2.75 4h10.5M6.25 2.5h3.5M5 6.25v5M8 6.25v5M11 6.25v5M4 4l.55 9.1A1.5 1.5 0 0 0 6.05 14h3.9a1.5 1.5 0 0 0 1.5-1.4L12 4' stroke='%239f1239' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.project-file-row[draggable="true"] .project-file-main,
.project-files-tree-node[draggable="true"] {
  cursor: grab;
}

.project-file-row[draggable="true"] .project-file-main:active,
.project-files-tree-node[draggable="true"]:active {
  cursor: grabbing;
}

.project-file-drag-source {
  opacity: .48;
}

.project-files-internal-dragging .project-files-drop-hint::before {
  content: "\2194";
}

@media (max-width: 760px) {
  .project-file-preview-overlay {
    padding: 10px;
  }

  .project-file-preview-dialog {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
  }

  .project-file-preview-actions {
    flex-wrap: wrap;
  }
}



/* Projektanlage: direkte Neuanlage einer noch nicht vorhandenen Adresse */
.project-address-create-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  padding: 10px 12px;
  border-top: 1px solid rgba(6, 63, 108, 0.14);
  background: rgba(6, 63, 108, 0.035);
}

.project-address-create-hint {
  color: #667085;
  font-size: 13px;
  line-height: 1.35;
}

.project-address-create-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #063f6c;
  border-radius: 7px;
  background: #ffffff;
  color: #063f6c;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.project-address-create-button:hover {
  background: rgba(6, 63, 108, 0.06);
}

.project-address-create-button span {
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
}

@media (max-width: 640px) {
  .project-address-create-result {
    align-items: stretch;
    flex-direction: column;
  }

  .project-address-create-button {
    width: 100%;
  }
}

/* Leistungen: Katalogbaum + kompakte Stammdatenliste */
.leistungen-page,
#leistungen-page-root {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #f5f7fb;
  box-sizing: border-box;
}

.leistungen-layout {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  overflow: hidden;
}

.leistungen-catalog-panel {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
}

.leistungen-catalog-header {
  min-height: 46px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #e5e7eb;
  box-sizing: border-box;
}

.leistungen-catalog-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.leistungen-catalog-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.leistungen-icon-button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #dbe3ed;
  border-radius: 2px;
  background: #ffffff;
  color: var(--color-primary);
  font-family: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.leistungen-icon-button:hover {
  background: #f3f7fb;
  border-color: #b8c7dc;
}

.leistungen-catalog-status {
  flex: 0 0 auto;
  min-height: 0;
  padding: 6px 10px 0 10px;
  color: #64748b;
  font-size: 11px;
}

.leistungen-catalog-tree {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 6px;
}

.leistungen-catalog-node {
  width: 100%;
  min-height: 31px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
}

.leistungen-catalog-node:hover {
  background: #f3f7fb;
}

.leistungen-catalog-node.active {
  background: #eaf1f8;
  color: var(--color-primary);
  font-weight: 600;
}

.leistungen-catalog-marker {
  flex: 0 0 14px;
  width: 14px;
  color: #94a3b8;
  text-align: center;
}

.leistungen-catalog-node.active .leistungen-catalog-marker {
  color: var(--color-primary);
}

.leistungen-catalog-node-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leistungen-list-panel {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.leistungen-searchbar {
  padding-bottom: 6px;
}

.leistungen-filter-line {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.leistungen-selected-katalog {
  flex: 0 0 auto;
  max-width: 50%;
  padding: 2px 6px;
  border-radius: 2px;
  background: #eef3f8;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leistungen-filter-line .address-result-info {
  flex: 1 1 auto;
  order: initial;
  margin: 0;
  min-width: 0;
}

.leistungen-results {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 10px 10px 10px;
  box-sizing: border-box;
}

.leistung-row {
  display: grid;
  grid-template-columns: minmax(70px, 110px) minmax(0, 1fr) minmax(40px, 70px) minmax(90px, 120px) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #ffffff;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.leistung-row:hover,
.leistung-row:focus {
  background: #f9fbff;
  border-color: #b8c7dc;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.05);
  outline: none;
}

.leistung-row-number {
  min-width: 0;
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leistung-row-content {
  min-width: 0;
}

.leistung-row-main {
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leistung-row-sub {
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leistung-row-unit,
.leistung-row-price {
  color: #475569;
  font-size: 12px;
  white-space: nowrap;
  text-align: right;
}

.leistung-row-price {
  color: #0f172a;
  font-weight: 600;
}

/* Leistung bearbeiten */
.leistung-single-page {
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  padding: 12px;
  background: #f5f7fb;
  overflow: hidden;
}

.material-detail-page {
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  padding: 12px;
  background: #f5f7fb;
  overflow: auto;
}

.leistung-single-card {
  width: min(1100px, 100%);
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  overflow: hidden;
}

.leistung-single-header {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.leistung-single-title {
  min-width: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leistung-single-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.leistung-single-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.leistung-single-loading {
  color: #64748b;
  font-size: 13px;
}

.leistung-form-error {
  display: none;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid #dbe3ed;
  border-radius: 3px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
}

.leistung-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.leistung-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.leistung-field-wide {
  grid-column: span 3;
}

.leistung-field-full {
  grid-column: 1 / -1;
}

.leistung-field-spacer {
  grid-column: span 3;
}

.leistung-field > span {
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

.leistung-field input,
.leistung-field select,
.leistung-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  background: #fafafa;
  color: #0f172a;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.35;
  padding: 7px 8px;
  outline: none;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

.leistung-field input,
.leistung-field select {
  min-height: 34px;
}

.leistung-field textarea {
  resize: vertical;
}

.leistung-field input:focus,
.leistung-field select:focus,
.leistung-field textarea:focus {
  border-color: var(--color-primary);
  background: #ffffff;
}

.leistung-secondary-danger {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #cbd5e1;
  border-radius: 2px;
  background: #ffffff;
  color: #b42318;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.leistung-secondary-danger:hover {
  background: #fff7f6;
  border-color: #f0b4ad;
}

@media (max-width: 1000px) {
  .leistungen-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .leistung-row {
    grid-template-columns: minmax(70px, 100px) minmax(0, 1fr) auto auto;
  }

  .leistung-row-unit {
    display: none;
  }

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

  .leistung-field-wide,
  .leistung-field-spacer {
    grid-column: span 1;
  }
}

@media (max-width: 760px) {
  .leistungen-layout {
    display: flex;
    flex-direction: column;
  }

  .leistungen-catalog-panel {
    flex: 0 0 auto;
    max-height: 220px;
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .leistungen-list-panel {
    flex: 1 1 auto;
  }

  .leistung-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .leistung-row-number,
  .leistung-row-price {
    grid-column: auto;
  }

  .leistung-row-content {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .leistung-row-unit {
    display: none;
  }

  .leistung-row .address-row-arrow {
    display: none;
  }

  .leistung-form-grid {
    grid-template-columns: 1fr;
  }

  .leistung-field-wide,
  .leistung-field-full,
  .leistung-field-spacer {
    grid-column: 1;
  }

  .leistung-field-spacer {
    display: none;
  }
}

/* Leistungen: Bearbeitung analog Adresse/Projekt als Overlay */
.leistung-edit-dialog {
  width: min(980px, calc(100vw - 40px));
}

.leistung-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 12px;
}

.leistung-edit-katalog-field {
  grid-column: span 3;
}

.leistung-edit-full {
  grid-column: 1 / -1;
}

.leistung-edit-spacer {
  grid-column: span 3;
}

.leistung-edit-select {
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  padding: 3px 30px 3px 8px !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 2px !important;
  background-color: #fafafa !important;
  color: #0f172a;
  font-family: inherit;
  font-size: 14px !important;
  outline: none !important;
  box-shadow: none !important;
  cursor: pointer;
  appearance: auto !important;
  -webkit-appearance: menulist !important;
}

.leistung-edit-select:focus {
  border-color: var(--color-primary) !important;
  background-color: #ffffff !important;
}

.leistung-edit-langtext {
  min-height: 140px !important;
}

.leistung-edit-loading {
  padding: 16px 0;
  color: #64748b;
  font-size: 13px;
}

.leistung-edit-footer {
  align-items: center;
}

.leistung-edit-footer-spacer {
  flex: 1 1 auto;
}

.leistung-edit-delete {
  min-height: 30px;
  height: 30px;
}

@media (max-width: 1000px) {
  .leistung-edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .leistung-edit-katalog-field,
  .leistung-edit-spacer {
    grid-column: span 1;
  }
}

@media (max-width: 760px) {
  .leistung-edit-grid {
    grid-template-columns: 1fr;
  }

  .leistung-edit-katalog-field,
  .leistung-edit-full,
  .leistung-edit-spacer {
    grid-column: 1;
  }

  .leistung-edit-spacer {
    display: none;
  }

  .leistung-edit-footer {
    flex-wrap: wrap;
  }
}

/* Leistung: lesende Detailansicht, Bearbeitung weiterhin im Overlay */
.leistung-detail-card {
  width: min(1100px, 100%);
}

.leistung-detail-text {
  min-height: 22px;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.leistung-detail-longtext {
  min-height: 70px;
}

/* MaterialSingle: Kurz- und Langtexte gemeinsam in einer Karte. */
.material-text-card .address-single-section-title {
  margin-bottom: 14px;
}

.material-text-group + .material-text-group {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #edf1f4;
}

.material-text-subtitle {
  margin-bottom: 5px;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

/* Materialstamm */
.material-page {
  width: 100%;
}

.material-layout {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  overflow: hidden;
}

.material-list-panel {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.material-searchbar {
  flex: 0 0 auto;
}

.material-filter-select {
  min-width: 220px;
  height: 30px;
  min-height: 30px;
  padding: 0 30px 0 9px;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  background: #fafafa;
  color: #0f172a;
  font-family: inherit;
  font-size: 14px;
  box-sizing: border-box;
}

.material-filter-select:focus {
  border-color: var(--color-primary);
  background: #ffffff;
  outline: none;
}

.material-filter-line {
  display: flex;
  width: 100%;
}

/* Die Materialliste verwendet bewusst dieselbe Row-Basis wie Adressen. */
.material-results {
  flex: 1 1 auto;
  min-height: 0;
}

.material-row-price-meta {
  min-width: 84px;
  max-width: 120px;
  text-align: right;
  font-weight: 600;
  color: #334155;
}

.material-edit-dialog {
  width: min(980px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
}

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

.material-edit-full {
  grid-column: 1 / -1;
}

.material-edit-select {
  width: 100%;
}

.material-price-heading {
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid #e1e7ec;
  color: #063f6c;
  font-weight: 700;
  font-size: 15px;
}

.material-calculated {
  background: #f3f6f8 !important;
  color: #455b6b !important;
  font-weight: 600;
}

.material-calculated-output {
  display: flex;
  align-items: center;
  width: 100%;
  height: 28px;
  min-height: 28px;
  max-height: 28px;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: 2px;
  background: #fafafa;
  color: #0f172a;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
  padding: 4px 8px;
}

.settings-material-form {
  display: flex;
  align-items: end;
  gap: 14px;
  max-width: 560px;
  margin-top: 20px;
}

.settings-material-field {
  flex: 1;
}

@media (max-width: 900px) {
  .material-filter-select {
    min-width: 180px;
  }
}

@media (max-width: 700px) {
  .material-searchbar .address-search-row {
    flex-wrap: wrap;
  }
  .material-filter-select {
    order: 3;
    width: 100%;
  }
  .material-edit-grid {
    grid-template-columns: 1fr;
  }
  .material-edit-full {
    grid-column: auto;
  }
  .settings-material-form {
    align-items: stretch;
    flex-direction: column;
  }
}

.material-supplier-picker {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.material-supplier-picker .material-edit-select {
  flex: 1;
  min-width: 0;
}

.material-supplier-add {
  flex: 0 0 44px;
  width: 44px;
  min-height: 42px;
  border: 1px solid #b9c7d1;
  border-radius: 2px;
  background: #ffffff;
  color: #063f6c;
  font-size: 25px;
  line-height: 1;
  font-weight: 400;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.material-supplier-add:hover,
.material-supplier-add:focus-visible {
  border-color: #063f6c;
  background: #f3f7fa;
  outline: none;
}

.material-supplier-add:disabled {
  opacity: 0.55;
  cursor: default;
}

.material-datanorm-supplier-add {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  min-height: 28px;
  max-height: 28px;
  padding: 0;
  border-color: var(--color-border);
  background: #fafafa;
  color: #587086;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.material-datanorm-supplier-add:hover,
.material-datanorm-supplier-add:focus-visible {
  border-color: #9fb5cb;
  background: #f3f7fa;
  color: #063f6c;
}

/* DATANORM Import */
.material-import-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #b9c7d1;
  border-radius: 4px;
  background: #fff;
  color: #063f6c;
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.material-import-button:hover,
.material-import-button:focus-visible {
  border-color: #063f6c;
  background: #f3f7fa;
  outline: none;
}

.material-datanorm-dialog {
  width: min(760px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
}

.material-datanorm-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 18px;
  overflow-x: hidden;
}

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

.material-datanorm-full {
  min-width: 0;
  grid-column: 1 / -1;
}

.material-datanorm-hint {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 5px;
  color: #6c7b88;
  font-size: 12px;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
}

.material-datanorm-dropzone {
  display: flex;
  min-height: 150px;
  padding: 24px;
  border: 2px dashed #b9c7d1;
  border-radius: 8px;
  background: #f8fafb;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.material-datanorm-dropzone:hover,
.material-datanorm-dropzone:focus-visible,
.material-datanorm-dropzone.is-dragover {
  border-color: #063f6c;
  background: #eef5f9;
  outline: none;
}

.material-datanorm-dropzone.is-disabled {
  opacity: .6;
  cursor: wait;
}

.material-datanorm-drop-title {
  color: #063f6c;
  font-size: 17px;
  font-weight: 700;
}

.material-datanorm-drop-sub {
  margin-top: 7px;
  color: #6c7b88;
  font-size: 13px;
  line-height: 1.45;
}

.material-datanorm-file-list {
  display: flex;
  max-height: 180px;
  overflow-y: auto;
  flex-direction: column;
  gap: 6px;
}

.material-datanorm-empty {
  color: #7a8894;
  font-size: 13px;
}

.material-datanorm-file {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid #e1e7ec;
  border-radius: 4px;
  background: #fff;
}

.material-datanorm-file-name {
  min-width: 0;
  overflow: hidden;
  color: #263746;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-datanorm-file-size {
  flex: 0 0 auto;
  color: #7a8894;
  font-size: 12px;
}

.material-datanorm-status {
  padding: 12px 14px;
  border: 1px solid #c6d8c8;
  border-radius: 6px;
  background: #f4faf4;
  color: #244a2a;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.material-datanorm-status.is-error {
  border-color: #e2b8b8;
  background: #fff5f5;
  color: #8a2525;
}

.material-datanorm-result-title {
  margin-bottom: 4px;
  font-weight: 700;
}

.material-datanorm-result-summary {
  color: inherit;
}

.material-datanorm-result-info {
  margin-top: 4px;
  color: #607080;
  font-size: 12px;
}

.material-datanorm-warning-title {
  margin-top: 12px;
  font-weight: 700;
}

.material-datanorm-warning-list {
  display: flex;
  margin-top: 5px;
  flex-direction: column;
  gap: 3px;
  color: #66562b;
}

@media (max-width: 700px) {
  .material-import-button {
    order: 4;
    flex: 1 1 auto;
  }

  .material-searchbar .address-new-button {
    order: 5;
    flex: 1 1 auto;
  }

  .material-datanorm-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .material-datanorm-grid {
    grid-template-columns: 1fr;
  }
}

.material-datanorm-progress {
  padding: 14px 15px;
  border: 1px solid #b7c9d8;
  border-radius: 7px;
  background: #f5f9fc;
  box-shadow: 0 1px 2px rgba(17, 52, 79, 0.05);
}

.material-datanorm-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #153f5f;
  font-size: 13px;
  font-weight: 600;
}

.material-datanorm-progress-head strong {
  flex: 0 0 auto;
  min-width: 48px;
  text-align: right;
  font-size: 15px;
}

.material-datanorm-progress-track {
  height: 10px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe6ee;
}

.material-datanorm-progress-bar {
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #0b5a8f 0%, #1680bc 100%);
  transition: width 0.28s ease;
}

.material-datanorm-progress.is-active .material-datanorm-progress-bar {
  position: relative;
  overflow: hidden;
}

.material-datanorm-progress.is-active .material-datanorm-progress-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 42%;
  transform: translateX(-130%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  animation: material-datanorm-progress-shine 1.35s linear infinite;
}

.material-datanorm-progress-detail {
  margin-top: 8px;
  color: #657887;
  font-size: 12px;
  line-height: 1.4;
}

@keyframes material-datanorm-progress-shine {
  to { transform: translateX(340%); }
}

/* Einstellungen - Lohnarten */
.settings-lohnarten-page {
  display: grid;
  gap: 18px;
}

.settings-lohn-gk-form {
  max-width: 560px;
}

.settings-lohnarten-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.settings-lohnart-new {
  flex: 0 0 auto;
}

.settings-lohnarten-list {
  display: grid;
  gap: 8px;
}

.settings-lohnart-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid #dbe3e8;
  border-radius: 4px;
  background: #ffffff;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.settings-lohnart-row:hover,
.settings-lohnart-row:focus-visible {
  border-color: #9fb5c4;
  background: #f8fafb;
  box-shadow: 0 1px 4px rgba(6, 63, 108, 0.08);
  outline: none;
}

.settings-lohnart-row-main {
  min-width: 0;
}

.settings-lohnart-name {
  color: #16374f;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.settings-lohnart-formula {
  margin-top: 4px;
  color: #647785;
  font-size: 13px;
  line-height: 1.45;
}

.settings-lohnart-row-meta {
  min-width: 170px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  color: #647785;
  font-size: 12px;
  white-space: nowrap;
}

.settings-lohnart-row-meta strong {
  color: #063f6c;
  font-size: 14px;
}

.settings-lohnart-dialog {
  width: min(760px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
}

.settings-lohnart-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}

.settings-lohnart-edit-full {
  grid-column: 1 / -1;
}

.settings-input-suffix {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-input-suffix .address-edit-control {
  flex: 1 1 auto;
  min-width: 0;
}

.settings-input-suffix > span {
  flex: 0 0 auto;
  min-width: 62px;
  color: #667784;
  font-size: 12px;
  white-space: nowrap;
}

.settings-calculated-input {
  background: #f3f6f8 !important;
  color: #455b6b !important;
  font-weight: 600;
}

.settings-lohnart-footer-spacer {
  flex: 1 1 auto;
}

@media (max-width: 760px) {
  .settings-lohnarten-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-lohnart-new {
    align-self: flex-start;
  }

  .settings-lohnart-row {
    grid-template-columns: minmax(0, 1fr) 24px;
  }

  .settings-lohnart-row-meta {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
    align-items: flex-start;
  }

  .settings-lohnart-row > .address-row-arrow {
    grid-column: 2;
    grid-row: 1;
  }

  .settings-lohnart-edit-grid {
    grid-template-columns: 1fr;
  }

  .settings-lohnart-edit-full {
    grid-column: auto;
  }
}

/* Einstellungen - Kalkulation */
.settings-kalkulation-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.settings-kalkulation-section {
  min-width: 0;
}

.settings-kalkulation-section-wide {
  grid-column: 1 / -1;
}

.settings-kalkulation-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  margin-top: 18px;
}

.settings-kalkulation-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.settings-kalkulation-lohn-head {
  align-items: flex-start;
}

.settings-kalkulation-lohn-option {
  display: flex;
  align-items: end;
  gap: 14px;
  max-width: 560px;
  margin: 18px 0 20px;
}

.settings-kalkulation-lohn-option .address-edit-field {
  flex: 1;
}

.settings-lohnarten-list-toolbar {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 10px;
}

@media (max-width: 700px) {
  .settings-kalkulation-fields {
    grid-template-columns: 1fr;
  }

  .settings-kalkulation-lohn-option {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-kalkulation-lohn-head {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Geräte-Stammdaten */
.geraete-page,
.geraet-detail-page {
  min-height: 0;
  height: 100%;
}

.geraete-edit-dialog {
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
}

.geraet-detail-content {
  gap: 18px;
}

.geraet-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.geraet-section-subtitle {
  margin-top: 3px;
  color: #728096;
  font-size: 13px;
}

.geraet-section-button {
  flex: 0 0 auto;
  min-height: 30px;
  height: 30px;
  padding: 0 11px;
}

.geraet-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.geraet-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.geraet-table th,
.geraet-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e6ebf1;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.geraet-table th {
  color: #5f6f82;
  font-size: 12px;
  font-weight: 700;
  background: #f7f9fc;
}

.geraet-table th:first-child,
.geraet-table td:first-child {
  width: 120px;
}

.geraet-table th:last-child,
.geraet-table td:last-child {
  width: 105px;
  text-align: right;
}

.geraet-money-col {
  width: 150px;
  text-align: right !important;
  white-space: nowrap;
}

.geraet-row-action {
  appearance: none;
  border: 1px solid #d6dee8;
  border-radius: 6px;
  background: #fff;
  color: #29435c;
  min-height: 28px;
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.geraet-row-action:hover,
.geraet-row-action:focus-visible {
  border-color: #a9bacb;
  background: #f7f9fc;
  outline: none;
}

.geraet-row-action-danger {
  color: #a63d3d;
}

.geraet-empty-state {
  padding: 16px 4px;
  color: #758399;
  font-size: 13px;
}

.geraet-wartung-dialog {
  width: min(660px, calc(100vw - 32px));
}

.geraet-file-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.geraet-file-category {
  width: 180px;
  min-width: 180px;
  height: 30px;
  min-height: 30px;
}

.geraet-file-date-field {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #66778a;
  font-size: 12px;
  font-weight: 600;
}

.geraet-file-date {
  width: 145px;
  min-width: 145px;
  height: 30px;
  min-height: 30px;
}

.geraet-file-dropzone {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border: 1px dashed #b7c5d4;
  border-radius: 8px;
  color: #69798d;
  background: #f9fbfd;
  font-size: 13px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.geraet-file-dropzone:hover,
.geraet-file-dropzone.is-dragover {
  border-color: #7391ad;
  background: #f1f6fa;
}

.geraet-file-status {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 6px;
  background: #eef5f9;
  color: #36536d;
  font-size: 13px;
}

.geraet-file-status.is-error {
  background: #fff0f0;
  color: #9b3434;
}

.geraet-files-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.geraet-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  padding: 9px 11px;
  border: 1px solid #e1e7ee;
  border-radius: 8px;
  background: #fff;
}

.geraet-file-info {
  min-width: 0;
  flex: 1 1 auto;
}

.geraet-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #24394d;
  font-size: 14px;
  font-weight: 600;
}

.geraet-file-meta {
  margin-top: 3px;
  color: #7a8797;
  font-size: 12px;
}

.geraet-file-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

@media (max-width: 720px) {
  .geraet-section-header,
  .geraet-file-toolbar,
  .geraet-file-row {
    align-items: stretch;
    flex-direction: column;
  }

  .geraet-file-category,
  .geraet-file-date {
    width: 100%;
    min-width: 0;
  }

  .geraet-file-date-field {
    align-items: stretch;
    flex-direction: column;
  }

  .geraet-file-actions {
    justify-content: flex-end;
  }

  .geraet-table {
    min-width: 620px;
  }
}

/* Leistungskalkulation */
.leistung-calc-section {
  display: block;
}

.leistung-calc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.leistung-calc-info {
  margin-top: 4px;
  color: #6f7f8d;
  font-size: 13px;
  line-height: 1.45;
}

.leistung-calc-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.leistung-calc-add {
  height: 30px;
  padding: 0 11px;
  border: 1px solid #cbd7e0;
  border-radius: 6px;
  background: #fff;
  color: #063f6c;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.leistung-calc-add:hover {
  border-color: #8fa8ba;
  background: #f7fafc;
}

.leistung-calc-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.leistung-calc-summary-card {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #dfe7ed;
  border-radius: 7px;
  background: #f8fafb;
}

.leistung-calc-summary-card span {
  display: block;
  margin-bottom: 3px;
  color: #788793;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.leistung-calc-summary-card strong {
  color: #18384f;
  font-size: 17px;
  font-weight: 700;
}

.leistung-calc-rows {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.leistung-calc-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
}

.leistung-calc-row-content {
  min-width: 0;
}

.leistung-calc-row-badge {
  min-width: 84px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #edf3f7;
  color: #36556d;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.leistung-calc-row-badge-lohn {
  background: #eef4fb;
  color: #315f87;
}

.leistung-calc-row-badge-material {
  background: #f3f5ec;
  color: #5e6e35;
}

.leistung-calc-row-badge-geraet {
  background: #f4f0f8;
  color: #684d7d;
}

.leistung-calc-row-badge-fremdleistung {
  background: #f9f1ed;
  color: #835c47;
}

.leistung-calc-row-totals {
  display: flex;
  min-width: 132px;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  white-space: nowrap;
  color: #71808c;
  font-size: 12px;
}

.leistung-calc-row-totals strong {
  color: #18384f;
  font-size: 14px;
}

.leistung-calc-empty {
  padding: 18px;
  border: 1px dashed #cbd7e0;
  border-radius: 7px;
  color: #788793;
  text-align: center;
  font-size: 13px;
}

.leistung-calc-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
}

.leistung-calc-type-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-bottom: 14px;
  padding: 0 9px;
  border-radius: 999px;
  background: #edf3f7;
  color: #36556d;
  font-size: 12px;
  font-weight: 700;
}

.leistung-calc-form-block,
.leistung-calc-manual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.leistung-calc-form-wide {
  grid-column: 1 / -1;
}

.leistung-calc-material-master {
  margin-top: 2px;
}

.leistung-calc-material-results {
  max-height: 220px;
  margin-top: 7px;
  overflow-y: auto;
  border: 1px solid #dbe4ea;
  border-radius: 7px;
  background: #fff;
}

.leistung-calc-material-result {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 3px;
  padding: 9px 11px;
  border: 0;
  border-bottom: 1px solid #edf1f4;
  background: #fff;
  color: #274357;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.leistung-calc-material-result:last-child {
  border-bottom: 0;
}

.leistung-calc-material-result:hover {
  background: #f6f9fb;
}

.leistung-calc-material-result strong {
  font-size: 13px;
}

.leistung-calc-material-result span,
.leistung-calc-material-empty,
.leistung-calc-material-selected {
  color: #75848f;
  font-size: 12px;
}

.leistung-calc-material-empty,
.leistung-calc-material-selected {
  padding: 10px 11px;
}

.leistung-calc-preview {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 7px;
  background: #f4f7f9;
  color: #536875;
  font-size: 13px;
  line-height: 1.45;
}

.leistung-edit-dialog input:disabled {
  background: #f1f4f6;
  color: #687985;
  cursor: not-allowed;
}

@media (max-width: 820px) {
  .leistung-calc-header {
    flex-direction: column;
  }

  .leistung-calc-actions {
    justify-content: flex-start;
  }

  .leistung-calc-summary {
    grid-template-columns: 1fr;
  }

  .leistung-calc-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .leistung-calc-row-totals {
    grid-column: 2 / -1;
    align-items: flex-start;
  }

  .leistung-calc-form-block,
  .leistung-calc-manual-grid {
    grid-template-columns: 1fr;
  }

  .leistung-calc-form-wide {
    grid-column: auto;
  }
}

/* Leistungskalkulation: kompaktere Detail- und Editdarstellung */
.leistung-calc-header {
  gap: 12px;
  margin-bottom: 8px;
}

.leistung-calc-info {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.35;
}

.leistung-calc-actions {
  gap: 5px;
}

.leistung-calc-add {
  height: 28px;
  padding: 0 9px;
  font-size: 12px;
}

.leistung-calc-add:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.leistung-calc-summary-detailed {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}

.leistung-calc-summary-detailed .leistung-calc-summary-card {
  padding: 7px 9px;
  border-radius: 4px;
}

.leistung-calc-summary-detailed .leistung-calc-summary-card span {
  margin-bottom: 2px;
  font-size: 10px;
  letter-spacing: .025em;
}

.leistung-calc-summary-detailed .leistung-calc-summary-card strong {
  font-size: 14px;
}

.leistung-calc-summary-total {
  background: #f3f7fa;
  border-color: #cfdce5;
}

.leistung-calc-summary-db {
  background: #f7f8f3;
  border-color: #dce2cf;
}

.leistung-calc-rows {
  gap: 4px;
}

.leistung-calc-row {
  gap: 8px;
  padding: 6px 8px;
  margin-bottom: 0;
}

.leistung-calc-row .address-row-main {
  font-size: 13px;
}

.leistung-calc-row .address-row-sub {
  font-size: 11px;
}

.leistung-calc-row-badge {
  min-width: 72px;
  padding: 3px 6px;
  font-size: 10px;
}

.leistung-calc-row-totals {
  min-width: 118px;
  gap: 1px;
  font-size: 11px;
}

.leistung-calc-row-totals strong {
  font-size: 13px;
}

.leistung-calc-row .address-row-arrow {
  font-size: 19px;
}

.leistung-calc-empty {
  padding: 12px;
  font-size: 12px;
}

.leistung-edit-calc-section {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid #e3e9ee;
}

.leistung-edit-calc-header {
  margin-bottom: 8px;
}

.leistung-edit-calc-summary {
  margin-bottom: 8px;
}

.leistung-edit-calc-rows {
  padding-bottom: 2px;
}

@media (max-width: 1000px) {
  .leistung-calc-summary-detailed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .leistung-calc-summary-detailed {
    grid-template-columns: 1fr;
  }
}

/* Leistungskalkulation: kompakte Matrix für Kosten, Aufschlag und VK */
.leistung-calc-summary-compact {
  margin: 5px 0 8px;
  border: 1px solid #dfe7ed;
  border-radius: 5px;
  background: #fff;
  overflow: hidden;
}

.leistung-calc-summary-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.leistung-calc-summary-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  table-layout: fixed;
  color: #294457;
  font-size: 11px;
  line-height: 1.15;
}

.leistung-calc-summary-table th,
.leistung-calc-summary-table td {
  padding: 4px 7px;
  border-right: 1px solid #edf1f4;
  border-bottom: 1px solid #edf1f4;
  text-align: right;
  white-space: nowrap;
}

.leistung-calc-summary-table th:last-child,
.leistung-calc-summary-table td:last-child {
  border-right: 0;
}

.leistung-calc-summary-table tbody tr:last-child th,
.leistung-calc-summary-table tbody tr:last-child td {
  border-bottom: 0;
}

.leistung-calc-summary-table thead th {
  padding-top: 5px;
  padding-bottom: 5px;
  background: #f7f9fb;
  color: #61727f;
  font-size: 10px;
  font-weight: 700;
}

.leistung-calc-summary-table thead th:first-child,
.leistung-calc-summary-table tbody th {
  width: 82px;
  text-align: left;
}

.leistung-calc-summary-table tbody th {
  background: #fafbfd;
  color: #667985;
  font-size: 10px;
  font-weight: 700;
}

.leistung-calc-summary-table tbody tr:nth-child(2) td {
  color: #6e7e89;
  font-size: 10px;
}

.leistung-calc-summary-table tbody tr:last-child td,
.leistung-calc-summary-table tbody tr:last-child th {
  font-weight: 700;
}

.leistung-calc-summary-emphasis {
  background: #f3f7fa;
  color: #123f5f;
  font-weight: 700;
}

.leistung-calc-db-compact {
  display: flex;
  justify-content: flex-end;
  gap: 22px;
  padding: 5px 8px;
  border-top: 1px solid #dfe7ed;
  background: #fafbfd;
  font-size: 11px;
}

.leistung-calc-db-compact > div {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  white-space: nowrap;
}

.leistung-calc-db-compact span {
  color: #6d7d88;
}

.leistung-calc-db-compact strong {
  color: #173f5b;
  font-size: 12px;
}

@media (max-width: 760px) {
  .leistung-calc-db-compact {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 5px 18px;
  }
}

.leistung-calc-material-master-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.leistung-calc-material-master-values .address-edit-control[readonly] {
  background: #f4f7f9;
  color: #425968;
  cursor: default;
}

.leistung-calc-material-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-top: 3px;
}

.leistung-calc-material-link {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2f668d;
  font: inherit;
  font-size: 11px;
  line-height: 1.3;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.leistung-calc-material-link:hover {
  color: #173f5d;
}

@media (max-width: 640px) {
  .leistung-calc-material-master-values {
    grid-template-columns: 1fr;
  }
}

/* Leistung: fixierter Verkaufspreis */
.leistung-vk-fix-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--address-border, #d7dee5);
  border-radius: 6px;
  background: #f8fafc;
  cursor: pointer;
}

.leistung-vk-fix-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.leistung-vk-fix-field .address-edit-switch {
  flex: 0 0 38px;
}

.leistung-vk-fix-field strong {
  font-size: 13px;
  font-weight: 600;
  color: #243746;
}

.leistung-vk-fix-field small {
  font-size: 11px;
  line-height: 1.25;
  color: #6b7b88;
}

/* Leistung: kalkulatorischen VK und tatsächlichen Verkaufspreis klar trennen */
.leistung-price-final strong {
  color: #063f6c;
  font-weight: 800;
}

.leistung-calc-summary-table .leistung-calc-summary-final-row th,
.leistung-calc-summary-table .leistung-calc-summary-final-row td {
  font-weight: 800;
  border-top: 1px solid #d8e2e9;
}

.leistung-calc-summary-table .leistung-calc-summary-final-row td:last-child {
  color: #063f6c;
}


/* Materialauswahl in der Leistungskalkulation: eindeutige Artikelbeschreibung */
.leistung-calc-material-result {
  gap: 2px;
  padding: 8px 10px;
}

.leistung-calc-material-result-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.leistung-calc-material-result-head strong {
  min-width: 0;
  overflow: hidden;
  color: #173f5c;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leistung-calc-material-result-head span {
  flex: 0 0 auto;
  color: #6f7f8a;
  font-size: 11px;
  font-weight: 600;
}

.leistung-calc-material-short2 {
  color: #304f65;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.leistung-calc-material-longtext {
  display: -webkit-box;
  overflow: hidden;
  color: #788893;
  font-size: 11px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.leistung-calc-material-result-meta {
  margin-top: 2px;
  color: #73838e;
  font-size: 11px;
  line-height: 1.3;
}

.leistung-calc-material-selected-detailed {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #274357;
}

.leistung-calc-material-load-status {
  padding: 7px 10px;
  border-top: 1px solid #edf1f4;
  color: #75848f;
  background: #f8fafb;
  font-size: 11px;
  text-align: center;
}

/* Leistungskalkulation: Materialsuche mit Lieferantenfilter */
.leistung-calc-material-searchbar {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(280px, 1.6fr);
  gap: 10px;
  align-items: end;
}

.leistung-calc-material-supplier-filter,
.leistung-calc-material-search-field {
  min-width: 0;
}

@media (max-width: 760px) {
  .leistung-calc-material-searchbar {
    grid-template-columns: 1fr;
  }
}

/* Leistungskalkulation: kompakte Materialmenge mit eindeutiger Verbrauchseinheit */
.leistung-calc-material-quantity-field {
  max-width: 430px;
}

.leistung-calc-material-quantity-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.leistung-calc-material-quantity-row .address-edit-control {
  flex: 0 0 105px;
  width: 105px;
  min-width: 0;
}

.leistung-calc-material-quantity-unit {
  min-width: 0;
  color: #526a79;
  font-size: 12px;
  line-height: 1.3;
}

.leistung-calc-material-price-meta {
  margin-top: 4px;
  color: #244d68;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

@media (max-width: 520px) {
  .leistung-calc-material-quantity-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

/* Einstellungen: zentrale Einheiten */
.settings-units-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-units-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.settings-unit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 10px;
  border: 1px solid var(--border-color, #dfe4e8);
  border-radius: 7px;
  background: #fff;
}

.settings-unit-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-unit-info strong {
  font-size: 13px;
  font-weight: 600;
}

.settings-unit-info span {
  font-size: 11px;
  color: #6f7881;
}

.settings-unit-field {
  width: 150px;
  flex: 0 0 150px;
  margin: 0;
}

.settings-unit-field > span {
  font-size: 10px;
}

.settings-unit-input {
  height: 30px;
}

.settings-units-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

@media (max-width: 720px) {
  .settings-unit-row {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .settings-unit-field {
    width: 100%;
    flex-basis: auto;
  }
}

/* Leistungskalkulation: kompakter Assistent zur Umrechnung von Materialverbräuchen */
.leistung-calc-material-quantity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.leistung-calc-material-quantity-head > span {
  color: #506575;
  font-size: 12px;
  font-weight: 600;
}

.leistung-calc-material-convert-open {
  padding: 0;
  border: 0;
  color: #063f6c;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.leistung-calc-material-convert-open:hover {
  text-decoration: underline;
}

.leistung-calc-material-conversion {
  margin-top: 2px;
  padding: 12px;
  border: 1px solid #d6e1e8;
  border-radius: 8px;
  background: #f8fafb;
}

.leistung-calc-material-conversion-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.leistung-calc-material-conversion-head > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.leistung-calc-material-conversion-head strong {
  color: #173f5c;
  font-size: 13px;
}

.leistung-calc-material-conversion-head span {
  color: #71818c;
  font-size: 11px;
  line-height: 1.35;
}

.leistung-calc-material-convert-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  color: #627582;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.leistung-calc-material-conversion-modes {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.leistung-calc-material-conversion-mode {
  padding: 6px 10px;
  border: 1px solid #d4dfe6;
  border-radius: 6px;
  color: #506575;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.leistung-calc-material-conversion-mode.is-active {
  border-color: #9db6c8;
  color: #063f6c;
  background: #edf4f8;
}

.leistung-calc-material-conversion-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.leistung-calc-material-conversion-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.leistung-calc-material-conversion-input-row input.address-edit-control {
  flex: 0 0 115px;
  width: 115px;
}

.leistung-calc-material-conversion-input-row select.address-edit-control {
  min-width: 150px;
}

.leistung-calc-material-conversion-unit {
  color: #526a79;
  font-size: 12px;
  line-height: 1.3;
}

.leistung-calc-material-conversion-result {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 6px;
  color: #244d68;
  background: #eef4f7;
  font-size: 12px;
  font-weight: 700;
}

.leistung-calc-material-conversion-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

@media (max-width: 680px) {
  .leistung-calc-material-conversion-panel {
    grid-template-columns: 1fr;
  }

  .leistung-calc-material-conversion-input-row {
    align-items: stretch;
    flex-direction: column;
  }

  .leistung-calc-material-conversion-input-row input.address-edit-control,
  .leistung-calc-material-conversion-input-row select.address-edit-control {
    width: 100%;
    min-width: 0;
  }

  .leistung-calc-material-quantity-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

/* Lizenz & Abo */
.settings-license-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-license-page .settings-detail-section {
  min-width: 0;
}

.settings-license-page .settings-detail-intro {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}


.license-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px;
  border: 1px solid #d7e0e7;
  border-radius: 10px;
  background: #fff;
}

.license-status-card.trial {
  border-left: 4px solid #f28c18;
}

.license-status-card.active {
  border-left: 4px solid #2e7d32;
}

.license-status-card.restricted,
.license-status-card.readonly {
  border-left: 4px solid #b76e00;
}

.license-status-card > div:first-child {
  min-width: 0;
}

.license-status-kicker {
  display: block;
  margin-bottom: 4px;
  color: #647482;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.license-status-card strong {
  color: #063f6c;
  font-size: 1.2rem;
}

.license-status-card p {
  margin: 6px 0 0;
  color: #4d5e6b;
  line-height: 1.45;
}

.license-status-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: 0 0 auto;
}

.license-status-meta span {
  color: #71808b;
  font-size: 0.78rem;
}

.license-status-meta strong {
  font-size: 0.95rem;
}

.license-main-tenant-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #cbdbe7;
  border-radius: 8px;
  background: #f5f9fc;
  color: #28485f;
}

.license-main-tenant-note > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.license-billing-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 320px));
  gap: 14px;
  margin: 14px 0 18px;
}

.license-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  min-width: 0;
}

.license-plan-grid > * {
  min-width: 0;
}

.license-plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 230px;
  padding: 18px;
  border: 1px solid #d5dfe6;
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.license-plan-card:hover,
.license-plan-card.selected {
  border-color: #063f6c;
  box-shadow: 0 0 0 2px rgba(6, 63, 108, 0.08);
}

.license-plan-card input[type="radio"] {
  position: absolute;
  top: 14px;
  right: 14px;
  accent-color: #f28c18;
}

.license-plan-head {
  display: block;
  min-width: 0;
}

.license-plan-head strong {
  display: block;
  min-width: 0;
  padding-right: 30px;
  color: #063f6c;
  font-size: 1.45rem;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
}

.license-plan-description {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  color: #26323d;
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.45;
  white-space: pre-line;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.license-plan-features {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 7px;
  padding-top: 11px;
  border-top: 1px solid #e5eaee;
}

.license-plan-features-title {
  color: #526675;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.license-plan-features ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.license-plan-features li {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding-left: 20px;
  box-sizing: border-box;
  color: #354b59;
  font-size: 0.88rem;
  line-height: 1.35;
  white-space: pre-line;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.license-plan-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #063f6c;
  font-weight: 900;
}

.license-plan-price {
  display: block;
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px solid #e5eaee;
  color: #233b4a;
  font-weight: 800;
}

.license-price-summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 7px;
  background: #f5f7f9;
}

.license-price-summary span {
  color: #6d7b85;
}

.license-addon-list,
.license-tenant-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.license-addon-row,
.license-tenant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid #e5eaee;
}

.license-addon-row:last-child,
.license-tenant-row:last-child {
  border-bottom: 0;
}

.license-addon-info,
.license-tenant-row > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.license-addon-info {
  flex: 1 1 0;
}

.license-addon-info span,
.license-addon-info small {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.license-addon-info span,
.license-tenant-row > div span {
  color: #62727e;
}

.license-addon-info small {
  color: #7b8992;
}

.license-addon-action {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.license-addon-quantity {
  width: 82px !important;
  min-width: 82px;
  text-align: right;
}

.license-tenant-status {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef3f6;
  color: #51636f;
  font-size: 0.78rem;
  font-weight: 700;
}

.license-tenant-status.active {
  background: #e9f5eb;
  color: #2e6c35;
}

.license-tenant-status.readonly {
  background: #fff3df;
  color: #8b5b0a;
}

.license-inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.license-inline-form .address-edit-control {
  min-width: 0;
  flex: 1 1 auto;
}

.license-discount-active {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 7px;
  background: #f5f9fc;
}

.license-discount-active strong {
  color: #063f6c;
}

.license-discount-active span {
  color: #5e6f7b;
}

@media (max-width: 980px) {
  .license-plan-grid {
    grid-template-columns: 1fr;
  }

  .license-billing-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .license-status-card,
  .license-addon-row,
  .license-tenant-row,
  .license-price-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .license-status-meta {
    align-items: flex-start;
  }

  .license-addon-action,
  .license-inline-form {
    align-items: stretch;
    flex-direction: column;
  }

  .license-addon-quantity {
    width: 100% !important;
  }
}

.license-tenant-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.license-tenant-current {
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef3f6;
  color: #4f626f;
  font-size: 0.78rem;
  font-weight: 700;
}

@media (max-width: 680px) {
  .license-tenant-actions {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

/* Lizenzseite: Bestellung bei fehlendem Abo deutlich hervorheben */
.license-order-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px;
  border: 1px solid rgba(242, 140, 24, 0.46);
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(242, 140, 24, 0.08), #fff);
  box-shadow: 0 8px 24px rgba(6, 63, 108, 0.08);
}

.license-order-cta.is-trial {
  border-color: rgba(242, 140, 24, 0.58);
  background: linear-gradient(120deg, #063f6c, #185b8b);
  box-shadow: inset 0 3px 0 rgba(242, 140, 24, 0.72), 0 8px 24px rgba(15, 23, 42, 0.08);
}

.license-order-cta-copy {
  min-width: 0;
}

.license-order-cta-kicker {
  display: block;
  margin-bottom: 4px;
  color: #063f6c;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.license-order-cta.is-trial .license-order-cta-kicker {
  color: #ffffff;
}

.license-order-cta-copy > strong {
  display: block;
  color: #063f6c;
  font-size: 1.28rem;
  line-height: 1.25;
}

.license-order-cta.is-trial .license-order-cta-copy > strong,
.license-order-cta.is-trial .license-order-cta-copy p,
.license-order-cta.is-trial .license-order-cta-copy a {
  color: #ffffff;
}

.license-order-cta-copy p {
  margin: 7px 0 0;
  color: #536875;
  line-height: 1.5;
}

.license-order-cta-copy a {
  color: #063f6c;
  font-weight: 800;
  text-decoration: none;
}

.license-order-cta-copy a:hover {
  text-decoration: underline;
}

.license-order-cta-button,
.license-primary-order-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 9px;
  background: #f28c18 !important;
  color: #063f6c !important;
  font-weight: 850 !important;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(242, 140, 24, 0.24);
}

.license-order-cta-button:hover,
.license-primary-order-button:hover {
  background: #f5a13f !important;
}

.license-order-cta-button {
  flex: 0 0 auto;
  font-size: 1rem;
}

.license-order-cta-button .material-icons {
  font-size: 19px;
}

#licensePlanSection {
  scroll-margin-top: 18px;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

#licensePlanSection.license-plan-section-highlight {
  border-color: rgba(242, 140, 24, 0.75);
  box-shadow: 0 0 0 4px rgba(242, 140, 24, 0.13);
}

@media (max-width: 680px) {
  .license-order-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .license-order-cta-button {
    width: 100%;
  }
}

/* Lizenzbestellung: klare Zusammenfassung, Rechnungsadresse und SEPA-Prüfung */
.license-order-overlay {
  z-index: 12050;
  padding: 24px;
}

.license-order-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: min(900px, calc(100vh - 48px));
}

.license-order-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.license-order-section {
  padding: 18px;
  border: 1px solid #dce4e9;
  border-radius: 10px;
  background: #fff;
}

.license-order-selection {
  background: #f7fafc;
}

.license-order-section-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.license-order-section-title > .material-icons {
  color: #063f6c;
  font-size: 24px;
}

.license-order-section-title > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.license-order-section-title strong {
  color: #213844;
  font-size: 1rem;
}

.license-order-section-title span:not(.material-icons) {
  color: #6a7983;
  font-size: 0.88rem;
  line-height: 1.4;
}

.license-order-selection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.license-order-selection-grid > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid #e0e7eb;
  border-radius: 8px;
  background: #fff;
}

.license-order-selection-grid span {
  color: #71808a;
  font-size: 0.78rem;
}

.license-order-selection-grid strong {
  color: #17384d;
}

.license-order-trial-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #edf7ef;
  color: #315f39;
  line-height: 1.4;
}

.license-order-trial-note .material-icons {
  flex: 0 0 auto;
  font-size: 20px;
}

.license-order-price-box {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #dce5ea;
  border-radius: 8px;
  background: #fff;
}

.license-order-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 5px 0;
}

.license-order-price-row span {
  color: #60717c;
}

.license-order-price-row strong {
  color: #233b4a;
  text-align: right;
}

.license-order-price-row.is-discount strong {
  color: #2e6c35;
}

.license-order-price-row.is-total {
  margin-top: 5px;
  padding-top: 10px;
  border-top: 1px solid #e1e7eb;
}

.license-order-price-row.is-total span,
.license-order-price-row.is-total strong {
  color: #063f6c;
  font-size: 1.02rem;
  font-weight: 800;
}

.license-order-price-box > small {
  display: block;
  margin-top: 8px;
  color: #7a8891;
}

.license-order-address-grid,
.license-order-payment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 16px;
}

.license-order-full {
  grid-column: 1 / -1;
}

.license-order-iban {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  letter-spacing: 0.03em;
}

.license-order-iban.is-valid {
  border-color: #5e9a67 !important;
  box-shadow: 0 0 0 2px rgba(73, 132, 82, 0.08);
}

.license-order-iban.is-invalid {
  border-color: #b85656 !important;
  box-shadow: 0 0 0 2px rgba(184, 86, 86, 0.08);
}

.license-order-field-hint {
  min-height: 17px;
  margin-top: 4px;
  color: #75838c;
  font-size: 0.78rem;
}

.license-order-field-hint.is-valid {
  color: #3d7b47;
}

.license-order-field-hint.is-invalid {
  color: #a33f3f;
}

.license-order-mandate {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 13px;
  border-radius: 8px;
  background: #f6f8f9;
  color: #465b68;
  line-height: 1.45;
  cursor: pointer;
}

.license-order-mandate input {
  flex: 0 0 auto;
  margin-top: 3px;
}

.license-order-footer {
  justify-content: flex-end;
}

.license-order-confirm {
  min-width: 190px;
}

.license-order-confirm:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

@media (max-width: 720px) {
  .license-order-overlay {
    padding: 8px;
  }

  .license-order-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .license-order-selection-grid,
  .license-order-address-grid,
  .license-order-payment-grid {
    grid-template-columns: 1fr;
  }

  .license-order-full {
    grid-column: auto;
  }

  .license-order-price-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .license-order-price-row strong {
    text-align: left;
  }
}

/* Lizenz: gekündigtes Abo vor Änderungen eindeutig entsperren */
.license-status-card.cancelled {
  border-left: 4px solid #b76e00;
  background: #fffaf2;
}

.license-cancelled-management {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border-color: #e3c48f;
  background: #fffaf2;
}

.license-cancelled-management-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #f3e2c5;
  color: #8a5400;
}

.license-cancelled-management-icon .material-icons {
  font-size: 25px;
}

.license-cancelled-management-copy {
  min-width: 0;
}

.license-cancelled-management-copy strong {
  display: block;
  color: #063f6c;
  font-size: 1.05rem;
}

.license-cancelled-management-copy p {
  margin: 7px 0 0;
  color: #4d5e6b;
  line-height: 1.5;
}

.license-reactivate-button {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .license-cancelled-management {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .license-reactivate-button {
    grid-column: 1 / -1;
    justify-self: start;
    white-space: normal;
  }
}

/* Lizenz: Kündigung erst nach klarer Laufzeit-Zusammenfassung bestätigen */
.license-cancel-overlay {
  z-index: 12060;
  padding: 24px;
}

.license-cancel-dialog {
  width: min(620px, calc(100vw - 32px));
}

.license-cancel-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.license-cancel-warning {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid #e3c48f;
  border-radius: 10px;
  background: #fffaf2;
}

.license-cancel-warning > .material-icons {
  flex: 0 0 auto;
  color: #9a5d00;
  font-size: 30px;
}

.license-cancel-warning > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.license-cancel-warning span:not(.material-icons) {
  color: #6b7780;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.license-cancel-warning strong {
  color: #063f6c;
  font-size: 1.2rem;
}

.license-cancel-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #3f525e;
  line-height: 1.55;
}

.license-cancel-copy p {
  margin: 0;
}

.license-cancel-footer {
  justify-content: flex-end;
}

.license-cancelled-management-copy p br {
  display: block;
  content: "";
  margin-top: 6px;
}

@media (max-width: 560px) {
  .license-cancel-overlay {
    padding: 12px;
  }

  .license-cancel-footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .license-cancel-footer .address-edit-button {
    width: 100%;
  }
}

/* Lizenz: separate Pflege von Rechnungsanschrift und Bankverbindung */
.license-billing-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.license-billing-details-grid > div {
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid #e0e7eb;
  border-radius: 8px;
  background: #f8fafb;
}

.license-billing-details-grid span {
  display: block;
  margin-bottom: 5px;
  color: #71808a;
  font-size: 0.78rem;
  font-weight: 700;
}

.license-billing-details-grid strong {
  color: #263f4d;
  font-size: 0.94rem;
  font-weight: 650;
  line-height: 1.5;
}

.license-order-discount-form {
  margin-top: 0;
}

.license-order-discount-section .license-order-field-hint {
  display: block;
  margin-top: 8px;
}

.license-billing-dialog {
  width: min(860px, calc(100vw - 32px));
}

.firma-billing-sync-overlay {
  z-index: 12100;
}

.firma-billing-sync-dialog {
  width: min(600px, calc(100vw - 32px));
}

.firma-billing-sync-copy,
.firma-billing-sync-note {
  color: #4e606c;
  line-height: 1.5;
}

.firma-billing-sync-address {
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid #dce5ea;
  border-radius: 8px;
  background: #f7fafc;
  color: #17384d;
  font-weight: 650;
  line-height: 1.55;
}

.firma-billing-sync-note {
  font-size: 0.88rem;
}

@media (max-width: 680px) {
  .license-billing-details-grid {
    grid-template-columns: 1fr;
  }
}

/* Projekte: Umkreissuche nach Baustellen */
.project-near-controls {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.project-near-button {
  height: 30px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #b8c7dc;
  border-radius: 2px;
  background: #ffffff;
  color: var(--color-primary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: none;
}

.project-near-button svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: currentColor;
}

.project-near-button:hover:not(:disabled) {
  background: #f3f7fb;
  border-color: var(--color-primary);
}

.project-near-button.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #ffffff;
}

.project-near-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.project-near-radius {
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 5px 0 8px;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  background: #fafafa;
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
  box-sizing: border-box;
}

.project-near-radius select {
  height: 24px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.project-near-radius select:disabled {
  cursor: wait;
}

@media (max-width: 980px) {
  #projekte-page-root .address-search-row {
    flex-wrap: wrap;
  }

  #projekte-page-root .address-searchbar-inner {
    flex-basis: calc(100% - 44px);
  }

  #projekte-page-root .project-near-controls {
    order: 3;
  }
}

@media (max-width: 760px) {
  .project-near-button {
    width: 32px;
    min-width: 32px;
    padding: 0;
  }

  .project-near-button span {
    display: none;
  }

  .project-near-radius {
    padding-left: 6px;
  }

  .project-near-radius > span {
    display: none;
  }
}

/* Einheitliches Grundlayout aller Stammdaten- und Projektdetailseiten. */
.address-single-page { padding:18px 24px 40px; overflow:auto; background:#f5f7fb; }
.address-single-card { width:100%; max-width:1180px; min-height:calc(100% - 2px); height:auto; margin:0 auto; padding:0; border:0; border-radius:0; background:transparent; overflow:visible; }
.address-single-header { min-height:66px; margin:0 0 14px; padding:14px 18px; border:1px solid #dce5ec; border-radius:6px; background:#fff; box-sizing:border-box; }
.address-single-title { color:#1f2933; font-size:21px; }
.address-single-subtitle { color:#64748b; font-size:13px; }
.address-single-back,.address-single-edit,.address-section-action { min-height:34px; height:34px; border:1px solid #cfd9e2; border-radius:5px; padding:0 13px; font-size:13px; font-weight:600; }
.address-single-back,.address-section-action { background:#fff; color:#063f6c; }
.address-single-back:hover,.address-section-action:hover { border-color:#9fb5cb; background:#eef3f8; }
.address-single-edit { border-color:#063f6c; background:#063f6c; color:#fff; }
.address-single-content { padding:0; overflow:visible; }
.address-single-grid { gap:14px; }
.address-single-section { --detail-card-padding-block:18px; --detail-card-padding-inline:20px; padding:var(--detail-card-padding-block) var(--detail-card-padding-inline); border:1px solid #dce5ec; border-radius:6px; background:#fff; }
.address-single-section-wide { margin-top:14px; }
.address-single-section-title { margin-bottom:10px; color:#26323d; font-size:16px; }
.address-single-section-head { min-height:34px; margin-bottom:10px; padding-bottom:10px; border-bottom:1px solid #e6edf2; }
.address-single-field { padding:8px 0; border-color:#edf1f4; }
.address-single-field span { color:#64748b; font-size:13px; }
.address-single-field strong,.address-single-note { color:#26323d; font-size:14px; }
.address-single-table th { background:#f5f7fb; color:#52616d; }
@media(max-width:900px){.address-single-page{padding:12px}.address-single-header{grid-template-columns:auto 1fr auto}}
@media(max-width:640px){.address-single-header{grid-template-columns:1fr}}

/* Seitenweit einheitliche Container und Detailkoepfe. */
.address-single-page { padding:20px 24px 40px; }
.address-single-card,.leistung-single-card,.leistung-detail-card,.material-detail-card,.project-single-card { width:100%; max-width:none; margin:0; }
.address-single-header { min-height:66px; border-radius:8px; box-shadow:0 1px 2px rgba(15,23,42,.035); }
.address-single-section { border-radius:8px; box-shadow:0 1px 2px rgba(15,23,42,.035); }
.address-single-back { position:relative; padding-left:30px; }
.address-single-back::before { content:'\2039'; position:absolute; left:12px; top:50%; transform:translateY(-52%); font-size:20px; font-weight:400; line-height:1; }
.address-page { padding:20px 24px 24px; gap:12px; }
.address-searchbar { padding:12px 14px; border:1px solid #dce5ec; border-radius:8px; box-shadow:0 1px 2px rgba(15,23,42,.035); }
.address-results { padding:8px 0 10px; }

@media(max-width:900px){.address-single-page,.address-page{padding:12px}.address-single-header{min-height:58px;padding:11px 13px}.address-single-grid{grid-template-columns:1fr}.address-single-section-wide{margin-top:12px}}
@media(max-width:640px){.address-single-header{grid-template-columns:auto minmax(0,1fr);}.address-single-header>.address-single-edit,.address-single-header>.leistung-single-header-actions{grid-column:1/-1;justify-self:stretch}.address-single-header>.address-single-edit{width:100%}}
@media(max-width:1400px){.address-single-header,.address-searchbar{padding-left:58px}}

/* Filter und Tags in der Adressverwaltung */
.address-filter-row {
  flex: 1 0 100%;
  order: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.address-filter-select,
.address-filter-button {
  height: 28px;
  min-height: 28px;
  border: 1px solid #d5dee8;
  border-radius: 2px;
  background: #ffffff;
  color: #334155;
  font-family: inherit;
  font-size: 12px;
  line-height: 1;
  box-sizing: border-box;
}

.address-filter-select {
  min-width: 170px;
  max-width: 260px;
  padding: 0 26px 0 8px;
}

.address-filter-button {
  padding: 0 10px;
  cursor: pointer;
  white-space: nowrap;
}

.address-filter-button:hover,
.address-filter-select:hover {
  border-color: #9fb0c5;
}

.address-filter-button-export {
  margin-left: auto;
  border-color: var(--color-primary);
  color: var(--color-primary);
  font-weight: 600;
}

.address-filter-check {
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid #d5dee8;
  border-radius: 2px;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
}

.address-filter-check input {
  margin: 0;
}

.address-result-info {
  order: 3;
}

.address-row-tags,
.address-tag-list {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.address-row-tags {
  margin-top: 5px;
}

.address-tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1px 6px;
  border-radius: 10px;
  background: #e9f1fb;
  color: #315a82;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

.address-tag-chip-more {
  background: #eef2f6;
  color: #64748b;
}

.address-tag-list .address-tag-chip {
  font-size: 11px;
  min-height: 20px;
}

.address-edit-field small.address-edit-hint {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 400;
}

@media (max-width: 760px) {
  .address-filter-button-export {
    margin-left: 0;
  }

  .address-filter-row > * {
    flex: 1 1 auto;
  }

  .address-filter-select {
    max-width: none;
  }
}

/* AdresseSingle: zwei gemeinsame Hauptkacheln */
.address-single-overview-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.72fr);
  gap: 14px;
  align-items: stretch;
}

.address-single-overview-left,
.address-single-overview-right {
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
}

.address-single-left-card,
.address-single-contact-card {
  display: flex;
  flex-direction: column;
}

.address-single-address-section {
  padding-bottom: 2px;
}

.address-single-address-block {
  padding: 2px 0 0;
  color: #26323d;
  font-size: 15px;
  line-height: 1.45;
}

.address-single-address-line {
  min-height: 21px;
}

.address-single-address-line strong {
  display: block;
  color: #26323d;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  word-break: break-word;
}

.address-single-inner-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e6edf2;
}

.address-single-master-section .address-single-field {
  grid-template-columns: minmax(145px, 42%) minmax(0, 1fr);
  gap: 14px;
  padding: 6px 0;
  align-items: start;
}

.address-single-master-section .address-single-field > span {
  min-width: 0;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.address-single-master-section .address-single-field > strong {
  min-width: 0;
  line-height: 1.35;
}

.address-single-contact-section {
  min-width: 0;
}

.address-single-contact-section .address-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

@media (max-width: 1050px) {
  .address-single-overview-grid {
    grid-template-columns: 1fr;
  }
}


/* AdresseSingle: Bemerkungen und Projekte nebeneinander */
.address-single-bottom-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.72fr);
  gap: 14px;
  align-items: stretch;
  margin-top: 14px;
}

.address-single-bottom-card {
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
}

@media (max-width: 1050px) {
  .address-single-bottom-grid {
    grid-template-columns: 1fr;
  }
}


/* AdresseSingle: Tabellenzeilen direkt bedienbar */
#ansprechpartnerRows tr:has([data-address-action="edit-ansprechpartner"]),
#editAnsprechpartnerRows tr:has([data-address-action="edit-ansprechpartner"]),
#kommunikationRows tr:has([data-address-action="edit-kommunikation"]),
#editKommunikationRows tr:has([data-address-action="edit-kommunikation"]),
#adresseProjektRows tr:has([data-address-action="open-projekt"]) {
  cursor: pointer;
}

.address-communication-link {
  cursor: pointer;
}

/* AdresseSingle: PLZ und Ort im Anschriftenblock hervorheben */
#fldPlzOrt {
  font-weight: 700;
}

/* GAEB-Import Leistungskatalog */
.leistungen-gaeb-button {
  background: #ffffff;
  color: var(--color-primary);
}

.leistungen-gaeb-button:hover {
  background: #f3f7fb;
  filter: none;
}

.leistungen-gaeb-button .material-icons {
  font-size: 17px;
  line-height: 1;
}

.leistungen-gaeb-targets {
  display: grid;
  gap: 8px;
}

.leistungen-gaeb-mode {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid #d9e5ef;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
}

.leistungen-gaeb-mode > input {
  margin: 2px 0 0;
  accent-color: var(--color-primary);
}

.leistungen-gaeb-mode > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.leistungen-gaeb-mode strong {
  color: #172b3a;
  font-size: 12px;
}

.leistungen-gaeb-mode small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}

.leistungen-gaeb-mode-fields {
  display: grid;
  gap: 10px;
  padding: 4px 10px 8px 31px;
}

/* GAEB-Import Leistungskatalog: Mehrfachauswahl / Drag & Drop */
.leistungen-gaeb-dropzone {
  display: flex;
  min-height: 118px;
  padding: 20px;
  border: 2px dashed #b9c7d1;
  border-radius: 8px;
  background: #f8fafb;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.leistungen-gaeb-dropzone:hover,
.leistungen-gaeb-dropzone:focus-visible,
.leistungen-gaeb-dropzone.is-dragover {
  border-color: #063f6c;
  background: #eef5f9;
  outline: none;
}

.leistungen-gaeb-dropzone > .material-icons {
  margin-bottom: 5px;
  color: #55758f;
  font-size: 27px;
}

.leistungen-gaeb-drop-title {
  color: #063f6c;
  font-size: 15px;
  font-weight: 700;
}

.leistungen-gaeb-drop-sub {
  margin-top: 5px;
  color: #667a8b;
  font-size: 11px;
  line-height: 1.4;
}

.leistungen-gaeb-file-list {
  display: grid;
  gap: 5px;
  max-height: 136px;
  overflow: auto;
  padding: 2px 0;
}

.leistungen-gaeb-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 12px;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #e2eaf0;
  border-radius: 5px;
  background: #fff;
}

.leistungen-gaeb-file-name {
  min-width: 0;
  overflow: hidden;
  color: #233d52;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leistungen-gaeb-file-size,
.leistungen-gaeb-file-empty {
  color: #718294;
  font-size: 11px;
}

.leistungen-gaeb-file-empty {
  padding: 4px 1px;
}


/* xcraft IQ – neue Leistung */
.leistung-ai-create {
  margin: 14px 18px 0;
  padding: 14px 15px;
  border: 1px solid #cbddea;
  border-radius: 9px;
  background: linear-gradient(135deg, #f7fbfe 0%, #eef6fb 100%);
}

.leistung-ai-head,
.leistung-ai-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.leistung-ai-head {
  justify-content: space-between;
  margin-bottom: 10px;
}

.leistung-ai-title {
  color: #063f6c;
  font-size: 14px;
  font-weight: 800;
}

.leistung-ai-title > span {
  margin-right: 5px;
}

.leistung-ai-subtitle,
.leistung-ai-help {
  color: #64788a;
  font-size: 11px;
  line-height: 1.35;
}

.leistung-ai-badge {
  padding: 3px 7px;
  border: 1px solid #bfd5e4;
  border-radius: 999px;
  background: #fff;
  color: #37627f;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.leistung-ai-prompt {
  display: grid;
  gap: 5px;
}

.leistung-ai-prompt > span {
  color: #29485d;
  font-size: 11px;
  font-weight: 700;
}

.leistung-ai-prompt textarea {
  width: 100%;
  min-height: 68px;
  box-sizing: border-box;
  resize: vertical;
  padding: 9px 10px;
  border: 1px solid #bdcfdb;
  border-radius: 6px;
  background: #fff;
  color: #182f40;
  font: inherit;
  line-height: 1.4;
}

.leistung-ai-prompt textarea:focus {
  border-color: #5684a3;
  outline: 2px solid rgba(6, 63, 108, .08);
}

.leistung-ai-actions {
  flex-wrap: wrap;
  margin-top: 10px;
}

.leistung-ai-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #9eb9cb;
  border-radius: 6px;
  background: #fff;
  color: #063f6c;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.leistung-ai-button-primary {
  border-color: #063f6c;
  background: #063f6c;
  color: #fff;
}

.leistung-ai-button:disabled {
  cursor: wait;
  opacity: .65;
}

.leistung-ai-help {
  margin-left: auto;
  max-width: 390px;
}

.leistung-ai-status {
  margin-top: 9px;
  padding: 8px 10px;
  border-left: 3px solid #5e91b0;
  border-radius: 4px;
  background: rgba(255,255,255,.78);
  color: #29485d;
  font-size: 11px;
  line-height: 1.4;
}

.leistung-ai-status.is-error {
  border-left-color: #b33a3a;
  color: #8d2d2d;
}

.leistung-ai-calc-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 11px;
  border-bottom: 1px solid #e6edf2;
  background: #fff;
}

.leistung-ai-calc-row.is-unresolved {
  background: #fff9f5;
}

.leistung-ai-calc-badge {
  min-width: 56px;
  padding: 3px 6px;
  border-radius: 999px;
  background: #e8f1f7;
  color: #315c77;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.leistung-ai-calc-row.is-unresolved .leistung-ai-calc-badge {
  background: #fae9df;
  color: #9a5031;
}

.leistung-ai-calc-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.leistung-ai-calc-body > strong {
  color: #20394b;
  font-size: 12px;
}

.leistung-ai-calc-body > span,
.leistung-ai-calc-body > small {
  color: #687c8d;
  font-size: 11px;
  line-height: 1.35;
}

.leistung-ai-calc-body > small.is-ready {
  color: #2e7250;
}

.leistung-ai-calc-body > small.is-warning {
  color: #9a5a2e;
}

@media (max-width: 800px) {
  .leistung-ai-create {
    margin: 10px 10px 0;
  }

  .leistung-ai-help {
    width: 100%;
    max-width: none;
    margin-left: 0;
  }
}

/* LeistungSingle: KI bewusst als optionale, kompakte Aktion */
.leistung-richtext-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.leistung-richtext-heading > span {
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

.leistung-ai-inline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 27px;
  padding: 3px 9px;
  border: 1px solid #b8cbd8;
  border-radius: 5px;
  background: #fff;
  color: #315c77;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.leistung-ai-inline-button:hover:not(:disabled) {
  border-color: #789db4;
  background: #f5f9fc;
  color: #063f6c;
}

.leistung-ai-inline-button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.leistung-ai-text-overlay {
  z-index: 100001;
}

.leistung-ai-text-dialog {
  width: min(580px, calc(100vw - 40px));
}

.leistung-ai-dialog-hint {
  display: block;
  margin-top: 7px;
  color: #64788a;
  font-size: 11px;
  line-height: 1.4;
}

.leistung-ai-questions-inline,
.leistung-ai-status-inline {
  margin: 8px 0 10px;
}

.leistung-ai-questions {
  gap: 8px;
}

.leistung-ai-questions-title {
  color: #29485d;
  font-size: 11px;
  font-weight: 800;
}

.leistung-ai-question {
  display: grid;
  grid-template-columns: minmax(170px, .9fr) minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 7px 9px;
  align-items: center;
  padding: 8px 9px;
  border: 1px solid #dce6ed;
  border-radius: 5px;
  background: #f8fbfd;
}

.leistung-ai-question > label {
  color: #29485d;
  font-size: 11px;
  font-weight: 700;
}

.leistung-ai-question > small {
  grid-column: 1 / -1;
  color: #6b7e8e;
  font-size: 10px;
  line-height: 1.35;
}

/* KI-Textrueckfragen bewusst vertikal: Frage, Auswahl und Erklaerung
   duerfen sich auch bei langen Bezeichnungen nicht gegenseitig ueberlagern. */
#leistungAiTextQuestions .leistung-ai-question {
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-items: stretch;
  padding: 10px 11px;
}

#leistungAiTextQuestions .leistung-ai-question > label {
  display: block;
  min-width: 0;
  line-height: 1.35;
}

#leistungAiTextQuestions .leistung-ai-question-select {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

#leistungAiTextQuestions .leistung-ai-question > small {
  grid-column: auto;
  display: block;
  margin: 0;
  min-width: 0;
}

@media (max-width: 800px) {
  .leistung-ai-question {
    grid-template-columns: 1fr;
  }

  .leistung-ai-question > small {
    grid-column: auto;
  }
}

/* LeistungSingle: KI-Kalkulationsrueckfragen als klarer Dialog */
.leistung-ai-calc-overlay {
  z-index: 100001;
}

.leistung-ai-calc-dialog {
  width: min(640px, calc(100vw - 40px));
}

.leistung-ai-calc-questions {
  margin-top: 12px;
}

#leistungAiQuestions .leistung-ai-question {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 7px 9px;
  align-items: stretch;
  padding: 10px 11px;
}

#leistungAiQuestions .leistung-ai-question > label,
#leistungAiQuestions .leistung-ai-question > small {
  grid-column: 1 / -1;
  min-width: 0;
}

#leistungAiQuestions .leistung-ai-question > label {
  line-height: 1.35;
}

#leistungAiQuestions .leistung-ai-question-select,
#leistungAiQuestions .leistung-ai-question-custom {
  width: 100%;
  min-width: 0;
}

@media (max-width: 640px) {
  #leistungAiQuestions .leistung-ai-question {
    grid-template-columns: minmax(0, 1fr);
  }

  #leistungAiQuestions .leistung-ai-question > label,
  #leistungAiQuestions .leistung-ai-question > small {
    grid-column: auto;
  }
}

/* Frei editierbare Anrede mit mandantenbezogenen Vorschlagswerten */
.address-anrede-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  cursor: pointer;
  color: var(--color-primary) !important;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

.address-anrede-label:hover {
  text-decoration-style: solid;
}

.address-anrede-vorgaben-overlay {
  z-index: 100004;
}

.address-anrede-vorgaben-dialog {
  width: min(520px, calc(100vw - 40px));
}

.address-anrede-vorgaben-hint {
  margin-bottom: 12px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

.address-anrede-vorgaben-rows {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.address-anrede-vorgabe-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 7px;
  align-items: center;
}

.address-anrede-vorgabe-input {
  height: 30px !important;
  min-height: 30px !important;
}

.address-anrede-vorgabe-delete {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #d5dee8;
  border-radius: 3px;
  background: #ffffff;
  color: #64748b;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.address-anrede-vorgabe-delete:hover {
  border-color: #fecaca;
  background: #fff1f2;
  color: #be123c;
}

.address-anrede-vorgaben-add {
  margin-top: 10px;
}

/* AdresseSingle: klarere Aktionsbuttons und direkte Bearbeitung an Abschnittstiteln */
.address-single-edit,
.address-section-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.address-button-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.address-section-action.address-section-action-primary {
  border-color: #063f6c;
  background: #063f6c;
  color: #ffffff;
}

.address-section-action.address-section-action-primary:hover {
  border-color: #0b4f8a;
  background: #0b4f8a;
  color: #ffffff;
}

.address-single-section-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  margin-bottom: 10px;
}

.address-single-section-title-row .address-single-section-title {
  margin-bottom: 0;
}

.address-title-edit {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #52616d;
  cursor: pointer;
}

.address-title-edit:hover,
.address-title-edit:focus-visible {
  border-color: #cfd9e2;
  background: #eef3f8;
  color: #063f6c;
  outline: none;
}

.address-title-edit-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* AdresseSingle: Sicherheitsabfrage im bestehenden Overlay-Design */
.address-confirm-overlay {
  z-index: 100003;
}

.address-confirm-dialog {
  width: min(520px, calc(100vw - 40px));
}

.address-confirm-message {
  padding: 8px 0 4px;
  color: #26323d;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.address-confirm-hint {
  margin-top: 5px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.address-confirm-danger {
  border-color: #b42318;
  background: #b42318;
  color: #ffffff;
}

.address-confirm-danger:hover,
.address-confirm-danger:focus-visible {
  border-color: #912018;
  background: #912018;
  color: #ffffff;
  outline: none;
}

/* Switch-Beschriftungen: die ganze zugehörige Textfläche ist klickbar. */
.address-customer-toggle,
.beleg-summen-section-head,
.project-site-toggle,
.address-edit-status-cell,
.address-customer-toggle > span,
.beleg-summen-section-head > div,
.project-site-toggle-label,
.address-edit-status-label {
  cursor: pointer;
}

/* AdresseSingle: Hinzufuegen-Aktionen als auffaelliger runder Plus-Button */
.address-title-add {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border: 1px solid #063f6c;
  border-radius: 50%;
  background: #063f6c;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(6, 63, 108, .18);
}

.address-title-add:hover,
.address-title-add:focus-visible {
  border-color: #0b4f8a;
  background: #0b4f8a;
  color: #ffffff;
  box-shadow: 0 2px 5px rgba(6, 63, 108, .24);
}

.address-title-add .address-title-edit-icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.4;
}


/* AdresseSingle: Hinzufuegen-Aktionen als rechtsbuendiger Textlink */
.address-section-add-link {
  margin-left: auto;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: #063f6c;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
}

.address-section-add-link:hover,
.address-section-add-link:focus-visible {
  color: #0b4f8a;
  text-decoration: underline;
  outline: none;
}

/* AdresseSingle: konkreten Hinzufuegen-Link mit rundem Plus kombinieren */
.address-section-add-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.address-section-add-link::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 50%;
  background: #063f6c;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.address-section-add-link:hover::before,
.address-section-add-link:focus-visible::before {
  background: #0b4f8a;
}

/* Anrede: editierbares Combofeld als optisch einheitliches Eingabefeld */
.address-anrede-combo-control {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 28px;
  box-sizing: border-box;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  background: #fafafa;
}

.address-anrede-combo-control:focus-within {
  border-color: var(--color-primary);
  background: #ffffff;
}

.address-edit-field .address-anrede-combo-control > input.address-edit-control {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 26px !important;
  min-height: 26px !important;
  max-height: 26px !important;
  padding: 4px 8px !important;
  border: 0 !important;
  border-radius: 1px 0 0 1px !important;
  background: transparent;
}

.address-edit-field .address-anrede-combo-control > input.address-edit-control:focus {
  border: 0 !important;
  background: transparent;
}

.address-anrede-toggle {
  position: static;
  z-index: 2;
  flex: 0 0 29px;
  width: 29px;
  height: 26px !important;
  min-height: 26px !important;
  max-height: 26px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid #d7dee8;
  border-radius: 0 1px 1px 0;
  background: transparent;
  color: #52616d;
  cursor: pointer;
}

.address-anrede-toggle:hover,
.address-anrede-toggle:focus-visible {
  background: #eef5fb;
  color: var(--color-primary);
  outline: none;
}

.address-anrede-toggle svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.address-anrede-suggestions {
  position: absolute;
  z-index: 100035;
  left: 0;
  right: 0;
  top: calc(100% + 3px);
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid #cfd9e2;
  border-radius: 5px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .14);
}

.address-anrede-suggestion {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 6px 9px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #26323d;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.address-anrede-suggestion:hover,
.address-anrede-suggestion:focus {
  background: #eef5fb;
  color: #063f6c;
  outline: none;
}

/* Kleine historische Metadaten am unteren Rand von Stammdaten-Karten. */
.stammdaten-meta {
  margin-top: 12px;
  padding-top: 9px;
  border-top: 1px solid #edf1f4;
  color: #7a8793;
  font-size: 11.5px;
  line-height: 1.45;
}

.stammdaten-meta-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 18px;
}

.stammdaten-meta-line > span {
  color: #7a8793;
  font-size: inherit;
}

.stammdaten-meta-line > strong {
  color: #52616d;
  font-size: inherit;
  font-weight: 500;
}

.stammdaten-meta-line > strong + span {
  margin-left: 2px;
}

.stammdaten-meta-price {
  margin-top: 2px;
}

/* Leistungskalkulation: inaktive, historisch weiter verwendete Materialien */
.leistung-calc-material-inactive-badge,
.leistung-calc-material-result-head .leistung-calc-material-inactive-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 18px;
  margin-left: 8px;
  padding: 1px 7px;
  border: 1px solid #e6c67a;
  border-radius: 999px;
  background: #fff8e7;
  color: #805d08;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  vertical-align: middle;
}

.leistung-calc-material-reference-text {
  color: #6f7f8a;
  font-size: 11px;
  line-height: 1.3;
}

.leistung-calc-material-inactive-note {
  margin: 5px 0 3px;
  padding: 7px 9px;
  border-left: 3px solid #d9aa3c;
  border-radius: 3px;
  background: #fffaf0;
  color: #6b551d;
  font-size: 11px;
  line-height: 1.4;
}

/* Material löschen: kompakter Bestätigungsdialog mit Verwendungsinformation */
.material-delete-dialog {
  width: min(560px, calc(100vw - 40px));
}

.material-delete-text {
  max-width: 100%;
  color: #263f51;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: normal;
}

.material-delete-text-line {
  max-width: 100%;
}

.material-delete-text-detail {
  margin-top: 4px;
}

.material-delete-note {
  margin-top: 12px;
  color: #6f7f8a;
  font-size: 12px;
  line-height: 1.45;
}

/* MaterialSingle: Löschen bewusst als dezente Sekundäraktion im Kopf. */
.material-single-header-actions {
  justify-self: end;
}

.material-single-delete-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #72808d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.material-single-delete-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.material-single-delete-icon:hover,
.material-single-delete-icon:focus-visible {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b42318;
  outline: none;
}

.material-single-delete-icon:disabled {
  opacity: .5;
  cursor: default;
}

@media (max-width: 640px) {
  .material-single-header-actions {
    justify-content: flex-end;
  }
}


/* Einheitliches Aktionsmuster in Single-Headern: Bearbeiten + weitere Aktionen. */
.record-header-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

.record-header-edit-icon,
.record-header-more {
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.record-header-edit-icon {
  color: #063f6c;
}

.record-header-edit-svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.record-header-more {
  width: auto;
  min-width: 0;
  height: 36px;
  gap: 4px;
  padding: 0 12px;
  border-color: #cfd9e2;
  background: #fff;
  color: #063f6c;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.record-header-more-svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.record-header-edit-icon:hover,
.record-header-edit-icon:focus-visible,
.record-header-more:hover,
.record-header-more:focus-visible {
  border-color: #d8e2ec;
  background: #eef4f8;
  outline: none;
}

.record-header-edit-icon:focus-visible,
.record-header-more:focus-visible {
  box-shadow: 0 0 0 2px rgba(6, 63, 108, .14);
}

.record-header-edit-icon:disabled,
.record-header-more:disabled {
  opacity: .45;
  cursor: default;
}

.record-header-more-wrap {
  position: relative;
  display: inline-flex;
}

.record-header-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  z-index: 1400;
  min-width: 188px;
  padding: 5px;
  border: 1px solid #dbe3ea;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .14);
}

.record-header-menu-item {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #1f2937;
  text-align: left;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.record-header-menu-item:hover,
.record-header-menu-item:focus-visible {
  background: #f1f5f9;
  outline: none;
}

.record-header-menu-item.is-danger {
  color: #b42318;
}

.record-header-menu-item.is-danger:hover,
.record-header-menu-item.is-danger:focus-visible {
  background: #fff1f2;
  color: #9f1c14;
}

.record-header-menu-item:disabled {
  opacity: .5;
  cursor: default;
}

@media (max-width: 640px) {
  .address-single-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .address-single-header > .record-header-actions {
    grid-column: auto;
    grid-row: auto;
    justify-self: end;
  }
}

/* Single-Header Aktionsmenue: immer vollstaendig ueber dem Seiteninhalt anzeigen. */
.address-single-header {
  position: sticky;
  top: 0;
  z-index: 50;
  overflow: visible;
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
}

.address-single-content {
  position: relative;
  z-index: 1;
}

.record-header-actions {
  z-index: 60;
}

.record-header-more-wrap {
  z-index: 61;
}

.record-header-menu {
  z-index: 2000;
  box-sizing: border-box;
  overflow: visible;
}

.record-header-menu-item {
  display: block;
  box-sizing: border-box;
  position: relative;
  margin: 0;
  white-space: nowrap;
}

.record-header-menu-item + .record-header-menu-item {
  margin-top: 2px;
}


/* Einheitliches Aktionsmenue der Single-Header. */
.record-header-menu {
  min-width: 260px;
  max-width: calc(100vw - 24px);
}

.record-header-menu-item,
.record-header-menu-item.is-danger {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1f2937;
}

.record-header-menu-item:hover,
.record-header-menu-item:focus-visible,
.record-header-menu-item.is-danger:hover,
.record-header-menu-item.is-danger:focus-visible {
  background: #f1f5f9;
  color: #1f2937;
}

.record-header-menu-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Datenschutz / Löschprüfung in AdresseSingle. */
.address-privacy-dialog {
  width: min(860px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
}

.address-privacy-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
}

.address-privacy-loading {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #52606d;
  font-size: 14px;
}

.address-privacy-status {
  padding: 11px 13px;
  border: 1px solid #dbe3ea;
  border-radius: 7px;
  background: #f8fafc;
  color: #1f2937;
  font-size: 14px;
  font-weight: 600;
}

.address-privacy-status.is-clear,
.address-privacy-status.is-partial,
.address-privacy-status.is-blocked {
  border-color: #dbe3ea;
  background: #f8fafc;
  color: #1f2937;
}

.address-privacy-rules,
.address-privacy-counts,
.address-privacy-note {
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

.address-privacy-counts {
  padding-bottom: 2px;
}

.address-privacy-section {
  border-top: 1px solid #e7ecf1;
  padding-top: 12px;
}

.address-privacy-section-title {
  margin-bottom: 7px;
  color: #0b3558;
  font-size: 13px;
  font-weight: 650;
}

.address-privacy-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.address-privacy-item {
  padding: 8px 10px;
  border-radius: 6px;
  background: #f8fafc;
}

.address-privacy-item-title {
  color: #1f2937;
  font-size: 13px;
  font-weight: 600;
}

.address-privacy-item-detail,
.address-privacy-empty {
  margin-top: 2px;
  color: #667085;
  font-size: 12px;
  line-height: 1.4;
}

.address-privacy-empty {
  margin-top: 0;
  padding: 7px 0;
}

.address-privacy-note {
  padding: 10px 12px;
  border-radius: 6px;
  background: #f8fafc;
}

.address-privacy-footer {
  flex-wrap: wrap;
  gap: 8px;
}

.address-privacy-footer .address-edit-button:disabled {
  opacity: .45;
  cursor: default;
}

@media (max-width: 720px) {
  .address-privacy-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .address-privacy-footer .address-edit-button {
    width: 100%;
  }
}

/* Datenschutz: klare Löschvorschau im Sicherheitsdialog. */
.address-confirm-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.address-confirm-preview-section {
  padding: 10px 12px;
  border: 1px solid #dbe3ea;
  border-radius: 7px;
  background: #f8fafc;
}

.address-confirm-preview-title {
  margin-bottom: 7px;
  color: #0b3558;
  font-size: 13px;
  font-weight: 700;
}

.address-confirm-preview-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.address-confirm-preview-row {
  padding-top: 7px;
  border-top: 1px solid #e7ecf1;
}

.address-confirm-preview-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.address-confirm-preview-label {
  color: #1f2937;
  font-size: 13px;
  font-weight: 600;
}

.address-confirm-preview-detail {
  margin-top: 2px;
  color: #667085;
  font-size: 12px;
  line-height: 1.4;
}

.address-privacy-item-action {
  margin-top: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #063f6c;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.address-privacy-item-action:hover,
.address-privacy-item-action:focus-visible {
  text-decoration: underline;
  outline: none;
}

/* Datenschutzgerechte Projektloeschung. */
.project-delete-dialog {
  width: min(660px, calc(100vw - 32px));
  max-width: 660px;
}

.project-deleted-section {
  max-width: 760px;
}

.project-deleted-title {
  color: #0b3558;
  font-size: 18px;
  font-weight: 700;
}

.project-deleted-text {
  margin-top: 8px;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.5;
}

.project-deleted-meta {
  margin-top: 6px;
  color: #667085;
  font-size: 12px;
}

.project-deleted-proof {
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid #dbe3ea;
  border-radius: 7px;
  background: #f8fafc;
  color: #344054;
  font-size: 13px;
  line-height: 1.5;
}

.project-deleted-summary {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  max-width: 420px;
}

.project-deleted-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #667085;
  font-size: 12px;
}

.project-deleted-summary-row strong {
  color: #344054;
  font-size: 13px;
}

.project-row-deleted .address-row-main {
  color: #667085;
}

.project-row-deleted .address-row-sub,
.project-row-deleted .address-row-meta {
  color: #8a94a3;
}

/* Datenschutz: optionale Projektloeschung direkt im Adress-Loeschlauf. */
.address-privacy-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.address-privacy-item-actions .address-privacy-item-action {
  margin-top: 0;
}

.address-privacy-project-delete-option {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #0b3558;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  user-select: none;
}

.address-privacy-project-switch {
  flex: 0 0 auto;
}

@media (max-width: 700px) {
  .address-privacy-item-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Einheitliches Aktionsmuster in Stammdatenlisten: Plus + weitere Aktionen. */
.address-searchbar {
  position: relative;
  z-index: 30;
  overflow: visible;
}

.record-list-header-actions {
  flex: 0 0 auto;
  order: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
  z-index: 70;
}

.material-searchbar .record-list-header-actions {
  order: 3;
}

.material-searchbar .material-filter-select {
  order: 2;
}

.record-list-add {
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  border: 1px solid #063f6c;
  border-radius: 7px;
  background: #063f6c;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
  transition: background .15s ease, border-color .15s ease, transform .08s ease;
}

.record-list-add:hover,
.record-list-add:focus-visible {
  background: #0a527f;
  border-color: #0a527f;
  outline: none;
}

.record-list-add:focus-visible {
  box-shadow: 0 0 0 2px rgba(6, 63, 108, .16);
}

.record-list-add:active {
  transform: translateY(1px);
}

.record-list-add-icon {
  display: block;
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-1px);
}

.record-list-header-actions .record-header-more {
  width: auto;
  height: 36px;
  min-width: 0;
}

.record-list-header-menu {
  display: none;
  top: calc(100% + 5px);
  right: 0;
  min-width: 250px;
  z-index: 2200;
}

.record-list-more-wrap.is-open .record-list-header-menu {
  display: block;
}

.record-list-header-menu .record-header-menu-item small {
  margin-left: auto;
  padding-left: 12px;
  color: #7b8794;
  font-size: 11px;
  white-space: nowrap;
}

.record-list-menu-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  font-size: 18px !important;
  line-height: 18px !important;
}

@media (max-width: 700px) {
  .record-list-header-actions {
    margin-left: auto;
  }

  .material-searchbar .record-list-header-actions {
    order: 2;
  }

  .material-searchbar .material-filter-select {
    order: 3;
  }

  .record-list-header-menu {
    max-width: calc(100vw - 20px);
  }
}

/* Projektdatei-Vorschau: Audio/Video */
.project-file-preview-audio {
  width: min(720px, calc(100% - 48px));
  align-self: center;
  margin: auto;
}

.project-file-preview-video {
  max-width: 100%;
  max-height: 100%;
  align-self: center;
  margin: auto;
  background: #000000;
}

/* Dateiablage in AdresseSingle */
.address-files-card {
  margin-top: 16px;
  min-width: 0;
}

.address-files-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

#adresseFileMoveProject {
  width: 100%;
}

.project-file-dialog-danger,
.project-file-dialog-danger:hover,
.project-file-dialog-danger:focus-visible {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
}

@media (max-width: 720px) {
  .address-files-card .address-single-section-head {
    align-items: flex-start;
    gap: 10px;
  }

  .address-files-head-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Lizenz: Bestandsabo tabellarisch, Lizenzstatus im einheitlichen Kartendesign */
.license-status-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.license-status-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.license-status-main {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 7px;
}

.license-status-main p {
  margin: 0;
  color: #4d5e6b;
  line-height: 1.5;
}

.license-status-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: #eef3f6;
  color: #4f626f;
  font-size: 0.9rem;
  font-weight: 800;
}

.license-status-badge.active {
  background: #e9f5eb;
  color: #2e6c35;
}

.license-status-badge.trial {
  background: #eef5fa;
  color: #063f6c;
}

.license-status-badge.restricted,
.license-status-badge.readonly,
.license-status-badge.cancelled {
  background: #fff3df;
  color: #8b5b0a;
}

.license-status-side {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  text-align: right;
}

.license-status-side span {
  color: #71808a;
  font-size: 0.78rem;
  font-weight: 700;
}

.license-status-side strong {
  color: #063f6c;
  font-size: 1rem;
}

.license-current-subscription {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.license-current-fields {
  width: min(100%, 760px);
}

.license-current-fields.address-single-master-section .address-single-field {
  grid-template-columns: minmax(180px, 34%) minmax(0, 1fr);
}

.license-current-fields .address-single-field:first-child {
  border-top: none;
}

.license-current-addon-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.license-current-addon-title {
  color: #536775;
  font-size: 0.88rem;
  font-weight: 800;
}

.license-current-addon-list {
  overflow: hidden;
  border: 1px solid #dce4e9;
  border-radius: 9px;
  background: #fff;
}

.license-current-addon {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
  border-bottom: 1px solid #e6ebee;
}

.license-current-addon:last-child {
  border-bottom: 0;
}

.license-current-addon > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.license-current-addon > div strong {
  color: #263f4d;
  font-weight: 750;
}

.license-current-addon > div span {
  color: #697983;
  line-height: 1.4;
}

.license-current-addon-quantity {
  flex: 0 0 auto;
  color: #063f6c;
  font-weight: 800;
  white-space: nowrap;
}

.license-current-addon-empty {
  padding: 12px 16px;
  color: #697983;
  background: #f8fafb;
}

.license-current-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.license-change-dialog {
  width: min(1040px, calc(100vw - 32px));
}

.license-change-body {
  background: #f6f8fa;
}

.license-change-body > .settings-detail-section {
  margin: 0;
}

@media (max-width: 760px) {
  .license-current-fields.address-single-master-section .address-single-field {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .license-status-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .license-status-side {
    align-items: flex-start;
    text-align: left;
  }


  .license-current-addon {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .license-current-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .license-current-actions .address-edit-button {
    width: 100%;
  }
}

/* Lizenzwechsel: Zusatzmodule mit aktuellem und neuem Wert */
.license-change-addon-row {
  align-items: center;
}

.license-change-addon-values {
  display: grid;
  grid-template-columns: 86px 104px;
  align-items: start;
  gap: 14px;
  flex: 0 0 auto;
}

.license-change-addon-current,
.license-change-addon-new {
  display: grid;
  grid-template-rows: 18px 36px;
  min-width: 0;
  gap: 4px;
}

.license-change-addon-current > span,
.license-change-addon-new > span {
  display: flex;
  align-items: center;
  height: 18px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}

.license-change-addon-current > strong {
  display: flex;
  align-items: center;
  min-height: 36px;
  height: 36px;
  color: #26323d;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.license-change-addon-new {
  margin: 0;
}

.license-change-addon-new .license-addon-quantity {
  width: 104px !important;
  min-width: 104px;
  height: 36px;
  min-height: 36px;
  box-sizing: border-box;
  margin: 0;
}

.license-change-addon-price {
  display: block;
  margin-top: 3px;
  color: #526b7b !important;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.license-change-subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 6px 0;
  padding: 12px 14px;
  border-top: 1px solid #dce5ec;
  border-bottom: 1px solid #dce5ec;
  background: #f8fafb;
}

.license-change-subtotal > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.license-change-subtotal span {
  color: #26323d;
  font-size: 13px;
  font-weight: 800;
}

.license-change-subtotal small {
  color: #64748b;
  font-size: 12px;
}

.license-change-subtotal > strong {
  flex: 0 0 auto;
  color: #063f6c;
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}

.license-change-total {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #dce5ec;
  border-radius: 8px;
  background: #f8fafb;
}

.license-change-total span {
  font-weight: 700;
}

.license-change-total strong {
  color: #063f6c;
  font-size: 1rem;
}

.license-change-dialog .license-order-footer {
  gap: 10px;
}

@media (max-width: 680px) {
  .license-change-addon-row {
    align-items: stretch;
    flex-direction: column;
  }

  .license-change-addon-values {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .license-change-addon-new .license-addon-quantity {
    width: 100% !important;
  }

  .license-change-subtotal {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .license-change-subtotal > strong {
    text-align: left;
  }
}



/* masoft-Tenant: wiederkehrende Rechnungspositionen an Adressen */
.address-recurring-card {
  margin-top: 16px;
  min-width: 0;
}

.address-recurring-subtitle {
  margin-top: 3px;
  color: #697983;
  font-size: 12px;
  line-height: 1.4;
}

.address-recurring-table td:first-child {
  min-width: 250px;
}

.address-recurring-table td small {
  margin-top: 2px;
  color: #697983;
}

.address-recurring-cancelled {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff3df;
  color: #8b5b0a;
  font-size: 12px;
  font-weight: 750;
}

.address-recurring-body {
  background: #f6f8fa;
}

.address-recurring-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.address-recurring-editor-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.address-recurring-editor-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dce4e9;
  border-radius: 9px;
  background: #fff;
}

.address-recurring-editor-row > .address-recurring-field:nth-child(1),
.address-recurring-editor-row > .address-recurring-field:nth-child(2) {
  grid-column: span 2;
}
.address-recurring-editor-row > .address-recurring-field:nth-child(9) {
  grid-column: span 2;
}
.address-recurring-editor-row > .address-recurring-remove {
  grid-column: 1 / -1;
  justify-self: end;
}

.address-recurring-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.address-recurring-field > span {
  color: #536775;
  font-size: 12px;
  font-weight: 750;
}

.address-recurring-field .address-edit-control {
  width: 100%;
  min-width: 0;
}

.address-recurring-cancel-wrap {
  display: grid;
  grid-template-columns: auto minmax(130px, 1fr);
  align-items: center;
  gap: 8px;
}

.address-recurring-cancel-check {
  margin: 0;
  white-space: nowrap;
}

.address-recurring-remove {
  min-height: 38px;
  margin-bottom: 0;
}

@media (max-width: 1100px) {
  .address-recurring-editor-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .address-recurring-editor-row .address-recurring-field:first-child,
  .address-recurring-editor-row > .address-recurring-field:nth-child(2),
  .address-recurring-editor-row > .address-recurring-field:nth-child(9) {
    grid-column: 1 / -1;
  }

  .address-recurring-remove {
    justify-self: start;
  }
}

@media (max-width: 680px) {
  .address-recurring-editor-row {
    grid-template-columns: 1fr;
  }

  .address-recurring-editor-row .address-recurring-field:first-child,
  .address-recurring-editor-row > .address-recurring-field:nth-child(2),
  .address-recurring-editor-row > .address-recurring-field:nth-child(9) {
    grid-column: auto;
  }

  .address-recurring-cancel-wrap {
    grid-template-columns: 1fr;
  }

  .address-recurring-toolbar {
    justify-content: flex-start;
  }
}


.address-recurring-service-control {
  display: grid;
  grid-template-columns: minmax(150px, .85fr) minmax(220px, 1.4fr);
  gap: 8px;
  min-width: 0;
}

.address-recurring-service-search {
  min-width: 0;
}

@media (max-width: 1100px) {
  .address-recurring-service-control {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  }
}

@media (max-width: 680px) {
  .address-recurring-service-control {
    grid-template-columns: 1fr;
  }
}


/* Adress-Neuanlage in Pickern: reine Aktion im Standard-Buttondesign. */
.project-address-create-result {
  justify-content: flex-end;
  padding: 8px 9px;
  background: #ffffff;
}

.project-address-create-result .project-address-create-hint {
  display: none !important;
}

.project-address-create-button {
  min-width: 92px;
  min-height: 30px;
  height: 30px;
  padding: 0 12px;
  gap: 6px;
  border: 1px solid var(--color-primary, #063f6c);
  border-radius: 2px;
  background: var(--color-primary, #063f6c);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
}

.project-address-create-button:hover {
  background: var(--color-primary, #063f6c);
  filter: brightness(.96);
}

.project-address-create-button span {
  font-size: 17px;
}


/* Einstellungen: Nummernkreise */
.settings-number-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-number-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-number-placeholder-help {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-number-placeholder-help > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(6, 63, 108, 0.14);
  border-radius: 999px;
  background: rgba(6, 63, 108, 0.04);
  color: #526675;
  font-size: 12px;
}

.settings-number-placeholder-help strong {
  color: #063f6c;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.settings-number-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border-left: 3px solid #f28c18;
  background: rgba(242, 140, 24, 0.07);
  color: #405665;
  font-size: 13px;
  line-height: 1.45;
}

.settings-number-note .material-icons {
  flex: 0 0 auto;
  color: #063f6c;
  font-size: 19px;
}

.settings-number-group {
  display: grid;
  gap: 12px;
}

.settings-number-group + .settings-number-group {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(6, 63, 108, 0.12);
}

.settings-number-group-title {
  color: #063f6c;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.settings-number-range {
  border-color: rgba(6, 63, 108, 0.14);
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(6, 63, 108, 0.035);
}

.settings-number-range-head > div > strong {
  color: #063f6c;
  font-size: 15px;
}

.settings-number-area-code {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 4px;
  background: rgba(6, 63, 108, 0.055);
  color: #71808a !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 10px !important;
}

.settings-number-inherit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 14px 0 2px;
  padding: 11px 13px;
  border: 1px solid rgba(6, 63, 108, 0.12);
  border-radius: 7px;
  background: #f8fafb;
}

.settings-number-inherit > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.settings-number-inherit strong {
  color: #263f4d;
  font-size: 13px;
}

.settings-number-inherit span {
  color: #667985;
  font-size: 12px;
  line-height: 1.4;
}

.settings-number-range.is-inherited .settings-number-format-input {
  background: #f1f4f6 !important;
  color: #87949d !important;
}

.settings-number-range .address-edit-control:focus {
  border-color: #f28c18 !important;
  box-shadow: 0 0 0 2px rgba(242, 140, 24, 0.16) !important;
}

.settings-number-preview {
  min-width: 0;
}

.settings-number-preview strong {
  overflow-wrap: anywhere;
}

.settings-number-save {
  flex: 0 0 auto;
  min-width: 110px;
}

.settings-number-save:disabled {
  cursor: wait;
  opacity: .65;
}

.settings-number-history-table {
  background: #fff;
}

.settings-number-history-row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.settings-number-history-row small {
  display: block;
  margin-top: 3px;
  color: #7b8992;
  font-size: 11px;
}

.settings-number-history-detail {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: #405665;
}

.settings-number-history-detail > span {
  display: block;
}

.settings-number-history-detail.is-allocation > strong {
  color: #063f6c;
  font-size: 14px;
}

@media (max-width: 760px) {
  .settings-number-range-head {
    align-items: flex-start;
  }

  .settings-number-area-code {
    display: none;
  }

  .settings-number-inherit {
    align-items: flex-start;
  }

  .settings-number-history-table {
    min-width: 840px;
  }
}



/* masoft-Kundenstamm: wiederkehrende Rechnungen und Aufträge in einer Kachel */
.address-masoft-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 2px 0 13px;
  margin-bottom: 12px;
  border-bottom: 1px solid #e1e8ef;
}
.address-masoft-tab {
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 8px 8px 0 0;
  padding: 10px 15px 8px;
  background: transparent;
  color: #597083;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  white-space: normal;
}
.address-masoft-tab:hover,
.address-masoft-tab:focus-visible {
  background: #eaf2f8;
  color: #063f6c;
}
.address-masoft-tab.is-active {
  color: #063f6c;
  border-bottom-color: #ef912d;
  background: #edf4fa;
}
.address-masoft-panel {
  min-width: 0;
}
.address-masoft-panel > .address-single-section-head {
  margin-top: 4px;
}

/* Gemeinsamer durchsuchbarer Leistungspicker – begrenzte Trefferliste */
.masoft-service-picker,
.address-recurring-service-control.masoft-search-picker {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  width: 100%;
}
.masoft-service-picker input[type="search"],
.address-recurring-service-control.masoft-search-picker input[type="search"] {
  width: 100%;
  min-width: 0;
}
.masoft-service-selected {
  color: #466479;
  border-left: 3px solid #ed9a39;
  padding: 5px 9px;
  min-width: 0;
  background: #f5f8fb;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.masoft-service-clear {
  align-self: flex-start;
  border: none;
  background: transparent;
  color: #063f6c;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 1px 0;
  cursor: pointer;
}
.masoft-service-clear:hover,
.masoft-service-clear:focus-visible {
  text-decoration: underline;
}

.masoft-service-results {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 3px);
  z-index: 130;
  max-height: min(320px, 46vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  border: 1px solid #c7d5e2;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(22, 44, 66, 0.22);
}
.masoft-service-hint {
  color: #607586;
  padding: 9px 12px;
  font-size: 12px;
}
.masoft-service-result {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  padding: 9px 11px;
  background: #fff;
  color: #20384d;
  text-align: left;
  border: 0;
  border-top: 1px solid #edf0f3;
  cursor: pointer;
}
.masoft-service-result strong {
  font-size: 13px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.masoft-service-result small {
  color: #617788;
  font-size: 11px;
  margin-top: 2px;
  overflow-wrap: anywhere;
}
.masoft-service-result:hover,
.masoft-service-result:focus-visible,
.masoft-service-result.is-active {
  background: #e7f0f9;
  color: #063f6c;
}
.masoft-once-row .masoft-once-service-wrap {
  min-width: 0;
}

/* Masoft-Vertragsauftrag: Bezeichnung nur bei ausdrücklicher Abwahl der Stammverknüpfung anpassen. */
.masoft-custom-title-wrap {
  min-width: 0;
  padding: 9px 12px;
  background: #f5f8fb;
  border: 1px solid #dce6ef;
  border-radius: 8px;
}
.masoft-custom-title-label {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  color: #26445d;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.masoft-custom-title-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: #063f6c;
}
.masoft-custom-title-hint {
  display: block;
  margin: 5px 0 0 25px;
  color: #607586;
  font-size: 12px;
  line-height: 1.4;
}
.masoft-custom-title-wrap + .address-recurring-field input[readonly] {
  background: #f3f6f9;
  color: #526b7c;
}


/* Vertragspositionen: kompakte Löschaktion und mehrzeilige abweichende Bezeichnungen. */
.masoft-position-remove,
.address-recurring-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  align-self: end;
}
.masoft-position-remove svg,
.address-recurring-remove svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  pointer-events: none;
}
.masoft-once-text,
.masoft-description,
.address-recurring-description {
  min-height: 76px;
  resize: vertical;
  line-height: 1.4;
}

/* Shared action menus: align both the entry and its nested caption.
   Primary toolbar buttons retain their own alignment. */
.record-header-menu .record-header-menu-item,
.beleg-menu-dropdown .beleg-menu-entry,
#belegFinishMorePanel > .beleg-top-action-button,
.briefe-overview-menu-popup button {
  justify-content: flex-start !important;
  text-align: left !important;
}
.record-header-menu .record-header-menu-item > span,
.beleg-menu-dropdown .beleg-menu-entry > span,
#belegFinishMorePanel > .beleg-top-action-button > span,
.briefe-overview-menu-popup button > span {
  justify-content: flex-start !important;
  text-align: left !important;
}
#belegFinishMorePanel > .beleg-top-action-button > span:not(.material-icons) {
  flex: 1 1 auto;
  min-width: 0;
}

/* Shared primary actions in trial, active and cancelled subscription views. */
.settings-license-page {
  --license-main-action-width: 220px;
  min-width: 0;
}

.settings-license-page .license-main-action {
  box-sizing: border-box;
  width: var(--license-main-action-width);
  max-width: 100%;
  min-width: 0;
  flex: 0 0 auto;
  height: auto;
  min-height: 30px;
  padding: 6px 12px;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}

.settings-license-page .license-inline-form > .address-edit-control {
  width: 0;
  flex: 1 1 0%;
}

@media (max-width: 760px) {
  .settings-license-page .license-inline-form {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-license-page .license-main-action,
  .settings-license-page .license-inline-form > .address-edit-control {
    width: 100%;
  }

  .settings-license-page .license-inline-form > .address-edit-control {
    flex: 0 0 auto;
  }
}

/* One control height throughout license management, including late Office/Team cards. */
.settings-license-page,
.license-order-overlay,
.license-cancel-overlay {
  --license-control-height: 28px;
}

.settings-license-page button,
.license-order-overlay button,
.license-cancel-overlay button {
  box-sizing: border-box;
  height: var(--license-control-height) !important;
  min-height: var(--license-control-height) !important;
  max-height: var(--license-control-height) !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: 1.2;
  white-space: nowrap;
}

.settings-license-page .license-reactivate-button {
  display: inline-block;
  width: auto;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Billing intervals use the same radio controls throughout the order overlay. */
.license-billing-interval {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.license-billing-interval legend {
  margin: 0 0 8px;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
}
.license-billing-choices {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
}
.license-billing-choices label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 14px;
  cursor: pointer;
}
.license-billing-choices input[type="radio"] {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--color-primary, #063f6c);
}

/* Show comparable prices before long plan feature lists. */
.license-plan-price.license-plan-price-top {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  color: var(--color-primary, #063f6c);
  font-size: 1.05rem;
}
.license-price-notes {
  margin: 10px 0 0;
  color: #526573;
  font-size: 12px;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}
.license-price-notes p { margin: 4px 0; }
.license-price-notes strong { font-size: inherit; }

.license-plan-savings {
  display: block;
  color: #166534;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
}
.license-plan-savings[hidden] { display: none; }

/* Neuer Beleg: Projektauswahl direkt im Suchfeld zurücksetzen. */
#newBelegProjektField .beleg-project-search-row{position:relative;display:block;min-width:0}
#newBelegProjektSearch{padding-right:34px !important}
#newBelegProjektField .beleg-project-search-clear{position:absolute;right:2px;top:50%;transform:translateY(-50%);display:none;align-items:center;justify-content:center;width:24px;min-width:24px;height:24px;min-height:24px;padding:0;border:0;border-radius:2px;background:transparent;color:#64748b;font-size:21px;line-height:1;cursor:pointer}
#newBelegProjektField .beleg-project-search-clear:hover{background:#edf2f7;color:#063f6c}
#newBelegProjektField .beleg-project-search-clear:focus-visible{outline:2px solid #063f6c;outline-offset:1px}
#newBelegProjektField .beleg-project-search-status{font-size:12px;color:#64748b;line-height:1.4}
#newBelegProjektField .beleg-project-search-status:empty{display:none}

/* Rollen und Nummern rechts in der Adressliste. */
#adressen-results .address-row-pills {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}


/* Address detail: compact identity, project-first workspace. */
.address-workspace .address-single-header {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 14px 16px;
}
.address-workspace .address-single-subtitle {
  margin-top: 5px;
  color: #526573;
  font-size: 13px;
}
.address-workspace-head-info,
.address-workspace-quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.address-workspace-head-info { margin-top: 10px; }
.address-workspace-role {
  padding: 3px 8px;
  border: 1px solid #dce5ec;
  border-radius: 4px;
  background: #edf3f8;
  color: #063f6c;
  font-size: 12px;
  font-weight: 600;
}
.address-workspace-quick { font-size: 13px; min-width: 0; }
.address-workspace-quick a { overflow-wrap: anywhere; }
.address-workspace-master-address {
  margin: 4px 0 12px;
  padding: 0 0 12px;
  border-bottom: 1px solid #e6edf2;
}
.address-workspace-master-address > .address-single-section-title-row .address-single-section-title {
  font-size: 13px;
}
.address-workspace-master-address .address-single-address-line strong { font-size: 14px; }
.address-workspace-master-address .address-workspace-head-info { gap: 8px; }
.address-workspace-master-address .address-workspace-quick { width: 100%; }
.address-workspace-grid {
  display: grid;
  grid-template-columns: minmax(270px, .3fr) minmax(0, .7fr);
  gap: 14px;
  align-items: start;
}
.address-workspace-sidebar,
.address-workspace-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.address-workspace .address-single-section {
  height: auto;
  min-width: 0;
  margin: 0;
  padding: 14px 16px;
}
.address-workspace .address-single-master-section { border-top: 1px solid #e5e7eb; }
.address-workspace .address-single-master-section .address-single-field {
  grid-template-columns: minmax(0, .46fr) minmax(0, .54fr);
  gap: 10px;
}
.address-workspace [hidden] { display: none !important; }
.address-workspace .stammdaten-meta { margin-top: 10px; font-size: 10.5px; }
.address-workspace .address-single-note { min-height: 0; }
.address-workspace-note-empty .address-single-note { color: #7a8793; font-size: 12px; }
.address-workspace-contacts > summary {
  cursor: pointer;
  color: #063f6c;
  font-size: 14px;
  font-weight: 600;
  padding: 2px 0;
}
.address-workspace-contacts[open] > summary { margin-bottom: 12px; }
.address-workspace .address-single-contact-section { margin: 0; padding: 0; border: 0; }
.address-workspace-contacts .address-single-section-head { justify-content: flex-end; margin-bottom: 8px; }
.address-workspace-contacts .address-single-section-title { display: none; }
.address-workspace-contacts .address-section-add-link { font-size: 12px; }
.address-workspace-contacts .address-single-table,
.address-workspace-contacts tbody { display: block; width: 100%; }
.address-workspace-contacts thead { display: none; }
.address-workspace-contacts tr { display: flex; flex-direction: column; padding: 8px 0; border-top: 1px solid #e5e7eb; }
.address-workspace-contacts .address-single-table td {
  display: block;
  border: 0;
  padding: 3px 0;
  overflow-wrap: anywhere;
}
.address-workspace-contacts td[data-label]::before {
  content: attr(data-label) ": ";
  color: #64748b;
  font-size: 11px;
  font-weight: 400;
}
.address-workspace-contacts td.address-table-actions::before { content: none; }
.address-workspace-contacts .address-table-actions-wrap { justify-content: flex-end; }
.address-workspace-projects > .address-single-section-head { flex-wrap: wrap; gap: 10px; }
.address-workspace-projects > .address-single-section-head > .address-single-section-title { margin-right: auto; }
.address-workspace-project-filter { display: inline-flex; align-items: center; gap: 5px; color: #64748b; font-size: 12px; cursor: pointer; }
.address-workspace-project-filter input { accent-color: #063f6c; }
.address-workspace-project-site { color: #64748b; font-size: 12px; font-weight: 400; margin-top: 3px; }
.address-workspace-projects tr[tabindex]:hover,
.address-workspace-projects tr[tabindex]:focus-visible { background: #f9fbff; outline: 2px solid #b6c9da; outline-offset: -2px; }
@media (max-width: 1050px) {
  .address-workspace-grid { grid-template-columns: minmax(240px, .34fr) minmax(0, .66fr); }
  .address-workspace .address-single-header { grid-template-columns: auto minmax(0, 1fr); }
  .address-workspace .address-single-header > .record-header-actions { grid-column: 2; justify-self: start; }
}
@media (max-width: 760px) {
  .address-workspace-grid { grid-template-columns: minmax(0, .42fr) minmax(0, .58fr); }
  .address-workspace-main { width: 100%; }
  .address-workspace-sidebar { width: 100%; }
  .address-workspace .address-single-header { padding: 12px; }
  .address-workspace .address-single-section { padding: 12px; }
}

@media (max-width: 760px) {
  .address-workspace .address-files-card > .address-single-section-head {
    flex-wrap: wrap;
    gap: 10px;
  }
  .address-workspace .address-files-card > .address-single-section-head > .address-single-section-title {
    flex: 1 0 100%;
    margin-bottom: 0;
  }
}


/* Address workspace: separate identity card and two columns at every width. */
.address-workspace-grid { grid-template-columns:minmax(0,.36fr) minmax(0,.64fr); }
.address-workspace-address .address-single-address-block { margin:0; }
.address-workspace .address-workspace-address .address-single-field { display:grid; grid-template-columns:minmax(70px,.3fr) minmax(0,.7fr); gap:10px; align-items:start; }
.address-workspace .address-single-field > span { overflow-wrap:anywhere; }
.address-workspace .address-single-field strong,.address-identity-value { overflow-wrap:anywhere; min-width:0; }
.address-workspace-address .address-single-address-line { margin:0; line-height:1.5; }
.address-workspace-address .address-single-address-line strong { font-size:14px; font-weight:500; }
.address-workspace-address .address-workspace-quick { margin-top:12px; }
.address-workspace .address-project-list { min-width:0; }
.address-workspace .address-project-row { display:grid; grid-template-columns:minmax(0,1fr) auto 18px; gap:12px; align-items:center; }
.address-workspace .address-project-row .address-row-content { min-width:0; overflow-wrap:anywhere; }
.address-workspace .address-project-row .address-row-main,.address-workspace .address-project-row .address-row-sub { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; }
.address-workspace .address-project-row .address-row-meta { display:block; white-space:normal; max-width:135px; overflow-wrap:anywhere; }
.address-workspace .address-project-empty { padding:14px 0; overflow-wrap:anywhere; }
@media(max-width:1050px) {
  .address-workspace-grid { grid-template-columns:minmax(0,.4fr) minmax(0,.6fr); }
  .address-workspace .address-project-row { grid-template-columns:minmax(0,1fr) 16px; gap:6px; }
  .address-workspace .address-project-row .address-row-meta { grid-column:1; grid-row:2; max-width:none; text-align:left; }
  .address-workspace .address-project-row .address-row-arrow { grid-column:2; grid-row:1 / span 2; }
}
@media(max-width:760px) {
  .address-workspace-grid { grid-template-columns:minmax(0,.42fr) minmax(0,.58fr); gap:8px; }
  .address-workspace-sidebar,.address-workspace-main { gap:8px; }
  .address-workspace .address-single-section { padding:10px; }
  .address-workspace .address-single-master-section .address-single-field,
  .address-workspace .address-workspace-address .address-single-field { grid-template-columns:minmax(0,1fr); gap:3px; }
  .address-workspace .address-single-field > span { font-size:11px; }
  .address-workspace .address-single-section-title-row { gap:4px; flex-wrap:wrap; }
  .address-workspace .address-project-row { padding:10px 6px 10px 10px; }
  .address-workspace .address-project-row .address-row-main { font-size:13px; }
  .address-workspace .address-single-section-head { flex-wrap:wrap; }
  .address-workspace-project-filter { align-items:flex-start; }
  .address-workspace .stammdaten-meta-line { display:flex; flex-wrap:wrap; gap:3px; overflow-wrap:anywhere; }
}


/* Address workspace: one tabbed activity card in the right column. */
.address-workspace .address-workspace-activity { padding:0; overflow:hidden; }
.address-workspace-tabs { display:flex; gap:4px; overflow-x:auto; padding:6px 12px 0; border-bottom:1px solid #dce5ec; scrollbar-width:thin; }
.address-workspace-tab { flex:none; border:0; border-bottom:3px solid transparent; padding:11px 10px; background:transparent; color:#64748b; font:inherit; font-size:13px; font-weight:600; white-space:nowrap; cursor:pointer; }
.address-workspace-tab:hover { color:#063f6c; background:#f9fbff; }
.address-workspace-tab[aria-selected="true"] { color:#063f6c; border-bottom-color:#f28c18; }
.address-workspace-tab:focus-visible { outline:2px solid #b6c9da; outline-offset:-3px; }
.address-workspace .address-workspace-panel { padding:16px; min-width:0; border:0; box-shadow:none; border-radius:0; margin:0; }
.address-workspace .address-workspace-panel:focus-visible { outline:2px solid #b6c9da; outline-offset:-2px; }
.address-workspace-panel.address-workspace-contacts { padding:16px; }
.address-workspace-panel > .address-workspace-contacts { margin-bottom:18px; }
.address-workspace-panel .address-workspace-contacts > h3 { margin:0 0 10px; font-size:14px; }
.address-workspace .address-workspace-projects > .address-single-section-head > .address-single-section-title { display:none; }
.address-workspace .address-workspace-panel.address-files-card { min-height:350px; }
.address-workspace-panel > .communication-panel { margin-top:18px; }
@media(max-width:760px) {
  .address-workspace-tabs { padding:4px 6px 0; gap:0; }
  .address-workspace-tab { font-size:12px; padding:10px 8px; }
  .address-workspace .address-workspace-panel { padding:10px; }
}

.address-project-filters { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) minmax(0,.8fr); gap:10px; margin:0 0 12px; }
.address-project-filters label { display:flex; flex-direction:column; gap:4px; min-width:0; margin:0; color:#64748b; font-size:12px; }
.address-project-filters input,.address-project-filters select { box-sizing:border-box; width:100%; min-width:0; }
@media(max-width:1050px) { .address-project-filters { grid-template-columns:repeat(2,minmax(0,1fr)); } .address-project-filters label:first-child { grid-column:1 / -1; } }
@media(max-width:600px) { .address-project-filters { grid-template-columns:minmax(0,1fr); } }

/* Fill the available address viewport; keep tab headers visible while content scrolls. */
.address-single-page:has(.address-workspace) {
  overflow:hidden;
  padding-bottom:12px;
}
.address-single-card.address-workspace {
  height:100%;
  min-height:0;
}
.address-workspace > .address-single-content {
  display:flex;
  flex-direction:column;
  min-height:0;
  overflow:visible;
}
.address-workspace .address-workspace-grid {
  flex:1 1 0;
  min-height:0;
  align-items:stretch;
}
.address-workspace .address-workspace-sidebar {
  min-height:0;
  overflow:auto;
  scrollbar-gutter:stable;
}
.address-workspace .address-workspace-main {
  min-height:0;
  overflow:auto;
}
.address-workspace .address-workspace-activity {
  display:flex;
  flex-direction:column;
  flex:0 0 100%;
  height:100%;
  min-height:0;
  box-sizing:border-box;
}
.address-workspace .address-workspace-tabs {
  flex:0 0 auto;
}
.address-workspace .address-workspace-panel {
  flex:1 1 0;
  min-height:0;
  overflow:auto;
  scrollbar-gutter:stable;
}
.address-workspace .address-workspace-panel.address-files-card {
  min-height:0;
}


/* Compact postal label with Maps and grouped identity contact channels. */
.address-workspace-address .address-postal-label { display:flex; flex-direction:column; align-items:flex-start; gap:4px; }
.address-workspace-address .address-postal-label .address-workspace-quick { margin:0; gap:0; }
.address-workspace-address .address-postal-label #adresseMapsRoute { font-size:12px; font-weight:500; min-height:0; height:auto; line-height:1.4; text-align:left; }
.address-workspace-address .address-identity-contact .address-identity-label { display:flex; align-items:center; gap:5px; }
.address-identity-contact-values { display:flex; flex-direction:column; gap:4px; min-width:0; }
.address-identity-contact-entry { display:flex; align-items:baseline; gap:5px; min-width:0; }
.address-identity-contact-entry .address-communication-link { flex:0 1 auto; min-width:0; overflow-wrap:anywhere; font-size:13px; line-height:1.5; }
.address-identity-contact-action { flex:none; display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; padding:0; border:0; border-radius:3px; background:transparent; color:#81909e; font:inherit; font-size:17px; line-height:1; cursor:pointer; }
.address-identity-contact-action:hover { background:#edf3f8; color:#063f6c; }
.address-identity-contact-delete { font-size:15px; }
.address-identity-contact-delete:hover { background:#fef2f2; color:#b42318; }
.address-identity-contact-action:focus-visible { outline:2px solid #b6c9da; outline-offset:1px; }
.address-identity-contact-empty { color:#94a3b8; }


/* The same grouped contacts in identity and address editing. */
.address-compact-contacts .address-single-field { display:grid; grid-template-columns:minmax(90px,.25fr) minmax(0,.75fr); gap:10px; align-items:start; padding:8px 0; border-bottom:1px solid #edf1f4; }
.address-compact-contacts .address-identity-label { display:flex; align-items:center; gap:5px; }
.address-identity-contact-edit svg { width:13px; height:13px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.address-identity-contact-entry > a { flex:1 1 auto; }
@media(max-width:600px) { .address-compact-contacts .address-single-field { grid-template-columns:minmax(0,1fr); gap:3px; } }

/* Text actions stay quiet and aligned to the right of each contact group. */
.address-workspace .address-workspace-address .address-identity-contact,
.address-compact-contacts .address-identity-contact { grid-template-columns:minmax(60px,.25fr) minmax(0,.75fr) auto; }
.address-identity-contact-add { width:auto; height:auto; min-height:22px; padding:0; justify-self:end; align-self:start; white-space:nowrap; font-size:11px; font-weight:400; color:#64748b; }
.address-identity-contact-add:hover { background:transparent; text-decoration:underline; }
#adresseMapsRoute.xmaps-link { gap:4px; align-items:center; }
.xmaps-link-icon { flex:none; width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
@media(max-width:760px) {
  .address-workspace .address-workspace-address .address-identity-contact,
  .address-compact-contacts .address-identity-contact { grid-template-columns:minmax(0,1fr) auto; gap:4px 6px; }
  .address-identity-contact .address-identity-label { grid-column:1; grid-row:1; }
  .address-identity-contact-add { grid-column:2; grid-row:1; }
  .address-identity-contact-values { grid-column:1 / -1; grid-row:2; }
}


/* Project filters use the shared address-edit-field and address-edit-control styles. */


/* The address communication tab contains archived activity, not contact channels. */
#adresseWorkspacePanel3 > #adresseWorkspaceCommunicationHistory { margin:0; padding:0; }
#adresseWorkspaceCommunicationHistory .communication-timeline { max-height:none; overflow:visible; gap:0; }
#adresseWorkspaceCommunicationHistory .address-history-row { display:grid; grid-template-columns:minmax(0,1fr) auto 18px; gap:12px; align-items:center; }
#adresseWorkspaceCommunicationHistory .address-history-row .communication-entry-copy { grid-column:1; }
#adresseWorkspaceCommunicationHistory .address-history-row .communication-entry-side { grid-column:2; }
#adresseWorkspaceCommunicationHistory .address-history-row .address-row-arrow { grid-column:3; }
#adresseWorkspaceCommunicationHistory .communication-entry-subject { font-size:14px; font-weight:600; line-height:1.35; }
#adresseWorkspaceCommunicationHistory .communication-entry-meta { font-size:12px; line-height:1.35; }
@media(max-width:1050px) {
  #adresseWorkspaceCommunicationHistory .address-history-row { grid-template-columns:minmax(0,1fr) 16px; gap:6px; }
  #adresseWorkspaceCommunicationHistory .address-history-row .communication-entry-side { grid-column:1; grid-row:2; justify-self:start; align-items:flex-start; white-space:normal; }
  #adresseWorkspaceCommunicationHistory .address-history-row .address-row-arrow { grid-column:2; grid-row:1 / span 2; }
}


/* One value column for identity and contact details. */
.address-workspace-address { --address-identity-label-width:clamp(84px,24%,120px); }
.address-workspace .address-workspace-address .address-single-field { grid-template-columns:var(--address-identity-label-width) minmax(0,1fr); gap:10px; }
.address-workspace .address-workspace-address .address-identity-contact { grid-template-columns:var(--address-identity-label-width) minmax(0,1fr) auto; }
#adresseIdentityContacts { margin-top:14px; }
.address-identity-contact-entry { display:grid; grid-template-columns:minmax(0,1fr) auto auto; column-gap:5px; row-gap:0; align-items:start; }
.address-identity-contact-entry > .address-communication-link { grid-column:1; line-height:22px; }
.address-identity-contact-entry > .address-identity-contact-edit { grid-column:2; }
.address-identity-contact-entry > .address-identity-contact-delete { grid-column:3; }
.address-identity-contact .address-identity-label > span,
.address-identity-contact-empty { line-height:22px; }
.address-identity-contact-meta { grid-column:1 / -1; display:flex; align-items:center; flex-wrap:wrap; gap:3px 7px; min-width:0; }
.address-workspace .address-identity-contact-meta .address-identity-contact-person,
.address-compact-contacts .address-identity-contact-meta .address-identity-contact-person { color:#64748b; font-size:11px; font-weight:400; line-height:1.4; overflow-wrap:anywhere; }
.address-workspace .address-identity-contact-meta .address-identity-invoice-mail,
.address-compact-contacts .address-identity-contact-meta .address-identity-invoice-mail { display:inline-flex; padding:1px 5px; border-radius:3px; background:#fff0dc; color:#8a4707; font-size:10px; font-weight:600; line-height:16px; }
@media(max-width:760px) {
  .address-workspace .address-workspace-address .address-single-field { grid-template-columns:minmax(0,1fr); gap:3px; }
  .address-workspace .address-workspace-address .address-identity-contact { grid-template-columns:minmax(0,1fr) auto; gap:4px 6px; }
}

.address-workspace-address .address-postal-label #adresseMapsRoute { max-width:100%; min-width:0; white-space:normal; }
.address-workspace-address .address-postal-label #adresseMapsRoute > span { min-width:0; white-space:normal; }


/* The same count pill on all four address workspace tabs. */
.address-workspace-tab .address-workspace-count { display:inline-flex; align-items:center; justify-content:center; min-width:23px; height:20px; padding:0 6px; border-radius:999px; background:#e5edf3; color:#36566c; font-size:11px; font-weight:700; line-height:1; vertical-align:middle; box-sizing:border-box; }
.address-workspace-tab[aria-selected="true"] .address-workspace-count { background:#d8eaf5; color:#064b78; }


/* Person rows use the same shared list component as projects. */
.address-person-list { min-width:0; }
.address-person-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px; }
.address-person-row .address-row-content { min-width:0; overflow-wrap:anywhere; }
.address-person-row .address-row-main,.address-person-row .address-row-sub { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; }
.address-person-row .address-table-actions { align-self:start; padding:0; }
.address-person-row .address-table-actions-wrap { display:flex; gap:4px; }
.address-person-contact .address-communication-link { font-size:12px; font-weight:400; }
.address-person-note { margin-top:3px; white-space:pre-wrap !important; }
@media(max-width:760px) { .address-person-row { gap:6px; } .address-person-row .address-table-actions-wrap { flex-direction:column; } }
.address-person-row > .address-table-actions { width:auto; min-width:0; justify-self:end; }


.address-person-note-field { margin-top:16px; }


/* Address editor: native blue checkboxes and compact discount/reason pair. */
#adresseEditOverlay .address-edit-checkbox { display:inline-flex; align-items:center; justify-content:center; min-height:28px; }
#adresseEditOverlay .address-edit-checkbox input[type="checkbox"] { appearance:auto !important; -webkit-appearance:checkbox !important; accent-color:var(--color-primary,#063f6c); flex:none; width:15px !important; height:15px !important; min-height:15px !important; max-height:15px !important; padding:0 !important; margin:0; cursor:pointer; }
.address-discount-row { display:grid; grid-template-columns:140px minmax(0,1fr); align-items:end; gap:12px; }
@media(max-width:600px) { .address-discount-row { grid-template-columns:110px minmax(0,1fr); gap:8px; } }

/* Compact customer options without separate tile backgrounds. */
#adresseEditOverlay #editCustomerOptions .address-customer-toggle { justify-content:flex-start; min-height:28px; padding:0; gap:8px; border:0; border-radius:0; background:transparent; box-shadow:none; font-weight:400; }
#adresseEditOverlay #editCustomerOptions .address-customer-toggle .address-edit-checkbox { order:-1; }
#adresseEditOverlay #editZahlungDetails { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
#adresseEditOverlay #editZahlungDetails > .address-edit-field { min-width:0; }

#adresseAnsprechpartnerDelete { margin-right:auto; }
.address-person-row .address-table-actions[hidden] { display:none !important; }

/* Service list: shared rows, full-text preview and catalog beside the amount. */
.leistung-list-item .leistung-row-longtext { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; line-clamp:3; white-space:pre-wrap; overflow:hidden; text-overflow:ellipsis; text-decoration:none; line-height:1.35; }
.leistung-row-longtext[hidden] { display:none; }
.leistung-row-longtext:hover { color:#063f6c; text-decoration:underline; }
.leistung-row-price-group { display:flex; flex-direction:column; align-items:flex-end; gap:5px; min-width:0; }
.leistung-catalog-pill { display:inline-block; max-width:100%; border-radius:999px; padding:2px 8px; background:#edf2f7; color:#52687a; font-size:11px; line-height:1.4; white-space:normal; overflow-wrap:anywhere; text-align:right; }

/* Leistungen use exactly the address row component, without legacy service row rules. */
#leistungen-results { padding:8px 0 10px; }
.leistung-list-item .leistung-row-price,.material-row .leistung-row-price { color:var(--xcraft-list-text); font-size:12px; line-height:1.35; font-weight:600; }

@media(max-width:760px) { .leistung-list-item.address-row,.material-row.address-row { grid-template-columns:minmax(0,1fr) auto auto; } }

/* Touch-only material scanner; shared address dialog components. */
.has-material-barcode #materialSearchInput { padding-right:66px; }
.has-material-barcode #materialSearchClear { right:36px; }
.material-barcode-button { position:absolute;right:5px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:3px;border:0;border-radius:0;background:transparent;color:#063f6c;cursor:pointer; }
.material-barcode-button svg { width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:square; }
.material-barcode-button:hover,.material-barcode-button:focus-visible { background:#eef3f8;outline:2px solid #b6c9da;outline-offset:-2px; }
.material-barcode-overlay { display:flex;z-index:100010; }
.material-barcode-dialog { width:min(560px,calc(100vw - 20px)); }
.material-barcode-video { display:block;width:100%;max-height:50dvh;min-height:150px;object-fit:contain;background:#111; }
.material-barcode-status { margin:12px 0 0;font-size:13px; }
.material-barcode-retry[hidden] { display:none !important; }
