:root {
  color-scheme: light;
  --bg: #f2f2f2;
  --panel: #ffffff;
  --ink: #191919;
  --muted: #5f5f5f;
  --line: #ddd2b9;
  --primary: #d49b2a;
  --primary-dark: #bb861f;
  --accent: #e6b24a;
  --danger: #b42318;
  --ok: #3f7c3e;
  --shadow: 0 18px 45px rgba(31, 45, 61, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(212, 155, 42, 0.14), transparent 32%),
    linear-gradient(315deg, rgba(140, 111, 46, 0.16), transparent 30%),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px;
}

.auth-card {
  width: min(460px, 100%);
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-logo {
  width: min(260px, 100%);
  justify-self: center;
  margin-bottom: 4px;
}

.auth-card h1 {
  margin: 0;
  font-size: 30px;
  text-align: center;
}

.auth-card p {
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.auth-hint {
  color: var(--muted);
}

.auth-error {
  color: var(--danger);
  font-weight: 700;
}

.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  width: fit-content;
  cursor: pointer;
}

.auth-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px;
  background: #ffffff;
  color: #191919;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 8px;
  background: #f4a261;
  color: #152025;
}

.brand-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(212, 155, 42, 0.35);
}

.brand p,
.brand span,
.stats p,
.eyebrow {
  margin: 0;
}

.brand p {
  font-size: 18px;
  font-weight: 800;
}

.brand span {
  display: block;
  margin-top: 3px;
  color: #686868;
  font-size: 13px;
  line-height: 1.35;
}

.role-switch {
  display: grid;
  gap: 10px;
}

.auth-lang,
.session-lang-field {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}

.auth-lang select,
.session-lang-field select {
  max-width: 100%;
}

.session-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(212, 155, 42, 0.35);
  border-radius: 8px;
  background: rgba(212, 155, 42, 0.1);
}

.session-card p,
.session-card strong {
  margin: 0;
}

.session-card p {
  color: #7a6240;
  font-size: 13px;
}

.session-card strong {
  font-size: 16px;
}

.session-card .secondary-button {
  justify-self: start;
  border-color: rgba(212, 155, 42, 0.45);
  background: #fffaf0;
  color: #4f3a1a;
}

.module-tabs {
  display: grid;
  gap: 8px;
}

.module-tab {
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(212, 155, 42, 0.35);
  border-radius: 8px;
  background: #fffef8;
  color: #4f3a1a;
  font-weight: 700;
}

.module-tab.active {
  border-color: var(--primary);
  background: rgba(212, 155, 42, 0.18);
}

.role-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #d7e0e5;
  background: rgba(255, 255, 255, 0.05);
  text-align: left;
}

.role-button.active {
  border-color: rgba(244, 162, 97, 0.65);
  background: rgba(244, 162, 97, 0.18);
  color: #ffffff;
}

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

.stats div {
  padding: 14px;
  border: 1px solid rgba(212, 155, 42, 0.3);
  border-radius: 8px;
  background: rgba(212, 155, 42, 0.1);
}

.stats span {
  font-size: 28px;
  font-weight: 800;
}

.stats p {
  color: #7a6240;
  font-size: 13px;
}

.workspace {
  min-width: 0;
  padding: 30px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.eyebrow {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
}

h2 {
  margin: 0;
  font-size: 18px;
}

.status-pill,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  box-shadow: 0 6px 20px rgba(31, 45, 61, 0.08);
  white-space: nowrap;
  border: 1px solid rgba(212, 155, 42, 0.25);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--ok);
}

.employee-view,
.boss-view {
  display: none;
}

