

html {
  scrollbar-gutter: stable;
}

/* Font size */

.r2fs-25 {
  font-size: 0.25rem !important;
}

.r2fs-30 {
  font-size: 0.3rem !important;
}

.r2fs-40 {
  font-size: 0.4rem !important;
}

.r2fs-50 {
  font-size: 0.5rem !important;
}

.r2fs-55 {
  font-size: 0.55rem !important;
}

.r2fs-60 {
  font-size: 0.6rem !important;
}

.r2fs-70 {
  font-size: 0.7rem !important;
}

.r2fs-75 {
  font-size: 0.75rem !important;
}

.r2fs-80 {
  font-size: 0.8rem !important;
}

.r2fs-90 {
  font-size: 0.9rem !important;
}

.r2fs-100 {
  font-size: 1rem !important;
}

.r2fs-110 {
  font-size: 1.1rem !important;
}

.r2fs-120 {
  font-size: 1.2rem !important;
}

.r2fs-130 {
  font-size: 1.3rem !important;
}

.r2fs-140 {
  font-size: 1.4rem !important;
}

.r2fs-150 {
  font-size: 1.5rem !important;
}

.r2fs-160 {
  font-size: 1.6rem !important;
}

.r2fs-170 {
  font-size: 1.7rem !important;
}

.r2fs-180 {
  font-size: 1.8rem !important;
}

.r2fs-190 {
  font-size: 1.9rem !important;
}

.r2fs-200 {
  font-size: 2rem !important;
}

/* Sidebar Footer */

.sidebar-clock {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--sidebar-muted-color);
  text-align: center;
  white-space: nowrap;
}

.sidebar-collapsed .sidebar-clock {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

/* Table Font Size */

table.table-summary td {
  font-size: 0.5rem;
}

/* Table Borderless Override (main.css border-bottom Regel aufheben) */

.table-borderless > tbody > tr > td {
  border-bottom: 0;
}

.table {
  --bs-table-hover-color: var(--default-color);
}

.r2-row-hover {
  border-radius: var(--bs-border-radius-sm, .25rem);
}

.r2-row-hover:hover {
  background-color: var(--bs-table-hover-bg);
  color: var(--bs-table-hover-color);
}

.widget-banner-welcome .widget-banner-text {
  max-width: none;
}

/* Draggable Modals */

.modal-dialog.r2-draggable {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  transform: none !important;
}

.modal-dialog.r2-draggable .modal-header {
  cursor: move;
  user-select: none;
}

.modal-backdrop.r2-backdrop-solid {
  opacity: 1 !important;
  background-color: #fff !important;
}

.modal-backdrop.r2-backdrop-light {
  opacity: 1 !important;
  background-color: var(--background-color) !important;
}

.modal-content.r2-modal-shadow {
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.3) !important;
}

/* modal-fullscreen erzwingt sonst border-radius:0 (main.css) */

.modal-content.modal-rounded {
  border-radius: 0.65rem !important;
}

.modal.r2-modal-blur {
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

@media (min-width: 992px) {
  #modal_add_freight .modal-dialog,
  #modal_edit_freight_options .modal-dialog {
    width: min(1440px, calc(100vw - 4rem));
    max-width: none;
  }
}

#modal_add_freight .row.g-0 { --bs-gutter-x: 0; --bs-gutter-y: 0; }
#modal_add_freight .row.g-1 { --bs-gutter-x: 0.25rem; --bs-gutter-y: 0.25rem; }
#modal_add_freight .row.g-2 { --bs-gutter-x: 0.5rem; --bs-gutter-y: 0.5rem; }
#modal_add_freight .row.g-3 { --bs-gutter-x: 1rem; --bs-gutter-y: 1rem; }
#modal_add_freight .row.g-4 { --bs-gutter-x: 1.5rem; --bs-gutter-y: 1.5rem; }
#modal_add_freight .row.g-5 { --bs-gutter-x: 3rem; --bs-gutter-y: 3rem; }

#modal_add_freight .row.gx-0 { --bs-gutter-x: 0; }
#modal_add_freight .row.gx-1 { --bs-gutter-x: 0.25rem; }
#modal_add_freight .row.gx-2 { --bs-gutter-x: 0.5rem; }
#modal_add_freight .row.gx-3 { --bs-gutter-x: 1rem; }
#modal_add_freight .row.gx-4 { --bs-gutter-x: 1.5rem; }
#modal_add_freight .row.gx-5 { --bs-gutter-x: 3rem; }

#modal_add_freight .row.gy-0 { --bs-gutter-y: 0; }
#modal_add_freight .row.gy-1 { --bs-gutter-y: 0.25rem; }
#modal_add_freight .row.gy-2 { --bs-gutter-y: 0.5rem; }
#modal_add_freight .row.gy-3 { --bs-gutter-y: 1rem; }
#modal_add_freight .row.gy-4 { --bs-gutter-y: 1.5rem; }
#modal_add_freight .row.gy-5 { --bs-gutter-y: 3rem; }


#kt_modal_edit_freight .fs-3,
#modal_add_freight .fs-3 {
  font-size: 1rem !important;
}

#pickup_options .fs-5,
#delivery_options .fs-5 {
  font-size: 1rem !important;
}

/* Transfer-Upload */

.transfer-file-preview {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--bs-border-radius-lg);
}

.transfer-file-preview-summary {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.75rem;
}

.transfer-file-preview-name {
  font-weight: 500;
  color: var(--default-color);
  word-break: break-all;
}

.transfer-file-preview-size {
  font-size: 0.8125rem;
  color: var(--muted-color);
}

/* Container fuer die Datei-Tabellen */
.transfer-file-preview-pages {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.transfer-file-preview-table-heading {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--default-color);
  margin-bottom: 0.35rem;
}

.transfer-file-preview-table td,
.transfer-file-preview-table th {
  vertical-align: middle;
}

/* Format-Spalte */
.transfer-file-preview-format-cell {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 0.4rem;
  row-gap: 0.15rem;
}

.transfer-file-preview-format-label,
.transfer-file-preview-format-value {
  white-space: nowrap;
}

.transfer-file-preview-thumb {
  width: 96px;
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: var(--bs-border-radius);
  background: var(--body-bg, transparent);
  overflow: hidden;
  cursor: zoom-in;
}

.transfer-file-preview-hover-zoom {
  position: fixed;
  z-index: 2000;
  display: none;
  pointer-events: none;
  padding: 2px;
  border: 1px solid var(--border-color);
  border-radius: var(--bs-border-radius);
  background: var(--body-bg, #fff);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.45), 0 0.25rem 0.75rem rgba(0, 0, 0, 0.3);
}

.transfer-file-preview-hover-zoom.is-visible {
  display: block;
}

.transfer-file-preview-hover-zoom canvas {
  display: block;
}

.transfer-file-preview-pdf {
  max-width: 100%;
  max-height: 100%;
}

.transfer-file-preview-spinner {
  vertical-align: -0.15em;
  margin-right: 0.25rem;
  opacity: 0.7;
}

.transfer-file-preview-preflight-table td {
  padding: 0.15rem 0.4rem 0.15rem 0;
  font-size: 0.75rem;
  white-space: nowrap;
}

.transfer-file-preview-preflight-table .badge {
  font-weight: 500;
}

.transfer-file-preview-info-line {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: var(--muted-color);
}

.transfer-file-preview-info-label {
  color: var(--default-color);
}

.transfer-file-preview-ai-row td {
  padding-top: 0.1rem;
  border-top: 0;
}

.transfer-upload-progress-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.transfer-upload-progress-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.transfer-upload-progress-ring-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  flex: none;
}

.transfer-upload-progress-ring {
  width: 40px;
  height: 40px;
  /* Start der Fuellung oben (12 Uhr) statt am Standard-Nullpunkt (3 Uhr) */
  transform: rotate(-90deg);
}

.transfer-upload-progress-ring-track {
  fill: none;
  stroke: var(--border-color);
  stroke-width: 4;
}

.transfer-upload-progress-ring-bar {
  fill: none;
  stroke: var(--accent-color);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.15s linear;
}

.transfer-upload-progress-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--default-color);
}

.transfer-upload-progress-info {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.transfer-upload-progress-kind {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted-color);
}

.transfer-upload-progress-filename {
  font-size: 0.8125rem;
  color: var(--default-color);
  word-break: break-all;
}

.transfer-upload-progress-ring-wrap.is-running .transfer-upload-progress-ring {
  animation: transfer-processing-ring-spin 0.9s linear infinite;
}

.transfer-upload-progress-ring-wrap.is-done .transfer-upload-progress-ring-bar {
  stroke: #2e7d32;
}

.transfer-upload-progress-ring-wrap.is-done .transfer-upload-progress-ring-text {
  color: #2e7d32;
}

.transfer-upload-progress-ring-wrap.is-error .transfer-upload-progress-ring-bar {
  stroke: #c62828;
}

.transfer-upload-progress-ring-wrap.is-error .transfer-upload-progress-ring-text {
  color: #c62828;
}

@keyframes transfer-processing-ring-spin {
  from { transform: rotate(-90deg); }
  to { transform: rotate(270deg); }
}

/* Capzo-Workflow-Fortschritt (4 Schritte, siehe index.html) */
.capzo-steps {
  display: flex;
  align-items: flex-start;
  gap: 0.25rem;
  animation: capzo-steps-eintritt 0.5s ease both;
}

@keyframes capzo-steps-eintritt {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.capzo-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}

.capzo-step-circle {
  position: relative;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: var(--surface-color);
  border: 2px solid var(--border-color);
  color: var(--light-color);
  transition: background 0.35s ease, border-color 0.35s ease, color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.capzo-step-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-color);
  transition: color 0.35s ease;
}

.capzo-step-connector {
  flex: 1 1 24px;
  align-self: flex-start;
  margin-top: 26px;
  height: 2px;
  background: var(--border-color);
  transition: background 0.35s ease;
}

.capzo-step.is-active .capzo-step-circle {
  background: linear-gradient(135deg, var(--accent-color), var(--info-color));
  border-color: transparent;
  color: var(--contrast-color, #fff);
  transform: scale(1.08);
  box-shadow: 0 6px 16px -4px rgba(0, 0, 0, 0.35);
}

.capzo-step.is-active .capzo-step-circle::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--accent-color);
  animation: capzo-step-pulse 1.8s ease-out infinite;
}

@keyframes capzo-step-pulse {
  0% { transform: scale(0.85); opacity: 0.7; }
  100% { transform: scale(1.35); opacity: 0; }
}

.capzo-step.is-active .capzo-step-label {
  color: var(--default-color);
  font-weight: 600;
}

.capzo-step.is-done .capzo-step-circle {
  background: var(--success-color);
  border-color: var(--success-color);
  color: var(--contrast-color, #fff);
}

.capzo-step.is-done .capzo-step-label {
  color: var(--default-color);
}

.capzo-step.is-done + .capzo-step-connector {
  background: var(--success-color);
}

@media (max-width: 640px) {
  .capzo-steps {
    flex-direction: column;
    align-items: stretch;
  }

  .capzo-step {
    flex-direction: row;
    text-align: left;
    gap: 0.75rem;
  }

  .capzo-step-label {
    align-self: center;
  }

  .capzo-step-connector {
    width: 2px;
    height: 20px;
    margin: 0 0 0 25px;
    flex: none;
  }
}

/* Notifications */
.notification-list-full {
  max-height: none;
}

/* Notification Detail Modal */
#notificationDetailModal .modal-dialog {
  width: 100%;
}

#notificationImageLightbox .modal-dialog {
  width: 100%;
}

/* Notification-Bilder */
.notification-images {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.notification-image-thumb {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  object-fit: cover;
  cursor: zoom-in;
  border: 1px solid var(--border-color);
}

.notification-image-hover-zoom {
  display: none;
  position: fixed;
  z-index: 2000;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 2px solid var(--surface-color);
  background: var(--surface-color);
  object-fit: contain;
  pointer-events: none;
}

.notification-image-lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: var(--radius-lg);
}

.notification-image-lightbox-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
}

.notification-image-lightbox-nav {
  display: none;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  color: var(--default-color);
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

/* Ungelesen-Counter im Header */
@keyframes notification-badge-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger-color), transparent 40%);
  }
  50% {
    box-shadow: 0 0 10px 4px color-mix(in srgb, var(--danger-color), transparent 15%);
  }
}

.header-badge {
  animation: notification-badge-pulse 2.5s ease-in-out infinite;
}

/* Ungelesene Notifications deutlicher kennzeichnen */
.notification-item[data-notification-type="info"] { --notification-accent: var(--info-color); }
.notification-item[data-notification-type="warning"] { --notification-accent: var(--warning-color); }
.notification-item[data-notification-type="success"] { --notification-accent: var(--success-color); }
.notification-item[data-notification-type="danger"] { --notification-accent: var(--danger-color); }

.notification-item.unread {
  border-left: 3px solid var(--notification-accent, var(--danger-color));
  padding-left: calc(var(--spacing-lg) - 3px);
  background-color: color-mix(in srgb, var(--notification-accent, var(--danger-color)), transparent 95%);
}

.notification-item.unread:hover {
  background-color: color-mix(in srgb, var(--notification-accent, var(--danger-color)), transparent 90%);
}

.notification-item.unread .notification-title {
  font-weight: 700;
}

.notification-item.unread .notification-dot {
  display: none;
}

.notification-read-label {
  margin-left: 8px;
  color: var(--success-color);
  font-size: 0.6875rem;
  font-weight: 500;
}

.notification-read-label i {
  margin-right: 2px;
}

.notification-unread-label {
  margin-left: 8px;
  color: var(--danger-color);
  font-size: 0.6875rem;
  font-weight: 500;
}

.notification-unread-label i {
  margin-right: 2px;
  font-size: 0.5rem;
}

/* "Nudge"-Sprechblase am Glocken-Icon */
@keyframes notification-nudge-in {
  from { opacity: 0; transform: translate(-50%, -6px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes notification-nudge-bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 5px); }
}

.notification-nudge {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  width: 220px;
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--danger-color);
  color: var(--contrast-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  z-index: 1000;
  animation: notification-nudge-in 0.4s ease-out,
             notification-nudge-bounce 1.8s ease-in-out 0.4s infinite;
}

.notification-nudge::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: var(--danger-color);
}

.notification-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
}

.notification-priority-filter .dropdown-toggle i {
  margin-right: 4px;
}

.page-dashboard .card.notification-list-card {
  overflow: visible;
}

.page-dashboard .card.capzo-position-card {
  overflow: visible;
}

body.no-card-hover .page-dashboard .card:hover,
body.no-card-hover .page-dashboard .dash-stat-card:hover {
  transform: none;
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    var(--glass-shadow);
}

.ticket-screenshots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-sm);
}

.ticket-screenshot-thumb {
  max-width: 400px;
  width: 100%;
  border-radius: var(--border-radius-sm, 4px);
}

.ticket-screenshot-thumb-round {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  cursor: zoom-in;
}

/* Hover-Zoom */
.ticket-screenshot-hover-zoom {
  display: none;
  position: fixed;
  z-index: 2000;
  border-radius: var(--bs-border-radius, 4px);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.45), 0 0.25rem 0.75rem rgba(0, 0, 0, 0.3);
  border: 2px solid var(--body-bg, #fff);
  background: var(--body-bg, #fff);
  object-fit: contain;
  pointer-events: none;
}

.modal-dialog-scrollable .modal-content > form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.priority-criteria-list {
  list-style: none;
  display: grid;
  gap: 0.35rem;
  margin: 0.5rem 0 0;
  padding: 0.75rem 1rem;
  background: var(--card-bg, rgba(0, 0, 0, 0.03));
  border-radius: var(--border-radius-sm, 4px);
  font-size: 0.8125rem;
  color: var(--muted-color);
}

.priority-criteria-list strong {
  color: var(--default-color);
}

.page-subtitle {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted-color);
}

#newTicketModal .modal-header {
  align-items: flex-start;
}

.modal-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--muted-color);
}

.icon-calc-plus {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
}

.collapse-chevron {
  display: inline-block;
  transition: transform var(--transition-fast, 0.2s);
}

[data-bs-toggle="collapse"][aria-expanded="true"] .collapse-chevron {
  transform: rotate(90deg);
}

@media (min-width: 992px) {
  .calc-summary-sticky {
    position: sticky;
    top: var(--spacing-lg, 1rem);
  }
}

.calc-summary-sticky .card-header {
  border-bottom: 0;
  padding-bottom: var(--spacing-sm, 0.5rem);
}

.capzo-icon-action.text-primary:hover {
  color: var(--contrast-color);
  background-color: var(--accent-color);
}

.capzo-icon-action.text-warning:hover {
  color: var(--heading-color);
  background-color: var(--warning-color);
}

.capzo-icon-action.text-danger:hover {
  color: var(--contrast-color);
  background-color: var(--danger-color);
}

.capzo-icon-action.text-info:hover {
  color: var(--contrast-color);
  background-color: var(--info-color);
}

.capzo-icon-action.text-success:hover {
  color: var(--contrast-color);
  background-color: var(--success-color);
}

.page-dashboard .capzo-position-accordion-toggle {
  border: 2px solid var(--border-color);
  padding: 0.4rem 0.75rem;
  font-size: 0.9375rem;
  border-radius: var(--radius-lg);
  background-color: var(--background-color);
  color: var(--muted-color);
  transition: all var(--transition-base, 0.2s);
}

.page-dashboard .capzo-position-accordion-toggle .collapse-chevron {
  font-size: 1.25rem;
}

.page-dashboard .capzo-position-accordion-toggle:hover {
  border-color: var(--accent-color);
  background-color: color-mix(in srgb, var(--accent-color), transparent 95%);
}

/* Wie bei der Dropzone faerbt sich beim Hovern das Icon, nicht der Text. */
.page-dashboard .capzo-position-accordion-toggle:hover .collapse-chevron {
  color: var(--accent-color);
}

.capzo-position-card {
  cursor: pointer;
}

.capzo-position-drag-handle {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--muted-color);
  opacity: 0.5;
  cursor: grab;
  transition: opacity var(--transition-fast, 0.2s);
}

.capzo-position-card:hover .capzo-position-drag-handle {
  opacity: 1;
}

.capzo-position-drag-handle:active {
  cursor: grabbing;
}

.capzo-position-row.is-dragging {
  opacity: 0.45;
}

/* Kompakte Zeilenhoehe */
.capzo-position-card > .card-body {
  padding: var(--spacing-sm, 0.5rem) var(--spacing-md, 1rem);
}

.capzo-position-card .upload-dropzone-compact {
  padding: 0.4rem 0.75rem;
}

.capzo-position-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.capzo-position-info-icon i {
  font-size: 1.5rem;
}

.capzo-position-info-popover {
  --bs-popover-max-width: min(600px, calc(100vw - 2rem));
}

.capzo-add-position {
  width: 48px;
  height: 48px;
  padding: 0;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--muted-color);
  border: none;
  background: none;
}

.capzo-add-position:hover {
  color: var(--accent-color);
}

