/* Vom Tablet: Zeitleiste, Fotogalerie mit Lightbox, Tagesstrang je Fahrzeug, Warteschlange, Startseiten-Karte */
.vt-head-page {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}
.vt-head-page h1 {
  margin-bottom: 2px;
}
.vt-views {
  display: inline-flex;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--panel);
}
.vt-views button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}
.vt-views button + button {
  border-left: 1px solid var(--line);
}
.vt-views button.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.vt-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.vt-filters select,
.vt-filters input[type='date'] {
  width: auto;
  max-width: 220px;
}
.vt-filters input[type='search'] {
  flex: 1 1 240px;
  min-width: 180px;
  max-width: 420px;
  width: auto;
}
.vt-f {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.vt-zeit,
.vt-kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.vt-kinds {
  margin-bottom: 14px;
}
.vt-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1.3;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.vt-chip:hover {
  border-color: var(--accent);
}
.vt-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.vt-chip.warn.active {
  background: var(--warn-soft);
  border-color: var(--warn);
  color: var(--warn);
}
.vt-chip .ic {
  width: 15px;
  height: 15px;
}
.vt-chip .badge {
  margin-left: 2px;
}

/* Warteschlange */
.vt-queue {
  margin-bottom: 14px;
  padding: 12px 14px;
}
.vt-queue.has-warn {
  border-color: color-mix(in srgb, var(--bad) 45%, var(--line));
}
.vt-q-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.vt-q-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vt-q {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(170px, 1fr) minmax(220px, 2fr) auto;
  align-items: center;
  gap: 6px 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
}
.vt-q.bad {
  border-color: color-mix(in srgb, var(--bad) 50%, var(--line));
  background: var(--bad-soft);
}
.vt-q.warn {
  border-color: color-mix(in srgb, var(--warn) 50%, var(--line));
  background: var(--warn-soft);
}
.vt-q-warn {
  color: var(--bad);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vt-q.warn .vt-q-warn {
  color: var(--warn);
}
.vt-q .btn {
  justify-self: end;
}

/* Sammelaktionen */
.vt-bulk {
  position: sticky;
  top: 8px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-color: var(--accent);
}

/* Liste / Zeitleiste */
.vt-day {
  margin-bottom: 18px;
}
.vt-dayh {
  font-size: 15px;
  margin: 0 0 8px;
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.vt-list,
.vt-strand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vt-row {
  display: grid;
  grid-template-columns: 64px 36px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.vt-row.done {
  opacity: 0.65;
}
.vt-time {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}
.vt-ic {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
}
.vt-ic .ic {
  width: 18px;
  height: 18px;
}
.vt-row.k-stempelung .vt-ic,
.vt-row.k-fahrt .vt-ic,
.vt-row.k-km .vt-ic {
  background: var(--info-soft);
  color: var(--info);
}
.vt-row.k-rapport .vt-ic,
.vt-row.k-abnahme .vt-ic,
.vt-row.k-bautagebuch .vt-ic,
.vt-row.k-aufmass .vt-ic,
.vt-row.k-unterschrift .vt-ic {
  background: var(--ok-soft);
  color: var(--ok);
}
.vt-row.k-schaden .vt-ic,
.vt-row.k-fehler .vt-ic {
  background: var(--bad-soft);
  color: var(--bad);
}
.vt-row.k-fehler {
  border-color: color-mix(in srgb, var(--bad) 40%, var(--line));
}
.vt-row.k-rechnung .vt-ic,
.vt-row.k-zahlung .vt-ic,
.vt-row.k-beleg .vt-ic,
.vt-row.k-lieferung .vt-ic {
  background: var(--warn-soft);
  color: var(--warn);
}
.vt-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vt-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.vt-sel {
  width: 18px;
  height: 18px;
  margin: 0 2px 0 0;
}
.vt-kind {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.vt-title {
  overflow-wrap: anywhere;
}
.vt-amt {
  margin-left: auto;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.vt-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}
.vt-meta a {
  color: inherit;
}
.vt-meta .ic {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}
.vt-sep {
  color: var(--faint);
}
.vt-noproj {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px dashed var(--warn);
  border-radius: 999px;
  background: var(--warn-soft);
  color: var(--warn);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.vt-noproj.static {
  cursor: default;
}
.vt-text {
  font-size: 13.5px;
  overflow-wrap: anywhere;
}
.vt-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.vt-th {
  width: 76px;
  height: 76px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: var(--panel-2);
  cursor: zoom-in;
}
.vt-th img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vt-th.more {
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.vt-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.vt-empty {
  text-align: center;
}

/* Galerie */
.vt-g-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.vt-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.vt-tile {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}
.vt-tile.on {
  outline: 3px solid var(--accent);
  outline-offset: -1px;
}
.vt-tile-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  background: var(--panel-2);
  cursor: zoom-in;
}
.vt-tile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vt-tile-chk {
  position: absolute;
  top: 6px;
  left: 6px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 85%, transparent);
  box-shadow: var(--shadow);
}
.vt-tile-chk input {
  width: 18px;
  height: 18px;
  margin: 0;
}
.vt-tile-cap {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 8px 8px;
  font-size: 12.5px;
}
.vt-tile-cap span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vt-warn-t {
  color: var(--warn);
  font-weight: 600;
}

/* Lightbox */
.vt-lb {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: rgba(8, 8, 12, 0.88);
}
.vt-lb figure {
  margin: 0;
  max-width: 94vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.vt-lb img {
  max-width: 94vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 6px;
  background: #222;
}
.vt-lb figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  justify-content: center;
  color: #eee;
  font-size: 13.5px;
}
.vt-lb figcaption a {
  color: #9cc0ff;
}
.vt-lb figcaption .muted {
  color: #aaa;
}
.vt-lb-x,
.vt-lb-nav {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
}
.vt-lb-x {
  top: 14px;
  right: 14px;
}
.vt-lb-nav.prev {
  left: 14px;
  top: 50%;
}
.vt-lb-nav.next {
  right: 14px;
  top: 50%;
}

/* Tagesstrang */
.vt-dayhead {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.vt-dayhead h2 {
  margin: 0;
  font-size: 17px;
}
.vt-daystats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 13.5px;
  color: var(--muted);
}
.vt-daystats b {
  color: var(--text);
  font-size: 16px;
}
.vt-crew {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.vt-strand {
  position: relative;
  padding-left: 0;
}

/* Dialoge */
.vt-pick {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 50vh;
  overflow: auto;
  margin-top: 10px;
}
.vt-pick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
  text-align: left;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.vt-pick-row:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.vt-pdf {
  min-height: 300px;
  max-height: 72vh;
  overflow: auto;
}

/* Startseite */
.vt-dash {
  margin-bottom: 16px;
}
.vt-dash-h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.vt-dash-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 8px;
}
.vt-dash-ph {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  margin: 4px 0 6px;
}
.vt-dash-ph img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
}
.vt-dash-l .list-row {
  color: inherit;
  text-decoration: none;
}
.vt-dash-l .ic {
  width: 15px;
  height: 15px;
  vertical-align: -2px;
}

@media (max-width: 700px) {
  .vt-sub,
  .vt-q-head .muted,
  .vt-q > div:first-child .muted {
    display: none;
  }
  .appmode .vt-head-page > div:first-child {
    display: none;
  }
  .vt-views {
    width: auto;
    flex: 1;
  }
  .vt-queue {
    padding: 10px 12px;
  }
  .vt-q {
    padding: 8px 10px;
    gap: 4px;
  }
  .vt-q {
    grid-template-columns: 1fr;
  }
  .vt-q .btn {
    justify-self: start;
  }
  .vt-views button {
    flex: 1;
    justify-content: center;
    padding: 8px 6px;
  }
  .vt-filters select,
  .vt-filters input[type='date'] {
    flex: 1 1 140px;
    max-width: none;
  }
  .vt-filters input[type='search'] {
    flex-basis: 100%;
    max-width: none;
  }
  .vt-zeit {
    flex-basis: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .vt-kinds {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .vt-row {
    grid-template-columns: 48px minmax(0, 1fr);
    padding: 10px 12px;
  }
  .vt-ic {
    display: none;
  }
  .vt-th {
    width: 64px;
    height: 64px;
  }
  .vt-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .vt-dash-ph {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .vt-lb-nav {
    top: auto !important;
    bottom: 14px;
  }
}

/* Filter am Handy einklappbar */
.vt-fx {
  display: contents;
}
.vt-fx > summary {
  display: none;
}
.vt-fx-in {
  display: contents;
}
@media (max-width: 700px) {
  .vt-fx {
    display: block;
    flex-basis: 100%;
  }
  .vt-fx > summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13.5px;
    color: var(--accent);
    padding: 4px 0;
  }
  .vt-fx-in {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
  }
}
