:root {
  --bg: #f5f6f8;
  --panel: #fff;
  --text: #2f3542;
  --line: #e7eaef;
  --green: #2f9e5b;
  --green-soft: #eef8f2;
  --blue: #3d7fd8;
  --blue-soft: #eef5ff;
  --teal: #3f8f8a;
  --teal-soft: #eef8f7;
  --orange: #c78333;
  --orange-soft: #fbf5ec;
  --violet: #7867b7;
  --violet-soft: #f3f0fb;
  --petrol: #397f87;
  --petrol-soft: #edf6f7;
  --gray: #6d7580;
  --gray-soft: #f0f2f4;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
}
.layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 24px 18px;
  box-shadow: 0 12px 32px rgba(29, 39, 54, 0.06);
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.brand-logo a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-decoration: none;
}
.brand-logo img {
  display: block;
  width: min(245px, 100%);
  height: auto;
  max-height: 115px;
  object-fit: contain;
}
.search {
  position: relative;
  margin-bottom: 18px;
}
.search input {
  width: 100%;
  border: 1px solid #d9dee5;
  border-radius: 10px;
  background: #fff;
  padding: 12px 14px 12px 38px;
  color: var(--text);
  outline: none;
}
.search input:focus {
  border-color: #b8c0ca;
  box-shadow: 0 0 0 3px rgba(61, 127, 216, 0.08);
}
.search span {
  position: absolute;
  top: 50%;
  left: 13px;
  transform: translateY(-50%);
  color: #8a94a0;
}
.dashboard,
.toggle {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}
.dashboard {
  margin-bottom: 8px;
}
.dashboard:hover,
.dashboard.active {
  background: #f0f2f4;
}
.menu-section {
  margin-bottom: 5px;
}
.toggle .arrow {
  font-size: 18px;
  color: #69727e;
  transition:
    transform 0.18s ease,
    color 0.18s ease;
}
.menu-section.open .toggle .arrow {
  transform: rotate(180deg);
}
.menu-section[data-theme="green"] .toggle:hover,
.menu-section[data-theme="green"].open .toggle {
  background: var(--green-soft);
}
.menu-section[data-theme="green"] .toggle:hover .arrow,
.menu-section[data-theme="green"].open .toggle .arrow {
  color: var(--green);
}
.menu-section[data-theme="blue"] .toggle:hover,
.menu-section[data-theme="blue"].open .toggle {
  background: var(--blue-soft);
}
.menu-section[data-theme="blue"] .toggle:hover .arrow,
.menu-section[data-theme="blue"].open .toggle .arrow {
  color: var(--blue);
}
.menu-section[data-theme="teal"] .toggle:hover,
.menu-section[data-theme="teal"].open .toggle {
  background: var(--teal-soft);
}
.menu-section[data-theme="teal"] .toggle:hover .arrow,
.menu-section[data-theme="teal"].open .toggle .arrow {
  color: var(--teal);
}
.menu-section[data-theme="orange"] .toggle:hover,
.menu-section[data-theme="orange"].open .toggle {
  background: var(--orange-soft);
}
.menu-section[data-theme="orange"] .toggle:hover .arrow,
.menu-section[data-theme="orange"].open .toggle .arrow {
  color: var(--orange);
}
.menu-section[data-theme="violet"] .toggle:hover,
.menu-section[data-theme="violet"].open .toggle {
  background: var(--violet-soft);
}
.menu-section[data-theme="violet"] .toggle:hover .arrow,
.menu-section[data-theme="violet"].open .toggle .arrow {
  color: var(--violet);
}
.menu-section[data-theme="petrol"] .toggle:hover,
.menu-section[data-theme="petrol"].open .toggle {
  background: var(--petrol-soft);
}
.menu-section[data-theme="petrol"] .toggle:hover .arrow,
.menu-section[data-theme="petrol"].open .toggle .arrow {
  color: var(--petrol);
}
.menu-section[data-theme="gray"] .toggle:hover,
.menu-section[data-theme="gray"].open .toggle {
  background: var(--gray-soft);
}
.menu-section[data-theme="gray"] .toggle:hover .arrow,
.menu-section[data-theme="gray"].open .toggle .arrow {
  color: var(--gray);
}
.submenu {
  display: none;
  margin: 5px 0 10px 18px;
  padding: 5px 0 5px 14px;
  border-left: 2px solid #e4e7eb;
}
.menu-section.open .submenu {
  display: block;
}
.submenu a {
  display: block;
  text-decoration: none;
  color: var(--text);
  border-radius: 7px;
  padding: 10px 12px;
  margin: 2px 0;
  font-size: 15px;
  font-weight: 400;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.submenu a:hover {
  background: #f5f6f7;
}
.submenu a.active {
  font-weight: 500;
}
.menu-section[data-theme="green"] .submenu a.active {
  background: var(--green-soft);
  color: #277c49;
}
.menu-section[data-theme="blue"] .submenu a.active {
  background: var(--blue-soft);
  color: #2f6ebb;
}
.menu-section[data-theme="teal"] .submenu a.active {
  background: var(--teal-soft);
  color: #347874;
}
.menu-section[data-theme="orange"] .submenu a.active {
  background: var(--orange-soft);
  color: #9d6528;
}
.menu-section[data-theme="violet"] .submenu a.active {
  background: var(--violet-soft);
  color: #6655a4;
}
.menu-section[data-theme="petrol"] .submenu a.active {
  background: var(--petrol-soft);
  color: #316d74;
}
.menu-section[data-theme="gray"] .submenu a.active {
  background: var(--gray-soft);
  color: #59616b;
}
.content {
  padding: 40px;
}
.topbar,
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 26px rgba(29, 39, 54, 0.05);
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  margin-bottom: 28px;
}
.topbar h1 {
  margin: 0;
  font-size: 24px;
}
.user {
  color: #5f6975;
  font-size: 14px;
  font-weight: 600;
}
.card {
  padding: 34px;
}
.label {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: #2a7f4c;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 12px;
}
.card h2 {
  margin: 0 0 12px;
  font-size: 32px;
  letter-spacing: -0.7px;
}
.card p {
  margin: 0;
  color: #6b7480;
  line-height: 1.65;
  max-width: 820px;
  font-size: 17px;
}
.preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}
.preview div {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbfc;
  padding: 20px;
}
.preview strong {
  display: block;
  margin-bottom: 8px;
}
.preview span {
  color: #77818c;
  font-size: 14px;
  line-height: 1.5;
}
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .content {
    padding: 20px;
  }
  .preview {
    grid-template-columns: 1fr;
  }
}

/* ERP 3 Dashboard */
.dashboard-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.dashboard-head h2 {
  margin: 0 0 8px;
  font-size: 32px;
  letter-spacing: -0.7px;
}
.dashboard-head p {
  margin: 0;
  color: #6b7480;
  line-height: 1.55;
  max-width: 800px;
  font-size: 16px;
}
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 9px;
  background: #2f3542;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}
.primary-action:hover {
  background: #202631;
  transform: translateY(-1px);
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}
.metric-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 7px 22px rgba(29, 39, 54, 0.035);
  min-height: 165px;
  display: flex;
  flex-direction: column;
}
.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}
.metric-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
}
.metric-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  color: #8a929d;
}
.metric-value {
  font-size: 34px;
  line-height: 1;
  margin-bottom: 7px;
  letter-spacing: -1px;
}
.metric-label {
  font-size: 15px;
  font-weight: 750;
  margin-bottom: 10px;
}
.metric-card small {
  margin-top: auto;
  color: #7b8490;
  font-size: 12px;
}
.metric-green .metric-icon {
  background: var(--green-soft);
  color: var(--green);
}
.metric-blue .metric-icon {
  background: var(--blue-soft);
  color: var(--blue);
}
.metric-violet .metric-icon {
  background: var(--violet-soft);
  color: var(--violet);
}
.metric-petrol .metric-icon {
  background: var(--petrol-soft);
  color: var(--petrol);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.95fr);
  gap: 22px;
  margin-bottom: 22px;
}
.lower-grid {
  grid-template-columns: 1fr 1fr;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 7px 22px rgba(29, 39, 54, 0.035);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
}
.panel-head.compact {
  align-items: center;
}
.panel-kicker {
  display: block;
  color: #8a929d;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.65px;
  margin-bottom: 5px;
}
.panel h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.25px;
}
.panel-head a {
  font-size: 13px;
  color: #5f6975;
  text-decoration: none;
  font-weight: 700;
}
.panel-head a:hover {
  color: #2f3542;
}
.revenue-total {
  text-align: right;
}
.revenue-total strong {
  display: block;
  font-size: 20px;
}
.revenue-total span {
  font-size: 12px;
  color: #2f9e5b;
  font-weight: 700;
}
.chart-legend {
  display: flex;
  gap: 18px;
  font-size: 12px;
  color: #707985;
  margin-bottom: 14px;
}
.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}
.legend-green {
  background: #82c49b;
}
.legend-blue {
  background: #8eb5e8;
}
.bar-chart {
  height: 220px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 12px;
  border-bottom: 1px solid #edf0f3;
  padding: 12px 8px 0;
  background: linear-gradient(
    to top,
    rgba(231, 234, 239, 0.55) 1px,
    transparent 1px
  );
  background-size: 100% 25%;
}
.bar-group {
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 9px;
}
.bars {
  height: calc(100% - 28px);
  display: flex;
  align-items: flex-end;
  gap: 5px;
  width: 100%;
  max-width: 48px;
}
.bar {
  display: block;
  flex: 1;
  border-radius: 5px 5px 1px 1px;
  min-height: 6px;
  transition: height 0.25s ease;
}
.bar-green {
  background: #9dd1b0;
}
.bar-blue {
  background: #9dbfe9;
}
.bar-group small {
  color: #7b8490;
  font-size: 11px;
}
.appointment-list {
  display: flex;
  flex-direction: column;
}
.appointment {
  display: grid;
  grid-template-columns: 50px 8px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid #eef0f3;
  text-decoration: none;
  color: var(--text);
}
.appointment:first-child {
  border-top: none;
  padding-top: 3px;
}
.appointment time {
  font-size: 13px;
  font-weight: 800;
  color: #5d6672;
}
.appointment-mark {
  width: 7px;
  height: 42px;
  border-radius: 6px;
}
.mark-green {
  background: #9ccfb0;
}
.mark-blue {
  background: #99bbe5;
}
.appointment-main strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}
.appointment-main small {
  display: block;
  color: #7c8591;
  font-size: 12px;
}
.appointment-status {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: #347b50;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.status-blue {
  background: var(--blue-soft);
  color: #386fab;
}
.activity-list {
  display: flex;
  flex-direction: column;
}
.activity {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 13px 0;
  border-top: 1px solid #eef0f3;
}
.activity:first-child {
  border-top: none;
  padding-top: 2px;
}
.activity-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  flex: 0 0 auto;
  font-weight: 800;
}
.activity-green {
  background: var(--green-soft);
  color: var(--green);
}
.activity-blue {
  background: var(--blue-soft);
  color: var(--blue);
}
.activity-orange {
  background: var(--orange-soft);
  color: var(--orange);
}
.activity-violet {
  background: var(--violet-soft);
  color: var(--violet);
}
.activity strong {
  display: block;
  font-size: 14px;
  margin: 1px 0 4px;
}
.activity small {
  display: block;
  color: #7c8591;
  font-size: 12px;
}
.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.quick-grid a {
  min-height: 105px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 15px;
  text-decoration: none;
  color: var(--text);
  background: #fafbfc;
  transition:
    background 0.15s ease,
    transform 0.15s ease,
    border-color 0.15s ease;
}
.quick-grid a:hover {
  background: #fff;
  transform: translateY(-1px);
  border-color: #dce1e7;
}
.quick-grid span {
  display: block;
  font-size: 20px;
  color: #8a929d;
  margin-bottom: 10px;
}
.quick-grid strong {
  display: block;
  font-size: 14px;
  margin-bottom: 5px;
}
.quick-grid small {
  display: block;
  color: #7c8591;
  font-size: 11px;
}
@media (max-width: 1250px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-grid,
  .lower-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .dashboard-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .metric-grid {
    grid-template-columns: 1fr;
  }
  .quick-grid {
    grid-template-columns: 1fr;
  }
  .appointment {
    grid-template-columns: 44px 6px 1fr;
  }
  .appointment-status {
    display: none;
  }
  .revenue-total {
    text-align: left;
  }
  .panel-head {
    flex-direction: column;
  }
  .bar-chart {
    height: 180px;
  }
}

/* ERP 3.1.0 Kernsystem */
.user-menu {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #5f6975;
  font-size: 14px;
  font-weight: 600;
}
.user-menu a {
  color: #2f3542;
  text-decoration: none;
  padding: 7px 10px;
  border-radius: 7px;
  background: #f1f3f5;
}
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f5f6f8;
}
.login-card {
  width: min(460px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(29, 39, 54, 0.09);
  padding: 38px;
}
.login-logo {
  display: block;
  width: min(260px, 85%);
  max-height: 120px;
  margin: 0 auto 28px;
}
.login-card h1 {
  margin: 0 0 8px;
  font-size: 30px;
}
.login-card > p {
  margin: 0 0 22px;
  color: #6b7480;
  line-height: 1.55;
}
.form-stack {
  display: grid;
  gap: 16px;
}
.form-stack label,
.settings-grid label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #4e5864;
}
.form-stack input,
.form-stack select,
.settings-grid input {
  width: 100%;
  border: 1px solid #d9dee5;
  border-radius: 9px;
  padding: 11px 12px;
  font: inherit;
  color: var(--text);
  background: #fff;
}
.form-stack input:focus,
.form-stack select:focus,
.settings-grid input:focus {
  outline: none;
  border-color: #8eb5e8;
  box-shadow: 0 0 0 3px rgba(61, 127, 216, 0.08);
}
.login-card .primary-action {
  border: 0;
  cursor: pointer;
}
.login-help {
  text-align: center;
  margin-top: 18px;
}
.login-help a {
  font-size: 13px;
  color: #6b7480;
}
.alert {
  padding: 12px 14px;
  border-radius: 9px;
  background: #eef5ff;
  color: #2f6ebb;
  margin-bottom: 18px;
  font-size: 14px;
}
.alert-error {
  background: #fff0f0;
  color: #a23d3d;
}
.alert-success {
  background: #eef8f2;
  color: #277c49;
}
.admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.65fr) minmax(0, 1.35fr);
  gap: 24px;
}
.form-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbfc;
  align-self: start;
}
.form-panel h4 {
  margin: 0;
  font-size: 18px;
}
.table-wrap {
  overflow: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th,
.data-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid #edf0f3;
  vertical-align: middle;
}
.data-table th {
  color: #747e8a;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.45px;
}
.text-button {
  border: 0;
  background: transparent;
  color: #2f6ebb;
  cursor: pointer;
  font-weight: 600;
}
.text-button:disabled {
  color: #a5adb6;
  cursor: not-allowed;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}
.settings-grid > div {
  grid-column: 1/-1;
}
.install-card code {
  background: #f1f3f5;
  padding: 2px 5px;
  border-radius: 4px;
}
@media (max-width: 900px) {
  .admin-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .user-menu span {
    display: none;
  }
}

/* ERP 3.1.1 – einheitliche Navigationstypografie */
.sidebar .dashboard,
.sidebar .toggle {
  font-family: inherit;
  font-weight: 600;
  font-synthesis: none;
}

.sidebar .submenu a {
  font-family: inherit;
  font-weight: 400;
  font-synthesis: none;
}

.sidebar .submenu a.active {
  font-weight: 500;
}

/* ERP 3.1.2 – Firmeneinstellungen und Logoverwaltung */
.business-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.business-tab {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 9px;
  background: #f3f5f7;
  color: #59636f;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.business-tab:hover {
  background: #eef1f4;
  color: var(--text);
}
.business-tab.active {
  background: var(--green-soft);
  color: #277c49;
}
.business-settings-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.62fr) minmax(0, 1.38fr);
  gap: 26px;
  align-items: start;
}
.logo-panel {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fafbfc;
  padding: 20px;
}
.logo-preview {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0 17px;
  padding: 20px;
  border: 1px dashed #d8dde4;
  border-radius: 11px;
  background: #fff;
}
.logo-preview img {
  display: block;
  max-width: 100%;
  max-height: 150px;
  object-fit: contain;
}
.logo-placeholder {
  color: #8a929d;
  font-size: 13px;
  text-align: center;
}
.upload-field {
  display: grid;
  gap: 7px;
  color: #4e5864;
  font-size: 13px;
  font-weight: 600;
}
.upload-field input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #d9dee5;
  border-radius: 9px;
  background: #fff;
  font: inherit;
}
.upload-field small,
.form-hint {
  color: #7c8591;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 400;
}
.form-hint {
  margin: 14px 0 0;
}
@media (max-width: 1000px) {
  .business-settings-layout {
    grid-template-columns: 1fr;
  }
  .logo-panel {
    max-width: none;
  }
}

/* ERP 3.2.0 – CRM */
.panel-description {
  margin: 0.35rem 0 0;
  color: var(--muted, #74766f);
  font-size: 0.95rem;
}
.crm-head {
  align-items: flex-start;
  gap: 1rem;
}
.secondary-action,
.row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid #d9d9d2;
  background: #fff;
  color: #30342f;
  border-radius: 12px;
  padding: 0.72rem 1rem;
  font-weight: 500;
  cursor: pointer;
}
.secondary-action:hover,
.row-action:hover {
  background: #f5f5f1;
}
.crm-form {
  display: grid;
  gap: 1rem;
}
.form-card,
.detail-card {
  background: #fff;
  border: 1px solid #e2e2db;
  border-radius: 16px;
  padding: 1.25rem;
}
.form-card h4,
.detail-card h4 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}
.form-grid {
  display: grid;
  gap: 1rem;
}
.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-grid.zip-city {
  grid-template-columns: 110px 1fr;
}
.crm-form label,
.form-card label {
  display: grid;
  gap: 0.42rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: #555a53;
}
.crm-form input,
.crm-form select,
.crm-form textarea,
.form-card input,
.form-card select,
.form-card textarea,
.crm-filter input,
.crm-filter select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d7d8d1;
  border-radius: 10px;
  background: #fff;
  padding: 0.78rem 0.85rem;
  font: inherit;
  color: #242824;
}
.crm-form textarea,
.form-card textarea {
  resize: vertical;
}
.form-actions,
.detail-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.crm-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 190px));
  gap: 1rem;
  margin-bottom: 1rem;
}
.crm-stats > div {
  background: #f8f8f5;
  border: 1px solid #e3e3dc;
  border-radius: 14px;
  padding: 1rem;
}
.crm-stats span {
  display: block;
  color: #777b73;
  font-size: 0.85rem;
}
.crm-stats strong {
  display: block;
  font-size: 1.65rem;
  margin-top: 0.25rem;
}
.crm-filter {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin: 1rem 0;
}
.search-wide {
  position: relative;
  flex: 1;
  min-width: 240px;
}
.search-wide span {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #777;
}
.search-wide input {
  padding-left: 2.25rem;
}
.crm-filter select {
  width: auto;
  min-width: 150px;
}
.crm-table td {
  vertical-align: middle;
}
.crm-table td span,
.crm-table td small {
  display: block;
}
.crm-table small,
.contact-item small {
  color: #7a7e76;
  margin-top: 0.18rem;
}
.customer-name {
  font-weight: 600;
}
.row-action {
  padding: 0.55rem 0.85rem;
}
.status-pill,
.mini-badge {
  display: inline-flex !important;
  width: max-content;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
}
.status-pill.active {
  background: #e7f2e9;
  color: #315b38;
}
.status-pill.inactive {
  background: #eeeeea;
  color: #6c6e68;
}
.mini-badge {
  background: #f0eadb;
  color: #6c5b2e;
  margin-left: 0.5rem;
  padding: 0.2rem 0.48rem;
}
.empty-state {
  color: #777b73;
}
.empty-state.large {
  padding: 2.5rem;
  text-align: center;
}
.empty-state.large strong,
.empty-state.large span {
  display: block;
}
.empty-state.large strong {
  color: #333831;
  margin-bottom: 0.3rem;
}
.customer-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.customer-detail-head h2 {
  margin: 0.3rem 0 0.6rem;
}
.customer-number {
  font-size: 0.85rem;
  color: #74786f;
  font-weight: 600;
}
.detail-grid,
.crm-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.detail-card.full {
  margin-bottom: 1rem;
}
.detail-card dl {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 0.65rem 1rem;
  margin: 0;
}
.detail-card dt {
  color: #777b73;
}
.detail-card dd {
  margin: 0;
  color: #282d28;
}
.detail-card a {
  color: inherit;
}
.preline {
  white-space: pre-line;
}
.contact-list,
.note-list {
  display: grid;
  gap: 0.75rem;
}
.contact-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid #ecece6;
}
.contact-item:last-child {
  border-bottom: 0;
}
.contact-item > div span {
  display: block;
}
.note-list article {
  padding: 0.9rem 0;
  border-bottom: 1px solid #ecece6;
}
.note-list article:last-child {
  border-bottom: 0;
}
.note-list p {
  margin: 0 0 0.45rem;
}
.note-list small {
  color: #7a7e76;
}
.form-card.compact .primary-action {
  margin-top: 1rem;
}
.check-label {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
}
.check-label input {
  width: auto;
}
.text-button {
  background: none;
  border: 0;
  color: #5d625b;
  padding: 0.5rem;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
}
.text-button:hover {
  text-decoration: underline;
}
@media (max-width: 900px) {
  .form-grid.three,
  .form-grid.two,
  .detail-grid,
  .crm-split {
    grid-template-columns: 1fr;
  }
  .crm-filter {
    flex-wrap: wrap;
  }
  .crm-filter select {
    width: 100%;
  }
  .crm-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .customer-detail-head {
    flex-direction: column;
  }
  .contact-item {
    flex-direction: column;
  }
  .detail-card dl {
    grid-template-columns: 1fr;
  }
  .detail-card dt {
    font-weight: 600;
  }
  .panel-head.crm-head {
    flex-direction: column;
  }
}
@media (max-width: 560px) {
  .crm-stats {
    grid-template-columns: 1fr;
  }
  .form-grid.zip-city {
    grid-template-columns: 1fr;
  }
  .form-actions > * {
    width: 100%;
  }
}

/* ERP 3.2.1: sichtbare Modulfehler statt leerer Inhaltsfläche */
.module-error-panel {
  margin-top: 24px;
}
.module-error-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.offer-item {
  display: grid;
  grid-template-columns: 1.4fr 2fr 0.6fr 0.7fr 0.8fr 0.7fr auto;
  gap: 12px;
  align-items: end;
  padding: 16px 0;
  border-bottom: 1px solid #e7e7e2;
}
.offer-item label {
  min-width: 0;
}
.offer-item textarea {
  min-height: 46px;
}
.span-two {
  grid-column: span 2;
}
@media (max-width: 1100px) {
  .offer-item {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .offer-item .remove-item {
    grid-column: 1/-1;
  }
}
.status-pill.status-draft {
  background: #eef0f2;
  color: #59616b;
}
.status-pill.status-open {
  background: #fff2c7;
  color: #785b00;
}
.status-pill.status-partial {
  background: #ffe3bd;
  color: #874b00;
}
.status-pill.status-paid {
  background: #dff3e7;
  color: #17613a;
}
.status-pill.status-overdue {
  background: #fde0e0;
  color: #9d2525;
}
.status-pill.status-cancelled {
  background: #e5e5e5;
  color: #555;
}
/* ERP 4.0 – verbindlicher Tabellen- und Übersichtsstandard */
:root {
  --erp4-accent: #7052b8;
  --erp4-accent-soft: #f1ecfb;
  --erp4-positive: #238a46;
  --erp4-negative: #c63d55;
  --erp4-info: #236fd1;
}
.panel {
  padding: 28px;
}
.panel-head {
  margin-bottom: 24px;
}
.panel-head h3 {
  font-size: 25px;
}
.filter-bar {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}
.filter-bar label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #505865;
}
.filter-bar input,
.filter-bar select {
  min-height: 42px;
  border: 1px solid #d9dee8;
  border-radius: 10px;
  background: #fff;
  padding: 9px 12px;
  font: inherit;
  color: var(--text);
}
.erp4-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 26px;
}
.erp4-kpi {
  border: 1px solid #e2e6ec;
  border-radius: 14px;
  background: #fff;
  padding: 20px;
  min-height: 122px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.erp4-kpi-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 25px;
  font-weight: 700;
}
.erp4-kpi:nth-child(1) .erp4-kpi-icon {
  background: #eaf7ed;
  color: var(--erp4-positive);
}
.erp4-kpi:nth-child(2) .erp4-kpi-icon {
  background: #fdecef;
  color: var(--erp4-negative);
}
.erp4-kpi:nth-child(3) .erp4-kpi-icon {
  background: #eaf3ff;
  color: var(--erp4-info);
}
.erp4-kpi:nth-child(4) .erp4-kpi-icon {
  background: var(--erp4-accent-soft);
  color: var(--erp4-accent);
}
.erp4-kpi-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 800;
  color: #66707d;
  letter-spacing: 0.35px;
}
.erp4-kpi strong {
  display: block;
  font-size: 24px;
  margin-top: 8px;
  color: #17202e;
}
.erp4-kpi small {
  display: block;
  color: #717a86;
  margin-top: 5px;
}
.erp4-tax-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.erp4-tax-card {
  border: 1px solid #e2e6ec;
  border-radius: 14px;
  background: #fff;
  padding: 22px;
}
.erp4-tax-card h4 {
  margin: 0 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  color: #4f5865;
}
.erp4-tax-card strong {
  font-size: 25px;
}
.erp4-tax-card p {
  font-size: 13px;
  margin-top: 8px;
  color: #68717d;
}
.table-wrap {
  overflow: auto;
  border: 1px solid #e1e5eb;
  border-radius: 14px;
  background: #fff;
  margin-top: 18px;
}
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}
.data-table thead th {
  background: #f7f8fa;
  color: #505866;
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
  padding: 13px 15px;
  border-bottom: 1px solid #e1e5eb;
  white-space: nowrap;
}
.data-table tbody td {
  padding: 14px 15px;
  border-bottom: 1px solid #eceff3;
  vertical-align: middle;
}
.data-table tbody tr:last-child td {
  border-bottom: 0;
}
.data-table tbody tr:hover {
  background: #faf9fd;
}
.data-table tfoot td {
  padding: 14px 15px;
  border-top: 1px solid #dde2e8;
  background: #fafbfc;
  font-weight: 800;
}
.data-table td:last-child,
.data-table th:last-child {
  text-align: right;
}
.data-table .amount-positive {
  color: var(--erp4-positive);
  font-weight: 800;
}
.data-table .amount-negative {
  color: var(--erp4-negative);
  font-weight: 800;
}
.row-action {
  border-color: #dcd6ea;
  color: #59418f;
  background: #fff;
}
.row-action:hover {
  background: var(--erp4-accent-soft);
}
.erp4-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.erp4-info {
  border: 1px solid #e2e6ec;
  border-radius: 14px;
  padding: 18px;
  background: #fff;
}
.erp4-info strong {
  display: block;
  margin-bottom: 6px;
}
.erp4-info p {
  margin: 0;
  font-size: 13px;
  color: #66707c;
  line-height: 1.55;
}
.primary-action {
  background: #2f3542;
}
.primary-action:hover {
  background: #202631;
}
.secondary-action {
  border-radius: 10px;
}
.panel-kicker {
  color: var(--erp4-accent);
}
@media (max-width: 1100px) {
  .erp4-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .erp4-kpi-grid,
  .erp4-tax-grid,
  .erp4-info-grid {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 20px;
  }
  .data-table {
    min-width: 760px;
  }
}