.capzo-position-preview {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.capzo-position-preview-thumb {
  width: 34px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: var(--bs-border-radius);
  background: var(--body-bg, transparent);
  overflow: hidden;
  cursor: zoom-in;
}

.capzo-position-preview-canvas {
  max-width: 100%;
  max-height: 100%;
}

.capzo-position-preview-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.capzo-position-preview-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--default-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.capzo-position-preview-meta {
  font-size: 0.75rem;
  color: var(--muted-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.capzo-upload-plumbing-hidden {
  position: absolute;
  top: 0;
  left: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: -1;
}

.capzo-position-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Aufgeklappter Details-Bereich einer Capzo-Position */
.capzo-position-details {
  margin-top: var(--spacing-md, 1rem);
  padding-top: var(--spacing-md, 1rem);
  border-top: 1px solid var(--border-color);
  cursor: default;
}

.capzo-position-detail-section + .capzo-position-detail-section {
  margin-top: var(--spacing-md, 1rem);
  padding-top: var(--spacing-md, 1rem);
  border-top: 1px solid var(--border-color);
}

/* Konfektionszeilen einer Position (Live-Vorschau-Spalte) */
.capzo-konfektion-seite {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.capzo-konfektion-seite-label {
  flex: 0 0 5.5rem;
  font-size: 0.75rem;
  color: var(--muted-color);
}

.capzo-konfektion-art {
  flex: 1 1 8rem;
  min-width: 7rem;
}

.capzo-konfektion-variante {
  flex: 0 1 7rem;
}

.capzo-konfektion-wert,
.capzo-konfektion-rand {
  flex: 0 1 5rem;
}

/* --- Masse (Breite/Hoehe/Anzahl), portiert aus dem PrePressTool ---------- */
.pp-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-sm) var(--spacing-md);
}

.pp-field + .pp-field {
  margin-top: var(--spacing-sm);
}

/* Feste Label-Spur */
.pp-field-label {
  flex: 0 0 5.5rem;
  max-width: 100%;
  font-size: 0.8125rem;
  color: var(--muted-color);
  margin: 0;
}

.pp-field-control {
  flex: 1 1 7rem;
  min-width: 0;
}

.pp-pflicht-stern {
  color: var(--danger-color);
  font-weight: 600;
  line-height: 1;
  margin-left: 0.125rem;
}

/* Breite und Hoehe bilden ein Paar */
.pp-masse-paar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: var(--spacing-sm);
}

.pp-masse-paar > .pp-field {
  grid-column: 1;
}

.pp-masse-paar + .pp-field {
  margin-top: var(--spacing-sm);
}

.pp-kette {
  grid-column: 2;
  grid-row: 1 / -1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--pp-kette-spur, 1.75rem);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--light-color);
  transition: color var(--transition-fast);
}

.pp-kette::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 50%;
  border: 1px solid var(--border-color);
  border-left: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: border-color var(--transition-fast);
}

.pp-kette-glyph {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--surface-color);
  padding: 0.1875rem 0;
}

.pp-kette .pp-kette-zu {
  display: none;
}

.pp-kette[aria-pressed="true"] .pp-kette-auf {
  display: none;
}

.pp-kette[aria-pressed="true"] .pp-kette-zu {
  display: block;
}

.pp-kette[aria-pressed="true"] {
  color: var(--accent-color);
}

.pp-kette[aria-pressed="true"]::before {
  border-color: var(--accent-color);
}

.pp-stepper {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex: 1 1 9rem;
  min-width: 0;
}

.pp-stepper > .pp-stepper-feld {
  flex: 1 1 auto;
  min-width: 2.5rem;
}

.pp-stepper > .pp-stepper-btn {
  flex-shrink: 0;
}

.pp-sq-9 {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
}

/* Zahlenfeld ohne native Pfeilchen - die Schritte kommen ueber den Stepper. */
.no-spinner {
  -moz-appearance: textfield;
  appearance: textfield;
}

.no-spinner::-webkit-outer-spin-button,
.no-spinner::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* --- Live-Vorschau, portiert aus dem PrePressTool ------------------------ */

/* Segment-Umschalter (Konfektion/Live/Kombiniert). */
.pp-segment {
  display: inline-flex;
  gap: 0.125rem;
  padding: 0.125rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--surface-color);
}

.pp-segment--auto {
  flex-wrap: wrap;
}

.pp-segment--auto .pp-segment-btn {
  flex: 0 1 auto;
}

.pp-segment-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  white-space: nowrap;
  border: 0;
  background: transparent;
  border-radius: calc(var(--radius-md) - 0.125rem);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-color);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.pp-segment-btn:hover {
  color: var(--default-color);
}

/* Aktiver Zustand wird per JS gesetzt (Klasse .active). */
.pp-segment-btn.active,
.pp-segment-btn.active:hover {
  background-color: var(--accent-color);
  color: var(--contrast-color);
}

.pp-segment-btn-sm {
  padding: 0.3125rem 0.75rem;
  font-size: 0.75rem;
}

/* Flaechen-Hilfsklassen. */
.pp-surface { background-color: var(--surface-color); }
.pp-soft { background-color: var(--background-color); }
.pp-text-sm { font-size: 0.875rem; }
.pp-text-xs { font-size: 0.75rem; }
.pp-sq-7 { width: 1.75rem; height: 1.75rem; flex-shrink: 0; }
.pp-sq-12 { width: 3rem; height: 3rem; flex-shrink: 0; }
.pp-w-6 { width: 1.5rem; flex-shrink: 0; }
.pp-w-36 { width: 9rem; flex-shrink: 0; }
.pp-minw-240 { min-width: 240px; }
.pp-maxw-md { max-width: 28rem; }
.pp-object-cover { object-fit: cover; }
.pp-border-dashed { border-style: dashed !important; }
.pp-min-w-0 { min-width: 0; }

/* Halbtransparente Flaeche der Zoom-Buttons ueber der Vorschau. */
.pp-surface-translucent {
  background-color: color-mix(in srgb, var(--surface-color), transparent 20%);
  backdrop-filter: blur(4px);
}

/* Buehne */
.capzo-vorschau-stage {
  min-height: 220px;
}

/* Zoom-/Pan-Ebene */
.capzo-vorschau-zoom-layer {
  transform-origin: center center;
  will-change: transform;
}

/* Warn-/Fehler-Badges im Vorschau-Overlay */
.pp-warn-badge {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  max-width: 2rem;
  border: 1px solid;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: default;
  transition: max-width var(--transition-slow);
}

.pp-warn-badge:hover,
.pp-warn-badge:focus {
  max-width: 19rem;
}

.pp-warn-badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  flex-shrink: 0;
  padding: 0.25rem 0;
}

.pp-warn-badge-text {
  width: 15rem;
  flex-shrink: 0;
  padding: 0.25rem 0.625rem 0.25rem 0;
  font-size: 0.6875rem;
  line-height: 1.35;
}

.pp-warn-badge-fehler {
  background-color: var(--danger-color-light);
  border-color: color-mix(in srgb, var(--danger-color), transparent 60%);
  color: var(--danger-color);
}

.pp-warn-badge-warnung {
  background-color: var(--warning-color-light);
  border-color: color-mix(in srgb, var(--warning-color), transparent 60%);
  color: var(--warning-color);
}

/* Karussell der Motive einer Position. */
.pp-motiv-tile-wrap {
  position: relative;
  flex-shrink: 0;
}

.pp-motiv-tile {
  position: relative;
  display: block;
  width: 3rem;
  height: 3rem;
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: transparent;
  transition: border-color var(--transition-fast);
}

.pp-motiv-tile:hover { border-color: var(--border-color-dark); }
.pp-motiv-tile.active { border-color: var(--accent-color); }

.pp-motiv-tile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Laufende Nummer, nur beim Ueberfahren sichtbar. */
.pp-motiv-tile-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgb(0 0 0 / 0.45);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.pp-motiv-tile-wrap:hover .pp-motiv-tile-num { opacity: 1; }

/* Entfernen-Badge oben rechts, ragt bewusst leicht heraus. */
.pp-motiv-tile-remove {
  position: absolute;
  top: -0.375rem;
  right: -0.375rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-full);
  background-color: var(--heading-color);
  color: var(--surface-color);
  font-size: 0.6875rem;
  line-height: 1;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.pp-motiv-tile-wrap:hover .pp-motiv-tile-remove,
.pp-motiv-tile-remove:focus-visible { opacity: 1; }

/* Gestrichelte "Motiv hinzufuegen"-Kachel am Ende des Karussells. */
.pp-motiv-add {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border: 2px dashed var(--border-color-dark);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--muted-color);
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.pp-motiv-add:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

/* Ausgelesene Datei-Daten als zweispaltiges Raster */
.pp-datei-info {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: var(--spacing-sm);
  row-gap: 0.125rem;
  align-items: baseline;
  margin: var(--spacing-xs) 0 0;
}

.pp-datei-info dt,
.pp-datei-info dd {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pp-datei-info dt {
  font-weight: 400;
  color: var(--muted-color);
}

.pp-datei-info dd {
  color: var(--default-color);
  font-variant-numeric: tabular-nums;
}

/* Datei-Handhabung neben der Miniatur */
.dateihandling-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-width: 0;
  background-color: var(--surface-color);
  border-color: var(--border-color);
  color: var(--muted-color);
  transition: background-color var(--transition-fast),
              border-color var(--transition-fast),
              color var(--transition-fast);
}

.dateihandling-btn:hover {
  border-color: var(--accent-color);
  color: var(--default-color);
}

.dateihandling-btn.active {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--contrast-color);
}

.dateihandling-btn svg { flex-shrink: 0; }

.dateihandling-btn span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Eintraege des Drei-Punkte-Menues ueber der Vorschau. */
.capzo-vorschau-menu-item {
  border: 0;
  background: transparent;
  color: var(--default-color);
  transition: background-color var(--transition-fast);
}

.capzo-vorschau-menu-item:hover {
  background-color: color-mix(in srgb, var(--accent-color), transparent 92%);
}

.capzo-position-detail-heading {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-color);
  margin-bottom: 0.5rem;
}

.capzo-cart-thumb {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.calc-summary-body {
  padding-top: 0;
}

.margin-individual-field {
  width: 7rem;
}

#accordionSummary {
  --bs-accordion-border-radius: 0.75rem;
  --bs-accordion-inner-border-radius: 0.7rem;
}

#accordionSummary .accordion-item {
  border-top: var(--bs-accordion-border-width) solid var(--bs-accordion-border-color);
  border-radius: var(--bs-accordion-border-radius);
}

#accordionSummary .accordion-item + .accordion-item {
  margin-top: 0.25rem;
}

#accordionSummary .accordion-button {
  border-top-left-radius: var(--bs-accordion-inner-border-radius);
  border-top-right-radius: var(--bs-accordion-inner-border-radius);
}

#accordionSummary .accordion-button.collapsed {
  border-bottom-left-radius: var(--bs-accordion-inner-border-radius);
  border-bottom-right-radius: var(--bs-accordion-inner-border-radius);
}

/* Auth-Seiten (Login + Passwort-vergessen-Flow), EliteAdmin-Design mit Hintergrundbild */

.login-flag {
  width: 20px;
  height: 20px;
  object-fit: cover;
}

.page-auth {
  background-image: url("../../images/bg23a.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

[data-theme="dark"] .page-auth {
  background-image: url("../../images/bg06.jpg");
}

.page-auth .auth-split-form {
  background: transparent;
}

.page-auth .auth-split-brand {
  background: linear-gradient(135deg, rgba(0, 3, 20, 0.55), rgba(0, 3, 15, 0.35));
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.page-auth .auth-layout {
  background: transparent;
}

/* Login-/Auth-Card als helles/dunkles Glas, analog zum Dashboard-Glass-Skin */
.page-auth .auth-card {
  background: var(--glass-bg, var(--surface-color));
  -webkit-backdrop-filter: blur(var(--glass-blur, 20px)) saturate(var(--glass-saturate, 160%));
  backdrop-filter: blur(var(--glass-blur, 20px)) saturate(var(--glass-saturate, 160%));
  border: 1px solid var(--glass-border, var(--border-color));
  box-shadow: inset 0 1px 0 var(--glass-highlight, transparent), var(--glass-shadow, var(--shadow-lg));
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .page-auth .auth-card {
    background: var(--surface-color);
  }
}

.auth-error-code {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-color);
  margin: 0 0 var(--spacing-xs);
}

.auth-error-actions {
  display: flex;
  gap: var(--spacing-sm);
}

.auth-error-actions .btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
}

@media (max-width: 575.98px) {
  .auth-error-actions {
    flex-direction: column;
  }
}

/* Presence-Dropdown ("Wer ist online") */
.presence-status {
  font-size: 0.75rem;
  color: var(--muted-color);
}

.presence-status.is-connected {
  color: var(--success-color);
}

/* Online-Kollegen immer oben */
.presence-dropdown .dropdown-toggle::after {
  display: none;
}

.presence-list {
  display: flex;
  flex-direction: column;
}

.presence-item {
  order: 1;
  flex-wrap: wrap;
}

.presence-item-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 0;
  position: relative;
}

.presence-item.is-online {
  order: 0;
}

/* Accordion-Nachrichtenfeld unter einem Presence-Eintrag */
.presence-compose {
  flex-basis: 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
}

.presence-compose.is-open {
  max-height: 96px;
}

.presence-compose-inner {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 0 4px;
}

.presence-compose-input {
  flex: 1;
  resize: none;
  border: 1px solid var(--border-color);
  border-radius: var(--bs-border-radius);
  background: var(--background-color);
  color: var(--default-color);
  font-size: 0.8125rem;
  padding: 0.5rem 0.625rem;
  max-height: 72px;
}

.presence-compose-input:focus {
  outline: none;
  border-color: var(--accent-color);
  background: var(--surface-color);
}

.presence-compose-send {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--accent-color);
  color: var(--contrast-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.875rem;
  transition: opacity 0.2s;
}

.presence-compose-send:hover {
  opacity: 0.85;
}

.chat-send-btn i,
.presence-compose-send i {
  transform: translate(-1px, 1px);
}

.message-status.seen {
  color: var(--success-color);
}

.message-bubble:not(.message-bubble-info) {
  white-space: pre-wrap;
}

.message-bubble.message-bubble-info {
  display: block;
  text-decoration: none;
  cursor: pointer;
  border-left: 3px solid var(--info-color, #0dcaf0);
}

.message-bubble.message-bubble-info:hover {
  opacity: 0.85;
}

/* Kreuz-Button zum Leeren der Team-Suche, rechts im Suchfeld. */
.presence-search-wrap {
  position: relative;
  margin-top: .5em;
}

.presence-search-wrap .form-control {
  padding-right: 2rem;
}

.presence-search-clear {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: none;
  background: none;
  color: var(--muted-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  border-radius: 50%;
  cursor: pointer;
}

.presence-search-clear:hover {
  background: var(--border-color);
  color: var(--default-color);
}

.presence-compose-emoji {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--muted-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}

.presence-compose-emoji:hover {
  background: var(--border-color);
  color: var(--default-color);
}

/* Emoji-Picker */
.emoji-picker-popover {
  position: fixed;
  z-index: 3000;
  width: 260px;
  max-height: 220px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  padding: 8px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--bs-border-radius-lg);
  box-shadow: var(--shadow-lg);
}

.emoji-picker-btn {
  border: none;
  background: none;
  font-size: 1.25rem;
  line-height: 1.6;
  border-radius: var(--bs-border-radius);
  cursor: pointer;
  padding: 2px 0;
}

.emoji-picker-btn:hover {
  background: var(--background-color);
}

/* Grenze zwischen Online- und Offline-Gruppe */
.presence-item.presence-item--last-online {
  border-bottom-width: .5em;
}

.presence-item.is-online:hover {
  background-color: color-mix(in srgb, var(--success-color), transparent 92%);
}

.presence-item.is-offline:hover {
  background-color: color-mix(in srgb, var(--muted-color), transparent 92%);
}

/* Name und Online/Offline-Status in einer Zeile, Status rechtsbuendig. */
.notification-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.notification-title-row .notification-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.presence-status-label {
  flex-shrink: 0;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: .02em;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast, .15s ease);
}

.presence-item:hover .presence-status-label {
  opacity: 1;
}

.presence-status-label-online {
  color: var(--success-color);
}

.presence-status-label-offline {
  color: var(--muted-color);
}

.presence-item.is-online .presence-status-label-offline,
.presence-item.is-offline .presence-status-label-online {
  display: none;
}

.presence-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.presence-dot {
  display: block;
  position: absolute;
  right: -1px;
  bottom: -1px;
  box-sizing: border-box;
  width: 10px;
  height: 10px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 2px solid var(--surface-color);
  background: var(--muted-color);
}

.presence-online-count {
  animation: none;
  box-shadow: none;
  background: var(--success-color);
}

.nav-icon-has-badge {
  position: relative;
}

.chat-unread-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  animation: none;
  box-shadow: none;
  background: var(--success-color);
}

.presence-item.is-online .presence-dot {
  background: var(--success-color);
}

.presence-item.is-offline .presence-avatar-wrap,
.presence-item.is-offline .notification-content {
  opacity: 0.6;
}

/* Capzo-Seitentitel */
.page-title-with-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.page-title-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  flex-shrink: 0;
}

/* Capzo-Startseite */
.capzo-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-lg) 0;
  text-align: center;
}

.capzo-intro-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--accent-color), transparent 88%);
  color: var(--accent-color);
}

.capzo-intro-tagline {
  margin: 0;
  font-style: italic;
  color: var(--muted-color);
}

.capzo-intro-text {
  margin: 0;
  color: var(--muted-color);
}

/* Capzo-Preflight-Ergebnis */
.capzo-preflight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: var(--spacing-sm);
}

@media (max-width: 767.98px) {
  .capzo-preflight-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

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

.capzo-preflight-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--surface-color);
}

.capzo-preflight-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.capzo-preflight-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-color);
}

.capzo-preflight-value {
  font-weight: 600;
}

/* Chat */
.chat-header-info span.is-offline {
  color: var(--muted-color);
}

.chat-header-info span.is-online {
  color: var(--success-color);
}

.chat-item-status.is-online {
  background: var(--success-color);
}

.chat-item-status.is-offline {
  background: var(--muted-color);
}

.chat-input {
  border-top: none;
  border-bottom: 1px solid var(--border-color);
}

.chat-container {
  height: calc(100vh - 200px);
}

/* Datenschutzhinweis ueber dem Chatfenster */
.chat-shell {
  --chat-shell-height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: var(--chat-shell-height);
}

/* min-height muss aktiv auf 0 */
.chat-shell .chat-container {
  height: auto;
  flex: 1;
  min-height: 0;
}

.chat-privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent-color);
  border-radius: var(--bs-border-radius-lg, 0.5rem);
  background-color: color-mix(in srgb, var(--accent-color), transparent 94%);
  color: var(--muted-color);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.chat-privacy-note i {
  flex: 0 0 auto;
  margin-top: 0.1rem;
  color: var(--accent-color);
  font-size: 0.9375rem;
}

@media (max-width: 767.98px) {
  .chat-shell {
    --chat-shell-height: calc(100vh - 180px);
  }
}

@media (max-width: 575.98px) {
  .chat-shell {
    --chat-shell-height: calc(100vh - 160px);
    gap: 0.5rem;
  }

  .chat-privacy-note {
    border-radius: 0;
    border-right: none;
    font-size: 0.75rem;
  }
}

/* Datei-Anhaenge */
.message-file-download.disabled {
  cursor: not-allowed;
  opacity: 0.5;
  pointer-events: none;
}

.chat-attachment-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--muted-color);
}

.chat-attachment-progress-bar {
  flex: 1;
  height: 4px;
  border-radius: var(--radius-full, 4px);
  background: var(--border-color);
  position: relative;
  overflow: hidden;
}

.chat-attachment-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--progress, 0%);
  border-radius: var(--radius-full, 4px);
  background: var(--accent-color);
  transition: width 0.15s ease;
}

/* Enter-Modus-Umschalter neben dem Eingabefeld */
.chat-enter-mode {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0 0.5rem 0 0.25rem;
  min-height: 44px;
  cursor: pointer;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
}

.chat-enter-mode .form-check-input {
  float: none;
  margin: 0;
  flex: 0 0 auto;
}

