.brand-logo {
  display: block;
  width: clamp(184px, 18vw, 224px);
  height: auto;
}

.fleet-validity {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--contrast-medium);
  font-size: .8rem;
  white-space: nowrap;
}
.fleet-validity::before {
  content: "Gültig";
}

.fleet-validity[data-urgent="true"] {
  color: var(--error);
}

.fleet-validity-time {
  position: relative;
  z-index: 1;
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  letter-spacing: 0.02em;
}

.fleet-handover .check-row input {
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(1, 2, 5, 0.08);
}

.fleet-employee-check > :first-child {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--primary);
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 800;
}

.fleet-employee-copy {
  display: grid;
  gap: 1px;
}

.fleet-employee-copy strong {
  color: var(--primary);
  font-size: 0.92rem;
}

.fleet-employee-copy small {
  color: var(--contrast-medium);
  font-size: 0.82rem;
}

.fleet-condition-copy {
  min-width: 0;
  max-width: 100%;
  color: var(--contrast-medium);
  font-size: 0.86rem;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.fleet-condition-copy > em {
  display: block;
}

.fleet-condition-details {
  min-width: 0;
}

.fleet-condition-details summary {
  display: grid;
  gap: 5px;
  min-width: 0;
  border-radius: 4px;
  cursor: pointer;
  list-style: none;
}

.fleet-condition-details summary::-webkit-details-marker {
  display: none;
}

.fleet-condition-details summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.fleet-condition-preview {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.fleet-condition-toggle {
  color: var(--primary);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 700;
}

.fleet-condition-hide,
.fleet-condition-details[open] .fleet-condition-preview,
.fleet-condition-details[open] .fleet-condition-show {
  display: none;
}

.fleet-condition-details[open] .fleet-condition-hide {
  display: inline;
}

.fleet-condition-full {
  margin: 8px 0 0;
  color: var(--contrast-high);
  font-style: normal;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.fleet-damage-active-label {
  position: absolute;
  bottom: 10px;
  left: 50%;
  z-index: 3;
  width: max-content;
  max-width: min(180px, 68vw);
  margin: 0;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #fff;
  background: rgba(1, 2, 5, 0.92);
  box-shadow: 0 4px 14px rgba(1, 2, 5, 0.24);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.15;
  pointer-events: none;
  transform: translateX(-50%);
}

.fleet-handover.is-complete .status-stack {
  display: none;
}

.fleet-handover .completion-panel {
  min-height: 0;
  padding: 32px 24px;
}

.fleet-handover .fleet-invalid-panel {
  min-height: clamp(300px, 48vh, 460px);
  align-content: center;
  border-top: 1px solid var(--border);
}

.fleet-invalid-symbol {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid hsl(354 84% 43% / 0.32);
  border-radius: 999px;
  color: var(--error);
  background: hsl(354 84% 96%);
  font-size: 1.65rem;
  font-weight: 760;
}

.fleet-invalid-panel h2 {
  max-width: 24ch;
  margin: 2px 0 0;
}

.fleet-invalid-panel p {
  max-width: 34rem;
  margin: 0;
  color: var(--contrast-medium);
  line-height: 1.5;
}

@media (max-width: 760px) {
  .brand-logo {
    width: 178px;
  }

  body:has(.fleet-handover) .topbar {
    min-height: 64px;
    gap: 4px;
    padding: 10px 12px;
  }

  body:has(.fleet-handover) .site-frame {
    margin: 0 10px;
    padding-bottom: 16px;
  }

  .pickup-layout:has(.fleet-handover) {
    padding-top: 14px;
  }

  .fleet-handover {
    border-radius: 20px;
  }

  .fleet-handover .handover-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 14px;
  }

  .fleet-handover .handover-title {
    grid-column: 1;
  }

  .fleet-handover .handover-title h1 {
    font-size: 1.65rem;
  }

  .fleet-handover .handover-crest {
    grid-column: 2;
    justify-self: end;
    width: 28px;
  }

  .fleet-handover .status-stack {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-items: start;
  }

  .fleet-handover .fleet-validity-time {
    font-size: 0.74rem;
  }

  .fleet-handover .handover-body {
    gap: 10px;
    padding: 14px;
  }

  .fleet-handover .notice {
    padding: 11px 12px;
    font-size: 0.9rem;
  }

  .fleet-summary,
  .fleet-condition-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fleet-summary div,
  .fleet-condition-facts div {
    min-height: 60px;
    padding: 9px 10px;
  }

  .fleet-condition-facts .fleet-condition-note-cell {
    grid-column: 1 / -1;
    min-height: 0;
  }

  .fleet-condition-copy {
    font-size: 0.8rem;
  }

  .fleet-handover .field-group {
    gap: 10px;
  }

  .fleet-damage-section {
    gap: 8px;
    padding: 10px;
  }

  .fleet-damage-views {
    gap: 6px;
    margin-bottom: 8px;
  }

  .fleet-damage-view {
    min-height: 32px;
    padding: 5px 9px;
  }

  .fleet-handover .button {
    min-height: 42px;
  }

  .fleet-handover .privacy-note {
    font-size: 0.76rem;
    line-height: 1.35;
  }

  .fleet-handover .fleet-invalid-panel {
    min-height: 280px;
    padding: 40px 18px;
  }
}
/* Private prepared evidence uses short-lived in-memory object URLs, never token-bearing image URLs. */
.fleet-photo-evidence { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 16px; }
.fleet-photo-evidence figure { margin: 0; min-width: 0; }
.fleet-photo-evidence img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.fleet-photo-evidence figcaption { margin-top: 6px; font-size: 14px; overflow-wrap: anywhere; }

.fleet-handover .signature-box,
.fleet-signature-dialog .signature-box {
  border: 0;
  border-radius: 0;
  min-height: 0;
  padding: 0;
  background: transparent;
  gap: 8px;
}
.fleet-handover .signature-canvas { height: 120px; background: var(--canvas); }
.fleet-handover .signature-expand-trigger {
  display: grid;
  place-items: center;
  position: absolute;
  inset: 0;
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  color: var(--primary);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}
.fleet-handover .signature-expand-trigger:disabled { cursor: default; color: var(--contrast-medium); }
.fleet-handover .signature-expand-trigger:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.fleet-handover .signature-actions { display: none; }
.fleet-handover .check-row:has(input) {
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.fleet-handover .check-row:has(input:checked) { border-color: var(--primary); background: var(--surface); }
.fleet-handover input[type="checkbox"] { accent-color: var(--primary); }
.fleet-handover .check-row:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.fleet-handover [data-submit-button], .fleet-signature-dialog [data-signature-done] {
  color: var(--canvas);
  border-color: var(--primary);
  background: var(--primary);
}
.fleet-handover [data-submit-button]:disabled { opacity: .4; }
.fleet-handover .notice { border: 0; padding: 0; background: transparent; border-radius: 0; }

html:has(body.signature-expanded), body.signature-expanded { overflow: hidden; }
.fleet-signature-dialog {
  width: min(840px, calc(100vw - 40px));
  height: min(480px, calc(100dvh - 40px));
  max-width: none;
  max-height: none;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--canvas);
  color: var(--primary);
  overflow: hidden;
}
.fleet-signature-dialog::backdrop { background: rgb(0 0 0 / .55); }
.fleet-signature-dialog .signature-box { height: 100%; grid-template-rows: auto minmax(0, 1fr) auto; }
.fleet-signature-dialog .signature-heading { flex-direction: row; min-height: 28px; }
.fleet-signature-dialog .signature-heading strong { display: none; }
.fleet-signature-dialog .signature-canvas-shell,
.fleet-signature-dialog .signature-canvas { height: 100%; min-height: 0; background: var(--canvas); }
.fleet-signature-dialog .signature-expand-trigger { display: none; }
.fleet-signature-dialog .signature-done { display: inline-flex; }
.fleet-signature-dialog .signature-actions { display: flex; justify-content: space-between; }
.fleet-signature-dialog .button { min-height: 44px; }
@media (max-width: 760px), (pointer: coarse) {
  .fleet-signature-dialog {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    margin: 0;
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    border: 0;
    border-radius: 0;
  }
  .fleet-signature-dialog[data-rotated="true"] .signature-box {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100dvh;
    height: 100vw;
    padding: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom));
    transform: translate(-50%, -50%) rotate(90deg);
  }
}