/* =========================================================
   ERP 4.1 – verbindliches Framework & Designstandard
   Gilt systemweit für alle Module, Tabellen und Formulare.
   ========================================================= */
:root {
  --erp4-page-max: 1680px;
  --erp4-radius: 14px;
  --erp4-space-1: 6px;
  --erp4-space-2: 10px;
  --erp4-space-3: 16px;
  --erp4-space-4: 24px;
  --erp4-space-5: 32px;
  --erp4-control-height: 42px;
  --erp4-table-head: #f7f8fa;
  --erp4-hover: #faf9fd;
}
.content {
  width: 100%;
  max-width: var(--erp4-page-max);
  margin: 0 auto;
  padding: 32px 36px 48px;
}
.topbar {
  min-height: 68px;
  padding: 16px 22px;
  margin-bottom: 24px;
  border-radius: var(--erp4-radius);
}
.topbar h1 {
  font-size: 23px;
  letter-spacing: -0.35px;
}
.user-menu {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #66707c;
  font-size: 14px;
  font-weight: 650;
}
.user-menu a {
  color: #4f5865;
  text-decoration: none;
}
.user-menu a:hover {
  text-decoration: underline;
}
.panel,
.card,
.detail-card {
  border-radius: var(--erp4-radius);
  border: 1px solid #e3e6eb;
  box-shadow: 0 6px 20px rgba(29, 39, 54, 0.035);
  background: #fff;
}
.panel {
  padding: 26px;
  margin-bottom: 22px;
}
.panel-head,
.erp4-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}
.panel-head h3 {
  font-size: 22px;
  line-height: 1.25;
  margin: 0 0 5px;
}
.panel-description {
  margin: 0;
  color: #707985;
  font-size: 14px;
  line-height: 1.55;
  max-width: 850px;
}
.panel-kicker {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.65px;
  font-weight: 800;
}
.erp4-page-actions,
.form-actions,
.filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}
.primary-action,
.secondary-action,
.row-action,
button.primary-action,
button.secondary-action {
  min-height: var(--erp4-control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  padding: 0 15px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.secondary-action,
.row-action {
  background: #fff;
  border: 1px solid #dfe3e8;
  color: #46505d;
}
.secondary-action:hover,
.row-action:hover {
  background: #f7f8fa;
}
.row-action {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12px;
}
.form-card,
.filter-bar,
.form-stack {
  border: 1px solid #e3e6eb;
  border-radius: 12px;
  background: #fff;
}
.form-card {
  padding: 22px;
}
.filter-bar {
  padding: 15px;
  margin-bottom: 18px;
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 14px;
}
.form-grid {
  gap: 16px;
}
.form-grid label,
.form-card > label,
.form-stack label,
.filter-bar label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #4f5865;
  font-size: 13px;
  font-weight: 700;
}
.form-card input,
.form-card select,
.form-card textarea,
.form-stack input,
.form-stack select,
.form-stack textarea,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: var(--erp4-control-height);
  border: 1px solid #d9dee5;
  border-radius: 9px;
  background: #fff;
  color: #27303c;
  padding: 9px 11px;
  font: inherit;
  outline: none;
}
.form-card textarea,
.form-stack textarea {
  min-height: 96px;
  resize: vertical;
}
.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus,
.form-stack input:focus,
.form-stack select:focus,
.form-stack textarea:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #9d8bc8;
  box-shadow: 0 0 0 3px rgba(120, 103, 183, 0.1);
}
.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid #e1e5eb;
  border-radius: 12px;
  background: #fff;
  margin-top: 16px;
}
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--erp4-table-head);
  color: #4f5865;
  font-size: 12px;
  font-weight: 750;
  padding: 12px 14px;
  border-bottom: 1px solid #dfe3e8;
  text-align: left;
  white-space: nowrap;
}
.data-table tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid #eceff3;
  vertical-align: middle;
  color: #343d49;
}
.data-table tbody tr:last-child td {
  border-bottom: 0;
}
.data-table tbody tr:hover {
  background: var(--erp4-hover);
}
.data-table tfoot td {
  padding: 13px 14px;
  background: #fafbfc;
  border-top: 1px solid #dde2e8;
  font-weight: 800;
}
.data-table td:last-child,
.data-table th:last-child {
  text-align: right;
}
.data-table small {
  color: #7a8490;
}
.erp4-empty-row td {
  text-align: center !important;
  color: #7a8490 !important;
  padding: 32px 16px !important;
  background: #fcfcfd;
}
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.table-toolbar .search-field {
  min-width: 260px;
  max-width: 420px;
}
.alert {
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 14px;
}
.metric-grid,
.erp4-kpi-grid {
  gap: 16px;
}
.metric-card,
.erp4-kpi {
  border-radius: 12px;
  box-shadow: none;
}
.status-badge,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: #f0f2f4;
  color: #59616b;
}
.module-error-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
@media (max-width: 900px) {
  .content {
    padding: 20px 16px 36px;
  }
  .topbar {
    align-items: flex-start;
    gap: 12px;
  }
  .panel {
    padding: 20px;
  }
  .panel-head,
  .erp4-section-head {
    flex-direction: column;
  }
  .erp4-page-actions {
    justify-content: flex-start;
  }
  .filter-bar {
    align-items: stretch;
  }
  .filter-bar > * {
    flex: 1 1 180px;
  }
  .data-table {
    min-width: 760px;
  }
}
@media (max-width: 560px) {
  .topbar {
    flex-direction: column;
  }
  .user-menu {
    width: 100%;
    justify-content: space-between;
  }
  .primary-action,
  .secondary-action {
    width: 100%;
  }
  .erp4-page-actions,
  .form-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
}

/* =========================================================
   ERP 4.1 VOLLSTÄNDIG – Standard für sämtliche Module
   ========================================================= */
.erp4-module-page {
  padding: 28px;
  margin-bottom: 22px;
}
.erp4-module-page > .panel-head:first-child {
  margin-bottom: 22px;
}
.erp4-module-page .period-form,
.erp4-period-filter {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 22px;
  padding: 15px;
  border: 1px solid #e3e6eb;
  border-radius: 12px;
  background: #fff;
}
.erp4-module-page .period-form label,
.erp4-period-filter label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 150px;
  color: #4f5865;
  font-size: 13px;
  font-weight: 700;
}
.erp4-module-page .period-form input,
.erp4-module-page .period-form select,
.erp4-period-filter input,
.erp4-period-filter select {
  width: 100%;
  height: 42px;
  border: 1px solid #d9dee5;
  border-radius: 9px;
  background: #fff;
  padding: 9px 11px;
  font: inherit;
  color: #27303c;
}
.erp4-module-page .metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 26px;
}
.erp4-module-page .metric-card {
  min-height: 126px;
  padding: 20px;
  border: 1px solid #e2e6ec;
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
}
.erp4-module-page .metric-card > span:first-child {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 800;
  color: #66707d;
  letter-spacing: 0.35px;
}
.erp4-module-page .metric-card > strong {
  display: block;
  margin-top: 9px;
  font-size: 24px;
  color: #17202e;
}
.erp4-standard-table {
  margin-top: 16px;
  border: 1px solid #e1e5eb;
  border-radius: 12px;
  background: #fff;
  overflow: auto;
}
.erp4-standard-table .data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.erp4-standard-table .data-table thead th {
  background: #f7f8fa;
  color: #4f5865;
  font-size: 12px;
  font-weight: 750;
  padding: 12px 14px;
  border-bottom: 1px solid #dfe3e8;
  white-space: nowrap;
}
.erp4-standard-table .data-table tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid #eceff3;
  vertical-align: middle;
}
.erp4-standard-table .data-table tbody tr:last-child td {
  border-bottom: 0;
}
.erp4-standard-table .data-table tbody tr:hover {
  background: #faf9fd;
}
.erp4-standard-table .data-table tfoot td {
  padding: 13px 14px;
  background: #fafbfc;
  border-top: 1px solid #dde2e8;
  font-weight: 800;
}
.erp4-standard-table .data-table td:last-child,
.erp4-standard-table .data-table th:last-child {
  text-align: right;
}
/* Alte Modulklassen werden absichtlich mitgeführt und optisch vereinheitlicht. */
.period-form {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 22px;
  padding: 15px;
  border: 1px solid #e3e6eb;
  border-radius: 12px;
  background: #fff;
}
.period-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 150px;
  font-size: 13px;
  font-weight: 700;
  color: #4f5865;
}
.period-form input,
.period-form select {
  height: 42px;
  border: 1px solid #d9dee5;
  border-radius: 9px;
  background: #fff;
  padding: 9px 11px;
  font: inherit;
  color: #27303c;
}
@media (max-width: 1100px) {
  .erp4-module-page .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .erp4-module-page {
    padding: 20px;
  }
  .erp4-module-page .metric-grid {
    grid-template-columns: 1fr;
  }
  .period-form,
  .erp4-period-filter {
    align-items: stretch;
  }
  .period-form label,
  .erp4-period-filter label {
    width: 100%;
  }
}

/* ERP 4 PERSONAL – Fahrgastbeförderung */
.form-section-title {
  margin: 28px 0 16px;
  padding-top: 22px;
  border-top: 1px solid var(--line, #e6e8ee);
}
.form-section-title:first-of-type {
  margin-top: 4px;
  padding-top: 0;
  border-top: 0;
}
.form-section-title h4 {
  margin: 0;
  font-size: 1rem;
}
.form-section-title p {
  margin: 4px 0 0;
  color: var(--muted, #6f7582);
  font-size: 0.9rem;
}
.form-section-title-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.checkbox-field {
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding-top: 24px;
}
.checkbox-field input {
  width: 18px !important;
  height: 18px;
  margin: 0;
}
.form-help {
  margin: 12px 0 0;
  color: var(--muted, #6f7582);
  font-size: 0.9rem;
}
.permit-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 18px;
}
.permit-summary span {
  padding: 10px 14px;
  border: 1px solid var(--line, #e6e8ee);
  border-radius: 10px;
  background: #fff;
  font-size: 0.9rem;
}
.status-neutral {
  background: #f2f4f7;
  color: #59606d;
}
.status-overdue {
  background: #fdecec;
  color: #a72b2b;
}
@media (max-width: 760px) {
  .form-section-title-status {
    align-items: flex-start;
    flex-direction: column;
  }
  .checkbox-field {
    padding-top: 0;
  }
  .permit-summary {
    display: grid;
    grid-template-columns: 1fr;
  }
}
/* ERP 4.2 WORKFLOW */
.status-pill.status-info {
  background: #e8f3fa;
  color: #225b78;
}
.status-pill.status-danger {
  background: #fdecec;
  color: #9b2c2c;
}
.status-pill.status-neutral {
  background: #f1f2f3;
  color: #545b60;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  margin: 0 0 28px;
}
.metric-card {
  background: #fff;
  border: 1px solid var(--line, #e4e6e4);
  border-radius: 10px;
  padding: 18px 20px;
}
.metric-card span {
  display: block;
  font-size: 13px;
  color: #68716d;
  margin-bottom: 9px;
}
.metric-card strong {
  font-size: 24px;
  font-weight: 650;
  color: #202725;
}
.filter-bar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 22px;
}
.filter-bar label {
  min-width: 180px;
}
/* ERP 4.3 Disposition */
.day-timeline {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.timeline-entry {
  display: grid;
  grid-template-columns: 90px 1fr;
  border: 1px solid var(--line, #e4e7e4);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.timeline-time {
  padding: 18px;
  font-size: 20px;
  font-weight: 700;
  background: #f7f7f4;
}
.timeline-time small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
}
.timeline-body {
  padding: 16px 18px;
}
.timeline-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.timeline-body p {
  margin: 7px 0;
  color: #606761;
}
.week-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: 10px;
  overflow-x: auto;
  margin-top: 18px;
}
.week-column {
  min-height: 280px;
  border: 1px solid #e3e6e2;
  border-radius: 10px;
  background: #fafbf9;
  padding: 10px;
}
.week-column header {
  display: flex;
  justify-content: space-between;
  padding: 5px 3px 12px;
  border-bottom: 1px solid #e3e6e2;
}
.week-item {
  display: block;
  margin-top: 9px;
  padding: 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e4e7e4;
  text-decoration: none;
  color: inherit;
}
.week-item time,
.week-item small {
  display: block;
  color: #68716a;
  font-size: 12px;
}
.week-item strong {
  display: block;
  margin: 3px 0;
  font-size: 13px;
}
.week-empty {
  color: #899088;
  font-size: 12px;
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(100px, 1fr));
  border-left: 1px solid #e2e5e1;
  border-top: 1px solid #e2e5e1;
  margin-top: 18px;
  overflow: auto;
}
.month-weekday {
  padding: 10px;
  text-align: center;
  font-weight: 700;
  background: #f6f7f4;
  border-right: 1px solid #e2e5e1;
  border-bottom: 1px solid #e2e5e1;
}
.month-day {
  min-height: 95px;
  padding: 10px;
  border-right: 1px solid #e2e5e1;
  border-bottom: 1px solid #e2e5e1;
  text-decoration: none;
  color: inherit;
  background: #fff;
}
.month-day strong {
  font-size: 16px;
}
.month-day span {
  display: block;
  margin-top: 18px;
  font-size: 12px;
  padding: 5px 7px;
  border-radius: 6px;
  background: #f3efe5;
}
.month-day.muted {
  background: #fafafa;
  color: #a3a8a3;
}
@media (max-width: 900px) {
  .week-board {
    grid-template-columns: repeat(7, 180px);
  }
  .month-grid {
    grid-template-columns: repeat(7, 120px);
  }
  .timeline-entry {
    grid-template-columns: 72px 1fr;
  }
}

/* ERP 4.3.1 – Disposition: Textübersicht als einheitliche Datentabelle */
.disposition-table-filter .filter-search {
  flex: 1 1 360px;
}
.disposition-table-filter .filter-search input {
  min-width: 280px;
}
.disposition-table-filter .filter-actions {
  margin-left: auto;
}
.disposition-overview-table .time-cell strong,
.disposition-overview-table td > strong {
  display: block;
}
.disposition-overview-table .time-cell small,
.disposition-overview-table td > small {
  display: block;
  margin-top: 4px;
  color: #7a8490;
}
.disposition-overview-table .row-action {
  white-space: nowrap;
}
@media (max-width: 760px) {
  .disposition-table-filter .filter-search input {
    min-width: 0;
  }
  .disposition-table-filter .filter-actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }
}

/* ERP 4.3.3 – Disposition: Kennzahlen wie in der Kundenverwaltung */
.disposition-metric-grid {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  margin-bottom: 22px;
}
@media (max-width: 980px) {
  .disposition-metric-grid {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }
}
@media (max-width: 560px) {
  .disposition-metric-grid {
    grid-template-columns: 1fr;
  }
}

/* ERP 4.4 Kommunikation */
.communication-metric-grid {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
}
.communication-metric-grid .metric-card {
  min-height: 126px;
}
.communication-metric-grid .metric-card small {
  display: block;
  margin-top: 8px;
  color: #7b8490;
}
.communication-filter .filter-search {
  flex: 1 1 420px;
}
.communication-filter .filter-actions {
  margin-left: auto;
}
.communication-table tr.is-unread td {
  background: #f4fafb;
  font-weight: 600;
}
.communication-table td strong {
  display: block;
}
.communication-table td small {
  display: block;
  margin-top: 4px;
  color: #9b4545;
}
.communication-message-view {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 24px;
}
.communication-message-view > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.communication-message-view h3 {
  margin: 3px 0 0;
  font-size: 24px;
}
.communication-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  margin: 20px 0;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 10px;
}
.communication-meta div {
  display: grid;
  grid-template-columns: 135px 1fr;
  gap: 12px;
}
.communication-meta dt {
  font-weight: 700;
  color: #68717e;
}
.communication-meta dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.communication-body {
  min-height: 180px;
  padding: 22px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.communication-readable-email p {
  margin: 0 0 18px;
}
.communication-readable-email p:last-child {
  margin-bottom: 0;
}
.communication-readable-email a:not(.secondary-action) {
  color: #315f8f;
  font-weight: 600;
  text-decoration: underline;
}
.communication-mail-link {
  display: flex;
  align-items: center;
}
.communication-email-frame {
  display: block;
  width: 100%;
  height: 520px;
  min-height: 520px;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: #fff;
}
.communication-decision-actions {
  margin-top: 20px;
}
.communication-decision-actions form {
  display: inline-flex;
  margin: 0;
}
.danger-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid #c98282;
  border-radius: 9px;
  background: #fff;
  color: #8c2929;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.danger-action:hover {
  background: #fff1f1;
  border-color: #b86161;
}
.communication-message-view .form-actions form {
  display: inline-flex;
  margin: 0;
}
.communication-compose-form code {
  background: #f0f2f4;
  border-radius: 5px;
  padding: 2px 5px;
}
.status-pill.status-success {
  background: #eaf7ef;
  color: #267247;
}
.status-pill.status-info {
  background: #e8f3fa;
  color: #225b78;
}
.status-pill.status-danger {
  background: #fdecec;
  color: #9b2c2c;
}
.status-pill.status-neutral {
  background: #f1f2f3;
  color: #545b60;
}
@media (max-width: 900px) {
  .communication-metric-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
  .communication-meta {
    grid-template-columns: 1fr;
  }
  .communication-filter .filter-actions {
    margin-left: 0;
  }
}
@media (max-width: 560px) {
  .communication-metric-grid {
    grid-template-columns: 1fr;
  }
  .communication-message-view > header {
    flex-direction: column;
  }
  .communication-meta div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
@media (max-width: 560px) {
  .communication-email-frame {
    height: 380px;
    min-height: 380px;
  }
  .communication-decision-actions {
    align-items: stretch;
  }
  .communication-decision-actions .primary-action,
  .communication-decision-actions .danger-action,
  .communication-decision-actions form {
    width: 100%;
  }
}

.communication-compose-form .span-three {
  grid-column: 1/-1;
}

/* ERP 4 Kommunikation · IMAP */
.imap-sync-bar {
  margin: 18px 0;
}
.imap-sync-bar .filter-bar {
  margin: 0;
}
.communication-attachments {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line, #e7eaef);
}
.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.text-danger {
  display: block;
  color: #a33;
  margin-top: 4px;
}
.check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 18px 0;
}
.check-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.check-grid input {
  width: auto;
}
.data-table td small {
  display: block;
  color: #737b85;
  margin-top: 4px;
}

/* ERP 4 Kommunikation – IMAP-Posteingang */
.metric-card-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.metric-card-link:hover {
  border-color: #cbd5cf;
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.06);
}
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}
.inline-form {
  display: inline-flex;
  margin: 0;
}
.inline-form button {
  font: inherit;
}
.communication-table td small,
.data-table td small {
  display: block;
  margin-top: 3px;
  color: #7a818b;
}
.communication-table tr.is-unread td {
  background: #fbfcff;
}
.communication-table tr.is-unread td strong {
  font-weight: 700;
}
.imap-sync-bar .form-help {
  margin: 8px 0 0;
}
@media (max-width: 900px) {
  .table-actions {
    justify-content: flex-start;
  }
  .header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* ERP 4.6.0 · Digitaler Stundenzettel */
.mobile-day-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}
.day-assignment-card {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line, #e6e8e5);
  border-radius: 16px;
  background: #fff;
}
.day-assignment-time {
  display: flex;
  flex-direction: column;
}
.day-assignment-time strong {
  font-size: 1.45rem;
}
.day-assignment-time span,
.day-assignment-main small {
  color: #737b85;
}
.day-assignment-main h4 {
  margin: 4px 0 8px;
}
.day-assignment-main p {
  margin: 0 0 10px;
  line-height: 1.5;
}
.day-assignment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.workday-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 18px;
  margin: 20px 0;
}
.workday-info-card,
.workday-clock-card {
  border: 1px solid var(--line, #e6e8e5);
  border-radius: 16px;
  padding: 22px;
  background: #fff;
}
.workday-info-card dl {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  margin-top: 22px;
}
.workday-info-card dt {
  color: #737b85;
}
.workday-info-card dd {
  margin: 0;
}
.workday-times {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.workday-times div {
  padding: 14px;
  border-radius: 12px;
  background: #f7f8f6;
}
.workday-times span {
  display: block;
  color: #737b85;
  font-size: 0.85rem;
}
.workday-times strong {
  display: block;
  margin-top: 4px;
}
.clock-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.clock-actions form {
  margin: 0;
}
.signature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
.signature-pad {
  display: block;
  width: 100%;
  height: 160px;
  border: 1px dashed #aeb7af;
  border-radius: 12px;
  background: #fff;
  touch-action: none;
}
.signature-grid .secondary-action {
  margin-top: 8px;
}
.approval-form {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}
.approval-form input {
  min-width: 190px;
}
.print-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.work-proof {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  padding: 48px;
  border: 1px solid #ddd;
}
.work-proof h2 {
  font-size: 2rem;
}
.proof-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin: 36px 0;
}
.work-proof table {
  width: 100%;
  border-collapse: collapse;
  margin: 25px 0;
}
.work-proof th,
.work-proof td {
  padding: 12px;
  border: 1px solid #ddd;
  text-align: left;
}
.proof-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 70px;
}
.proof-signatures div {
  border-top: 1px solid #333;
  padding-top: 8px;
  min-height: 90px;
}
.proof-signatures img {
  display: block;
  max-width: 240px;
  max-height: 80px;
  margin-top: -75px;
}
.erp4-empty-state {
  padding: 28px;
  border: 1px dashed #ccd2cd;
  border-radius: 14px;
  text-align: center;
  color: #737b85;
}
@media (max-width: 900px) {
  .day-assignment-card {
    grid-template-columns: 70px 1fr;
  }
  .day-assignment-actions {
    grid-column: 1/-1;
    justify-content: flex-start;
  }
  .workday-layout {
    grid-template-columns: 1fr;
  }
  .workday-times {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .signature-grid,
  .proof-meta,
  .proof-signatures {
    grid-template-columns: 1fr;
  }
  .workday-times {
    grid-template-columns: 1fr;
  }
  .day-assignment-card {
    grid-template-columns: 1fr;
  }
  .work-proof {
    padding: 24px;
  }
}
@media print {
  .sidebar,
  .topbar,
  .print-toolbar {
    display: none !important;
  }
  .content {
    margin: 0 !important;
    padding: 0 !important;
  }
  .work-proof {
    border: 0;
    max-width: none;
    padding: 20mm;
  }
  .work-proof img {
    print-color-adjust: exact;
  }
}

/* ERP 4.6.2 · Mitarbeiterkonto & Foto-Arbeitsnachweis */
.photo-proof-section {
  margin: 26px 0;
}
.photo-requirement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.photo-requirement-card {
  border: 1px solid var(--line, #e2e6e2);
  border-radius: 14px;
  background: #fff;
  padding: 16px;
}
.photo-requirement-card.is-complete {
  border-color: #b9d8c3;
  background: #fbfffc;
}
.photo-requirement-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #68716d;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.photo-requirement-card header strong {
  color: #2d7046;
}
.photo-requirement-card h5 {
  margin: 12px 0;
  font-size: 1rem;
}
.photo-requirement-card img {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 10px;
  margin: 10px 0;
}
.photo-requirement-card form {
  display: grid;
  gap: 10px;
}
.photo-requirement-card input[type="file"] {
  width: 100%;
  font: inherit;
}
.additional-photo-form {
  margin-top: 16px;
}
.row-action.danger {
  color: #9b2c2c;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.proof-photos {
  margin: 38px 0;
}
.proof-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.proof-photo-grid figure {
  margin: 0;
  border: 1px solid #ddd;
  padding: 10px;
}
.proof-photo-grid img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: cover;
}
.proof-photo-grid figcaption {
  padding-top: 8px;
  font-size: 0.9rem;
}
.form-card label small {
  display: block;
  margin-top: 5px;
  color: #747d87;
  font-weight: 400;
  line-height: 1.35;
}
@media (max-width: 650px) {
  .proof-photo-grid {
    grid-template-columns: 1fr;
  }
  .photo-requirement-grid {
    grid-template-columns: 1fr;
  }
}
@media print {
  .proof-photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .proof-photo-grid img {
    height: 55mm;
  }
}