.chat-enter-mode-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--muted-color);
  transition: color var(--transition-fast, 0.2s);
}

.chat-enter-mode.is-send .chat-enter-mode-label {
  color: var(--accent-color);
}

@media (max-width: 575.98px) {
  .chat-enter-mode {
    padding: 0 0.25rem;
  }

  .chat-enter-mode-text {
    display: none;
  }
}

.presence-menu {
  width: 420px;
}

.toast-action-row {
  display: flex;
  justify-content: flex-end;
  padding: 0 0.75rem 0.5rem;
}

.toast-action-link {
  border: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.15);
  color: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: var(--bs-border-radius-pill, 999px);
  text-decoration: none;
  transition: background 0.15s ease;
}

.toast-action-link:hover {
  background: rgba(255, 255, 255, 0.3);
  color: inherit;
}

.toast {
  position: relative;
}

.toast .toast-body {
  padding-right: 2rem;
}

.toast-close-top-right {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  margin: 0;
}

.form-loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 4000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  text-align: center;
}

.form-loading-overlay.show {
  display: flex;
}

.form-loading-overlay .spinner-border {
  width: 3rem;
  height: 3rem;
}

/* Benutzerverwaltung (users.html) */
.users-stat-accent-total { background: var(--accent-color); }
.users-stat-icon-total {
  background: color-mix(in srgb, var(--accent-color), transparent 88%);
  color: var(--accent-color);
}
.users-stat-accent-active { background: var(--success-color); }
.users-stat-icon-active { background: var(--success-color-light); color: var(--success-color); }
.users-stat-accent-admin { background: var(--info-color); }
.users-stat-icon-admin { background: var(--info-color-light); color: var(--info-color); }
.users-stat-accent-inactive { background: var(--danger-color); }
.users-stat-icon-inactive { background: var(--danger-color-light); color: var(--danger-color); }

/* Benutzerverwaltung (users.html) */
.page-dashboard .dash-stat-card.users-stat-filter {
  width: 100%;
  border: 1px solid var(--card-border);
  margin: 0;
  padding: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.page-dashboard .dash-stat-card.users-stat-filter:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--input-focus-ring);
}

.page-dashboard .dash-stat-card.users-stat-filter.active {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 1px var(--accent-color);
}

/* Benutzerverwaltung (users.html) */
.users-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
}

.users-toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.users-search {
  position: relative;
  display: flex;
  align-items: center;
}

@media (max-width: 640px) {
  .users-toolbar-right {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .users-search input {
    width: 100%;
    min-width: 0;
  }
}

.users-search i {
  position: absolute;
  left: 0.75rem;
  color: var(--muted-color);
  font-size: 0.875rem;
  pointer-events: none;
}

.users-search input {
  padding: 0.375rem 0.75rem 0.375rem 2rem;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  background: var(--input-bg);
  color: var(--default-color);
  font-size: 0.875rem;
  min-width: 280px;
}

.users-search input:focus {
  outline: none;
  border-color: var(--input-focus-border);
  box-shadow: 0 0 0 3px var(--input-focus-ring);
}

/* Benutzerverwaltung (users.html): Avatar + Name/E-Mail in der ersten Spalte */
.users-user {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.users-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}

.users-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.users-user-name {
  font-weight: 600;
  color: var(--heading-color);
}

.users-user-email {
  font-size: 0.8125rem;
  color: var(--muted-color);
}

.users-meta {
  color: var(--muted-color);
  font-size: 0.875rem;
  white-space: nowrap;
}

.users-th-actions {
  text-align: right;
}

/* Aktions-Buttons buendig unter der rechtsbuendigen Spaltenueberschrift */
#userManagementTable .table-actions {
  justify-content: flex-end;
}

/* Benutzerverwaltung (users.html): Rollen-/Status-Badges in der Tabelle */
.users-role-badge,
.users-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}

.users-role-badge-admin {
  background: var(--info-color-light);
  color: var(--info-color);
}

.users-role-badge-standard {
  background: var(--table-hover-bg);
  color: var(--muted-color);
}

.users-status-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: currentColor;
}

.users-status-badge-active {
  background: var(--success-color-light);
  color: var(--success-color);
}

.users-status-badge-inactive {
  background: var(--danger-color-light);
  color: var(--danger-color);
}

.users-status-badge-limited {
  background: var(--warning-color-light);
  color: var(--warning-color);
}

/* Online-Anzeige */
.users-presence-badge {
  background: var(--table-hover-bg);
  color: var(--muted-color);
}

.users-presence-badge.is-online {
  background: var(--success-color-light);
  color: var(--success-color);
}

/* Benutzerverwaltung (users.html) */
.users-lock-action {
  display: flex;
  margin: 0;
}

/* Benutzerverwaltung (users.html) */
.users-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-2xl) var(--spacing-lg);
  color: var(--muted-color);
  text-align: center;
}

.users-empty-state i {
  font-size: 2rem;
}

/* Benutzerverwaltung (users.html): Detail-Modal (rein informativ) */
.users-detail-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.users-detail-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.users-detail-name {
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--heading-color);
}

.users-detail-email {
  color: var(--muted-color);
  font-size: 0.875rem;
}

.users-detail-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
  margin: 0;
}

.users-detail-list dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-color);
  margin-bottom: 2px;
}

.users-detail-list dd {
  margin: 0;
  color: var(--default-color);
}

.users-detail-about {
  margin-top: var(--spacing-md);
}

.users-detail-about dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-color);
  margin-bottom: 2px;
}

.users-detail-about dd {
  margin: 0;
  color: var(--default-color);
  white-space: pre-line;
}

/* Open-Tabs-Leiste (open_tabs.html) */
.open-tabs-bar {
  position: sticky;
  top: var(--header-height);
  z-index: 900;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
}

.open-tabs-scroll {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 6px var(--spacing-md);
  scrollbar-width: thin;
}

@media (min-width: 576px) {
  .open-tabs-scroll {
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-lg);
  }
}

.open-tab {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  max-width: 220px;
  padding: 6px 12px 6px 12px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--default-color) 5%, var(--header-bg) 95%);
  white-space: nowrap;
  transition: background var(--transition-fast);
  box-shadow: 0 0 0 2px var(--header-bg);
}

.open-tab.active {
  z-index: 2;
}

.open-tab:hover {
  z-index: 3;
}

.open-tab.grouped-with-previous {
  margin-left: -10px;
}

.open-tab.new-family {
  margin-left: 12px;
}

.open-tab:hover {
  background: color-mix(in srgb, var(--default-color) 10%, var(--header-bg) 90%);
}

.open-tab.active {
  background: color-mix(in srgb, var(--accent-color) 15%, var(--header-bg) 85%);
}

.open-tab-link {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  font-size: 0.8125rem;
  color: var(--default-color);
}

.open-tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  font-size: 14px;
  line-height: 1;
}

.open-tab-icon svg {
  width: 14px;
  height: 14px;
}

.open-tab-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.open-tab.active .open-tab-link {
  color: var(--accent-color);
  font-weight: 500;
}

/* Schliessen-Button */
.open-tab-close {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted-color);
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast);
}

.open-tab:hover .open-tab-close {
  opacity: 1;
  visibility: visible;
}

.open-tab:hover .open-tab-icon {
  visibility: hidden;
}

.open-tab-close:hover {
  background: color-mix(in srgb, var(--danger-color), transparent 85%);
  color: var(--danger-color);
}

/* "+"-Tab am Ende der Leiste */
.open-tab-add {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin-left: 2px;
  border-radius: var(--radius-md);
  color: var(--muted-color);
  font-size: 0.875rem;
}

.open-tab-add:hover {
  background: color-mix(in srgb, var(--default-color), transparent 90%);
  color: var(--default-color);
}

/* new_tab.html: bewusst leere Seite hinter dem "+"-Tab */
.new-tab-empty-state {
  color: var(--muted-color);
  padding: var(--spacing-lg) 0;
}

/* Drag & Drop zum Umsortieren der Tabs (r2.js) */
.open-tab {
  cursor: grab;
}

.open-tab.dragging {
  opacity: 0.4;
  cursor: grabbing;
}

.header-page-title {
  min-width: 0;
  max-width: 40vw;
  margin: 0;
  overflow: hidden;
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--heading-color);
  white-space: nowrap;
  text-overflow: ellipsis;
}

@media (max-width: 575.98px) {
  .header-page-title {
    display: none;
  }
}

/* Login: Warnung bei veraltetem Browser (browser_check.js) - bewusst ohne color-mix(), sonst fehlte sie gerade in alten Browsern */
.r2-browser-warning {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 193, 7, 0.65);
  border-left-width: 4px;
  border-radius: 0.5rem;
  background: rgba(255, 193, 7, 0.14);
  font-size: 0.875rem;
  line-height: 1.45;
}

.r2-browser-warning[hidden] {
  display: none;
}

.r2-browser-warning > i {
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: #e0a800;
}

.r2-browser-warning p {
  margin: 0 0 0.4rem;
}

.r2-browser-warning p:last-of-type {
  margin-bottom: 0;
}

.r2-browser-warning details {
  margin-top: 0.4rem;
  font-size: 0.8125rem;
  opacity: 0.85;
}

.r2-browser-warning summary {
  cursor: pointer;
}

.r2-browser-warning ul {
  margin: 0.3rem 0 0;
  padding-left: 1.2rem;
}

/* Live-Update eines Versandlabels: Zeile bzw. Label-Karte leuchtet kurz auf */
@keyframes r2-live-flash {
  from { background-color: color-mix(in srgb, var(--accent-color), transparent 80%); }
  to { background-color: transparent; }
}

tr.r2-live-updated > td,
.r2-live-updated {
  animation: r2-live-flash 2.4s ease-out;
}

/* Sendungsuebersicht: sortierbare Spaltenueberschriften, Pfeil erst beim Ueberfahren */
.r2-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  cursor: pointer;
}

.r2-sort i {
  font-size: 0.85em;
  opacity: 0;
  transition: opacity 150ms ease;
}

.r2-sort:hover i,
.r2-sort:focus-visible i {
  opacity: 1;
}

.r2-sort.is-active {
  color: var(--accent-color);
}

/* Hinweis-Modal fehlende PLZ / fehlender Warenwert (calculation.html) */
.r2-missing-list {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0;
  list-style: none;
}

.r2-missing-list li {
  padding-left: 0.75rem;
  border-left: 3px solid var(--warning-color, #ffc107);
}

.r2-missing-list strong,
.r2-missing-list span {
  display: block;
}

.r2-missing-list span {
  font-size: 0.875rem;
  color: var(--muted-color);
}

.r2-missing-list li[hidden] {
  display: none;
}

.r2-apply-all-list li {
  border-left-color: var(--accent-color);
}

.r2-missing-note {
  font-size: 0.875rem;
  color: var(--muted-color);
}

/* Versandkalkulation: Referenz per Stift neben dem Header-Titel (header.html), Stift erscheint beim Ueberfahren */
.header-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
}

@media (hover: hover) {
  .header-title-edit {
    opacity: 0;
    transition: opacity 150ms ease;
  }

  .header-title-wrap:hover .header-title-edit,
  .header-title-edit:focus-visible {
    opacity: 1;
  }
}

.header-title-edit {
  flex-shrink: 0;
  padding: 0.25rem 0.4rem;
  border: 0;
  border-radius: var(--radius-sm, 0.25rem);
  background: none;
  font-size: 1rem;
  line-height: 1;
  color: var(--muted-color);
  cursor: pointer;
}

.header-title-edit:hover,
.header-title-edit:focus-visible {
  color: var(--accent-color);
  background: color-mix(in srgb, var(--accent-color), transparent 90%);
}

.header-title-field {
  position: relative;
  width: min(24rem, 40vw);
}

.header-title-field[hidden] {
  display: none;
}

.header-title-input {
  width: 100%;
  padding-right: 4.5rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.header-title-actions {
  position: absolute;
  top: 50%;
  right: 0.375rem;
  display: flex;
  gap: 0.125rem;
  transform: translateY(-50%);
}

.header-title-action {
  padding: 0.25rem 0.4rem;
  border: 0;
  border-radius: var(--radius-sm, 0.25rem);
  background: none;
  font-size: 1rem;
  line-height: 1;
  color: var(--muted-color);
  cursor: pointer;
}

.header-title-action.is-save {
  color: var(--success-color);
}

.header-title-action.is-save:hover,
.header-title-action.is-save:focus-visible {
  background: color-mix(in srgb, var(--success-color), transparent 88%);
}

.header-title-action.is-cancel:hover,
.header-title-action.is-cancel:focus-visible {
  color: var(--danger-color);
  background: color-mix(in srgb, var(--danger-color), transparent 90%);
}

.header-title-action:disabled {
  opacity: 0.5;
  cursor: default;
}

@media (max-width: 575.98px) {
  .header-title-edit,
  .header-title-field {
    display: none;
  }
}

/* Chat-Eintraege im Notification-Dropdown (header.html) */
.notification-item-chat {
  color: inherit;
  text-decoration: none;
}

.notification-item-chat:hover {
  color: inherit;
  text-decoration: none;
}

.notification-chat-count {
  flex-shrink: 0;
  min-width: 18px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  background: var(--danger-color);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

/* Cut Editor */
.kedercut-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: 6px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 8px);
  background: var(--surface-color);
}

.kedercut-preview-svg {
  width: 100%;
  height: 100%;
}

.kedercut-preview-rect {
  fill: none;
  stroke: var(--heading-color);
  stroke-width: 4;
}

.kedercut-preview-size {
  margin-top: 8px;
  font-size: 0.8125rem;
}

/* Erster Cut */
.kedercut-preview-cut {
  stroke: var(--danger-color);
  stroke-width: 8;
}

.kedercut-cut-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.kedercut-cut-input {
  flex: 0 0 auto;
  width: 96px;
}

.kedercut-cut-side {
  display: block;
  margin-bottom: 6px;
  color: var(--muted-color);
  font-size: 0.8125rem;
  font-weight: 600;
}

.kedercut-cut-block + .kedercut-cut-block {
  margin-top: 16px;
}

.kedercut-dim-line {
  stroke: var(--default-color);
  stroke-width: 1;
}

.kedercut-dim-extension {
  stroke: var(--default-color);
  stroke-width: 1;
  opacity: 0.7;
}

.kedercut-dim-label {
  fill: var(--default-color);
  font-size: 10px;
  text-anchor: middle;
}

.kedercut-dim-arrow {
  fill: var(--default-color);
}

/* Bezugskante des Ausschnitts */
.kedercut-cutout-origin {
  flex: 0 0 auto;
  width: auto;
}

/* Ausschnitt in einer Reihe wie die Cuts */
.kedercut-cutout-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.kedercut-cutout-group {
  flex: 0 0 auto;
  width: auto;
}

.kedercut-cutout-group > .kedercut-cutout-input {
  flex: 0 0 auto;
  width: 96px;
}

.kedercut-cutout-group > .kedercut-cutout-origin {
  flex: 0 0 auto;
  width: auto;
}

/* Seite des Ausschnitts */
.kedercut-cutout-side {
  flex: 0 0 auto;
  width: auto;
}

.kedercut-cut-origin {
  flex: 0 0 auto;
  width: auto;
}

/* Richtungspfeile */
.kedercut-direction {
  stroke: var(--danger-color);
  stroke-width: 1.5;
}

/* Wie beim Masspfeil */
.kedercut-direction-arrow {
  fill: var(--danger-color);
}

/* Bereiche des Cut Editors, beim Ueberfahren leicht hervorgehoben */
.kedercut-group {
  position: relative;
  margin: 16px -12px 0;
  padding: 12px;
  border-radius: var(--radius-md, 8px);
  transition: background-color 0.15s ease;
}

.kedercut-group:last-child {
  margin-bottom: -12px;
}

.kedercut-group:hover {
  background-color: color-mix(in srgb, var(--accent-color), transparent 95%);
}

/* Trennlinie ausserhalb der Hover-Flaeche */
.kedercut-group::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 12px;
  right: 12px;
  border-top: 1px solid var(--border-color-light, var(--border-color));
}

.kedercut-section-title {
  display: block;
  color: var(--heading-color);
  font-weight: 600;
}

.kedercut-section-hint {
  display: block;
  margin-top: 2px;
  color: var(--muted-color);
  font-size: 0.8125rem;
}

/* Abstand zu den Eingaben, die auf den Abschnittskopf folgen. */
.kedercut-section + .form-check {
  margin-top: 12px;
}

/* Die Spalten bringen ihren Gutter selbst mit. */
.kedercut-section + .row {
  margin-top: calc(12px - var(--bs-gutter-y));
}

/* Frachtgut-Formular */
#delivery_options .accordion-button {
  column-gap: 0.25rem;
}

.r2-freight-options-table th {
  white-space: nowrap;
  font-size: 0.8125rem;
}

.r2-freight-options-table td {
  vertical-align: middle;
}

.r2-freight-options-table .r2-freight-options-all > td {
  background-color: var(--table-hover-bg);
  border-bottom-width: 2px;
}

.r2-freight-options-table select.form-select-sm {
  min-width: 8.5rem;
}

.r2-freight-options-table .r2-freight-options-value {
  width: 6.5rem;
  flex: 0 0 auto;
}

.r2-freight-options-table .r2-freight-options-value-set {
  min-width: 9rem;
}

.r2-freight-options-table th .badge {
  text-transform: none;
}

/* Sammelversand */
.r2-consolidation-row > td {
  background-color: var(--table-hover-bg);
  font-size: 0.8125rem;
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}

/* Sammelversand */
:root {
  --r2-group-1: #2563eb;
  --r2-group-2: #db2777;
  --r2-group-3: #0891b2;
  --r2-group-4: #4d7c0f;
  --r2-group-5: #8b5e34;
  --r2-group-6: #475569;
  --r2-group-7: #a21caf;
  --r2-group-8: #0f766e;
  --r2-group-9: #1e3a8a;
  --r2-group-10: #a16207;
}

[data-theme=dark] {
  --r2-group-1: #60a5fa;
  --r2-group-2: #f472b6;
  --r2-group-3: #22d3ee;
  --r2-group-4: #a3e635;
  --r2-group-5: #d4a373;
  --r2-group-6: #94a3b8;
  --r2-group-7: #e879f9;
  --r2-group-8: #5eead4;
  --r2-group-9: #93c5fd;
  --r2-group-10: #d9b46a;
}

.r2-group-1 { --r2-group-color: var(--r2-group-1); }
.r2-group-2 { --r2-group-color: var(--r2-group-2); }
.r2-group-3 { --r2-group-color: var(--r2-group-3); }
.r2-group-4 { --r2-group-color: var(--r2-group-4); }
.r2-group-5 { --r2-group-color: var(--r2-group-5); }
.r2-group-6 { --r2-group-color: var(--r2-group-6); }
.r2-group-7 { --r2-group-color: var(--r2-group-7); }
.r2-group-8 { --r2-group-color: var(--r2-group-8); }
.r2-group-9 { --r2-group-color: var(--r2-group-9); }
.r2-group-10 { --r2-group-color: var(--r2-group-10); }
.r2-group-inactive { --r2-group-color: var(--border-color-dark); --r2-group-text: var(--muted-color); }

.badge.r2-group-badge {
  background-color: color-mix(in srgb, var(--r2-group-color), transparent 88%);
  color: var(--r2-group-color);
}

.r2-consolidation-destination {
  color: var(--r2-group-text, var(--r2-group-color));
  font-size: 0.75rem;
}

.r2-consolidation-count {
  flex-shrink: 0;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bs-primary), transparent 90%);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--bs-primary);
}

.r2-consolidation-providers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.75rem;
  margin: 0 0 0.35rem 0.25rem;
  color: var(--muted-color);
}

