:root {
  --ink: #17221c;
  --muted: #66736b;
  --paper: #ffffff;
  --canvas: #f2f4ef;
  --line: #dce2dc;
  --green: #1f6b45;
  --green-dark: #155236;
  --green-soft: #e4f0e9;
  --orange: #e98b2a;
  --red: #b7392f;
  --shadow: 0 14px 38px rgba(23, 34, 28, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* {
  box-sizing: border-box;
}

.floorplan-marker {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #cbd5ce;
  border-radius: 10px;
  cursor: crosshair;
}

.floorplan-marker img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 60vh;
}

.marker-dot {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 3px solid white;
  border-radius: 50%;
  background: #d92727;
  box-shadow: 0 1px 5px #0008;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.floorplan-upload-form,
.floorplan-admin-row,
.floorplan-admin-row > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.floorplan-admin-list { display: grid; gap: 10px; margin-top: 14px; }
.floorplan-admin-row { justify-content: space-between; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.floorplan-admin-row img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; }
.floorplan-admin-row > div { min-width: 0; flex-direction: column; align-items: flex-start; }
.floorplan-admin-row > div:last-child { flex-direction: row; margin-left: auto; }
.floorplan-admin-row small { overflow-wrap: anywhere; color: var(--muted); }
.danger-text { color: #b42318; }

@supports (padding: max(0px)) {
  .page { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .bottom-nav { padding-right: env(safe-area-inset-right); padding-bottom: env(safe-area-inset-bottom); padding-left: env(safe-area-inset-left); }
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 100% 0, rgba(31, 107, 69, 0.1), transparent 28rem),
    var(--canvas);
}

body.layout-start { --content-width: 920px; }
body.layout-reports { --content-width: 760px; }
body.layout-admin { --content-width: 1080px; }

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(calc(100% - 28px), var(--content-width, 1080px));
  margin-inline: auto;
  padding: 10px 20px;
  color: var(--green);
  background: rgba(250, 249, 245, 0.9);
  border-bottom: 1px solid rgba(29, 78, 57, 0.12);
  backdrop-filter: blur(14px);
}

.app-header-brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: inherit;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.app-header-logo {
  display: block;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.app-header-company {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.language-indicator {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: inherit;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.company-header-logo {
  display: block;
  width: auto;
  max-width: min(360px, 46vw);
  height: 96px;
  object-fit: contain;
  transition: opacity 160ms ease;
}

.company-header-logo[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .app-header { min-height: 92px; }

  .company-header-logo {
    max-width: min(280px, 44vw);
    height: 76px;
  }
}

@media (max-width: 640px) {
  .app-header {
    min-height: 70px;
    padding: 7px 14px;
  }

  .app-header {
    gap: 10px;
  }

  .app-header-brand {
    gap: 6px;
    font-size: clamp(14px, 4vw, 16px);
  }

  .app-header-logo {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
  }

  .app-header-company {
    gap: 6px;
  }

  .language-indicator {
    font-size: 18px;
  }

  .company-header-logo {
    max-width: min(180px, 42vw);
    height: 54px;
  }
}

.topbar {
  position: fixed;
  z-index: 50;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 10px max(16px, calc((100vw - 1080px) / 2));
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  color: white;
  background: rgba(23, 34, 28, 0.96);
  backdrop-filter: blur(14px);
}
body {
  padding-bottom: 92px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-user {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 700;
}

.top-button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  color: white;
  background: transparent;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 750;
}

.top-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--orange);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}

.brand-mark svg {
  width: 22px;
}

.top-link {
  color: #dce8df;
  font-size: 0.88rem;
  text-decoration: none;
}

.page {
  width: min(100% - 28px, 760px);
  margin: 0 auto;
  padding: 34px 0 70px;
}

.page.wide {
  width: min(100% - 28px, 1080px);
}

.hero {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 7vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.lead {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.55;
}

.card {
  margin-bottom: 18px;
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid rgba(220, 226, 220, 0.9);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}

.step {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: var(--green);
  font-size: 0.86rem;
  font-weight: 800;
}

.section-heading h2 {
  min-width: 0;
  margin: 0;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}

.heading-label {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  vertical-align: top;
}

.heading-icon {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--green);
}

.heading-label > .heading-icon {
  width: 19px;
  min-width: 19px;
  max-width: 19px;
  height: 19px;
  min-height: 19px;
  max-height: 19px;
  flex: 0 0 auto;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  font-size: 0.87rem;
  font-weight: 750;
}

.required::after {
  content: " *";
  color: var(--red);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: #fbfcfa;
  transition: border-color 160ms, box-shadow 160ms, background 160ms;
}

input,
select {
  min-height: 50px;
  padding: 0 14px;
}

textarea {
  min-height: 130px;
  padding: 14px;
  line-height: 1.5;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  background: white;
  box-shadow: 0 0 0 4px rgba(31, 107, 69, 0.11);
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.45;
}

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

.text-button {
  padding: 0;
  border: 0;
  color: var(--green);
  background: transparent;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 750;
}

.signature-pad {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(to bottom, transparent calc(100% - 48px), #e5e9e5 calc(100% - 47px), transparent calc(100% - 46px)),
    #fbfcfa;
}

.signature-pad canvas {
  display: block;
  width: 100%;
  height: 190px;
  cursor: crosshair;
  touch-action: none;
}

.signature-line {
  position: absolute;
  right: 18px;
  bottom: 19px;
  left: 18px;
  color: #8a948d;
  font-size: 0.75rem;
  pointer-events: none;
  text-align: center;
}

.photo-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.material-items {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.material-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 2fr) repeat(3, minmax(90px, 1fr));
  gap: 10px;
  padding: 16px 48px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #f8faf7;
}

.material-item input {
  min-height: 46px;
}

.material-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: white;
  background: #8b4b46;
  cursor: pointer;
  font-size: 1.15rem;
}

.material-add-button {
  margin-bottom: 10px;
}

.photo-picker {
  display: flex;
  min-height: 116px;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border: 2px dashed #b9c7bd;
  border-radius: 16px;
  color: var(--green);
  background: var(--green-soft);
  cursor: pointer;
  text-align: center;
}

.photo-picker strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
}

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

.photo-preview {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 13px;
  background: #dfe4df;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(23, 34, 28, 0.82);
  cursor: pointer;
}

.drafts-panel {
  margin-bottom: 18px;
}

.draft-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

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

.draft-item.active {
  border-color: var(--green);
  background: var(--green-soft);
}

.draft-item-body,
.draft-item-headline {
  min-width: 0;
}

.draft-item-headline {
  display: flex;
  align-items: baseline;
  gap: 8px;
  overflow: hidden;
}

.draft-item-headline strong {
  flex: 0 1 auto;
  min-width: 0;
}

.draft-item-headline strong,
.draft-item-meta,
.draft-work-excerpt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draft-item-meta,
.draft-work-excerpt {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: normal;
}

.draft-item-meta {
  display: block;
  margin-top: 4px;
}

.draft-work-excerpt {
  flex: 1 1 auto;
  min-width: 0;
}

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

.draft-item-actions button {
  width: auto;
  min-height: 42px;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .draft-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .draft-item-actions {
    justify-content: flex-end;
  }
}

.draft-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.submit-wrap {
  position: sticky;
  bottom: 12px;
  z-index: 8;
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.submit-wrap > button {
  width: auto;
  min-height: 58px;
  flex: 1 1 280px;
}

.confirm-dialog[hidden] {
  display: none;
}

.confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 27, 20, 0.72);
}

.confirm-dialog-card {
  width: min(520px, 100%);
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.confirm-dialog-card h2 {
  margin: 0 0 12px;
}

.confirm-dialog-card p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
}

.confirm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

@media (max-width: 560px) {
  .confirm-dialog-actions {
    flex-direction: column-reverse;
  }

  .confirm-dialog-actions button {
    width: 100%;
  }
}

.primary-button {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border: 0;
  border-radius: 15px;
  color: white;
  background: var(--green);
  box-shadow: 0 12px 30px rgba(31, 107, 69, 0.28);
  cursor: pointer;
  font-weight: 800;
  transition: transform 150ms, background 150ms;
}

.primary-button:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.message {
  display: none;
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  line-height: 1.45;
}

.message.show {
  display: block;
}

.message.success {
  color: #155236;
  background: #dff2e6;
}

.message.error {
  color: #7a211b;
  background: #fae1df;
}

.admin-notification {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 22px;
  padding: 20px;
  border: 1px solid #f0c78f;
  border-radius: 18px;
  background: #fff4df;
  box-shadow: var(--shadow);
}

.admin-notification h2 {
  margin: 0 0 6px;
}

.notification-report-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.notification-report-item {
  display: block;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid rgba(139, 74, 15, 0.18);
  border-radius: 12px;
  color: inherit;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  text-align: left;
}

.notification-report-item strong,
.notification-report-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-report-item span,
.notification-more {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
}

.notification-actions {
  display: grid;
  gap: 10px;
  min-width: 220px;
}

.success-panel {
  display: none;
  padding: 42px 24px;
  text-align: center;
}

.success-panel.show {
  display: block;
}

.success-icon {
  display: grid;
  width: 66px;
  height: 66px;
  margin: 0 auto 20px;
  place-items: center;
  border-radius: 20px;
  color: white;
  background: var(--green);
  font-size: 2rem;
}

.secondary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: white;
  cursor: pointer;
  text-decoration: none;
  font-weight: 750;
}

.floorplan-upload-form .secondary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.admin-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.admin-header h1 {
  margin-bottom: 0;
}

.lead.compact {
  margin: 8px 0 0;
  font-size: 0.95rem;
}

