:root {
  --green: #176f3a;
  --green-dark: #0f4d29;
  --green-soft: #eaf4ed;
  --black: #151515;
  --white: #ffffff;
  --sand: #f7f7f2;
  --muted: #5f625f;
  --line: #dfe4de;
  --danger: #963d2c;
  --shadow: 0 12px 30px rgba(0, 0, 0, .10);
  --radius: 22px;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--white);
  color: var(--black);
}

.app-shell {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 14px 14px 28px;
  background: var(--white);
}

.hero {
  padding: 10px 0 16px;
  color: var(--black);
}





.logo-panel {
  background: var(--white);
  border: 2px solid #ebefea;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0,0,0,.07);
}

.brand-logo-img {
  display: block;
  width: 100%;
  height: auto;
}

.app-title-panel {
  text-align: center;
  padding: 18px 6px 10px;
  border-bottom: 4px solid var(--green);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 12px;
  font-weight: 950;
  opacity: .85;
}

.eyebrow.green {
  color: var(--green);
  opacity: 1;
}

h1, h2, h3 {
  margin: 4px 0 0;
  line-height: 1.08;
}

h1 {
  font-size: 36px;
  font-weight: 950;
}

h2 {
  font-size: 28px;
  font-weight: 950;
}

h3 {
  font-size: 19px;
  font-weight: 950;
}

.hero-copy {
  margin: 10px auto 0;
  color: var(--muted);
  line-height: 1.35;
  max-width: 390px;
}

.screen { display: none; }
.screen.active { display: block; }

.status-card, .form-card, .search-card, .admin-list-wrap, .welcome-card, .project-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 15px;
}

.status-card span, .muted {
  display: block;
  color: var(--muted);
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.4;
}

.welcome-card {
  margin-top: 10px;
}

.tile-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.tile {
  border: 1px solid var(--line);
  border-radius: 20px;
  min-height: 108px;
  background: var(--white);
  padding: 16px;
  text-align: left;
  box-shadow: var(--shadow);
  color: var(--black);
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  column-gap: 14px;
  cursor: pointer;
}

.tile:active, .primary-btn:active, .ghost-btn:active, .text-btn:active {
  transform: translateY(1px);
}

.tile-icon {
  grid-row: span 2;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green);
  font-size: 27px;
}

.tile span:not(.tile-icon) {
  font-size: 21px;
  font-weight: 950;
}

.tile small {
  color: var(--muted);
  font-size: 13px;
}

.dashboard-grid .tile {
  min-height: 102px;
}

.admin-entry {
  text-align: center;
  margin-top: 16px;
}

.back-btn {
  margin: 0 0 12px;
  background: var(--black);
  color: white;
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 950;
  box-shadow: 0 8px 20px rgba(0,0,0,.16);
}

.section-title {
  color: var(--black);
  margin-bottom: 14px;
}

.section-title .eyebrow {
  color: var(--green);
}

input, select, textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  background: var(--white);
  border-radius: 16px;
  padding: 14px 15px;
  font: inherit;
  margin: 6px 0 14px;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23,111,58,.12);
}

textarea { resize: vertical; }

.field-label {
  display: block;
  font-weight: 950;
  font-size: 14px;
  margin-top: 4px;
}

.site-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.site-btn {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 18px;
  padding: 14px;
  text-align: left;
  box-shadow: var(--shadow);
}

.site-btn strong {
  display: block;
  font-size: 16px;
}

.site-btn span {
  color: var(--muted);
  font-size: 13px;
}

.site-btn.selected {
  border-color: var(--green);
  outline: 3px solid rgba(23,111,58,.14);
}

.site-btn-top, .admin-item-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.selected-site, .mini-info {
  background: var(--green-soft);
  border: 1px solid #cfe2d5;
  padding: 12px;
  border-radius: 16px;
  margin-bottom: 10px;
  font-weight: 950;
}

.mini-info {
  background: #fafafa;
  color: var(--muted);
  font-weight: 850;
  font-size: 14px;
}

.photo-preview {
  width: 100%;
  min-height: 210px;
  background: #f1f3ef;
  border: 1px dashed #c9d2ca;
  border-radius: 20px;
  display: block;
  margin: 6px 0 14px;
}

.hint {
  background: #edf6ef;
  color: var(--green-dark);
  padding: 11px 12px;
  border-radius: 15px;
  margin: 10px 0 13px;
  font-size: 14px;
  line-height: 1.35;
}

.hidden { display: none !important; }

.primary-btn, .ghost-btn {
  width: 100%;
  border-radius: 17px;
  padding: 15px 16px;
  font-weight: 950;
  font-size: 15px;
  cursor: pointer;
}

.primary-btn {
  border: 0;
  background: linear-gradient(180deg, #242424, #050505);
  color: white;
  box-shadow: 0 10px 22px rgba(0,0,0,.20);
}

.ghost-btn {
  border: 2px solid var(--black);
  background: var(--white);
  color: var(--black);
  margin-top: 9px;
}

.text-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--green);
  font-weight: 950;
  text-decoration: underline;
  padding: 13px 8px 0;
  cursor: pointer;
}

.quick-actions { margin-top: 15px; }

.result {
  color: var(--green);
  font-weight: 950;
  line-height: 1.35;
}

.tools-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 8px 0 14px;
}

.file-btn { display: block; text-align: center; }
.file-btn input { display: none; }

.admin-list { display: grid; gap: 10px; }

.admin-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 13px;
  background: white;
  box-shadow: 0 8px 18px rgba(0,0,0,.06);
}

.badge {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 950;
  background: var(--green-soft);
  color: var(--green);
  height: fit-content;
  white-space: nowrap;
}

.badge.pruefung {
  background: #fff1c9;
  color: #8a5a00;
}

.badge.pausiert {
  background: #fff1d6;
  color: #765100;
}

.badge.abgeschlossen {
  background: #eeeeee;
  color: #666666;
}

.badge.inaktiv {
  background: #f3dddd;
  color: #85382b;
}

.item-actions {
  display: flex;
  gap: 8px;
  margin-top: 11px;
  flex-wrap: wrap;
}

.item-actions button {
  flex: 1;
  border: 1px solid var(--line);
  background: #fafafa;
  border-radius: 13px;
  padding: 10px;
  font-weight: 950;
  min-width: 95px;
}

.item-actions .delete {
  color: var(--danger);
}

.small-gap {
  margin-top: -2px;
  margin-bottom: 14px;
}

.admin-entry .ghost-btn {
  margin-bottom: 8px;
}

.lock-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}


@media (min-width: 760px) {
  .app-shell { max-width: 980px; }
  main { max-width: 520px; margin: 0 auto; }
}


.employee-admin-wrap {
  border: 2px solid rgba(23,111,58,.18);
}

.employee-form {
  margin-top: 12px;
}

.employee-tools {
  margin-top: -4px;
}

.employee-tools .primary-btn,
.employee-tools .ghost-btn {
  margin-top: 0;
}

.employee-item.inactive {
  opacity: .72;
  background: #fafafa;
}

.employee-list {
  margin-top: 12px;
}


.code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
}

.code-row input {
  margin-bottom: 14px;
}

.code-btn {
  width: auto;
  white-space: nowrap;
  padding-left: 14px;
  padding-right: 14px;
  margin-top: 6px;
}

code {
  background: #f1f3ef;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 2px 6px;
  font-weight: 950;
  color: var(--green);
}


.rapport-form .two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mini-btn {
  padding: 10px 12px;
  font-size: 13px;
  border-width: 1px;
  margin-top: -7px;
  margin-bottom: 10px;
}

.rapport-form input[type="file"] {
  border-style: dashed;
  background: #fafafa;
}

@media (max-width: 420px) {
  .rapport-form .two-col {
    grid-template-columns: 1fr;
  }
}


.time-display {
  background: var(--green-soft);
  border: 1px solid #cfe2d5;
  color: var(--green-dark);
  border-radius: 14px;
  padding: 10px 12px;
  margin: -6px 0 14px;
  font-weight: 900;
}

.dictation-tip {
  margin: -8px 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  background: #f8faf7;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
}


.open-rapport-card {
  background: #fff7e6;
  border: 2px solid #f0d59a;
  border-radius: var(--radius);
  padding: 15px;
  box-shadow: var(--shadow);
  margin-bottom: 15px;
}

.open-rapport-card span {
  display: block;
  color: var(--muted);
  margin: 5px 0 12px;
  font-size: 14px;
}

.open-rapport-card .primary-btn {
  padding: 12px 14px;
}

.version-pill {
  display:inline-block;
  margin-left:6px;
  font-size:11px;
  padding:2px 7px;
  border-radius:999px;
  background:#0b6b36;
  color:#fff;
  vertical-align:middle;
}

.file-btn input {
  display: none;
}

.multi-photo-summary {
  background: var(--green-soft);
  border: 1px solid #cfe2d5;
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--green-dark);
  font-weight: 900;
  margin: 8px 0 12px;
}

.multi-preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.multi-preview-card {
  display: grid;
  grid-template-columns: 84px 1fr 36px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  background: #fff;
}

.multi-preview-card img {
  width: 84px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  background: #f3f5f3;
}

.multi-preview-card strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.multi-preview-card span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  word-break: break-word;
}

.mini-remove {
  border: 0;
  background: #f3e6e6;
  color: #9d1c1c;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  font-size: 20px;
  font-weight: 900;
}

.signature-box {
  border: 2px dashed #b7c9bd;
  border-radius: 16px;
  background: #fbfdfb;
  padding: 10px;
  margin-bottom: 10px;
}

.signature-box canvas {
  width: 100%;
  height: 160px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  touch-action: none;
}

.signature-box p {
  margin: 7px 2px 0;
  color: var(--muted);
  font-size: 13px;
}

.autosave-info {
  background: #eef7f0;
  border: 1px solid #cfe2d5;
  color: var(--green-dark);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 10px;
}

.draft-image-info {
  background: #eef7f0;
  border: 1px solid #cfe2d5;
  color: var(--green-dark);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 850;
  margin: -6px 0 12px;
}

.admin-item .badge.freigegeben_zur_unterschrift,
.badge.freigegeben_zur_unterschrift { background: #e8f4ff; color: #0c4f80; }
.admin-item .badge.final_unterschrieben,
.badge.final_unterschrieben { background: #eef7f0; color: var(--green-dark); }

.rapport-options-wrap .two-col {
  align-items: start;
}
.mini-admin-list {
  margin-top: 12px;
}
.option-admin-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(20, 45, 37, 0.12);
  border-radius: 12px;
  background: rgba(255,255,255,0.65);
  margin-bottom: 8px;
}
.option-admin-row span {
  font-weight: 700;
}
.option-admin-row button {
  padding: 8px 10px;
  min-height: auto;
}
@media (max-width: 760px) {
  .option-admin-row {
    grid-template-columns: 1fr;
  }
}

#employeeCodeInput,
#employeeAdminCode {
  text-transform: uppercase;
}