.r2-consolidation-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.1rem 0.4rem;
  min-width: 0;
}

.r2-consolidation-label .badge {
  flex-shrink: 0;
}

.r2-consolidation-provider {
  flex-shrink: 0;
  font-weight: 500;
}

.r2-consolidation-destination-text {
  flex-basis: 100%;
  padding-left: 0.1rem;
  font-size: 0.6875rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
  color: var(--muted-color);
}

.r2-consolidation-more.show,
.r2-consolidation-more.collapsing {
  max-height: 22rem;
  overflow-y: auto;
}

.btn.r2-consolidation-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.25rem 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
}

.r2-consolidation-toggle .bi {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.r2-consolidation-toggle:not(.collapsed) .bi {
  transform: rotate(180deg);
}

.r2-consolidation-toggle.collapsed .r2-when-open,
.r2-consolidation-toggle:not(.collapsed) .r2-when-closed {
  display: none;
}

.r2-consolidation-group > td:first-child {
  position: relative;
  padding-left: 0.875rem;
}

.r2-consolidation-group > td:first-child::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: -1px;
  left: 0;
  width: 0.75rem;
  border-left: 4px solid var(--r2-group-color, transparent);
  pointer-events: none;
}

.r2-consolidation-row > td:first-child::before {
  border-top-left-radius: var(--radius-md, 0.5rem);
}

.r2-consolidation-last > td:first-child::before {
  bottom: 0;
  border-bottom-left-radius: var(--radius-md, 0.5rem);
}


/* Admin-Dashboard (templates/R2commerce/EliteAdmin/admin/dashboard.html) */
.admin-echart {
  width: 100%;
  height: 280px;
}

.admin-echart-lg {
  height: 340px;
}

.admin-echart-gauge {
  height: 150px;
}

.admin-gauge-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--heading-color);
  margin-top: -0.5rem;
}

.admin-gauge-detail {
  font-size: 0.75rem;
  color: var(--muted-color);
}

.admin-generated-at {
  font-size: 0.75rem;
  opacity: 0.85;
}

/* Online-Karte */
.admin-stat-side {
  font-size: 0.8125rem;
  color: var(--muted-color);
  text-align: right;
  line-height: 1.6;
}

.widget-stat-chart-icon.warning {
  background: var(--warning-color-light);
  color: var(--warning-color);
}

.widget-stat-chart-icon.danger {
  background: var(--danger-color-light);
  color: var(--danger-color);
}

.widget-stat-chart-bars.info span {
  background: var(--info-color);
}

.widget-stat-chart-bars.danger span {
  background: var(--danger-color);
}

.widget-stat-chart-bars.success span {
  background: var(--success-color);
}

.widget-stat-chart-bars.warning span {
  background: var(--warning-color);
}

/* Reiter */
.admin-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.admin-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.admin-status-dot.admin-tab-dot {
  width: 8px;
  height: 8px;
  margin-top: 0;
}

.admin-section-note {
  font-size: 0.8125rem;
  color: var(--muted-color);
  margin-bottom: 0.75rem;
}

/* Systemstatus-Kachel: Icon faerbt r2.js je nach Zustand ein. */
.admin-health-icon.ok {
  color: var(--success-color);
}

.admin-health-icon.warn {
  color: var(--warning-color);
}

.admin-health-icon.down {
  color: var(--danger-color);
}

/* Key-Value-Listen (Ressourcen, MariaDB, Redis) */
.admin-kv {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem 1rem;
  font-size: 0.8125rem;
}

.admin-kv dt {
  font-weight: 400;
  color: var(--muted-color);
}

.admin-kv dd {
  margin: 0;
  font-weight: 600;
  color: var(--heading-color);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.admin-kv.is-down dd {
  color: var(--danger-color);
}

/* Dienste und Cronjobs */
.admin-service-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-service-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border-color);
}

.admin-service-list li:last-child {
  border-bottom: 0;
}

.admin-service-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--heading-color);
}

.admin-service-meta {
  font-size: 0.75rem;
  color: var(--muted-color);
}

.admin-status-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: var(--muted-color);
}

.admin-status-dot.ok {
  background: var(--success-color);
  box-shadow: 0 0 0 3px var(--success-color-light);
}

.admin-status-dot.down {
  background: var(--danger-color);
  box-shadow: 0 0 0 3px var(--danger-color-light);
}

.admin-status-dot.warn {
  background: var(--warning-color);
  box-shadow: 0 0 0 3px var(--warning-color-light);
}

/* Kalkulations-Kontingente */
.admin-quota + .admin-quota {
  margin-top: 0.9rem;
}

.admin-quota-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--heading-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 0.5rem;
}

.admin-quota-value {
  font-size: 0.75rem;
  color: var(--muted-color);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.admin-quota-progress {
  height: 6px;
  margin-top: 0.3rem;
}

/* Tabellen "Letzte Fehler"/"Letzte Logins" */
.admin-table {
  font-size: 0.8125rem;
}

.admin-table-path {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--bs-font-monospace);
  font-size: 0.75rem;
}

.admin-table-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--heading-color);
}

.admin-table-sub {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted-color);
  overflow: hidden;
  text-overflow: ellipsis;
}

/* "Heute aktive Firmen" */
.admin-table-scroll {
  max-height: 340px;
  overflow-y: auto;
}

.admin-table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-color);
}

/* Tagesuebersicht: Wochenenden zuruecknehmen, heute hervorheben. */
.admin-day-table td {
  font-variant-numeric: tabular-nums;
}

.admin-day-table tr.is-weekend td {
  color: var(--muted-color);
}

.admin-day-table tr.is-today td {
  font-weight: 600;
  color: var(--heading-color);
}

/* Sendungstabelle */
.is-duplicating {
  cursor: progress;
  opacity: 0.75;
}

.is-duplicating i {
  display: inline-block;
  animation: shipment-duplicate-spin 0.8s linear infinite;
}

@keyframes shipment-duplicate-spin {
  to { transform: rotate(360deg); }
}

.shipment-row-new {
  position: relative;
  z-index: 1;
}

.shipment-row-new > td {
  animation: shipment-row-new-flash 2s ease-out;
}

@keyframes shipment-row-new-flash {
  0%, 30% { box-shadow: inset 0 0 0 9999px rgba(var(--bs-warning-rgb), 0.28); }
  100% { box-shadow: inset 0 0 0 9999px rgba(var(--bs-warning-rgb), 0); }
}

@media (prefers-reduced-motion: reduce) {
  .is-duplicating i {
    animation: none;
  }
}

/* Sendungstabelle */
.shipment-row-pending {
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

.shipment-row-ghost {
  position: fixed;
  z-index: 1080;
  pointer-events: none;
  overflow: hidden;
  background: var(--bs-body-bg);
  border-radius: var(--bs-border-radius);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.18);
}

.shipment-row-ghost table {
  table-layout: fixed;
  width: 100%;
  margin: 0;
}

.r2-route {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.r2-route-arrow {
  display: inline-flex;
  line-height: 1;
  margin: 0 0.25rem;
  font-size: 0.9rem;
  color: var(--bs-secondary-color);
}

.r2-loc {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 3rem;
}

.r2-plz {
  font-variant-numeric: tabular-nums;
}

.r2-place {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
}

.r2-area-hint {
  font-size: 0.8125rem;
  color: var(--bs-warning-text-emphasis);
  background-color: var(--bs-warning-bg-subtle);
}

.r2-postal-menu {
  position: fixed;
  z-index: 1080;
  max-width: 26rem;
  max-height: 18rem;
  overflow-y: auto;
}

.r2-postal-option {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.r2-postal-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.r2-postal-region {
  margin-left: auto;
  padding-left: 0.75rem;
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
  white-space: nowrap;
}

.page-title .r2-loc {
  align-items: baseline;
  gap: 0.5rem;
}

.page-title .r2-place {
  max-width: none;
  font-size: 0.55em;
}

.page-title .r2-country-flag {
  width: 0.75em;
  height: 0.75em;
  align-self: center;
}

.page-title .r2-route-arrow {
  font-size: 0.7em;
  margin: 0 0.5rem;
}

.r2-route-more {
  display: inline-flex;
  align-self: center;
  margin-left: 0.35rem;
}

.btn.r2-route-more-btn {
  padding: 0.2rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--bs-primary), transparent 70%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bs-primary), transparent 90%);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--bs-primary);
}

.btn.r2-route-more-btn:hover,
.btn.r2-route-more-btn:focus-visible,
.btn.r2-route-more-btn.show {
  background: color-mix(in srgb, var(--bs-primary), transparent 80%);
  color: var(--bs-primary);
}

.r2-route-more-menu {
  width: min(34rem, 90vw);
  max-height: min(60vh, 26rem);
  overflow-y: auto;
  padding: 0.75rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 400;
}

.r2-route-more-menu.show {
  display: block;
}

.r2-route-more-head {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-color);
}

.r2-route-more-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.35rem 0.75rem;
}

.r2-route-more-list .r2-loc {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  min-width: 0;
}

.r2-route-more-list .r2-plz {
  font-size: 0.875rem;
  font-weight: 600;
}

.r2-route-more-list .r2-place {
  overflow: hidden;
  font-size: 0.8125rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted-color);
}

.r2-country-flag {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  overflow: hidden;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.r2-country-flag img {
  position: absolute;
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  max-width: none;
}

.shipment-archive-pulse {
  animation: shipment-archive-pulse 0.6s ease-out;
}

@keyframes shipment-archive-pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(var(--bs-secondary-rgb), 0.5); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); box-shadow: 0 0 0 0.75rem rgba(var(--bs-secondary-rgb), 0); }
}

@media (prefers-reduced-motion: reduce) {
  .shipment-archive-pulse {
    animation: none;
  }
}

/* Sendungsarchiv */
.shipment-row-ghost-restore td {
  box-shadow: inset 0 0 0 9999px rgba(var(--bs-success-rgb), 0.18);
}

.shipment-restore-pulse {
  animation: shipment-restore-pulse 0.6s ease-out;
}

@keyframes shipment-restore-pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(var(--bs-success-rgb), 0.5); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); box-shadow: 0 0 0 0.75rem rgba(var(--bs-success-rgb), 0); }
}

@media (prefers-reduced-motion: reduce) {
  .shipment-restore-pulse {
    animation: none;
  }
}


/* Hilfe (help/help_index.html, help_article.html, help_form.html) */
.help-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.help-article-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--heading-color);
}

.help-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted-color);
}

.help-empty i {
  display: block;
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.help-article-title {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.help-article-meta {
  font-size: 0.8rem;
  color: var(--muted-color);
  margin-bottom: 1.25rem;
}

.help-article-empty {
  color: var(--muted-color);
}

/* Artikelinhalt */
.help-article-content .ql-editor {
  height: auto;
  padding: 0;
  overflow: visible;
  cursor: auto;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--default-color);
}

.help-article-content .ql-editor h1,
.help-article-content .ql-editor h2,
.help-article-content .ql-editor h3 {
  color: var(--heading-color);
  margin: 1.25em 0 0.5em;
}

.help-article-content .ql-editor a {
  color: var(--accent-color);
}

.help-article-content .ql-editor img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

/* Hilfevideos (Quill-Blot helpVideo) */
.ql-editor video.help-video {
  display: block;
  width: 100%;
  max-width: 1100px;
  height: auto;
  aspect-ratio: 16 / 9;
  margin: 0.5rem 0 1.25rem;
  background: #000;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

/* Sternebewertung */
.help-rating {
  margin-top: 1rem;
}

.help-rating-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.help-rating-title {
  float: none;
  width: auto;
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading-color);
  margin-bottom: 0.5rem;
}

.help-rating-stars {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 0.25rem;
}

.help-rating-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.help-rating-star {
  font-size: 1.75rem;
  line-height: 1;
  color: var(--border-color);
  cursor: pointer;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.help-rating-input:checked ~ .help-rating-star {
  color: var(--warning-color);
}

.help-rating-input:focus-visible + .help-rating-star {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

@media (hover: hover) {
  .help-rating-stars:hover .help-rating-star {
    color: var(--border-color);
  }

  .help-rating-stars .help-rating-star:hover,
  .help-rating-stars .help-rating-star:hover ~ .help-rating-star {
    color: var(--warning-color);
  }

  .help-rating-star:hover {
    transform: scale(1.12);
  }
}

.help-rating-message {
  margin-top: 1rem;
  max-width: 40rem;
}

.help-rating-status {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-color);
}

.help-rating-status:empty {
  display: none;
}

.help-siblings-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-color);
  margin-bottom: 0.75rem;
}

.help-siblings-list {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  margin-bottom: 1rem;
}

.help-siblings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-md);
  color: var(--default-color);
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.help-siblings-item:hover {
  background: color-mix(in srgb, var(--accent-color) 8%, transparent);
  color: var(--default-color);
}

.help-siblings-item.active {
  background: color-mix(in srgb, var(--accent-color) 12%, transparent);
  color: var(--accent-color);
  font-weight: 600;
}

.help-siblings-all {
  font-size: 0.85rem;
  color: var(--accent-color);
  text-decoration: none;
}

@media (min-width: 992px) {
  .help-siblings,
  .help-revisions {
    position: sticky;
    top: 5.5rem;
  }
}

/* Editor (help_form.html) */
.help-editor-panes {
  padding-top: 1rem;
}

.help-editor-publish {
  display: flex;
  align-items: flex-end;
  padding-bottom: 0.5rem;
}

.help-editor-form .ql-toolbar.ql-snow {
  border-color: var(--border-color);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--surface-color);
  color: var(--default-color);
}

.help-editor-form .ql-container.ql-snow {
  border-color: var(--border-color);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
}

.help-editor-form .ql-editor {
  min-height: 320px;
  line-height: 1.65;
  color: var(--default-color);
}

.help-editor-form .ql-snow .ql-stroke {
  stroke: currentColor;
}

.help-editor-form .ql-snow .ql-fill {
  fill: currentColor;
}

.help-editor-form .ql-snow .ql-picker {
  color: var(--default-color);
}

.help-editor-form .ql-snow .ql-picker-options,
.help-editor-form .ql-snow .ql-tooltip {
  background: var(--surface-color);
  border-color: var(--border-color);
  color: var(--default-color);
}

.help-editor-form .ql-snow .ql-tooltip input[type=text] {
  background: var(--surface-color);
  border-color: var(--border-color);
  color: var(--default-color);
}

.help-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.help-revision-item {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
}

.help-revision-item:last-child {
  border-bottom: 0;
}

.help-revision-date {
  font-weight: 500;
  color: var(--heading-color);
}

.help-revision-author,
.help-revision-empty {
  font-size: 0.85rem;
  color: var(--muted-color);
}


/* Hilfe */
.header-help-search {
  position: absolute;
  top: 50%;
  right: 100%;
  width: 0;
  padding: 4px;
  margin-right: calc(0.375rem - 4px);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: width 0.22s ease, opacity 0.18s ease;
  z-index: 2;
}

.header-help.is-open .header-help-search {
  width: 288px;
  opacity: 1;
  pointer-events: auto;
}

.header-help-input {
  width: 280px;
  height: 38px;
  padding: 0 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  background: var(--surface-color);
  color: var(--default-color);
  font-size: 0.875rem;
  outline: none;
}

.header-help-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color) 15%, transparent);
}

.header-help.is-open .header-help-toggle {
  color: var(--accent-color);
}

.header-help-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 380px;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1050;
}

.header-help-panel[hidden] {
  display: none;
}

.header-help-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.header-help-panel-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--heading-color);
}

.header-help-panel-all {
  font-size: 0.8rem;
  color: var(--accent-color);
  text-decoration: none;
  white-space: nowrap;
}

/* Trefferliste - gemeinsam fuer Header-Panel und mobile Suche */
.help-search-results {
  padding: 0.375rem;
}

.help-search-heading {
  padding: 0.5rem 0.625rem 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-color);
}

.help-search-message {
  padding: 0.75rem 0.625rem;
  font-size: 0.85rem;
  color: var(--muted-color);
}

.help-search-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0.625rem;
  border-radius: var(--radius-md);
  color: var(--default-color);
  text-decoration: none;
}

.help-search-item:hover,
.help-search-item.is-active {
  background: color-mix(in srgb, var(--accent-color) 10%, transparent);
  color: var(--default-color);
}

.help-search-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--heading-color);
}

.help-search-item-app {
  font-size: 0.7rem;
  color: var(--accent-color);
}

.help-search-item-snippet {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted-color);
}

.help-search-item mark,
.help-search-results mark {
  padding: 0 0.1em;
  border-radius: 0.2em;
  background: color-mix(in srgb, var(--warning-color) 30%, transparent);
  color: inherit;
}

.help-search-all {
  display: block;
  margin-top: 0.25rem;
  padding: 0.5rem 0.625rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--accent-color);
  text-decoration: none;
}

/* Mobil */
.mobile-help-results {
  margin-top: var(--spacing-sm);
  max-height: calc(100vh - var(--header-height) - 7rem);
  overflow-y: auto;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.mobile-help-results[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .header-help-search {
    transition: none;
  }
}

.r2pe {
  --r2pe-tone: var(--accent-color);
  --r2pe-control-h: 2rem;
}

.r2pe-tone-blue { --r2pe-tone: var(--r2-group-1); }
.r2pe-tone-pink { --r2pe-tone: var(--r2-group-2); }
.r2pe-tone-cyan { --r2pe-tone: var(--r2-group-3); }
.r2pe-tone-green { --r2pe-tone: var(--r2-group-4); }
.r2pe-tone-brown { --r2pe-tone: var(--r2-group-5); }
.r2pe-tone-slate { --r2pe-tone: var(--r2-group-6); }
.r2pe-tone-purple { --r2pe-tone: var(--r2-group-7); }
.r2pe-tone-teal { --r2pe-tone: var(--r2-group-8); }
.r2pe-tone-navy { --r2pe-tone: var(--r2-group-9); }
.r2pe-tone-amber { --r2pe-tone: var(--r2-group-10); }

.r2pe .form-control-sm,
.r2pe .form-select-sm,
.r2pe .btn-sm,
.r2pe .input-group-sm > .input-group-text {
  min-height: var(--r2pe-control-h);
  font-size: 0.8125rem;
}

.r2pe .form-select-sm {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.r2pe-status {
  display: flex;
  align-items: center;
  padding: var(--spacing-md, 1rem) 0;
  color: var(--muted-color);
}

.r2pe-fileinfo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
  color: var(--muted-color);
  word-break: break-all;
}

.r2pe-fileinfo > span:first-child {
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full, 999px);
  background: color-mix(in srgb, var(--muted-color) 10%, transparent);
}

.r2pe-fileinfo-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

/* Kontextleiste: Bereich / Land / Region */
.r2pe-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid color-mix(in srgb, var(--accent-color) 30%, var(--border-color));
  border-radius: var(--radius-md, 0.5rem);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-color) 10%, var(--surface-color)), var(--surface-color) 70%);
}

.r2pe-nav-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.r2pe-nav-label {
  flex: 0 0 5.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-color);
}

.r2pe-select {
  width: auto;
  min-width: 12rem;
  max-width: 100%;
}

.r2pe-nav .r2pe-select {
  min-width: 16rem;
  font-weight: 600;
}

.r2pe-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.r2pe-pills .btn {
  border-radius: var(--radius-full, 999px);
}

.r2pe-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px dashed var(--accent-color);
  border-radius: var(--radius-md, 0.5rem);
  background: var(--surface-color);
}

.r2pe-panel-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 12rem;
  font-size: 0.8125rem;
}

.r2pe-panel-error {
  flex-basis: 100%;
}

.r2pe-panel-error:empty {
  display: none;
}

