/* V2.10.7: WhatsApp-Nummernpruefung und bessere Versandfehler */
:root {
  --bg: #0b1020;
  --panel: rgba(255,255,255,.72);
  --panel-border: rgba(255,255,255,.25);
  --text: #111827;
  --muted: #6b7280;
  --primary: #111827;
  --accent: #ff7a18;
  --shadow: 0 18px 50px rgba(11,16,32,.12);
  --radius: 24px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255,122,24,.18), transparent 25%),
    radial-gradient(circle at top right, rgba(74,222,128,.12), transparent 30%),
    linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}
a { color: inherit; text-decoration: none; }
.small { font-size: 12px; }
.muted { color: var(--muted); }
.app-shell { display: grid; grid-template-columns: 290px 1fr; min-height: 100vh; }
.sidebar {
  background: rgba(11,16,32,.92);
  color: #fff;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.brand.center { justify-content: center; }
.brand-badge {
  width: 48px; height: 48px; border-radius: 16px;
  display: grid; place-items: center; font-weight: 800;
  color: white; background: linear-gradient(135deg, #ff7a18, #ffb347);
  box-shadow: 0 10px 28px rgba(255,122,24,.34);
}
.nav { display: grid; gap: 10px; }
.nav a {
  padding: 14px 16px;
  border-radius: 16px;
  color: rgba(255,255,255,.84);
}
.nav a.active, .nav a:hover { background: rgba(255,255,255,.10); color: #fff; }
.sidebar-user { border-top: 1px solid rgba(255,255,255,.10); padding-top: 18px; }
.logout-link { display: inline-block; margin-top: 12px; color: #ffcb9c; }
.content { padding: 34px; }
.topbar { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; margin-bottom:24px; }
.topbar h1 { margin: 0 0 8px; font-size: 34px; }
.topbar-actions { display:flex; gap:12px; flex-wrap: wrap; }
.glass, .panel {
  background: var(--panel);
  backdrop-filter: blur(14px);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}
.panel { padding: 22px; }
.stats-grid { display:grid; grid-template-columns: repeat(4,1fr); gap:18px; margin-bottom:24px; }
.stat-card {
  padding: 22px; border-radius: 26px; color: white; box-shadow: var(--shadow);
  min-height: 130px; display:flex; flex-direction:column; justify-content:space-between;
}
.stat-card span { opacity: .86; }
.stat-card strong { font-size: 44px; line-height: 1; }
.gradient-a { background: linear-gradient(135deg,#111827,#374151); }
.gradient-b { background: linear-gradient(135deg,#2563eb,#06b6d4); }
.gradient-c { background: linear-gradient(135deg,#16a34a,#22c55e); }
.gradient-d { background: linear-gradient(135deg,#f97316,#fb923c); }
.grid-2 { display:grid; grid-template-columns: 1fr 1fr; gap:18px; }
.panel-head { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:10px; }
.panel-head h2 { margin:0; }
.list { display:grid; gap:12px; }
.list-item {
  display:flex; justify-content:space-between; align-items:center; gap:14px;
  padding:16px; border-radius:18px; background: rgba(255,255,255,.66);
}
.align-right { text-align:right; }
.filters-grid, .form-grid {
  display:grid; grid-template-columns: repeat(3,1fr); gap:14px;
}
.form-grid .full { grid-column: 1 / -1; }
.cards-grid { display:grid; grid-template-columns: 1fr; gap:18px; }
.card-task p { line-height:1.55; color:#374151; }
.card-head { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; margin-bottom:12px; }
.card-head h3 { margin: 0 0 6px; }
.meta-grid { display:grid; grid-template-columns: repeat(2,1fr); gap:12px; margin:16px 0; }
.meta-grid span { display:block; margin-bottom:4px; }
.card-actions, .form-actions, .order-toggle-row { display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
.inline-form { display:flex; gap:10px; flex-wrap: wrap; }
.pill {
  display:inline-flex; padding:8px 12px; border-radius:999px; font-size:12px; font-weight:700;
}
.priority-high { background:#fee2e2; color:#991b1b; }
.priority-medium { background:#fef3c7; color:#92400e; }
.priority-low { background:#dbeafe; color:#1d4ed8; }
.status-open { background:#dbeafe; color:#1d4ed8; }
.status-in_progress { background:#fef3c7; color:#92400e; }
.status-done { background:#dcfce7; color:#166534; }
.flash {
  padding: 14px 16px; border-radius: 16px; margin-bottom: 18px; font-weight: 600;
}
.flash-success { background:#dcfce7; color:#166534; }
.flash-error { background:#fee2e2; color:#991b1b; }
.btn {
  appearance:none; border:none; border-radius:16px; padding:13px 18px; cursor:pointer;
  font-weight:700; font-size:14px; display:inline-flex; align-items:center; justify-content:center;
}
.btn-block { width:100%; }
.btn-primary { background: linear-gradient(135deg,#111827,#374151); color:white; }
.btn-secondary { background: rgba(17,24,39,.08); color:#111827; }
input, select, textarea {
  width:100%; padding: 14px 16px; border-radius:16px; border:1px solid rgba(17,24,39,.08);
  background: rgba(255,255,255,.88); font: inherit; color: var(--text);
}
label { display:block; font-size:14px; font-weight:700; margin-bottom:8px; }
textarea { resize: vertical; }
.table-wrap { overflow:auto; }
table { width:100%; border-collapse: collapse; }
th, td { padding:14px 10px; border-bottom:1px solid rgba(17,24,39,.08); text-align:left; }
.login-body { min-height:100vh; display:grid; place-items:center; }
.login-wrap { width:min(100%, 460px); padding:20px; }
.login-card { padding: 28px; }
.login-card h1 { margin: 18px 0 10px; }
.stack-lg > * + * { margin-top: 16px; }
.checkbox-wrap { display:flex; align-items:center; gap:10px; padding: 0 10px; }
.checkbox-wrap input { width:auto; }
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .stats-grid, .grid-2, .cards-grid, .filters-grid, .form-grid { grid-template-columns: 1fr; }
}


.btn-sm { padding: 10px 14px; font-size: 13px; border-radius: 14px; }
.form-panel { max-width: 760px; }
.narrow-panel { width: 100%; }
.user-mini-card {
  display:flex; justify-content:space-between; align-items:center; gap:16px;
  padding:16px 18px; border-radius:18px; background: rgba(255,255,255,.66); margin-bottom:18px;
}

.login-links { margin-top: 18px; text-align: center; }
.login-links a { color: #111827; font-weight: 700; }
.login-links a:hover { text-decoration: underline; }

.sidebar-link { display:inline-block; margin-top: 14px; color: #fff; opacity:.9; }
.sidebar-link.active, .sidebar-link:hover { opacity:1; text-decoration: underline; }
.scroll-list { max-height: 640px; overflow: auto; }
.status-gap { margin-top: 8px; }
.stats-grid-3 { grid-template-columns: repeat(3,1fr); }
.filters-grid-4 { grid-template-columns: repeat(4,1fr); }
.filters-grid-orders { grid-template-columns: minmax(260px,1fr) auto auto; align-items:center; }
.meta-grid-orders { grid-template-columns: repeat(2,1fr); }
.meta-grid-span-2 { grid-column: 1 / -1; }
.stack-mobile { align-items:flex-start; }
@media (max-width: 1100px) { .stats-grid-3, .filters-grid-4, .filters-grid-orders { grid-template-columns: 1fr; } }


.meta-grid, .meta-grid-orders { grid-template-columns: 1fr !important; }
.cards-grid { grid-template-columns: 1fr !important; }
.danger-zone { margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(17,24,39,.08); }
.btn-danger { background: linear-gradient(135deg,#b91c1c,#ef4444); color:#fff; }
.btn-danger-soft { background: rgba(239,68,68,.10); color:#991b1b; }
.form-note { margin-top: 6px; }
.template-box { padding: 16px; border-radius: 18px; background: rgba(255,255,255,.66); margin-bottom: 16px; }
.hidden { display:none; }
.inline-actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.info-box { padding: 18px; border-radius: 18px; background: rgba(255,255,255,.66); }

.inline-checkbox { margin: 0; padding: 0 10px; align-self: center; }
.inline-checkbox span { font-weight: 700; }

.form-panel-wide { max-width: 980px; }
.customer-picker-box { padding: 16px; border-radius: 18px; background: rgba(255,255,255,.66); }
.customer-picker-head { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-bottom:10px; flex-wrap:wrap; }
.lex-sync-box { margin-bottom: 18px; }
.warning-box { background: rgba(255,244,229,.9); }
code { background: rgba(17,24,39,.08); padding: 2px 6px; border-radius: 8px; }


.brand-logo-only { justify-content: center; margin-bottom: 34px; }
.brand-logo {
  display:block;
  max-width: 100%;
  width: 200px;
  height: auto;
}
.brand-logo-login { width: 260px; max-width: 100%; }
.login-theme-dark {
  background:
    radial-gradient(circle at top left, rgba(255,122,24,.22), transparent 25%),
    radial-gradient(circle at bottom right, rgba(255,122,24,.18), transparent 30%),
    linear-gradient(180deg, #0b1020 0%, #111827 100%);
  color: #fff;
}
.login-theme-dark .login-card {
  background: rgba(11,16,32,.82);
  border: 1px solid rgba(255,255,255,.10);
  color: #fff;
}
.login-theme-dark .login-card h1,
.login-theme-dark .login-card strong,
.login-theme-dark label {
  color: #fff;
}
.login-theme-dark .muted { color: rgba(255,255,255,.72); }
.login-theme-dark input {
  background: rgba(255,255,255,.96);
  color: #111827;
}
.login-theme-dark .login-links a { color: #ffcb9c; }
.login-theme-dark .btn-primary {
  background: linear-gradient(135deg,#ff7a18,#ff9a3d);
  color: #111827;
}
.brand-login-logo-wrap { margin-bottom: 22px; }
.customer-autocomplete {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 10px;
  align-items: start;
}
.customer-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 98px;
  max-height: 360px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(17,24,39,.08);
  background: rgba(255,255,255,.98);
  box-shadow: 0 20px 40px rgba(15,23,42,.12);
  z-index: 50;
}
.customer-result-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(17,24,39,.06);
  cursor: pointer;
  display: grid;
  gap: 4px;
}
.customer-result-item:last-child { border-bottom: 0; }
.customer-result-item:hover {
  background: rgba(255,122,24,.08);
}
.customer-result-title {
  font-weight: 800;
  color: #111827;
}
.customer-result-meta,
.customer-result-empty {
  font-size: 13px;
  color: #6b7280;
}
.customer-result-empty {
  padding: 14px 16px;
}
.customer-clear-btn { white-space: nowrap; }
@media (max-width: 760px) {
  .brand-logo { width: 170px; }
  .brand-logo-login { width: 220px; }
  .customer-autocomplete {
    grid-template-columns: 1fr;
  }
  .customer-results {
    right: 0;
  }
}

.catalog-grid { display:grid; grid-template-columns: 1fr 1fr; gap:18px; margin-top:18px; }
.catalog-list { display:grid; gap:12px; }
.catalog-item { padding:16px; border-radius:18px; background: rgba(255,255,255,.66); display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.catalog-item h4 { margin:0 0 4px; }
.form-grid-2 { grid-template-columns: repeat(2,1fr); }
@media (max-width: 1100px) { .catalog-grid, .form-grid-2 { grid-template-columns: 1fr; } }

.form-grid-3 { grid-template-columns: repeat(3,1fr); }
.user-create-panel { margin-bottom: 18px; }
.sidebar-notify-btn {
  margin-top: 14px;
  width: 100%;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.sidebar-notify-btn:hover { background: rgba(255,255,255,.14); }
@media (max-width: 1100px) { .form-grid-3 { grid-template-columns: 1fr; } }


.sidebar-notify-btn, .sidebar-install-btn {
  width: 100%;
  margin-top: 14px;
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 700;
}
.sidebar-notify-btn:hover, .sidebar-install-btn:hover { background: rgba(255,255,255,.14); }
.date-picker-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}
.date-picker-row > [data-date-display] {
  min-width: 180px;
}
.native-date-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
@media (max-width: 780px) {
  .date-picker-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .date-picker-row > [data-date-display] {
    grid-column: 1 / -1;
    min-width: 0;
  }
  .date-picker-row > .btn {
    width: 100%;
  }
}


.admin-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.sidebar-link {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  color: #fff;
}
.sidebar-link.active, .sidebar-link:hover {
  background: rgba(255,255,255,.14);
}
@media (max-width: 900px) {
  .admin-settings-grid {
    grid-template-columns: 1fr;
  }
}


/* v14.6 Aufgaben-Karten kompakter und bessere Gewichtung */
.cards-grid {
  max-width: 980px;
}
.task-card-compact {
  padding: 18px 20px;
}
.task-card-main {
  margin-bottom: 10px;
}
.task-main-info {
  min-width: 0;
}
.task-kunde,
.task-vehicle,
.task-title {
  overflow-wrap: anywhere;
}
.task-kunde {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 850;
  color: #111827;
  margin-bottom: 3px;
}
.task-vehicle {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 750;
  color: #374151;
  margin-bottom: 5px;
}
.card-head h3.task-title,
.task-title {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 750;
  margin: 0;
  color: #111827;
}
.task-description {
  margin: 8px 0 0;
  font-size: 14px;
}
.task-card-compact .meta-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.task-card-compact .meta-grid > div {
  background: rgba(255,255,255,.52);
  border-radius: 14px;
  padding: 10px 12px;
}
.task-card-compact .card-actions {
  border-top: 1px solid rgba(17,24,39,.08);
  padding-top: 14px;
}
@media (max-width: 900px) {
  .cards-grid {
    max-width: none;
  }
  .task-card-compact .meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .task-kunde { font-size: 18px; }
  .task-vehicle, .card-head h3.task-title, .task-title { font-size: 16px; }
  .task-card-compact .meta-grid {
    grid-template-columns: 1fr;
  }
}


/* v15 Aufträge / Follow-up */
.jobs-grid {
  max-width: 1050px;
}
.job-card {
  padding: 18px 20px;
}
.job-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}
.job-category-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: color-mix(in srgb, var(--cat-color) 14%, white);
  color: #111827;
  border: 1px solid color-mix(in srgb, var(--cat-color) 40%, white);
  border-left: 7px solid var(--cat-color);
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 10px;
}
.price-tag {
  margin-top: 10px;
  font-size: 18px;
  font-weight: 850;
}
.status-inquiry { background:#e0f2fe; color:#075985; }
.status-planned { background:#dbeafe; color:#1d4ed8; }
.status-vehicle_accepted { background:#e0f2fe; color:#075985; }
.status-ready { background:#dcfce7; color:#166534; }
.status-invoiced { background:#f3f4f6; color:#374151; }
.status-cancelled { background:#fee2e2; color:#991b1b; }
.followup-box {
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 18px;
  padding: 16px;
}
.followup-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.customer-results {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.customer-result-item {
  text-align: left;
  border: 1px solid rgba(17,24,39,.10);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255,255,255,.72);
  cursor: pointer;
}
.customer-result-item strong { display:block; }
.customer-result-item span { display:block; color: var(--muted); font-size: 12px; margin-top: 2px; }
@media (max-width: 900px) {
  .job-card-top {
    flex-direction: column;
  }
  .followup-options {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .followup-options {
    grid-template-columns: 1fr;
  }
}


/* v15.1 Aufgabenliste schmaler und Meta-Infos untereinander */
body.tasks-page .cards-grid {
  max-width: 760px;
}
body.tasks-page .card-task,
body.tasks-page .task-card-compact {
  padding: 16px 18px;
}
body.tasks-page .task-card-compact .meta-grid,
body.tasks-page .card-task .meta-grid {
  grid-template-columns: 1fr !important;
  gap: 8px;
  margin: 12px 0;
}
body.tasks-page .task-card-compact .meta-grid > div,
body.tasks-page .card-task .meta-grid > div {
  padding: 8px 10px;
  border-radius: 12px;
}
body.tasks-page .task-description {
  margin-top: 8px;
}
body.tasks-page .card-actions {
  gap: 8px;
}
body.tasks-page .inline-form {
  gap: 8px;
}
@media (max-width: 900px) {
  body.tasks-page .cards-grid {
    max-width: none;
  }
}


.followup-quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 4px;
}


/* v15.4 Preis- und Terminlogik */
.price-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: center;
}
.price-type-select {
  min-width: 110px;
}
@media (max-width: 560px) {
  .price-input-row {
    grid-template-columns: 1fr;
  }
}


/* v15.6 Aufgaben als kompakte Arbeitsliste */
body.tasks-page .task-list-compact {
  display: grid;
  gap: 8px;
  max-width: 1180px;
}

body.tasks-page .task-list-row {
  display: grid;
  grid-template-columns: 112px minmax(280px, 1fr) 300px auto;
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(17,24,39,.07);
  box-shadow: 0 8px 22px rgba(11,16,32,.06);
}

body.tasks-page .task-list-row:hover {
  background: rgba(255,255,255,.94);
  box-shadow: 0 10px 26px rgba(11,16,32,.09);
}

body.tasks-page .task-list-priority {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.tasks-page .priority-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

body.tasks-page .priority-dot-high { background: #dc2626; }
body.tasks-page .priority-dot-medium { background: #f97316; }
body.tasks-page .priority-dot-low { background: #2563eb; }

body.tasks-page .task-list-priority .pill {
  padding: 5px 8px;
  font-size: 11px;
}

body.tasks-page .task-list-main {
  min-width: 0;
}

body.tasks-page .task-list-topline {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  font-size: 15px;
  line-height: 1.2;
}

body.tasks-page .task-list-customer {
  font-size: 16px;
  font-weight: 850;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.tasks-page .task-list-vehicle {
  font-size: 15px;
  font-weight: 700;
  color: #374151;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.tasks-page .task-list-title {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 750;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.tasks-page .task-list-note {
  margin-top: 2px;
  font-size: 12px;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.tasks-page .task-list-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

body.tasks-page .task-list-meta > div {
  min-width: 0;
  padding: 6px 8px;
  border-radius: 11px;
  background: rgba(17,24,39,.045);
}

body.tasks-page .task-list-meta span {
  display: block;
  font-size: 10px;
  color: #6b7280;
  line-height: 1.1;
}

body.tasks-page .task-list-meta strong {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.tasks-page .task-list-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
}

body.tasks-page .btn-xs {
  padding: 7px 9px;
  font-size: 12px;
  border-radius: 11px;
  min-height: 0;
}

body.tasks-page .task-status-form {
  gap: 5px;
  flex-wrap: nowrap;
}

body.tasks-page .task-status-form select {
  height: 34px;
  padding: 6px 28px 6px 9px;
  font-size: 12px;
  border-radius: 11px;
  min-width: 118px;
}

@media (max-width: 1250px) {
  body.tasks-page .task-list-row {
    grid-template-columns: 96px minmax(220px, 1fr) 260px;
  }

  body.tasks-page .task-list-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  body.tasks-page .task-list-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body.tasks-page .task-list-priority,
  body.tasks-page .task-list-actions {
    justify-content: flex-start;
  }

  body.tasks-page .task-list-meta {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 560px) {
  body.tasks-page .task-list-meta {
    grid-template-columns: 1fr;
  }

  body.tasks-page .task-list-actions {
    flex-wrap: wrap;
  }

  body.tasks-page .task-list-topline {
    display: block;
  }

  body.tasks-page .task-list-separator {
    display: none;
  }
}


/* v15.8 Aufgabenliste als breite, saubere Tabellenansicht */
body.tasks-page .tasks-table-panel {
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(17,24,39,.08);
  box-shadow: 0 16px 44px rgba(11,16,32,.10);
}

body.tasks-page .tasks-table-wrap {
  width: 100%;
  overflow-x: auto;
}

body.tasks-page .tasks-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: separate;
  border-spacing: 0;
}

body.tasks-page .tasks-table th {
  padding: 14px 16px;
  background: rgba(248,250,252,.92);
  color: #64748b;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 850;
  border-bottom: 1px solid rgba(17,24,39,.08);
  white-space: nowrap;
}

body.tasks-page .tasks-table td {
  padding: 13px 16px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(17,24,39,.07);
  background: rgba(255,255,255,.72);
}

body.tasks-page .tasks-table tr:hover td {
  background: rgba(255,255,255,.96);
}

body.tasks-page .tasks-table tr:last-child td {
  border-bottom: 0;
}

body.tasks-page .prio-cell {
  width: 120px;
  white-space: nowrap;
  font-weight: 800;
  font-size: 13px;
  color: #334155;
}

body.tasks-page .prio-label {
  margin-left: 8px;
}

body.tasks-page .task-cell {
  width: 28%;
  min-width: 260px;
}

body.tasks-page .task-cell strong,
body.tasks-page .customer-cell strong,
body.tasks-page .assigned-cell strong,
body.tasks-page .due-cell strong {
  display: block;
  color: #111827;
  font-weight: 850;
  line-height: 1.25;
}

body.tasks-page .task-cell span,
body.tasks-page .customer-cell span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.25;
}

body.tasks-page .customer-cell {
  min-width: 190px;
}

body.tasks-page .vehicle-cell {
  min-width: 170px;
  color: #1f2937;
  font-weight: 650;
}

body.tasks-page .assigned-cell {
  min-width: 160px;
}

body.tasks-page .status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

body.tasks-page .status-open {
  background: #dbeafe;
  color: #1d4ed8;
}

body.tasks-page .status-in_progress {
  background: #fef3c7;
  color: #92400e;
}

body.tasks-page .status-done {
  background: #dcfce7;
  color: #166534;
}

body.tasks-page .due-cell {
  min-width: 120px;
}

body.tasks-page .actions-cell {
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

body.tasks-page .icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(17,24,39,.10);
  border-radius: 11px;
  background: rgba(255,255,255,.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #111827;
  cursor: pointer;
}

body.tasks-page .icon-btn:hover {
  background: rgba(17,24,39,.08);
}

body.tasks-page .icon-btn.danger {
  color: #dc2626;
}

body.tasks-page .quick-status-form {
  display: inline-flex;
}

body.tasks-page .quick-status-form select {
  height: 34px;
  min-width: 126px;
  padding: 6px 28px 6px 10px;
  border-radius: 11px;
  font-size: 12px;
}

body.tasks-page .tasks-table-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(17,24,39,.07);
  background: rgba(248,250,252,.75);
}

@media (max-width: 900px) {
  body.tasks-page .tasks-table {
    min-width: 980px;
  }
}


/* v15.11 FineArt App-Look: wie Referenz, aber Dunkel/Orange statt Rot */

/* Layout stabil halten, aber Aufgaben/App-Kopf sauber darstellen */
.app-shell {
  grid-template-columns: 250px minmax(0, 1fr) !important;
  background: #f7f8fb !important;
}
.sidebar {
  background: #181d22 !important;
  color: #fff !important;
  padding: 24px 18px !important;
}
.content {
  padding: 0 !important;
  background: #f7f8fb !important;
  min-width: 0 !important;
}

/* Sidebar mit Icons */
.brand-logo-only {
  justify-content: flex-start !important;
  margin-bottom: 28px !important;
  padding: 0 6px !important;
}
.brand-logo {
  width: 168px !important;
  max-width: 100% !important;
}
.nav {
  display: grid !important;
  gap: 8px !important;
}
.nav a {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  color: rgba(255,255,255,.92) !important;
  padding: 12px 12px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
}
.nav a:hover {
  background: rgba(255,255,255,.08) !important;
}
.nav a.active {
  background: #f97316 !important;
  color: #111827 !important;
}
.nav a.active .fa-nav-icon {
  border-color: rgba(17,24,39,.55);
}
.fa-nav-icon {
  width: 24px !important;
  height: 24px !important;
  border: 1px solid rgba(255,255,255,.56);
  border-radius: 7px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex: 0 0 auto;
}
.sidebar-user {
  border-top: 1px solid rgba(255,255,255,.12) !important;
  padding-top: 16px !important;
}
.logout-link {
  color: #fff !important;
  font-weight: 800 !important;
  opacity: .92;
}

/* Topbar rechts */
.fa-topbar-global {
  height: 78px;
  padding: 16px 30px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid rgba(17,24,39,.08);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.fa-top-spacer { flex: 1; }
.fa-top-search {
  width: 260px;
  height: 44px;
  border: 1px solid rgba(17,24,39,.10);
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  color: #64748b;
}
.fa-top-search input {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  height: auto !important;
  padding: 0 !important;
}
.fa-userbox {
  display: flex;
  align-items: center;
  gap: 12px;
}
.fa-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(135deg,#f97316,#111827);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
}
.fa-userbox strong {
  display: block;
  font-size: 14px;
  color: #111827;
}
.fa-userbox span {
  display: block;
  font-size: 12px;
  color: #64748b;
}

/* Content Abstände nur sauber standardisieren */
.content > .flash,
.content > .topbar,
.content > .tasks-head-modern,
.content > .tasks-filter-modern,
.content > .tasks-table-panel,
.content > .panel,
.content > form,
.content > .stats-grid,
.content > .grid-2,
.content > .cards-grid {
  margin-left: 30px !important;
  margin-right: 30px !important;
}
.content > .tasks-head-modern {
  margin-top: 28px !important;
}

/* Aufgaben-Kopf */
.tasks-head-modern {
  margin-bottom: 22px;
}
.tasks-title-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.tasks-title-icon {
  width: 30px;
  height: 30px;
  border: 2px solid #111827;
  color: #111827;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}
.tasks-head-modern h1 {
  margin: 0 !important;
  font-size: 32px !important;
  line-height: 1.15 !important;
  color: #111827 !important;
}
.tasks-head-modern p {
  margin: 8px 0 0 !important;
}

/* Filterbereich wie Referenz, Orange */
.tasks-filter-modern {
  background: #fff;
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 10px 26px rgba(15,23,42,.05);
}
.tasks-filter-modern-grid {
  display: grid;
  grid-template-columns: 160px 150px 180px 180px minmax(220px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
}
.tasks-filter-modern-grid input,
.tasks-filter-modern-grid select {
  height: 46px !important;
  border-radius: 11px !important;
  border: 1px solid rgba(17,24,39,.10) !important;
  background: #fff !important;
  box-shadow: none !important;
}
.tasks-filter-modern-grid .checkbox-wrap {
  padding: 0 !important;
  white-space: nowrap;
}
.btn-task-orange {
  height: 46px;
  background: #f97316 !important;
  color: #111827 !important;
  border-radius: 11px !important;
  box-shadow: 0 10px 18px rgba(249,115,22,.20);
  font-weight: 900 !important;
}

/* Aufgaben-Tabelle */
body.tasks-page .tasks-table-panel.glass,
body.tasks-page .tasks-table-panel {
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  background: #fff !important;
  border: 1px solid rgba(17,24,39,.08) !important;
  box-shadow: 0 10px 28px rgba(15,23,42,.06) !important;
  backdrop-filter: none !important;
  margin-top: 0 !important;
}
body.tasks-page .tasks-table-wrap {
  width: 100%;
  overflow-x: auto;
}
body.tasks-page .tasks-table {
  width: 100% !important;
  min-width: 1280px !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}
body.tasks-page .tasks-table th {
  padding: 14px 18px !important;
  background: #fff !important;
  border-bottom: 1px solid rgba(17,24,39,.08) !important;
  font-size: 11px !important;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b !important;
  font-weight: 900 !important;
  text-align: left !important;
}
body.tasks-page .tasks-table td {
  padding: 17px 18px !important;
  border-bottom: 1px solid rgba(17,24,39,.07) !important;
  background: #fff !important;
  vertical-align: middle !important;
  text-align: left !important;
}
body.tasks-page .tasks-table tr:hover td {
  background: #fbfdff !important;
}
body.tasks-page .tasks-table tr:last-child td {
  border-bottom: 0 !important;
}
body.tasks-page .prio-cell {
  width: 110px;
  white-space: nowrap;
  font-weight: 850;
  color: #1f2937;
}
body.tasks-page .priority-dot {
  width: 11px !important;
  height: 11px !important;
  border-radius: 999px;
  display: inline-block;
  vertical-align: middle;
}
body.tasks-page .priority-dot-high { background: #f97316 !important; }
body.tasks-page .priority-dot-medium { background: #fbbf24 !important; }
body.tasks-page .priority-dot-low { background: #22c55e !important; }
body.tasks-page .prio-label {
  margin-left: 8px;
}
body.tasks-page .task-cell {
  min-width: 280px;
  width: 27%;
}
body.tasks-page .task-cell strong {
  display: block;
  color: #111827;
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 5px;
}
body.tasks-page .task-cell span {
  display: block;
  color: #64748b;
  font-size: 13px;
  line-height: 1.25;
}
body.tasks-page .customer-cell,
body.tasks-page .vehicle-cell,
body.tasks-page .assigned-cell,
body.tasks-page .due-cell,
body.tasks-page .created-cell {
  min-width: 150px;
}
body.tasks-page .customer-cell strong,
body.tasks-page .assigned-cell strong,
body.tasks-page .due-cell strong,
body.tasks-page .created-cell strong {
  display: block;
  color: #111827;
  font-size: 14px;
  font-weight: 900;
}
body.tasks-page .customer-cell span,
body.tasks-page .created-cell span {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 13px;
}
body.tasks-page .vehicle-cell {
  color: #1f2937;
  font-weight: 650;
}
body.tasks-page .status-badge {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
body.tasks-page .status-open { background: #dbeafe !important; color: #2563eb !important; }
body.tasks-page .status-in_progress { background: #ffedd5 !important; color: #ea580c !important; }
body.tasks-page .status-done { background: #dcfce7 !important; color: #16a34a !important; }
body.tasks-page .actions-cell {
  min-width: 250px;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
body.tasks-page .icon-btn {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  border-radius: 9px !important;
  border: 1px solid rgba(17,24,39,.10) !important;
  background: #fff !important;
  color: #334155 !important;
  display: inline-grid !important;
  place-items: center !important;
  cursor: pointer;
  font-weight: 900 !important;
  font-size: 16px !important;
  box-shadow: none !important;
}
body.tasks-page .icon-btn:hover { background: #fff7ed !important; color: #ea580c !important; }
body.tasks-page .icon-btn.danger { color: #f97316 !important; }
body.tasks-page .quick-status-form {
  display: inline-flex;
}
body.tasks-page .quick-status-form select {
  height: 36px !important;
  min-width: 118px !important;
  border-radius: 9px !important;
  font-size: 12px !important;
  padding: 6px 26px 6px 10px !important;
}
body.tasks-page .tasks-table-footer {
  padding: 13px 18px !important;
  color: #64748b;
  border-top: 1px solid rgba(17,24,39,.07);
  background: #fff;
}

@media (max-width: 1280px) {
  .tasks-filter-modern-grid { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr !important; }
  .fa-topbar-global {
    position: relative;
    justify-content: space-between;
    padding: 14px 16px;
  }
  .fa-top-search { display: none; }
  .content > .flash,
  .content > .topbar,
  .content > .tasks-head-modern,
  .content > .tasks-filter-modern,
  .content > .tasks-table-panel,
  .content > .panel,
  .content > form,
  .content > .stats-grid,
  .content > .grid-2,
  .content > .cards-grid {
    margin-left: 16px !important;
    margin-right: 16px !important;
  }
  .tasks-filter-modern-grid { grid-template-columns: 1fr; }
}


/* v15.15 FineArt Look: etwas weniger fett, Konto/Avatar, Auftragsliste wie Aufgaben */
body {
  font-weight: 500 !important;
}
body.tasks-page .tasks-table th,
body.jobs-page .tasks-table th {
  font-weight: 800 !important;
}
body.tasks-page .task-cell strong,
body.tasks-page .customer-cell strong,
body.tasks-page .assigned-cell strong,
body.tasks-page .due-cell strong,
body.tasks-page .created-cell strong,
body.jobs-page .task-cell strong,
body.jobs-page .customer-cell strong,
body.jobs-page .due-cell strong,
body.jobs-page .price-cell strong,
body.jobs-page .job-category-cell strong {
  font-weight: 750 !important;
}
.nav a {
  font-weight: 700 !important;
}
.tasks-head-modern h1,
.topbar h1 {
  font-weight: 800 !important;
}

/* User oben rechts klickbar */
.fa-userbox {
  text-decoration: none !important;
  color: inherit !important;
  border-radius: 14px;
  padding: 6px 8px;
}
.fa-userbox:hover {
  background: rgba(249,115,22,.08);
}
.fa-avatar {
  overflow: hidden;
}
.fa-avatar img,
.assigned-avatar img,
.account-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Sidebar unten nur Logout */
.sidebar-user-logout-only {
  border-top: 1px solid rgba(255,255,255,.12) !important;
  padding-top: 16px !important;
}
.sidebar-user-logout-only .logout-link {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  color: #fff !important;
  font-weight: 700 !important;
}
.sidebar-user-logout-only .logout-link:hover {
  background: rgba(255,255,255,.08);
  text-decoration: none !important;
}

/* Avatar in Aufgabenliste */
.assigned-user-mini {
  display: flex;
  align-items: center;
  gap: 10px;
}
.assigned-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #111827;
  display: inline-grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  flex: 0 0 auto;
}

/* Mein Konto */
.account-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 560px);
  gap: 18px;
  margin: 0 30px 30px;
}
.account-card h2 {
  margin-top: 0;
}
.account-avatar-preview {
  width: 138px;
  height: 138px;
  border-radius: 999px;
  background: linear-gradient(135deg,#f97316,#111827);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 48px;
  font-weight: 800;
  overflow: hidden;
  margin-bottom: 14px;
}

/* Aufträge als Tabelle wie Aufgaben */
body.jobs-page .jobs-table-panel {
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  background: #fff !important;
  border: 1px solid rgba(17,24,39,.08) !important;
  box-shadow: 0 10px 28px rgba(15,23,42,.06) !important;
  backdrop-filter: none !important;
}
body.jobs-page .jobs-table {
  min-width: 1260px !important;
}
.job-category-cell {
  min-width: 150px;
  white-space: nowrap;
}
.category-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}
.price-cell span,
body.jobs-page .due-cell span {
  display: block;
  color: #64748b;
  font-size: 13px;
  margin-top: 4px;
}
body.jobs-page .ab-number-cell {
  min-width: 120px;
  white-space: nowrap;
}
body.jobs-page .ab-number-cell a {
  color: inherit;
  text-decoration: none;
}
body.jobs-page .ab-number-cell a:hover {
  text-decoration: underline;
}
.job-status-planned { background:#dbeafe !important; color:#2563eb !important; }
.job-status-vehicle_accepted { background:#e0f2fe !important; color:#075985 !important; }
.job-status-in_progress { background:#ffedd5 !important; color:#ea580c !important; }
.job-status-ready { background:#dcfce7 !important; color:#16a34a !important; }
.job-status-invoiced { background:#f3f4f6 !important; color:#374151 !important; }
.job-status-cancelled { background:#fee2e2 !important; color:#991b1b !important; }

/* Buttons Orange statt zu schwer */
.btn-primary,
.btn-task-orange {
  background: #f97316 !important;
  color: #111827 !important;
}
@media (max-width: 900px) {
  .account-grid {
    grid-template-columns: 1fr;
    margin-left: 16px;
    margin-right: 16px;
  }
}


/* v15.16 Fix: Aufträge exakt im Aufgaben-Layout */
body.jobs-page .content > .tasks-head-modern,
body.jobs-page .content > .tasks-filter-modern,
body.jobs-page .content > .tasks-table-panel {
  margin-left: 30px !important;
  margin-right: 30px !important;
}
body.jobs-page .content > .tasks-head-modern {
  margin-top: 28px !important;
}
body.jobs-page .tasks-table-panel.glass,
body.jobs-page .tasks-table-panel,
body.jobs-page .jobs-table-panel {
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  background: #fff !important;
  border: 1px solid rgba(17,24,39,.08) !important;
  box-shadow: 0 10px 28px rgba(15,23,42,.06) !important;
  backdrop-filter: none !important;
  margin-top: 0 !important;
}
body.jobs-page .tasks-table-wrap {
  width: 100% !important;
  overflow-x: auto !important;
}
body.jobs-page .tasks-table {
  width: 100% !important;
  min-width: 1360px !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}
body.jobs-page .tasks-table th {
  padding: 14px 18px !important;
  background: #fff !important;
  border-bottom: 1px solid rgba(17,24,39,.08) !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: .04em !important;
  color: #64748b !important;
  font-weight: 800 !important;
  text-align: left !important;
}
body.jobs-page .tasks-table td {
  padding: 17px 18px !important;
  border-bottom: 1px solid rgba(17,24,39,.07) !important;
  background: #fff !important;
  vertical-align: middle !important;
  text-align: left !important;
}
body.jobs-page .tasks-table tr:hover td {
  background: #fbfdff !important;
}
body.jobs-page .tasks-table tr:last-child td {
  border-bottom: 0 !important;
}
body.jobs-page .task-cell {
  min-width: 280px;
  width: 27%;
}
body.jobs-page .task-cell strong,
body.jobs-page .customer-cell strong,
body.jobs-page .due-cell strong,
body.jobs-page .price-cell strong,
body.jobs-page .job-category-cell strong {
  display: block;
  color: #111827;
  font-size: 14px;
  font-weight: 750 !important;
  margin-bottom: 5px;
}
body.jobs-page .task-cell span,
body.jobs-page .customer-cell span,
body.jobs-page .due-cell span,
body.jobs-page .price-cell span {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.25;
}
body.jobs-page .vehicle-cell {
  min-width: 150px;
  color: #1f2937;
  font-weight: 650;
}
body.jobs-page .status-badge {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
body.jobs-page .actions-cell {
  min-width: 250px;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
body.jobs-page .icon-btn {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  border-radius: 9px !important;
  border: 1px solid rgba(17,24,39,.10) !important;
  background: #fff !important;
  color: #334155 !important;
  display: inline-grid !important;
  place-items: center !important;
  cursor: pointer;
  font-weight: 900 !important;
  font-size: 16px !important;
  box-shadow: none !important;
}
body.jobs-page .icon-btn:hover { background: #fff7ed !important; color: #ea580c !important; }
body.jobs-page .icon-btn.danger { color: #f97316 !important; }
body.jobs-page .tasks-table-footer {
  padding: 13px 18px !important;
  color: #64748b;
  border-top: 1px solid rgba(17,24,39,.07);
  background: #fff;
}
body.jobs-page .jobs-filter-modern-grid {
  grid-template-columns: 160px 170px 170px 170px minmax(220px, 1fr) auto auto !important;
}
body.jobs-page .jobs-filter-modern-grid select[disabled] {
  opacity: 1 !important;
  color: #111827 !important;
  cursor: default !important;
}
@media (max-width: 1280px) {
  body.jobs-page .jobs-filter-modern-grid { grid-template-columns: 1fr 1fr 1fr !important; }
}
@media (max-width: 900px) {
  body.jobs-page .content > .tasks-head-modern,
  body.jobs-page .content > .tasks-filter-modern,
  body.jobs-page .content > .tasks-table-panel {
    margin-left: 16px !important;
    margin-right: 16px !important;
  }
  body.jobs-page .jobs-filter-modern-grid { grid-template-columns: 1fr !important; }
}


/* v15.17 Sidebar-Icons wie Vorlage: clean, ohne Kasten/Rand */
.fa-nav-icon {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: currentColor !important;
}
.fa-nav-svg {
  width: 21px;
  height: 21px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav a {
  gap: 13px !important;
}
.nav a.active .fa-nav-icon,
.nav a:hover .fa-nav-icon {
  color: currentColor !important;
}


/* v15.18 Unterseiten-Icons + Dashboard-Buttons + funktionale Suche */
.topbar-modern-title {
  align-items: center !important;
  margin-top: 0 !important;
}
.topbar-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.page-title-icon,
.tasks-title-icon {
  width: 30px !important;
  height: 30px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #111827 !important;
  margin-top: 4px;
}
.page-title-svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.topbar-modern-title h1 {
  margin-top: 0 !important;
}

/* Dashboard: Aktionsbuttons schöner positioniert, nicht mehr oben an den Rand geklebt */
body.dashboard-page .topbar {
  background: #fff;
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 26px rgba(15,23,42,.05);
  align-items: center !important;
  margin-left: 30px !important;
  margin-right: 30px !important;
}
body.dashboard-page .topbar-actions {
  align-items: center !important;
  gap: 10px !important;
  padding-top: 0 !important;
}
body.dashboard-page .topbar-actions .btn {
  height: 42px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 11px !important;
}

/* Globale Suche oben */
.fa-top-search {
  width: 300px;
  height: 44px;
  border: 1px solid rgba(17,24,39,.10);
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
}
.fa-top-search button {
  border: 0 !important;
  background: transparent !important;
  color: #64748b !important;
  padding: 0 !important;
  width: 22px;
  height: 22px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.fa-top-search input {
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 !important;
  height: auto !important;
  flex: 1;
  min-width: 0;
  background: transparent !important;
}
.search-page-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 160px;
  gap: 12px;
  align-items: center;
}
.search-page-form input {
  height: 46px !important;
  border-radius: 11px !important;
}
.search-results-panel {
  margin-top: 18px !important;
  margin-left: 30px !important;
  margin-right: 30px !important;
}
.search-results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(17,24,39,.08);
}
.search-results-head h2 {
  margin: 0;
  font-size: 18px;
}
.search-results-head span {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}
.no-margin {
  margin: 0 !important;
  border-radius: 0 !important;
}
body.search-page .tasks-table {
  min-width: 1100px !important;
}
body.search-page .tasks-table-panel,
body.search-page .tasks-table-panel.glass {
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  background: #fff !important;
  border: 1px solid rgba(17,24,39,.08) !important;
  box-shadow: 0 10px 28px rgba(15,23,42,.06) !important;
  backdrop-filter: none !important;
}
body.search-page .tasks-table th {
  padding: 14px 18px !important;
  background: #fff !important;
  border-bottom: 1px solid rgba(17,24,39,.08) !important;
  font-size: 11px !important;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b !important;
  font-weight: 800 !important;
}
body.search-page .tasks-table td {
  padding: 17px 18px !important;
  border-bottom: 1px solid rgba(17,24,39,.07) !important;
  background: #fff !important;
  vertical-align: middle !important;
}
@media (max-width: 900px) {
  .fa-top-search { width: 100%; max-width: 260px; }
  body.dashboard-page .topbar,
  .search-results-panel {
    margin-left: 16px !important;
    margin-right: 16px !important;
  }
  body.dashboard-page .topbar {
    align-items: flex-start !important;
  }
  .search-page-form {
    grid-template-columns: 1fr;
  }
}


/* v15.19 Auftragsübersicht: Fertigstellung sichtbar + Status direkt änderbar */
body.jobs-page .job-date-cell strong {
  margin-bottom: 5px;
}
body.jobs-page .planned-completion-label {
  display: block;
  color: #64748b;
  font-size: 13px;
  margin-top: 5px;
  white-space: nowrap;
}
body.jobs-page .job-actions-cell {
  min-width: 290px !important;
}
body.jobs-page .quick-job-status-form {
  display: inline-flex;
}
body.jobs-page .quick-job-status-form select {
  height: 36px !important;
  min-width: 132px !important;
  border-radius: 9px !important;
  border: 1px solid rgba(17,24,39,.10) !important;
  background: #fff !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  padding: 6px 28px 6px 10px !important;
  box-shadow: none !important;
}
body.jobs-page .quick-job-status-form select:hover {
  background: #fff7ed !important;
  border-color: rgba(249,115,22,.35) !important;
}


/* v15.21 Auftragsfilter ohne Extra-Haken */
body.jobs-page .jobs-filter-modern-grid {
  grid-template-columns: 160px 190px 230px 170px minmax(220px, 1fr) auto !important;
}
@media (max-width: 1280px) {
  body.jobs-page .jobs-filter-modern-grid { grid-template-columns: 1fr 1fr 1fr !important; }
}
@media (max-width: 900px) {
  body.jobs-page .jobs-filter-modern-grid { grid-template-columns: 1fr !important; }
}


/* v15.22 Bestellliste im kompakten Listenlayout */
body.orders-page .content > .tasks-head-modern,
body.orders-page .content > .tasks-filter-modern,
body.orders-page .content > .tasks-table-panel {
  margin-left: 30px !important;
  margin-right: 30px !important;
}
body.orders-page .content > .tasks-head-modern {
  margin-top: 28px !important;
}
body.orders-page .orders-filter-modern-grid {
  grid-template-columns: 170px 190px minmax(260px, 1fr) auto auto !important;
}
body.orders-page .orders-table-panel {
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  background: #fff !important;
  border: 1px solid rgba(17,24,39,.08) !important;
  box-shadow: 0 10px 28px rgba(15,23,42,.06) !important;
  backdrop-filter: none !important;
}
body.orders-page .orders-table {
  width: 100% !important;
  min-width: 1180px !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}
body.orders-page .orders-table th {
  padding: 14px 18px !important;
  background: #fff !important;
  border-bottom: 1px solid rgba(17,24,39,.08) !important;
  font-size: 11px !important;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b !important;
  font-weight: 800 !important;
  text-align: left !important;
}
body.orders-page .orders-table td {
  padding: 15px 18px !important;
  border-bottom: 1px solid rgba(17,24,39,.07) !important;
  background: #fff !important;
  vertical-align: middle !important;
  text-align: left !important;
}
body.orders-page .orders-table tr:hover td {
  background: #fbfdff !important;
}
body.orders-page .orders-table tr:last-child td {
  border-bottom: 0 !important;
}
body.orders-page .order-actions-cell {
  min-width: 260px !important;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
body.orders-page .btn-order-toggle {
  height: 36px !important;
  padding: 0 12px !important;
  border-radius: 9px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}
body.orders-page .status-badge {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

/* v15.22 Suchergebnisse sauberer */
body.search-page .search-main-cell {
  min-width: 280px;
}
body.search-page .search-customer-cell strong {
  display: block;
  margin-bottom: 5px;
}
body.search-page .search-customer-cell span {
  display: block;
  color: #64748b;
  font-size: 13px;
}
body.search-page .search-status-cell {
  min-width: 210px;
}
body.search-page .search-status-cell > span:not(.status-badge) {
  display: block;
  color: #64748b;
  font-size: 13px;
  margin-top: 6px;
  white-space: nowrap;
}
body.search-page .status-badge {
  margin-bottom: 2px;
}
body.search-page .tasks-table {
  min-width: 980px !important;
}
@media (max-width: 1280px) {
  body.orders-page .orders-filter-modern-grid { grid-template-columns: 1fr 1fr 1fr !important; }
}
@media (max-width: 900px) {
  body.orders-page .content > .tasks-head-modern,
  body.orders-page .content > .tasks-filter-modern,
  body.orders-page .content > .tasks-table-panel {
    margin-left: 16px !important;
    margin-right: 16px !important;
  }
  body.orders-page .orders-filter-modern-grid { grid-template-columns: 1fr !important; }
}


/* v15.23 Finale Fixes: Bestellliste Abstände, Suche sauber, Ansicht/Druck */
body.orders-page .orders-table {
  table-layout: fixed !important;
  min-width: 1280px !important;
}
body.orders-page .orders-table th:nth-child(1),
body.orders-page .orders-table td:nth-child(1) { width: 105px; }
body.orders-page .orders-table th:nth-child(2),
body.orders-page .orders-table td:nth-child(2) { width: 38%; }
body.orders-page .orders-table th:nth-child(3),
body.orders-page .orders-table td:nth-child(3) { width: 110px; }
body.orders-page .orders-table th:nth-child(4),
body.orders-page .orders-table td:nth-child(4) { width: 170px; }
body.orders-page .orders-table th:nth-child(5),
body.orders-page .orders-table td:nth-child(5) { width: 170px; }
body.orders-page .orders-table th:nth-child(6),
body.orders-page .orders-table td:nth-child(6) { width: 130px; }
body.orders-page .orders-table th:nth-child(7),
body.orders-page .orders-table td:nth-child(7) { width: 150px; }
body.orders-page .orders-table th:nth-child(8),
body.orders-page .orders-table td:nth-child(8) { width: 245px; }
body.orders-page .order-item-cell strong {
  white-space: normal !important;
  line-height: 1.25 !important;
}
body.orders-page .order-item-cell span {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 13px;
}
body.orders-page .tasks-table-footer {
  padding: 12px 18px !important;
  margin: 0 !important;
}
body.orders-page .orders-filter-modern-grid {
  align-items: center !important;
}
body.orders-page .orders-filter-modern-grid .btn,
body.orders-page .orders-filter-modern-grid input {
  height: 46px !important;
}
body.orders-page .order-actions-cell .icon-btn {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
}

/* Suche: bessere Spalten, echte Buttons */
body.search-page .search-open-btn {
  height: 36px !important;
  padding: 0 12px !important;
  border-radius: 9px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap;
  font-size: 12px !important;
  font-weight: 800 !important;
}
body.search-page .tasks-table th,
body.search-page .tasks-table td {
  text-align: left !important;
}
body.search-page .search-main-cell strong {
  white-space: normal !important;
}
body.search-page .search-main-cell span {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 13px;
}
body.search-page .job-category-cell {
  min-width: 130px !important;
}

/* Neuer Auftrag: Kundenanlage-Buttons sauber */
.customer-picker-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Ansicht / Druck */
.print-view-panel {
  margin: 0 30px 30px !important;
}
.print-view-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 14px;
}
.print-document {
  background: #fff;
  border: 1px solid rgba(17,24,39,.10);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(15,23,42,.06);
  padding: 28px;
}
.print-doc-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(17,24,39,.10);
  padding-bottom: 18px;
  margin-bottom: 18px;
}
.print-doc-head h1 {
  margin: 0 0 6px;
  font-size: 28px;
}
.print-doc-head p {
  margin: 0;
  color: #64748b;
}
.print-status {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.print-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.print-grid > div,
.print-text-block {
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 12px;
  padding: 12px;
  background: #fbfdff;
}
.print-grid span,
.print-text-block span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
}
.print-grid strong {
  display: block;
  color: #111827;
  font-size: 14px;
}
.print-text-block {
  margin-top: 12px;
}
.print-text-block p {
  margin: 0;
  line-height: 1.5;
}
@media print {
  .sidebar,
  .fa-topbar-global,
  .print-hidden,
  .flash {
    display: none !important;
  }
  .app-shell {
    display: block !important;
  }
  .content {
    padding: 0 !important;
  }
  .print-view-panel {
    margin: 0 !important;
  }
  .print-document {
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
  }
}
@media (max-width: 900px) {
  .print-view-panel {
    margin-left: 16px !important;
    margin-right: 16px !important;
  }
  .print-grid {
    grid-template-columns: 1fr;
  }
  .print-doc-head {
    flex-direction: column;
  }
}


/* v15.26 Bestellliste: Typfilter + Einheit/Lieferant getrennt */
body.orders-page .orders-filter-modern-grid {
  grid-template-columns: 170px 190px 150px minmax(260px, 1fr) auto auto !important;
}
body.orders-page .orders-table {
  min-width: 1380px !important;
}
body.orders-page .orders-table th:nth-child(1),
body.orders-page .orders-table td:nth-child(1) { width: 105px; }
body.orders-page .orders-table th:nth-child(2),
body.orders-page .orders-table td:nth-child(2) { width: 34%; }
body.orders-page .orders-table th:nth-child(3),
body.orders-page .orders-table td:nth-child(3) { width: 130px; }
body.orders-page .orders-table th:nth-child(4),
body.orders-page .orders-table td:nth-child(4) { width: 170px; }
body.orders-page .orders-table th:nth-child(5),
body.orders-page .orders-table td:nth-child(5) { width: 120px; }
body.orders-page .orders-table th:nth-child(6),
body.orders-page .orders-table td:nth-child(6) { width: 170px; }
body.orders-page .orders-table th:nth-child(7),
body.orders-page .orders-table td:nth-child(7) { width: 130px; }
body.orders-page .orders-table th:nth-child(8),
body.orders-page .orders-table td:nth-child(8) { width: 150px; }
body.orders-page .orders-table th:nth-child(9),
body.orders-page .orders-table td:nth-child(9) { width: 245px; }
body.orders-page .orders-table .vehicle-cell strong {
  display: block;
  color: #111827;
  font-size: 14px;
  font-weight: 750;
}
body.orders-page .orders-table .vehicle-cell span {
  display: block;
  color: #64748b;
  font-size: 13px;
  margin-top: 5px;
}
@media (max-width: 1280px) {
  body.orders-page .orders-filter-modern-grid { grid-template-columns: 1fr 1fr 1fr !important; }
}
@media (max-width: 900px) {
  body.orders-page .orders-filter-modern-grid { grid-template-columns: 1fr !important; }
}


/* v15.27 Sidebar Version */
.app-version {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
  text-align: left;
  padding-left: 4px;
}


/* v15.28 Sidebar Version + Bestellliste Einheit sichtbar */
.sidebar-user-logout-only .app-version {
  color: rgba(255,255,255,.48);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  margin: 0 0 10px 12px;
}
body.orders-page .order-qty-cell strong {
  white-space: nowrap !important;
}
body.orders-page .order-qty-cell span {
  display: block !important;
  color: #64748b !important;
  font-size: 12px !important;
  margin-top: 4px !important;
}


/* v15.31 Einheiten-Verwaltung */
body.order_units-page .content > .tasks-head-modern,
body.order_units-page .content > .panel,
body.order_units-page .content > .tasks-table-panel {
  margin-left: 30px !important;
  margin-right: 30px !important;
}
body.order_units-page .content > .tasks-head-modern {
  margin-top: 28px !important;
}
body.order_units-page .order-units-panel {
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  background: #fff !important;
  border: 1px solid rgba(17,24,39,.08) !important;
  box-shadow: 0 10px 28px rgba(15,23,42,.06) !important;
}
body.order_units-page .order-units-table {
  width: 100% !important;
  min-width: 720px !important;
}
body.order_units-page .order-units-table input[type="text"],
body.order_units-page .order-units-table input[type="number"] {
  height: 40px !important;
  border-radius: 9px !important;
}
@media (max-width: 900px) {
  body.order_units-page .content > .tasks-head-modern,
  body.order_units-page .content > .panel,
  body.order_units-page .content > .tasks-table-panel {
    margin-left: 16px !important;
    margin-right: 16px !important;
  }
}


/* v16.1 Mail-Einstellungen */
body.mail_settings-page .content > .tasks-head-modern,
body.mail_settings-page .content > .panel {
  margin-left: 30px !important;
  margin-right: 30px !important;
}
body.mail_settings-page .content > .tasks-head-modern {
  margin-top: 28px !important;
}
@media (max-width: 900px) {
  body.mail_settings-page .content > .tasks-head-modern,
  body.mail_settings-page .content > .panel {
    margin-left: 16px !important;
    margin-right: 16px !important;
  }
}


/* v16.2 Mail-Vorlagen */
body.mail_templates-page .content > .tasks-head-modern,
body.mail_templates-page .content > .panel,
body.mail_templates-page .mail-template-list,
body.mail_templates-page .mail-template-actions {
  margin-left: 30px !important;
  margin-right: 30px !important;
}
body.mail_templates-page .content > .tasks-head-modern {
  margin-top: 28px !important;
}
.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
}
.placeholder-pill {
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}
.placeholder-pill code {
  display: block;
  font-weight: 900;
  margin-bottom: 4px;
}
.placeholder-pill span {
  color: #64748b;
  font-size: 13px;
}
.mail-template-list {
  display: grid;
  gap: 18px;
}
.mail-template-card textarea {
  font-family: inherit;
  line-height: 1.45;
}
.mail-template-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-bottom: 30px;
}
@media (max-width: 900px) {
  body.mail_templates-page .content > .tasks-head-modern,
  body.mail_templates-page .content > .panel,
  body.mail_templates-page .mail-template-list,
  body.mail_templates-page .mail-template-actions {
    margin-left: 16px !important;
    margin-right: 16px !important;
  }
  .placeholder-grid {
    grid-template-columns: 1fr;
  }
  .mail-template-actions {
    flex-direction: column;
  }
}


/* v16.2.2 Admin sauber gruppiert */
.admin-section-title {
  margin: 0 30px 14px !important;
}
.admin-section-title h2 {
  margin: 0 0 4px;
  font-size: 20px;
}
.admin-section-title p {
  margin: 0;
}
body.admin_settings-page .admin-settings-grid {
  margin-bottom: 26px !important;
}
@media (max-width: 900px) {
  .admin-section-title {
    margin-left: 16px !important;
    margin-right: 16px !important;
  }
}


/* v16.2.3 Follow-Up-Mails gebündelt */
body.mail_templates-page .followup-box {
  display: grid;
  gap: 10px;
}


/* v16.2.6 Mail-Historie */
body.mail_log-page .content > .tasks-head-modern,
body.mail_log-page .content > .tasks-filter-modern,
body.mail_log-page .content > .tasks-table-panel {
  margin-left: 30px !important;
  margin-right: 30px !important;
}
body.mail_log-page .content > .tasks-head-modern {
  margin-top: 28px !important;
}
body.mail_log-page .mail-log-panel {
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  background: #fff !important;
  border: 1px solid rgba(17,24,39,.08) !important;
  box-shadow: 0 10px 28px rgba(15,23,42,.06) !important;
}
body.mail_log-page .mail-log-filter-grid {
  grid-template-columns: 170px minmax(260px, 1fr) auto !important;
}
body.mail_log-page .mail-log-table {
  min-width: 1220px !important;
}
body.mail_log-page .mail-log-table th,
body.mail_log-page .mail-log-table td {
  text-align: left !important;
}
@media (max-width: 900px) {
  body.mail_log-page .content > .tasks-head-modern,
  body.mail_log-page .content > .tasks-filter-modern,
  body.mail_log-page .content > .tasks-table-panel {
    margin-left: 16px !important;
    margin-right: 16px !important;
  }
  body.mail_log-page .mail-log-filter-grid {
    grid-template-columns: 1fr !important;
  }
}


/* v17.1 Leistungen + Kalender-Zuordnung */
body.service_times-page .content > .tasks-head-modern,
body.service_times-page .content > .panel,
body.service_times-page .content > .tasks-table-panel {
  margin-left: 30px !important;
  margin-right: 30px !important;
}
body.service_times-page .content > .tasks-head-modern {
  margin-top: 28px !important;
}
body.service_times-page .services-panel {
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  background: #fff !important;
  border: 1px solid rgba(17,24,39,.08) !important;
  box-shadow: 0 10px 28px rgba(15,23,42,.06) !important;
}
body.service_times-page .services-table {
  min-width: 1080px !important;
}
body.service_times-page .services-table input,
body.service_times-page .services-table select {
  height: 40px !important;
  border-radius: 9px !important;
}
.customer-waits-check {
  height: 46px;
  align-items: center;
  margin-top: 27px;
}
@media (max-width: 900px) {
  body.service_times-page .content > .tasks-head-modern,
  body.service_times-page .content > .panel,
  body.service_times-page .content > .tasks-table-panel {
    margin-left: 16px !important;
    margin-right: 16px !important;
  }
}


/* v17.4 Google Kalender */
body.google_calendar-page .content > .tasks-head-modern,
body.google_calendar-page .content > .panel {
  margin-left: 30px !important;
  margin-right: 30px !important;
}
body.google_calendar-page .content > .tasks-head-modern {
  margin-top: 28px !important;
}
.google-sync-cell .status-badge {
  white-space: nowrap;
}
@media (max-width: 900px) {
  body.google_calendar-page .content > .tasks-head-modern,
  body.google_calendar-page .content > .panel {
    margin-left: 16px !important;
    margin-right: 16px !important;
  }
}


/* v17.4.1 Mail Versand & Queue */
body.mail_queue-page .content > .tasks-head-modern,
body.mail_queue-page .content > .tasks-filter-modern,
body.mail_queue-page .content > .tasks-table-panel {
  margin-left: 30px !important;
  margin-right: 30px !important;
}
body.mail_queue-page .content > .tasks-head-modern {
  margin-top: 28px !important;
}
body.mail_queue-page .mail-log-panel {
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  background: #fff !important;
  border: 1px solid rgba(17,24,39,.08) !important;
  box-shadow: 0 10px 28px rgba(15,23,42,.06) !important;
}
@media (max-width: 900px) {
  body.mail_queue-page .content > .tasks-head-modern,
  body.mail_queue-page .content > .tasks-filter-modern,
  body.mail_queue-page .content > .tasks-table-panel {
    margin-left: 16px !important;
    margin-right: 16px !important;
  }
}


/* v17.5 Mail-System final + Rollen in Mitarbeiter */
.mail-queue-panel {
  padding: 0 !important;
  overflow: hidden !important;
}
.mail-queue-table .task-cell strong,
.mail-queue-table .customer-cell strong {
  display: block;
}
.mail-queue-error-row td {
  background: #fff7ed !important;
  color: #9a3412 !important;
  font-size: 13px;
}
.roles-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  margin: 0 0 18px;
}
.roles-info-grid > div {
  background: #fff;
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 12px;
  padding: 12px;
}
.roles-info-grid strong {
  display: block;
  margin-bottom: 4px;
}
.roles-info-grid span {
  display: block;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}
.inline-role-form {
  display: contents;
}
.roles-panel select {
  min-width: 150px;
}
@media (max-width: 900px) {
  .roles-info-grid {
    grid-template-columns: 1fr;
  }
}


/* v17.5.2 Geplante Mails schöner + Deutsch */
body.mail_queue-page .mail-queue-info {
  margin-left: 30px !important;
  margin-right: 30px !important;
}
.mail-queue-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
}
.mail-queue-summary > div {
  background: #fff;
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 12px;
  padding: 12px;
}
.mail-queue-summary strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}
.mail-queue-summary span {
  display: block;
  color: #64748b;
  font-size: 13px;
}
.status-muted {
  background: #f1f5f9 !important;
  color: #475569 !important;
}
body.mail_queue-page .mail-queue-table th:nth-child(1),
body.mail_queue-page .mail-queue-table td:nth-child(1) {
  width: 120px;
}
body.mail_queue-page .mail-queue-table th:nth-child(2),
body.mail_queue-page .mail-queue-table td:nth-child(2) {
  width: 210px;
}
body.mail_queue-page .mail-queue-table th:nth-child(5),
body.mail_queue-page .mail-queue-table td:nth-child(5) {
  width: 180px;
}
body.mail_queue-page .mail-queue-table th:nth-child(6),
body.mail_queue-page .mail-queue-table td:nth-child(6) {
  width: 100px;
}
body.mail_queue-page .mail-queue-table .status-badge {
  white-space: nowrap;
}
@media (max-width: 900px) {
  body.mail_queue-page .mail-queue-info {
    margin-left: 16px !important;
    margin-right: 16px !important;
  }
  .mail-queue-summary {
    grid-template-columns: 1fr;
  }
}


/* v17.5.3 Mail-Historie schöner */
body.mail_log-page .mail-log-info {
  margin-left: 30px !important;
  margin-right: 30px !important;
}
.mail-log-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
}
.mail-log-summary > div {
  background: #fff;
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 12px;
  padding: 12px;
}
.mail-log-summary strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}
.mail-log-summary span {
  display: block;
  color: #64748b;
  font-size: 13px;
}
body.mail_log-page .mail-history-panel {
  padding: 0 !important;
  overflow: hidden !important;
}
body.mail_log-page .mail-history-table th:nth-child(1),
body.mail_log-page .mail-history-table td:nth-child(1) {
  width: 125px;
}
body.mail_log-page .mail-history-table th:nth-child(2),
body.mail_log-page .mail-history-table td:nth-child(2) {
  width: 34%;
}
body.mail_log-page .mail-history-table th:nth-child(6),
body.mail_log-page .mail-history-table td:nth-child(6) {
  width: 170px;
}
body.mail_log-page .mail-history-table .status-badge {
  white-space: nowrap;
}
@media (max-width: 900px) {
  body.mail_log-page .mail-log-info {
    margin-left: 16px !important;
    margin-right: 16px !important;
  }
  .mail-log-summary {
    grid-template-columns: 1fr;
  }
}


/* v17.5.6 Fix Auftrag bearbeiten + heutige Aufträge Dashboard */
.today-jobs-panel {
  margin-bottom: 20px;
}
.today-jobs-list {
  display: grid;
  gap: 12px;
}
.today-job-card {
  background: #fff;
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 14px;
  padding: 14px;
}
.today-job-head,
.today-job-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}
.today-job-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.today-job-details > div {
  background: #f8fafc;
  border-radius: 12px;
  padding: 10px;
}
.today-job-details span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  margin-bottom: 4px;
}
.today-job-details p {
  margin: 0;
  color: #111827;
  line-height: 1.4;
}
.today-job-footer {
  align-items: center;
  margin-top: 12px;
}
@media (max-width: 900px) {
  .today-job-head,
  .today-job-footer {
    flex-direction: column;
  }
  .today-job-details {
    grid-template-columns: 1fr;
  }
}


/* v17.5.7 Kunde zuerst bei Aufgabe/Auftrag */
.customer-first-intro {
  margin-bottom: 16px;
}
.customer-step-form > .main-form-title,
.customer-step-form > .customer-data-field,
.customer-step-form:not(.customer-selected) > :not(.customer-picker-box):not(input[type="hidden"]) {
  display: none !important;
}
.customer-step-form.customer-selected > .main-form-title,
.customer-step-form.customer-selected > .customer-data-field {
  display: block !important;
}
.customer-step-form.customer-selected > :not(input[type="hidden"]) {
  display: block;
}
.customer-step-form.customer-selected {
  opacity: 1;
}
.customer-step-form input[readonly] {
  background: #f8fafc;
  color: #475569;
}
.customer-step-form .customer-picker-box {
  display: block !important;
  border: 1px solid rgba(249,115,22,.18);
  background: #fff7ed;
  border-radius: 14px;
  padding: 14px;
}


/* v17.5.8 Regeln Kunde wartet / Fertigmeldung */
.checkbox-wrap.is-disabled {
  opacity: .45;
  cursor: not-allowed;
}
.checkbox-wrap.is-disabled input {
  cursor: not-allowed;
}


/* v17.5.9 Kennzeichen Regeln */
.form-grid > div.is-disabled label {
  opacity: .55;
}
.form-grid > div.is-disabled input {
  background: #f1f5f9 !important;
  color: #94a3b8 !important;
  cursor: not-allowed;
}


/* v17.6 Mobile Header + mobile Karten für Aufgaben/Aufträge */
.mobile-app-header,
.mobile-sidebar-backdrop {
  display: none;
}

@media (max-width: 780px) {
  body {
    padding-top: 64px;
  }

  .app-shell {
    display: block !important;
  }

  .mobile-app-header {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 10px;
    align-items: center;
    position: fixed;
    z-index: 3000;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    padding: 10px 12px;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(17,24,39,.08);
    box-shadow: 0 8px 24px rgba(15,23,42,.08);
  }

  .mobile-menu-btn {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #111827;
    display: grid;
    place-items: center;
    padding: 11px;
  }

  .mobile-menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 999px;
    margin: 2px 0;
  }

  .mobile-top-search {
    height: 44px;
    display: grid;
    grid-template-columns: 38px 1fr;
    align-items: center;
    border: 1px solid rgba(17,24,39,.10);
    background: #f8fafc;
    border-radius: 16px;
    overflow: hidden;
  }

  .mobile-top-search button {
    border: 0;
    background: transparent;
    font-size: 20px;
    color: #64748b;
  }

  .mobile-top-search input {
    border: 0 !important;
    background: transparent !important;
    min-width: 0;
    padding: 0 10px 0 0 !important;
    height: 44px !important;
    box-shadow: none !important;
  }

  .mobile-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: linear-gradient(135deg,#f97316,#111827);
    color: #fff !important;
    display: grid;
    place-items: center;
    font-weight: 900;
    text-decoration: none !important;
    overflow: hidden;
  }

  .mobile-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .sidebar {
    position: fixed !important;
    z-index: 3100;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(82vw, 310px) !important;
    height: 100dvh !important;
    transform: translateX(-105%);
    transition: transform .22s ease;
    border-radius: 0 22px 22px 0 !important;
  }

  body.mobile-menu-open .sidebar {
    transform: translateX(0);
  }

  .mobile-sidebar-backdrop {
    position: fixed;
    z-index: 3050;
    inset: 0;
    background: rgba(15,23,42,.42);
  }

  body.mobile-menu-open .mobile-sidebar-backdrop {
    display: block;
  }

  .content {
    margin-left: 0 !important;
    width: 100% !important;
    padding-top: 0 !important;
  }

  .fa-topbar-global {
    display: none !important;
  }

  .topbar,
  .topbar-modern-title,
  .tasks-head-modern {
    margin-top: 12px !important;
  }

  body.tasks-page .tasks-table-wrap,
  body.jobs-page .tasks-table-wrap {
    overflow: visible !important;
  }

  body.tasks-page .tasks-table,
  body.jobs-page .tasks-table {
    min-width: 0 !important;
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 12px !important;
  }

  body.tasks-page .tasks-table thead,
  body.jobs-page .tasks-table thead {
    display: none !important;
  }

  body.tasks-page .tasks-table tbody,
  body.jobs-page .tasks-table tbody,
  body.tasks-page .tasks-table tr,
  body.jobs-page .tasks-table tr {
    display: block !important;
    width: 100% !important;
  }

  body.tasks-page .tasks-table tr,
  body.jobs-page .tasks-table tr {
    background: #fff !important;
    border: 1px solid rgba(17,24,39,.08) !important;
    border-radius: 18px !important;
    box-shadow: 0 10px 26px rgba(15,23,42,.07) !important;
    padding: 12px !important;
    margin-bottom: 12px !important;
  }

  body.tasks-page .tasks-table td,
  body.jobs-page .tasks-table td {
    display: grid !important;
    grid-template-columns: 118px minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: start !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 8px 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  body.tasks-page .tasks-table td::before,
  body.jobs-page .tasks-table td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .03em;
    line-height: 1.35;
  }

  body.tasks-page .tasks-table .task-cell,
  body.jobs-page .tasks-table .task-cell,
  body.tasks-page .tasks-table .customer-cell,
  body.jobs-page .tasks-table .customer-cell {
    grid-template-columns: 118px minmax(0, 1fr) !important;
  }

  body.tasks-page .actions-cell,
  body.jobs-page .actions-cell,
  body.jobs-page .job-actions-cell {
    display: flex !important;
    flex-wrap: wrap !important;
    white-space: normal !important;
    gap: 8px !important;
  }

  body.tasks-page .actions-cell::before,
  body.jobs-page .actions-cell::before {
    flex: 0 0 118px;
  }

  body.tasks-page .quick-status-form,
  body.jobs-page .quick-job-status-form {
    flex: 1 1 160px;
  }

  body.tasks-page .quick-status-form select,
  body.jobs-page .quick-job-status-form select {
    width: 100% !important;
    min-height: 42px;
  }

  body.jobs-page .job-date-cell span,
  body.tasks-page .created-cell span {
    word-break: break-word;
  }

  body.tasks-page .tasks-table-panel,
  body.jobs-page .jobs-table-panel,
  body.jobs-page .tasks-table-panel {
    padding: 10px !important;
    border-radius: 18px !important;
  }

  body.tasks-page .tasks-filter-modern,
  body.jobs-page .tasks-filter-modern {
    margin-left: 12px !important;
    margin-right: 12px !important;
  }
}

@media (min-width: 781px) {
  .sidebar {
    transform: none !important;
  }
}


/* v17.6.3 Aufträge mobile kompakt */
.mobile-job-link {
  color: inherit;
  text-decoration: none;
}
.mobile-job-link:hover {
  text-decoration: underline;
}
@media (max-width: 780px) {
  body.jobs-page .jobs-table td.job-category-cell,
  body.jobs-page .jobs-table td.price-cell,
  body.jobs-page .jobs-table td.ab-number-cell,
  body.jobs-page .jobs-table td.google-sync-cell,
  body.jobs-page .jobs-table td.job-actions-cell {
    display: none !important;
  }

  body.jobs-page .jobs-table tr {
    padding: 10px 12px !important;
    margin-bottom: 8px !important;
  }

  body.jobs-page .jobs-table td {
    grid-template-columns: 104px minmax(0, 1fr) !important;
    padding: 6px 0 !important;
  }

  body.jobs-page .jobs-table td::before {
    font-size: 11px !important;
  }

  body.jobs-page .jobs-table .task-cell strong,
  body.jobs-page .jobs-table .customer-cell strong,
  body.jobs-page .jobs-table .due-cell strong {
    font-size: 14px !important;
  }

  body.jobs-page .jobs-table .task-cell span,
  body.jobs-page .jobs-table .customer-cell span,
  body.jobs-page .jobs-table .due-cell span {
    font-size: 12px !important;
    margin-top: 2px !important;
  }

  body.jobs-page .jobs-table .vehicle-cell {
    font-size: 13px !important;
  }
}


/* v17.6.4 mobile klickbare Karten */
@media (max-width: 780px) {
  body.jobs-page .jobs-table tr,
  body.tasks-page .tasks-table tr {
    cursor: pointer;
    transition: transform .08s ease, box-shadow .08s ease;
  }

  body.jobs-page .jobs-table tr:active,
  body.tasks-page .tasks-table tr:active {
    transform: scale(.98);
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
  }
}


/* v17.6.5 Status wieder sichtbar mobil */
@media (max-width: 780px) {
  body.jobs-page .jobs-table td[data-label="Status"] {
    grid-template-columns: 1fr !important;
  }

  body.jobs-page .jobs-table td[data-label="Status"]::before {
    display: none;
  }

  body.jobs-page .quick-job-status-form select {
    width: 100% !important;
    min-height: 44px;
    font-size: 14px;
  }
}


/* v17.6.6 Mobile Status wirklich änderbar */
.mobile-status-form {
  display: none;
}
@media (max-width: 780px) {
  body.jobs-page .desktop-status-badge {
    display: none !important;
  }

  body.jobs-page .mobile-status-form {
    display: block !important;
    width: 100%;
  }

  body.jobs-page .mobile-status-form select {
    width: 100% !important;
    min-height: 44px !important;
    border-radius: 12px !important;
    font-weight: 800;
  }

  body.jobs-page .jobs-table td[data-label="Status"] {
    display: block !important;
    padding-top: 8px !important;
  }
}


/* v18.0 Fundament Rollen/Bereiche + Aufgabentypen */
.permission-grid-mini {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 6px;
  min-width: 360px;
}
.permission-chip {
  background: #f8fafc;
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 10px;
  padding: 7px 8px;
  font-size: 12px;
}
.permissions-cell {
  min-width: 390px;
}
.task-type-box {
  padding: 14px;
  border-radius: 14px;
  background: #fff7ed;
  border: 1px solid rgba(249,115,22,.18);
}
.task-type-label {
  display: inline-block !important;
  margin: 4px 0 2px !important;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155 !important;
  font-size: 11px !important;
  font-weight: 800;
}
.customer-step-form.customer-required .customer-picker-box {
  background: #fff7ed;
}
@media (max-width: 900px) {
  .permission-grid-mini {
    grid-template-columns: 1fr;
    min-width: 0;
  }
  .permissions-cell {
    min-width: 0;
  }
}


/* v18.1 Aufgaben mobile kompakter */
@media (max-width: 780px) {
  body.tasks-page .tasks-table tr {
    padding: 8px !important;
    margin-bottom: 6px !important;
  }

  body.tasks-page .tasks-table td {
    padding: 4px 0 !important;
  }

  body.tasks-page .task-type-label {
    font-size: 10px !important;
  }
}


/* v18.2 Produktion */
.production-create-panel,
.production-panel,
.dashboard-production-panel {
  margin-left: 30px;
  margin-right: 30px;
}
.production-panel {
  padding: 0 !important;
  overflow: hidden;
}
.production-table .status-open {
  background: #dbeafe;
  color: #1d4ed8;
}
.production-table .status-in_progress {
  background: #fef3c7;
  color: #92400e;
}
.production-table .status-done {
  background: #dcfce7;
  color: #166534;
}
@media (max-width: 780px) {
  .production-create-panel,
  .production-panel,
  .dashboard-production-panel {
    margin-left: 12px;
    margin-right: 12px;
  }
  body.production-page .tasks-table-wrap {
    overflow: visible !important;
  }
  body.production-page .tasks-table {
    min-width: 0 !important;
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
  }
  body.production-page .tasks-table thead {
    display: none !important;
  }
  body.production-page .tasks-table tr {
    display: block !important;
    background: #fff;
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 8px 18px rgba(15,23,42,.07);
  }
  body.production-page .tasks-table td {
    display: grid !important;
    grid-template-columns: 105px 1fr !important;
    gap: 10px;
    border: 0 !important;
    padding: 6px 0 !important;
    background: transparent !important;
  }
  body.production-page .tasks-table td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
  }
}


/* v18.2 Produktion + gruppiertes Menü */
.nav-grouped {
  gap: 4px !important;
}
.nav-section-label {
  color: rgba(255,255,255,.48);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .10em;
  margin: 16px 10px 6px;
}
.nav-section-label:first-child {
  margin-top: 6px;
}
.production-create-panel,
.production-panel,
.dashboard-production-panel {
  margin-left: 30px;
  margin-right: 30px;
}
.production-panel {
  padding: 0 !important;
  overflow: hidden;
}
body.production-page .tasks-table-wrap {
  overflow-x: auto;
}
body.production-page .tasks-table {
  width: 100%;
  min-width: 980px;
}
body.production-page .status-open {
  background: #dbeafe;
  color: #1d4ed8;
}
body.production-page .status-in_progress {
  background: #fef3c7;
  color: #92400e;
}
body.production-page .status-done {
  background: #dcfce7;
  color: #166534;
}
@media (max-width: 780px) {
  .nav-section-label {
    margin-top: 14px;
  }
  .production-create-panel,
  .production-panel,
  .dashboard-production-panel {
    margin-left: 12px;
    margin-right: 12px;
  }
  body.production-page .tasks-table {
    min-width: 0 !important;
    border-spacing: 0 10px !important;
  }
  body.production-page .tasks-table thead {
    display: none !important;
  }
  body.production-page .tasks-table tr,
  body.production-page .tasks-table tbody {
    display: block !important;
  }
  body.production-page .tasks-table tr {
    background: #fff;
    border: 1px solid rgba(17,24,39,.08);
    border-radius: 16px;
    padding: 10px;
    margin-bottom: 10px;
  }
  body.production-page .tasks-table td {
    display: grid !important;
    grid-template-columns: 110px minmax(0,1fr);
    gap: 10px;
    padding: 6px 0 !important;
    border: 0 !important;
    background: transparent !important;
  }
  body.production-page .tasks-table td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
  }
}


/* v18.2.1 verständliche Rollen/Rechte */
.roles-profile-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.profile-help {
  max-width: 220px;
  margin-top: 6px;
  line-height: 1.35;
}
.advanced-permissions summary {
  cursor: pointer;
  font-weight: 800;
  color: #111827;
  padding: 8px 0;
}
.advanced-toggle {
  margin-bottom: 8px;
}
@media (max-width: 1100px) {
  .roles-profile-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 720px) {
  .roles-profile-grid {
    grid-template-columns: 1fr;
  }
}


/* v18.2.2 Rechte auf Aktionen reduziert */
.advanced-permissions .permission-chip span {
  font-size: 12px;
}


/* v18.2.3 Schrift/Lesbarkeit: keine Black-Gewichte */
:root {
  --fa-font-main: "Titillium Web", "Titillium", "Segoe UI", Arial, sans-serif;
}
html, body, button, input, select, textarea {
  font-family: var(--fa-font-main) !important;
  font-weight: 400;
}
strong, b,
h1, h2, h3,
.panel-head h2,
.tasks-head-modern h1,
.topbar h1,
.tasks-table th,
.nav a,
.btn,
.status-badge,
.pill,
.task-cell strong,
.customer-cell strong,
.vehicle-cell,
.due-cell strong,
.price-cell strong,
.job-category-cell strong,
.permission-chip,
.advanced-permissions summary,
.roles-info-grid strong {
  font-weight: 700 !important;
}
.muted, .small,
.tasks-table td span,
.profile-help,
.roles-info-grid span {
  font-weight: 400 !important;
}

/* v18.2.4 Mitarbeiterprofile werden separat gespeichert */


/* v18.2.7 Typography Fix (kein Black mehr) */

/* Tabellen Headlines */
.tasks-table th,
.jobs-table th {
  font-weight: 600 !important;
}

/* Auftrag Liste */
.task-cell strong,
.customer-cell strong,
.vehicle-cell strong,
.job-category-cell strong {
  font-weight: 600 !important;
}

/* Werte (wichtig!) */
.vehicle-cell,
.task-cell span,
.customer-cell span {
  font-weight: 500 !important;
}

/* Überschriften Panels */
.panel-head h2,
.tasks-head-modern h1 {
  font-weight: 600 !important;
}

/* Entferne übertriebene Bold Stellen */
strong {
  font-weight: 600 !important;
}


/* v18.3 FINAL TYPO FIX – NO MORE FAT FONTS */

/* RESET ALL */
* {
  font-weight: 400 !important;
}

/* HEADINGS slightly stronger but NOT fat */
h1, h2, h3 {
  font-weight: 600 !important;
}

/* table headers */
.tasks-table th {
  font-weight: 500 !important;
}

/* main values (but NOT bold heavy) */
.tasks-table td strong,
.customer-cell strong,
.assigned-cell strong,
.due-cell strong,
.price-cell strong {
  font-weight: 500 !important;
}

/* keep normal text clean */
.tasks-table td span,
.muted,
.small {
  font-weight: 400 !important;
}

/* buttons */
.btn {
  font-weight: 500 !important;
}

/* badges */
.status-badge,
.pill {
  font-weight: 500 !important;
}


/* v18.3.1 Tabellen-Schrift final: Inhalte NICHT fett */
body.tasks-page .tasks-table th,
body.jobs-page .tasks-table th,
body.orders-page .tasks-table th,
body.production-page .tasks-table th,
.tasks-table th {
  font-weight: 500 !important;
}

body.tasks-page .tasks-table td,
body.jobs-page .tasks-table td,
body.orders-page .tasks-table td,
body.production-page .tasks-table td,
.tasks-table td,
body.tasks-page .tasks-table td *,
body.jobs-page .tasks-table td *,
body.orders-page .tasks-table td *,
body.production-page .tasks-table td *,
.tasks-table td * {
  font-weight: 400 !important;
}

body.tasks-page .tasks-table td strong,
body.jobs-page .tasks-table td strong,
body.orders-page .tasks-table td strong,
body.production-page .tasks-table td strong,
.tasks-table td strong,
body.tasks-page .task-cell strong,
body.jobs-page .task-cell strong,
body.tasks-page .customer-cell strong,
body.jobs-page .customer-cell strong,
body.tasks-page .assigned-cell strong,
body.jobs-page .assigned-cell strong,
body.tasks-page .due-cell strong,
body.jobs-page .due-cell strong,
body.jobs-page .price-cell strong,
body.jobs-page .job-category-cell strong {
  font-weight: 400 !important;
}

/* Nur Badges/Buttons dürfen leicht kräftiger bleiben */
body.tasks-page .tasks-table .status-badge,
body.jobs-page .tasks-table .status-badge,
body.orders-page .tasks-table .status-badge,
body.production-page .tasks-table .status-badge,
body.tasks-page .tasks-table .pill,
body.jobs-page .tasks-table .pill,
body.orders-page .tasks-table .pill,
body.production-page .tasks-table .pill,
body.tasks-page .tasks-table .btn,
body.jobs-page .tasks-table .btn,
body.orders-page .tasks-table .btn,
body.production-page .tasks-table .btn {
  font-weight: 500 !important;
}

/* v18.3.2 Due highlighting */
.due-hint{
  font-size:11px;
  margin-top:2px;
}
.due-overdue strong{color:#dc2626;}
.due-overdue .due-hint{color:#dc2626;}

.due-today strong{color:#d97706;}
.due-today .due-hint{color:#d97706;}

.due-tomorrow strong{color:#059669;}
.due-tomorrow .due-hint{color:#059669;}


/* v18.3.4 Produktionstabelle sauberer */
body.production-page .production-table th {
  font-weight: 500 !important;
}

body.production-page .production-table td,
body.production-page .production-table td * {
  font-weight: 400 !important;
}

body.production-page .production-title-cell {
  min-width: 280px;
}

body.production-page .production-title-cell strong {
  display: block;
  font-size: 15px;
  font-weight: 500 !important;
  color: #111827;
  line-height: 1.25;
  margin-bottom: 4px;
}

body.production-page .production-title-cell span {
  display: block;
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
  white-space: normal;
}

body.production-page .production-actions-cell {
  min-width: 230px;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  white-space: nowrap;
}

body.production-page .production-status-form {
  flex: 1 1 auto;
}

body.production-page .production-status-form select {
  width: 100%;
  min-width: 150px;
}

body.production-page .production-delete-form {
  flex: 0 0 auto;
}

body.production-page .production-delete-form .icon-btn {
  margin: 0;
}

@media (max-width: 780px) {
  body.production-page .production-actions-cell {
    display: flex !important;
    flex-wrap: wrap;
  }

  body.production-page .production-actions-cell::before {
    flex: 0 0 110px;
  }

  body.production-page .production-status-form {
    flex: 1 1 160px;
  }
}


/* v18.3.5 Fälligkeit/Termin farbig final */
.due-hint {
  display: block;
  font-size: 11px !important;
  margin-top: 2px;
  line-height: 1.2;
  font-weight: 400 !important;
}
.due-overdue strong,
.due-overdue .due-hint {
  color: #dc2626 !important;
}
.due-today strong,
.due-today .due-hint {
  color: #d97706 !important;
}
.due-tomorrow strong,
.due-tomorrow .due-hint {
  color: #059669 !important;
}

.production-edit-form input{
  width:120px;
  margin-right:6px;
}
.production-edit-form{
  display:flex;
  gap:6px;
  margin-bottom:4px;
}


/* v18.3.8 Dashboard spacing + production list */
.dashboard-section-spacing {
  margin-top: 24px;
}

.dashboard-production-panel .list-item {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.dashboard-production-panel .list-item:last-child {
  border-bottom: none;
}

.dashboard-production-panel strong {
  font-weight: 500 !important;
}

.dashboard-production-panel .muted {
  font-size: 12px;
}

/* v18.4 Werkstatt */
.workshop-list{
  padding:16px;
}
.workshop-card{
  background:#fff;
  border:1px solid rgba(0,0,0,0.08);
  border-radius:14px;
  padding:12px;
  margin-bottom:10px;
}
.w-title{
  font-weight:500;
}
.w-vehicle{
  color:#64748b;
  font-size:13px;
}
.w-time{
  font-size:13px;
}
.w-status select{
  width:100%;
  margin-top:6px;
}


/* v18.4.1 Aufgabentyp-Logik sauber */
.customer-step-form.customer-optional .customer-picker-box {
  background: #f8fafc !important;
  border-color: rgba(17,24,39,.08) !important;
}
.task-type-box select {
  max-width: 360px;
}
.task-type-box .small {
  margin-top: 6px;
}


/* v18.4.2 Kundenauswahl Aufgaben sauberer */
.customer-picker-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.customer-create-inline {
  grid-column: 1 / -1;
  margin-top: 12px;
  background: #fff !important;
  border: 1px solid rgba(17,24,39,.08);
}
.free-contact-hint {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid rgba(17,24,39,.08);
  color: #475569;
  font-size: 13px;
}
#use_free_contact:disabled {
  opacity: .45;
  cursor: not-allowed;
}


/* v18.4.3 Lexoffice-Kundenformular wirklich eingeklappt */
.customer-create-inline[hidden],
.hidden {
  display: none !important;
}
.customer-picker-actions .btn {
  white-space: nowrap;
}


/* v18.4.4 Aufgabentypen Admin + Autotitel */
.inline-task-type-form {
  display: contents;
}
.task-types-table input[type="text"],
.task-types-table input[type="number"] {
  width: 100%;
}
.task-types-table .checkbox-wrap {
  margin-right: 10px;
  white-space: nowrap;
}


/* v18.5 Auftragspositionen */
.job-positions-box {
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 14px;
  padding: 14px;
  background: #f8fafc;
}
.positions-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.position-rows {
  display: grid;
  gap: 8px;
}
.position-row {
  display: grid;
  grid-template-columns: minmax(160px,1.1fr) minmax(130px,.9fr) minmax(180px,1.5fr) 70px 80px 95px 85px 38px;
  gap: 8px;
  align-items: center;
}
.position-row input,
.position-row textarea,
.position-row select {
  width: 100%;
}
.print-positions-table {
  width: 100%;
  border-collapse: collapse;
}
.print-positions-table th,
.print-positions-table td {
  text-align: left;
  border-bottom: 1px solid rgba(17,24,39,.10);
  padding: 8px 6px;
  font-weight: 400 !important;
}
.print-positions-table th {
  font-weight: 500 !important;
  color: #64748b;
}
@media (max-width: 780px) {
  .positions-head {
    flex-direction: column;
  }
  .position-row {
    grid-template-columns: 1fr;
  }
  .position-row .icon-btn {
    width: 100%;
  }
}


/* v18.5.1 Kalender/Bereich bewusst auswählbar */
.calendar-manual-note {
  margin-top: 5px;
  line-height: 1.35;
}


/* v18.5.2 Vorlagen speichern ohne Bestellliste */
#catalog-template-form .hidden {
  display: none !important;
}


/* v18.5.3 Positionen Preisart + Summe */
.position-row {
  grid-template-columns: minmax(150px, 1.2fr) minmax(170px, 1.5fr) 80px 110px 95px 42px !important;
}
.position-price-type {
  min-width: 85px;
}
@media (max-width: 780px) {
  .position-row {
    grid-template-columns: 1fr !important;
  }
}

/* v18.5.4 Beschreibung bleibt manuell; keine automatische Leistungs-Liste */

/* v18.5.5 Positionspreise rechnen netto/brutto mit 19% MwSt. zusammen */


/* v18.6 Auftragsart Montage/Produktion */
.job-type-box {
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 14px;
  padding: 14px;
  background: #f8fafc;
}
.production-job-mode .installation-only-field.hidden,
.installation-only-field.hidden {
  display: none !important;
}


/* v18.6.1 Produktionsleistungen */
.production-job-mode #customer_waits_wrap.hidden,
#customer_waits_wrap.hidden {
  display: none !important;
}


/* v18.7 Status Nachkontrolliert + Fertigmeldung Trigger */
.status-checked,
.job-status-checked {
  background: #dcfce7 !important;
  color: #166534 !important;
}

/* v19.1 Lexoffice Positionen: Gruppierung und Ausblenden */
body.service_times-page .table-section-row td {
  background: #f8fafc !important;
  color: #475569 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
  border-top: 1px solid rgba(15,23,42,.08) !important;
  border-bottom: 1px solid rgba(15,23,42,.08) !important;
  padding: 10px 16px !important;
}
body.service_times-page .btn-small {
  min-height: 34px !important;
  padding: 7px 11px !important;
  font-size: 13px !important;
  white-space: nowrap !important;
}

/* v19.4 Lexoffice-Beschreibungsvorlagen in Auftragspositionen */
.position-row textarea {
  min-height: 42px;
  resize: vertical;
}

.job-view-positions{display:flex;flex-direction:column;gap:10px;margin-top:8px}
.job-view-position{padding:10px 12px;border:1px solid rgba(148,163,184,.25);border-radius:12px;background:rgba(255,255,255,.04)}
.job-view-position p{margin:6px 0 0;white-space:pre-wrap}
.w-positions{margin-top:8px;font-size:13px;line-height:1.35;color:var(--muted)}
.w-positions strong{color:var(--text)}


/* v19.9 Werkstattblatt: saubere A4-Seiten, keine zerrissenen Blöcke */
.workshop-sheet .print-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.workshop-sheet .print-grid > div,
.workshop-sheet .print-text-block {
  padding: 11px 12px;
}
.workshop-section-title {
  margin: 16px 0 10px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #475569;
}
.workshop-print-page + .workshop-print-page {
  margin-top: 18px;
}
.workshop-sheet .job-view-positions {
  display: grid;
  gap: 9px;
}
.workshop-sheet .job-view-position {
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  break-inside: avoid;
  page-break-inside: avoid;
}
.workshop-sheet .job-view-position p {
  margin-top: 5px;
  line-height: 1.4;
}
@media print {
  @page {
    size: A4;
    margin: 10mm;
  }
  html,
  body {
    width: 210mm;
    background: #fff !important;
  }
  .workshop-sheet {
    font-size: 11px !important;
  }
  .workshop-print-page {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .workshop-print-page-details {
    break-before: page;
    page-break-before: always;
  }
  .workshop-section-title,
  .workshop-sheet .print-doc-head,
  .workshop-sheet .print-grid > div,
  .workshop-sheet .print-text-block,
  .workshop-sheet .job-view-position {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .workshop-section-title {
    margin: 10px 0 7px !important;
    font-size: 9px !important;
  }
  .workshop-sheet .print-doc-head {
    padding-bottom: 10px !important;
    margin-bottom: 10px !important;
  }
  .workshop-sheet .print-doc-head h1 {
    font-size: 22px !important;
    margin-bottom: 2px !important;
  }
  .workshop-sheet .print-doc-head p,
  .workshop-sheet .print-grid strong,
  .workshop-sheet .print-text-block p,
  .workshop-sheet .job-view-position {
    font-size: 11px !important;
    line-height: 1.32 !important;
  }
  .workshop-sheet .print-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }
  .workshop-sheet .print-grid > div,
  .workshop-sheet .print-text-block,
  .workshop-sheet .job-view-position {
    padding: 7px 8px !important;
    border-radius: 7px !important;
  }
  .workshop-sheet .print-grid span,
  .workshop-sheet .print-text-block span {
    font-size: 8px !important;
    margin-bottom: 3px !important;
    letter-spacing: .02em !important;
  }
  .workshop-sheet .print-text-block {
    margin-top: 8px !important;
  }
  .workshop-sheet .job-view-positions {
    gap: 6px !important;
  }
  .workshop-sheet .job-view-position p {
    margin-top: 3px !important;
  }
}

/* v19.12 Büro-Auftragsansicht + Werkstattblatt-PDF Button */
.job-detail-page{display:flex;flex-direction:column;gap:18px}.job-detail-card{background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:22px;padding:22px;box-shadow:0 14px 38px rgba(15,23,42,.06)}.job-detail-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:18px}.job-detail-head h2{margin:0;font-size:28px;letter-spacing:-.04em}.job-detail-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.job-detail-grid>div,.job-detail-notes-grid>div{background:#f8fafc;border:1px solid rgba(15,23,42,.06);border-radius:16px;padding:14px}.job-detail-grid span,.job-detail-notes-grid span{display:block;color:#64748b;font-size:11px;text-transform:uppercase;letter-spacing:.08em;font-weight:800;margin-bottom:6px}.job-detail-grid strong{display:block;color:#0f172a;word-break:break-word}.job-detail-section-title{font-size:17px;font-weight:900;margin-bottom:14px}.job-position-table-wrap{overflow:auto}.job-position-table{width:100%;border-collapse:separate;border-spacing:0;border:1px solid rgba(15,23,42,.08);border-radius:16px;overflow:hidden}.job-position-table th,.job-position-table td{padding:12px 14px;border-bottom:1px solid rgba(15,23,42,.07);vertical-align:top;text-align:left}.job-position-table th{background:#f1f5f9;color:#475569;font-size:11px;text-transform:uppercase;letter-spacing:.08em}.job-position-table tr:last-child td{border-bottom:0}.job-position-table .num{text-align:right;white-space:nowrap}.job-position-table tfoot td{background:#fbfcfe;font-weight:800}.job-detail-notes-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.job-detail-notes-grid p{margin:0;white-space:pre-wrap}@media(max-width:980px){.job-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.job-detail-notes-grid{grid-template-columns:1fr}}@media(max-width:640px){.job-detail-grid{grid-template-columns:1fr}.job-detail-head{display:block}.job-detail-head .status-badge{margin-top:12px}}

/* V19.14 Auftrag Detailansicht Feinschliff */
.job-detail-page{
  padding:0 22px 28px;
  box-sizing:border-box;
}
.job-detail-page .print-view-actions{
  margin-bottom:2px;
}
.job-detail-status-form{
  min-width:220px;
  background:#f8fafc;
  border:1px solid rgba(15,23,42,.10);
  border-radius:16px;
  padding:10px 12px;
  box-shadow:0 10px 24px rgba(15,23,42,.04);
}
.job-detail-status-form label{
  display:block;
  font-size:10px;
  font-weight:900;
  letter-spacing:.10em;
  text-transform:uppercase;
  color:#64748b;
  margin-bottom:6px;
}
.job-detail-status-form select{
  width:100%;
  height:40px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,.14);
  background:#fff;
  color:#0f172a;
  font-weight:800;
  padding:0 10px;
}
@media(max-width:640px){
  .job-detail-page{padding:0 12px 22px}
  .job-detail-status-form{margin-top:12px;min-width:0;width:100%}
}

/* V20.8 Lexoffice kompakte Listen */
.lexoffice-list-page .job-detail-card { padding: 14px; }
.lexoffice-filter-card { margin-bottom: 12px; }
.lexoffice-compact-table th,
.lexoffice-compact-table td { padding: 8px 10px; vertical-align: middle; }
.lexoffice-compact-table .tiny-id { font-size: 10px; opacity: .65; }
.lex-actions-col { width: 390px; text-align: right; }
.lex-link-compact { display: grid; grid-template-columns: 140px minmax(150px, 1fr) auto; gap: 6px; align-items: center; justify-content: end; }
.lex-link-compact input.job-link-search { min-width: 0; width: 140px; }
.lex-link-compact select.job-link-select { min-width: 0; width: 100%; max-width: 210px; }
.lex-action-form { display: inline-block; margin-top: 5px; margin-left: 5px; }
@media (max-width: 1100px) { .lex-actions-col { width: auto; text-align: left; } .lex-link-compact { grid-template-columns: 1fr; } .lex-link-compact input.job-link-search, .lex-link-compact select.job-link-select { width: 100%; max-width: none; } }


/* V20.9 Lexoffice kompakt + Mobile-Menü-Fix */
.mobile-menu-btn { cursor: pointer; position: relative; z-index: 3200; }
.lexoffice-compact-table td, .lexoffice-compact-table th { padding-top: 7px !important; padding-bottom: 7px !important; vertical-align: middle; }
.lexoffice-compact-table .lex-actions-col { width: 360px; text-align: right; }
.lex-link-compact { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(150px, 1.2fr) auto; gap: 6px; align-items: center; }
.lex-action-form { display: inline-flex; margin-left: 6px; }
.notify-card { display:flex; gap:12px; align-items:center; justify-content:space-between; flex-wrap:wrap; }
@media (max-width: 780px) { .lex-link-compact { grid-template-columns: 1fr; } .lexoffice-compact-table .lex-actions-col { width:auto; text-align:left; } }


/* V20.12 Lexoffice Listen + Ansprechpartner Feinschliff */
.lexoffice-list-page .job-detail-card{padding:10px 12px!important}
.lexoffice-compact-table{font-size:13px}
.lexoffice-compact-table td,.lexoffice-compact-table th{padding:5px 8px!important;line-height:1.25!important}
.lexoffice-compact-table .tiny-id{font-size:9px;max-width:180px;display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lexoffice-compact-table .lex-actions-col{width:330px;text-align:right;white-space:nowrap}
.lex-link-compact{display:inline-grid!important;grid-template-columns:115px 150px auto;gap:5px;align-items:center;justify-content:end;vertical-align:middle}
.lex-link-compact input.job-link-search{width:115px!important;min-width:0!important}
.lex-link-compact select.job-link-select{width:150px!important;min-width:0!important;max-width:150px!important}
.lex-action-form{display:inline-flex!important;margin-left:4px;margin-top:0!important;vertical-align:middle}
.contact-quick-add{margin-top:10px;padding:10px;border:1px dashed #d7dde8;border-radius:12px;background:#f8fafc}
.contact-quick-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin-top:8px}
@media(max-width:900px){.lexoffice-compact-table .lex-actions-col{width:auto;text-align:left;white-space:normal}.lex-link-compact{display:grid!important;grid-template-columns:1fr!important}.lex-link-compact input.job-link-search,.lex-link-compact select.job-link-select{width:100%!important;max-width:none!important}.contact-quick-grid{grid-template-columns:1fr}}

/* V20.13 Kundendaten-Bearbeiten-Modus */
.customer-edit-actions{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  border:1px solid rgba(148,163,184,.25);
  background:rgba(248,250,252,.8);
  border-radius:14px;
}
.customer-master-field[readonly], .customer-master-field.is-readonly{
  background:#f3f4f6 !important;
  color:#6b7280;
  cursor:not-allowed;
}
.contact-quick-add.is-locked{
  display:none;
}

/* V20.16 Auftrag-Formular: klarere Bereiche + freie Position separat */
.job-details-title {
  margin-top: 10px;
  border-top: 1px solid rgba(255,255,255,.14);
  padding-top: 18px;
}
.position-action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.position-row .position-free-input {
  display: none;
}
.position-row.is-free-position select[name="position_service[]"] {
  display: none;
}
.position-row.is-free-position .position-free-input {
  display: block;
}
.production-job-mode .installation-only-field {
  display: none !important;
}
body:not(.production-job-mode) .production-only-field {
  display: none !important;
}
@media (max-width: 760px) {
  .position-action-buttons { justify-content: stretch; }
  .position-action-buttons .btn { flex: 1; }
}

/* V20.17 Live-Suche Produktion / Nachkontrolle + Aufgaben-Kundendaten */
.live-results{
  display:grid;
  gap:6px;
  margin-top:8px;
}
.live-result-item{
  width:100%;
  text-align:left;
  border:1px solid rgba(148,163,184,.28);
  background:#fff;
  border-radius:12px;
  padding:9px 12px;
  cursor:pointer;
  font:inherit;
}
.live-result-item:hover{
  border-color:rgba(249,115,22,.65);
  background:#fff7ed;
}
.task-customer-master-field[readonly], .task-customer-master-field.is-readonly{
  background:#f3f4f6 !important;
  color:#6b7280;
  cursor:not-allowed;
}

/* V21.1 Fixes */
.position-row { align-items: stretch; }
.position-row .remove-position-row { min-width: 38px; height: 42px; align-self: center; justify-self: end; }
.position-row textarea { min-height: 42px; resize: vertical; }
.my-area-grid { align-items: start; }
.my-area-production-panel { grid-column: 1 / -1; }
.my-area-stats .stat-card { min-width: 0; }
@media (max-width: 1100px) {
  .position-row { grid-template-columns: 1fr 1fr; }
  .position-row .remove-position-row { justify-self: start; }
}
@media (max-width: 700px) {
  .position-row { grid-template-columns: 1fr; }
}

/* V21.2 echte Fixes */
.today-jobs-panel, .today-jobs-list { height:auto!important; max-height:none!important; overflow:visible!important; }
.today-jobs-list { display:grid!important; grid-template-columns:1fr!important; gap:10px!important; }
.today-job-card { display:block!important; height:auto!important; max-height:none!important; overflow:visible!important; }
.position-row { grid-template-columns: minmax(150px,1.1fr) minmax(120px,.9fr) minmax(170px,1.5fr) 70px 80px 95px 85px 42px!important; align-items:center!important; }
.position-row .remove-position-row { width:38px!important; min-width:38px!important; height:38px!important; align-self:center!important; justify-self:end!important; padding:0!important; }
.my-area-grid{align-items:start}.my-area-production-panel{grid-column:1/-1}.my-area-stats .stat-card{min-width:0}
@media(max-width:780px){.position-row{grid-template-columns:1fr!important}.position-row .remove-position-row{width:100%!important;justify-self:stretch!important}}

/* V21.4 Final-Fixes: Dashboard, Leistungen, Mobile-Menü */
.today-jobs-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
.today-job-card {
  display: block !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 12px 14px !important;
}
.today-job-card + .today-job-card { margin-top: 0 !important; }
.today-job-details { display: none !important; }
.today-job-head, .today-job-footer { align-items: center !important; }

.job-positions-box .position-row {
  display: grid !important;
  grid-template-columns: minmax(180px, 1.15fr) minmax(150px, .95fr) minmax(220px, 1.35fr) 78px 90px 100px 98px 42px !important;
  gap: 8px !important;
  align-items: center !important;
}
.job-positions-box .position-row > * { min-width: 0 !important; width: 100% !important; box-sizing: border-box !important; }
.job-positions-box .position-row textarea { min-height: 40px !important; height: 40px !important; resize: vertical !important; }
.job-positions-box .position-row .position-price-type { white-space: nowrap !important; }
.job-positions-box .position-row .remove-position-row {
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  align-self: center !important;
  justify-self: end !important;
}
@media (max-width: 1050px) {
  .job-positions-box .position-row {
    grid-template-columns: 1fr 1fr !important;
  }
  .job-positions-box .position-row .remove-position-row {
    justify-self: start !important;
  }
}
@media (max-width: 720px) {
  .job-positions-box .position-row {
    grid-template-columns: 1fr !important;
  }
  .job-positions-box .position-row .remove-position-row {
    width: 100% !important;
    max-width: none !important;
    justify-self: stretch !important;
  }
}
body.mobile-menu-open .mobile-sidebar-backdrop { display: block !important; opacity: 1 !important; pointer-events: auto !important; }
body.mobile-menu-open .sidebar { transform: translateX(0) !important; visibility: visible !important; pointer-events: auto !important; }

/* V21.5 Fixes */
.today-jobs-list-v215 {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  max-height: none !important;
  overflow: visible !important;
}
.today-job-row-v215 {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 14px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.today-job-main-v215 { min-width: 0 !important; }
.today-job-meta-v215 {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}
.job-positions-box .position-row {
  grid-template-columns: minmax(160px, 1fr) minmax(130px, .8fr) minmax(340px, 2fr) 64px 82px 92px 86px 42px !important;
}
.job-positions-box .position-row textarea[name="position_description[]"] {
  min-width: 0 !important;
}
.job-positions-box .position-row input[name="position_quantity[]"] {
  max-width: 64px !important;
  justify-self: stretch !important;
}
@media (max-width: 1180px) {
  .job-positions-box .position-row {
    grid-template-columns: minmax(150px,1fr) minmax(150px,1fr) minmax(260px,1.6fr) 64px 82px 92px 86px 42px !important;
  }
}
@media (max-width: 900px) {
  .today-job-row-v215 { align-items: flex-start !important; flex-direction: column !important; }
  .today-job-meta-v215 { justify-content: flex-start !important; }
}


/* V21.5.3 Sidebar Clean / Mobile-Menü stabil */
.sidebar{display:flex!important;flex-direction:column!important;justify-content:flex-start!important;overflow:hidden!important;box-sizing:border-box!important;}
.sidebar>div:first-child{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding-bottom:14px!important;-webkit-overflow-scrolling:touch!important;}
.sidebar-user-logout-only{flex:0 0 auto!important;margin-top:auto!important;padding:12px 10px calc(12px + env(safe-area-inset-bottom))!important;border-top:1px solid rgba(255,255,255,.14)!important;background:#181d22!important;position:sticky!important;bottom:0!important;z-index:2!important;}
.sidebar-user-logout-only .app-version{display:block!important;margin:0 0 8px 4px!important;color:rgba(255,255,255,.62)!important;font-size:11px!important;line-height:1.2!important;}
.sidebar-user-logout-only .logout-link{display:flex!important;align-items:center!important;gap:10px!important;min-height:42px!important;padding:10px 12px!important;border-radius:12px!important;background:rgba(255,255,255,.08)!important;text-decoration:none!important;}
.mobile-menu-btn,.mobile-menu-btn *{pointer-events:auto!important;touch-action:manipulation!important;}
.mobile-sidebar-backdrop{pointer-events:none!important;}
body.mobile-menu-open .mobile-sidebar-backdrop{pointer-events:auto!important;}
@media(max-width:780px){.mobile-app-header{z-index:20000!important;}.mobile-menu-btn{position:relative!important;z-index:20002!important;cursor:pointer!important;}.sidebar{position:fixed!important;top:0!important;left:0!important;bottom:auto!important;width:min(86vw,320px)!important;max-width:320px!important;height:100dvh!important;max-height:100dvh!important;padding:18px 14px 0!important;transform:translate3d(-110%,0,0)!important;visibility:hidden!important;opacity:0!important;transition:transform .22s ease,opacity .18s ease,visibility 0s linear .22s!important;z-index:20001!important;border-radius:0 22px 22px 0!important;box-shadow:24px 0 60px rgba(15,23,42,.28)!important;will-change:transform!important;pointer-events:auto!important;}body.mobile-menu-open .sidebar{transform:translate3d(0,0,0)!important;visibility:visible!important;opacity:1!important;transition:transform .22s ease,opacity .18s ease,visibility 0s!important;}.mobile-sidebar-backdrop{display:block!important;position:fixed!important;inset:0!important;background:rgba(15,23,42,.46)!important;opacity:0!important;visibility:hidden!important;transition:opacity .18s ease,visibility 0s linear .18s!important;z-index:19999!important;}body.mobile-menu-open .mobile-sidebar-backdrop{opacity:1!important;visibility:visible!important;transition:opacity .18s ease,visibility 0s!important;}.sidebar .brand-logo-only{margin-bottom:14px!important;}.sidebar .brand-logo{width:150px!important;}.sidebar .nav{gap:6px!important;padding-bottom:8px!important;}.sidebar .nav a{min-height:42px!important;padding:10px 11px!important;}}

/* V21.5.4 Final: Dashboard heute, Leistungen und Mobile-Menü */
.today-jobs-panel-v2154,
.today-jobs-panel-v2154 * {
  overflow: visible !important;
}
.today-jobs-table-wrap-v2154 {
  width: 100% !important;
  max-height: none !important;
  overflow: visible !important;
}
.today-jobs-table-v2154 {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 10px !important;
  table-layout: auto !important;
}
.today-jobs-table-v2154 thead th {
  padding: 0 12px 4px !important;
  text-align: left !important;
  color: #64748b !important;
  font-size: 12px !important;
}
.today-jobs-table-v2154 tbody tr {
  display: table-row !important;
  height: auto !important;
}
.today-jobs-table-v2154 tbody td {
  display: table-cell !important;
  height: auto !important;
  padding: 14px 12px !important;
  background: rgba(255,255,255,.72) !important;
  border-top: 1px solid rgba(17,24,39,.06) !important;
  border-bottom: 1px solid rgba(17,24,39,.06) !important;
  vertical-align: middle !important;
}
.today-jobs-table-v2154 tbody td:first-child { border-left: 1px solid rgba(17,24,39,.06) !important; border-radius: 16px 0 0 16px !important; }
.today-jobs-table-v2154 tbody td:last-child { border-right: 1px solid rgba(17,24,39,.06) !important; border-radius: 0 16px 16px 0 !important; text-align: right !important; }
.today-job-actions-v2154 { white-space: nowrap !important; }
@media (max-width: 780px) {
  .today-jobs-table-v2154,
  .today-jobs-table-v2154 thead,
  .today-jobs-table-v2154 tbody,
  .today-jobs-table-v2154 tr,
  .today-jobs-table-v2154 td { display: block !important; width: 100% !important; }
  .today-jobs-table-v2154 thead { display: none !important; }
  .today-jobs-table-v2154 tbody tr { background: rgba(255,255,255,.72) !important; border: 1px solid rgba(17,24,39,.06) !important; border-radius: 16px !important; padding: 12px !important; margin-bottom: 10px !important; }
  .today-jobs-table-v2154 tbody td { border: 0 !important; border-radius: 0 !important; background: transparent !important; padding: 5px 0 !important; text-align: left !important; }
  .today-jobs-table-v2154 tbody td:last-child { text-align: left !important; }
  .today-jobs-table-v2154 td::before { content: attr(data-label); display:block; font-size:11px; font-weight:800; color:#64748b; margin-bottom:2px; }
}

.job-positions-box .position-row {
  display: grid !important;
  grid-template-columns: minmax(240px, 1.05fr) minmax(320px, 1.8fr) 72px 96px 110px 86px 88px 94px 42px !important;
  gap: 8px !important;
  align-items: start !important;
}
.job-positions-box .position-row > * { min-width: 0 !important; box-sizing: border-box !important; }
.job-positions-box .position-row select[name="position_service[]"] { grid-column: 1 !important; width: 100% !important; }
.job-positions-box .position-row .position-free-input { grid-column: 1 !important; width: 100% !important; }
.job-positions-box .position-row textarea[name="position_description[]"] {
  grid-column: 2 !important;
  width: 100% !important;
  min-height: 72px !important;
  height: 72px !important;
  line-height: 1.35 !important;
  resize: vertical !important;
}
.job-positions-box .position-row input[name="position_quantity[]"] { grid-column: 3 !important; width: 72px !important; max-width: 72px !important; justify-self: stretch !important; text-align: center !important; }
.job-positions-box .position-row input[name="position_unit[]"] { grid-column: 4 !important; width: 100px !important; max-width: 100px !important; }
.job-positions-box .position-row input[name="position_price[]"] { grid-column: 5 !important; width: 118px !important; max-width: 118px !important; }
.job-positions-box .position-row input[name="position_discount[]"] { grid-column: 6 !important; width: 86px !important; max-width: 86px !important; }
.job-positions-box .position-row .position-tax-rate { grid-column: 7 !important; width: 88px !important; max-width: 88px !important; }
.job-positions-box .position-row .position-price-type { grid-column: 8 !important; width: 94px !important; max-width: 94px !important; }
.job-positions-box .position-row .remove-position-row { grid-column: 9 !important; width: 38px !important; height: 38px !important; min-width: 38px !important; justify-self: end !important; align-self: start !important; margin-top: 0 !important; }
.job-positions-box .position-row:not(.is-free-position) .position-free-input { display: none !important; }
.job-positions-box .position-row.is-free-position select[name="position_service[]"] { display: none !important; }
.job-positions-box .position-row.is-free-position .position-free-input { display: block !important; }
@media (max-width: 1180px) {
  .job-positions-box .position-row { grid-template-columns: minmax(210px,1fr) minmax(280px,1.5fr) 72px 92px 104px 80px 84px 90px 42px !important; }
}
@media (max-width: 860px) {
  .job-positions-box .position-row { grid-template-columns: 1fr !important; }
  .job-positions-box .position-row > * { grid-column: 1 !important; width: 100% !important; max-width: none !important; }
  .job-positions-box .position-row textarea[name="position_description[]"] { min-height: 86px !important; height: 86px !important; }
  .job-positions-box .position-row .remove-position-row { width: 100% !important; max-width: none !important; justify-self: stretch !important; }
}

.mobile-menu-btn,
.mobile-menu-btn * { pointer-events: auto !important; touch-action: manipulation !important; }
@media (max-width: 780px) {
  .mobile-app-header { position: sticky !important; top: 0 !important; z-index: 30000 !important; }
  .mobile-menu-btn { position: relative !important; z-index: 30002 !important; isolation: isolate !important; }
  .mobile-user-avatar { position: relative !important; z-index: 30001 !important; }
  body.mobile-menu-open { overflow: hidden !important; }
}

/* V21.5.5: Dashboard-Liste komplett neu und unabhängig von alten Tabellen-/Kartenregeln */
.dashboard-today-jobs-v2155 { overflow: visible !important; max-height: none !important; }
.dashboard-today-list-v2155 { display: flex !important; flex-direction: column !important; gap: 10px !important; max-height: none !important; overflow: visible !important; }
.dashboard-today-row-v2155 { display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 16px !important; width: 100% !important; padding: 14px 16px !important; border: 1px solid rgba(17,24,39,.08) !important; border-radius: 16px !important; background: rgba(255,255,255,.78) !important; color: inherit !important; text-decoration: none !important; box-sizing: border-box !important; }
.dashboard-today-main-v2155 { min-width: 0 !important; display:flex !important; flex-direction:column !important; gap:4px !important; }
.dashboard-today-main-v2155 strong { font-size: 14px !important; color:#111827 !important; overflow-wrap:anywhere !important; }
.dashboard-today-main-v2155 span { font-size: 13px !important; color:#64748b !important; overflow-wrap:anywhere !important; }
.dashboard-today-meta-v2155 { flex:0 0 auto !important; display:flex !important; flex-direction:column !important; align-items:flex-end !important; gap:4px !important; font-size:12px !important; color:#475569 !important; }
.dashboard-today-meta-v2155 em { font-style:normal !important; font-weight:700 !important; color:#334155 !important; }
@media(max-width:780px){ .dashboard-today-row-v2155{align-items:flex-start!important;flex-direction:column!important;} .dashboard-today-meta-v2155{align-items:flex-start!important;} }

/* V21.5.5: Mobile-Menü endgültig entkoppeln - keine doppelten Touch/Pointer-Toggles */
.mobile-menu-btn { position: relative !important; z-index: 50010 !important; pointer-events: auto !important; touch-action: manipulation !important; }
.mobile-menu-btn span { pointer-events: none !important; }
@media(max-width:780px){
  .mobile-app-header { position: sticky !important; top:0 !important; z-index:50000 !important; }
  .mobile-sidebar-backdrop { position: fixed !important; inset:0 !important; z-index:49990 !important; opacity:0 !important; visibility:hidden !important; pointer-events:none !important; background:rgba(15,23,42,.46) !important; }
  body.mobile-menu-open .mobile-sidebar-backdrop { opacity:1 !important; visibility:visible !important; pointer-events:auto !important; }
  .sidebar { position:fixed !important; top:0 !important; left:0 !important; height:100dvh !important; max-height:100dvh !important; width:min(86vw,320px)!important; z-index:50005 !important; transform:translate3d(-110%,0,0)!important; visibility:hidden!important; opacity:0!important; transition:transform .22s ease,opacity .18s ease,visibility 0s linear .22s!important; pointer-events:auto!important; }
  body.mobile-menu-open .sidebar { transform:translate3d(0,0,0)!important; visibility:visible!important; opacity:1!important; transition:transform .22s ease,opacity .18s ease,visibility 0s!important; }
}

/* V21.6 Makeover: einheitliche Tabellen + finales Mobile-Menü */
.job-mobile-status { display: none; width: fit-content; margin-top: 7px; }
.dashboard-today-jobs-v216 { max-height: none !important; overflow: visible !important; }
.dashboard-today-table-wrap { max-height: none !important; overflow: visible !important; }
.dashboard-jobs-table { table-layout: auto !important; }
.dashboard-jobs-table th:nth-child(1){width:70px}.dashboard-jobs-table th:nth-child(2){width:160px}.dashboard-jobs-table th:nth-child(6){width:260px}

@media(max-width:780px){
  body{padding-top:64px!important;}
  .mobile-app-header{display:grid!important;position:fixed!important;top:0!important;left:0!important;right:0!important;z-index:70000!important;transform:translateZ(0)!important;}
  .mobile-menu-btn{position:relative!important;z-index:70002!important;pointer-events:auto!important;touch-action:manipulation!important;user-select:none!important;-webkit-tap-highlight-color:rgba(249,115,22,.25)!important;}
  .mobile-menu-btn span{pointer-events:none!important;}
  .mobile-user-avatar{position:relative!important;z-index:70001!important;}
  .mobile-sidebar-backdrop{display:block!important;position:fixed!important;inset:0!important;z-index:69990!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important;background:rgba(15,23,42,.46)!important;transition:opacity .18s ease,visibility 0s linear .18s!important;}
  body.mobile-menu-open .mobile-sidebar-backdrop{opacity:1!important;visibility:visible!important;pointer-events:auto!important;transition:opacity .18s ease,visibility 0s!important;}
  .sidebar{display:flex!important;flex-direction:column!important;position:fixed!important;top:0!important;left:0!important;bottom:auto!important;width:min(86vw,320px)!important;max-width:320px!important;height:100dvh!important;max-height:100dvh!important;padding:18px 14px 0!important;transform:translate3d(-110%,0,0)!important;visibility:hidden!important;opacity:0!important;transition:transform .22s ease,opacity .18s ease,visibility 0s linear .22s!important;z-index:70005!important;border-radius:0 22px 22px 0!important;box-shadow:24px 0 60px rgba(15,23,42,.28)!important;will-change:transform!important;pointer-events:auto!important;overflow:hidden!important;}
  body.mobile-menu-open .sidebar{transform:translate3d(0,0,0)!important;visibility:visible!important;opacity:1!important;transition:transform .22s ease,opacity .18s ease,visibility 0s!important;}
  body.mobile-menu-open{overflow:hidden!important;}
  .sidebar > div:first-child{overflow-y:auto!important;min-height:0!important;padding-bottom:12px!important;}
  .sidebar-user-logout-only{flex:0 0 auto!important;margin:0 -14px!important;padding:10px 14px calc(10px + env(safe-area-inset-bottom))!important;background:rgba(11,16,32,.98)!important;border-top:1px solid rgba(255,255,255,.12)!important;}
  .sidebar-user-logout-only .app-version{margin-bottom:6px!important;}

  body.dashboard-page .tasks-table-wrap,
  body.aftercare-page .tasks-table-wrap,
  body.jobs-page .tasks-table-wrap,
  body.tasks-page .tasks-table-wrap{overflow:visible!important;}

  body.dashboard-page .tasks-table,
  body.aftercare-page .tasks-table,
  body.jobs-page .tasks-table,
  body.tasks-page .tasks-table{min-width:0!important;width:100%!important;border-collapse:separate!important;border-spacing:0 12px!important;}

  body.dashboard-page .tasks-table thead,
  body.aftercare-page .tasks-table thead,
  body.jobs-page .tasks-table thead,
  body.tasks-page .tasks-table thead{display:none!important;}

  body.dashboard-page .tasks-table tbody,
  body.dashboard-page .tasks-table tr,
  body.aftercare-page .tasks-table tbody,
  body.aftercare-page .tasks-table tr,
  body.jobs-page .tasks-table tbody,
  body.jobs-page .tasks-table tr,
  body.tasks-page .tasks-table tbody,
  body.tasks-page .tasks-table tr{display:block!important;width:100%!important;}

  body.dashboard-page .tasks-table tr,
  body.aftercare-page .tasks-table tr,
  body.jobs-page .tasks-table tr,
  body.tasks-page .tasks-table tr{background:#fff!important;border:1px solid rgba(17,24,39,.08)!important;border-radius:18px!important;box-shadow:0 10px 26px rgba(15,23,42,.07)!important;padding:12px!important;margin-bottom:12px!important;}

  body.dashboard-page .tasks-table td,
  body.aftercare-page .tasks-table td,
  body.jobs-page .tasks-table td,
  body.tasks-page .tasks-table td{display:grid!important;grid-template-columns:112px minmax(0,1fr)!important;gap:10px!important;align-items:start!important;width:auto!important;min-width:0!important;padding:8px 0!important;border:0!important;background:transparent!important;}

  body.dashboard-page .tasks-table td::before,
  body.aftercare-page .tasks-table td::before,
  body.jobs-page .tasks-table td::before,
  body.tasks-page .tasks-table td::before{content:attr(data-label);color:#64748b;font-size:12px;font-weight:850;text-transform:uppercase;letter-spacing:.03em;line-height:1.35;}

  body.jobs-page .jobs-table td.job-category-cell,
  body.jobs-page .jobs-table td.price-cell,
  body.jobs-page .jobs-table td.google-sync-cell{display:none!important;}
  body.jobs-page .jobs-table td.job-actions-cell{display:flex!important;}
  body.jobs-page .job-actions-cell::before{flex:0 0 112px!important;}
  body.jobs-page .job-mobile-status,
  body.dashboard-page .job-mobile-status{display:inline-flex!important;}
  body.dashboard-page .dashboard-jobs-table .job-category-cell{display:none!important;}

  body.dashboard-page .jobs-table-panel,
  body.aftercare-page .aftercare-table-panel,
  body.jobs-page .jobs-table-panel,
  body.tasks-page .tasks-table-panel{padding:10px!important;border-radius:18px!important;}

  body.aftercare-page .form-panel-wide{padding:14px!important;border-radius:18px!important;}
  body.aftercare-page .form-grid,
  body.aftercare-page .form-grid-3{display:grid!important;grid-template-columns:1fr!important;gap:12px!important;}
  body.aftercare-page .checkbox-row{display:grid!important;gap:10px!important;}
  body.aftercare-page .live-results{max-height:260px!important;overflow:auto!important;}
  body.aftercare-page .actions-cell{display:flex!important;flex-wrap:wrap!important;gap:8px!important;}
  body.aftercare-page .actions-cell::before{flex:0 0 112px!important;}
  body.aftercare-page .quick-job-status-form select{width:100%!important;min-height:42px!important;}
}

/* V21.8: Nachkontrollen als eigene Auftragsliste + mobil nur Status-Anzeige */
.aftercare-jobs-table th:nth-child(1){width:70px}
.aftercare-jobs-table th:nth-child(2){width:150px}
.aftercare-jobs-table th:nth-child(6){width:230px}
.aftercare-jobs-table th:nth-child(7){width:100px}
.aftercare-jobs-table th:nth-child(8){width:220px}
@media(max-width:780px){
  body.aftercare-page .aftercare-jobs-table td.job-category-cell,
  body.aftercare-page .aftercare-jobs-table td.google-sync-cell{display:none!important;}
  body.aftercare-page .aftercare-jobs-table .job-mobile-status{display:inline-flex!important;}
  body.aftercare-page .aftercare-status-form{display:none!important;}
  body.aftercare-page .aftercare-jobs-table td.job-actions-cell{display:flex!important;align-items:center!important;}
  body.aftercare-page .aftercare-jobs-table .job-actions-cell::before{flex:0 0 112px!important;}
}

/* V22 Clean: Nachkontrollen als echte Auftragslisten-Kopie + robuste Abhol-Farben */
.aftercare-create-panel[hidden]{display:none!important;}
.aftercare-filter-grid .btn-task-orange{white-space:nowrap;}
.aftercare-jobs-table td:first-child strong{white-space:nowrap;}
@media(max-width:780px){
  body.aftercare-page .aftercare-filter-grid{grid-template-columns:1fr!important;}
  body.aftercare-page .aftercare-create-panel{margin-bottom:14px!important;}
  body.aftercare-page .aftercare-status-form{display:none!important;}
  body.aftercare-page .aftercare-jobs-table td.job-category-cell,
  body.aftercare-page .aftercare-jobs-table td.google-sync-cell{display:none!important;}
  body.aftercare-page .aftercare-jobs-table .job-mobile-status{display:inline-flex!important;}
}

/* V22.1: Fälligkeit nach geplanter Abholung: gestern/früher rot, heute orange, morgen/Zukunft grün */
.due-future strong,
.due-future .due-hint {
    color: #059669;
}

/* V22.1: Nachkontrollen optisch stärker an die Auftragsliste angleichen */
.aftercare-table-panel {
    overflow: hidden;
}
.aftercare-jobs-table {
    table-layout: auto;
}
.aftercare-jobs-table th:nth-child(1),
.aftercare-jobs-table th:nth-child(2),
.aftercare-jobs-table th:nth-child(3),
.aftercare-jobs-table th:nth-child(4),
.aftercare-jobs-table th:nth-child(5),
.aftercare-jobs-table th:nth-child(6),
.aftercare-jobs-table th:nth-child(7),
.aftercare-jobs-table th:nth-child(8) {
    width: auto;
}
@media (min-width: 769px) {
    .aftercare-jobs-table th:nth-child(1) { width: 76px; }
    .aftercare-jobs-table th:nth-child(2) { width: 150px; }
    .aftercare-jobs-table th:nth-child(6) { width: 250px; }
    .aftercare-jobs-table th:nth-child(7) { width: 100px; }
    .aftercare-jobs-table th:nth-child(8) { width: 220px; }
}

/* V22.2: Tabellen-Finish Aufträge + Nachkontrollen einheitlich */
@media (min-width: 781px) {
  body.aftercare-page .content > .tasks-head-modern,
  body.aftercare-page .content > .tasks-filter-modern,
  body.aftercare-page .content > .tasks-table-panel { margin-left:30px!important; margin-right:30px!important; }
  body.aftercare-page .content > .tasks-head-modern { margin-top:28px!important; }
  body.aftercare-page .tasks-table-panel.glass,
  body.aftercare-page .tasks-table-panel,
  body.aftercare-page .jobs-table-panel,
  body.aftercare-page .aftercare-table-panel { padding:0!important; overflow:hidden!important; border-radius:14px!important; background:#fff!important; border:1px solid rgba(17,24,39,.08)!important; box-shadow:0 10px 28px rgba(15,23,42,.06)!important; backdrop-filter:none!important; margin-top:0!important; }
  body.aftercare-page .tasks-table-wrap { width:100%!important; overflow-x:auto!important; }
  body.aftercare-page .tasks-table,
  body.aftercare-page .aftercare-jobs-table { width:100%!important; min-width:1280px!important; border-collapse:separate!important; border-spacing:0!important; }
  body.aftercare-page .tasks-table th,
  body.aftercare-page .aftercare-jobs-table th { padding:14px 18px!important; background:#fff!important; border-bottom:1px solid rgba(17,24,39,.08)!important; font-size:11px!important; text-transform:uppercase!important; letter-spacing:.04em!important; color:#64748b!important; font-weight:800!important; text-align:left!important; white-space:nowrap!important; }
  body.aftercare-page .tasks-table td,
  body.aftercare-page .aftercare-jobs-table td { padding:17px 18px!important; border-bottom:1px solid rgba(17,24,39,.07)!important; background:#fff!important; vertical-align:middle!important; text-align:left!important; font-size:14px!important; }
  body.aftercare-page .tasks-table tr:hover td,
  body.aftercare-page .aftercare-jobs-table tr:hover td { background:#fbfdff!important; }
  body.aftercare-page .tasks-table tr:last-child td,
  body.aftercare-page .aftercare-jobs-table tr:last-child td { border-bottom:0!important; }
  body.aftercare-page .task-cell { min-width:280px!important; width:27%!important; }
  body.aftercare-page .task-cell strong,
  body.aftercare-page .customer-cell strong,
  body.aftercare-page .due-cell strong,
  body.aftercare-page .price-cell strong,
  body.aftercare-page .job-category-cell strong { display:block!important; color:#111827!important; font-size:14px!important; font-weight:750!important; margin-bottom:5px!important; }
  body.aftercare-page .task-cell span,
  body.aftercare-page .customer-cell span,
  body.aftercare-page .due-cell span,
  body.aftercare-page .price-cell span { display:block!important; margin-top:5px!important; color:#64748b!important; font-size:13px!important; line-height:1.25!important; }
  body.aftercare-page .vehicle-cell { min-width:150px!important; color:#1f2937!important; font-weight:650!important; }
  body.aftercare-page .status-badge { display:inline-flex!important; padding:7px 11px!important; border-radius:8px!important; font-size:12px!important; font-weight:900!important; white-space:nowrap!important; }
  body.aftercare-page .planned-completion-label { display:block!important; color:#64748b!important; font-size:13px!important; margin-top:5px!important; white-space:nowrap!important; }
  body.aftercare-page .tasks-table-footer { padding:13px 18px!important; color:#64748b!important; border-top:1px solid rgba(17,24,39,.07)!important; background:#fff!important; }
  body.jobs-page .tasks-table td.actions-cell,
  body.jobs-page .tasks-table td.job-actions-cell,
  body.aftercare-page .tasks-table td.actions-cell,
  body.aftercare-page .tasks-table td.job-actions-cell { display:table-cell!important; vertical-align:middle!important; white-space:nowrap!important; min-width:290px!important; }
  body.jobs-page .actions-cell > *, body.jobs-page .job-actions-cell > *, body.aftercare-page .actions-cell > *, body.aftercare-page .job-actions-cell > * { vertical-align:middle!important; margin-right:7px!important; }
  body.jobs-page .actions-cell > *:last-child, body.jobs-page .job-actions-cell > *:last-child, body.aftercare-page .actions-cell > *:last-child, body.aftercare-page .job-actions-cell > *:last-child { margin-right:0!important; }
  body.aftercare-page .icon-btn { width:36px!important; height:36px!important; min-width:36px!important; padding:0!important; border-radius:9px!important; border:1px solid rgba(17,24,39,.10)!important; background:#fff!important; color:#334155!important; display:inline-grid!important; place-items:center!important; cursor:pointer!important; font-weight:900!important; font-size:16px!important; box-shadow:none!important; }
  body.aftercare-page .icon-btn:hover { background:#fff7ed!important; color:#ea580c!important; }
  body.aftercare-page .icon-btn.danger { color:#f97316!important; }
  body.aftercare-page .quick-job-status-form { display:inline-flex!important; }
  body.aftercare-page .quick-job-status-form select { height:36px!important; min-width:132px!important; border-radius:9px!important; border:1px solid rgba(17,24,39,.10)!important; background:#fff!important; font-size:12px!important; font-weight:750!important; padding:6px 28px 6px 10px!important; box-shadow:none!important; }
  body.aftercare-page .quick-job-status-form select:hover { background:#fff7ed!important; border-color:rgba(249,115,22,.35)!important; }
}
@media (max-width:780px) {
  body.aftercare-page .tasks-table-wrap { overflow:visible!important; }
  body.aftercare-page .tasks-table,
  body.aftercare-page .aftercare-jobs-table { min-width:0!important; width:100%!important; border-collapse:separate!important; border-spacing:0 12px!important; }
  body.aftercare-page .tasks-table thead,
  body.aftercare-page .aftercare-jobs-table thead { display:none!important; }
  body.aftercare-page .tasks-table tbody, body.aftercare-page .aftercare-jobs-table tbody,
  body.aftercare-page .tasks-table tr, body.aftercare-page .aftercare-jobs-table tr { display:block!important; width:100%!important; }
  body.aftercare-page .tasks-table tr,
  body.aftercare-page .aftercare-jobs-table tr { background:#fff!important; border:1px solid rgba(17,24,39,.08)!important; border-radius:18px!important; box-shadow:0 10px 26px rgba(15,23,42,.07)!important; padding:12px!important; margin-bottom:12px!important; }
  body.aftercare-page .tasks-table td,
  body.aftercare-page .aftercare-jobs-table td { display:grid!important; grid-template-columns:118px minmax(0,1fr)!important; gap:10px!important; align-items:start!important; width:auto!important; min-width:0!important; padding:8px 0!important; border:0!important; background:transparent!important; }
  body.aftercare-page .tasks-table td::before,
  body.aftercare-page .aftercare-jobs-table td::before { content:attr(data-label)!important; color:#64748b!important; font-size:12px!important; font-weight:850!important; text-transform:uppercase!important; letter-spacing:.03em!important; line-height:1.35!important; }
  body.aftercare-page .actions-cell,
  body.aftercare-page .job-actions-cell { display:flex!important; flex-wrap:wrap!important; white-space:normal!important; gap:8px!important; }
  body.aftercare-page .actions-cell::before,
  body.aftercare-page .job-actions-cell::before { flex:0 0 118px!important; }
  body.aftercare-page .quick-job-status-form { display:none!important; }
}

/* V22.3: Filter einzeilig + Nachkontrollen-Schrift wieder wie Aufträge */
@media (min-width: 1101px) {
  body.jobs-page .jobs-filter-modern-grid,
  body.aftercare-page .aftercare-filter-grid {
    display: grid !important;
    grid-template-columns: max-content 150px 185px 150px 170px minmax(320px, 1fr) max-content !important;
    gap: 10px !important;
    align-items: center !important;
    width: 100% !important;
  }
  body.jobs-page .jobs-filter-modern-grid .btn,
  body.aftercare-page .aftercare-filter-grid .btn {
    white-space: nowrap !important;
    min-width: max-content !important;
  }
  body.jobs-page .jobs-filter-modern-grid select[name="sort"],
  body.aftercare-page .aftercare-filter-grid select[name="sort"] {
    max-width: 170px !important;
    width: 170px !important;
  }
  body.jobs-page .jobs-filter-modern-grid input[name="q"],
  body.aftercare-page .aftercare-filter-grid input[name="q"] {
    min-width: 320px !important;
    width: 100% !important;
  }
  body.jobs-page .jobs-filter-modern-grid button[type="submit"],
  body.aftercare-page .aftercare-filter-grid button[type="submit"] {
    justify-self: end !important;
  }
}
@media (min-width: 901px) and (max-width: 1100px) {
  body.jobs-page .jobs-filter-modern-grid,
  body.aftercare-page .aftercare-filter-grid {
    grid-template-columns: max-content 1fr 1fr 170px !important;
  }
  body.jobs-page .jobs-filter-modern-grid input[name="q"],
  body.aftercare-page .aftercare-filter-grid input[name="q"] {
    grid-column: 1 / span 3 !important;
  }
  body.jobs-page .jobs-filter-modern-grid button[type="submit"],
  body.aftercare-page .aftercare-filter-grid button[type="submit"] {
    grid-column: 4 !important;
  }
}

@media (min-width: 781px) {
  body.aftercare-page .aftercare-jobs-table,
  body.aftercare-page .aftercare-jobs-table th,
  body.aftercare-page .aftercare-jobs-table td,
  body.aftercare-page .aftercare-jobs-table a,
  body.aftercare-page .aftercare-jobs-table span,
  body.aftercare-page .aftercare-jobs-table strong,
  body.aftercare-page .aftercare-jobs-table select,
  body.aftercare-page .aftercare-jobs-table button {
    font-weight: 400 !important;
  }
  body.aftercare-page .aftercare-jobs-table thead th {
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 650 !important;
    text-transform: uppercase !important;
    letter-spacing: .04em !important;
  }
  body.aftercare-page .aftercare-jobs-table .task-cell strong,
  body.aftercare-page .aftercare-jobs-table .customer-cell strong,
  body.aftercare-page .aftercare-jobs-table .due-cell strong,
  body.aftercare-page .aftercare-jobs-table .job-category-cell strong,
  body.aftercare-page .aftercare-jobs-table .vehicle-cell {
    font-weight: 500 !important;
  }
  body.aftercare-page .aftercare-jobs-table .status-badge,
  body.aftercare-page .aftercare-jobs-table .sync-badge {
    font-weight: 650 !important;
  }
  body.aftercare-page .aftercare-jobs-table .quick-job-status-form select {
    font-weight: 500 !important;
  }
}

/* V22.4: Mobile Status nur anzeigen + AJAX-Filter ohne Button */
@media (max-width: 780px) {
  body.jobs-page .quick-job-status-form { display: none !important; }
  body.jobs-page .job-actions-cell { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; }
  body.jobs-page .job-actions-cell::before { flex: 0 0 112px !important; }
}
body.jobs-page .jobs-filter-modern-grid button[type="submit"],
body.aftercare-page .aftercare-filter-grid button[type="submit"] {
  display: none !important;
}
.tasks-table-panel.is-loading {
  opacity: .62;
  pointer-events: none;
  transition: opacity .15s ease;
}

/* V22.15 Push/Badge */
.fineart-notification-badge{position:fixed;right:18px;bottom:18px;z-index:9999;min-width:28px;height:28px;padding:0 8px;border-radius:999px;background:#ef4444;color:#fff;font-weight:800;font-size:13px;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 10px 30px rgba(0,0,0,.25);border:2px solid rgba(255,255,255,.85)}
.fineart-notification-badge.hidden{display:none!important}
.permission-grid-mini{display:grid;gap:10px;margin-top:10px}
.permission-chip.is-disabled{opacity:.55}
@media (max-width:780px){.fineart-notification-badge{right:14px;bottom:14px}}

/* V24.1 Neuigkeiten-Glocke */
.fa-news-wrapper{position:relative;display:flex;align-items:center;justify-content:center}
.fa-news-bell{position:relative;border:1px solid rgba(148,163,184,.35);background:#fff;border-radius:999px;width:42px;height:42px;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 8px 22px rgba(15,23,42,.08)}
.fa-news-bell:hover{transform:translateY(-1px)}
.fa-news-bell-icon{font-size:18px;line-height:1}
.fa-news-badge{position:absolute;top:-5px;right:-5px;min-width:19px;height:19px;border-radius:999px;background:#dc2626;color:#fff;font-size:11px;font-weight:800;display:flex;align-items:center;justify-content:center;padding:0 5px;border:2px solid #fff}
.fa-news-badge.hidden{display:none}
.fa-news-dropdown{position:absolute;right:0;top:50px;width:min(360px,calc(100vw - 24px));max-height:70vh;background:#fff;border:1px solid rgba(148,163,184,.35);border-radius:18px;box-shadow:0 24px 70px rgba(15,23,42,.22);z-index:80;overflow:hidden}
.fa-news-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid rgba(148,163,184,.25)}
.fa-news-head button{border:0;background:transparent;font-size:24px;line-height:1;cursor:pointer;color:#64748b}
.fa-news-list{max-height:390px;overflow:auto;padding:6px}
.fa-news-item{display:block;text-decoration:none;color:inherit;border-radius:14px;padding:11px 12px;border:1px solid transparent}
.fa-news-item:hover{background:#f8fafc;border-color:#e2e8f0}
.fa-news-item.is-unread{background:#fff7ed;border-color:#fed7aa}
.fa-news-item strong{display:block;font-size:14px;margin-bottom:4px;color:#0f172a}
.fa-news-item p{margin:0 0 6px;color:#334155;font-size:13px;white-space:pre-line}
.fa-news-item span{font-size:12px;color:#64748b}
.fa-news-empty{padding:20px;text-align:center;color:#64748b;font-size:14px}
.fa-news-clear{width:calc(100% - 12px);margin:6px;border-radius:12px}
.mobile-app-header .fa-news-dropdown{right:-56px;top:48px}
@media (max-width:780px){.fa-news-bell{width:38px;height:38px}.fa-news-dropdown{position:fixed;right:12px;left:12px;top:68px;width:auto}.mobile-app-header .fa-news-dropdown{right:12px;left:12px;top:68px}}

/* V24.3 Mobile Header: Glocke + Profil bleiben in einer Zeile */
@media (max-width:780px){
  .mobile-app-header{
    display:grid!important;
    grid-template-columns:44px minmax(0,1fr) 38px 44px!important;
    gap:8px!important;
    align-items:center!important;
    flex-wrap:nowrap!important;
  }
  .mobile-app-header .mobile-top-search{min-width:0!important;width:100%!important;}
  .mobile-app-header .fa-news-wrapper{width:38px!important;min-width:38px!important;justify-self:center!important;}
  .mobile-app-header .fa-news-bell{width:38px!important;height:38px!important;min-width:38px!important;}
  .mobile-app-header .mobile-user-avatar{width:44px!important;height:44px!important;min-width:44px!important;justify-self:end!important;grid-column:auto!important;}
}


/* V24.4: Mobile Header stabil mit Glocke + Profil in einer Zeile */
@media (max-width:780px){
  .mobile-app-header{
    grid-template-columns:44px minmax(0,1fr) 40px 40px !important;
    gap:8px !important;
    align-items:center !important;
    height:64px !important;
  }
  .mobile-app-header .fa-news-wrapper,
  .mobile-app-header .mobile-user-avatar{
    width:40px !important;
    height:40px !important;
    min-width:40px !important;
    flex:0 0 40px !important;
  }
  .mobile-app-header .fa-news-bell{
    width:40px !important;
    height:40px !important;
    border-radius:14px !important;
  }
  .mobile-app-header .mobile-user-avatar{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    grid-column:auto !important;
    justify-self:end !important;
  }
  .mobile-app-header .mobile-top-search{
    min-width:0 !important;
  }
}

/* V24.4: Dashboard-Status optisch wie Auftragsmenü, kein hässlicher Dropdown-/Button-Look auf Handy */
body.dashboard-page .job-mobile-status{
  display:none;
}
body.dashboard-page .status-badge,
body.dashboard-page .job-mobile-status{
  align-items:center;
  justify-content:center;
  min-width:88px;
  padding:7px 10px;
  border-radius:10px;
  font-size:12px;
  font-weight:850;
  line-height:1.2;
  white-space:nowrap;
  border:0;
  box-shadow:none;
}
@media(max-width:780px){
  body.dashboard-page .job-mobile-status{
    display:inline-flex !important;
    width:fit-content !important;
    margin-top:7px !important;
  }
}

/* V24.5: Mobile Auftrag-Anlage - kein seitlicher Überlauf, Positionen als Handy-Karte */
@media (max-width: 860px) {
  html, body { max-width:100% !important; overflow-x:hidden !important; }
  body.job_create-page .app-main, body.job_edit-page .app-main,
  body.job_create-page main, body.job_edit-page main,
  body.job_create-page form, body.job_edit-page form,
  body.job_create-page .content, body.job_edit-page .content,
  body.job_create-page .card, body.job_edit-page .card,
  body.job_create-page .form-grid, body.job_edit-page .form-grid {
    max-width:100% !important; min-width:0 !important; overflow-x:hidden !important; box-sizing:border-box !important;
  }
  body.job_create-page .form-grid, body.job_edit-page .form-grid {
    display:grid !important; grid-template-columns:minmax(0,1fr) !important; gap:14px !important;
  }
  body.job_create-page .form-grid > *, body.job_edit-page .form-grid > *,
  body.job_create-page input, body.job_create-page select, body.job_create-page textarea,
  body.job_edit-page input, body.job_edit-page select, body.job_edit-page textarea {
    max-width:100% !important; min-width:0 !important; box-sizing:border-box !important;
  }
  body.job_create-page .customer-edit-actions, body.job_edit-page .customer-edit-actions,
  body.job_create-page .contact-quick-grid, body.job_edit-page .contact-quick-grid,
  body.job_create-page .price-input-row, body.job_edit-page .price-input-row {
    display:grid !important; grid-template-columns:minmax(0,1fr) !important; gap:10px !important;
  }
  body.job_create-page .positions-head, body.job_edit-page .positions-head {
    display:grid !important; grid-template-columns:minmax(0,1fr) !important; gap:12px !important;
  }
  body.job_create-page .position-action-buttons, body.job_edit-page .position-action-buttons {
    display:grid !important; grid-template-columns:1fr 1fr !important; gap:10px !important; width:100% !important;
  }
  body.job_create-page .position-action-buttons .btn, body.job_edit-page .position-action-buttons .btn {
    width:100% !important; min-height:46px !important; white-space:normal !important;
  }
  body.job_create-page .job-positions-box, body.job_edit-page .job-positions-box {
    padding:14px !important; border-radius:22px !important; overflow:hidden !important;
  }
  body.job_create-page .job-positions-box .position-row, body.job_edit-page .job-positions-box .position-row {
    display:grid !important; grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important; gap:10px !important;
    padding:12px !important; border:1px solid rgba(17,24,39,.08) !important; border-radius:18px !important;
    background:rgba(255,255,255,.72) !important; overflow:hidden !important;
  }
  body.job_create-page .job-positions-box .position-row select[name="position_service[]"],
  body.job_create-page .job-positions-box .position-row .position-free-input,
  body.job_create-page .job-positions-box .position-row textarea[name="position_description[]"],
  body.job_edit-page .job-positions-box .position-row select[name="position_service[]"],
  body.job_edit-page .job-positions-box .position-row .position-free-input,
  body.job_edit-page .job-positions-box .position-row textarea[name="position_description[]"] {
    grid-column:1 / -1 !important; width:100% !important; max-width:100% !important;
  }
  body.job_create-page .job-positions-box .position-row input[name="position_quantity[]"],
  body.job_create-page .job-positions-box .position-row input[name="position_unit[]"],
  body.job_create-page .job-positions-box .position-row input[name="position_price[]"],
  body.job_create-page .job-positions-box .position-row input[name="position_discount[]"],
  body.job_create-page .job-positions-box .position-row .position-tax-rate,
  body.job_create-page .job-positions-box .position-row .position-price-type,
  body.job_edit-page .job-positions-box .position-row input[name="position_quantity[]"],
  body.job_edit-page .job-positions-box .position-row input[name="position_unit[]"],
  body.job_edit-page .job-positions-box .position-row input[name="position_price[]"],
  body.job_edit-page .job-positions-box .position-row input[name="position_discount[]"],
  body.job_edit-page .job-positions-box .position-row .position-tax-rate,
  body.job_edit-page .job-positions-box .position-row .position-price-type {
    width:100% !important; max-width:none !important; text-align:left !important;
  }
  body.job_create-page .job-positions-box .position-row textarea[name="position_description[]"],
  body.job_edit-page .job-positions-box .position-row textarea[name="position_description[]"] {
    min-height:92px !important; height:auto !important;
  }
  body.job_create-page .job-positions-box .position-row .remove-position-row,
  body.job_edit-page .job-positions-box .position-row .remove-position-row {
    grid-column:1 / -1 !important; width:100% !important; max-width:none !important; height:44px !important; justify-self:stretch !important;
  }
  body.job_create-page .followup-box .followup-quick-actions, body.job_edit-page .followup-box .followup-quick-actions,
  body.job_create-page .form-actions, body.job_edit-page .form-actions {
    display:grid !important; grid-template-columns:1fr !important; gap:10px !important;
  }
}

/* V24.6: Kundensuche mobil/desktop stabil mit echter Backend-Suche */
.customer-autocomplete { grid-template-columns: minmax(0,1fr); }
.customer-results { right: 0; }
.customer-result-empty { padding: 14px 16px; color: #64748b; }
.customer-result-title { font-weight: 800; color: #111827; }
.customer-result-meta { color: #64748b; font-size: 13px; line-height: 1.35; }
@media (max-width: 760px) {
  .customer-picker-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .customer-picker-actions .btn { width: 100%; justify-content: center; }
  .customer-results {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 148px;
    max-height: min(62vh, 520px);
    z-index: 9999;
    border-radius: 22px;
  }
  .customer-result-item { padding: 16px; }
}

/* V24.9: Mobile Lexoffice-Flow für Kunden- und Positionsauswahl */
.mobile-flow-only { display: none; }
@media (max-width: 760px) {
  body.mobile-flow-lock { overflow: hidden; }
  .mobile-flow-only { display: block; }
  .customer-picker-box .customer-autocomplete { display: none !important; }
  .customer-picker-box .customer-picker-actions { gap: 8px; flex-wrap: wrap; }
  .mobile-customer-open {
    width: 100%; min-height: 58px; display: flex !important; flex-direction: column; align-items: flex-start; justify-content: center;
    border-radius: 16px; margin: 10px 0 8px; text-align: left;
  }
  .mobile-customer-open span { font-weight: 800; }
  .mobile-customer-open small { opacity: .78; font-size: 12px; margin-top: 3px; }
  .mobile-selected-customer {
    border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.045); border-radius: 16px; padding: 12px 13px; margin-bottom: 8px;
  }
  .mobile-selected-customer strong { display:block; font-size:15px; margin-bottom:3px; }
  .mobile-selected-customer span { display:block; color: var(--muted); font-size: 12px; line-height: 1.35; }

  .job-positions-box .position-rows { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
  .job-positions-box .positions-head { align-items: stretch; gap: 12px; }
  .job-positions-box .position-action-buttons { width: 100%; display: grid; grid-template-columns: 1fr; gap: 8px; }
  .job-positions-box .position-action-buttons .btn { width: 100%; justify-content: center; min-height: 46px; border-radius: 14px; }
  .mobile-position-cards { display: grid; gap: 10px; margin-top: 12px; }
  .mobile-position-card {
    display: grid; gap: 12px; padding: 13px; border-radius: 18px;
    background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.10);
  }
  .mobile-position-card strong { display:block; font-size: 15px; line-height: 1.25; margin-bottom: 4px; }
  .mobile-position-card span { display:block; color: var(--muted); font-size: 12px; }
  .mobile-position-card p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.35; white-space: pre-wrap; }
  .mobile-position-card-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
  .mobile-position-card-actions .btn { flex: 1; justify-content: center; }

  .mobile-flow-overlay {
    position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: opacity .18s ease;
  }
  .mobile-flow-overlay.is-open { opacity: 1; pointer-events: auto; }
  .mobile-flow-shell {
    position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr;
    background: var(--bg, #111827); color: var(--text, #f8fafc); transform: translateX(100%); transition: transform .22s ease;
  }
  .mobile-flow-overlay.is-open .mobile-flow-shell { transform: translateX(0); }
  .mobile-flow-head {
    min-height: 58px; display: grid; grid-template-columns: 46px 1fr 46px; align-items: center; gap: 8px;
    padding: max(8px, env(safe-area-inset-top)) 12px 8px; border-bottom: 1px solid rgba(255,255,255,.10);
    background: rgba(17,24,39,.98); position: sticky; top: 0; z-index: 2;
  }
  .mobile-flow-title { font-size: 17px; font-weight: 900; text-align: center; }
  .mobile-flow-back, .mobile-flow-close {
    appearance: none; border: 0; border-radius: 13px; height: 42px; background: rgba(255,255,255,.08); color: inherit; font-size: 30px; line-height: 1; display:grid; place-items:center;
  }
  .mobile-flow-close { font-size: 25px; }
  .mobile-flow-body { overflow: auto; padding: 14px 14px calc(22px + env(safe-area-inset-bottom)); }
  .mobile-flow-search-wrap { position: sticky; top: 0; z-index: 1; background: var(--bg, #111827); padding-bottom: 12px; }
  .mobile-flow-search, .mobile-position-editor input, .mobile-position-editor textarea, .mobile-position-editor select {
    width: 100%; max-width: 100%; box-sizing: border-box; border-radius: 15px; min-height: 48px; font-size: 16px;
  }
  .mobile-flow-search { padding: 0 14px; }
  .mobile-flow-actions { margin-bottom: 12px; }
  .mobile-flow-actions .btn { width: 100%; justify-content: center; min-height: 46px; }
  .mobile-flow-list { display: grid; gap: 9px; }
  .mobile-flow-list-item {
    width: 100%; appearance: none; border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.055); color: inherit;
    border-radius: 17px; padding: 13px; text-align: left; display: block;
  }
  .mobile-flow-list-item strong { display:block; font-size: 15px; line-height: 1.25; margin-bottom: 4px; }
  .mobile-flow-list-item span { display:block; color: var(--muted); font-size: 12px; line-height: 1.35; }
  .mobile-flow-empty { padding: 18px; border-radius: 16px; background: rgba(255,255,255,.045); color: var(--muted); text-align:center; }
  .mobile-flow-empty.inline { text-align:left; }
  .mobile-position-editor { display: grid; gap: 11px; }
  .mobile-position-editor label { font-weight: 800; font-size: 13px; margin-top: 4px; }
  .mobile-position-editor textarea { min-height: 150px; padding: 12px 14px; resize: vertical; }
  .mobile-editor-grid.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .mobile-flow-savebar { position: sticky; bottom: 0; padding: 12px 0 calc(6px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg, #111827) 75%, rgba(17,24,39,0)); }
  .mobile-flow-savebar .btn { width: 100%; justify-content: center; min-height: 50px; border-radius: 15px; }
}

/* V24.10: robuste mobile Vollbild-Auswahl Kunde/Positionen */
@media (max-width: 760px) {
  .mobile-flow-overlay,
  .mobile-flow-overlay * { box-sizing: border-box; }
  .mobile-flow-overlay { z-index: 2147483000 !important; }
  .mobile-flow-shell {
    background: #0f172a !important;
    color: #f8fafc !important;
  }
  .mobile-flow-body {
    display: block !important;
    min-height: 0 !important;
    background: #0f172a !important;
    color: #f8fafc !important;
  }
  .mobile-flow-search-wrap { background: #0f172a !important; }
  .mobile-flow-search,
  .mobile-position-editor input,
  .mobile-position-editor textarea,
  .mobile-position-editor select {
    display: block !important;
    width: 100% !important;
    color: #111827 !important;
    background: #ffffff !important;
    border: 1px solid rgba(148,163,184,.55) !important;
  }
  .mobile-flow-list { display: grid !important; gap: 9px !important; }
  .mobile-flow-list-item {
    display: block !important;
    color: #f8fafc !important;
    background: rgba(255,255,255,.08) !important;
    border-color: rgba(255,255,255,.16) !important;
  }
  .mobile-flow-list-item strong { color: #ffffff !important; }
  .mobile-flow-list-item span,
  .mobile-flow-empty { color: #cbd5e1 !important; }
}

/* V24.12: Mobile Kundenauswahl stabil - Suche immer oben sichtbar, keine Doppel-Overlays */
@media (max-width: 760px) {
  #fa_customer_pick_overlay.mobile-flow-overlay { z-index: 2147483600 !important; }
  #fa_customer_pick_overlay .mobile-flow-shell {
    background: #0f172a !important;
    color: #f8fafc !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
  }
  #fa_customer_pick_overlay .mobile-flow-head {
    position: relative !important;
    top: auto !important;
    z-index: 5 !important;
    background: #0f172a !important;
    border-bottom: 1px solid rgba(255,255,255,.12) !important;
  }
  #fa_customer_pick_overlay .mobile-flow-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    min-height: 0 !important;
    padding: 14px 14px calc(22px + env(safe-area-inset-bottom)) !important;
    background: #0f172a !important;
  }
  #fa_customer_pick_overlay .mobile-flow-search-wrap {
    display: block !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 4 !important;
    flex: 0 0 auto !important;
    padding: 0 0 10px !important;
    margin: 0 !important;
    background: #0f172a !important;
  }
  #fa_customer_pick_overlay .mobile-flow-search {
    display: block !important;
    width: 100% !important;
    min-height: 52px !important;
    padding: 0 15px !important;
    font-size: 16px !important;
    border-radius: 16px !important;
    color: #111827 !important;
    background: #fff !important;
    border: 1px solid rgba(148,163,184,.75) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  #fa_customer_pick_overlay .mobile-flow-actions { flex: 0 0 auto !important; margin: 0 !important; }
  #fa_customer_pick_overlay .mobile-flow-list { display: grid !important; gap: 9px !important; flex: 1 1 auto !important; min-height: 0 !important; }
}

/* V24.13: mobile Kundenauswahl performant + keine riesigen Ergebnis-Karten */
@media (max-width: 760px) {
  #fa_customer_pick_overlay .mobile-flow-body {
    display: block !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  #fa_customer_pick_overlay .mobile-flow-search-wrap {
    position: sticky !important;
    top: 0 !important;
    z-index: 20 !important;
    display: block !important;
    padding: 14px 0 12px !important;
    margin: 0 !important;
    background: #0f172a !important;
  }
  #fa_customer_pick_overlay .mobile-flow-list {
    display: grid !important;
    grid-auto-rows: auto !important;
    align-content: start !important;
    align-items: start !important;
    gap: 9px !important;
    min-height: 0 !important;
    height: auto !important;
    flex: 0 0 auto !important;
  }
  #fa_customer_pick_overlay .mobile-flow-list-item {
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    padding: 14px 16px !important;
    border-radius: 18px !important;
    display: block !important;
  }
  #fa_customer_pick_overlay .mobile-flow-list-item strong {
    display: block !important;
    font-size: 16px !important;
    line-height: 1.25 !important;
    margin: 0 0 5px !important;
  }
  #fa_customer_pick_overlay .mobile-flow-list-item span {
    display: block !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    margin: 0 !important;
  }
  #fa_customer_load_more.fa-customer-load-more {
    width: 100% !important;
    min-height: 48px !important;
    margin: 12px 0 24px !important;
    justify-content: center !important;
  }
}


/* V24.14: Mobile Positionsauswahl performant wie Kundenauswahl */
@media (max-width: 760px) {
  #mobile_position_picker_overlay.mobile-flow-overlay,
  #mobile_position_detail_overlay.mobile-flow-overlay { z-index: 2147483500 !important; }
  #mobile_position_picker_overlay .mobile-flow-shell,
  #mobile_position_detail_overlay .mobile-flow-shell {
    background: #0f172a !important;
    color: #f8fafc !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
  }
  #mobile_position_picker_overlay .mobile-flow-head,
  #mobile_position_detail_overlay .mobile-flow-head {
    position: relative !important;
    top: auto !important;
    z-index: 5 !important;
    background: #0f172a !important;
    border-bottom: 1px solid rgba(255,255,255,.12) !important;
  }
  #mobile_position_picker_overlay .mobile-flow-body,
  #mobile_position_detail_overlay .mobile-flow-body {
    display: block !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    min-height: 0 !important;
    padding: 14px 14px calc(22px + env(safe-area-inset-bottom)) !important;
    background: #0f172a !important;
  }
  #mobile_position_picker_overlay .mobile-flow-search-wrap {
    position: sticky !important;
    top: 0 !important;
    z-index: 20 !important;
    display: block !important;
    padding: 0 0 12px !important;
    margin: 0 !important;
    background: #0f172a !important;
  }
  #mobile_position_picker_overlay .mobile-flow-search {
    display: block !important;
    width: 100% !important;
    min-height: 52px !important;
    padding: 0 15px !important;
    font-size: 16px !important;
    border-radius: 16px !important;
    color: #111827 !important;
    background: #fff !important;
    border: 1px solid rgba(148,163,184,.75) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  #mobile_position_picker_overlay .mobile-flow-list {
    display: grid !important;
    grid-auto-rows: auto !important;
    align-content: start !important;
    align-items: start !important;
    gap: 9px !important;
    min-height: 0 !important;
    height: auto !important;
  }
  #mobile_position_picker_overlay .mobile-flow-list-item {
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    padding: 14px 16px !important;
    border-radius: 18px !important;
    display: block !important;
  }
  #mobile_position_picker_overlay .mobile-flow-list-item strong {
    display: block !important;
    font-size: 16px !important;
    line-height: 1.25 !important;
    margin: 0 0 5px !important;
    color: #fff !important;
  }
  #mobile_position_picker_overlay .mobile-flow-list-item span {
    display: block !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    color: #cbd5e1 !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
  }
  #mobile_position_picker_overlay .mobile-free-position-btn {
    position: sticky !important;
    bottom: 0 !important;
    width: 100% !important;
    min-height: 50px !important;
    margin: 14px 0 0 !important;
    justify-content: center !important;
    border-radius: 16px !important;
  }
  #mobile_position_detail_overlay .mobile-position-editor {
    display: grid !important;
    gap: 12px !important;
  }
  #mobile_position_detail_overlay .mobile-position-editor textarea { min-height: 150px !important; }
}

/* V24.15: Mobile Leistungen stabil wie Kundenauswahl, ohne unteren Overlay-Balken */
@media (max-width: 760px) {
  #mobile_position_picker_overlay.mobile-flow-overlay { z-index: 2147483500 !important; }
  #mobile_position_picker_overlay .mobile-flow-shell {
    background: #0f172a !important;
    color: #f8fafc !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
  }
  #mobile_position_picker_overlay .mobile-flow-head {
    position: relative !important;
    top: auto !important;
    z-index: 5 !important;
    background: #0f172a !important;
    border-bottom: 1px solid rgba(255,255,255,.12) !important;
  }
  #mobile_position_picker_overlay .mobile-flow-body {
    display: block !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 14px 14px calc(22px + env(safe-area-inset-bottom)) !important;
    background: #0f172a !important;
  }
  #mobile_position_picker_overlay .mobile-flow-search-wrap {
    position: sticky !important;
    top: 0 !important;
    z-index: 20 !important;
    display: block !important;
    padding: 14px 0 12px !important;
    margin: 0 !important;
    background: #0f172a !important;
  }
  #mobile_position_picker_overlay .mobile-flow-search {
    display: block !important;
    width: 100% !important;
    min-height: 52px !important;
    padding: 0 15px !important;
    font-size: 16px !important;
    border-radius: 16px !important;
    color: #111827 !important;
    background: #fff !important;
    border: 1px solid rgba(148,163,184,.75) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  #mobile_position_picker_overlay .mobile-flow-actions {
    margin: 0 0 12px !important;
    padding: 0 !important;
    position: static !important;
    background: transparent !important;
  }
  #mobile_position_picker_overlay .mobile-free-position-btn {
    position: static !important;
    width: 100% !important;
    min-height: 48px !important;
    margin: 0 !important;
    justify-content: center !important;
    border-radius: 16px !important;
    background-image: none !important;
  }
  #mobile_position_picker_overlay .mobile-flow-list {
    display: grid !important;
    grid-auto-rows: auto !important;
    align-content: start !important;
    align-items: start !important;
    gap: 9px !important;
    min-height: 0 !important;
    height: auto !important;
    padding-bottom: 12px !important;
  }
  #mobile_position_picker_overlay .mobile-flow-list-item {
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    padding: 14px 16px !important;
    border-radius: 18px !important;
    display: block !important;
    text-align: left !important;
    transform: translateZ(0);
  }
  #mobile_position_picker_overlay .mobile-flow-list-item strong {
    display: block !important;
    font-size: 16px !important;
    line-height: 1.25 !important;
    margin: 0 0 5px !important;
    color: #fff !important;
  }
  #mobile_position_picker_overlay .mobile-flow-list-item span {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    color: #cbd5e1 !important;
  }
  #m_service_more.mobile-service-load-more {
    width: 100% !important;
    min-height: 48px !important;
    margin: 12px 0 24px !important;
    justify-content: center !important;
    position: static !important;
  }
}

/* V24.16: Leistungs-Auswahl Mobile stabil wie Kundensuche */
@media (max-width: 760px) {
  body.mobile-flow-lock { overflow: hidden !important; touch-action: none !important; }
  #mobile_position_picker_overlay.mobile-flow-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483500 !important;
    background: #0f172a !important;
    overflow: hidden !important;
  }
  #mobile_position_picker_overlay .mobile-flow-shell {
    position: absolute !important;
    inset: 0 !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    background: #0f172a !important;
    color: #f8fafc !important;
    overflow: hidden !important;
  }
  #mobile_position_picker_overlay .mobile-flow-head {
    position: relative !important;
    top: auto !important;
    z-index: 30 !important;
    background: #0f172a !important;
    border-bottom: 1px solid rgba(255,255,255,.12) !important;
  }
  #mobile_position_picker_overlay .mobile-flow-body {
    display: block !important;
    min-height: 0 !important;
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    padding: 14px 14px calc(22px + env(safe-area-inset-bottom)) !important;
    background: #0f172a !important;
  }
  #mobile_position_picker_overlay .mobile-flow-search-wrap {
    position: sticky !important;
    top: 0 !important;
    z-index: 25 !important;
    display: block !important;
    padding: 0 0 12px !important;
    margin: 0 !important;
    background: #0f172a !important;
  }
  #mobile_position_picker_overlay .mobile-flow-search {
    display: block !important;
    width: 100% !important;
    min-height: 52px !important;
    padding: 0 15px !important;
    font-size: 16px !important;
    line-height: 52px !important;
    border-radius: 16px !important;
    color: #111827 !important;
    background: #ffffff !important;
    border: 1px solid rgba(148,163,184,.75) !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: none !important;
  }
  #mobile_position_picker_overlay .mobile-service-actions,
  #mobile_position_picker_overlay .mobile-flow-actions {
    position: static !important;
    inset: auto !important;
    display: block !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  #mobile_position_picker_overlay .mobile-service-actions::before,
  #mobile_position_picker_overlay .mobile-service-actions::after,
  #mobile_position_picker_overlay .mobile-flow-actions::before,
  #mobile_position_picker_overlay .mobile-flow-actions::after {
    content: none !important;
    display: none !important;
  }
  #mobile_position_picker_overlay .mobile-free-position-btn {
    position: static !important;
    width: 100% !important;
    min-height: 48px !important;
    margin: 0 !important;
    justify-content: center !important;
    border-radius: 16px !important;
    background-image: none !important;
    box-shadow: none !important;
  }
  #mobile_position_picker_overlay .mobile-service-list,
  #mobile_position_picker_overlay .mobile-flow-list {
    display: grid !important;
    grid-auto-rows: auto !important;
    align-content: start !important;
    align-items: start !important;
    gap: 9px !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 0 12px !important;
    margin: 0 !important;
    overflow: visible !important;
  }
  #mobile_position_picker_overlay .mobile-flow-list-item {
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    padding: 14px 16px !important;
    border-radius: 18px !important;
    display: block !important;
    text-align: left !important;
    transform: translateZ(0) !important;
    contain: layout paint !important;
  }
  #mobile_position_picker_overlay .mobile-flow-list-item strong {
    display: block !important;
    font-size: 16px !important;
    line-height: 1.25 !important;
    margin: 0 0 5px !important;
    color: #ffffff !important;
  }
  #mobile_position_picker_overlay .mobile-flow-list-item span {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    color: #cbd5e1 !important;
  }
  #m_service_more.mobile-service-load-more {
    position: static !important;
    width: 100% !important;
    min-height: 48px !important;
    margin: 12px 0 24px !important;
    justify-content: center !important;
  }
}


/* V24.17: Rabatt/MwSt. in Positionen sauber auf Desktop + Mobile */
.job-positions-box .positions-total-discount-note { margin-top: 8px; }
@media (max-width: 860px) {
  body.job_create-page .job-positions-box .position-row input[name="position_discount[]"],
  body.job_create-page .job-positions-box .position-row .position-tax-rate,
  body.job_edit-page .job-positions-box .position-row input[name="position_discount[]"],
  body.job_edit-page .job-positions-box .position-row .position-tax-rate {
    width:100% !important; max-width:none !important; min-width:0 !important;
  }
  #mobile_position_detail_overlay .mobile-editor-grid.three {
    display:grid !important; grid-template-columns:1fr !important; gap:12px !important;
  }
}
@media (min-width: 861px) {
  .job-positions-box .position-row input[name="position_discount[]"],
  .job-positions-box .position-row .position-tax-rate {
    min-height: 38px;
  }
}

/* V24.18 Lexoffice-nahe Desktop-Positionen */
@media (min-width: 781px) {
  .job-positions-box { background:#fff !important; border-radius:14px !important; padding:18px 20px 0 !important; overflow:visible !important; }
  .positions-head { align-items:center !important; }
  .position-action-buttons { display:flex; gap:16px; align-items:center; justify-content:center; width:100%; margin:18px 0 24px; order:5; }
  .position-action-buttons .btn { border-radius:4px !important; min-height:36px !important; padding:8px 14px !important; font-weight:800 !important; background:#fff !important; }
  #add_position_row { color:#00965e !important; border-color:#20b26b !important; }
  #add_free_position_row, .positions-total-discount-trigger { color:#1f2937 !important; border-color:transparent !important; }
  .position-rows { gap:22px !important; }
  .position-row { position:relative; display:grid !important; grid-template-columns: 38px minmax(270px,1.7fr) 92px 126px 150px 92px 112px 78px 34px !important; grid-template-areas: "num article qty unit price discount total tax del" ". desc desc desc desc desc desc tax del" !important; gap:10px 8px !important; align-items:start !important; padding:0 0 18px 0 !important; border-bottom:0 !important; }
  .position-row::before { content: attr(data-row-number); grid-area:num; width:32px; height:32px; border-radius:50%; background:#f0f0f0; display:flex; align-items:center; justify-content:center; font-weight:800; color:#222; margin-top:16px; }
  .position-row select[name="position_service[]"] { display:none !important; }
  .position-row .position-free-input { grid-area:article; display:block !important; min-height:56px !important; padding:15px 12px !important; background:#fff !important; }
  .position-row .position-free-input::placeholder { color:#9ca3af; }
  .position-row textarea[name="position_description[]"] { grid-area:desc; min-height:78px !important; resize:vertical; }
  .position-row input[name="position_quantity[]"] { grid-area:qty; min-height:56px !important; text-align:right; }
  .position-row input[name="position_unit[]"] { grid-area:unit; min-height:56px !important; }
  .position-row input[name="position_price[]"] { grid-area:price; min-height:56px !important; text-align:right; }
  .position-row input[name="position_discount[]"] { grid-area:discount; min-height:56px !important; text-align:right; }
  .position-row .position-line-total { grid-area:total; font-weight:900; text-align:right; padding-top:18px; white-space:nowrap; color:#020617; }
  .position-row select[name="position_tax_rate[]"] { grid-area:tax; min-height:30px !important; border-radius:999px !important; background:#3f3f46 !important; color:#fff !important; border:0 !important; padding:4px 8px !important; font-size:12px !important; margin-top:17px; }
  .position-row select[name="position_price_type[]"] { display:none !important; }
  .position-row .remove-position-row { grid-area:del; width:32px !important; height:32px !important; margin-top:16px; background:transparent !important; color:#666 !important; }
  .position-autocomplete { position:absolute; z-index:50; background:#fff; border:1px solid rgba(15,23,42,.16); border-radius:12px; box-shadow:0 18px 45px rgba(15,23,42,.18); max-height:260px; overflow:auto; min-width:360px; display:none; }
  .position-autocomplete.is-open { display:block; }
  .position-autocomplete button { width:100%; display:block; text-align:left; padding:11px 13px; border:0; background:#fff; border-bottom:1px solid rgba(15,23,42,.07); cursor:pointer; }
  .position-autocomplete button:hover { background:#f8fafc; }
  .position-autocomplete strong { display:block; color:#0f172a; }
  .position-autocomplete span { display:block; color:#64748b; font-size:13px; margin-top:3px; }
  .positions-summary-bar { margin:20px -20px 0; background:#5b5b5b; color:#fff; min-height:86px; display:flex; justify-content:flex-end; align-items:stretch; border-radius:0 0 10px 10px; overflow:hidden; }
  .positions-summary-box { min-width:190px; padding:16px 26px; display:flex; flex-direction:column; justify-content:center; }
  .positions-summary-box.dark { background:#454545; }
  .positions-summary-box span { font-size:12px; font-weight:800; letter-spacing:.04em; }
  .positions-summary-box strong { font-size:28px; line-height:1.1; }
  .lexoffice-document-fields { margin-top:18px; display:grid !important; grid-template-columns:1fr !important; gap:14px !important; background:#fff; border:1px solid rgba(15,23,42,.08); border-radius:14px; padding:18px; }
  .document-field textarea, .document-field input { width:100%; }
  .beleg-price-switch { display:flex; gap:0; justify-content:flex-end; margin-bottom:12px; }
  .beleg-price-switch button { min-width:78px; min-height:40px; border:1px solid rgba(15,23,42,.25); background:#fff; font-weight:800; }
  .beleg-price-switch button.is-active { background:#f3f4f6; color:#111827; }
}


/* V24.19: PC-Auftragsdetails ab Block 3 sauber im Lexoffice-Aufbau neu strukturiert. Mobile bleibt beim Vollbild-Flow. */
@media (min-width: 781px) {
  body.job_create-page .lexoffice-positions-panel,
  body.job_edit-page .lexoffice-positions-panel {
    background:#fff !important;
    border:1px solid rgba(15,23,42,.10) !important;
    border-radius:16px !important;
    padding:18px 20px 0 !important;
    overflow:visible !important;
    box-shadow:0 10px 28px rgba(15,23,42,.06) !important;
  }
  .lexoffice-positions-header { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; margin-bottom:16px; }
  .lexoffice-positions-header h3 { margin:0 0 4px; font-size:18px; }
  .lexoffice-hidden-select, .position-service-hidden { position:absolute !important; left:-9999px !important; width:1px !important; height:1px !important; opacity:0 !important; pointer-events:none !important; }
  .beleg-price-switch { display:flex !important; gap:0 !important; justify-content:flex-end !important; margin:0 !important; }
  .beleg-price-switch button { min-width:86px; min-height:40px; border:1px solid rgba(15,23,42,.22); background:#fff; font-weight:800; cursor:pointer; }
  .beleg-price-switch button:first-child { border-radius:10px 0 0 10px; }
  .beleg-price-switch button:last-child { border-radius:0 10px 10px 0; margin-left:-1px; }
  .beleg-price-switch button.is-active { background:#f97316; border-color:#f97316; color:#fff; }
  .lexoffice-position-labels { display:grid; grid-template-columns:38px minmax(260px,1.6fr) 92px 126px 142px 92px 118px 76px 34px; gap:10px 8px; color:#64748b; font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.03em; padding:0 0 8px; }
  .position-rows { gap:0 !important; }
  .lexoffice-position-row { position:relative !important; display:grid !important; grid-template-columns:38px minmax(260px,1.6fr) 92px 126px 142px 92px 118px 76px 34px !important; grid-template-areas:"num article qty unit price discount total tax del" ". desc desc desc desc desc desc tax del" !important; gap:10px 8px !important; align-items:start !important; padding:0 0 18px 0 !important; margin:0 0 18px 0 !important; border:0 !important; border-bottom:1px solid rgba(15,23,42,.08) !important; background:transparent !important; overflow:visible !important; }
  .lexoffice-position-row::before { content:attr(data-row-number); grid-area:num; width:32px; height:32px; border-radius:50%; background:#f1f5f9; display:flex; align-items:center; justify-content:center; font-weight:900; color:#0f172a; margin-top:12px; }
  .lexoffice-position-row .lexoffice-article-input { grid-area:article; display:block !important; min-height:50px !important; padding:13px 12px !important; }
  .lexoffice-position-row textarea[name="position_description[]"] { grid-area:desc; min-height:76px !important; resize:vertical; }
  .lexoffice-position-row input[name="position_quantity[]"] { grid-area:qty; min-height:50px !important; text-align:right; }
  .lexoffice-position-row input[name="position_unit[]"] { grid-area:unit; min-height:50px !important; }
  .lexoffice-position-row input[name="position_price[]"] { grid-area:price; min-height:50px !important; text-align:right; }
  .lexoffice-position-row input[name="position_discount[]"] { grid-area:discount; min-height:50px !important; text-align:right; }
  .lexoffice-position-row .position-line-total { grid-area:total; font-weight:900; text-align:right; padding-top:15px; white-space:nowrap; color:#020617; }
  .lexoffice-position-row .position-tax-rate { grid-area:tax; width:76px !important; min-height:32px !important; border-radius:999px !important; background:#3f3f46 !important; color:#fff !important; border:0 !important; padding:4px 8px !important; font-size:12px !important; margin-top:10px; }
  .lexoffice-position-row .remove-position-row { grid-area:del; width:32px !important; height:32px !important; min-width:32px !important; margin-top:10px; background:transparent !important; color:#64748b !important; box-shadow:none !important; }
  .lexoffice-position-actions { display:flex !important; gap:10px; justify-content:flex-start; padding:2px 0 14px; }
  .lexoffice-position-actions .btn { min-height:40px; border-radius:10px; }
  .lexoffice-total-discount-row { display:flex; justify-content:flex-end; align-items:center; gap:12px; padding:10px 0 16px; }
  .lexoffice-total-discount-row label { margin:0; font-weight:800; }
  .total-discount-input { display:flex; align-items:center; gap:8px; }
  .total-discount-input input { width:90px !important; text-align:right; }
  .positions-summary-bar { margin:0 -20px 0; background:#5b5b5b; color:#fff; min-height:86px; display:flex; justify-content:flex-end; align-items:stretch; border-radius:0 0 14px 14px; overflow:hidden; }
  .positions-summary-box { min-width:170px; padding:16px 24px; display:flex; flex-direction:column; justify-content:center; }
  .positions-summary-box.dark { background:#454545; }
  .positions-summary-box span { font-size:12px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
  .positions-summary-box strong { font-size:25px; line-height:1.1; }
  .lexoffice-document-fields { margin-top:18px; display:grid !important; grid-template-columns:1fr !important; gap:14px !important; background:#fff; border:1px solid rgba(15,23,42,.08); border-radius:14px; padding:18px; }
  .lexoffice-autocomplete-menu { position:absolute; z-index:50; top:54px; left:48px; width:min(620px, calc(100vw - 120px)); max-height:330px; overflow:auto; background:#fff; border:1px solid rgba(15,23,42,.14); border-radius:12px; box-shadow:0 18px 50px rgba(15,23,42,.20); display:none; padding:6px; }
  .lexoffice-autocomplete-menu.is-open { display:block; }
  .lexoffice-autocomplete-menu button { width:100%; background:#fff; border:0; text-align:left; padding:10px 12px; border-radius:10px; cursor:pointer; color:#0f172a; display:flex; flex-direction:column; gap:2px; }
  .lexoffice-autocomplete-menu button:hover { background:#f8fafc; }
  .lexoffice-autocomplete-menu span { color:#64748b; font-size:12px; }
  .lexoffice-autocomplete-menu small { color:#475569; font-size:12px; line-height:1.35; }
}
@media (max-width: 780px) {
  .lexoffice-position-labels, .lexoffice-positions-header .beleg-price-switch, .positions-summary-bar, .lexoffice-total-discount-row { display:none !important; }
}


/* V24.21: Live-Aufträge Desktop zurück auf stabile V24.12-Positionsauswahl.
   Gilt nur für job_create.php / job_edit.php auf Desktop. Aufträge Test bleibt V24.19. Mobile bleibt Fullscreen-Flow. */
@media (min-width: 781px) {
  body.job_create-page .job-positions-box, body.job_edit-page .job-positions-box { background: rgba(255,255,255,.035) !important; border: 1px solid rgba(255,255,255,.08) !important; border-radius: 18px !important; padding: 16px !important; overflow: visible !important; }
  body.job_create-page .job-positions-box .positions-head, body.job_edit-page .job-positions-box .positions-head { align-items: flex-start !important; }
  body.job_create-page .job-positions-box .position-action-buttons, body.job_edit-page .job-positions-box .position-action-buttons { display: flex !important; gap: 8px !important; justify-content: flex-end !important; width: auto !important; margin: 0 !important; order: initial !important; }
  body.job_create-page .job-positions-box .position-action-buttons .btn, body.job_edit-page .job-positions-box .position-action-buttons .btn { border-radius: 999px !important; min-height: 34px !important; padding: 7px 12px !important; }
  body.job_create-page .job-positions-box .position-rows, body.job_edit-page .job-positions-box .position-rows { position: static !important; left: auto !important; width: auto !important; height: auto !important; overflow: visible !important; display: grid !important; gap: 10px !important; }
  body.job_create-page .job-positions-box .position-row, body.job_edit-page .job-positions-box .position-row { position: relative !important; display: grid !important; grid-template-columns: minmax(220px,1fr) minmax(320px,1.5fr) 72px 96px 110px 92px 42px !important; grid-template-areas: none !important; gap: 8px !important; align-items: start !important; padding: 0 !important; border-bottom: 0 !important; }
  body.job_create-page .job-positions-box .position-row::before, body.job_edit-page .job-positions-box .position-row::before { content: none !important; display: none !important; }
  body.job_create-page .job-positions-box .position-row select[name="position_service[]"], body.job_edit-page .job-positions-box .position-row select[name="position_service[]"] { display: block !important; grid-column: 1 !important; grid-area: auto !important; width: 100% !important; min-height: 42px !important; }
  body.job_create-page .job-positions-box .position-row:not(.is-free-position) .position-free-input, body.job_edit-page .job-positions-box .position-row:not(.is-free-position) .position-free-input { display: none !important; }
  body.job_create-page .job-positions-box .position-row.is-free-position select[name="position_service[]"], body.job_edit-page .job-positions-box .position-row.is-free-position select[name="position_service[]"] { display: none !important; }
  body.job_create-page .job-positions-box .position-row.is-free-position .position-free-input, body.job_edit-page .job-positions-box .position-row.is-free-position .position-free-input { display: block !important; grid-column: 1 !important; grid-area: auto !important; min-height: 42px !important; }
  body.job_create-page .job-positions-box .position-row textarea[name="position_description[]"], body.job_edit-page .job-positions-box .position-row textarea[name="position_description[]"] { display: block !important; grid-column: 2 !important; grid-area: auto !important; min-height: 42px !important; height: 42px !important; }
  body.job_create-page .job-positions-box .position-row input[name="position_quantity[]"], body.job_edit-page .job-positions-box .position-row input[name="position_quantity[]"] { grid-column: 3 !important; width: 72px !important; max-width: 72px !important; min-height: 42px !important; text-align: center !important; }
  body.job_create-page .job-positions-box .position-row input[name="position_unit[]"], body.job_edit-page .job-positions-box .position-row input[name="position_unit[]"] { grid-column: 4 !important; width: 96px !important; max-width: 96px !important; min-height: 42px !important; }
  body.job_create-page .job-positions-box .position-row input[name="position_price[]"], body.job_edit-page .job-positions-box .position-row input[name="position_price[]"] { grid-column: 5 !important; width: 110px !important; max-width: 110px !important; min-height: 42px !important; text-align: right !important; }
  body.job_create-page .job-positions-box .position-row select[name="position_price_type[]"], body.job_edit-page .job-positions-box .position-row select[name="position_price_type[]"] { display: block !important; grid-column: 6 !important; grid-area: auto !important; width: 92px !important; max-width: 92px !important; min-height: 42px !important; }
  body.job_create-page .job-positions-box .position-row .remove-position-row, body.job_edit-page .job-positions-box .position-row .remove-position-row { grid-column: 7 !important; grid-area: auto !important; width: 38px !important; min-width: 38px !important; height: 38px !important; justify-self: end !important; align-self: start !important; margin-top: 2px !important; }
}


/* V24.22 Aufträge: stabile Desktop-Positionszeile + Tabellenstandard */
@media (min-width: 781px) {
  body.job_create-page .job-positions-box,
  body.job_edit-page .job-positions-box {
    background:#fff !important;
    border:1px solid rgba(15,23,42,.10) !important;
    border-radius:18px !important;
    padding:18px !important;
    box-shadow:0 10px 28px rgba(15,23,42,.04) !important;
  }
  body.job_create-page .job-positions-box .positions-head,
  body.job_edit-page .job-positions-box .positions-head {
    align-items:flex-start !important;
    margin-bottom:16px !important;
  }
  body.job_create-page .job-positions-box .position-action-buttons,
  body.job_edit-page .job-positions-box .position-action-buttons {
    width:auto !important;
    margin:0 !important;
    justify-content:flex-end !important;
    gap:10px !important;
    order:initial !important;
  }
  body.job_create-page .job-positions-box .position-action-buttons .btn,
  body.job_edit-page .job-positions-box .position-action-buttons .btn {
    background:#fff !important;
    border:0 !important;
    box-shadow:none !important;
    padding:7px 10px !important;
    min-height:32px !important;
    font-weight:900 !important;
  }
  body.job_create-page #add_position_row,
  body.job_edit-page #add_position_row { color:#00965e !important; }
  body.job_create-page #add_free_position_row,
  body.job_edit-page #add_free_position_row { color:#0f172a !important; }
  body.job_create-page .job-positions-box .position-rows,
  body.job_edit-page .job-positions-box .position-rows {
    display:grid !important;
    gap:14px !important;
    overflow:visible !important;
  }
  body.job_create-page .job-positions-box .position-row,
  body.job_edit-page .job-positions-box .position-row {
    display:grid !important;
    grid-template-columns:minmax(220px,1.05fr) minmax(360px,1.7fr) 76px 120px 110px 100px 88px 90px 42px !important;
    grid-template-areas:"article desc qty unit price discount tax pricetype del" !important;
    gap:10px !important;
    align-items:start !important;
    padding:0 0 14px 0 !important;
    border-bottom:1px solid rgba(15,23,42,.07) !important;
  }
  body.job_create-page .job-positions-box .position-row::before,
  body.job_edit-page .job-positions-box .position-row::before { content:none !important; display:none !important; }
  body.job_create-page .job-positions-box .position-row select[name="position_service[]"],
  body.job_edit-page .job-positions-box .position-row select[name="position_service[]"] { grid-area:article !important; display:block !important; min-height:52px !important; }
  body.job_create-page .job-positions-box .position-row:not(.is-free-position) .position-free-input,
  body.job_edit-page .job-positions-box .position-row:not(.is-free-position) .position-free-input { display:none !important; }
  body.job_create-page .job-positions-box .position-row.is-free-position select[name="position_service[]"],
  body.job_edit-page .job-positions-box .position-row.is-free-position select[name="position_service[]"] { display:none !important; }
  body.job_create-page .job-positions-box .position-row.is-free-position .position-free-input,
  body.job_edit-page .job-positions-box .position-row.is-free-position .position-free-input { grid-area:article !important; display:block !important; min-height:52px !important; }
  body.job_create-page .job-positions-box .position-row textarea[name="position_description[]"],
  body.job_edit-page .job-positions-box .position-row textarea[name="position_description[]"] {
    grid-area:desc !important;
    min-height:96px !important;
    height:auto !important;
    resize:vertical !important;
    line-height:1.35 !important;
  }
  body.job_create-page .job-positions-box .position-row input[name="position_quantity[]"],
  body.job_edit-page .job-positions-box .position-row input[name="position_quantity[]"] { grid-area:qty !important; min-height:52px !important; text-align:center !important; }
  body.job_create-page .job-positions-box .position-row select[name="position_unit[]"],
  body.job_edit-page .job-positions-box .position-row select[name="position_unit[]"] { grid-area:unit !important; min-height:52px !important; }
  body.job_create-page .job-positions-box .position-row input[name="position_price[]"],
  body.job_edit-page .job-positions-box .position-row input[name="position_price[]"] { grid-area:price !important; min-height:52px !important; text-align:right !important; }
  body.job_create-page .job-positions-box .position-row input[name="position_discount[]"],
  body.job_edit-page .job-positions-box .position-row input[name="position_discount[]"] { grid-area:discount !important; min-height:52px !important; text-align:right !important; }
  body.job_create-page .job-positions-box .position-row select[name="position_tax_rate[]"],
  body.job_edit-page .job-positions-box .position-row select[name="position_tax_rate[]"] { grid-area:tax !important; min-height:52px !important; }
  body.job_create-page .job-positions-box .position-row select[name="position_price_type[]"],
  body.job_edit-page .job-positions-box .position-row select[name="position_price_type[]"] { grid-area:pricetype !important; display:block !important; min-height:52px !important; }
  body.job_create-page .job-positions-box .position-row .remove-position-row,
  body.job_edit-page .job-positions-box .position-row .remove-position-row { grid-area:del !important; width:38px !important; min-width:38px !important; height:38px !important; margin-top:7px !important; justify-self:end !important; }
}
@media (max-width: 1200px) and (min-width: 781px) {
  body.job_create-page .job-positions-box .position-row,
  body.job_edit-page .job-positions-box .position-row {
    grid-template-columns:minmax(200px,1fr) minmax(280px,1.3fr) 70px 110px 100px 90px 84px 88px 42px !important;
  }
}

/* V24.27 Dashboard: nur Optik, keine Filterlogik geändert */
body.dashboard-page .dashboard-jobs-table th:nth-child(1){width:70px!important;}
body.dashboard-page .dashboard-jobs-table th:nth-child(2){width:150px!important;}
body.dashboard-page .dashboard-jobs-table th:nth-child(4){width:120px!important;}
body.dashboard-page .dashboard-jobs-table th:nth-child(7){width:270px!important;}
body.dashboard-page .dashboard-jobs-table .job-status-cell .status-badge{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:max-content!important;
  padding:7px 11px!important;
  border-radius:8px!important;
  font-size:12px!important;
  font-weight:900!important;
  white-space:nowrap!important;
}
body.dashboard-page .dashboard-jobs-table .due-cell strong{
  display:block!important;
  color:#111827!important;
  font-size:14px!important;
  font-weight:750!important;
  margin-bottom:5px!important;
}
body.dashboard-page .dashboard-jobs-table .due-cell .due-hint{
  display:block!important;
  margin-top:4px!important;
  color:#16a34a!important;
  font-size:12px!important;
  font-weight:800!important;
  line-height:1.25!important;
}
body.dashboard-page .dashboard-jobs-table .due-cell .planned-completion-label{
  display:block!important;
  margin-top:4px!important;
  color:#64748b!important;
  font-size:13px!important;
  line-height:1.25!important;
}
body.dashboard-page .dashboard-jobs-table .dashboard-job-subtitle{
  display:block!important;
  margin-top:5px!important;
  color:#64748b!important;
  font-size:13px!important;
  line-height:1.25!important;
}
@media(max-width:780px){
  body.dashboard-page .dashboard-jobs-table .dashboard-job-subtitle{
    display:none!important;
  }
  body.dashboard-page .dashboard-jobs-table .job-status-cell{
    display:grid!important;
    grid-template-columns:112px minmax(0,1fr)!important;
    gap:10px!important;
    align-items:center!important;
  }
  body.dashboard-page .dashboard-jobs-table .job-status-cell .status-badge{
    position:static!important;
    margin:0!important;
    justify-self:start!important;
  }
  body.dashboard-page .dashboard-jobs-table .task-cell strong,
  body.dashboard-page .dashboard-jobs-table .customer-cell strong,
  body.dashboard-page .dashboard-jobs-table .due-cell strong{
    font-size:16px!important;
    line-height:1.25!important;
  }
}

/* V24.28 Dashboard PC: neue Dashboard-Infos mit gleicher, leichter Schrift wie Aufträge */
@media (min-width: 781px) {
  body.dashboard-page .dashboard-jobs-table .job-status-cell .status-badge{font-weight:500!important;}
  body.dashboard-page .dashboard-jobs-table .due-cell strong{font-weight:500!important;}
  body.dashboard-page .dashboard-jobs-table .due-cell .due-hint{font-weight:500!important;}
  body.dashboard-page .dashboard-jobs-table .due-cell .planned-completion-label{font-weight:400!important;}
  body.dashboard-page .dashboard-jobs-table .dashboard-job-subtitle{font-weight:400!important;}
}

/* V24.28 Nachkontrolle bearbeiten: eigene schlanke Bearbeitungsseite */
body.aftercare_edit-page .aftercare-edit-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;}
body.aftercare_edit-page .aftercare-readonly-box{background:#f8fafc;border:1px solid rgba(15,23,42,.08);border-radius:14px;padding:12px 14px;}
body.aftercare_edit-page .aftercare-readonly-box strong{display:block;font-weight:500;color:#111827;}
body.aftercare_edit-page .aftercare-readonly-box span{display:block;margin-top:3px;color:#64748b;font-size:13px;}

/* V25.2 Detailseiten: mobile Button-Leiste sauber umbrechen, damit „Zurück“ erreichbar bleibt */
@media (max-width: 780px) {
  .job-detail-page .print-view-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    justify-content: stretch !important;
    align-items: stretch !important;
    width: 100% !important;
  }
  .job-detail-page .print-view-actions .btn,
  .job-detail-page .print-view-actions form,
  .job-detail-page .print-view-actions button {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
    text-align: center !important;
  }
  .job-detail-page .print-view-actions form {
    display: block !important;
    grid-column: 1 / -1 !important;
  }
}

/* V25.3: einheitliche leichte Tabellen-/Dashboard-Optik wie Aufträge */
body.dashboard-page .dashboard-jobs-table .job-status-cell .status-badge{
  font-weight:500!important;
}
body.dashboard-page .dashboard-jobs-table .due-cell strong,
body.dashboard-page .dashboard-jobs-table .dashboard-customer-cell strong{
  font-weight:500!important;
  color:#111827!important;
}
body.dashboard-page .dashboard-jobs-table .due-cell .due-hint,
body.dashboard-page .dashboard-jobs-table .due-cell .planned-completion-label,
body.dashboard-page .dashboard-jobs-table .dashboard-customer-cell span{
  display:block!important;
  color:#64748b!important;
  font-size:13px!important;
  font-weight:400!important;
  line-height:1.28!important;
  margin-top:4px!important;
}
body.job_view-page .job-customer-address{
  margin:3px 0 0!important;
  font-size:13px!important;
  font-weight:400!important;
  color:#64748b!important;
}
body.prepared_events-page .tasks-table-panel.jobs-table-panel{
  overflow:hidden!important;
}
body.prepared_events-page .prepared-events-table th,
body.prepared_events-page .prepared-events-table td{
  font-weight:400!important;
}
body.prepared_events-page .prepared-events-table td strong{
  font-weight:500!important;
}
body.prepared_events-page .prepared-events-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  white-space:nowrap!important;
}
body.prepared_events-page .prepared-events-actions form{
  display:inline-flex!important;
  margin:0!important;
}
body.prepared_events-page .prepared-ignore-btn{
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  border-radius:9px!important;
  border:1px solid rgba(17,24,39,.10)!important;
  background:#fff!important;
  color:#f97316!important;
  font-weight:700!important;
  box-shadow:none!important;
}
body.prepared_events-page .tasks-table-footer{
  padding:13px 18px!important;
  color:#64748b!important;
  border-top:1px solid rgba(17,24,39,.07)!important;
  background:#fff!important;
  font-weight:400!important;
}
@media(max-width:780px){
  body.prepared_events-page .prepared-events-actions{
    justify-content:flex-start!important;
    flex-wrap:wrap!important;
  }
}

/* V25.4: AB-Livesuche in Auftragsdetails im bestehenden Stil */
.lexoffice-ab-live-search{align-items:flex-end;gap:12px;flex-wrap:wrap}
.lexoffice-ab-search-wrap{display:flex;flex-direction:column;gap:6px;min-width:min(100%,520px);flex:1}
.lexoffice-ab-search-wrap input,.lexoffice-ab-search-wrap select{width:100%;font-family:inherit;font-weight:400}
.lexoffice-ab-search-wrap select{min-height:152px}
@media (max-width: 720px){.lexoffice-ab-live-search{display:flex;flex-direction:column;align-items:stretch}.lexoffice-ab-search-wrap{min-width:100%}}

/* V25.13 Auftragsdateien + Fahrzeugannahme */
.fineart-upload-form {
    display: grid;
    gap: 12px;
}
.fineart-upload-form input[type="file"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 12px;
    background: rgba(255,255,255,.85);
    font: inherit;
    font-weight: 400;
}
.fineart-upload-form textarea,
.fineart-upload-form input[type="text"] {
    font-weight: 400;
}
.vehicle-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.vehicle-photo-card {
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 16px;
    background: rgba(255,255,255,.86);
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(15,23,42,.06);
}
.vehicle-photo-card img,
.vehicle-file-placeholder {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #64748b;
    font-size: 13px;
    font-weight: 400;
}
.vehicle-photo-meta {
    padding: 10px 12px 12px;
    display: grid;
    gap: 6px;
}
.vehicle-photo-meta strong {
    font-size: 13px;
    font-weight: 500;
    color: #0f172a;
    word-break: break-word;
}
.vehicle-photo-meta span {
    font-size: 12px;
    font-weight: 400;
    color: #64748b;
}
@media (max-width: 720px) {
    .vehicle-photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .vehicle-photo-card img,
    .vehicle-file-placeholder {
        height: 128px;
    }
}


/* V25.14 Fahrzeugannahme: Tabellen-/Listenstil wie Aufträge, mobile Werkstatt-Ansicht sauber */
body.vehicle_acceptance-page .content > .tasks-head-modern,
body.vehicle_acceptance-page .content > .tasks-filter-modern,
body.vehicle_acceptance-page .content > .tasks-table-panel {
  margin-left: 30px !important;
  margin-right: 30px !important;
}
body.vehicle_acceptance-page .content > .tasks-head-modern { margin-top: 28px !important; }
body.vehicle_acceptance-page .tasks-table-panel.glass,
body.vehicle_acceptance-page .tasks-table-panel,
body.vehicle_acceptance-page .vehicle-acceptance-table-panel {
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  background: #fff !important;
  border: 1px solid rgba(17,24,39,.08) !important;
  box-shadow: 0 10px 28px rgba(15,23,42,.06) !important;
  backdrop-filter: none !important;
  margin-top: 0 !important;
}
body.vehicle_acceptance-page .tasks-table-wrap { width:100% !important; overflow-x:auto !important; }
body.vehicle_acceptance-page .tasks-table {
  width: 100% !important;
  min-width: 1180px !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}
body.vehicle_acceptance-page .tasks-table th {
  padding: 14px 18px !important;
  background: #fff !important;
  border-bottom: 1px solid rgba(17,24,39,.08) !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: .04em !important;
  color: #64748b !important;
  font-weight: 700 !important;
  text-align: left !important;
}
body.vehicle_acceptance-page .tasks-table td {
  padding: 17px 18px !important;
  border-bottom: 1px solid rgba(17,24,39,.07) !important;
  background: #fff !important;
  vertical-align: middle !important;
  text-align: left !important;
  font-weight: 400 !important;
}
body.vehicle_acceptance-page .tasks-table tr:hover td { background:#fbfdff !important; }
body.vehicle_acceptance-page .tasks-table tr:last-child td { border-bottom:0 !important; }
body.vehicle_acceptance-page .task-cell strong,
body.vehicle_acceptance-page .customer-cell strong,
body.vehicle_acceptance-page .due-cell strong,
body.vehicle_acceptance-page .vehicle-cell strong {
  display:block;
  color:#111827;
  font-size:14px;
  font-weight:600 !important;
  margin-bottom:5px;
}
body.vehicle_acceptance-page .task-cell span,
body.vehicle_acceptance-page .customer-cell span,
body.vehicle_acceptance-page .due-cell span,
body.vehicle_acceptance-page .vehicle-cell span,
body.vehicle_acceptance-page .vehicle-acceptance-state span + span {
  display:block;
  margin-top:5px;
  color:#64748b;
  font-size:13px;
  font-weight:400 !important;
  line-height:1.25;
}
body.vehicle_acceptance-page .vehicle-cell { min-width:150px; color:#1f2937; font-weight:400 !important; }
body.vehicle_acceptance-page .status-badge {
  display:inline-flex;
  padding:7px 11px;
  border-radius:8px;
  font-size:12px;
  font-weight:700 !important;
  white-space:nowrap;
}
body.vehicle_acceptance-page .status-done { background:#dcfce7 !important; color:#16a34a !important; }
body.vehicle_acceptance-page .actions-cell,
body.vehicle_acceptance-page .job-actions-cell {
  min-width:260px;
  display:flex;
  align-items:center;
  gap:7px;
  white-space:nowrap;
}
body.vehicle_acceptance-page .inline-action-form { display:inline-flex; margin:0; }
body.vehicle_acceptance-page .tasks-table-footer {
  padding:13px 18px !important;
  color:#64748b;
  border-top:1px solid rgba(17,24,39,.07);
  background:#fff;
  font-weight:400 !important;
}
body.vehicle_acceptance-page .vehicle-acceptance-filter .jobs-filter-modern-grid {
  grid-template-columns:minmax(220px,1fr) auto !important;
}
@media (max-width: 900px) {
  body.vehicle_acceptance-page .content > .tasks-head-modern,
  body.vehicle_acceptance-page .content > .tasks-filter-modern,
  body.vehicle_acceptance-page .content > .tasks-table-panel {
    margin-left:16px !important;
    margin-right:16px !important;
  }
  body.vehicle_acceptance-page .tasks-table-wrap { overflow:visible !important; }
  body.vehicle_acceptance-page .tasks-table {
    min-width:0 !important;
    width:100% !important;
    border-collapse:separate !important;
    border-spacing:0 12px !important;
  }
  body.vehicle_acceptance-page .tasks-table thead { display:none !important; }
  body.vehicle_acceptance-page .tasks-table tbody,
  body.vehicle_acceptance-page .tasks-table tr { display:block !important; width:100% !important; }
  body.vehicle_acceptance-page .tasks-table tr {
    background:#fff !important;
    border:1px solid rgba(17,24,39,.08) !important;
    border-radius:18px !important;
    box-shadow:0 10px 26px rgba(15,23,42,.07) !important;
    padding:12px !important;
    margin-bottom:12px !important;
  }
  body.vehicle_acceptance-page .tasks-table td {
    display:grid !important;
    grid-template-columns:118px minmax(0,1fr) !important;
    gap:10px !important;
    align-items:start !important;
    width:auto !important;
    min-width:0 !important;
    padding:8px 0 !important;
    border:0 !important;
    background:transparent !important;
  }
  body.vehicle_acceptance-page .tasks-table td::before {
    content:attr(data-label);
    color:#64748b;
    font-size:12px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.03em;
    line-height:1.35;
  }
  body.vehicle_acceptance-page .actions-cell,
  body.vehicle_acceptance-page .job-actions-cell {
    display:flex !important;
    flex-wrap:wrap !important;
    white-space:normal !important;
    gap:8px !important;
    min-width:0 !important;
  }
  body.vehicle_acceptance-page .job-actions-cell::before { width:118px; flex:0 0 118px; }
  body.vehicle_acceptance-page .job-actions-cell .btn,
  body.vehicle_acceptance-page .job-actions-cell form { flex:1 1 150px; }
  body.vehicle_acceptance-page .job-actions-cell form .btn { width:100%; }
}

/* V25.15 Fahrzeugannahme Feinschliff */
body.vehicle_acceptance-page .vehicle-acceptance-filter-grid {
  grid-template-columns:minmax(240px,1fr) minmax(150px,180px) minmax(170px,210px) auto auto !important;
  align-items:center;
}
body.vehicle_acceptance-page .vehicle-field-toggle {
  min-height:42px;
  padding:0 10px;
  border:1px solid rgba(15,23,42,.10);
  border-radius:12px;
  background:#fff;
  font-weight:400 !important;
  white-space:nowrap;
}
body.vehicle_acceptance-page .vehicle-extra-inputs {
  display:grid;
  gap:8px;
  margin-top:8px;
}
body.vehicle_acceptance-page .vehicle-extra-file-label {
  display:block;
  padding:10px 12px;
  border:1px dashed rgba(15,23,42,.20);
  border-radius:12px;
  background:#fff;
  font-weight:400 !important;
}
body.vehicle_acceptance-page .vehicle-acceptance-file-input {
  width:100%;
  margin-top:6px;
}
@media (max-width: 900px) {
  body.vehicle_acceptance-page .vehicle-acceptance-filter-grid {
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:10px !important;
  }
  body.vehicle_acceptance-page .vehicle-field-toggle {
    width:100%;
    justify-content:flex-start;
  }
  body.vehicle_acceptance-page .job-detail-card .btn {
    width:100%;
    justify-content:center;
  }
}

/* V25.17 Auftragsnotizen */
.job-notes-card .job-notes-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    margin-bottom:14px;
}
.job-notes-card .job-detail-section-title{margin-bottom:4px;}
.job-notes-list{display:grid;gap:10px;}
.job-note-item{
    border:1px solid rgba(15,23,42,.08);
    background:#f8fafc;
    border-radius:16px;
    padding:13px 14px;
}
.job-note-meta{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-bottom:8px;
}
.job-note-meta strong{
    color:#0f172a;
    font-size:14px;
    font-weight:600;
}
.job-note-meta span{
    color:#64748b;
    font-size:12px;
    white-space:nowrap;
}
.job-note-text{
    color:#334155;
    font-size:14px;
    line-height:1.55;
    white-space:normal;
}
.job-note-overlay{
    position:fixed;
    inset:0;
    z-index:2147483300;
    opacity:0;
    pointer-events:none;
    transition:opacity .18s ease;
}
.job-note-overlay.is-open{opacity:1;pointer-events:auto;}
.job-note-overlay-backdrop{
    position:absolute;
    inset:0;
    background:rgba(15,23,42,.48);
    backdrop-filter:blur(3px);
}
.job-note-overlay-shell{
    position:absolute;
    left:50%;
    top:50%;
    transform:translate(-50%,-46%);
    width:min(620px,calc(100vw - 28px));
    max-height:calc(100vh - 40px);
    overflow:auto;
    background:#fff;
    border:1px solid rgba(15,23,42,.08);
    border-radius:22px;
    box-shadow:0 24px 80px rgba(15,23,42,.22);
    padding:20px;
    transition:transform .18s ease;
}
.job-note-overlay.is-open .job-note-overlay-shell{transform:translate(-50%,-50%);}
.job-note-overlay-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    margin-bottom:14px;
}
.job-note-overlay-head h2{margin:0;font-size:22px;letter-spacing:-.03em;}
.job-note-overlay-close{
    border:0;
    background:#f1f5f9;
    color:#334155;
    width:36px;
    height:36px;
    border-radius:999px;
    font-size:24px;
    line-height:1;
    cursor:pointer;
}
.job-note-form label{
    display:block;
    color:#64748b;
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:.08em;
    font-weight:700;
    margin-bottom:7px;
}
.job-note-form textarea{
    width:100%;
    min-height:180px;
    resize:vertical;
    border:1px solid rgba(15,23,42,.12);
    border-radius:16px;
    padding:12px 14px;
    font:inherit;
    color:#0f172a;
    box-sizing:border-box;
}
.job-note-overlay-actions{
    display:flex;
    justify-content:flex-end;
    gap:10px;
    margin-top:14px;
}
body.job-note-overlay-open{overflow:hidden;}
@media(max-width:640px){
    .job-notes-card .job-notes-head{display:block;}
    .job-notes-card .job-notes-head .btn{width:100%;margin-top:12px;}
    .job-note-meta{display:block;}
    .job-note-meta span{display:block;margin-top:3px;}
    .job-note-overlay-shell{
        left:0;
        right:0;
        bottom:0;
        top:auto;
        width:100%;
        max-height:88vh;
        border-radius:22px 22px 0 0;
        transform:translateY(100%);
        padding:18px;
    }
    .job-note-overlay.is-open .job-note-overlay-shell{transform:translateY(0);}
    .job-note-overlay-actions{display:grid;grid-template-columns:1fr;}
    .job-note-overlay-actions .btn{width:100%;}
}

/* V26 Ersatzfahrzeug-Kalender */
.replacement-calendar{padding:18px;border-radius:22px;margin:18px 0;overflow:hidden}
.replacement-calendar-weekdays,.replacement-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
.replacement-calendar-weekdays{margin-bottom:8px;color:var(--muted);font-size:12px;font-weight:500;text-align:center}
.replacement-day{min-height:126px;border:1px solid rgba(255,255,255,.08);border-radius:16px;background:rgba(255,255,255,.035);padding:9px;display:flex;flex-direction:column;gap:6px}
.replacement-day.is-empty{background:rgba(255,255,255,.015);border-style:dashed;opacity:.45}
.replacement-day.is-today{outline:1px solid rgba(255,122,24,.45);box-shadow:0 0 0 3px rgba(255,122,24,.08)}
.replacement-day-number{font-size:12px;color:var(--muted);font-weight:500;margin-bottom:2px}
.replacement-booking{display:block;text-decoration:none;color:inherit;border-radius:12px;padding:8px;background:rgba(255,122,24,.14);border:1px solid rgba(255,122,24,.22);line-height:1.25}
.replacement-booking strong{display:block;font-size:12px;font-weight:600;color:var(--text)}
.replacement-booking span{display:block;font-size:11px;color:var(--muted);margin-top:2px}
.replacement-list-panel{margin-top:18px}
.replacement-vehicle-check{align-items:flex-start}
@media (max-width: 760px){
  .replacement-calendar{padding:12px;border-radius:18px}
  .replacement-calendar-weekdays{display:none}
  .replacement-calendar-grid{display:block}
  .replacement-day{min-height:auto;margin-bottom:10px}
  .replacement-day.is-empty{display:none}
  .replacement-day-number:before{content:'Tag ';}
}

/* V26.1 Ersatzfahrzeug: Kalender + manuelle Blockung sauberer */
.replacement-vehicle-summary .panel-head,
.replacement-panel-head{
    align-items:flex-start;
}
.replacement-manual-panel{
    display:none;
    margin:18px 0;
}
.replacement-manual-panel.is-open,
.replacement-manual-panel:target{
    display:block;
}
.replacement-manual-form{
    margin-top:14px;
}
.replacement-manual-form label span{
    display:block;
    color:var(--muted);
    font-size:12px;
    font-weight:500;
    margin-bottom:7px;
}
.replacement-manual-form input{
    width:100%;
    min-height:42px;
    box-sizing:border-box;
    border:1px solid rgba(15,23,42,.10);
    border-radius:14px;
    padding:10px 12px;
    font:inherit;
    color:var(--text);
    background:rgba(255,255,255,.82);
}
.replacement-form-actions{
    display:flex;
    justify-content:flex-end;
    margin-top:14px;
}
.replacement-calendar{
    padding:20px;
    border-radius:24px;
    margin:18px 0;
    overflow:hidden;
}
.replacement-calendar-weekdays,
.replacement-calendar-grid{
    display:grid;
    grid-template-columns:repeat(7,minmax(0,1fr));
    gap:10px;
}
.replacement-calendar-weekdays{
    margin-bottom:10px;
    color:var(--muted);
    font-size:12px;
    font-weight:500;
    text-align:center;
}
.replacement-calendar-weekdays div{
    padding:6px 0;
}
.replacement-day{
    min-height:138px;
    border:1px solid rgba(15,23,42,.08);
    border-radius:18px;
    background:rgba(255,255,255,.58);
    padding:10px;
    display:flex;
    flex-direction:column;
    gap:7px;
    overflow:hidden;
}
.replacement-day.is-empty{
    background:rgba(255,255,255,.24);
    border-style:dashed;
    opacity:.55;
}
.replacement-day.is-today{
    outline:1px solid rgba(255,122,24,.42);
    box-shadow:0 0 0 3px rgba(255,122,24,.08);
}
.replacement-day-number{
    width:28px;
    height:28px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    font-size:12px;
    color:var(--muted);
    font-weight:500;
    background:rgba(15,23,42,.045);
}
.replacement-day.is-today .replacement-day-number{
    color:#fff;
    background:var(--accent);
}
.replacement-booking{
    display:block;
    text-decoration:none;
    color:inherit;
    border-radius:14px;
    padding:9px 10px;
    background:rgba(255,122,24,.12);
    border:1px solid rgba(255,122,24,.22);
    line-height:1.25;
    box-shadow:0 8px 18px rgba(15,23,42,.04);
}
.replacement-booking:hover{
    background:rgba(255,122,24,.18);
    transform:translateY(-1px);
}
.replacement-booking strong{
    display:block;
    font-size:12px;
    font-weight:600;
    color:var(--text);
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.replacement-booking span{
    display:block;
    font-size:11px;
    color:var(--muted);
    margin-top:3px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.replacement-list-panel{
    margin-top:18px;
    padding-bottom:10px;
}
.replacement-table th,
.replacement-table td{
    vertical-align:middle;
}
.replacement-table .task-cell strong,
.replacement-table .due-cell strong{
    font-weight:600;
}
.replacement-table-footer{
    display:flex;
    justify-content:flex-start;
    align-items:center;
    color:var(--muted);
    font-size:12px;
    padding:12px 16px 4px;
}
@media (max-width: 900px){
    .replacement-calendar{padding:14px;border-radius:20px}
    .replacement-calendar-weekdays,
    .replacement-calendar-grid{gap:8px}
    .replacement-day{min-height:116px;padding:8px;border-radius:15px}
    .replacement-booking{padding:8px}
}
@media (max-width: 760px){
    .replacement-calendar{padding:12px;border-radius:18px}
    .replacement-calendar-weekdays{display:none}
    .replacement-calendar-grid{display:block}
    .replacement-day{min-height:auto;margin-bottom:10px}
    .replacement-day.is-empty{display:none}
    .replacement-day-number:before{content:'Tag ';}
    .replacement-day-number{
        width:auto;
        height:auto;
        justify-content:flex-start;
        background:transparent;
        padding:0;
        margin-bottom:2px;
    }
    .replacement-day.is-today .replacement-day-number{
        color:var(--accent);
        background:transparent;
    }
    .replacement-booking strong,
    .replacement-booking span{white-space:normal;}
    .replacement-form-actions{display:grid;grid-template-columns:1fr;}
    .replacement-form-actions .btn{width:100%;}
}

/* V26.2 Ersatzfahrzeug: durchgehende Mehrtages-Blockungen + reduzierte Infos */
.replacement-booking.is-start-day,
.replacement-booking.is-full-day,
.replacement-booking.is-end-day{
    position:relative;
    border-color:rgba(255,122,24,.34);
    background:rgba(255,122,24,.16);
}
.replacement-booking.is-start-day:after,
.replacement-booking.is-full-day:before,
.replacement-booking.is-full-day:after,
.replacement-booking.is-end-day:before{
    content:'';
    position:absolute;
    top:50%;
    width:10px;
    height:2px;
    background:rgba(255,122,24,.55);
    transform:translateY(-50%);
}
.replacement-booking.is-start-day:after,
.replacement-booking.is-full-day:after{right:-11px;}
.replacement-booking.is-full-day:before,
.replacement-booking.is-end-day:before{left:-11px;}
.replacement-booking.is-full-day span:first-of-type,
.replacement-booking.is-end-day span:first-of-type,
.replacement-booking.is-start-day span:first-of-type{
    color:var(--accent);
    font-weight:600;
}
.replacement-manual-form .form-grid.two{
    grid-template-columns:repeat(2,minmax(0,1fr));
}
@media (max-width: 760px){
    .replacement-booking.is-start-day:after,
    .replacement-booking.is-full-day:before,
    .replacement-booking.is-full-day:after,
    .replacement-booking.is-end-day:before{display:none;}
    .replacement-manual-form .form-grid.two{grid-template-columns:1fr;}
}

/* V26.3 Ersatzfahrzeug: bearbeitbare Termine + UI an Aufträge-Tabellenstil angepasst */
body.replacement_vehicle-page .content > .topbar,
body.replacement_vehicle-page .content > .replacement-vehicle-summary,
body.replacement_vehicle-page .content > .replacement-manual-panel,
body.replacement_vehicle-page .content > .replacement-editor-panel,
body.replacement_vehicle-page .content > .replacement-calendar,
body.replacement_vehicle-page .content > .replacement-list-panel{
    margin-left:30px !important;
    margin-right:30px !important;
}
body.replacement_vehicle-page .topbar-actions{
    flex-wrap:wrap;
    gap:8px;
}
body.replacement_vehicle-page .replacement-vehicle-summary,
body.replacement_vehicle-page .replacement-manual-panel,
body.replacement_vehicle-page .replacement-editor-panel{
    border-radius:16px !important;
    background:#fff !important;
    border:1px solid rgba(17,24,39,.08) !important;
    box-shadow:0 10px 28px rgba(15,23,42,.06) !important;
    padding:18px 20px !important;
}
body.replacement_vehicle-page .replacement-vehicle-summary .panel-head,
body.replacement_vehicle-page .replacement-panel-head,
body.replacement_vehicle-page .replacement-list-head{
    padding:0 !important;
    margin:0 0 12px !important;
    align-items:flex-start !important;
}
body.replacement_vehicle-page .replacement-list-head{
    padding:18px 20px 14px !important;
    margin:0 !important;
    border-bottom:1px solid rgba(17,24,39,.08);
}
body.replacement_vehicle-page .replacement-vehicle-summary h2,
body.replacement_vehicle-page .replacement-panel-head h2,
body.replacement_vehicle-page .replacement-list-head h2{
    font-size:18px !important;
    font-weight:600 !important;
    color:#111827 !important;
    letter-spacing:0 !important;
}
body.replacement_vehicle-page .replacement-calendar{
    padding:20px !important;
    border-radius:16px !important;
    background:#fff !important;
    border:1px solid rgba(17,24,39,.08) !important;
    box-shadow:0 10px 28px rgba(15,23,42,.06) !important;
    overflow:hidden !important;
}
body.replacement_vehicle-page .replacement-calendar-weekdays,
body.replacement_vehicle-page .replacement-calendar-grid{
    gap:10px !important;
}
body.replacement_vehicle-page .replacement-calendar-weekdays div{
    border-radius:10px;
    background:#f8fafc;
    padding:8px 0 !important;
    color:#64748b;
    font-size:11px;
    font-weight:700;
    letter-spacing:.04em;
    text-transform:uppercase;
}
body.replacement_vehicle-page .replacement-day{
    min-height:132px !important;
    padding:10px !important;
    border-radius:14px !important;
    background:#fbfdff !important;
    border:1px solid rgba(17,24,39,.08) !important;
}
body.replacement_vehicle-page .replacement-day.is-empty{
    background:#f8fafc !important;
    opacity:.55;
}
body.replacement_vehicle-page .replacement-booking{
    border-radius:12px !important;
    padding:9px 10px !important;
    background:#fff7ed !important;
    border:1px solid #fed7aa !important;
    box-shadow:none !important;
    cursor:pointer;
}
body.replacement_vehicle-page .replacement-booking:hover{
    background:#ffedd5 !important;
    transform:none !important;
}
body.replacement_vehicle-page .replacement-booking strong{
    font-size:12px !important;
    font-weight:600 !important;
    color:#111827 !important;
}
body.replacement_vehicle-page .replacement-booking span{
    font-size:11px !important;
    color:#64748b !important;
    line-height:1.35;
}
body.replacement_vehicle-page .replacement-editor-panel{
    display:block !important;
    margin-top:18px !important;
    margin-bottom:18px !important;
    border-color:rgba(249,115,22,.24) !important;
}
body.replacement_vehicle-page .replacement-form-wide{
    grid-column:1 / -1;
}
body.replacement_vehicle-page .replacement-form-actions{
    gap:10px;
    align-items:center;
    flex-wrap:wrap;
}
body.replacement_vehicle-page .replacement-list-panel{
    padding:0 !important;
    overflow:hidden !important;
    border-radius:14px !important;
    background:#fff !important;
    border:1px solid rgba(17,24,39,.08) !important;
    box-shadow:0 10px 28px rgba(15,23,42,.06) !important;
    backdrop-filter:none !important;
    margin-top:18px !important;
    margin-bottom:30px !important;
}
body.replacement_vehicle-page .replacement-list-panel .tasks-table-wrap{
    width:100% !important;
    overflow-x:auto !important;
}
body.replacement_vehicle-page .replacement-table{
    width:100% !important;
    min-width:980px !important;
    border-collapse:separate !important;
    border-spacing:0 !important;
}
body.replacement_vehicle-page .replacement-table th{
    padding:14px 18px !important;
    background:#fff !important;
    border-bottom:1px solid rgba(17,24,39,.08) !important;
    font-size:11px !important;
    text-transform:uppercase !important;
    letter-spacing:.04em !important;
    color:#64748b !important;
    font-weight:700 !important;
    text-align:left !important;
    white-space:nowrap !important;
}
body.replacement_vehicle-page .replacement-table td{
    padding:17px 18px !important;
    border-bottom:1px solid rgba(17,24,39,.07) !important;
    background:#fff !important;
    vertical-align:middle !important;
    text-align:left !important;
    color:#111827 !important;
    font-size:14px !important;
}
body.replacement_vehicle-page .replacement-table tr:hover td{
    background:#fbfdff !important;
}
body.replacement_vehicle-page .replacement-table tr:last-child td{
    border-bottom:0 !important;
}
body.replacement_vehicle-page .replacement-period-cell strong,
body.replacement_vehicle-page .replacement-reference-cell strong{
    display:block !important;
    font-weight:600 !important;
    color:#111827 !important;
    line-height:1.35 !important;
}
body.replacement_vehicle-page .replacement-period-cell span,
body.replacement_vehicle-page .replacement-reference-cell span{
    display:block !important;
    margin-top:6px !important;
    color:#64748b !important;
    font-size:13px !important;
    line-height:1.4 !important;
}
body.replacement_vehicle-page .replacement-reference-cell{
    min-width:260px;
}
body.replacement_vehicle-page .replacement-actions-cell{
    min-width:260px;
}
body.replacement_vehicle-page .replacement-actions-cell .inline-form{
    display:inline-flex !important;
    margin:0 0 0 6px !important;
    vertical-align:middle;
}
body.replacement_vehicle-page .replacement-actions-cell .btn{
    margin:2px 4px 2px 0 !important;
}
body.replacement_vehicle-page .replacement-table-footer{
    display:flex !important;
    justify-content:flex-start !important;
    align-items:center !important;
    padding:14px 18px 16px !important;
    border-top:1px solid rgba(17,24,39,.08) !important;
    color:#64748b !important;
    font-size:12px !important;
    background:#fff !important;
}
@media (max-width: 900px){
    body.replacement_vehicle-page .content > .topbar,
    body.replacement_vehicle-page .content > .replacement-vehicle-summary,
    body.replacement_vehicle-page .content > .replacement-manual-panel,
    body.replacement_vehicle-page .content > .replacement-editor-panel,
    body.replacement_vehicle-page .content > .replacement-calendar,
    body.replacement_vehicle-page .content > .replacement-list-panel{
        margin-left:16px !important;
        margin-right:16px !important;
    }
    body.replacement_vehicle-page .replacement-calendar{padding:14px !important;}
    body.replacement_vehicle-page .replacement-table{min-width:820px !important;}
}
@media (max-width: 760px){
    body.replacement_vehicle-page .content > .topbar,
    body.replacement_vehicle-page .content > .replacement-vehicle-summary,
    body.replacement_vehicle-page .content > .replacement-manual-panel,
    body.replacement_vehicle-page .content > .replacement-editor-panel,
    body.replacement_vehicle-page .content > .replacement-calendar,
    body.replacement_vehicle-page .content > .replacement-list-panel{
        margin-left:12px !important;
        margin-right:12px !important;
    }
    body.replacement_vehicle-page .replacement-calendar-weekdays{display:none !important;}
    body.replacement_vehicle-page .replacement-calendar-grid{display:block !important;}
    body.replacement_vehicle-page .replacement-day{
        min-height:auto !important;
        margin-bottom:10px !important;
    }
    body.replacement_vehicle-page .replacement-day.is-empty{display:none !important;}
    body.replacement_vehicle-page .replacement-form-actions{
        display:grid !important;
        grid-template-columns:1fr !important;
    }
    body.replacement_vehicle-page .replacement-form-actions .btn{width:100% !important;}
    body.replacement_vehicle-page .replacement-actions-cell .inline-form{margin-left:0 !important;}
}


/* V26.7 Ersatzfahrzeug: stabiler Editor + UI-Feinschliff im Aufträge-Stil */
body.replacement_vehicle-page .content > .replacement-calendar,
body.replacement_vehicle-page .content > .replacement-list-panel,
body.replacement_vehicle-page .content > .replacement-vehicle-summary,
body.replacement_vehicle-page .content > .replacement-manual-panel,
body.replacement_vehicle-page .content > .replacement-editor-panel{
    box-sizing:border-box;
}
body.replacement_vehicle-page .replacement-calendar{
    margin-top:20px !important;
    margin-bottom:20px !important;
    padding:22px !important;
}
body.replacement_vehicle-page .replacement-day{
    box-sizing:border-box;
    min-width:0;
}
body.replacement_vehicle-page .replacement-booking{
    display:block !important;
    min-width:0;
    transition:background .15s ease, border-color .15s ease;
}
body.replacement_vehicle-page .replacement-booking strong,
body.replacement_vehicle-page .replacement-booking span{
    min-width:0;
}
body.replacement_vehicle-page .replacement-vehicle-summary h2,
body.replacement_vehicle-page .replacement-panel-head h2,
body.replacement_vehicle-page .replacement-list-head h2{
    font-size:17px !important;
    font-weight:500 !important;
    color:var(--text) !important;
}
body.replacement_vehicle-page .replacement-calendar-weekdays div,
body.replacement_vehicle-page .replacement-table th{
    font-weight:500 !important;
    color:var(--muted) !important;
}
body.replacement_vehicle-page .replacement-table td{
    font-weight:400 !important;
    color:var(--text) !important;
}
body.replacement_vehicle-page .replacement-reference-cell strong,
body.replacement_vehicle-page .replacement-period-cell strong{
    font-weight:500 !important;
}
body.replacement_vehicle-page .replacement-reference-cell span,
body.replacement_vehicle-page .replacement-period-cell span{
    margin-top:7px !important;
    line-height:1.45 !important;
}
body.replacement_vehicle-page .replacement-list-panel .info-box{
    margin:18px 20px 20px !important;
}
body.replacement_vehicle-page .replacement-list-head{
    padding:18px 20px 12px !important;
}
body.replacement_vehicle-page .replacement-table-footer{
    justify-content:flex-start !important;
    padding:14px 20px 18px !important;
}
body.replacement_vehicle-page .replacement-editor-panel{
    scroll-margin-top:18px;
}
body.replacement_vehicle-page .replacement-actions-cell{
    white-space:nowrap;
}
body.replacement_vehicle-page .replacement-actions-cell .inline-form,
body.replacement_vehicle-page .replacement-actions-cell form{
    display:inline-flex !important;
    align-items:center;
}
@media (max-width:760px){
    body.replacement_vehicle-page .replacement-calendar{padding:14px !important;}
    body.replacement_vehicle-page .replacement-list-panel .tasks-table-wrap{overflow-x:visible !important;}
    body.replacement_vehicle-page .replacement-table{min-width:0 !important;}
    body.replacement_vehicle-page .replacement-actions-cell{white-space:normal;}
    body.replacement_vehicle-page .replacement-actions-cell .btn,
    body.replacement_vehicle-page .replacement-actions-cell .inline-form,
    body.replacement_vehicle-page .replacement-actions-cell form{width:100% !important;margin-left:0 !important;}
}

/* V26.9 Ersatzfahrzeug: Mobile Ansicht sauber als Agenda + Tabellenkarten */
body.replacement_vehicle-page .replacement-day-mobile{display:none;}

@media (max-width:760px){
    body.replacement_vehicle-page .content{
        padding-left:0 !important;
        padding-right:0 !important;
        overflow-x:hidden !important;
    }
    body.replacement_vehicle-page .content > .topbar,
    body.replacement_vehicle-page .content > .replacement-vehicle-summary,
    body.replacement_vehicle-page .content > .replacement-manual-panel,
    body.replacement_vehicle-page .content > .replacement-editor-panel,
    body.replacement_vehicle-page .content > .replacement-calendar,
    body.replacement_vehicle-page .content > .replacement-list-panel{
        margin-left:12px !important;
        margin-right:12px !important;
        width:auto !important;
        max-width:calc(100vw - 24px) !important;
        box-sizing:border-box !important;
    }

    body.replacement_vehicle-page .topbar{
        display:block !important;
        padding:16px !important;
        border-radius:18px !important;
    }
    body.replacement_vehicle-page .topbar-title-wrap{
        align-items:flex-start !important;
        gap:10px !important;
    }
    body.replacement_vehicle-page .topbar h1{
        font-size:22px !important;
        line-height:1.15 !important;
    }
    body.replacement_vehicle-page .topbar-actions{
        display:grid !important;
        grid-template-columns:1fr 1fr !important;
        gap:8px !important;
        margin-top:14px !important;
        width:100% !important;
    }
    body.replacement_vehicle-page .topbar-actions .btn{
        width:100% !important;
        min-height:42px !important;
        padding:10px 8px !important;
        justify-content:center !important;
        text-align:center !important;
        white-space:normal !important;
        line-height:1.2 !important;
        margin:0 !important;
    }
    body.replacement_vehicle-page .topbar-actions .btn-primary{
        grid-column:1 / -1 !important;
    }

    body.replacement_vehicle-page .replacement-vehicle-summary,
    body.replacement_vehicle-page .replacement-manual-panel,
    body.replacement_vehicle-page .replacement-editor-panel{
        padding:16px !important;
        border-radius:18px !important;
    }
    body.replacement_vehicle-page .replacement-vehicle-summary .panel-head,
    body.replacement_vehicle-page .replacement-panel-head,
    body.replacement_vehicle-page .replacement-list-head{
        display:block !important;
        padding:0 !important;
        margin-bottom:10px !important;
    }
    body.replacement_vehicle-page .replacement-list-head{
        padding:16px 16px 4px !important;
        margin-bottom:0 !important;
    }

    body.replacement_vehicle-page .replacement-calendar{
        padding:12px !important;
        border-radius:18px !important;
        background:#fff !important;
        border:1px solid rgba(17,24,39,.08) !important;
        box-shadow:0 10px 28px rgba(15,23,42,.06) !important;
        overflow:visible !important;
    }
    body.replacement_vehicle-page .replacement-calendar-weekdays{display:none !important;}
    body.replacement_vehicle-page .replacement-calendar-grid{
        display:block !important;
    }
    body.replacement_vehicle-page .replacement-day{
        display:block !important;
        min-height:0 !important;
        margin:0 0 10px !important;
        padding:12px !important;
        border-radius:16px !important;
        background:#f8fafc !important;
        border:1px solid rgba(17,24,39,.08) !important;
    }
    body.replacement_vehicle-page .replacement-day.is-empty{display:none !important;}
    body.replacement_vehicle-page .replacement-day.is-today{
        outline:none !important;
        border-color:rgba(249,115,22,.35) !important;
        box-shadow:0 0 0 3px rgba(249,115,22,.08) !important;
    }
    body.replacement_vehicle-page .replacement-day-number{
        width:auto !important;
        height:auto !important;
        padding:0 0 8px !important;
        margin:0 0 8px !important;
        justify-content:flex-start !important;
        background:transparent !important;
        border-bottom:1px solid rgba(17,24,39,.07) !important;
        color:#111827 !important;
        font-size:13px !important;
        font-weight:600 !important;
        border-radius:0 !important;
    }
    body.replacement_vehicle-page .replacement-day-number:before{content:none !important;}
    body.replacement_vehicle-page .replacement-day-desktop{display:none !important;}
    body.replacement_vehicle-page .replacement-day-mobile{display:inline !important;}
    body.replacement_vehicle-page .replacement-day.is-today .replacement-day-number{
        color:#f97316 !important;
        background:transparent !important;
    }
    body.replacement_vehicle-page .replacement-booking{
        margin-top:8px !important;
        padding:11px 12px !important;
        border-radius:14px !important;
        background:#fff7ed !important;
        border:1px solid #fed7aa !important;
        box-shadow:none !important;
    }
    body.replacement_vehicle-page .replacement-booking strong{
        font-size:14px !important;
        line-height:1.3 !important;
        white-space:normal !important;
    }
    body.replacement_vehicle-page .replacement-booking span{
        font-size:12px !important;
        line-height:1.35 !important;
        white-space:normal !important;
        margin-top:4px !important;
    }
    body.replacement_vehicle-page .replacement-booking.is-start-day:after,
    body.replacement_vehicle-page .replacement-booking.is-full-day:before,
    body.replacement_vehicle-page .replacement-booking.is-full-day:after,
    body.replacement_vehicle-page .replacement-booking.is-end-day:before{display:none !important;}

    body.replacement_vehicle-page .replacement-list-panel{
        overflow:hidden !important;
        padding:0 !important;
        border-radius:18px !important;
    }
    body.replacement_vehicle-page .replacement-list-panel .tasks-table-wrap{
        overflow:visible !important;
        width:100% !important;
    }
    body.replacement_vehicle-page .replacement-table,
    body.replacement_vehicle-page .replacement-table thead,
    body.replacement_vehicle-page .replacement-table tbody,
    body.replacement_vehicle-page .replacement-table tr,
    body.replacement_vehicle-page .replacement-table td{
        display:block !important;
        width:100% !important;
        min-width:0 !important;
        box-sizing:border-box !important;
    }
    body.replacement_vehicle-page .replacement-table thead{display:none !important;}
    body.replacement_vehicle-page .replacement-table{
        border-collapse:separate !important;
        border-spacing:0 !important;
        padding:0 12px 12px !important;
        background:#fff !important;
    }
    body.replacement_vehicle-page .replacement-table tr{
        border:1px solid rgba(17,24,39,.08) !important;
        border-radius:16px !important;
        margin:12px 0 !important;
        padding:12px !important;
        background:#fff !important;
        box-shadow:0 8px 18px rgba(15,23,42,.045) !important;
    }
    body.replacement_vehicle-page .replacement-table td{
        padding:8px 0 !important;
        border-bottom:1px solid rgba(17,24,39,.06) !important;
        background:transparent !important;
        font-size:14px !important;
        line-height:1.4 !important;
        text-align:left !important;
    }
    body.replacement_vehicle-page .replacement-table td:last-child{border-bottom:0 !important;}
    body.replacement_vehicle-page .replacement-table td:before{
        content:attr(data-label);
        display:block;
        margin-bottom:4px;
        color:#64748b;
        font-size:11px;
        font-weight:600;
        text-transform:uppercase;
        letter-spacing:.04em;
    }
    body.replacement_vehicle-page .replacement-period-cell span,
    body.replacement_vehicle-page .replacement-reference-cell span{
        margin-top:5px !important;
        font-size:13px !important;
    }
    body.replacement_vehicle-page .replacement-actions-cell{
        display:grid !important;
        grid-template-columns:1fr !important;
        gap:8px !important;
        white-space:normal !important;
        padding-top:12px !important;
    }
    body.replacement_vehicle-page .replacement-actions-cell:before{margin-bottom:0 !important;}
    body.replacement_vehicle-page .replacement-actions-cell .btn,
    body.replacement_vehicle-page .replacement-actions-cell .inline-form,
    body.replacement_vehicle-page .replacement-actions-cell form,
    body.replacement_vehicle-page .replacement-actions-cell button{
        width:100% !important;
        margin:0 !important;
    }
    body.replacement_vehicle-page .replacement-table-footer{
        padding:4px 16px 16px !important;
        border-top:0 !important;
        font-size:12px !important;
    }
}

/* V26.10 Lightbox für Auftrags- und Fahrzeugannahme-Bilder */
.fineart-lightbox { cursor: zoom-in; }
.fineart-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.fineart-lightbox-overlay.is-open { display: flex; }
.fineart-lightbox-stage {
  position: relative;
  max-width: min(1180px, 96vw);
  max-height: 92vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.fineart-lightbox-image-wrap {
  width: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fineart-lightbox-img {
  max-width: 100%;
  max-height: calc(92vh - 76px);
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.45);
  background: #fff;
}
.fineart-lightbox-caption {
  color: #f8fafc;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  line-height: 1.35;
  max-width: 880px;
}
.fineart-lightbox-close,
.fineart-lightbox-prev,
.fineart-lightbox-next {
  position: absolute;
  border: 0;
  background: rgba(255,255,255,0.14);
  color: #fff;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, transform .15s ease;
}
.fineart-lightbox-close:hover,
.fineart-lightbox-prev:hover,
.fineart-lightbox-next:hover { background: rgba(255,255,255,0.24); transform: translateY(-1px); }
.fineart-lightbox-close { top: -6px; right: -6px; width: 44px; height: 44px; font-size: 30px; line-height: 1; }
.fineart-lightbox-prev,
.fineart-lightbox-next { top: 50%; width: 46px; height: 46px; font-size: 34px; transform: translateY(-50%); }
.fineart-lightbox-prev:hover,
.fineart-lightbox-next:hover { transform: translateY(calc(-50% - 1px)); }
.fineart-lightbox-prev { left: 10px; }
.fineart-lightbox-next { right: 10px; }
.fineart-lightbox-overlay.single-image .fineart-lightbox-prev,
.fineart-lightbox-overlay.single-image .fineart-lightbox-next { display:none; }
@media (max-width: 780px) {
  .fineart-lightbox-overlay { padding: 12px; }
  .fineart-lightbox-stage { max-width: 100%; max-height: 94vh; }
  .fineart-lightbox-img { max-height: calc(94vh - 84px); border-radius: 14px; }
  .fineart-lightbox-close { top: 6px; right: 6px; width: 42px; height: 42px; background: rgba(15,23,42,0.55); }
  .fineart-lightbox-prev, .fineart-lightbox-next { width: 40px; height: 40px; font-size: 28px; background: rgba(15,23,42,0.45); }
  .fineart-lightbox-prev { left: 4px; }
  .fineart-lightbox-next { right: 4px; }
}

/* V26.11 Mail-Historie / E-Mail-Verlauf */
.mail-history-panel { padding: 18px; }
.mail-history-head { margin-bottom: 14px; }
.mail-history-table th,
.mail-history-table td { vertical-align: middle; }
.mail-history-preview { display:block; margin-top:4px; color: var(--muted, #6b7280); font-size: 12px; line-height: 1.35; font-weight: 400; }
.mail-detail-modal[hidden] { display:none; }
.mail-detail-modal { position: fixed; inset: 0; z-index: 9999; display:flex; align-items:center; justify-content:center; padding: 18px; }
.mail-detail-backdrop { position:absolute; inset:0; background: rgba(15, 23, 42, .62); backdrop-filter: blur(3px); }
.mail-detail-dialog { position:relative; width:min(920px, 100%); max-height: calc(100vh - 36px); overflow:auto; background:#fff; border-radius:22px; box-shadow:0 24px 70px rgba(15,23,42,.28); padding:22px; }
.mail-detail-close { position:absolute; top:14px; right:16px; width:36px; height:36px; border:0; border-radius:999px; background:#f3f4f6; color:#111827; font-size:26px; line-height:1; cursor:pointer; }
.mail-detail-header { padding-right:44px; margin-bottom:14px; }
.mail-detail-header h2 { margin:10px 0 4px; font-size:22px; font-weight:700; color:#111827; }
.mail-detail-meta { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:10px; margin:16px 0; }
.mail-detail-meta div { background:#f8fafc; border:1px solid #eef2f7; border-radius:14px; padding:12px 14px; }
.mail-detail-meta span { display:block; font-size:12px; color:#6b7280; margin-bottom:3px; }
.mail-detail-meta strong { display:block; font-size:14px; color:#111827; word-break: break-word; }
.mail-detail-error { background:#fef2f2; color:#991b1b; border:1px solid #fecaca; border-radius:14px; padding:12px 14px; margin:12px 0; }
.mail-detail-body { background:#fff; border:1px solid #e5e7eb; border-radius:16px; padding:18px; line-height:1.55; color:#111827; white-space:pre-wrap; word-break:break-word; }
.mail-detail-body * { max-width:100%; }
.job-mail-timeline { display:flex; flex-direction:column; gap:10px; margin-top:14px; }
.job-mail-timeline-item { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; padding:14px; border:1px solid #eef2f7; border-radius:16px; background:#fff; }
.job-mail-timeline-main { display:flex; flex-direction:column; gap:5px; min-width:0; }
.job-mail-timeline-main strong { font-size:15px; color:#111827; }
.job-mail-timeline-side { display:flex; flex-direction:column; align-items:flex-end; gap:8px; white-space:nowrap; }
.job-mail-timeline-side strong { font-size:13px; color:#374151; }
body.modal-open { overflow:hidden; }
@media (max-width: 760px) {
    .mail-history-panel { padding: 14px; }
    .mail-detail-dialog { border-radius:18px; padding:18px; }
    .mail-detail-meta { grid-template-columns:1fr; }
    .job-mail-timeline-item { flex-direction:column; }
    .job-mail-timeline-side { align-items:flex-start; white-space:normal; }
    .mail-history-table thead { display:none; }
    .mail-history-table, .mail-history-table tbody, .mail-history-table tr, .mail-history-table td { display:block; width:100%; }
    .mail-history-table tr { border:1px solid #eef2f7; border-radius:16px; padding:12px; margin-bottom:10px; background:#fff; }
    .mail-history-table td { border:0 !important; padding:6px 0 !important; }
}

/* V26.12 - Replacement vehicle week calendar + mail history mobile polish */
body.replacement_vehicle-page .replacement-topbar,
body.mail_log-page .tasks-head-modern,
body.mail_log-page .tasks-filter-modern,
body.mail_log-page .mail-history-panel{
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}
body.replacement_vehicle-page .replacement-top-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    align-items:center;
    justify-content:flex-end;
}
body.replacement_vehicle-page .replacement-week-summary,
body.replacement_vehicle-page .replacement-week-calendar,
body.replacement_vehicle-page .replacement-list-panel,
body.replacement_vehicle-page .replacement-manual-panel,
body.replacement_vehicle-page .replacement-editor-panel{
    max-width:1280px;
    margin-left:auto !important;
    margin-right:auto !important;
}
body.replacement_vehicle-page .replacement-week-calendar{
    padding:18px !important;
    border-radius:24px !important;
    overflow:hidden;
}
body.replacement_vehicle-page .replacement-week-scroll{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    border:1px solid rgba(15,23,42,.08);
    border-radius:20px;
    background:rgba(255,255,255,.72);
}
body.replacement_vehicle-page .replacement-week-header,
body.replacement_vehicle-page .replacement-week-body{
    min-width:980px;
    display:grid;
    grid-template-columns:72px repeat(var(--rv-cols), minmax(118px,1fr));
}
body.replacement_vehicle-page .replacement-week-header{
    position:sticky;
    top:0;
    z-index:4;
    background:rgba(255,255,255,.96);
    border-bottom:1px solid rgba(15,23,42,.08);
}
body.replacement_vehicle-page .replacement-time-corner,
body.replacement_vehicle-page .replacement-week-day-head{
    min-height:72px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:2px;
    border-right:1px solid rgba(15,23,42,.08);
    color:var(--muted,#64748b);
    font-size:12px;
    font-weight:500;
}
body.replacement_vehicle-page .replacement-week-day-head strong{
    font-size:24px;
    line-height:1;
    color:var(--text,#0f172a);
    font-weight:600;
}
body.replacement_vehicle-page .replacement-week-day-head small{
    color:var(--muted,#64748b);
    font-size:11px;
    font-weight:500;
}
body.replacement_vehicle-page .replacement-week-day-head.is-today strong{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:36px;
    height:36px;
    border-radius:999px;
    background:rgba(255,122,24,.13);
    color:#c85f00;
}
body.replacement_vehicle-page .replacement-time-axis{
    position:relative;
    display:grid;
    grid-template-rows:repeat(24,56px) 0;
    border-right:1px solid rgba(15,23,42,.08);
    background:rgba(248,250,252,.84);
}
body.replacement_vehicle-page .replacement-time-axis div{
    height:56px;
    display:flex;
    justify-content:flex-end;
    align-items:flex-start;
    padding:8px 10px 0 4px;
    font-size:12px;
    color:var(--muted,#64748b);
    border-bottom:1px solid rgba(15,23,42,.08);
    font-weight:500;
}
body.replacement_vehicle-page .replacement-week-day-col{
    position:relative;
    min-height:1344px;
    border-right:1px solid rgba(15,23,42,.08);
    background:rgba(255,255,255,.52);
}
body.replacement_vehicle-page .replacement-week-day-col.is-today{
    background:rgba(255,122,24,.035);
}
body.replacement_vehicle-page .replacement-hour-line{
    height:56px;
    border-bottom:1px solid rgba(15,23,42,.08);
}
body.replacement_vehicle-page .replacement-week-booking{
    position:absolute;
    left:6px;
    right:6px;
    min-height:30px;
    z-index:2;
    display:block;
    padding:7px 8px;
    border-radius:9px;
    background:linear-gradient(180deg,#ff963d,#f58220);
    color:#1f2937;
    text-decoration:none;
    box-shadow:0 5px 14px rgba(245,130,32,.20);
    border:1px solid rgba(168,85,0,.18);
    overflow:hidden;
}
body.replacement_vehicle-page .replacement-week-booking strong,
body.replacement_vehicle-page .replacement-week-booking span,
body.replacement_vehicle-page .replacement-week-booking em{
    display:block;
    color:#1f2937;
    font-size:12px;
    line-height:1.13;
    font-style:normal;
    overflow:hidden;
    text-overflow:ellipsis;
}
body.replacement_vehicle-page .replacement-week-booking strong{
    font-weight:650;
    margin-bottom:3px;
}
body.replacement_vehicle-page .replacement-week-booking span,
body.replacement_vehicle-page .replacement-week-booking em{
    font-size:10.5px;
    opacity:.86;
}
body.replacement_vehicle-page .replacement-list-head,
body.mail_log-page .mail-history-head{
    padding:0 0 14px 0;
    align-items:flex-start;
}
body.replacement_vehicle-page .replacement-table td,
body.replacement_vehicle-page .replacement-table th{
    padding-left:16px !important;
    padding-right:16px !important;
}
body.replacement_vehicle-page .replacement-reference-cell strong,
body.replacement_vehicle-page .replacement-reference-cell span,
body.replacement_vehicle-page .replacement-note-cell{
    line-height:1.45;
}
body.mail_log-page .mail-history-panel{
    padding:22px !important;
    border-radius:24px;
}
body.mail_log-page .mail-history-table th,
body.mail_log-page .mail-history-table td{
    padding:16px !important;
    vertical-align:middle;
}
body.mail_log-page .mail-history-table .status-badge,
body.mail_log-page .mail-history-panel .status-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    padding:7px 12px;
    font-size:12px;
    line-height:1;
    font-weight:650;
    white-space:nowrap;
}
body.mail_log-page .mail-history-preview{
    max-width:420px;
    margin-top:7px;
    color:var(--muted,#64748b);
    font-size:12px;
    line-height:1.45;
    font-weight:400;
}
body.mail_log-page .mail-history-table .task-cell strong{
    display:block;
    margin-bottom:4px;
    font-size:14px;
    line-height:1.3;
    font-weight:600;
}
body.mail_log-page .mail-history-table .task-cell span,
body.mail_log-page .mail-history-table .customer-cell span{
    display:block;
    line-height:1.4;
}
body.mail_log-page .mail-detail-dialog{
    border-radius:24px;
}
body.mail_log-page .mail-detail-meta{
    gap:10px;
}

@media (max-width: 760px){
    body.replacement_vehicle-page .topbar.replacement-topbar{
        gap:14px;
        padding-left:18px;
        padding-right:18px;
    }
    body.replacement_vehicle-page .replacement-top-actions{
        width:100%;
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:10px;
    }
    body.replacement_vehicle-page .replacement-top-actions .btn:first-child{
        grid-column:1 / -1;
    }
    body.replacement_vehicle-page .replacement-week-summary,
    body.replacement_vehicle-page .replacement-week-calendar,
    body.replacement_vehicle-page .replacement-list-panel,
    body.replacement_vehicle-page .replacement-manual-panel,
    body.replacement_vehicle-page .replacement-editor-panel,
    body.mail_log-page .mail-history-panel{
        width:calc(100% - 24px) !important;
        margin-left:12px !important;
        margin-right:12px !important;
    }
    body.replacement_vehicle-page .replacement-week-calendar{
        padding:12px !important;
        border-radius:20px !important;
    }
    body.replacement_vehicle-page .replacement-week-scroll{
        border-radius:16px;
    }
    body.replacement_vehicle-page .replacement-week-header,
    body.replacement_vehicle-page .replacement-week-body{
        min-width:820px;
        grid-template-columns:58px repeat(7, 108px);
    }
    body.replacement_vehicle-page .replacement-time-corner,
    body.replacement_vehicle-page .replacement-week-day-head{
        min-height:64px;
    }
    body.replacement_vehicle-page .replacement-week-day-head strong{font-size:21px;}
    body.replacement_vehicle-page .replacement-time-axis{grid-template-rows:repeat(24,48px) 0;}
    body.replacement_vehicle-page .replacement-time-axis div{height:48px;font-size:11px;padding-right:7px;}
    body.replacement_vehicle-page .replacement-week-day-col{min-height:1152px;}
    body.replacement_vehicle-page .replacement-hour-line{height:48px;}
    body.replacement_vehicle-page .replacement-week-booking{left:4px;right:4px;padding:6px;border-radius:8px;}
    body.replacement_vehicle-page .replacement-week-booking strong{font-size:11.5px;}
    body.replacement_vehicle-page .replacement-week-booking span,
    body.replacement_vehicle-page .replacement-week-booking em{font-size:10px;}
    body.replacement_vehicle-page .replacement-list-panel{padding:16px !important;}
    body.replacement_vehicle-page .replacement-table thead{display:none;}
    body.replacement_vehicle-page .replacement-table,
    body.replacement_vehicle-page .replacement-table tbody,
    body.replacement_vehicle-page .replacement-table tr,
    body.replacement_vehicle-page .replacement-table td{display:block;width:100%;}
    body.replacement_vehicle-page .replacement-table tr{
        border:1px solid rgba(15,23,42,.08);
        border-radius:18px;
        padding:14px;
        margin-bottom:12px;
        background:#fff;
    }
    body.replacement_vehicle-page .replacement-table td{
        border:0 !important;
        padding:7px 0 !important;
    }
    body.replacement_vehicle-page .replacement-table td:before{
        content:attr(data-label);
        display:block;
        margin-bottom:4px;
        color:var(--muted,#64748b);
        font-size:11px;
        font-weight:650;
        text-transform:uppercase;
        letter-spacing:.04em;
    }
    body.replacement_vehicle-page .replacement-actions-cell{display:flex !important;flex-wrap:wrap;gap:8px;}
    body.replacement_vehicle-page .replacement-actions-cell:before{width:100%;}
    body.mail_log-page .tasks-head-modern,
    body.mail_log-page .tasks-filter-modern,
    body.mail_log-page .mail-history-panel{
        width:calc(100% - 24px) !important;
        margin-left:12px !important;
        margin-right:12px !important;
    }
    body.mail_log-page .mail-history-panel{padding:16px !important;border-radius:22px;}
    body.mail_log-page .mail-history-table thead{display:none;}
    body.mail_log-page .mail-history-table,
    body.mail_log-page .mail-history-table tbody,
    body.mail_log-page .mail-history-table tr,
    body.mail_log-page .mail-history-table td{display:block;width:100%;}
    body.mail_log-page .mail-history-table tr{
        border:1px solid rgba(15,23,42,.08) !important;
        border-radius:18px !important;
        padding:16px !important;
        margin-bottom:12px !important;
        background:#fff !important;
        box-shadow:0 10px 28px rgba(15,23,42,.04);
    }
    body.mail_log-page .mail-history-table td{
        border:0 !important;
        padding:7px 0 !important;
    }
    body.mail_log-page .mail-history-table td:nth-child(1){padding-bottom:10px !important;}
    body.mail_log-page .mail-history-table .task-cell strong{
        font-size:17px;
        line-height:1.25;
        margin-bottom:7px;
    }
    body.mail_log-page .mail-history-table .task-cell span,
    body.mail_log-page .mail-history-table .customer-cell strong,
    body.mail_log-page .mail-history-table .due-cell strong{
        font-size:14px;
        line-height:1.45;
    }
    body.mail_log-page .mail-history-preview{
        max-width:none;
        font-size:13px;
        line-height:1.5;
        margin-top:8px;
    }
    body.mail_log-page .mail-history-table .btn{
        margin-top:6px;
        border-radius:14px;
        padding:12px 16px;
    }
}

/* V2.1.10 - E-Mail-Historie mobil lesbarer + Ersatzfahrzeug-Kalender kompakter */
body.mail_log-page .status-badge.status-high,
body.mail_log-page .mail-history-table .status-badge.status-high,
body.mail_log-page .mail-history-panel .status-badge.status-high{
    background:#fee2e2 !important;
    color:#991b1b !important;
    border:1px solid rgba(153,27,27,.14) !important;
}
body.mail_log-page .status-badge.status-done,
body.mail_log-page .mail-history-table .status-badge.status-done,
body.mail_log-page .mail-history-panel .status-badge.status-done{
    background:#dcfce7 !important;
    color:#166534 !important;
    border:1px solid rgba(22,101,52,.12) !important;
}
body.mail_log-page .mail-history-table .status-badge{
    border-radius:999px !important;
    padding:8px 12px !important;
    line-height:1 !important;
}

@media (max-width: 760px){
    body.mail_log-page .mail-history-panel{
        padding:18px !important;
        overflow:visible !important;
    }
    body.mail_log-page .mail-history-table{
        border-spacing:0 !important;
        width:100% !important;
    }
    body.mail_log-page .mail-history-table tr{
        box-sizing:border-box !important;
        width:100% !important;
        padding:18px !important;
        border-radius:20px !important;
    }
    body.mail_log-page .mail-history-table th,
    body.mail_log-page .mail-history-table td,
    body.mail_log-page .mail-history-table th:nth-child(1),
    body.mail_log-page .mail-history-table td:nth-child(1),
    body.mail_log-page .mail-history-table th:nth-child(2),
    body.mail_log-page .mail-history-table td:nth-child(2),
    body.mail_log-page .mail-history-table th:nth-child(6),
    body.mail_log-page .mail-history-table td:nth-child(6){
        width:100% !important;
        max-width:none !important;
        min-width:0 !important;
    }
    body.mail_log-page .mail-history-table td{
        box-sizing:border-box !important;
        display:block !important;
        padding:8px 0 !important;
    }
    body.mail_log-page .mail-history-table .task-cell,
    body.mail_log-page .mail-history-table .customer-cell,
    body.mail_log-page .mail-history-table .due-cell{
        display:block !important;
        width:100% !important;
        max-width:none !important;
        min-width:0 !important;
        white-space:normal !important;
        overflow:visible !important;
    }
    body.mail_log-page .mail-history-table .task-cell strong,
    body.mail_log-page .mail-history-table .task-cell span,
    body.mail_log-page .mail-history-table .customer-cell strong,
    body.mail_log-page .mail-history-table .customer-cell span,
    body.mail_log-page .mail-history-table .due-cell strong,
    body.mail_log-page .mail-history-preview{
        display:block !important;
        width:100% !important;
        max-width:none !important;
        white-space:normal !important;
        word-break:break-word !important;
        overflow-wrap:anywhere !important;
    }
    body.mail_log-page .mail-history-table .task-cell strong{
        font-size:18px !important;
        line-height:1.28 !important;
        margin-bottom:8px !important;
    }
    body.mail_log-page .mail-history-table .task-cell span{
        font-size:15px !important;
        line-height:1.42 !important;
    }
    body.mail_log-page .mail-history-preview{
        font-size:14px !important;
        line-height:1.52 !important;
        color:#64748b !important;
        margin-top:10px !important;
    }
    body.mail_log-page .mail-history-table .status-badge{
        display:inline-flex !important;
        width:auto !important;
        max-width:max-content !important;
        margin-bottom:4px !important;
    }

    body.replacement_vehicle-page .replacement-week-calendar{
        padding:10px !important;
    }
    body.replacement_vehicle-page .replacement-week-header,
    body.replacement_vehicle-page .replacement-week-body{
        min-width:760px !important;
        grid-template-columns:48px repeat(7, 100px) !important;
    }
    body.replacement_vehicle-page .replacement-time-corner,
    body.replacement_vehicle-page .replacement-week-day-head{
        min-height:50px !important;
    }
    body.replacement_vehicle-page .replacement-week-day-head strong{
        font-size:18px !important;
    }
    body.replacement_vehicle-page .replacement-week-day-head small{
        font-size:10px !important;
    }
    body.replacement_vehicle-page .replacement-time-axis{
        grid-template-rows:repeat(24,24px) 0 !important;
    }
    body.replacement_vehicle-page .replacement-time-axis div{
        height:24px !important;
        padding:3px 6px 0 2px !important;
        font-size:10px !important;
    }
    body.replacement_vehicle-page .replacement-week-day-col{
        min-height:576px !important;
    }
    body.replacement_vehicle-page .replacement-hour-line{
        height:24px !important;
    }
    body.replacement_vehicle-page .replacement-week-booking{
        left:3px !important;
        right:3px !important;
        min-height:16px !important;
        padding:3px 4px !important;
        border-radius:6px !important;
        box-shadow:0 3px 8px rgba(245,130,32,.16) !important;
    }
    body.replacement_vehicle-page .replacement-week-booking strong{
        font-size:9.5px !important;
        line-height:1.05 !important;
        margin-bottom:1px !important;
    }
    body.replacement_vehicle-page .replacement-week-booking span,
    body.replacement_vehicle-page .replacement-week-booking em{
        font-size:8.5px !important;
        line-height:1.05 !important;
    }
}





/* V2.1.10 Ersatzfahrzeug – Desktop sauberer Seitenaufbau */
@media (min-width: 901px) {
    body.replacement_vehicle-page {
        --rv-page-width: min(100% - 64px, 1500px);
    }

    body.replacement_vehicle-page .topbar-modern-title.replacement-topbar,
    body.replacement_vehicle-page .replacement-week-summary,
    body.replacement_vehicle-page .replacement-week-calendar,
    body.replacement_vehicle-page .replacement-list-panel,
    body.replacement_vehicle-page .replacement-manual-panel,
    body.replacement_vehicle-page .replacement-editor-panel {
        width: var(--rv-page-width) !important;
        max-width: var(--rv-page-width) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }

    body.replacement_vehicle-page .topbar-modern-title.replacement-topbar {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 28px !important;
        padding: 4px 0 18px 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    body.replacement_vehicle-page .topbar-title-wrap {
        display: flex !important;
        align-items: center !important;
        gap: 14px !important;
        min-width: 280px !important;
        flex: 0 0 auto !important;
    }

    body.replacement_vehicle-page .topbar-title-wrap h1 {
        margin: 0 0 4px 0 !important;
        line-height: 1.15 !important;
    }

    body.replacement_vehicle-page .topbar-title-wrap p {
        margin: 0 !important;
        line-height: 1.35 !important;
    }

    body.replacement_vehicle-page .replacement-top-actions {
        display: flex !important;
        align-items: flex-end !important;
        justify-content: flex-end !important;
        gap: 10px !important;
        flex-wrap: wrap !important;
        max-width: 900px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.replacement_vehicle-page .replacement-top-actions > .btn {
        height: 42px !important;
        min-height: 42px !important;
        padding: 0 16px !important;
        white-space: nowrap !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    body.replacement_vehicle-page .rv-date-jump {
        display: grid !important;
        grid-template-columns: 170px 128px !important;
        grid-template-rows: auto 42px !important;
        gap: 4px 8px !important;
        align-items: end !important;
        margin: 0 !important;
        width: auto !important;
    }

    body.replacement_vehicle-page .rv-date-jump label {
        grid-column: 1 / 3 !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
        clip: auto !important;
        white-space: normal !important;
        margin: 0 !important;
        font-size: 12px !important;
        line-height: 1.2 !important;
        color: var(--muted, #64748b) !important;
    }

    body.replacement_vehicle-page .rv-date-input {
        grid-column: 1 !important;
        height: 42px !important;
        min-height: 42px !important;
        width: 170px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    body.replacement_vehicle-page .rv-date-jump .btn {
        grid-column: 2 !important;
        height: 42px !important;
        min-height: 42px !important;
        padding: 0 16px !important;
    }

    body.replacement_vehicle-page .replacement-week-summary {
        margin-top: 0 !important;
        margin-bottom: 18px !important;
        padding: 20px 24px !important;
        border-radius: 24px !important;
    }

    body.replacement_vehicle-page .replacement-week-summary .panel-head,
    body.replacement_vehicle-page .replacement-week-head {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 18px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.replacement_vehicle-page .replacement-week-summary h2 {
        margin: 0 0 5px 0 !important;
        font-size: 24px !important;
        line-height: 1.15 !important;
        font-weight: 650 !important;
    }

    body.replacement_vehicle-page .replacement-week-summary .muted.small {
        line-height: 1.35 !important;
    }

    body.replacement_vehicle-page .replacement-week-calendar {
        padding: 22px !important;
        border-radius: 26px !important;
        margin-top: 0 !important;
        margin-bottom: 24px !important;
        overflow: hidden !important;
    }

    body.replacement_vehicle-page .replacement-week-scroll {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        border-radius: 20px !important;
        border: 1px solid rgba(15,23,42,.10) !important;
        background: rgba(255,255,255,.78) !important;
    }

    body.replacement_vehicle-page .replacement-week-header,
    body.replacement_vehicle-page .replacement-week-body {
        min-width: 0 !important;
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 72px repeat(7, minmax(0, 1fr)) !important;
    }

    body.replacement_vehicle-page .replacement-time-corner,
    body.replacement_vehicle-page .replacement-week-day-head {
        min-height: 72px !important;
    }

    body.replacement_vehicle-page .replacement-week-day-head strong {
        font-size: 22px !important;
        line-height: 1.05 !important;
    }

    body.replacement_vehicle-page .replacement-time-axis > div,
    body.replacement_vehicle-page .replacement-hour-line {
        height: 34px !important;
        min-height: 34px !important;
    }

    body.replacement_vehicle-page .replacement-time-axis > div {
        font-size: 11px !important;
        padding-right: 10px !important;
    }

    body.replacement_vehicle-page .replacement-week-day-col {
        min-height: calc(24 * 34px) !important;
    }

    body.replacement_vehicle-page .replacement-week-booking {
        left: 7px !important;
        right: 7px !important;
        border-radius: 11px !important;
        padding: 7px 8px !important;
        box-sizing: border-box !important;
    }

    body.replacement_vehicle-page .replacement-list-panel {
        margin-top: 0 !important;
        padding: 22px 24px !important;
        border-radius: 24px !important;
    }

    body.replacement_vehicle-page .replacement-list-panel .panel-head {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 16px !important;
        padding: 0 0 16px 0 !important;
        margin: 0 !important;
    }

    body.replacement_vehicle-page .replacement-list-panel h2 {
        margin: 0 0 4px 0 !important;
    }

    body.replacement_vehicle-page .replacement-list-panel table th,
    body.replacement_vehicle-page .replacement-list-panel table td {
        padding: 12px 14px !important;
        vertical-align: middle !important;
    }
}

@media (min-width: 901px) and (max-width: 1240px) {
    body.replacement_vehicle-page .topbar-modern-title.replacement-topbar {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    body.replacement_vehicle-page .replacement-top-actions {
        justify-content: flex-start !important;
        max-width: none !important;
    }
}


/* V2.1.10 - Kunden-Neuanlage: mobile-freundliche Anrede + PLZ/Ort-Hilfe + Sammelkunden-Schnellauswahl */
#customer-create-form #new_salutation,
#customer-create-form #new_zip,
#customer-create-form #new_city {
    width: 100%;
}
#customer-create-form .postcode-helper {
    margin-top: 6px;
    line-height: 1.35;
}
@media (max-width: 720px) {
    #customer-create-form #new_salutation,
    #customer-create-form #new_zip,
    #customer-create-form #new_city {
        min-height: 46px;
        font-size: 16px;
    }
    #customer-create-form .postcode-helper {
        font-size: 12px;
    }
}


/* V2.1.10 - Vorbereitete Termine: schnelleres Laden mit manuellem Google-Abgleich + Aktualisiert-Hinweis */
.prepared-sync-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px;}
.prepared-sync-row .btn{margin-left:auto;}
@media (max-width: 720px){.prepared-sync-row{align-items:stretch;}.prepared-sync-row .btn{margin-left:0;width:100%;justify-content:center;}}


/* V2.1.10 - Vorbereitete Termine Aktualisiert-Hinweis */
.prepared-events-sync-note { margin-top: 8px; }

/* V2.2.7 - Lexoffice Zum-Auftrag Workflow + Aufträge-Test-Positionslayout */


/* V2.2.7 - Aufträge Test: Desktop-Positionsbereich im Lexoffice-Aufbau sauber ausgerichtet */
@media (min-width: 781px) {
  body.job_create_test-page .job-details-title,
  body.job_edit_test-page .job-details-title { margin-bottom:6px; }
  body.job_create_test-page .lexoffice-positions-panel,
  body.job_edit_test-page .lexoffice-positions-panel {
    padding:0 !important;
    border:1px solid rgba(15,23,42,.08) !important;
    border-radius:12px !important;
    background:#fff !important;
    box-shadow:0 2px 10px rgba(15,23,42,.05) !important;
    overflow:hidden !important;
  }
  body.job_create_test-page .lexoffice-positions-header,
  body.job_edit_test-page .lexoffice-positions-header {
    display:flex !important;
    justify-content:flex-end !important;
    align-items:center !important;
    gap:12px !important;
    margin:0 !important;
    padding:14px 18px 4px !important;
    min-height:50px;
  }
  body.job_create_test-page .lexoffice-positions-header .test-positions-toolbar-spacer,
  body.job_edit_test-page .lexoffice-positions-header .test-positions-toolbar-spacer { flex:1; }
  body.job_create_test-page .beleg-price-switch button,
  body.job_edit_test-page .beleg-price-switch button { min-width:82px; min-height:36px; border-radius:9px; font-size:13px; font-weight:600; }
  body.job_create_test-page .lexoffice-position-labels,
  body.job_edit_test-page .lexoffice-position-labels { display:none !important; }
  body.job_create_test-page .position-rows,
  body.job_edit_test-page .position-rows { padding:0 38px 8px 38px; }
  body.job_create_test-page .lexoffice-position-row,
  body.job_edit_test-page .lexoffice-position-row {
    position:relative;
    display:grid !important;
    grid-template-columns: 42px minmax(340px,1fr) 92px 132px 152px 92px 120px 34px !important;
    grid-template-areas:"num article qty unit price discount stack del" ". desc desc desc desc desc stack del" !important;
    gap:10px 8px !important;
    align-items:start !important;
    padding:0 0 26px 0 !important;
    margin:0 0 18px 0 !important;
    border:0 !important;
    background:transparent !important;
    overflow:visible !important;
  }
  body.job_create_test-page .lexoffice-position-row:last-child,
  body.job_edit_test-page .lexoffice-position-row:last-child { margin-bottom:8px !important; }
  body.job_create_test-page .lexoffice-position-row::before,
  body.job_edit_test-page .lexoffice-position-row::before {
    content:attr(data-row-number); grid-area:num; width:32px; height:32px; border-radius:999px;
    background:#f1f1f1; color:#111827; display:flex; align-items:center; justify-content:center;
    font-weight:700; font-size:13px; margin-top:13px; position:relative;
  }
  body.job_create_test-page .lexoffice-position-row::after,
  body.job_edit_test-page .lexoffice-position-row::after {
    content:""; position:absolute; left:31px; top:14px; width:8px; height:8px; border-radius:999px; background:#0a9f6a;
  }
  body.job_create_test-page .lex-field,
  body.job_edit_test-page .lex-field { position:relative; min-width:0; }
  body.job_create_test-page .lex-field-article,
  body.job_edit_test-page .lex-field-article { grid-area:article; }
  body.job_create_test-page .lex-field-qty,
  body.job_edit_test-page .lex-field-qty { grid-area:qty; }
  body.job_create_test-page .lex-field-unit,
  body.job_edit_test-page .lex-field-unit { grid-area:unit; }
  body.job_create_test-page .lex-field-price,
  body.job_edit_test-page .lex-field-price { grid-area:price; }
  body.job_create_test-page .lex-field-discount,
  body.job_edit_test-page .lex-field-discount { grid-area:discount; }
  body.job_create_test-page .lex-field > label,
  body.job_edit_test-page .lex-field > label {
    position:absolute; top:-8px; left:10px; z-index:2; background:#fff; padding:0 5px;
    color:#6b7280; font-size:12px; font-weight:500; line-height:1.2;
  }
  body.job_create_test-page .lexoffice-position-row input,
  body.job_create_test-page .lexoffice-position-row textarea,
  body.job_create_test-page .lexoffice-position-row select,
  body.job_edit_test-page .lexoffice-position-row input,
  body.job_edit_test-page .lexoffice-position-row textarea,
  body.job_edit_test-page .lexoffice-position-row select {
    border:1px solid #c9c9c9 !important; border-radius:5px !important; background:#fff !important;
    color:#111827 !important; font-size:16px !important; font-weight:400 !important; box-shadow:none !important;
  }
  body.job_create_test-page .lexoffice-position-row .lexoffice-article-input,
  body.job_edit_test-page .lexoffice-position-row .lexoffice-article-input { width:100%; min-height:56px !important; padding:15px 13px !important; }
  body.job_create_test-page .lexoffice-position-row textarea[name="position_description[]"],
  body.job_edit_test-page .lexoffice-position-row textarea[name="position_description[]"] { grid-area:desc; min-height:56px !important; height:56px; resize:vertical; padding:15px 13px !important; width:100%; }
  body.job_create_test-page .lexoffice-position-row input[name="position_quantity[]"],
  body.job_edit_test-page .lexoffice-position-row input[name="position_quantity[]"] { width:100%; min-height:56px !important; text-align:right; padding:0 12px; }
  body.job_create_test-page .lexoffice-position-row input[name="position_unit[]"],
  body.job_edit_test-page .lexoffice-position-row input[name="position_unit[]"] { width:100%; min-height:56px !important; padding:0 12px; }
  body.job_create_test-page .lexoffice-position-row input[name="position_price[]"],
  body.job_edit_test-page .lexoffice-position-row input[name="position_price[]"] { width:100%; min-height:56px !important; text-align:right; padding:0 12px; }
  body.job_create_test-page .lex-discount-input,
  body.job_edit_test-page .lex-discount-input { display:flex; align-items:center; min-height:56px; border:1px solid #c9c9c9; border-radius:5px; padding:0 10px; background:#fff; }
  body.job_create_test-page .lex-discount-input input,
  body.job_edit_test-page .lex-discount-input input { border:0 !important; min-height:auto !important; text-align:right; padding:0 !important; width:100%; }
  body.job_create_test-page .lex-discount-input span,
  body.job_edit_test-page .lex-discount-input span { color:#111827; padding-left:5px; }
  body.job_create_test-page .position-line-stack,
  body.job_edit_test-page .position-line-stack { grid-area:stack; display:flex; flex-direction:column; align-items:flex-end; gap:7px; padding-top:13px; }
  body.job_create_test-page .position-line-stack .position-line-total,
  body.job_edit_test-page .position-line-stack .position-line-total { font-weight:800; font-size:16px; text-align:right; white-space:nowrap; color:#020617; line-height:1.1; }
  body.job_create_test-page .position-line-stack .position-tax-rate,
  body.job_edit_test-page .position-line-stack .position-tax-rate {
    width:auto !important; min-width:86px !important; min-height:28px !important; border-radius:999px !important;
    background:#3f3f3f !important; color:#fff !important; border:0 !important; padding:4px 9px !important;
    font-size:12px !important; font-weight:700 !important; margin:0 !important; text-align:center;
  }
  body.job_create_test-page .lexoffice-position-row .remove-position-row,
  body.job_edit_test-page .lexoffice-position-row .remove-position-row { grid-area:del; width:30px !important; height:30px !important; min-width:30px !important; margin-top:12px; background:transparent !important; color:#777 !important; box-shadow:none !important; }
  body.job_create_test-page .lexoffice-position-actions,
  body.job_edit_test-page .lexoffice-position-actions { display:flex !important; justify-content:center !important; align-items:center; gap:18px !important; padding:8px 0 24px !important; }
  body.job_create_test-page .lexoffice-position-actions .btn,
  body.job_edit_test-page .lexoffice-position-actions .btn { border:0 !important; background:transparent !important; color:#26313f !important; box-shadow:none !important; text-transform:uppercase; letter-spacing:.035em; font-size:13px; font-weight:600; }
  body.job_create_test-page .lexoffice-position-actions .lex-add-article,
  body.job_edit_test-page .lexoffice-position-actions .lex-add-article { border:1px solid #19b978 !important; color:#05a66b !important; border-radius:6px !important; padding:0 14px !important; background:#fff !important; }
  body.job_create_test-page .lexoffice-position-actions .btn span,
  body.job_edit_test-page .lexoffice-position-actions .btn span { display:inline-flex; align-items:center; justify-content:center; margin-right:6px; font-weight:600; }
  body.job_create_test-page .lexoffice-total-discount-row,
  body.job_edit_test-page .lexoffice-total-discount-row { display:none !important; }
  body.job_create_test-page .lexoffice-total-discount-row.is-visible,
  body.job_edit_test-page .lexoffice-total-discount-row.is-visible {
    display:grid !important; grid-template-columns:42px minmax(340px,1fr) 232px 260px 120px 34px; gap:10px 8px;
    align-items:start; padding:8px 72px 24px 38px; margin:0 !important; border:0 !important; background:#fff !important;
  }
  body.job_create_test-page .total-discount-marker,
  body.job_edit_test-page .total-discount-marker { width:32px; height:32px; border-radius:999px; background:#f1f1f1; display:flex; align-items:center; justify-content:center; font-weight:700; color:#555; margin-top:12px; }
  body.job_create_test-page .lexoffice-total-discount-row input,
  body.job_create_test-page .lexoffice-total-discount-row select,
  body.job_edit_test-page .lexoffice-total-discount-row input,
  body.job_edit_test-page .lexoffice-total-discount-row select { min-height:56px; border:1px solid #c9c9c9; border-radius:5px; font-size:16px; background:#fff; }
  body.job_create_test-page .total-discount-title input,
  body.job_edit_test-page .total-discount-title input { width:100%; padding:0 13px; color:#9ca3af; }
  body.job_create_test-page .total-discount-kind,
  body.job_create_test-page .total-discount-value,
  body.job_edit_test-page .total-discount-kind,
  body.job_edit_test-page .total-discount-value { position:relative; }
  body.job_create_test-page .total-discount-kind label,
  body.job_create_test-page .total-discount-value label,
  body.job_edit_test-page .total-discount-kind label,
  body.job_edit_test-page .total-discount-value label { position:absolute; top:-8px; left:12px; padding:0 5px; background:#fff; color:#64748b; font-size:12px; font-weight:500; z-index:1; }
  body.job_create_test-page .total-discount-kind select,
  body.job_edit_test-page .total-discount-kind select { width:100%; padding:0 13px; color:#111827; opacity:1; }
  body.job_create_test-page .total-discount-input,
  body.job_edit_test-page .total-discount-input { display:flex; align-items:center; min-height:56px; border:1px solid #c9c9c9; border-radius:5px; padding:0 12px; }
  body.job_create_test-page .total-discount-input input,
  body.job_edit_test-page .total-discount-input input { border:0 !important; min-height:auto; flex:1; text-align:right; padding:0; }
  body.job_create_test-page .total-discount-input span,
  body.job_edit_test-page .total-discount-input span { padding-left:6px; }
  body.job_create_test-page .total-discount-amount,
  body.job_edit_test-page .total-discount-amount { text-align:right; font-weight:800; padding-top:18px; color:#111; white-space:nowrap; }
  body.job_create_test-page .positions-summary-bar,
  body.job_edit_test-page .positions-summary-bar { margin:0 !important; background:#5d5d5d; color:#fff; min-height:86px; display:flex !important; justify-content:flex-end; align-items:stretch; border-radius:0 0 12px 12px; overflow:hidden; }
  body.job_create_test-page .positions-summary-box,
  body.job_edit_test-page .positions-summary-box { min-width:150px; padding:16px 26px; display:flex; flex-direction:column; justify-content:center; }
  body.job_create_test-page .positions-summary-box.dark,
  body.job_edit_test-page .positions-summary-box.dark { min-width:190px; background:#444; }
  body.job_create_test-page .positions-summary-box span,
  body.job_edit_test-page .positions-summary-box span { font-size:12px; font-weight:700; letter-spacing:.02em; text-transform:none; }
  body.job_create_test-page .positions-summary-box strong,
  body.job_edit_test-page .positions-summary-box strong { font-size:30px; line-height:1.1; font-weight:800; }
}


/* V2.2.7 - Aufträge Test: Lexoffice-Positionslayout Feinschliff Desktop */
@media (min-width: 781px) {
  body.job_create_test-page .lexoffice-position-actions .btn,
  body.job_edit_test-page .lexoffice-position-actions .btn {
    font-weight:500 !important;
    letter-spacing:.02em !important;
  }
  body.job_create_test-page .lexoffice-position-actions .btn span,
  body.job_edit_test-page .lexoffice-position-actions .btn span { font-weight:500 !important; }

  body.job_create_test-page .position-rows,
  body.job_edit_test-page .position-rows { padding:8px 40px 8px 38px !important; }

  body.job_create_test-page .lexoffice-position-row,
  body.job_edit_test-page .lexoffice-position-row {
    grid-template-columns:42px minmax(360px,1fr) 92px 132px 152px 106px 128px 34px !important;
    grid-template-areas:"num article qty unit price discount stack del" ". desc desc desc desc desc stack del" !important;
    column-gap:10px !important;
  }

  body.job_create_test-page .lex-field-article,
  body.job_edit_test-page .lex-field-article {
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    min-width:0 !important;
  }
  body.job_create_test-page .lex-field-article > label,
  body.job_edit_test-page .lex-field-article > label { display:block !important; }
  body.job_create_test-page .lex-field-article .lexoffice-article-input,
  body.job_edit_test-page .lex-field-article .lexoffice-article-input {
    display:block !important;
    width:100% !important;
    min-height:56px !important;
    box-sizing:border-box !important;
  }

  body.job_create_test-page .lex-discount-input,
  body.job_edit_test-page .lex-discount-input {
    box-sizing:border-box !important;
    width:100% !important;
    min-width:0 !important;
    overflow:hidden !important;
  }
  body.job_create_test-page .lex-discount-input input,
  body.job_edit_test-page .lex-discount-input input {
    min-width:0 !important;
    width:100% !important;
    box-sizing:border-box !important;
  }

  body.job_create_test-page .position-line-stack,
  body.job_edit_test-page .position-line-stack {
    padding-top:12px !important;
    align-items:flex-end !important;
  }
  body.job_create_test-page .position-line-stack .position-tax-rate,
  body.job_edit_test-page .position-line-stack .position-tax-rate {
    position:static !important;
    transform:none !important;
    margin-top:4px !important;
    min-width:94px !important;
    max-width:112px !important;
  }

  body.job_create_test-page .lexoffice-position-row .remove-position-row,
  body.job_edit_test-page .lexoffice-position-row .remove-position-row {
    font-size:16px !important;
    border:0 !important;
  }

  body.job_create_test-page .lexoffice-total-discount-row.is-visible,
  body.job_edit_test-page .lexoffice-total-discount-row.is-visible {
    grid-template-columns:42px minmax(360px,1fr) 220px 240px 128px 34px !important;
    padding-right:40px !important;
  }

  body.job_create_test-page .lexoffice-autocomplete-menu,
  body.job_edit_test-page .lexoffice-autocomplete-menu {
    position:absolute;
    left:52px;
    top:58px;
    width:min(520px, calc(100% - 52px));
    max-height:320px;
    overflow:auto;
    background:#fff;
    border:1px solid rgba(15,23,42,.16);
    border-radius:10px;
    box-shadow:0 18px 45px rgba(15,23,42,.18);
    z-index:50;
    display:none;
    padding:6px;
  }
  body.job_create_test-page .lexoffice-autocomplete-menu.is-open,
  body.job_edit_test-page .lexoffice-autocomplete-menu.is-open { display:block; }
  body.job_create_test-page .lexoffice-autocomplete-menu button,
  body.job_edit_test-page .lexoffice-autocomplete-menu button {
    width:100%;
    border:0;
    background:#fff;
    text-align:left;
    padding:10px 12px;
    border-radius:8px;
    display:flex;
    flex-direction:column;
    gap:3px;
    cursor:pointer;
  }
  body.job_create_test-page .lexoffice-autocomplete-menu button:hover,
  body.job_edit_test-page .lexoffice-autocomplete-menu button:hover { background:#f4f6f8; }
  body.job_create_test-page .lexoffice-autocomplete-menu strong,
  body.job_edit_test-page .lexoffice-autocomplete-menu strong { font-weight:600; color:#111827; }
  body.job_create_test-page .lexoffice-autocomplete-menu span,
  body.job_create_test-page .lexoffice-autocomplete-menu small,
  body.job_edit_test-page .lexoffice-autocomplete-menu span,
  body.job_edit_test-page .lexoffice-autocomplete-menu small { color:#64748b; font-size:12px; }
}

/* V2.2.7 - Aufträge Test: Artikelspalte sichtbar, Buttongewicht dünn, Gesamtrabatt editierbar */
@media (min-width: 781px) {
  body.job_create_test-page .job-positions-box .position-row .lex-field-article,
  body.job_edit_test-page .job-positions-box .position-row .lex-field-article {
    display:block !important;
    grid-area:article !important;
    min-width:0 !important;
    z-index:2 !important;
  }
  body.job_create_test-page .job-positions-box .position-row:not(.is-free-position) .lex-field-article .position-free-input,
  body.job_edit_test-page .job-positions-box .position-row:not(.is-free-position) .lex-field-article .position-free-input,
  body.job_create_test-page .job-positions-box .position-row .lex-field-article input[name="position_free_service[]"],
  body.job_edit_test-page .job-positions-box .position-row .lex-field-article input[name="position_free_service[]"] {
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    width:100% !important;
    min-height:56px !important;
    box-sizing:border-box !important;
  }
  body.job_create_test-page .lexoffice-position-actions .btn,
  body.job_edit_test-page .lexoffice-position-actions .btn,
  body.job_create_test-page .lexoffice-position-actions .btn span,
  body.job_edit_test-page .lexoffice-position-actions .btn span {
    font-weight:400 !important;
  }
  body.job_create_test-page .lex-field-discount,
  body.job_edit_test-page .lex-field-discount { min-width:0 !important; overflow:visible !important; }
  body.job_create_test-page .lex-discount-input,
  body.job_edit_test-page .lex-discount-input { width:100% !important; max-width:100% !important; box-sizing:border-box !important; }
  body.job_create_test-page .total-discount-input input,
  body.job_edit_test-page .total-discount-input input {
    pointer-events:auto !important;
    user-select:text !important;
    background:#fff !important;
  }
}

/* V2.2.10 - Aufträge Test: Freitext wie Lexoffice + Einheiten-Dropdown */
@media (min-width: 781px) {
  body.job_create_test-page .lexoffice-position-row select[name="position_unit[]"],
  body.job_edit_test-page .lexoffice-position-row select[name="position_unit[]"] {
    width:100%; min-height:56px !important; padding:0 12px !important; appearance:auto !important;
  }
  body.job_create_test-page .lexoffice-position-row.is-text-position,
  body.job_edit_test-page .lexoffice-position-row.is-text-position {
    grid-template-columns:42px minmax(520px,1fr) 34px !important;
    grid-template-areas:"num article del" ". desc del" !important;
    padding-bottom:22px !important;
  }
  body.job_create_test-page .lexoffice-position-row.is-text-position .lex-field-qty,
  body.job_create_test-page .lexoffice-position-row.is-text-position .lex-field-unit,
  body.job_create_test-page .lexoffice-position-row.is-text-position .lex-field-price,
  body.job_create_test-page .lexoffice-position-row.is-text-position .lex-field-discount,
  body.job_create_test-page .lexoffice-position-row.is-text-position .position-line-stack,
  body.job_edit_test-page .lexoffice-position-row.is-text-position .lex-field-qty,
  body.job_edit_test-page .lexoffice-position-row.is-text-position .lex-field-unit,
  body.job_edit_test-page .lexoffice-position-row.is-text-position .lex-field-price,
  body.job_edit_test-page .lexoffice-position-row.is-text-position .lex-field-discount,
  body.job_edit_test-page .lexoffice-position-row.is-text-position .position-line-stack {
    display:none !important;
  }
  body.job_create_test-page .lexoffice-position-row.is-text-position textarea[name="position_description[]"],
  body.job_edit_test-page .lexoffice-position-row.is-text-position textarea[name="position_description[]"] {
    min-height:132px !important;
    height:132px !important;
    line-height:1.45 !important;
  }
  body.job_create_test-page .lexoffice-position-row.is-text-position::after,
  body.job_edit_test-page .lexoffice-position-row.is-text-position::after {
    background:#64748b !important;
  }
}

/* V2.3 Werkstattblätter / Aufträge Test Kundendaten */
.workshop-sheets-head { align-items: center; gap: 16px; }
.workshop-sheets-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.workshop-sheets-table input[type="checkbox"] { width:18px; height:18px; accent-color: var(--accent, #ff7a1a); }
.customer-master-field.is-readonly,
.customer-address-field.is-readonly,
.customer-master-field[readonly] {
    background: rgba(248,250,252,.82);
    color: #64748b;
    border-color: rgba(148,163,184,.35);
    cursor: default;
}
.customer-edit-actions { align-items:center; }
@media (max-width: 760px) {
    .workshop-sheets-actions { justify-content:flex-start; }
}


/* V2.3.1 Werkstattblätter: Liste exakt im Aufträge-Stil, Auto-Filter ohne Button */
body.workshop_sheets-page .content > .tasks-head-modern,
body.workshop_sheets-page .content > .tasks-filter-modern,
body.workshop_sheets-page .content > form > .tasks-table-panel {
  margin-left: 30px !important;
  margin-right: 30px !important;
}
body.workshop_sheets-page .content > .tasks-head-modern { margin-top: 28px !important; }
body.workshop_sheets-page .tasks-filter-modern {
  background: #fff !important;
  border: 1px solid rgba(17,24,39,.08) !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 28px rgba(15,23,42,.06) !important;
  padding: 14px !important;
}
body.workshop_sheets-page .tasks-filter-modern-grid {
  display: grid !important;
  grid-template-columns: 190px 170px 190px minmax(260px,1fr) !important;
  gap: 10px !important;
  align-items: center !important;
}
body.workshop_sheets-page .tasks-filter-modern input,
body.workshop_sheets-page .tasks-filter-modern select {
  min-height: 42px !important;
  border: 1px solid rgba(148,163,184,.38) !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #111827 !important;
  font-size: 14px !important;
  padding: 0 12px !important;
  box-shadow: none !important;
}
body.workshop_sheets-page .tasks-table-panel.glass,
body.workshop_sheets-page .tasks-table-panel,
body.workshop_sheets-page .jobs-table-panel {
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  background: #fff !important;
  border: 1px solid rgba(17,24,39,.08) !important;
  box-shadow: 0 10px 28px rgba(15,23,42,.06) !important;
  backdrop-filter: none !important;
  margin-top: 0 !important;
}
body.workshop_sheets-page .panel-head {
  padding: 16px 18px !important;
  border-bottom: 1px solid rgba(17,24,39,.08) !important;
  background: #fff !important;
}
body.workshop_sheets-page .panel-head h2 { margin: 0 0 4px 0 !important; font-size: 18px !important; color: #111827 !important; }
body.workshop_sheets-page .workshop-sheets-actions .btn {
  min-height: 36px !important;
  border-radius: 9px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 8px 11px !important;
}
body.workshop_sheets-page .tasks-table-wrap { width: 100% !important; overflow-x: auto !important; }
body.workshop_sheets-page .tasks-table {
  width: 100% !important;
  min-width: 1360px !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}
body.workshop_sheets-page .tasks-table th {
  padding: 14px 18px !important;
  background: #fff !important;
  border-bottom: 1px solid rgba(17,24,39,.08) !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: .04em !important;
  color: #64748b !important;
  font-weight: 500 !important;
  text-align: left !important;
  white-space: nowrap !important;
}
body.workshop_sheets-page .tasks-table td {
  padding: 17px 18px !important;
  border-bottom: 1px solid rgba(17,24,39,.07) !important;
  background: #fff !important;
  vertical-align: middle !important;
  text-align: left !important;
  font-weight: 400 !important;
}
body.workshop_sheets-page .tasks-table tr:hover td { background: #fbfdff !important; }
body.workshop_sheets-page .tasks-table tr:last-child td { border-bottom: 0 !important; }
body.workshop_sheets-page .tasks-table td strong,
body.workshop_sheets-page .task-cell strong,
body.workshop_sheets-page .customer-cell strong,
body.workshop_sheets-page .vehicle-cell strong,
body.workshop_sheets-page .job-category-cell strong {
  display: block;
  color: #111827;
  font-size: 14px;
  font-weight: 400 !important;
  margin-bottom: 5px;
}
body.workshop_sheets-page .tasks-table td span,
body.workshop_sheets-page .task-cell span,
body.workshop_sheets-page .customer-cell span,
body.workshop_sheets-page .vehicle-cell span {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 400 !important;
}
body.workshop_sheets-page .task-cell { min-width: 280px; width: 27%; }
body.workshop_sheets-page .customer-cell { min-width: 180px; }
body.workshop_sheets-page .vehicle-cell { min-width: 150px; color: #1f2937; }
body.workshop_sheets-page .job-category-cell { min-width: 150px; white-space: nowrap; }
body.workshop_sheets-page .workshop-status-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 7px 11px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  border: 1px solid transparent !important;
}
body.workshop_sheets-page .workshop-status-printed {
  background: #dcfce7 !important;
  color: #166534 !important;
  border-color: rgba(22,101,52,.12) !important;
}
body.workshop_sheets-page .workshop-status-open {
  background: #ffedd5 !important;
  color: #9a3412 !important;
  border-color: rgba(154,52,18,.12) !important;
}
body.workshop_sheets-page .workshop-sheets-table input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  accent-color: var(--accent, #f97316) !important;
}
body.workshop_sheets-page .workshop-sheets-table .btn {
  border-radius: 9px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  min-height: 34px !important;
  padding: 7px 10px !important;
}
@media (max-width: 900px) {
  body.workshop_sheets-page .content > .tasks-head-modern,
  body.workshop_sheets-page .content > .tasks-filter-modern,
  body.workshop_sheets-page .content > form > .tasks-table-panel {
    margin-left: 14px !important;
    margin-right: 14px !important;
  }
  body.workshop_sheets-page .tasks-filter-modern-grid { grid-template-columns: 1fr !important; }
  body.workshop_sheets-page .workshop-sheets-actions { justify-content: flex-start !important; }
}

/* V2.5 - Status Fahrzeug angenommen und Fahrzeugannahme-Workflow */
body.jobs-page .jobs-table td.job-actions-clean,
body.jobs-test-page .jobs-table td.job-actions-clean {
  min-width: 196px !important;
  width: 196px !important;
  white-space: normal !important;
  padding-right: 14px !important;
}
body.jobs-page .job-actions-clean > *,
body.jobs-test-page .job-actions-clean > * {
  margin-right: 0 !important;
}
body.jobs-page .job-action-icons,
body.jobs-test-page .job-action-icons {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  width: 100% !important;
  white-space: nowrap !important;
}
body.jobs-page .job-action-icons .inline-form,
body.jobs-test-page .job-action-icons .inline-form {
  display: inline-flex !important;
  margin: 0 !important;
}
body.jobs-page .job-action-icons .icon-btn,
body.jobs-test-page .job-action-icons .icon-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  padding: 0 !important;
  border-radius: 9px !important;
  font-size: 14px !important;
  display: inline-grid !important;
  place-items: center !important;
}
body.jobs-page .job-action-status-form,
body.jobs-test-page .job-action-status-form {
  display: flex !important;
  width: 100% !important;
  margin: 7px 0 0 0 !important;
  justify-content: flex-end !important;
}
body.jobs-page .job-action-status-form select,
body.jobs-test-page .job-action-status-form select {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 176px !important;
  height: 32px !important;
  border-radius: 9px !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  padding: 5px 26px 5px 9px !important;
}
body.jobs-page .ab-number-cell a,
body.jobs-test-page .ab-number-cell a {
  color: inherit !important;
  text-decoration: none !important;
}
body.jobs-page .ab-number-cell a:hover,
body.jobs-test-page .ab-number-cell a:hover {
  text-decoration: underline !important;
}
@media (max-width: 780px) {
  body.jobs-page .jobs-table td.job-actions-clean,
  body.jobs-test-page .jobs-table td.job-actions-clean {
    width: auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  body.jobs-page .job-actions-clean::before,
  body.jobs-test-page .job-actions-clean::before {
    flex: 0 0 112px !important;
  }
  body.jobs-page .job-action-icons,
  body.jobs-test-page .job-action-icons {
    width: auto !important;
    justify-content: flex-start !important;
  }
  body.jobs-page .job-action-status-form,
  body.jobs-test-page .job-action-status-form {
    display: none !important;
  }
  .mobile-discount-editor .mobile-flow-savebar.two {
    grid-template-columns: 1fr 1fr;
  }
}

/* V2.5.2: Warnhinweis fuer verknuepfte Lexoffice-AB beim Bearbeiten. */
.lexoffice-ab-edit-warning{margin-bottom:18px;border:1px solid rgba(245,158,11,.28);color:#92400e;}
.lexoffice-ab-edit-warning .small{display:block;margin-top:4px;}

/* V2.5.17: Abhaengige Lexoffice-AB-PDF-Checkbox optisch deaktivieren, aber sauber im bestehenden Stil halten. */
.checkbox-wrap.is-disabled { opacity: .52; }
.checkbox-wrap.is-disabled span { color: var(--muted); }

/* V2.5.17: Aufträge Test freigegeben + mobile Positionssumme wie Desktop anzeigen. */
@media (max-width: 780px) {
  body.job_create_test-page .positions-summary-bar,
  body.job_edit_test-page .positions-summary-bar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    margin: 14px 0 0 !important;
    background: #5d5d5d !important;
    color: #fff !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    min-height: 0 !important;
  }
  body.job_create_test-page .positions-summary-box,
  body.job_edit_test-page .positions-summary-box,
  body.job_create_test-page .positions-summary-box.dark,
  body.job_edit_test-page .positions-summary-box.dark {
    min-width: 0 !important;
    width: 100% !important;
    padding: 13px 15px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-bottom: 1px solid rgba(255,255,255,.12) !important;
  }
  body.job_create_test-page .positions-summary-box.dark,
  body.job_edit_test-page .positions-summary-box.dark {
    background: #444 !important;
    border-bottom: 0 !important;
  }
  body.job_create_test-page .positions-summary-box span,
  body.job_edit_test-page .positions-summary-box span {
    font-size: 12px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    opacity: .9 !important;
  }
  body.job_create_test-page .positions-summary-box strong,
  body.job_edit_test-page .positions-summary-box strong {
    font-size: 18px !important;
    line-height: 1.1 !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
  }
}


/* V2.5.17: Auftrags-Detailansicht darf die job-detail-page-Styles nicht auf den Body anwenden.
   Dadurch verschwindet der helle Rand/Strich links neben der Sidebar. */
body.job_view_test-page {
  display: block !important;
  padding: 0 !important;
  gap: 0 !important;
  background: #f7f8fb !important;
}
body.job_view_test-page > .app-shell {
  min-height: 100vh !important;
}

/* V2.5.17: Aufgaben-Details, Nachkontrollen-Aktionen und Tabelle ohne horizontalen Unsinn-Scroll */
@media (min-width: 781px) {
  body.aftercare-page .tasks-table-wrap {
    overflow-x: visible !important;
    width: 100% !important;
  }
  body.aftercare-page .tasks-table.aftercare-jobs-table,
  body.aftercare-page .aftercare-jobs-table {
    min-width: 0 !important;
    width: 100% !important;
    table-layout: fixed !important;
  }
  body.aftercare-page .aftercare-jobs-table th:nth-child(1),
  body.aftercare-page .aftercare-jobs-table td:nth-child(1) { width: 74px !important; }
  body.aftercare-page .aftercare-jobs-table th:nth-child(2),
  body.aftercare-page .aftercare-jobs-table td:nth-child(2) { width: 122px !important; }
  body.aftercare-page .aftercare-jobs-table th:nth-child(3),
  body.aftercare-page .aftercare-jobs-table td:nth-child(3) { width: 22% !important; }
  body.aftercare-page .aftercare-jobs-table th:nth-child(4),
  body.aftercare-page .aftercare-jobs-table td:nth-child(4) { width: 15% !important; }
  body.aftercare-page .aftercare-jobs-table th:nth-child(5),
  body.aftercare-page .aftercare-jobs-table td:nth-child(5) { width: 15% !important; }
  body.aftercare-page .aftercare-jobs-table th:nth-child(6),
  body.aftercare-page .aftercare-jobs-table td:nth-child(6) { width: 190px !important; }
  body.aftercare-page .aftercare-jobs-table th:nth-child(7),
  body.aftercare-page .aftercare-jobs-table td:nth-child(7) { width: 88px !important; }
  body.aftercare-page .aftercare-jobs-table th:nth-child(8),
  body.aftercare-page .aftercare-jobs-table td:nth-child(8) { width: 150px !important; }
  body.aftercare-page .aftercare-jobs-table th,
  body.aftercare-page .aftercare-jobs-table td {
    min-width: 0 !important;
    overflow-wrap: anywhere !important;
  }
  body.aftercare-page .tasks-table td.aftercare-actions-cell,
  body.aftercare-page .aftercare-actions-cell {
    display: table-cell !important;
    white-space: normal !important;
    min-width: 0 !important;
  }
  body.aftercare-page .aftercare-action-buttons {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    margin: 0 0 8px 0 !important;
    white-space: nowrap !important;
  }
  body.aftercare-page .aftercare-action-buttons > * {
    margin: 0 !important;
  }
  body.aftercare-page .aftercare-status-form {
    display: block !important;
    margin: 0 !important;
    width: 100% !important;
  }
  body.aftercare-page .aftercare-status-form select {
    width: 100% !important;
    min-width: 0 !important;
  }
}
@media (max-width: 780px) {
  body.aftercare-page .aftercare-action-buttons {
    display: flex !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }
}

/* V2.5.29 - Lexoffice-AB-PDF Mailversand entdoppelt */
body.mail_queue-page .tasks-head-modern,
body.mail_queue-page .tasks-filter-modern,
body.mail_queue-page .mail-queue-info,
body.mail_queue-page .mail-queue-panel{
    max-width:1280px;
    margin-left:auto !important;
    margin-right:auto !important;
}
body.mail_queue-page .mail-queue-panel{padding:18px !important;border-radius:22px;overflow:visible !important;}
body.mail_queue-page .mail-queue-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
body.mail_queue-page .mail-queue-actions .inline-form{display:inline-flex;margin:0;}
body.mail_queue-page .mail-queue-error-preview{color:#9a3412 !important;}
body.mail_queue-page .due-cell span{display:block;margin-top:4px;color:var(--muted,#64748b);font-size:12px;font-weight:500;}
body.mail_queue-page .status-badge.status-open{background:#ffedd5 !important;color:#9a3412 !important;border:1px solid rgba(154,52,18,.14) !important;}
body.mail_queue-page .status-badge.status-high{background:#fee2e2 !important;color:#991b1b !important;border:1px solid rgba(153,27,27,.14) !important;}
body.mail_queue-page .status-badge.status-done{background:#dcfce7 !important;color:#166534 !important;border:1px solid rgba(22,101,52,.12) !important;}
body.mail_queue-page .status-badge.status-muted{background:#f1f5f9 !important;color:#475569 !important;border:1px solid rgba(71,85,105,.12) !important;}

@media (max-width: 760px){
    body.mail_queue-page .tasks-head-modern,
    body.mail_queue-page .tasks-filter-modern,
    body.mail_queue-page .mail-queue-info,
    body.mail_queue-page .mail-queue-panel{
        width:calc(100% - 24px) !important;
        margin-left:12px !important;
        margin-right:12px !important;
    }
    body.mail_queue-page .mail-queue-panel{padding:16px !important;overflow:visible !important;}
    body.mail_queue-page .mail-queue-table thead{display:none;}
    body.mail_queue-page .mail-queue-table,
    body.mail_queue-page .mail-queue-table tbody,
    body.mail_queue-page .mail-queue-table tr,
    body.mail_queue-page .mail-queue-table td{display:block;width:100% !important;max-width:none !important;min-width:0 !important;box-sizing:border-box;}
    body.mail_queue-page .mail-queue-table{border-spacing:0 !important;}
    body.mail_queue-page .mail-queue-table tr{
        border:1px solid rgba(15,23,42,.08) !important;
        border-radius:20px !important;
        padding:16px !important;
        margin-bottom:12px !important;
        background:#fff !important;
        box-shadow:0 10px 28px rgba(15,23,42,.04);
    }
    body.mail_queue-page .mail-queue-table td{border:0 !important;padding:8px 0 !important;}
    body.mail_queue-page .mail-queue-table td:before{
        content:attr(data-label);
        display:block;
        margin-bottom:4px;
        color:var(--muted,#64748b);
        font-size:11px;
        font-weight:650;
        text-transform:uppercase;
        letter-spacing:.04em;
    }
    body.mail_queue-page .mail-queue-table td:nth-child(1){padding-bottom:10px !important;}
    body.mail_queue-page .mail-queue-table .task-cell strong{font-size:17px;line-height:1.25;margin-bottom:7px;}
    body.mail_queue-page .mail-queue-table .task-cell span,
    body.mail_queue-page .mail-queue-table .customer-cell strong,
    body.mail_queue-page .mail-queue-table .due-cell strong{font-size:14px;line-height:1.45;}
    body.mail_queue-page .mail-queue-actions{gap:10px;align-items:stretch;}
    body.mail_queue-page .mail-queue-actions .btn{flex:1;justify-content:center;border-radius:14px;padding:12px 16px;}
    body.mail_queue-page .mail-queue-actions .inline-form{flex:0 0 auto;}
    body.mail_queue-page .mail-queue-actions .icon-btn{width:44px;height:44px;}
    body.mail_queue-page .mail-detail-dialog{width:100%;max-height:calc(100vh - 24px);border-radius:18px;padding:18px;}
    body.mail_queue-page .mail-detail-meta{grid-template-columns:1fr;}
}

/* V2.5.33 - Rechnungs-Overlay im Auftragsdetail */
.invoice-modal-form { display:flex; flex-direction:column; gap:12px; }
.invoice-modal-form label { color:#111827; font-size:14px; }
.invoice-modal-form select { width:100%; min-height:44px; border:1px solid #d1d5db; border-radius:14px; padding:10px 12px; background:#fff; color:#111827; font-size:14px; }
.invoice-modal-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:6px; flex-wrap:wrap; }
@media (max-width: 760px) {
  .invoice-modal-actions { flex-direction:column-reverse; }
  .invoice-modal-actions .btn { width:100%; justify-content:center; }
}

/* V2.5.34 - Auftragsliste PC-Slide-In und Datums-Buttons */
.date-icon-btn{min-width:44px;padding-left:12px!important;padding-right:12px!important;font-size:16px;line-height:1;}
.planned-pickup-picker{grid-template-columns:minmax(180px,1fr) auto auto;}
body.jobs-page .jobs-table tbody tr[data-job-quick]{cursor:pointer;}
body.jobs-page .jobs-table tbody tr[data-job-quick]:hover{background:rgba(249,115,22,.04);}
.job-quick-drawer{display:none;}
@media (min-width:901px){
  .job-quick-drawer{display:block;position:fixed;inset:0;z-index:80;pointer-events:none;}
  .job-quick-drawer-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.12);opacity:0;transition:opacity .18s ease;}
  .job-quick-drawer-panel{position:absolute;right:0;top:0;height:100%;width:min(430px,34vw);background:#fff;border-left:1px solid rgba(226,232,240,.95);box-shadow:-24px 0 48px rgba(15,23,42,.18);transform:translateX(105%);transition:transform .22s ease;overflow:auto;padding:24px;outline:none;}
  .job-quick-drawer.is-open{pointer-events:auto;}
  .job-quick-drawer.is-open .job-quick-drawer-backdrop{opacity:1;}
  .job-quick-drawer.is-open .job-quick-drawer-panel{transform:translateX(0);}
  .job-quick-close{position:absolute;right:16px;top:14px;border:0;background:rgba(15,23,42,.06);border-radius:999px;width:34px;height:34px;font-size:22px;line-height:1;cursor:pointer;color:#334155;}
  .job-quick-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding-right:36px;margin-bottom:16px;}
  .job-quick-head h2{font-size:22px;line-height:1.2;margin:2px 0 0;font-weight:600;color:#0f172a;}
  .job-quick-actions{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px;}
  .job-quick-section{border:1px solid rgba(226,232,240,.95);border-radius:18px;padding:14px 15px;margin:12px 0;background:#fff;}
  .job-quick-section h3{font-size:14px;text-transform:uppercase;letter-spacing:.04em;color:#64748b;margin:0 0 10px;font-weight:700;}
  .job-quick-section p{margin:4px 0;line-height:1.45;}
  .job-quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0;}
  .job-quick-grid>div{border:1px solid rgba(226,232,240,.95);border-radius:16px;padding:12px;background:#f8fafc;}
  .job-quick-grid span{display:block;font-size:12px;color:#64748b;margin-bottom:4px;font-weight:600;}
  .job-quick-grid strong{display:block;font-size:14px;color:#0f172a;font-weight:600;line-height:1.35;}
  .job-quick-note{white-space:pre-wrap;background:#f8fafc;border:1px solid rgba(226,232,240,.95);border-radius:14px;padding:12px;color:#334155;font-size:14px;line-height:1.45;max-height:170px;overflow:auto;}
}
@media (max-width:780px){.planned-pickup-picker{grid-template-columns:minmax(0,1fr) auto}.planned-pickup-picker input[type="text"]{min-width:0}.planned-pickup-picker .date-icon-btn{width:54px}}

/* V2.5.37 - Slide-In: getrennte Karten für Statusinfo, Beschreibung und interne Notizen */


/* V2.5.37 - Schnellnotiz direkt im Auftrags-Slide-In */
.job-quick-note-form {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.job-quick-note-form textarea {
    width: 100%;
    min-height: 82px;
    resize: vertical;
    border: 1px solid var(--border-color, #d8dde6);
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
}
.job-quick-note-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.job-quick-note-form-row .btn {
    white-space: nowrap;
}


/* V2.6: Kontextbox beim Weiterführen vorbereiteter Termine */
.prepared-event-context-box { margin-bottom: 18px; }
.prepared-event-context-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.prepared-event-context-grid .full { grid-column: 1 / -1; }
.prepared-event-description { padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.58); border: 1px solid rgba(15,23,42,.08); line-height: 1.45; }
@media (max-width: 720px) { .prepared-event-context-grid { grid-template-columns: 1fr; } }

/* V2.6: Protokollansicht / Unternehmens-Timeline */
.activity-log-head { margin-bottom: 16px; }
.activity-log-filter-grid { align-items: end; margin-bottom: 16px; }
.activity-log-filter-grid button { min-height: 42px; }
.activity-log-panel .panel-head { align-items: center; }
.activity-log-table-wrap { overflow-x: visible; }
.activity-log-table th,
.activity-log-table td { vertical-align: top; }
.activity-log-table td:first-child { white-space: nowrap; }
.activity-log-table td:nth-child(2) { min-width: 150px; }
.activity-log-table td:nth-child(3) { min-width: 150px; }
.activity-note-preview { max-width: 420px; line-height: 1.45; color: var(--text, #111827); }
.activity-log-mobile-list { display: none; }
.activity-log-card {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 18px;
    background: rgba(255,255,255,.9);
    padding: 14px;
    box-shadow: 0 10px 28px rgba(15,23,42,.06);
}
.activity-log-card + .activity-log-card { margin-top: 12px; }
.activity-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 8px; }
.activity-log-card h3 { margin: 0 0 6px; font-size: 16px; }
.activity-log-card p { margin: 10px 0 0; line-height: 1.45; }
@media (max-width: 760px) {
    .activity-log-table-wrap { display: none; }
    .activity-log-mobile-list { display: block; }
    .activity-log-filter-grid { grid-template-columns: 1fr; }
}

/* V2.6.15: Backup-Auswahl und Löschaktion optisch an Aufträge angelehnt */
.status-charged,
.job-status-charged {
  background:#f3f4f6 !important;
  color:#374151 !important;
}
body.zu_verrechnen-page .zu-verrechnen-summary { margin-bottom:16px; }
body.zu_verrechnen-page .zu-verrechnen-table td span { display:block; }
body.zu_verrechnen-page .invoice-modal-jobbox {
  background:#f8fafc;
  border:1px solid rgba(15,23,42,.08);
  border-radius:16px;
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:4px;
  margin-bottom:14px;
}
@media(max-width:760px){
  body.zu_verrechnen-page .zu-verrechnen-table .btn { width:100%; justify-content:center; }
}

/* V2.6.7: Zu verrechnen nutzt die Aufträge-Tabellenoptik ohne eigenes Fremddesign. */
body.zu-verrechnen-page .tasks-head-modern,
body.zu-verrechnen-page .tasks-filter-modern,
body.zu-verrechnen-page .tasks-table-panel {
  max-width: 100%;
}
body.zu-verrechnen-page .zu-verrechnen-table {
  width: 100%;
}
body.zu-verrechnen-page .zu-verrechnen-table th,
body.zu-verrechnen-page .zu-verrechnen-table td {
  vertical-align: middle;
}
body.zu-verrechnen-page .zu-verrechnen-table .status-badge {
  display: inline-flex;
}


/* V2.6.15 Backup & Wiederherstellung */
.backup-bulk-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;flex-wrap:wrap}
.backup-select-cell{width:44px;text-align:center}
.backup-select-cell input[type="checkbox"]{width:18px;height:18px;accent-color:#f28c28}
.backup-mobile-list{display:none}
.backup-mobile-card{border:1px solid var(--border-soft, rgba(255,255,255,.12));border-radius:16px;padding:14px;background:var(--card-bg, rgba(255,255,255,.04));margin-bottom:12px}
.backup-mobile-card-head{display:flex;gap:10px;align-items:flex-start;justify-content:space-between}
.backup-mobile-meta{display:grid;gap:4px;margin:10px 0;color:var(--muted, #6b7280);font-size:.9rem}
@media (max-width: 760px){.backup-desktop-table{display:none}.backup-mobile-list{display:block}.backup-bulk-actions{align-items:stretch}.backup-bulk-actions .topbar-actions{width:100%;justify-content:flex-start}}


/* V2.6.16: Nachkontrollen mobil exakt an Aufträge-Status-Badges angleichen */
@media (max-width: 780px) {
  body.aftercare-page .aftercare-jobs-table .job-mobile-status.status-badge {
    display: inline-flex !important;
    align-items: center !important;
    width: fit-content !important;
    margin-top: 7px !important;
    padding: 7px 11px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
  }
}


/* V2.7.3 Kundenbereich: optisch an Aufträge angeglichen */
body.customers-page .content,
body.customer_edit-page .content{max-width:1440px;}
.customers-head{margin-bottom:18px;}
.customers-filter{margin-bottom:18px;align-items:end;}
.customers-table-card{border-radius:22px;overflow:hidden;border:1px solid rgba(15,23,42,.08);box-shadow:0 14px 38px rgba(15,23,42,.06);}
.customers-table-wrap{width:100%;overflow-x:auto;}
.customers-table{width:100%;border-collapse:separate;border-spacing:0;}
.customers-table th{background:#f8fafc;color:#64748b;font-size:11px;text-transform:uppercase;letter-spacing:.08em;font-weight:800;padding:14px 16px;border-bottom:1px solid rgba(15,23,42,.08);text-align:left;white-space:nowrap;}
.customers-table td{padding:15px 16px;border-bottom:1px solid rgba(15,23,42,.07);vertical-align:middle;color:#0f172a;}
.customers-table tbody tr:hover{background:#fff7ed;}
.customers-table tbody tr:last-child td{border-bottom:0;}
.customers-table .actions-col{width:240px;text-align:right;}
.customers-table .actions-cell{display:flex;gap:8px;justify-content:flex-end;align-items:center;flex-wrap:wrap;}
.customers-table-footer{display:flex;justify-content:space-between;gap:12px;padding:13px 16px;border-top:1px solid rgba(15,23,42,.08);background:#fbfcfe;font-size:13px;color:#475569;}
.customer-contact-preview{margin-top:6px;color:#64748b;}
.linklike{background:none;border:0;padding:0;margin:0;color:inherit;text-align:left;cursor:pointer;font:inherit;}
.linklike:hover{text-decoration:underline;}
.empty-cell{text-align:center;padding:28px!important;}
.customer-drawer{display:none;}
@media (min-width: 981px){
  .customer-drawer{display:block;position:fixed;inset:0;z-index:90;pointer-events:none;}
  .customer-drawer-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.12);opacity:0;transition:opacity .18s ease;}
  .customer-drawer-panel{position:absolute;right:0;top:0;height:100%;width:min(460px,36vw);background:#fff;border-left:1px solid rgba(226,232,240,.95);box-shadow:-24px 0 48px rgba(15,23,42,.18);transform:translateX(105%);transition:transform .22s ease;overflow:auto;padding:24px;outline:none;}
  .customer-drawer.is-open{pointer-events:auto;}
  .customer-drawer.is-open .customer-drawer-backdrop{opacity:1;}
  .customer-drawer.is-open .customer-drawer-panel{transform:translateX(0);}
}
.customer-drawer-close{position:absolute;right:16px;top:14px;width:36px;height:36px;border:0;border-radius:12px;background:#f1f5f9;color:#0f172a;font-size:24px;line-height:1;cursor:pointer;}
.customer-drawer-head{padding-right:42px;margin-bottom:18px;}
.customer-drawer-head h2{margin:10px 0 2px;font-size:26px;letter-spacing:-.04em;}
.customer-drawer-section{border:1px solid rgba(15,23,42,.08);border-radius:18px;padding:16px;margin-bottom:14px;background:#fff;}
.customer-drawer-section h3{margin:0 0 12px;font-size:16px;}
.customer-drawer-list{display:grid;grid-template-columns:120px 1fr;gap:8px 12px;margin:0;}
.customer-drawer-list dt{font-size:11px;text-transform:uppercase;letter-spacing:.08em;font-weight:800;color:#64748b;}
.customer-drawer-list dd{margin:0;color:#0f172a;word-break:break-word;}
.customer-contact-card{border:1px solid rgba(15,23,42,.08);background:#f8fafc;border-radius:14px;padding:12px;margin-bottom:10px;display:flex;flex-direction:column;gap:3px;}
.customer-contact-card span,.customer-contact-card small{color:#64748b;}
.customer-drawer-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px;}
.customer-edit-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:18px;margin-bottom:18px;}
.customer-edit-card{border-radius:22px;border:1px solid rgba(15,23,42,.08);box-shadow:0 14px 38px rgba(15,23,42,.06);padding:20px;}
.section-head{display:flex;justify-content:space-between;gap:14px;align-items:center;margin-bottom:14px;}
.section-head h2{margin:0;font-size:19px;letter-spacing:-.02em;}
.customer-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.customer-form-grid label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:800;color:#475569;text-transform:uppercase;letter-spacing:.06em;}
.customer-form-grid input,.customer-form-grid select{width:100%;border:1px solid rgba(15,23,42,.14);border-radius:14px;padding:11px 12px;font-size:14px;background:#fff;color:#0f172a;text-transform:none;letter-spacing:0;font-weight:500;}
.customer-form-grid .span-2{grid-column:span 2;}
.customer-form-grid .checkbox-line{flex-direction:row;align-items:center;text-transform:none;letter-spacing:0;font-size:14px;font-weight:700;color:#0f172a;}
.customer-form-grid .checkbox-line input{width:auto;}
.customer-form-grid .form-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.inline-form{display:inline-flex;margin:0;}
.customer-contact-modal[hidden]{display:none!important;}
.customer-contact-modal{position:fixed;inset:0;z-index:95;display:flex;align-items:center;justify-content:center;padding:20px;}
.customer-modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.32);}
.customer-modal-panel{position:relative;width:min(620px,96vw);background:#fff;border-radius:22px;padding:24px;box-shadow:0 24px 70px rgba(15,23,42,.28);}
.customer-modal-panel h2{margin:0 44px 18px 0;}
.customers-mobile-list{display:flex;flex-direction:column;gap:12px;}
.customer-mobile-card{border-radius:18px;border:1px solid rgba(15,23,42,.08);box-shadow:0 10px 28px rgba(15,23,42,.06);}
.customer-mobile-card .mobile-card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px;}
@media (max-width: 980px){
  .customer-edit-grid{grid-template-columns:1fr;}
  .customer-form-grid{grid-template-columns:1fr;}
  .customer-form-grid .span-2{grid-column:auto;}
  .customers-filter{display:block;}
  .customers-filter .filter-actions{margin-top:12px;}
}

/* V2.7.3 Kundenbereich final: exakt an Aufträge-Tabellenoptik angepasst */
body.customers-page .content,
body.customer_edit-page .content{
  max-width:none !important;
}
body.customers-page .content > .tasks-head-modern,
body.customers-page .content > .filter-bar,
body.customers-page .content > .customers-table-card,
body.customers-page .content > .customers-mobile-list,
body.customer_edit-page .content > .tasks-head-modern,
body.customer_edit-page .content > .customer-edit-grid,
body.customer_edit-page .content > .customers-table-card{
  margin-left:30px !important;
  margin-right:30px !important;
}
body.customers-page .content > .tasks-head-modern,
body.customer_edit-page .content > .tasks-head-modern{
  margin-top:28px !important;
}
body.customers-page .customers-table-card,
body.customer_edit-page .customers-table-card{
  padding:0 !important;
  overflow:hidden !important;
  border-radius:14px !important;
  background:#fff !important;
  border:1px solid rgba(17,24,39,.08) !important;
  box-shadow:0 10px 28px rgba(15,23,42,.06) !important;
  backdrop-filter:none !important;
  margin-top:0 !important;
}
body.customers-page .customers-table-wrap,
body.customer_edit-page .customers-table-wrap{
  width:100% !important;
  overflow-x:auto !important;
}
body.customers-page .customers-table,
body.customer_edit-page .customers-table{
  width:100% !important;
  min-width:1120px !important;
  table-layout:fixed !important;
  border-collapse:separate !important;
  border-spacing:0 !important;
}
body.customers-page .customers-table .customer-col-name{width:23%;}
body.customers-page .customers-table .customer-col-contact{width:19%;}
body.customers-page .customers-table .customer-col-address{width:20%;}
body.customers-page .customers-table .customer-col-contacts{width:15%;}
body.customers-page .customers-table .customer-col-lexoffice{width:10%;}
body.customers-page .customers-table .customer-col-updated{width:10%;}
body.customers-page .customers-table .customer-col-actions{width:220px;}
body.customers-page .customers-table th,
body.customer_edit-page .customers-table th{
  background:#f8fafc !important;
  color:#64748b !important;
  font-size:12px !important;
  line-height:1.2 !important;
  text-transform:none !important;
  letter-spacing:0 !important;
  font-weight:500 !important;
  padding:14px 16px !important;
  border-bottom:1px solid rgba(15,23,42,.08) !important;
  text-align:left !important;
  white-space:nowrap !important;
}
body.customers-page .customers-table td,
body.customer_edit-page .customers-table td{
  padding:14px 16px !important;
  border-bottom:1px solid rgba(15,23,42,.07) !important;
  vertical-align:middle !important;
  color:#0f172a !important;
  font-weight:400 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
body.customers-page .customers-table tbody tr:hover,
body.customer_edit-page .customers-table tbody tr:hover{
  background:rgba(249,115,22,.06) !important;
}
body.customers-page .customers-table .actions-col,
body.customer_edit-page .customers-table .actions-col{
  width:220px !important;
  text-align:right !important;
}
body.customers-page .customers-table .actions-cell,
body.customer_edit-page .customers-table .actions-cell{
  min-width:220px !important;
  display:flex !important;
  gap:7px !important;
  justify-content:flex-end !important;
  align-items:center !important;
  flex-wrap:nowrap !important;
  white-space:nowrap !important;
  overflow:visible !important;
}
body.customers-page .customers-table-footer,
body.customer_edit-page .customers-table-footer{
  display:flex !important;
  justify-content:space-between !important;
  gap:12px !important;
  padding:13px 16px !important;
  border-top:1px solid rgba(15,23,42,.08) !important;
  background:#fbfcfe !important;
  font-size:13px !important;
  color:#475569 !important;
}
body.customers-page .status-badge,
body.customer_edit-page .status-badge{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:7px 11px !important;
  border-radius:8px !important;
  font-size:12px !important;
  line-height:1 !important;
  font-weight:500 !important;
  white-space:nowrap !important;
  border:0 !important;
}
body.customers-page .job-status-ready,
body.customer_edit-page .job-status-ready{
  background:#dcfce7 !important;
  color:#16a34a !important;
}
body.customers-page .job-status-invoiced,
body.customer_edit-page .job-status-invoiced{
  background:#f3f4f6 !important;
  color:#374151 !important;
}
body.customers-page .filter-bar,
body.customer_edit-page .customer-edit-card{
  border-radius:14px !important;
}
body.customers-page .filter-bar input{
  min-height:44px !important;
}
@media (max-width:980px){
  body.customers-page .content > .tasks-head-modern,
  body.customers-page .content > .filter-bar,
  body.customers-page .content > .customers-table-card,
  body.customers-page .content > .customers-mobile-list,
  body.customer_edit-page .content > .tasks-head-modern,
  body.customer_edit-page .content > .customer-edit-grid,
  body.customer_edit-page .content > .customers-table-card{
    margin-left:14px !important;
    margin-right:14px !important;
  }
  body.customer_edit-page .customer-edit-grid{grid-template-columns:1fr !important;}
}


/* V2.7.4 Kundenbereich Feinschliff: Tabellenbreite, Kontaktbereich, Live-Suche */
body.customers-page .customers-table,
body.customer_edit-page .customers-table{
  min-width:0 !important;
  table-layout:fixed !important;
}
body.customers-page .customers-table .customer-col-name{width:20% !important;}
body.customers-page .customers-table .customer-col-contact{width:17% !important;}
body.customers-page .customers-table .customer-col-address{width:18% !important;}
body.customers-page .customers-table .customer-col-contacts{width:16% !important;}
body.customers-page .customers-table .customer-col-lexoffice{width:10% !important;}
body.customers-page .customers-table .customer-col-updated{width:130px !important;}
body.customers-page .customers-table .customer-col-actions{width:285px !important;}
body.customers-page .customers-table td:nth-child(6){white-space:nowrap !important;font-size:13px !important;color:#64748b !important;}
body.customers-page .customers-table td:nth-child(7){overflow:visible !important;}
body.customers-page .customers-table .actions-cell{min-width:0 !important;width:100% !important;}
body.customers-page .customers-table .actions-cell .btn{flex:0 0 auto !important;}
body.customer_edit-page .customer-edit-grid{align-items:start !important;}
body.customer_edit-page .customer-edit-card{overflow:hidden !important;}
body.customer_edit-page .customer-form-grid{align-items:end !important;}
body.customer_edit-page .customer-form-grid label{min-width:0 !important;}
body.customer_edit-page .customer-form-grid input,
body.customer_edit-page .customer-form-grid select{min-width:0 !important;}
body.customer_edit-page .customer-contacts-table{min-width:900px !important;}
body.customer_edit-page .customer-contacts-table .contact-col-name{width:22% !important;}
body.customer_edit-page .customer-contacts-table .contact-col-mail{width:27% !important;}
body.customer_edit-page .customer-contacts-table .contact-col-phone{width:18% !important;}
body.customer_edit-page .customer-contacts-table .contact-col-status{width:130px !important;}
body.customer_edit-page .customer-contacts-table .contact-col-actions{width:230px !important;}
body.customer_edit-page .customer-contacts-table td{white-space:normal !important;word-break:break-word !important;}
body.customer_edit-page .customer-contacts-table td.actions-cell{white-space:nowrap !important;word-break:normal !important;}
body.customer_edit-page .customer-contacts-table .actions-cell{justify-content:flex-end !important;gap:8px !important;}
body.customer_edit-page .customer-contacts-table .inline-form{display:inline-flex !important;}
body.customer_edit-page .customer-contact-modal .customer-form-grid{align-items:end !important;}
body.customers-page .customers-filter .filter-actions{align-self:end !important;}
@media (max-width:980px){
  body.customers-page .customers-filter .filter-actions{margin-top:10px !important;}
  body.customer_edit-page .customer-contacts-table{min-width:0 !important;}
}


/* V2.7.5 Kundenbereich Stabilisierung + einklappbare Sidebar */
.mobile-only-list{display:none !important;}
.desktop-only-table{display:block !important;}
@media (max-width:980px){
  .desktop-only-table{display:none !important;}
  .mobile-only-list{display:flex !important;}
}
body.customers-page .customers-table{table-layout:fixed !important;width:100% !important;}
body.customers-page .customers-table .customer-col-name{width:22% !important;}
body.customers-page .customers-table .customer-col-contact{width:18% !important;}
body.customers-page .customers-table .customer-col-address{width:20% !important;}
body.customers-page .customers-table .customer-col-contacts{width:17% !important;}
body.customers-page .customers-table .customer-col-lexoffice{width:9% !important;}
body.customers-page .customers-table .customer-col-updated{width:150px !important;}
body.customers-page .customers-table .customer-col-actions{width:260px !important;}
body.customers-page .customers-table td{overflow:hidden !important;text-overflow:ellipsis !important;}
body.customers-page .customers-table td:nth-child(6){white-space:nowrap !important;overflow:hidden !important;text-overflow:ellipsis !important;}
body.customers-page .customers-table td.actions-cell{overflow:visible !important;white-space:nowrap !important;}
body.customers-page .customers-table .actions-cell{display:flex !important;gap:8px !important;justify-content:flex-end !important;flex-wrap:nowrap !important;}
body.customer_edit-page .customers-table-card{overflow:hidden !important;}
body.customer_edit-page .customers-table-wrap{overflow-x:hidden !important;}
body.customer_edit-page .customer-contacts-table{width:100% !important;min-width:0 !important;table-layout:fixed !important;}
body.customer_edit-page .customer-contacts-table .contact-col-name{width:24% !important;}
body.customer_edit-page .customer-contacts-table .contact-col-mail{width:28% !important;}
body.customer_edit-page .customer-contacts-table .contact-col-phone{width:18% !important;}
body.customer_edit-page .customer-contacts-table .contact-col-status{width:135px !important;}
body.customer_edit-page .customer-contacts-table .contact-col-actions{width:210px !important;}
body.customer_edit-page .customer-contacts-table td{overflow:hidden !important;text-overflow:ellipsis !important;}
body.customer_edit-page .customer-contacts-table td.actions-cell{overflow:visible !important;}
body.customer_edit-page .customer-contacts-table .actions-cell{display:flex !important;gap:8px !important;justify-content:flex-end !important;flex-wrap:nowrap !important;}
body.customer_edit-page .customer-edit-grid{grid-template-columns:minmax(0,1.15fr) minmax(360px,.85fr) !important;gap:18px !important;}
@media (max-width:980px){
  body.customer_edit-page .customer-edit-grid{grid-template-columns:1fr !important;}
  body.customer_edit-page .customers-table-wrap{overflow-x:auto !important;}
}
.nav-section-toggle{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;background:transparent;border:0;color:inherit;font:inherit;text-align:left;padding:0;cursor:pointer;text-transform:inherit;letter-spacing:inherit;}
.nav-section-toggle::after{content:'▾';font-size:10px;opacity:.7;transition:transform .15s ease;}
.nav-collapsible-section.is-collapsed .nav-section-toggle::after{transform:rotate(-90deg);}
.nav-section-items{display:flex;flex-direction:column;gap:4px;}
.nav-collapsible-section.is-collapsed .nav-section-items{display:none;}
.nav-collapsible-section .nav-section-label{margin-top:14px;}
.nav-collapsible-section:first-child .nav-section-label{margin-top:0;}

/* V2.8 Kundenbereich Rework */
body.customer_create-page .content,
body.customer_detail-page .content{
  max-width: none !important;
  padding-left: 32px !important;
  padding-right: 32px !important;
}
body.customer_create-page .content > .tasks-head-modern,
body.customer_create-page .content > .fineart-customer-form-card,
body.customer_detail-page .content > .tasks-head-modern,
body.customer_detail-page .content > .customer-detail-grid,
body.customer_detail-page .content > .customers-table-card{
  width: 100% !important;
  max-width: 1720px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.customer-smart-form{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:16px !important;align-items:end !important;}
.customer-smart-form .span-2{grid-column:1/-1 !important;}
.customer-smart-form label{min-width:0 !important;}
.customer-smart-form input,.customer-smart-form select{width:100% !important;min-width:0 !important;}
.customer-subsection-title{padding-top:10px;border-top:1px solid rgba(15,23,42,.08);}
.customer-subsection-title h2{margin:0 0 4px;font-size:18px;font-weight:700;}
.customer-detail-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(360px,.9fr);gap:18px;margin-bottom:18px;}
.customer-facts-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.customer-facts-grid > div{background:#f8fafc;border:1px solid rgba(15,23,42,.07);border-radius:16px;padding:14px;}
.customer-facts-grid span{display:block;text-transform:uppercase;letter-spacing:.06em;font-size:11px;color:#64748b;margin-bottom:5px;}
.customer-facts-grid strong{font-size:14px;color:#0f172a;font-weight:650;line-height:1.35;}
body.customers-page .customers-table .customer-col-number{width:105px !important;}
body.customers-page .customers-table .customer-col-name{width:20% !important;}
body.customers-page .customers-table .customer-col-contact{width:17% !important;}
body.customers-page .customers-table .customer-col-address{width:18% !important;}
body.customers-page .customers-table .customer-col-contacts{width:16% !important;}
body.customers-page .customers-table .customer-col-lexoffice{width:9% !important;}
body.customers-page .customers-table .customer-col-updated{width:145px !important;}
body.customers-page .customers-table .customer-col-actions{width:245px !important;}
@media (max-width: 900px){
 body.customer_create-page .content,body.customer_detail-page .content{padding-left:16px !important;padding-right:16px !important;}
 .customer-smart-form{grid-template-columns:1fr !important;}
 .customer-detail-grid{grid-template-columns:1fr;}
 .customer-facts-grid{grid-template-columns:1fr;}
}


/* V2.8.3 Kundenbereich Stabilisierung: gleiche Tabellen-/Kartenoptik wie Aufträge */
body.customers-page .content,
body.customer_detail-page .content,
body.customer_edit-page .content{max-width:1680px !important;margin:0 auto !important;padding-left:24px !important;padding-right:24px !important;}
body.customers-page .customers-table-card,
body.customer_detail-page .customers-table-card,
body.customer_edit-page .customers-table-card,
body.customer_edit-page .customer-edit-card,
body.customer_detail-page .customer-edit-card{width:100% !important;box-sizing:border-box !important;border-radius:22px !important;border:1px solid rgba(15,23,42,.08) !important;box-shadow:0 14px 38px rgba(15,23,42,.06) !important;background:#fff !important;}
body.customers-page .customers-table{table-layout:fixed !important;width:100% !important;}
body.customers-page .customers-table .customer-col-number{width:96px !important;}
body.customers-page .customers-table .customer-col-name{width:20% !important;}
body.customers-page .customers-table .customer-col-contact{width:17% !important;}
body.customers-page .customers-table .customer-col-address{width:18% !important;}
body.customers-page .customers-table .customer-col-contacts{width:17% !important;}
body.customers-page .customers-table .customer-col-lexoffice{width:8% !important;}
body.customers-page .customers-table .customer-col-updated{width:120px !important;}
body.customers-page .customers-table .customer-col-actions{width:270px !important;}
body.customers-page .customers-table td,
body.customer_detail-page .customers-table td,
body.customer_edit-page .customers-table td{padding:14px 16px !important;vertical-align:middle !important;}
body.customers-page .customers-table td:not(.actions-cell){overflow:hidden !important;text-overflow:ellipsis !important;}
body.customers-page .customer-updated-cell{white-space:nowrap !important;font-size:12px !important;color:#64748b !important;}
body.customers-page .customer-updated-cell span{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;}
body.customers-page .customers-table .actions-cell{overflow:visible !important;display:flex !important;gap:8px !important;justify-content:flex-end !important;align-items:center !important;flex-wrap:nowrap !important;white-space:nowrap !important;}
body.customers-page .customers-table .actions-cell .btn{flex:0 0 auto !important;}
body.customer_edit-page .fineart-customer-form-card{padding:22px !important;margin-bottom:18px !important;}
body.customer_edit-page .customer-edit-grid{display:grid !important;grid-template-columns:1fr !important;gap:18px !important;margin-bottom:18px !important;}
body.customer_edit-page .customer-edit-grid .customer-edit-card,
body.customer_edit-page .customers-table-card{padding:20px !important;margin:0 0 18px 0 !important;}
body.customer_edit-page .customer-form-grid{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:14px 16px !important;}
body.customer_edit-page .customer-form-grid .span-2{grid-column:1 / -1 !important;}
body.customer_edit-page .customer-contacts-table{table-layout:fixed !important;width:100% !important;}
body.customer_edit-page .customer-contacts-table th,
body.customer_edit-page .customer-contacts-table td{padding:14px 16px !important;}
body.customer_edit-page .customer-contacts-table .actions-cell{display:flex !important;justify-content:flex-end !important;gap:8px !important;flex-wrap:nowrap !important;}
body.customer_detail-page .customer-detail-grid{display:grid !important;grid-template-columns:minmax(0,1fr) minmax(360px,.75fr) !important;gap:18px !important;margin-bottom:18px !important;}
body.customer_detail-page .customer-activity-card{padding:0 !important;overflow:hidden !important;}
body.customer_detail-page .customer-activity-card .section-head{padding:18px 20px 0 !important;}
body.customer_detail-page .customer-activity-table{table-layout:fixed !important;width:100% !important;}
body.customer_detail-page .customer-activity-table .actions-cell{display:flex !important;justify-content:flex-end !important;gap:8px !important;}
body.customer_detail-page .clickable-row{cursor:pointer;}
body.customer_detail-page .clickable-row:hover{background:#fff7ed;}
@media (max-width: 760px){
  body.customers-page .content, body.customer_detail-page .content, body.customer_edit-page .content{padding-left:14px !important;padding-right:14px !important;}
  body.customer_edit-page .customer-form-grid{grid-template-columns:1fr !important;}
  body.customer_detail-page .customer-detail-grid{grid-template-columns:1fr !important;}
}
/* V2.8.4 Aufträge: Follow-Up-Mailsteuerung vom Auftraggeber-Ansprechpartner getrennt */
.followup-mail-control-box .followup-master-toggle{margin-bottom:14px;}
.followup-recipient-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;margin:8px 0 14px;}
.followup-recipient-fields[hidden]{display:none!important;}
.followup-recipient-fields input,.followup-recipient-fields select{width:100%;}
@media (max-width: 760px){.followup-recipient-fields{grid-template-columns:1fr;}}


.followup-channel-row{grid-column:1/-1;}
.followup-channel-options{display:flex;gap:10px;flex-wrap:wrap;margin-top:6px;}
.followup-channel-options .checkbox-wrap{min-width:140px;}
.ab-pdf-option{margin-top:10px;}


/* V2.10 Follow-Up-Nachrichten: sauberer Mail/WhatsApp-Umschalter */
.followup-mail-control-box {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
}
.followup-master-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-weight: 600;
}
.followup-channel-row {
  grid-column: 1/-1;
  margin-bottom: 4px;
}
.followup-channel-row > label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}
.followup-channel-options {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(145px, 1fr));
  gap: 10px;
  align-items: stretch;
  margin: 0 0 8px 0;
}
.followup-channel-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.followup-channel-choice:hover {
  background: #fff;
  border-color: rgba(255, 111, 15, .45);
  box-shadow: 0 8px 22px rgba(15,23,42,.06);
}
.followup-channel-choice input[type="radio"] {
  margin: 0;
  accent-color: #ff6f0f;
}
.followup-channel-choice:has(input[type="radio"]:checked) {
  background: rgba(255,111,15,.10);
  border-color: rgba(255,111,15,.55);
  box-shadow: inset 0 0 0 1px rgba(255,111,15,.08);
}
.followup-recipient-fields {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 2px;
}
.followup-recipient-fields[hidden] {
  display: none !important;
}
.followup-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 12px;
}
.followup-quick-actions .btn {
  border-radius: 14px;
  padding-inline: 16px;
}
.followup-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 12px 18px;
  align-items: center;
  margin-top: 10px;
}
.followup-options .checkbox-wrap {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #edf0f4;
  border-radius: 14px;
  background: #fbfcfe;
}
.followup-mail-control-box.is-followup-disabled .followup-quick-actions,
.followup-mail-control-box.is-followup-disabled .followup-options {
  opacity: .45;
}
@media (max-width: 900px) {
  .followup-recipient-fields,
  .followup-options {
    grid-template-columns: 1fr;
  }
  .followup-channel-options {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .followup-channel-choice {
    width: 100%;
  }
}


/* V2.10.3: Alle System-Badges einheitlich wie Auftrags-Status-Badges */
.status-badge,
.status-pill,
.pill,
.sync-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: max-content !important;
  min-height: 28px !important;
  padding: 7px 11px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}
.status-badge.status-muted,
.status-muted {
  background:#f1f5f9 !important;
  color:#475569 !important;
  border:1px solid rgba(71,85,105,.12) !important;
}
.status-badge.status-open,
.status-open {
  background:#ffedd5 !important;
  color:#9a3412 !important;
  border:1px solid rgba(154,52,18,.14) !important;
}
.status-badge.status-done,
.status-done {
  background:#dcfce7 !important;
  color:#166534 !important;
  border:1px solid rgba(22,101,52,.12) !important;
}
.status-badge.status-planned,
.status-planned {
  background:#dbeafe !important;
  color:#1d4ed8 !important;
  border:1px solid rgba(29,78,216,.12) !important;
}
.status-badge.status-high,
.status-high {
  background:#fee2e2 !important;
  color:#991b1b !important;
  border:1px solid rgba(153,27,27,.14) !important;
}
body.jobs-page .job-detail-card .followup-channel-badge {
  margin:0 !important;
}
body.jobs-page .job-detail-grid strong .followup-channel-badge {
  margin-top:0 !important;
}