.employee-view.active,
.boss-view.active {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

/* Mitarbeiter-Checkliste: gleiches Master/Detail wie Chef-Checkliste & Arbeitsauftrag */
.employee-checklist-review-panel {
  display: grid;
  gap: 22px;
  align-content: start;
}

.employee-checklist-review-panel > .checklist-panel {
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

.employee-checklist-review-panel > .checklist-panel.locked-hint h2 {
  margin-top: 0;
}

.checklist-panel,
.list-panel,
.review-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.checklist-panel {
  display: grid;
  gap: 22px;
  padding: 22px;
}

.locked-hint p {
  margin: 0;
  color: var(--muted);
}

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

.form-grid-employee-stamp .form-grid-span-kunde {
  grid-column: 1 / -1;
}

.checklist-customer-orientation {
  grid-column: 1 / -1;
  margin-top: -6px;
  display: grid;
  gap: 8px;
}

.checklist-customer-orientation-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.checklist-customer-orientation-preview figure {
  margin: 0;
  display: grid;
  gap: 6px;
}

.checklist-customer-orientation-preview {
  overflow: auto;
}

.customer-orientation-open-original {
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 10px;
  width: fit-content;
  max-width: 100%;
  cursor: zoom-in;
}

.customer-orientation-open-original img {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  object-fit: contain;
  border-radius: 9px;
}

.checklist-customer-orientation-preview figcaption {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

/* Fallback auf kleineren Screens, damit das Bild nicht das Layout sprengt. */
@media (max-width: 900px) {
  .customer-orientation-open-original img {
    max-width: 100%;
    height: auto;
  }
}

.customer-orientation-preview img {
  width: min(360px, 100%);
  max-height: 180px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(14, 12, 9, 0.86);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
}

.image-lightbox-close {
  justify-self: end;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.image-lightbox-stage {
  min-height: 0;
  overflow: auto;
  display: grid;
  place-items: start center;
}

.image-lightbox-stage img {
  width: auto;
  height: auto;
  max-width: none;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5);
}

.time-capture {
  display: grid;
  gap: 7px;
  align-content: start;
}

.time-capture span {
  color: #3f3f3f;
  font-size: 14px;
  font-weight: 700;
}

.time-capture small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.day-work-pause-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.employee-day-work-date input {
  max-width: min(260px, 100%);
}

.employee-day-work-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.employee-day-work-grid > .employee-day-work-pause-span {
  grid-column: 1 / -1;
}

.daily-work-correction-wrap {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.daily-work-correction-toggle {
  margin-bottom: 8px;
  width: fit-content;
  max-width: 100%;
}

.daily-work-correction-collapsible {
  padding-top: 2px;
}

.daily-work-correction-title {
  margin: 0 0 3px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

#dailyWorkCorrectionIntro {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.35;
}

.correction-banner {
  margin: 0 0 8px;
  padding: 7px 9px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
}

.correction-banner-info {
  background: rgba(60, 90, 140, 0.08);
  border: 1px solid rgba(60, 90, 140, 0.22);
  color: var(--ink);
}

.correction-banner-warning {
  background: rgba(165, 90, 30, 0.08);
  border: 1px solid rgba(165, 90, 30, 0.25);
  color: var(--ink);
}

.correction-fieldset {
  border: none;
  margin: 0;
  padding: 0;
  min-inline-size: unset;
}

.correction-fieldset legend {
  padding: 0;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
}

.correction-times-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 8px;
  margin-bottom: 8px;
}

.daily-work-correction-form label {
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
}

.daily-work-correction-form .correction-times-grid input[type="time"] {
  height: 36px;
  padding: 0 8px;
  font-size: 13px;
}

.correction-required-mark {
  color: #a35a00;
  font-weight: 800;
}

.correction-comment-input {
  min-height: 56px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.35;
}

.daily-work-correction-form .correction-submit-btn {
  margin-top: 4px;
  min-height: 40px;
  padding: 0 14px;
  font-size: 13px;
}

.chef-daily-corrections-wrap {
  margin: 14px 0 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbff;
}

.chef-daily-corrections-heading {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.chef-daily-corrections-help {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.4;
}

.chef-daily-corrections-empty {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.daily-correction-card {
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.daily-correction-card:last-child {
  margin-bottom: 0;
}

.daily-correction-card-title {
  margin: 0 0 8px;
  font-size: 14px;
}

.daily-correction-diff {
  margin: 0 0 8px;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.5;
}

.correction-note {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
}

.daily-correction-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chef-reject-note-input {
  flex: 1 1 min(240px, 100%);
  min-width: min(240px, 100%);
}

label {
  display: grid;
  gap: 7px;
  color: #3f3f3f;
  font-size: 14px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
}

input,
select {
  height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 118px;
  padding: 12px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: 3px solid rgba(212, 155, 42, 0.22);
  border-color: var(--primary);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.boss-filter-panel .boss-list-heading {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
}

.boss-filter-panel .boss-list-heading h2 {
  width: 100%;
  margin-bottom: 0;
  line-height: 1.25;
  font-weight: 800;
}

.items {
  display: grid;
  gap: 10px;
}

.check-item {
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefb;
}

.check-item-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 10px;
  align-items: center;
}

.checkbox-line {
  display: flex;
  min-width: 0;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.checkbox-line input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  accent-color: var(--primary);
}

.checkbox-line span {
  min-width: 0;
  width: 100%;
  padding: 7px 2px;
  border-radius: 6px;
  line-height: 1.3;
}

.checkbox-line span:focus {
  outline: 2px solid rgba(212, 155, 42, 0.3);
  background: #ffffff;
}

.item-comment-label {
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.item-comment-input {
  min-height: 64px;
  padding: 8px 10px;
  font-size: 13px;
}

.item-photo-label {
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.item-photo-input {
  display: none;
}

.item-photo-trigger {
  display: inline-flex;
  width: fit-content;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.item-photo-preview img {
  width: 120px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.extra-costs-box {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefb;
}

.extra-costs-toggle {
  font-weight: 700;
}

.extra-costs-fields {
  display: grid;
  gap: 8px;
}

.extra-costs-euro-label {
  display: grid;
  gap: 4px;
}

.extra-costs-euro-label span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.extra-costs-euro-label input {
  max-width: 12rem;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
}

.extra-costs-comment {
  min-height: 44px;
  height: 44px;
  padding: 10px 12px;
}

.extra-costs-photo-upload,
.check-item-photo-upload {
  display: grid;
  gap: 6px;
}

.check-item-photo-heading {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.check-item-photo-preview-shell figure {
  position: relative;
  display: inline-block;
  margin: 0;
  width: fit-content;
}

.check-item-photo-preview-shell figure .item-photo-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(24, 33, 43, 0.82);
  color: white;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.extra-costs-photo-heading {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.extra-costs-photo-upload .item-photo-trigger,
.check-item-photo-upload .item-photo-trigger {
  font-family: inherit;
}

.extra-costs-photo-preview-shell figure {
  position: relative;
  display: inline-block;
  margin: 0;
  width: fit-content;
}

.extra-costs-photo-preview-shell figure button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(24, 33, 43, 0.82);
  color: white;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.media-row {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
}

.upload-box {
  place-items: center;
  min-height: 156px;
  padding: 18px;
  border: 1px dashed rgba(212, 155, 42, 0.6);
  border-radius: 8px;
  background: #fffcf4;
  color: var(--accent);
  text-align: center;
}

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

.upload-box svg {
  width: 34px;
  height: 34px;
}

.preview-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
}

.preview-strip figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f3f3;
}

.preview-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-strip button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(24, 33, 43, 0.82);
  color: white;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.primary-button,
.secondary-button,
.text-button,
.icon-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-button {
  border: 1px solid var(--primary);
  padding: 0 18px;
  background: var(--primary);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--primary-dark);
}

.secondary-button,
.text-button {
  border: 1px solid var(--line);
  padding: 0 16px;
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
}

.danger-button {
  border: 1px solid rgba(180, 35, 24, 0.25);
  padding: 0 16px;
  background: #fff4f2;
  color: var(--danger);
}

.icon-button {
  width: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.list-panel {
  min-width: 0;
  padding: 18px;
}

.submission-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.boss-view .submission-list {
  margin-top: 12px;
}

.boss-filter-panel {
  padding: 13px 14px 14px;
  border: 1px solid rgba(212, 155, 42, 0.35);
  border-radius: 10px;
  background: linear-gradient(165deg, #fffefb 0%, #fffbf2 52%, #fffdf6 100%);
  box-shadow: 0 1px 4px rgba(31, 45, 61, 0.07);
}

.boss-toolbar-filters {
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid rgba(212, 155, 42, 0.2);
}

.boss-filter-panel-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7a6240;
}

.boss-filter-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.boss-filter-caption {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

input.boss-filter-control,
select.boss-filter-control,
select.boss-status-select {
  margin: 0;
  padding: 0 12px;
  height: 44px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid rgba(221, 210, 185, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

input.boss-filter-control:focus,
select.boss-filter-control:focus,
select.boss-status-select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(212, 155, 42, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.boss-filter-panel select.boss-status-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

input.boss-filter-control::placeholder {
  color: #9a9a9a;
  font-weight: 500;
}

select.boss-filter-control,
select.boss-status-select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235f5f5f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

.boss-search-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px 12px;
  align-items: end;
}

.employee-checklist-search-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1040px) and (min-width: 721px) {
  .boss-search-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.submission-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.submission-card {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
}

.submission-card.active {
  border-color: rgba(212, 155, 42, 0.62);
  box-shadow: 0 0 0 3px rgba(212, 155, 42, 0.14);
}

.submission-card strong {
  display: block;
  font-size: 15px;
}

.submission-card small {
  color: var(--muted);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  box-shadow: none;
  font-size: 12px;
  font-weight: 800;
}

.badge.submitted {
  color: #8f5d00;
  background: #fff7e8;
}

.badge.approved {
  color: #1f5d2a;
  background: #eefcf0;
}

.badge.draft {
  color: #5f5f5f;
  background: #f7f7f7;
}

.badge.wo-li-submitted {
  color: #8f5d00;
  background: #fff7e8;
}

.badge.wo-li-progress {
  color: #704012;
  background: #fff2d9;
}

.badge.wo-li-done {
  color: #1f5d2a;
  background: #eefcf0;
}

.review-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.review-panel {
  min-height: 560px;
  padding: 22px;
}

.empty-state {
  display: grid;
  min-height: 500px;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: var(--muted);
  text-align: center;
}

.empty-state svg {
  width: 48px;
  height: 48px;
  color: var(--primary);
}

.review-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.review-header h2 {
  margin-top: 4px;
  font-size: 26px;
}

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

.info-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.info-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.info-grid strong {
  display: block;
  margin-top: 5px;
}

.report-items {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.report-items li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.report-items li div {
  display: grid;
  gap: 4px;
}

.report-items li div img {
  width: 120px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.item-note {
  color: var(--muted);
}

.result-mark {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: var(--danger);
  font-size: 14px;
  font-weight: 900;
}

.result-mark.ok {
  background: var(--ok);
}

.review-comment {
  margin-top: 18px;
}

.review-comment textarea {
  margin-top: 8px;
}

.report-preview {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(212, 155, 42, 0.35);
  border-radius: 8px;
  background: #fffef9;
}

.report-preview--collapsible {
  padding: 0;
}

.report-preview--collapsible > .report-preview-summary {
  margin: 0;
  padding: 14px 16px;
  list-style: none;
  cursor: pointer;
  user-select: none;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.report-preview--collapsible > .report-preview-summary:focus-visible {
  outline: 2px solid rgba(212, 155, 42, 0.5);
  outline-offset: 2px;
  border-radius: 6px;
}

.report-preview--collapsible > .report-preview-summary::-webkit-details-marker {
  display: none;
}

.report-preview--collapsible > .report-preview-summary::before {
  content: "▶";
  display: inline-block;
  margin-right: 0.45em;
  font-size: 0.68em;
  opacity: 0.72;
  transition: transform 0.15s ease;
}

.report-preview--collapsible[open] > .report-preview-summary::before {
  transform: rotate(90deg);
}

.report-preview-collapse-inner {
  padding: 0 16px 16px;
}

.report-preview--collapsible[open] > .report-preview-summary {
  border-bottom: 1px solid rgba(212, 155, 42, 0.2);
  padding-bottom: 12px;
  margin-bottom: 2px;
}

.report-preview .report-intro-letter {
  font-weight: 400;
}

.report-preview .report-intro-letter > p {
  margin: 0 0 0.92em;
  line-height: 1.52;
}

.report-preview .report-intro-letter > p:last-child {
  margin-bottom: 1em;
}

.report-preview .report-intro-summary {
  margin: 1.1rem 0 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(212, 155, 42, 0.22);
  font-weight: 400;
}

.report-preview h3 {
  margin: 0 0 10px;
}

.contract-report {
  color: #25252a;
}

.contract-report-headline-top {
  font-size: 11px;
  letter-spacing: 0.22em;
  font-weight: 700;
  color: #59595f;
  border-bottom: 2px solid rgba(212, 155, 42, 0.55);
  padding-bottom: 4px;
}

.contract-report-title {
  margin: 14px 0 2px;
  text-align: center;
  letter-spacing: 0.14em;
  font-size: clamp(18px, 2.2vw, 26px);
}

.contract-report-subtitle {
  text-align: center;
  letter-spacing: 0.42em;
  font-weight: 800;
  color: #d49b2a;
  margin-bottom: 2px;
}

.contract-report-tagline {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 12px;
}

.contract-report-party-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.contract-report-party {
  border: 1px solid #d8d8dc;
  background: #f6f5f0;
  padding: 10px;
}

.contract-report-party h3 {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.26em;
  color: #d49b2a;
}

.contract-report-party p {
  margin: 0 0 2px;
  color: #404046;
}

.contract-report-intro {
  margin: 12px 0;
}

.contract-report-section {
  margin-top: 10px;
}

.contract-report-section > h3 {
  margin: 0 0 8px;
  border-bottom: 1px solid rgba(212, 155, 42, 0.65);
  padding-bottom: 4px;
  letter-spacing: 0.14em;
}

.contract-report-items {
  margin-top: 8px;
}

.work-order-closing-report-body p {
  margin: 0.35em 0;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .contract-report-party-grid {
    grid-template-columns: 1fr;
  }
}

.extra-costs-review-media {
  display: grid;
  gap: 10px;
  align-items: start;
  justify-items: start;
  margin-top: 10px;
}

.extra-costs-review-media img {
  max-width: min(420px, 100%);
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.extra-costs-download-link {
  font-weight: 700;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.photo-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.calendar-panel {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.worktime-panel {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  gap: 12px;
}

.worktime-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.worktime-filter select {
  flex: 0 1 auto;
  min-width: min(200px, 100%);
}

.worktime-period-shell {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  flex: 0 1 auto;
  min-width: min(260px, 100%);
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.worktime-period-slot {
  position: relative;
  flex: 1 1 auto;
  min-width: min(160px, 100%);
  min-height: 40px;
  display: flex;
  align-items: center;
}

.worktime-period-display {
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 44px;
  top: 0;
  bottom: 0;
  margin: 0;
  padding: 0 12px;
  display: flex;
  align-items: center;
  z-index: 4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  background-color: #ffffff;
}

.worktime-calendar-icon-shell {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 44px;
  display: grid;
  place-items: center;
  border-left: 1px solid var(--line);
  background: #ffffff;
  color: #4a4a4a;
  pointer-events: none;
  z-index: 5;
}

.worktime-calendar-icon-shell svg {
  width: 20px;
  height: 20px;
}

/* Volle Reihe über einem transparenten Button (#worktimePickerHitLayer); native date-Eingabe nur für Programm/UI. */
.worktime-picker-hitlayer {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
  z-index: 12;
}

.worktime-picker-face {
  box-sizing: border-box;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0 44px 0 0;
  border: none;
  border-radius: 0;
  background-color: transparent;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.25;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: transparent;
  cursor: inherit;
  pointer-events: none;
  z-index: 2;
}

.worktime-picker-face::-webkit-datetime-edit {
  opacity: 0;
}

.worktime-picker-face::-webkit-datetime-edit-fields-wrapper {
  opacity: 0;
}

.worktime-picker-face::-webkit-datetime-edit-text {
  opacity: 0;
}

.worktime-picker-face::-webkit-calendar-picker-indicator {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0;
}

.worktime-picker-face:focus-visible {
  outline: none;
}

.worktime-period-shell:focus-within {
  outline: 2px solid rgba(60, 90, 140, 0.35);
  outline-offset: 1px;
}

.worktime-source-caption {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  max-width: 62ch;
  line-height: 1.4;
}

.worktime-list {
  display: grid;
  gap: 8px;
}

.worktime-checkpoints {
  display: grid;
  gap: 10px;
}

.checkpoint-manager {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffef9;
  padding: 14px;
}

.checkpoint-manager-template-label {
  display: grid;
  gap: 6px;
  margin: 0;
  font-weight: 700;
  font-size: 13px;
}

.checkpoint-access-block {
  display: grid;
  gap: 8px;
  margin: 0;
}

.checkpoint-access-all span {
  font-weight: 600;
}

.checkpoint-access-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.checkpoint-employee-access {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkpoint-employee-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
  font-size: 13px;
}

.customer-checkpoint-template-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 8px 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
}

.customer-checkpoint-template-label select {
  flex: 1 1 200px;
  min-width: min(260px, 100%);
  max-width: 100%;
}

.customer-checkpoints-by-template + .customer-checkpoints-by-template {
  margin-top: 10px;
}

.customer-checkpoints-by-template strong {
  display: block;
  margin-bottom: 4px;
}

.checklist-template-row {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 13px;
}

.checklist-template-row select {
  width: min(440px, 100%);
}

.calendar-template-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  min-height: 38px;
  box-sizing: border-box;
}

.calendar-template-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  user-select: none;
}

.calendar-template-check input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: #d49b2a;
  flex-shrink: 0;
}

.calendar-haus-zone-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffef9;
  min-height: 38px;
  box-sizing: border-box;
}

.calendar-haus-zone-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  user-select: none;
}

.calendar-haus-zone-check input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: #d49b2a;
  flex-shrink: 0;
}

.checkpoint-form {
  margin: 0;
}

.checkpoint-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.checkpoint-lang-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.checkpoint-lang-field span {
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}

.checkpoint-lang-field input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font: inherit;
}

.checkpoint-form-zone-row {
  margin-top: 10px;
}

.checkpoint-zone-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 280px;
}

.checkpoint-zone-field span {
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}

.checkpoint-zone-field select {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font: inherit;
}

.checkpoint-manager-zone {
  margin-bottom: 16px;
}

.checkpoint-manager-zone-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 750;
  color: var(--ink);
}

.checklist-zone-group {
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.checklist-zone-group:last-child {
  border-bottom: none;
}

.checklist-zone-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
}

.customer-cp-zone-block {
  margin-bottom: 10px;
}

.customer-cp-zone-block strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
  color: var(--muted);
}

.customer-cp-zone-block ul {
  margin: 0;
  padding-left: 1.1rem;
}

.checkpoint-list {
  display: grid;
  gap: 8px;
}

.checkpoint-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
}

.checkpoint-item span {
  font-size: 14px;
  font-weight: 700;
}

.checkpoint-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.worktime-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffef9;
  padding: 12px;
  display: grid;
  gap: 4px;
}

.worktime-item p {
  margin: 0;
}

.customer-db-panel {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  gap: 12px;
}

.customer-extra-costs {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #e8dcb8;
  border-radius: 8px;
  background: #fffdf6;
  display: grid;
  gap: 8px;
}

.customer-extra-costs-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
}

.customer-extra-costs-head strong {
  font-size: 13px;
  flex: 1 1 12rem;
}

.customer-extra-month-select {
  flex: 0 1 14rem;
  min-width: 10rem;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 14px;
}

.customer-extra-ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.customer-extra-ledger-table th,
.customer-extra-ledger-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.customer-extra-ledger-table th {
  font-weight: 700;
  background: rgba(212, 155, 42, 0.12);
}

.customer-extra-ledger-amount {
  font-weight: 700;
  white-space: nowrap;
}

.customer-extra-ledger-sum {
  margin: 4px 0 0;
  font-size: 14px;
}

.customer-db-subsection {
  margin-top: 12px;
  border: 1px solid #e8dcb8;
  border-radius: 8px;
  background: #fffdf6;
}

.customer-db-subsection-summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
}

.customer-db-subsection-summary::-webkit-details-marker {
  display: none;
}

.customer-db-subsection-head {
  margin: 0;
  pointer-events: none;
}

.customer-db-subsection-head .customer-extra-month-select {
  pointer-events: auto;
}

.customer-db-subsection-summary::after {
  content: "Ausklappen";
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted, #5c5348);
}

.customer-db-subsection[open] > .customer-db-subsection-summary::after {
  content: "Zuklappen";
}

.customer-db-subsection-body {
  padding: 0 12px 10px;
  display: grid;
  gap: 8px;
}

.customer-db-subsection.customer-extra-costs,
.customer-db-subsection.customer-work-time {
  margin-top: 12px;
  padding: 0;
  border: 1px solid #e8dcb8;
}

.customer-work-time {
  margin-top: 0;
}

.customer-work-time-duration {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.customer-work-time-sum-detail {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: normal;
  color: var(--muted, #5c5348);
}

.guide-db-panel {
  display: grid;
  gap: 16px;
}

.guide-db-intro {
  margin: 6px 0 0;
  color: var(--muted, #5c5348);
  font-size: 14px;
  font-weight: normal;
}

.guide-db-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid #e8dfd2;
  border-radius: 12px;
  background: #fffdf9;
}

.guide-pdf-uploads {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.guide-pdf-col {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.guide-pdf-upload {
  display: grid;
  gap: 6px;
  color: #3f3f3f;
  font-weight: 700;
}

.guide-pdf-status {
  font-size: 13px;
  color: var(--muted, #5c5348);
  word-break: break-word;
}

.guide-pdf-status small {
  display: block;
}

.guide-db-form .primary-button {
  grid-column: 1 / -1;
  justify-self: start;
}

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

.guide-db-item {
  border: 1px solid #e8dfd2;
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
}

.guide-db-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 12px;
}

.guide-db-item-head strong {
  font-size: 17px;
}

.guide-db-item-sub {
  font-size: 13px;
  color: var(--muted, #5c5348);
}

.guide-db-downloads,
.guide-db-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

@media (max-width: 900px) {
  .guide-pdf-uploads {
    grid-template-columns: 1fr;
  }

  .guide-db-form {
    grid-template-columns: 1fr;
  }
}

.customer-db-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) auto;
  gap: 10px;
}

.customer-db-media-pair {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.customer-db-media-col {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.customer-orientation-upload,
.customer-contract-upload {
  display: grid;
  gap: 6px;
  color: #3f3f3f;
  font-weight: 700;
}

.customer-contract-status {
  font-size: 13px;
  color: var(--muted, #5c5348);
  word-break: break-word;
}

.customer-contract-status small {
  display: block;
}

#dbContractRemove {
  justify-self: start;
}

@media (max-width: 720px) {
  .customer-db-media-pair {
    grid-template-columns: 1fr;
  }
}

.customer-orientation-upload {
  grid-column: auto;
}

.customer-orientation-preview {
  grid-column: 1 / -1;
}

.customer-orientation-preview figure {
  margin: 0;
}

.customer-orientation-preview img {
  width: min(360px, 100%);
  max-height: 180px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}

#dbOrientationRemove {
  justify-self: start;
}

.customer-checkpoints {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fffef9;
}

.customer-checkpoints summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  font-weight: 800;
  color: #3f3f3f;
  padding: 2px 0;
}

.customer-checkpoints summary::-webkit-details-marker {
  display: none;
}

.customer-checkpoints summary::after {
  content: "Ausklappen";
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.customer-checkpoints[open] summary::after {
  content: "Zuklappen";
}

/** Nur dieser Container – nicht alle `div` unter `.customer-checkpoints` (sonst bricht das Zonen-Layout). */
.customer-checkpoint-options {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.customer-checkpoint-zone {
  margin: 0;
  padding: 8px 10px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(31, 45, 61, 0.04);
}

.customer-checkpoint-zone-title {
  display: block;
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.customer-checkpoint-zone-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 6px;
  align-items: start;
}

.customer-checkpoint-options > label {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffef9;
  cursor: pointer;
  min-height: 0;
}

.customer-checkpoint-options > label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  flex-shrink: 0;
  accent-color: var(--primary);
}

.customer-checkpoint-options > label span {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}

.customer-checkpoint-zone-items label {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffef9;
  cursor: pointer;
  min-height: 0;
}

.customer-checkpoint-zone-items label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  flex-shrink: 0;
  accent-color: var(--primary);
}

.customer-checkpoint-zone-items label span {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}

.customer-checkpoint-zone-items label:hover,
.customer-checkpoint-options > label:hover {
  border-color: rgba(212, 155, 42, 0.55);
  background: #ffffff;
}

.customer-checkpoint-zone-items label:focus-within,
.customer-checkpoint-options > label:focus-within {
  outline: 2px solid rgba(212, 155, 42, 0.35);
  outline-offset: 1px;
}

.customer-db-list {
  display: grid;
  gap: 8px;
}

.customer-db-item--inactive {
  opacity: 0.92;
}

.customer-status-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
  color: #5c5348;
  background: #efe8dc;
  border: 1px solid #d8cfc0;
}

.customer-db-item {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fffef9;
}

.customer-db-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.customer-db-summary::-webkit-details-marker {
  display: none;
}

.customer-db-summary-main {
  display: grid;
  grid-template-columns: minmax(140px, 0.8fr) minmax(220px, 1.2fr) minmax(240px, 1.2fr);
  gap: 8px 14px;
  min-width: 0;
  align-items: center;
  flex: 1 1 auto;
}

.customer-db-body {
  display: grid;
  gap: 8px;
}

.customer-db-summary-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
}

.customer-db-summary-toggle-label {
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.02em;
}

.customer-db-summary-toggle-icon {
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
}

.customer-db-item[open] .customer-db-summary-toggle-icon {
  transform: rotate(90deg);
}

.customer-db-summary-meta {
  color: var(--muted);
}

.customer-db-item p {
  margin: 0;
}

.customer-db-item small {
  color: var(--muted);
  display: block;
}

.customer-db-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-checkpoints-list {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.customer-checkpoints-list ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.customer-checkpoints-list li {
  color: #3f3f3f;
  font-size: 13px;
  font-weight: 600;
}

.customer-history {
  margin-top: 6px;
}

.customer-history-compact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 6px 10px;
  border: 1px solid rgba(212, 202, 180, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.customer-history-compact-row.customer-history-empty {
  gap: 4px;
}

.customer-history-empty small {
  font-size: 12px;
  margin: 0;
  flex: 1 1 12rem;
  min-width: 0;
}

.customer-history-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex: 0 1 auto;
  line-height: 1.2;
}

.customer-history-select {
  flex: 1 1 10rem;
  min-width: 0;
  max-width: 100%;
  font-size: 12px;
  line-height: 1.25;
  padding: 5px 8px;
  min-height: 30px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  font-family: inherit;
  color: inherit;
}

.customer-history-open-btn {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  padding: 5px 12px;
  min-height: 30px;
  border-radius: 6px;
  border: 1px solid rgba(212, 155, 42, 0.55);
  background: rgba(255, 250, 240, 0.95);
  color: inherit;
  cursor: pointer;
}

.customer-history-open-btn:hover {
  background: rgba(212, 155, 42, 0.15);
}

.customer-history-open-btn:focus-visible {
  outline: 2px solid rgba(212, 155, 42, 0.8);
  outline-offset: 1px;
}

@media (max-width: 520px) {
  .customer-history-title {
    flex: 1 1 100%;
  }

  .customer-db-summary-main {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
}

.calendar-cell {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
}

.calendar-cell.empty {
  visibility: hidden;
}

.calendar-cell.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(212, 155, 42, 0.2);
}

.calendar-load-indicator {
  margin-left: 6px;
  font-size: 11px;
  letter-spacing: 1px;
  line-height: 1;
}

.calendar-load-indicator.low {
  color: var(--ok);
}

.calendar-load-indicator.medium {
  color: #d49b2a;
}

.calendar-load-indicator.high {
  color: var(--danger);
}

.calendar-load-indicator.full {
  color: var(--danger);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: lowercase;
}

.calendar-staff {
  display: grid;
  gap: 10px;
}

.calendar-staff-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.calendar-staff-tools {
  display: flex;
  gap: 8px;
  align-items: center;
}

.calendar-staff-tools select {
  min-width: 260px;
}

.calendar-form-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 11px 13px;
  background: linear-gradient(to bottom right, #fffdf9 0%, #faf6ef 100%);
  border: 1px solid rgba(201, 177, 123, 0.45);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(58, 40, 8, 0.06);
}

.calendar-form-section {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: flex-end;
}

.calendar-form-assign-row {
  align-items: flex-end;
}

.calendar-form-assign-row .calendar-field-assign-type {
  flex: 1 1 min(260px, 100%);
}

.calendar-form-assign-row .calendar-field-recurrence-weekday {
  flex: 1 1 min(200px, 100%);
}

.calendar-form-staff-split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(200px, 0.9fr);
  gap: 10px;
  align-items: stretch;
}

@media (max-width: 720px) {
  .calendar-form-staff-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

.calendar-field-stretch {
  min-width: 0;
}

.calendar-field-checklist-owner .calendar-field-hint {
  margin-top: 1px;
}

.calendar-form-details-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px 12px;
  align-items: end;
}

.calendar-employee-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  min-height: 38px;
  box-sizing: border-box;
}

.calendar-employee-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  user-select: none;
}

.calendar-employee-check input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: #d49b2a;
  flex-shrink: 0;
}

.calendar-form-details-grid .calendar-field:first-child {
  grid-column: span 4;
}

.calendar-form-details-grid .calendar-field:nth-child(2) {
  grid-column: span 4;
}

.calendar-form-details-grid .calendar-field-span-2-md {
  grid-column: span 4;
}

@media (max-width: 920px) {
  .calendar-form-details-grid .calendar-field:first-child,
  .calendar-form-details-grid .calendar-field:nth-child(2),
  .calendar-form-details-grid .calendar-field-span-2-md {
    grid-column: span 12;
  }
}

.calendar-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.calendar-field-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.calendar-field-hint {
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}

.calendar-control {
  width: 100%;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  box-sizing: border-box;
}

.calendar-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(212, 155, 42, 0.2);
}

.calendar-time-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-time-range .calendar-control {
  flex: 1;
  min-width: 0;
}

.calendar-time-sep {
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--muted);
}

.calendar-field-comment .calendar-control {
  min-height: 36px;
}

.calendar-form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 6px;
  margin-top: 2px;
  border-top: 1px solid rgba(201, 177, 123, 0.25);
}

