.kfzrp-portal {
  --kfzrp-border: #d8dde3;
  --kfzrp-text: #17212b;
  --kfzrp-muted: #647180;
  --kfzrp-bg: #f5f7f9;
  --kfzrp-primary: #145da0;
  --kfzrp-primary-dark: #0f477b;
  --kfzrp-soft-blue: #edf5fb;
  max-width: 1320px;
  margin: 24px auto;
  color: var(--kfzrp-text);
  font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.kfzrp-portal * { box-sizing: border-box; }
.kfzrp-portal a { color: var(--kfzrp-primary); }

.kfzrp-header,
.kfzrp-toolbar,
.kfzrp-sticky-actions,
.kfzrp-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.kfzrp-header {
  padding: 22px 24px;
  background: #17212b;
  color: #fff;
  border-radius: 12px 12px 0 0;
}

.kfzrp-header h2,
.kfzrp-header p,
.kfzrp-toolbar h3,
.kfzrp-toolbar p,
.kfzrp-section-heading h4,
.kfzrp-section-heading p { margin: 0; }

.kfzrp-header p,
.kfzrp-toolbar p { opacity: .78; }

.kfzrp-tabs {
  display: flex;
  gap: 4px;
  padding: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  background: #e9edf1;
  border-radius: 0 0 12px 12px;
}

.kfzrp-tabs a {
  padding: 11px 18px;
  border-radius: 8px;
  color: var(--kfzrp-text);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.kfzrp-tabs a.is-active {
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

.kfzrp-toolbar { margin: 0 0 18px; }
.kfzrp-toolbar h3 { font-size: 1.55rem; }
.kfzrp-order-toolbar { align-items: flex-end; }

.kfzrp-order-total {
  min-width: 190px;
  padding: 13px 16px;
  text-align: right;
  background: #fff;
  border: 1px solid var(--kfzrp-border);
  border-radius: 10px;
}

.kfzrp-order-total span,
.kfzrp-order-total strong { display: block; }
.kfzrp-order-total span { color: var(--kfzrp-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.kfzrp-order-total strong { margin-top: 2px; font-size: 1.25rem; }

.kfzrp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 17px;
  border: 0;
  border-radius: 7px;
  background: var(--kfzrp-primary);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.kfzrp-button:hover { background: var(--kfzrp-primary-dark); }
.kfzrp-button-muted { background: #465463; }
.kfzrp-button-small { min-height: 34px; padding: 6px 11px; font-size: 13px; }

.kfzrp-filter,
.kfzrp-card,
.kfzrp-login-card,
.kfzrp-overview-stat {
  background: #fff;
  border: 1px solid var(--kfzrp-border);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(23, 33, 43, .04);
}

.kfzrp-filter {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) minmax(180px, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 16px;
  margin-bottom: 18px;
}

.kfzrp-form { display: grid; gap: 18px; }
.kfzrp-card { padding: 22px; }
.kfzrp-card h4 { margin: 0; font-size: 1.18rem; }

.kfzrp-section-heading {
  align-items: flex-start;
  padding-bottom: 15px;
  margin-bottom: 18px;
  border-bottom: 1px solid #e7eaee;
}

.kfzrp-section-heading p {
  max-width: 540px;
  color: var(--kfzrp-muted);
  font-size: 13px;
  text-align: right;
}

.kfzrp-section-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--kfzrp-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

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

.kfzrp-field-wide { grid-column: 1 / -1; }

.kfzrp-portal label {
  display: grid;
  gap: 6px;
  color: #34404c;
  font-weight: 700;
}

.kfzrp-portal input[type=text],
.kfzrp-portal input[type=search],
.kfzrp-portal input[type=email],
.kfzrp-portal input[type=password],
.kfzrp-portal input[type=number],
.kfzrp-portal input[type=date],
.kfzrp-portal input[type=file],
.kfzrp-portal select,
.kfzrp-portal textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #b8c0c9;
  border-radius: 6px;
  background: #fff;
  color: #17212b;
  font: inherit;
}

.kfzrp-portal input:focus,
.kfzrp-portal select:focus,
.kfzrp-portal textarea:focus {
  border-color: var(--kfzrp-primary);
  outline: 3px solid rgba(20, 93, 160, .12);
}

.kfzrp-portal textarea { resize: vertical; }

.kfzrp-checkbox {
  display: flex !important;
  grid-template-columns: auto 1fr !important;
  align-items: center;
  justify-content: flex-start;
  gap: 9px !important;
  margin-top: 12px;
}

.kfzrp-checkbox input { width: auto; }

.kfzrp-table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--kfzrp-border);
  border-radius: 10px;
}

.kfzrp-table { width: 100%; margin: 0; border-collapse: collapse; }
.kfzrp-table th,
.kfzrp-table td { padding: 13px 14px; border-bottom: 1px solid #e7eaee; text-align: left; vertical-align: middle; }
.kfzrp-table th { background: #f3f5f7; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.kfzrp-table tr:last-child td { border-bottom: 0; }
.kfzrp-table tbody tr:hover { background: #fbfcfd; }
.kfzrp-orders-table td:nth-child(2) { min-width: 230px; }

.kfzrp-list-product { display: block; line-height: 1.35; }
.kfzrp-list-product + .kfzrp-list-product { margin-top: 4px; }
.kfzrp-list-product strong { color: var(--kfzrp-primary); }
.kfzrp-list-product ~ small { display: block; margin-top: 5px; color: var(--kfzrp-muted); }
.kfzrp-muted-text { color: var(--kfzrp-muted); }

.kfzrp-product-fitments { min-width: 190px; max-width: 300px; }
.kfzrp-product-fitments .kfzrp-badge { margin-bottom: 5px; }
.kfzrp-product-fitments small { display: block; color: var(--kfzrp-muted); font-size: 11px; line-height: 1.4; }
.kfzrp-product-fitments .kfzrp-fitment-source { margin-top: 5px; font-style: italic; }

.kfzrp-badge,
.kfzrp-count-badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e8f1f8;
  color: #164f80;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.kfzrp-order-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  font-size: var(--preview-meta-size);
}

.kfzrp-overview-stat {
  position: relative;
  overflow: hidden;
  padding: 15px 16px 15px 19px;
}

.kfzrp-overview-stat::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--kfzrp-primary);
  content: "";
}

.kfzrp-overview-stat span,
.kfzrp-overview-stat strong { display: block; }
.kfzrp-overview-stat span { color: var(--kfzrp-muted); font-size: 12px; }
.kfzrp-overview-stat strong { margin-top: 3px; font-size: 15px; }

.kfzrp-products-card { border-color: #b9d4e9; box-shadow: 0 3px 14px rgba(20, 93, 160, .08); }
.kfzrp-order-items { display: grid; gap: 12px; }

.kfzrp-order-item {
  display: grid;
  grid-template-columns: 92px minmax(220px, 1fr) minmax(340px, auto);
  gap: 18px;
  align-items: center;
  padding: 15px;
  border: 1px solid #e1e6eb;
  border-radius: 10px;
  background: #fff;
}

.kfzrp-order-item-image { position: relative; width: 92px; height: 92px; }
.kfzrp-order-item-image img { width: 92px; height: 92px; object-fit: cover; border: 1px solid #e1e6eb; border-radius: 9px; background: var(--kfzrp-bg); }

.kfzrp-quantity-badge {
  position: absolute;
  right: -7px;
  bottom: -7px;
  min-width: 32px;
  padding: 4px 7px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #17212b;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.kfzrp-order-item-main h5 { margin: 0 0 7px; font-size: 1.08rem; line-height: 1.3; }
.kfzrp-item-identifiers { display: flex; flex-wrap: wrap; gap: 7px; }
.kfzrp-item-identifiers span { padding: 3px 7px; border-radius: 5px; background: var(--kfzrp-bg); color: #485563; font-size: 12px; }
.kfzrp-item-meta { margin-top: 8px; color: #485563; font-size: 13px; }
.kfzrp-item-meta p { margin: 0; }

.kfzrp-order-item-prices {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  min-width: 340px;
  overflow: hidden;
  border: 1px solid #e1e6eb;
  border-radius: 8px;
  background: var(--kfzrp-bg);
}

.kfzrp-order-item-prices div { padding: 10px 12px; text-align: right; }
.kfzrp-order-item-prices div + div { border-left: 1px solid #dde2e7; }
.kfzrp-order-item-prices span,
.kfzrp-order-item-prices strong { display: block; }
.kfzrp-order-item-prices span { color: var(--kfzrp-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.kfzrp-order-item-prices strong { margin-top: 2px; white-space: nowrap; }

.kfzrp-order-totals {
  width: min(430px, 100%);
  margin: 16px 0 0 auto;
  padding-top: 12px;
  border-top: 2px solid #dfe5ea;
}

.kfzrp-order-totals div { display: flex; justify-content: space-between; gap: 24px; padding: 5px 0; }
.kfzrp-order-totals .kfzrp-order-total-tax { padding-top: 1px; }
.kfzrp-order-totals .kfzrp-order-total-final {
  margin-top: 7px;
  padding-top: 12px;
  border-top: 2px solid #cfd7de;
  font-size: 1.12rem;
}

.kfzrp-empty-state { padding: 18px; border-radius: 8px; background: var(--kfzrp-bg); color: var(--kfzrp-muted); text-align: center; }

.kfzrp-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.kfzrp-info-grid > div,
.kfzrp-readonly-box { padding: 12px; background: var(--kfzrp-bg); border-radius: 7px; }
.kfzrp-info-grid span,
.kfzrp-info-grid strong,
.kfzrp-readonly-box > span { display: block; }
.kfzrp-info-grid span,
.kfzrp-readonly-box > span { color: var(--kfzrp-muted); font-size: 12px; }
.kfzrp-info-grid a { overflow-wrap: anywhere; }

.kfzrp-order-settings { grid-template-columns: minmax(210px, .7fr) repeat(2, minmax(230px, 1fr)); align-items: stretch; }
.kfzrp-readonly-box > div { margin-top: 5px; font-weight: 600; line-height: 1.4; }

.kfzrp-back { display: inline-block; margin-bottom: 4px; text-decoration: none; }

.kfzrp-sticky-actions {
  position: sticky;
  bottom: 12px;
  justify-content: flex-end;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .95);
  border: 1px solid var(--kfzrp-border);
  border-radius: 10px;
  box-shadow: 0 7px 22px rgba(23, 33, 43, .14);
  backdrop-filter: blur(8px);
  z-index: 5;
}

.kfzrp-sticky-actions > span { margin-right: auto; color: var(--kfzrp-muted); font-size: 12px; }

.kfzrp-alert { padding: 13px 16px; margin: 0 0 18px; border-radius: 8px; font-weight: 700; }
.kfzrp-alert-success { background: #e9f7ef; color: #1d6b3a; }
.kfzrp-alert-error { background: #fdecec; color: #9a2525; }

.kfzrp-pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.kfzrp-pagination a { display: grid; place-items: center; min-width: 38px; height: 38px; border: 1px solid var(--kfzrp-border); border-radius: 6px; background: #fff; text-decoration: none; }
.kfzrp-pagination a.is-active { background: var(--kfzrp-primary); color: #fff; border-color: var(--kfzrp-primary); }

.kfzrp-product-cell { display: flex; align-items: center; gap: 11px; min-width: 220px; }
.kfzrp-product-cell img { width: 46px; height: 46px; object-fit: cover; border-radius: 6px; }
.kfzrp-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kfzrp-current-image img { max-width: 240px; height: auto; margin-bottom: 14px; border-radius: 8px; }
.kfzrp-help { color: var(--kfzrp-muted); font-size: 13px; }

.kfzrp-login-card { max-width: 440px; margin: 60px auto; padding: 28px; }
.kfzrp-login-card h2 { margin-top: 0; }
.kfzrp-login-card form { display: grid; gap: 12px; }
.kfzrp-login-card .login-remember label { display: flex; align-items: center; gap: 8px; }
.kfzrp-login-card .login-submit { margin: 0; }
.kfzrp-login-card .button { width: 100%; min-height: 44px; border: 0; border-radius: 7px; background: var(--kfzrp-primary); color: #fff; font-weight: 700; cursor: pointer; }

@media (max-width: 1050px) {
  .kfzrp-order-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kfzrp-order-item { grid-template-columns: 80px 1fr; }
  .kfzrp-order-item-image,
  .kfzrp-order-item-image img { width: 80px; height: 80px; }
  .kfzrp-order-item-prices { grid-column: 1 / -1; width: 100%; min-width: 0; }
  .kfzrp-order-settings { grid-template-columns: 1fr 1fr; }
  .kfzrp-order-settings > label { grid-column: 1 / -1; }
}

@media (max-width: 800px) {
  .kfzrp-portal { margin: 12px; }
  .kfzrp-header,
  .kfzrp-toolbar,
  .kfzrp-section-heading { align-items: flex-start; flex-direction: column; }
  .kfzrp-order-total { width: 100%; text-align: left; }
  .kfzrp-section-heading p { text-align: left; }
  .kfzrp-filter,
  .kfzrp-grid,
  .kfzrp-info-grid,
  .kfzrp-category-grid,
  .kfzrp-order-settings { grid-template-columns: 1fr; }
  .kfzrp-field-wide,
  .kfzrp-order-settings > label { grid-column: auto; }
  .kfzrp-table thead { display: none; }
  .kfzrp-table,
  .kfzrp-table tbody,
  .kfzrp-table tr,
  .kfzrp-table td { display: block; width: 100%; }
  .kfzrp-table tr { padding: 10px 0; border-bottom: 1px solid var(--kfzrp-border); }
  .kfzrp-table td { display: grid; grid-template-columns: 125px 1fr; gap: 10px; padding: 7px 12px; border: 0; }
  .kfzrp-table td::before { content: attr(data-label); color: var(--kfzrp-muted); font-weight: 800; }
  .kfzrp-table td:not([data-label]) { display: block; }
  .kfzrp-orders-table td:nth-child(2) { min-width: 0; }
  .kfzrp-sticky-actions { align-items: stretch; flex-direction: column; }
  .kfzrp-sticky-actions .kfzrp-button { width: 100%; }
}

@media (max-width: 600px) {
  .kfzrp-order-overview { grid-template-columns: 1fr; }
  .kfzrp-card { padding: 17px; }
  .kfzrp-order-item { grid-template-columns: 68px 1fr; gap: 12px; padding: 12px; }
  .kfzrp-order-item-image,
  .kfzrp-order-item-image img { width: 68px; height: 68px; }
  .kfzrp-order-item-prices { grid-template-columns: 1fr; }
  .kfzrp-order-item-prices div { display: flex; justify-content: space-between; gap: 12px; text-align: left; }
  .kfzrp-order-item-prices div + div { border-top: 1px solid #dde2e7; border-left: 0; }
  .kfzrp-order-item-prices span,
  .kfzrp-order-item-prices strong { display: inline; }
}

.kfzrp-price-before-discount {
  display: block;
  margin-top: 3px;
  color: var(--kfzrp-muted);
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
}

/* Dokumente, Rechnung und Versand */
.kfzrp-portal input[type=url] {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #b8c0c9;
  border-radius: 6px;
  background: #fff;
  color: #17212b;
  font: inherit;
}

.kfzrp-workflow-card {
  margin-bottom: 18px;
  border-color: #c8d8e5;
  background: linear-gradient(180deg, #fff, #f9fbfc);
}

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

.kfzrp-workflow-box {
  position: relative;
  min-width: 0;
  padding: 18px 18px 18px 60px;
  border: 1px solid #dce3e8;
  border-radius: 10px;
  background: #fff;
}

.kfzrp-workflow-box h5 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.kfzrp-workflow-box p {
  margin: 0 0 14px;
  color: var(--kfzrp-muted);
  font-size: 13px;
}

.kfzrp-workflow-step {
  position: absolute;
  top: 17px;
  left: 17px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--kfzrp-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.kfzrp-inline-actions,
.kfzrp-invoice-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.kfzrp-inline-actions form,
.kfzrp-resend-form {
  margin: 0;
}

.kfzrp-invoice-form select {
  flex: 1 1 220px;
  min-width: 0;
}

.kfzrp-workflow-status {
  display: block;
  margin-top: 11px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #f1f5f8;
  color: #536270;
  line-height: 1.4;
}

.kfzrp-shipping-box {
  grid-column: 1 / -1;
}

.kfzrp-shipping-fields {
  display: grid;
  grid-template-columns: minmax(180px, .7fr) minmax(220px, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.kfzrp-shipping-complete {
  margin-top: 13px;
  padding: 10px 12px;
  border-radius: 7px;
  background: #e9f7ef;
  color: #235d39;
  font-size: 13px;
}

.kfzrp-text-button {
  padding: 0;
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: var(--kfzrp-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 800px) {
  .kfzrp-workflow-grid,
  .kfzrp-shipping-fields {
    grid-template-columns: 1fr;
  }

  .kfzrp-shipping-box {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .kfzrp-workflow-box {
    padding: 55px 15px 15px;
  }

  .kfzrp-inline-actions,
  .kfzrp-inline-actions form,
  .kfzrp-inline-actions .kfzrp-button,
  .kfzrp-invoice-form,
  .kfzrp-invoice-form .kfzrp-button {
    width: 100%;
  }
}

.kfzrp-integration-state {
  display: grid;
  gap: 3px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 7px;
  font-size: 13px;
  line-height: 1.4;
}

.kfzrp-integration-state strong,
.kfzrp-integration-state span {
  display: block;
}

.kfzrp-integration-state.is-success {
  background: #e9f7ef;
  color: #235d39;
}

.kfzrp-integration-state.is-error {
  background: #fff0f0;
  color: #8a2929;
}

.kfzrp-integration-state.is-pending {
  background: #fff8e5;
  color: #755500;
}

.kfzrp-advanced-actions {
  margin-top: 10px;
}

.kfzrp-advanced-actions summary {
  color: var(--kfzrp-primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.kfzrp-advanced-actions form {
  margin-top: 9px;
}

.kfzrp-return-box {
  border-color: #cfe0d5;
}


/* Version 1.4.1: themefeste, gut lesbare Schaltflächen */
.kfzrp-portal button.kfzrp-button,
.kfzrp-portal a.kfzrp-button,
.kfzrp-portal input[type="submit"].kfzrp-button,
.kfzrp-portal .kfzrp-button {
  appearance: none !important;
  -webkit-appearance: none !important;
  min-height: 42px !important;
  padding: 9px 17px !important;
  border: 2px solid var(--kfzrp-primary) !important;
  border-radius: 7px !important;
  background: var(--kfzrp-primary) !important;
  background-color: var(--kfzrp-primary) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
  text-decoration: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  box-shadow: none !important;
}

.kfzrp-portal button.kfzrp-button:hover,
.kfzrp-portal button.kfzrp-button:focus,
.kfzrp-portal button.kfzrp-button:active,
.kfzrp-portal a.kfzrp-button:hover,
.kfzrp-portal a.kfzrp-button:focus,
.kfzrp-portal a.kfzrp-button:active,
.kfzrp-portal .kfzrp-button:hover,
.kfzrp-portal .kfzrp-button:focus,
.kfzrp-portal .kfzrp-button:active {
  border-color: var(--kfzrp-primary-dark) !important;
  background: var(--kfzrp-primary-dark) !important;
  background-color: var(--kfzrp-primary-dark) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  outline: 3px solid rgba(20, 93, 160, .2) !important;
  outline-offset: 2px !important;
}

.kfzrp-portal button.kfzrp-button-muted,
.kfzrp-portal a.kfzrp-button-muted,
.kfzrp-portal .kfzrp-button-muted {
  border-color: #465463 !important;
  background: #465463 !important;
  background-color: #465463 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.kfzrp-portal button.kfzrp-button-small,
.kfzrp-portal a.kfzrp-button-small,
.kfzrp-portal .kfzrp-button-small {
  min-height: 36px !important;
  padding: 7px 12px !important;
  font-size: 13px !important;
}

.kfzrp-meta-row {
  display: grid;
  grid-template-columns: minmax(120px, auto) minmax(0, 1fr);
  gap: 5px 9px;
  padding: 3px 0;
}

.kfzrp-meta-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.kfzrp-product-description {
  margin-top: 11px;
  padding: 10px 12px;
  border-left: 3px solid #b9d4e9;
  border-radius: 0 6px 6px 0;
  background: #f7fafc;
  color: #34404c;
  font-size: 13px;
}

.kfzrp-product-description > strong {
  display: block;
  margin-bottom: 4px;
  color: #17212b;
}

.kfzrp-product-description-content > :first-child { margin-top: 0; }
.kfzrp-product-description-content > :last-child { margin-bottom: 0; }
.kfzrp-product-description-content ul,
.kfzrp-product-description-content ol { margin: 6px 0 6px 20px; }

.kfzrp-editor-field { min-width: 0; }
.kfzrp-editor-label {
  display: block;
  margin-bottom: 6px;
  color: #34404c;
  font-weight: 700;
}
.kfzrp-editor-field .wp-editor-wrap { border-radius: 7px; background: #fff; }
.kfzrp-editor-field .wp-editor-container {
  border: 1px solid #b8c0c9;
  border-radius: 0 0 7px 7px;
  overflow: hidden;
}
.kfzrp-editor-field .wp-switch-editor {
  height: auto;
  padding: 6px 12px;
  color: #17212b !important;
  -webkit-text-fill-color: #17212b !important;
  background: #eef2f5 !important;
  border-color: #b8c0c9 !important;
  font-weight: 700;
}
.kfzrp-editor-field .wp-switch-editor.switch-tmce,
.kfzrp-editor-field .wp-switch-editor.switch-html {
  color: #17212b !important;
  -webkit-text-fill-color: #17212b !important;
}
.kfzrp-integration-summary { margin-bottom: 14px; }

@media (max-width: 600px) {
  .kfzrp-meta-row { grid-template-columns: 1fr; }
}

/* 1.4.3: Auftragsnummern und übersichtlichere Produktkategorien. */
.kfzrp-filter {
  grid-template-columns: minmax(220px, 2fr) minmax(160px, 1fr) minmax(190px, 1fr) auto;
}

.kfzrp-order-overview {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.kfzrp-job-number,
.kfzrp-job-number-large {
  display: inline-block;
  color: #145da0;
  font-weight: 800;
  letter-spacing: .02em;
}

.kfzrp-job-number { margin: 3px 0; font-size: 12px; }
.kfzrp-job-number-large { margin: 3px 0 0 !important; font-size: 14px; }

.kfzrp-category-tree {
  display: grid;
  gap: 7px;
  max-height: 520px;
  padding: 4px;
  overflow: auto;
}

.kfzrp-category-row {
  display: grid !important;
  grid-template-columns: auto minmax(140px, 1fr) minmax(160px, 1.5fr);
  gap: 10px !important;
  align-items: center;
  margin-left: calc(var(--kfzrp-category-depth, 0) * 22px);
  padding: 10px 12px !important;
  border: 1px solid #dce3e9;
  border-left: calc(3px + (var(--kfzrp-category-depth, 0) * 2px)) solid #b9c9d7;
  border-radius: 7px;
  background: #fff;
}

.kfzrp-category-row.is-selected {
  border-color: #84b4da;
  border-left-color: #145da0;
  background: #eef6fc;
}

.kfzrp-category-row input { margin: 0 !important; }
.kfzrp-category-name { color: #17212b; font-weight: 800; }
.kfzrp-category-row small { color: #66727e; overflow-wrap: anywhere; }

.kfzrp-category-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 180px;
}

.kfzrp-category-badge {
  display: inline-block;
  max-width: 280px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf3f7;
  color: #304353;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

@media (max-width: 1150px) {
  .kfzrp-order-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kfzrp-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kfzrp-filter .kfzrp-button { width: 100%; }
}

@media (max-width: 800px) {
  .kfzrp-filter,
  .kfzrp-order-overview { grid-template-columns: 1fr; }
  .kfzrp-category-row {
    grid-template-columns: auto minmax(0, 1fr);
    margin-left: calc(var(--kfzrp-category-depth, 0) * 10px);
  }
  .kfzrp-category-row small { grid-column: 2; }
}

/* 1.4.5: Rechnungsausgabe, Sync-Diagnose und Auftragsnummer-Nachtrag. */
.kfzrp-job-number-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #b9d3e7;
  border-radius: 8px;
  background: #eef6fc;
}

.kfzrp-job-number-form span {
  color: #344f63;
  font-size: 13px;
}

.kfzrp-invoice-actions {
  align-items: center;
  flex-wrap: wrap;
  margin: 12px 0;
}

.kfzrp-invoice-actions form,
.kfzrp-job-number-form form {
  margin: 0;
}

@media (max-width: 600px) {
  .kfzrp-job-number-form,
  .kfzrp-invoice-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .kfzrp-job-number-form .kfzrp-button,
  .kfzrp-invoice-actions .kfzrp-button,
  .kfzrp-invoice-actions form {
    width: 100%;
  }
}

/* 1.4.6: klarere Bestellübersicht und zuverlässige Nummernanzeige. */
.kfzrp-orders-toolbar {
  align-items: flex-end;
}

.kfzrp-result-count {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid #cbd8e3;
  border-radius: 999px;
  background: #eef5fa;
  color: #24465f;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.kfzrp-order-filter {
  grid-template-columns: minmax(340px, 2.4fr) minmax(190px, .8fr) auto;
}

.kfzrp-order-search-field input {
  font-weight: 600;
}

.kfzrp-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kfzrp-order-list {
  display: grid;
  gap: 15px;
}

.kfzrp-order-card {
  overflow: hidden;
  border: 1px solid #d6dee6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(23, 33, 43, .055);
}

.kfzrp-order-card-head,
.kfzrp-order-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.kfzrp-order-card-head {
  padding: 16px 18px 13px;
  border-bottom: 1px solid #e5eaee;
  background: #f8fafb;
}

.kfzrp-order-card-head h4 {
  margin: 0;
  color: #152536;
  font-size: 1.28rem;
  line-height: 1.2;
}

.kfzrp-order-card-kicker {
  display: block;
  margin-bottom: 2px;
  color: #667786;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.kfzrp-order-card-status {
  display: grid;
  justify-items: end;
  gap: 5px;
  text-align: right;
}

.kfzrp-order-card-status small {
  color: #667786;
  font-size: 12px;
}

.kfzrp-order-identifiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid #e5eaee;
  background: #fff;
}

.kfzrp-order-identifier {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #d7e1e8;
  border-left: 4px solid #145da0;
  border-radius: 8px;
  background: #f7fbfe;
}

.kfzrp-order-identifier-job { border-left-color: #2d7d46; background: #f5fbf7; }
.kfzrp-order-identifier-invoice { border-left-color: #7656a8; background: #faf7fd; }
.kfzrp-order-identifier.is-empty { border-left-color: #aab5bf; background: #f7f8f9; }

.kfzrp-order-identifier span,
.kfzrp-order-identifier strong {
  display: block;
  min-width: 0;
}

.kfzrp-order-identifier span {
  margin-bottom: 2px;
  color: #6b7884;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.kfzrp-order-identifier strong {
  color: #17212b;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.kfzrp-order-identifier.is-empty strong {
  color: #7a8792;
  font-weight: 600;
}

.kfzrp-order-card-body {
  display: grid;
  grid-template-columns: minmax(190px, .9fr) minmax(220px, 1fr) minmax(260px, 1.3fr);
  gap: 0;
  padding: 0 18px;
}

.kfzrp-order-card-section {
  min-width: 0;
  padding: 16px 16px 16px 0;
}

.kfzrp-order-card-section + .kfzrp-order-card-section {
  padding-left: 16px;
  border-left: 1px solid #e5eaee;
}

.kfzrp-order-card-section > span {
  display: block;
  margin-bottom: 5px;
  color: #667786;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.kfzrp-order-card-section > strong,
.kfzrp-order-card-section > small {
  display: block;
  overflow-wrap: anywhere;
}

.kfzrp-order-card-section > strong {
  color: #1b2b39;
  font-size: 14px;
}

.kfzrp-order-card-section > small {
  margin-top: 3px;
  color: #687682;
  font-size: 12px;
}

.kfzrp-order-card-products .kfzrp-list-product {
  color: #283a49;
  font-size: 13px;
}

.kfzrp-order-card-foot {
  padding: 13px 18px;
  border-top: 1px solid #e5eaee;
  background: #f8fafb;
}

.kfzrp-order-card-total span,
.kfzrp-order-card-total strong {
  display: block;
}

.kfzrp-order-card-total span {
  color: #667786;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.kfzrp-order-card-total strong {
  margin-top: 1px;
  color: #152536;
  font-size: 1.18rem;
}

.kfzrp-empty-orders {
  display: grid;
  gap: 4px;
  padding: 38px 20px;
  border: 1px dashed #bdc9d3;
  border-radius: 10px;
  background: #fafbfc;
  color: #667786;
  text-align: center;
}

.kfzrp-empty-orders strong {
  color: #253746;
  font-size: 1.05rem;
}

.kfzrp-order-heading-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 5px 0 2px;
}

.kfzrp-order-heading-numbers span {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eaf3fa;
  color: #174f7f;
  font-size: 12px;
  font-weight: 800;
}

.kfzrp-order-overview {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

@media (max-width: 1150px) {
  .kfzrp-order-filter { grid-template-columns: minmax(260px, 1.7fr) minmax(180px, .8fr); }
  .kfzrp-filter-actions { grid-column: 1 / -1; }
  .kfzrp-order-card-body { grid-template-columns: 1fr 1fr; }
  .kfzrp-order-card-products { grid-column: 1 / -1; padding-left: 0; border-top: 1px solid #e5eaee; border-left: 0 !important; }
}

@media (max-width: 760px) {
  .kfzrp-orders-toolbar,
  .kfzrp-order-card-head,
  .kfzrp-order-card-foot { align-items: stretch; flex-direction: column; }
  .kfzrp-result-count { align-self: flex-start; }
  .kfzrp-order-filter { grid-template-columns: 1fr; }
  .kfzrp-filter-actions { grid-column: auto; flex-direction: column; }
  .kfzrp-filter-actions .kfzrp-button { width: 100%; }
  .kfzrp-order-card-status { justify-items: start; text-align: left; }
  .kfzrp-order-identifiers { grid-template-columns: 1fr; }
  .kfzrp-order-card-body { grid-template-columns: 1fr; padding: 0 16px; }
  .kfzrp-order-card-section,
  .kfzrp-order-card-section + .kfzrp-order-card-section {
    grid-column: auto;
    padding: 14px 0;
    border-top: 1px solid #e5eaee;
    border-left: 0;
  }
  .kfzrp-order-card-section:first-child { border-top: 0; }
  .kfzrp-order-card-foot .kfzrp-button { width: 100%; }
}

.kfzrp-order-status-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.kfzrp-workshop-badge {
  background: #edf6ef;
  color: #26623a;
}

@media (max-width: 760px) {
  .kfzrp-order-status-badges { justify-content: flex-start; }
}

/* 1.4.7: Bestellübersicht wieder als robuste Tabelle. */
.kfzrp-order-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #d6dee6;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(23, 33, 43, .045);
  -webkit-overflow-scrolling: touch;
}

.kfzrp-order-table {
  width: 100%;
  min-width: 1180px;
  margin: 0;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  color: #203040;
  table-layout: auto;
}

.kfzrp-order-table th,
.kfzrp-order-table td {
  padding: 12px 11px;
  border: 0;
  border-bottom: 1px solid #e3e9ee;
  background: #fff;
  text-align: left;
  vertical-align: top;
}

.kfzrp-order-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-top: 11px;
  padding-bottom: 11px;
  background: #eef4f8;
  color: #233b50;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .045em;
  line-height: 1.25;
  text-transform: uppercase;
  white-space: nowrap;
}

.kfzrp-order-table tbody tr:last-child td {
  border-bottom: 0;
}

.kfzrp-order-table tbody tr:hover td {
  background: #f8fbfd;
}

.kfzrp-order-table td strong,
.kfzrp-order-table td small {
  display: block;
}

.kfzrp-order-table td strong {
  color: #172b3b;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.kfzrp-order-table td small {
  margin-top: 3px;
  color: #687884;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.kfzrp-table-order-number {
  color: #0f5e9c !important;
  font-size: 14px !important;
}

.kfzrp-table-products {
  min-width: 170px;
}

.kfzrp-table-products .kfzrp-list-product {
  display: block;
  margin: 0 0 3px;
  color: #263c4d;
  font-size: 12px;
  line-height: 1.35;
}

.kfzrp-table-status {
  min-width: 145px;
}

.kfzrp-table-status .kfzrp-badge {
  display: inline-flex;
  margin-bottom: 3px;
}

.kfzrp-table-price {
  text-align: right !important;
  white-space: nowrap;
}

.kfzrp-table-action {
  text-align: right !important;
  white-space: nowrap;
}

.kfzrp-button-small {
  min-height: 34px !important;
  padding: 7px 12px !important;
  font-size: 12px !important;
}

@media (max-width: 760px) {
  .kfzrp-order-table-wrap {
    border-radius: 8px;
  }

  .kfzrp-order-table {
    min-width: 1040px;
  }

  .kfzrp-order-table th,
  .kfzrp-order-table td {
    padding: 10px 9px;
  }
}


/* 1.4.8: schmalere Nummernspalten und farblich abgesetzte Tabellenzeilen. */
.kfzrp-order-table th.kfzrp-table-job,
.kfzrp-order-table td.kfzrp-table-job {
  width: 104px;
  min-width: 92px;
  max-width: 112px;
  text-align: center;
}

.kfzrp-order-table th.kfzrp-table-invoice,
.kfzrp-order-table td.kfzrp-table-invoice {
  width: 82px;
  min-width: 72px;
  max-width: 92px;
  text-align: center;
}

.kfzrp-order-table td.kfzrp-table-job strong,
.kfzrp-order-table td.kfzrp-table-invoice strong {
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.kfzrp-order-table tbody tr:nth-child(odd) td {
  background: #ffffff;
}

.kfzrp-order-table tbody tr:nth-child(even) td {
  background: #f3f7fa;
}

.kfzrp-order-table tbody tr:hover td {
  background: #e8f2f9;
}

@media (max-width: 760px) {
  .kfzrp-order-table th.kfzrp-table-job,
  .kfzrp-order-table td.kfzrp-table-job {
    width: 96px;
    min-width: 88px;
  }

  .kfzrp-order-table th.kfzrp-table-invoice,
  .kfzrp-order-table td.kfzrp-table-invoice {
    width: 76px;
    min-width: 68px;
  }
}


/* 1.4.9: feste Spaltenbreiten und deutlich sichtbare Zebra-Zeilen.
 * Die Selektoren sind absichtlich sehr spezifisch, damit Shop-Themes die
 * Tabellenansicht nicht wieder überschreiben. */
.kfzrp-portal .kfzrp-order-table {
  table-layout: fixed !important;
  min-width: 1220px !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.kfzrp-portal .kfzrp-order-table col.kfzrp-col-order { width: 132px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-job { width: 82px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-invoice { width: 76px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-customer { width: 145px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-vehicle { width: 170px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-products { width: 235px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-status { width: 155px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-total { width: 95px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-action { width: 88px !important; }

.kfzrp-portal .kfzrp-order-table th.kfzrp-table-job,
.kfzrp-portal .kfzrp-order-table td.kfzrp-table-job,
.kfzrp-portal .kfzrp-order-table th.kfzrp-table-invoice,
.kfzrp-portal .kfzrp-order-table td.kfzrp-table-invoice {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding-left: 6px !important;
  padding-right: 6px !important;
  text-align: center !important;
}

.kfzrp-portal .kfzrp-order-table tbody tr.kfzrp-row-odd > td {
  background-color: #ffffff !important;
}

.kfzrp-portal .kfzrp-order-table tbody tr.kfzrp-row-even > td {
  background-color: #eaf2f8 !important;
}

.kfzrp-portal .kfzrp-order-table tbody tr > td {
  transition: background-color .12s ease-in-out;
}

.kfzrp-portal .kfzrp-order-table tbody tr:hover > td {
  background-color: #d7e9f5 !important;
}

.kfzrp-portal .kfzrp-order-table th,
.kfzrp-portal .kfzrp-order-table td {
  border-right: 1px solid #e1e8ee !important;
}

.kfzrp-portal .kfzrp-order-table th:last-child,
.kfzrp-portal .kfzrp-order-table td:last-child {
  border-right: 0 !important;
}

@media (max-width: 760px) {
  .kfzrp-portal .kfzrp-order-table {
    min-width: 1120px !important;
  }
}


/* 1.5.0: Bestellübersicht als Vollbreitenansicht, ohne Fahrzeugspalte. */
.kfzrp-portal.kfzrp-portal-wide-orders {
  width: calc(100vw - 32px) !important;
  max-width: none !important;
  margin-right: calc(50% - 50vw + 16px) !important;
  margin-left: calc(50% - 50vw + 16px) !important;
}

.kfzrp-portal.kfzrp-portal-wide-orders .kfzrp-order-table-wrap {
  width: 100% !important;
}

.kfzrp-portal.kfzrp-portal-wide-orders .kfzrp-order-table {
  width: 100% !important;
  min-width: 1050px !important;
  table-layout: fixed !important;
}

.kfzrp-portal .kfzrp-order-table col.kfzrp-col-order { width: 126px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-job { width: 86px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-invoice { width: 82px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-customer { width: 205px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-products { width: auto !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-status { width: 185px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-total { width: 102px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-action { width: 92px !important; }

@media (max-width: 760px) {
  .kfzrp-portal.kfzrp-portal-wide-orders {
    width: calc(100vw - 16px) !important;
    margin-right: calc(50% - 50vw + 8px) !important;
    margin-left: calc(50% - 50vw + 8px) !important;
  }

  .kfzrp-portal.kfzrp-portal-wide-orders .kfzrp-order-table {
    min-width: 1000px !important;
  }
}

/* 1.5.1: Nummernkreis-Verwaltung. */
.kfzrp-number-ranges-form {
  margin-top: 18px;
}

.kfzrp-number-ranges-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.kfzrp-number-range-card {
  padding: 20px;
  border: 1px solid #d4e0e9;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(19, 53, 77, .05);
}

.kfzrp-number-range-card h4 {
  margin: 4px 0 7px;
  font-size: 19px;
}

.kfzrp-number-range-card > p {
  margin: 0 0 15px;
  color: #5d6c78;
}

.kfzrp-number-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #eef5fa;
}

.kfzrp-number-preview span {
  color: #506574;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.kfzrp-number-preview strong {
  color: #0f5e9c;
  font-size: 18px;
  overflow-wrap: anywhere;
  text-align: right;
}

.kfzrp-number-range-card code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #edf1f4;
}

.kfzrp-number-range-external {
  grid-column: 1 / -1;
}

.kfzrp-number-range-card .kfzrp-grid {
  margin-top: 0;
}

.kfzrp-number-range-card small {
  display: block;
  margin-top: 12px;
  color: #687884;
}

@media (max-width: 820px) {
  .kfzrp-number-ranges-grid {
    grid-template-columns: 1fr;
  }

  .kfzrp-number-range-external {
    grid-column: auto;
  }
}

/* 1.5.2: Direktauftrag für Annahmen im Geschäft. */
.kfzrp-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.kfzrp-required {
  color: #a61b1b;
}

.kfzrp-direct-products-card {
  border-color: #b9d4e9;
}

.kfzrp-direct-order-lines {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.kfzrp-direct-order-line {
  display: grid;
  grid-template-columns: 36px minmax(280px, 1fr) 110px 42px;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid #dbe3e9;
  border-radius: 9px;
  background: #f8fafb;
}

.kfzrp-direct-line-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 6px;
  border-radius: 999px;
  background: #145da0;
  color: #fff;
  font-weight: 800;
}

.kfzrp-direct-line-remove {
  width: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: #8b2635;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.kfzrp-direct-line-remove:hover,
.kfzrp-direct-line-remove:focus {
  background: #6f1d2a;
  color: #fff;
}

.kfzrp-direct-line-remove:disabled,
.kfzrp-button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

@media (max-width: 820px) {
  .kfzrp-direct-order-line {
    grid-template-columns: 34px minmax(0, 1fr) 90px;
  }

  .kfzrp-direct-order-line .kfzrp-direct-line-remove {
    grid-column: 3;
  }
}

@media (max-width: 620px) {
  .kfzrp-direct-order-toolbar,
  .kfzrp-toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .kfzrp-direct-order-line {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .kfzrp-direct-order-line > label:first-of-type {
    grid-column: 2;
  }

  .kfzrp-direct-order-line > label:nth-of-type(2) {
    grid-column: 2;
  }

  .kfzrp-direct-order-line .kfzrp-direct-line-remove {
    grid-column: 2;
    justify-self: end;
  }
}


/* 1.5.3: kompakte Bearbeiten-Aktion in der Bestellübersicht. */
.kfzrp-screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.kfzrp-order-table .kfzrp-table-action {
  width: 54px !important;
  min-width: 54px !important;
  padding-left: 7px !important;
  padding-right: 7px !important;
  text-align: center !important;
  vertical-align: middle;
}

.kfzrp-edit-order-link,
.kfzrp-portal a.kfzrp-edit-order-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  border: 1px solid #0f5e9c !important;
  border-radius: 7px !important;
  background: #1769aa !important;
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.kfzrp-edit-order-link svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.kfzrp-edit-order-link:hover,
.kfzrp-edit-order-link:focus,
.kfzrp-edit-order-link:active,
.kfzrp-portal a.kfzrp-edit-order-link:hover,
.kfzrp-portal a.kfzrp-edit-order-link:focus,
.kfzrp-portal a.kfzrp-edit-order-link:active {
  background: #0b4f86 !important;
  border-color: #0b4f86 !important;
  color: #fff !important;
  outline: 2px solid rgba(23, 105, 170, .28);
  outline-offset: 2px;
}


/* 1.5.4: Produkte zu unbezahlten Bestellungen und eBay-Kennzeichnung. */
.kfzrp-order-add-product,
.kfzrp-order-add-product-locked {
  display: grid;
  grid-template-columns: minmax(230px, 1.4fr) minmax(280px, 2fr) 100px auto;
  gap: 12px;
  align-items: end;
  margin-top: 18px;
  padding: 16px;
  border-top: 1px solid #d9e3ea;
  border-radius: 8px;
  background: #f7fafc;
}

.kfzrp-order-add-product > div:first-child,
.kfzrp-order-add-product-locked {
  align-self: center;
}

.kfzrp-order-add-product > div:first-child strong,
.kfzrp-order-add-product > div:first-child span,
.kfzrp-order-add-product-locked strong,
.kfzrp-order-add-product-locked span {
  display: block;
}

.kfzrp-order-add-product > div:first-child span,
.kfzrp-order-add-product-locked span {
  margin-top: 3px;
  color: #607383;
  font-size: 12px;
  line-height: 1.45;
}

.kfzrp-order-add-product label {
  margin: 0;
}

.kfzrp-order-add-product select,
.kfzrp-order-add-product input {
  width: 100%;
}

.kfzrp-order-product-picker {
  min-width: 0;
}

.kfzrp-order-product-picker label,
.kfzrp-order-product-picker small {
  display: block;
}

.kfzrp-order-product-picker input[type="search"] {
  width: 100%;
}

.kfzrp-order-product-picker small {
  margin-top: 5px;
  color: #607383;
  font-size: 11px;
  line-height: 1.4;
}

.kfzrp-order-add-product-locked {
  grid-template-columns: 1fr;
  border: 1px solid #e2e8ed;
  background: #f5f7f9;
}

.kfzrp-marketplace-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 4px auto 1px;
  padding: 2px 7px;
  border: 1px solid #c9d8e4;
  border-radius: 999px;
  background: #fff;
  color: #145da0;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .02em;
  line-height: 1.4;
}

.kfzrp-marketplace-order-id {
  color: #40576a !important;
  font-size: 10px !important;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.kfzrp-ebay-notice {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: -4px 0 14px;
  padding: 11px 14px;
  border: 1px solid #cbdbe7;
  border-radius: 8px;
  background: #f2f7fb;
  color: #314c60;
  font-size: 12px;
}

.kfzrp-ebay-notice strong {
  color: #163d5a;
}

.kfzrp-ebay-notice.is-connected {
  border-color: #b9ddc9;
  background: #edf8f1;
}

@media (max-width: 980px) {
  .kfzrp-order-add-product {
    grid-template-columns: 1fr 110px auto;
  }

  .kfzrp-order-add-product > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .kfzrp-order-add-product {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .kfzrp-order-add-product .kfzrp-button {
    width: 100%;
  }
}

/* 1.5.6: sortierbare Bestellübersicht mit Bestell- und Rechnungsdatum sowie Fehlerbeschreibung. */
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-order { width: 104px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-order-date { width: 112px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-job { width: 88px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-invoice { width: 88px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-invoice-date { width: 108px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-customer { width: 195px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-products { width: 330px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-fault { width: 166px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-status { width: 175px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-total { width: 100px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-action { width: 54px !important; }

.kfzrp-portal.kfzrp-portal-wide-orders .kfzrp-order-table {
  min-width: 1520px !important;
}

.kfzrp-sort-button,
.kfzrp-portal button.kfzrp-sort-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 5px !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 2px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #233b50 !important;
  font: inherit !important;
  font-size: inherit !important;
  font-weight: 800 !important;
  letter-spacing: inherit !important;
  line-height: inherit !important;
  text-align: inherit !important;
  text-transform: inherit !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

.kfzrp-order-table .kfzrp-table-price .kfzrp-sort-button {
  justify-content: flex-end !important;
  margin-left: auto !important;
}

.kfzrp-sort-button:hover,
.kfzrp-sort-button:focus,
.kfzrp-sort-button:active,
.kfzrp-portal button.kfzrp-sort-button:hover,
.kfzrp-portal button.kfzrp-sort-button:focus,
.kfzrp-portal button.kfzrp-sort-button:active {
  background: transparent !important;
  color: #0f5e9c !important;
  outline: none !important;
}

.kfzrp-sort-button:focus-visible {
  outline: 2px solid #1769aa !important;
  outline-offset: 3px !important;
}

.kfzrp-sort-indicator {
  display: inline-block;
  min-width: 11px;
  color: #587287;
  font-size: 13px;
  line-height: 1;
  text-align: center;
}

.kfzrp-order-table th[aria-sort="ascending"] .kfzrp-sort-button,
.kfzrp-order-table th[aria-sort="descending"] .kfzrp-sort-button,
.kfzrp-order-table th[aria-sort="ascending"] .kfzrp-sort-indicator,
.kfzrp-order-table th[aria-sort="descending"] .kfzrp-sort-indicator {
  color: #0f5e9c !important;
}

.kfzrp-order-table th.kfzrp-table-order-date,
.kfzrp-order-table td.kfzrp-table-order-date,
.kfzrp-order-table th.kfzrp-table-invoice-date,
.kfzrp-order-table td.kfzrp-table-invoice-date {
  text-align: center !important;
}

.kfzrp-order-table td.kfzrp-table-order-date strong,
.kfzrp-order-table td.kfzrp-table-invoice-date strong {
  white-space: nowrap;
}

.kfzrp-order-table td.kfzrp-table-fault {
  color: #314758;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .kfzrp-portal.kfzrp-portal-wide-orders .kfzrp-order-table {
    min-width: 1440px !important;
  }
}


/* 1.5.7: Produktsuche im Auftrag und optimierte Spaltenbreiten. */
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-products { width: 330px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-fault { width: 166px !important; }

.kfzrp-order-table td.kfzrp-table-fault span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}


/* 1.5.8: größeres Produkt-/Leistungsfeld und freie Positionen mit Preis. */
.kfzrp-order-add-product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.kfzrp-order-add-product-intro {
  grid-column: 1 / -1;
  padding-bottom: 2px;
}

.kfzrp-order-add-existing,
.kfzrp-order-add-custom {
  min-width: 0;
  padding: 16px;
  border: 1px solid #d4e0e9;
  border-radius: 9px;
  background: #fff;
}

.kfzrp-order-add-existing h5,
.kfzrp-order-add-custom h5 {
  margin: 0 0 12px;
  color: #173f5c;
  font-size: 15px;
}

.kfzrp-order-product-picker input[type="search"] {
  min-height: 52px;
  padding: 11px 13px;
  font-size: 16px;
}

.kfzrp-order-add-actions {
  display: grid;
  grid-template-columns: 105px minmax(170px, auto);
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.kfzrp-order-custom-name textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
}

.kfzrp-order-custom-fields {
  display: grid;
  grid-template-columns: 90px minmax(130px, .8fr) minmax(150px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.kfzrp-order-add-custom > small {
  display: block;
  margin-top: 9px;
  color: #607383;
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 1080px) {
  .kfzrp-order-add-product {
    grid-template-columns: 1fr;
  }

  .kfzrp-order-add-product-intro {
    grid-column: 1;
  }

  .kfzrp-order-custom-fields {
    grid-template-columns: 100px minmax(140px, 1fr) minmax(160px, 1fr);
  }

  .kfzrp-order-custom-fields .kfzrp-button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 620px) {
  .kfzrp-order-add-existing,
  .kfzrp-order-add-custom {
    padding: 13px;
  }

  .kfzrp-order-add-actions,
  .kfzrp-order-custom-fields {
    grid-template-columns: 1fr;
  }

  .kfzrp-order-add-actions .kfzrp-button,
  .kfzrp-order-custom-fields .kfzrp-button {
    width: 100%;
  }
}


/* 1.6.4: größere Produktsuche, lesbare eigene Trefferliste und klare freie-Position-Aktion. */
.kfzrp-order-product-picker {
  position: relative;
}

.kfzrp-order-product-picker > label {
  display: block;
  margin-bottom: 7px;
  font-size: 15px;
  font-weight: 700;
  color: #173f5c;
}

.kfzrp-product-search-control {
  position: relative;
}

.kfzrp-order-product-picker input[type="search"] {
  width: 100% !important;
  min-height: 64px !important;
  padding: 15px 17px !important;
  border-width: 2px !important;
  border-color: #9db7ca !important;
  border-radius: 9px !important;
  background: #fff !important;
  font-size: 19px !important;
  line-height: 1.25 !important;
  font-weight: 600 !important;
  color: #102f45 !important;
}

.kfzrp-order-product-picker input[type="search"]::placeholder {
  color: #6b7f8e !important;
  font-weight: 500 !important;
  opacity: 1;
}

.kfzrp-order-product-picker input[type="search"]:focus {
  border-color: #1265a8 !important;
  box-shadow: 0 0 0 3px rgba(18, 101, 168, .16) !important;
  outline: none !important;
}

.kfzrp-product-search-results {
  position: absolute;
  z-index: 10020;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  max-height: 390px;
  overflow-y: auto;
  padding: 6px;
  border: 2px solid #8eacbf;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 49, 72, .18);
}

.kfzrp-product-search-results[hidden] {
  display: none !important;
}

.kfzrp-product-search-result {
  display: flex !important;
  width: 100% !important;
  min-height: 64px;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start !important;
  gap: 4px;
  padding: 11px 13px !important;
  border: 0 !important;
  border-bottom: 1px solid #e0e8ee !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #173f5c !important;
  text-align: left !important;
  cursor: pointer;
}

.kfzrp-product-search-result[hidden] {
  display: none !important;
}

.kfzrp-product-search-result:last-of-type {
  border-bottom: 0 !important;
}

.kfzrp-product-search-result:hover,
.kfzrp-product-search-result:focus,
.kfzrp-product-search-result.is-active {
  background: #e8f3fb !important;
  color: #0c4e82 !important;
  outline: none !important;
}

.kfzrp-product-search-result-name {
  font-size: 17px;
  line-height: 1.25;
  font-weight: 750;
}

.kfzrp-product-search-result-meta {
  font-size: 14px;
  line-height: 1.3;
  color: #506b7d;
}

.kfzrp-product-search-empty {
  padding: 16px;
  font-size: 16px;
  color: #5b7180;
  text-align: center;
}

.kfzrp-order-custom-fields {
  grid-template-columns: 90px minmax(150px, .8fr) minmax(170px, 1fr) !important;
}

.kfzrp-order-custom-submit {
  display: flex;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #dce6ed;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.kfzrp-order-custom-submit small {
  max-width: 62%;
  color: #607383;
  font-size: 12px;
  line-height: 1.45;
}

.kfzrp-order-custom-submit .kfzrp-button {
  min-width: 225px;
  min-height: 46px;
  margin-left: auto;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .kfzrp-order-product-picker input[type="search"] {
    min-height: 58px !important;
    font-size: 17px !important;
  }

  .kfzrp-product-search-result-name {
    font-size: 16px;
  }

  .kfzrp-order-custom-fields {
    grid-template-columns: 1fr !important;
  }

  .kfzrp-order-custom-submit {
    flex-direction: column;
    align-items: stretch;
  }

  .kfzrp-order-custom-submit small {
    max-width: none;
  }

  .kfzrp-order-custom-submit .kfzrp-button {
    width: 100%;
    min-width: 0;
  }
}

/* 1.6.5: kompaktere Produktsuche, deutlich erkennbare Bestelllinks und sichere Storno-/Löschaktionen. */
.kfzrp-order-product-picker input[type="search"] {
  min-height: 64px !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
  font-weight: 500 !important;
}

.kfzrp-product-search-result-name {
  font-size: 14px !important;
  line-height: 1.3 !important;
  font-weight: 750 !important;
}

.kfzrp-product-search-result-meta {
  font-size: 12px !important;
  line-height: 1.35 !important;
}

.kfzrp-product-search-empty {
  font-size: 13px !important;
}

.kfzrp-portal .kfzrp-table-order-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 5px 9px !important;
  border: 2px solid #145da0 !important;
  border-radius: 7px !important;
  background: #145da0 !important;
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: 0 1px 3px rgba(20, 93, 160, .25) !important;
}

.kfzrp-portal .kfzrp-table-order-link .kfzrp-table-order-number {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  text-decoration: none !important;
}

.kfzrp-portal .kfzrp-table-order-link::after {
  content: "↗";
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

.kfzrp-portal .kfzrp-table-order-link:hover,
.kfzrp-portal .kfzrp-table-order-link:focus {
  border-color: #0f477b !important;
  background: #0f477b !important;
  outline: 3px solid rgba(20, 93, 160, .18) !important;
  outline-offset: 2px !important;
}

.kfzrp-danger-details {
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid #e4b8b8;
  border-radius: 8px;
  background: #fff8f8;
}

.kfzrp-danger-details summary {
  color: #8e2727;
  font-weight: 800;
  cursor: pointer;
}

.kfzrp-cancel-invoice-form {
  display: grid;
  gap: 11px;
  margin-top: 12px;
}

.kfzrp-cancel-invoice-form p {
  margin: 0;
  color: #6e4b4b;
  font-size: 12px;
}

.kfzrp-portal button.kfzrp-button-danger,
.kfzrp-portal .kfzrp-button-danger {
  border-color: #a52f2f !important;
  background: #a52f2f !important;
  background-color: #a52f2f !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.kfzrp-portal button.kfzrp-button-danger:hover,
.kfzrp-portal button.kfzrp-button-danger:focus,
.kfzrp-portal .kfzrp-button-danger:hover,
.kfzrp-portal .kfzrp-button-danger:focus {
  border-color: #7e1f1f !important;
  background: #7e1f1f !important;
  background-color: #7e1f1f !important;
}

.kfzrp-danger-zone {
  margin-top: 18px;
  border-color: #e2b9b9;
  background: #fffafa;
}

.kfzrp-delete-order-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.kfzrp-delete-order-form .kfzrp-button {
  min-width: 250px;
}

@media (max-width: 760px) {
  .kfzrp-order-product-picker input[type="search"] {
    min-height: 58px !important;
    font-size: 15px !important;
  }

  .kfzrp-delete-order-form {
    grid-template-columns: 1fr;
  }

  .kfzrp-delete-order-form .kfzrp-button {
    width: 100%;
    min-width: 0;
  }
}

/* 1.6.6: bearbeitbare Bestellpositionen sowie Rechnungs- und Lieferadressen. */
.kfzrp-order-status-field {
  max-width: 360px;
  margin-bottom: 18px;
}

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

.kfzrp-address-editor {
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid #d5e0e8;
  border-radius: 9px;
  background: #f8fafc;
}

.kfzrp-address-editor legend {
  padding: 0 7px;
  color: #173f5c;
  font-size: 15px;
  font-weight: 800;
}

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

.kfzrp-address-wide {
  grid-column: 1 / -1;
}

.kfzrp-address-editor.is-locked {
  background: #f3f5f7;
}

.kfzrp-address-editor.is-locked input,
.kfzrp-address-editor.is-locked select {
  color: #52616e !important;
  background: #e8ecef !important;
  cursor: not-allowed;
}

.kfzrp-address-lock-note {
  margin: 0 0 12px;
  padding: 9px 11px;
  border-radius: 7px;
  background: #fff3cd;
  color: #6b5410;
  font-size: 12px;
  line-height: 1.45;
}

.kfzrp-item-edit-notice {
  display: grid;
  gap: 2px;
  margin: -4px 0 14px;
  padding: 10px 12px;
  border: 1px solid #b9d7c5;
  border-radius: 8px;
  background: #edf8f1;
  color: #275a39;
  font-size: 12px;
}

.kfzrp-item-edit-notice strong,
.kfzrp-item-edit-notice span {
  display: block;
}

.kfzrp-item-edit-notice.is-locked {
  border-color: #e2cf9b;
  background: #fff8e6;
  color: #69551d;
}

.kfzrp-order-item.is-editable {
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: start;
}

.kfzrp-order-item-editor {
  min-width: 0;
}

.kfzrp-order-item-editor > small {
  display: block;
  margin-top: 5px;
  color: #607383;
  font-size: 11px;
}

.kfzrp-order-item-name input {
  min-height: 44px;
  font-weight: 650;
}

.kfzrp-order-item-edit-fields {
  display: grid;
  grid-template-columns: 105px minmax(160px, 210px) 110px minmax(150px, 1fr);
  gap: 12px;
  align-items: end;
  margin-top: 13px;
}

.kfzrp-order-item-current-total {
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid #d9e2e8;
  border-radius: 7px;
  background: #f3f6f8;
  text-align: right;
}

.kfzrp-order-item-current-total span,
.kfzrp-order-item-current-total strong {
  display: block;
}

.kfzrp-order-item-current-total span {
  color: #647180;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.kfzrp-remove-order-item,
.kfzrp-portal button.kfzrp-remove-order-item {
  display: inline-flex !important;
  min-height: 34px !important;
  margin-top: 11px !important;
  padding: 6px 10px !important;
  border: 1px solid #b52f2f !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #a32626 !important;
  font: inherit !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

.kfzrp-remove-order-item:hover,
.kfzrp-remove-order-item:focus,
.kfzrp-portal button.kfzrp-remove-order-item:hover,
.kfzrp-portal button.kfzrp-remove-order-item:focus {
  background: #a32626 !important;
  color: #fff !important;
}

.kfzrp-order-items-save {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid #cddde8;
  border-radius: 8px;
  background: #f4f9fc;
}

.kfzrp-order-items-save span {
  margin-right: auto;
  color: #607383;
  font-size: 12px;
}

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

  .kfzrp-order-item-edit-fields {
    grid-template-columns: 100px minmax(150px, 1fr) 105px;
  }

  .kfzrp-order-item-current-total {
    grid-column: 1 / -1;
    text-align: left;
  }
}

@media (max-width: 620px) {
  .kfzrp-address-grid,
  .kfzrp-order-item-edit-fields {
    grid-template-columns: 1fr;
  }

  .kfzrp-address-wide,
  .kfzrp-order-item-current-total {
    grid-column: auto;
  }

  .kfzrp-order-item.is-editable {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .kfzrp-order-items-save {
    align-items: stretch;
    flex-direction: column;
  }

  .kfzrp-order-items-save .kfzrp-button {
    width: 100%;
  }
}


/* 1.6.7: Adressen wieder kompakt anzeigen und per Bearbeiten-Symbol öffnen. */
.kfzrp-address-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d5e0e8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(23, 63, 92, 0.05);
}

.kfzrp-address-card > summary {
  display: block;
  list-style: none;
  position: relative;
  min-height: 150px;
  padding: 16px 58px 16px 16px;
  cursor: pointer;
  background: #fff;
}

.kfzrp-address-card > summary::-webkit-details-marker {
  display: none;
}

.kfzrp-address-card > summary::marker {
  content: '';
}

.kfzrp-address-card > summary:hover,
.kfzrp-address-card > summary:focus-visible {
  background: #f6fafe;
}

.kfzrp-address-card[open] > summary {
  min-height: 0;
  border-bottom: 1px solid #d5e0e8;
  background: #f6fafe;
}

.kfzrp-address-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.kfzrp-address-summary-head strong {
  display: block;
  color: #173f5c;
  font-size: 16px;
  line-height: 1.3;
}

.kfzrp-address-kicker {
  display: block;
  margin-bottom: 2px;
  color: #668094;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.kfzrp-address-edit-trigger,
.kfzrp-address-lock-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
}

.kfzrp-address-edit-trigger {
  color: #fff;
  background: #1769aa;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}

.kfzrp-address-card > summary:hover .kfzrp-address-edit-trigger,
.kfzrp-address-card > summary:focus-visible .kfzrp-address-edit-trigger {
  background: #0e4f83;
}

.kfzrp-address-card[open] .kfzrp-address-edit-trigger {
  transform: rotate(-12deg);
}

.kfzrp-address-preview {
  display: block;
  margin-top: 13px;
  color: #273b49;
  font-size: 14px;
  line-height: 1.55;
}

.kfzrp-address-contact {
  display: block;
  margin-top: 9px;
  color: #526b7c;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.kfzrp-address-contact a {
  color: #1769aa !important;
  text-decoration: none;
}

.kfzrp-address-contact a:hover {
  text-decoration: underline;
}

.kfzrp-address-card.is-locked {
  position: relative;
  min-height: 150px;
  padding: 16px 58px 16px 16px;
  background: #f7f8f9;
}

.kfzrp-address-card.is-locked .kfzrp-address-lock-icon {
  color: #52616e;
  background: #e3e8ec;
}

.kfzrp-address-card .kfzrp-address-editor {
  margin: 0;
  padding: 16px;
  border: 0;
  border-radius: 0;
  background: #f8fafc;
}

.kfzrp-address-card .kfzrp-address-editor legend {
  padding: 0;
  color: #173f5c;
  font-size: 14px;
  font-weight: 800;
}

.kfzrp-address-save-hint {
  margin: 12px 0 0;
  color: #526b7c;
  font-size: 12px;
}

.kfzrp-address-card.is-locked .kfzrp-address-lock-note {
  margin: 13px 0 0;
}

@media (max-width: 760px) {
  .kfzrp-address-card > summary,
  .kfzrp-address-card.is-locked {
    min-height: 0;
  }
}

/* 1.6.8: kleinere Adresskarten, bewusstes Öffnen per Stift, Schnellaktionen und zusammengefasste Positionseingabe. */
.kfzrp-address-editors {
  gap: 10px !important;
}

.kfzrp-address-card-compact {
  position: relative;
  min-height: 0 !important;
  padding: 10px 44px 10px 12px !important;
  border-radius: 8px !important;
}

.kfzrp-address-card-compact .kfzrp-address-summary-head {
  min-height: 24px;
  align-items: center;
}

.kfzrp-address-card-compact .kfzrp-address-summary-head strong {
  font-size: 13px !important;
  line-height: 1.25 !important;
}

.kfzrp-address-card-compact .kfzrp-address-kicker {
  margin-bottom: 0;
  font-size: 8px !important;
  letter-spacing: .07em;
}

.kfzrp-address-card-compact .kfzrp-address-preview {
  margin-top: 6px !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

.kfzrp-address-card-compact .kfzrp-address-contact {
  margin-top: 5px !important;
  font-size: 10px !important;
  line-height: 1.3 !important;
}

.kfzrp-address-card-compact .kfzrp-address-edit-trigger,
.kfzrp-address-card-compact .kfzrp-address-lock-icon {
  top: 9px !important;
  right: 9px !important;
  width: 28px !important;
  height: 28px !important;
  border: 0;
  font-size: 14px !important;
}

.kfzrp-address-card-compact button.kfzrp-address-edit-trigger {
  cursor: pointer;
}

.kfzrp-address-card-compact button.kfzrp-address-edit-trigger:hover,
.kfzrp-address-card-compact button.kfzrp-address-edit-trigger:focus,
.kfzrp-address-card-compact button.kfzrp-address-edit-trigger.is-active {
  background: #0e4f83 !important;
  color: #fff !important;
  outline: 3px solid rgba(20, 93, 160, .16);
  outline-offset: 2px;
}

.kfzrp-address-card-compact .kfzrp-address-editor {
  margin: 10px -44px -10px -12px !important;
  padding: 14px 12px !important;
  border-top: 1px solid #d5e0e8 !important;
}

.kfzrp-address-card-compact .kfzrp-address-editor[hidden] {
  display: none !important;
}

.kfzrp-address-card-compact .kfzrp-address-lock-note {
  margin: 6px 0 0 !important;
  padding: 6px 8px !important;
  font-size: 10px !important;
}

.kfzrp-order-table col.kfzrp-col-action {
  width: 112px !important;
}

.kfzrp-order-table .kfzrp-table-action {
  position: relative;
  width: 112px !important;
  min-width: 112px !important;
  max-width: 112px !important;
  overflow: visible;
  text-align: center !important;
}

.kfzrp-quick-actions {
  position: relative;
  display: inline-block;
  min-width: 0;
  text-align: left;
}

.kfzrp-quick-actions > summary {
  list-style: none;
}

.kfzrp-quick-actions > summary::-webkit-details-marker {
  display: none;
}

.kfzrp-quick-actions-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid #145da0;
  border-radius: 7px;
  background: #145da0;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.kfzrp-quick-actions-trigger:hover,
.kfzrp-quick-actions-trigger:focus,
.kfzrp-quick-actions[open] .kfzrp-quick-actions-trigger {
  background: #0f477b;
  color: #fff;
  outline: 3px solid rgba(20, 93, 160, .16);
  outline-offset: 2px;
}

.kfzrp-quick-actions-menu {
  display: grid;
  gap: 4px;
  width: 220px;
  margin-top: 6px;
  padding: 7px;
  border: 1px solid #cbd8e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(18, 52, 74, .16);
}

.kfzrp-quick-actions-menu form {
  margin: 0;
}

.kfzrp-quick-action-item,
.kfzrp-portal .kfzrp-quick-action-item,
.kfzrp-quick-actions-menu button.kfzrp-quick-action-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  min-height: 34px !important;
  margin: 0 !important;
  padding: 7px 9px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: #f4f8fb !important;
  color: #173f5c !important;
  font: inherit !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  line-height: 1.25 !important;
  text-align: left !important;
  text-decoration: none !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

.kfzrp-quick-action-item:hover,
.kfzrp-quick-action-item:focus,
.kfzrp-portal .kfzrp-quick-action-item:hover,
.kfzrp-portal .kfzrp-quick-action-item:focus,
.kfzrp-quick-actions-menu button.kfzrp-quick-action-item:hover,
.kfzrp-quick-actions-menu button.kfzrp-quick-action-item:focus {
  background: #dfeef8 !important;
  color: #0f477b !important;
}

.kfzrp-quick-action-item.is-secondary {
  border-top: 1px solid #dbe5eb !important;
  border-radius: 0 0 6px 6px !important;
}

.kfzrp-quick-action-item.is-complete {
  cursor: default !important;
  background: #edf7f0 !important;
  color: #2c6440 !important;
}

.kfzrp-order-add-unified {
  display: block !important;
}

.kfzrp-order-add-unified .kfzrp-order-product-picker {
  width: 100%;
}

.kfzrp-order-add-unified .kfzrp-order-product-picker input[type="search"] {
  min-height: 64px !important;
  font-size: 15px !important;
}

.kfzrp-order-position-fields {
  display: grid;
  grid-template-columns: 90px minmax(160px, .8fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
}

.kfzrp-position-add-button,
.kfzrp-portal button.kfzrp-position-add-button {
  min-width: 170px !important;
  min-height: 44px !important;
  margin: 0 !important;
  white-space: nowrap;
}

.kfzrp-order-position-hint {
  display: block;
  margin-top: 9px;
  color: #607383;
  font-size: 11px;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .kfzrp-order-position-fields {
    grid-template-columns: 90px minmax(160px, 1fr) minmax(170px, 1fr);
  }

  .kfzrp-position-add-button {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

@media (max-width: 620px) {
  .kfzrp-order-position-fields {
    grid-template-columns: 1fr;
  }

  .kfzrp-position-add-button,
  .kfzrp-portal button.kfzrp-position-add-button {
    width: 100% !important;
    min-width: 0 !important;
  }

  .kfzrp-quick-actions-menu {
    width: 190px;
  }
}

/* Einstellungen: Nummernkreise und E-Mail-Vorlagen */
.kfzrp-settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px;
  border: 1px solid #d7e1e8;
  border-radius: 10px;
  background: #f4f8fb;
}

.kfzrp-settings-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 7px;
  color: #264b64;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.kfzrp-settings-tabs a:hover,
.kfzrp-settings-tabs a:focus {
  background: #e1edf5;
  color: #0f477b;
}

.kfzrp-settings-tabs a.is-active {
  background: #145da0;
  color: #fff;
}

.kfzrp-settings-section {
  margin: 0 0 20px;
  padding: 18px;
  border: 1px solid #d8e2e9;
  border-radius: 12px;
  background: #fff;
}

.kfzrp-email-settings-form {
  display: grid;
  gap: 18px;
}

.kfzrp-email-template-list {
  display: grid;
  gap: 10px;
}

.kfzrp-email-template-card {
  overflow: hidden;
  border: 1px solid #d8e2e9;
  border-radius: 9px;
  background: #fbfdfe;
}

.kfzrp-email-template-card[open] {
  border-color: #a9c4d7;
  background: #fff;
  box-shadow: 0 4px 14px rgba(27, 72, 102, .08);
}

.kfzrp-email-template-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.kfzrp-email-template-card > summary::-webkit-details-marker {
  display: none;
}

.kfzrp-email-template-card > summary::after {
  content: "▾";
  color: #607383;
  font-size: 13px;
}

.kfzrp-email-template-card[open] > summary::after {
  transform: rotate(180deg);
}

.kfzrp-email-template-card > summary > span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.kfzrp-email-template-card > summary strong {
  color: #173f5c;
  font-size: 14px;
}

.kfzrp-email-template-card > summary small {
  color: #607383;
  font-size: 11px;
  line-height: 1.35;
}

.kfzrp-email-state {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf1f4;
  color: #63727e;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.kfzrp-email-state.is-enabled {
  background: #e3f4e9;
  color: #28633c;
}

.kfzrp-email-template-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 15px;
  border-top: 1px solid #e0e7ec;
}

.kfzrp-email-template-fields .kfzrp-field-wide,
.kfzrp-email-template-fields > small {
  grid-column: 1 / -1;
}

.kfzrp-email-template-fields input[type="text"],
.kfzrp-email-template-fields textarea {
  width: 100%;
}

.kfzrp-email-template-fields textarea {
  min-height: 160px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
}

.kfzrp-email-template-fields > small {
  color: #607383;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .kfzrp-settings-tabs a {
    flex: 1 1 140px;
    justify-content: center;
  }

  .kfzrp-settings-section {
    padding: 12px;
  }

  .kfzrp-email-template-card > summary {
    align-items: flex-start;
  }

  .kfzrp-email-template-fields {
    grid-template-columns: 1fr;
    padding: 12px;
  }
}

/* Version 1.7.0: kompakte Oberfläche, Dashboard und persönliche Spalten */
.kfzrp-portal .kfzrp-toolbar > div > p,
.kfzrp-portal .kfzrp-section-heading > p,
.kfzrp-portal .kfzrp-workflow-box > p,
.kfzrp-portal .kfzrp-email-template-card > summary small,
.kfzrp-portal .kfzrp-order-position-hint,
.kfzrp-portal .kfzrp-sticky-actions > span,
.kfzrp-portal .kfzrp-ebay-notice > span {
  display: none !important;
}

.kfzrp-dashboard {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
}

.kfzrp-dashboard-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(145px, 1fr));
  gap: 10px;
}

.kfzrp-dashboard-card {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #d7e1e8;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(23, 33, 43, .04);
}

.kfzrp-dashboard-card span,
.kfzrp-dashboard-card strong {
  display: block;
}

.kfzrp-dashboard-card span {
  color: #607383;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.kfzrp-dashboard-card strong {
  margin-top: 4px;
  color: #173f5c;
  font-size: 18px;
  line-height: 1.2;
  white-space: nowrap;
}

.kfzrp-employee-revenue {
  border: 1px solid #d7e1e8;
  border-radius: 9px;
  background: #fff;
}

.kfzrp-employee-revenue > summary {
  padding: 11px 14px;
  color: #173f5c;
  font-weight: 800;
  cursor: pointer;
}

.kfzrp-employee-revenue[open] > summary {
  border-bottom: 1px solid #e0e7ec;
}

.kfzrp-employee-revenue .kfzrp-table-wrap {
  border: 0;
  border-radius: 0 0 9px 9px;
  box-shadow: none;
}

.kfzrp-employee-revenue-table th,
.kfzrp-employee-revenue-table td {
  padding: 9px 12px;
}

.kfzrp-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.kfzrp-column-picker {
  position: relative;
  z-index: 20;
}

.kfzrp-column-picker > summary {
  list-style: none;
}

.kfzrp-column-picker > summary::-webkit-details-marker {
  display: none;
}

.kfzrp-column-picker[open] > summary {
  background: #2e3a46 !important;
}

.kfzrp-column-picker > form {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  display: grid;
  gap: 10px;
  width: 260px;
  padding: 12px;
  border: 1px solid #cbd8e1;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(18, 52, 74, .18);
}

.kfzrp-column-picker-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 10px;
}

.kfzrp-column-picker-list label {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 6px !important;
  color: #34404c;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.kfzrp-column-picker-list input {
  flex: 0 0 auto;
  width: auto !important;
  min-height: 0 !important;
  margin: 0;
}

.kfzrp-column-picker .kfzrp-button-small {
  justify-self: end;
}

.kfzrp-pagination {
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 14px;
}

.kfzrp-pagination a {
  min-width: 32px;
  height: 32px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 750;
}

.kfzrp-page-summary {
  margin-right: 6px;
  color: #607383;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.kfzrp-page-ellipsis {
  display: grid;
  place-items: center;
  width: 22px;
  height: 32px;
  color: #607383;
}

.kfzrp-page-nav {
  font-size: 18px !important;
  line-height: 1;
}

@media (max-width: 1250px) {
  .kfzrp-dashboard-cards {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (max-width: 800px) {
  .kfzrp-dashboard-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kfzrp-orders-toolbar {
    flex-direction: row;
    align-items: center;
  }

  .kfzrp-column-picker > form {
    position: fixed;
    top: 50%;
    right: 14px;
    left: 14px;
    width: auto;
    max-height: 75vh;
    overflow: auto;
    transform: translateY(-50%);
  }
}

@media (max-width: 520px) {
  .kfzrp-dashboard-cards {
    grid-template-columns: 1fr;
  }

  .kfzrp-dashboard-card strong {
    white-space: normal;
  }

  .kfzrp-orders-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .kfzrp-toolbar-actions,
  .kfzrp-toolbar-actions > .kfzrp-button,
  .kfzrp-column-picker,
  .kfzrp-column-picker > summary {
    width: 100%;
  }

  .kfzrp-column-picker-list {
    grid-template-columns: 1fr;
  }

  .kfzrp-pagination {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }
}


/* Version 1.7.1: Auswertung unter Einstellungen und viewport-sichere Bestelltabelle. */
.kfzrp-analytics-section {
  padding: 16px;
}

.kfzrp-analytics-section .kfzrp-dashboard {
  margin: 0;
}

.kfzrp-portal.kfzrp-portal-wide-orders {
  width: calc(100vw - 48px) !important;
  max-width: calc(100vw - 48px) !important;
  min-width: 0 !important;
  margin-left: calc(50% - 50vw + 24px) !important;
  margin-right: calc(50% - 50vw + 24px) !important;
}

.kfzrp-portal.kfzrp-portal-wide-orders .kfzrp-order-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
}

.kfzrp-portal.kfzrp-portal-wide-orders .kfzrp-order-table {
  width: 100% !important;
  min-width: 1260px !important;
}

.kfzrp-portal .kfzrp-order-table col.kfzrp-col-order { width: 96px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-order-date { width: 96px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-job { width: 78px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-invoice { width: 82px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-invoice-date { width: 96px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-customer { width: 170px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-products { width: auto !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-fault { width: 140px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-status { width: 155px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-total { width: 92px !important; }
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-action { width: 108px !important; }

.kfzrp-quick-actions-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 80;
  width: min(220px, calc(100vw - 32px));
  margin-top: 0;
}

.kfzrp-order-table .kfzrp-table-action {
  overflow: visible !important;
}

@media (max-width: 760px) {
  .kfzrp-portal.kfzrp-portal-wide-orders {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    margin-left: calc(50% - 50vw + 8px) !important;
    margin-right: calc(50% - 50vw + 8px) !important;
  }

  .kfzrp-portal.kfzrp-portal-wide-orders .kfzrp-order-table {
    min-width: 1180px !important;
  }

  .kfzrp-analytics-section {
    padding: 10px;
  }
}

/* Version 1.7.2: kompakter Auftragskopf, eigene Abwicklungsmappe und Kanal-Auswertung. */
.kfzrp-order-toolbar-clean .kfzrp-order-heading-numbers {
  display: none;
}

.kfzrp-order-overview-clean {
  margin-bottom: 14px;
}

.kfzrp-order-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  padding: 6px;
  border: 1px solid #d9e1e8;
  border-radius: 10px;
  background: #f4f7f9;
}

.kfzrp-order-sections a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 7px;
  color: #243746 !important;
  font-weight: 700;
  text-decoration: none !important;
}

.kfzrp-order-sections a:hover,
.kfzrp-order-sections a:focus-visible {
  background: #e1ebf3;
  color: #123f65 !important;
}

.kfzrp-order-sections a.is-active {
  background: #1769aa;
  color: #fff !important;
}

.kfzrp-document-action-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.kfzrp-document-action-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 11px;
  border: 1px solid #dce4ea;
  border-radius: 9px;
  background: #fff;
}

.kfzrp-document-action-group > strong {
  flex: 1 0 100%;
  color: #213442;
  font-size: 13px;
}

.kfzrp-document-action-group form {
  display: inline-flex;
  margin: 0;
}

.kfzrp-info-grid-compact {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.kfzrp-order-control-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
  align-items: end;
}

.kfzrp-order-control-grid label {
  margin: 0;
}

.kfzrp-order-control-grid small {
  display: block;
  margin-top: 4px;
  color: #667784;
}

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

.kfzrp-analytics-table-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid #dce4ea;
  border-radius: 10px;
  background: #fff;
}

.kfzrp-analytics-table-card h4 {
  margin: 0 0 10px;
}

.kfzrp-analytics-table {
  min-width: 560px;
}

.kfzrp-integrations-section .kfzrp-ebay-notice {
  margin: 0;
}

@media (max-width: 980px) {
  .kfzrp-document-action-bar,
  .kfzrp-analytics-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .kfzrp-order-sections a {
    flex: 1 1 150px;
  }

  .kfzrp-order-control-grid {
    grid-template-columns: 1fr;
  }

  .kfzrp-document-action-group .kfzrp-button,
  .kfzrp-document-action-group form,
  .kfzrp-document-action-group form .kfzrp-button {
    width: 100%;
  }
}

/* 1.7.4: Dokumentaktionen mit Kostenvoranschlag. */
.kfzrp-document-action-bar {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

/* Version 1.7.8: Dokumentdesigner. */
.kfzrp-document-designer {
  display: grid;
  gap: 16px;
}

.kfzrp-document-design-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.kfzrp-document-design-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-weight: 700;
}

.kfzrp-document-design-grid input,
.kfzrp-document-design-grid select,
.kfzrp-document-design-grid textarea {
  width: 100%;
}

.kfzrp-media-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.kfzrp-color-field {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 5px 8px;
  border: 1px solid #cbd5df;
  border-radius: 6px;
  background: #fff;
}

.kfzrp-color-field input[type="color"] {
  width: 48px;
  height: 34px;
  padding: 1px;
  border: 0;
  background: transparent;
}

.kfzrp-color-field code {
  color: #425565;
  font-size: 12px;
}

.kfzrp-document-template-card {
  overflow: hidden;
  border: 1px solid #d4dee7;
  border-radius: 12px;
  background: #fff;
}

.kfzrp-document-template-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  cursor: pointer;
  background: #f3f7fa;
  list-style: none;
}

.kfzrp-document-template-card > summary::-webkit-details-marker {
  display: none;
}

.kfzrp-document-template-card > summary strong {
  color: #172e42;
  font-size: 16px;
}

.kfzrp-document-template-card > summary span {
  color: #667987;
  font-size: 12px;
}

.kfzrp-document-template-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 18px;
  padding: 18px;
}

.kfzrp-document-template-controls {
  min-width: 0;
}

.kfzrp-document-visibility,
.kfzrp-document-block-order {
  margin: 16px 0 0;
  padding: 14px;
  border: 1px solid #dce4ea;
  border-radius: 9px;
}

.kfzrp-document-visibility legend,
.kfzrp-document-block-order legend {
  padding: 0 6px;
  color: #243b4d;
  font-weight: 800;
}

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

.kfzrp-document-block-order ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kfzrp-document-block-order li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 7px 8px 7px 12px;
  border: 1px solid #d5dfe7;
  border-radius: 7px;
  background: #f8fafb;
}

.kfzrp-order-buttons {
  display: inline-flex;
  gap: 4px;
}

.kfzrp-order-buttons button {
  width: 32px;
  height: 30px;
  padding: 0;
  border: 1px solid #b9c8d5;
  border-radius: 5px;
  background: #fff;
  color: #164f7e;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.kfzrp-document-preview {
  min-width: 0;
  align-self: start;
  padding: 18px;
  border-radius: 10px;
  background: #eceff2;
  position: sticky;
  top: 18px;
}

.kfzrp-preview-page {
  --preview-primary: #1769aa;
  --preview-text: #111;
  --preview-muted: #9a9a9a;
  --preview-head-bg: #dedede;
  --preview-head-text: #111;
  --preview-company-size: 11px;
  --preview-sender-size: 10px;
  --preview-address-size: 14px;
  --preview-title-size: 26px;
  --preview-meta-size: 13px;
  --preview-table-size: 13px;
  --preview-totals-size: 13px;
  --preview-footer-size: 10px;
  --preview-page-number-size: 10px;
  position: relative;
  min-height: 590px;
  padding: 25px 28px 62px;
  overflow: hidden;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(26, 45, 60, .16);
  color: var(--preview-text);
  font-size: 11px;
}

.kfzrp-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 84px;
  color: var(--preview-muted);
  text-align: right;
  font-size: var(--preview-company-size);
}

.kfzrp-preview-head img {
  width: 145px;
  max-height: 60px;
  object-fit: contain;
  object-position: left top;
}

.kfzrp-preview-sender {
  margin: 2px 0 8px;
  color: var(--preview-muted);
  font-size: var(--preview-sender-size);
}

.kfzrp-preview-address {
  width: 55%;
  min-height: 58px;
  margin-bottom: 34px;
  line-height: 1.45;
  font-size: var(--preview-address-size);
}

.kfzrp-preview-page h3 {
  margin: 0 0 18px;
  color: var(--preview-text);
  font-size: var(--preview-title-size);
}

.kfzrp-preview-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  font-size: var(--preview-meta-size);
}

.kfzrp-preview-blocks {
  display: grid;
  gap: 12px;
}

.kfzrp-preview-block {
  min-width: 0;
}

.kfzrp-preview-text {
  line-height: 1.45;
}

.kfzrp-preview-repair {
  display: grid;
  font-size: var(--preview-table-size);
  grid-template-columns: 30% 70%;
  border-top: 1px solid #aeb7bf;
  border-left: 1px solid #aeb7bf;
}

.kfzrp-preview-repair > * {
  padding: 5px 7px;
  border-right: 1px solid #aeb7bf;
  border-bottom: 1px solid #aeb7bf;
}

.kfzrp-preview-repair b {
  background: var(--preview-head-bg);
  color: var(--preview-head-text);
}

.kfzrp-preview-items {
  font-size: var(--preview-table-size);
}

.kfzrp-preview-items > div {
  display: grid;
  grid-template-columns: 1fr 52px 78px;
  gap: 0;
  border-bottom: 1px solid #b5bdc4;
}

.kfzrp-preview-items > div > * {
  padding: 6px;
  text-align: right;
}

.kfzrp-preview-items > div > *:first-child {
  text-align: left;
}

.kfzrp-preview-items .is-head {
  background: var(--preview-head-bg);
  color: var(--preview-head-text);
}

.kfzrp-preview-totals {
  display: grid;
  font-size: var(--preview-totals-size);
  grid-template-columns: 1fr auto;
  gap: 5px 18px;
  width: 52%;
  margin-left: auto;
  padding-top: 5px;
  border-top: 1px solid #aaa;
}

.kfzrp-preview-note {
  padding: 8px;
  border-left: 4px solid var(--preview-primary);
  background: #f3f5f7;
}

.kfzrp-preview-signature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 28px;
}

.kfzrp-preview-signature span {
  padding-top: 5px;
  border-top: 1px solid #555;
}

.kfzrp-preview-footer {
  position: absolute;
  font-size: var(--preview-footer-size);
  right: 28px;
  bottom: 22px;
  left: 28px;
  padding-top: 9px;
  border-top: 1px solid #aaa;
  color: var(--preview-muted);
  text-align: center;
}

.kfzrp-preview-page-number {
  position: absolute;
  right: 28px;
  bottom: 47px;
  color: var(--preview-muted);
  font-size: var(--preview-page-number-size);
}

@media (max-width: 1050px) {
  .kfzrp-document-template-layout {
    grid-template-columns: 1fr;
  }

  .kfzrp-document-preview {
    position: static;
  }
}

@media (max-width: 680px) {
  .kfzrp-document-design-grid,
  .kfzrp-document-visibility {
    grid-template-columns: 1fr;
  }

  .kfzrp-media-field {
    grid-template-columns: 1fr;
  }

  .kfzrp-document-template-layout {
    padding: 12px;
  }

  .kfzrp-document-preview {
    padding: 8px;
  }

  .kfzrp-preview-page {
    min-height: 520px;
    padding: 18px 16px 58px;
  }
}

/* 1.8.0: Kundenverwaltung und Einstellungen als letzter Portalreiter. */
.kfzrp-customer-search {
  grid-template-columns: minmax(280px, 1fr) auto;
  max-width: 760px;
}

.kfzrp-customer-table td:first-child,
.kfzrp-customer-table td:nth-child(2) {
  min-width: 190px;
}

.kfzrp-customer-table td:nth-child(3) {
  min-width: 260px;
}

.kfzrp-customer-table td small {
  display: block;
  margin-top: 4px;
  color: var(--kfzrp-muted);
}

.kfzrp-customer-table td:last-child {
  width: 1%;
  white-space: nowrap;
}

@media (max-width: 680px) {
  .kfzrp-customer-search {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .kfzrp-customer-search .kfzrp-button {
    width: 100%;
  }
}


/* 1.8.1: Einstellungen optisch am rechten Rand der Hauptnavigation. */
.kfzrp-tabs .kfzrp-tab-settings {
  margin-left: auto;
}

@media (max-width: 680px) {
  .kfzrp-tabs .kfzrp-tab-settings {
    margin-left: 12px;
  }
}


/* 1.8.3: Ruhige, hierarchische Statusanzeige mit klarer Trennung. */
.kfzrp-table-status {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.kfzrp-status-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 7px;
  border: 1px solid #dce3e8;
  border-radius: 7px;
  background: #fff;
}

.kfzrp-status-row-order {
  border-color: #d9e0e5;
  background: #f8fafb;
}

.kfzrp-status-row-repair {
  border-color: var(--kfzrp-status-border, #d7e0e7);
  border-left: 4px solid var(--kfzrp-status-accent, #7b8791);
  background: var(--kfzrp-status-bg, #f5f7f9);
}

.kfzrp-status-kind {
  color: #697681;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.kfzrp-status-value {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: #26343f;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.kfzrp-status-row-order .kfzrp-status-value::before {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--kfzrp-status-accent, #7b8791);
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--kfzrp-status-border, #d7e0e7);
  content: "";
}

.kfzrp-status-row-repair .kfzrp-status-value {
  color: var(--kfzrp-status-strong, #26343f);
}

/* Im Auftragskopf bleiben Statuskarten neutral; nur Punkt und Seitenlinie tragen Farbe. */
.kfzrp-overview-status-colored {
  border-color: #dce3e8 !important;
  background: #fff !important;
}

.kfzrp-overview-status-colored::before {
  background: var(--kfzrp-status-accent, #7b8791) !important;
}

.kfzrp-overview-status-colored > span {
  color: #697681 !important;
}

.kfzrp-overview-status-colored > strong {
  display: flex !important;
  align-items: center;
  gap: 8px;
  color: #26343f !important;
}

.kfzrp-overview-status-colored > strong::before {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--kfzrp-status-accent, #7b8791);
  content: "";
}

/* Auswahlfelder bleiben weiß und erhalten nur eine eindeutige Farbkante. */
.kfzrp-status-select {
  border-color: #c7d3dc !important;
  border-left: 5px solid var(--kfzrp-status-accent, #7b8791) !important;
  background-color: #fff !important;
  color: #172b3b !important;
  box-shadow: none !important;
  font-weight: 700;
}

@media (max-width: 760px) {
  .kfzrp-status-row {
    grid-template-columns: 62px minmax(0, 1fr);
  }
}

/* WooCommerce-/Bestellstatus: Farbe wird nur als Orientierungspunkt verwendet. */
.kfzrp-wc-status-pending {
  --kfzrp-status-bg: #fffaf0;
  --kfzrp-status-border: #e8cf91;
  --kfzrp-status-accent: #b87900;
  --kfzrp-status-text: #725000;
  --kfzrp-status-strong: #694900;
}
.kfzrp-wc-status-processing {
  --kfzrp-status-bg: #f1f7fc;
  --kfzrp-status-border: #abcbe4;
  --kfzrp-status-accent: #2473aa;
  --kfzrp-status-text: #205f8d;
  --kfzrp-status-strong: #174f79;
}
.kfzrp-wc-status-on-hold {
  --kfzrp-status-bg: #f8f4fc;
  --kfzrp-status-border: #c9b5df;
  --kfzrp-status-accent: #77509e;
  --kfzrp-status-text: #683795;
  --kfzrp-status-strong: #572a82;
}
.kfzrp-wc-status-completed {
  --kfzrp-status-bg: #f1f8f3;
  --kfzrp-status-border: #a8cfb5;
  --kfzrp-status-accent: #2b7a48;
  --kfzrp-status-text: #246b40;
  --kfzrp-status-strong: #1d6038;
}
.kfzrp-wc-status-cancelled,
.kfzrp-wc-status-canceled {
  --kfzrp-status-bg: #f5f6f7;
  --kfzrp-status-border: #c4ccd2;
  --kfzrp-status-accent: #65717a;
  --kfzrp-status-text: #4f5a62;
  --kfzrp-status-strong: #414b52;
}
.kfzrp-wc-status-refunded {
  --kfzrp-status-bg: #eff8f7;
  --kfzrp-status-border: #9bc9c6;
  --kfzrp-status-accent: #197670;
  --kfzrp-status-text: #176b67;
  --kfzrp-status-strong: #105c58;
}
.kfzrp-wc-status-failed {
  --kfzrp-status-bg: #fcf2f3;
  --kfzrp-status-border: #dfadb1;
  --kfzrp-status-accent: #b73743;
  --kfzrp-status-text: #97303a;
  --kfzrp-status-strong: #862630;
}
.kfzrp-wc-status-checkout-draft,
.kfzrp-wc-status-draft,
.kfzrp-wc-status-unset {
  --kfzrp-status-bg: #f5f6f7;
  --kfzrp-status-border: #cbd2d8;
  --kfzrp-status-accent: #77838c;
  --kfzrp-status-text: #58646d;
  --kfzrp-status-strong: #48545d;
}

/* Werkstattstatus: dezente Fläche plus klare linke Prozessfarbe. */
.kfzrp-repair-status-unset {
  --kfzrp-status-bg: #f5f6f7;
  --kfzrp-status-border: #cbd2d8;
  --kfzrp-status-accent: #77838c;
  --kfzrp-status-text: #58646d;
  --kfzrp-status-strong: #48545d;
}
.kfzrp-repair-status-received {
  --kfzrp-status-bg: #edf6fd;
  --kfzrp-status-border: #aacde7;
  --kfzrp-status-accent: #2476b1;
  --kfzrp-status-text: #205f8d;
  --kfzrp-status-strong: #174f79;
}
.kfzrp-repair-status-diagnosis {
  --kfzrp-status-bg: #f4f1fb;
  --kfzrp-status-border: #c5b8e1;
  --kfzrp-status-accent: #6c4b9f;
  --kfzrp-status-text: #5d3d98;
  --kfzrp-status-strong: #4f3287;
}
.kfzrp-repair-status-quote {
  --kfzrp-status-bg: #fff8e5;
  --kfzrp-status-border: #e6ca82;
  --kfzrp-status-accent: #b97b00;
  --kfzrp-status-text: #775100;
  --kfzrp-status-strong: #684700;
}
.kfzrp-repair-status-approval {
  --kfzrp-status-bg: #fff3e9;
  --kfzrp-status-border: #e7ba94;
  --kfzrp-status-accent: #c76318;
  --kfzrp-status-text: #914812;
  --kfzrp-status-strong: #803b0d;
}
.kfzrp-repair-status-repair {
  --kfzrp-status-bg: #eaf7f9;
  --kfzrp-status-border: #9acbd3;
  --kfzrp-status-accent: #177d8e;
  --kfzrp-status-text: #146a7a;
  --kfzrp-status-strong: #0e5968;
}
.kfzrp-repair-status-testing {
  --kfzrp-status-bg: #f0f2fc;
  --kfzrp-status-border: #aeb8df;
  --kfzrp-status-accent: #485dab;
  --kfzrp-status-text: #3d50a1;
  --kfzrp-status-strong: #31448d;
}
.kfzrp-repair-status-completed {
  --kfzrp-status-bg: #eef8f1;
  --kfzrp-status-border: #a7cfb4;
  --kfzrp-status-accent: #287a46;
  --kfzrp-status-text: #246b40;
  --kfzrp-status-strong: #1d6038;
}
.kfzrp-repair-status-returned {
  --kfzrp-status-bg: #edf8f7;
  --kfzrp-status-border: #9dcac7;
  --kfzrp-status-accent: #19756f;
  --kfzrp-status-text: #176b67;
  --kfzrp-status-strong: #105c58;
}
.kfzrp-repair-status-rejected {
  --kfzrp-status-bg: #fcf1f2;
  --kfzrp-status-border: #dfacb0;
  --kfzrp-status-accent: #b63642;
  --kfzrp-status-text: #97303a;
  --kfzrp-status-strong: #862630;
}


/* 1.11.25: Mitarbeiterportal ohne Website-Header, Navigation, Warenkorb und Footer. */
body.kfzrp-portal-page {
  padding-top: 0 !important;
}

body.kfzrp-portal-page > header,
body.kfzrp-portal-page header:not(.kfzrp-header),
body.kfzrp-portal-page #masthead,
body.kfzrp-portal-page #site-header,
body.kfzrp-portal-page #header,
body.kfzrp-portal-page .site-header,
body.kfzrp-portal-page .site-header-wrapper,
body.kfzrp-portal-page .header-wrapper,
body.kfzrp-portal-page .header-area,
body.kfzrp-portal-page .header-main,
body.kfzrp-portal-page .header-top,
body.kfzrp-portal-page .header-middle,
body.kfzrp-portal-page .header-bottom,
body.kfzrp-portal-page .main-header-bar,
body.kfzrp-portal-page .main-header-bar-wrap,
body.kfzrp-portal-page .ast-above-header-wrap,
body.kfzrp-portal-page .ast-primary-header-bar,
body.kfzrp-portal-page .elementor-location-header,
body.kfzrp-portal-page .wp-site-blocks > header,
body.kfzrp-portal-page .sticky-header,
body.kfzrp-portal-page .sticky-header-placeholder,
body.kfzrp-portal-page .site-header-placeholder,
body.kfzrp-portal-page .header-spacer,
body.kfzrp-portal-page .shoplentor-header,
body.kfzrp-portal-page .ht-header,
body.kfzrp-portal-page .site-header-cart,
body.kfzrp-portal-page .header-cart,
body.kfzrp-portal-page .mini-cart,
body.kfzrp-portal-page .woocommerce-mini-cart,
body.kfzrp-portal-page .widget_shopping_cart,
body.kfzrp-portal-page .wc-block-mini-cart,
body.kfzrp-portal-page .cart-contents,
body.kfzrp-portal-page .woostify-header-cart,
body.kfzrp-portal-page .shopengine-mini-cart,
body.kfzrp-portal-page .shoplentor-mini-cart,
body.kfzrp-portal-page > footer,
body.kfzrp-portal-page #colophon,
body.kfzrp-portal-page #site-footer,
body.kfzrp-portal-page #footer,
body.kfzrp-portal-page .site-footer,
body.kfzrp-portal-page .site-footer-wrapper,
body.kfzrp-portal-page .footer-wrapper,
body.kfzrp-portal-page .footer-area,
body.kfzrp-portal-page .footer-main,
body.kfzrp-portal-page .footer-top,
body.kfzrp-portal-page .footer-bottom,
body.kfzrp-portal-page .footer-widget-area,
body.kfzrp-portal-page .footer-widgets,
body.kfzrp-portal-page .elementor-location-footer,
body.kfzrp-portal-page .wp-site-blocks > footer,
body.kfzrp-portal-page .ast-footer-overlay,
body.kfzrp-portal-page .site-primary-footer-wrap,
body.kfzrp-portal-page .site-above-footer-wrap,
body.kfzrp-portal-page .site-below-footer-wrap,
body.kfzrp-portal-page footer[role="contentinfo"],
body.kfzrp-portal-page [data-kfzrp-site-chrome-hidden="true"] {
  display: none !important;
  visibility: hidden !important;
}

body.kfzrp-portal-page .kfzrp-portal {
  margin-top: 10px;
}

/* Der WordPress-Adminbalken und der eigene Portalkopf bleiben ausdrücklich sichtbar. */
body.kfzrp-portal-page #wpadminbar {
  display: block !important;
  visibility: visible !important;
}

body.kfzrp-portal-page .kfzrp-header {
  display: flex !important;
  visibility: visible !important;
}

/* 1.8.8: Bestell- und Eingangsdatum platzsparend in einer gemeinsamen Spalte. */
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-order-date {
  width: 112px !important;
}
.kfzrp-portal .kfzrp-order-table th.kfzrp-table-order-date,
.kfzrp-portal .kfzrp-order-table td.kfzrp-table-order-date {
  width: 112px !important;
  max-width: 112px !important;
}
.kfzrp-portal .kfzrp-order-table td.kfzrp-table-order-date {
  white-space: normal !important;
  font-variant-numeric: tabular-nums;
}
.kfzrp-portal .kfzrp-date-stack {
  display: block;
  line-height: 1.15;
}
.kfzrp-portal .kfzrp-date-stack + .kfzrp-date-stack {
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid rgba(20, 93, 160, 0.14);
}
.kfzrp-portal .kfzrp-date-stack small {
  display: block;
  margin: 0 0 1px;
  color: #64748b;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.1;
}
.kfzrp-portal .kfzrp-date-stack strong {
  display: block;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.2;
}
.kfzrp-portal .kfzrp-order-table th.kfzrp-table-order-date .kfzrp-sort-button {
  width: 100%;
  padding-left: 3px !important;
  padding-right: 3px !important;
  font-size: 10px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  justify-content: center;
}


/* 1.8.9: Fehlerbeschreibung etwas breiter, Produktspalte kompakter. */
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-products {
  width: 255px !important;
}
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-fault {
  width: 185px !important;
}
.kfzrp-portal .kfzrp-order-table th.kfzrp-table-fault,
.kfzrp-portal .kfzrp-order-table td.kfzrp-table-fault {
  min-width: 185px !important;
  max-width: 185px !important;
}
.kfzrp-portal .kfzrp-order-table th.kfzrp-table-products,
.kfzrp-portal .kfzrp-order-table td.kfzrp-table-products {
  max-width: 255px !important;
}


/* Version 1.9.2: Dokumentaktionen rechts neben der Auftragsübersicht. */
.kfzrp-order-summary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, .95fr);
  gap: 16px;
  align-items: start;
  margin: 0 0 14px;
}

.kfzrp-order-summary-main,
.kfzrp-order-summary-actions {
  min-width: 0;
}

.kfzrp-order-summary-layout .kfzrp-order-overview-clean {
  margin-bottom: 0;
}

.kfzrp-order-summary-actions .kfzrp-document-action-bar {
  grid-template-columns: 1fr;
  margin: 0;
}

.kfzrp-order-summary-actions .kfzrp-document-action-group {
  padding: 12px;
}

.kfzrp-order-summary-actions .kfzrp-document-action-group > strong {
  margin-bottom: 2px;
}

@media (max-width: 1180px) {
  .kfzrp-order-summary-layout {
    grid-template-columns: 1fr;
  }

  .kfzrp-order-summary-actions .kfzrp-document-action-bar {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }
}

@media (max-width: 680px) {
  .kfzrp-order-summary-actions .kfzrp-document-action-bar {
    grid-template-columns: 1fr;
  }
}


/* Version 1.9.3: kompletter Aktionsbereich als rechte Spalte neben der Auftragsübersicht. */
.kfzrp-order-summary-layout {
  grid-template-columns: minmax(0, 1fr) minmax(390px, 440px);
  gap: 18px;
}

.kfzrp-order-summary-actions {
  display: grid;
  gap: 10px;
  align-content: start;
}

.kfzrp-order-summary-actions .kfzrp-order-sections-side {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kfzrp-order-summary-actions .kfzrp-order-sections-side a {
  width: 100%;
  min-width: 0;
  padding-left: 10px;
  padding-right: 10px;
}

.kfzrp-order-summary-actions .kfzrp-document-action-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
}

.kfzrp-order-summary-actions .kfzrp-document-action-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 7px;
  align-items: center;
  padding: 10px 11px;
}

.kfzrp-order-summary-actions .kfzrp-document-action-group > strong {
  grid-column: 1;
  margin: 0;
}

.kfzrp-order-summary-actions .kfzrp-document-action-group > a,
.kfzrp-order-summary-actions .kfzrp-document-action-group > form {
  width: auto;
}

@media (max-width: 1180px) {
  .kfzrp-order-summary-layout {
    grid-template-columns: 1fr;
  }

  .kfzrp-order-summary-actions .kfzrp-document-action-bar {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }

  .kfzrp-order-summary-actions .kfzrp-document-action-group {
    display: flex;
  }
}

@media (max-width: 680px) {
  .kfzrp-order-summary-actions .kfzrp-order-sections-side,
  .kfzrp-order-summary-actions .kfzrp-document-action-bar {
    grid-template-columns: 1fr;
  }
}


/* Version 1.9.4: Retourenlabel und DHL-Versand direkt in der rechten Aktionsspalte. */
.kfzrp-order-summary-actions .kfzrp-document-action-group-dhl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: stretch;
}

.kfzrp-order-summary-actions .kfzrp-document-action-group-dhl > strong {
  grid-column: 1 / -1;
}

.kfzrp-order-summary-actions .kfzrp-document-action-group-dhl > form,
.kfzrp-order-summary-actions .kfzrp-document-action-group-dhl > .kfzrp-shipping-existing-actions,
.kfzrp-order-summary-actions .kfzrp-document-action-group-dhl > .kfzrp-action-status,
.kfzrp-order-summary-actions .kfzrp-document-action-group-dhl > .kfzrp-action-hint {
  width: 100%;
  grid-column: 1 / -1;
}

.kfzrp-order-summary-actions .kfzrp-document-action-group-return > a {
  justify-self: start;
}

.kfzrp-action-status {
  display: block;
  padding: 7px 9px;
  border-radius: 7px;
  background: #eef6fc;
  color: #304353;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.kfzrp-action-status.is-success {
  background: #eef8f1;
  color: #216438;
}

.kfzrp-action-status.is-error {
  background: #fff0f0;
  color: #9a2b2b;
}

.kfzrp-action-hint {
  display: block;
  color: #667784;
  font-size: 11px;
  line-height: 1.35;
}

.kfzrp-shipping-existing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.kfzrp-compact-shipping-form {
  display: grid !important;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: end;
  margin: 0 !important;
}

.kfzrp-compact-shipping-form .kfzrp-compact-weight {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
}

.kfzrp-compact-shipping-form .kfzrp-compact-weight input {
  width: 100%;
  min-height: 36px;
  margin-top: 4px;
}

.kfzrp-compact-shipping-form .kfzrp-compact-shipped-check {
  align-self: center;
  margin: 0;
  font-size: 11px;
  line-height: 1.3;
}

.kfzrp-compact-shipping-form > .kfzrp-button {
  grid-column: 1 / -1;
  width: 100%;
}

@media (max-width: 680px) {
  .kfzrp-compact-shipping-form {
    grid-template-columns: 1fr;
  }

  .kfzrp-compact-shipping-form > .kfzrp-button {
    grid-column: 1;
  }
}


/* Version 1.9.5: rechte Aktionsspalte mit Dokument-Metadaten und Trackingnummern. */
.kfzrp-order-summary-layout {
  grid-template-columns: minmax(0, 1fr) minmax(420px, 500px);
}

.kfzrp-order-summary-actions {
  position: sticky;
  top: 14px;
}

.kfzrp-order-summary-actions .kfzrp-document-action-group-meta,
.kfzrp-order-summary-actions .kfzrp-document-action-group-dhl {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.kfzrp-document-action-meta {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 1px 0 2px;
}

.kfzrp-document-action-meta-single {
  grid-template-columns: 1fr;
}

.kfzrp-document-action-meta span {
  display: block;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid #dbe3e9;
  border-radius: 7px;
  background: #f7fafc;
}

.kfzrp-document-action-meta small,
.kfzrp-document-action-meta strong {
  display: block;
}

.kfzrp-document-action-meta small {
  margin-bottom: 3px;
  color: #667784;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.kfzrp-document-action-meta strong {
  color: #203240;
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

@media (max-width: 1240px) {
  .kfzrp-order-summary-layout {
    grid-template-columns: 1fr;
  }

  .kfzrp-order-summary-actions {
    position: static;
  }
}

@media (max-width: 680px) {
  .kfzrp-document-action-meta {
    grid-template-columns: 1fr;
  }
}


/* Version 1.9.6: Aktionsbereich in der rechten Seitenfläche neben den Auftragsdaten. */
.kfzrp-order-summary-layout {
  display: block;
  margin-bottom: 14px;
}

.kfzrp-order-summary-main {
  width: 100%;
}

.kfzrp-order-content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 500px);
  gap: 18px;
  align-items: start;
}

.kfzrp-order-content-main,
.kfzrp-order-content-actions {
  min-width: 0;
}

.kfzrp-order-content-actions {
  position: sticky;
  top: 14px;
  align-self: start;
}

.kfzrp-order-content-actions .kfzrp-document-action-bar {
  margin: 0;
}

@media (max-width: 1240px) {
  .kfzrp-order-content-layout {
    grid-template-columns: 1fr;
  }

  .kfzrp-order-content-actions {
    position: static;
  }
}


/* Version 1.9.7: Auftragsübersicht in Originalbreite + separate rechte Aktionsspalte. */
.kfzrp-portal.kfzrp-portal-wide-order-edit {
  width: calc(100vw - 32px) !important;
  max-width: calc(100vw - 32px) !important;
  margin-left: calc(50% - 50vw + 16px) !important;
  margin-right: calc(50% - 50vw + 16px) !important;
  min-width: 0 !important;
}

.kfzrp-order-workspace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1320px) minmax(430px, 500px);
  gap: 20px;
  align-items: start;
  justify-content: space-between;
}

.kfzrp-order-workspace-main {
  width: 100%;
  min-width: 0;
  max-width: 1320px;
}

.kfzrp-order-workspace-main .kfzrp-order-summary-layout {
  display: block;
  width: 100%;
  margin: 0 0 14px;
}

.kfzrp-order-workspace-main .kfzrp-order-overview-clean {
  width: 100%;
  margin-bottom: 0;
}

.kfzrp-order-workspace-actions {
  position: sticky;
  top: 14px;
  min-width: 0;
  align-self: start;
}

.kfzrp-order-workspace-actions .kfzrp-document-action-bar {
  margin: 0;
}

/* Die in 1.9.6 verwendete Teilung unterhalb der Übersicht wird nicht mehr benutzt. */
.kfzrp-order-content-layout {
  display: block;
}

@media (max-width: 1810px) {
  .kfzrp-order-workspace-layout {
    grid-template-columns: 1fr;
  }

  .kfzrp-order-workspace-main {
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
  }

  .kfzrp-order-workspace-actions {
    position: static;
    width: 100%;
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
  }

  .kfzrp-order-workspace-actions .kfzrp-document-action-bar {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

@media (max-width: 760px) {
  .kfzrp-portal.kfzrp-portal-wide-order-edit {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    margin-left: calc(50% - 50vw + 8px) !important;
    margin-right: calc(50% - 50vw + 8px) !important;
  }

  .kfzrp-order-workspace-actions .kfzrp-document-action-bar {
    grid-template-columns: 1fr;
  }
}


/* Version 1.9.8: Aktionsspalte direkt neben der Übersicht, früher Responsive-Umbruch und kompaktere Darstellung. */
.kfzrp-portal.kfzrp-portal-wide-order-edit {
  width: calc(100vw - 24px) !important;
  max-width: calc(100vw - 24px) !important;
  margin-left: calc(50% - 50vw + 12px) !important;
  margin-right: calc(50% - 50vw + 12px) !important;
}

.kfzrp-order-workspace-layout {
  display: grid;
  grid-template-columns: minmax(760px, 1320px) minmax(360px, 420px);
  grid-template-areas:
    "summary actions"
    "form actions";
  column-gap: 14px;
  row-gap: 14px;
  align-items: start;
  justify-content: start;
  width: max-content;
  max-width: 100%;
}

.kfzrp-order-workspace-main {
  display: contents;
}

.kfzrp-order-workspace-main .kfzrp-order-summary-layout {
  grid-area: summary;
  width: 100%;
  max-width: 1320px;
  margin: 0;
}

.kfzrp-order-workspace-main > .kfzrp-form {
  grid-area: form;
  width: 100%;
  max-width: 1320px;
  min-width: 0;
}

.kfzrp-order-workspace-actions {
  grid-area: actions;
  position: sticky;
  top: 10px;
  width: 100%;
  min-width: 0;
  align-self: start;
}

/* Drei Bedienfelder: Bestellstatus | Zahlungsstatus | Zahlungsart. */
.kfzrp-order-control-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
}

/* Rechte Spalte ruhiger und kompakter. */
.kfzrp-order-workspace-actions .kfzrp-document-action-bar {
  gap: 6px;
}

.kfzrp-order-workspace-actions .kfzrp-document-action-group {
  padding: 8px 9px;
  gap: 5px 6px;
  border-radius: 8px;
}

.kfzrp-order-workspace-actions .kfzrp-document-action-group > strong {
  font-size: 12px;
  line-height: 1.25;
}

.kfzrp-order-workspace-actions .kfzrp-document-action-meta {
  gap: 5px;
  margin: 0;
}

.kfzrp-order-workspace-actions .kfzrp-document-action-meta span {
  padding: 5px 7px;
  border-radius: 6px;
}

.kfzrp-order-workspace-actions .kfzrp-document-action-meta small {
  margin-bottom: 1px;
  font-size: 9px;
}

.kfzrp-order-workspace-actions .kfzrp-document-action-meta strong {
  font-size: 11px;
}

.kfzrp-order-workspace-actions .kfzrp-button-small {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 11px;
  line-height: 1.2;
}

.kfzrp-order-workspace-actions .kfzrp-action-status,
.kfzrp-order-workspace-actions .kfzrp-action-hint {
  padding-top: 5px;
  padding-bottom: 5px;
  font-size: 10px;
}

.kfzrp-order-workspace-actions .kfzrp-compact-shipping-form {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 6px 8px;
}

.kfzrp-order-workspace-actions .kfzrp-compact-shipping-form .kfzrp-compact-weight input {
  min-height: 32px;
}

/* Bei weniger Platz: Aktionen direkt NACH der Übersicht und VOR den Auftragsfeldern. */
@media (max-width: 1580px) {
  .kfzrp-order-workspace-layout {
    grid-template-columns: minmax(0, 1320px);
    grid-template-areas:
      "summary"
      "actions"
      "form";
    width: 100%;
    max-width: 1320px;
  }

  .kfzrp-order-workspace-actions {
    position: static;
    max-width: 1320px;
  }

  .kfzrp-order-workspace-actions .kfzrp-document-action-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kfzrp-order-workspace-actions .kfzrp-document-action-group,
  .kfzrp-order-workspace-actions .kfzrp-document-action-group-meta,
  .kfzrp-order-workspace-actions .kfzrp-document-action-group-dhl {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .kfzrp-order-workspace-actions .kfzrp-document-action-meta,
  .kfzrp-order-workspace-actions .kfzrp-document-action-group-dhl > form,
  .kfzrp-order-workspace-actions .kfzrp-document-action-group-dhl > .kfzrp-shipping-existing-actions,
  .kfzrp-order-workspace-actions .kfzrp-document-action-group-dhl > .kfzrp-action-status,
  .kfzrp-order-workspace-actions .kfzrp-document-action-group-dhl > .kfzrp-action-hint {
    flex: 1 0 100%;
    width: 100%;
  }
}

@media (max-width: 980px) {
  .kfzrp-order-workspace-actions .kfzrp-document-action-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kfzrp-order-control-grid {
    grid-template-columns: 1fr 1fr;
  }

  .kfzrp-order-control-grid > label:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .kfzrp-portal.kfzrp-portal-wide-order-edit {
    width: calc(100vw - 12px) !important;
    max-width: calc(100vw - 12px) !important;
    margin-left: calc(50% - 50vw + 6px) !important;
    margin-right: calc(50% - 50vw + 6px) !important;
  }

  .kfzrp-order-workspace-actions .kfzrp-document-action-bar,
  .kfzrp-order-control-grid {
    grid-template-columns: 1fr;
  }

  .kfzrp-order-control-grid > label:first-child {
    grid-column: auto;
  }
}


/* Version 1.9.9: Übersichtskacheln in einer Reihe, echtes Auftragsdatum und klickbare Sendungsnummern. */
.kfzrp-order-workspace-main .kfzrp-order-overview-clean {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-stat {
  min-width: 0;
  min-height: 82px;
  padding: 11px 10px 10px 13px;
}

.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-stat span {
  font-size: 10px;
  line-height: 1.2;
}

.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-stat strong {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.kfzrp-tracking-number-link {
  color: #0d5f9f !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

.kfzrp-tracking-show-link {
  display: inline-block;
  margin-top: 3px;
  color: #0d5f9f !important;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
}

.kfzrp-tracking-show-link:hover,
.kfzrp-tracking-show-link:focus-visible,
.kfzrp-tracking-number-link:hover,
.kfzrp-tracking-number-link:focus-visible {
  text-decoration: underline !important;
}

@media (max-width: 1180px) {
  .kfzrp-order-workspace-main .kfzrp-order-overview-clean {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .kfzrp-order-workspace-main .kfzrp-order-overview-clean {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 440px) {
  .kfzrp-order-workspace-main .kfzrp-order-overview-clean {
    grid-template-columns: 1fr;
  }
}


/* Version 1.10.1: druckbarer DHL-Label-Link. */
.kfzrp-button-print-label {
  font-weight: 800;
}


/* Version 1.10.2: gesamtes Mitarbeiterportal auf volle Browserbreite. */
body.kfzrp-portal-page .kfzrp-portal,
.kfzrp-portal,
.kfzrp-portal.kfzrp-portal-wide-orders,
.kfzrp-portal.kfzrp-portal-wide-order-edit {
  width: calc(100vw - 24px) !important;
  max-width: calc(100vw - 24px) !important;
  margin-left: calc(50% - 50vw + 12px) !important;
  margin-right: calc(50% - 50vw + 12px) !important;
  min-width: 0 !important;
}

/* Alle Hauptbereiche dürfen die neue Portalbreite vollständig nutzen. */
.kfzrp-portal > .kfzrp-toolbar,
.kfzrp-portal > .kfzrp-card,
.kfzrp-portal > .kfzrp-form,
.kfzrp-portal > .kfzrp-orders-toolbar,
.kfzrp-portal > .kfzrp-order-table-wrap,
.kfzrp-portal > .kfzrp-product-layout,
.kfzrp-portal > .kfzrp-settings-layout,
.kfzrp-portal > .kfzrp-customer-layout,
.kfzrp-portal > .kfzrp-analytics-section,
.kfzrp-portal > .kfzrp-document-designer {
  width: 100%;
  max-width: none;
}

@media (max-width: 760px) {
  body.kfzrp-portal-page .kfzrp-portal,
  .kfzrp-portal,
  .kfzrp-portal.kfzrp-portal-wide-orders,
  .kfzrp-portal.kfzrp-portal-wide-order-edit {
    width: calc(100vw - 12px) !important;
    max-width: calc(100vw - 12px) !important;
    margin-left: calc(50% - 50vw + 6px) !important;
    margin-right: calc(50% - 50vw + 6px) !important;
  }
}


/* Version 1.10.4: deutlich unterscheidbare Hauptabschnitte in der Bestellansicht. */
.kfzrp-order-section {
  --kfzrp-order-section-accent: #145da0;
  --kfzrp-order-section-soft: #eef6fc;
  position: relative;
  overflow: hidden;
  border-width: 1px 1px 1px 4px;
  border-left-color: var(--kfzrp-order-section-accent);
  box-shadow: 0 3px 12px rgba(23, 33, 43, .06);
}

.kfzrp-order-section-contact {
  --kfzrp-order-section-accent: #145da0;
  --kfzrp-order-section-soft: #eef6fc;
}

.kfzrp-order-section-identification {
  --kfzrp-order-section-accent: #28766b;
  --kfzrp-order-section-soft: #eef8f5;
}

.kfzrp-order-section-workshop {
  --kfzrp-order-section-accent: #a46616;
  --kfzrp-order-section-soft: #fff7e9;
}

.kfzrp-order-section-scope {
  --kfzrp-order-section-accent: #654aa5;
  --kfzrp-order-section-soft: #f5f1fb;
}

.kfzrp-order-section > .kfzrp-section-heading {
  position: relative;
  margin: -22px -22px 18px;
  padding: 14px 18px 13px;
  border-bottom: 1px solid color-mix(in srgb, var(--kfzrp-order-section-accent) 22%, #dfe5ea);
  background: linear-gradient(90deg, var(--kfzrp-order-section-soft), #fff 72%);
}

.kfzrp-order-section > .kfzrp-section-heading::before {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-right: 2px;
  border-radius: 8px;
  background: var(--kfzrp-order-section-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.kfzrp-order-section-contact > .kfzrp-section-heading::before { content: "01"; }
.kfzrp-order-section-identification > .kfzrp-section-heading::before { content: "02"; }
.kfzrp-order-section-workshop > .kfzrp-section-heading::before { content: "03"; }
.kfzrp-order-section-scope > .kfzrp-section-heading::before { content: "04"; }

.kfzrp-order-section > .kfzrp-section-heading > div {
  flex: 1 1 auto;
  min-width: 0;
}

.kfzrp-order-section > .kfzrp-section-heading .kfzrp-section-kicker {
  margin-bottom: 1px;
  color: var(--kfzrp-order-section-accent);
  font-size: 10px;
  letter-spacing: .11em;
}

.kfzrp-order-section > .kfzrp-section-heading h4 {
  color: #142331;
  font-size: 1.12rem;
  font-weight: 800;
}

.kfzrp-order-section-scope > .kfzrp-section-heading .kfzrp-count-badge {
  border: 1px solid color-mix(in srgb, var(--kfzrp-order-section-accent) 28%, #dfe5ea);
  background: #fff;
  color: var(--kfzrp-order-section-accent);
}

@media (max-width: 680px) {
  .kfzrp-order-section > .kfzrp-section-heading {
    margin: -16px -16px 16px;
    padding: 12px 14px;
  }

  .kfzrp-order-section > .kfzrp-section-heading::before {
    width: 28px;
    height: 28px;
  }
}


/* Version 1.10.5: Auftragsverwaltung rechts klarer gliedern und unterscheiden. */
.kfzrp-order-workspace-actions .kfzrp-workflow-section {
  --kfzrp-workflow-accent: #145da0;
  --kfzrp-workflow-soft: #eef6fc;
  position: relative;
  overflow: hidden;
  border-width: 1px 1px 1px 4px;
  border-left-color: var(--kfzrp-workflow-accent);
  background: #fff;
  box-shadow: 0 3px 10px rgba(23, 33, 43, .055);
}

.kfzrp-order-workspace-actions .kfzrp-workflow-section-order {
  --kfzrp-workflow-accent: #145da0;
  --kfzrp-workflow-soft: #eef6fc;
}

.kfzrp-order-workspace-actions .kfzrp-workflow-section-quote {
  --kfzrp-workflow-accent: #a46616;
  --kfzrp-workflow-soft: #fff7e9;
}

.kfzrp-order-workspace-actions .kfzrp-workflow-section-delivery {
  --kfzrp-workflow-accent: #28766b;
  --kfzrp-workflow-soft: #eef8f5;
}

.kfzrp-order-workspace-actions .kfzrp-workflow-section-invoice {
  --kfzrp-workflow-accent: #654aa5;
  --kfzrp-workflow-soft: #f5f1fb;
}

.kfzrp-order-workspace-actions .kfzrp-workflow-section-return {
  --kfzrp-workflow-accent: #a34f6f;
  --kfzrp-workflow-soft: #fcf1f5;
}

.kfzrp-order-workspace-actions .kfzrp-workflow-section-shipping {
  --kfzrp-workflow-accent: #2e6f9e;
  --kfzrp-workflow-soft: #edf6fb;
}

.kfzrp-order-workspace-actions .kfzrp-workflow-section > strong:first-child {
  position: relative;
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  min-height: 32px;
  margin: -8px -9px 2px;
  padding: 6px 9px 6px 42px;
  border-bottom: 1px solid color-mix(in srgb, var(--kfzrp-workflow-accent) 22%, #dfe5ea);
  background: linear-gradient(90deg, var(--kfzrp-workflow-soft), #fff 82%);
  color: #162735;
  font-size: 12px;
  font-weight: 900;
}

.kfzrp-order-workspace-actions .kfzrp-workflow-section > strong:first-child::before {
  position: absolute;
  left: 8px;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 22px;
  transform: translateY(-50%);
  border-radius: 6px;
  background: var(--kfzrp-workflow-accent);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.kfzrp-order-workspace-actions .kfzrp-workflow-section-order > strong:first-child::before { content: "01"; }
.kfzrp-order-workspace-actions .kfzrp-workflow-section-quote > strong:first-child::before { content: "02"; }
.kfzrp-order-workspace-actions .kfzrp-workflow-section-delivery > strong:first-child::before { content: "03"; }
.kfzrp-order-workspace-actions .kfzrp-workflow-section-invoice > strong:first-child::before { content: "04"; }
.kfzrp-order-workspace-actions .kfzrp-workflow-section-return > strong:first-child::before { content: "05"; }
.kfzrp-order-workspace-actions .kfzrp-workflow-section-shipping > strong:first-child::before { content: "06"; }

.kfzrp-order-workspace-actions .kfzrp-workflow-section .kfzrp-document-action-meta span {
  border-color: color-mix(in srgb, var(--kfzrp-workflow-accent) 15%, #dbe3e9);
  background: color-mix(in srgb, var(--kfzrp-workflow-soft) 72%, #fff);
}

.kfzrp-order-workspace-actions .kfzrp-workflow-section .kfzrp-document-action-meta small {
  color: var(--kfzrp-workflow-accent);
}

@media (max-width: 1580px) {
  .kfzrp-order-workspace-actions .kfzrp-workflow-section > strong:first-child {
    flex: 1 0 100%;
    width: calc(100% + 18px);
  }
}


/* Version 1.10.20: Zahlungsstatus in Bestell- und Auftragsübersicht auf einen Blick erkennbar. */
.kfzrp-payment-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  padding: 4px 7px;
  border: 1px solid #e1bd76;
  border-radius: 999px;
  background: #fff8e9;
  color: #845710;
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.kfzrp-payment-badge.kfzrp-payment-status-paid {
  border-color: #8fc8a0;
  background: #eaf8ee;
  color: #176331;
}

.kfzrp-order-table tbody tr.kfzrp-payment-status-paid > td:first-child {
  box-shadow: inset 4px 0 0 #2f8f4e;
}

.kfzrp-status-row-payment {
  border-color: #e6c98d;
  border-left: 4px solid #c88a22;
  background: #fff9ec;
}

.kfzrp-status-row-payment .kfzrp-status-value {
  color: #81550d;
}

.kfzrp-status-row-payment .kfzrp-status-value::before {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: #c88a22;
  content: "";
}

.kfzrp-status-row-payment.kfzrp-payment-status-paid {
  border-color: #9fd3ad;
  border-left-color: #2f8f4e;
  background: #eef9f1;
}

.kfzrp-status-row-payment.kfzrp-payment-status-paid .kfzrp-status-value {
  color: #176331;
}

.kfzrp-status-row-payment.kfzrp-payment-status-paid .kfzrp-status-value::before {
  background: #2f8f4e;
}

/* Die Zahlungsstatus-Kachel im geöffneten Auftrag darf bewusst deutlicher als die übrigen Statuskarten sein. */
.kfzrp-overview-payment-status.kfzrp-payment-status-open {
  border-color: #e6c98d !important;
  background: #fff9ec !important;
  box-shadow: inset 0 0 0 1px rgba(200, 138, 34, .05);
  --kfzrp-status-accent: #c88a22;
}

.kfzrp-overview-payment-status.kfzrp-payment-status-open > strong {
  color: #81550d !important;
}

.kfzrp-overview-payment-status.kfzrp-payment-status-paid {
  border-color: #9fd3ad !important;
  background: #eef9f1 !important;
  box-shadow: inset 0 0 0 1px rgba(47, 143, 78, .06);
  --kfzrp-status-accent: #2f8f4e;
}

.kfzrp-overview-payment-status.kfzrp-payment-status-paid > strong {
  color: #176331 !important;
}

.kfzrp-payment-status-select.kfzrp-payment-status-open {
  border-left: 4px solid #c88a22 !important;
  background: #fffdf7 !important;
}

.kfzrp-payment-status-select.kfzrp-payment-status-paid {
  border-left: 4px solid #2f8f4e !important;
  background: #f3fbf5 !important;
}

/* Version 1.10.22: Zahlungsfilter in der Bestellübersicht. */
.kfzrp-order-filter {
  grid-template-columns: minmax(340px, 2.4fr) minmax(180px, .8fr) minmax(160px, .7fr) auto;
}

@media (max-width: 1150px) {
  .kfzrp-order-filter {
    grid-template-columns: minmax(260px, 1.7fr) repeat(2, minmax(160px, .8fr));
  }

  .kfzrp-order-filter .kfzrp-filter-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .kfzrp-order-filter {
    grid-template-columns: 1fr;
  }

  .kfzrp-order-filter .kfzrp-filter-actions {
    grid-column: auto;
  }
}


/* Version 1.10.25: Statuskacheln direkt anklickbar und bearbeitbar. */
.kfzrp-overview-stat-editable {
  position: relative;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.kfzrp-overview-stat-editable:hover,
.kfzrp-overview-stat-editable:focus-within {
  border-color: #80acd0;
  box-shadow: 0 3px 12px rgba(29, 87, 132, .12);
  transform: translateY(-1px);
}

.kfzrp-overview-stat-editable .kfzrp-overview-edit-hint {
  display: block;
  margin-top: 4px;
  color: #6c7d8b;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.1;
}

.kfzrp-overview-stat-editable::after {
  content: "✎";
  position: absolute;
  top: 7px;
  right: 8px;
  color: #6f8495;
  font-size: 11px;
  pointer-events: none;
}

.kfzrp-overview-stat-select {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  cursor: pointer;
}

.kfzrp-overview-stat-editable.is-saving {
  opacity: .65;
  pointer-events: none;
}


/* Version 1.10.26: kompaktere Auftragsverwaltung – Nummern und Daten direkt in der Kopfzeile. */
.kfzrp-order-workspace-actions .kfzrp-workflow-section > strong:first-child {
  gap: 7px;
  min-height: 28px;
  margin-bottom: 0;
  padding-top: 4px;
  padding-bottom: 4px;
  white-space: nowrap;
}

.kfzrp-order-workspace-actions .kfzrp-workflow-title-meta {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  margin-left: auto;
  color: #50616e;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.kfzrp-order-workspace-actions .kfzrp-workflow-title-meta::before {
  content: "·";
  margin-right: 7px;
  color: var(--kfzrp-workflow-accent);
  font-weight: 900;
}

.kfzrp-order-workspace-actions .kfzrp-workflow-title-link {
  color: var(--kfzrp-workflow-accent) !important;
  font-weight: 850;
  text-decoration: underline !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 2px;
}

.kfzrp-order-workspace-actions .kfzrp-document-action-group {
  padding-top: 7px;
  padding-bottom: 7px;
}

@media (max-width: 1580px) {
  .kfzrp-order-workspace-actions .kfzrp-workflow-section > strong:first-child {
    flex: 1 0 100%;
  }
}

@media (max-width: 680px) {
  .kfzrp-order-workspace-actions .kfzrp-workflow-section > strong:first-child {
    flex-wrap: wrap;
    white-space: normal;
  }

  .kfzrp-order-workspace-actions .kfzrp-workflow-title-meta {
    width: 100%;
    margin-left: 0;
    padding-left: 0;
    text-align: left;
    white-space: normal;
  }
}


/* Version 1.10.27: gemeinsamer Auftragsstatus und visueller E-Mail-Editor. */
.kfzrp-wc-status-kfz-received {
  --kfzrp-status-bg: #edf6fd; --kfzrp-status-border: #aacde7; --kfzrp-status-accent: #2476b1; --kfzrp-status-text: #205f8d; --kfzrp-status-strong: #174f79;
}
.kfzrp-wc-status-kfz-diagnosis {
  --kfzrp-status-bg: #f4f1fb; --kfzrp-status-border: #c5b8e1; --kfzrp-status-accent: #6c4b9f; --kfzrp-status-text: #5d3d98; --kfzrp-status-strong: #4f3287;
}
.kfzrp-wc-status-kfz-quote {
  --kfzrp-status-bg: #fff8e5; --kfzrp-status-border: #e6ca82; --kfzrp-status-accent: #b97b00; --kfzrp-status-text: #775100; --kfzrp-status-strong: #684700;
}
.kfzrp-wc-status-kfz-approval {
  --kfzrp-status-bg: #fff3e9; --kfzrp-status-border: #e7ba94; --kfzrp-status-accent: #c76318; --kfzrp-status-text: #914812; --kfzrp-status-strong: #803b0d;
}
.kfzrp-wc-status-kfz-repair {
  --kfzrp-status-bg: #eaf7f9; --kfzrp-status-border: #9acbd3; --kfzrp-status-accent: #177d8e; --kfzrp-status-text: #146a7a; --kfzrp-status-strong: #0e5968;
}
.kfzrp-wc-status-kfz-testing {
  --kfzrp-status-bg: #f0f2fc; --kfzrp-status-border: #aeb8df; --kfzrp-status-accent: #485dab; --kfzrp-status-text: #3d50a1; --kfzrp-status-strong: #31448d;
}
.kfzrp-wc-status-kfz-ready {
  --kfzrp-status-bg: #eef8f1; --kfzrp-status-border: #a7cfb4; --kfzrp-status-accent: #287a46; --kfzrp-status-text: #246b40; --kfzrp-status-strong: #1d6038;
}
.kfzrp-wc-status-kfz-returned {
  --kfzrp-status-bg: #edf8f7; --kfzrp-status-border: #9dcac7; --kfzrp-status-accent: #19756f; --kfzrp-status-text: #176b67; --kfzrp-status-strong: #105c58;
}
.kfzrp-wc-status-kfz-rejected {
  --kfzrp-status-bg: #fcf1f2; --kfzrp-status-border: #dfacb0; --kfzrp-status-accent: #b63642; --kfzrp-status-text: #97303a; --kfzrp-status-strong: #862630;
}

.kfzrp-table-status-unified {
  display: flex;
  align-items: center;
  min-height: 30px;
}
.kfzrp-table-status-unified .kfzrp-status-value {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--kfzrp-status-border, #ccd5dc);
  border-left: 4px solid var(--kfzrp-status-accent, #77838c);
  border-radius: 7px;
  background: var(--kfzrp-status-bg, #f5f6f7);
  color: var(--kfzrp-status-strong, #48545d);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.kfzrp-email-template-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr);
  gap: 16px;
  padding: 15px;
  border-top: 1px solid #e0e7ec;
}
.kfzrp-email-template-editor-grid .kfzrp-email-template-fields {
  padding: 0;
  border-top: 0;
}
.kfzrp-email-editor-pane {
  min-width: 0;
}
.kfzrp-email-format-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 9px;
  border: 1px solid #d8e2e9;
  border-radius: 8px;
  background: #f7fafc;
}
.kfzrp-email-format-toolbar strong {
  margin-right: 4px;
  color: #31495a;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.kfzrp-email-format-toolbar button,
.kfzrp-email-placeholders button {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #c9d6df;
  border-radius: 6px;
  background: #fff;
  color: #24465f;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.kfzrp-email-format-toolbar button:hover,
.kfzrp-email-placeholders button:hover {
  border-color: #6ea4c9;
  background: #eef6fc;
}
.kfzrp-email-placeholders {
  padding: 10px;
  border: 1px solid #d8e2e9;
  border-radius: 8px;
  background: #fbfdfe;
}
.kfzrp-email-placeholders > strong {
  display: block;
  margin-bottom: 7px;
  color: #31495a;
  font-size: 11px;
}
.kfzrp-email-placeholders > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.kfzrp-email-placeholders code {
  font-size: 10px;
}
.kfzrp-email-preview-pane {
  min-width: 0;
  align-self: start;
  position: sticky;
  top: 14px;
  overflow: hidden;
  border: 1px solid #ccd9e2;
  border-radius: 10px;
  background: #eef2f5;
}
.kfzrp-email-preview-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-bottom: 1px solid #d4dee5;
  background: #fff;
}
.kfzrp-email-preview-label strong {
  color: #173f5c;
  font-size: 12px;
}
.kfzrp-email-preview-label span {
  color: #71808b;
  font-size: 10px;
}
.kfzrp-email-preview-frame {
  display: block;
  width: 100%;
  height: 430px;
  border: 0;
  background: #f3f4f6;
}

@media (max-width: 1050px) {
  .kfzrp-email-template-editor-grid {
    grid-template-columns: 1fr;
  }
  .kfzrp-email-preview-pane {
    position: static;
  }
}

.kfzrp-email-settings-form .kfzrp-email-template-card > summary small,
.kfzrp-email-settings-form .kfzrp-settings-section .kfzrp-section-heading > p {
  display: block !important;
}


/* Version 1.10.29: aufgeräumte Auftragsansicht und erweiterter E-Mail-Editor. */
.kfzrp-email-template-fields textarea[data-kfzrp-email-body] {
  min-height: 300px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.5;
}
.kfzrp-email-format-toolbar {
  position: sticky;
  top: 8px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(30,55,72,.06);
}
.kfzrp-email-preview-frame { height: 500px; }
@media (max-width: 1050px) {
  .kfzrp-email-format-toolbar { position: static; }
}


/* Version 1.10.44: farblich stärker differenzierte Kachelränder im Auftragskopf. */
.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-stat {
  border: 2px solid #b8c8d6;
  border-left-width: 5px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(24, 54, 79, .05);
}

.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-stat::before {
  width: 5px;
}

.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-status {
  border-color: #8bb3d2;
}
.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-status::before {
  background: #2c79b8;
}

.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-job {
  border-color: #8fb3da;
}
.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-job::before {
  background: #1f6eb4;
}

.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-invoice {
  border-color: #8f9bb3;
}
.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-invoice::before {
  background: #4c5f78;
}

.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-payment-status {
  border-color: #8fc49a;
}
.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-payment-status::before {
  background: #2f9142;
}

.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-payment {
  border-color: #b6a0d7;
}
.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-payment::before {
  background: #7550b3;
}

.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-date {
  border-color: #9fb8d8;
}
.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-date::before {
  background: #3a6ea5;
}

.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-marketplace {
  border-color: #98b8c1;
}
.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-marketplace::before {
  background: #417286;
}

.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-stat-editable:hover,
.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-stat-editable:focus-within {
  box-shadow: 0 4px 14px rgba(29, 87, 132, .14);
}

.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-status-colored {
  border-left-width: 5px !important;
}


/* Version 1.10.45: Fahrzeug-/Werkstattbereiche wieder sichtbar und auf-/zuklappbar. */
.kfzrp-order-section-collapsible > .kfzrp-section-toggle {
  cursor: pointer;
  user-select: none;
  transition: background-color .15s ease, border-color .15s ease;
}

.kfzrp-order-section-collapsible > .kfzrp-section-toggle:hover,
.kfzrp-order-section-collapsible > .kfzrp-section-toggle:focus-visible {
  outline: none;
  filter: saturate(1.08);
}

.kfzrp-section-toggle-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-left: auto;
  border: 1px solid color-mix(in srgb, var(--kfzrp-order-section-accent) 35%, #dfe5ea);
  border-radius: 8px;
  background: #fff;
  color: var(--kfzrp-order-section-accent);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  transition: transform .16s ease;
}

.kfzrp-order-section-collapsible.is-collapsed .kfzrp-section-toggle-icon {
  transform: rotate(180deg);
}

.kfzrp-collapsible-body[hidden] {
  display: none !important;
}

.kfzrp-order-section-collapsible .kfzrp-collapsible-body > .kfzrp-grid {
  margin-top: 0;
}


/* Version 1.10.46: Auftragsstatus in der aufgeklappten Auswahl schneller erkennbar. */
.kfzrp-overview-status .kfzrp-overview-stat-select option.kfzrp-status-option {
  padding: 8px 12px;
  font-weight: 700;
}


/* Version 1.10.47: Statusfarben überall konsistent + Herkunft in der Bestellübersicht. */
.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-status.kfzrp-overview-status-colored {
  border-color: var(--kfzrp-status-border, #b8c8d6) !important;
  background: var(--kfzrp-status-bg, #f5f7f9) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--kfzrp-status-accent, #77838c) 12%, transparent), 0 1px 3px rgba(24,54,79,.05);
}
.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-status.kfzrp-overview-status-colored::before {
  width: 6px !important;
  background: var(--kfzrp-status-accent, #77838c) !important;
}
.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-status.kfzrp-overview-status-colored > span {
  color: var(--kfzrp-status-text, #596975) !important;
}
.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-status.kfzrp-overview-status-colored > strong {
  color: var(--kfzrp-status-strong, #26343f) !important;
}
.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-status.kfzrp-overview-status-colored > strong::before {
  background: var(--kfzrp-status-accent, #77838c) !important;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--kfzrp-status-border, #ccd5dc);
}

.kfzrp-order-table .kfzrp-table-status-unified .kfzrp-status-value {
  gap: 6px;
  border-width: 2px;
  border-left-width: 5px;
  background: var(--kfzrp-status-bg, #f5f6f7);
  color: var(--kfzrp-status-strong, #48545d);
}
.kfzrp-order-table .kfzrp-table-status-unified .kfzrp-status-value::before {
  display: inline-block;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--kfzrp-status-accent, #77838c);
  content: "";
}

.kfzrp-order-source-badge {
  min-width: 0;
  border-width: 1.5px;
}
.kfzrp-order-source-ebay {
  border-color: #8fb9e8;
  background: #edf6ff;
  color: #174f86;
}
.kfzrp-order-source-woo {
  border-color: #b9a3dc;
  background: #f5f0fb;
  color: #5a3789;
}
.kfzrp-order-source-manual {
  border-color: #9cc8aa;
  background: #eef8f1;
  color: #21653b;
}
.kfzrp-order-source-location {
  margin-top: 1px;
  color: #5c6b76 !important;
  font-size: 9px !important;
}

/* Version 1.10.48: visueller E-Mail-Editor, freie DHL-Labels und Mitarbeiterverwaltung. */
.kfzrp-email-body-editor {
  display: grid;
  gap: 8px;
}
.kfzrp-email-editor-mode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.kfzrp-email-editor-mode > strong {
  color: #31495a;
  font-size: 12px;
}
.kfzrp-email-editor-mode > span {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid #cbd8e1;
  border-radius: 7px;
  background: #fff;
}
.kfzrp-email-editor-mode button {
  min-height: 30px;
  padding: 5px 11px;
  border: 0;
  border-right: 1px solid #d9e2e8;
  background: #fff;
  color: #526775;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}
.kfzrp-email-editor-mode button:last-child { border-right: 0; }
.kfzrp-email-editor-mode button.is-active {
  background: #145da0;
  color: #fff;
}
.kfzrp-email-visual-editor,
.kfzrp-email-html-editor {
  width: 100%;
  min-height: 310px;
  padding: 16px;
  border: 1px solid #cbd8e1;
  border-radius: 9px;
  background: #fff;
  color: #263746;
  box-sizing: border-box;
}
.kfzrp-email-visual-editor {
  line-height: 1.55;
  outline: none;
}
.kfzrp-email-visual-editor:focus {
  border-color: #6b9fc5;
  box-shadow: 0 0 0 3px rgba(20,93,160,.09);
}
.kfzrp-email-html-editor {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  line-height: 1.5;
}
.kfzrp-email-visual-editor h1,
.kfzrp-email-visual-editor h2,
.kfzrp-email-visual-editor h3 { margin-top: 0; }
.kfzrp-email-visual-editor p { margin: 0 0 14px; }

.kfzrp-standalone-shipping-form {
  margin-bottom: 20px;
}
.kfzrp-standalone-history .kfzrp-table td,
.kfzrp-standalone-history .kfzrp-table th {
  vertical-align: middle;
}

.kfzrp-employee-role-help {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.kfzrp-employee-role-help > span {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #d5e0e7;
  border-left: 4px solid #397da9;
  border-radius: 8px;
  background: #f8fbfd;
}
.kfzrp-employee-role-help strong { font-size: 12px; }
.kfzrp-employee-role-help small { color: #657681; font-size: 10px; }
.kfzrp-employee-create {
  margin-bottom: 16px;
  border: 1px solid #d3dee6;
  border-radius: 9px;
  background: #fff;
}
.kfzrp-employee-create > summary {
  padding: 11px 13px;
  cursor: pointer;
  font-weight: 800;
}
.kfzrp-employee-create > form { padding: 0 13px 13px; }
.kfzrp-employee-list { display: grid; gap: 8px; }
.kfzrp-employee-row {
  display: grid;
  grid-template-columns: minmax(150px,.8fr) minmax(160px,1fr) minmax(220px,1.2fr) minmax(210px,1fr) minmax(170px,.9fr) auto;
  gap: 9px;
  align-items: end;
  padding: 10px;
  border: 1px solid #d5e0e7;
  border-radius: 9px;
  background: #fff;
}
.kfzrp-employee-row label { margin: 0; }
.kfzrp-employee-identity {
  display: grid;
  align-self: center;
  gap: 2px;
}
.kfzrp-employee-identity small { color: #6d7d88; font-size: 10px; }

@media (max-width: 1100px) {
  .kfzrp-employee-role-help { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .kfzrp-employee-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 680px) {
  .kfzrp-employee-role-help,
  .kfzrp-employee-row { grid-template-columns: 1fr; }
}




/* Version 1.10.56: Zahlungsstatus in der Bestellübersicht unter dem Gesamtpreis. */
.kfzrp-order-table .kfzrp-table-total-value {
  display: block;
}

.kfzrp-order-table .kfzrp-payment-badge-total {
  display: inline-flex;
  margin-top: 5px;
  margin-left: auto;
}

/* Version 1.10.57: stark eingeschränkte Kunden-/Kiosk-Auftragserfassung. */
.kfzrp-portal-customer-intake {
  width: min(1180px, calc(100vw - 28px));
  max-width: 1180px;
  margin: 0 auto;
}

.kfzrp-customer-intake-header {
  margin-bottom: 18px;
}

.kfzrp-customer-intake-intro {
  margin: 0 0 18px;
  padding: 22px 24px;
  border: 2px solid #a8bfd2;
  border-radius: 14px;
  background: #fff;
}

.kfzrp-customer-intake-intro h3 {
  margin: 4px 0 7px;
  font-size: 24px;
}

.kfzrp-customer-intake-intro p {
  max-width: 860px;
  margin: 0;
  color: #607180;
}

.kfzrp-customer-intake-form {
  display: grid;
  gap: 16px;
}

.kfzrp-customer-intake-form .kfzrp-card {
  border-width: 2px;
}

.kfzrp-customer-intake-form input,
.kfzrp-customer-intake-form select,
.kfzrp-customer-intake-form textarea {
  min-height: 48px;
  font-size: 16px;
}

.kfzrp-customer-intake-form textarea {
  min-height: 120px;
}

.kfzrp-customer-fault-card > label {
  display: grid;
  gap: 7px;
}

.kfzrp-customer-intake-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 2px solid #8fb49a;
  border-radius: 12px;
  background: #f8fcf9;
}

.kfzrp-customer-intake-submit p {
  margin: 0;
  color: #52645a;
  font-size: 13px;
}

.kfzrp-customer-intake-submit .kfzrp-button {
  min-width: 190px;
  min-height: 48px;
  font-size: 15px;
}

@media (max-width: 700px) {
  .kfzrp-portal-customer-intake {
    width: min(100% - 18px, 1180px);
  }
  .kfzrp-customer-intake-intro {
    padding: 18px;
  }
  .kfzrp-customer-intake-submit {
    align-items: stretch;
    flex-direction: column;
  }
  .kfzrp-customer-intake-submit .kfzrp-button {
    width: 100%;
  }
}


/* Version 1.10.58: HSN/TSN kompakt nebeneinander. */
.kfzrp-portal input[name="registration_zu2"],
.kfzrp-portal input[name="registration_zu3"] {
  width: 100%;
  max-width: 180px;
}

.kfzrp-customer-intake-form input[name="registration_zu2"],
.kfzrp-customer-intake-form input[name="registration_zu3"],
.kfzrp-order-section-identification input[name="registration_zu2"],
.kfzrp-order-section-identification input[name="registration_zu3"] {
  min-height: 38px;
}

@media (max-width: 640px) {
  .kfzrp-portal input[name="registration_zu2"],
  .kfzrp-portal input[name="registration_zu3"] {
    max-width: none;
  }
}


/* Version 1.10.59: DHL-Labelstatus kompakt in der Bestellübersicht. */
.kfzrp-label-status-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.kfzrp-label-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  padding: 3px 6px;
  border: 1px solid #b8c5cf;
  border-radius: 999px;
  background: #f4f7f9;
  color: #344955;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.kfzrp-label-status-badge.is-return {
  border-color: #d0ae69;
  background: #fff8e8;
  color: #795714;
}

.kfzrp-label-status-badge.is-shipping {
  border-color: #75ad90;
  background: #edf8f1;
  color: #21613d;
}


/* Version 1.10.61: Aktivitätsverlauf direkt in der Bestellung. */
.kfzrp-order-activity {
  --kfzrp-order-section-accent: #4f6f8d;
  border: 2px solid #b9c9d7;
  border-left: 5px solid #4f6f8d;
}

.kfzrp-order-activity .kfzrp-section-heading {
  padding-bottom: 10px;
}

.kfzrp-activity-intro {
  margin: 3px 0 0;
  color: #74818c;
  font-size: 11px;
  line-height: 1.3;
}

.kfzrp-activity-list {
  display: grid;
  gap: 0;
  max-height: 430px;
  overflow-y: auto;
  padding: 2px 4px 2px 0;
}

.kfzrp-activity-item {
  position: relative;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 8px 10px 2px;
  border-top: 1px solid #e6ebef;
}

.kfzrp-activity-item:first-child {
  border-top: 0;
}

.kfzrp-activity-marker {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border: 2px solid #2f78b7;
  border-radius: 50%;
  background: #e8f3fb;
}

.kfzrp-activity-item.is-system .kfzrp-activity-marker {
  border-color: #929ca5;
  background: #f1f3f4;
}

.kfzrp-activity-item.is-customer-note .kfzrp-activity-marker {
  border-color: #3d9562;
  background: #e8f6ee;
}

.kfzrp-activity-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 3px;
}

.kfzrp-activity-meta strong {
  color: #26343f;
  font-size: 12px;
}

.kfzrp-activity-meta > span:not(.kfzrp-activity-badge) {
  color: #788691;
  font-size: 10px;
  font-weight: 700;
}

.kfzrp-activity-action {
  color: #3c4b56;
  font-size: 12px;
  line-height: 1.45;
}

.kfzrp-activity-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid #9ac8aa;
  border-radius: 999px;
  background: #eff9f3;
  color: #287247;
  font-size: 9px;
  font-weight: 800;
}

.kfzrp-activity-empty {
  margin: 0;
  padding: 12px 0 2px;
}

@media (max-width: 640px) {
  .kfzrp-activity-list {
    max-height: 340px;
  }

  .kfzrp-activity-item {
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 8px;
  }
}


/* Version 1.10.62: Aktivitätsverlauf rechts unter DHL Versand. */
.kfzrp-order-workspace-actions .kfzrp-order-activity {
  margin-top: 12px;
  margin-bottom: 0;
}

.kfzrp-order-workspace-actions .kfzrp-order-activity .kfzrp-section-heading {
  padding: 12px 13px 10px;
}

.kfzrp-order-workspace-actions .kfzrp-order-activity .kfzrp-collapsible-body {
  padding: 0 13px 12px;
}

.kfzrp-order-workspace-actions .kfzrp-activity-list {
  max-height: 360px;
}

.kfzrp-order-workspace-actions .kfzrp-activity-item {
  gap: 8px;
  padding: 9px 4px 9px 0;
}

.kfzrp-order-workspace-actions .kfzrp-activity-action {
  font-size: 11px;
  line-height: 1.4;
}


/* Version 1.10.66: eBay-Wartestatus und anklickbare Schnellstatus-Leiste. */
.kfzrp-wc-status-kfz-waiting {
  --kfzrp-status-bg: #fff5e8;
  --kfzrp-status-border: #e5bd87;
  --kfzrp-status-accent: #d27a20;
  --kfzrp-status-text: #9a5817;
  --kfzrp-status-strong: #81460f;
}

.kfzrp-wc-status-kfz-invoiced {
  --kfzrp-status-bg: #f1f0fb;
  --kfzrp-status-border: #b9b1df;
  --kfzrp-status-accent: #6a59ae;
  --kfzrp-status-text: #5f4f9d;
  --kfzrp-status-strong: #51418b;
}

.kfzrp-quick-status-path {
  position: relative;
  margin: 2px 0 16px;
  padding: 10px 12px 12px;
  border: 1px solid #d8e0e6;
  border-radius: 12px;
  background: #fbfcfd;
}

.kfzrp-quick-status-path-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.kfzrp-quick-status-path-head > span {
  color: #263846;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .025em;
  text-transform: uppercase;
}

.kfzrp-quick-status-path-head > small {
  color: #7c8993;
  font-size: 9px;
  font-weight: 700;
}

.kfzrp-quick-status-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.kfzrp-quick-status-steps::before {
  position: absolute;
  top: 50%;
  right: 4%;
  left: 4%;
  height: 3px;
  border-radius: 999px;
  background: #dce4ea;
  content: "";
  transform: translateY(-50%);
}

.kfzrp-quick-status-step {
  position: relative;
  z-index: 1;
  margin: 0;
}

.kfzrp-quick-status-step button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 50px;
  padding: 8px 9px;
  border: 2px solid #c8d3db;
  border-left: 5px solid var(--kfzrp-step-color, #6d7a84);
  border-radius: 10px;
  background: #fff;
  color: #344550;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(29, 54, 72, .05);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease;
}

.kfzrp-quick-status-step button:hover,
.kfzrp-quick-status-step button:focus-visible {
  border-color: var(--kfzrp-step-color, #6d7a84);
  background: var(--kfzrp-step-bg, #f5f7f8);
  box-shadow: 0 4px 12px rgba(29, 54, 72, .12);
  transform: translateY(-1px);
  outline: none;
}

.kfzrp-quick-status-step.is-current button {
  border-color: var(--kfzrp-step-color, #6d7a84);
  background: var(--kfzrp-step-bg, #f5f7f8);
  color: var(--kfzrp-step-color, #344550);
  box-shadow: 0 4px 12px rgba(29, 54, 72, .12);
}

.kfzrp-quick-status-step.is-complete button {
  border-color: #98c3a8;
  border-left-color: #3d9562;
  background: #f1f9f4;
}

.kfzrp-quick-status-step .kfzrp-quick-status-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--kfzrp-step-bg, #f2f4f5);
  color: var(--kfzrp-step-color, #42515b);
  font-size: 12px;
  font-weight: 900;
}

.kfzrp-quick-status-step.is-current .kfzrp-quick-status-icon,
.kfzrp-quick-status-step.is-complete .kfzrp-quick-status-icon {
  background: #fff;
}

.kfzrp-quick-status-label {
  min-width: 0;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
}

.kfzrp-quick-status-step button small {
  display: block;
  color: currentColor;
  font-size: 8px;
  font-weight: 800;
  opacity: .72;
}

.kfzrp-quick-status-step.needs-invoice:not(.is-current) button::after {
  content: "Rechnung nötig";
  position: absolute;
  right: 6px;
  bottom: 3px;
  color: #8a7a68;
  font-size: 7px;
  font-weight: 800;
}

@media (max-width: 900px) {
  .kfzrp-quick-status-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .kfzrp-quick-status-steps::before {
    display: none;
  }
}

@media (max-width: 560px) {
  .kfzrp-quick-status-path-head {
    display: block;
  }
  .kfzrp-quick-status-path-head > small {
    display: block;
    margin-top: 2px;
  }
  .kfzrp-quick-status-steps {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }
  .kfzrp-quick-status-step button {
    min-height: 46px;
  }
}

/* Version 1.10.67: Direktauftrag nutzt denselben suchbaren Produktpicker wie die Auftragsansicht. */
.kfzrp-direct-order-line-search {
  grid-template-columns: 36px minmax(280px, 1fr) 82px 120px 150px 42px;
  align-items: end;
}

.kfzrp-direct-order-line-search .kfzrp-direct-product-picker {
  min-width: 0;
}

.kfzrp-direct-order-line-search .kfzrp-direct-product-picker > small {
  display: block;
  margin-top: 5px;
  color: #6c7d8b;
  font-size: 10px;
  line-height: 1.25;
}

.kfzrp-direct-order-line-search .kfzrp-product-search-result {
  grid-template-columns: minmax(0, 1fr);
}

.kfzrp-direct-order-line-search .kfzrp-product-search-result-name,
.kfzrp-order-add-unified .kfzrp-product-search-result-name {
  width: 100%;
}

@media (max-width: 1120px) {
  .kfzrp-direct-order-line-search {
    grid-template-columns: 36px minmax(260px, 1fr) 76px 110px 42px;
  }
  .kfzrp-direct-order-line-search > label:nth-of-type(3) {
    grid-column: 2 / span 3;
  }
}

@media (max-width: 760px) {
  .kfzrp-direct-order-line-search {
    grid-template-columns: 34px minmax(0, 1fr) 90px;
  }
  .kfzrp-direct-order-line-search .kfzrp-direct-product-picker {
    grid-column: 2 / -1;
  }
  .kfzrp-direct-order-line-search > label {
    grid-column: 2 / -1;
  }
  .kfzrp-direct-order-line-search .kfzrp-direct-line-remove {
    grid-column: 3;
    justify-self: end;
  }
}


/* Version 1.10.68: Auftragsfortschritt direkt unter den oberen Kacheln. */
.kfzrp-order-summary-main > .kfzrp-quick-status-path {
  width: 100%;
  margin-top: 10px;
  margin-bottom: 0;
}

/* Version 1.10.69: kompakte Pflege des Kunden-Standardrabatts. */
.kfzrp-customer-discount-form {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 170px;
}

.kfzrp-discount-input {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.kfzrp-discount-input input[type="number"] {
  width: 72px;
  min-width: 72px;
  margin: 0;
}

.kfzrp-discount-input > span {
  font-weight: 700;
  color: #526474;
}


/* Version 1.10.70: optionale Shop-Zugangsmail beim Kunden anlegen. */
.kfzrp-shop-access-option {
  grid-column: 1 / -1;
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #c8d7e4;
  border-radius: 9px;
  background: #f7fafc;
}
.kfzrp-shop-access-option input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}
.kfzrp-shop-access-option span,
.kfzrp-shop-access-option small { display: block; }
.kfzrp-shop-access-option small { margin-top: 3px; color: #667785; }

/* Version 1.10.71: Live-Kundensuche beim manuellen Auftrag anlegen. */
.kfzrp-direct-customer-lookup {
  position: relative;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #c8d9e7;
  border-radius: 10px;
  background: #f8fbfd;
}

.kfzrp-direct-customer-lookup > label {
  display: block;
  margin: 0;
  font-weight: 700;
}

.kfzrp-direct-customer-lookup input[type="search"] {
  width: 100%;
  margin-top: 6px;
  background: #fff;
}

.kfzrp-customer-suggestions {
  position: absolute;
  z-index: 30;
  top: calc(100% - 9px);
  left: 14px;
  right: 14px;
  max-height: 310px;
  overflow: auto;
  border: 1px solid #aebfcd;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(24, 54, 79, .18);
}

.kfzrp-customer-suggestion {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #edf1f4;
  background: #fff;
  color: #24333e;
  text-align: left;
  cursor: pointer;
}

.kfzrp-customer-suggestion:last-child {
  border-bottom: 0;
}

.kfzrp-customer-suggestion:hover,
.kfzrp-customer-suggestion:focus-visible {
  background: #edf6fc;
  outline: 0;
}

.kfzrp-customer-suggestion strong,
.kfzrp-customer-suggestion small {
  display: block;
}

.kfzrp-customer-suggestion strong {
  font-size: 13px;
}

.kfzrp-customer-suggestion small {
  margin-top: 2px;
  color: #657684;
  font-size: 11px;
}

.kfzrp-customer-suggestion-empty {
  padding: 11px 12px;
  color: #657684;
  font-size: 12px;
}

.kfzrp-selected-customer-summary {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid #dbe5ec;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 680px) {
  .kfzrp-selected-customer-summary {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* Version 1.10.73: geschützte Verwaltungsaktionen in der rechten Auftragsleiste. */
.kfzrp-order-workspace-actions .kfzrp-danger-zone {
  margin-top: 12px;
  padding: 13px;
  border-width: 2px;
}
.kfzrp-order-workspace-actions .kfzrp-danger-zone .kfzrp-section-heading {
  margin-bottom: 10px;
}
.kfzrp-order-workspace-actions .kfzrp-danger-zone .kfzrp-section-heading p {
  font-size: 11px;
  line-height: 1.35;
}
.kfzrp-order-workspace-actions .kfzrp-delete-order-form {
  grid-template-columns: 1fr;
  gap: 9px;
}
.kfzrp-order-workspace-actions .kfzrp-delete-order-form .kfzrp-button {
  width: 100%;
  min-width: 0;
}
.kfzrp-invoice-cancel-details textarea {
  width: 100%;
  min-height: 74px;
}


/* Version 1.10.74: Auftrag löschen kompakt als obere Kachel. */
.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-delete-order {
  border-color: #d9a3a3;
  border-left-color: #b83838;
  background: #fffafa;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-delete-order::before {
  background: #b83838;
}
.kfzrp-overview-delete-order .kfzrp-overview-delete-button {
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9f2525;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}
.kfzrp-overview-delete-order .kfzrp-overview-delete-button:hover,
.kfzrp-overview-delete-order .kfzrp-overview-delete-button:focus-visible {
  color: #721818;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.kfzrp-overview-delete-order small {
  color: #9d6a6a;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
}

/* Version 1.10.80: RepairFinder-Zuordnung direkt in der Portal-Produktmaske. */
.kfzrp-repairfinder-card {
  border-color: #9eb9d2;
  box-shadow: 0 3px 14px rgba(31, 83, 128, .08);
}

.kfzrp-repairfinder-step {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #d6e0e8;
  border-radius: 10px;
  background: #fbfcfd;
}

.kfzrp-repairfinder-step:first-of-type {
  margin-top: 8px;
}

.kfzrp-repairfinder-step-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  color: #243746;
}

.kfzrp-repairfinder-step-head > span {
  color: #687b8b;
  font-size: 11px;
  font-weight: 700;
}

.kfzrp-repairfinder-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.kfzrp-repairfinder-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #d5dfe7;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.kfzrp-repairfinder-check:hover {
  border-color: #8eb4d4;
  background: #f7fbff;
}

.kfzrp-repairfinder-check:has(input:checked) {
  border-color: #4f91c8;
  box-shadow: inset 4px 0 0 #2f78b4;
  background: #f4f9fd;
}

.kfzrp-repairfinder-check input {
  flex: 0 0 auto;
  margin-top: 2px;
}

.kfzrp-repairfinder-check span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.kfzrp-repairfinder-check small {
  display: block;
  margin-bottom: 2px;
  color: #718292;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.kfzrp-repairfinder-search {
  display: block;
  max-width: 420px;
  margin-bottom: 10px;
  color: #526675;
  font-size: 11px;
  font-weight: 700;
}

.kfzrp-repairfinder-search input {
  width: 100%;
  margin-top: 4px;
}

.kfzrp-repairfinder-model-group {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e0e7ed;
}

.kfzrp-repairfinder-model-group[hidden],
.kfzrp-repairfinder-check[hidden],
[data-kfzrp-rf-no-brand][hidden] {
  display: none !important;
}

.kfzrp-repairfinder-model-title {
  margin-bottom: 8px;
  color: #334a5c;
  font-size: 12px;
}

@media (max-width: 1050px) {
  .kfzrp-repairfinder-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .kfzrp-repairfinder-check-grid {
    grid-template-columns: 1fr;
  }
  .kfzrp-repairfinder-step-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
}

/* Version 1.10.81: RepairFinder 2.6 – Fahrzeugart als erste Zuordnungsstufe. */
.kfzrp-repairfinder-type-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kfzrp-repairfinder-type {
  min-height: 48px;
  align-items: center;
}

.kfzrp-repairfinder-type span {
  font-size: 13px;
}

[data-kfzrp-rf-no-type][hidden],
[data-kfzrp-rf-brand-row][hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .kfzrp-repairfinder-type-grid {
    grid-template-columns: 1fr;
  }
}


/* Version 1.10.83: Kategorien wieder in bewährter Darstellung; RepairFinder schmaler und besser lesbar. */
.kfzrp-repairfinder-card {
  padding: 17px 18px;
}

.kfzrp-repairfinder-card .kfzrp-section-heading {
  margin-bottom: 10px;
}

.kfzrp-repairfinder-card .kfzrp-repairfinder-step {
  margin-top: 11px;
  padding: 11px 12px;
  border-radius: 8px;
}

.kfzrp-repairfinder-card .kfzrp-repairfinder-step:first-of-type {
  margin-top: 7px;
}

.kfzrp-repairfinder-card .kfzrp-repairfinder-step-head {
  gap: 10px;
  margin-bottom: 8px;
}

.kfzrp-repairfinder-card .kfzrp-repairfinder-step-head strong {
  font-size: 12.5px;
  line-height: 1.3;
}

.kfzrp-repairfinder-card .kfzrp-repairfinder-step-head > span {
  font-size: 10px;
  line-height: 1.3;
}

.kfzrp-repairfinder-card .kfzrp-repairfinder-check-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.kfzrp-repairfinder-card .kfzrp-repairfinder-type-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.kfzrp-repairfinder-card .kfzrp-repairfinder-check {
  min-height: 48px;
  gap: 7px;
  padding: 8px 9px;
  border-radius: 7px;
  align-items: flex-start;
}

.kfzrp-repairfinder-card .kfzrp-repairfinder-type {
  min-height: 54px;
  align-items: center;
}

.kfzrp-repairfinder-card .kfzrp-repairfinder-check input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.kfzrp-repairfinder-card .kfzrp-repairfinder-check span {
  font-size: 11.5px;
  line-height: 1.32;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.kfzrp-repairfinder-card .kfzrp-repairfinder-type span {
  font-size: 12.5px;
  line-height: 1.3;
}

.kfzrp-repairfinder-card .kfzrp-repairfinder-check small {
  margin-bottom: 3px;
  font-size: 8.5px;
  line-height: 1.2;
  letter-spacing: .035em;
}

.kfzrp-repairfinder-card .kfzrp-repairfinder-search {
  max-width: 380px;
  margin-bottom: 8px;
  font-size: 10.5px;
  line-height: 1.3;
}

.kfzrp-repairfinder-card .kfzrp-repairfinder-search input {
  min-height: 36px;
  margin-top: 3px;
  padding: 6px 9px;
  font-size: 12px;
}

.kfzrp-repairfinder-card .kfzrp-repairfinder-model-group {
  margin-top: 9px;
  padding-top: 9px;
}

.kfzrp-repairfinder-card .kfzrp-repairfinder-model-title {
  margin-bottom: 7px;
  font-size: 11.5px;
  line-height: 1.3;
}

.kfzrp-repairfinder-card .kfzrp-help {
  font-size: 10px;
  line-height: 1.35;
}

@media (max-width: 1250px) {
  .kfzrp-repairfinder-card .kfzrp-repairfinder-check-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .kfzrp-repairfinder-card .kfzrp-repairfinder-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .kfzrp-repairfinder-card {
    padding: 14px;
  }
  .kfzrp-repairfinder-card .kfzrp-repairfinder-check-grid,
  .kfzrp-repairfinder-card .kfzrp-repairfinder-type-grid {
    grid-template-columns: 1fr;
  }
  .kfzrp-repairfinder-card .kfzrp-repairfinder-check {
    min-height: 46px;
  }
}


/* Version 1.10.84: RepairFinder-Kacheln nochmals schmaler und besser lesbar. */
.kfzrp-repairfinder-card .kfzrp-repairfinder-check-grid {
  grid-template-columns: repeat(auto-fill, minmax(130px, 150px));
  gap: 8px 9px;
  justify-content: start;
}

.kfzrp-repairfinder-card .kfzrp-repairfinder-type-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 185px));
  gap: 8px 9px;
  justify-content: start;
}

.kfzrp-repairfinder-card .kfzrp-repairfinder-check {
  min-height: 58px;
  padding: 9px 10px;
  gap: 8px;
  align-items: flex-start;
}

.kfzrp-repairfinder-card .kfzrp-repairfinder-type {
  min-height: 60px;
  align-items: center;
}

.kfzrp-repairfinder-card .kfzrp-repairfinder-check span {
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

.kfzrp-repairfinder-card .kfzrp-repairfinder-check small {
  display: block;
  margin: 0 0 4px;
  font-size: 8.5px;
  line-height: 1.25;
}

.kfzrp-repairfinder-card .kfzrp-repairfinder-type span {
  font-size: 12.5px;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .kfzrp-repairfinder-card .kfzrp-repairfinder-check-grid {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  }
  .kfzrp-repairfinder-card .kfzrp-repairfinder-type-grid {
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  }
}

@media (max-width: 640px) {
  .kfzrp-repairfinder-card .kfzrp-repairfinder-check-grid,
  .kfzrp-repairfinder-card .kfzrp-repairfinder-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* Version 1.10.85: nativer Zukunfts-Fallback für erweiterte RepairFinder-Versionen. */
.kfzrp-repairfinder-native .mdrf-product-map {
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.kfzrp-repairfinder-native .mdrf-product-section {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d7e0e7;
  border-radius: 10px;
  background: #fff;
}
.kfzrp-repairfinder-native .mdrf-product-model-list,
.kfzrp-repairfinder-native .mdrf-vehicle-type-list {
  max-height: 360px;
  overflow: auto;
}


/* Version 1.10.86: Mehrfachauswahl und Sammelaktionen in der Bestellübersicht. */
.kfzrp-order-bulk-actions {
  display: flex;
  align-items: end;
  gap: 8px;
  margin: 10px 0 8px;
  padding: 8px 10px;
  border: 1px solid #ccd9e3;
  border-radius: 9px;
  background: #f7fafc;
}
.kfzrp-order-bulk-actions label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
}
.kfzrp-order-bulk-actions select {
  min-width: 210px;
  min-height: 34px;
  margin: 0;
  padding: 5px 30px 5px 8px;
  font-size: 12px;
}
.kfzrp-order-bulk-actions small {
  align-self: center;
  color: #647482;
  font-size: 11px;
  font-weight: 700;
}
.kfzrp-portal .kfzrp-order-table col.kfzrp-col-select { width: 46px !important; }
.kfzrp-order-table .kfzrp-table-select {
  width: 46px;
  max-width: 46px;
  padding-left: 6px !important;
  padding-right: 6px !important;
  text-align: center;
}
.kfzrp-table-select input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
  vertical-align: middle;
}
.kfzrp-select-all-label {
  display: grid;
  justify-items: center;
  gap: 2px;
  color: #5e6d79;
  font-size: 8px;
  line-height: 1;
  cursor: pointer;
}
@media (max-width: 760px) {
  .kfzrp-order-bulk-actions { align-items: stretch; flex-wrap: wrap; }
  .kfzrp-order-bulk-actions label { width: 100%; justify-content: space-between; }
  .kfzrp-order-bulk-actions select { flex: 1 1 auto; min-width: 0; }
}

/* Version 1.10.87: Produktbezogene Textvorlagen für Werkstattaufträge. */
.kfzrp-product-text-templates .kfzrp-section-heading {
  margin-bottom: 12px;
}

.kfzrp-product-template-list {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.kfzrp-product-template-row {
  padding: 12px;
  border: 1px solid #ccd9e3;
  border-left: 4px solid #5a7892;
  border-radius: 9px;
  background: #fbfcfd;
}

.kfzrp-product-template-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.kfzrp-product-template-row-head strong {
  font-size: 12px;
  color: #304454;
}

.kfzrp-product-template-remove {
  padding: 2px 6px;
  border: 0;
  background: transparent;
  color: #a43b3b;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.kfzrp-product-template-meta {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(230px, .8fr);
  gap: 10px;
  margin-bottom: 8px;
}

.kfzrp-product-template-row textarea {
  min-height: 94px;
}

.kfzrp-order-product-templates {
  margin: 0 0 13px;
  padding: 10px 11px;
  border: 1px solid #bdd0df;
  border-left: 4px solid #41769f;
  border-radius: 9px;
  background: #f7fafc;
}

.kfzrp-order-product-templates-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.kfzrp-order-product-templates-head strong {
  font-size: 12px;
  color: #2e4f68;
}

.kfzrp-order-product-templates-head span {
  color: #6a7883;
  font-size: 10px;
  text-align: right;
}

.kfzrp-order-product-template-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kfzrp-order-product-template-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid #9eb9cd;
  border-radius: 8px;
  background: #fff;
  color: #294b64;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.kfzrp-order-product-template-button:hover,
.kfzrp-order-product-template-button:focus-visible {
  border-color: #4e83aa;
  box-shadow: 0 2px 8px rgba(41, 89, 124, .12);
}

.kfzrp-order-product-template-button small {
  flex: 0 0 auto;
  color: #557488;
  font-size: 9px;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .kfzrp-product-template-meta {
    grid-template-columns: 1fr;
  }
  .kfzrp-order-product-templates-head {
    display: block;
  }
  .kfzrp-order-product-templates-head span {
    display: block;
    margin-top: 3px;
    text-align: left;
  }
}


/* Version 1.10.89: kompakter Kundendatenblock bei Kunde/Auftrag anlegen. */
.kfzrp-compact-customer-card{padding:14px 16px}
.kfzrp-compact-customer-card .kfzrp-compact-heading{margin-bottom:10px}
.kfzrp-compact-customer-card .kfzrp-compact-heading h4{margin:1px 0 0}
.kfzrp-compact-customer-card .kfzrp-compact-heading p{max-width:620px;font-size:11px;line-height:1.35}
.kfzrp-customer-data-grid{grid-template-columns:minmax(135px,.9fr) minmax(135px,.9fr) minmax(180px,1.2fr) minmax(150px,.9fr);gap:10px 12px;align-items:end}
.kfzrp-customer-data-grid>label{gap:4px;min-width:0;font-size:12px}
.kfzrp-customer-data-grid>label>small{display:inline;color:#788793;font-size:9px;font-weight:600}
.kfzrp-customer-data-grid input,.kfzrp-customer-data-grid select{min-height:36px}
.kfzrp-customer-company,.kfzrp-customer-email,.kfzrp-customer-address-main,.kfzrp-customer-address-extra,.kfzrp-customer-city{grid-column:span 2}
.kfzrp-customer-postcode input{max-width:140px}
.kfzrp-customer-country select{max-width:190px}
.kfzrp-compact-customer-card .kfzrp-direct-customer-lookup{margin-bottom:10px;padding:9px 10px}
.kfzrp-compact-customer-card .kfzrp-shop-access-option{margin-top:2px;padding:9px 10px}
@media(max-width:1050px){.kfzrp-customer-data-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.kfzrp-customer-company,.kfzrp-customer-email,.kfzrp-customer-address-main,.kfzrp-customer-address-extra,.kfzrp-customer-city{grid-column:auto}}
@media(max-width:680px){.kfzrp-customer-data-grid{grid-template-columns:1fr}.kfzrp-customer-postcode input,.kfzrp-customer-country select{max-width:none}}

/* Version 1.10.91: Aktivitätsverlauf bei schmalerem Browser unter den Auftrag verschieben. */
@media (max-width: 1580px) {
  .kfzrp-order-workspace-layout {
    grid-template-areas:
      "summary"
      "actions"
      "form"
      "activity";
  }

  /* Die rechte Sammelspalte wird nur für das responsive Layout aufgelöst:
     Dokumentaktionen bleiben oberhalb des Formulars, der Aktivitätsverlauf
     erhält eine eigene Zeile ganz unten. */
  .kfzrp-order-workspace-actions {
    display: contents;
  }

  .kfzrp-order-workspace-actions .kfzrp-document-action-bar {
    grid-area: actions;
    width: 100%;
    max-width: 1320px;
    margin: 0;
  }

  .kfzrp-order-workspace-actions .kfzrp-order-activity {
    grid-area: activity;
    width: 100%;
    max-width: 1320px;
    margin: 0;
  }

  .kfzrp-order-workspace-actions .kfzrp-activity-list {
    max-height: 430px;
  }
}


/* Version 1.10.93: eindeutiger Rechnungs-/Lexoffice-Status. */
.kfzrp-accounting-checks{
	display:grid;
	grid-template-columns:repeat(2,minmax(0,1fr));
	gap:8px;
	margin:8px 0 10px;
}
.kfzrp-accounting-check{
	display:flex;
	flex-direction:column;
	gap:2px;
	min-width:0;
	padding:8px 10px;
	border:1px solid #d8e0e6;
	border-radius:8px;
	background:#f7f9fa;
}
.kfzrp-accounting-check small{
	font-size:10px;
	line-height:1.2;
	color:#66737c;
}
.kfzrp-accounting-check strong{
	font-size:12px;
	line-height:1.3;
}
.kfzrp-accounting-check.is-success{
	border-color:#b8dcc4;
	background:#f0faf3;
}
.kfzrp-accounting-check.is-warning{
	border-color:#ead6a4;
	background:#fff9eb;
}
.kfzrp-accounting-check.is-error{
	border-color:#e7b8b8;
	background:#fff3f3;
}
@media(max-width:520px){
	.kfzrp-accounting-checks{grid-template-columns:1fr}
}


/* Version 1.10.94: Rechnungs-/Lexoffice-Status direkt in der kompakten Rechnungskachel. */
.kfzrp-document-action-group-invoice .kfzrp-compact-accounting-status{
	display:grid;
	grid-template-columns:repeat(2,minmax(0,1fr));
	gap:5px;
	grid-column:1/-1;
	width:100%;
	margin:2px 0 1px;
}
.kfzrp-compact-status-pill{
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:6px;
	min-width:0;
	padding:4px 7px;
	border:1px solid #d8e0e6;
	border-radius:6px;
	background:#f7f9fa;
	line-height:1.15;
}
.kfzrp-compact-status-pill small{
	flex:0 0 auto;
	font-size:9px;
	color:#687780;
}
.kfzrp-compact-status-pill b{
	min-width:0;
	font-size:10px;
	font-weight:700;
	text-align:right;
	white-space:normal;
}
.kfzrp-compact-status-pill.is-success{
	border-color:#b8dcc4;
	background:#eef9f1;
}
.kfzrp-compact-status-pill.is-warning{
	border-color:#ead6a4;
	background:#fff8e8;
}
.kfzrp-compact-status-pill.is-error{
	border-color:#e7b8b8;
	background:#fff0f0;
}
.kfzrp-compact-lexware-error{
	display:block;
	grid-column:1/-1;
	width:100%;
	margin:0 0 3px;
	padding:4px 6px;
	border-radius:5px;
	background:#fff0f0;
	color:#8a2525;
	font-size:9px;
	line-height:1.3;
	overflow-wrap:anywhere;
}
@media(max-width:430px){
	.kfzrp-document-action-group-invoice .kfzrp-compact-accounting-status{
		grid-template-columns:1fr;
	}
}


/* Version 1.10.95: Status unter Rechnungsbuttons + zuverlässigere Lexoffice-Anzeige. */
.kfzrp-workflow-section-invoice .kfzrp-compact-accounting-status{
	display:grid;
	grid-template-columns:repeat(2,minmax(0,1fr));
	gap:5px;
	grid-column:1/-1;
	width:100%;
	margin:5px 0 0;
	padding-top:5px;
	border-top:1px solid rgba(95,75,160,.14);
}
.kfzrp-workflow-section-invoice .kfzrp-compact-status-pill{
	min-height:28px;
	padding:4px 7px;
}
.kfzrp-workflow-section-invoice .kfzrp-compact-status-pill small{
	font-size:9px;
}
.kfzrp-workflow-section-invoice .kfzrp-compact-status-pill b{
	font-size:10px;
}
.kfzrp-workflow-section-invoice .kfzrp-compact-lexware-error{
	grid-column:1/-1;
	margin-top:2px;
}
@media(max-width:430px){
	.kfzrp-workflow-section-invoice .kfzrp-compact-accounting-status{
		grid-template-columns:1fr;
	}
}


/* Version 1.10.96: native Germanized/Lexoffice-Statusanzeige. */
.kfzrp-workflow-section-invoice .kfzrp-compact-status-pill.is-neutral{
	border-color:#d8e0e6;
	background:#f7f9fa;
}
.kfzrp-workflow-section-invoice .kfzrp-compact-status-pill b{
	overflow-wrap:anywhere;
}


/* Version 1.10.97: Dokumentnummern und Datum besser lesbar, ohne größere Kacheln. */
.kfzrp-order-workspace-actions .kfzrp-workflow-title-meta {
  color: #273d4d;
  font-size: 11.5px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: .005em;
}
.kfzrp-order-workspace-actions .kfzrp-workflow-title-meta::before {
  margin-right: 6px;
}
.kfzrp-order-workspace-actions .kfzrp-workflow-section > strong:first-child {
  gap: 6px;
}


/* Version 1.10.98: Werkstattübersicht ohne Rechnung. */
.kfzrp-workshop-overview-badge{
	display:inline-flex;
	align-items:center;
	gap:5px;
	padding:5px 8px;
	border:1px solid #b9d6c2;
	border-radius:999px;
	background:#eef8f1;
	color:#245b36;
	font-size:11px;
	font-weight:800;
	line-height:1.15;
	white-space:nowrap;
}
.kfzrp-workshop-filter-info{
	margin:-3px 0 10px;
	padding:7px 10px;
	border-left:3px solid #2f7d50;
	border-radius:5px;
	background:#f3f9f5;
	color:#42534a;
	font-size:11px;
	line-height:1.35;
}
.kfzrp-workshop-filter-info strong{
	color:#245b36;
}


/* Version 1.10.99: Bestellfilter wieder einzeilig + „In Bearbeitung“. */
.kfzrp-order-filter{
  grid-template-columns:minmax(300px,2.2fr) minmax(165px,.85fr) minmax(145px,.72fr) minmax(125px,.62fr) max-content;
  align-items:end;
  column-gap:10px;
}
.kfzrp-order-filter .kfzrp-order-search-field{
  min-width:0;
}
.kfzrp-order-filter .kfzrp-filter-actions{
  grid-column:auto;
  flex-wrap:nowrap;
  white-space:nowrap;
}
.kfzrp-order-filter .kfzrp-filter-actions .kfzrp-button{
  white-space:nowrap;
}
@media(max-width:1050px){
  .kfzrp-order-filter{
    grid-template-columns:minmax(260px,1.6fr) repeat(2,minmax(145px,.8fr));
  }
  .kfzrp-order-filter .kfzrp-filter-actions{
    grid-column:auto;
  }
}
@media(max-width:820px){
  .kfzrp-order-filter{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .kfzrp-order-filter .kfzrp-order-search-field{
    grid-column:1/-1;
  }
  .kfzrp-order-filter .kfzrp-filter-actions{
    grid-column:1/-1;
  }
}
@media(max-width:620px){
  .kfzrp-order-filter{
    grid-template-columns:1fr;
  }
  .kfzrp-order-filter .kfzrp-order-search-field,
  .kfzrp-order-filter .kfzrp-filter-actions{
    grid-column:auto;
  }
}


/* Version 1.11.00: Kundenkommunikation direkt über dem Aktivitätsverlauf. */
.kfzrp-customer-communication{margin-top:12px;margin-bottom:0}
.kfzrp-order-workspace-actions .kfzrp-customer-communication .kfzrp-section-heading{padding:12px 13px 10px}
.kfzrp-order-workspace-actions .kfzrp-customer-communication .kfzrp-collapsible-body{padding:0 13px 12px}
.kfzrp-comm-new-count{display:inline-flex;margin-left:5px;padding:2px 6px;border-radius:999px;background:#d93025;color:#fff;font-size:9px;vertical-align:middle}
.kfzrp-comm-empty{margin:0 0 10px;color:#667782;font-size:11px}
.kfzrp-comm-thread{display:flex;flex-direction:column;gap:7px;max-height:330px;overflow:auto;margin:0 0 10px;padding-right:2px}
.kfzrp-comm-message{padding:8px 9px;border:1px solid #dbe3e9;border-radius:8px;background:#f7f9fb}
.kfzrp-comm-message.is-outbound{margin-left:14px;border-color:#bad6ec;background:#eef7fd}
.kfzrp-comm-message.is-inbound{margin-right:14px;border-color:#c6ddca;background:#f0f8f2}
.kfzrp-comm-meta{display:flex;justify-content:space-between;gap:8px;margin-bottom:4px;font-size:9px;color:#6b7881}
.kfzrp-comm-meta strong{color:#31424e;font-size:10px}
.kfzrp-comm-subject{margin-bottom:4px;font-size:10px;font-weight:800;color:#273d4d}
.kfzrp-comm-body{font-size:11px;line-height:1.45;color:#283944;overflow-wrap:anywhere}
.kfzrp-comm-attachments{display:flex;flex-direction:column;gap:4px;margin-top:6px}
.kfzrp-comm-attachments a{display:flex;align-items:center;gap:6px;padding:5px 6px;border-radius:5px;background:rgba(255,255,255,.74);font-size:10px;text-decoration:none}
.kfzrp-comm-attachments a span:last-child{display:flex;flex-direction:column;min-width:0;overflow-wrap:anywhere}
.kfzrp-comm-attachments small{font-size:8px;color:#72808a}
.kfzrp-comm-compose{display:grid;gap:7px;padding-top:9px;border-top:1px solid #dfe6eb}
.kfzrp-comm-compose label,.kfzrp-public-reply-form label{display:grid;gap:3px;font-size:10px;font-weight:700}
.kfzrp-comm-compose input[type=text],.kfzrp-comm-compose textarea,.kfzrp-public-reply-form textarea,.kfzrp-public-reply-form input[type=file]{width:100%;font-size:11px}
.kfzrp-comm-compose textarea{min-height:84px;resize:vertical}
.kfzrp-comm-file-label small,.kfzrp-comm-reply-hint,.kfzrp-public-reply-form label small{font-size:9px;line-height:1.35;color:#6f7c85}
.kfzrp-customer-message-unread{display:inline-flex;align-items:center;gap:4px;margin-top:5px;padding:3px 6px;border-radius:999px;background:#fff0ef;color:#b32920;font-size:9px;font-weight:800;text-decoration:none}
.kfzrp-public-reply-shell{width:min(760px,calc(100vw - 24px));margin:26px auto}
.kfzrp-public-reply-card{padding:22px;border:1px solid #dce4e9;border-radius:12px;background:#fff;box-shadow:0 8px 28px rgba(25,45,60,.08)}
.kfzrp-public-reply-head{margin-bottom:16px;padding-bottom:13px;border-bottom:1px solid #e5ebef}
.kfzrp-public-reply-head>span{display:block;margin-bottom:4px;color:#1e73be;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.kfzrp-public-reply-head h2{margin:0 0 5px;font-size:22px}
.kfzrp-public-reply-head p{margin:0;color:#60707a}
.kfzrp-public-thread{display:flex;flex-direction:column;gap:9px;max-height:520px;overflow:auto;margin:15px 0;padding:2px}
.kfzrp-public-thread .kfzrp-comm-message{max-width:88%}
.kfzrp-public-thread .is-outbound{align-self:flex-start;margin-left:0}
.kfzrp-public-thread .is-inbound{align-self:flex-end;margin-right:0}
.kfzrp-public-reply-form{display:grid;gap:10px;margin-top:16px;padding-top:16px;border-top:1px solid #e5ebef}
.kfzrp-public-reply-form textarea{min-height:130px;resize:vertical}
.kfzrp-comm-honeypot{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;opacity:0!important}
@media(max-width:1580px){
 .kfzrp-order-workspace-layout{grid-template-areas:"summary" "actions" "form" "communication" "activity"}
 .kfzrp-order-workspace-actions .kfzrp-customer-communication{grid-area:communication;width:100%;max-width:1320px;margin:0}
 .kfzrp-order-workspace-actions .kfzrp-customer-communication .kfzrp-comm-thread{max-height:430px}
}
@media(max-width:640px){
 .kfzrp-public-reply-card{padding:15px}
 .kfzrp-public-thread .kfzrp-comm-message{max-width:96%}
}

/* 1.11.02: Allgemeiner Einstellungs-Schalter für automatisches Öffnen der Auftragsbestätigung bei Eingang. */
.kfzrp-settings-toggle-row{margin-top:18px}.kfzrp-settings-toggle{display:flex;align-items:flex-start;gap:12px;padding:14px 16px;border:1px solid #d9e0e6;border-radius:10px;background:#fff}.kfzrp-settings-toggle>input{margin-top:3px;width:18px;height:18px;flex:0 0 auto}.kfzrp-settings-toggle span{display:flex;flex-direction:column;gap:4px}.kfzrp-settings-toggle strong{font-size:14px}.kfzrp-settings-toggle small{line-height:1.45;color:#5d6872}

/* Version 1.11.03: Interne Mitarbeiterkommunikation je Auftrag. */
.kfzrp-internal-communication{margin-top:12px;margin-bottom:0;border-color:#d8d0e9}
.kfzrp-order-workspace-actions .kfzrp-internal-communication .kfzrp-section-heading{padding:12px 13px 10px;background:#faf8fd}
.kfzrp-order-workspace-actions .kfzrp-internal-communication .kfzrp-collapsible-body{padding:0 13px 12px}
.kfzrp-internal-thread{max-height:360px}
.kfzrp-internal-message{border-color:#ddd6ec;background:#faf8fd}
.kfzrp-internal-message.is-own{margin-left:14px;border-color:#c8d9ef;background:#f1f7fd}
.kfzrp-internal-message.is-team{margin-right:14px}
.kfzrp-internal-recipient{margin:-1px 0 5px;color:#745f8f;font-size:9px;font-weight:800}
.kfzrp-internal-compose select{width:100%;font-size:11px}
.kfzrp-internal-message-unread{display:inline-flex;align-items:center;gap:4px;margin-top:5px;margin-left:4px;padding:3px 6px;border-radius:999px;background:#f2ecfa;color:#654387;font-size:9px;font-weight:800;text-decoration:none}
@media(max-width:1580px){
 .kfzrp-order-workspace-layout{grid-template-areas:"summary" "actions" "form" "communication" "internal" "activity"}
 .kfzrp-order-workspace-actions .kfzrp-internal-communication{grid-area:internal;width:100%;max-width:1320px;margin:0}
 .kfzrp-order-workspace-actions .kfzrp-internal-communication .kfzrp-comm-thread{max-height:430px}
}

/* Version 1.11.04: Zentrale Team-Nachrichten inkl. auftragsunabhängiger Kommunikation. */
.kfzrp-team-toolbar{align-items:center}
.kfzrp-team-unread-summary span{display:inline-flex;align-items:center;gap:6px;padding:7px 11px;border-radius:999px;background:#f2ecfa;color:#654387;font-size:12px;font-weight:800}
.kfzrp-team-unread-summary strong{font-size:15px}
.kfzrp-team-message-layout{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:16px;align-items:start}
.kfzrp-team-message-layout>.kfzrp-card{margin:0}
.kfzrp-team-global-thread{max-height:520px}
.kfzrp-team-compose select{width:100%}
.kfzrp-team-order-list{display:flex;flex-direction:column;gap:9px;max-height:760px;overflow:auto;padding-right:3px}
.kfzrp-team-order-message{padding:10px 11px;border:1px solid #dfe5ea;border-radius:9px;background:#fff}
.kfzrp-team-order-message.is-unread{border-color:#b49ad1;background:#faf7fd;box-shadow:inset 3px 0 0 #80619e}
.kfzrp-team-order-message-head{display:flex;justify-content:space-between;gap:10px;align-items:baseline;margin-bottom:4px;font-size:10px}
.kfzrp-team-order-message-head a{text-decoration:none}
.kfzrp-team-order-message-head strong{font-size:12px}
.kfzrp-team-order-message-head span{color:#71808a;white-space:nowrap}
.kfzrp-team-order-message-meta{margin-bottom:6px;color:#745f8f;font-size:9px;font-weight:700}
@media(max-width:980px){.kfzrp-team-message-layout{grid-template-columns:1fr}.kfzrp-team-order-list{max-height:560px}}


/* Version 1.11.06: Kundenvorschlaege direkt waehrend der Auftragserfassung. */
.kfzrp-direct-order-form .kfzrp-customer-data-grid > label {
  position: relative;
}
.kfzrp-direct-order-form .kfzrp-customer-company {
  grid-column: 1 / -1;
}
.kfzrp-direct-order-form .kfzrp-inline-selected-customer {
  margin: 0 0 10px;
  padding: 9px 10px;
  border: 1px solid #c9dfcf;
  border-radius: 9px;
  background: #f5fbf6;
}
.kfzrp-direct-order-form .kfzrp-customer-suggestions-inline {
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 280px;
  max-width: 440px;
  margin: 0;
  z-index: 80;
}
.kfzrp-direct-order-form .kfzrp-customer-suggestion-heading {
  padding: 8px 11px 6px;
  border-bottom: 1px solid #e4ebf0;
  background: #f6f9fb;
  color: #526675;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
@media (max-width: 1050px) {
  .kfzrp-direct-order-form .kfzrp-customer-company {
    grid-column: 1 / -1;
  }
}
@media (max-width: 680px) {
  .kfzrp-direct-order-form .kfzrp-customer-suggestions-inline {
    min-width: 100%;
    max-width: none;
  }
}

/* Version 1.11.08: Fahrzeugart kompakt, Marke und Modell direkt daneben. */
.kfzrp-order-section-identification .kfzrp-identification-vehicle-row {
  display: grid;
  grid-template-columns: 86px minmax(150px, .8fr) minmax(190px, 1.2fr);
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

.kfzrp-order-section-identification .kfzrp-identification-vehicle-row > div,
.kfzrp-order-section-identification .kfzrp-identification-vehicle-row label,
.kfzrp-order-section-identification .kfzrp-identification-vehicle-row input {
  min-width: 0;
  width: 100%;
}

.kfzrp-order-section-identification .kfzrp-identification-vehicle-type input[name="vehicle_type"] {
  width: 86px;
  max-width: 86px;
  text-align: left;
}

@media (max-width: 720px) {
  .kfzrp-order-section-identification .kfzrp-identification-vehicle-row {
    grid-template-columns: 76px minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
  }
  .kfzrp-order-section-identification .kfzrp-identification-vehicle-type input[name="vehicle_type"] {
    width: 76px;
    max-width: 76px;
  }
}

@media (max-width: 520px) {
  .kfzrp-order-section-identification .kfzrp-identification-vehicle-row {
    grid-template-columns: 76px minmax(0, 1fr);
  }
  .kfzrp-order-section-identification .kfzrp-identification-vehicle-model {
    grid-column: 1 / -1;
  }
}


/* Version 1.11.09: Direktauftrag mit getrennter Fahrzeugidentifikation und Kontakt-Pflicht. */
.kfzrp-direct-order-form .kfzrp-direct-contact-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}
.kfzrp-direct-order-form .kfzrp-direct-contact-row > label {
  position: relative;
  min-width: 0;
  gap: 4px;
  font-size: 12px;
}
.kfzrp-direct-order-form .kfzrp-direct-contact-row > label > small {
  display: inline;
  color: #788793;
  font-size: 9px;
  font-weight: 600;
}
.kfzrp-direct-order-form .kfzrp-direct-contact-row input {
  width: 100%;
  min-height: 36px;
}
.kfzrp-direct-order-identification .kfzrp-identification-vehicle-row {
  margin-bottom: 16px;
}
@media (max-width: 680px) {
  .kfzrp-direct-order-form .kfzrp-direct-contact-row {
    grid-template-columns: 1fr;
  }
}


/* Version 1.11.10: Adressreihenfolge bei manueller Auftragserfassung. */
.kfzrp-direct-order-form .kfzrp-customer-address-extra,
.kfzrp-direct-order-form .kfzrp-customer-address-main {
  grid-column: 1 / -1;
}
.kfzrp-direct-order-form .kfzrp-customer-postcode {
  grid-column: 1 / 2;
}
.kfzrp-direct-order-form .kfzrp-customer-city {
  grid-column: 2 / 4;
}
.kfzrp-direct-order-form .kfzrp-customer-country {
  grid-column: 4 / 5;
}
@media (max-width: 1050px) {
  .kfzrp-direct-order-form .kfzrp-customer-address-extra,
  .kfzrp-direct-order-form .kfzrp-customer-address-main {
    grid-column: 1 / -1;
  }
  .kfzrp-direct-order-form .kfzrp-customer-postcode,
  .kfzrp-direct-order-form .kfzrp-customer-city {
    grid-column: auto;
  }
  .kfzrp-direct-order-form .kfzrp-customer-country {
    grid-column: 1 / -1;
  }
}
@media (max-width: 680px) {
  .kfzrp-direct-order-form .kfzrp-customer-address-extra,
  .kfzrp-direct-order-form .kfzrp-customer-address-main,
  .kfzrp-direct-order-form .kfzrp-customer-postcode,
  .kfzrp-direct-order-form .kfzrp-customer-city,
  .kfzrp-direct-order-form .kfzrp-customer-country {
    grid-column: 1;
  }
}


/* Version 1.11.11: kompakte Fahrzeug- und Fahrzeugschein-Felder bei manueller Auftragserfassung. */
.kfzrp-direct-order-identification .kfzrp-identification-vehicle-type select[name="vehicle_type"] {
  width: 96px;
  max-width: 96px;
}
.kfzrp-direct-order-identification .kfzrp-direct-registration-row {
  display: grid;
  grid-template-columns: minmax(110px, .55fr) minmax(110px, .55fr) minmax(240px, 1.8fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}
.kfzrp-direct-order-identification .kfzrp-direct-registration-row > div,
.kfzrp-direct-order-identification .kfzrp-direct-registration-row label,
.kfzrp-direct-order-identification .kfzrp-direct-registration-row input {
  min-width: 0;
  width: 100%;
}
.kfzrp-direct-order-identification .kfzrp-direct-identification-grid {
  grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1fr);
}
.kfzrp-direct-order-identification .kfzrp-direct-mileage-field {
  min-width: 0;
  max-width: 180px;
}
.kfzrp-direct-order-identification .kfzrp-direct-mileage-field input[name="mileage"] {
  width: 100%;
  max-width: 180px;
}
.kfzrp-direct-order-identification .kfzrp-direct-identification-grid > .kfzrp-field-wide {
  grid-column: 1 / -1;
}
@media (max-width: 900px) {
  .kfzrp-direct-order-identification .kfzrp-direct-registration-row {
    grid-template-columns: minmax(100px, .7fr) minmax(100px, .7fr) minmax(180px, 1.6fr);
    gap: 12px;
  }
  .kfzrp-direct-order-identification .kfzrp-direct-identification-grid {
    grid-template-columns: 150px minmax(0, 1fr);
  }
  .kfzrp-direct-order-identification .kfzrp-direct-identification-grid > .kfzrp-field-wide {
    grid-column: 1 / -1;
  }
}
@media (max-width: 620px) {
  .kfzrp-direct-order-identification .kfzrp-direct-registration-row,
  .kfzrp-direct-order-identification .kfzrp-direct-identification-grid {
    grid-template-columns: 1fr;
  }
  .kfzrp-direct-order-identification .kfzrp-direct-mileage-field {
    max-width: 180px;
  }
  .kfzrp-direct-order-identification .kfzrp-direct-identification-grid > .kfzrp-field-wide {
    grid-column: 1;
  }
}

/* 1.11.11: ältere Kundenraster-Regel darf E-Mail in der Direktkontaktzeile nicht über beide Spalten ziehen. */
.kfzrp-direct-order-form .kfzrp-direct-contact-row > .kfzrp-customer-email,
.kfzrp-direct-order-form .kfzrp-direct-contact-row > .kfzrp-customer-phone {
  grid-column: auto !important;
}

/* Version 1.11.12: Kunde/Anschrift endet rechts bündig mit dem Feld Nachname. */
.kfzrp-direct-order-form .kfzrp-customer-data-grid {
  grid-template-columns: minmax(180px, .9fr) minmax(220px, 1.1fr);
  max-width: 760px;
}
.kfzrp-direct-order-form .kfzrp-customer-company,
.kfzrp-direct-order-form .kfzrp-customer-address-extra,
.kfzrp-direct-order-form .kfzrp-customer-address-main,
.kfzrp-direct-order-form .kfzrp-customer-country,
.kfzrp-direct-order-form .kfzrp-direct-contact-row {
  grid-column: 1 / -1;
}
.kfzrp-direct-order-form .kfzrp-customer-postcode {
  grid-column: 1;
}
.kfzrp-direct-order-form .kfzrp-customer-city {
  grid-column: 2;
}
.kfzrp-direct-order-form .kfzrp-direct-contact-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
@media (max-width: 680px) {
  .kfzrp-direct-order-form .kfzrp-customer-data-grid {
    grid-template-columns: 1fr;
    max-width: none;
  }
  .kfzrp-direct-order-form .kfzrp-customer-company,
  .kfzrp-direct-order-form .kfzrp-customer-first-name,
  .kfzrp-direct-order-form .kfzrp-customer-last-name,
  .kfzrp-direct-order-form .kfzrp-customer-address-extra,
  .kfzrp-direct-order-form .kfzrp-customer-address-main,
  .kfzrp-direct-order-form .kfzrp-customer-postcode,
  .kfzrp-direct-order-form .kfzrp-customer-city,
  .kfzrp-direct-order-form .kfzrp-customer-country,
  .kfzrp-direct-order-form .kfzrp-direct-contact-row {
    grid-column: 1;
  }
}


/* Version 1.11.13: Direktannahme wieder linksbuendig und Felder klar gruppiert. */
.kfzrp-direct-order-form .kfzrp-direct-order-identification {
  width: min(100%, 1040px);
  justify-self: start;
  margin-left: 0;
  margin-right: auto;
}
.kfzrp-direct-order-identification .kfzrp-section-heading {
  justify-content: flex-start;
}
.kfzrp-direct-order-identification .kfzrp-section-heading > div {
  flex: 0 1 auto;
}
.kfzrp-direct-order-identification .kfzrp-section-heading > p {
  margin-left: auto;
}
.kfzrp-direct-order-identification .kfzrp-direct-subsection-title {
  margin: 2px 0 9px;
  padding: 5px 8px;
  border-left: 3px solid #28766b;
  background: #f4faf8;
  color: #355e58;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.kfzrp-direct-order-identification .kfzrp-identification-vehicle-row {
  grid-template-columns: 100px minmax(220px, .9fr) minmax(260px, 1.1fr);
  gap: 14px;
  max-width: 960px;
  margin: 0 0 15px;
}
.kfzrp-direct-order-identification .kfzrp-direct-registration-row {
  grid-template-columns: 130px 130px minmax(300px, 1fr);
  gap: 14px;
  max-width: 960px;
  margin: 0 0 15px;
}
.kfzrp-direct-order-identification .kfzrp-direct-core-row {
  display: grid;
  grid-template-columns: 160px minmax(260px, 1fr) minmax(260px, 1fr);
  gap: 14px;
  align-items: start;
  max-width: 960px;
  margin-bottom: 15px;
}
.kfzrp-direct-order-identification .kfzrp-direct-core-row > div,
.kfzrp-direct-order-identification .kfzrp-direct-core-row label,
.kfzrp-direct-order-identification .kfzrp-direct-core-row input {
  min-width: 0;
  width: 100%;
}
.kfzrp-direct-order-identification .kfzrp-direct-mileage-field,
.kfzrp-direct-order-identification .kfzrp-direct-mileage-field input[name="mileage"] {
  width: 160px;
  max-width: 160px;
}
.kfzrp-direct-order-identification .kfzrp-direct-text-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  max-width: 960px;
}
.kfzrp-direct-order-identification .kfzrp-direct-text-field {
  min-width: 0;
}
.kfzrp-direct-order-identification .kfzrp-direct-text-field > label {
  grid-column: auto;
  min-width: 0;
  width: 100%;
}
.kfzrp-direct-order-identification .kfzrp-direct-text-field textarea {
  min-height: 92px;
}
.kfzrp-direct-order-identification .kfzrp-direct-text-field.is-full {
  grid-column: 1 / -1;
}
.kfzrp-direct-order-identification .kfzrp-direct-text-field.is-full textarea {
  min-height: 78px;
}
@media (max-width: 900px) {
  .kfzrp-direct-order-form .kfzrp-direct-order-identification {
    width: 100%;
  }
  .kfzrp-direct-order-identification .kfzrp-identification-vehicle-row {
    grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1fr);
  }
  .kfzrp-direct-order-identification .kfzrp-direct-registration-row {
    grid-template-columns: 120px 120px minmax(0, 1fr);
  }
  .kfzrp-direct-order-identification .kfzrp-direct-core-row {
    grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr);
  }
}
@media (max-width: 680px) {
  .kfzrp-direct-order-identification .kfzrp-section-heading {
    flex-direction: column;
  }
  .kfzrp-direct-order-identification .kfzrp-section-heading > p {
    margin-left: 0;
  }
  .kfzrp-direct-order-identification .kfzrp-identification-vehicle-row,
  .kfzrp-direct-order-identification .kfzrp-direct-registration-row,
  .kfzrp-direct-order-identification .kfzrp-direct-core-row,
  .kfzrp-direct-order-identification .kfzrp-direct-text-fields {
    grid-template-columns: 1fr;
    max-width: none;
  }
  .kfzrp-direct-order-identification .kfzrp-direct-mileage-field,
  .kfzrp-direct-order-identification .kfzrp-direct-mileage-field input[name="mileage"] {
    width: 100%;
    max-width: 180px;
  }
  .kfzrp-direct-order-identification .kfzrp-direct-text-field.is-full {
    grid-column: 1;
  }
}


/* Version 1.11.14: einheitlich gerahmte Direktauftrag-Bereiche und neu gewichtete Fehlerfelder. */
.kfzrp-direct-order-form > .kfzrp-card {
  width: min(100%, 1040px);
  justify-self: start;
  margin-left: 0;
  margin-right: auto;
}
.kfzrp-direct-order-form .kfzrp-direct-section-card {
  position: relative;
  overflow: hidden;
  border-width: 1px 1px 1px 4px;
  box-shadow: 0 3px 12px rgba(23, 33, 43, .06);
}
.kfzrp-direct-order-form .kfzrp-direct-customer-card {
  border-left-color: #145da0;
  border-top-color: #caddec;
  border-right-color: #caddec;
  border-bottom-color: #caddec;
}
.kfzrp-direct-order-form .kfzrp-direct-order-identification {
  border-left-color: #28766b;
  border-top-color: #c9dfd9;
  border-right-color: #c9dfd9;
  border-bottom-color: #c9dfd9;
}
.kfzrp-direct-order-form .kfzrp-direct-products-card {
  border-left-color: #654aa5;
  border-top-color: #d9d0ec;
  border-right-color: #d9d0ec;
  border-bottom-color: #d9d0ec;
}
.kfzrp-direct-order-form .kfzrp-direct-handling-card {
  border-left-color: #a46616;
  border-top-color: #ead9bc;
  border-right-color: #ead9bc;
  border-bottom-color: #ead9bc;
}
.kfzrp-direct-order-form .kfzrp-direct-section-card > .kfzrp-section-heading {
  margin: -22px -22px 18px;
  padding: 14px 18px 13px;
}
.kfzrp-direct-order-form .kfzrp-direct-customer-card > .kfzrp-section-heading {
  background: linear-gradient(90deg, #eef6fc, #fff 72%);
  border-bottom-color: #d7e6f1;
}
.kfzrp-direct-order-form .kfzrp-direct-order-identification > .kfzrp-section-heading {
  background: linear-gradient(90deg, #eef8f5, #fff 72%);
  border-bottom-color: #d5e8e3;
}
.kfzrp-direct-order-form .kfzrp-direct-products-card > .kfzrp-section-heading {
  background: linear-gradient(90deg, #f5f1fb, #fff 72%);
  border-bottom-color: #e2daf0;
}
.kfzrp-direct-order-form .kfzrp-direct-handling-card > .kfzrp-section-heading {
  background: linear-gradient(90deg, #fff7e9, #fff 72%);
  border-bottom-color: #efe0c7;
}
/* Die nummerierte Bestellansicht darf die Direktannahme nicht mit „02“ versehen. */
.kfzrp-direct-order-form .kfzrp-direct-order-identification > .kfzrp-section-heading::before {
  content: none !important;
  display: none !important;
}
/* Annahme komplett linksbuendig: Titel und Beschreibung starten an derselben Kante. */
.kfzrp-direct-order-form .kfzrp-direct-order-identification > .kfzrp-section-heading {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
}
.kfzrp-direct-order-form .kfzrp-direct-order-identification > .kfzrp-section-heading > div {
  flex: 0 1 auto;
}
.kfzrp-direct-order-form .kfzrp-direct-order-identification > .kfzrp-section-heading > p {
  margin-left: 0;
  max-width: 760px;
  text-align: left;
}
/* Fehlerbeschreibung gross oben; interne Notiz und Zubehoer kompakt darunter. */
.kfzrp-direct-order-identification .kfzrp-direct-text-fields {
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
}
.kfzrp-direct-order-identification .kfzrp-direct-text-field.is-fault {
  grid-column: 1 / -1;
}
.kfzrp-direct-order-identification .kfzrp-direct-text-field.is-fault textarea {
  min-height: 150px;
}
.kfzrp-direct-order-identification .kfzrp-direct-text-field.is-notes textarea {
  min-height: 68px;
}
.kfzrp-direct-order-identification .kfzrp-direct-text-field.is-accessories textarea {
  min-height: 82px;
}
@media (max-width: 680px) {
  .kfzrp-direct-order-form > .kfzrp-card {
    width: 100%;
  }
  .kfzrp-direct-order-identification .kfzrp-direct-text-field.is-fault {
    grid-column: 1;
  }
}

/* Version 1.11.15: Feinabstimmung Direktauftrag – Kundendatenbreite sowie HSN/TSN/FIN. */
.kfzrp-direct-order-form .kfzrp-customer-data-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 8px;
  row-gap: 10px;
  width: 100%;
  max-width: 960px;
}
.kfzrp-direct-order-form .kfzrp-customer-company,
.kfzrp-direct-order-form .kfzrp-customer-address-extra,
.kfzrp-direct-order-form .kfzrp-customer-address-main,
.kfzrp-direct-order-form .kfzrp-direct-contact-row {
  grid-column: 1 / -1;
}
.kfzrp-direct-order-form .kfzrp-customer-first-name {
  grid-column: 1 / 7;
}
.kfzrp-direct-order-form .kfzrp-customer-last-name {
  grid-column: 7 / 13;
}
.kfzrp-direct-order-form .kfzrp-customer-postcode {
  grid-column: 1 / 3;
}
.kfzrp-direct-order-form .kfzrp-customer-city {
  grid-column: 3 / 9;
}
.kfzrp-direct-order-form .kfzrp-customer-country {
  grid-column: 9 / 13;
}
.kfzrp-direct-order-form .kfzrp-customer-postcode input {
  width: 100%;
  max-width: none;
}
.kfzrp-direct-order-form .kfzrp-direct-contact-row {
  column-gap: 8px;
}

/* HSN und TSN optisch klarer trennen; FIN/VIN bewusst kompakter halten. */
.kfzrp-direct-order-identification .kfzrp-direct-registration-row {
  grid-template-columns: 150px 150px 270px;
  column-gap: 24px;
  row-gap: 12px;
  max-width: 666px;
}
.kfzrp-direct-order-identification .kfzrp-direct-registration-registration-zu2,
.kfzrp-direct-order-identification .kfzrp-direct-registration-registration-zu3,
.kfzrp-direct-order-identification .kfzrp-direct-registration-vin {
  min-width: 0;
}

@media (max-width: 900px) {
  .kfzrp-direct-order-form .kfzrp-customer-data-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    max-width: 960px;
  }
  .kfzrp-direct-order-form .kfzrp-customer-postcode {
    grid-column: 1 / 4;
  }
  .kfzrp-direct-order-form .kfzrp-customer-city {
    grid-column: 4 / 9;
  }
  .kfzrp-direct-order-form .kfzrp-customer-country {
    grid-column: 9 / 13;
  }
  .kfzrp-direct-order-identification .kfzrp-direct-registration-row {
    grid-template-columns: 135px 135px minmax(210px, 250px);
    column-gap: 20px;
    max-width: 560px;
  }
}

@media (max-width: 680px) {
  .kfzrp-direct-order-form .kfzrp-customer-data-grid {
    grid-template-columns: 1fr;
    max-width: none;
  }
  .kfzrp-direct-order-form .kfzrp-customer-company,
  .kfzrp-direct-order-form .kfzrp-customer-first-name,
  .kfzrp-direct-order-form .kfzrp-customer-last-name,
  .kfzrp-direct-order-form .kfzrp-customer-address-extra,
  .kfzrp-direct-order-form .kfzrp-customer-address-main,
  .kfzrp-direct-order-form .kfzrp-customer-postcode,
  .kfzrp-direct-order-form .kfzrp-customer-city,
  .kfzrp-direct-order-form .kfzrp-customer-country,
  .kfzrp-direct-order-form .kfzrp-direct-contact-row {
    grid-column: 1;
  }
  .kfzrp-direct-order-identification .kfzrp-direct-registration-row {
    grid-template-columns: 1fr;
    max-width: none;
    row-gap: 10px;
  }
}

/* Version 1.11.16: Direktauftrag kompakter – Standort/Zahlung zwischen Kunde und Annahme. */
.kfzrp-direct-order-form .kfzrp-direct-basics-row {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(240px, 310px);
  gap: 14px;
  align-items: end;
  width: fit-content;
  max-width: 100%;
  margin: -2px 0 16px;
  padding: 0 4px;
}
.kfzrp-direct-order-form .kfzrp-direct-basics-row > label {
  min-width: 0;
  margin: 0;
}
.kfzrp-direct-order-form .kfzrp-direct-basics-row select {
  width: 100%;
  min-width: 0;
}

/* Normale Kurzfelder nur so breit wie fachlich sinnvoll. Lange Textinhalte bleiben breit. */
.kfzrp-direct-order-form .kfzrp-customer-data-grid input,
.kfzrp-direct-order-form .kfzrp-customer-data-grid select,
.kfzrp-direct-order-form .kfzrp-direct-order-identification input,
.kfzrp-direct-order-form .kfzrp-direct-order-identification select {
  min-width: 0;
}
.kfzrp-direct-order-form .kfzrp-customer-company,
.kfzrp-direct-order-form .kfzrp-customer-address-extra,
.kfzrp-direct-order-form .kfzrp-customer-address-main {
  grid-column: 1 / 10;
}
.kfzrp-direct-order-form .kfzrp-direct-contact-row {
  grid-column: 1 / 10;
  max-width: 720px;
}
.kfzrp-direct-order-form .kfzrp-customer-country {
  max-width: 230px;
}
.kfzrp-direct-order-form .kfzrp-identification-vehicle-row,
.kfzrp-direct-order-form .kfzrp-direct-core-row,
.kfzrp-direct-order-form .kfzrp-direct-registration-row {
  width: fit-content;
  max-width: 100%;
}
.kfzrp-direct-order-form .kfzrp-direct-products-card {
  width: min(100%, 960px);
}

@media (max-width: 680px) {
  .kfzrp-direct-order-form .kfzrp-direct-basics-row {
    grid-template-columns: 1fr;
    width: 100%;
    padding: 0;
  }
  .kfzrp-direct-order-form .kfzrp-customer-company,
  .kfzrp-direct-order-form .kfzrp-customer-address-extra,
  .kfzrp-direct-order-form .kfzrp-customer-address-main,
  .kfzrp-direct-order-form .kfzrp-direct-contact-row {
    grid-column: 1;
    max-width: none;
  }
}

/* Version 1.11.17: Produktpicker breit in erster Ebene und gemeinsame rechte Inhaltskante. */
.kfzrp-direct-order-form {
  --kfzrp-direct-content-width: 960px;
}

/* Alle großen Direktauftrag-Bereiche schließen rechts an derselben Kante wie Nachname ab. */
.kfzrp-direct-order-form .kfzrp-customer-data-grid,
.kfzrp-direct-order-form .kfzrp-direct-order-identification .kfzrp-identification-vehicle-row,
.kfzrp-direct-order-form .kfzrp-direct-order-identification .kfzrp-direct-registration-row,
.kfzrp-direct-order-form .kfzrp-direct-order-identification .kfzrp-direct-core-row,
.kfzrp-direct-order-form .kfzrp-direct-order-identification .kfzrp-direct-text-fields,
.kfzrp-direct-order-form .kfzrp-direct-order-lines {
  width: 100%;
  max-width: var(--kfzrp-direct-content-width);
}
.kfzrp-direct-order-form .kfzrp-direct-products-card {
  width: min(100%, 1040px);
}
.kfzrp-direct-order-form .kfzrp-customer-company,
.kfzrp-direct-order-form .kfzrp-customer-address-extra,
.kfzrp-direct-order-form .kfzrp-customer-address-main,
.kfzrp-direct-order-form .kfzrp-direct-contact-row {
  grid-column: 1 / -1;
  max-width: none;
}

/* Annahmestandort/Zahlungsart bleiben absichtlich kompakt; Stern bleibt in der Beschriftungszeile. */
.kfzrp-direct-order-form .kfzrp-direct-field-label {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  width: max-content;
  max-width: 100%;
}
.kfzrp-direct-order-form .kfzrp-direct-field-label .kfzrp-required {
  display: inline;
  line-height: 1;
}

/* Produkt / Leistung steht alleine in der ersten Zeile und nutzt die volle Inhaltsbreite. */
.kfzrp-direct-order-form .kfzrp-direct-order-line-search {
  grid-template-columns: 36px 96px 180px 42px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 10px;
  align-items: end;
}
.kfzrp-direct-order-form .kfzrp-direct-order-line-search .kfzrp-direct-line-number {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
}
.kfzrp-direct-order-form .kfzrp-direct-order-line-search .kfzrp-direct-product-picker {
  grid-column: 2 / -1;
  grid-row: 1;
  width: 100%;
  min-width: 0;
}
.kfzrp-direct-order-form .kfzrp-direct-order-line-search .kfzrp-direct-product-qty {
  grid-column: 2;
  grid-row: 2;
}
.kfzrp-direct-order-form .kfzrp-direct-order-line-search .kfzrp-direct-product-price {
  grid-column: 3;
  grid-row: 2;
}
.kfzrp-direct-order-form .kfzrp-direct-order-line-search .kfzrp-direct-line-remove {
  grid-column: 4;
  grid-row: 2;
}
.kfzrp-direct-order-form .kfzrp-direct-product-picker .kfzrp-product-search-results {
  left: 0;
  right: 0;
  width: 100%;
  max-width: none;
}
.kfzrp-direct-order-form .kfzrp-direct-product-picker .kfzrp-product-search-result {
  min-height: 54px;
  padding-left: 15px !important;
  padding-right: 15px !important;
}

@media (max-width: 760px) {
  .kfzrp-direct-order-form .kfzrp-direct-order-line-search {
    grid-template-columns: 34px minmax(86px, 110px) minmax(130px, 1fr) 42px;
  }
  .kfzrp-direct-order-form .kfzrp-direct-order-line-search .kfzrp-direct-product-picker {
    grid-column: 2 / -1;
  }
  .kfzrp-direct-order-form .kfzrp-direct-order-line-search .kfzrp-direct-product-qty {
    grid-column: 2;
  }
  .kfzrp-direct-order-form .kfzrp-direct-order-line-search .kfzrp-direct-product-price {
    grid-column: 3;
  }
  .kfzrp-direct-order-form .kfzrp-direct-order-line-search .kfzrp-direct-line-remove {
    grid-column: 4;
  }
}
@media (max-width: 560px) {
  .kfzrp-direct-order-form .kfzrp-direct-order-line-search {
    grid-template-columns: 34px minmax(0, 1fr) 42px;
    grid-template-rows: auto auto auto;
  }
  .kfzrp-direct-order-form .kfzrp-direct-order-line-search .kfzrp-direct-product-picker {
    grid-column: 2 / -1;
    grid-row: 1;
  }
  .kfzrp-direct-order-form .kfzrp-direct-order-line-search .kfzrp-direct-product-qty {
    grid-column: 2;
    grid-row: 2;
  }
  .kfzrp-direct-order-form .kfzrp-direct-order-line-search .kfzrp-direct-product-price {
    grid-column: 2;
    grid-row: 3;
  }
  .kfzrp-direct-order-form .kfzrp-direct-order-line-search .kfzrp-direct-line-remove {
    grid-column: 3;
    grid-row: 3;
  }
}

/* Version 1.11.18: Kilometerstand neben FIN/VIN und identische Annahme-Struktur in der Bestellansicht. */
.kfzrp-direct-order-identification .kfzrp-direct-registration-row,
.kfzrp-order-section-identification .kfzrp-direct-registration-row {
  display: grid;
  grid-template-columns: 140px 140px 250px 150px;
  column-gap: 18px;
  row-gap: 12px;
  align-items: start;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 15px;
}
.kfzrp-direct-order-identification .kfzrp-direct-registration-row > div,
.kfzrp-order-section-identification .kfzrp-direct-registration-row > div,
.kfzrp-order-section-identification .kfzrp-direct-registration-row label,
.kfzrp-order-section-identification .kfzrp-direct-registration-row input {
  min-width: 0;
  width: 100%;
}
.kfzrp-direct-order-identification .kfzrp-direct-mileage-field,
.kfzrp-order-section-identification .kfzrp-direct-mileage-field,
.kfzrp-direct-order-identification .kfzrp-direct-mileage-field input[name="mileage"],
.kfzrp-order-section-identification .kfzrp-direct-mileage-field input[name="mileage"] {
  width: 150px;
  max-width: 150px;
}

/* Nach dem Verschieben des Kilometerstands bleiben Bauteil und Teilenummer als klare Zweierreihe. */
.kfzrp-direct-order-identification .kfzrp-direct-core-row,
.kfzrp-order-section-identification .kfzrp-direct-core-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
  gap: 14px;
  align-items: start;
  width: min(100%, 720px);
  max-width: 100%;
  margin-bottom: 15px;
}
.kfzrp-order-section-identification .kfzrp-direct-core-row > div,
.kfzrp-order-section-identification .kfzrp-direct-core-row label,
.kfzrp-order-section-identification .kfzrp-direct-core-row input {
  min-width: 0;
  width: 100%;
}

/* Bestellansicht Identifikation optisch wie die Annahme gliedern. */
.kfzrp-order-section-identification .kfzrp-collapsible-body {
  max-width: 960px;
}
.kfzrp-order-section-identification .kfzrp-direct-subsection-title {
  margin: 2px 0 9px;
  padding: 5px 8px;
  border-left: 3px solid #28766b;
  background: #f4faf8;
  color: #355e58;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.kfzrp-order-section-identification .kfzrp-identification-vehicle-row {
  grid-template-columns: 100px minmax(220px, .9fr) minmax(260px, 1.1fr);
  gap: 14px;
  width: min(100%, 960px);
  max-width: 100%;
  margin: 0 0 15px;
}
.kfzrp-order-section-identification .kfzrp-identification-vehicle-type input[name="vehicle_type"] {
  width: 100px;
  max-width: 100px;
}
.kfzrp-order-section-identification .kfzrp-direct-text-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  width: min(100%, 960px);
  max-width: 100%;
}
.kfzrp-order-section-identification .kfzrp-direct-text-field,
.kfzrp-order-section-identification .kfzrp-direct-text-field > label {
  min-width: 0;
  width: 100%;
}
.kfzrp-order-section-identification .kfzrp-direct-text-field textarea {
  min-height: 92px;
}
.kfzrp-order-section-identification .kfzrp-direct-text-field.is-full {
  grid-column: 1 / -1;
}
.kfzrp-order-section-identification .kfzrp-direct-text-field.is-full textarea {
  min-height: 120px;
}

@media (max-width: 900px) {
  .kfzrp-direct-order-identification .kfzrp-direct-registration-row,
  .kfzrp-order-section-identification .kfzrp-direct-registration-row {
    grid-template-columns: 125px 125px minmax(200px, 240px) 140px;
    column-gap: 14px;
  }
  .kfzrp-order-section-identification .kfzrp-identification-vehicle-row {
    grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1fr);
  }
  .kfzrp-order-section-identification .kfzrp-identification-vehicle-type input[name="vehicle_type"] {
    width: 96px;
    max-width: 96px;
  }
}

@media (max-width: 760px) {
  .kfzrp-direct-order-identification .kfzrp-direct-registration-row,
  .kfzrp-order-section-identification .kfzrp-direct-registration-row {
    grid-template-columns: 120px 120px minmax(0, 1fr);
  }
  .kfzrp-direct-order-identification .kfzrp-direct-mileage-field,
  .kfzrp-order-section-identification .kfzrp-direct-mileage-field {
    grid-column: 3;
  }
  .kfzrp-direct-order-identification .kfzrp-direct-core-row,
  .kfzrp-order-section-identification .kfzrp-direct-core-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
  }
}

@media (max-width: 620px) {
  .kfzrp-direct-order-identification .kfzrp-direct-registration-row,
  .kfzrp-order-section-identification .kfzrp-direct-registration-row,
  .kfzrp-direct-order-identification .kfzrp-direct-core-row,
  .kfzrp-order-section-identification .kfzrp-direct-core-row,
  .kfzrp-order-section-identification .kfzrp-identification-vehicle-row,
  .kfzrp-order-section-identification .kfzrp-direct-text-fields {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: none;
  }
  .kfzrp-direct-order-identification .kfzrp-direct-mileage-field,
  .kfzrp-order-section-identification .kfzrp-direct-mileage-field {
    grid-column: 1;
  }
  .kfzrp-order-section-identification .kfzrp-identification-vehicle-type input[name="vehicle_type"],
  .kfzrp-direct-order-identification .kfzrp-direct-mileage-field input[name="mileage"],
  .kfzrp-order-section-identification .kfzrp-direct-mileage-field input[name="mileage"] {
    width: 100%;
    max-width: 180px;
  }
  .kfzrp-order-section-identification .kfzrp-direct-text-field.is-full {
    grid-column: 1;
  }
}

/* Version 1.11.20: Produktpositionen in der Bestellansicht klar und ohne zusätzliche Intro-Ebene. */
.kfzrp-order-add-unified .kfzrp-order-product-picker {
  width: 100%;
  max-width: 960px;
}
.kfzrp-order-add-unified .kfzrp-order-product-picker > label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
}
.kfzrp-order-add-unified .kfzrp-product-search-control,
.kfzrp-order-add-unified .kfzrp-product-search-results {
  width: 100%;
  max-width: none;
}
.kfzrp-order-add-unified .kfzrp-order-position-fields {
  display: grid;
  grid-template-columns: 100px 190px 110px;
  gap: 12px;
  align-items: end;
  width: fit-content;
  max-width: 100%;
  margin-top: 12px;
}
.kfzrp-order-add-unified .kfzrp-order-position-add-row {
  margin-top: 10px;
}
.kfzrp-order-add-unified .kfzrp-position-add-button,
.kfzrp-portal .kfzrp-order-add-unified button.kfzrp-position-add-button {
  min-width: 170px !important;
}
@media (max-width: 620px) {
  .kfzrp-order-add-unified .kfzrp-order-position-fields {
    grid-template-columns: minmax(80px, 100px) minmax(140px, 1fr) minmax(95px, 110px);
    width: 100%;
  }
}
@media (max-width: 430px) {
  .kfzrp-order-add-unified .kfzrp-order-position-fields {
    grid-template-columns: 1fr;
  }
}


/* Version 1.11.21: Leere zweite Produkt-/Leistungsebene ausblenden; nur Position-hinzufügen-Button zeigen. */
.kfzrp-order-add-unified .kfzrp-order-add-fields[hidden] {
  display: none !important;
}
.kfzrp-order-add-unified.is-collapsed {
  margin-top: 14px;
  padding: 0;
  border-top: 0;
  background: transparent;
}
.kfzrp-order-add-unified.is-collapsed .kfzrp-order-position-add-row {
  margin-top: 0;
}
.kfzrp-order-add-unified:not(.is-collapsed) .kfzrp-order-add-fields {
  display: block;
}


/* Version 1.11.22: Positionsrabatt und dauerhaft sichtbarer Hinzufügen-Button. */
.kfzrp-order-add-unified.is-collapsed .kfzrp-order-position-add-row {
  display: block !important;
}
.kfzrp-order-add-unified .kfzrp-order-position-add-row {
  grid-column: 1 / -1;
}
.kfzrp-order-item-edit-fields input[name^="order_item_discount"],
.kfzrp-order-position-fields input[name="order_add_position_discount"] {
  max-width: 110px;
}
@media (max-width: 900px) {
  .kfzrp-order-item-edit-fields {
    grid-template-columns: 100px minmax(150px, 1fr) 105px;
  }
  .kfzrp-order-item-current-total {
    grid-column: 1 / -1;
  }
}
@media (max-width: 620px) {
  .kfzrp-order-item-edit-fields,
  .kfzrp-order-add-unified .kfzrp-order-position-fields {
    grid-template-columns: 1fr;
  }
  .kfzrp-order-item-edit-fields input[name^="order_item_discount"],
  .kfzrp-order-position-fields input[name="order_add_position_discount"] {
    max-width: 100%;
  }
}


/* 1.11.26: Schnellaktionsmenü darf in der Bestellübersicht nicht von der horizontalen Tabellen-Scrollbox abgeschnitten werden. */
.kfzrp-portal .kfzrp-order-table-wrap.kfzrp-quick-actions-open {
  overflow: visible !important;
  scrollbar-gutter: auto !important;
}

.kfzrp-portal .kfzrp-order-table-wrap.kfzrp-quick-actions-open .kfzrp-quick-actions-menu {
  z-index: 1000 !important;
}

/* 1.11.27: Schnellaktionen werden beim Öffnen in den Body verschoben.
 * Dadurch kann keine Tabellen-/Theme-Scrollbox das Menü mehr abschneiden. */
.kfzrp-quick-actions-menu.kfzrp-quick-actions-floating {
  position: fixed !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  z-index: 2147483000 !important;
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Version 1.11.31: Rechnungsstorno und Auftragslöschung direkt in der kompakten Bestellansicht. */
.kfzrp-workflow-section-invoice .kfzrp-compact-danger-details{
  grid-column:1/-1;
  width:100%;
  margin-top:5px;
  padding:7px 8px;
  border:1px solid #e5bcbc;
  border-radius:7px;
  background:#fff7f7;
}
.kfzrp-workflow-section-invoice .kfzrp-compact-danger-details summary{
  color:#932929;
  font-size:10px;
  font-weight:800;
  cursor:pointer;
}
.kfzrp-workflow-section-invoice .kfzrp-compact-danger-details .kfzrp-cancel-invoice-form{
  gap:7px;
  margin-top:8px;
}
.kfzrp-workflow-section-invoice .kfzrp-compact-danger-details label{
  display:grid;
  gap:4px;
  font-size:9px;
  font-weight:700;
}
.kfzrp-workflow-section-invoice .kfzrp-compact-danger-details textarea{
  min-height:58px;
  resize:vertical;
}
.kfzrp-compact-cancelled-note{
  display:block;
  grid-column:1/-1;
  width:100%;
  margin-top:4px;
  padding:5px 7px;
  border:1px solid #dfc9c9;
  border-radius:6px;
  background:#faf5f5;
  color:#7f3c3c;
  font-size:9px;
  font-weight:700;
}
.kfzrp-workflow-section-admin{
  border-color:#d8aaaa !important;
  background:#fffafa !important;
}
.kfzrp-workflow-section-admin > strong{
  color:#8f2828;
}
.kfzrp-compact-delete-order-form{
  width:100%;
}
.kfzrp-compact-delete-order-form .kfzrp-button{
  width:100%;
}


/* Version 1.11.32: separaten Verwaltung-Reiter entfernen; Auftragslöschung kompakt im Auftrag-Bereich. */
.kfzrp-order-inline-delete-form {
  margin: 2px 0 0;
}
.kfzrp-text-button-danger {
  color: #b42318 !important;
  font-weight: 700;
}
.kfzrp-text-button-danger:hover,
.kfzrp-text-button-danger:focus-visible {
  color: #8f1d13 !important;
  text-decoration: underline;
}

/* Version 1.11.33: auswählbare Gesamtdesigns für das Mitarbeiterportal. */
.kfzrp-design-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.kfzrp-design-choice {
  position: relative;
  display: grid !important;
  grid-template-columns: 116px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 14px !important;
  min-height: 126px;
  padding: 14px;
  border: 2px solid #d7e1e8;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.kfzrp-design-choice:hover {
  border-color: #9cb9cd;
  box-shadow: 0 5px 16px rgba(23,33,43,.08);
  transform: translateY(-1px);
}
.kfzrp-design-choice > input[type=radio] {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  margin: 0;
}
.kfzrp-design-choice:has(> input[type=radio]:checked) {
  border-color: #145da0;
  box-shadow: 0 0 0 3px rgba(20,93,160,.1);
}
.kfzrp-design-preview {
  display: block;
  overflow: hidden;
  width: 116px;
  height: 88px;
  border: 1px solid #ccd5dc;
  border-radius: 8px;
  background: #f4f7f9;
}
.kfzrp-design-preview-head { display:block; height:20px; background:#17212b; }
.kfzrp-design-preview-tabs { display:flex; gap:3px; padding:5px; background:#e9edf1; }
.kfzrp-design-preview-tabs i { display:block; width:22px; height:7px; border-radius:3px; background:#fff; }
.kfzrp-design-preview-body { display:grid; grid-template-columns:repeat(2,1fr); gap:5px; padding:7px; }
.kfzrp-design-preview-body i { display:block; height:20px; border:1px solid #d8dde3; border-radius:4px; background:#fff; }
.kfzrp-design-preview-body i:last-child { grid-column:1/-1; height:14px; }
.kfzrp-design-choice-copy { display:flex; flex-direction:column; gap:5px; padding-right:20px; }
.kfzrp-design-choice-copy strong { color:#17212b; font-size:16px; }
.kfzrp-design-choice-copy small { color:#647180; font-weight:500; line-height:1.45; }
.kfzrp-design-choice-modern .kfzrp-design-preview { border-radius:13px; background:#f1f6f9; box-shadow:0 5px 14px rgba(15,57,82,.12); }
.kfzrp-design-choice-modern .kfzrp-design-preview-head { background:linear-gradient(135deg,#123c56,#176da0); }
.kfzrp-design-choice-modern .kfzrp-design-preview-body i { border:0; border-radius:8px; box-shadow:0 2px 7px rgba(15,57,82,.1); }
.kfzrp-design-choice-compact .kfzrp-design-preview { border-radius:5px; }
.kfzrp-design-choice-compact .kfzrp-design-preview-head { height:16px; background:#23313d; }
.kfzrp-design-choice-compact .kfzrp-design-preview-tabs { padding:3px; }
.kfzrp-design-choice-compact .kfzrp-design-preview-body { gap:3px; padding:4px; }
.kfzrp-design-choice-compact .kfzrp-design-preview-body i { height:16px; border-radius:3px; }
.kfzrp-design-choice-clear .kfzrp-design-preview { border:2px solid #aebac4; border-radius:2px; background:#fff; }
.kfzrp-design-choice-clear .kfzrp-design-preview-head { background:#234d67; }
.kfzrp-design-choice-clear .kfzrp-design-preview-tabs { background:#fff; border-bottom:1px solid #aebac4; }
.kfzrp-design-choice-clear .kfzrp-design-preview-tabs i,
.kfzrp-design-choice-clear .kfzrp-design-preview-body i { border-radius:0; border-color:#9eabb5; box-shadow:none; }
@media (max-width: 760px) {
  .kfzrp-design-choice-grid { grid-template-columns:1fr; }
}
@media (max-width: 480px) {
  .kfzrp-design-choice { grid-template-columns:1fr !important; }
}

/* MODERN – weiche Karten, größere Radien und ruhigere Flächen. */
.kfzrp-portal.kfzrp-theme-modern {
  --kfzrp-border:#d7e4ec;
  --kfzrp-text:#142732;
  --kfzrp-muted:#60747f;
  --kfzrp-bg:#f2f6f8;
  --kfzrp-primary:#0f6799;
  --kfzrp-primary-dark:#0b4f78;
  --kfzrp-soft-blue:#eaf4f8;
  font-size:15px;
}
.kfzrp-theme-modern .kfzrp-header {
  padding:24px 28px;
  border-radius:18px 18px 0 0;
  background:linear-gradient(135deg,#112f42 0%,#135f8b 100%);
  box-shadow:0 12px 30px rgba(18,55,76,.15);
}
.kfzrp-theme-modern .kfzrp-tabs {
  padding:10px;
  gap:6px;
  border-radius:0 0 18px 18px;
  background:#eaf1f5;
}
.kfzrp-theme-modern .kfzrp-tabs a,
.kfzrp-theme-modern .kfzrp-settings-tabs a { border-radius:10px; }
.kfzrp-theme-modern .kfzrp-card,
.kfzrp-theme-modern .kfzrp-filter,
.kfzrp-theme-modern .kfzrp-table-wrap,
.kfzrp-theme-modern .kfzrp-overview-stat,
.kfzrp-theme-modern .kfzrp-settings-section,
.kfzrp-theme-modern .kfzrp-order-total {
  border-color:#d9e5ec;
  border-radius:15px;
  box-shadow:0 6px 20px rgba(29,65,84,.07);
}
.kfzrp-theme-modern .kfzrp-card { padding:24px; }
.kfzrp-theme-modern .kfzrp-button {
  min-height:44px;
  border-radius:10px;
  box-shadow:0 3px 8px rgba(15,103,153,.16);
}
.kfzrp-theme-modern input[type=text],
.kfzrp-theme-modern input[type=search],
.kfzrp-theme-modern input[type=email],
.kfzrp-theme-modern input[type=password],
.kfzrp-theme-modern input[type=number],
.kfzrp-theme-modern input[type=date],
.kfzrp-theme-modern input[type=file],
.kfzrp-theme-modern select,
.kfzrp-theme-modern textarea { border-radius:9px; background:#fbfdfe; }
.kfzrp-theme-modern .kfzrp-table th { background:#eef4f7; }
.kfzrp-theme-modern .kfzrp-section-heading { border-bottom-color:#e4edf2; }
.kfzrp-theme-modern .kfzrp-settings-tabs { border-radius:13px; background:#edf4f7; }

/* KOMPAKT – weniger Leerraum, kleinere Bedienelemente. */
.kfzrp-portal.kfzrp-theme-compact {
  --kfzrp-border:#cfd7de;
  --kfzrp-text:#17212b;
  --kfzrp-muted:#5e6974;
  --kfzrp-primary:#145da0;
  --kfzrp-primary-dark:#0f477b;
  font-size:13px;
  line-height:1.38;
}
.kfzrp-theme-compact .kfzrp-header { padding:14px 18px; border-radius:7px 7px 0 0; }
.kfzrp-theme-compact .kfzrp-header h2 { font-size:1.25rem; }
.kfzrp-theme-compact .kfzrp-tabs { padding:5px; margin-bottom:14px; border-radius:0 0 7px 7px; }
.kfzrp-theme-compact .kfzrp-tabs a { padding:7px 11px; border-radius:5px; }
.kfzrp-theme-compact .kfzrp-toolbar { margin-bottom:10px; }
.kfzrp-theme-compact .kfzrp-toolbar h3 { font-size:1.3rem; }
.kfzrp-theme-compact .kfzrp-filter { gap:8px; padding:10px; margin-bottom:10px; }
.kfzrp-theme-compact .kfzrp-card { padding:13px; }
.kfzrp-theme-compact .kfzrp-card,
.kfzrp-theme-compact .kfzrp-filter,
.kfzrp-theme-compact .kfzrp-table-wrap,
.kfzrp-theme-compact .kfzrp-overview-stat,
.kfzrp-theme-compact .kfzrp-settings-section,
.kfzrp-theme-compact .kfzrp-order-total { border-radius:6px; box-shadow:none; }
.kfzrp-theme-compact .kfzrp-section-heading { gap:10px; padding-bottom:8px; margin-bottom:10px; }
.kfzrp-theme-compact .kfzrp-section-heading h4 { font-size:1.05rem; }
.kfzrp-theme-compact .kfzrp-section-heading p { font-size:11px; }
.kfzrp-theme-compact .kfzrp-grid { gap:9px; }
.kfzrp-theme-compact .kfzrp-form { gap:10px; }
.kfzrp-theme-compact .kfzrp-button { min-height:34px; padding:6px 11px; border-radius:5px; font-size:12px; }
.kfzrp-theme-compact .kfzrp-button-small { min-height:29px; padding:4px 8px; }
.kfzrp-theme-compact input[type=text],
.kfzrp-theme-compact input[type=search],
.kfzrp-theme-compact input[type=email],
.kfzrp-theme-compact input[type=password],
.kfzrp-theme-compact input[type=number],
.kfzrp-theme-compact input[type=date],
.kfzrp-theme-compact input[type=file],
.kfzrp-theme-compact select,
.kfzrp-theme-compact textarea { min-height:34px; padding:6px 8px; border-radius:4px; }
.kfzrp-theme-compact .kfzrp-table th,
.kfzrp-theme-compact .kfzrp-table td { padding:8px 9px; }
.kfzrp-theme-compact .kfzrp-table th { font-size:10px; }
.kfzrp-theme-compact .kfzrp-order-overview { gap:7px; margin-bottom:10px; }
.kfzrp-theme-compact .kfzrp-overview-stat { padding:10px 10px 10px 14px; }
.kfzrp-theme-compact .kfzrp-settings-tabs { gap:4px; padding:4px; margin-bottom:10px; border-radius:6px; }
.kfzrp-theme-compact .kfzrp-settings-tabs a { min-height:31px; padding:5px 9px; border-radius:4px; font-size:11px; }
.kfzrp-theme-compact .kfzrp-settings-section { padding:12px; }

/* KLAR – flacher, geradliniger, stärkere Konturen und kaum Schatten. */
.kfzrp-portal.kfzrp-theme-clear {
  --kfzrp-border:#aeb9c2;
  --kfzrp-text:#15232c;
  --kfzrp-muted:#576772;
  --kfzrp-bg:#f7f8f9;
  --kfzrp-primary:#1d5878;
  --kfzrp-primary-dark:#153f57;
  --kfzrp-soft-blue:#eef3f6;
}
.kfzrp-theme-clear .kfzrp-header {
  padding:19px 22px;
  border:2px solid #234d67;
  border-bottom:0;
  border-radius:3px 3px 0 0;
  background:#234d67;
}
.kfzrp-theme-clear .kfzrp-tabs {
  gap:0;
  padding:0;
  border:2px solid #aeb9c2;
  border-top:0;
  border-radius:0 0 3px 3px;
  background:#fff;
}
.kfzrp-theme-clear .kfzrp-tabs a { border-radius:0; border-right:1px solid #d2d8dd; }
.kfzrp-theme-clear .kfzrp-tabs a.is-active { background:#eaf0f4; box-shadow:inset 0 -3px 0 #1d5878; }
.kfzrp-theme-clear .kfzrp-card,
.kfzrp-theme-clear .kfzrp-filter,
.kfzrp-theme-clear .kfzrp-table-wrap,
.kfzrp-theme-clear .kfzrp-overview-stat,
.kfzrp-theme-clear .kfzrp-settings-section,
.kfzrp-theme-clear .kfzrp-order-total {
  border:1px solid #aeb9c2;
  border-radius:3px;
  box-shadow:none;
}
.kfzrp-theme-clear .kfzrp-button { border-radius:3px; box-shadow:none; }
.kfzrp-theme-clear input[type=text],
.kfzrp-theme-clear input[type=search],
.kfzrp-theme-clear input[type=email],
.kfzrp-theme-clear input[type=password],
.kfzrp-theme-clear input[type=number],
.kfzrp-theme-clear input[type=date],
.kfzrp-theme-clear input[type=file],
.kfzrp-theme-clear select,
.kfzrp-theme-clear textarea { border-color:#9eabb5; border-radius:2px; box-shadow:none; }
.kfzrp-theme-clear .kfzrp-table th { background:#e9eef1; border-bottom:2px solid #9eabb5; }
.kfzrp-theme-clear .kfzrp-table td { border-bottom-color:#cfd6db; }
.kfzrp-theme-clear .kfzrp-settings-tabs { gap:0; padding:0; border-color:#aeb9c2; border-radius:3px; background:#fff; }
.kfzrp-theme-clear .kfzrp-settings-tabs a { border-radius:0; border-right:1px solid #d2d8dd; }
.kfzrp-theme-clear .kfzrp-section-heading { border-bottom-color:#aeb9c2; }
.kfzrp-theme-clear .kfzrp-overview-stat::before { width:5px; }


/* 1.11.36: Hinweis für vom Kunden frei gewählte, noch nicht bestätigte Fahrzeugzuordnung. */
.kfzrp-vehicle-warning{display:grid;gap:3px;margin:0 0 14px;padding:11px 13px;border:1px solid #e2b85a;border-radius:9px;background:#fff8df;color:#5f4710}.kfzrp-vehicle-warning strong{font-size:13px}.kfzrp-vehicle-warning span{font-size:12px;line-height:1.45}

/* 1.11.42: alte WooCommerce-Kategorienzuordnung im Produkteditor nachrangig. */
.kfzrp-product-categories-legacy {
  padding: 0;
  overflow: hidden;
}

.kfzrp-product-categories-legacy > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
  background: #f8fafc;
  border-radius: inherit;
}

.kfzrp-product-categories-legacy > summary::-webkit-details-marker { display: none; }
.kfzrp-product-categories-legacy > summary::marker { content: ''; }

.kfzrp-product-categories-summary > span:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.kfzrp-product-categories-summary strong {
  color: #17212b;
  font-size: 1rem;
  line-height: 1.25;
}

.kfzrp-product-categories-summary small {
  color: #708090;
  font-size: 12px;
  font-weight: 500;
}

.kfzrp-product-categories-summary-icon {
  flex: 0 0 auto;
  color: #526576;
  font-size: 18px;
  line-height: 1;
  transition: transform .18s ease;
}

.kfzrp-product-categories-legacy[open] > summary {
  border-bottom: 1px solid #e1e8ee;
  border-radius: 0;
}

.kfzrp-product-categories-legacy[open] .kfzrp-product-categories-summary-icon {
  transform: rotate(180deg);
}

.kfzrp-product-categories-body {
  padding: 18px 22px 22px;
}

@media (max-width: 720px) {
  .kfzrp-product-categories-legacy > summary,
  .kfzrp-product-categories-body {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Version 1.11.48: Fahrzeugart ausblenden, Hersteller/Modell zweispaltig; Baujahr + FIN sowie HSN/TSN/km wie im Kundenformular. */
.kfzrp-order-section-identification .kfzrp-identification-vehicle-row,
.kfzrp-direct-order-identification .kfzrp-identification-vehicle-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr);
  gap: 14px;
  width: min(100%, 720px);
  max-width: 100%;
  margin: 0 0 15px;
}
.kfzrp-order-section-identification .kfzrp-identification-vehicle-brand,
.kfzrp-order-section-identification .kfzrp-identification-vehicle-model,
.kfzrp-direct-order-identification .kfzrp-identification-vehicle-brand,
.kfzrp-direct-order-identification .kfzrp-identification-vehicle-model,
.kfzrp-order-section-identification .kfzrp-identification-vehicle-brand label,
.kfzrp-order-section-identification .kfzrp-identification-vehicle-model label,
.kfzrp-direct-order-identification .kfzrp-identification-vehicle-brand label,
.kfzrp-direct-order-identification .kfzrp-identification-vehicle-model label,
.kfzrp-order-section-identification .kfzrp-identification-vehicle-brand select,
.kfzrp-order-section-identification .kfzrp-identification-vehicle-model select,
.kfzrp-direct-order-identification .kfzrp-identification-vehicle-brand select,
.kfzrp-direct-order-identification .kfzrp-identification-vehicle-model select {
  min-width: 0;
  width: 100%;
}
.kfzrp-order-section-identification .kfzrp-direct-year-vin-row,
.kfzrp-direct-order-identification .kfzrp-direct-year-vin-row {
  display: grid;
  grid-template-columns: 180px minmax(300px, 1fr);
  gap: 14px;
  width: min(100%, 720px);
  max-width: 100%;
  margin: 0 0 12px;
}
.kfzrp-order-section-identification .kfzrp-direct-year-vin-row > div,
.kfzrp-direct-order-identification .kfzrp-direct-year-vin-row > div,
.kfzrp-order-section-identification .kfzrp-direct-year-vin-row label,
.kfzrp-direct-order-identification .kfzrp-direct-year-vin-row label,
.kfzrp-order-section-identification .kfzrp-direct-year-vin-row input,
.kfzrp-direct-order-identification .kfzrp-direct-year-vin-row input {
  min-width: 0;
  width: 100%;
}
.kfzrp-order-section-identification .kfzrp-direct-registration-row,
.kfzrp-direct-order-identification .kfzrp-direct-registration-row {
  display: grid;
  grid-template-columns: 160px 160px 180px;
  gap: 14px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 15px;
}
.kfzrp-order-section-identification .kfzrp-direct-mileage-field,
.kfzrp-direct-order-identification .kfzrp-direct-mileage-field,
.kfzrp-order-section-identification .kfzrp-direct-mileage-field input[name="mileage"],
.kfzrp-direct-order-identification .kfzrp-direct-mileage-field input[name="mileage"] {
  width: 180px;
  max-width: 180px;
}
@media (max-width: 760px) {
  .kfzrp-order-section-identification .kfzrp-direct-year-vin-row,
  .kfzrp-direct-order-identification .kfzrp-direct-year-vin-row {
    grid-template-columns: 150px minmax(0, 1fr);
    width: 100%;
  }
  .kfzrp-order-section-identification .kfzrp-direct-registration-row,
  .kfzrp-direct-order-identification .kfzrp-direct-registration-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }
  .kfzrp-order-section-identification .kfzrp-direct-mileage-field,
  .kfzrp-direct-order-identification .kfzrp-direct-mileage-field,
  .kfzrp-order-section-identification .kfzrp-direct-mileage-field input[name="mileage"],
  .kfzrp-direct-order-identification .kfzrp-direct-mileage-field input[name="mileage"] {
    width: 100%;
    max-width: none;
  }
}
@media (max-width: 620px) {
  .kfzrp-order-section-identification .kfzrp-identification-vehicle-row,
  .kfzrp-direct-order-identification .kfzrp-identification-vehicle-row,
  .kfzrp-order-section-identification .kfzrp-direct-year-vin-row,
  .kfzrp-direct-order-identification .kfzrp-direct-year-vin-row,
  .kfzrp-order-section-identification .kfzrp-direct-registration-row,
  .kfzrp-direct-order-identification .kfzrp-direct-registration-row {
    grid-template-columns: 1fr;
    width: 100%;
  }
}


/* 1.11.56: Portal-Kopf kompakter und Seitentitel aus dem Website-Template ausblenden. */
body.kfzrp-portal-page .wp-block-post-title,
body.kfzrp-portal-page .entry-title,
body.kfzrp-portal-page .page-title {
  display:none !important;
}
body.kfzrp-portal-page .kfzrp-header h2 {
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
}


/* 1.11.57: Bestellstatus kompakt untereinander und Portal bis an den oberen Seitenrand. */
body.kfzrp-portal-page {
  margin-top:0 !important;
  padding-top:0 !important;
}
body.kfzrp-portal-page .wp-site-blocks,
body.kfzrp-portal-page main,
body.kfzrp-portal-page main.wp-block-group,
body.kfzrp-portal-page .site-main,
body.kfzrp-portal-page .entry-content,
body.kfzrp-portal-page .wp-block-post-content {
  margin-top:0 !important;
  padding-top:0 !important;
  margin-block-start:0 !important;
  padding-block-start:0 !important;
}
body.kfzrp-portal-page .wp-block-post-content > :first-child,
body.kfzrp-portal-page .entry-content > :first-child {
  margin-top:0 !important;
  margin-block-start:0 !important;
}
body.kfzrp-portal-page .kfzrp-portal {
  margin-top:0 !important;
}

.kfzrp-order-table .kfzrp-table-status-unified {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:4px;
  min-height:0;
}
.kfzrp-order-table .kfzrp-table-status-unified .kfzrp-status-value {
  width:auto;
  max-width:100%;
  min-height:24px;
  padding:4px 7px;
  white-space:nowrap;
}
.kfzrp-order-table .kfzrp-label-status-list {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:3px;
  margin-top:0;
}
.kfzrp-order-table .kfzrp-label-status-badge {
  padding:2px 5px;
}


/* 1.11.58: Auftragskopf und rechte Dokument-/Versandspalte kompakter. */
.kfzrp-order-workspace-main .kfzrp-order-overview-clean {
  gap: 7px;
}
.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-stat {
  min-height: 68px;
  padding: 8px 9px 7px 12px;
}
.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-stat span {
  font-size: 9px;
  line-height: 1.15;
}
.kfzrp-order-workspace-main .kfzrp-order-overview-clean .kfzrp-overview-stat strong {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.22;
}
.kfzrp-order-workspace-main .kfzrp-overview-stat-editable::after {
  top: 6px;
  right: 7px;
  font-size: 10px;
}
.kfzrp-order-workspace-main .kfzrp-overview-stat-editable .kfzrp-overview-edit-hint {
  display:none !important;
}

.kfzrp-order-workspace-actions .kfzrp-document-action-bar {
  gap: 4px;
}
.kfzrp-order-workspace-actions .kfzrp-document-action-group {
  padding: 6px 8px;
  gap: 4px 5px;
  border-radius: 7px;
}
.kfzrp-order-workspace-actions .kfzrp-workflow-section > strong:first-child {
  min-height: 24px;
  gap: 6px;
  padding-top: 2px;
  padding-bottom: 2px;
}
.kfzrp-order-workspace-actions .kfzrp-workflow-title-meta {
  font-size: 9px;
}
.kfzrp-order-workspace-actions .kfzrp-button-small {
  min-height: 28px;
  padding: 4px 8px;
}
.kfzrp-order-workspace-actions .kfzrp-document-action-meta {
  gap: 4px;
  margin: 0;
}
.kfzrp-order-workspace-actions .kfzrp-document-action-meta span {
  padding: 4px 6px;
}
.kfzrp-workflow-section-invoice .kfzrp-compact-accounting-status {
  gap: 4px;
  margin-top: 3px;
  padding-top: 4px;
}
.kfzrp-order-workspace-actions .kfzrp-compact-status-pill {
  min-height: 24px;
  padding: 3px 6px;
}


/* 1.11.59: Unteren Auftragsbereich kompakter und Auftragspositionen klar benannt. */
.kfzrp-order-section-identification .kfzrp-direct-text-field.is-accessories textarea {
  min-height: 68px;
  height: 68px;
}
.kfzrp-products-card .kfzrp-item-edit-notice {
  gap: 1px;
  margin: -2px 0 10px;
  padding: 7px 10px;
  line-height: 1.35;
}
.kfzrp-sticky-actions {
  bottom: 6px;
  padding: 6px 10px;
  border-radius: 8px;
}
.kfzrp-sticky-actions .kfzrp-button {
  min-height: 32px;
  padding: 6px 12px;
}


/* 1.11.60: Sticky-Speichern nur noch als schwebender Button ohne Vollbreiten-Balken. */
.kfzrp-sticky-actions {
  width: fit-content;
  max-width: max-content;
  margin-left: auto;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}
.kfzrp-sticky-actions .kfzrp-button {
  width: auto;
  box-shadow: 0 5px 16px rgba(23, 33, 43, .18);
}


/* 1.11.62: Speicheraktionen klar unterscheiden und Positionsspeichern links ausrichten. */
.kfzrp-order-items-save {
  justify-content: flex-start;
}
.kfzrp-order-items-save .kfzrp-button {
  order: -1;
  flex: 0 0 auto;
}
.kfzrp-order-items-save span {
  margin-right: 0;
  margin-left: 0;
}
.kfzrp-order-save-actions .kfzrp-button {
  background: #2f7d5b !important;
  border-color: #2f7d5b !important;
  color: #fff !important;
}
.kfzrp-order-save-actions .kfzrp-button:hover,
.kfzrp-order-save-actions .kfzrp-button:focus {
  background: #256648 !important;
  border-color: #256648 !important;
  color: #fff !important;
}


/* 1.11.63: Bestell-Speichern-Farbe cache- und themesicher erzwingen. */
.kfzrp-order-save-button,
.kfzrp-order-save-actions button.kfzrp-order-save-button {
  background: #2f7d5b !important;
  border-color: #2f7d5b !important;
  color: #fff !important;
}
.kfzrp-order-save-button:hover,
.kfzrp-order-save-button:focus {
  background: #256648 !important;
  border-color: #256648 !important;
  color: #fff !important;
}

/* 1.11.66: Auftragsbezogene Fotos/Dokumente kompakt in der Bestellung. */
.kfzrp-order-files .kfzrp-section-heading {
  margin-bottom: 10px;
}
.kfzrp-order-file-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.kfzrp-order-file {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--kfzrp-border, #d7e0e8);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}
.kfzrp-order-file:hover,
.kfzrp-order-file:focus {
  border-color: var(--kfzrp-primary, #1268a8);
}
.kfzrp-order-file-preview {
  width: 54px;
  height: 42px;
  flex: 0 0 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px;
  background: #eef3f7;
  font-size: 11px;
  font-weight: 800;
}
.kfzrp-order-file-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.kfzrp-order-file-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kfzrp-order-file-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kfzrp-order-file-info small {
  color: var(--kfzrp-muted, #667085);
  line-height: 1.3;
}
.kfzrp-order-file-upload {
  display: block;
  padding: 9px 10px;
  border: 1px dashed var(--kfzrp-border, #cbd6df);
  border-radius: 8px;
  background: #f8fafc;
}
.kfzrp-order-file-upload > span {
  display: block;
  margin-bottom: 5px;
  font-weight: 700;
}
.kfzrp-order-file-upload input[type="file"] {
  width: 100%;
  margin: 0 0 4px;
}
.kfzrp-order-file-upload small {
  display: block;
}
@media (max-width: 760px) {
  .kfzrp-order-file-list {
    grid-template-columns: 1fr;
  }
}

/* 1.11.68: Auftragsdateien als kompakte Liste mit Direkt-Upload und Entfernen-Aktion. */
.kfzrp-order-files .kfzrp-section-heading{margin-bottom:7px}
.kfzrp-order-file-list{display:flex!important;flex-direction:column;gap:0!important;margin:0 0 8px;border:1px solid var(--kfzrp-border,#d7e0e8);border-radius:7px;overflow:hidden;background:#fff}
.kfzrp-order-file-row{display:flex;align-items:center;gap:8px;min-height:42px;padding:6px 8px;border-bottom:1px solid var(--kfzrp-border,#e3e8ee)}
.kfzrp-order-file-row:last-child{border-bottom:0}
.kfzrp-order-file-type{flex:0 0 34px;display:inline-flex;align-items:center;justify-content:center;min-height:24px;border-radius:5px;background:#eef4f8;color:#155f91;font-size:8px;font-weight:800;letter-spacing:.03em}
.kfzrp-order-file-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.kfzrp-order-file-info a{min-width:0;color:var(--kfzrp-primary,#1268a8);text-decoration:none}
.kfzrp-order-file-info strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.kfzrp-order-file-info small{font-size:9px;color:var(--kfzrp-muted,#667085);line-height:1.25}
.kfzrp-order-file-delete{flex:0 0 auto;border:1px solid #d9a5a5;border-radius:5px;background:#fff;color:#a51d1d;padding:5px 8px;font-size:9px;font-weight:700;cursor:pointer}
.kfzrp-order-file-delete:hover,.kfzrp-order-file-delete:focus{background:#fff2f2;border-color:#c45151}
.kfzrp-order-file-upload{display:block;padding:8px 9px;border:1px dashed var(--kfzrp-border,#cbd6df);border-radius:7px;background:#f8fafc}
.kfzrp-order-file-upload-title{display:block;margin-bottom:5px;font-weight:700}
.kfzrp-order-file-upload-row{display:flex;align-items:center;gap:8px}
.kfzrp-order-file-upload-row input[type="file"]{flex:1;min-width:0;width:auto!important;margin:0!important}
.kfzrp-order-file-upload-button{flex:0 0 auto;min-width:90px;padding:7px 12px!important}
.kfzrp-order-file-upload-button[disabled]{opacity:.55;cursor:not-allowed}
.kfzrp-order-file-upload small{display:block;margin-top:5px}
.kfzrp-order-file-upload-status{min-height:0;margin-top:4px;font-size:9px;font-weight:600;color:var(--kfzrp-muted,#667085)}
.kfzrp-order-file-upload-status.is-error{color:#a51d1d}
.kfzrp-order-file-upload-status.is-success{color:#256648}
@media(max-width:700px){.kfzrp-order-file-upload-row{align-items:stretch;flex-direction:column}.kfzrp-order-file-upload-button{width:100%}.kfzrp-order-file-row{align-items:flex-start;flex-wrap:wrap}.kfzrp-order-file-delete{margin-left:42px}}

/* 1.11.73: Produktspeichern wieder schwebend; der Widerrufsbutton wird im Portal serverseitig unterdrückt. */
.kfzrp-product-save-actions {
  position: sticky;
  bottom: 6px;
  width: fit-content;
  max-width: max-content;
  margin-left: auto;
  margin-top: 18px;
  justify-content: flex-end;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  z-index: 6;
}
.kfzrp-product-save-actions .kfzrp-button {
  width: auto;
  box-shadow: 0 5px 16px rgba(23, 33, 43, .18);
}
@media (max-width: 800px) {
  .kfzrp-product-save-actions {
    width: fit-content;
    max-width: max-content;
    margin-left: auto;
    align-items: center;
    flex-direction: row;
  }
  .kfzrp-product-save-actions .kfzrp-button {
    width: auto;
  }
}


/* 1.11.75: Produktfilter-Arbeitsablauf – Titel anklickbar und Filter-Navigation im Produkt. */
.kfzrp-product-title-link {
  color: inherit !important;
  text-decoration: none;
}
.kfzrp-product-title-link:hover,
.kfzrp-product-title-link:focus {
  color: var(--kfzrp-primary) !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.kfzrp-product-edit-toolbar {
  align-items: flex-end;
}
.kfzrp-product-navigation {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.kfzrp-product-navigation-position {
  min-width: 64px;
  color: var(--kfzrp-muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
@media (max-width: 800px) {
  .kfzrp-product-edit-toolbar { align-items: stretch; }
  .kfzrp-product-navigation { justify-content: flex-start; width: 100%; }
  .kfzrp-product-navigation .kfzrp-button { width: auto; }
}


/* 1.11.77 – Produktart Dienstleistung / Ware */
.kfzrp-product-legal-type {
  margin: 2px 0 0;
  padding: 0;
  border: 0;
}
.kfzrp-product-legal-type > legend {
  margin-bottom: 5px;
  color: #34404c;
  font-weight: 800;
}
.kfzrp-product-legal-type .kfzrp-help {
  margin: 0 0 9px;
}
.kfzrp-product-legal-type-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.kfzrp-product-legal-type-option {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start !important;
  gap: 10px !important;
  min-height: 76px;
  margin: 0 !important;
  padding: 12px 13px;
  border: 1px solid #cbd5df;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.kfzrp-product-legal-type-option:hover {
  border-color: #8eacc9;
  background: #f9fbfd;
}
.kfzrp-product-legal-type-option:has(input:checked) {
  border-color: var(--kfzrp-primary);
  background: rgba(20, 93, 160, .055);
  box-shadow: 0 0 0 2px rgba(20, 93, 160, .08);
}
.kfzrp-product-legal-type-option input {
  width: auto !important;
  margin-top: 3px;
}
.kfzrp-product-legal-type-option span {
  display: grid;
  gap: 3px;
}
.kfzrp-product-legal-type-option strong {
  color: #17212b;
}
.kfzrp-product-legal-type-option small {
  color: var(--kfzrp-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}
@media (max-width: 700px) {
  .kfzrp-product-legal-type-options {
    grid-template-columns: 1fr;
  }
}


/* 1.11.79 – Workflow: Produktduplikat + Autosave */
.kfzrp-product-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}
.kfzrp-inline-form {
  display: inline-flex;
  margin: 0;
}
.kfzrp-product-save-actions {
  gap: 8px;
  flex-wrap: wrap;
}
[data-kfzrp-item-autosave-status],
[data-kfzrp-order-autosave-status] {
  transition: color .15s ease;
}
[data-kfzrp-item-autosave-status].is-saving,
[data-kfzrp-order-autosave-status].is-saving {
  color: #8a5a00;
}
[data-kfzrp-item-autosave-status].is-saved,
[data-kfzrp-order-autosave-status].is-saved {
  color: #2f7d5b;
}
[data-kfzrp-item-autosave-status].is-error,
[data-kfzrp-order-autosave-status].is-error {
  color: #a83535;
  font-weight: 800;
}
.kfzrp-autosave-saved {
  border-color: #58a17e !important;
  box-shadow: 0 0 0 2px rgba(47,125,91,.08) !important;
}
.kfzrp-autosave-error {
  border-color: #c55353 !important;
  box-shadow: 0 0 0 2px rgba(197,83,83,.10) !important;
}
@media (max-width: 760px) {
  .kfzrp-product-row-actions {
    justify-content: flex-start;
  }
}


/* 1.11.80 – Yoast-SEO-Felder in der Produktpflege */
.kfzrp-product-seo-card {
  border-color: #cdd9e5;
}
.kfzrp-product-seo-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.kfzrp-product-seo-heading h4 {
  margin: 2px 0 0;
}
.kfzrp-seo-status {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf0f3;
  color: #65717c;
  font-size: 11px;
  font-weight: 800;
}
.kfzrp-seo-status.is-active {
  background: #e6f5eb;
  color: #2f7656;
}
.kfzrp-product-seo-grid label > small {
  display: block;
  margin-top: 5px;
  color: var(--kfzrp-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}
.kfzrp-seo-input-wrap {
  position: relative;
}
.kfzrp-seo-input-wrap input,
.kfzrp-seo-input-wrap textarea {
  padding-right: 54px !important;
}
.kfzrp-seo-input-wrap-textarea textarea {
  min-height: 94px;
}
.kfzrp-seo-count {
  position: absolute;
  right: 10px;
  top: 50%;
  min-width: 31px;
  padding: 2px 5px;
  border-radius: 5px;
  transform: translateY(-50%);
  background: #eef1f4;
  color: #65717c;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}
.kfzrp-seo-input-wrap-textarea .kfzrp-seo-count {
  top: 10px;
  transform: none;
}
.kfzrp-seo-count.is-good {
  background: #e5f5ea;
  color: #2b7453;
}
.kfzrp-seo-count.is-long {
  background: #fff0e0;
  color: #9a5f00;
}

/* 1.11.82 – Produktvorschau und sichtbare Produkt-URL. */
.kfzrp-product-url-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: -2px 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--kfzrp-border);
  border-radius: 10px;
  background: #f8fafc;
}
.kfzrp-product-url-copy {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex: 1 1 520px;
}
.kfzrp-product-url-label {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  color: var(--kfzrp-muted);
}
.kfzrp-product-url-link {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 13px;
  text-decoration: none;
}
.kfzrp-product-url-link:hover,
.kfzrp-product-url-link:focus {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.kfzrp-product-url-panel > small {
  flex: 1 0 100%;
  color: var(--kfzrp-muted);
  font-size: 11px;
}
.kfzrp-copy-success {
  outline: 2px solid rgba(47, 125, 91, .28);
  outline-offset: 2px;
}
@media (max-width: 800px) {
  .kfzrp-product-url-copy {
    display: block;
    flex-basis: 100%;
  }
  .kfzrp-product-url-label {
    display: block;
    margin-bottom: 3px;
  }
  .kfzrp-product-url-panel .kfzrp-button {
    width: auto;
  }
}