/* Karten */
.r2pe-card {
  margin-bottom: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--r2pe-tone);
  border-radius: var(--radius-md, 0.5rem);
  background: var(--surface-color);
}

.r2pe-card-plain {
  padding: 0 0.75rem 0.5rem;
  border: 1px dashed var(--border-color);
  background: transparent;
}

.r2pe-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: linear-gradient(90deg, color-mix(in srgb, var(--r2pe-tone) 9%, transparent), transparent 65%);
}

.r2pe-card-toggle {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  border: 0;
  background: none;
  color: var(--heading-color);
  font-weight: 600;
  text-align: left;
}

.r2pe-card-chevron {
  font-size: 0.75rem;
  color: var(--muted-color);
  transition: transform var(--transition-fast, 0.15s);
}

.r2pe-card-toggle[aria-expanded="false"] .r2pe-card-chevron {
  transform: rotate(-90deg);
}

.r2pe-card-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--r2pe-tone) 16%, transparent);
  color: var(--r2pe-tone);
  font-size: 0.9375rem;
}

.r2pe-card-title {
  min-width: 0;
}

.r2pe-card-changes {
  margin-left: auto;
  padding: 0.0625rem 0.5rem;
  border-radius: var(--radius-full, 999px);
  background: var(--accent-color);
  color: var(--contrast-color, #fff);
  font-size: 0.6875rem;
  font-weight: 600;
}

.r2pe-card-body {
  padding: 0.75rem;
  border-top: 1px solid color-mix(in srgb, var(--r2pe-tone) 15%, var(--border-color));
}

/* Felder */
.r2pe-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.875rem 1rem;
}

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

.r2pe-wide {
  grid-column: 1 / -1;
}

.r2pe-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  min-height: 1.25rem;
  margin-bottom: 0.25rem;
}

.r2pe-label {
  overflow: hidden;
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-color);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.r2pe-field:has(.r2pe-changed:not(.is-invalid)) > .r2pe-field-head .r2pe-label {
  color: var(--accent-color);
}

.r2pe-field:has(.r2pe-changed:not(.is-invalid)) > .r2pe-field-head .r2pe-label::after {
  content: " •";
}

.r2pe-field-actions {
  display: inline-flex;
  gap: 0.125rem;
  opacity: 0;
  transition: opacity var(--transition-fast, 0.15s);
}

.r2pe-field:hover > .r2pe-field-head .r2pe-field-actions,
.r2pe-field:focus-within > .r2pe-field-head .r2pe-field-actions {
  opacity: 1;
}

.r2pe-icon-btn {
  min-height: 0 !important;
  padding: 0 0.25rem;
  border: 0;
  color: var(--muted-color);
  line-height: 1.2;
}

.r2pe-icon-btn:hover,
.r2pe-remove-field:hover {
  color: var(--danger-color);
}

.r2pe-apply-all:hover {
  color: var(--accent-color);
}

.r2pe-static {
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--muted-color) 8%, var(--surface-color));
  color: var(--muted-color);
  cursor: not-allowed;
}

.r2pe-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.r2pe .r2pe-changed:not(.is-invalid) {
  border-color: var(--accent-color);
  background-color: color-mix(in srgb, var(--accent-color) 9%, var(--surface-color));
  box-shadow: inset 3px 0 0 var(--accent-color);
}

.r2pe .is-invalid {
  background-color: color-mix(in srgb, var(--danger-color) 8%, var(--surface-color));
}

.r2pe-nested {
  padding: 0.75rem;
  border-left: 3px solid color-mix(in srgb, var(--r2pe-tone) 35%, var(--border-color));
  border-radius: var(--radius-sm, 0.25rem);
  background: color-mix(in srgb, var(--r2pe-tone) 3%, transparent);
}

.r2pe-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}

.r2pe-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0.125rem;
  border-radius: var(--radius-sm, 0.25rem);
  background: color-mix(in srgb, var(--r2pe-tone) 7%, transparent);
}

.r2pe-chip-input {
  width: 6.5rem;
}

.r2pe-chip-unit {
  font-size: 0.8125rem;
  color: var(--muted-color);
}

.r2pe-objlist {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
}

.r2pe-objlist-item {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-left: 3px solid color-mix(in srgb, var(--r2pe-tone) 50%, var(--border-color));
  border-radius: var(--radius-md, 0.5rem);
}

.r2pe-objlist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  color: var(--heading-color);
}

/* Preismatrix und Paarlisten */
.r2pe-matrix-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.r2pe-matrix-tools > strong {
  margin-right: 0.25rem;
  color: var(--heading-color);
}

.r2pe-count-badge {
  padding: 0.0625rem 0.5rem;
  border-radius: var(--radius-full, 999px);
  background: color-mix(in srgb, var(--r2pe-tone) 14%, transparent);
  color: var(--r2pe-tone);
  font-size: 0.6875rem;
  font-weight: 600;
}

.r2pe-matrix-table,
.r2pe-group-table {
  width: auto;
  margin-bottom: 0.25rem;
  border-collapse: separate;
  border-spacing: 2px;
}

.r2pe-matrix-table > :not(caption) > * > *,
.r2pe-group-table > :not(caption) > * > * {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  vertical-align: middle;
}

.r2pe-matrix-table input {
  width: 4.75rem;
  min-height: 1.875rem !important;
  padding: 0.125rem 0.375rem;
}

.r2pe-matrix-table tbody tr:nth-child(even) td input:not(.r2pe-changed):not(.is-invalid) {
  background-color: color-mix(in srgb, var(--r2pe-tone) 5%, var(--surface-color));
}

.r2pe-matrix-table thead th,
.r2pe-matrix-table tbody th {
  position: sticky;
  z-index: 1;
  border-radius: var(--radius-sm, 0.25rem);
  background: color-mix(in srgb, var(--r2pe-tone) 13%, var(--surface-color)) !important;
}

.r2pe-matrix-table thead th {
  top: 0;
  z-index: 2;
}

.r2pe-matrix-table tbody th {
  left: 0;
}

.r2pe-matrix-table th input:not(.r2pe-changed):not(.is-invalid) {
  border-color: transparent;
  background: transparent;
}

.r2pe-matrix-table th input {
  font-weight: 700;
  color: var(--heading-color);
}

.r2pe-matrix-table th.r2pe-cross {
  background: color-mix(in srgb, var(--r2pe-tone) 32%, var(--surface-color)) !important;
}

.r2pe-matrix-table th.r2pe-cross input {
  color: var(--r2pe-tone);
}

.r2pe-matrix-table td input:focus,
.r2pe-group-table td input:focus {
  border-color: var(--r2pe-tone);
  box-shadow: 0 0 0 0.15rem color-mix(in srgb, var(--r2pe-tone) 30%, transparent);
}

.r2pe-matrix-head {
  display: flex;
  align-items: center;
}

.r2pe-matrix-head .r2pe-icon-btn {
  width: 0;
  overflow: hidden;
  padding: 0;
  opacity: 0;
  transition: opacity var(--transition-fast, 0.15s);
}

.r2pe-matrix-table th:hover .r2pe-icon-btn,
.r2pe-matrix-table th:focus-within .r2pe-icon-btn {
  width: auto;
  padding: 0 0.25rem;
  opacity: 1;
}

.r2pe-matrix-corner {
  padding: 0 0.5rem !important;
  font-size: 0.6875rem;
  font-weight: 700 !important;
  letter-spacing: 0.04em;
  color: var(--r2pe-tone);
  white-space: nowrap;
}

.r2pe-matrix-extra {
  max-width: 8rem;
  padding-left: 0.75rem !important;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--muted-color);
}

.r2pe-matrix-table thead th.r2pe-matrix-extra {
  background: color-mix(in srgb, var(--muted-color) 10%, var(--surface-color)) !important;
}

.r2pe-scroll {
  width: fit-content;
  max-width: 100%;
  max-height: 20rem;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm, 0.25rem);
}

.r2pe-group-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.375rem 0.5rem !important;
  background: color-mix(in srgb, var(--r2pe-tone) 13%, var(--surface-color)) !important;
  color: var(--heading-color);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.r2pe-group-table input {
  width: 9rem;
}

.r2pe-group-table thead th.r2pe-group-actions {
  background: transparent !important;
}

.r2pe-group-table tbody tr:nth-child(even) td input:not(.r2pe-changed):not(.is-invalid) {
  background-color: color-mix(in srgb, var(--r2pe-tone) 5%, var(--surface-color));
}

.r2pe-group-actions {
  width: 2rem;
  text-align: center;
}

.r2pe-group-table tbody .r2pe-icon-btn {
  opacity: 0;
}

.r2pe-group-table tbody tr:hover .r2pe-icon-btn,
.r2pe-group-table tbody tr:focus-within .r2pe-icon-btn {
  opacity: 1;
}

/* Feld hinzufuegen: erst ein kleiner Knopf, die Auswahl klappt auf */
.r2pe-addfield {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.r2pe-addfield-toggle {
  border: 1px dashed var(--border-color);
  color: var(--muted-color);
}

.r2pe-addfield-toggle:hover,
.r2pe-addfield-toggle.active {
  border-color: var(--r2pe-tone);
  color: var(--r2pe-tone);
}

.r2pe-addfield-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.r2pe-addfield-form.d-none {
  display: none !important;
}

/* Speichern-Balken */
.r2pe-savebar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  margin: 1rem 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 0.5rem);
  background: var(--surface-color);
  box-shadow: var(--shadow-lg, 0 -0.25rem 1rem rgba(0, 0, 0, 0.08));
  transition: background-color var(--transition-fast, 0.15s), border-color var(--transition-fast, 0.15s);
}

.r2pe-savebar-count {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-color);
}

.r2pe-savebar-count::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--success-color);
}

.r2pe-savebar-dirty {
  border-color: var(--accent-color);
  border-left: 4px solid var(--accent-color);
  background: color-mix(in srgb, var(--accent-color) 9%, var(--surface-color));
}

.r2pe-savebar-dirty .r2pe-savebar-count {
  font-weight: 600;
  color: var(--heading-color);
}

.r2pe-savebar-dirty .r2pe-savebar-count::before {
  background: var(--accent-color);
  box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--accent-color) 25%, transparent);
}

/* Aenderungsliste (Pruefdialog, Versionsdetails) */
.r2pe-changes {
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: 0.8125rem;
}

.r2pe-changes li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 0.375rem 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.r2pe-changes li:nth-child(even) {
  background: color-mix(in srgb, var(--muted-color) 5%, transparent);
}

.r2pe-change-badge {
  padding: 0 0.5rem;
  border-radius: var(--radius-full, 999px);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.4rem;
}

.r2pe-change-changed {
  background: color-mix(in srgb, var(--info-color) 18%, transparent);
  color: var(--info-color);
}

.r2pe-change-added {
  background: color-mix(in srgb, var(--success-color) 18%, transparent);
  color: var(--success-color);
}

.r2pe-change-removed {
  background: color-mix(in srgb, var(--danger-color) 18%, transparent);
  color: var(--danger-color);
}

.r2pe-change-path {
  font-weight: 600;
  color: var(--heading-color);
}

.r2pe-change-values {
  flex-basis: 100%;
  font-family: var(--bs-font-monospace, monospace);
  word-break: break-all;
}

.r2pe-change-old {
  color: var(--muted-color);
  text-decoration: line-through;
}

.r2pe-change-new {
  font-weight: 600;
  color: var(--heading-color);
}

/* Versionen */
.r2pe-versions-table {
  font-size: 0.8125rem;
}

.r2pe-versions-table td:last-child .d-flex {
  flex-wrap: nowrap !important;
}

.r2pe-versions-table td:last-child .btn {
  white-space: nowrap;
}

.r2pe-version-current > td {
  background: color-mix(in srgb, var(--success-color) 8%, transparent) !important;
}

.r2pe-version-current > td:first-child {
  box-shadow: inset 3px 0 0 var(--success-color);
}

.r2pe-versions-table td:nth-child(2) {
  white-space: nowrap;
}

.r2pe-version-user {
  min-width: 12rem;
  overflow-wrap: anywhere;
}

.r2pe-version-action {
  --r2pe-action: var(--r2-group-6);
  display: inline-block;
  padding: 0.0625rem 0.5rem;
  border-radius: var(--radius-full, 999px);
  background: color-mix(in srgb, var(--r2pe-action) 15%, transparent);
  color: var(--r2pe-action);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.r2pe-version-upload { --r2pe-action: var(--r2-group-1); }
.r2pe-version-edit { --r2pe-action: var(--accent-color); }
.r2pe-version-restore { --r2pe-action: var(--r2-group-10); }

.r2pe-version-detail {
  background: color-mix(in srgb, var(--muted-color) 5%, transparent) !important;
}

.r2pe-sha {
  font-family: var(--bs-font-monospace, monospace);
  word-break: break-all;
}

.r2pe-raw {
  font-size: 0.75rem;
  white-space: pre;
}

@media (max-width: 575.98px) {
  .r2pe-nav-label {
    flex-basis: 100%;
  }

  .r2pe-select,
  .r2pe-nav .r2pe-select {
    min-width: 0;
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .r2pe-card-chevron,
  .r2pe-field-actions,
  .r2pe-matrix-head .r2pe-icon-btn,
  .r2pe-savebar {
    transition: none;
  }
}

.r2pe-nav-json {
  order: 99;
  margin-left: auto;
}

.r2pe-json-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.r2pe-json-toolbar .r2pe-select {
  min-width: 18rem;
  font-weight: 600;
}

.r2pe-json-tools {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-left: auto;
}

.r2pe-ace {
  position: relative;
  height: calc(100vh - 24rem);
  min-height: 18rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm, 0.25rem);
}

.r2pe-ace .r2pe-status {
  padding: 1rem;
}

.r2pe-ace > textarea.r2pe-raw {
  width: 100%;
  height: 100%;
  border: 0;
  resize: none;
}

.r2pe-json-statusbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
}

.r2pe-json-status {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.r2pe-json-status:empty {
  display: none;
}

.r2pe-json-status::before {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  content: "";
}

.r2pe-json-ok { color: var(--success-color); }
.r2pe-json-ok::before { background: var(--success-color); }
.r2pe-json-error { color: var(--danger-color); font-weight: 600; }
.r2pe-json-error::before { background: var(--danger-color); }
.r2pe-json-busy,
.r2pe-json-idle { color: var(--muted-color); }
.r2pe-json-busy::before,
.r2pe-json-idle::before { background: var(--muted-color); }

.r2pe-json-errors {
  max-height: 9rem;
  margin: 0.5rem 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  font-size: 0.8125rem;
}

.r2pe-json-errors:empty {
  display: none;
}

.r2pe-json-errors li {
  padding: 0.25rem 0.5rem;
  border-left: 3px solid var(--danger-color);
  margin-bottom: 0.25rem;
  background: color-mix(in srgb, var(--danger-color) 7%, transparent);
  cursor: pointer;
}

.r2pe-json-errors li.r2pe-json-error-outside {
  border-left-color: var(--muted-color);
  background: color-mix(in srgb, var(--muted-color) 7%, transparent);
  cursor: default;
}

.r2pe-json-line {
  display: inline-block;
  margin-right: 0.5rem;
  padding: 0 0.375rem;
  border-radius: var(--radius-full, 999px);
  background: var(--danger-color);
  color: var(--contrast-color, #fff);
  font-size: 0.6875rem;
  font-weight: 600;
}

@media (max-width: 575.98px) {
  .r2pe-ace {
    height: 50vh;
  }

  .r2pe-json-toolbar .r2pe-select {
    min-width: 0;
    flex: 1 1 100%;
  }

  .r2pe-json-tools {
    margin-left: 0;
  }
}


/* Hilfe-Uebersicht (help/help_index.html) - Hilfe-Center */
.help-tone-accent { --help-tone: var(--accent-color); }
.help-tone-info { --help-tone: var(--info-color); }
.help-tone-success { --help-tone: var(--success-color); }
.help-tone-warning { --help-tone: var(--warning-color); }
.help-tone-danger { --help-tone: var(--danger-color); }

.help-hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: var(--contrast-color);
}

.help-hero-content {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  max-width: 46rem;
}

.help-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.help-hero-title {
  margin: 0.9rem 0 0.4rem;
  color: inherit;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
}

.help-hero-text {
  max-width: 38rem;
  margin-bottom: 1.25rem;
  opacity: 0.9;
}

.help-hero-search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 40rem;
  padding: 0.35rem 0.35rem 0.35rem 1.1rem;
  border-radius: var(--radius-full);
  background: var(--surface-color);
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.18);
}

.help-hero-search > i {
  color: var(--muted-color);
}

.help-hero-search input {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--default-color);
  font-size: 1rem;
}

.help-hero-search .btn {
  padding-inline: 1.25rem;
  border-radius: var(--radius-full);
}

.help-hero-meta {
  margin-top: 0.9rem;
  font-size: 0.85rem;
  opacity: 0.85;
}

.help-hero-action {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.16);
  color: var(--contrast-color);
}

.help-hero-action:hover,
.help-hero-action:focus-visible {
  background: rgba(255, 255, 255, 0.26);
  color: var(--contrast-color);
}

.help-hero-graphic {
  position: absolute;
  right: -1.5rem;
  bottom: -3.5rem;
  font-size: 13rem;
  line-height: 1;
  opacity: 0.1;
  pointer-events: none;
}

[data-theme=dark] .help-hero {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-color), black 45%) 0%, color-mix(in srgb, var(--accent-color), black 62%) 100%);
}

/* Schmal */
@media (max-width: 767.98px) {
  .help-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .help-hero-action {
    align-self: flex-start;
  }

  .help-hero-graphic {
    display: none;
  }

  .help-hero-search .btn {
    padding-inline: 0.9rem;
  }
}

/* Karten je App */
.help-app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22.5rem), 1fr));
  align-items: start;
  gap: 1.25rem;
}

.help-app-grid.is-masonry {
  grid-auto-rows: 4px;
  row-gap: 0;
}

.help-app-card {
  margin-bottom: 0;
  scroll-margin-top: 5.5rem;
}

.help-app-card:target {
  box-shadow: 0 0 0 2px var(--help-tone);
}

.help-app-card-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.25rem 0.6rem;
}

.help-app-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--help-tone, var(--accent-color)) 14%, transparent);
  color: var(--help-tone, var(--accent-color));
  font-size: 1.3rem;
}

.help-app-icon-sm {
  width: 2.1rem;
  height: 2.1rem;
  font-size: 1rem;
}

.help-app-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.help-app-icon-sm svg {
  width: 1rem;
  height: 1rem;
}

.help-app-icon > .ph-light {
  font-size: 1.6rem;
  line-height: 1;
}

.help-app-icon-sm > .ph-light {
  font-size: 1.2rem;
}

.help-app-card-title {
  margin: 0;
  color: var(--heading-color);
  font-size: 1.05rem;
  font-weight: 600;
}

.help-app-card-count {
  color: var(--muted-color);
  font-size: 0.8rem;
}

/* Artikelliste - gemeinsam fuer die Karten und die Trefferseite */
.help-app-articles {
  margin: 0;
  padding: 0 0.6rem 0.7rem;
  list-style: none;
}

.help-app-articles li + li {
  border-top: 1px solid color-mix(in srgb, var(--border-color) 60%, transparent);
}

.help-app-article {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem;
  border-radius: var(--radius-md);
  color: var(--default-color);
  text-decoration: none;
  transition: background-color var(--transition-fast);
}

.help-app-article:hover,
.help-app-article:focus-visible {
  background: color-mix(in srgb, var(--help-tone, var(--accent-color)) 8%, transparent);
  color: var(--default-color);
}