.calendar-monthly-explainer {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
  background: linear-gradient(to bottom, #fffef9, #faf6ef);
  border: 1px solid rgba(201, 177, 123, 0.45);
  border-left-width: 4px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(58, 40, 8, 0.06);
}

.staff-list {
  display: grid;
  gap: 8px;
}

.calendar-copy-dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  max-width: min(420px, calc(100vw - 32px));
  box-shadow: 0 20px 50px rgba(58, 40, 8, 0.22);
  background: #fffdf8;
}

.calendar-copy-dialog::backdrop {
  background: rgba(40, 32, 20, 0.38);
}

.calendar-copy-dialog-inner {
  padding: 20px 22px;
  display: grid;
  gap: 14px;
}

.calendar-copy-dialog-inner h4 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--ink);
}

.calendar-copy-dialog-summary {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.calendar-copy-date-label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.calendar-copy-date-label input[type="date"] {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font: inherit;
  background: #fff;
}

.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 2px;
}

.staff-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  border: 1px solid var(--line);
  border-left: 6px solid #c9b17b;
  border-radius: 8px;
  padding: 10px;
  background: #fffef9;
}

.staff-item div {
  display: grid;
  gap: 4px;
}

.staff-item strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.staff-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #c9b17b;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.staff-patrick {
  border-left-color: #c9b17b;
}