.compact-button {
  width: auto;
  min-height: 48px;
  box-shadow: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quiet-danger-button {
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
}

.quiet-danger-button:hover,
.quiet-danger-button:focus-visible {
  color: #9c302b;
  text-decoration: underline;
}

.back-button {
  margin-bottom: 18px;
  padding: 0;
  border: 0;
  color: var(--green);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

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

.project-card {
  display: flex;
  min-height: 190px;
  padding: 21px;
  flex-direction: column;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: white;
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms, transform 150ms, box-shadow 150ms;
}

.project-card:hover {
  border-color: #a5b7aa;
  box-shadow: 0 10px 28px rgba(23, 34, 28, 0.08);
  transform: translateY(-2px);
}

.project-card-top,
.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-number {
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-status {
  padding: 5px 8px;
  border-radius: 99px;
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-status.aktiv {
  color: #155236;
  background: #dff2e6;
}

.project-status.abgeschlossen {
  color: #566159;
  background: #e6eae7;
}

.project-card-title {
  margin: 22px 0 7px;
  font-size: 1.2rem;
  letter-spacing: -0.025em;
}

.project-card-meta {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.project-card-footer {
  margin-top: auto;
  padding-top: 19px;
  justify-content: flex-start;
  flex-wrap: wrap;
  min-width: 0;
  color: var(--muted);
  border-top: 1px solid #edf0ed;
  font-size: 0.77rem;
  font-weight: 700;
}

.project-report-total {
  margin-right: 2px;
  color: var(--ink);
  white-space: nowrap;
}

.project-report-status {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding: 3px 7px;
  border: 1px solid #dce5df;
  border-radius: 999px;
  background: #f3f6f4;
  color: #526159;
  font-size: 0.7rem;
  line-height: 1.2;
  white-space: nowrap;
}

.project-report-status::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-right: 5px;
  border-radius: 50%;
  background: #829188;
}

.project-report-status.attention {
  border-color: #e6c9b8;
  background: #fbf1eb;
  color: #8b3f24;
  font-weight: 850;
}

.project-report-status.attention::before { background: #b6532f; }
.project-report-status.new { color: #87500f; background: #faf5e9; border-color: #e8d9b7; }
.project-report-status.new::before { background: #b77a25; }
.project-report-status.review { color: #425f68; background: #eff5f5; border-color: #d4e2e3; }
.project-report-status.review::before { background: #668991; }
.project-report-status.confirmed { color: #316548; background: #edf6f0; border-color: #cfe3d6; }
.project-report-status.confirmed::before { background: #4f8a68; }
.project-report-status.billed::before { background: #66736b; }
.project-report-status.rejected { color: #8c332d; background: #fff3f2; border-color: #e8c9c6; }
.project-report-status.rejected::before { background: #a94c45; }

@media (max-width: 640px) {
  .project-card-footer {
    gap: 7px;
  }
}

.project-empty {
  grid-column: 1 / -1;
}

.master-data-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.project-sections {
  display: grid;
  gap: 8px;
}

.project-section {
  min-width: 0;
}

.project-section > summary {
  display: flex;
  min-height: 60px;
  padding: 9px 16px 9px 18px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 2px rgba(24, 49, 37, 0.025);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 100ms ease;
}

.project-section > summary::-webkit-details-marker {
  display: none;
}

.project-section > summary::after {
  flex: 0 0 auto;
  width: 24px;
  content: "›";
  color: var(--green);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  transform-origin: center;
  transition: transform 150ms ease;
}

.project-section[open] > summary::after {
  transform: rotate(90deg);
}

.project-section[open] > summary {
  border-color: #bed1c5;
  background: #f4f8f5;
  box-shadow: 0 1px 3px rgba(24, 49, 37, 0.05);
}

.project-section > summary:hover {
  border-color: #c6d3ca;
  background: #f8faf8;
}

.project-section > summary:active {
  background: #f0f5f1;
  transform: scale(0.998);
}

.project-section > summary:focus-visible {
  outline: 3px solid rgba(47, 107, 78, 0.2);
  outline-offset: 2px;
}

.project-section-label {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.project-section-label strong {
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.25;
}

.project-section-label small {
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 550;
  line-height: 1.3;
}

.project-section .section-content {
  padding: 12px 2px 6px;
}

.project-section .master-data-card {
  margin: 12px 2px 6px;
}

.master-data-item a {
  color: var(--green);
  font-size: 0.93rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.master-data-item {
  min-height: 88px;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.master-data-item:nth-child(2n) {
  border-right: 0;
}

.master-data-item.wide {
  grid-column: 1 / -1;
  border-right: 0;
  border-bottom: 0;
}

.master-data-item span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.master-data-item strong {
  font-size: 0.93rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.project-modal-card {
  width: min(100%, 720px);
}

.project-form {
  padding: 24px;
}

.project-form-actions {
  padding: 22px 0 0;
}

.project-form-actions .secondary-button {
  margin-left: auto;
}

.rate-heading {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.rate-heading h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.dashboard-status-grid,
.dashboard-finance-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.dashboard-status-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dashboard-finance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 24px; }

.dashboard-status-card,
.dashboard-finance-card {
  min-width: 0;
  min-height: 44px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: inherit;
  box-shadow: 0 8px 24px rgba(23, 34, 28, 0.05);
}

.dashboard-status-card { cursor: pointer; text-align: left; }
.dashboard-status-card:hover, .dashboard-status-card:focus-visible { border-color: var(--green); transform: translateY(-1px); }
.dashboard-status-card.accent { background: #edf5ef; }
.dashboard-status-card.rejected { border-color: #ead1d1; background: #fffafa; }
.dashboard-status-card.change-requested { border-color: #ead9bd; background: #fffcf6; }
.dashboard-status-card span { display: block; color: var(--muted); font-size: .84rem; }
.dashboard-status-card strong { display: block; margin-top: 7px; font-size: 1.9rem; line-height: 1; }
.dashboard-finance-card > strong { display: block; margin: 12px 0 6px; color: var(--green); font-size: clamp(1.65rem, 4vw, 2.35rem); overflow-wrap: anywhere; white-space: pre-line; }
.dashboard-finance-card > span:last-child { color: var(--muted); }
.dashboard-finance-heading { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; }
.dashboard-finance-heading select { width: auto; max-width: 55%; min-height: 44px; padding: 8px 32px 8px 10px; font-size: .82rem; }

.dashboard-reports-header { align-items: end; }
.dashboard-report-sort { display: grid; min-width: 190px; gap: 6px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.dashboard-report-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dashboard-report-card { position: relative; display: grid; min-width: 0; gap: 7px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; color: inherit; background: #fff; box-shadow: 0 8px 24px rgba(23, 34, 28, .05); text-decoration: none; transition: border-color 150ms, transform 150ms, box-shadow 150ms; }
.dashboard-report-card:hover, .dashboard-report-card:focus-visible { border-color: #a5b7aa; box-shadow: 0 10px 26px rgba(23, 34, 28, .09); transform: translateY(-1px); }
.dashboard-report-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dashboard-report-card-heading > strong { color: var(--ink); font-size: 1.05rem; }
.dashboard-report-project { color: var(--green); font-weight: 750; }
.dashboard-report-meta { color: var(--muted); font-size: .84rem; }
.dashboard-report-workflow-time { color: var(--ink); font-size: .84rem; }
.dashboard-report-card p { margin: 3px 0 0; color: #667169; font-size: .84rem; line-height: 1.45; }
.dashboard-report-price { margin-top: 3px; color: var(--green); }

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

@media (max-width: 640px) {
  .dashboard-finance-grid { grid-template-columns: 1fr; }
  .dashboard-status-card, .dashboard-finance-card { padding: 15px; }
  .dashboard-finance-heading { align-items: flex-start; flex-direction: column; }
  .dashboard-finance-heading select { width: 100%; max-width: none; }
  .dashboard-reports-header { align-items: stretch; }
  .dashboard-report-sort { width: 100%; }
  .dashboard-report-list { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .dashboard-status-grid { grid-template-columns: 1fr; }
}

.stat {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.stat strong {
  display: block;
  margin-bottom: 3px;
  font-size: 1.7rem;
}

.stat span {
  color: var(--muted);
  font-size: 0.82rem;
}

.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.toolbar input {
  flex: 1;
}

.report-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.report-search {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
}

.report-search svg {
  position: absolute;
  z-index: 1;
  left: 13px;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-width: 1.8;
  pointer-events: none;
}

.report-toolbar .report-search input,
.report-toolbar select,
.report-tools-reset {
  min-height: 44px;
  border: 1px solid #cfd8d1;
  border-radius: 11px;
  background-color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 2px rgba(24, 49, 37, 0.025);
}

.report-toolbar .report-search input {
  width: 100%;
  min-width: 0;
  padding-left: 39px;
}

.report-toolbar select {
  width: auto;
  max-width: 220px;
  padding-right: 36px;
}

.report-toolbar .report-search input:focus,
.report-toolbar select:focus,
.report-tools-reset:focus-visible {
  border-color: var(--green);
  outline: 3px solid rgba(31, 107, 69, 0.16);
  outline-offset: 1px;
}

.report-tools-reset,
.report-empty-reset {
  padding: 0 12px;
  color: var(--green);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 750;
  white-space: nowrap;
}

.report-tools-reset:hover,
.report-empty-reset:hover {
  background: var(--green-soft);
}

.report-result-count {
  grid-column: 1 / -1;
  min-height: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.2;
}

.report-result-count:empty {
  display: none;
}

.report-empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 24px 16px;
  border: 1px dashed #cfd8d1;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.64);
  text-align: center;
}

.report-empty-state p {
  margin: 0;
}

.report-empty-reset {
  min-height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
}

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

.report-item {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) minmax(300px, 360px) 12px;
  gap: 14px;
  align-items: center;
  min-height: 96px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: inherit;
  background: white;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 150ms, transform 150ms, box-shadow 150ms;
}

.report-item:hover {
  border-color: #a5b7aa;
  box-shadow: 0 8px 22px rgba(23, 34, 28, 0.07);
  transform: translateY(-1px);
}

.report-item-no-photo {
  grid-template-columns: minmax(180px, 1fr) minmax(300px, 360px) 12px;
}

.report-thumb {
  display: grid;
  width: 72px;
  height: 72px;
  overflow: hidden;
  place-items: center;
  border-radius: 11px;
  color: var(--muted);
  background: #e7ebe7;
  font-size: 1.4rem;
}

.report-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.report-main strong,
.report-main span {
  display: block;
}

.report-main strong {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.25;
}

.report-main span {
  color: var(--muted);
  font-size: 0.83rem;
}

.report-main .report-work-excerpt {
  display: -webkit-box;
  margin-top: 7px;
  overflow: hidden;
  color: #667169;
  font-size: 0.8rem;
  line-height: 1.35;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.report-details {
  display: flex !important;
  gap: 0;
  align-items: center;
  min-height: 18px;
  margin-top: 7px;
  color: #7d8780;
  font-size: 0.72rem;
}

.report-details > * {
  display: inline-flex !important;
  align-items: center;
  color: inherit !important;
  font-size: inherit !important;
}

.report-details > * + *::before {
  content: "·";
  margin: 0 6px;
}

.report-photo-count::before {
  width: 12px;
  height: 9px;
  margin-right: 5px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  box-shadow: inset 0 0 0 2px white;
  content: "";
}

.report-side {
  min-width: 0;
  text-align: right;
}

.report-status-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.report-status-summary time {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
  white-space: nowrap;
}

.report-chevron {
  width: 7px;
  height: 7px;
  border-top: 1.5px solid #879189;
  border-right: 1.5px solid #879189;
  transform: rotate(45deg);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.badge.neu {
  color: #8b4a0f;
  background: #fdebd7;
}

.badge.zur_pruefung_ag,
.badge.geprüft {
  color: #8a6500;
  background: #fff3c4;
}

.badge.bestaetigt_ag {
  color: #155236;
  background: #dff2e6;
}

.badge.verrechnet,
.badge.abgerechnet {
  color: #42524a;
  background: #e6eae7;
}

.status-progress {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 5px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #e6eae7;
}

.status-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--orange);
}

.status-progress.zur_pruefung_ag span,
.status-progress.geprüft span {
  background: #d8a018;
}

.status-progress.bestaetigt_ag span {
  background: var(--green);
}

.status-progress.verrechnet span,
.status-progress.abgerechnet span {
  background: #42524a;
}

.empty {
  padding: 54px 20px;
  color: var(--muted);
  border: 2px dashed var(--line);
  border-radius: 18px;
  text-align: center;
}

.modal {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: none;
  padding: 24px;
  overflow-y: auto;
  background: rgba(13, 21, 16, 0.66);
  backdrop-filter: blur(5px);
}

@media (max-width: 760px) {
  .users-modal {
    padding-bottom: calc(110px + env(safe-area-inset-bottom));
  }
}

.report-marker-pin { margin-left: 8px; font-size: 1rem; }
.detail-floorplan { margin-top: 20px; }
.detail-floorplan h3 { margin-bottom: 6px; }
.detail-floorplan-preview { position: relative; width: fit-content; max-width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.detail-floorplan-preview img { display: block; width: auto; max-width: 100%; max-height: 60vh; }
.detail-floorplan-preview .marker-dot { display: block; }

.modal.open {
  display: block;
}

.modal-card {
  width: min(100%, 840px);
  margin: 20px auto;
  overflow: hidden;
  border-radius: 22px;
  background: white;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
  cursor: pointer;
  font-size: 1.25rem;
}

.detail-body {
  padding: 24px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  margin-bottom: 24px;
}

.detail-block span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
  text-transform: uppercase;
}

.detail-block.full {
  grid-column: 1 / -1;
}

.detail-text {
  white-space: pre-wrap;
  line-height: 1.55;
}

.detail-photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.detail-photos img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  object-fit: cover;
}

.detail-signature {
  display: block;
  width: min(100%, 520px);
  height: 180px;
  margin-bottom: 26px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  object-fit: contain;
}

.detail-material-section {
  margin-bottom: 25px;
  overflow-x: auto;
}

.detail-material-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.detail-material-table th,
.detail-material-table td {
  padding: 10px;
  border: 1px solid var(--line);
  text-align: right;
}

.detail-material-table th {
  color: var(--muted);
  background: #f1f4f1;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.detail-material-table th:first-child,
.detail-material-table td:first-child {
  text-align: left;
}

.modal-actions {
  display: flex;
  gap: 12px;
  padding: 18px 24px 24px;
}

.modal-actions select {
  flex: 1;
}

.modal-actions .print-button {
  border-color: var(--green);
  color: var(--green);
}

.modal-actions .primary-button {
  width: auto;
  min-height: 50px;
  box-shadow: none;
}

.email-report-card { max-width: 620px; }
.customer-review-notice { padding: 16px; border: 1px solid #cbd9d0; border-left: 5px solid #237a4b; border-radius: 10px; background: #f4faf6; }
.customer-review-notice.change_requested { border-left-color: #c88713; background: #fff9eb; }
.customer-review-notice.rejected { border-left-color: #a33b33; background: #fff3f2; }
.review-reminder-status { padding: 14px 16px; border: 1px solid #cbd9d0; border-radius: 10px; background: #f7faf8; }
.review-reminder-status h3, .review-reminder-status p { margin: 0; }
.review-reminder-status p { margin-top: 6px; color: var(--muted, #555); }
.customer-work-comment{grid-column:1/-1;padding:12px;border-left:5px solid #a33b33;border-radius:6px;background:#fff3f2;color:#8b2f29}
.email-report-card textarea { resize: vertical; min-height: 150px; }
.report-history { margin-top: 22px; border-top: 1px solid var(--line, #d8d8dc); padding-top: 14px; }
.report-history summary { cursor: pointer; font-weight: 650; padding: 8px 0; }
.report-history-item { display: grid; gap: 3px; padding: 12px 0 12px 14px; border-left: 3px solid #34a853; border-bottom: 1px solid var(--line, #e5e5e7); }
.report-history-item.failed { border-left-color: #d65b50; }
.report-history-item.neutral { border-left-color: #8a9690; }
.report-history-item time, .report-history-item small { color: var(--muted, #666); font-size: .85rem; }
.report-history-item span { overflow-wrap: anywhere; }

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

.login-shell {
  width: min(100%, 460px);
}

.login-card {
  padding: clamp(26px, 6vw, 42px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.login-brand {
  width: fit-content;
  margin-bottom: 34px;
  color: var(--ink);
}

.login-card h1 {
  margin: 4px 0 10px;
  font-size: clamp(2rem, 8vw, 2.8rem);
  letter-spacing: -0.055em;
}

.invitation-card {
  width: min(100%, 34rem);
}

.invitation-eyebrow,
.invitation-label {
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.invitation-context {
  border-block: 1px solid var(--border);
  margin: 1rem 0 1.25rem;
  padding: 1rem 0;
}

.invitation-context p { margin: 0 0 .4rem; }
.invitation-context h2,
#wrongEmailState h2 { font-size: 1.15rem; margin: 0; overflow-wrap: anywhere; }
.invitation-account { display: grid; gap: .25rem; margin-bottom: 1rem; }
.invitation-account span { color: var(--muted); overflow-wrap: anywhere; }
.invitation-action { display: block; margin-top: 1rem; min-height: 2.75rem; text-align: center; width: 100%; }
.invitation-switch { display: grid; gap: .25rem; justify-items: center; margin-top: 1.25rem; text-align: center; }
.invitation-switch .link-button { min-height: 2.75rem; }

@media (max-width: 480px) {
  .invitation-shell { padding: 1rem; }
  .invitation-card { padding: 1.25rem; }
  .invitation-card h1 { font-size: 1.65rem; }
}

.login-form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.privacy-notice {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(31, 107, 69, 0.18);
  border-radius: 18px;
  background: rgba(31, 107, 69, 0.07);
  color: var(--ink);
}

.privacy-notice[hidden] {
  display: none;
}

.privacy-notice strong {
  font-size: 0.92rem;
}

.privacy-notice p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.privacy-notice a {
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.login-secondary {
  width: 100%;
}

.legal-page {
  min-height: 100vh;
  padding: clamp(18px, 5vw, 48px);
  background:
    radial-gradient(circle at top left, rgba(246, 139, 31, 0.16), transparent 34%),
    var(--canvas);
}

.legal-card {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 44px);
}

.legal-card h1 {
  margin: 4px 0 18px;
  font-size: clamp(2rem, 6vw, 3.2rem);
  letter-spacing: -0.055em;
}

.legal-card p {
  color: var(--muted);
  line-height: 1.65;
}

.users-modal-card {
  width: min(960px, 100%);
}

.users-content {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1.15fr);
  gap: 28px;
  padding: 0 24px 28px;
}

.user-form {
  align-self: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f7f9f6;
}

.user-form h3,
.users-content section > h3 {
  margin: 0 0 18px;
}

.company-profile-logo-preview {
  display: flex;
  align-items: center;
  min-height: 48px;
  margin-top: 10px;
}

.company-profile-logo {
  display: block;
  max-width: min(140px, 100%);
  max-height: 90px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.company-profile-logo[hidden] {
  display: none;
}

.company-profile-logo-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.user-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.user-form-actions button {
  width: auto;
}

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

.user-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.company-list-item {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
}

.company-list-item.selected {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: 0 0 0 2px rgba(31, 107, 69, 0.12);
}

.company-list-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.company-list-actions button {
  width: auto;
  white-space: nowrap;
}

.user-item.inactive {
  opacity: 0.65;
}

.user-item > div:first-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.user-item > div:first-child span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-status {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.user-status.active {
  color: var(--green);
  background: var(--green-soft);
}

.user-status.inactive {
  color: var(--red);
  background: #f8e7e5;
}

.user-actions {
  display: flex;
  grid-column: 1 / -1;
  gap: 8px;
}

.user-actions .secondary-button {
  width: auto;
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.78rem;
}

@media (max-width: 640px) {
  .top-link {
    display: none;
  }

  .top-user {
    display: none;
  }

  .top-button {
    padding: 0 10px;
  }

  .page {
    padding-top: 25px;
  }

  .admin-notification {
    grid-template-columns: 1fr;
  }

  .notification-actions {
    min-width: 0;
  }

  .grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .field.full,
  .detail-block.full {
    grid-column: auto;
  }

  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .material-item {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .material-description {
    grid-column: 1 / -1;
  }

  .admin-header {
    align-items: start;
    flex-direction: column;
  }

  .header-actions,
  .project-grid,
  .master-data-card {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .header-actions {
    display: flex;
    flex-direction: column;
  }

  .header-actions .primary-button,
  .header-actions .secondary-button,
  .admin-header > .primary-button {
    width: 100%;
  }

  .header-actions .quiet-danger-button {
    align-self: flex-start;
  }

  .project-section > summary {
    min-height: 52px;
    padding: 0 14px;
  }

  .project-section .section-content {
    padding: 14px;
  }

  .master-data-item,
  .master-data-item:nth-child(2n),
  .master-data-item.wide {
    grid-column: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .master-data-item:last-child {
    border-bottom: 0;
  }

  .toolbar {
    flex-direction: column;
  }

  .toolbar input,
  .toolbar select {
    width: 100%;
  }

  .stats {
    gap: 8px;
  }

  .stat {
    padding: 15px 12px;
  }

  .stat strong {
    font-size: 1.35rem;
  }

  .report-item {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .report-thumb {
    width: 62px;
    height: 62px;
  }

  .report-side {
    grid-column: 2;
    text-align: left;
  }

  .report-side time {
    display: inline;
    margin-left: 7px;
  }

  .modal {
    padding: 0;
  }

  .modal-card {
    min-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .modal-actions .primary-button,
  .modal-actions .secondary-button {
    width: 100%;
  }

  .detail-photos {
    grid-template-columns: 1fr;
  }

  .users-content {
    grid-template-columns: 1fr;
    padding: 0 18px 24px;
  }

  .user-form-actions,
  .user-actions {
    flex-direction: column;
  }

  .user-form-actions button,
  .user-actions .secondary-button {
    width: 100%;
  }
}
.bottom-nav {
  position: fixed;
  left: 50%;
  width: min(calc(100% - 28px), var(--content-width, 1080px));
  bottom: 0;
  z-index: 9999;
  transform: translateX(-50%);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 72px;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(250, 249, 245, 0.94);
  border: 1px solid rgba(29, 78, 57, 0.14);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -6px 20px rgba(23, 34, 28, 0.07);
  backdrop-filter: blur(18px) saturate(150%);
}

.bottom-nav-item {
  flex: 1;
  border: none;
  background: none;
  color: #66736c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  min-height: 56px;
}

.account-footer {
  position: fixed;
  z-index: 9998;
  left: 50%;
  bottom: 72px;
  display: flex;
  width: min(calc(100% - 28px), var(--content-width, 1080px));
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 14px;
  transform: translateX(-50%);
  color: var(--muted);
  background: rgba(250, 249, 245, 0.94);
  border: 1px solid rgba(29, 78, 57, 0.12);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  font-size: 0.78rem;
  backdrop-filter: blur(18px) saturate(150%);
}

.account-footer[hidden] { display: none; }

.account-footer button {
  padding: 3px;
  border: 0;
  color: var(--green);
  background: transparent;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.account-footer button:hover { text-decoration: underline; }
.account-footer button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.account-footer button:disabled { opacity: 0.55; cursor: wait; }

.bottom-nav-item span {
  font-size: 11px;
}

.nav-icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page {
  padding-bottom: 120px;
}

body {
  padding-bottom: 0;
}

.personal-report-filters { display: grid; grid-template-columns: 1.3fr repeat(2, 1fr); gap: 14px; }
.personal-report-filters label { display: grid; gap: 7px; color: var(--muted); font-size: .82rem; font-weight: 750; }
.personal-report-search { grid-column: 1 / -1; }
.personal-report-list { display: grid; gap: 14px; margin-top: 16px; }
.personal-report-card { width: 100%; display: flex; justify-content: space-between; gap: 20px; text-align: left; cursor: pointer; color: inherit; }
.personal-report-card h2 { margin: 5px 0 8px; }
.personal-report-card p { margin: 0; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.personal-report-card time { color: var(--muted); font-size: .82rem; font-weight: 700; }
.personal-report-meta { min-width: 145px; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 9px; }
.personal-report-dialog { width: min(720px, calc(100% - 24px)); max-height: calc(100dvh - 40px); border: 0; border-radius: 20px; padding: 0; }
.personal-report-dialog::backdrop { background: rgba(15, 27, 21, .48); }
.personal-report-dialog article { padding: 24px; }
.personal-detail-head { display: flex; justify-content: space-between; gap: 20px; }
.personal-detail-head h2 { margin-top: 4px; }
.personal-detail-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.personal-detail-summary div { padding: 14px; border-radius: 12px; background: var(--green-soft); }
.personal-detail-summary dt { color: var(--muted); font-size: .78rem; }
.personal-detail-summary dd { margin: 5px 0 0; font-weight: 800; }
.personal-description { white-space: pre-wrap; }
@media (max-width: 620px) {
  .personal-report-filters { grid-template-columns: 1fr 1fr; }
  .personal-report-filters label:first-child, .personal-report-search { grid-column: 1 / -1; }
  .personal-report-card { flex-direction: column; }
  .personal-report-meta { min-width: 0; align-items: flex-start; }
}

/* Apple Review: Kontolöschung */
.account-modal-card { max-width: 760px; }
.account-content { display: grid; gap: 22px; }
.account-information, .danger-zone { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.account-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.subscription-status { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; padding: 14px; border-radius: 12px; background: var(--green-soft); }
.subscription-status strong, .subscription-status span { display: block; }
.subscription-status span { color: var(--muted); font-size: .9rem; }
.subscription-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.subscription-plan-card { display: flex; min-height: 132px; flex-direction: column; align-items: flex-start; gap: 7px; padding: 16px; border: 2px solid var(--line); border-radius: 14px; color: inherit; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.subscription-plan-card:hover, .subscription-plan-card:focus-visible { border-color: var(--green); box-shadow: 0 5px 18px rgba(31, 92, 63, .12); }
.subscription-plan-card strong { color: var(--green); font-size: 1.1rem; }
.subscription-plan-card span:last-child { margin-top: auto; color: var(--muted); font-size: .88rem; }
.subscription-plan-card:disabled { opacity: .55; cursor: wait; }
.subscription-plan-card.unavailable:disabled { cursor: not-allowed; }
.subscription-plan-card .subscription-plan-warning { margin-top: 0; color: var(--danger); font-size: .8rem; }
.subscription-plan-card.loading { border-color: var(--green); }
.danger-zone { border-color: #efb5b5; background: #fff8f8; }
.delete-account-form { display: grid; gap: 14px; margin-top: 18px; }
.delete-confirmation-check { display: flex; align-items: flex-start; gap: 10px; line-height: 1.45; }
.delete-confirmation-check input { width: 20px; height: 20px; margin-top: 1px; flex: 0 0 auto; }
.danger-button { border: 0; border-radius: 12px; padding: 12px 16px; color: #fff; background: #b42318; font: inherit; font-weight: 800; cursor: pointer; }
.danger-button:hover { background: #912018; }
.danger-button:disabled { opacity: .6; cursor: wait; }
@media (max-width: 760px) { .account-links { flex-direction: column; } .account-links > * { width: 100%; text-align: center; } .subscription-plans { grid-template-columns: 1fr; } .subscription-plan-card { min-height: 0; } }
.work-entries { display: grid; gap: 1rem; margin-bottom: 1rem; }
.work-entry { padding: 1rem; border: 1px solid var(--border, #d4d9d5); border-radius: 12px; background: rgba(255,255,255,.55); }
.work-entry h3 { margin: 0 0 .75rem; }
.work-entry-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; }
.work-entry-remove { margin-top: .75rem; }
.work-entry-summary { margin: .75rem 0 0; font-weight: 600; color: var(--primary, #315844); }
.work-entry-summary.error { color: #a12d24; }
.work-entries-total { margin: 0 0 1rem; padding: .75rem 1rem; border-radius: 10px; background: #edf3ef; font-weight: 700; }
@media (max-width: 700px) { .work-entry-grid { grid-template-columns: 1fr 1fr; } .work-entry-grid .field:first-child { grid-column: 1 / -1; } }

/* Rapport bearbeiten: Leistungsarten und Arbeitszeit übersichtlich gruppieren */
.edit-work-entry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.edit-work-entry-grid .field:nth-child(5),
.edit-work-entry-grid .field:nth-child(6),
.edit-work-entry-grid .field:nth-child(7) {
  grid-column: span 1;
}

@media (max-width: 900px) {
  .edit-work-entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .edit-work-entry-grid {
    grid-template-columns: 1fr;
  }
}

/* Neue Zeiterfassung: Tagesgruppe mit einzelnen Leistungszeilen */
.work-entry {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.work-day-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.work-day-date {
  width: min(320px, 100%);
}

.work-entry > h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.work-service-header,
.work-service-line {
  display: grid;
  grid-template-columns:
    minmax(150px, 1.35fr)
    minmax(75px, .55fr)
    minmax(120px, 1fr)
    minmax(120px, 1fr)
    minmax(90px, .75fr)
    minmax(100px, .8fr)
    38px;
  gap: 10px;
  align-items: end;
}

.work-service-header {
  padding: 0 2px 7px;
  font-size: .78rem;
  font-weight: 800;
  color: var(--muted);
}

.work-service-lines {
  display: grid;
  gap: 10px;
}

.work-service-line {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.work-service-line label {
  display: none;
}

.work-service-total output {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 10px;
  background: #edf3ef;
  font-weight: 800;
  white-space: nowrap;
}

.work-service-total output.error {
  color: var(--red);
  background: #fff4f3;
}

.work-service-remove {
  width: 38px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--red);
  font-size: 1.5rem;
  cursor: pointer;
}

.work-service-add {
  margin-top: 12px;
}

.work-entry-summary {
  margin: 12px 0 0;
  font-size: .88rem;
  font-weight: 700;
  color: var(--primary);
}

@media (max-width: 850px) {
  .work-service-header {
    display: none;
  }

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

  .work-service-line label {
    display: block;
  }

  .work-service-type,
  .work-service-total {
    grid-column: 1 / -1;
  }

  .work-service-remove {
    grid-column: 2;
    justify-self: end;
  }
}

@media (max-width: 520px) {
  .work-day-header {
    align-items: stretch;
    flex-direction: column;
  }

  .work-day-date {
    width: 100%;
  }

  .work-service-line {
    grid-template-columns: 1fr;
  }

  .work-service-type,
  .work-service-total,
  .work-service-remove {
    grid-column: auto;
  }

  .work-service-remove {
    justify-self: end;
  }
}

/* =========================================================
   Tagesgruppen – saubere Leistungszeilen
   ========================================================= */

.work-service-header,
.work-service-line {
  display: grid;
  grid-template-columns:
    minmax(150px, 1.45fr)
    minmax(75px, 0.65fr)
    minmax(120px, 1.05fr)
    minmax(120px, 1.05fr)
    minmax(85px, 0.75fr)
    minmax(105px, 0.85fr)
    40px;
  gap: 12px;
  align-items: end;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Leistungszeile bleibt vollständig innerhalb des Tagesblocks */
.work-service-line {
  padding: 14px;
  overflow: hidden;
}

/* Jede Spalte darf sich im Grid korrekt verkleinern */
.work-service-line .field {
  min-width: 0;
  margin: 0;
}

/* Alle Eingabefelder exakt gleich hoch */
.work-service-line input,
.work-service-line select,
.work-service-line output {
  width: 100%;
  max-width: 100%;
  height: 56px;
  min-height: 56px;
  box-sizing: border-box;
}

/* Total-Zeit optisch genauso hoch wie die Eingabefelder */
.work-service-line output[data-work="total"] {
  display: flex;
  align-items: center;
  padding: 0 14px;
  white-space: nowrap;
}

/* Entfernen-Button bleibt innerhalb der Zeile */
.work-service-remove {
  width: 40px;
  min-width: 40px;
  height: 56px;
  min-height: 56px;
  justify-self: center;
  align-self: end;
  margin: 0;
}

/* Tablet / kleinere Fenster */
@media (max-width: 900px) {
  .work-service-header {
    display: none;
  }

  .work-service-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }

  .work-service-type,
  .work-service-total {
    grid-column: 1 / -1;
  }

  .work-service-remove {
    grid-column: 2;
    justify-self: end;
  }
}

/* =========================================================
   Zeiterfassung – finale Tabellenzeile innerhalb des Blocks
   ========================================================= */

.work-entry {
  overflow: hidden;
}

.work-service-lines {
  width: 100%;
  min-width: 0;
}

/* Kopfzeile und Eingabezeile exakt gleich aufbauen */
.work-service-header,
.work-service-line {
  display: grid;
  grid-template-columns:
    1.55fr
    0.65fr
    1.15fr
    1.15fr
    0.80fr
    1.00fr
    42px;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  align-items: center;
}

.work-service-header {
  padding: 0 16px;
  margin-bottom: 8px;
}

.work-service-line {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

/* Grid-Elemente dürfen nicht mehr über den Block hinaus drücken */
.work-service-line > *,
.work-service-header > * {
  min-width: 0;
}

/* Labels innerhalb der ei/* Labels innerhalb der ei/* Labels innÜberschriften bereits darüber stehen */
.work-service-line .field label {
  display: none;
}

/* Alle Eingabefelder exakt gleich hoch */
.work-service-line input,
.work-service-line select,
.work-service-line output {
  width: 100%;
  min-width: 0;
  height: 64px;
  box-sizing: border-box;
}

/* Total-Zeit als sauberes Feld */
.work-service-line output[data-work="total"] {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 12px;
  background: #edf3ef;
  font-weight: 800;
  white-space: nowrap;
}

/* Löschen-X erhält eine eigene feste Spalte */
.work-service-remove {
  width: 42px;
  min-width: 42px;
  height: 64px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  line-height: 1;
  color: #b83227;
  cursor: pointer;
}

/* Tablet */
@media (max-width: 900px) {
  .work-service-header {
    display: none;
  }

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

  .work-service-line .field label {
    display: block;
  }

  .work-service-remove {
    justify-self: end;
  }
}

/* Smartphone */
@media (max-width: 600px) {
  .work-service-line {
    grid-template-columns: 1fr;
  }

  .work-service-remove {
    width: 100%;
    height: 44px;
    justify-content: flex-end;
  }
}

/* Dokumentation 4.1 / 4.2 */
.documentation-subsection {
  margin-top: 22px;
}

.documentation-subheading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 1rem;
  font-weight: 800;
}

.documentation-subheading .heading-label {
  flex: 0 1 auto;
}

.documentation-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 40px;
  padding: 0 10px;
  border-radius: 12px;
  background: var(--primary, #1f744c);
  color: #fff;
  font-weight: 900;
}

/* Grundriss-Auswahl optisch als Aktion hervorheben */
.floorplan-documentation {
  padding: 18px;
  border: 1px solid #c7d8cd;
  border-radius: 16px;
  background: #edf5f0;
}

.floorplan-documentation select {
  background: #fff;
}

.floorplan-documentation .hint {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .documentation-subheading {
    align-items: center;
    gap: 11px;
  }
}

/* =========================================================
   RegieRapport – klare Führung durch Schritt 2 und 3
   ========================================================= */

.work-description-highlight,
.work-time-highlight {
  margin-top: 26px;
  padding: 26px;
  border: 1px solid #d5dfd8;
  border-radius: 22px;
  background: #f4f8f5;
  box-sizing: border-box;
}

.work-description-title {
  margin-bottom: 18px;
}

.work-description-title strong {
  display: block;
  color: #176b45;
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.work-description-title span {
  display: block;
  color: #68766e;
  font-size: 0.95rem;
}

.work-description-highlight textarea {
  min-height: 180px;
  background: #ffffff;
}

.work-time-highlight {
  background: #f8faf8;
}

/* Material bewusst als Unterbereich ohne eigenen Hauptschritt */
.material-heading {
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .work-description-highlight,
  .work-time-highlight {
    padding: 18px;
    border-radius: 18px;
  }
}
/* =========================================================
   Entwurfsablage standardmäßig kompakt/einklappbar
   ========================================================= */

.draft-toggle-button {
  width: 100%;
  min-height: 58px;
  margin: 0 0 14px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #edf3ef;
  color: #17221c;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}

.draft-toggle-button:hover {
  border-color: #1f7049;
}

.draft-toggle-arrow {
  width: 22px;
  flex: 0 0 22px;
  color: #1f7049;
  font-size: 16px;
}

.draft-collapsible[hidden] {
  display: none !important;
}

.draft-collapsible {
  display: block;
  margin-bottom: 16px;
}


/* =========================================================
   Zeit & Ausführung:
   Zeitfelder breiter, komplette Zeile bleibt im Block
   ========================================================= */

.work-service-header,
.work-service-line {
  grid-template-columns:
    minmax(150px, 1.25fr)
    minmax(76px, .55fr)
    minmax(145px, 1.15fr)
    minmax(145px, 1.15fr)
    minmax(92px, .72fr)
    minmax(120px, .9fr)
    42px;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.work-service-line {
  overflow: visible;
}

.work-service-line > *,
.work-service-header > * {
  min-width: 0;
}

/* Von/Bis bekommen ausreichend Platz für "07:00 Uhr" usw. */
.work-service-line select[data-work="startTime"],
.work-service-line select[data-work="endTime"] {
  min-width: 0;
  width: 100%;
  padding-left: 12px;
  padding-right: 30px;
}

/* Anzahl bewusst kompakter */
.work-service-count {
  min-width: 0;
}

/* Total bleibt kompakt und bricht nicht um */
.work-service-line output[data-work="total"] {
  min-width: 0;
  width: 100%;
  white-space: nowrap;
}

/* Tablet */
@media (max-width: 900px) {
  .work-service-header {
    display: none;
  }

  .work-service-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .work-service-line .field label {
    display: block;
  }

  .work-service-remove {
    justify-self: end;
  }
}

/* Smartphone */
@media (max-width: 600px) {
  .work-service-line {
    grid-template-columns: 1fr;
  }

  .work-service-remove {
    width: 100%;
    height: 44px;
    justify-content: flex-end;
  }
}

/* =========================================================
   ZEITERFASSUNG – finale Spaltenbreiten
   Alle Felder sichtbar, komplette Zeile bleibt im Rahmen
   ========================================================= */

@media (min-width: 901px) {

  .work-service-header,
  .work-service-line {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;

    grid-template-columns:
      minmax(170px, 1.55fr)   /* Leistungsart */
      minmax(75px, 0.65fr)    /* Anzahl */
      minmax(145px, 1.25fr)   /* Von */
      minmax(145px, 1.25fr)   /* Bis */
      minmax(100px, 0.85fr)   /* Pause */
      minmax(120px, 1fr)      /* Total Zeit */
      42px;                   /* Löschen */
  }

  .work-service-line {
    gap: 14px;
  }

  .work-service-header {
    gap: 14px;
  }

  .work-service-line > *,
  .work-service-header > * {
    min-width: 0;
  }

  .work-service-line input,
  .work-service-line select,
  .work-service-line output {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  /* Pause darf nicht mehr zusammengedrückt werden */
  .work-service-line [data-work="breakMinutes"] {
    min-width: 0;
    width: 100%;
  }

  /* Von/Bis vollständig lesbar */
  .work-service-line [data-work="startTime"],
  .work-service-line [data-work="endTime"] {
    width: 100%;
    min-width: 0;
  }

  /* Löschen bleibt sauber innerhalb des Blocks */
  .work-service-remove {
    width: 42px;
    min-width: 42px;
    max-width: 42px;
  }
}

/* =========================================================
   ZEITERFASSUNG – Desktop finale Breitenkorrektur
   Pause, Total und Löschen vollständig sichtbar
   ========================================================= */

@media (min-width: 901px) {

  /* Tagesblock nutzt die verfügbare Breite */
  .work-entry {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }

  .work-service-lines {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /*
   * Kompaktere Spalten:
   * Leistungsart | Anzahl | Von | Bis | Pause | Total | X
   */
  .work-service-header,
  .work-service-line {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;

    grid-template-columns:
      minmax(145px, 1.35fr)
      minmax(65px, 0.55fr)
      minmax(125px, 1.05fr)
      minmax(125px, 1.05fr)
      minmax(90px, 0.72fr)
      minmax(105px, 0.85fr)
      36px;

    gap: 10px;
  }

  /* Nichts darf das Grid künstlich verbreitern */
  .work-service-line > *,
  .work-service-header > *,
  .work-service-line .field {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Eingabefelder bleiben innerhalb ihrer Spalten */
  .work-service-line input,
  .work-service-line select,
  .work-service-line output {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Von und Bis bleiben vollständig lesbar */
  .work-service-line [data-work="startTime"],
  .work-service-line [data-work="endTime"] {
    padding-left: 10px;
    padding-right: 8px;
  }

  /* Pause bekommt ausdrücklich genügend Platz */
  .work-service-line [data-work="breakMinutes"] {
    width: 100%;
    min-width: 0;
    padding-left: 10px;
    padding-right: 4px;
  }

  /* Total kompakt halten */
  .work-service-line output[data-work="total"] {
    width: 100%;
    min-width: 0;
    padding-left: 6px;
    padding-right: 6px;
    white-space: nowrap;
  }

  /* X braucht nur eine kleine eigene Spalte */
  .work-service-remove {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    padding: 0;
  }
}

/* =========================================================
   Dokumentation 4.1 / 4.2 / 4.3 / 4.4
   ========================================================= */

.documentation-subsection {
  margin-top: 28px;
}

.documentation-subheading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  font-size: 1.12rem;
}

.documentation-number {
  flex: 0 0 auto;
  min-width: 62px;
  height: 54px;
  padding: 0 12px;
  border-radius: 15px;
  background: var(--primary, #1f7149);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 850;
}

.documentation-input-card {
  padding: 20px;
  border: 1px solid #b9d1c2;
  border-radius: 18px;
  background: #edf5f0;
}

.execution-location-card label {
  display: block;
  margin-bottom: 10px;
  font-weight: 800;
}

.execution-location-card textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  box-sizing: border-box;
  background: #fff;
}

.optional-label {
  font-weight: 600;
  color: var(--muted, #68756d);
}

.floorplan-documentation {
  width: 100%;
  box-sizing: border-box;
}

.attachment-form-card { display: grid; gap: 12px; }
.attachment-form-controls { display: flex; align-items: end; gap: 14px; }
.attachment-note-field { flex: 1 1 300px; margin: 0; }
.attachment-note-field label { display: block; margin-bottom: 8px; font-weight: 800; }
.attachment-note-field input { width: 100%; box-sizing: border-box; background: #fff; }
.attachment-form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.attachment-file-picker { cursor: pointer; margin: 0; }
.attachment-list { display: grid; gap: 8px; }
.attachment-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px; border: 1px solid #cbd9d0; border-radius: 11px; background: #fff; }
.attachment-row > div { display: grid; gap: 2px; min-width: 0; }
.attachment-row a { color: var(--primary, #1f7149); font-weight: 750; overflow-wrap: anywhere; }
.attachment-row small { color: var(--muted, #68756d); overflow-wrap: anywhere; }
.attachment-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; background: #e3f0e8; color: var(--primary, #1f7149); font-size: .7rem; font-weight: 850; }
.attachment-row audio { grid-column: 2 / -1; width: 100%; height: 38px; }
.attachment-remove { border: 0; background: transparent; color: #96382f; font: inherit; cursor: pointer; padding: 8px; }
.attachment-empty { margin: 0; padding: 12px; border: 1px dashed #b9c9bf; border-radius: 10px; color: var(--muted, #68756d); }
.attachment-pending { color: #805b13; }
.attachment-recording-status { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 11px 14px; border: 1px solid #e2aaa6; border-radius: 12px; background: #fff7f6; color: #76251f; }
.attachment-recording-status[hidden] { display: none; }
.attachment-recording-microphone { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: #f8d9d6; color: #c52e27; animation: recording-microphone-pulse 1.5s ease-in-out infinite; }
.attachment-recording-microphone svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.attachment-recording-waves { display: flex; flex: 0 0 43px; height: 26px; align-items: center; justify-content: center; gap: 3px; }
.attachment-recording-waves i { display: block; width: 4px; height: 30%; border-radius: 4px; background: #d23b33; animation: recording-wave .85s ease-in-out infinite alternate; }
.attachment-recording-waves i:nth-child(2) { animation-delay: -.6s; }
.attachment-recording-waves i:nth-child(3) { animation-delay: -.3s; }
.attachment-recording-waves i:nth-child(4) { animation-delay: -.7s; }
.attachment-recording-waves i:nth-child(5) { animation-delay: -.15s; }
.attachment-recording-label { min-width: 0; white-space: nowrap; }
.attachment-recording-time { margin-left: auto; color: #4f2522; font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }
.recording-stop { border-color: #b82d27; background: #fff1f0; color: #9f241f; }
.recording-stop-icon { display: inline-block; width: .72em; height: .72em; margin-right: 8px; border-radius: 2px; background: currentColor; }

@keyframes recording-microphone-pulse { 50% { box-shadow: 0 0 0 6px rgb(197 46 39 / 14%); transform: scale(1.05); } }
@keyframes recording-wave { from { height: 25%; } to { height: 95%; } }

@media (max-width: 700px) {
  .attachment-form-controls { align-items: stretch; flex-direction: column; }
  .attachment-note-field { flex-basis: auto; }
  .attachment-form-actions > * { flex: 1 1 auto; text-align: center; }
  .attachment-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .attachment-row audio { grid-column: 1 / -1; }
  .attachment-recording-status { flex-wrap: wrap; gap: 8px 10px; }
  .attachment-recording-label { flex: 1 1 auto; }
  .attachment-recording-time { flex: 0 0 100%; margin-left: 87px; }
}

@media (max-width: 400px) {
  .attachment-recording-time { margin-left: 0; padding-left: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .attachment-recording-microphone,
  .attachment-recording-waves i { animation: none; }
  .attachment-recording-waves i:nth-child(2),
  .attachment-recording-waves i:nth-child(4) { height: 70%; }
  .attachment-recording-waves i:nth-child(3) { height: 100%; }
}

.floorplan-documentation .floorplan-field {
  margin: 0;
}

@media (max-width: 600px) {
  .documentation-subheading {
    align-items: flex-start;
  }

  .documentation-input-card {
    padding: 16px;
  }
}


/* Passwort zurücksetzen */

.login-forgot-wrap {
  margin-top: -0.25rem;
  text-align: right;
}

.link-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0.25rem 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.forgot-password-panel {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(23, 34, 28, 0.15);
  border-radius: 14px;
}

.login-reset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.login-reset-actions > button {
  flex: 1 1 180px;
}

.reset-password-success {
  margin-top: 1rem;
}

.reset-password-success .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* =========================================================
   ZEITERFASSUNG – EINDEUTIGES RESPONSIVES LAYOUT
   Leistungsart / Anzahl / Von / Bis / Pause / Total
   ========================================================= */

.work-service-header {
  display: none !important;
}

.work-service-line {
  position: relative;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-template-areas:
    "type count"
    "start end"
    "break total";
  gap: 14px 12px !important;
  padding: 16px 56px 16px 16px;
  overflow: visible !important;
  align-items: end;
}

.work-service-line .field {
  min-width: 0 !important;
  max-width: none !important;
}

.work-service-line .field label {
  display: block !important;
  margin-bottom: 6px;
}

.work-service-type {
  grid-area: type !important;
}

.work-service-count {
  grid-area: count !important;
}

.work-service-start {
  grid-area: start !important;
}

.work-service-end {
  grid-area: end !important;
}

.work-service-break {
  grid-area: break !important;
}

.work-service-total {
  grid-area: total !important;
  align-self: end;
}

.work-service-line input,
.work-service-line select {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 48px !important;
  box-sizing: border-box !important;
}

.work-service-line select[data-work="startTime"],
.work-service-line select[data-work="endTime"] {
  padding-left: 12px;
  padding-right: 30px;
}

.work-service-line select.work-time-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.work-time-picker {
  position: relative;
  width: 100%;
}

.work-time-trigger {
  width: 100%;
  height: 48px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
}

.work-time-trigger::after {
  content: "⌄";
  position: absolute;
  right: 12px;
  color: var(--muted);
}

.work-time-trigger:focus-visible {
  outline: 2px solid var(--primary, #1f7149);
  outline-offset: 2px;
}

.work-time-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  max-height: min(320px, 50vh);
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px rgb(0 0 0 / 18%);
  box-sizing: border-box;
  overscroll-behavior: contain;
}

.work-time-options[hidden] {
  display: none;
}

.work-time-option {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

.work-time-option:hover,
.work-time-option:focus-visible {
  background: #edf5f0;
  outline: none;
}

.work-count-stepper {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.work-count-button {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: #edf5f0;
  color: var(--primary, #1f7149);
  font: inherit;
  font-size: 1.35rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
}

.work-count-button:active {
  background: #dcebe2;
}

.work-count-stepper input[data-work="employeesCount"] {
  height: 46px !important;
  padding: 0 4px !important;
  border: 0;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 0;
  text-align: center;
  font-weight: 800;
  appearance: textfield;
}

.work-count-stepper input[data-work="employeesCount"]::-webkit-inner-spin-button,
.work-count-stepper input[data-work="employeesCount"]::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.work-service-break input[data-work="breakMinutes"] {
  width: min(220px, 100%) !important;
  padding-right: 8px !important;
}

.work-service-total output {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-weight: 700;
}

.work-service-remove {
  position: absolute;
  top: 14px;
  right: 12px;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0;
  background: transparent;
  color: #b83227;
  font-size: 26px !important;
  line-height: 1;
}

@media (max-width: 600px) {
  .work-entry {
    padding: 14px;
  }

  .work-service-remove {
    top: 11px;
    right: 8px;
  }
}

/* Neue Rapporte: kompakter, einklappbarer Admin-Hinweis */
.admin-notification {
  display: block;
  min-width: 0;
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid #f0c78f;
  border-radius: 18px;
  background: #fff4df;
  box-shadow: var(--shadow);
}

.notification-bell {
  position: relative;
  flex: 0 0 auto;
  font-size: 1.55rem;
  line-height: 1;
}

.notification-dot {
  position: absolute;
  top: -3px;
  right: -4px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff4df;
  border-radius: 50%;
  background: #c62828;
}

.admin-notification-toggle {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: flex-start;
  gap: 14px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.admin-notification-heading {
  display: block;
  min-width: 0;
  flex: 1;
}

.admin-notification-heading .eyebrow {
  display: block;
  margin-bottom: 4px;
}

.admin-notification-title {
  display: block;
  margin: 0 0 4px;
  font-size: 1.45rem;
  font-weight: 750;
  line-height: 1.2;
}

.admin-notification-heading .lead.compact {
  margin-top: 4px;
}

.admin-notification-chevron {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  margin: 8px 3px 0 8px;
  border-right: 2px solid #8b4a0f;
  border-bottom: 2px solid #8b4a0f;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.admin-notification-toggle[aria-expanded="true"] .admin-notification-chevron {
  transform: rotate(225deg);
}

.admin-notification-content {
  min-width: 0;
  padding-top: 14px;
}

.notification-report-list {
  display: grid;
  gap: 8px;
  margin-top: 0;
}

.notification-report-item {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(139, 74, 15, 0.18);
  border-radius: 12px;
  color: inherit;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  text-align: left;
}

.notification-report-item strong,
.notification-report-item span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.notification-report-item strong {
  font-size: 0.98rem;
  line-height: 1.25;
}

.notification-report-item span,
.notification-more {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.notification-actions {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin-top: 14px;
}

.notification-actions .compact-button,
.notification-actions .secondary-button {
  width: 100%;
}

@media (max-width: 640px) {
  .admin-notification {
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
  }

  .admin-notification-title {
    font-size: 1.2rem;
  }

  .admin-notification-toggle {
    gap: 10px;
  }

  .admin-notification-chevron {
    margin-left: 4px;
  }

  .notification-report-item {
    padding: 9px 10px;
  }
}

/* Einklappen von Neue Rapporte deutlich sichtbar machen */
.admin-notification-toggle {
  position: relative;
  padding-right: 145px;
}

.admin-notification-chevron {
  position: absolute;
  top: 4px;
  right: 0;
  width: auto;
  height: auto;
  margin: 0;
  padding: 8px 13px;
  border: 1px solid rgba(23, 34, 28, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  transform: none;
}

.admin-notification-chevron::before {
  content: "Anzeigen ▼";
}

.admin-notification-toggle[aria-expanded="true"] .admin-notification-chevron {
  transform: none;
}

.admin-notification-toggle[aria-expanded="true"] .admin-notification-chevron::before {
  content: "Einklappen ▲";
}

@media (max-width: 640px) {
  .admin-notification-toggle {
    padding-right: 105px;
  }

  .admin-notification-chevron {
    top: 2px;
    padding: 7px 9px;
    font-size: 0.74rem;
  }
}

/* Weitere offene Rapporte direkt im gelben Block anzeigen */
.notification-more-button {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
}

.notification-more-button:hover,
.notification-more-button:focus-visible {
  background: rgba(255, 255, 255, 0.55);
  outline: none;
}

@media (max-width: 640px) {
  .notification-more-button {
    padding: 10px 8px;
    font-size: 0.82rem;
  }
}

/* Leistungszeilen: eindeutige, am Tagesblock ausgerichtete Breakpoints */
.work-entry {
  container-type: inline-size;
}

/* Schmale Tagesblöcke: alle Bedienelemente nutzen die volle Breite. */
@container (max-width: 479px) {
  .work-service-line {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "type"
      "count"
      "start"
      "end"
      "break"
      "total" !important;
  }

  .work-service-line .field,
  .work-count-stepper,
  .work-service-break input[data-work="breakMinutes"] {
    width: 100% !important;
  }
}

/* Mittlere Breiten: drei kompakte, gleichmäßig aufgeteilte Feldpaare. */
@container (min-width: 480px) {
  .work-service-line {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-areas:
      "type count"
      "start end"
      "break total" !important;
  }

  .work-service-total {
    display: block !important;
  }
}

/* Breite Tagesblöcke: alle Felder passen in eine einzige Zeile. */
@container (min-width: 960px) {
  .work-service-line {
    grid-template-columns:
      minmax(210px, 1.5fr)
      minmax(180px, 1fr)
      minmax(120px, 0.85fr)
      minmax(120px, 0.85fr)
      minmax(90px, 0.65fr)
      minmax(110px, 0.75fr) !important;
    grid-template-areas: "type count start end break total" !important;
    column-gap: 10px !important;
    padding: 16px 56px 16px 16px;
  }

  .work-service-total {
    display: block !important;
  }

  .work-service-line .field label {
    display: block !important;
  }
}

.work-count-stepper {
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  min-width: 0;
}

.work-count-button,
.work-service-remove {
  min-width: 44px !important;
  min-height: 44px !important;
}

.work-service-remove {
  width: 44px !important;
  max-width: 44px !important;
  height: 44px !important;
  z-index: 1;
  cursor: pointer;
  touch-action: manipulation;
}

/* Rapportstatus direkt in der Rapportkarte */
.badge.angepasst {
  color: #315a78;
  background: #e1eef7;
}

.badge.abgelehnt {
  color: #8f2019;
  background: #fde4e2;
}

.status-progress.angepasst span {
  background: #477fa5;
}

.customer-change-request {
  border-left: 5px solid #b7791f;
  background: #fffaf0;
}
.customer-change-request h2 { margin: .2rem 0 .75rem; }
.customer-change-request-text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}
.customer-change-request-meta { margin: .85rem 0 0; color: var(--muted); font-size: .9rem; }
.customer-change-badge {
  display: inline-block;
  padding: .2rem .55rem;
  border: 1px solid #c9b37e;
  border-radius: 999px;
  background: #fffaf0;
  color: #684b16;
  font-size: .78rem;
  font-weight: 700;
}

.status-progress.abgelehnt span {
  background: #b83227;
}

.report-status-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 5px 6px;
  width: min(100%, 360px);
  margin-top: 9px;
  margin-left: auto;
}

.report-status-choice {
  display: inline-flex;
  min-width: 0;
  min-height: 34px;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.70rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.report-status-choice:hover,
.report-status-choice:focus-visible {
  border-color: var(--line);
  background: #f1f4f1;
  outline: none;
}

.report-status-choice.active {
  font-weight: 800;
}

.report-status-choice.status-neu.active {
  color: #8b4a0f;
  background: #fdebd7;
}

.report-status-choice.status-zur_pruefung_ag.active {
  color: #8a6500;
  background: #fff3c4;
}

.report-status-choice.status-angepasst.active {
  color: #315a78;
  background: #e1eef7;
}

.report-status-choice.status-bestaetigt_ag.active {
  color: #155236;
  background: #dff2e6;
}

.report-status-choice.status-verrechnet.active {
  color: #314039;
  background: #e6eae7;
}

.report-status-choice.status-abgelehnt.active {
  color: #8f2019;
  background: #fde4e2;
}

.report-status-choice:disabled {
  opacity: 0.55;
  cursor: wait;
}

.status-confirm-card {
  max-width: 520px;
}

.status-confirm-card > p {
  line-height: 1.55;
}

.status-confirm-warning {
  padding: 14px 16px;
  border: 1px solid #d49a35;
  border-radius: 10px;
  color: #704000;
  background: #fff3d5;
}

@media (max-width: 760px) {
  .report-status-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-left: 0;
  }

  .report-status-choice {
    min-height: 44px;
  }
}

/* Das Rapportarchiv bleibt auf mittleren Breiten kontrolliert zweispaltig. */
@media (max-width: 1040px) and (min-width: 641px) {
  .report-item {
    grid-template-columns: auto minmax(0, 1fr) 12px;
  }

  .report-item-no-photo {
    grid-template-columns: minmax(0, 1fr) 12px;
  }

  .report-side {
    grid-column: 2;
    text-align: left;
  }

  .report-status-summary {
    justify-content: flex-start;
  }

  .report-status-choices {
    margin-left: 0;
  }

  .report-chevron {
    grid-column: 3;
    grid-row: 1 / span 2;
  }


  .report-item-no-photo .report-side {
    grid-column: 1;
  }

  .report-item-no-photo .report-chevron {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .report-toolbar {
    grid-template-columns: 1fr;
  }

  .report-toolbar .report-search,
  .report-toolbar select,
  .report-tools-reset {
    width: 100%;
    max-width: none;
  }

  .report-item {
    grid-template-columns: minmax(0, 1fr) 12px;
    grid-template-areas:
      "main chevron"
      "thumb thumb"
      "side side";
    gap: 11px 10px;
    min-height: 0;
    padding: 13px;
  }

  .report-main {
    grid-area: main;
  }

  .report-thumb {
    grid-area: thumb;
    width: 64px;
    height: 64px;
  }

  .report-side {
    grid-area: side;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    text-align: left;
  }

  .report-status-summary {
    justify-content: flex-start;
  }

  .report-chevron {
    grid-area: chevron;
    align-self: start;
    margin-top: 6px;
  }

  .report-status-choices {
    margin-left: 0;
  }
}

@media (max-width: 1040px) and (min-width: 641px) {
  .report-toolbar {
    grid-template-columns: minmax(220px, 1fr) minmax(170px, auto);
  }

  .report-toolbar .report-search {
    grid-column: 1 / -1;
  }

  .report-toolbar select {
    width: 100%;
    max-width: none;
  }

  .report-tools-reset {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

/* Hauptnavigation und kompaktes Start-Cockpit */
.bottom-nav-item.active {
  color: var(--green);
  background: rgba(38, 109, 78, 0.08);
  box-shadow: none;
}

.bottom-nav-item:focus-visible {
  outline: 3px solid rgba(38, 109, 78, 0.3);
  outline-offset: -4px;
}

.cockpit-page {
  width: min(calc(100% - 28px), 920px);
}

.cockpit-hero {
  display: grid;
  justify-items: start;
  padding-bottom: 8px;
}

.cockpit-primary-action {
  margin-top: 12px;
  min-width: min(100%, 280px);
  text-align: center;
  text-decoration: none;
}

.cockpit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.cockpit-card {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.cockpit-card h2,
.admin-cockpit h2,
.admin-settings h2 {
  margin: 2px 0 8px;
}

.cockpit-link {
  display: inline-block;
  text-decoration: none;
}

.cockpit-section-heading,
.admin-settings {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.cockpit-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.2fr);
  gap: 10px;
  margin-top: 18px;
}

.cockpit-status-grid a {
  display: grid;
  gap: 8px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: var(--green-soft);
  text-decoration: none;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.cockpit-status-grid span { color: var(--muted); font-size: .82rem; font-weight: 700; }
.cockpit-status-grid strong { min-width: 0; font-size: 1.25rem; overflow-wrap: anywhere; }
.cockpit-status-grid small { color: var(--muted); font-size: .72rem; line-height: 1.35; }
.cockpit-status-grid a.has-open-task {
  border-color: rgba(38, 109, 78, .28);
  background: rgba(231, 244, 237, .82);
  box-shadow: 0 5px 16px rgba(29, 78, 57, .06);
}
.cockpit-status-grid a.has-open-task span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--green);
  vertical-align: 1px;
}
.cockpit-status-grid a.has-open-task strong { font-weight: 800; }
.cockpit-status-grid a.attention-needed-open {
  border-color: rgba(190, 119, 26, .38);
  background: rgba(255, 246, 226, .92);
  box-shadow: 0 5px 18px rgba(145, 91, 20, .09);
}
.cockpit-status-grid a.attention-needed-open span,
.cockpit-status-grid a.attention-needed-open small { color: #8a591d; }
.cockpit-status-grid a.attention-needed-open strong { color: #9a5c0b; font-weight: 800; }
.cockpit-status-amount strong { white-space: pre-line; }
.admin-settings { margin-top: 22px; }
.admin-settings-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }

.admin-section-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 520px;
  margin: 0 0 20px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--green-soft);
}

.admin-section-tab {
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.admin-section-tab.active {
  color: #fff;
  background: var(--green);
  box-shadow: 0 4px 12px rgba(29, 78, 57, .16);
}

.admin-section-tab:focus-visible {
  outline: 3px solid rgba(38, 109, 78, .28);
  outline-offset: 2px;
}

#admin-section-settings .admin-settings { margin-top: 0; }

@media (max-width: 900px) {
  .cockpit-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .bottom-nav-item { min-width: 0; padding-inline: 4px; font-size: 17px; }
  .bottom-nav-item span { font-size: 10px; overflow-wrap: anywhere; }
  .cockpit-grid { grid-template-columns: 1fr; }
  .cockpit-card { min-height: 0; }
  .cockpit-section-heading, .admin-settings { align-items: stretch; flex-direction: column; }
  .cockpit-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-settings-actions { justify-content: stretch; }
  .admin-settings-actions > * { width: 100%; }
}

@media (max-width: 380px) {
  .admin-section-nav { grid-template-columns: 1fr; }
}
/* Project-scoped commercial conditions reuse the existing card language. */
.project-partner-list {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.project-partner-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface, #fff);
  box-shadow: 0 4px 14px rgba(24, 55, 42, 0.06);
}

.project-partner-card-title { margin: 0; overflow-wrap: anywhere; }

.project-partner-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.project-partner-status {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(90, 105, 98, 0.1);
  font-size: 0.82rem;
  line-height: 1.25;
}

.project-partner-status span { font-weight: 750; }
.project-partner-status.is-active,
.project-partner-status.is-approved { color: var(--green); background: var(--green-soft); }
.project-partner-status.is-pending,
.project-partner-status.is-missing { color: #765500; background: #fff4cf; }
.project-partner-status.is-changes_requested { color: #8a4425; background: #ffeadf; }

.project-partner-meta,
.partner-condition-rates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 0;
}

.project-partner-meta div,
.partner-condition-rates div { min-width: 0; }
.project-partner-meta dt,
.partner-condition-rates dt { color: var(--muted); font-size: 0.78rem; }
.project-partner-meta dd,
.partner-condition-rates dd { margin: 0.15rem 0 0; font-weight: 700; overflow-wrap: anywhere; }
.project-partner-invitation-meta { margin: 0.9rem 0 0; color: var(--muted); }

.partner-condition-panel {
  margin-top: 0.75rem;
  padding: 0.9rem;
  border: 1px solid rgba(35, 122, 75, 0.24);
  border-radius: 12px;
  background: rgba(35, 122, 75, 0.06);
}

.partner-condition-panel h4 { margin: 0; }
.partner-condition-rates { margin-top: 0.75rem; }
.partner-condition-actions,
.project-partner-revoke { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.project-partner-revoke { padding-top: 0.85rem; border-top: 1px solid var(--line); }

@media (max-width: 520px) {
  .project-partner-card { padding: 0.85rem; }
  .project-partner-status { white-space: normal; }
  .project-partner-meta,
  .partner-condition-rates { grid-template-columns: 1fr; }
  .partner-condition-actions > button,
  .project-partner-revoke > button { width: 100%; }
}

.partner-condition-panel .compact-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 0.65rem;
  margin-top: 0.65rem;
}

/* Optional AI report capture and temporary review states. */
.ai-entry-card{display:flex;align-items:center;justify-content:space-between;gap:22px;border-color:#c9ddd0;background:linear-gradient(135deg,#fff,#f4faf6)}
.ai-entry-card h2{margin-bottom:6px}.ai-entry-card p:last-child{margin-bottom:0}
.ai-primary-button{min-height:48px;padding:11px 20px;border:0;border-radius:13px;color:#fff;background:var(--green);box-shadow:0 7px 18px rgba(31,107,69,.2);cursor:pointer;font-weight:800}.ai-primary-button:hover{background:var(--green-dark)}
.ai-dialog{width:min(92vw,520px);max-height:90vh;padding:0;border:0;border-radius:24px;color:var(--ink);background:#fff;box-shadow:0 28px 80px rgba(10,25,16,.3)}.ai-dialog::backdrop{background:rgba(13,26,18,.48);backdrop-filter:blur(3px)}.ai-dialog-content{padding:clamp(22px,5vw,32px)}.ai-lead{font-size:.98rem}
.ai-languages{display:grid;gap:9px;margin:22px 0;padding:0;border:0}.ai-languages legend{margin-bottom:10px;font-size:.87rem;font-weight:800}.ai-languages label{display:flex;align-items:center;gap:10px;padding:11px 13px;border:1px solid var(--line);border-radius:11px}.ai-languages input{width:auto}.ai-record-button{width:100%;min-height:56px}.ai-cancel{display:block;margin:18px auto 0}
.ai-recording,.ai-processing{text-align:center;padding:24px 0 10px}.ai-recording strong,.ai-processing strong{display:block;margin:8px}.ai-recording-dot{display:inline-block;width:18px;height:18px;border-radius:50%;background:var(--red);animation:ai-pulse 1.2s infinite}.ai-timer{display:block;margin:10px;font-size:2.2rem;font-variant-numeric:tabular-nums;font-weight:800}.ai-spinner{display:inline-block;width:30px;height:30px;border:3px solid var(--line);border-top-color:var(--green);border-radius:50%;animation:ai-spin .8s linear infinite}
.ai-result-summary{margin:20px 0;padding:0;list-style:none}.ai-result-summary li{margin:9px 0}.ai-result-summary .warning,.ai-review-note{color:#86500e}.ai-result-actions{display:flex;flex-wrap:wrap;gap:10px}
.ai-question-block{margin:18px 0;padding:18px;border:1px solid #c9ddd0;border-radius:16px;background:linear-gradient(135deg,#fff,#f4faf6)}.ai-question-block>strong{display:block;font-size:1.05rem;line-height:1.45}.ai-question-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}.ai-question-actions .ai-record-button,.ai-question-actions .ai-large-action{flex-basis:100%;width:100%}.ai-question-actions button,.ai-question-actions label{min-height:48px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.ai-next-button{font-weight:800}.ai-project-sheet{position:fixed;inset:0;z-index:2;pointer-events:auto}.ai-sheet-backdrop{position:absolute;inset:0;width:100%;border:0;background:rgba(13,26,18,.48);pointer-events:auto}.ai-project-sheet>section{position:absolute;z-index:1;right:0;bottom:0;left:0;display:grid;gap:14px;max-height:min(78dvh,680px);padding:10px 18px max(20px,env(safe-area-inset-bottom));border-radius:24px 24px 0 0;background:#fff;box-shadow:0 -18px 60px rgba(10,25,16,.25);pointer-events:auto}.ai-sheet-handle{width:44px;height:5px;margin:auto;border-radius:5px;background:#ccd4cf}.ai-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.ai-sheet-head h2{margin:0}.ai-project-sheet input{min-height:48px}.ai-project-list{display:grid;gap:8px;overflow-y:auto;overscroll-behavior:contain}.ai-project-option{display:grid;gap:4px;width:100%;min-height:64px;padding:12px 14px;text-align:left;border:1px solid var(--line);border-radius:13px;background:#fff;color:var(--ink)}.ai-project-option strong{font-size:1rem}.ai-project-option span{color:var(--muted);font-size:.86rem}
.field.ai-field-uncertain,.material-item.ai-field-uncertain{padding:10px;border:1px solid #e8bd71;border-radius:12px;background:#fff8e8}.field.ai-field-missing,.material-item.ai-field-missing{padding:10px;border:1px dashed #c06c55;border-radius:12px;background:#fff4f0}.ai-review-note{font-size:.78rem;font-weight:750}
@keyframes ai-pulse{50%{opacity:.35;transform:scale(.8)}}@keyframes ai-spin{to{transform:rotate(360deg)}}
@media(max-width:640px){.ai-entry-card{align-items:stretch;flex-direction:column}.ai-dialog{width:100%;max-width:none;margin:auto 0 0;border-radius:24px 24px 0 0}}

/* User-scoped interface language controls. */
.language-settings { margin-top: 16px; display: grid; gap: 12px; }
.language-settings select { max-width: 280px; }
.account-language { display: inline-flex; align-items: center; gap: 6px; }
.account-language select { width: auto; padding: 4px 24px 4px 8px; }
.communication-bell{position:relative;display:inline-flex;flex:0 0 44px;width:44px;height:44px;align-items:center;justify-content:center;padding:9px;border:0;border-radius:50%;color:var(--green);background:transparent;cursor:pointer}.communication-bell:hover,.communication-bell[aria-expanded="true"]{background:rgba(38,109,78,.09)}.communication-bell:focus-visible{outline:3px solid rgba(38,109,78,.3);outline-offset:1px}.communication-bell svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.communication-bell span{position:absolute;right:0;top:0;display:flex;min-width:19px;height:19px;align-items:center;justify-content:center;padding:1px 5px;border:2px solid #faf9f5;border-radius:999px;background:#b72d2d;color:#fff;font-size:.68rem;font-weight:800;line-height:1}.communication-bell span[hidden]{display:none}.communication-panel{margin-bottom:22px}.communication-panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.communication-panel-heading h2{margin-top:0}.communication-list{display:grid;gap:10px}.communication-item{padding:16px;border:1px solid #dfe5df;border-radius:14px;cursor:pointer}.communication-item.unread{border-left:5px solid #347552;background:#f5faf6}.communication-item.important{border-color:#c98d2e}.communication-item header{display:flex;justify-content:space-between;gap:12px}.communication-item time{color:#647069;font-size:.8rem}.communication-item p{white-space:pre-wrap}.push-invitation{padding:14px;margin-bottom:16px;border-radius:12px;background:#edf5ef}@media(max-width:600px){.app-header-company{flex-shrink:1}.communication-panel{margin-inline:0}.communication-item header{flex-direction:column;gap:4px}.communication-bell{flex-basis:42px;width:42px;height:42px;padding:9px}.communication-bell span{right:-1px;top:-1px}.communication-item .secondary-button{display:block;text-align:center}}
.communication-image{display:block;width:100%;max-height:280px;object-fit:cover;border-radius:10px;margin-bottom:.75rem}.communication-flyer{display:block;margin:.75rem 0;overflow-wrap:anywhere}

.resource-row { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem; padding: .6rem 0; border-bottom: 1px solid #ddd; }
.resource-row > label { flex: 1 1 110px; min-width: 0; }
.resource-row input:not([type=checkbox]) { width: 100%; }
.resource-row button { min-height: 44px; }
@media (max-width: 600px) { .resource-row > label:first-child { flex-basis: 100%; } }

.resource-row input[type=checkbox] { width: 22px; height: 22px; min-height: 0; display: block; margin: 10px 0; }
.work-service-line .resource-quantity { grid-area: count !important; }
#projectModal { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }

.resource-price { display: block; white-space: normal; overflow-wrap: anywhere; margin-top: 4px; color: var(--muted); }

/* B1: an open online form also reports a lost connection, without implying sync. */
.regie-offline-notice { margin:0; padding:12px 20px; background:#fce8c8; color:#71430a; font-size:14px; line-height:1.6; }
.regie-offline-notice[hidden] { display:none; }
.regie-offline-notice a { color:inherit; font-weight:700; text-decoration:underline; }

/* Equal touch targets for local draft actions and their confirmation. */
.draft-item-actions button, .draft-delete-dialog button {
  min-width: 44px;
  min-height: 44px;
  touch-action: manipulation;
}
.draft-item-actions button { flex: 1; border-radius: 12px; background: #fff; color: #235a36; border: 1px solid #8bae93; }
.draft-item-actions .draft-delete-button, .draft-delete-dialog .draft-delete-button { background: #fff; color: #8b2020; border: 1px solid #c99393; }
.draft-item-actions button:active, .draft-delete-dialog button:active { filter: brightness(.9); }
.draft-item-headline strong, .draft-item-meta { white-space: normal; overflow-wrap: anywhere; }
.draft-delete-dialog { max-width: min(90vw, 460px); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.draft-delete-dialog::backdrop { background: #0008; }
.draft-delete-dialog button { margin: 4px; }
@media (max-width: 340px) { .draft-item-actions { flex-direction: column; } }