.badge-stack { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }

.pdf-option-box {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid rgba(20,53,31,.18);
  border-radius: 14px;
  background: rgba(20,53,31,.06);
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 700;
}
.check-row input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}
.check-row small {
  display: inline-block;
  margin-top: 3px;
  font-weight: 500;
  color: var(--muted, #66726b);
}

.selected-option-list {
  margin: 8px 0 10px;
  padding: 10px;
  border: 1px dashed rgba(35, 54, 36, 0.22);
  border-radius: 12px;
  background: rgba(255,255,255,0.55);
}
.option-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 3px 4px 3px 0;
  padding: 6px 9px;
  border-radius: 999px;
  background: #edf4eb;
  border: 1px solid rgba(35, 54, 36, 0.18);
  font-weight: 700;
}
.option-chip button {
  min-height: auto;
  padding: 0 6px;
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
}
.small-inline-btn {
  width: auto;
  margin: 4px 0 10px;
  padding: 8px 12px;
}
.option-suggestion-row span small,
.option-admin-row span small {
  color: var(--muted);
  font-weight: 600;
}

/* V4.7.10 - Mehrfachauswahl Maschinen/Material */
.legacy-option-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.option-picker-open {
  width: 100%;
  margin: 6px 0 8px;
  padding: 13px 16px;
}
.option-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.42);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}
.option-picker-modal {
  width: min(720px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 24px 24px 18px 18px;
  padding: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
}
.option-picker-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(20,53,31,.12);
}
.option-picker-head strong {
  display: block;
  font-size: 1.35rem;
}
.option-picker-head small,
.option-picker-custom small {
  color: var(--muted, #66726b);
  font-weight: 600;
}
.option-picker-close {
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}
.option-picker-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}
.option-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(20,53,31,.15);
  border-radius: 14px;
  background: rgba(20,53,31,.04);
  font-weight: 800;
}
.option-picker-row input {
  width: 24px;
  height: 24px;
}