.staff-patrick .staff-color-dot {
  background: #c9b17b;
}

.staff-souhail {
  border-left-color: #c8b6ff;
}

.staff-souhail .staff-color-dot {
  background: #c8b6ff;
}

.staff-mohammed {
  border-left-color: #b8f5bc;
}

.staff-mohammed .staff-color-dot {
  background: #b8f5bc;
}

.staff-reinigungspaar {
  border-left-color: #9dd5e8;
}

.staff-reinigungspaar .staff-color-dot {
  background: #9dd5e8;
}

.staff-item small {
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 8px;
  background: #2d2a24;
  color: #f6eee0;
  box-shadow: var(--shadow);
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .employee-view.active,
  .review-layout {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 720px) {
  .workspace,
  .sidebar {
    padding: 18px;
  }

  .topbar,
  .review-header {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-staff-head,
  .calendar-staff-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .form-grid,
  .employee-day-work-grid,
  .media-row,
  .info-grid,
  .calendar-form,
  .customer-db-form,
  .checkpoint-form-row,
  .boss-search-row {
    grid-template-columns: 1fr;
  }

  .employee-day-work-grid > .employee-day-work-pause-span {
    grid-column: auto;
  }

  .boss-filter-panel {
    padding: 12px 12px 13px;
  }

  .boss-toolbar-filters {
    margin-top: 10px;
    padding-top: 10px;
  }

  .customer-checkpoint-zone-items {
    grid-template-columns: 1fr;
  }

  .actions,
  .review-actions {
    justify-content: stretch;
  }

  .actions button,
  .review-actions button {
    width: 100%;
  }

  .status-pill {
    white-space: normal;
  }
}

/* Arbeitsauftrag (Kalender-Anweisung, ohne Kundendatenbank-Checkliste) */
.work-orders-panel .list-panel {
  padding: 18px;
}

.work-orders-panel .submission-list.work-orders-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.work-orders-empty {
  margin-top: 12px;
}

.work-order-card {
  border-radius: 12px;
  border: 1px solid rgba(120, 80, 40, 0.28);
  background: linear-gradient(to bottom right, rgba(255, 250, 240, 0.95), rgba(255, 245, 230, 0.75));
  padding: 14px 16px 16px;
}

.work-order-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

/* Mitarbeiter, Kunde, Adresse nebeneinander — mobil untereinander */
.work-order-data-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 18px;
  margin: 0;
}

.work-order-data-cell {
  margin: 0;
  flex: 1 1 12.5rem;
  min-width: 0;
  line-height: 1.4;
  word-break: break-word;
  font-size: 0.93rem;
}

@media (max-width: 32rem) {
  .work-order-data-row {
    flex-direction: column;
    gap: 6px;
  }

  .work-order-data-cell {
    flex: 1 1 auto;
  }
}

.work-order-status {
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(100, 60, 20, 0.28);
}

.work-order-status-submitted {
  background: rgba(255, 249, 230, 0.95);
  color: #4a3820;
}

.work-order-status-in_progress {
  background: rgba(255, 238, 200, 0.95);
  color: #5c3a14;
}

.work-order-status-done {
  background: rgba(226, 240, 220, 0.92);
  color: #294022;
}

.work-order-date {
  font-size: 0.9rem;
  color: #5c5348;
}

.work-order-instruction {
  margin: 8px 0 0;
  padding-top: 2px;
  line-height: 1.45;
  word-break: break-word;
  font-size: 0.93rem;
}

.work-order-time-doc {
  margin-top: 8px;
}

.work-order-time-doc-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 4px;
  font-size: 0.92rem;
}

