/* Reiter „Tagesaufträge“ (nur Handwerk, js/tagesauftraege.js, 20.10.2026). Aufbau wie der Reiter Projekte (css/baustellen.css).
   Alles hängt an Klassen, die nur bei Handwerk per JS entstehen – Gastro merkt nichts. */

#tab-tagesauftraege.ta-pane {
  padding: 20px 24px;
  max-width: none;
  display: flex;
  flex-direction: column;
  height: calc(calc(100dvh / var(--ui-zoom)) - var(--nav-h));
  overflow: hidden;
  background: linear-gradient(160deg, #eef3f7 0%, #dce5ed 100%);
}
body.tab-tagesauftraege-active { background: #dce5ed; }
html.dark #tab-tagesauftraege.ta-pane { background: linear-gradient(160deg, #141414 0%, #1a1a1a 100%); }
html.dark.tab-tagesauftraege-active, html.dark body.tab-tagesauftraege-active { background: #141414; }
/* Untere Leiste: ein Reiter mehr als Handwerk ohne Tagesaufträge */
body.nav-handwerk.nav-tagesauftraege .app-nav { grid-template-columns: repeat(8, 1fr); }
body.nav-handwerk.nav-tagesauftraege.nav-ohne-terminal .app-nav { grid-template-columns: repeat(7, 1fr); }

.ta-panel { display: flex; flex-direction: column; gap: 12px; }
.ta-panel .dash-header { flex-wrap: wrap; margin-bottom: 0; }
.ta-kopf-knoepfe { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* Leiste: Tag, Projekt, Team */
.ta-leiste { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; font-size: 14px; color: var(--text); }
.ta-tag { display: flex; align-items: center; gap: 6px; }
.ta-tag b { min-width: 13em; text-align: center; font-size: 15px; }
.ta-pfeil {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: var(--white);
  color: var(--text); font-size: 20px; line-height: 1; cursor: pointer;
}
.ta-pfeil:hover { background: var(--primary-pale); }
.ta-wahl { display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.ta-wahl select { padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--white); color: var(--text); font-size: 14px; }
.ta-team { color: var(--text-muted); }
.ta-team b { color: var(--text); font-weight: 600; }

/* Tabelle */
.ta-karte { flex: 1 1 0; min-height: 0; margin: 0; padding: 4px 12px 8px; display: flex; flex-direction: column; }
.ta-tabelle-wrap { overflow: auto; flex: 1 1 0; min-height: 0; }
.ta-tabelle { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.ta-tabelle th {
  position: sticky; top: 0; z-index: 1; background: var(--white);
  text-align: left; font-size: 12px; font-weight: 600; color: var(--text-muted); padding: 10px 8px 8px;
  border-bottom: 2px solid var(--text); vertical-align: bottom; white-space: nowrap;
}
.ta-tabelle th small { display: block; font-weight: 500; }
.ta-tabelle td { padding: 9px 8px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text); }
.ta-tabelle tbody tr { cursor: pointer; }
.ta-tabelle tbody tr:hover td { background: var(--primary-pale); }
.ta-tabelle .ta-zahl { text-align: right; white-space: nowrap; }
.ta-tabelle th.ta-zahl { text-align: right; }
.ta-tabelle th.ta-aus { font-style: italic; }
.ta-tabelle td.ta-zeit, .ta-tabelle td.ta-nr { white-space: nowrap; color: var(--text-muted); }
.ta-tabelle td.ta-kunde b { display: block; font-weight: 600; }
.ta-tabelle td.ta-kunde span { display: block; font-size: 12px; color: var(--text-muted); }
.ta-tabelle td.ta-notiz { color: var(--text-muted); font-size: 13px; min-width: 120px; }
.ta-tabelle tr.ta-fertig td { color: var(--text-muted); }
.ta-tabelle tr.ta-fertig td.ta-kunde b { text-decoration: line-through; text-decoration-thickness: 1px; }
.ta-tabelle tfoot td { border-bottom: 0; border-top: 2px solid var(--text); font-weight: 700; padding-top: 10px; white-space: nowrap; }
.ta-haken-sp { width: 34px; }
.ta-haken {
  width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--text-muted); background: transparent;
  color: #fff; font-size: 14px; font-weight: 700; line-height: 1; cursor: pointer; padding: 0;
}
.ta-haken.an { background: var(--success); border-color: var(--success); }
html.dark .ta-haken.an { color: #141414; }
.ta-leer { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: 60ch; padding: 16px 4px; }

/* Fenster: Auftrag und Spalten */
.app-confirm-box.ta-fenster { max-width: 640px; width: min(640px, calc(94vw / var(--ui-zoom))); max-height: 90vh; overflow-y: auto; }
.ta-fenster .app-confirm-title { margin-bottom: 14px; }
.ta-fenster-inhalt { margin-bottom: 18px; }
.ta-form { display: flex; flex-direction: column; gap: 12px; }
.ta-zeile { display: flex; gap: 10px; flex-wrap: wrap; }
.ta-zeile > .ta-feld { flex: 1 1 140px; }
.ta-zeile > .ta-feld-zeit { flex: 0 0 132px; }   /* 12-Stunden-Anzeige („07:30 AM“) passt ganz hinein (Hw-App-Fehler 23.10.2026) */
.ta-zeile > .ta-feld-gross { flex: 2 1 200px; }
.ta-feld { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-muted); min-width: 0; }
.ta-feld small { font-weight: 500; }
.ta-feld input, .ta-feld select, .ta-feld textarea, .ta-spalte input, .ta-spalte select {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--white);
  color: var(--text); font: inherit; font-size: 14px; font-weight: 400; min-width: 0;
}
.ta-feld textarea { resize: vertical; }
.ta-mengen {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px;
  padding: 12px; border-radius: var(--radius-sm); background: var(--primary-pale);
}
.ta-mengen .ta-feld input { text-align: right; }
.ta-mengen .ta-feld-paar { grid-column: span 2; }
.ta-feld-paar > div { display: flex; align-items: center; gap: 4px; }
.ta-feld-paar input { width: 0; flex: 1 1 0; }
.ta-hinweis { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.ta-hinweis-tag { font-weight: 600; }
.ta-fenster .app-confirm-actions { flex-wrap: wrap; }
.ta-fenster .ta-loeschen { margin-right: auto; color: var(--danger); }

.ta-spalten-liste { display: flex; flex-direction: column; gap: 8px; }
.ta-spalten-zahl { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.ta-spalte { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.ta-spalte--aus { opacity: .55; }
.ta-spalte .ta-sp-name { flex: 2 1 140px; }
.ta-spalte .ta-sp-einheit { flex: 0 1 80px; width: 80px; }
.ta-spalte-neu { border-style: dashed; }
.ta-art { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--primary-pale); color: var(--text); white-space: nowrap; }
.ta-pfeile { display: flex; gap: 2px; }
.ta-pfeil-klein { width: 26px; height: 26px; border: 1px solid var(--border); border-radius: 6px; background: var(--white); color: var(--text); cursor: pointer; padding: 0; }
.ta-pfeil-klein:disabled { opacity: .35; cursor: default; }
.ta-team-wahl { margin-top: 16px; }

@media (max-width: 720px) {
  #tab-tagesauftraege.ta-pane { padding: 12px; height: auto; overflow: visible; }
  .ta-karte { flex: 0 0 auto; }
  .ta-tabelle-wrap { flex: 0 0 auto; }
  .ta-tag b { min-width: 0; }
  .ta-kopf-knoepfe { margin-left: 0; }
}