.help-app-article-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.help-app-article-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: var(--heading-color);
  font-weight: 500;
}

.help-app-article-excerpt,
.help-app-article-snippet {
  color: var(--muted-color);
  font-size: 0.8rem;
}

.help-app-article-excerpt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.help-app-article-app {
  color: var(--help-tone, var(--accent-color));
  font-size: 0.72rem;
  font-weight: 600;
}

.help-app-article > .bi-chevron-right {
  flex-shrink: 0;
  color: var(--muted-color);
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.help-app-article:hover > .bi-chevron-right {
  color: var(--help-tone, var(--accent-color));
  transform: translateX(3px);
}

/* Trefferseite */
.help-results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  max-width: 56rem;
  margin-bottom: 0.75rem;
  color: var(--muted-color);
  font-size: 0.9rem;
}

.help-results-head a {
  color: var(--accent-color);
  text-decoration: none;
}

.help-results-card {
  max-width: 56rem;
}

.help-results-card .help-app-articles {
  padding-top: 0.6rem;
}

@media (prefers-reduced-motion: reduce) {
  .help-app-article > .bi-chevron-right,
  .help-app-card {
    transition: none;
  }
}


.two-factor-steps {
  padding-left: 1.2rem;
  margin-bottom: 1rem;
}

.two-factor-qr {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.two-factor-qr svg {
  width: 220px;
  height: 220px;
  padding: 8px;
  background: #fff;
  border-radius: 8px;
}

.two-factor-secret,
.two-factor-codes {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
  user-select: all;
}

.two-factor-secret {
  font-size: 1rem;
  word-break: break-all;
}

.two-factor-codes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 1.1rem;
}

.two-factor-code-input {
  font-size: 1.4rem;
  letter-spacing: 0.3em;
  text-align: center;
}


.privacy-anonymize > summary {
  list-style: none;
}

.privacy-anonymize > summary::-webkit-details-marker {
  display: none;
}

.privacy-anonymize[open] {
  flex-basis: 100%;
  max-width: 22rem;
}


/* Chat */
.chat-input.chat-input-readonly {
  display: flex;
  align-items: center;
  color: var(--text-muted, #6c757d);
  font-size: 0.875rem;
}


/* Profil, Karte "Meine Daten" (Account/settings.html) */
.my-data-rights {
  font-size: 0.8125rem;
}

.my-data-rights > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent-color);
}

.my-data-rights[open] > summary {
  margin-bottom: 0.5rem;
}

.my-data-rights ul {
  padding-left: 1.1rem;
  margin-bottom: 0.75rem;
}

.my-data-rights li {
  margin-bottom: 0.4rem;
}


.widget-banner-welcome .welcome-hints {
  margin-bottom: var(--spacing-md);
}

.welcome-section-title {
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}

.welcome-hints ul {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.welcome-hints a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.15);
  color: inherit;
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.15s ease;
}

.welcome-hints a:hover,
.welcome-hints a:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  color: inherit;
}

.welcome-since {
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  opacity: 0.9;
}

.welcome-since a,
.welcome-privacy-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.welcome-privacy-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  opacity: 0.9;
}

.welcome-since a:hover,
.welcome-privacy-link:hover {
  color: inherit;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .welcome-hints a {
    transition: none;
  }
}


/* Dashboard */
.dashboard-help-hint {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 3rem 1.1rem 1.25rem;
  border-left: 4px solid var(--accent-color);
}

.dashboard-help-hint-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--accent-color) 14%, transparent);
  color: var(--accent-color);
}

.dashboard-help-hint-icon svg {
  width: 1.4rem;
  height: 1.4rem;
}

.dashboard-help-hint-title {
  margin: 0 0 0.25rem;
  color: var(--heading-color);
  font-size: 1rem;
  font-weight: 600;
}

.dashboard-help-hint-text {
  margin: 0 0 0.75rem;
  color: var(--default-color);
  font-size: 0.9rem;
}

.dashboard-help-hint-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dashboard-help-hint-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
}

[data-theme=dark] .dashboard-help-hint-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* Dashboard */
.dashboard-video-hint {
  align-items: center;
}

.dashboard-video-hint-poster {
  position: relative;
  display: block;
  flex-shrink: 0;
  width: 15rem;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--accent-color) 14%, transparent);
}

.dashboard-video-hint-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.dashboard-video-hint-poster:hover img,
.dashboard-video-hint-poster:focus-visible img {
  transform: scale(1.04);
}

/* Links unten statt mittig */
.dashboard-video-hint-play {
  position: absolute;
  left: 0.4rem;
  bottom: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--accent-color);
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.dashboard-video-hint-poster:hover .dashboard-video-hint-play,
.dashboard-video-hint-poster:focus-visible .dashboard-video-hint-play {
  transform: scale(1.12);
}

.dashboard-video-hint-duration {
  position: absolute;
  right: 0.4rem;
  bottom: 0.4rem;
  padding: 0.05rem 0.4rem;
  border-radius: var(--radius-sm, 4px);
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.75rem;
}

.dashboard-video-hint-more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.dashboard-video-hint-more-label {
  color: var(--default-color);
  font-weight: 600;
}

.dashboard-video-hint-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--accent-color);
  text-decoration: none;
}

.dashboard-video-hint-link:hover {
  text-decoration: underline;
}

@media (max-width: 767.98px) {
  .dashboard-video-hint {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-video-hint-poster {
    width: 100%;
  }
}


/* Sendungsuebersicht: Spalte Tracking (GEL-Labels) */
.r2-tracking {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.r2-tracking-step {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: var(--bs-secondary-bg);
  border: 1px solid var(--bs-border-color);
}

.r2-tracking-step.is-done {
  background: rgba(var(--bs-success-rgb), 0.45);
  border-color: rgba(var(--bs-success-rgb), 0.6);
}

.r2-tracking-step.is-current {
  background: var(--bs-success);
  border-color: var(--bs-success);
}

.r2-tracking-step.is-cancelled {
  background: var(--bs-danger);
  border-color: var(--bs-danger);
}

.r2-tracking-label {
  margin-left: 0.4rem;
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
}

.r2-tracking-link {
  padding: 0.125rem 0.25rem;
  margin: -0.125rem -0.25rem;
  border-radius: var(--bs-border-radius-sm, 0.25rem);
  text-decoration: none;
}

.r2-tracking-link:hover,
.r2-tracking-link:focus-visible {
  background-color: color-mix(in srgb, var(--accent-color) 8%, transparent);
}

.r2-tracking-link:hover,
.r2-tracking-link:focus-visible {
  color: var(--accent-color);
  text-decoration: underline;
}

.r2-tracking-label.r2-tracking-link {
  margin: 0 0 0 0.15rem;
}

.r2-tracking-external {
  margin-left: 0.25rem;
  font-size: 0.6875rem;
  color: var(--accent-color);
}


/* Sendungsuebersicht: einheitliche Typografie */
#myShipmentTable > tbody > tr > td {
  font-variant-numeric: tabular-nums;
}

#myShipmentTable .badge {
  font-size: 0.75rem;
}

#myShipmentTable.r2-hide-user .r2-col-user {
  display: none;
}

.r2-user-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: help;
  color: var(--accent-color);
  background-color: color-mix(in srgb, var(--accent-color) 14%, transparent);
}

.table-responsive.r2-row-menu-open {
  overflow: visible;
}

#myShipmentTable .r2-route {
  flex-wrap: nowrap;
}

.r2-route-from,
.r2-route-to,
.r2-route-badges {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.r2-route-from {
  font-size: 0.8125rem;
  color: var(--muted-color);
}

.r2-route-to .r2-plz {
  font-weight: 600;
}

.r2-route-badges {
  margin-left: 0.25rem;
}

.r2-route-badges:empty {
  display: none;
}

.r2-route-from .r2-neutral-badge {
  margin-left: 0;
}

.r2-dates-icon {
  margin-right: 0.35rem;
  color: var(--muted-color);
}

.r2-dates .text-danger .r2-dates-icon {
  color: inherit;
}

.r2-dates-transit {
  margin-left: 0.25rem;
  font-size: 0.6875rem;
  color: var(--muted-color);
}

.r2-dates .text-danger .r2-dates-transit {
  color: inherit;
}

.r2-row-cancelled > td:not(:last-child) {
  opacity: 0.5;
}

.r2-row-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.r2-status-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-bottom: 1px solid var(--glass-border-subtle, var(--border-color));
}

.r2-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.85rem;
  font-size: 0.8125rem;
  color: var(--muted-color);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.r2-status-chip:hover {
  color: var(--heading-color);
  border-color: color-mix(in srgb, var(--accent-color), transparent 40%);
}

.r2-status-chip[aria-pressed="true"] {
  color: #fff;
  background: var(--accent-color);
  border-color: var(--accent-color);
}

.r2-status-chip-alert {
  color: var(--bs-warning-text-emphasis, #997404);
  border-color: color-mix(in srgb, var(--warning-color), transparent 40%);
}

.r2-status-chip-alert.is-urgent {
  color: var(--danger-color);
  border-color: color-mix(in srgb, var(--danger-color), transparent 40%);
}

.r2-status-chip-alert[aria-pressed="true"] {
  color: #3d2a00;
  background: var(--warning-color);
  border-color: var(--warning-color);
}

.r2-status-chip-alert.is-urgent[aria-pressed="true"] {
  color: #fff;
  background: color-mix(in srgb, var(--danger-color), black 25%);
  border-color: color-mix(in srgb, var(--danger-color), black 25%);
}

.r2-status-chip-count {
  min-width: 1.25rem;
  padding: 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.25rem;
  text-align: center;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 18%, transparent);
}

.r2-status-filter {
  align-items: center;
  gap: 0.75rem;
}

.r2-segmented {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 2px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
}

.r2-segment {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--muted-color);
  background: transparent;
  border: 0;
  border-radius: 999px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.r2-segment:hover {
  color: var(--heading-color);
  background: color-mix(in srgb, var(--accent-color) 10%, transparent);
}

.r2-segment[aria-pressed="true"] {
  color: #fff;
  background: var(--accent-color);
}

.r2-segment.is-empty:not([aria-pressed="true"]) {
  opacity: 0.55;
}

.r2-segmented {
  position: relative;
}

.r2-segment {
  position: relative;
  z-index: 1;
}

.r2-segment-thumb {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  border-radius: 999px;
  background: var(--accent-color);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent-color), transparent 60%);
  pointer-events: none;
  transition:
    transform 260ms cubic-bezier(0.3, 0.7, 0.2, 1),
    width 260ms cubic-bezier(0.3, 0.7, 0.2, 1),
    height 260ms cubic-bezier(0.3, 0.7, 0.2, 1);
}

.r2-segment-thumb.is-instant {
  transition: none;
}

.r2-segmented.has-thumb .r2-segment[aria-pressed="true"] {
  background: transparent;
}

@media (prefers-reduced-motion: reduce) {
  .r2-segment-thumb {
    transition: none;
  }
}

.r2-segment-count {
  font-size: 0.6875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}

@media (max-width: 767.98px) {
  .r2-status-filter {
    justify-content: flex-start;
  }

  .r2-segmented {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .r2-segment {
    white-space: nowrap;
  }
}

.r2-cargo-weight {
  font-size: 0.75rem;
  color: var(--muted-color);
}

.r2-tracking-provider {
  display: inline-block;
  margin-right: 0.4rem;
  padding: 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.125rem;
  cursor: help;
  color: var(--muted-color);
  border: 1px solid var(--border-color);
  border-radius: var(--bs-border-radius-sm, 0.25rem);
  vertical-align: 0.1em;
}

.r2-tracking-alert {
  max-width: 18rem;
  margin-top: 0.15rem;
  white-space: normal;
  font-size: 0.75rem;
  color: var(--bs-warning-text-emphasis, #997404);
}

.r2-tracking-alert.is-urgent {
  color: var(--danger-color);
}


/* GEL-Versandlabel: Modal */
.r2-modal-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

/* Das Theme setzt fuer jede .row --spacing-lg und ueberschreibt damit g-2/g-3/g-4 (wie beim Frachtgut-Modal) */
#modal_gel_label .row.g-2 { --bs-gutter-x: 0.5rem; --bs-gutter-y: 0.5rem; }
#modal_gel_label .row.g-4 { --bs-gutter-x: 1rem; --bs-gutter-y: 1rem; }

@media (min-width: 992px) {
  #modal_gel_label .modal-dialog {
    width: min(1440px, calc(100vw - 4rem));
    max-width: none;
  }
}

.r2-gel-client {
  margin-top: 0.15rem;
  font-size: 0.875rem;
  color: var(--default-color);
}

.r2-gel-static-hint,
.r2-gel-hint {
  font-size: 0.8125rem;
  color: var(--muted-color);
}

.r2-gel-hint::before {
  content: "· ";
}

.r2-gel-group {
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 12px);
  background-color: color-mix(in srgb, var(--default-color) 5%, var(--surface-color));
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.r2-gel-group:hover,
.r2-gel-group:focus-within {
  border-color: color-mix(in srgb, var(--accent-color) 45%, var(--border-color));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color), transparent 90%);
}

#modal_gel_label .r2-gel-group .form-control,
#modal_gel_label .r2-gel-group .form-select {
  background-color: var(--input-bg);
}

.r2-gel-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.r2-gel-section .bi {
  color: var(--accent-color);
}

.r2-gel-sender {
  height: auto;
  padding: 0.75rem;
  line-height: 1.5;
}

.r2-gel-switches {
  border: 1px solid var(--input-border, var(--border-color));
  border-radius: var(--bs-border-radius);
  background-color: var(--input-bg);
}

.r2-gel-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.375rem 0.75rem;
}

.r2-gel-switch + .r2-gel-switch {
  border-top: 1px solid var(--input-border, var(--border-color));
}

.r2-gel-switch .form-check {
  margin-bottom: 0;
}

.r2-gel-switch [data-gel-toggle-wrap] {
  width: 7.5rem;
  flex-shrink: 0;
}

.r2-gel-switch.is-stacked .form-check {
  flex: 1 1 auto;
  align-items: flex-start;
}

.r2-gel-switch.is-stacked .form-check-input {
  flex-shrink: 0;
  margin-top: 0.0625rem;
}

.r2-gel-switch-body {
  flex: 1 1 auto;
  min-width: 0;
}

.r2-gel-switch.is-stacked [data-gel-toggle-wrap] {
  width: auto;
  margin-top: 0.375rem;
}

.r2-gel-more-toggle .bi {
  display: inline-block;
  transition: transform 0.15s ease;
}

.r2-gel-more-toggle.collapsed .bi {
  transform: rotate(-90deg);
}

.r2-gel-subsection {
  margin: 0.5rem 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted-color);
}

.r2-gel-note {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--muted-color);
}

.r2-label-alerts {
  border-left: 4px solid var(--bs-warning, #ffc107);
}

.r2-label-alerts-body {
  padding: 0 1.125rem 0.75rem;
}

.r2-label-alerts-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem 1.125rem;
  border: 0;
  background: none;
  color: inherit;
  font-weight: 600;
  text-align: left;
}

.r2-label-alerts-chevron {
  margin-left: auto;
  transition: transform 0.2s ease;
}

.r2-label-alerts-head:not(.collapsed) .r2-label-alerts-chevron {
  transform: rotate(180deg);
}

.r2-label-alerts-head .bi.r2-label-alerts-chevron {
  color: var(--muted-color);
}

.r2-label-alerts-head .bi {
  color: var(--bs-warning, #ffc107);
}

.r2-label-alerts-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.r2-label-alerts-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.125rem 0.75rem;
  padding: 0.25rem 0;
  font-size: 0.875rem;
}

.r2-label-alerts-list li + li {
  border-top: 1px dashed var(--border-color);
}

.r2-label-alerts-meta {
  color: var(--default-color);
}

.r2-label-alerts-reasons {
  color: var(--muted-color);
}

.r2-label-alerts-list li.is-urgent .r2-label-alerts-reasons {
  color: var(--bs-danger, #dc3545);
}

.r2-label-alerts-more {
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: var(--muted-color);
}

.r2-gel-colli {
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--input-border, var(--border-color));
  border-radius: var(--bs-border-radius);
  background-color: var(--input-bg);
  font-size: 0.875rem;
}

.r2-gel-colli-label {
  margin-right: 0.375rem;
  font-size: 0.75rem;
  color: var(--muted-color);
}