.option-picker-row-with-size {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.option-picker-main {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.kg-rohr-size-select {
  min-width: 120px;
  padding: 10px 12px;
  border: 1px solid rgba(20,53,31,.22);
  border-radius: 12px;
  background: #fff;
  font-weight: 800;
}
.kg-rohr-size-select:disabled {
  opacity: .45;
}

.option-picker-custom {
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(20,53,31,.05);
}
.option-picker-custom-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.option-picker-custom-row input {
  flex: 1;
}
.option-picker-custom-row button {
  width: auto;
  white-space: nowrap;
}
.option-picker-actions {
  position: sticky;
  bottom: -16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 12px;
  background: linear-gradient(to top, #fff 70%, rgba(255,255,255,0));
}
@media (max-width: 520px) {
  .option-picker-overlay { padding: 8px; }
  .option-picker-modal { max-height: 92vh; }
  .option-picker-custom-row { flex-direction: column; align-items: stretch; }
  .option-picker-custom-row button { width: 100%; }
  .option-picker-actions { grid-template-columns: 1fr; }
}

/* V4.7.13 - Rapport Validierung */
.field-error {
  border-color: #c62828 !important;
  box-shadow: 0 0 0 3px rgba(198, 40, 40, .14) !important;
  background: #fff7f7 !important;
}
.field-error-note {
  margin: 6px 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff0f0;
  color: #9b1c1c;
  font-weight: 800;
}
#rapportPdfResult strong {
  color: inherit;
}
.selected-option-list {
  min-height: 38px;
  padding: 10px 0;
}
.option-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 4px 4px 0;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(20,53,31,.09);
  font-weight: 800;
}
.option-chip button {
  width: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 50%;
  line-height: 1;
}


/* V4.8 Maschinenstandort Probelauf */
.machine-location-item small { color: var(--muted, #667085); }
.machine-location-item .admin-item-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.machine-location-admin-wrap { margin-top: 18px; }
#machineLocationSummary { margin-bottom: 14px; }
@media (max-width: 720px) {
  .machine-location-item .admin-item-top { align-items: flex-start; }
  .machine-location-item .admin-item-actions { justify-content: flex-start; margin-top: 10px; }
}

/* V4.8.2 - Masterbereich übersichtlicher mit Oberkategorien */
.admin-category {
  margin: 16px 0;
  border: 1px solid rgba(20,53,31,.14);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20,53,31,.06);
  overflow: hidden;
}
.admin-category > summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 900;
  list-style: none;
  background: linear-gradient(135deg, rgba(20,53,31,.08), rgba(20,53,31,.02));
}
.admin-category > summary::-webkit-details-marker { display: none; }
.admin-category > summary::after {
  content: "öffnen";
  font-size: .78rem;
  font-weight: 900;
  color: var(--brand, #14351f);
  background: #fff;
  border: 1px solid rgba(20,53,31,.18);
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
}
.admin-category[open] > summary::after { content: "schließen"; }
.admin-category > summary span {
  display: block;
  font-size: 1.05rem;
}
.admin-category > summary small {
  display: block;
  margin-top: 2px;
  color: var(--muted, #667085);
  font-weight: 700;
}
.admin-category > .admin-list-wrap,
.admin-category > .form-card {
  margin: 14px;
}
.option-accordion {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.option-category {
  border: 1px solid rgba(20,53,31,.12);
  border-radius: 14px;
  background: rgba(20,53,31,.025);
  overflow: hidden;
}
.option-category > summary {
  cursor: pointer;
  padding: 13px 14px;
  font-weight: 900;
  list-style: none;
}
.option-category > summary::-webkit-details-marker { display: none; }
.option-category > summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 50%;
  background: rgba(20,53,31,.12);
  color: var(--brand, #14351f);
}
.option-category[open] > summary::before { content: "−"; }
.option-category > form,
.option-category > .muted,
.option-category > .admin-list {
  margin: 0 14px 14px;
}
@media (max-width: 560px) {
  .admin-category > summary { align-items: flex-start; }
  .admin-category > summary::after { margin-top: 2px; }
  .admin-category > .admin-list-wrap,
  .admin-category > .form-card { margin: 10px; }
}

/* V4.8.7 - Mengen/Stunden direkt in der Rapport-Auswahl */
.option-picker-row-with-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.option-picker-main {
  display: flex;
  align-items: center;
  gap: 12px;
}
.option-picker-detail input,
.option-detail-input {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid rgba(0,0,0,.14);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
}
.option-detail-input:disabled {
  opacity: .45;
  background: #f3f3f3;
}
.option-picker-row-with-size .kg-rohr-size-select {
  width: 100%;
  margin-top: 8px;
}


/* V4.8.8 - bessere Bedienung im Maschinen-/Material-Auswahlfenster */
.option-picker-custom-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.option-picker-add-btn {
  width: 100%;
  min-height: 58px;
  border-radius: 18px;
  font-size: 17px;
  font-weight: 900;
  background: #ffffff;
  border: 3px solid #111111;
  color: #111111;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}
.option-picker-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding-top: 14px;
}
.option-picker-apply-btn {
  width: 100%;
  min-height: 64px;
  border-radius: 20px;
  border: 0;
  background: #111111;
  color: #ffffff;
  font-size: 20px;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(0,0,0,0.22);
}
.option-picker-apply-btn:active,
.option-picker-add-btn:active {
  transform: translateY(1px);
}
#optionPickerCancel {
  min-height: 58px;
}

/* V4.8.9 - Stunden pro Mitarbeiter im Rapport */
.worker-time-grid input {
  margin-top: 10px;
  min-height: 48px;
  font-size: 16px;
}
.worker-time-grid select {
  width: 100%;
}
@media (max-width: 620px) {
  .worker-time-grid {
    gap: 12px;
  }
}

/* V4.9 - Morgen mitnehmen / Material- und Gerätebedarf */
.dashboard-need-summary { margin: 14px 0 18px; }
.tomorrow-mini-card {
  border: 1.5px solid rgba(20,53,31,.18);
  background: rgba(20,53,31,.06);
  border-radius: 18px;
  padding: 14px 16px;
  display: grid;
  gap: 7px;
}
.tomorrow-mini-card strong { color: var(--brand, #14351f); font-size: 17px; }
.tomorrow-mini-card span { display: flex; justify-content: space-between; gap: 10px; }
.tomorrow-mini-card em { font-style: normal; opacity: .75; }
.compact-need-hint { margin-bottom: 0; }
.need-form-card { border-color: rgba(20,53,31,.22); }
.need-form-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}
.need-form-header strong { font-size: 20px; }
.need-form-header small { color: #5f6b63; }
.need-amount-grid input, .need-amount-grid select { width: 100%; }
.need-list { display: grid; gap: 12px; }
.need-card, .need-admin-card {
  border: 1.5px solid rgba(0,0,0,.12);
  border-radius: 18px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(0,0,0,.04);
}
.need-card.status-offen { border-left: 6px solid #d9a400; }
.need-card.status-eingepackt, .need-card.status-bereitgestellt { border-left: 6px solid #1976d2; }
.need-card.status-erledigt { border-left: 6px solid #1c7c3c; opacity: .75; }
.need-card.status-geht_nicht { border-left: 6px solid #b3261e; background: #fff7f6; }
.need-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.need-top strong { font-size: 18px; }
.need-card p { margin: 8px 0 0; color: #3f4a43; }
.need-actions, .admin-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.need-actions button, .admin-item-actions button {
  border: 1.5px solid rgba(0,0,0,.16);
  background: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 850;
}
.need-actions .delete, .admin-item-actions .delete { color: #8c2f1b; }
.need-actions .done-btn, .admin-item-actions .done-btn { color: #137333; }
.need-actions .warning-btn, .admin-item-actions .warning-btn { color: #b3261e; border-color: rgba(179,38,30,.35); background: #fff7f6; }
.badge.offen { background: #fff3cd; color: #7a5a00; }
.badge.eingepackt, .badge.bereitgestellt { background: #e3f2fd; color: #14599b; }
.badge.erledigt { background: #e6f4ea; color: #137333; }
.badge.geht_nicht { background: #fce8e6; color: #b3261e; }
@media (max-width: 620px) {
  .need-form-header { display: grid; }
  .need-top { display: grid; }
  .need-actions button, .admin-item-actions button { flex: 1 1 auto; min-height: 46px; }
}

/* V4.10 - Master-Fokus, Morgen-mitnehmen-Popup und wichtige Meldungen */
.priority-tile {
  border-color: rgba(20,53,31,.32);
  background: linear-gradient(135deg, rgba(20,53,31,.10), #fff 70%);
}
.master-focus-grid {
  display: grid;
  gap: 14px;
  margin: 14px 0 18px;
}
.master-focus-card {
  border: 1.5px solid rgba(20,53,31,.18);
  border-radius: 22px;
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}
.focus-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}
.focus-card-head h3 {
  margin: 2px 0 0;
  font-size: 21px;
}
.focus-pill {
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(20,53,31,.10);
  color: var(--green);
  font-weight: 900;
  font-size: 12px;
  white-space: nowrap;
}
.compact-message-form {
  margin-top: 12px;
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  font-weight: 800;
  color: #26342b;
}
.check-row input {
  width: 22px;
  height: 22px;
  margin-top: 1px;
}
.important-message-admin-card span {
  display: inline-block;
  margin: 5px 0;
  color: #2f3d34;
}
.startup-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,.48);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}
.startup-modal {
  width: min(720px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 26px 26px 18px 18px;
  padding: 18px;
  box-shadow: 0 22px 60px rgba(0,0,0,.25);
}
.startup-modal-head h2 {
  margin: 2px 0 10px;
  font-size: 24px;
}
.startup-message-list,
.startup-need-list {
  display: grid;
  gap: 10px;
  margin: 12px 0 16px;
}
.startup-message-card,
.startup-need-list div {
  border: 1.5px solid rgba(20,53,31,.14);
  border-radius: 16px;
  padding: 13px;
  background: rgba(20,53,31,.045);
}
.startup-message-card strong {
  display: block;
  font-size: 18px;
  margin-bottom: 5px;
}
.startup-message-card p {
  margin: 0 0 7px;
  line-height: 1.4;
}
.startup-need-list div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.startup-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (min-width: 900px) {
  .master-focus-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .focus-card-head,
  .startup-need-list div { display: grid; }
  .startup-modal-actions { grid-template-columns: 1fr; }
}

/* V4.11 - Büro/Desktop-Masteransicht und Prüfstatus oben */
.admin-item.priority-review,
.admin-item:has(.badge.pruefung),
.admin-item:has(.badge.zur_kontrolle) {
  border-color: rgba(138,90,0,.32);
  background: linear-gradient(135deg, rgba(255,241,201,.62), #fff 64%);
}

@media (min-width: 1000px) {
  body.master-desktop-mode {
    background: #f6f8f5;
  }

  body.master-desktop-mode .app-shell {
    max-width: 1440px;
    padding: 10px 22px 28px;
    background: #f6f8f5;
  }

  body.master-desktop-mode .hero {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 14px;
    align-items: stretch;
    padding: 0 0 12px;
  }

  body.master-desktop-mode .logo-panel {
    border-radius: 18px;
    box-shadow: 0 8px 18px rgba(0,0,0,.06);
  }

  body.master-desktop-mode .brand-logo-img {
    height: 105px;
    object-fit: contain;
    padding: 8px;
  }

  body.master-desktop-mode .app-title-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    padding: 14px 20px;
    border: 1px solid var(--line);
    border-bottom: 4px solid var(--green);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(0,0,0,.05);
  }

  body.master-desktop-mode h1 { font-size: 30px; }
  body.master-desktop-mode h2 { font-size: 24px; }
  body.master-desktop-mode h3 { font-size: 17px; }
  body.master-desktop-mode .hero-copy { margin: 4px 0 0; max-width: none; }

  body.master-desktop-mode main {
    max-width: none;
    margin: 0;
  }

  body.master-desktop-mode #admin.screen.active {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
  }

  body.master-desktop-mode #admin > .back-btn,
  body.master-desktop-mode #admin > .section-title,
  body.master-desktop-mode #admin > .master-focus-grid,
  body.master-desktop-mode #admin > .tools-row {
    grid-column: 1 / -1;
  }

  body.master-desktop-mode #admin > .section-title {
    margin-bottom: 0;
  }

  body.master-desktop-mode #admin > .back-btn {
    width: auto;
    justify-self: start;
    padding: 10px 14px;
    min-height: 0;
  }

  body.master-desktop-mode .master-focus-grid {
    grid-template-columns: 1.15fr .85fr;
    gap: 14px;
    margin: 0;
  }

  body.master-desktop-mode .master-focus-card,
  body.master-desktop-mode .admin-category,
  body.master-desktop-mode .admin-list-wrap,
  body.master-desktop-mode .form-card,
  body.master-desktop-mode .welcome-card,
  body.master-desktop-mode .status-card {
    border-radius: 16px;
    box-shadow: 0 7px 18px rgba(0,0,0,.055);
  }

  body.master-desktop-mode .master-focus-card,
  body.master-desktop-mode .admin-list-wrap,
  body.master-desktop-mode .form-card {
    padding: 12px;
    margin-bottom: 10px;
  }

  body.master-desktop-mode .admin-category {
    margin: 0;
  }

  body.master-desktop-mode .admin-category > summary {
    padding: 12px 14px;
  }

  body.master-desktop-mode .admin-category > .admin-list-wrap,
  body.master-desktop-mode .admin-category > .form-card {
    margin: 10px;
  }

  body.master-desktop-mode .admin-list {
    gap: 8px;
  }

  body.master-desktop-mode .admin-item,
  body.master-desktop-mode .need-card {
    border-radius: 14px;
    padding: 10px;
    box-shadow: none;
  }

  body.master-desktop-mode .admin-item-top {
    gap: 8px;
  }

  body.master-desktop-mode .admin-item-top strong,
  body.master-desktop-mode .need-top strong {
    font-size: 15px;
  }

  body.master-desktop-mode .admin-item span,
  body.master-desktop-mode .admin-item small,
  body.master-desktop-mode .muted,
  body.master-desktop-mode .hint {
    font-size: 12.5px;
    line-height: 1.3;
  }

  body.master-desktop-mode .hint {
    padding: 9px 10px;
    margin: 8px 0 10px;
  }

  body.master-desktop-mode .item-actions,
  body.master-desktop-mode .need-actions,
  body.master-desktop-mode .admin-item-actions,
  body.master-desktop-mode .tools-row {
    gap: 7px;
    margin-top: 8px;
  }

  body.master-desktop-mode .item-actions button,
  body.master-desktop-mode .need-actions button,
  body.master-desktop-mode .admin-item-actions button,
  body.master-desktop-mode .primary-btn,
  body.master-desktop-mode .ghost-btn {
    padding: 9px 11px;
    border-radius: 12px;
    font-size: 13px;
    min-height: 0;
  }

  body.master-desktop-mode input,
  body.master-desktop-mode select,
  body.master-desktop-mode textarea {
    padding: 10px 11px;
    min-height: 0;
    border-radius: 12px;
  }
}


/* V4.12 - Masterbereich am Büro-PC breiter, nicht gequetscht */
@media (min-width: 760px) {
  body.master-desktop-mode,
  body:has(#admin.screen.active) {
    background: #f6f8f5;
  }

  body.master-desktop-mode .app-shell,
  body:has(#admin.screen.active) .app-shell {
    width: min(1120px, calc(100vw - 32px));
    max-width: 1120px;
    padding: 10px 16px 28px;
    background: #f6f8f5;
  }

  body.master-desktop-mode .hero,
  body:has(#admin.screen.active) .hero {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    padding: 0 0 12px;
  }

  body.master-desktop-mode .logo-panel,
  body:has(#admin.screen.active) .logo-panel {
    border-radius: 18px;
    box-shadow: 0 8px 18px rgba(0,0,0,.06);
  }

  body.master-desktop-mode .brand-logo-img,
  body:has(#admin.screen.active) .brand-logo-img {
    height: 108px;
    object-fit: contain;
    padding: 8px;
  }

  body.master-desktop-mode .app-title-panel,
  body:has(#admin.screen.active) .app-title-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    padding: 14px 20px;
    border: 1px solid var(--line);
    border-bottom: 4px solid var(--green);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(0,0,0,.05);
  }

  body.master-desktop-mode .hero-copy,
  body:has(#admin.screen.active) .hero-copy {
    margin: 4px 0 0;
    max-width: none;
  }

  body.master-desktop-mode main,
  body:has(#admin.screen.active) main {
    max-width: none;
    width: 100%;
    margin: 0;
  }

  body.master-desktop-mode #admin.screen.active,
  body:has(#admin.screen.active) #admin.screen.active {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
  }

  body.master-desktop-mode #admin > .back-btn,
  body.master-desktop-mode #admin > .section-title,
  body.master-desktop-mode #admin > .master-focus-grid,
  body.master-desktop-mode #admin > .tools-row,
  body:has(#admin.screen.active) #admin > .back-btn,
  body:has(#admin.screen.active) #admin > .section-title,
  body:has(#admin.screen.active) #admin > .master-focus-grid,
  body:has(#admin.screen.active) #admin > .tools-row {
    grid-column: 1 / -1;
  }

  body.master-desktop-mode #admin > .section-title,
  body:has(#admin.screen.active) #admin > .section-title {
    margin-bottom: 0;
  }

  body.master-desktop-mode #admin > .back-btn,
  body:has(#admin.screen.active) #admin > .back-btn {
    width: auto;
    justify-self: start;
    padding: 10px 16px;
    min-height: 0;
  }

  body.master-desktop-mode .master-focus-grid,
  body:has(#admin.screen.active) .master-focus-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    margin: 0;
  }

  body.master-desktop-mode .master-focus-card,
  body:has(#admin.screen.active) .master-focus-card {
    padding: 18px;
    border-radius: 18px;
    min-width: 0;
  }

  body.master-desktop-mode .focus-card-head,
  body:has(#admin.screen.active) .focus-card-head {
    align-items: flex-start;
    gap: 16px;
  }

  body.master-desktop-mode .focus-card-head h3,
  body:has(#admin.screen.active) .focus-card-head h3 {
    font-size: 24px;
    line-height: 1.06;
  }

  body.master-desktop-mode .focus-pill,
  body:has(#admin.screen.active) .focus-pill {
    font-size: 13px;
    padding: 8px 12px;
    flex: 0 0 auto;
  }

  body.master-desktop-mode .admin-category,
  body.master-desktop-mode .admin-list-wrap,
  body.master-desktop-mode .form-card,
  body.master-desktop-mode .welcome-card,
  body.master-desktop-mode .status-card,
  body:has(#admin.screen.active) .admin-category,
  body:has(#admin.screen.active) .admin-list-wrap,
  body:has(#admin.screen.active) .form-card,
  body:has(#admin.screen.active) .welcome-card,
  body:has(#admin.screen.active) .status-card {
    border-radius: 18px;
    box-shadow: 0 7px 18px rgba(0,0,0,.055);
  }

  body.master-desktop-mode .admin-list-wrap,
  body.master-desktop-mode .form-card,
  body:has(#admin.screen.active) .admin-list-wrap,
  body:has(#admin.screen.active) .form-card {
    padding: 14px;
    margin-bottom: 12px;
  }

  body.master-desktop-mode .admin-category,
  body:has(#admin.screen.active) .admin-category {
    margin: 0;
  }

  body.master-desktop-mode .admin-category > summary,
  body:has(#admin.screen.active) .admin-category > summary {
    padding: 13px 16px;
  }

  body.master-desktop-mode .admin-category > .admin-list-wrap,
  body.master-desktop-mode .admin-category > .form-card,
  body:has(#admin.screen.active) .admin-category > .admin-list-wrap,
  body:has(#admin.screen.active) .admin-category > .form-card {
    margin: 10px;
  }
}

@media (min-width: 1180px) {
  body.master-desktop-mode .app-shell,
  body:has(#admin.screen.active) .app-shell {
    width: min(1240px, calc(100vw - 40px));
    max-width: 1240px;
  }

  body.master-desktop-mode #admin.screen.active,
  body:has(#admin.screen.active) #admin.screen.active {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
  }
}

@media (max-width: 900px) {
  body.master-desktop-mode .focus-card-head,
  body:has(#admin.screen.active) .focus-card-head {
    display: flex;
  }
}


.rapport-archive-list {
  display: grid;
  gap: 12px;
}
.rapport-archive-site {
  background: linear-gradient(135deg, rgba(20,53,31,.045), #fff 65%);
}
.rapport-archive-site-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.rapport-archive-report-list {
  display: grid;
  gap: 10px;
}
.rapport-archive-report {
  border: 1px solid rgba(20,53,31,.13);
  background: #fff;
  border-radius: 16px;
  padding: 12px;
}
.rapport-archive-report .sent-note {
  display: block;
  margin-top: 5px;
  color: var(--green);
  font-weight: 800;
}
.rapport-archive-actions button {
  min-width: 140px;
}
@media (min-width: 1100px) {
  body.master-desktop-mode .rapport-archive-list,
  body:has(#admin.screen.active) .rapport-archive-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  body.master-desktop-mode .rapport-archive-site-head,
  body:has(#admin.screen.active) .rapport-archive-site-head {
    align-items: center;
  }
}

/* V4.14 Kunden/CRM und feste Maschinen-vor-Ort-Funktion */
.customer-info-card {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(23,111,58,.16);
  border-radius: 16px;
  background: rgba(234,244,237,.72);
  display: grid;
  gap: 4px;
}
.customer-info-card strong {
  color: var(--green-dark);
}
.customer-info-card span,
.customer-info-card small {
  color: var(--muted);
  font-size: 13px;
}
.customer-info-card a {
  color: var(--green-dark);
  font-weight: 800;
  text-decoration: none;
}
.customer-crm-wrap .customer-crm-form {
  margin-top: 10px;
}
.customer-crm-grid {
  gap: 12px;
}
.customer-site-preview {
  margin-top: 6px;
  margin-bottom: 12px;
}
.customer-crm-list {
  margin-top: 12px;
}
.customer-crm-item .item-actions a.ghost-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(23,111,58,.22);
  background: #fff;
  color: var(--green-dark);
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
}
@media (min-width: 1180px) {
  body.master-desktop-mode .customer-crm-list,
  body:has(#admin.screen.active) .customer-crm-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

/* V4.15 - Morgen-mitnehmen-Katalog */
.tomorrow-catalog-form { gap: 12px; }
.tomorrow-catalog-list .option-admin-row span { line-height: 1.25; }
.tomorrow-catalog-row.inactive { opacity: .6; }
#tomorrowNeedUnit { background: #fff; color: #14351f; }
.need-form-card select + .field-label,
.need-form-card input + .field-label { margin-top: 14px; }
@media (min-width: 900px) {
  .tomorrow-catalog-form .option-admin-row { align-items: center; }
}


/* V4.44 - Packliste: echte Mehrfachauswahl als Checkbox-Liste */
.multi-need-picker {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  border: 1.5px solid rgba(20,53,31,.18);
  border-radius: 16px;
  background: #fff;
}
.multi-need-picker.disabled { background: #f7faf7; }
.need-pick-option {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid rgba(20,53,31,.12);
  border-radius: 14px;
  background: #f7fbf7;
  cursor: pointer;
}
.need-pick-option:hover { border-color: rgba(0,110,52,.35); background: #eef7ef; }
.need-pick-option input { width: 20px; height: 20px; accent-color: #0d6b34; }
.need-pick-option strong { display: block; }
.need-pick-option small { display: block; color: #5f6b63; margin-top: 2px; }
.small-help {
  font-size: 13px;
  margin: 6px 0 10px;
}
.need-selected-rows {
  display: grid;
  gap: 10px;
  margin: 10px 0 14px;
}
.need-selected-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 105px;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1.5px solid rgba(20,53,31,.16);
  border-radius: 16px;
  background: #f7fbf7;
}
.need-selected-row strong { display: block; }
.need-selected-row small { display: block; color: #5f6b63; margin-top: 2px; }
.need-selected-row input, .need-selected-row select { width: 100%; padding: 11px 10px; }
.need-selected-row select { background: #eef6ee; color: #14351f; border: 1.5px solid rgba(20,53,31,.16); border-radius: 12px; }
@media (max-width: 560px) {
  .need-selected-row { grid-template-columns: 1fr; }
  .multi-need-picker { max-height: 360px; }
}

/* V4.19 - Rapport Maschinen/Material: Details direkt pro Auswahl bearbeiten */
.selected-option-detail-row {
  display: grid;
  gap: 8px;
  margin: 8px 0;
  padding: 10px;
  border: 1px solid rgba(35, 54, 36, 0.16);
  border-radius: 14px;
  background: rgba(20, 53, 31, 0.045);
}
.selected-option-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.selected-option-remove {
  width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 50%;
  line-height: 1;
}
.selected-option-detail-label {
  display: grid;
  gap: 5px;
  font-weight: 800;
  font-size: 13px;
}
.selected-option-detail-field {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
}

/* V4.24 Master Morgen-mitnehmen gruppiert */
.need-site-group {
  border: 1px solid #d7e5db;
  border-radius: 18px;
  background: #fbfffc;
  padding: 14px;
  margin: 14px 0;
  box-shadow: 0 10px 28px rgba(0,0,0,.04);
}
.need-site-group-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 4px 2px 12px;
  border-bottom: 1px solid #e7eee9;
  margin-bottom: 10px;
}
.need-site-group-head strong {
  color: var(--green);
  font-size: 1.02rem;
}
.need-site-group-head small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.need-site-items {
  display: grid;
  gap: 8px;
}
.admin-tomorrow-quick-add {
  margin: 12px 0;
  padding: 12px;
  border: 1px dashed #b7cdbf;
  border-radius: 16px;
  background: #eef8f1;
}
.admin-tomorrow-quick-add strong,
.admin-tomorrow-quick-add small {
  display: block;
}
.admin-tomorrow-quick-add small {
  color: var(--muted);
  margin: 3px 0 10px;
}
.admin-need-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.admin-tomorrow-quick-add textarea {
  width: 100%;
  margin-top: 8px;
}
.admin-tomorrow-quick-add .primary-btn.small {
  width: auto;
  min-width: 220px;
  margin-top: 8px;
  padding: 10px 14px;
}
@media (max-width: 760px) {
  .admin-need-grid { grid-template-columns: 1fr; }
  .admin-tomorrow-quick-add .primary-btn.small { width: 100%; }
}


.signature-alert-card {
  margin-top: 14px;
  padding: 16px;
  border: 2px solid #f2c94c;
  border-radius: 18px;
  background: #fff7df;
  color: #3b2b00;
  display: grid;
  gap: 8px;
}
.signature-alert-card strong {
  font-size: 1.05rem;
}
.signature-alert-card span {
  color: #6b5600;
}
.signature-alert-card .primary-btn {
  width: 100%;
}

/* V4.27 Packliste / Aufgaben */
.need-folder { margin-top: 14px; padding: 12px; border: 1px solid rgba(25,96,53,.18); border-radius: 18px; background: rgba(246,250,247,.8); }
.need-folder h4 { margin: 0 0 10px; color: #155c34; font-size: 1.02rem; }
.done-folder { background: rgba(245,245,245,.9); border-style: dashed; }
.need-card-done { opacity: .78; }
.problem-note { background: #fff7e6; border: 1px solid #f0d28a; border-radius: 12px; padding: 8px 10px; }
.need-actions button { margin: 4px 6px 4px 0; }

/* V4.28 Telefonliste / Rueckrufe */
.call-list-wrap { display: grid; gap: 14px; }
.call-list-form { background: rgba(255,255,255,.92); }
.call-suggestions { display: grid; gap: 8px; margin: 8px 0 12px; }
.call-suggestion { text-align: left; border: 1px solid rgba(25,96,53,.18); background: #f4fbf6; border-radius: 14px; padding: 10px 12px; display: grid; gap: 4px; color: #111; }
.call-suggestion strong { font-size: .98rem; }
.call-suggestion small { color: #647067; font-weight: 600; }
.call-filter-grid { margin-top: 10px; }
.call-item { border-left: 6px solid rgba(25,96,53,.22); }
.call-status-callback { border-left-color: #d89200; background: #fffaf0; }
.call-status-open { border-left-color: #246bfe; }
.call-status-done { border-left-color: #1d7f45; opacity: .86; }
.call-message, .call-comment { margin-top: 10px; padding: 9px 10px; border-radius: 12px; background: rgba(25,96,53,.07); }
.call-comment { background: #fff7e6; border: 1px solid #f0d28a; }
.call-actions button { margin: 4px 6px 4px 0; }
.badge.callback { background: #fff0c2; color: #6b4b00; }
.badge.open { background: #e8f0ff; color: #123d8a; }
.badge.done { background: #e8f7ee; color: #155c34; }

.maps-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: #0f6b36;
  font-weight: 800;
  text-decoration: none;
}
.maps-link:hover { text-decoration: underline; }

/* V4.34 Telefonliste eigene breite Bueroseite + Master-Info */
.master-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}
.master-info-tile {
  border: 1.5px solid rgba(20,53,31,.16);
  border-radius: 18px;
  background: #fff;
  padding: 14px;
  text-align: left;
  display: grid;
  gap: 5px;
  box-shadow: 0 7px 18px rgba(0,0,0,.055);
  color: #111;
  cursor: pointer;
}
.master-info-tile:hover { border-color: rgba(20,53,31,.36); transform: translateY(-1px); }
.master-info-tile strong { font-size: 1.12rem; }
.master-info-tile small { color: #647067; font-weight: 650; }
.tile-kicker { color: var(--green); text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 900; }
.call-summary-tile { background: linear-gradient(135deg, rgba(25,96,53,.08), #fff 70%); }
.compact-admin-info { display: grid; gap: 10px; }
.wide-admin-screen { width: 100%; }
.call-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.call-page-stats {
  border-radius: 999px;
  background: rgba(25,96,53,.1);
  color: var(--green);
  padding: 9px 12px;
  font-weight: 900;
  white-space: nowrap;
}
.three-col.address-grid {
  display: grid;
  grid-template-columns: minmax(120px, .45fr) minmax(180px, 1fr) minmax(160px, auto);
  gap: 12px;
  align-items: end;
}
.address-route-preview { padding-bottom: 13px; }
body.wide-admin-mode .app-shell {
  width: min(1320px, calc(100vw - 40px));
  max-width: 1320px;
  background: #f6f8f5;
}
body.wide-admin-mode main { max-width: none; width: 100%; }
body.wide-admin-mode #callListPage.screen.active {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
body.wide-admin-mode .wide-call-list-wrap {
  display: grid;
  grid-template-columns: minmax(360px, .92fr) minmax(420px, 1.08fr);
  gap: 16px;
  align-items: start;
}
body.wide-admin-mode .wide-call-list-wrap > .call-page-head,
body.wide-admin-mode .wide-call-list-wrap > .tools-row,
body.wide-admin-mode .wide-call-list-wrap > .result,
body.wide-admin-mode .wide-call-list-wrap > .call-filter-grid,
body.wide-admin-mode .wide-call-list-wrap > .call-list-items {
  grid-column: 2;
}
body.wide-admin-mode .wide-call-list-wrap > .call-list-form {
  grid-column: 1;
  grid-row: 1 / span 5;
  position: sticky;
  top: 12px;
}
@media (max-width: 900px) {
  .three-col.address-grid { grid-template-columns: 1fr; }
  .address-route-preview { padding-bottom: 0; }
  .call-page-head { display: grid; }
  body.wide-admin-mode .wide-call-list-wrap { grid-template-columns: 1fr; }
  body.wide-admin-mode .wide-call-list-wrap > .call-page-head,
  body.wide-admin-mode .wide-call-list-wrap > .tools-row,
  body.wide-admin-mode .wide-call-list-wrap > .result,
  body.wide-admin-mode .wide-call-list-wrap > .call-filter-grid,
  body.wide-admin-mode .wide-call-list-wrap > .call-list-items,
  body.wide-admin-mode .wide-call-list-wrap > .call-list-form {
    grid-column: auto;
    grid-row: auto;
    position: static;
  }
}


/* V4.50 - Rapport-Statusanzeige Master / Buero */
.rapport-status-panel {
  grid-column: 1 / -1;
  margin: 0 0 18px;
  padding: 16px;
  border: 1.5px solid rgba(20, 53, 31, 0.16);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(25,96,53,.08), #fff 70%);
  box-shadow: 0 10px 24px rgba(0,0,0,.055);
}
.rapport-status-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.rapport-status-head h3 { margin: 0; }
.rapport-status-head small { color: #5f6f66; font-weight: 800; text-align: right; }
.rapport-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.rapport-status-card {
  border: 1px solid rgba(20, 53, 31, 0.14);
  border-radius: 16px;
  background: #fff;
  padding: 12px;
  text-align: left;
  display: grid;
  gap: 4px;
  box-shadow: 0 6px 15px rgba(0,0,0,.045);
  cursor: pointer;
}
.rapport-status-card:hover { border-color: rgba(20,53,31,.36); transform: translateY(-1px); }
.rapport-status-card span { color: var(--green); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; }
.rapport-status-card strong { font-size: 1.7rem; line-height: 1; }
.rapport-status-card small { color: #647067; font-weight: 700; line-height: 1.25; }
@media (max-width: 700px) {
  .rapport-status-head { display: grid; align-items: start; }
  .rapport-status-head small { text-align: left; }
}

/* V4.35 - Mitarbeiterrechte und breite Baustellenuebersicht */
.permission-card {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(20, 53, 31, 0.16);
  border-radius: 18px;
  background: #f7fbf8;
}
.permission-card-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 12px;
}
.permission-card-head small { color: #5f6f66; }
.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 12px;
}
.permission-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(20, 53, 31, 0.12);
  border-radius: 12px;
  background: white;
  font-weight: 700;
}
.permission-check input { width: auto; min-height: auto; }
.compact-tools { margin-top: 12px; }
.static-tile { cursor: default; }
.overview-stat-grid { margin-bottom: 18px; }
.site-overview-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.overview-group-card {
  border: 1px solid rgba(20, 53, 31, 0.16);
  border-radius: 20px;
  padding: 16px;
  background: white;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}
.overview-group-card h3 {
  margin: 0 0 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.overview-group-card h3 span {
  background: #eaf5ee;
  color: #0d6b34;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.85em;
}
.overview-line {
  padding: 10px 0;
  border-top: 1px solid rgba(20, 53, 31, 0.12);
}
.overview-line:first-of-type { border-top: 0; }
@media (min-width: 900px) {
  body.wide-admin-mode .app-shell { max-width: 1500px; }
  .wide-section-title { max-width: 1420px; }
}

/* V4.36 - aufgeräumte Master-Schnellübersicht */
.master-dashboard-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 6px 0 18px;
}
.master-dashboard-tile {
  appearance: none;
  width: 100%;
  min-height: 112px;
  padding: 18px 18px 16px;
  border: 1.5px solid rgba(20,53,31,.14);
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbf8 100%);
  box-shadow: 0 10px 24px rgba(20,53,31,.07);
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 20px;
  gap: 14px;
  align-items: center;
  text-align: left;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.master-dashboard-tile:hover,
.master-dashboard-tile:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(20,53,31,.34);
  box-shadow: 0 14px 30px rgba(20,53,31,.12);
  outline: none;
}
.master-dashboard-tile .dashboard-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eaf4ed;
  color: var(--green-dark);
  font-size: 21px;
  line-height: 1;
}
.master-dashboard-tile .dashboard-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.master-dashboard-tile .tile-kicker {
  color: var(--green);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.1;
}
.master-dashboard-tile strong {
  color: #111;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: -.02em;
}
.master-dashboard-tile small {
  color: #56635b;
  font-size: 13.5px;
  line-height: 1.25;
}
.master-dashboard-tile .dashboard-arrow {
  color: rgba(20,53,31,.42);
  font-size: 30px;
  font-weight: 700;
  justify-self: end;
}
.master-dashboard-tile.overview-summary-tile,
.master-dashboard-tile.call-summary-tile {
  background: linear-gradient(135deg, #ffffff 0%, #eef7f0 100%);
}
@media (min-width: 760px) and (max-width: 1040px) {
  .master-dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .master-dashboard-grid { grid-template-columns: 1fr; gap: 12px; }
  .master-dashboard-tile {
    min-height: 96px;
    padding: 15px;
    grid-template-columns: 42px minmax(0, 1fr) 16px;
    gap: 12px;
  }
  .master-dashboard-tile .dashboard-icon { width: 42px; height: 42px; border-radius: 14px; }
  .master-dashboard-tile strong { font-size: 21px; }
}
@media (min-width: 760px) {
  body.master-desktop-mode #admin.screen.active .master-dashboard-grid,
  body:has(#admin.screen.active) #admin.screen.active .master-dashboard-grid {
    grid-column: 1 / -1;
  }
}

/* V4.38 - Master Dashboard als reine Übersicht, Detailbereiche auf eigenen breiten Seiten */
body.wide-admin-mode #customerCrmPage.screen.active,
body.wide-admin-mode #rapportControlPage.screen.active,
body.wide-admin-mode #rapportArchivePage.screen.active,
body.wide-admin-mode #siteAdminPage.screen.active {
  display: block;
  width: 100%;
}
.master-page-mount {
  max-width: 1420px;
  margin: 0 auto 24px;
}
.master-page-mount .admin-category {
  margin-bottom: 18px;
  border-radius: 24px;
  background: #fff;
}
.master-page-mount .admin-category > summary {
  padding: 18px 22px;
}
.master-page-mount .admin-category > summary::after {
  content: "";
}
.master-page-mount .admin-list-wrap,
.master-page-mount .form-card {
  margin: 14px 18px 18px;
}
.customer-address-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(120px, .45fr) minmax(180px, .75fr);
  gap: 12px;
  align-items: end;
}
@media (max-width: 800px) {
  .customer-address-grid { grid-template-columns: 1fr; }
}
body:has(#customerCrmPage.screen.active),
body:has(#rapportControlPage.screen.active),
body:has(#rapportArchivePage.screen.active),
body:has(#siteAdminPage.screen.active) {
  background: #f6f8f5;
}
body:has(#customerCrmPage.screen.active) .app-shell,
body:has(#rapportControlPage.screen.active) .app-shell,
body:has(#rapportArchivePage.screen.active) .app-shell,
body:has(#siteAdminPage.screen.active) .app-shell {
  width: min(1500px, calc(100vw - 40px));
  max-width: 1500px;
  background: #f6f8f5;
}
@media (max-width: 760px) {
  body:has(#customerCrmPage.screen.active) .app-shell,
  body:has(#rapportControlPage.screen.active) .app-shell,
  body:has(#rapportArchivePage.screen.active) .app-shell,
  body:has(#siteAdminPage.screen.active) .app-shell {
    width: min(100%, calc(100vw - 12px));
  }
}

/* V4.41: mehrere freigegebene Rapporte zur Kundenunterschrift auswählen */
.signature-rapport-choice-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.signature-choice-btn {
  width: 100%;
  text-align: left;
  line-height: 1.35;
}
#signatureCanvas.locked {
  opacity: 0.7;
  background: #f8f8f8;
}

/* V4.43: Rapport zur Kundenunterschrift als HTML-Vorschau */
.rapport-customer-preview {
  margin: 16px 0 20px;
  border: 1px solid #b8d8c0;
  border-radius: 18px;
  padding: 12px;
  background: #f4fbf6;
  box-shadow: 0 12px 36px rgba(0,0,0,.06);
}
.rapport-customer-preview-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.rapport-customer-preview-head strong {
  display:block;
  font-size: 18px;
  color:#0b6b36;
}
.rapport-customer-preview-head small {
  display:block;
  color:#54605a;
  line-height:1.35;
}
.rapport-customer-preview iframe {
  width:100%;
  min-height:520px;
  border:1px solid #d7e5da;
  border-radius:14px;
  background:white;
}
@media (max-width: 720px) {
  .rapport-customer-preview { padding: 10px; }
  .rapport-customer-preview iframe { min-height: 460px; }
}

/* V4.45 Aufgaben getrennt */
.task-folder { background: rgba(237,248,242,.95); }
.pack-folder { background: rgba(255,255,255,.92); }
.need-folder .small-help { margin-top: -4px; margin-bottom: 10px; }

/* V4.46 CRM Telefonhistorie */
.customer-call-history {
  margin: 14px 0 6px;
  padding: 12px;
  border-radius: 18px;
  background: #f3f8f4;
  border: 1px solid rgba(19, 112, 61, 0.14);
}
.history-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
  color: #0b6b35;
}
.history-row {
  display: grid;
  grid-template-columns: minmax(110px, 150px) 1fr;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid rgba(0,0,0,0.08);
}
.history-date {
  font-weight: 800;
  color: #111;
}
.history-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.history-assignee,
.history-more {
  color: #5c665f;
}
@media (max-width: 720px) {
  .history-row { grid-template-columns: 1fr; }
}

/* V4.47 Dienstplan */
.schedule-page .section-title { max-width: 1280px; }
.schedule-toolbar {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr repeat(4, auto);
  gap: 12px;
  align-items: end;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.schedule-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.schedule-pool, .schedule-board-wrap, .schedule-mini-box, .schedule-archive {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.schedule-pool { position: sticky; top: 12px; }
.schedule-employee-pool { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.schedule-employee-pill {
  border: 1px solid #b9d3c2;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  padding: 9px 12px;
  font-weight: 900;
  cursor: grab;
}
.schedule-mini-box { margin-top: 16px; box-shadow: none; }
.schedule-vehicle-list { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.schedule-vehicle-chip {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 10px;
  background: #fafcf9;
}
.schedule-vehicle-chip button { border: 0; background: transparent; font-size: 20px; cursor: pointer; }
.schedule-vehicle-chip span { display: block; min-width: 0; }
.schedule-vehicle-chip small { display: block; color: var(--muted); font-weight: 650; line-height: 1.25; margin-top: 3px; }
.small-hint { font-size: 12px; }
.employee-duty-check { margin: 10px 0 12px; padding: 10px; border: 1px dashed rgba(20,53,31,.18); border-radius: 14px; background: #fbfdfb; }
.employee-duty-check small { color: var(--muted); font-weight: 600; }
.schedule-board-wrap { overflow: hidden; }
.schedule-print-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.schedule-table-scroll { overflow-x: auto; }
.schedule-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; min-width: 980px; }
.schedule-table th { text-align: left; color: var(--green-dark); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; padding: 0 8px; }
.schedule-table td { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px; vertical-align: middle; }
.schedule-table td:first-child { border-left: 1px solid var(--line); border-radius: 14px 0 0 14px; font-weight: 900; width: 42px; }
.schedule-table td:last-child { border-right: 1px solid var(--line); border-radius: 0 14px 14px 0; }
.schedule-drop {
  min-height: 52px;
  border: 2px dashed #c6d8ca;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  color: var(--muted);
  background: #fbfdfb;
}
.schedule-drop.filled { border-style: solid; color: var(--black); background: var(--green-soft); }
.schedule-drop.drag-over { outline: 3px solid rgba(23,111,58,.18); border-color: var(--green); }
.schedule-clear { border: 0; border-radius: 999px; background: #fff; width: 28px; height: 28px; font-size: 18px; cursor: pointer; }
.schedule-row-vehicle, .schedule-row-site, .schedule-row-note { min-width: 160px; height: 42px; padding: 8px 10px; border-radius: 12px; }
.schedule-site-fields { display: grid; grid-template-columns: repeat(2, minmax(170px, 1fr)); gap: 6px; }
.schedule-row-site { min-width: 170px; width: 100%; }
.schedule-print-sites { display: block; line-height: 1.25; }
.schedule-archive { margin-top: 16px; box-shadow: none; }
.schedule-archive-tools { align-items: center; margin-bottom: 12px; }
.schedule-archive-count { font-weight: 900; color: var(--green-dark); margin-left: auto; white-space: nowrap; }
.schedule-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfdfb;
}
.schedule-filter-grid input { min-height: 42px; }
.schedule-filter-grid .ghost-btn { min-height: 42px; }
.schedule-archive-summary { margin-top: 6px; line-height: 1.35; }
.schedule-print-name { font-weight: 900; }
.print-only { display: none; }
@media (max-width: 900px) {
  .schedule-toolbar { grid-template-columns: 1fr; }
  .schedule-layout { grid-template-columns: 1fr; }
  .schedule-pool { position: static; }
  .schedule-filter-grid { grid-template-columns: 1fr; }
  .schedule-archive-count { margin-left: 0; width: 100%; }
}
@media print {
  @page { size: A4 portrait; margin: 10mm; }
  body { background: #fff !important; color: #111 !important; }
  body * { visibility: hidden !important; }
  #schedulePrintArea, #schedulePrintArea * { visibility: visible !important; }
  #schedulePrintArea { position: absolute; left: 0; top: 0; width: 100%; padding: 0; }
  .no-print { display: none !important; }
  .print-only { display: inline !important; }
  .app-shell { max-width: none !important; padding: 0 !important; }
  .schedule-board-wrap, .schedule-print-area { box-shadow: none !important; border: 0 !important; padding: 0 !important; background: #fff !important; }
  .schedule-print-head { margin-bottom: 8px !important; border-bottom: 1px solid #222 !important; padding-bottom: 6px !important; }
  .schedule-print-head .eyebrow { font-size: 10px !important; letter-spacing: .08em !important; margin: 0 0 2px !important; }
  .schedule-print-head h2 { font-size: 20px !important; margin: 0 !important; }
  #schedulePrintTitle { font-size: 11px !important; margin: 2px 0 0 !important; }
  #schedulePrintDate { font-size: 13px !important; white-space: nowrap !important; }
  .schedule-table-scroll { overflow: visible !important; }
  .schedule-table { width: 100% !important; min-width: 0 !important; border-collapse: collapse !important; border-spacing: 0 !important; font-size: 11.5px !important; table-layout: fixed !important; }
  .schedule-table th { color: #111 !important; font-size: 9px !important; letter-spacing: .04em !important; border-bottom: 1px solid #555 !important; padding: 4px 5px !important; }
  .schedule-table td { background: #fff !important; border: 0 !important; border-bottom: 1px solid #d8d8d8 !important; padding: 4px 5px !important; vertical-align: top !important; }
  .schedule-table td:first-child, .schedule-table td:last-child { border-radius: 0 !important; border-left: 0 !important; border-right: 0 !important; }
  .schedule-table th:nth-child(1), .schedule-table td:nth-child(1) { width: 5% !important; }
  .schedule-table th:nth-child(2), .schedule-table td:nth-child(2),
  .schedule-table th:nth-child(3), .schedule-table td:nth-child(3) { width: 15% !important; }
  .schedule-table th:nth-child(4), .schedule-table td:nth-child(4) { width: 19% !important; }
  .schedule-table th:nth-child(5), .schedule-table td:nth-child(5) { width: 46% !important; }
  .schedule-drop { min-height: 0 !important; border: 0 !important; padding: 0 !important; background: transparent !important; display: block !important; color: #111 !important; }
  .schedule-row-empty { display: none !important; }
  .print-field, .schedule-print-name { font-weight: 700 !important; line-height: 1.25 !important; }
  .schedule-print-sites span { display: block !important; margin-bottom: 1px !important; }
}

/* V4.52 - Dienstplan: 3 Mitarbeiter, einfache druckfreundliche Ansicht, mehr Fahrzeugdetails */
.schedule-table { min-width: 1120px; }
.schedule-vehicle-form-grid select { min-height: 42px; border-radius: 12px; border: 1px solid var(--line); padding: 8px 10px; background: #fff; }
.schedule-vehicle-chip small { word-break: break-word; }

@media print {
  @page { size: A4 portrait; margin: 8mm; }
  body { background: #fff !important; color: #000 !important; }
  body * { visibility: hidden !important; }
  #schedulePrintArea, #schedulePrintArea * { visibility: visible !important; }
  #schedulePrintArea {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    min-height: 96vh !important;
    padding: 18mm 8mm 8mm !important;
    border: 2px solid #000 !important;
    box-sizing: border-box !important;
    background: #fff !important;
  }
  .no-print { display: none !important; }
  .print-only { display: inline !important; }
  .app-shell { max-width: none !important; padding: 0 !important; }
  .schedule-board-wrap, .schedule-print-area { box-shadow: none !important; border-radius: 0 !important; background: #fff !important; }
  .schedule-print-head {
    display: block !important;
    margin: 0 0 28px !important;
    padding: 0 !important;
    border: 0 !important;
  }
  .schedule-print-head > div { display: none !important; }
  #schedulePrintDate {
    display: block !important;
    text-align: right !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
    margin: 0 0 6px !important;
  }
  .schedule-table-scroll { overflow: visible !important; }
  .schedule-table {
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    table-layout: fixed !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
  }
  .schedule-table thead { display: none !important; }
  .schedule-table th { display: none !important; }
  .schedule-table td {
    background: #fff !important;
    border: 0 !important;
    padding: 5px 6px !important;
    vertical-align: top !important;
    color: #000 !important;
  }
  .schedule-table td:first-child {
    display: none !important;
  }
  .schedule-table td:nth-child(2) { width: 17% !important; font-weight: 900 !important; }
  .schedule-table td:nth-child(3) { width: 16% !important; }
  .schedule-table td:nth-child(4) { width: 16% !important; }
  .schedule-table td:nth-child(5) { width: 24% !important; }
  .schedule-table td:nth-child(6) { width: 27% !important; }
  .schedule-table td:last-child { display: none !important; }
  .schedule-table td:first-child, .schedule-table td:last-child { border-radius: 0 !important; border-left: 0 !important; border-right: 0 !important; }
  .schedule-row-empty { display: none !important; }
  .schedule-drop { min-height: 0 !important; border: 0 !important; padding: 0 !important; background: transparent !important; display: block !important; color: #000 !important; }
  .print-field, .schedule-print-name { font-weight: 400 !important; line-height: 1.2 !important; }
  .schedule-table td:nth-child(2) .schedule-print-name { font-weight: 900 !important; }
  .schedule-print-sites span { display: block !important; margin-bottom: 1px !important; }
}


/* V4.54 - Fahrzeugverwaltung in den Masterbereich verschoben */
.vehicle-admin-layout {
  display: grid;
  grid-template-columns: minmax(280px, 430px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.vehicle-admin-form, .vehicle-admin-layout > div {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.vehicle-duty-check { margin: 12px 0; padding: 10px; border: 1px dashed rgba(20,53,31,.18); border-radius: 14px; background: #fbfdfb; }
.vehicle-duty-check small { color: var(--muted); font-weight: 600; }
.vehicle-admin-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.vehicle-admin-head h3 { margin: 0 0 4px; }
.vehicle-admin-item small { line-height: 1.45; }
.schedule-vehicle-chip.display-only { justify-content: flex-start; }
.schedule-vehicle-chip.display-only strong { font-size: 14px; }
.compact-vehicle-list { max-height: 360px; overflow: auto; padding-right: 2px; }
.full-width { width: 100%; margin-top: 10px; }

@media (max-width: 900px) {
  .vehicle-admin-layout { grid-template-columns: 1fr; }
}


/* V4.55 - Dienstplan Druck im Querformat */
@media print {
  @page { size: A4 landscape; margin: 7mm; }

  #schedulePrintArea {
    width: 100% !important;
    min-height: 183mm !important;
    padding: 10mm 12mm !important;
    border: 2px solid #000 !important;
    box-sizing: border-box !important;
  }

  .schedule-table {
    width: 100% !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
  }

  .schedule-table td {
    padding: 5px 8px !important;
  }

  .schedule-table td:nth-child(2) { width: 16% !important; }
  .schedule-table td:nth-child(3) { width: 14% !important; }
  .schedule-table td:nth-child(4) { width: 14% !important; }
  .schedule-table td:nth-child(5) { width: 26% !important; }
  .schedule-table td:nth-child(6) { width: 30% !important; }

  .schedule-drop:not(.filled),
  .schedule-drop:not(.filled) span {
    display: none !important;
  }

  .print-field:empty,
  .schedule-print-sites:empty {
    display: none !important;
  }
}


/* V4.57 - Dienstplan: eingeplante Mitarbeiter per Drag-and-Drop verschieben */
.schedule-drop.filled { cursor: grab; }
.schedule-drop.filled:active { cursor: grabbing; }
.schedule-drop.filled.dragging { opacity: .55; }
.schedule-drop.drag-over { background: #eef7f0; }
@media print {
  .schedule-drop.filled { cursor: default !important; }
}


/* V4.58 - Dienstplan Warnung ohne Fahrzeug nur in der normalen Ansicht */
.schedule-table tr.schedule-row-missing-vehicle td {
  background: #fff1f1;
  border-top-color: #ef9a9a;
  border-bottom-color: #ef9a9a;
}
.schedule-table tr.schedule-row-missing-vehicle td:first-child { border-left-color: #ef9a9a; }
.schedule-table tr.schedule-row-missing-vehicle td:last-child { border-right-color: #ef9a9a; }
.schedule-table tr.schedule-row-missing-vehicle .schedule-drop.filled {
  background: #ffe2e2;
  border-color: #e57373;
}
.schedule-table tr.schedule-row-missing-vehicle .schedule-row-vehicle {
  border-color: #d93025;
  background: #fffafa;
}
@media print {
  .schedule-table tr.schedule-row-missing-vehicle td,
  .schedule-table tr.schedule-row-missing-vehicle .schedule-drop.filled {
    background: #fff !important;
    border-color: transparent !important;
  }
}


/* V4.59 - Ansprechpartner in der Telefonliste klar sichtbar */
.call-contact-line {
  display: inline-block;
  margin: 2px 0 1px;
  color: var(--gs-green);
  font-size: 0.9rem;
}


/* V4.60 - Dienstplan Druck: Baustellen kompakt hintereinander und keine leere zweite Seite */
@media print {
  @page { size: A4 landscape; margin: 6mm; }

  html,
  body {
    width: 297mm !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
  }

  /* Verhindert, dass unsichtbare App-Bereiche beim Drucken trotzdem Platz belegen. */
  body > .app-shell > header,
  body > .app-shell > nav,
  body > .app-shell > footer,
  .screen:not(#schedulePage),
  #schedulePage > .back-btn,
  #schedulePage > .section-title,
  #schedulePage > .schedule-toolbar,
  #schedulePage > #scheduleResult,
  #schedulePage .schedule-pool,
  #schedulePage .schedule-archive,
  #schedulePage datalist {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .app-shell,
  #schedulePage,
  #schedulePage .schedule-layout,
  #schedulePage .schedule-board-wrap,
  #schedulePrintArea,
  #schedulePrintArea .schedule-table-scroll {
    display: block !important;
    position: static !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  #schedulePrintArea {
    padding: 9mm 11mm !important;
    border: 2px solid #000 !important;
    box-sizing: border-box !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  #schedulePrintDate {
    font-size: 16px !important;
    margin-bottom: 10px !important;
  }

  .schedule-table {
    table-layout: fixed !important;
    width: 100% !important;
    font-size: 17px !important;
    line-height: 1.18 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .schedule-table tr,
  .schedule-table td {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .schedule-table td {
    padding: 4px 7px !important;
  }

  .schedule-table td:nth-child(2) { width: 15% !important; }
  .schedule-table td:nth-child(3) { width: 13% !important; }
  .schedule-table td:nth-child(4) { width: 12% !important; }
  .schedule-table td:nth-child(5) { width: 20% !important; }
  .schedule-table td:nth-child(6) { width: 40% !important; }

  .schedule-print-sites {
    display: inline !important;
    white-space: normal !important;
    line-height: 1.18 !important;
  }

  .schedule-print-sites span {
    display: inline !important;
    margin: 0 !important;
  }

  .schedule-site-separator {
    display: inline !important;
    padding: 0 4px !important;
  }
}


/* V4.61 - Rapport-Status-Kacheln führen in gefilterte Prüflisten */
.overview-focus-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(20,53,31,.18);
  border-radius: 18px;
  background: #eef7f0;
  color: var(--green);
  font-weight: 900;
}
.overview-focus-banner button {
  border: 1px solid rgba(20,53,31,.28);
  background: #fff;
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 900;
  cursor: pointer;
}
.focused-overview-group {
  border-color: rgba(20,53,31,.34) !important;
  box-shadow: 0 10px 26px rgba(20,53,31,.10);
}
.overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.overview-actions button {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 9px 12px;
  font-weight: 900;
  cursor: pointer;
}
.overview-actions button:hover { border-color: rgba(20,53,31,.35); }

/* V4.61 - Dienstplan im Druck etwas kräftiger */
@media print {
  #schedulePrintArea,
  #schedulePrintArea .schedule-table,
  #schedulePrintArea .print-field,
  #schedulePrintArea .schedule-print-name {
    font-weight: 700 !important;
  }
  #schedulePrintArea .schedule-table td:nth-child(2) .schedule-print-name {
    font-weight: 900 !important;
  }
  #schedulePrintArea .schedule-table {
    font-size: 18px !important;
  }
}


/* V4.62: Kundenunterschrift zeigt nur fertigen Rapport + Signatur */
.rapport-edit-only-fields.hidden,
#rapportAutosaveInfo.hidden {
  display: none !important;
}
.rapport-signature-only-mode #rapportPdf .rapport-form {
  max-width: 900px;
}
.rapport-signature-only-mode #rapportCustomerHtmlPreview {
  margin-top: 14px;
}
.rapport-signature-only-mode .rapport-customer-preview-head small {
  display: block;
  margin-top: 3px;
}
.rapport-signature-only-mode .signature-box {
  border-color: #006b2d;
  background: #fff;
}

/* V4.63 - Dienstplan-Druck seitenfüllend und Zeilen klarer zuordenbar */
@media print {
  @page { size: A4 landscape; margin: 6mm; }

  #schedulePrintArea {
    width: 100% !important;
    height: 186mm !important;
    min-height: 0 !important;
    max-height: 186mm !important;
    padding: 9mm 11mm !important;
    border: 2px solid #000 !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  #schedulePrintArea .schedule-print-head {
    flex: 0 0 auto !important;
    margin: 0 0 7mm !important;
  }

  #schedulePrintArea #schedulePrintDate {
    font-size: 17px !important;
    line-height: 1.1 !important;
    margin: 0 !important;
  }

  #schedulePrintArea .schedule-table-scroll {
    flex: 1 1 auto !important;
    display: block !important;
    overflow: hidden !important;
  }

  #schedulePrintArea .schedule-table {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    font-size: 18px !important;
    line-height: 1.16 !important;
  }

  #schedulePrintArea .schedule-table tbody {
    height: 100% !important;
  }

  #schedulePrintArea .schedule-table tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  #schedulePrintArea .schedule-table td {
    padding: 6px 9px !important;
    vertical-align: middle !important;
    border: 0 !important;
    border-bottom: 1px solid #cfcfcf !important;
    color: #000 !important;
  }

  #schedulePrintArea .schedule-table tr:last-child td {
    border-bottom: 0 !important;
  }

  #schedulePrintArea .schedule-table td:nth-child(2) { width: 15% !important; }
  #schedulePrintArea .schedule-table td:nth-child(3) { width: 13% !important; }
  #schedulePrintArea .schedule-table td:nth-child(4) { width: 12% !important; }
  #schedulePrintArea .schedule-table td:nth-child(5) { width: 19% !important; white-space: nowrap !important; }
  #schedulePrintArea .schedule-table td:nth-child(6) { width: 41% !important; padding-left: 16px !important; }

  #schedulePrintArea .schedule-print-name,
  #schedulePrintArea .print-field {
    font-weight: 800 !important;
  }

  #schedulePrintArea .schedule-table td:nth-child(2) .schedule-print-name {
    font-weight: 900 !important;
  }

  #schedulePrintArea .schedule-print-sites {
    display: inline !important;
    white-space: nowrap !important;
    line-height: 1.16 !important;
  }

  #schedulePrintArea .schedule-print-sites span,
  #schedulePrintArea .schedule-site-separator {
    display: inline !important;
  }
}

/* V4.65 - Dienstplan duplizieren */
.schedule-toolbar #duplicateScheduleNextDayBtn { white-space: nowrap; }
@media (max-width: 900px) {
  .schedule-toolbar #duplicateScheduleNextDayBtn { min-height: 52px; }
}


/* V4.69 Sync-Diagnose */
.sync-diagnostics-box {
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px solid rgba(45, 88, 64, .16);
  border-radius: 18px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 8px 22px rgba(0,0,0,.04);
}
.sync-diagnostics-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.sync-diagnostics-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
.sync-diagnostics-row {
  padding: 9px 10px;
  border: 1px solid rgba(45, 88, 64, .13);
  border-radius: 14px;
  background: #fff;
}
.sync-diagnostics-row span,
.sync-diagnostics-row strong,
.sync-diagnostics-row small {
  display: block;
}
.sync-diagnostics-row strong {
  color: #2d5840;
  font-size: .88rem;
}
.sync-diagnostics-row small {
  color: #667;
  margin-top: 2px;
}
.sync-diagnostics-row.sync-missing {
  border-color: rgba(176, 55, 55, .35);
  background: #fff6f4;
}
.sync-diagnostics-row.sync-missing strong {
  color: #b03737;
}

/* V4.73 Sync-Diagnose */
.sync-diagnostics-actions,
.sync-row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.sync-diagnostics-row {
  gap: 6px;
}
.sync-row-actions .tiny {
  padding: 5px 9px;
  min-height: 0;
  font-size: 0.82rem;
}
.small-hint {
  margin: 8px 0 10px;
}


/* V4.77: Rapport zur Kundenunterschrift als ganze Seite */
body.rapport-signature-fullpage {
  background: #ffffff;
}
body.rapport-signature-fullpage .app-shell {
  width: 100%;
  max-width: none;
  padding: 6px 6px 18px;
  background: #ffffff;
}
body.rapport-signature-fullpage .hero,
body.rapport-signature-fullpage #rapportPdf > .section-title,
body.rapport-signature-fullpage #rapportPdf > .back-btn,
body.rapport-signature-fullpage #rapportSiteBox,
body.rapport-signature-fullpage #rapportEmployeeBox,
body.rapport-signature-fullpage #openRapportNotice,
body.rapport-signature-fullpage .rapport-customer-preview-head {
  display: none !important;
}
body.rapport-signature-fullpage #rapportPdf.screen.active {
  display: block;
  width: 100%;
}
body.rapport-signature-fullpage #rapportPdf .rapport-form {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 0 18px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #ffffff;
}
body.rapport-signature-fullpage #rapportCustomerHtmlPreview {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #ffffff;
}
body.rapport-signature-fullpage #rapportCustomerHtmlPreview iframe {
  display: block;
  width: 100%;
  height: 76vh;
  min-height: 620px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}
body.rapport-signature-fullpage label[for="signatureName"],
body.rapport-signature-fullpage #signatureName,
body.rapport-signature-fullpage .signature-box,
body.rapport-signature-fullpage #rapportPdfForm > .tools-row,
body.rapport-signature-fullpage #rapportPdfResult {
  width: min(100%, 980px);
  margin-left: auto;
  margin-right: auto;
}
body.rapport-signature-fullpage label[for="signatureName"] {
  display: block;
  padding: 0 12px;
  font-size: 20px;
}
body.rapport-signature-fullpage #signatureName {
  display: block;
  margin-top: 8px;
  margin-bottom: 12px;
}
body.rapport-signature-fullpage .signature-box {
  margin-top: 0;
  padding: 12px;
  border: 2px solid #0b6b36;
  border-radius: 18px;
  background: #fff;
}
body.rapport-signature-fullpage .signature-box canvas {
  width: 100%;
  height: 220px;
  touch-action: none;
}
body.rapport-signature-fullpage .signature-box p {
  margin: 8px 0 0;
  text-align: center;
  color: #5a5a5a;
}
body.rapport-signature-fullpage #rapportPdfForm > .tools-row {
  display: block;
  margin-top: 14px;
}
body.rapport-signature-fullpage #rapportPdfForm > .tools-row button[type="submit"],
body.rapport-signature-fullpage #rapportPdfForm > .tools-row .primary-btn {
  width: 100%;
  min-height: 58px;
  font-size: 22px;
  border-radius: 18px;
}
@media (max-width: 720px) {
  body.rapport-signature-fullpage .app-shell { padding: 0 0 16px; }
  body.rapport-signature-fullpage #rapportCustomerHtmlPreview iframe {
    height: 72vh;
    min-height: 560px;
  }
  body.rapport-signature-fullpage label[for="signatureName"],
  body.rapport-signature-fullpage #signatureName,
  body.rapport-signature-fullpage .signature-box,
  body.rapport-signature-fullpage #rapportPdfForm > .tools-row,
  body.rapport-signature-fullpage #rapportPdfResult {
    width: calc(100% - 18px);
  }
}

.form-actions.three-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}
.form-actions.three-actions button {
  width: 100%;
}
@media (max-width: 720px) {
  .form-actions.three-actions {
    grid-template-columns: 1fr;
  }
}


/* V4.84 ToDos / CRM Ansprechpartner */
.crm-contact-mini { display: flex; flex-direction: column; gap: .25rem; margin-top: .45rem; }
.crm-contact-mini span { display: inline-block; background: #f0f7f1; border: 1px solid #cfe4d4; border-radius: 999px; padding: .25rem .55rem; font-size: .88rem; color: #114f2a; }
.todo-admin-wrap { max-width: 1100px; }
.todo-month-group { margin: 1rem 0 1.4rem; }
.todo-month-group h3 { color: var(--green); margin: .5rem 0; }
.todo-item.done { opacity: .68; background: #f6f6f6; }
.todo-item.done strong { text-decoration: line-through; }

/* V4.85 KW-ToDos / Larifari */
.todo-board { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .9fr); gap: 1rem; align-items: start; }
.todo-board-col { background: rgba(255,255,255,.72); border: 1px solid rgba(0,0,0,.09); border-radius: 22px; padding: 1rem; }
.todo-board-col h3 { margin: 0 0 .25rem; color: var(--green); }
.todo-note-col { background: #fffdf5; }
.todo-larifari { background: #fffaf0; }
.badge.warn { background: #fff1bf; color: #6f4d00; }
@media (max-width: 900px) { .todo-board { grid-template-columns: 1fr; } }


/* V4.87 Urlaub / Krank / Abwesenheit */
.absence-admin-wrap { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(260px, .8fr); gap: 16px; align-items: start; }
.absence-date-overview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.absence-chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 6px 10px; background: #f2f4f7; border: 1px solid #d7dce2; font-weight: 700; font-size: .9rem; }
.absence-chip.krank { background: #ffe9e9; border-color: #f4b1b1; color: #8a1f1f; }
.absence-chip.urlaub { background: #eaf7ed; border-color: #a8d8b0; color: #1f6b36; }
.absence-item.krank { border-left: 5px solid #d64545; }
.absence-item.urlaub { border-left: 5px solid #2c9b53; }
.absence-item.beantragt { background: #fffaf0; }
.schedule-absence-picker-box { border: 1px solid #e2e6ea; border-radius: 16px; padding: 12px; background: #fff; margin-top: 14px; }
.schedule-absence-drop { border: 2px dashed #cdd5dc; border-radius: 14px; padding: 10px; margin-top: 10px; background: #fafafa; min-height: 78px; }
.schedule-absence-drop.drag-over { border-color: #2c9b53; background: #eef8f0; }
.schedule-absence-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
@media print { .schedule-absence-picker-box, .absence-admin-page { display: none !important; } }
@media (max-width: 760px) { .absence-admin-wrap { grid-template-columns: 1fr; } }


/* V4.89 ToDo-Anhaenge und Rapport-Zurueck */
.todo-attachment-hint { margin-top: .35rem; }
.todo-attachments { margin-top: .4rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.todo-attachments a, .todo-attachments span { display: inline-flex; align-items: center; padding: .2rem .45rem; border: 1px solid rgba(20,53,31,.18); border-radius: 999px; background: #fff; font-size: .84rem; text-decoration: none; color: #14351f; }
.rapport-signature-fullpage #backFromRapportSignature { display: inline-flex; }
.signature-action-row { justify-content: space-between; }

/* V4.92 Telefoninfos im Master-Dashboard */
.master-phone-info-panel {
  margin: 18px 0;
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(20, 20, 20, 0.08);
  box-shadow: 0 10px 26px rgba(0,0,0,.06);
}
.master-phone-info-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.master-phone-info-head h3 { margin: 0; }
.master-phone-info-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.master-phone-info-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff8d9;
  border: 1px solid rgba(150, 120, 0, .22);
}
.master-phone-info-item p {
  margin: 5px 0;
  font-weight: 700;
}
.master-phone-info-item small { color: #666; }
.info-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.info-actions button,
.small-btn {
  padding: 7px 10px;
  font-size: 0.86rem;
}
.call-status-info { border-left: 5px solid #c79b00; background: #fffaf0; }
.badge.info { background: #fff0ad; color: #6d5200; }
@media (max-width: 720px) {
  .master-phone-info-head,
  .master-phone-info-item { flex-direction: column; align-items: stretch; }
  .info-actions { flex-direction: row; }
}

.route-preview { margin-top: 0.5rem; }
.maps-link { display: inline-flex; align-items: center; gap: .35rem; font-weight: 800; color: var(--green); text-decoration: none; }
.maps-link:hover { text-decoration: underline; }


/* V4.98 Baustellen-Bildergalerie */
.site-gallery-admin-wrap .tools-row select {
  min-width: min(420px, 100%);
  flex: 1 1 320px;
}
.site-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.site-gallery-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.site-gallery-card img,
.site-gallery-placeholder {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: #eef5ef;
}
.site-gallery-placeholder {
  display: grid;
  place-items: center;
  color: var(--green);
  font-weight: 900;
}
.site-gallery-meta {
  padding: 12px;
  display: grid;
  gap: 5px;
}
.site-gallery-meta small {
  color: var(--muted);
  overflow-wrap: anywhere;
}


/* V5.00 Sichtbarkeit Planung / Urlaub / KW */
.master-critical-strip {
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin: 16px 0 22px;
  padding:16px;
  border:2px solid rgba(0,112,54,.28);
  border-radius:22px;
  background:linear-gradient(135deg, rgba(0,112,54,.08), rgba(255,255,255,.95));
  box-shadow:0 14px 30px rgba(0,0,0,.07);
}
.master-critical-strip .master-action-copy {
  display:flex;
  flex-direction:column;
  min-width:260px;
  flex:1 1 300px;
}
.master-critical-strip .master-action-copy strong {
  font-size:1.05rem;
  color:#007036;
}
.master-critical-strip .master-action-copy span {
  color:#555;
}
.schedule-absence-top-info {
  margin:12px 0 18px;
  padding:14px 16px;
  border:2px solid rgba(183,80,80,.32);
  border-radius:18px;
  background:#fff7f4;
  color:#3b2b25;
}
.schedule-absence-picker-box {
  border:2px solid rgba(183,80,80,.25) !important;
  background:#fffaf8 !important;
}
.schedule-absence-drop {
  min-height:70px;
}
@media (max-width: 760px) {
  .master-critical-strip { align-items:stretch; }
  .master-critical-strip button { width:100%; }
}