/* ERP 4.6.4 – Disposition Wochenplan */
.week-filter {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.week-filter form {
  display: flex;
  align-items: end;
  gap: 10px;
}
.week-schedule-wrap {
  overflow-x: auto;
  border: 1px solid #e7e7e2;
  border-radius: 14px;
  background: #fff;
}
.week-schedule-table {
  width: 100%;
  min-width: 1380px;
  border-collapse: separate;
  border-spacing: 0;
}
.week-schedule-table th,
.week-schedule-table td {
  border-right: 1px solid #ecece7;
  border-bottom: 1px solid #ecece7;
  vertical-align: top;
}
.week-schedule-table thead th {
  padding: 14px 10px;
  background: #f7f7f3;
  text-align: center;
  font-weight: 600;
}
.week-schedule-table thead th span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 400;
  color: #777;
}
.week-schedule-table .employee-col {
  width: 180px;
  text-align: left;
}
.employee-name {
  padding: 16px;
  text-align: left;
  background: #fbfbf8;
  position: sticky;
  left: 0;
  z-index: 2;
}
.employee-name small {
  display: block;
  margin-top: 5px;
  color: #888;
  font-weight: 400;
}
.schedule-day {
  width: 170px;
  padding: 8px;
  background: #fff;
}
.day-free {
  display: block;
  padding: 16px 8px;
  text-align: center;
  color: #999;
  font-size: 13px;
}
.schedule-card {
  position: relative;
  margin-bottom: 8px;
  padding: 10px;
  border: 1px solid #e7e7e0;
  border-radius: 10px;
  background: #fcfcf9;
  box-shadow: 0 2px 8px rgba(28, 42, 34, 0.04);
}
.schedule-card:last-child {
  margin-bottom: 0;
}
.schedule-card.warning {
  border-color: #e6c68b;
  background: #fff9ec;
}
.schedule-time {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #667267;
}
.schedule-time span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #eaf2ec;
  color: #376749;
  font-weight: 700;
}
.schedule-title {
  display: block;
  margin-top: 7px;
  color: #1f3027;
  font-weight: 650;
  text-decoration: none;
}
.schedule-service {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #4d6958;
}
.schedule-card small {
  display: block;
  margin-top: 3px;
  color: #7c827e;
}
.schedule-route {
  display: inline-block;
  margin-top: 7px;
  font-size: 12px;
  color: #2f6d49;
  text-decoration: none;
}
.schedule-actions {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: flex;
  gap: 3px;
}
.schedule-actions form {
  margin: 0;
}
.schedule-actions button {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid #d8ddd8;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.schedule-actions button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.unassigned-row th,
.unassigned-row td {
  background: #fffaf0;
}
.info-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #f4f7f4;
  color: #4b5c51;
}
@media (max-width: 760px) {
  .week-filter {
    align-items: stretch;
  }
  .week-filter form {
    width: 100%;
    flex-wrap: wrap;
  }
  .week-filter .secondary-action {
    flex: 1;
    text-align: center;
  }
}

/* ERP 4.8.0 – klare Modulgrenzen */
.workflow-boundary-note {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #e6e1d8;
  border-radius: 12px;
  background: #fbfaf7;
  color: #4d4b47;
}
.workflow-boundary-note strong {
  display: block;
  margin-bottom: 4px;
}

/* ERP 4.8.1 · Mobile Mitarbeiteroberfläche */
.erp-mobile-workday {
  background: #f3f1eb;
}
.erp-mobile-workday .sidebar,
.erp-mobile-workday .topbar {
  display: none !important;
}
.erp-mobile-workday .layout {
  display: block;
}
.erp-mobile-workday .content {
  margin: 0 !important;
  padding: 0 0 88px !important;
  max-width: none !important;
}
.mobile-shell {
  max-width: 720px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 18px 16px 100px;
}
.mobile-app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 8px 4px 22px;
}
.mobile-app-header small {
  color: #747c76;
  text-transform: capitalize;
}
.mobile-app-header h2 {
  margin: 4px 0 2px;
  font-size: 1.75rem;
}
.mobile-app-header p {
  margin: 0;
  color: #66706a;
}
.mobile-profile-button {
  padding: 10px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #dedfd9;
  color: #34433a;
  text-decoration: none;
  font-size: 0.85rem;
}
.mobile-focus-card {
  padding: 22px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(33, 48, 39, 0.08);
  border: 1px solid #e4e5df;
}
.mobile-focus-card.is-active {
  border-color: #9fc8aa;
  background: #fbfffc;
}
.mobile-eyebrow {
  display: block;
  color: #3d7650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  font-weight: 700;
}
.mobile-focus-card h3 {
  margin: 8px 0 6px;
  font-size: 1.5rem;
}
.mobile-focus-card p {
  margin: 0;
  color: #59655e;
  line-height: 1.55;
}
.mobile-focus-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}
.mobile-main-button,
.mobile-route-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
}
.mobile-main-button {
  background: #376f49;
  color: #fff;
}
.mobile-route-button {
  background: #eef4ef;
  color: #2f6843;
  border: 1px solid #d8e5db;
}
.mobile-schedule {
  margin-top: 24px;
}
.mobile-schedule > h3 {
  margin: 0 0 12px;
  padding: 0 4px;
}
.mobile-job-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 30px;
  gap: 12px;
  align-items: center;
  padding: 15px 12px;
  margin-bottom: 10px;
  background: #fff;
  border: 1px solid #e4e5df;
  border-radius: 17px;
}
.mobile-job-row.is-done {
  opacity: 0.62;
}
.mobile-job-time {
  display: flex;
  flex-direction: column;
}
.mobile-job-time strong {
  font-size: 1.05rem;
}
.mobile-job-time span {
  font-size: 0.78rem;
  color: #7a827d;
}
.mobile-job-body small {
  color: #7a827d;
}
.mobile-job-body h4 {
  margin: 2px 0 4px;
}
.mobile-job-body p {
  margin: 0 0 7px;
  font-size: 0.9rem;
  color: #66706a;
}
.mobile-job-open {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 44px;
  color: #376f49;
  text-decoration: none;
  font-size: 2rem;
}
.mobile-empty {
  padding: 28px 20px;
  background: #fff;
  border-radius: 20px;
  text-align: center;
  border: 1px dashed #cfd4cf;
}
.mobile-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 1000;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(calc(100% - 20px), 700px);
  padding: 8px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e0e2dd;
  border-radius: 20px;
  box-shadow: 0 12px 35px rgba(29, 45, 35, 0.18);
  backdrop-filter: blur(12px);
}
.mobile-bottom-nav a,
.mobile-bottom-nav > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 52px;
  border-radius: 14px;
  color: #6b746e;
  text-decoration: none;
  font-size: 0.75rem;
}
.mobile-bottom-nav a > span,
.mobile-bottom-nav > span > span {
  font-size: 1.15rem;
}
.mobile-bottom-nav a.active {
  background: #eaf2ec;
  color: #2f6942;
  font-weight: 700;
}
.mobile-bottom-nav .disabled {
  opacity: 0.4;
}
.erp-mobile-workday .erp4-module-page {
  margin: 12px 12px 90px;
}
.erp-mobile-workday .panel-head {
  flex-direction: column;
  align-items: stretch;
}
.erp-mobile-workday .workday-layout,
.erp-mobile-workday .signature-grid {
  grid-template-columns: 1fr;
}
.erp-mobile-workday .clock-actions {
  display: grid;
  grid-template-columns: 1fr;
}
.erp-mobile-workday .clock-actions form,
.erp-mobile-workday .clock-actions button {
  width: 100%;
}
.erp-mobile-workday .primary-action,
.erp-mobile-workday .secondary-action {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.erp-mobile-workday .workday-times {
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 480px) {
  .mobile-shell {
    padding-left: 10px;
    padding-right: 10px;
  }
  .mobile-focus-actions {
    grid-template-columns: 1fr;
  }
  .mobile-app-header h2 {
    font-size: 1.45rem;
  }
  .erp-mobile-workday .workday-times {
    grid-template-columns: 1fr;
  }
  .erp-mobile-workday .erp4-module-page {
    margin-left: 8px;
    margin-right: 8px;
  }
}

/* ERP 4.0 Release 1.0 – finale Dashboard-Icons */
.dashboard-head {
  align-items: flex-start;
}
.metric-icon,
.activity-icon,
.quick-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 0 !important;
  text-align: center;
}
.metric-icon svg,
.activity-icon svg,
.quick-icon svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.metric-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  flex: 0 0 38px;
}
.activity-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}
.activity-icon svg {
  width: 18px;
  height: 18px;
}
.quick-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.quick-grid a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 118px;
}
.quick-grid .quick-icon {
  width: 38px;
  height: 38px;
  margin: 0 0 12px;
  border-radius: 10px;
  background: #f0f2f4;
  color: #59616b;
}
.quick-grid .quick-icon svg {
  width: 21px;
  height: 21px;
}
.quick-grid a:nth-child(1) .quick-icon {
  background: var(--green-soft);
  color: var(--green);
}
.quick-grid a:nth-child(2) .quick-icon {
  background: var(--violet-soft);
  color: var(--violet);
}
.quick-grid a:nth-child(3) .quick-icon {
  background: var(--blue-soft);
  color: var(--blue);
}
@media (max-width: 760px) {
  .quick-grid {
    grid-template-columns: 1fr;
  }
}

/* ERP 4.0 FINAL: Zahlung direkt in der Rechnungsübersicht */
.inline-payment {
  position: relative;
  display: inline-block;
}
.inline-payment > summary {
  cursor: pointer;
  list-style: none;
}
.inline-payment > summary::-webkit-details-marker {
  display: none;
}
.inline-payment-form {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  width: min(420px, 88vw);
  padding: 16px;
  border: 1px solid var(--line, #dfe4e8);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(20, 30, 40, 0.16);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.inline-payment-form label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
}
.inline-payment-form input,
.inline-payment-form select {
  width: 100%;
}
.inline-payment-form .primary-action {
  grid-column: 1 / -1;
  justify-content: center;
}
@media (max-width: 760px) {
  .inline-payment-form {
    position: fixed;
    left: 6vw;
    right: 6vw;
    top: 18vh;
    width: auto;
    grid-template-columns: 1fr;
  }
}

/* ERP 4.0 FINAL – große Seite Zahlungsjournal bearbeiten */
.payment-editor-page {
  max-width: none;
}
.payment-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 18px;
}
.payment-editor-head h2 {
  margin: 5px 0 0;
  font-size: 1.72rem;
}
.payment-editor-card,
.payment-info-card {
  border: 1px solid #e2e6e4;
  border-radius: 14px;
  background: #fff;
  padding: 22px;
}
.payment-editor-card h4,
.payment-info-card h4 {
  margin: 0 0 22px;
  font-size: 1.05rem;
}
.payment-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 30px;
}
.payment-editor-grid label {
  display: grid;
  gap: 8px;
  font-weight: 650;
  color: #24302a;
}
.payment-editor-grid label em {
  color: #c63333;
  font-style: normal;
}
.payment-editor-grid label small {
  font-weight: 400;
  color: #6f7772;
}
.payment-editor-grid input,
.payment-editor-grid select,
.payment-editor-grid textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid #d9dfdc;
  border-radius: 8px;
  background: #fff;
  font: inherit;
}
.payment-editor-grid textarea {
  min-height: 86px;
  resize: vertical;
}
.payment-editor-wide {
  grid-column: 1/-1;
}
.money-input {
  display: grid;
  grid-template-columns: 1fr 42px;
}
.money-input input {
  border-radius: 8px 0 0 8px;
}
.money-input span {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d9dfdc;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: #f5f7f6;
}
.payment-editor-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
}
.payment-editor-actions > div {
  display: flex;
  gap: 12px;
}
.danger-outline {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #e34b4b;
  border-radius: 8px;
  background: #fff;
  color: #c62828;
  font-weight: 650;
  cursor: pointer;
}
.payment-info-card {
  margin-top: 16px;
}
.payment-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.payment-info-grid > div {
  padding: 5px 22px;
  border-right: 1px solid #e1e5e3;
}
.payment-info-grid > div:first-child {
  padding-left: 0;
}
.payment-info-grid > div:last-child {
  border-right: 0;
}
.payment-info-grid span {
  display: block;
  color: #69736d;
  margin-bottom: 10px;
}
.payment-info-grid strong {
  font-size: 1.13rem;
}
.success-text {
  color: #147a47;
}
.payment-editor-note {
  margin-top: 16px;
  padding: 15px 18px;
  border: 1px solid #cce4d6;
  border-radius: 9px;
  background: #f0faf4;
  color: #255c3c;
}
.payment-editor-note::first-letter {
  color: #18794e;
}
@media (max-width: 900px) {
  .payment-editor-grid {
    grid-template-columns: 1fr;
  }
  .payment-editor-wide {
    grid-column: auto;
  }
  .payment-info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  .payment-info-grid > div {
    border-right: 0;
    padding: 0;
  }
  .payment-editor-head,
  .payment-editor-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .payment-editor-actions > div {
    justify-content: flex-end;
  }
}
@media (max-width: 560px) {
  .payment-info-grid {
    grid-template-columns: 1fr;
  }
  .payment-editor-actions > div {
    flex-direction: column;
  }
  .payment-editor-actions .primary-action,
  .payment-editor-actions .secondary-action,
  .danger-outline {
    width: 100%;
    justify-content: center;
  }
}

/* ERP 4.0 FINAL: Murgtal-Shuttle-Kalender */
.shuttle-calendar-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin: 4px 0 20px;
}
.shuttle-calendar-tabs,
.shuttle-calendar-nav,
.shuttle-calendar-nav form {
  display: flex;
  align-items: end;
  gap: 9px;
  flex-wrap: wrap;
}
.shuttle-calendar-tabs .active {
  background: #315f8f;
  color: #fff;
  border-color: #315f8f;
}
.shuttle-month-title {
  margin: 8px 0 12px;
  font-size: 22px;
  font-weight: 750;
  color: #223d59;
}
.shuttle-week-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(190px, 1fr));
  gap: 10px;
  overflow-x: auto;
}
.shuttle-week-column {
  min-height: 410px;
  border: 1px solid #dfe7ee;
  border-radius: 13px;
  background: #f8fafc;
  overflow: hidden;
}
.shuttle-week-column.today {
  border-color: #5b88b4;
  box-shadow: 0 0 0 2px rgba(66, 117, 163, 0.12);
}
.shuttle-week-column > header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 13px;
  background: #edf3f8;
  border-bottom: 1px solid #dfe7ee;
}
.shuttle-week-column > header span {
  font-size: 12px;
  color: #617383;
}
.shuttle-week-items {
  padding: 9px;
}
.shuttle-calendar-empty {
  padding: 25px 8px;
  text-align: center;
  color: #8997a3;
  font-size: 13px;
}
.shuttle-calendar-card {
  display: block;
  margin-bottom: 9px;
  padding: 10px;
  border: 1px solid #dfe6ec;
  border-left: 4px solid #7a8b99;
  border-radius: 9px;
  background: #fff;
  color: #243746;
  text-decoration: none;
  box-shadow: 0 2px 7px rgba(34, 57, 75, 0.04);
}
.shuttle-calendar-card.status-success,
.shuttle-month-item.status-success {
  border-left-color: #3f8d62;
}
.shuttle-calendar-card.status-info,
.shuttle-month-item.status-info {
  border-left-color: #3c7fb4;
}
.shuttle-calendar-card.status-warning,
.shuttle-month-item.status-warning {
  border-left-color: #d59b2c;
}
.shuttle-calendar-card.status-danger,
.shuttle-month-item.status-danger {
  border-left-color: #b94c4c;
}
.shuttle-calendar-card:hover,
.shuttle-month-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 13px rgba(34, 57, 75, 0.09);
}
.shuttle-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.shuttle-card-head span {
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 999px;
  background: #eef2f4;
  color: #526675;
}
.shuttle-calendar-card b {
  display: block;
  margin: 7px 0 4px;
  font-size: 13px;
}
.shuttle-calendar-card small {
  display: block;
  line-height: 1.35;
  color: #687887;
}
.shuttle-card-meta {
  display: grid;
  gap: 2px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid #edf0f2;
  font-size: 11px;
  color: #556979;
}
.shuttle-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(145px, 1fr));
  border-top: 1px solid #dfe6ec;
  border-left: 1px solid #dfe6ec;
  overflow-x: auto;
}
.shuttle-month-weekday {
  padding: 11px;
  text-align: center;
  font-weight: 700;
  background: #edf3f8;
  border-right: 1px solid #dfe6ec;
  border-bottom: 1px solid #dfe6ec;
  color: #304d67;
}
.shuttle-month-day {
  min-height: 155px;
  padding: 8px;
  background: #fff;
  border-right: 1px solid #dfe6ec;
  border-bottom: 1px solid #dfe6ec;
}
.shuttle-month-day.muted {
  background: #f8f9fa;
  color: #9aa5ad;
}
.shuttle-month-day.today {
  box-shadow: inset 0 0 0 2px #5b88b4;
}
.shuttle-month-day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}
.shuttle-month-day-head > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 750;
  text-decoration: none;
  color: #284c6c;
}
.shuttle-month-day.today .shuttle-month-day-head > a {
  background: #315f8f;
  color: #fff;
}
.shuttle-month-day-head span {
  font-size: 10px;
  color: #73818c;
}
.shuttle-month-items {
  display: grid;
  gap: 5px;
}
.shuttle-month-item {
  display: block;
  padding: 6px 7px;
  border: 1px solid #e3e8ec;
  border-left: 3px solid #7a8b99;
  border-radius: 7px;
  background: #fbfcfd;
  text-decoration: none;
  color: #2a3e4e;
  transition: 0.15s;
}
.shuttle-month-item strong {
  font-size: 11px;
}
.shuttle-month-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 650;
}
.shuttle-month-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: #72818d;
}
.shuttle-more {
  font-size: 11px;
  color: #315f8f;
  text-decoration: none;
}
.shuttle-calendar-page .status-neutral {
  border-left-color: #83909a;
}
@media (max-width: 1100px) {
  .shuttle-week-board {
    grid-template-columns: repeat(7, 210px);
  }
  .shuttle-month-grid {
    grid-template-columns: repeat(7, 160px);
  }
}
@media (max-width: 760px) {
  .shuttle-calendar-toolbar {
    align-items: stretch;
  }
  .shuttle-calendar-tabs,
  .shuttle-calendar-nav {
    width: 100%;
  }
  .shuttle-calendar-nav form {
    width: 100%;
  }
  .shuttle-calendar-nav .secondary-action {
    flex: 1;
    text-align: center;
  }
}

/* ERP 4.1 Phase 2 – Shuttle-Buchungsbestätigung */
.workflow-action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 22px;
  padding: 24px 26px;
  border: 1px solid #cfe1d7;
  border-left: 5px solid #17633f;
  border-radius: 14px;
  background: #f7fbf8;
}
.workflow-action-card h4 {
  margin: 4px 0 8px;
  font-size: 1.25rem;
}
.workflow-action-card p {
  margin: 5px 0;
  color: #52625a;
}
.workflow-send-form {
  flex: 0 0 auto;
}
.primary-action.large {
  padding: 14px 22px;
  font-size: 1rem;
  white-space: nowrap;
}
.primary-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
@media (max-width: 820px) {
  .workflow-action-card {
    align-items: stretch;
    flex-direction: column;
  }
  .workflow-send-form,
  .workflow-send-form .primary-action {
    width: 100%;
  }
}

/* ERP 4 zentraler Kalender */
.calendar-actions,
.calendar-tabs,
.calendar-period-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.central-calendar-toolbar {
  display: flex;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
  margin: 18px 0;
}
.calendar-check {
  display: flex !important;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid #dfe4df;
  border-radius: 8px;
  background: #fff;
}
.calendar-check input {
  width: auto !important;
}
.calendar-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.calendar-dot.household {
  background: #4f7d63;
}
.calendar-dot.shuttle {
  background: #2878b5;
}
.calendar-tabs {
  margin-bottom: 14px;
}
.calendar-tabs .active {
  font-weight: 700;
  background: #eef1ef;
}
.calendar-period-nav {
  justify-content: space-between;
  margin: 12px 0 18px;
}
.calendar-period-nav a {
  text-decoration: none;
}
.central-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-left: 1px solid #dfe4df;
  border-top: 1px solid #dfe4df;
}
.central-weekday {
  padding: 10px;
  text-align: center;
  font-weight: 700;
  background: #f3f5f3;
  border-right: 1px solid #dfe4df;
  border-bottom: 1px solid #dfe4df;
}
.central-day {
  min-height: 150px;
  padding: 8px;
  border-right: 1px solid #dfe4df;
  border-bottom: 1px solid #dfe4df;
  background: #fff;
}
.central-day.muted {
  background: #f8f9f8;
  opacity: 0.62;
}
.central-day.today {
  box-shadow: inset 0 0 0 2px #a47b36;
}
.central-day > header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
}
.central-day > header a {
  font-weight: 800;
  text-decoration: none;
}
.central-event {
  display: block;
  margin: 5px 0;
  padding: 6px 7px;
  border-left: 4px solid;
  border-radius: 5px;
  background: #f6f8f6;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}
.central-event.household {
  border-color: #4f7d63;
}
.central-event.shuttle {
  border-color: #2878b5;
  background: #f2f7fb;
}
.central-event strong,
.central-event span,
.central-event small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.central-event small {
  font-size: 11px;
}
.central-week-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(170px, 1fr));
  gap: 10px;
  overflow-x: auto;
}
.central-week-board.single-day {
  grid-template-columns: minmax(320px, 700px);
}
.central-week-column {
  border: 1px solid #dfe4df;
  border-radius: 9px;
  background: #fff;
  min-height: 270px;
}
.central-week-column > header {
  display: flex;
  justify-content: space-between;
  padding: 11px;
  background: #f3f5f3;
  border-bottom: 1px solid #dfe4df;
}
.central-week-column.today {
  box-shadow: 0 0 0 2px #a47b36;
}
.central-week-column > div {
  padding: 9px;
}
.central-event-card {
  display: block;
  padding: 10px;
  margin-bottom: 9px;
  border-left: 5px solid;
  border-radius: 7px;
  background: #f6f8f6;
  text-decoration: none;
  color: inherit;
}
.central-event-card.household {
  border-color: #4f7d63;
}
.central-event-card.shuttle {
  border-color: #2878b5;
  background: #f2f7fb;
}
.central-event-card > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.central-event-card b,
.central-event-card small,
.central-event-card em {
  display: block;
  margin-top: 4px;
}
.central-event-card em {
  font-size: 12px;
}
.calendar-empty {
  padding: 20px 5px;
  color: #7b827d;
}
.calendar-more {
  font-size: 12px;
}
@media (max-width: 900px) {
  .central-month-grid {
    min-width: 900px;
  }
  .central-calendar-page {
    overflow-x: auto;
  }
  .panel-head .calendar-actions {
    width: 100%;
  }
}

/* ERP 4 – Gesamtkalender im Corporate Design
   Sand / Grün / Anthrazit; bewusst nur auf den zentralen Kalender begrenzt. */