.r2-gel-colli.is-changed {
  border-color: var(--bs-warning, #ffc107);
  background-color: color-mix(in srgb, var(--bs-warning, #ffc107) 10%, var(--input-bg));
}

.r2-gel-colli-before {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--muted-color);
}

.r2-gel-colli.is-changed .r2-gel-colli-before {
  color: var(--bs-warning-text-emphasis, #997404);
}

.r2-gel-label-note {
  margin-top: 0.375rem;
  color: var(--muted-color);
}

.r2-gel-label-note.is-print {
  color: var(--bs-primary-text-emphasis, var(--accent-color));
  font-weight: 500;
}

.r2-gel-label-change {
  margin-top: 0.5rem;
  padding: 0.5rem 0.625rem;
  border-left: 3px solid var(--bs-warning, #ffc107);
  border-radius: var(--bs-border-radius-sm, 0.25rem);
  background-color: color-mix(in srgb, var(--bs-warning, #ffc107) 12%, transparent);
  color: var(--default-color);
}

.r2-gel-label-change .bi-exclamation-triangle {
  color: var(--bs-warning-text-emphasis, #997404);
}

.r2-tracking-batch {
  margin-left: 0.375rem;
  padding: 0 0.375rem;
  border-radius: var(--radius-sm, 0.25rem);
  background: color-mix(in srgb, var(--accent-color) 12%, transparent);
  font-size: 0.75rem;
  color: var(--accent-color);
  cursor: help;
}

.r2-tracking-changed {
  margin-left: 0.25rem;
  font-size: 0.75rem;
  color: var(--bs-warning-text-emphasis, #997404);
}

.r2-dates {
  font-size: 0.8125rem;
}

.r2-dates-label {
  display: inline-block;
  min-width: 4.25rem;
  color: var(--muted-color);
}

.r2-char-counter-wrap {
  position: relative;
  display: block;
}

.form-control.has-char-counter {
  padding-right: 4.5rem;
}

.form-floating > .form-control.has-char-counter ~ label {
  padding-right: 4.5rem;
}

.r2-notes-floating.form-control {
  min-height: 7rem;
  resize: vertical;
}

.r2-char-counter {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--muted-color);
  pointer-events: none;
}

.r2-char-counter.is-near {
  color: var(--bs-orange, #fd7e14);
}

.r2-char-counter.is-full {
  color: var(--bs-danger, #dc3545);
}

/* Mitfahrende Popover (r2.js): nicht anklickbar, sonst landet die Maus auf dem Pfeil und das Popover flackert */
.popover.r2-popover-follow {
  pointer-events: none;
}

.r2-dates > div {
  width: fit-content;
}

.r2-dates-moved {
  color: var(--bs-orange, #fd7e14);
}

.r2-dates .text-danger .r2-dates-label {
  color: inherit;
}

.r2-neutral-badge {
  margin-left: 0.25rem;
  cursor: help;
  background-color: var(--bs-orange, #fd7e14);
  color: #fff;
  font-size: 0.6875rem;
  vertical-align: 0.1em;
}

.r2-recipient-address {
  cursor: help;
  text-decoration: underline dotted color-mix(in srgb, var(--muted-color) 60%, transparent);
  text-underline-offset: 3px;
}

.r2-tracking-problem {
  margin-left: 0.25rem;
  font-size: 0.75rem;
  color: var(--bs-danger, #dc3545);
}

.r2-tracking-refresh {
  margin-left: 0.35rem;
  font-size: 0.8125rem;
  color: var(--muted-color);
  text-decoration: none;
}

.r2-tracking-refresh:hover,
.r2-tracking-refresh:focus-visible {
  color: var(--accent-color);
}

.r2-tracking-detail {
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.75rem;
  color: var(--muted-color);
}

.r2-gel-label-status {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  margin-top: 0.25rem;
}

.r2-gel-status-refresh {
  font-size: inherit;
  text-decoration: none;
}

.r2-gel-label-note.is-problem {
  color: var(--bs-danger-text-emphasis, var(--bs-danger, #dc3545));
  font-weight: 500;
}

/* Schalter im Dark Mode: Theme-Rand (--border-color) ist auf dunklen Karten und Modals kaum sichtbar */
[data-theme=dark] .form-switch .form-check-input:not(:checked) {
  background-color: var(--border-color-dark);
  border-color: color-mix(in srgb, var(--muted-color) 45%, transparent);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23d6d3d1'/%3e%3c/svg%3e");
}

[data-theme=dark] .form-check-input:checked {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

[data-theme=dark] .form-switch .form-check-input:checked {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

[data-theme=dark] .form-switch .form-check-input:focus-visible {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.2rem var(--input-focus-ring);
}

/* Zusammenfassung einer abgeholten Sendung: Stand der letzten Label-Buchung statt Neuberechnung */
.r2-calc-frozen {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.625rem;
  border-radius: var(--radius-sm, 0.25rem);
  background: color-mix(in srgb, var(--bs-info, #0dcaf0) 12%, transparent);
  font-size: 0.75rem;
  color: var(--default-color);
}

.r2-calc-frozen-text {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.r2-calc-frozen-duplicate {
  font-size: 0.75rem;
}

.r2-calc-frozen .bi-snow {
  color: var(--bs-info-text-emphasis, #055160);
}

/* Karte "Versandlabels" unter den Frachtguetern (_gel_labels.html): Kopfzeile mit Aktionen, Eckdaten, Zeitleiste, Hinweise */
#gel-labels {
  scroll-margin-top: 6rem;
}

.r2-gel-labels-bulk {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

/* Label-Fenster im Sammel-Modus: Teilsendungen mit Empfaenger aus der Adressliste und Zustand je Zeile */
.r2-gel-batch-intro {
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted-color);
}

.r2-gel-batch-items {
  max-height: 22rem;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.r2-gel-batch-items li {
  display: grid;
  grid-template-columns: 6.25rem minmax(0, 1fr);
  gap: 0.125rem 0.5rem;
  align-items: baseline;
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8125rem;
}

.r2-gel-batch-badge {
  justify-self: start;
}

.r2-gel-batch-colli {
  grid-column: 2;
  overflow: hidden;
  font-size: 0.75rem;
  color: var(--muted-color);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.r2-gel-batch-state {
  grid-column: 2;
  font-size: 0.75rem;
  color: var(--muted-color);
}

.r2-gel-batch-state:empty {
  display: none;
}

.r2-gel-batch-items li.is-busy .r2-gel-batch-state {
  color: var(--accent-color);
}

.r2-gel-batch-items li.is-done .r2-gel-batch-state {
  color: var(--success-color);
  font-weight: 600;
}

.r2-gel-batch-items li.is-failed .r2-gel-batch-state {
  color: var(--danger-color);
}

.r2-gel-labels-provider {
  margin-left: 0.25rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--muted-color);
}

.r2-gel-labels .r2-gel-label {
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  font-size: 0.875rem;
}

.r2-gel-labels .r2-gel-label:first-child {
  padding-top: 0;
  border-top: 0;
}

.r2-gel-labels .r2-gel-label:last-child {
  padding-bottom: 0;
}

.r2-gel-labels .r2-gel-label.is-cancelled {
  opacity: 0.6;
}

.r2-gel-label-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.r2-gel-label-head .r2-gel-label-actions {
  margin-top: 0;
}

.r2-gel-label-head .r2-gel-label-actions .r2-gel-label-cancel {
  margin-left: 0.5rem;
}

.r2-gel-label-facts {
  margin-top: 0.25rem;
  color: var(--muted-color);
}

.r2-gel-label-route {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.25rem 1rem;
  margin-top: 0.625rem;
}

.r2-gel-route-place {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.r2-gel-route-caption {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-color);
}

.r2-gel-route-neutral {
  margin-left: 0.25rem;
  padding: 0 0.3rem;
  border-radius: var(--radius-sm, 0.25rem);
  background: rgba(var(--bs-warning-rgb), 0.18);
  color: var(--bs-warning-text-emphasis, #997404);
  letter-spacing: 0;
  text-transform: none;
}

.r2-gel-route-zip {
  font-size: 1rem;
  font-weight: 700;
}

.r2-gel-route-arrow {
  margin-bottom: 0.125rem;
  color: var(--muted-color);
}

.r2-gel-label-fix {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.375rem;
}

.r2-gel-label-fix-date {
  font-weight: 700;
  color: var(--bs-warning-text-emphasis, #997404);
}

.r2-gel-timeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0.875rem 0 0;
  padding: 0;
  list-style: none;
}

.r2-gel-timeline li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  text-align: center;
}

.r2-gel-timeline li + li::before {
  content: "";
  position: absolute;
  top: 5px;
  right: calc(50% + 9px);
  left: calc(-50% + 9px);
  height: 2px;
  background: var(--bs-border-color);
}

.r2-gel-timeline li.is-done::before,
.r2-gel-timeline li.is-current::before {
  background: rgba(var(--bs-success-rgb), 0.6);
}

.r2-gel-timeline-dot {
  width: 12px;
  height: 12px;
  border: 2px solid var(--bs-border-color);
  border-radius: 50%;
  background: var(--bs-body-bg);
}

.r2-gel-timeline li.is-done .r2-gel-timeline-dot {
  border-color: rgba(var(--bs-success-rgb), 0.6);
  background: rgba(var(--bs-success-rgb), 0.45);
}

.r2-gel-timeline li.is-current .r2-gel-timeline-dot {
  border-color: var(--bs-success);
  background: var(--bs-success);
  box-shadow: 0 0 0 3px rgba(var(--bs-success-rgb), 0.2);
}

.r2-gel-timeline-label {
  margin-top: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--muted-color);
}

.r2-gel-timeline li.is-done .r2-gel-timeline-label,
.r2-gel-timeline li.is-current .r2-gel-timeline-label {
  color: var(--default-color);
}

.r2-gel-timeline li.is-current .r2-gel-timeline-label {
  font-weight: 700;
}

.r2-gel-timeline-at {
  font-size: 0.75rem;
  color: var(--muted-color);
  white-space: nowrap;
}

.r2-gel-labels .r2-gel-label-status {
  margin-top: 0.875rem;
}

@media (min-width: 1200px) {
  .r2-gel-label-body {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-items: center;
    gap: 1.5rem;
  }

  .r2-gel-label-body .r2-gel-timeline {
    margin-top: 0.625rem;
  }
}

@media (max-width: 575.98px) {
  .r2-gel-timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 0.75rem;
  }

  .r2-gel-timeline li:nth-child(4)::before {
    display: none;
  }

  .r2-gel-label-route {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
  }

  .r2-gel-route-arrow {
    margin: 0 0 0 0.75rem;
    transform: rotate(90deg);
  }
}

.r2-gel-label-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.r2-gel-label-actions form {
  margin: 0;
}

.r2-gel-label-actions .btn {
  padding: 0.25rem 0.4rem;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.r2-gel-label-actions .r2-gel-label-cancel {
  margin-left: auto;
}

.r2-gel-label-external {
  margin: 0.25rem 0 0;
}

.r2-gel-label-external .btn-link {
  padding: 0;
  font-size: 0.75rem;
  color: var(--muted-color);
}

#modal_gel_label .r2-gel-place-select {
  font-size: 0.875rem;
  border-color: color-mix(in srgb, var(--accent-color) 45%, var(--input-border, var(--border-color)));
}

.r2-gel-place-note {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted-color);
}

.r2-gel-place-note [data-gel-place-open] {
  color: var(--bs-danger, #dc3545);
}

.r2-gel-reference-cut {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--bs-warning-text-emphasis, #997404);
}

#modal_gel_label .form-control.is-warning {
  border-color: var(--bs-warning, #ffc107);
}

.r2-gel-paste.form-control {
  height: 6.5rem;
  min-height: 6.5rem;
  resize: vertical;
}

.r2-gel-paste.is-ai-busy {
  color: color-mix(in srgb, var(--default-color) 45%, transparent);
}

.r2-gel-paste-ai {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  left: 0.5rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.625rem;
  border-radius: var(--bs-border-radius-sm, 0.25rem);
  background-color: color-mix(in srgb, var(--input-bg) 88%, transparent);
  color: var(--accent-color);
  font-size: 0.8125rem;
  font-weight: 500;
  pointer-events: none;
}

.r2-gel-paste-ai[hidden] {
  display: none;
}

.r2-gel-ai-note {
  color: var(--accent-color);
}

/* Adressbuch: Treffer unter dem Einfuegefeld im Label-Modal */
.r2-address-book-menu {
  user-select: none;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1060;
  max-height: 18rem;
  margin-top: 0.25rem;
  overflow-y: auto;
}

.r2-address-book-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  white-space: normal;
}

.r2-address-book-menu .r2-address-book-item:hover {
  background: transparent;
}

.r2-address-book-menu .r2-address-book-item.active {
  color: var(--default-color);
  background: color-mix(in srgb, var(--accent-color), transparent 88%);
}

.r2-address-book-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.r2-address-book-text strong,
.r2-address-book-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.r2-address-book-text strong {
  font-weight: 600;
}

.r2-address-book-text small {
  color: var(--muted-color);
}

.r2-address-book-item.active small,
.r2-address-book-item:active small {
  color: inherit;
  opacity: 0.85;
}

.r2-address-book-menu .r2-address-book-remove {
  flex-shrink: 0;
  cursor: default;
  padding: 0.2rem 0.4rem;
  border: 0;
  border-radius: var(--bs-border-radius-sm, 0.25rem);
  background: none;
  font-size: 0.8125rem;
  color: var(--muted-color);
}

.r2-address-book-remove:hover {
  color: var(--bs-danger, #dc3545);
}

.r2-address-book-item.is-confirm,
.r2-address-book-item.is-busy,
.r2-address-book-item.is-failed {
  flex-wrap: wrap;
  cursor: default;
  background: color-mix(in srgb, var(--bs-danger, #dc3545) 10%, transparent);
}

.r2-address-book-item.is-confirm .r2-address-book-text strong,
.r2-address-book-item.is-busy .r2-address-book-text strong,
.r2-address-book-item.is-failed .r2-address-book-text strong,
.r2-address-book-item.is-confirm .r2-address-book-text small,
.r2-address-book-item.is-busy .r2-address-book-text small,
.r2-address-book-item.is-failed .r2-address-book-text small {
  white-space: normal;
}

.r2-address-book-item.is-hidden small {
  white-space: normal;
}

.r2-address-book-item.is-failed small {
  color: var(--bs-danger, #dc3545);
}

.r2-address-book-item.is-removed,
.r2-address-book-item.is-hidden {
  cursor: default;
  opacity: 0.6;
}

.r2-address-book-item.is-removed strong::before,
.r2-address-book-item.is-hidden strong::before {
  margin-right: 0.35rem;
  font-family: "bootstrap-icons";
  font-weight: normal;
  color: var(--bs-success, #198754);
  content: "\F26B";
}

.r2-address-book-actions {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.4rem;
}

.form-floating > .r2-gel-paste ~ label,
.form-floating > .r2-notes-floating ~ label {
  right: 0;
  z-index: 2;
}

.form-floating > .r2-gel-paste:focus ~ label,
.form-floating > .r2-gel-paste:not(:placeholder-shown) ~ label,
.form-floating > .r2-notes-floating:focus ~ label,
.form-floating > .r2-notes-floating:not(:placeholder-shown) ~ label {
  opacity: 1;
  color: color-mix(in srgb, var(--muted-color) 65%, transparent);
}

.form-floating > .r2-gel-paste:focus ~ label::after,
.form-floating > .r2-gel-paste:not(:placeholder-shown) ~ label::after,
.form-floating > .r2-notes-floating:focus ~ label::after,
.form-floating > .r2-notes-floating:not(:placeholder-shown) ~ label::after {
  position: absolute;
  top: 0.6rem;
  left: 0.1rem;
  z-index: -1;
  width: calc((100% - 1.25rem) / 0.85 - 0.25rem);
  height: 1.8rem;
  content: "";
  background-color: var(--input-bg);
}

@keyframes r2-gel-filled {
  from { background-color: color-mix(in srgb, var(--bs-success), transparent 80%); }
}

.r2-gel-filled {
  animation: r2-gel-filled 1.6s ease-out;
}

/* Einstellungen > API: Zugaenge je Versanddienstleister */
.r2-ssp-card {
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 12px);
  background-color: color-mix(in srgb, var(--default-color) 4%, var(--surface-color));
}

.r2-ssp-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.r2-ssp-card-sub {
  font-size: 0.8125rem;
  color: var(--muted-color);
}

.r2-ssp-values {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.r2-ssp-values dt {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-color);
}

.r2-ssp-values dd {
  margin: 0;
}

[data-ssp-reference] {
  --r2-ref-custom: var(--accent-color);
  --r2-ref-employee: #0284c7;
  --r2-ref-employee-code: #9333ea;
  --r2-ref-reference: #16a34a;
  --r2-ref-sep: var(--muted-color);
}

.r2-ssp-reference-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.625rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--input-border, var(--border-color));
  border-radius: var(--bs-border-radius);
  background-color: var(--input-bg);
}

.r2-ssp-reference-preview-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-color);
}

.r2-ssp-reference-chips {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  min-width: 0;
  font-family: var(--bs-font-monospace, ui-monospace, monospace);
  font-size: 0.9375rem;
  word-break: break-all;
}

.r2-ssp-reference-chip {
  padding: 0.125rem 0.375rem;
  border-radius: 0.375rem;
  background-color: color-mix(in srgb, var(--r2-chip) 14%, transparent);
  color: color-mix(in srgb, var(--r2-chip) 75%, var(--default-color));
}

.r2-ssp-reference-chip.is-sep {
  padding: 0.125rem 0.0625rem;
  background: none;
  color: var(--muted-color);
}

.r2-ssp-reference-chip.is-space {
  opacity: 0.6;
}

.r2-ssp-reference-chip.is-empty {
  background: none;
  color: var(--muted-color);
}

.r2-ssp-reference-count {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin-left: auto;
  font-size: 0.8125rem;
  color: var(--muted-color);
}

.r2-ssp-reference-count.is-over {
  color: var(--bs-danger, #dc3545);
}

.r2-ssp-reference-parts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.r2-ssp-reference-slot {
  --r2-slot: var(--r2-ref-sep);
  display: flex;
  flex: 0 0 auto;
  width: 10.5rem;
}

.r2-ssp-reference-slot[data-kind="sep"] { width: 4.25rem; }
.r2-ssp-reference-slot[data-kind="empty"] { width: 4.25rem; }
.r2-ssp-reference-slot[data-kind="space"] { width: 7.75rem; }
.r2-ssp-reference-slot[data-kind="custom"] { --r2-slot: var(--r2-ref-custom); width: 12rem; }
.r2-ssp-reference-slot[data-kind="employee"] { --r2-slot: var(--r2-ref-employee); }
.r2-ssp-reference-slot[data-kind="employee_code"] { --r2-slot: var(--r2-ref-employee-code); }
.r2-ssp-reference-slot[data-kind="reference"] { --r2-slot: var(--r2-ref-reference); }

.r2-ssp-reference-slot .form-select,
.r2-ssp-reference-slot .form-control {
  min-width: 0;
  padding-left: 0.625rem;
  font-size: 0.8125rem;
}

.r2-ssp-reference-slot .form-select {
  flex: 1 1 auto;
  padding-right: 1.5rem;
  border-left: 3px solid var(--r2-slot);
  background-position: right 0.375rem center;
}

.r2-ssp-reference-slot[data-kind="empty"] .form-select {
  border-style: dashed;
  border-left-width: 1px;
  background-color: transparent;
  color: var(--muted-color);
}

.r2-ssp-reference-slot[data-kind="custom"] .form-select {
  flex: 0 0 7rem;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.r2-ssp-reference-slot[data-kind="custom"] .form-control {
  flex: 1 1 auto;
  margin-left: -1px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.r2-ssp-reference-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.r2-ssp-reference-legend i {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.375rem;
  border-radius: 50%;
  vertical-align: 0.05em;
}

.r2-ssp-reference-legend i.is-custom { background-color: var(--r2-ref-custom); }
.r2-ssp-reference-legend i.is-employee { background-color: var(--r2-ref-employee); }
.r2-ssp-reference-legend i.is-employee-code { background-color: var(--r2-ref-employee-code); }
.r2-ssp-reference-legend i.is-reference { background-color: var(--r2-ref-reference); }

.r2-ssp-reference-legend-note {
  flex-basis: 100%;
}

.r2-ssp-reference-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.75rem;
  margin-bottom: 0.5rem;
}

.r2-ssp-reference-head .form-label {
  margin-bottom: 0;
}

.r2-ssp-reference-head .btn {
  margin-left: auto;
}

.r2-ssp-invoice-note {
  font-size: 0.8125rem;
  color: var(--muted-color);
}

.r2-ssp-invoice-note i {
  margin-right: 0.25rem;
}

[data-ssp-invoice].is-linked .r2-ssp-reference-parts {
  opacity: 0.6;
}

@media (max-width: 575.98px) {
  .r2-ssp-reference-slot,
  .r2-ssp-reference-slot[data-kind] {
    flex: 1 1 calc(50% - 0.25rem);
    width: auto;
  }

  .r2-ssp-reference-slot[data-kind="custom"] {
    flex-basis: 100%;
  }

  .r2-ssp-reference-slot .form-select {
    padding-left: 0.5rem;
    padding-right: 1.25rem;
    background-position: right 0.25rem center;
    font-size: 0.75rem;
  }
}

.r2-ssp-add-select {
  width: auto;
  min-width: 16rem;
  max-width: 100%;
}

.r2-ssp-card .form-control,
.r2-ssp-card .form-select {
  background-color: var(--input-bg);
}


/* Dashboard: Karte DACH mit Zielorten */
.r2-dach-map {
  position: relative;
  max-width: 34rem;
  margin: 0 auto;
}

.r2-dach-map svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 40rem;
}

.r2-dach-card {
  --r2-eco-color: #1fa5a0;
}

.r2-dach-regions path {
  fill: color-mix(in srgb, var(--surface-color, var(--card-bg)), var(--accent-color) 6%);
  stroke: color-mix(in srgb, var(--muted-color), transparent 82%);
  stroke-width: 0.6;
  stroke-linejoin: round;
  transition: fill 300ms ease;
}

.r2-dach-states path {
  fill: none;
  stroke: color-mix(in srgb, var(--muted-color), transparent 50%);
  stroke-width: 1.2;
  stroke-linejoin: round;
}

.r2-dach-lakes,
.r2-dach-states,
.r2-dach-borders {
  pointer-events: none;
}

.show-economy .r2-eco-1,
.r2-dach-eco-swatch.r2-eco-1 {
  fill: color-mix(in srgb, var(--surface-color, var(--card-bg)), var(--r2-eco-color) 12%);
  background: color-mix(in srgb, var(--surface-color, var(--card-bg)), var(--r2-eco-color) 12%);
}

.show-economy .r2-eco-2,
.r2-dach-eco-swatch.r2-eco-2 {
  fill: color-mix(in srgb, var(--surface-color, var(--card-bg)), var(--r2-eco-color) 26%);
  background: color-mix(in srgb, var(--surface-color, var(--card-bg)), var(--r2-eco-color) 26%);
}

.show-economy .r2-eco-3,
.r2-dach-eco-swatch.r2-eco-3 {
  fill: color-mix(in srgb, var(--surface-color, var(--card-bg)), var(--r2-eco-color) 42%);
  background: color-mix(in srgb, var(--surface-color, var(--card-bg)), var(--r2-eco-color) 42%);
}

.show-economy .r2-eco-4,
.r2-dach-eco-swatch.r2-eco-4 {
  fill: color-mix(in srgb, var(--surface-color, var(--card-bg)), var(--r2-eco-color) 60%);
  background: color-mix(in srgb, var(--surface-color, var(--card-bg)), var(--r2-eco-color) 60%);
}

.show-economy .r2-eco-5,
.r2-dach-eco-swatch.r2-eco-5 {
  fill: color-mix(in srgb, var(--surface-color, var(--card-bg)), var(--r2-eco-color) 82%);
  background: color-mix(in srgb, var(--surface-color, var(--card-bg)), var(--r2-eco-color) 82%);
}

.show-economy .r2-dach-regions path:hover,
.r2-dach-regions path.is-highlight {
  stroke: var(--heading-color);
  stroke-width: 1.5;
}

.r2-dach-eco {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 0.5rem);
}

.r2-dach-eco-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: var(--muted-color);
  font-variant-numeric: tabular-nums;
}

.r2-dach-eco-scale span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.r2-dach-eco-swatch {
  display: inline-block;
  width: 0.9rem;
  height: 0.6rem;
  border-radius: 2px;
}

.r2-dach-region {
  min-height: 2.6em;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted-color);
}

.r2-dach-region strong {
  color: var(--heading-color);
  font-weight: 600;
}

.r2-dach-source {
  margin-top: 1rem;
  font-size: 0.6875rem;
  text-align: right;
  color: var(--muted-color);
}

.r2-dach-lakes path {
  fill: color-mix(in srgb, var(--info-color, #0dcaf0), transparent 70%);
}

.r2-dach-borders path {
  fill: none;
  stroke: color-mix(in srgb, var(--muted-color), transparent 20%);
  stroke-width: 2;
  stroke-linejoin: round;
}

.r2-dach-points circle {
  transition: opacity var(--transition-fast);
}

.r2-dach-points .is-calculation {
  fill: color-mix(in srgb, var(--accent-color), transparent 72%);
  stroke: color-mix(in srgb, var(--accent-color), transparent 45%);
  stroke-width: 1;
}

.r2-dach-points .is-shipment {
  fill: var(--accent-color);
  stroke: color-mix(in srgb, var(--accent-color), white 35%);
  stroke-width: 1.5;
}

.r2-dach-point {
  cursor: help;
  outline: none;
}

.r2-dach-point:hover .is-calculation,
.r2-dach-point:focus-visible .is-calculation {
  stroke: var(--heading-color);
  stroke-width: 2.5;
}

.r2-dach-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: var(--muted-color);
  pointer-events: none;
}

.r2-dach-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  color: var(--muted-color);
}

.r2-dach-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.r2-dach-dot {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
}

.r2-dach-dot.is-shipment {
  background: var(--accent-color);
}

.r2-dach-dot.is-calculation {
  background: color-mix(in srgb, var(--accent-color), transparent 72%);
  border: 1px solid color-mix(in srgb, var(--accent-color), transparent 45%);
}

.r2-dach-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.r2-dach-kpi {
  display: flex;
  flex-direction: column;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 0.5rem);
}

.r2-dach-kpi.is-shipment {
  border-color: color-mix(in srgb, var(--accent-color), transparent 55%);
  background: color-mix(in srgb, var(--surface-color, var(--card-bg)), var(--accent-color) 6%);
}

.r2-dach-kpi-value {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--heading-color);
  font-variant-numeric: tabular-nums;
}

.r2-dach-kpi-label {
  font-size: 0.75rem;
  color: var(--muted-color);
}

@media (max-width: 575.98px) {
  .r2-dach-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.r2-dach-scope {
  font-weight: 400;
  color: var(--muted-color);
}

.r2-dach-hint {
  flex-basis: 100%;
  font-size: 0.75rem;
}

.r2-dach-ranking-head,
.r2-dach-ranking li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4.5rem 3.5rem;
  column-gap: 0.5rem;
  align-items: baseline;
}

.r2-dach-ranking-head {
  padding: 0 0.5rem 0.35rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--muted-color);
}

.r2-dach-ranking-head span + span {
  text-align: right;
}

.r2-dach-ranking {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}

.r2-dach-ranking li {
  row-gap: 0.25rem;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm, 0.25rem);
  cursor: default;
  outline: none;
}

.r2-dach-ranking li:hover,
.r2-dach-ranking li:focus-visible {
  background: color-mix(in srgb, var(--surface-color, var(--card-bg)), var(--accent-color) 8%);
}

.r2-dach-top-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.r2-dach-top-ship,
.r2-dach-top-calc {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.r2-dach-top-ship {
  font-weight: 600;
  color: var(--accent-color);
}

.r2-dach-top-calc,
.r2-dach-top-ship.is-zero {
  font-weight: 400;
  color: var(--muted-color);
}

.r2-dach-top-bar {
  grid-column: 1 / -1;
  display: flex;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: color-mix(in srgb, var(--muted-color), transparent 88%);
}

.r2-dach-top-bar i {
  background: color-mix(in srgb, var(--accent-color), transparent 65%);
}

.r2-dach-top-bar i.is-shipment {
  background: var(--accent-color);
}

li.r2-dach-top-none {
  display: block;
  color: var(--muted-color);
}

.r2-dach-point.is-highlight .is-calculation {
  stroke: var(--heading-color);
  stroke-width: 2.5;
}

.r2-dach-point.is-highlight circle {
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent-color), transparent 30%));
}

.r2-dach-map.is-world {
  max-width: none;
}

.r2-dach-map.is-failed {
  min-height: 12rem;
}

.r2-dach-map.is-failed::after {
  content: "Karte konnte nicht geladen werden";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: var(--muted-color);
}

.r2-dach-map svg.is-world {
  max-height: 28rem;
  border-radius: var(--radius-md, 0.5rem);
  background: color-mix(in srgb, var(--info-color, #0dcaf0), transparent 92%);
}

.r2-world-countries path {
  fill: color-mix(in srgb, var(--surface-color, var(--card-bg)), var(--accent-color) 6%);
  stroke: color-mix(in srgb, var(--muted-color), transparent 55%);
  stroke-width: 0.6;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.r2-world-countries path.is-active {
  fill: color-mix(in srgb, var(--surface-color, var(--card-bg)), var(--accent-color) 22%);
}

.r2-world-countries path:hover {
  fill: color-mix(in srgb, var(--surface-color, var(--card-bg)), var(--accent-color) 14%);
}

.is-world .r2-dach-points circle {
  vector-effect: non-scaling-stroke;
}

.r2-dach-top-title {
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted-color);
}

.r2-dach-top {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
}

.r2-dach-top li {
  padding: 0.15rem 0;
}

.r2-dach-top li > span:first-child {
  display: inline-block;
  max-width: calc(100% - 4.5rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.r2-dach-top-count {
  float: right;
  cursor: help;
  font-variant-numeric: tabular-nums;
  color: var(--muted-color);
}


/* Kopier-Button neben Texten (data-copy-text), z. B. Beschreibung in der Sendungsuebersicht */
.r2-copy-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.r2-note-info {
  display: inline-flex;
  font-size: 0.8125rem;
  color: var(--muted-color);
  cursor: help;
}

.r2-note-info:hover,
.r2-note-info:focus-visible {
  color: var(--accent-color);
}

.r2-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--muted-color);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm, 0.25rem);
  opacity: 0;
  transition: opacity var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

td:hover .r2-copy-btn,
.r2-copy-btn:focus-visible,
.r2-copy-btn.is-copied {
  opacity: 1;
}

.r2-copy-btn:hover {
  color: var(--accent-color);
  background: color-mix(in srgb, var(--accent-color) 12%, transparent);
}

.r2-copy-btn.is-copied {
  color: var(--success-color);
}

@media (hover: none) {
  .r2-copy-btn {
    opacity: 0.6;
  }
}


/* Sendungsuebersicht: Suche, Nutzer, Neue Kalkulation und Archiv ueber der Karte - Suche fuellt den freien Platz */
.r2-status-filter-bar {
  margin-bottom: 1rem;
  padding: 0;
  border-bottom: 0;
}

.r2-shipment-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.r2-shipment-search {
  flex: 1 1 18rem;
  min-width: 0;
}

.r2-shipment-user-select {
  width: auto;
  min-width: 12.5rem;
}

@media (max-width: 575.98px) {
  .r2-shipment-search {
    flex-basis: 100%;
  }

  .r2-shipment-user-select {
    flex: 1 1 auto;
  }
}


/* Sendungsuebersicht: Tracking zweizeilig (Zeile 1 Dienstleister + Schritte, Zeile 2 Status + Hinweise) */
.r2-tracking-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.r2-tracking-line .r2-tracking-provider {
  margin-right: 0;
}

.r2-tracking-status {
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
  margin-top: 0.3rem;
}

.r2-tracking-status .r2-tracking-label,
.r2-tracking-status .r2-tracking-label.r2-tracking-link {
  margin: 0;
  padding: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--bs-body-color);
}

.r2-tracking-status .r2-tracking-label.text-danger {
  color: var(--danger-color);
}

.r2-tracking-status .r2-tracking-link:hover,
.r2-tracking-status .r2-tracking-link:focus-visible {
  background: none;
  color: var(--accent-color);
}

.r2-tracking-status .r2-tracking-problem,
.r2-tracking-status .r2-tracking-changed {
  margin-left: 0;
}

.r2-tracking-actions {
  display: inline-flex;
  gap: 0.1rem;
  opacity: 0.35;
  transition: opacity 0.15s ease;
}

tr:hover .r2-tracking-actions,
.r2-tracking-cell:focus-within .r2-tracking-actions {
  opacity: 1;
}

@media (hover: none) {
  .r2-tracking-actions {
    opacity: 1;
  }
}

.r2-tracking-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: var(--bs-border-radius-sm, 0.25rem);
  font-size: 0.8125rem;
  color: var(--muted-color);
  text-decoration: none;
}

.r2-tracking-action:hover,
.r2-tracking-action:focus-visible {
  color: var(--accent-color);
  background-color: color-mix(in srgb, var(--accent-color) 8%, transparent);
}

.r2-tracking-tag {
  display: inline-flex;
  align-items: center;
  padding: 0 0.45rem;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.125rem;
  cursor: help;
  color: var(--bs-warning-text-emphasis, #997404);
  background: var(--bs-warning-bg-subtle, #fff3cd);
  border: 1px solid var(--bs-warning-border-subtle, #ffe69c);
  border-radius: 50rem;
}

.r2-tracking-tag.is-urgent {
  color: var(--danger-color);
  background: rgba(var(--bs-danger-rgb, 220, 53, 69), 0.08);
  border-color: rgba(var(--bs-danger-rgb, 220, 53, 69), 0.3);
}

@media (prefers-reduced-motion: reduce) {
  .r2-tracking-actions {
    transition: none;
  }
}


/* Sendungsuebersicht: Spalte Versand zweizeilig (Zeile 1 Ziel + Optionen, Zeile 2 Abholort) */
.r2-route-line {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.r2-route-cell .r2-route-to .r2-route-badges {
  margin-left: 0.15rem;
}

.r2-route-cell .r2-route-from {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: var(--muted-color);
}

.r2-route-from-label {
  color: var(--muted-color);
}

.r2-route-cell .r2-route-from .r2-place {
  font-size: inherit;
  color: inherit;
}


/* Frachtgut-Formular: Adressliste hochladen (Vorschau unter "PLZ oder Ort") */
.r2-address-import {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--bs-border-radius, 0.375rem);
  background: var(--bs-body-bg);
}

.r2-address-import-head {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.6rem;
  font-size: 0.875rem;
}

.r2-address-import-muted {
  font-size: 0.75rem;
  color: var(--muted-color);
}

.r2-address-import-table {
  max-height: 18rem;
  overflow-y: auto;
  font-size: 0.8125rem;
}

.r2-address-import-table > .table > thead > tr > th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--table-header-bg, var(--surface-color));
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-color);
}

.r2-address-import-table tr.is-error td {
  color: var(--muted-color);
}

.r2-address-import-table tr.is-error .r2-address-import-note {
  color: var(--danger-color);
}

.r2-address-import-table tr.is-warning .r2-address-import-note {
  color: var(--bs-warning-text-emphasis, #997404);
}

.r2-address-import-note {
  font-size: 0.75rem;
  color: var(--muted-color);
}

.r2-address-import-message {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
}

.r2-address-import-message.is-error {
  color: var(--danger-color);
}

.r2-address-import-message.is-info .bi {
  color: var(--bs-primary);
}

.r2-address-group-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  border: 0;
  font-size: inherit;
  color: inherit;
  text-decoration: none;
}

.r2-address-group-toggle:hover,
.r2-address-group-toggle:focus-visible {
  color: var(--bs-primary);
}

.r2-address-group-toggle .bi {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.r2-address-group-toggle:not(.collapsed) .bi {
  transform: rotate(90deg);
}

.r2-address-group-meta {
  margin: 0.15rem 0 0 1.1rem;
  line-height: 1.2;
}

.r2-address-group-count {
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bs-primary), transparent 90%);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--bs-primary);
}

.r2-address-group-row.is-inactive > td:not(:last-child) {
  opacity: 0.5;
}

.table > tbody > tr.r2-address-group-detail > td {
  border-bottom-width: 0;
}

.table-hover > tbody > tr.r2-address-group-detail:hover > * {
  --bs-table-bg-state: transparent;
}

.r2-address-group-body {
  margin: 0 0.75rem 0.75rem 1.5rem;
  padding: 0.5rem 0.75rem 0.75rem;
  border-left: 3px solid color-mix(in srgb, var(--bs-primary), transparent 70%);
  border-radius: 0 var(--bs-border-radius, 0.375rem) var(--bs-border-radius, 0.375rem) 0;
  background: var(--bs-tertiary-bg, rgba(0, 0, 0, 0.025));
  font-size: 0.8125rem;
}

.r2-address-group-body.is-busy {
  opacity: 0.6;
  pointer-events: none;
}

.r2-address-group-table {
  --bs-table-bg: transparent;
  table-layout: fixed;
  width: 100%;
}

.r2-address-group-table th:nth-child(1) {
  width: 3.75rem;
}

.r2-address-group-table th:nth-child(4) {
  width: 7rem;
}

.r2-address-group-table th:nth-child(5) {
  width: 5.75rem;
}

.r2-address-group-table th:nth-child(6) {
  width: 4.75rem;
}

.r2-address-group-table td {
  overflow-wrap: anywhere;
}

.r2-address-group-table thead th {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted-color);
}

.r2-address-group-table tr.is-inactive td:not(:first-child):not(:last-child) {
  opacity: 0.45;
}

.r2-address-group-muted {
  font-size: 0.75rem;
  color: var(--muted-color);
}

.r2-address-group-qty {
  width: 4.75rem;
  margin-left: auto;
  text-align: center;
}

.r2-address-group-icon {
  padding: 0.1rem 0.35rem;
  color: var(--muted-color);
}

.r2-address-group-icon:hover,
.r2-address-group-icon:focus-visible {
  color: var(--bs-primary);
}

.r2-address-group-icon.is-danger:hover,
.r2-address-group-icon.is-danger:focus-visible {
  color: var(--danger-color);
}

.r2-address-group-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.6rem;
}

.r2-address-group-error {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--danger-color);
}

.r2-recipient-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem 0.75rem;
}

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

  .r2-address-group-body {
    margin-left: 0.5rem;
  }
}

.r2-address-import-columns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}

.r2-address-import-title {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  min-width: 0;
  font-size: 0.875rem;
}

.r2-address-import-title .bi,
.r2-address-import-title strong {
  flex-shrink: 0;
  white-space: nowrap;
}

.r2-address-import-title .bi {
  color: var(--bs-primary);
}

.r2-address-import-title .text-truncate {
  min-width: 0;
}

.r2-address-import-stats {
  margin: 0.15rem 0 0.5rem;
  font-size: 0.8125rem;
}

.r2-address-import .r2-address-import-ai,
.r2-address-import .r2-address-import-message {
  margin-bottom: 0.5rem;
}

.r2-address-import-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.r2-address-import-remove {
  padding-inline: 0.25rem;
  color: var(--danger-color);
  text-decoration: none;
}

.r2-address-import-remove:hover,
.r2-address-import-remove:focus-visible {
  color: var(--danger-color);
  text-decoration: underline;
}

.r2-address-modal .r2-address-import-table {
  max-height: min(60vh, 40rem);
}

.r2-address-modal .r2-address-import-note {
  max-width: 16rem;
}

.r2-address-import-table tr.is-inactive td:not(:first-child):not(:last-child) {
  opacity: 0.45;
}

.r2-address-import-qty {
  width: 4.75rem;
  text-align: center;
}

.r2-address-import-icon {
  padding: 0.1rem 0.35rem;
  color: var(--muted-color);
}

.r2-address-import-icon:hover,
.r2-address-import-icon:focus-visible {
  color: var(--bs-primary);
}

.r2-address-import-icon.js-address-delete:hover,
.r2-address-import-icon.js-address-delete:focus-visible {
  color: var(--danger-color);
}

.r2-address-import-locked input[readonly] {
  background-color: var(--bs-tertiary-bg, #f3f4f6);
}

.r2-address-import-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: 0.6875rem;
  color: var(--muted-color);
}

.r2-address-import-chip strong {
  font-weight: 600;
  color: var(--bs-body-color);
}

.r2-address-import-ai {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--bs-border-radius, 0.375rem);
  background: var(--bs-tertiary-bg, rgba(0, 0, 0, 0.03));
  font-size: 0.8125rem;
}

