:root { color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; background: #d5deea; color: #142033; font: 15px/1.4 "Segoe UI", system-ui, sans-serif; }
button, input, textarea { font: inherit; }
a { color: inherit; }
.app {
  width: 100%;
  height: 100dvh;
  margin: 0 auto;
  background: #f3f6fb;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sheet { flex: 1; min-height: 0; overflow: auto; padding: 0 0 16px; }
.mast { background: #0c2348; color: #fff; padding: 16px 16px 18px; }
.brand { display: flex; justify-content: space-between; align-items: center; font-size: 13px; letter-spacing: .04em; }
.online { display: inline-flex; align-items: center; gap: 6px; color: #d7e4f8; letter-spacing: 0; }
.online i { width: 8px; height: 8px; border-radius: 50%; background: #3dce7a; display: block; }
.who { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: #d7e4f8; }
.identity { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: #526072; }
.filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 12px 14px 4px; }
.filters button, .tabs button, .dock a, .step button {
  border: 0;
  background: #fff;
  color: #1c3148;
}
.filters button {
  min-width: 0;
  min-height: 40px;
  border-radius: 999px;
  padding: 0 4px;
  border: 1px solid #d5dfeb;
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
}
.filters button b { margin-left: 4px; }
.filters button.is-on, .tabs button.is-on, .dock a.is-on { background: #1d6fe8; color: #fff; border-color: #1d6fe8; }
.alerts, .jobs, .nav-list { display: grid; gap: 10px; padding: 8px 14px 0; }
.alert, .job, .card, .nav-item, .material {
  background: #fff;
  border: 1px solid #e1e8f0;
  border-radius: 16px;
}
.alert { padding: 12px 14px; background: #fff1f1; border-color: #f3c2c2; color: #8d1d24; text-decoration: none; }
.alert strong, .job strong { display: block; }
.section-title { margin: 14px 14px 0; font-size: 16px; }
.job { display: grid; gap: 3px; padding: 12px 14px; text-decoration: none; position: relative; }
.job[hidden], .panel[hidden], [hidden] { display: none !important; }
.job.is-current { border-color: #1d6fe8; box-shadow: inset 4px 0 0 #1d6fe8; }
.job-top, .bar-main { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.badge { border-radius: 999px; padding: 3px 8px; font-size: 12px; font-weight: 700; background: #e8eef8; color: #1d4e89; }
.b-in_bearbeitung { background: #fff4df; color: #8a5a00; }
.b-abgeschlossen { background: #e5f6ec; color: #146b38; }
.b-zurueck { background: #ffe8e8; color: #9d1c1c; }
.muted, .meta { color: #5d6d80; }
.kind { font-size: 12px; color: #5d6d80; }
.empty { margin: 16px 14px; color: #5d6d80; }
.card { margin: 12px 14px; padding: 14px; }
.card h1, .card h2, .panel h2 { margin: 0 0 8px; font-size: 18px; }
.bar { display: flex; gap: 10px; align-items: center; background: #0c2348; color: #fff; padding: 12px 14px; }
.back { color: #fff; text-decoration: none; font-size: 22px; width: 36px; height: 36px; display: grid; place-items: center; }
.addr { font-size: 16px; font-weight: 700; }
.addr-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.icon-actions { display: flex; gap: 8px; flex: none; }
.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e8f1fc;
  color: #1565c0;
  text-decoration: none;
}
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }
.nav-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.actions, .tabs { display: grid; gap: 8px; padding: 0 14px; }
.actions { grid-template-columns: 1fr; }
.actions a, .actions button, .panel button, .panel .action, .nav-item .action, .nav-item button {
  display: flex; align-items: center; justify-content: center;
  min-height: 52px; border-radius: 14px; border: 0; text-decoration: none; font-weight: 700;
}
.actions a, .actions button, .panel button { background: #1d6fe8; color: #fff; width: 100%; }
.actions .quiet, .panel .quiet { background: #fff; color: #16324f; border: 1px solid #d5dfeb; }
.go { margin: 8px 14px 0; }
.go button, .finish button { min-height: 56px; border: 0; border-radius: 16px; background: #1d6fe8; color: #fff; font-weight: 800; font-size: 17px; }
.finish button { background: #178a45; }
.facts { display: grid; gap: 8px; }
.fact b { display: block; color: #5d6d80; font-size: 12px; font-weight: 700; }
.return { margin: 12px 14px; padding: 12px 14px; border-radius: 16px; background: #fff1f1; border: 1px solid #f3c2c2; }
.return h2 { margin: 0 0 8px; color: #8d1d24; font-size: 16px; }
.tabs { grid-template-columns: repeat(3, 1fr); margin-top: 12px; }
.tabs button { min-height: 42px; border-radius: 12px; border: 1px solid #d5dfeb; padding: 0 4px; }
.panel { padding: 4px 0 12px; }
.panel[hidden] { display: none; }
.steps { list-style: none; margin: 0 14px 12px; padding: 0; display: grid; gap: 8px; }
.steps li, .step {
  background: #fff; border: 1px solid #e1e8f0; border-radius: 12px; min-height: 46px;
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; width: 100%; text-align: left;
}
.steps .is-done { border-color: #b7e4c7; background: #f3fbf6; }
label { display: grid; gap: 6px; margin: 0 0 12px; font-weight: 700; }
input, textarea { width: 100%; padding: 12px; border: 1px solid #d5dfeb; border-radius: 12px; background: #fff; }
textarea { min-height: 88px; }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: auto; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 12px; }
.photos img { width: 100%; height: 92px; object-fit: cover; border-radius: 12px; background: #e8eef5; }
.material { margin: 0 0 10px; padding: 12px; }
.line { display: flex; justify-content: space-between; gap: 8px; }
.warn { background: #fff; color: #9d1c1c; border: 1px solid #e7b4b4; }
.hint { background: #fff4df; color: #7a4b00; padding: 10px; border-radius: 12px; }
.error { background: #fdecec; color: #9d1c1c; padding: 10px; border-radius: 12px; }
.gaps { margin: 0 0 12px; padding-left: 18px; color: #9d1c1c; }
.missing { background: #f7f9fc; border: 1px dashed #c5d2e2; border-radius: 12px; padding: 10px 12px; margin: 0 0 8px; }
.dock {
  flex: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #fff;
  border-top: 1px solid #e1e8f0;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.dock a { display: grid; justify-items: center; gap: 2px; text-decoration: none; font-size: 11px; font-weight: 700; min-height: 52px; border-radius: 12px; padding-top: 4px; }
.dock svg { width: 22px; height: 22px; fill: currentColor; }
.pad { padding: 0 14px; }
.card form button[type="submit"] {
  min-height: 52px;
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: #1d6fe8;
  color: #fff;
  font-weight: 700;
}
.card form button.quiet { background: #fff; color: #16324f; border: 1px solid #d5dfeb; }
.card form button.warn { background: #fff; color: #9d1c1c; border: 1px solid #e7b4b4; }
.file-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.file-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 0 0 12px;
  border: 1px dashed #9eb4d0;
  border-radius: 14px;
  background: #f7f9fc;
}
@media (min-width: 520px) {
  .app {
    width: 390px;
    height: min(844px, calc(100dvh - 28px));
    margin: 14px auto;
    border-radius: 32px;
    box-shadow: 0 18px 50px rgba(10, 28, 58, .28);
  }
}
