.construction-diary-page {
  --construction-accent: #e63312;
  --construction-ink: #172033;
  --construction-muted: #667085;
  max-width: 1320px;
  margin: 0 auto;
}

.construction-standalone-body { min-height: 100vh; background: #f4f6f8; }
.construction-standalone-header { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.65rem max(1rem, env(safe-area-inset-right)) 0.65rem max(1rem, env(safe-area-inset-left)); border-bottom: 1px solid #d9dee7; background: rgb(255 255 255 / 96%); backdrop-filter: blur(10px); }
.construction-standalone-brand { display: flex; align-items: center; gap: 0.65rem; color: #172033; font-weight: 800; text-decoration: none; }
.construction-standalone-brand img { width: 116px; max-height: 34px; object-fit: contain; }
.construction-standalone-user { display: flex; align-items: center; gap: 0.65rem; }
.construction-standalone-main { padding: 1rem max(1rem, env(safe-area-inset-right)) calc(1rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); }

.construction-eyebrow {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--construction-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.construction-page-header { align-items: flex-start; gap: 1rem; }
.construction-page-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.65rem; flex-wrap: wrap; }

.construction-site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1rem;
}

.construction-site-card,
.construction-report-card,
.construction-candidate {
  width: 100%;
  border: 1px solid var(--color-border, #d9dee7);
  color: var(--construction-ink);
  text-align: left;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.construction-site-card:hover,
.construction-report-card:hover,
.construction-candidate:hover {
  border-color: var(--construction-accent);
  box-shadow: 0 10px 26px rgb(23 32 51 / 10%);
  transform: translateY(-1px);
}

.construction-site-card:focus-visible,
.construction-report-card:focus-visible,
.construction-candidate:focus-visible {
  outline: 3px solid rgb(230 51 18 / 22%);
  outline-offset: 2px;
}

.construction-site-card {
  display: flex;
  min-height: 210px;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.15rem;
  background: #fff;
  border-radius: 14px;
}

.construction-site-card__top,
.construction-detail-actions,
.construction-report-top-actions,
.construction-finalize-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.construction-site-card > strong { font-size: 1.08rem; }
.construction-site-card > span:not(.construction-site-card__top) { color: var(--construction-muted); }
.construction-site-card__meta { margin-top: auto; font-size: 0.85rem; }
.construction-site-card__assignees { font-size: 0.8rem; font-weight: 600; }

.construction-empty {
  grid-column: 1 / -1;
  padding: 2rem;
  text-align: center;
}

.construction-candidate-list { display: grid; gap: 0.75rem; }
.construction-candidate {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  background: #fff;
  border-radius: 10px;
}
.construction-candidate span { color: var(--construction-muted); }

.construction-manual-site-form { display: grid; gap: 1rem; }
.construction-manual-site-intro { margin: 0; color: var(--construction-muted); line-height: 1.5; }
.construction-manual-site-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.construction-manual-site-grid .form-group { min-width: 0; }
.construction-manual-site-wide { grid-column: 1 / -1; }
.construction-manual-save-status { padding: 0.7rem 0.8rem; border-radius: 9px; background: #f4f6f8; color: var(--construction-muted); font-size: 0.82rem; font-weight: 700; }
.construction-manual-save-status[data-state="saving"] { background: #fffbeb; color: #92400e; }
.construction-manual-save-status[data-state="saved"] { background: #ecfdf3; color: #166534; }
.construction-manual-save-status[data-state="error"] { background: #fff1f2; color: #b91c1c; }

.construction-detail-actions { margin-bottom: 1rem; }

.construction-autosave-bar {
  position: sticky;
  z-index: 8;
  top: 0.5rem;
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem auto;
  padding: 0.55rem 0.8rem;
  border: 1px solid #d6dae2;
  border-radius: 999px;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 6px 18px rgb(23 32 51 / 10%);
  color: var(--construction-muted);
  font-size: 0.82rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.construction-save-dot { width: 0.62rem; height: 0.62rem; border-radius: 50%; background: #16a34a; }
.construction-autosave-bar[data-state="local"] .construction-save-dot,
.construction-autosave-bar[data-state="syncing"] .construction-save-dot { background: #d97706; }
.construction-autosave-bar[data-state="syncing"] .construction-save-dot { animation: construction-save-pulse 900ms ease-in-out infinite; }
.construction-autosave-bar[data-state="offline"] .construction-save-dot { background: #64748b; }
.construction-autosave-bar[data-state="conflict"] .construction-save-dot,
.construction-autosave-bar[data-state="error"] .construction-save-dot { background: #dc2626; }

@keyframes construction-save-pulse { 50% { transform: scale(1.45); opacity: 0.55; } }

.construction-conflict-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 2px solid #d97706;
  background: #fffbeb;
}
.construction-conflict-panel p { margin: 0.25rem 0 0; }
.construction-conflict-copy { flex: 1; min-width: 0; }
.construction-conflict-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-top: 0.85rem; }
.construction-conflict-comparison article { min-width: 0; padding: 0.75rem; border: 1px solid #f0c36d; border-radius: 9px; background: #fff; }
.construction-conflict-comparison h3 { margin: 0 0 0.55rem; font-size: 0.95rem; }
.construction-conflict-comparison dl { display: grid; gap: 0.5rem; margin: 0; }
.construction-conflict-comparison dt { color: var(--construction-muted); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }
.construction-conflict-comparison dd { margin: 0.15rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.construction-conflict-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.construction-undo-bar {
  position: fixed;
  z-index: 1200;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  max-width: min(420px, calc(100vw - 2rem));
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  overflow: hidden;
  border-radius: 12px;
  background: #172033;
  box-shadow: 0 16px 36px rgb(23 32 51 / 24%);
  color: #fff;
}
.construction-undo-bar .btn { color: #fff; border-color: rgb(255 255 255 / 40%); }
.construction-undo-countdown { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: #e63312; animation: construction-undo-countdown 10s linear forwards; }
@keyframes construction-undo-countdown { to { transform: translateX(-100%); } }

.construction-site-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.construction-summary-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem;
}

.construction-summary-card > span:first-child {
  color: var(--construction-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.construction-inline-form { display: flex; gap: 0.5rem; }
.construction-inline-form .input-field { min-width: 0; }
.construction-assignment-list { display: grid; gap: 0.35rem; max-height: 180px; overflow: auto; }

.construction-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.construction-section-heading h2 { margin: 0; }
.construction-section-heading p { margin: 0.25rem 0 0; color: var(--construction-muted); }
.construction-section-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.construction-history-list { display: grid; gap: 0.65rem; }
.construction-history-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.8rem; border: 1px solid var(--color-border, #d9dee7); border-radius: 10px; }
.construction-history-item div { display: grid; gap: 0.25rem; }
.construction-history-item span { color: var(--construction-muted); font-size: 0.85rem; }

.construction-report-list { display: grid; gap: 0.75rem; }
.construction-report-card {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(160px, 1fr) minmax(180px, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  background: #fff;
  border-radius: 12px;
}
.construction-report-card > span { display: flex; flex-direction: column; gap: 0.25rem; }
.construction-report-card small { color: var(--construction-muted); }
.construction-report-card__status { align-items: flex-start; }
.construction-site-details { margin-bottom: 1.5rem; }
.construction-site-details > summary { cursor: pointer; padding-block: 0.65rem; color: var(--construction-muted); }
.construction-site-details .construction-site-summary { margin-top: 0.65rem; }

.construction-send-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem; padding: 0.8rem 0; border-block: 1px solid var(--color-border, #d9dee7); }
.construction-select-all { display: flex; align-items: center; gap: 0.5rem; min-height: 44px; cursor: pointer; }
.construction-send-toolbar > span { margin-left: auto; color: var(--construction-muted); font-size: 0.85rem; }
.construction-report-row { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; gap: 0.4rem; border-bottom: 1px solid var(--color-border, #d9dee7); }
.construction-report-select { display: flex; align-items: center; justify-content: center; min-height: 44px; cursor: pointer; }
.construction-report-select input,.construction-select-all input { width: 20px; height: 20px; accent-color: var(--construction-accent); }
.construction-report-row .construction-report-card { border: 0; border-radius: 0; box-shadow: none; background: transparent; grid-template-columns: minmax(100px,1fr) minmax(110px,1fr) minmax(140px,1fr) auto; }
.construction-report-row .construction-report-card:hover { background: #fff; transform: none; }
.construction-share-message { width: 100%; resize: vertical; margin-top: 0.5rem; font: inherit; line-height: 1.5; }
.construction-share-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 1rem; }

@media (max-width: 1000px) {
  .construction-report-row { grid-template-columns: 44px minmax(0,1fr); }
  .construction-share-report { grid-column: 2; justify-self: start; margin: 0 0 0.8rem 1.15rem; }
  .construction-report-row .construction-report-card { grid-template-columns: minmax(0,1fr) auto; }
  .construction-report-row .construction-report-card__stats,.construction-report-row .construction-report-card__status { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .construction-send-toolbar > .btn,.construction-share-actions .btn { width: 100%; min-height: 44px; }
  .construction-share-report { margin-left: 0; width: 100%; min-height: 44px; }
  .construction-report-row .construction-report-card { padding-inline: 0; }
  .construction-report-row .construction-report-card__date { grid-column: 1; grid-row: 1; }
  .construction-report-row .construction-report-card__stats { grid-column: 1; grid-row: 2; }
  .construction-report-row .construction-report-card__status { grid-column: 2; grid-row: 1 / 3; max-width: 130px; }
  .construction-report-row .construction-report-card > span:last-child { display: none; }
  .construction-share-message { max-height: 240px; }
}

.construction-report-layout,
.construction-final-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.construction-form-section { min-width: 0; padding: 1.15rem; }
.construction-form-section--wide { grid-column: 1 / -1; }
.construction-form-section h2 { margin-top: 0; }

.construction-employees { display: grid; gap: 0.75rem; }
.construction-employee-row {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.9fr 1.2fr 0.6fr 1fr auto;
  align-items: end;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid var(--color-border, #d9dee7);
  border-radius: 10px;
  background: #fafbfc;
}
.construction-employee-row .form-group { margin: 0; }
.construction-remove-employee {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: #fff0ed;
  color: #a12612;
  font-size: 1.35rem;
  cursor: pointer;
}

.construction-workforce-summary {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.construction-workforce-summary span {
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  background: #fff0ed;
  color: #7d2415;
}

.construction-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}
.construction-photo-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0.65rem;
  border: 1px solid var(--color-border, #d9dee7);
  border-radius: 10px;
  background: #fff;
}
.construction-photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 7px;
  background: #f1f3f5;
}
.construction-photo-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--construction-muted);
  cursor: zoom-in;
  text-align: center;
  font: inherit;
}
.construction-photo-open img { display: block; }
.construction-photo-open span { display: block; padding: 0.35rem; font-size: 0.8rem; }
.construction-photo-open:focus-visible { outline: 2px solid var(--color-primary, #ef2e0a); outline-offset: 3px; }
.construction-photo-preview { margin: 0; display: grid; gap: 0.75rem; }
.construction-photo-preview img { display: block; width: 100%; max-height: 65vh; max-height: 65dvh; object-fit: contain; }
.construction-photo-preview figcaption { overflow-wrap: anywhere; color: var(--construction-muted); }
.construction-photo-card figcaption { overflow-wrap: anywhere; font-size: 0.84rem; }
.construction-photo-upload { display: grid; gap: 0.65rem; margin-top: 1rem; }
.construction-no-photos { grid-column: 1 / -1; }
.construction-photo-trash { margin-top: 1rem; padding: 0.75rem; border: 1px dashed #d97706; border-radius: 10px; background: #fffbeb; }
.construction-photo-trash summary { cursor: pointer; font-weight: 700; }
.construction-photo-trash > p { margin: 0.4rem 0 0.7rem; color: var(--construction-muted); font-size: 0.84rem; }
.construction-trash-list { display: grid; gap: 0.45rem; }
.construction-trash-item { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; padding: 0.55rem; border-radius: 8px; background: #fff; }

.construction-signature {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
}
.construction-signature-pad {
  position: relative;
  min-height: 150px;
  border: 1px dashed #98a2b3;
  border-radius: 10px;
  overflow: hidden;
  background: repeating-linear-gradient(0deg, #fff, #fff 34px, #f1f3f5 35px);
}
.construction-signature-pad canvas {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 150px;
  touch-action: none;
  cursor: crosshair;
}
.construction-signature-pad img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.22;
}
.construction-signature-actions { display: flex; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap; }
.construction-saved-signature { margin: .75rem 0; }
.construction-saved-signature img { display: block; width: 100%; max-width: 360px; height: 100px; object-fit: contain; object-position: left center; background: #fff; }
.construction-saved-signature figcaption { margin-top: .25rem; font-size: .9rem; color: #475467; }
.construction-signature[data-signature-validity="stale"] { padding: 0.75rem; border: 2px solid #dc2626; border-radius: 10px; background: #fff7f7; }
.construction-signature[data-signature-validity="stale"] .construction-signature-status { color: #b91c1c; font-weight: 700; }
.construction-signature[data-signature-validity="valid"] .construction-signature-status { color: #15803d; font-weight: 700; }
.construction-signature[data-signature-validity="pending"] { padding: 0.75rem; border: 2px solid #d97706; border-radius: 10px; background: #fffbeb; }
.construction-signature[data-signature-validity="pending"] .construction-signature-status,
.construction-pending-label { color: #b45309; font-weight: 700; }

.construction-finalize-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid #f0b6aa;
  border-radius: 12px;
  background: #fff8f6;
}
.construction-finalize-card h2 { margin: 0 0 0.35rem; }
.construction-finalize-card p { margin: 0; color: var(--construction-muted); }

.construction-final-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.construction-final-fields div { padding: 0.85rem; border-radius: 9px; background: #f7f8fa; }
.construction-final-fields dt { color: var(--construction-muted); font-size: 0.78rem; font-weight: 700; }
.construction-final-fields dd { margin: 0.4rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.construction-final-employees { min-width: 720px; }
.construction-checksum { display: block; margin-top: 0.35rem; overflow-wrap: anywhere; font-size: 0.74rem; }
.construction-output-actions,
.construction-share-fallback { display: flex; gap: 0.6rem; margin-top: 1rem; flex-wrap: wrap; }
.construction-review-list { display: grid; gap: 0.45rem; padding: 0; list-style: none; }
.construction-review-list li { padding: 0.6rem 0.7rem; border-radius: 8px; }
.construction-review-ok { background: #ecfdf3; color: #166534; }
.construction-review-warning { background: #fffbeb; color: #92400e; }
.construction-review-blocker { background: #fff1f2; color: #b91c1c; font-weight: 700; }

@media (max-width: 1050px) {
  .construction-site-summary { grid-template-columns: 1fr 1fr; }
  .construction-summary-card:last-child { grid-column: 1 / -1; }
  .construction-employee-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .construction-remove-employee { justify-self: end; }
}

@media (max-width: 760px) {
  .construction-page-header,
  .construction-section-heading,
  .construction-finalize-card { flex-direction: column; align-items: stretch; }
  .construction-site-summary,
  .construction-report-layout,
  .construction-final-grid,
  .construction-final-fields { grid-template-columns: 1fr; }
  .construction-summary-card:last-child,
  .construction-form-section--wide { grid-column: auto; }
  .construction-report-card { grid-template-columns: 1fr auto; }
  .construction-report-card__stats,
  .construction-report-card__status { grid-column: 1 / -1; }
  .construction-employee-row { grid-template-columns: 1fr; }
  .construction-remove-employee { width: 100%; }
  .construction-inline-form { flex-direction: column; }
  .construction-report-top-actions,
  .construction-finalize-actions { width: 100%; }
  .construction-report-top-actions .btn,
  .construction-finalize-actions .btn,
  .construction-page-header > .btn { width: 100%; }
  .construction-autosave-bar { top: 0.35rem; width: 100%; justify-content: center; border-radius: 10px; }
  .construction-conflict-panel { align-items: stretch; flex-direction: column; }
  .construction-conflict-comparison { grid-template-columns: 1fr; }
  .construction-conflict-actions .btn { width: 100%; }
  .construction-section-actions { width: 100%; }
  .construction-section-actions .btn { width: 100%; }
  .construction-history-item { align-items: stretch; flex-direction: column; }
  .construction-output-actions .btn,
  .construction-share-fallback .btn { width: 100%; }
  .construction-page-header-actions { width: 100%; }
  .construction-page-header-actions .btn { width: 100%; }
  .construction-manual-site-grid { grid-template-columns: 1fr; }
  .construction-manual-site-wide { grid-column: auto; }
  .construction-final-employees { display: block; min-width: 0; }
  .construction-final-employees thead { display: none; }
  .construction-final-employees tbody { display: grid; gap: 0.75rem; }
  .construction-final-employees tr { display: grid; overflow: hidden; border: 1px solid var(--color-border, #d9dee7); border-radius: 10px; background: #fff; }
  .construction-final-employees td { display: grid; grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1.2fr); gap: 0.7rem; padding: 0.65rem 0.75rem; border: 0; border-bottom: 1px solid #edf0f4; overflow-wrap: anywhere; }
  .construction-final-employees td:last-child { border-bottom: 0; }
  .construction-final-employees td::before { content: attr(data-label); color: var(--construction-muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }
}

@media (prefers-reduced-motion: reduce) {
  .construction-autosave-bar[data-state="syncing"] .construction-save-dot { animation: none; }
  .construction-undo-countdown { animation: none; }
}

@media (max-width: 430px) {
  .construction-site-grid { grid-template-columns: 1fr; }
  .construction-diary-page { padding-inline: 0.15rem; }
  .construction-form-section { padding: 0.9rem; }
  .construction-photo-grid { grid-template-columns: 1fr; }
  .construction-standalone-user > span { display: none; }
  .construction-standalone-brand img { width: 98px; }
}

.construction-profile-actions, .construction-countersign-actions { display: grid; gap: .65rem; margin-top: .9rem; padding-top: .9rem; border-top: 1px solid #d9dee7; }
.construction-profile-actions summary { cursor: pointer; font-weight: 600; }
.construction-profile-actions details p { margin: .65rem 0; }
.construction-signature > label { display: block; margin-top: .6rem; }
.construction-signature .btn { min-height: 44px; white-space: normal; }
.construction-employee-row input[readonly] { background: #eef1f5; color: #475467; }
.construction-signature-pad img { opacity: 1; }
.construction-countersign-page { max-width: 880px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.construction-countersign-page h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin: 1rem 0 .5rem; }
.construction-countersign-page h2 { margin: 1.5rem 0 .8rem; }
.construction-countersign-page .construction-signature-pad { max-width: 640px; }
.construction-countersign-page .btn { min-height: 44px; white-space: normal; }
.construction-countersign-page .construction-final-fields { margin: 1rem 0; }
.construction-countersign-page .construction-final-employees { min-width: 0; }
.construction-countersign-page .construction-counter-consent { display: flex; gap: .7rem; align-items: flex-start; margin: 1.2rem 0; }
.construction-counter-consent input { width: 22px; height: 22px; flex-shrink: 0; }
.construction-countersign-page #counter-status { margin: 1rem 0; }
.construction-counter-photo { display: block; max-width: 100%; max-height: 420px; object-fit: contain; }
@media(max-width: 760px) { .construction-signature-actions { flex-direction: column; } .construction-countersign-page .form-actions { flex-direction: column; } }

/* Bauleiter: one task at a time, shared controls stay in reach. */
.construction-report-page:has(.construction-wizard) { max-width: 1040px; padding-bottom: 120px; }
.construction-report-tools { position: relative; }
.construction-report-tools summary { cursor: pointer; padding: .7rem; font-size: .9rem; }
.construction-report-tools > div { display: grid; position: absolute; right: 0; z-index: 30; min-width: 205px; padding: .5rem; background: white; border: 1px solid #d9dee7; box-shadow: 0 6px 20px #17203318; border-radius: 8px; }
.construction-steps { display: flex; gap: 1rem; margin: 1.5rem 0; scroll-margin-top: 70px; border-bottom: 1px solid #d9dee7; }
.construction-steps button { display: flex; gap: .6rem; align-items: center; flex: 1; padding: .8rem .2rem; min-height: 58px; border: 0; border-bottom: 3px solid transparent; background: none; color: #667085; text-align: left; cursor: pointer; }
.construction-steps button span { font-size: .8rem; font-weight: 700; }
.construction-steps button strong { font-size: .94rem; }
.construction-steps button[aria-current] { color: #172033; border-bottom-color: #e63312; }
.construction-wizard { display: block; }
.construction-step-panel { display: grid; gap: 1.5rem; }
.construction-step-panel[hidden], .construction-wizard [hidden] { display: none !important; }
.construction-step-panel > .construction-form-section { padding: 1.5rem; background: #fff; border-radius: 10px; border: 1px solid #e3e6eb; }
.construction-step-panel h2 { margin: 0 0 1rem; font-size: 1.3rem; line-height: 1.3; }
.construction-step-panel h2:focus { outline: none; }
.construction-optional { margin-top: 1rem; border-top: 1px solid #e3e6eb; padding-top: .8rem; }
.construction-optional summary, .construction-manual-signature summary, .construction-employee-note summary, .construction-technical-proof summary { min-height: 44px; display: list-item; padding: .7rem 0; cursor: pointer; font-size: .9rem; color: #475467; }
.construction-optional[open] > .form-group { margin-top: .8rem; }
.construction-weather-choices { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .5rem; }
.construction-weather-choices .btn { min-height: 44px; border: 1px solid #d9dee7; }
.construction-weather-choices [aria-pressed="true"] { border-color: #e63312; background: #fff3ee; color: #8f2211; }
.construction-wizard .construction-employee-row { grid-template-columns: 1.4fr 1fr 1.3fr .7fr; padding: 1rem 0; border: 0; border-bottom: 1px solid #e3e6eb; border-radius: 0; background: white; gap: .75rem; align-items: start; }
.construction-employee-note { grid-column: 1 / 4; }
.construction-wizard .construction-remove-employee { grid-column: 4; width: auto; min-height: 44px; background: none; font-size: .85rem; align-self: start; }
.construction-team-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; }
.construction-wizard .construction-workforce-summary { margin: 0; font-size: .85rem; }
.construction-wizard .construction-workforce-summary span { background: none; padding: 0; }
.construction-file-input { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.construction-camera-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.construction-camera-actions label { cursor: pointer; min-height: 44px; }
.construction-camera-actions label:focus-within { outline: 3px solid #172033; outline-offset: 2px; }
.construction-wizard .construction-photo-grid { grid-template-columns: repeat(auto-fit,minmax(130px,180px)); }
.construction-wizard .construction-photo-card img { aspect-ratio: 4/3; max-height: 140px; object-fit: cover; }
.construction-wizard .construction-signature { margin-top: 1.3rem; padding: 1.1rem 0 0; border: 0; border-top: 1px solid #d9dee7; border-radius: 0; background: none; }
.construction-signature-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }
.construction-signature-heading h3 { font-size: 1rem; margin: 0; }
.construction-signature-heading small { font-size: .8rem; }
.construction-manual-signature > label, #construction-counter-onsite > label { display: block; margin: .75rem 0 .3rem; font-size: .9rem; }
.construction-wizard .construction-signature-pad { max-width: 640px; margin-top: .8rem; }
.construction-wizard .construction-signature-actions { max-width: 640px; }
.construction-wizard .construction-profile-actions { border: 0; padding: 0; }
.construction-counter-choices { display: flex; flex-wrap: wrap; gap: .6rem; }
.construction-counter-choices [aria-pressed="true"] { border-color: #e63312; background: #fff3ee; }
.construction-wizard-footer { position: fixed; bottom: 0; left: 0; right: 0; z-index: 35; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .8rem max(1rem,env(safe-area-inset-right)) calc(.8rem + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #d9dee7; box-shadow: 0 -3px 12px #17203308; }
html.ui-v2 .ui-v2-shell .construction-wizard-footer { left: 236px; }
.construction-wizard-footer .construction-autosave-bar { position: static; box-shadow: none; background: none; padding: 0; margin: 0; font-size: .8rem; width: auto; }
.construction-wizard-buttons { display: flex; gap: .5rem; flex-shrink: 0; }
.construction-wizard-buttons .btn { min-height: 48px; }
.construction-review-data { margin: 1.25rem 0; }
.construction-review-data > div { display: grid; grid-template-columns: 100px minmax(0,1fr) auto; align-items: start; gap: .75rem; padding: 1rem 0; border-bottom: 1px solid #e3e6eb; }
.construction-review-data dt { font-weight: 600; font-size: .85rem; }
.construction-review-data dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .92rem; }
.construction-review-data ul { list-style: none; padding: .4rem 0 0; margin: 0; }
.construction-review-data li { margin-top: .3rem; }
.construction-review-list .btn { margin-left: auto; }
.construction-review-list li { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.construction-review-blockers { border-left: 3px solid #c14724; padding: .5rem 1rem; margin: 1rem 0; }
.construction-review-blockers ul { padding-left: 1rem; margin: .5rem 0; }
.construction-review-ready { color: #166534; font-weight: 600; }
.construction-wizard #construction-report-error { scroll-margin-top: 80px; }
@media(max-width: 760px) {
  .construction-steps { gap: .5rem; margin: 1rem 0; }
  .construction-steps button { flex-direction: column; align-items: flex-start; gap: .2rem; padding: .5rem .1rem; }
  .construction-steps button strong { font-size: .8rem; line-height: 1.3; }
  .construction-step-panel > .construction-form-section { padding: 1rem; }
  .construction-wizard .construction-employee-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .construction-employee-note { grid-column: 1; }
  .construction-wizard .construction-remove-employee { grid-column: 2; justify-self: end; }
  .construction-team-footer { flex-wrap: wrap; }
  .construction-signature-heading { display: block; }
  .construction-signature-heading small { display: block; margin-top: .3rem; }
  .construction-review-data > div { grid-template-columns: minmax(0,1fr) auto; gap: .3rem; }
  .construction-review-data dt { grid-column: 1; }
  .construction-review-data dd { grid-column: 1; }
  .construction-review-data button { grid-column: 2; grid-row: 1 / 3; }
  .construction-wizard-footer { flex-wrap: wrap; gap: .35rem; padding-top: .55rem; }
  .construction-wizard-footer .construction-autosave-bar { flex: 1 0 100%; justify-content: flex-start; }
  .construction-wizard-buttons { width: 100%; justify-content: space-between; }
  .construction-wizard-buttons > .btn-primary { flex: 1; }
}
@media(max-width: 640px) { html.ui-v2 .ui-v2-shell .construction-wizard-footer { left: 0; } }

.construction-wizard input, .construction-wizard textarea, .construction-wizard canvas { scroll-margin-block: 140px; }
@media(min-width: 641px) and (max-width: 1024px) { html.ui-v2 .ui-v2-shell .construction-wizard-footer { left: 72px; } }

body:has(.construction-wizard) .toast-container { bottom: calc(120px + env(safe-area-inset-bottom)); }

.modal.construction-photo-modal { min-height: 0; height: auto; max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); align-self: center; border-radius: var(--radius-lg, 10px); }

.modal.construction-delivery-modal { width: min(600px, calc(100vw - 2rem)); min-height: 0; height: auto; max-height: calc(100dvh - 2rem); align-self: center; border-radius: 10px; }
.construction-delivery-modal .modal-body { overflow-y: auto; }
.construction-delivery-modal h3 { font-size: 1.35rem; line-height: 1.3; margin: 0 0 1rem; }
.construction-delivery-modal p { line-height: 1.5; }
.construction-delivery-modal input, .construction-delivery-modal textarea, .construction-bundle-page input, .construction-bundle-page textarea { font-size: 16px; }
.construction-delivery-summary { margin: 1rem 0; }
.construction-delivery-summary > div { border-bottom: 1px solid var(--ui-border, #d5dce1); padding: .8rem 0; }
.construction-delivery-summary dt { font-size: .9rem; color: var(--ui-text-secondary, #4f5b66); }
.construction-delivery-summary dd { margin: .25rem 0 0; line-height: 1.5; overflow-wrap: anywhere; }
.construction-delivery-dates { padding-left: 1.4rem; margin: 1rem 0; }
.construction-delivery-dates li { padding: .25rem 0; }
.construction-delivery-actions { display: flex; flex-direction: column; gap: .75rem; margin-top: 1rem; }
.construction-delivery-actions .btn, .construction-bundle-main-action { width: 100%; min-height: 52px; font-size: 1rem; white-space: normal; line-height: 1.4; padding: .8rem 1rem; }
.construction-delivery-check { display: flex; align-items: flex-start; gap: .75rem; padding: .75rem 0; min-height: 48px; line-height: 1.45; }
.construction-delivery-check input { width: 24px; height: 24px; flex-shrink: 0; margin-top: 0; accent-color: var(--ui-accent, #d64221); }
.construction-report-send-actions { padding: .5rem 0; max-width: 240px; }
.construction-manual-delivery summary { min-height: 44px; display: list-item; padding: .75rem 0; color: var(--ui-text-secondary, #4f5b66); font-size: .9rem; cursor: pointer; }
.construction-manual-delivery .btn { margin: .25rem 0; min-height: 44px; white-space: normal; }
.construction-delivery-state { font-size: .9rem; font-weight: 600; color: var(--ui-text-secondary, #4f5b66); }
.construction-delivery-state[data-tone="success"], .construction-delivery-updates[data-tone="success"] { color: var(--ui-success, #177245); }
.construction-delivery-state[data-tone="warning"], .construction-delivery-updates[data-tone="warning"] { color: var(--ui-warning, #8a5700); }
.construction-delivery-updates:not(:empty) { border-left: 3px solid currentColor; padding: .75rem 1rem; margin: 1rem 0; line-height: 1.5; }
.construction-bundle-page { max-width: 760px; padding: 1.5rem 1rem 3rem; color: var(--ui-text, #20252b); }
.construction-bundle-page h1 { font-size: 1.5rem; line-height: 1.3; margin: .75rem 0 1rem; }
#bundle-content { scroll-margin-top: 72px; }
.construction-bundle-page h2 { font-size: 1.15rem; margin: 1.5rem 0 .75rem; }
.construction-bundle-page p { line-height: 1.5; }
.construction-bundle-context { color: var(--ui-text-secondary, #4f5b66); font-size: .95rem; }
.construction-bundle-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: .75rem; border-top: 1px solid var(--ui-border, #d5dce1); padding: 1rem 0; }
.construction-bundle-row strong, .construction-bundle-row span { display: block; }
.construction-bundle-row > div > span { font-size: .9rem; color: var(--ui-text-secondary, #4f5b66); margin-top: .25rem; }
.construction-bundle-row .btn { min-height: 48px; }
.construction-bundle-row .btn { white-space: normal; max-width: 240px; line-height: 1.4; }
.construction-inline-signature { border-top: 2px solid var(--ui-border, #d5dce1); margin-top: 1.5rem; padding-top: 1rem; scroll-margin-top: 1rem; }
.construction-delivery-message { margin-top: 1.25rem; }
.construction-delivery-message label { display: block; font-weight: 600; margin-bottom: .5rem; }
.construction-delivery-message textarea { width: 100%; min-height: 140px; resize: vertical; line-height: 1.5; }
.construction-bundle-select { display: flex !important; align-items: center; justify-content: center; min-height: 48px; }
.construction-bundle-select input { width: 24px; height: 24px; accent-color: var(--ui-accent, #d64221); }
.construction-bundle-employees > div { border-bottom: 1px solid var(--ui-border, #d5dce1); padding: .8rem 0; }
.construction-bundle-employees span { display: block; margin-top: .25rem; }
.construction-bundle-prose { white-space: pre-wrap; }
.construction-bundle-photos figure { margin: 1rem 0; }
.construction-bundle-photos img { display: block; max-width: 100%; max-height: 70dvh; object-fit: contain; }
.construction-bundle-question { margin-top: 1rem; }
.construction-bundle-question summary { min-height: 48px; padding: .75rem 0; cursor: pointer; }
.construction-bundle-question textarea { margin: .5rem 0; }
.construction-bundle-question button { min-height: 48px; white-space: normal; }
@media(max-width: 760px) {
  .construction-report-send-actions { grid-column: 2; max-width: none; width: 100%; }
  .construction-report-send-actions > .btn { width: 100%; min-height: 48px; white-space: normal; }
  .construction-send-toolbar > #construction-deliver-selected { min-height: 52px; font-size: 1rem; }
  .construction-bundle-row { gap: .35rem; grid-template-columns: 36px minmax(0, 1fr) auto; }
  .construction-bundle-row .btn { max-width: 145px; }
}