.r2-address-import-ai.is-done .bi {
  color: var(--bs-primary);
}

.r2-address-import-ai.is-error {
  color: var(--bs-warning-text-emphasis, #997404);
}

.r2-address-import-badge {
  display: inline-block;
  margin-inline-end: 0.35rem;
  padding: 0 0.35rem;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--muted-color);
  vertical-align: 0.05em;
}

.r2-address-import-badge.is-ai {
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}

.r2-address-import-table tr.is-editing td {
  border-bottom-width: 0;
}

.r2-address-import-table tr.r2-address-import-edit-row > td {
  padding: 0 0.25rem 0.6rem;
}

.r2-address-import-edit {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--bs-border-radius, 0.375rem);
  background: var(--bs-tertiary-bg, rgba(0, 0, 0, 0.03));
}

.r2-address-import-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem 0.6rem;
}

.r2-address-import-field {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  font-size: 0.6875rem;
  color: var(--muted-color);
}

.r2-address-import-field.is-wide {
  grid-column: span 2;
}

.r2-address-import-field .form-control,
.r2-address-import-field .form-select {
  height: 2rem;
  min-height: 2rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  font-size: 0.8125rem;
  line-height: 1.4;
}


.r2-address-import-source {
  margin-top: 0.6rem;
}

.r2-address-import-source-text {
  margin-top: 0.15rem;
  padding: 0.35rem 0.5rem;
  border-left: 3px solid var(--border-color);
  font-size: 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.r2-address-import-edit-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.r2-address-import-edit-error {
  margin-inline-end: auto;
  font-size: 0.75rem;
  color: var(--danger-color);
}

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