/* Aufträge › Seite je Auftrag (23.11.2026, js/tagesauftraege-seite.js). Ganze Seite im Reiter wie die Feldseite: Kopf, Blättern und
   Kacheln kommen von dort (hwfFsKopfHtml, .hwf-fs-* in css/hw-felder.css). Hier nur Aufbau, Ablauf, Karte, Kunde und Papiere.
   Solange die Seite offen ist (#tab-tagesauftraege.tas-an), sind Werkzeugleiste, Mengen und Liste ausgeblendet. */
#tab-tagesauftraege.tas-an .ta-panel > :not(#tas-bereich) { display: none !important; }
#tab-tagesauftraege.tas-an .ta-panel { flex: 1 1 auto; min-height: 0; }
.tas-seite { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.tas-neben { font-size: 14px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.tas-bearbeiten { display: inline-flex; align-items: center; gap: 6px; }
.tas-bearbeiten svg { flex: 0 0 auto; }

/* Karte: oben die Kacheln über die ganze Breite, darunter links Ablauf, rechts Karte und Kunde */
.dash-card.tas-karte { flex: 1 1 auto; min-height: 0; margin: 0; padding: 20px 24px 22px; display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr); grid-template-rows: auto minmax(0, 1fr); column-gap: 32px; row-gap: 20px; }
.tas-kacheln { grid-column: 1 / -1; }
.tas-haupt, .tas-seitenteil { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 22px; overflow-y: auto; scrollbar-width: thin; }
.tas-abschnitt { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tas-abschnitt[hidden] { display: none; }
.tas-titel { font-size: 15px; font-weight: 700; color: var(--text); }
.tas-leise { color: var(--text-muted); }
.tas-hinweis { margin: 0; font-size: 14px; color: var(--hwf-akzent-text); }
.tas-rot { display: inline-flex; align-items: center; gap: 7px; color: var(--tal-warn-text); }
.tas-punkt { display: inline-block; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--tal-warn); }
.tas-kacheln .hwf-fs-k-klein .hwf-fs-link { font-size: 14px; line-height: inherit; vertical-align: baseline; }
.tas-kacheln .hwf-fs-k-gross .tas-rot { display: inline; }
.tas-kacheln .hwf-fs-k-gross .tas-punkt { margin-right: 8px; vertical-align: middle; }

/* Ablauf: eine Zeile je Schritt, Kreise mit Linie dazwischen */
.tas-ablauf { list-style: none; margin: 0; padding: 0; }
.tas-schritt { position: relative; display: grid; grid-template-columns: 28px minmax(100px, 130px) 112px minmax(0, 1fr) auto;
  align-items: center; column-gap: 12px; min-height: 48px; border-bottom: 1px solid var(--border); font-size: 15px; color: var(--text); }
.tas-schritt:last-child { border-bottom: 0; }
.tas-kreis { position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); background: var(--white, #fff);
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.tas-schritt:not(:last-child)::before { content: ''; position: absolute; left: 10px; top: calc(50% + 11px); height: calc(100% - 22px); width: 2px; background: var(--border); }
.tas-schritt.an:not(:last-child)::before { background: var(--text); }
.tas-schritt.an .tas-kreis { background: var(--text); border-color: var(--text); color: var(--white, #fff); }
.tas-schritt.an .tas-kreis svg { width: 13px; height: 13px; }
.tas-schritt.naechst .tas-kreis { border-color: var(--text); }
.tas-schritt:not(.an):not(.naechst) .tas-s-name { color: var(--text-muted); font-weight: 400; }
.tas-s-name { font-weight: 700; white-space: nowrap; }
.tas-s-zeit { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tas-s-wer { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tas-s-knopf { justify-self: end; }
.tas-textknopf { font: inherit; font-size: 14px; color: var(--text-muted); background: none; border: 0; padding: 4px 0; cursor: pointer; }
.tas-textknopf:hover, .tas-textknopf:focus-visible { color: var(--text); text-decoration: underline; }
.tas-notiz { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.tas-aend { list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--text); display: flex; flex-direction: column; gap: 4px; font-variant-numeric: tabular-nums; }

/* Rechts: Karte, Kunde, Papiere */
.tas-karte-teil { flex: 1 1 auto; min-height: 0; }
.tas-karte-box { flex: 1 1 auto; min-height: 190px; max-height: 360px; border-radius: var(--radius-sm, 8px); overflow: hidden; border: 1px solid var(--border); background: #eceef0; }
.tas-karte-box .hwf-pin { font-size: 12px; }
.tas-pin--ziel { border-color: var(--text); transform: translate(-50%, calc(-100% - 14px)); }
.tas-karte-ziel { stroke: var(--white, #fff); fill: var(--text); fill-opacity: 1; }
html.dark .tas-karte-box { background: #1f1f1f; }
.tas-zeile { display: grid; grid-template-columns: 120px minmax(0, 1fr); column-gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.tas-zeile:last-child { border-bottom: 0; }
.tas-zeile > span { font-size: 14px; color: var(--text-muted); }
.tas-zeile > div { color: var(--text); overflow-wrap: anywhere; }
.tas-link { color: var(--text); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.tas-link:hover, .tas-link:focus-visible { text-decoration-color: currentColor; }
.tas-zeile .tas-link + .tas-link, .tas-zeile div > .tas-link:not(:first-child) { margin-left: 8px; }
.tas-papier { display: inline-flex; align-items: center; gap: 6px; }
.tas-seite .hwf-fs-oben { gap: 10px; }
.tas-seite .hwf-fs-oben .hwf-fs-blaettern { margin-right: 4px; }


/* Kleinere Fenster am Rechner: Spalten der Ablauf-Zeilen enger */
@media (max-width: 1280px) {
  .tas-schritt { grid-template-columns: 28px minmax(90px, 110px) 104px minmax(0, 1fr) auto; }
}

/* Handy und schmal: eine Spalte, die Seite scrollt */
@media (max-width: 900px) {
  .dash-card.tas-karte { flex: none; grid-template-columns: minmax(0, 1fr); grid-template-rows: none; padding: 16px; overflow: visible; }
  .tas-haupt, .tas-seitenteil { overflow: visible; min-height: auto; }
  .tas-seite { flex: none; overflow: visible; }
  #tab-tagesauftraege.tas-an .ta-panel { flex: none; }
  .tas-karte-box { height: 220px; flex: none; }
  .tas-karte-teil { flex: none; }
}
@media (max-width: 760px) {
  /* Kopf: Zurück mit Name, darunter leise Nummer und Art, dann Blättern und Knöpfe */
  .tas-seite .hwf-fs-oben { flex-wrap: wrap; row-gap: 8px; }
  .tas-seite .hwf-fs-oben > .hwf-fs-zurueckknopf { order: 1; flex: 1 1 100%; }
  .tas-seite .hwf-fs-oben > .tas-neben { order: 2; flex: 1 1 100%; padding-left: 4px; }
  .tas-seite .hwf-fs-oben > .hwf-fs-oben-luecke { display: none; }
  .tas-seite .hwf-fs-oben > .hwf-fs-blaettern { order: 3; }
  .tas-seite .hwf-fs-oben > .tas-papier, .tas-seite .hwf-fs-oben > .tas-bearbeiten { order: 4; }
  .tas-seite .hwf-fs-oben .dlm-title { white-space: normal; }
  .tas-seite { padding-bottom: 96px; }   /* Platz über der unteren Leiste */
  .tas-kacheln.hwf-fs-kacheln { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px; row-gap: 14px; }
  .tas-kacheln .hwf-fs-k-gross { font-size: 19px; white-space: normal; }
  .tas-schritt { grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-rows: auto auto; row-gap: 0; padding: 8px 0; }
  .tas-s-name { grid-column: 2; }
  .tas-s-zeit { grid-column: 2; grid-row: 2; font-size: 14px; color: var(--text-muted); }
  .tas-s-wer { grid-column: 2; grid-row: 2; padding-left: 64px; font-size: 14px; }
  .tas-s-knopf { grid-column: 3; grid-row: 1 / span 2; }
  .tas-kreis { grid-row: 1 / span 2; }
  .tas-zeile { grid-template-columns: 100px minmax(0, 1fr); }
}

/* 23.11. (Lars: „mir gefällt das Rot nicht, mach da das Orange hin“): Hinweise wie überfällig oder „noch kein LKW“ in Handwerk-Orange
   wie die Feldseite (#E0913A für Punkte, als Schrift #A85F17 für 4,9:1 auf Weiß, hw-felder.css). */
.tas-seite { --tal-warn: #E0913A; --tal-warn-text: #A85F17; }
html.dark .tas-seite { --tal-warn: #F0A85A; --tal-warn-text: #F5BE7E; }

/* 24.11. (LIVE): Handy – Uhrzeit und Name nebeneinander statt übereinander, „als Nächstes“ ohne Einrückung;
   800–1100 px Kopf in zwei Reihen (Name nicht gekürzt); bis 1280 px Kachel-Texte dürfen umbrechen */
@media (min-width: 761px) and (max-width: 1100px) {
  .tas-seite .hwf-fs-oben { flex-wrap: wrap; row-gap: 8px; }
  .tas-seite .hwf-fs-oben > .hwf-fs-zurueckknopf { order: 1; flex: 0 1 auto; max-width: 100%; }
  .tas-seite .hwf-fs-oben > .tas-neben { order: 2; flex: 1 1 auto; }
  .tas-seite .hwf-fs-oben > .hwf-fs-oben-luecke { order: 3; flex: 0 0 100%; height: 0; margin-top: -8px; }
  .tas-seite .hwf-fs-oben > .hwf-fs-blaettern { order: 4; }
  .tas-seite .hwf-fs-oben > .tas-papier, .tas-seite .hwf-fs-oben > .tas-bearbeiten { order: 5; }
}
@media (max-width: 1280px) {
  .tas-kacheln .hwf-fs-k-gross { font-size: 19px; white-space: normal; overflow-wrap: anywhere; }
  .tas-kacheln .hwf-fs-k-klein { white-space: normal; }
}
@media (max-width: 760px) {
  .tas-schritt { grid-template-columns: 28px auto minmax(0, 1fr) auto; }
  .tas-s-name { grid-column: 2 / span 2; }
  .tas-s-zeit { grid-column: 2; grid-row: 2; }
  .tas-s-zeit:not(:empty) { margin-right: 8px; }
  .tas-s-wer { grid-column: 3; grid-row: 2; padding-left: 0; white-space: normal; }
  .tas-s-knopf { grid-column: 4; grid-row: 1; }
  .tas-s-wer { grid-column: 3 / span 2; }
  .tas-s-zeit:empty { display: none; }
  .tas-s-zeit:empty + .tas-s-wer { grid-column: 2 / -1; }   /* ohne Uhrzeit („als Nächstes“, „wartet auf …“) bündig unter dem Namen */
}