.central-calendar-page {
  --calendar-anthracite: #343a36;
  --calendar-green: #4f7d63;
  --calendar-green-dark: #3f6851;
  --calendar-green-soft: #f1f6f2;
  --calendar-sand: #a8844f;
  --calendar-sand-dark: #82643b;
  --calendar-sand-soft: #f8f2e8;
  --calendar-line: #e5e1d8;
  --calendar-muted: #787d78;
}
.central-calendar-page .panel-kicker {
  color: var(--calendar-sand-dark);
}
.central-calendar-page .panel-description {
  color: #737870;
}
.central-calendar-page .primary-action {
  background: var(--calendar-green);
  border: 1px solid var(--calendar-green);
  color: #fff;
}
.central-calendar-page .primary-action:hover {
  background: var(--calendar-green-dark);
  border-color: var(--calendar-green-dark);
}
.central-calendar-page .secondary-action {
  border-color: #ddd8ce;
  color: var(--calendar-anthracite);
  background: #fff;
}
.central-calendar-page .secondary-action:hover {
  border-color: #c9bea9;
  background: var(--calendar-sand-soft);
}
.central-calendar-page .central-calendar-toolbar input[type="month"],
.central-calendar-page .central-calendar-toolbar input[type="date"] {
  border-color: #d9d5cc;
  color: var(--calendar-anthracite);
}
.central-calendar-page .central-calendar-toolbar input[type="month"]:focus,
.central-calendar-page .central-calendar-toolbar input[type="date"]:focus {
  border-color: var(--calendar-sand);
  box-shadow: 0 0 0 3px rgba(168, 132, 79, 0.12);
  outline: none;
}
.central-calendar-page .calendar-check {
  border-color: #e0ddd5;
  color: var(--calendar-anthracite);
  background: #fff;
}
.central-calendar-page .calendar-check:has(input:checked) {
  border-color: #cfc6b6;
  background: #fbf8f2;
}
.central-calendar-page .calendar-dot.household {
  background: var(--calendar-green);
}
.central-calendar-page .calendar-dot.shuttle {
  background: var(--calendar-sand);
}
.central-calendar-page .calendar-tabs .active {
  color: #fff;
  background: var(--calendar-anthracite);
  border-color: var(--calendar-anthracite);
}
.central-calendar-page .calendar-period-nav a {
  color: var(--calendar-sand-dark);
  font-weight: 700;
}
.central-calendar-page .calendar-period-nav a:hover {
  color: var(--calendar-green-dark);
}
.central-calendar-page .calendar-period-nav strong {
  color: var(--calendar-anthracite);
}
.central-calendar-page .central-month-grid {
  border-color: var(--calendar-line);
  border-radius: 10px;
  overflow: hidden;
}
.central-calendar-page .central-weekday {
  color: var(--calendar-anthracite);
  background: #f4f3ef;
  border-color: var(--calendar-line);
}
.central-calendar-page .central-day {
  border-color: var(--calendar-line);
  background: #fff;
}
.central-calendar-page .central-day.muted {
  background: #faf9f6;
  opacity: 0.72;
}
.central-calendar-page .central-day.today {
  background: #fffdf9;
  box-shadow: inset 0 0 0 2px var(--calendar-sand);
}
.central-calendar-page .central-day > header a {
  color: var(--calendar-anthracite);
}
.central-calendar-page .central-day.muted > header a {
  color: #96958f;
}
.central-calendar-page .central-day.today > header a {
  color: var(--calendar-sand-dark);
}
.central-calendar-page .central-day > header span {
  color: var(--calendar-muted);
}
.central-calendar-page .central-event {
  color: var(--calendar-anthracite);
  border: 1px solid #e4e5e1;
  border-left-width: 4px;
  box-shadow: 0 2px 7px rgba(52, 58, 54, 0.035);
}
.central-calendar-page .central-event.household {
  border-left-color: var(--calendar-green);
  background: var(--calendar-green-soft);
}
.central-calendar-page .central-event.shuttle {
  border-left-color: var(--calendar-sand);
  background: var(--calendar-sand-soft);
}
.central-calendar-page .central-event:hover,
.central-calendar-page .central-event-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 13px rgba(52, 58, 54, 0.08);
}
.central-calendar-page .central-week-column {
  border-color: var(--calendar-line);
}
.central-calendar-page .central-week-column > header {
  color: var(--calendar-anthracite);
  background: #f4f3ef;
  border-color: var(--calendar-line);
}
.central-calendar-page .central-week-column.today {
  box-shadow: 0 0 0 2px var(--calendar-sand);
}
.central-calendar-page .central-event-card {
  color: var(--calendar-anthracite);
  border: 1px solid #e4e5e1;
  border-left-width: 5px;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.central-calendar-page .central-event-card.household {
  border-left-color: var(--calendar-green);
  background: var(--calendar-green-soft);
}
.central-calendar-page .central-event-card.shuttle {
  border-left-color: var(--calendar-sand);
  background: var(--calendar-sand-soft);
}
.central-calendar-page .calendar-more {
  color: var(--calendar-sand-dark);
}
.central-calendar-page .info-note {
  border: 1px solid #e5e1d8;
  background: #f6f5f1;
  color: #626861;
}
.central-calendar-page .info-note strong {
  color: var(--calendar-green-dark);
}

/* ERP 4: kompakte Monatsansicht – kompletter Monat auf einen Blick */
.central-calendar-page .central-month-grid.compact-month .central-weekday {
  padding: 7px 8px;
  font-size: 12px;
}
.central-calendar-page .central-month-grid.compact-month .central-day {
  min-height: 92px;
  padding: 5px 6px;
}
.central-calendar-page .central-month-grid.compact-month .central-day > header {
  margin-bottom: 3px;
  line-height: 1.1;
}
.central-calendar-page
  .central-month-grid.compact-month
  .central-day
  > header
  a {
  font-size: 12px;
}
.central-calendar-page
  .central-month-grid.compact-month
  .central-day
  > header
  span {
  font-size: 10px;
}
.central-calendar-page .central-month-grid.compact-month .central-event {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  margin: 3px 0;
  padding: 3px 5px;
  border-left-width: 3px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.2;
  box-shadow: none;
}
.central-calendar-page .central-month-grid.compact-month .central-event strong {
  flex: 0 0 auto;
  font-size: 10px;
}
.central-calendar-page .central-month-grid.compact-month .central-event span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.central-calendar-page .central-month-grid.compact-month .calendar-more {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.2;
  text-decoration: none;
}
@media (min-width: 1200px) {
  .central-calendar-page .central-month-grid.compact-month .central-day {
    min-height: 86px;
  }
}

/* ERP 4 – CI-Auswahlfeld für Monat und Datum */
.central-calendar-page .calendar-period-field {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 500;
  color: var(--calendar-anthracite);
}
.central-calendar-page .calendar-field-label {
  font-size: 14px;
  color: #555b56;
}
.central-calendar-page .calendar-ci-input {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 166px;
  height: 40px;
  padding: 0 12px 0 14px;
  border: 1px solid #d9d1c4;
  border-radius: 9px;
  background: #fffdf9;
  color: var(--calendar-green-dark);
  box-shadow: 0 2px 8px rgba(52, 58, 54, 0.035);
  overflow: hidden;
}
.central-calendar-page .calendar-ci-input:hover {
  border-color: #c4ae89;
  background: var(--calendar-sand-soft);
}
.central-calendar-page .calendar-ci-input:focus-within {
  border-color: var(--calendar-sand);
  box-shadow: 0 0 0 3px rgba(168, 132, 79, 0.12);
}
.central-calendar-page .calendar-ci-value {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.central-calendar-page .calendar-ci-icon {
  margin-left: 14px;
  color: var(--calendar-sand-dark);
  font-size: 12px;
  line-height: 1;
}
.central-calendar-page .calendar-ci-input input[type="month"],
.central-calendar-page .calendar-ci-input input[type="date"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}
@media (max-width: 760px) {
  .central-calendar-page .calendar-period-field {
    width: 100%;
  }
  .central-calendar-page .calendar-ci-input {
    flex: 1;
  }
}

/* ERP 4 – Aktuell: gemeinsame Tagesansicht */
.sidebar > .aktuell-link {
  margin-top: 6px;
}
.aktuell-page {
  --aktuell-green: #486a59;
  --aktuell-green-soft: #eef4ef;
  --aktuell-sand: #a8844f;
  --aktuell-sand-soft: #f7f0e5;
  --aktuell-text: #343a36;
}
.aktuell-head-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.aktuell-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.aktuell-summary-card {
  padding: 16px 18px;
  border: 1px solid #e5dfd6;
  border-radius: 12px;
  background: #fff;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  box-shadow: 0 3px 12px rgba(52, 58, 54, 0.035);
}
.aktuell-summary-card span {
  font-size: 13px;
  color: #686e69;
}
.aktuell-summary-card strong {
  grid-row: 1/3;
  grid-column: 2;
  font-size: 28px;
  color: var(--aktuell-text);
}
.aktuell-summary-card small {
  font-size: 12px;
  color: #8a8f8b;
}
.aktuell-summary-card.household {
  border-left: 4px solid var(--aktuell-green);
  background: var(--aktuell-green-soft);
}
.aktuell-summary-card.shuttle {
  border-left: 4px solid var(--aktuell-sand);
  background: var(--aktuell-sand-soft);
}
.aktuell-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px;
  border: 1px solid #e5dfd6;
  border-radius: 12px;
  background: #fbfaf7;
}
.aktuell-toolbar .calendar-period-field {
  display: flex;
  align-items: center;
  gap: 8px;
}
.aktuell-toolbar .calendar-ci-input {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 165px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d9d1c4;
  border-radius: 9px;
  background: #fffdf9;
  color: var(--aktuell-green);
  overflow: hidden;
}
.aktuell-toolbar .calendar-ci-input input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.aktuell-toolbar .calendar-ci-value {
  font-weight: 700;
}
.aktuell-filter-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.aktuell-filter-group label {
  cursor: pointer;
}
.aktuell-filter-group input {
  position: absolute;
  opacity: 0;
}
.aktuell-filter-group span {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 13px;
  border: 1px solid #ddd7ce;
  border-radius: 9px;
  background: #fff;
  color: #555b56;
  font-size: 13px;
  font-weight: 600;
}
.aktuell-filter-group input:checked + span {
  background: var(--aktuell-green);
  border-color: var(--aktuell-green);
  color: #fff;
}
.aktuell-date-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 22px 0 10px;
}
.aktuell-date-nav > a {
  text-decoration: none;
  color: var(--aktuell-green);
  font-weight: 700;
}
.aktuell-date-nav > a:last-child {
  text-align: right;
}
.aktuell-date-nav > div {
  text-align: center;
  display: flex;
  flex-direction: column;
}
.aktuell-date-nav strong {
  font-size: 18px;
  color: var(--aktuell-green);
}
.aktuell-date-nav span {
  font-size: 12px;
  color: #858a86;
}
.aktuell-quick-days {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.aktuell-quick-days .active {
  background: var(--aktuell-green);
  border-color: var(--aktuell-green);
  color: #fff;
}
.aktuell-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.aktuell-item {
  display: grid;
  grid-template-columns: 86px 12px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: stretch;
  padding: 16px 18px;
  border: 1px solid #e6e1d9;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(52, 58, 54, 0.035);
}
.aktuell-item.household {
  background: linear-gradient(90deg, var(--aktuell-green-soft), #fff 34%);
}
.aktuell-item.shuttle {
  background: linear-gradient(90deg, var(--aktuell-sand-soft), #fff 34%);
}
.aktuell-time {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.aktuell-time strong {
  font-size: 20px;
  color: var(--aktuell-text);
}
.aktuell-time span {
  font-size: 11px;
  color: #7d827e;
  margin-top: 3px;
}
.aktuell-marker {
  width: 5px;
  border-radius: 99px;
  background: var(--aktuell-green);
}
.aktuell-item.shuttle .aktuell-marker {
  background: var(--aktuell-sand);
}
.aktuell-main {
  min-width: 0;
}
.aktuell-item-topline {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.aktuell-area {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--aktuell-green);
}
.aktuell-item.shuttle .aktuell-area {
  color: var(--aktuell-sand);
}
.aktuell-main h4 {
  margin: 7px 0 2px;
  font-size: 18px;
  color: var(--aktuell-text);
}
.aktuell-title {
  margin: 0 0 9px;
  font-weight: 600;
  color: #555b56;
}
.aktuell-details {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  font-size: 12px;
  color: #6d726e;
}
.aktuell-details b {
  color: #4d534f;
}
.aktuell-item-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.aktuell-empty {
  text-align: center;
  padding: 42px 20px;
  border: 1px dashed #d8d1c7;
  border-radius: 12px;
  background: #fbfaf7;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #606661;
}
.aktuell-empty strong {
  font-size: 17px;
  color: var(--aktuell-green);
}
@media (max-width: 900px) {
  .aktuell-summary {
    grid-template-columns: 1fr;
  }
  .aktuell-item {
    grid-template-columns: 72px 8px minmax(0, 1fr);
  }
  .aktuell-item-action {
    grid-column: 3;
    justify-content: flex-start;
  }
  .aktuell-head-actions {
    justify-content: flex-start;
  }
  .aktuell-date-nav {
    grid-template-columns: 1fr 1fr;
  }
  .aktuell-date-nav > div {
    grid-column: 1/3;
    grid-row: 1;
    margin-bottom: 12px;
  }
}
@media (max-width: 620px) {
  .aktuell-item {
    grid-template-columns: 1fr;
    padding: 14px;
  }
  .aktuell-marker {
    width: 100%;
    height: 4px;
    grid-row: 2;
  }
  .aktuell-time,
  .aktuell-main,
  .aktuell-item-action {
    grid-column: 1;
  }
  .aktuell-toolbar {
    align-items: stretch;
  }
  .aktuell-toolbar .calendar-period-field {
    width: 100%;
  }
  .aktuell-toolbar .calendar-ci-input {
    flex: 1;
  }
  .aktuell-filter-group {
    width: 100%;
  }
  .aktuell-filter-group label {
    flex: 1;
  }
  .aktuell-filter-group span {
    justify-content: center;
    width: 100%;
  }
}

/* ERP 4 · WORKFLOW / Objektservice Corporate Identity */
.facility-page {
  --facility-green: #667d68;
  --facility-green-dark: #4e6652;
  --facility-green-soft: #edf3ee;
  --facility-sand: #b79a66;
  --facility-sand-soft: #f7f2e9;
  --facility-rose: #b88f91;
  --facility-rose-soft: #f8eeee;
  border-color: #e8e4dc;
  box-shadow: 0 8px 28px rgba(61, 70, 62, 0.045);
}
.facility-page .panel-kicker {
  color: #8c7751;
  letter-spacing: 0.9px;
}
.facility-page .panel-description {
  max-width: 760px;
  color: #71756f;
  line-height: 1.55;
}
.facility-page .panel-head h3 {
  font-size: 25px;
  letter-spacing: -0.45px;
  color: #343b36;
}
.facility-hero {
  padding-bottom: 20px;
  margin-bottom: 22px;
  border-bottom: 1px solid #eee9df;
  align-items: center;
}
.facility-primary-action {
  background: #3b413d;
  box-shadow: 0 5px 14px rgba(45, 52, 47, 0.12);
}
.facility-primary-action:hover {
  background: #2d332f;
}
.facility-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 26px;
}
.facility-metric-card {
  min-height: 132px;
  padding: 19px;
  border: 1px solid #e8e4dc;
  border-radius: 13px;
  background: #fff;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: start;
  box-shadow: 0 5px 17px rgba(58, 67, 60, 0.035);
}
.facility-metric-card > div:last-child {
  min-width: 0;
}
.facility-metric-card span {
  display: block;
  margin: 1px 0 8px;
  color: #6f756f;
  font-size: 13px;
  font-weight: 700;
}
.facility-metric-card strong {
  display: block;
  margin-bottom: 8px;
  color: #303732;
  font-size: 31px;
  line-height: 1;
  letter-spacing: -0.8px;
}
.facility-metric-card small {
  display: block;
  color: #8a8f89;
  font-size: 11px;
  line-height: 1.4;
}
.facility-metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
}
.facility-metric-green {
  background: linear-gradient(145deg, #fff 45%, #f3f7f3);
}
.facility-metric-green .facility-metric-icon {
  background: var(--facility-green-soft);
  color: var(--facility-green-dark);
}
.facility-metric-sand {
  background: linear-gradient(145deg, #fff 45%, #faf6ef);
}
.facility-metric-sand .facility-metric-icon {
  background: var(--facility-sand-soft);
  color: #8b7045;
}
.facility-metric-due {
  background: linear-gradient(145deg, #fff 45%, #faf3f1);
}
.facility-metric-due .facility-metric-icon {
  background: var(--facility-rose-soft);
  color: #906466;
}
.facility-metric-staff {
  background: linear-gradient(145deg, #fff 45%, #f5f4f1);
}
.facility-metric-staff .facility-metric-icon {
  background: #f0eee8;
  color: #686052;
}
.facility-section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 12px;
}
.facility-section-title h4 {
  margin: 0;
  color: #353c37;
  font-size: 17px;
}
.facility-section-title a {
  color: #637066;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}
.facility-section-title a:hover {
  color: #3f5545;
}
.facility-table-wrap {
  border: 1px solid #e8e4dc;
  border-radius: 12px;
  overflow: hidden;
}
.facility-page .data-table thead th {
  background: #f7f6f2;
  color: #606760;
  border-bottom-color: #e8e4dc;
  font-size: 11px;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}
.facility-page .data-table tbody tr:hover {
  background: #fafbf9;
}
.facility-count-badge {
  display: inline-flex;
  min-width: 28px;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: var(--facility-green-soft);
  color: var(--facility-green-dark);
  font-size: 12px;
  font-weight: 800;
}
.facility-empty-state {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 24px;
  text-align: center;
}
.facility-empty-state strong {
  color: #4a514c;
  font-size: 15px;
}
.facility-empty-state span {
  max-width: 510px;
  color: #848984;
  font-size: 13px;
  line-height: 1.5;
}
.facility-empty-state .secondary-action {
  margin-top: 8px;
}
.facility-page .form-card {
  border-color: #e8e4dc;
  background: #fdfdfc;
}
.facility-page input:focus,
.facility-page select:focus,
.facility-page textarea:focus {
  border-color: #93a495;
  box-shadow: 0 0 0 3px rgba(102, 125, 104, 0.1);
}
.facility-page .row-action {
  color: #536c58;
}
.facility-page .row-action:hover {
  color: #314a37;
}
@media (max-width: 1200px) {
  .facility-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  .facility-hero,
  .facility-section-title {
    align-items: stretch;
    flex-direction: column;
  }
  .facility-primary-action {
    width: 100%;
  }
  .facility-metric-grid {
    grid-template-columns: 1fr;
  }
  .facility-metric-card {
    min-height: 116px;
  }
}

/* ERP 4 · Dezente Farbleitsystem-Navigation */
:root {
  --brown: #927554;
  --brown-soft: #f7f1e9;
  --nav-green: #f0f7f1;
  --nav-brown: #f8f2ea;
  --nav-blue: #f0f5fb;
  --nav-orange: #faf4eb;
  --nav-teal: #eef7f6;
  --nav-violet: #f4f1fa;
  --nav-petrol: #eef6f7;
  --nav-gray: #f2f3f5;
}
.sidebar {
  background: #fffdfb;
}
.sidebar .dashboard {
  background: #f4f5f6;
  border-left: 4px solid #aab0b7;
  padding-left: 10px;
}
.sidebar .dashboard:hover,
.sidebar .dashboard.active {
  background: #eceff1;
  border-left-color: #6d7580;
}
.sidebar .menu-section {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 7px;
  border: 1px solid transparent;
}
.sidebar .menu-section .toggle {
  border-radius: 9px;
  border-left: 4px solid transparent;
  padding-left: 10px;
}
.sidebar .menu-section[data-theme="green"] {
  background: var(--nav-green);
  border-color: #e3eee5;
}
.sidebar .menu-section[data-theme="brown"] {
  background: var(--nav-brown);
  border-color: #eee2d4;
}
.sidebar .menu-section[data-theme="blue"] {
  background: var(--nav-blue);
  border-color: #e1eaf5;
}
.sidebar .menu-section[data-theme="orange"] {
  background: var(--nav-orange);
  border-color: #f0e5d5;
}
.sidebar .menu-section[data-theme="teal"] {
  background: var(--nav-teal);
  border-color: #dfeeed;
}
.sidebar .menu-section[data-theme="violet"] {
  background: var(--nav-violet);
  border-color: #e8e2f3;
}
.sidebar .menu-section[data-theme="petrol"] {
  background: var(--nav-petrol);
  border-color: #dfedef;
}
.sidebar .menu-section[data-theme="gray"] {
  background: var(--nav-gray);
  border-color: #e5e7ea;
}
.sidebar .menu-section[data-theme="green"] .toggle {
  border-left-color: #7ca88a;
}
.sidebar .menu-section[data-theme="brown"] .toggle {
  border-left-color: #b59670;
}
.sidebar .menu-section[data-theme="blue"] .toggle {
  border-left-color: #7fa5cf;
}
.sidebar .menu-section[data-theme="orange"] .toggle {
  border-left-color: #c99b61;
}
.sidebar .menu-section[data-theme="teal"] .toggle {
  border-left-color: #72a8a3;
}
.sidebar .menu-section[data-theme="violet"] .toggle {
  border-left-color: #9a8bc6;
}
.sidebar .menu-section[data-theme="petrol"] .toggle {
  border-left-color: #6e9ca1;
}
.sidebar .menu-section[data-theme="gray"] .toggle {
  border-left-color: #9aa0a8;
}
.sidebar .menu-section[data-theme="brown"] .toggle:hover,
.sidebar .menu-section[data-theme="brown"].open .toggle {
  background: #f1e6da;
}
.sidebar .menu-section[data-theme="brown"] .toggle:hover .arrow,
.sidebar .menu-section[data-theme="brown"].open .toggle .arrow {
  color: var(--brown);
}
.sidebar .menu-section[data-theme="brown"] .submenu a.active {
  background: #eee1d2;
  color: #765d42;
}
.sidebar .menu-section .submenu {
  margin: 2px 10px 10px 18px;
  background: rgba(255, 255, 255, 0.56);
  border-radius: 0 8px 8px 0;
}
.sidebar .menu-section .submenu a:hover {
  background: rgba(255, 255, 255, 0.82);
}
.sidebar .menu-section.open {
  box-shadow: 0 4px 13px rgba(48, 55, 50, 0.045);
}
@media (max-width: 900px) {
  .sidebar .menu-section {
    margin-bottom: 6px;
  }
}

/* ERP 4 · Ruhige Navigation: Farbe nur auf den Hauptbereichen */
.sidebar {
  background: #fff;
}
.sidebar .dashboard {
  background: transparent;
  border-left: 0;
  padding-left: 14px;
}
.sidebar .dashboard:hover,
.sidebar .dashboard.active {
  background: #f2f3f2;
  color: var(--text);
  box-shadow: none;
}
.sidebar .menu-section {
  background: transparent !important;
  border: 0 !important;
  border-radius: 9px;
  overflow: visible;
  margin-bottom: 4px;
  box-shadow: none !important;
}
.sidebar .menu-section .toggle {
  border-left: 0 !important;
  border-radius: 9px;
  padding: 12px 14px;
}
.sidebar .menu-section[data-theme="green"] .toggle:hover,
.sidebar .menu-section[data-theme="green"].open .toggle {
  background: #eef5ef;
}
.sidebar .menu-section[data-theme="brown"] .toggle:hover,
.sidebar .menu-section[data-theme="brown"].open .toggle {
  background: #f5f0e9;
}
.sidebar .menu-section[data-theme="blue"] .toggle:hover,
.sidebar .menu-section[data-theme="blue"].open .toggle {
  background: #eef3f8;
}
.sidebar .menu-section[data-theme="orange"] .toggle:hover,
.sidebar .menu-section[data-theme="orange"].open .toggle {
  background: #f7f3ec;
}
.sidebar .menu-section[data-theme="teal"] .toggle:hover,
.sidebar .menu-section[data-theme="teal"].open .toggle {
  background: #edf5f4;
}
.sidebar .menu-section[data-theme="violet"] .toggle:hover,
.sidebar .menu-section[data-theme="violet"].open .toggle {
  background: #f2eff6;
}
.sidebar .menu-section[data-theme="petrol"] .toggle:hover,
.sidebar .menu-section[data-theme="petrol"].open .toggle {
  background: #edf4f5;
}
.sidebar .menu-section[data-theme="gray"] .toggle:hover,
.sidebar .menu-section[data-theme="gray"].open .toggle {
  background: #f1f2f3;
}
.sidebar .menu-section .submenu {
  margin: 3px 0 8px 22px;
  padding: 3px 0 3px 13px;
  background: transparent !important;
  border-left: 1px solid #e2e5e2;
  border-radius: 0;
}
.sidebar .menu-section .submenu a,
.sidebar .menu-section .submenu a:hover,
.sidebar .menu-section .submenu a.active {
  background: transparent !important;
  box-shadow: none !important;
}
.sidebar .menu-section .submenu a {
  padding: 9px 10px;
  color: #4f5862;
}
.sidebar .menu-section .submenu a:hover {
  color: #222b34;
}
.sidebar .menu-section .submenu a.active {
  color: #202830;
  font-weight: 700;
}
.sidebar .menu-section[data-theme="green"] .submenu a.active,
.sidebar .menu-section[data-theme="brown"] .submenu a.active,
.sidebar .menu-section[data-theme="blue"] .submenu a.active,
.sidebar .menu-section[data-theme="orange"] .submenu a.active,
.sidebar .menu-section[data-theme="teal"] .submenu a.active,
.sidebar .menu-section[data-theme="violet"] .submenu a.active,
.sidebar .menu-section[data-theme="petrol"] .submenu a.active,
.sidebar .menu-section[data-theme="gray"] .submenu a.active {
  background: transparent !important;
  color: #202830;
}

/* ERP 4 – Ruhemodus: "Die Software soll den Benutzer niemals ermüden." */
:root {
  --bg: #f4f5f6;
  --panel: #ffffff;
  --text: #30363d;
  --muted: #6f7780;
  --line: #e3e6e8;
  --green: #52735f;
  --green-soft: #f1f5f2;
  --blue: #60758a;
  --blue-soft: #f2f4f6;
  --teal: #5f7775;
  --teal-soft: #f2f5f5;
  --orange: #85725e;
  --orange-soft: #f5f3f0;
  --violet: #756f7d;
  --violet-soft: #f4f3f5;
  --petrol: #5f7276;
  --petrol-soft: #f2f4f5;
  --gray: #6f757b;
  --gray-soft: #f1f2f3;
}
body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}
.sidebar {
  box-shadow: none;
  background: #fbfbfc;
  border-right-color: #e1e4e6;
}
.brand {
  padding-bottom: 20px;
  margin-bottom: 16px;
}
.search input {
  background: #fff;
  border-color: #dfe3e6;
  box-shadow: none;
}
.search input:focus {
  border-color: #9aa8a0;
  box-shadow: 0 0 0 3px rgba(82, 115, 95, 0.08);
}
.dashboard,
.toggle {
  font-weight: 600;
  color: #3a4148;
  transition:
    background 0.12s ease,
    color 0.12s ease;
}
.dashboard:hover,
.dashboard.active {
  background: #eef0f1;
}
.menu-section .toggle:hover,
.menu-section.open .toggle {
  box-shadow: none;
}
.menu-section[data-theme] .toggle:hover,
.menu-section[data-theme].open .toggle {
  background: #eff1f2;
  color: #30363d;
}
.menu-section[data-theme] .toggle:hover .arrow,
.menu-section[data-theme].open .toggle .arrow {
  color: #657069;
}
.submenu {
  border-left-color: #dde1e3;
  margin-top: 4px;
}
.submenu a {
  color: #4e565e;
  background: transparent !important;
}
.submenu a:hover {
  background: #f0f2f3 !important;
  color: #2f353b;
}
.submenu a.active {
  background: transparent !important;
  color: #2f353b !important;
  font-weight: 650;
  box-shadow: inset 3px 0 0 #718178;
  border-radius: 0 7px 7px 0;
}
.content {
  padding: 34px 38px;
}
.topbar,
.card,
.panel,
.metric-card,
.form-card,
.detail-card,
.payment-editor-card,
.payment-info-card {
  border-color: var(--line);
  box-shadow: 0 2px 8px rgba(28, 35, 40, 0.035);
}
.topbar {
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 24px;
}
.topbar h1 {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.2px;
}
.card,
.panel {
  border-radius: 11px;
}
.card {
  padding: 28px;
}
.label,
.badge,
.mini-badge,
.status-badge,
.status-pill,
.appointment-status {
  border-radius: 6px;
  background: #eef0f1 !important;
  color: #4e575f !important;
  border-color: #dfe3e5 !important;
}
.primary-action,
.facility-primary-action,
.mobile-main-button {
  background: #4f6758 !important;
  border-color: #4f6758 !important;
  color: #fff !important;
  box-shadow: none !important;
  transform: none !important;
}
.primary-action:hover,
.facility-primary-action:hover,
.mobile-main-button:hover {
  background: #43594c !important;
  transform: none !important;
}
.secondary-action,
.text-button,
.row-action {
  background: #fff !important;
  color: #46505a !important;
  border-color: #d9dee1 !important;
  box-shadow: none !important;
}
.secondary-action:hover,
.text-button:hover,
.row-action:hover {
  background: #f4f5f6 !important;
  color: #2f363c !important;
}
.metric-grid {
  gap: 14px;
}
.metric-card {
  border-radius: 10px;
  min-height: 145px;
  padding: 18px;
  border-top: 3px solid #d8ddda;
}
.metric-icon,
.quick-icon,
.activity-icon {
  background: #eef0f1 !important;
  color: #5d676f !important;
}
.metric-green,
.metric-blue,
.metric-violet,
.metric-petrol {
  border-top-color: #9aa7a0;
}
.metric-value {
  font-size: 31px;
  color: #2f353a;
}
.metric-kicker {
  color: #7a8289;
  letter-spacing: 0.25px;
}
.preview div,
.quick-grid a,
.aktuell-summary-card,
.facility-metric-card {
  background: #fafafa;
  border-color: #e3e6e8;
  box-shadow: none;
}
.data-table,
.crm-table,
.erp4-standard-table,
.communication-table {
  background: #fff;
}
.data-table th,
.crm-table th,
.erp4-standard-table th,
.communication-table th {
  background: #f1f3f4 !important;
  color: #4c555d !important;
  border-color: #e1e4e6 !important;
}
.data-table td,
.crm-table td,
.erp4-standard-table td,
.communication-table td {
  border-color: #eceeef !important;
}
.data-table tbody tr:nth-child(even),
.crm-table tbody tr:nth-child(even),
.erp4-standard-table tbody tr:nth-child(even),
.communication-table tbody tr:nth-child(even) {
  background: #fafbfb;
}
.data-table tbody tr:hover,
.crm-table tbody tr:hover,
.erp4-standard-table tbody tr:hover,
.communication-table tbody tr:hover {
  background: #f5f6f6;
}
input,
select,
textarea {
  border-color: #d8dde0 !important;
  background: #fff;
  color: #30363d;
  box-shadow: none !important;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #8e9a93 !important;
  box-shadow: 0 0 0 3px rgba(82, 115, 95, 0.07) !important;
  outline: none;
}
.panel-kicker,
.metric-kicker,
.facility-eyebrow {
  color: #778079 !important;
}
.chart-legend,
.bar-chart {
  filter: saturate(0.35);
}
.bar-green,
.bar-blue,
.legend-green,
.legend-blue,
.mark-green,
.mark-blue {
  filter: saturate(0.35);
}
.workflow-action-card,
.payment-editor-note {
  background: #f5f7f5;
  border-color: #d8e0da;
  color: #405047;
}
.shuttle-week-column,
.shuttle-month-day,
.shuttle-calendar-card,
.shuttle-month-item {
  box-shadow: none;
}
.shuttle-week-column > header,
.shuttle-month-weekday {
  background: #f0f2f3;
  color: #4b5964;
}
.shuttle-calendar-tabs .active,
.shuttle-month-day.today .shuttle-month-day-head > a {
  background: #596d7d !important;
  border-color: #596d7d !important;
}
@media (max-width: 900px) {
  .content {
    padding: 20px;
  }
  .sidebar {
    box-shadow: none;
  }
}

/* ERP 4.8.5 – Dashboard-Hintergrund auf allen ERP-Seiten beibehalten */
html,
body,
.layout,
.content {
  background-color: var(--bg);
}

.layout {
  min-height: 100vh;
}

.content {
  min-height: 100vh;
}

/* ERP 4.8.6 – Modulaufbau exakt wie im Dashboard */
.content > .panel {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.content > .panel > .panel-head:first-child,
.content > .panel > .erp4-section-head:first-child {
  margin-top: 0;
}

/* ERP 5 workflow shell */
.erp5-sidebar .erp5-main-nav{display:flex;flex-direction:column;gap:4px;padding:8px 14px}.erp5-nav-link{display:block;padding:11px 12px;border-radius:9px;color:inherit;text-decoration:none;font-weight:650}.erp5-nav-link:hover,.erp5-nav-link.active{background:#eef1ee;color:#244b3b}.erp5-workflow{margin:22px 16px;padding:14px;border-radius:12px;background:#f4f2e8;font-size:12px;line-height:1.5}.erp5-workflow span{display:block;margin-top:5px}.erp5-page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;margin:24px 0}.erp5-page-head h2{margin:4px 0 6px;font-size:30px}.erp5-page-head p{margin:0;color:#6d746f}.erp5-status-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px}.erp5-status-tabs a{padding:9px 12px;background:#fff;border:1px solid #dfe3df;border-radius:10px;text-decoration:none;color:inherit}.erp5-status-tabs a.active{background:#315c49;color:white;border-color:#315c49}.erp5-status-tabs b{margin-left:5px}.erp5-filter{display:flex;gap:10px;margin-bottom:18px}.erp5-filter input{flex:1}.erp5-badge{display:inline-block;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:700;background:#eef0ef}.status-planned{background:#eef1f5;color:#4d6176}.status-confirmed{background:#e7f0ff;color:#315f9d}.status-in_progress{background:#fff0cf;color:#855a00}.status-completed{background:#e3f3e8;color:#27613b}.status-cancelled{background:#f6e5e5;color:#8b3434}.erp5-order-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.erp5-process{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0 18px}.erp5-process span{padding:7px 9px;border-radius:8px;background:#f0f1f0;font-size:12px}.erp5-process span.current{background:#315c49;color:white}.erp5-dl{display:grid;grid-template-columns:120px 1fr;gap:10px 16px}.erp5-dl dt{color:#727873}.erp5-dl dd{margin:0;font-weight:600}.erp5-timeline>div{border-left:3px solid #dfe5e1;padding:0 0 16px 14px;margin-left:4px}.btn.small{padding:7px 10px}@media(max-width:900px){.erp5-order-grid{grid-template-columns:1fr}.erp5-page-head{flex-direction:column}.erp5-filter{flex-direction:column}}

/* ERP 5.1 – ruhige, funktionale Corporate Identity */
:root {
  --bg: #f4f6f4;
  --panel: #ffffff;
  --text: #26322c;
  --line: #dfe5e1;
  --brand: #315c49;
  --brand-strong: #244637;
  --brand-soft: #edf4f0;
  --muted: #68736d;
  --danger: #8b3e3e;
  --warning: #8a650f;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(32, 53, 43, 0.055);
}
body { background: var(--bg); color: var(--text); }
a { color: var(--brand); }
.layout { grid-template-columns: 272px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 20px 16px;
  box-shadow: none;
  background: #fbfcfb;
}
.brand { padding: 2px 8px 18px; margin-bottom: 16px; }
.brand-logo img { width: min(205px, 100%); max-height: 88px; }
.search { margin: 0 4px 20px; }
.search input {
  min-height: 42px;
  border-color: var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 14px;
}
.search input:focus { border-color: #7b9d8d; box-shadow: 0 0 0 3px rgba(49,92,73,.10); }
.erp5-main-nav { padding: 0 4px !important; gap: 18px !important; }
.erp5-nav-group { display: flex; flex-direction: column; gap: 3px; }
.erp5-nav-heading {
  padding: 0 10px 6px;
  color: #8a948e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.erp5-nav-link {
  padding: 10px 11px;
  border-radius: 8px;
  color: #3b4741;
  font-size: 14px;
  font-weight: 600;
  border-left: 3px solid transparent;
}
.erp5-nav-link:hover { background: #f0f3f1; color: var(--brand-strong); }
.erp5-nav-link.active {
  background: var(--brand-soft);
  color: var(--brand-strong);
  border-left-color: var(--brand);
  font-weight: 750;
}
.erp5-workflow {
  margin: 24px 4px 0;
  padding: 13px;
  border: 1px solid #e3e7df;
  background: #f7f7f2;
  color: #606a64;
  border-radius: 10px;
}
.erp5-workflow strong { color: #3d4842; }
.content { padding: 28px clamp(24px, 3vw, 46px) 48px; min-width: 0; }
.topbar {
  min-height: 62px;
  padding: 14px 18px;
  margin-bottom: 24px;
  border-radius: var(--radius);
  box-shadow: none;
}
.topbar h1 { font-size: 20px; font-weight: 700; }
.user-menu { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.user-menu a { color: var(--muted); text-decoration: none; }
.user-menu a:hover { color: var(--brand); }
.panel, .card, .metric-card, .topbar {
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.panel { padding: 22px; border-radius: var(--radius); }
.erp5-page-head { margin: 8px 0 20px; align-items: flex-end; }
.erp5-page-head h2 { margin: 3px 0 5px; font-size: clamp(25px, 2.4vw, 32px); letter-spacing: -.45px; }
.erp5-page-head p { max-width: 780px; line-height: 1.55; color: var(--muted); }
.panel-kicker { color: #7c8881; letter-spacing: .09em; }
.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 39px;
  padding: 8px 14px;
  border: 1px solid #cfd7d2;
  border-radius: 8px;
  background: #fff;
  color: #35413b;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: #f5f7f5; border-color: #b9c5bf; }
.btn.primary, .primary-action {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: none;
}
.btn.primary:hover, .primary-action:hover { background: var(--brand-strong); border-color: var(--brand-strong); transform: none; }
input, select, textarea {
  min-height: 41px;
  padding: 9px 11px;
  border: 1px solid #cfd7d2;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
}
textarea { min-height: 92px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #7b9d8d; box-shadow: 0 0 0 3px rgba(49,92,73,.10); }
.erp5-filter { padding: 0; margin-bottom: 16px; }
.erp5-status-tabs { gap: 6px; }
.erp5-status-tabs a { padding: 8px 11px; border-radius: 8px; font-size: 13px; }
.erp5-status-tabs a.active { background: var(--brand); border-color: var(--brand); }
.table-wrap { overflow-x: auto; border: 1px solid #e4e8e5; border-radius: 10px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 13px 14px; border-bottom: 1px solid #e8ece9; text-align: left; vertical-align: middle; }
th { background: #f7f9f7; color: #66716b; font-size: 11px; letter-spacing: .045em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcfb; }
.muted { color: #7a8580; }
.erp5-badge { border: 1px solid transparent; font-weight: 750; }
.status-planned { background:#f0f2f4; color:#56636c; border-color:#e0e4e7; }
.status-confirmed { background:#edf3f7; color:#3e647d; border-color:#dbe7ee; }
.status-in_progress { background:#f8f1dc; color:#765a13; border-color:#eee0b4; }
.status-completed { background:#eaf4ed; color:#315f42; border-color:#d4e8da; }
.status-cancelled { background:#f6eaea; color:#864444; border-color:#ecd4d4; }
.erp5-order-grid { gap: 16px; }
.erp5-process { padding: 12px; background: #f7f9f7; border: 1px solid #e4e8e5; border-radius: 10px; }
.erp5-process span { background: transparent; border: 1px solid #dfe4e1; }
.erp5-process span.current { background: var(--brand); border-color: var(--brand); }
.erp5-dl dt { color: #77827c; }
.erp5-dl dd { font-weight: 600; }
.metric-grid { gap: 14px; }
.metric-card { min-height: 142px; padding: 18px; border-radius: var(--radius); }
.metric-value { font-size: 30px; }
.metric-icon { background: var(--brand-soft) !important; color: var(--brand) !important; }
.dashboard-grid { gap: 16px; }
.alert { border-radius: 9px; }
@media (max-width: 1050px) {
  .layout { grid-template-columns: 232px minmax(0,1fr); }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .layout { display: block; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand-logo img { width: 175px; }
  .erp5-main-nav { display: grid !important; grid-template-columns: 1fr 1fr; }
  .erp5-nav-heading { padding-top: 8px; }
  .erp5-workflow { display: none; }
  .content { padding: 18px 14px 36px; }
  .topbar { align-items: flex-start; gap: 10px; }
  .user-menu { flex-direction: column; align-items: flex-end; gap: 3px; }
  .metric-grid { grid-template-columns: 1fr; }
}

/* ERP 5.2 – kundenreife, aufgabenorientierte Oberfläche */
.erp5-flat-nav { gap: 3px !important; }
.erp5-flat-nav .erp5-nav-link { min-height: 42px; display:flex; align-items:center; }
.erp5-dashboard-intro { display:flex; align-items:flex-end; justify-content:space-between; gap:28px; margin:8px 0 22px; }
.erp5-dashboard-intro h2 { margin:6px 0 5px; font-size:clamp(30px,3vw,40px); letter-spacing:-.7px; }
.erp5-dashboard-intro p { margin:0; color:var(--muted); font-size:16px; }
.erp5-dashboard-actions { display:flex; gap:10px; flex-wrap:wrap; }
.erp5-focus-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:18px; }
.erp5-focus-card { display:flex; flex-direction:column; min-height:155px; padding:20px; border:1px solid var(--line); border-radius:14px; background:#fff; color:var(--text); text-decoration:none; box-shadow:var(--shadow); transition:border-color .15s ease, transform .15s ease; }
.erp5-focus-card:hover { border-color:#b7c8bf; transform:translateY(-1px); }
.erp5-focus-label { color:#748078; font-size:12px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.erp5-focus-card strong { margin:12px 0 2px; font-size:36px; line-height:1; color:var(--brand-strong); }
.erp5-focus-card > span:not(.erp5-focus-label) { font-size:15px; font-weight:700; }
.erp5-focus-card small { margin-top:auto; padding-top:12px; color:#7c8680; line-height:1.35; }
.erp5-dashboard-main { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(320px,.75fr); gap:18px; align-items:start; }
.erp5-side-stack { display:grid; gap:18px; }
.erp5-today-panel { min-height:430px; }
.erp5-empty-state { display:flex; flex-direction:column; align-items:flex-start; gap:8px; padding:48px 8px; color:var(--muted); }
.erp5-empty-state strong { color:var(--text); font-size:17px; }
.erp5-empty-state .btn { margin-top:8px; }
.erp5-row-action { margin-left:auto; color:var(--brand); font-weight:700; font-size:13px; }
.erp5-priority-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:15px 0; border-bottom:1px solid #e8ece9; color:var(--text); text-decoration:none; }
.erp5-priority-row:last-child { border-bottom:0; }
.erp5-priority-row span { display:flex; flex-direction:column; gap:3px; }
.erp5-priority-row small { color:var(--muted); }
.erp5-priority-row b { color:var(--brand); font-size:20px; }
.erp5-quick-actions { display:grid; gap:9px; }
.erp5-quick-actions a { display:flex; align-items:center; min-height:44px; padding:10px 12px; border:1px solid #dfe5e1; border-radius:9px; background:#fafcfb; color:var(--text); text-decoration:none; font-weight:700; }
.erp5-quick-actions a:hover { background:var(--brand-soft); border-color:#cbdad2; color:var(--brand-strong); }
@media (max-width:1150px) {
  .erp5-focus-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .erp5-dashboard-main { grid-template-columns:1fr; }
  .erp5-side-stack { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:760px) {
  .erp5-dashboard-intro { align-items:flex-start; flex-direction:column; }
  .erp5-dashboard-actions { width:100%; }
  .erp5-dashboard-actions .btn { flex:1; }
  .erp5-focus-grid, .erp5-side-stack { grid-template-columns:1fr; }
  .erp5-focus-card { min-height:135px; }
}

/* ERP 5.4 – ruhiger, workflow-orientierter Standard */
.erp5-grouped-nav { display: flex; flex-direction: column; gap: 18px; }
.erp5-nav-group { display: flex; flex-direction: column; gap: 4px; }
.erp5-nav-heading { padding: 0 12px 6px; color: #8a918d; font-size: 10px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.erp5-nav-link { display: flex; align-items: center; min-height: 42px; padding: 0 12px; border-left: 3px solid transparent; border-radius: 8px; color: #34413b; font-size: 14px; font-weight: 650; text-decoration: none; transition: background .15s ease,border-color .15s ease,color .15s ease; }
.erp5-nav-link:hover { background: #f3f6f4; }
.erp5-nav-link.active { background: #eaf2ed; border-left-color: #426f58; color: #234d38; }
.erp5-module-shell { display: flex; flex-direction: column; gap: 20px; }
.erp5-page-intro { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.erp5-page-intro h2 { margin: 3px 0 7px; font-size: 28px; letter-spacing: -.45px; }
.erp5-page-intro p { margin: 0; color: #68736d; font-size: 15px; }
.erp5-stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.erp5-stat { background: #fff; border: 1px solid #e4e9e5; border-radius: 12px; padding: 18px 20px; box-shadow: 0 5px 18px rgba(31,48,39,.035); }
.erp5-stat span { display: block; color: #758078; font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.erp5-stat strong { display: block; color: #26352d; font-size: 28px; line-height: 1; }
.erp5-toolbar { display: grid; grid-template-columns: minmax(240px,1fr) 190px 190px auto; gap: 10px; padding: 14px; background: #fff; border: 1px solid #e4e9e5; border-radius: 12px; }
.erp5-toolbar input,.erp5-toolbar select { min-height: 42px; border: 1px solid #dce3de; border-radius: 8px; padding: 0 12px; background: #fff; color: #2f3b35; }
.erp5-toolbar button { min-height: 42px; border: 0; border-radius: 8px; padding: 0 16px; background: #425f4f; color: #fff; font-weight: 750; cursor: pointer; }
.erp5-employee-list { display: flex; flex-direction: column; gap: 10px; }
.erp5-employee-row { display: grid; grid-template-columns: minmax(250px,1.3fr) minmax(150px,.8fr) minmax(170px,.9fr) minmax(145px,.7fr) minmax(150px,.75fr) auto; gap: 16px; align-items: center; padding: 17px 18px; background: #fff; border: 1px solid #e4e9e5; border-radius: 12px; text-decoration: none; color: inherit; transition: border-color .15s ease,box-shadow .15s ease,transform .15s ease; }
.erp5-employee-row:hover { border-color: #cbd8d0; box-shadow: 0 8px 24px rgba(35,60,45,.06); transform: translateY(-1px); }
.erp5-person { display: flex; align-items: center; gap: 13px; min-width: 0; }
.erp5-avatar { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 50%; background: #eaf2ed; color: #315d45; font-size: 14px; font-weight: 850; }
.erp5-person strong,.erp5-cell strong { display: block; font-size: 14px; margin-bottom: 4px; }
.erp5-person small,.erp5-cell small { display: block; color: #77817b; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.erp5-cell-label { display: block; color: #89918c; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 5px; }
.erp5-status { display: inline-flex; align-items: center; min-height: 27px; padding: 0 10px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.erp5-status.active { background: #e9f4ed; color: #2f6d48; }
.erp5-status.inactive { background: #f0f1f1; color: #6d7470; }
.erp5-empty { padding: 42px 24px; text-align: center; background: #fff; border: 1px dashed #cfd8d2; border-radius: 12px; color: #6d7771; }
.erp5-section-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.erp5-section-title h3 { margin: 0; font-size: 18px; }
.erp5-section-title span { color: #7a847e; font-size: 12px; }
@media (max-width: 1180px) { .erp5-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .erp5-toolbar { grid-template-columns: 1fr 1fr; } .erp5-employee-row { grid-template-columns: minmax(240px,1.4fr) 1fr 1fr auto; } .erp5-employee-row .erp5-cell:nth-of-type(4),.erp5-employee-row .erp5-cell:nth-of-type(5) { display:none; } }
@media (max-width: 720px) { .erp5-page-intro { flex-direction: column; } .erp5-stat-grid,.erp5-toolbar { grid-template-columns: 1fr; } .erp5-employee-row { grid-template-columns: 1fr auto; } .erp5-employee-row .erp5-cell { display:none; } }

/* ================================================================
   WORKFLOW ERP 5.6 – ruhige Arbeitsoberfläche / ERP-2-Navigation
   ================================================================ */
:root{
  --wf-sand:#eee4d2;
  --wf-sand-hover:#f5efe5;
  --wf-anth:#dfe1df;
  --wf-anth-strong:#a7aaa7;
  --wf-text:#292c2a;
  --wf-muted:#707571;
  --wf-line:#e3e4e2;
  --wf-green:#e6efe4;
  --wf-warning:#f2ead9;
  --wf-danger:#f2e4e2;
}
html{scroll-behavior:smooth}
body{background:#fff!important;color:var(--wf-text);font-weight:400;line-height:1.55}
.layout{grid-template-columns:270px minmax(0,1fr);background:#fff}
.wf-sidebar{
  position:sticky;top:0;height:100vh;overflow-y:auto;
  padding:20px 16px 28px;background:var(--wf-sand)!important;
  border-right:1px solid #ded4c3;box-shadow:none!important;color:#3e403e;
}
.wf-sidebar-brand{padding:2px 8px 16px;border-bottom:1px solid rgba(72,67,58,.10);margin-bottom:16px}
.wf-sidebar-brand img{width:min(205px,100%);max-height:78px;display:block}
.wf-search{position:relative;margin:0 2px 18px}
.wf-search span{position:absolute;left:12px;top:10px;color:#817b70}
.wf-search input{width:100%;min-height:42px;padding:9px 10px 9px 33px;border:1px solid #d8cdbb;border-radius:10px;background:rgba(255,255,255,.72);box-shadow:none}
.wf-search input:focus{outline:none;border-color:#b8ad9c;box-shadow:0 0 0 3px rgba(110,102,91,.07)}
.wf-main-nav{display:flex;flex-direction:column;gap:6px}
.wf-nav-link,.wf-nav-parent{font-family:inherit;color:#3f413f;text-decoration:none}
.wf-main-nav > .wf-nav-link{
  display:flex;align-items:center;min-height:43px;padding:0 15px;border-radius:12px;
  font-size:15px;font-weight:600;background:transparent;border:0;
}
.wf-main-nav > .wf-nav-link:hover{background:var(--wf-sand-hover)}
.wf-main-nav > .wf-nav-link.active{background:var(--wf-anth);font-weight:600}
.wf-nav-group{margin:0}
.wf-nav-parent{
  width:100%;min-height:43px;padding:0 15px;display:flex;align-items:center;justify-content:space-between;
  border:0;border-radius:12px;background:transparent;font-size:15px;font-weight:600;text-align:left;cursor:pointer;
}
.wf-nav-parent:hover{background:var(--wf-sand-hover)}
.wf-nav-group.open>.wf-nav-parent{background:var(--wf-anth)}
.wf-nav-arrow{font-size:13px;color:#77756e;transition:transform .18s ease}
.wf-nav-group.open>.wf-nav-parent .wf-nav-arrow{transform:rotate(180deg)}
.wf-subnav{display:none;margin:7px 0 17px 18px;padding:2px 0 2px 15px;border-left:2px solid #d8cbb6}
.wf-nav-group.open>.wf-subnav{display:block}
.wf-subnav .wf-nav-link{
  display:block;padding:8px 10px;margin:1px 0;border-radius:9px;
  font-size:14px;font-weight:400;line-height:1.4;color:#686761;background:transparent;
}
.wf-subnav .wf-nav-link:hover{background:rgba(255,255,255,.42);color:#363936}
.wf-subnav .wf-nav-link.active{background:#e7e8e6;color:#2f322f;font-weight:600;box-shadow:inset 3px 0 0 var(--wf-anth-strong)}
.content{background:#fff!important;padding:24px clamp(24px,3vw,46px) 36px;min-width:0}
.wf-topbar{min-height:64px;margin:0 0 24px;padding:12px 18px;border:1px solid var(--wf-line);border-radius:10px;background:#fff!important;box-shadow:none!important}
.wf-topbar-title{display:flex;flex-direction:column;gap:2px}
.wf-topbar-title strong{font-size:19px;font-weight:600;letter-spacing:.01em}
.wf-topbar-title span{font-size:12px;color:var(--wf-muted);font-weight:400}
.user-menu{gap:14px;color:var(--wf-muted)}
.user-menu strong{color:var(--wf-text);font-weight:600}
.user-menu a{color:var(--wf-muted);font-weight:600}
.panel,.card,.metric-card,.erp5-focus-card{background:#fff!important;border:1px solid var(--wf-line)!important;box-shadow:none!important;border-radius:10px!important}
.panel{padding:20px}
.erp5-page-head h2,.erp5-dashboard-intro h2{font-weight:600;color:var(--wf-text)}
.erp5-page-head p,.erp5-dashboard-intro p,.panel-description,.muted{color:var(--wf-muted)}
.btn,button.btn,.secondary-action{background:#fff!important;border:1px solid #d9dcda!important;color:#383c39!important;border-radius:8px!important;box-shadow:none!important;font-weight:600!important}
.btn:hover,button.btn:hover,.secondary-action:hover{background:#f7f7f6!important;border-color:#c9cdca!important}
.btn.primary,.primary-action{background:var(--wf-green)!important;border-color:#d3dfd0!important;color:#354035!important;font-weight:600!important}
.btn.primary:hover,.primary-action:hover{background:#dce9da!important;border-color:#c8d9c5!important}
.erp5-status-tabs a{background:#fff!important;border-color:var(--wf-line)!important;color:#4b4f4c!important}
.erp5-status-tabs a.active{background:var(--wf-anth)!important;border-color:#d0d3d0!important;color:#303330!important;font-weight:600}
.table-wrap{border:1px solid var(--wf-line);border-radius:9px;box-shadow:none}
table{background:#fff}
th{background:#fafafa!important;color:#666b67!important;font-weight:600!important;text-transform:none!important;letter-spacing:.01em!important}
th,td{padding:14px 15px!important;border-bottom-color:#ececea!important}
tbody tr:hover{background:#fbfbfa!important}
.erp5-badge{font-weight:600!important}
.status-planned,.status-confirmed{background:#eceeec!important;color:#545955!important;border-color:#e0e2e0!important}
.status-in_progress{background:var(--wf-warning)!important;color:#6a5730!important;border-color:#e7dcc5!important}
.status-completed{background:var(--wf-green)!important;color:#3d5941!important;border-color:#d5e2d2!important}
.status-cancelled{background:var(--wf-danger)!important;color:#7c4945!important;border-color:#e7d3d0!important}
.erp5-process{background:#fff!important;border-color:var(--wf-line)!important}
.erp5-process span.current{background:var(--wf-anth)!important;border-color:#cfd2cf!important;color:#303330!important;font-weight:600}
.erp5-focus-card:hover{transform:none!important;border-color:#d4d6d4!important}
.erp5-focus-card strong{color:#3f4541!important}
.erp5-quick-actions a{background:#fff!important;border-color:var(--wf-line)!important}
.erp5-quick-actions a:hover{background:#f7f7f6!important;border-color:#d4d6d4!important;color:#333733!important}
.appointment-mark.mark-green{background:#b9cbb7!important}.appointment-mark.mark-blue{background:#d8c6a6!important}
.wf-footer{padding:28px 0 4px;text-align:center}
.wf-backtop{display:inline-block;padding:8px 12px;color:var(--wf-muted);text-decoration:none;font-size:13px;font-weight:600}
.wf-backtop:hover{color:var(--wf-text)}
@media(max-width:900px){
 .layout{display:block}.wf-sidebar{position:static;height:auto;border-right:0;border-bottom:1px solid #ded4c3}
 .wf-main-nav{display:block}.wf-nav-group{margin-bottom:4px}.content{padding:18px 14px 32px}
 .wf-topbar{align-items:flex-start}.user-menu{flex-direction:column;align-items:flex-end;gap:3px}
}

/* WORKFLOW ERP 5 – verbindliche Corporate Identity 2026-08 */
:root{--wf-sand:#f1e7d5;--wf-sand-active:#eadcc4;--wf-sand-hover:#f7f0e4;--wf-ink:#30312f;--wf-muted:#716f6a;--wf-border:#e5e2dc;--wf-green:#edf3e9;--wf-white:#fff}
html,body{background:#fff;color:var(--wf-ink);line-height:1.55}
.layout{grid-template-columns:244px minmax(0,1fr);background:#fff}
.sidebar.wf-sidebar{background:var(--wf-sand)!important;border-right:1px solid #dfd4c2;box-shadow:none;padding:20px 15px;height:100vh}
.wf-sidebar-brand{display:flex;flex-direction:column;gap:9px;padding:2px 8px 16px}.wf-sidebar-brand img{max-width:175px;max-height:66px}.wf-sidebar-brand strong{font-size:13px;letter-spacing:.035em;color:#57534d;font-weight:600}
.wf-search{display:grid;grid-template-columns:26px 1fr;align-items:center;margin:0 4px 17px;background:#fff;border:1px solid #ded5c7;border-radius:10px;padding:0 9px}.wf-search input{border:0!important;box-shadow:none!important;background:transparent!important;min-width:0;font-size:13px}.wf-search span{color:#756e65}
.wf-main-nav{display:flex;flex-direction:column;gap:3px}.wf-nav-group{margin:0}.wf-nav-parent{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;border:0;background:transparent;color:#494640;text-align:left;padding:10px 11px;border-radius:10px;font:inherit;font-weight:600;cursor:pointer;text-decoration:none}.wf-nav-parent:hover{background:var(--wf-sand-hover);color:#343330}.wf-nav-parent.active,.wf-nav-group.open>.wf-nav-parent{background:var(--wf-sand-active);color:#2e2d2a}.wf-nav-label{display:flex;align-items:center;gap:10px}.wf-nav-icon{width:18px;height:18px;flex:0 0 18px;color:#625d55}.wf-nav-arrow{font-size:12px;color:#827b71}.wf-subnav{display:none;margin:4px 0 9px 27px;padding:2px 0 2px 11px;border-left:1px solid #d2c5b1}.wf-nav-group.open>.wf-subnav{display:block}.wf-nav-link{display:block;padding:7px 9px;margin:1px 0;border-radius:8px;color:#625e58;text-decoration:none;font-size:13px;font-weight:400}.wf-nav-link:hover{background:#f8f2e8;color:#35332f}.wf-nav-link.active{background:#f0e4d2;color:#2f2e2b;font-weight:600}
.content{background:#fff!important;padding:0 30px 48px!important;min-width:0}.topbar.wf-topbar{margin:0 -30px 26px!important;border:0!important;border-bottom:1px solid var(--wf-border)!important;border-radius:0!important;box-shadow:none!important;padding:15px 30px!important;min-height:62px;background:#fff!important}.wf-topbar-title{display:flex;align-items:baseline;gap:14px}.wf-topbar-title strong{font-size:16px;font-weight:600}.wf-topbar-title span{font-size:13px;color:var(--wf-muted)}.user-menu{font-size:13px}.user-menu a{color:#625f59}
.panel,.card,.metric-card{background:#fff!important;border:1px solid var(--wf-border)!important;box-shadow:none!important;border-radius:11px!important}.panel{padding:21px!important}.panel-head h3,.erp5-page-head h2{font-weight:600!important;letter-spacing:0!important}.panel-description,.erp5-page-head p,.muted{color:var(--wf-muted)!important;line-height:1.65}.panel-kicker{color:#807b72!important;font-weight:600!important;letter-spacing:.05em!important}
.btn,button.btn,.secondary-action{background:#fff!important;color:#3c3a36!important;border:1px solid #d9d5ce!important;border-radius:9px!important;font-weight:600!important;box-shadow:none!important}.btn:hover,button.btn:hover{background:#faf7f1!important}.btn.primary,.primary-action{background:#f2e7d3!important;border-color:#dfd0b7!important;color:#39352f!important}.btn.primary:hover,.primary-action:hover{background:#eadcc4!important;border-color:#d8c5a7!important}
input,select,textarea{background:#fff!important;border-color:#dcd8d1!important;border-radius:9px!important;line-height:1.45}input:focus,select:focus,textarea:focus{border-color:#c8b899!important;box-shadow:0 0 0 3px rgba(204,187,153,.13)!important}
.table-wrap{border-color:var(--wf-border)!important;border-radius:10px!important}table{background:#fff!important}th{background:#faf9f7!important;color:#706d67!important;text-transform:none!important;letter-spacing:.01em!important;font-size:12px!important;font-weight:600!important}th,td{padding:14px 15px!important;border-bottom-color:#ebe8e2!important}tbody tr:hover{background:#fcfbf9!important}
.erp5-badge{background:#f3f2ef!important;color:#55524d!important;border:1px solid #e3e0da!important}.status-planned,.status-confirmed,.status-new,.status-contacted,.status-offer{background:#f5ead3!important;color:#65563d!important;border-color:#e8d9bd!important}.status-in_progress{background:#f3ead7!important;color:#65563d!important}.status-completed,.status-paid,.status-won{background:#edf3e9!important;color:#465b43!important;border-color:#dce8d8!important}.status-cancelled,.status-lost{background:#f4e8e6!important;color:#7a4a45!important;border-color:#ead7d3!important}
.erp5-workflow-strip{display:grid!important;grid-template-columns:repeat(8,minmax(88px,1fr))!important;gap:7px!important;margin:18px 0 22px!important}.erp5-workflow-strip>div{padding:10px!important;border:1px solid var(--wf-border)!important;border-radius:10px!important;background:#fff!important;min-width:0}.erp5-workflow-strip>div.done{background:var(--wf-green)!important}.erp5-workflow-strip>div.current{background:#f5ead3!important;border-color:#e6d5b6!important}.erp5-workflow-strip span{display:block;font-size:11px;color:#807b72}.erp5-workflow-strip strong{font-size:12px;font-weight:600;display:block;margin-top:3px}
.erp5-next-action{display:flex;align-items:center;justify-content:space-between;gap:20px}.erp5-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.erp5-form-grid label{display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:13px}.erp5-span-2{grid-column:1/-1}.erp5-inline-form{display:flex;gap:7px;align-items:center}.erp5-inline-form select{min-height:34px;padding:5px 7px}
@media(max-width:980px){.layout{grid-template-columns:220px minmax(0,1fr)}.erp5-workflow-strip{grid-template-columns:repeat(4,minmax(90px,1fr))!important}}
@media(max-width:760px){.layout{display:block}.sidebar.wf-sidebar{position:static;height:auto}.content{padding:0 16px 38px!important}.topbar.wf-topbar{margin:0 -16px 20px!important;padding:13px 16px!important}.erp5-workflow-strip{grid-template-columns:repeat(2,minmax(110px,1fr))!important}.erp5-form-grid{grid-template-columns:1fr}.erp5-span-2{grid-column:auto}.erp5-next-action{align-items:flex-start;flex-direction:column}}

/* ERP 5.7.2 – globale Suche: Text sichtbar, echte Ergebnisliste */
.wf-search{grid-template-columns:26px minmax(0,1fr) auto!important;padding-right:5px!important}
.wf-search input{color:#30312f!important;caret-color:#30312f!important;opacity:1!important}
.wf-search input::placeholder{color:#827c72!important;opacity:1!important}
.wf-search button{border:0;background:transparent;color:#665f55;font-size:12px;font-weight:600;padding:7px 6px;cursor:pointer}
.wf-search button:hover{color:#302e2a}
.wf-global-search-panel{max-width:1050px}
.wf-global-search-form label{display:block;margin-bottom:7px;font-size:13px;font-weight:600;color:#514e49}
.wf-global-search-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px}
.wf-global-search-row input{width:100%;min-height:44px;padding:10px 12px;color:#30312f!important}
.wf-search-hint,.wf-search-summary{margin-top:18px;color:var(--wf-muted);font-size:14px}
.wf-search-results{margin-top:14px;border:1px solid var(--wf-border);border-radius:10px;overflow:hidden}
.wf-search-result{display:grid;grid-template-columns:92px minmax(0,1fr) auto;gap:14px;align-items:center;padding:14px 15px;border-bottom:1px solid #ebe8e2;text-decoration:none;color:var(--wf-ink);background:#fff}
.wf-search-result:last-child{border-bottom:0}.wf-search-result:hover{background:#fcfbf9}
.wf-search-result-type{font-size:12px;font-weight:600;color:#746d63;background:#f5ead3;border:1px solid #e8d9bd;border-radius:999px;padding:4px 8px;text-align:center}
.wf-search-result-main{min-width:0}.wf-search-result-main strong{font-weight:600}.wf-search-result-main small{display:block;color:var(--wf-muted);margin-top:3px;white-space:normal}.wf-search-result-number{display:inline-block;margin-left:8px;color:#807b72;font-size:12px}
.wf-search-result-open{color:#6e685f;font-size:13px;font-weight:600}
@media(max-width:700px){.wf-global-search-row{grid-template-columns:1fr}.wf-search-result{grid-template-columns:1fr;gap:6px}.wf-search-result-type{justify-self:start}.wf-search-result-open{justify-self:start}}
/* ERP 5.7.6 – CRM Anfragen: funktionaler Workflow, Corporate Identity unverändert */
.erp5-head-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.erp5-lead-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:0 0 18px}.erp5-lead-kpi{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px;border:1px solid var(--wf-border);border-radius:10px;background:#fff;color:var(--wf-text);text-decoration:none}.erp5-lead-kpi span{font-size:13px;color:var(--wf-muted)}.erp5-lead-kpi strong{font-size:22px;font-weight:600}.erp5-lead-kpi.active{background:#f5ead3;border-color:#e8d9bd}.erp5-lead-filter select{min-width:145px}.erp5-note-block,.erp5-email-placeholder,.erp5-callout{margin-top:18px;padding:14px 15px;border:1px solid var(--wf-border);border-radius:10px;background:#fff}.erp5-note-block p,.erp5-email-placeholder p,.erp5-callout p{margin:6px 0 0;line-height:1.6}.erp5-email-placeholder{background:#fbfaf8}.erp5-callout{background:#f5ead3;border-color:#e8d9bd}.erp5-callout.success-callout{background:#edf3e9;border-color:#dce8d8}.erp5-callout.muted-callout{background:#f4e8e6;border-color:#ead7d3}.erp5-status-form{display:grid;grid-template-columns:170px minmax(220px,1fr) auto;gap:10px;align-items:end;margin-top:15px}.erp5-status-form label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}.erp5-convert{margin-top:16px;border-top:1px solid var(--wf-border);padding-top:14px}.erp5-convert summary{cursor:pointer;font-weight:600}.erp5-convert-form{margin-top:14px}.erp5-note-form{display:flex;gap:10px;margin:0 0 18px}.erp5-note-form input{flex:1}.erp5-pagination{display:flex;justify-content:flex-end;gap:6px;flex-wrap:wrap;margin-top:16px}.erp5-pagination .btn.active{background:#f0e4d2;border-color:#dfcfb4}.erp5-pagination .btn.disabled{pointer-events:none;opacity:.45}@media(max-width:980px){.erp5-lead-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.erp5-status-form{grid-template-columns:1fr}.erp5-note-form{flex-direction:column}}@media(max-width:620px){.erp5-lead-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* ERP 5.7.6 CI-Fix – CRM Anfragen */
.erp5-lead-kpis{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:12px!important;
  margin:0 0 20px!important;
}
.erp5-lead-kpi{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  min-height:82px!important;
  padding:13px 15px!important;
  border:1px solid var(--wf-border)!important;
  border-radius:10px!important;
  background:#fff!important;
  color:var(--wf-ink)!important;
  text-decoration:none!important;
}
.erp5-lead-kpi:hover{background:#fcfbf9!important;border-color:#ddd6cb!important}
.erp5-lead-kpi.active{background:#f5ead3!important;border-color:#e6d5b6!important}
.erp5-lead-kpi span{font-size:12px!important;color:var(--wf-muted)!important;line-height:1.3!important}
.erp5-lead-kpi strong{font-size:24px!important;line-height:1.15!important;font-weight:600!important;margin-top:5px!important;color:var(--wf-ink)!important}
.erp5-lead-filter{display:grid!important;grid-template-columns:minmax(280px,1fr) 150px 150px auto auto!important;gap:10px!important;align-items:center!important;margin:0 0 18px!important}
.erp5-lead-filter input,.erp5-lead-filter select{min-height:42px!important;margin:0!important}
.erp5-lead-filter .btn{min-height:42px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important}
@media(max-width:1050px){.erp5-lead-kpis{grid-template-columns:repeat(3,minmax(0,1fr))!important}.erp5-lead-filter{grid-template-columns:1fr 1fr 1fr!important}.erp5-lead-filter input{grid-column:1/-1!important}}
@media(max-width:650px){.erp5-lead-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}.erp5-lead-filter{grid-template-columns:1fr!important}.erp5-lead-filter input{grid-column:auto!important}}

/* ERP 5.7.8 - Kundenakte als zentrale Arbeitsakte */
.customer-record-nav {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:24px 0 18px;
  padding:10px;
  border:1px solid var(--line, #e3e0da);
  border-radius:14px;
  background:#fff;
}
.customer-record-nav a {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 11px;
  border-radius:10px;
  color:inherit;
  text-decoration:none;
  font-size:14px;
  font-weight:500;
}
.customer-record-nav a:hover { background:#f7f1e7; }
.customer-record-nav a span {
  min-width:22px;
  padding:2px 6px;
  border-radius:999px;
  background:#f1e6d4;
  text-align:center;
  font-size:12px;
}
.customer-record-summary {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:0 0 22px;
}
.customer-record-summary > div {
  padding:16px 18px;
  border:1px solid var(--line, #e3e0da);
  border-radius:12px;
  background:#fff;
}
.customer-record-summary span { display:block; color:#72706c; font-size:13px; margin-bottom:7px; }
.customer-record-summary strong { font-size:22px; font-weight:600; }
.customer-record-section {
  margin:0 0 22px;
  padding:20px;
  border:1px solid var(--line, #e3e0da);
  border-radius:14px;
  background:#fff;
  scroll-margin-top:90px;
}
.customer-record-section-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}
.customer-record-section-head span { display:block; color:#827d73; font-size:12px; margin-bottom:3px; }
.customer-record-section-head h4 { margin:0; font-size:17px; font-weight:600; }
.customer-record-table { overflow-x:auto; }
.customer-record-table table { width:100%; border-collapse:collapse; min-width:720px; }
.customer-record-table th,
.customer-record-table td { padding:12px 10px; border-bottom:1px solid #ece9e3; text-align:left; vertical-align:top; }
.customer-record-table th { color:#77736d; font-size:12px; font-weight:600; }
.customer-record-table tbody tr:last-child td { border-bottom:0; }
.customer-record-table td small { display:block; margin-top:3px; color:#77736d; }
.customer-record-table .number-cell { text-align:right; font-variant-numeric:tabular-nums; }
.record-status {
  display:inline-block;
  padding:4px 8px;
  border:1px solid #ded9d0;
  border-radius:999px;
  background:#f8f5ef;
  font-size:12px;
  white-space:nowrap;
}
@media (max-width: 900px) {
  .customer-record-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .customer-record-section-head { align-items:flex-start; flex-direction:column; }
}
@media (max-width: 560px) {
  .customer-record-summary { grid-template-columns:1fr; }
}
.crm-pagination{display:flex;justify-content:flex-end;gap:6px;margin-top:14px;align-items:center}
.crm-pagination a,.crm-pagination span{display:inline-flex;min-width:36px;height:36px;padding:0 10px;align-items:center;justify-content:center;border:1px solid #e1ddd5;border-radius:9px;background:#fff;color:inherit;text-decoration:none;font-size:13px}
.crm-pagination a:hover{background:#f7f1e7}.crm-pagination a.active{background:#f0e4d2;border-color:#e2d4bc;font-weight:600}.crm-pagination .disabled{opacity:.45}

/* ERP 5.7.9 – CRM Angebote: festes CI */
.erp5-offer-items{display:grid;gap:14px}.erp5-offer-item{padding:16px 0;border-top:1px solid var(--wf-border,#e6e1d8)}.erp5-offer-item:first-child{border-top:0}.erp5-offer-totals{display:flex;justify-content:flex-end;margin-top:18px}.erp5-offer-totals .erp5-dl{min-width:280px}.erp5-workflow-strip{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px;margin:0 0 18px}.erp5-workflow-strip span{padding:10px 8px;border:1px solid var(--wf-border,#e6e1d8);border-radius:10px;background:#fff;font-size:13px;text-align:center}.erp5-workflow-strip .done{background:#f3eadb}.erp5-workflow-strip .current{background:#eadcc4;font-weight:600}@media(max-width:1000px){.erp5-workflow-strip{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:640px){.erp5-workflow-strip{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* WORKFLOW ERP 5.8.2 – ruhige Seitennavigation Rechnungen/Zahlungen */
.erp5-pagination{display:flex;justify-content:flex-end;align-items:center;gap:6px;flex-wrap:wrap;margin-top:18px}
.erp5-pagination .secondary-action{min-width:38px;text-align:center}
.erp5-pagination .secondary-action.active{background:#f0e4d2;border-color:#dfd1b9;font-weight:600}
.erp5-pagination .secondary-action.disabled{opacity:.42;pointer-events:none}

/* WORKFLOW ERP 5.8.4 · Kommunikation */
.communication-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px}.communication-kpis a{text-decoration:none;color:inherit}.erp5-kpi-card{display:block;background:#fff;border:1px solid #e6e2da;border-radius:12px;padding:17px 18px}.erp5-kpi-card span{display:block;color:#76726b;font-size:13px}.erp5-kpi-card strong{display:block;margin-top:6px;font-size:28px;line-height:1.15;font-weight:600;color:#2f302e}.erp5-kpi-card small{display:block;margin-top:4px;color:#817c74;font-size:12px}.communication-workflow{margin-top:22px}.communication-link-panel{margin:18px 0;padding:18px;border:1px solid #e6e2da;border-radius:12px;background:#fff}.communication-link-grid{display:grid;grid-template-columns:minmax(220px,1fr) minmax(260px,1.4fr) auto;gap:12px;align-items:end}.communication-link-grid label{display:grid;gap:6px}.communication-link-grid select{width:100%}.communication-link-summary{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-top:12px}.communication-message-view .communication-meta{margin-bottom:18px}@media(max-width:1050px){.communication-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:900px){.communication-link-grid{grid-template-columns:1fr}.communication-link-grid .primary-action{justify-self:start}}@media(max-width:640px){.communication-kpis{grid-template-columns:1fr}}


/* WORKFLOW ERP 5.8.6 · CI für Dienstleistungsbereiche */
.erp5-service-ci .content{background:#fff}
.erp5-service-ci .topbar{background:#fff}
.erp5-service-ci .erp4-module-page,
.erp5-service-ci .facility-page,
.erp5-service-ci .shuttle-calendar-page{margin:0 0 22px;background:#fff!important;border:1px solid var(--wf-border,#e6e2da)!important;border-radius:11px!important;box-shadow:none!important;padding:22px!important}
.erp5-service-ci .panel-head{gap:18px;margin-bottom:18px}
.erp5-service-ci .panel-head h3{margin-top:3px;font-weight:600;letter-spacing:0}
.erp5-service-ci .panel-description{max-width:780px;line-height:1.65}
.erp5-service-ci .panel-kicker{color:#80786d!important;font-size:12px;font-weight:600;letter-spacing:.045em}
.erp5-service-ci .primary-action,
.erp5-service-ci .btn.primary{background:#f2e6d2!important;border-color:#e4d3b6!important;color:#35322d!important;box-shadow:none!important}
.erp5-service-ci .primary-action:hover,
.erp5-service-ci .btn.primary:hover{background:#ecddc4!important;border-color:#dbc7a6!important;color:#2e2c28!important}
.erp5-service-ci .secondary-action,
.erp5-service-ci .btn:not(.primary){background:#fff!important;border-color:#dfdcd6!important;color:#4b4945!important;box-shadow:none!important}
.erp5-service-ci .row-action{color:#5e584f;font-weight:600;text-decoration:none}
.erp5-service-ci .row-action:hover{text-decoration:underline}
.erp5-service-ci .table-wrap{border:1px solid #e8e4dd;border-radius:10px;background:#fff;overflow:auto}
.erp5-service-ci table{background:#fff}
.erp5-service-ci table th{background:#fbfaf8!important;color:#716c65!important;font-size:12px!important;font-weight:600!important;letter-spacing:.01em}
.erp5-service-ci table th,
.erp5-service-ci table td{padding:14px 13px!important;border-color:#ece8e1!important;line-height:1.5}
.erp5-service-ci table tbody tr:hover td{background:#fdfcf9}
.erp5-service-ci .filter-bar{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin-bottom:18px;padding:0;background:transparent;border:0}
.erp5-service-ci input,
.erp5-service-ci select,
.erp5-service-ci textarea{background:#fff;border-color:#dedbd5}
.erp5-service-ci .summary-card,
.erp5-service-ci .detail-card{background:#fff!important;border:1px solid #e6e2da!important;box-shadow:none!important;border-radius:11px!important}
.erp5-service-ci .status-pill{border:1px solid #e0ddd7;box-shadow:none}
.erp5-service-ci .status-pill.status-completed,
.erp5-service-ci .status-pill.success{background:#edf3e9!important;color:#4e5d49!important}
.erp5-service-ci .status-pill.status-in_progress,
.erp5-service-ci .status-pill.warning{background:#f5ead3!important;color:#665b48!important}
.erp5-service-ci .erp5-page-head{padding:4px 0 2px;margin:8px 0 22px}
.erp5-service-ci .erp5-page-head h2{color:#2f302e;font-weight:600}
.erp5-service-ci .erp5-page-head p{color:#74716b;line-height:1.65}
.erp5-service-ci .erp5-service-kpi{padding:18px 19px;border-color:#e6e2da;border-radius:11px;box-shadow:none}
.erp5-service-ci .erp5-service-kpi strong{color:#30312f;font-weight:600}
.erp5-service-ci .erp5-service-workflow>span{min-height:66px;justify-content:center;border-color:#e5e1da;border-radius:9px}
.erp5-service-ci .erp5-service-workflow>span.done{background:#f8f2e8}
.erp5-service-ci .erp5-service-workflow>span.current{background:#f0e2cb;border-color:#dfccb0}
.erp5-service-ci .erp5-service-link{padding:14px 2px;line-height:1.45}
.erp5-service-ci .customer-detail-head{padding-bottom:18px;margin-bottom:18px;border-bottom:1px solid #ebe7df}
.erp5-service-ci .form-grid{row-gap:18px;column-gap:18px}
.erp5-service-ci .alert{border-radius:10px;box-shadow:none}
@media(max-width:760px){
  .erp5-service-ci .erp4-module-page,.erp5-service-ci .facility-page,.erp5-service-ci .shuttle-calendar-page{padding:17px!important}
  .erp5-service-ci table th,.erp5-service-ci table td{padding:12px 10px!important}
}
/* ERP 5.7.9 – CRM Angebote: bestehendes CI, keine neue Farbwelt */
.erp5-offer-items{display:grid;gap:14px}.erp5-offer-item{padding:16px 0;border-top:1px solid var(--border,#e6e1d8)}.erp5-offer-item:first-child{border-top:0}.erp5-offer-totals{display:flex;justify-content:flex-end;margin-top:18px}.erp5-offer-totals .erp5-dl{min-width:280px}.erp5-workflow-strip{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px;margin:0 0 18px}.erp5-workflow-strip span{padding:10px 8px;border:1px solid var(--border,#e6e1d8);border-radius:10px;background:#fff;font-size:13px;text-align:center}.erp5-workflow-strip .done{background:#f3eadb}.erp5-workflow-strip .current{background:#eadcc4;font-weight:600}@media(max-width:1000px){.erp5-workflow-strip{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:640px){.erp5-workflow-strip{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* WORKFLOW ERP 5.8.4 · Kommunikation */
.communication-kpis{margin-bottom:22px}.communication-kpis a{text-decoration:none;color:inherit}.communication-workflow{margin-top:22px}.communication-link-panel{margin:18px 0;padding:18px;border:1px solid var(--border,#e5e5e5);border-radius:12px;background:#fff}.communication-link-grid{display:grid;grid-template-columns:minmax(220px,1fr) minmax(260px,1.4fr) auto;gap:12px;align-items:end}.communication-link-grid label{display:grid;gap:6px}.communication-link-grid select{width:100%}.communication-link-summary{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-top:12px}.communication-message-view .communication-meta{margin-bottom:18px}@media(max-width:900px){.communication-link-grid{grid-template-columns:1fr}.communication-link-grid .btn{justify-self:start}}

/* WORKFLOW ERP 5.8.5 · Dienstleistungsbereiche – bestehendes CI bleibt unverändert */
.erp5-head-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.erp5-service-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:0 0 20px}.erp5-service-kpi{background:#fff;border:1px solid var(--border,#e5e1da);border-radius:12px;padding:18px}.erp5-service-kpi span{display:block;font-size:13px;color:var(--muted,#6d716e);font-weight:600}.erp5-service-kpi strong{display:block;font-size:30px;line-height:1.15;margin:8px 0 5px;font-weight:600}.erp5-service-kpi small{color:var(--muted,#6d716e)}.erp5-service-panel{margin-bottom:20px}.erp5-service-workflow{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}.erp5-service-workflow>span{display:flex;flex-direction:column;gap:4px;padding:12px 10px;border:1px solid var(--border,#e5e1da);border-radius:10px;background:#fff}.erp5-service-workflow>span.done{background:#f5eee1}.erp5-service-workflow>span.current{background:#eadcc4}.erp5-service-workflow small{color:var(--muted,#6d716e)}.erp5-service-workflow strong{font-weight:600}.erp5-service-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(250px,.65fr);gap:18px;margin-bottom:20px}.erp5-service-side{align-self:start}.erp5-service-link{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:13px 2px;border-bottom:1px solid var(--border,#e5e1da);text-decoration:none;color:inherit}.erp5-service-link:last-child{border-bottom:0}.erp5-service-link strong{font-weight:600}.erp5-service-link:hover span{text-decoration:underline}@media(max-width:1000px){.erp5-service-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.erp5-service-layout{grid-template-columns:1fr}.erp5-service-workflow{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:640px){.erp5-service-kpis{grid-template-columns:1fr 1fr}.erp5-service-workflow{grid-template-columns:repeat(2,minmax(0,1fr))}.erp5-head-actions{width:100%}.erp5-head-actions .btn{flex:1;justify-content:center}}

/* ERP 5.8.7 service CI: explicit layout rules merged into active stylesheet */
.erp5-service-ci .erp5-service-kpis{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;margin:0 0 20px!important}.erp5-service-ci .erp5-service-kpi{display:block!important;background:#fff!important}.erp5-service-ci .erp5-service-kpi span,.erp5-service-ci .erp5-service-kpi strong,.erp5-service-ci .erp5-service-kpi small{display:block!important}.erp5-service-ci .erp5-service-workflow{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:8px!important}.erp5-service-ci .erp5-service-workflow>span{display:flex!important;flex-direction:column!important;gap:4px!important}.erp5-service-ci .erp5-service-layout{display:grid!important;grid-template-columns:minmax(0,1.6fr) minmax(250px,.65fr)!important;gap:18px!important;margin-bottom:20px!important}.erp5-service-ci .erp5-service-link{display:flex!important;justify-content:space-between!important;gap:12px!important;align-items:center!important;text-decoration:none!important}.erp5-service-ci .erp5-service-side .erp5-service-link{border-bottom:1px solid #e8e4dd!important}.erp5-service-ci .erp5-service-side .erp5-service-link:last-child{border-bottom:0!important}@media(max-width:1000px){.erp5-service-ci .erp5-service-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}.erp5-service-ci .erp5-service-layout{grid-template-columns:1fr!important}.erp5-service-ci .erp5-service-workflow{grid-template-columns:repeat(3,minmax(0,1fr))!important}}@media(max-width:640px){.erp5-service-ci .erp5-service-kpis{grid-template-columns:1fr!important}.erp5-service-ci .erp5-service-workflow{grid-template-columns:repeat(2,minmax(0,1fr))!important}}


/* WORKFLOW ERP 5.9.0 – Systemmodul, CI-konform */
.system-home .panel-head,
.system-audit-page .panel-head,
.system-backup-page .panel-head,
.system-users-page .panel-head { margin-bottom: 24px; }
.system-metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px}
.system-metric-card{display:flex;min-height:128px;flex-direction:column;justify-content:center;padding:18px 20px;border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--text);text-decoration:none;box-shadow:none}
.system-metric-card:hover{border-color:#d7c7aa;background:#fffdf9}
.system-metric-card span{font-size:13px;color:var(--muted);font-weight:600}
.system-metric-card strong{font-size:30px;line-height:1.1;margin:8px 0 6px;font-weight:650;color:#343633}
.system-metric-card small{color:var(--muted);line-height:1.45}
.system-layout-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:18px;margin-bottom:18px}
.system-section-card{border:1px solid var(--line);border-radius:11px;background:#fff;padding:20px;box-shadow:none}
.system-section-card h4{margin:4px 0 10px;font-size:18px;font-weight:650;color:#343633}
.system-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}
.system-action-list{display:grid;gap:0}
.system-action-list a{display:grid;grid-template-columns:170px 1fr auto;gap:16px;align-items:center;padding:14px 2px;border-bottom:1px solid var(--line);color:var(--text);text-decoration:none}
.system-action-list a:last-child{border-bottom:0}
.system-action-list a:hover strong{color:#6f5d43}
.system-action-list span{font-size:13px;color:var(--muted)}
.system-action-list b{font-weight:500;color:#8e806a}
.system-health-list{display:grid;gap:0;margin:4px 0 18px}
.system-health-list>div{display:flex;justify-content:space-between;gap:18px;padding:11px 0;border-bottom:1px solid var(--line)}
.system-health-list span{color:var(--muted)}
.system-health-list strong{font-weight:600;text-align:right}
.system-home-actions{margin-top:6px}
.system-workflow-card{margin-top:0}
.system-workflow{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-top:14px}
.system-workflow a{display:flex;min-height:108px;flex-direction:column;padding:14px;border:1px solid #e2d7c3;border-radius:10px;background:#fbf7ef;color:var(--text);text-decoration:none}
.system-workflow a:hover{background:#f6efdf}
.system-workflow a>span{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:8px;background:#eee1c9;font-size:12px;font-weight:650;margin-bottom:10px}
.system-workflow strong{font-weight:650}.system-workflow small{margin-top:4px;color:var(--muted);line-height:1.4}
.system-role-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 20px}
.system-role-strip>div{padding:14px 16px;border:1px solid var(--line);border-radius:10px;background:#fff}
.system-role-strip strong{display:block;margin-bottom:5px;font-weight:650}.system-role-strip span{font-size:13px;color:var(--muted);line-height:1.45}
.system-filterbar{display:grid;grid-template-columns:minmax(250px,1fr) 220px auto auto;gap:10px;align-items:end;margin:0 0 16px}
.system-filterbar label{display:grid;gap:6px;font-size:13px;font-weight:600;color:#4c504d}.system-filterbar input,.system-filterbar select{min-height:42px;border:1px solid var(--line);border-radius:9px;background:#fff;padding:9px 11px;color:var(--text)}
.system-pagination{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-top:16px;color:var(--muted);font-size:13px}.system-pagination>div{display:flex;gap:6px;flex-wrap:wrap}.system-pagination a{min-width:38px;justify-content:center}
.system-audit-page .data-table small,.system-users-page .data-table small{display:block;margin-top:3px;color:var(--muted)}
@media(max-width:1100px){.system-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.system-layout-grid{grid-template-columns:1fr}.system-workflow{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){.system-metric-grid,.system-role-strip,.system-workflow{grid-template-columns:1fr}.system-action-list a{grid-template-columns:1fr auto}.system-action-list a span{grid-column:1/-1}.system-filterbar{grid-template-columns:1fr}.system-pagination{align-items:flex-start;flex-direction:column}}

/* WORKFLOW ERP 5.9.1 – Dashboard Entwurf: Arbeitsplatz statt Statistikseite */
.erp5-command-intro{margin-bottom:24px}
.erp5-command-kpis{margin-bottom:20px}
.erp5-command-kpis .erp5-focus-card{min-height:142px;box-shadow:none}
.erp5-command-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(300px,.65fr);gap:18px;align-items:start;margin-bottom:18px}
.erp5-command-side{display:grid;gap:18px}
.erp5-command-work{min-height:430px}
.erp5-work-queue{display:grid}
.erp5-work-item{display:grid;grid-template-columns:52px minmax(0,1fr) 24px;align-items:center;gap:14px;padding:15px 0;border-bottom:1px solid var(--line);color:var(--text);text-decoration:none}
.erp5-work-item:last-child{border-bottom:0}
.erp5-work-item:hover .erp5-work-copy strong{color:var(--brand-strong)}
.erp5-work-count{display:flex;align-items:center;justify-content:center;width:44px;height:36px;border-radius:10px;background:#f3f1ec;border:1px solid var(--line);font-size:18px;font-weight:700}
.erp5-work-item.tone-sand .erp5-work-count{background:#f4ead8;border-color:#e7d8bd}
.erp5-work-item.tone-green .erp5-work-count{background:#edf3e9;border-color:#dce8d7}
.erp5-work-item.tone-alert .erp5-work-count{background:#f7ece9;border-color:#ecd8d3}
.erp5-work-copy{display:flex;flex-direction:column;gap:4px;min-width:0}
.erp5-work-copy strong{font-size:15px}
.erp5-work-copy small{color:var(--muted);line-height:1.4}
.erp5-work-arrow{color:var(--muted);font-size:20px;text-align:right}
.erp5-command-facts{display:grid;margin:0}
.erp5-command-facts>div{display:flex;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid var(--line)}
.erp5-command-facts>div:last-child{border-bottom:0}
.erp5-command-facts dt{color:var(--muted)}
.erp5-command-facts dd{margin:0;font-weight:700;font-size:17px}
.erp5-command-today{margin-bottom:18px}
.erp5-command-workflow{margin-top:0}
.erp5-command-workflow .erp5-workflow-strip{grid-template-columns:repeat(9,minmax(105px,1fr))}
@media(max-width:1150px){.erp5-command-grid{grid-template-columns:1fr}.erp5-command-side{grid-template-columns:repeat(2,minmax(0,1fr))}.erp5-command-workflow .erp5-workflow-strip{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.erp5-command-side{grid-template-columns:1fr}.erp5-work-item{grid-template-columns:44px minmax(0,1fr) 20px}.erp5-command-workflow .erp5-workflow-strip{grid-template-columns:1fr 1fr}}
\n\n/* WORKFLOW ERP 5.9.2 – Dokumente/Akten + Wiedervorlagen */\n.erp5-record-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(280px,.55fr);gap:18px;margin-bottom:18px}.erp5-record-form{box-shadow:none;border:0;padding:0}.erp5-record-rules{display:grid;gap:14px}.erp5-record-rules p{margin:0;padding:14px 0;border-bottom:1px solid var(--line,#e3e3df);line-height:1.6}.erp5-record-rules p:last-child{border-bottom:0}.erp5-records-module td small{display:block;margin-top:4px;color:var(--muted,#6f736f)}.erp5-records-module .table-actions{display:flex;gap:8px;align-items:center}.erp5-row-due td:first-child strong{color:#8b5d3c}.erp5-records-module .pagination{display:flex;justify-content:flex-end;gap:6px;margin-top:14px}.erp5-records-module .pagination a{display:inline-flex;min-width:36px;justify-content:center;padding:7px 10px;border:1px solid var(--line,#e3e3df);border-radius:8px;text-decoration:none;color:inherit;background:#fff}.erp5-records-module .pagination a.active{background:#f0e4d2;font-weight:600}.erp5-records-module .pagination a.disabled{opacity:.45;pointer-events:none}@media(max-width:900px){.erp5-record-grid{grid-template-columns:1fr}}\n

/* WORKFLOW ERP 5.9.3 – Auswertungen / Controlling */
.controlling-page .panel-head{margin-bottom:22px}.controlling-filterbar{display:grid;grid-template-columns:150px 190px 190px auto;gap:10px;align-items:end;margin:0 0 18px}.controlling-filterbar label{display:grid;gap:6px;font-size:13px;font-weight:600;color:#4d514e}.controlling-filterbar select{min-height:42px;border:1px solid var(--line,#e3e3df);border-radius:9px;background:#fff;padding:8px 10px;color:var(--text)}.controlling-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:0 0 18px}.controlling-kpi{display:flex;min-height:128px;flex-direction:column;justify-content:center;padding:18px 20px;border:1px solid var(--line,#e3e3df);border-radius:11px;background:#fff;color:var(--text);text-decoration:none;box-shadow:none}.controlling-kpi:hover{border-color:#d7c7aa}.controlling-kpi>span{font-size:13px;color:var(--muted,#6f736f);font-weight:600}.controlling-kpi>strong{font-size:29px;line-height:1.12;margin:8px 0 6px;font-weight:650;color:#343633}.controlling-kpi>small{color:var(--muted,#6f736f);line-height:1.45}.controlling-kpi .controlling-text-value{font-size:19px;line-height:1.3}.controlling-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(280px,.55fr);gap:18px;margin-bottom:18px}.controlling-card{border:1px solid var(--line,#e3e3df);border-radius:11px;background:#fff;padding:20px;box-shadow:none}.controlling-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:14px}.controlling-card-head h4{margin:4px 0 0;font-size:18px;font-weight:650}.controlling-card-head>a{font-size:13px;color:#6f5d43;text-decoration:none}.controlling-month-list{display:grid}.controlling-month-row{display:grid;grid-template-columns:minmax(150px,.7fr) minmax(150px,.55fr) minmax(180px,1fr);gap:16px;align-items:center;padding:13px 0;border-bottom:1px solid var(--line,#e3e3df)}.controlling-month-row:last-child{border-bottom:0}.controlling-month-row>div{display:flex;flex-direction:column;gap:3px}.controlling-month-row small{color:var(--muted,#6f736f)}.controlling-month-values{text-align:right}.controlling-bar{height:10px;border-radius:999px;background:#f1eee8;overflow:hidden}.controlling-bar>span{display:block;height:100%;border-radius:999px;background:#d8c7a8}.controlling-facts{display:grid;margin:0}.controlling-facts>div{display:flex;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid var(--line,#e3e3df)}.controlling-facts>div:last-child{border-bottom:0}.controlling-facts span{color:var(--muted,#6f736f)}.controlling-facts strong{font-weight:650}.controlling-area-list{display:grid}.controlling-area-list>a{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:13px 0;border-bottom:1px solid var(--line,#e3e3df);text-decoration:none;color:inherit}.controlling-area-list>a:last-child{border-bottom:0}.controlling-area-list>a>div{display:flex;flex-direction:column;gap:3px}.controlling-area-list small{color:var(--muted,#6f736f)}.controlling-area-list>a>span{font-weight:650}.controlling-area-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.controlling-area-card{border:1px solid var(--line,#e3e3df);border-radius:11px;background:#fff;padding:20px}.controlling-area-card .controlling-card-head>strong{font-size:21px}.controlling-area-card dl{margin:0 0 16px}.controlling-area-card dl>div{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid var(--line,#e3e3df)}.controlling-area-card dt{color:var(--muted,#6f736f)}.controlling-area-card dd{margin:0;font-weight:600;text-align:right}.controlling-page .data-table td small{display:block;margin-top:3px;color:var(--muted,#6f736f)}.controlling-page .data-table a{text-decoration:none;color:inherit}.controlling-page .data-table a:hover{text-decoration:underline}.controlling-overdue td{background:#fffaf5}.controlling-page .status-badge.warning{background:#f5ead8;border-color:#e6d6b8;color:#6e583b}@media(max-width:1150px){.controlling-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.controlling-layout{grid-template-columns:1fr}.controlling-area-cards{grid-template-columns:1fr}.controlling-filterbar{grid-template-columns:repeat(2,minmax(0,1fr))}.controlling-filterbar .btn{align-self:end}}@media(max-width:720px){.controlling-kpis,.controlling-filterbar{grid-template-columns:1fr}.controlling-month-row{grid-template-columns:1fr}.controlling-month-values{text-align:left}}


/* WORKFLOW ERP 5.10.2 – ruhiges CI für Prozess-/Rechnungsansichten */
.workflow-steps,.process-steps,.workflow-row,.steps{
 display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr))!important;
 gap:8px!important;margin:18px 0!important
}
.workflow-steps>*,.process-steps>*,.workflow-row>*,.steps>*{
 border:1px solid #e5e1d8!important;border-radius:8px!important;
 padding:10px 12px!important;background:#fff!important;min-width:0!important
}
.workflow-steps>*.active,.process-steps>*.active,.workflow-row>*.active,.steps>*.active,
.workflow-steps>*.done,.process-steps>*.done{
 background:#f3e7ce!important
}
.card,.panel,.box{box-shadow:none!important}
table thead th{background:#faf9f6!important}
.badge-success,.status-success{background:#edf5ea!important;color:#3f7045!important}
@media(max-width:1100px){
 .workflow-steps,.process-steps,.workflow-row,.steps{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}

/* WORKFLOW ERP 5.10.3 - Rechnungsworkflow CI, korrekte Klassen */
.erp5-order-flow{
  display:grid!important;
  grid-template-columns:repeat(8,minmax(0,1fr))!important;
  gap:8px!important;
  margin:18px 0 20px!important;
  width:100%!important;
}
.erp5-order-flow-step{
  display:flex!important;
  flex-direction:column!important;
  gap:4px!important;
  min-width:0!important;
  padding:11px 12px!important;
  border:1px solid #e6e1d7!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#333!important;
}
.erp5-order-flow-step span{
  display:block!important;
  font-size:12px!important;
  font-weight:400!important;
  color:#7c786f!important;
  line-height:1.25!important;
}
.erp5-order-flow-step strong{
  display:block!important;
  font-size:14px!important;
  font-weight:600!important;
  line-height:1.3!important;
  color:#30312f!important;
}
.erp5-order-flow-step.done{
  background:#f5ead3!important;
  border-color:#ead8b5!important;
}
.erp5-order-flow-step.current{
  background:#efe0c2!important;
  border-color:#dec79c!important;
}
@media(max-width:1200px){
  .erp5-order-flow{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
}
@media(max-width:700px){
  .erp5-order-flow{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}

/* WORKFLOW ERP 5.10.8 – Arbeitsbereich: mehr vertikale Trennung auf Unterseiten */
/* Navigation bleibt unverändert. */
main .page-head,
.content .page-head,
.workspace .page-head,
main .page-header,
.content .page-header {
    margin-bottom: 28px !important;
}

main .card + .card,
.content .card + .card,
.workspace .card + .card,
main section + section,
.content section + section,
.workspace section + section {
    margin-top: 22px !important;
}

main .toolbar,
.content .toolbar,
.workspace .toolbar,
main .filters,
.content .filters,
.workspace .filters,
main .filter-row,
.content .filter-row,
.workspace .filter-row {
    margin-top: 18px !important;
    margin-bottom: 18px !important;
}

main h1 + p,
.content h1 + p,
.workspace h1 + p,
main h2 + p,
.content h2 + p,
.workspace h2 + p {
    margin-top: 10px !important;
    margin-bottom: 18px !important;
    line-height: 1.6 !important;
}

main .table-wrap,
.content .table-wrap,
.workspace .table-wrap,
main table,
.content table,
.workspace table {
    margin-top: 14px !important;
}

main .metric-grid,
.content .metric-grid,
.workspace .metric-grid,
main .stats-grid,
.content .stats-grid,
.workspace .stats-grid,
main .kpi-grid,
.content .kpi-grid,
.workspace .kpi-grid {
    gap: 16px !important;
    margin-bottom: 22px !important;
}

/* Formulare: Felder/Blöcke klarer voneinander trennen */
main .form-grid,
.content .form-grid,
.workspace .form-grid {
    row-gap: 18px !important;
}

main .form-section + .form-section,
.content .form-section + .form-section,
.workspace .form-section + .form-section {
    margin-top: 24px !important;
}

/* Neutral WORKFLOW demo branding */
.wf-sidebar-brand{padding-top:6px;gap:0}.wf-sidebar-brand img{width:min(190px,100%);max-width:190px;max-height:58px}.wf-sidebar-brand strong{display:none}

/* WORKFLOW 5.10.9 – Navigationsfarbe ueber die gesamte Seitenhoehe */
/*
   Die Navigation selbst bleibt sticky. Der sandfarbene Hintergrund liegt
   zusaetzlich auf dem Layout und laeuft dadurch auch bei sehr langen Seiten
   (Steuer, DATEV, Controlling usw.) bis zum Seitenende weiter.
*/
.layout{
  background:linear-gradient(
    to right,
    var(--wf-sand) 0,
    var(--wf-sand) 244px,
    #fff 244px,
    #fff 100%
  )!important;
}
.sidebar.wf-sidebar{
  position:sticky;
  top:0;
  height:100vh;
  min-height:100vh;
  align-self:start;
}
@media(max-width:980px) and (min-width:761px){
  .layout{
    background:linear-gradient(
      to right,
      var(--wf-sand) 0,
      var(--wf-sand) 220px,
      #fff 220px,
      #fff 100%
    )!important;
  }
}
@media(max-width:760px){
  .layout{background:#fff!important}
  .sidebar.wf-sidebar{position:static;height:auto;min-height:0;align-self:auto}
}

/* WORKFLOW 5.11.0 – öffentlicher Nur-Lese-Demozugang */
.demo-readonly-banner{
  display:flex;
  gap:14px;
  align-items:center;
  margin:18px 24px 0;
  padding:13px 16px;
  border:1px solid #d7c7aa;
  border-radius:10px;
  background:#f7f0e4;
  color:#4d4539;
}
.demo-readonly-banner strong{white-space:nowrap}
.demo-readonly-banner span{font-size:14px;line-height:1.45}
.demo-readonly form[method="post"],
.demo-readonly a[href*="action=new"],
.demo-readonly a[href*="action=create"],
.demo-readonly a[href*="action=edit"],
.demo-readonly a[href*="action=delete"]{display:none!important}
.login-demo-entry{display:grid;gap:8px;margin-top:20px;padding:16px;border:1px solid #ded6c8;border-radius:10px;background:#f8f4ed;text-align:center}
.login-demo-entry span{font-size:14px;color:#68645d}
.login-configurator-entry{margin-top:16px;text-align:center}.login-configurator-entry a{color:#5e513f}

/* WORKFLOW 5.11.0 – ERP-Konfigurator im bestehenden ruhigen CI */
.configurator-body{margin:0;min-height:100vh;background:#f5f2ec;color:#343633;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.configurator-header{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:20px clamp(20px,5vw,72px);border-bottom:1px solid #e2ddd3;background:#fff}
.configurator-header img{display:block;width:190px;max-height:58px}.configurator-header nav{display:flex;gap:12px;align-items:center}.configurator-header nav a{padding:10px 14px;border-radius:8px;color:#4d4539;text-decoration:none;font-weight:600}.configurator-header nav a:last-child{background:#423d35;color:#fff}
.configurator-shell{width:min(1160px,calc(100% - 40px));margin:0 auto;padding:58px 0 80px}.configurator-intro{max-width:850px;margin-bottom:36px}.configurator-intro h1{margin:10px 0 16px;font-size:clamp(34px,5vw,58px);line-height:1.08;letter-spacing:-.035em;font-weight:650}.configurator-intro p{max-width:720px;margin:0;color:#6d6b66;font-size:18px;line-height:1.65}
.configurator-form,.configurator-result{padding:clamp(22px,4vw,42px);border:1px solid #e2ddd3;border-radius:16px;background:#fff;box-shadow:0 12px 35px rgba(59,51,40,.05)}.configurator-form fieldset{margin:0 0 34px;padding:0;border:0}.configurator-form legend{margin-bottom:16px;font-size:22px;font-weight:650}.configurator-hint{margin:-8px 0 18px;color:#77736c}
.configurator-type-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.configurator-question-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.configurator-choice{position:relative;display:flex;gap:12px;min-height:96px;padding:17px;border:1px solid #ded9cf;border-radius:11px;background:#fff;cursor:pointer;transition:border-color .15s,background .15s,transform .15s}.configurator-choice:hover{border-color:#bcae97;transform:translateY(-1px)}.configurator-choice:has(input:checked){border-color:#8e7959;background:#f7f0e4}.configurator-choice input{flex:0 0 auto;margin-top:3px;accent-color:#765f3f}.configurator-choice span{display:flex;flex-direction:column;gap:6px}.configurator-choice strong{font-size:15px;line-height:1.35}.configurator-choice small{color:#77736c;line-height:1.45}.configurator-choice-radio{min-height:66px;align-items:center}.configurator-choice-radio input{margin-top:0}.configurator-submit{min-height:50px;padding-inline:24px;font-size:16px}
.configurator-result{margin-top:30px;scroll-margin-top:20px}.configurator-result h2{margin:8px 0 10px;font-size:32px}.configurator-result>p{margin-top:0;color:#77736c}.configurator-module-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:24px 0}.configurator-module-grid article{display:flex;gap:12px;padding:17px;border:1px solid #e2ddd3;border-radius:10px;background:#fff}.configurator-module-grid article>span{display:grid;place-items:center;flex:0 0 26px;width:26px;height:26px;border-radius:50%;background:#ebe0cd;color:#4e4436;font-weight:700}.configurator-module-grid strong{display:block;margin-bottom:5px}.configurator-module-grid p{margin:0;color:#77736c;font-size:14px;line-height:1.45}.configurator-price{display:flex;flex-wrap:wrap;align-items:baseline;gap:10px 20px;margin:28px 0;padding:22px;border-radius:12px;background:#423d35;color:#fff}.configurator-price>span{font-weight:650}.configurator-price>strong{margin-left:auto;font-size:30px}.configurator-price strong small{font-size:15px;font-weight:500}.configurator-price p{flex-basis:100%;margin:0;color:#ded8cf}.configurator-summary-label{display:grid;gap:8px;font-weight:650}.configurator-summary-label textarea{min-height:210px;padding:14px;border:1px solid #d9d3c8;border-radius:9px;background:#faf8f4;resize:vertical;line-height:1.55}.configurator-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin-top:18px}.configurator-actions a,.configurator-actions button{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
@media(max-width:900px){.configurator-type-grid,.configurator-question-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:620px){.demo-readonly-banner{align-items:flex-start;margin:12px;flex-direction:column;gap:4px}.configurator-header{align-items:flex-start;flex-direction:column}.configurator-header nav{width:100%;justify-content:space-between}.configurator-shell{width:min(100% - 24px,1160px);padding-top:34px}.configurator-type-grid,.configurator-question-grid,.configurator-module-grid{grid-template-columns:1fr}.configurator-form,.configurator-result{padding:20px}.configurator-actions>*{width:100%}}

/* WORKFLOW 5.11.4 – Dashboard, Navigation und Kopfbereich */
:root{
  --wf-brand-orange:#f9b233;
  --wf-brand-orange-dark:#c97c00;
  --wf-brand-orange-soft:#fff4df;
  --wf-brand-gray:#b2b2b2;
  --wf-nav-bg:#f3f3f0;
  --wf-nav-hover:#fff;
  --wf-nav-line:#ddddda;
}

/* Navigation: helle Grundfläche, Orange nur für Auswahl und Orientierung. */
.layout{
  background:linear-gradient(to right,var(--wf-nav-bg) 0,var(--wf-nav-bg) 244px,#fff 244px,#fff 100%)!important;
}
.sidebar.wf-sidebar{
  background:var(--wf-nav-bg)!important;
  border-right:1px solid var(--wf-nav-line)!important;
  padding:22px 15px 28px!important;
}
.wf-sidebar-brand{
  margin-bottom:17px!important;
  padding:1px 8px 18px!important;
  border-bottom:1px solid var(--wf-nav-line)!important;
}
.wf-sidebar-brand img{
  width:min(194px,100%)!important;
  max-width:194px!important;
  max-height:64px!important;
}
.wf-main-nav{gap:4px!important}
.wf-nav-parent{
  min-height:43px;
  padding:10px 11px 10px 9px!important;
  border-left:3px solid transparent!important;
  border-radius:9px!important;
  color:#4b4b48!important;
}
.wf-nav-parent:hover{
  background:var(--wf-nav-hover)!important;
  color:#2f302e!important;
}
.wf-nav-parent.active,.wf-nav-group.open>.wf-nav-parent{
  background:#fff!important;
  border-left-color:var(--wf-brand-orange)!important;
  color:#2f302e!important;
  box-shadow:0 1px 0 rgba(42,42,38,.03),0 5px 16px rgba(42,42,38,.045)!important;
}
.wf-nav-icon{color:#8b8b87!important}
.wf-nav-parent.active .wf-nav-icon,.wf-nav-group.open>.wf-nav-parent .wf-nav-icon{color:var(--wf-brand-orange-dark)!important}
.wf-nav-arrow{color:#92928e!important}
.wf-subnav{
  margin:5px 0 10px 27px!important;
  border-left:1px solid #d0d0cc!important;
}
.wf-nav-link{color:#666662!important}
.wf-nav-link:hover{background:#fff!important;color:#333431!important}
.wf-nav-link.active{
  background:var(--wf-brand-orange-soft)!important;
  color:#3c3831!important;
  box-shadow:inset 3px 0 0 var(--wf-brand-orange)!important;
}

/* Kopfbereich: klare Produkt-/Seitenhierarchie und ruhige Benutzeranzeige. */
.topbar.wf-topbar{
  min-height:70px!important;
  padding:15px 30px!important;
  border-bottom:1px solid #e8e7e3!important;
  background:rgba(255,255,255,.98)!important;
}
.wf-topbar-title{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  min-width:0;
}
.wf-topbar-mark{
  width:8px;
  height:28px;
  flex:0 0 8px;
  border-radius:3px;
  background:var(--wf-brand-orange);
}
.wf-topbar-product{
  color:#777773!important;
  font-size:11px!important;
  font-weight:750!important;
  letter-spacing:.09em;
  text-transform:uppercase;
  white-space:nowrap;
}
.wf-topbar-divider{color:#c2c2be;font-size:15px}
.wf-topbar-title strong{
  overflow:hidden;
  color:#343532!important;
  font-size:16px!important;
  font-weight:650!important;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.user-menu{gap:12px!important}
.user-menu>span{
  padding:7px 10px;
  border:1px solid #e7e6e2;
  border-radius:999px;
  background:#f8f8f6;
  color:#73736f;
}
.user-menu a{
  color:#5e5e5a!important;
  font-weight:650!important;
}
.user-menu a:hover{color:var(--wf-brand-orange-dark)!important}

/* Dashboard: stärkerer Einstieg und klar priorisierte Arbeitsbereiche. */
.erp5-command-intro{
  align-items:center!important;
  margin:4px 0 22px!important;
  padding:27px 28px!important;
  border:1px solid #e8e3d9;
  border-left:4px solid var(--wf-brand-orange);
  border-radius:14px;
  background:linear-gradient(118deg,#fff 0%,#fffaf0 100%);
}
.erp5-command-intro .label{
  color:#8b6a31!important;
  font-size:11px!important;
  font-weight:750!important;
  letter-spacing:.08em!important;
  text-transform:uppercase;
}
.erp5-command-intro h2{
  margin:7px 0 7px!important;
  color:#30312f!important;
  font-size:clamp(30px,3vw,39px)!important;
  font-weight:650!important;
  letter-spacing:-.025em!important;
}
.erp5-command-intro p{max-width:760px!important;font-size:15px!important}
.erp5-command-intro .btn.primary{
  background:var(--wf-brand-orange)!important;
  border-color:#e9a426!important;
  color:#302b23!important;
}
.erp5-command-intro .btn.primary:hover{background:#f3a91c!important;border-color:#dc9414!important}
.erp5-command-kpis{gap:15px!important;margin-bottom:20px!important}
.erp5-command-kpis .erp5-focus-card{
  position:relative;
  overflow:hidden;
  min-height:150px!important;
  padding:22px 21px 20px!important;
  border-color:#e5e4df!important;
  border-radius:12px!important;
  transition:border-color .15s ease,box-shadow .15s ease!important;
}
.erp5-command-kpis .erp5-focus-card::before{
  position:absolute;
  top:0;
  right:0;
  left:0;
  height:3px;
  background:var(--wf-brand-gray);
  content:"";
}
.erp5-command-kpis .erp5-focus-card:first-child::before{background:var(--wf-brand-orange)}
.erp5-command-kpis .erp5-focus-card:last-child::before{background:#d9a65a}
.erp5-command-kpis .erp5-focus-card:hover{
  border-color:#d3d2cd!important;
  box-shadow:0 8px 24px rgba(49,46,40,.055)!important;
}
.erp5-command-kpis .erp5-focus-label{color:#777773!important}
.erp5-command-kpis .erp5-focus-card strong{
  margin:13px 0 4px!important;
  color:#343532!important;
  font-weight:650!important;
}
.erp5-command-grid{gap:20px!important}
.erp5-command-work,.erp5-command-side .panel,.erp5-command-today{border-radius:13px!important}
.erp5-command-work{border-top:3px solid #d0d0cc!important}
.erp5-command-work .panel-head{padding-bottom:4px}
.erp5-work-item{padding:16px 0!important}
.erp5-work-count{
  width:44px!important;
  height:38px!important;
  border-radius:9px!important;
  background:#f3f3f0!important;
  border-color:#e1e1dd!important;
  color:#42433f;
}
.erp5-work-item.tone-sand .erp5-work-count{background:var(--wf-brand-orange-soft)!important;border-color:#efdcb8!important}
.erp5-work-item.tone-green .erp5-work-count{background:#edf3e9!important;border-color:#dce8d7!important}
.erp5-work-item.tone-alert .erp5-work-count{background:#f7ece9!important;border-color:#ecd8d3!important}
.erp5-work-arrow{color:#aaa9a4!important;transition:transform .15s ease,color .15s ease}
.erp5-work-item:hover .erp5-work-arrow{color:var(--wf-brand-orange-dark)!important;transform:translateX(2px)}
.erp5-quick-actions a{
  background:#fafaf8!important;
  border-color:#e5e4df!important;
  font-weight:650!important;
}
.erp5-quick-actions a::after{margin-left:auto;color:#aaa9a4;content:"→"}
.erp5-quick-actions a:hover{background:var(--wf-brand-orange-soft)!important;border-color:#ead5ad!important;color:#39362f!important}
.erp5-command-facts dd{color:#3a3b38;font-weight:650!important}

@media(max-width:980px) and (min-width:761px){
  .layout{background:linear-gradient(to right,var(--wf-nav-bg) 0,var(--wf-nav-bg) 220px,#fff 220px,#fff 100%)!important}
}
@media(max-width:760px){
  .layout{background:#fff!important}
  .sidebar.wf-sidebar{background:var(--wf-nav-bg)!important}
  .topbar.wf-topbar{padding:13px 16px!important}
  .wf-topbar-title{gap:8px!important}
  .wf-topbar-divider{display:none}
  .user-menu>span{padding:0;border:0;background:transparent}
  .erp5-command-intro{align-items:flex-start!important;padding:22px 20px!important}
}
@media(max-width:520px){
  .wf-topbar-product{display:none}
  .wf-topbar-title strong{font-size:15px!important}
}

/* WORKFLOW 5.11.4 – einheitliche, rahmenlose Modulüberschriften */
/*
   Der Kopfbereich nennt bereits "Modul · Seite". Deshalb werden nur die
   redundanten kleinen Modulzeilen im ersten Seitenkopf ausgeblendet.
   Kicker innerhalb fachlicher Unterbereiche bleiben sichtbar.
*/
.content > section:first-of-type > .panel-head:first-child > div:first-child > .panel-kicker:first-child,
.content > section:first-of-type > div:first-child > .panel-kicker:first-child,
.content > .erp5-page-head:first-of-type > div:first-child > .panel-kicker:first-child,
.content > .erp5-page-intro:first-of-type > div:first-child > .panel-kicker:first-child{
  display:none!important;
}

/*
   Ein großer äußerer Panelrahmen um die komplette Modulansicht ist unnötig.
   Rahmen von Tabellen, Filtern, Formularen und Unterkarten bleiben erhalten.
*/
.content > section.panel:first-of-type{
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

/* WORKFLOW 5.13.0 – CRM Erstgespräche und Bedarfsanalyse */
.discovery-step{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;margin-right:10px;border-radius:50%;background:#f3dfbd;color:#4b453c;font-weight:800}.discovery-form{display:grid;gap:18px}.discovery-form>.panel{margin:0}.discovery-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 18px}.discovery-form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.discovery-form-grid label{display:flex;flex-direction:column;gap:7px;font-weight:650;color:#4e4d48}.discovery-form-grid .span-two{grid-column:span 2}.discovery-form-grid .span-three{grid-column:1/-1}.discovery-needs-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.discovery-needs-grid>label{display:flex;gap:11px;align-items:flex-start;padding:14px;border:1px solid #e5e0d8;border-radius:10px;background:#fff;cursor:pointer;transition:.16s ease}.discovery-needs-grid>label:hover{border-color:#d8bd8c;background:#fffaf1}.discovery-needs-grid input{margin-top:3px;width:17px;height:17px;accent-color:#dca330}.discovery-needs-grid span{display:grid;gap:4px}.discovery-needs-grid small{color:#77736b;line-height:1.4}.discovery-save-bar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:20px;padding:16px 18px;border-radius:10px;background:#f8f3e9;border:1px solid #eadcc4}.discovery-save-bar>div{display:grid;gap:3px}.discovery-save-bar span{color:#716b62}.discovery-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:18px}.discovery-summary-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.discovery-summary-grid>.panel{margin:0}.discovery-price-card{background:#fbf7ef!important;border-color:#e5d6ba!important}.discovery-price{display:grid;grid-template-columns:1fr auto;align-items:end;margin-top:18px;padding:16px 0;border-top:1px solid #e2d5c0}.discovery-price strong{font-size:27px}.discovery-price small{grid-column:2;color:#777166}.discovery-implementation{display:flex;justify-content:space-between;gap:12px;padding-top:13px;border-top:1px solid #e2d5c0}.discovery-text-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.discovery-text-grid>div{padding:15px;border-radius:9px;background:#fbfaf7;border:1px solid #ebe7df}.discovery-text-grid p{margin:7px 0 0;color:#68665f}.discovery-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.discovery-tags span{padding:7px 11px;border-radius:999px;background:#f6ead5;border:1px solid #ead8b9;color:#565044;font-weight:650}.discovery-module-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.discovery-module-grid article{padding:17px;border:1px solid #e5e1da;border-radius:10px;background:#fff}.discovery-module-grid article>span{display:inline-block;margin-bottom:8px;padding:4px 8px;border-radius:999px;background:#f7f1e6;color:#776c5c;font-size:11px;font-weight:750;text-transform:uppercase;letter-spacing:.03em}.discovery-module-grid h4{margin:0 0 7px;font-size:17px}.discovery-module-grid p{margin:0;color:#6e6c66;line-height:1.5}.discovery-task-list{display:grid;gap:0;margin:0;padding:0;counter-reset:discovery-task;list-style:none}.discovery-task-list li{display:grid;grid-template-columns:34px 1fr;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid #ebe8e1}.discovery-task-list li:last-child{border-bottom:0}.discovery-task-list li:before{counter-increment:discovery-task;content:counter(discovery-task);display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:8px;background:#f6f1e8;font-weight:750}.discovery-archive{display:flex;justify-content:flex-end;margin:12px 0 24px}.discovery-filter{grid-template-columns:minmax(220px,1fr) 190px 190px auto auto}.discovery-type-field[hidden]{display:none!important}.discovery-missing code{font-weight:700}.discovery-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:1050px){.discovery-needs-grid,.discovery-module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.discovery-summary-grid{grid-template-columns:1fr 1fr}.discovery-form-grid.three{grid-template-columns:repeat(2,minmax(0,1fr))}.discovery-form-grid.three .span-three{grid-column:1/-1}}
@media(max-width:720px){.discovery-needs-grid,.discovery-module-grid,.discovery-summary-grid,.discovery-summary-grid.two,.discovery-text-grid,.discovery-form-grid,.discovery-form-grid.three{grid-template-columns:1fr}.discovery-form-grid .span-two,.discovery-form-grid .span-three{grid-column:auto}.discovery-save-bar{align-items:stretch;flex-direction:column}.discovery-filter{grid-template-columns:1fr}.discovery-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* WORKFLOW 5.14.0 – Kunden-Konfigurator und persönliche Demo */
.configurator-demo-flow{background:#f4f3ef}.configurator-header nav>span{color:#77736c;font-size:13px;font-weight:700}.configurator-progress{display:flex;gap:8px;margin-top:24px}.configurator-progress span{padding:8px 12px;border:1px solid #ddd8ce;border-radius:999px;background:#fff;color:#77736c;font-size:13px;font-weight:700}.configurator-progress .active{border-color:#dfba76;background:#f8edda;color:#514735}.configurator-company-grid{display:grid;grid-template-columns:2fr repeat(3,1fr);gap:14px}.configurator-company-grid label{display:grid;gap:7px;color:#55514a;font-size:13px;font-weight:700}.configurator-company-grid label.wide{grid-column:1/-1}.configurator-company-grid input{width:100%;min-height:46px;padding:10px 12px;border:1px solid #dcd7cd;border-radius:9px;background:#fff;color:#343633;font:inherit}.configurator-type-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.configurator-submit-note{margin:12px 0 0;color:#77736c;font-size:13px}
.configured-workflow-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:2px 0 20px;padding:29px;border:1px solid #e6ddcd;border-left:4px solid var(--wf-brand-orange);border-radius:14px;background:linear-gradient(120deg,#fff 0,#fff8ec 100%)}.configured-workflow-hero .label{color:#8a682e;font-size:11px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}.configured-workflow-hero h2{margin:8px 0 7px;font-size:clamp(27px,3vw,38px);letter-spacing:-.025em}.configured-workflow-hero p{max-width:760px;margin:0;color:#6e6b64}.configured-workflow-actions{display:flex;gap:10px;flex-wrap:wrap}.configured-workflow-flow{margin-bottom:20px}.configured-workflow-overview{display:grid;grid-template-columns:1.3fr .7fr;gap:18px;margin-bottom:18px}.configured-workflow-overview>.panel{margin:0}.configured-workflow-profile h3,.configured-workflow-price h3{margin:7px 0 18px}.configured-workflow-goal{margin-top:18px;padding:14px;border-radius:9px;background:#faf7f0}.configured-workflow-goal p{margin:5px 0 0;color:#68645c}.configured-workflow-price{background:#373831!important;color:#fff}.configured-workflow-price .panel-kicker,.configured-workflow-price p{color:#d4d3cc}.configured-workflow-price>div{display:flex;align-items:baseline;gap:10px;margin:18px 0 10px}.configured-workflow-price>div strong{font-size:38px}.configured-workflow-price .btn.primary{margin-top:10px;background:#f0b33d!important;border-color:#e4a52e!important;color:#302d27!important}.configured-workflow-needs>div:last-child{display:flex;flex-wrap:wrap;gap:8px}.configured-workflow-needs>div:last-child span{padding:7px 10px;border:1px solid #ead9bb;border-radius:999px;background:#faf1e1;color:#5c5347;font-size:13px;font-weight:650}.configured-module-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.configured-module-grid>a{display:grid;grid-template-columns:40px 1fr auto;align-items:center;gap:13px;padding:17px;border:1px solid #e4e1da;border-radius:11px;background:#fff;color:#393a37;text-decoration:none;transition:.15s ease}.configured-module-grid>a:hover{border-color:#d7b879;background:#fffbf4;transform:translateY(-1px)}.configured-module-grid>a>span{display:grid;place-items:center;width:36px;height:36px;border-radius:9px;background:#f5ecdd;color:#795f35;font-weight:800}.configured-module-grid strong{font-size:16px}.configured-module-grid p{margin:4px 0 0;color:#716e67;font-size:13px;line-height:1.45}.configured-module-grid b{color:#8a744f;font-size:12px;white-space:nowrap}.configured-workflow-implementation{display:flex;align-items:center;justify-content:space-between;gap:22px;margin-top:18px!important;background:#faf8f3!important}.configured-workflow-implementation>div:first-child{max-width:780px}.configured-workflow-implementation h3{margin:7px 0}.configured-workflow-implementation p{margin:0;color:#6d6961}.configured-workflow-implementation>div:last-child{display:flex;gap:10px;flex-wrap:wrap}.configured-workflow-empty{max-width:720px}
@media(max-width:1050px){.configurator-type-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.configurator-company-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.configured-workflow-overview{grid-template-columns:1fr}.configured-workflow-implementation{align-items:flex-start;flex-direction:column}}
@media(max-width:720px){.configurator-company-grid,.configured-module-grid{grid-template-columns:1fr}.configurator-company-grid label.wide{grid-column:auto}.configured-workflow-hero{align-items:flex-start;flex-direction:column;padding:22px}.configured-workflow-actions,.configured-workflow-actions .btn,.configured-workflow-implementation>div:last-child,.configured-workflow-implementation .btn{width:100%}.configured-module-grid>a{grid-template-columns:38px 1fr}.configured-module-grid b{grid-column:2}.configurator-type-grid{grid-template-columns:1fr}}

/* WORKFLOW 5.14.1 · persönliche Demo-Anfrage */
.configurator-contact-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.configurator-contact-grid label,.configurator-company-grid label{display:grid;gap:7px;color:#55514a;font-size:13px;font-weight:700}.configurator-contact-grid label.wide,.configurator-company-grid label.wide{grid-column:1/-1}.configurator-contact-grid input,.configurator-company-grid input,.configurator-company-grid textarea{width:100%;min-height:46px;padding:10px 12px;border:1px solid #dcd7cd;border-radius:9px;background:#fff;color:#343633;font:inherit;box-sizing:border-box}.configurator-company-grid textarea{resize:vertical;line-height:1.5}.configurator-company-numbers{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:20px}.configurator-privacy{display:flex;align-items:flex-start;gap:11px;margin:6px 0 22px;padding:16px;border:1px solid #e2ddd3;border-radius:11px;background:#faf8f4;color:#5d5951;font-size:14px;line-height:1.55}.configurator-privacy input{flex:0 0 auto;margin-top:4px;accent-color:#765f3f}.configurator-privacy a{color:#5e513f;font-weight:700}.configurator-honeypot{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}.configurator-error{margin-bottom:20px}.configurator-success{max-width:980px;margin:0 auto}.configurator-success-mark{display:grid;place-items:center;width:54px;height:54px;margin-bottom:22px;border-radius:50%;background:#e8f2e9;color:#35613c;font-size:28px;font-weight:800}.configurator-success>h1{margin:8px 0 14px;font-size:clamp(34px,5vw,54px);line-height:1.08;letter-spacing:-.035em}.configurator-success-lead{max-width:820px;margin:0 0 30px;color:#6d6b66;font-size:18px;line-height:1.65}.configurator-access-card{padding:clamp(22px,4vw,38px);border:1px solid #d5c5a9;border-radius:16px;background:linear-gradient(135deg,#fff 0%,#fbf4e8 100%);box-shadow:0 16px 42px rgba(59,51,40,.08)}.configurator-access-card h2{margin:7px 0 22px;font-size:28px}.configurator-access-card dl{display:grid;grid-template-columns:180px 1fr;margin:0;border-top:1px solid #ded6c8}.configurator-access-card dt,.configurator-access-card dd{margin:0;padding:14px 0;border-bottom:1px solid #ded6c8}.configurator-access-card dt{color:#77736c}.configurator-access-card dd{font-weight:750;overflow-wrap:anywhere}.configurator-access-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin-top:24px}.configurator-access-actions a,.configurator-access-actions button{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.configurator-success-result{margin-top:28px}.configurator-access-note{margin:20px 0 0!important;padding:14px 16px;border-radius:9px;background:#f4f2ed;color:#66625b!important}.configurator-submit-note{margin:12px 0 0;color:#77736c;font-size:13px}
@media(max-width:720px){.configurator-contact-grid,.configurator-company-numbers{grid-template-columns:1fr}.configurator-contact-grid label.wide,.configurator-company-grid label.wide{grid-column:auto}.configurator-access-card dl{grid-template-columns:1fr}.configurator-access-card dt{padding-bottom:3px;border-bottom:0}.configurator-access-card dd{padding-top:0}.configurator-access-actions>*{width:100%}}