.work-order-time-doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.work-order-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.calendar-work-order-toggle .calendar-work-order-cb {
  margin-top: 6px;
}

.calendar-work-order-cb span {
  line-height: 1.35;
}

.work-orders-toolbar {
  margin-top: 10px;
}

.work-orders-filter-field {
  min-width: min(100%, 320px);
}

.work-orders-panel .boss-search-row.work-orders-search-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.work-orders-panel .boss-search-row.work-orders-search-row.work-orders-search-row--full {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .work-orders-panel .boss-search-row.work-orders-search-row,
  .work-orders-panel .boss-search-row.work-orders-search-row.work-orders-search-row--full {
    grid-template-columns: minmax(0, 1fr);
  }
}

.work-orders-detail-body {
  min-height: min(560px, 70vh);
}

.work-order-detail-card--review {
  border: none;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.work-orders-detail-body .review-header {
  margin-top: 0;
}

.work-orders-detail-body .review-header h2 {
  font-size: 26px;
}

.employee-checklist-layout .employee-checklist-review-panel {
  min-height: 560px;
}

.employee-checklist-layout .employee-checklist-list-panel,
.work-orders-review-layout .list-panel {
  align-self: start;
}

.work-order-list-card:focus-visible {
  outline: 3px solid rgba(212, 155, 42, 0.35);
  outline-offset: 2px;
}

.work-orders-toolbar-filters {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.calendar-wo-photo-input {
  margin-top: 6px;
}

.calendar-wo-photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.calendar-wo-photo-tile {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(100, 70, 35, 0.25);
}

.calendar-wo-photo-tile img {
  display: block;
  width: 88px;
  height: 88px;
  object-fit: cover;
}

.calendar-wo-photo-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  line-height: 1;
  padding: 2px 6px;
  background: rgba(40, 40, 40, 0.72);
  color: #fff;
  border-radius: 4px;
}

.work-order-subline {
  margin: 4px 0 0;
  font-size: 0.88rem;
}

.work-order-chef-photos {
  margin-top: 6px;
}

.work-order-photo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.work-order-photo-link {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(100, 70, 35, 0.28);
}

.work-order-chef-thumb {
  display: block;
  width: 104px;
  height: 104px;
  object-fit: cover;
}

@media (min-width: 48rem) {
  .work-order-chef-thumb {
    width: 112px;
    height: 112px;
  }
}

.work-order-reply-edit {
  margin-top: 10px;
}

.work-order-reply-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.92rem;
}

.work-order-reply-input {
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(100, 70, 35, 0.28);
  background: rgba(255, 253, 246, 0.98);
  font: inherit;
}

.work-order-reply-actions {
  margin-top: 8px;
}

.work-order-reply-display {
  margin: 8px 0 0;
  line-height: 1.45;
  word-break: break-word;
}

.work-order-result-upload {
  margin-top: 6px;
}

.work-order-result-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.work-order-result-pick-btn {
  margin-top: 8px;
}

.work-order-chef-sendback {
  margin-top: 10px;
}

.work-order-result-upload .calendar-wo-photo-preview {
  margin-top: 6px;
}
