/* Moduł „Termine” — korzysta z klas modułu Einsätze (ez-*) i panelu; tu tylko nowe elementy. */
.tm-karte .tm-k-st { margin-left: auto; font-size: 14px; }
.tm-karte.st-abgesagt { opacity: .55; }
.tm-karte.st-abgesagt .ez-k-name { text-decoration: line-through; }
.tm-karte.st-erledigt { background: #F6FAF7; }
.tm-karte.st-folgetermin { box-shadow: inset 0 0 0 1px #E5BF00; }
.tm-mkarte.st-erledigt, .tm-mkarte.st-abgesagt { opacity: .7; }
.badge.tm-st-erledigt { background: var(--gruen-hell); color: var(--gruen); }
.badge.tm-st-folgetermin { background: var(--marker); color: var(--tinte); }
.badge.tm-st-abgesagt { background: #EBEEEB; color: var(--grafit); }
.tm-tagknopf { font: inherit; font-weight: 640; color: inherit; text-align: left; padding: 0; }
.tm-tagknopf:hover { color: var(--aktion); text-decoration: underline; }
.tm-mkopf { padding-left: 0; padding-right: 0; }

/* karta zlecenia */
.tm-titel { margin-top: 2px; overflow-wrap: anywhere; }
.tm-tt-titel { margin: 2px 0 8px; overflow-wrap: anywhere; }
.tm-zeile { margin: 4px 0 10px; }
.tm-status { margin: 6px 0 4px; flex-wrap: wrap; }
.tm-status button { padding: 9px 14px; }
.tm-status button[aria-pressed="true"] { background: var(--tinte); color: #fff; }
.tm-st-info { min-height: 18px; }
.tm-felder { margin-top: 8px; }
.tm-notiz { white-space: pre-wrap; background: var(--papier); border: 1px solid var(--linie); border-radius: 10px; padding: 12px 14px; font-size: 14.5px; overflow-wrap: anywhere; }
.tm-feed { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; max-height: 70vh; overflow-y: auto; padding-right: 4px; }
.tm-feed-tag { text-align: center; margin: 6px 0 0; }
.tm-feed-tag span { background: #EBEEEB; color: var(--grafit); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
.tm-feed-sys { font-size: 13px; color: var(--grafit); padding: 2px 0; }
.tm-komm { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 8px 11px; }
.tm-komm.tt { background: var(--papier); }
.tm-komm-kopf { font-size: 13.5px; }
.tm-komm-text { white-space: pre-wrap; margin-top: 3px; overflow-wrap: anywhere; }
.tm-komm-orig { margin-top: 3px; }
.tm-komm-orig summary { cursor: pointer; width: fit-content; }
.tm-komm-orig[open] .tm-komm-text { opacity: .8; }
.tm-fotos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tm-foto { display: block; width: 92px; height: 92px; padding: 0; border: 1px solid var(--linie); border-radius: 8px; overflow: hidden; background: #E8ECE8; cursor: zoom-in; }
.tm-foto.klein { width: 54px; height: 54px; cursor: default; }
.tm-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tm-schreiben { position: sticky; bottom: 0; background: var(--papier); padding: 8px 0 4px; border-top: 1px solid var(--linie); }
.tm-schreiben textarea { width: 100%; resize: vertical; }
.tm-schreiben-fuss { display: flex; gap: 8px; justify-content: space-between; margin-top: 8px; }
.tm-schreiben-fuss label.btn { cursor: pointer; }
.tm-lightbox { max-width: min(96vw, 1100px); }
.tm-zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.tm-tab-wrap { overflow-x: auto; }
.tm-zahlen td.num, .tm-zahlen th.num { text-align: right; }
.tm-zahlen .tm-summe td { border-top: 2px solid var(--tinte); }

@media (max-width: 760px) {
  .tm-detail .ez-spalten { grid-template-columns: minmax(0, 1fr); }
  .tm-status { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .tm-status button + button { border-left: 0; }
  .tm-status button { border-top: 1px solid var(--linie); }
  .tm-feed { max-height: none; overflow: visible; }
  .tm-mkopf { flex-wrap: wrap; gap: 8px; }
  .tm-mkopf h1 { font-size: 24px; }
}

/* zlecenia */
.tm-filter { margin: 0 0 12px; }
.tm-filter .chip .leise { margin-left: 4px; }
.tm-filter .chip[aria-pressed="true"] .leise { color: #fff; opacity: .8; }
.tm-akarte { gap: 3px; padding: 9px 12px 10px; }
.tm-akarte .ez-k-oben { flex-wrap: wrap; }
.tm-akarte .ez-k-name { font-size: 15.5px; }
.tm-a-nr { margin-left: auto; }
.tm-akarte.et-offen { border-left-color: var(--aktion); }
.tm-akarte.et-angebot { border-left-color: #E5BF00; }
.tm-akarte.et-erledigt { border-left-color: var(--gruen); }
.tm-akarte.et-abgerechnet { border-left-color: #6A3FB0; }
.tm-akarte.et-bezahlt { border-left-color: #0E7C86; background: #F6FAF7; }
.tm-akarte.et-storniert { opacity: .55; }
.badge.tm-et-offen { background: var(--aktion-hell); color: var(--aktion); }
.badge.tm-et-angebot { background: var(--marker); color: var(--tinte); }
.badge.tm-et-erledigt { background: var(--gruen-hell); color: var(--gruen); }
.badge.tm-et-abgerechnet { background: #EFE8FA; color: #5A3496; }
.badge.tm-et-bezahlt { background: #E2F3F4; color: #0B5F66; }
.badge.tm-et-storniert { background: #EBEEEB; color: var(--grafit); }
.tm-neu-hinweis { margin: 8px 0 12px; }
.tm-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tm-inline { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.tm-etappen { margin-top: 2px; }
.tm-block { margin-top: 14px; border-top: 1px solid var(--linie); padding-top: 4px; }
.tm-block summary { cursor: pointer; list-style: revert; }
.tm-block .fuss { margin-top: 10px; display: flex; justify-content: flex-end; }
.tm-drei { display: grid; grid-template-columns: 2fr 1fr 1.2fr; gap: 0 10px; }
.tm-auftrag-box { margin: 4px 0 10px; padding: 9px 12px; border: 1px solid var(--linie); border-left: 4px solid var(--aktion); border-radius: 8px; background: var(--flaeche); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tm-auftrag-box > a { text-decoration: none; color: var(--tinte); }
.tm-weitere { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tm-weitere .chip { font-size: 13px; padding: 3px 10px; }

/* kalendarz z Planera */
.tm-kal-kopf { margin: 0 0 8px; }
.pt-rahmen { display: block; width: 100%; height: 100vh; height: 100dvh; border: 0; background: #fff; }
.tm-kal { width: 100%; height: calc(100vh - 210px); min-height: 520px; border: 1px solid var(--linie2); border-radius: 12px; background: #fff; display: block; }
.tm-reiter-monteur { padding-left: 16px; padding-right: 16px; }

@media (max-width: 760px) {
  .tm-drei { grid-template-columns: 1fr; }
  .tm-kal { height: calc(100vh - 170px); min-height: 420px; border-radius: 0; border-left: 0; border-right: 0; }
  .pt-rahmen { height: calc(100dvh - 118px); }
  .tm-etappen { grid-template-columns: 1fr 1fr 1fr; }
}

.tm-alt { display: none; }
.tm-alt-knopf { align-self: center; margin-bottom: 4px; }
.tm-schreiben { position: static; border-top: 0; border-bottom: 1px solid var(--linie); padding: 0 0 10px; margin-bottom: 10px; }
.tm-notiz.zu { max-height: 9.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }

.tm-push-banner { display: flex; gap: 10px 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.tm-p-h { margin-top: 14px; }
.tm-p-liste { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }
.tm-p-zeile { display: flex; flex-direction: column; border-bottom: 1px solid var(--linie); padding-bottom: 5px; }

/* praca bez zasięgu (termine-offline.js): pasek stanu, wpisy w kolejce, szkic */
.tmo-leiste { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 16px; background: var(--marker-weich); border-bottom: 1px solid #F0D766; font-size: 14px; }
.tmo-leiste[hidden] { display: none; }
.tmo-off { font-weight: 600; }
.tmo-knopf { border: 1px solid var(--rand); background: var(--flaeche); border-radius: 999px; padding: 4px 12px; font-weight: 600; cursor: pointer; }
.tmo-knopf.rot { border-color: var(--rot); color: var(--rot); }
.badge.tmo-st { background: var(--marker-weich); color: var(--tinte); border: 1px solid #F0D766; }
.badge.tmo-st.sendet { background: var(--aktion-hell); border-color: #C9D8EC; }
.badge.tmo-st.fehler { background: var(--rot-hell); border-color: #F2C1BC; color: var(--rot); white-space: normal; }
.tm-komm.tmo-warte { border-style: dashed; border-color: #E5BF00; background: #FFFCEB; }
.tm-komm.tmo-warte.fehler { border-color: var(--rot); background: var(--rot-hell); }
.tm-komm.tmo-warte .tm-foto { cursor: default; }
.tmo-entwurf { min-height: 18px; margin-top: 4px; }
.tmo-ef { position: relative; overflow: visible; }
.tmo-ef img { border-radius: 8px; }
.tmo-rm { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--rand); background: var(--flaeche); font-size: 16px; line-height: 1; padding: 0; cursor: pointer; }
.tmo-eintrag { border: 1px solid var(--linie); border-radius: 10px; padding: 8px 11px; margin: 8px 0; background: var(--flaeche); overflow-wrap: anywhere; }
.tmo-eintrag .tm-knoepfe { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.tm-kal-kopf .tmo-off { display: inline-block; background: var(--marker-weich); border-radius: 6px; padding: 1px 8px; color: var(--tinte); }
.tmo-konflikt { margin-top: 8px; font-size: 14px; }
.tmo-konflikt .tm-knoepfe { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- zakładka „Karte”: mapa tygodnia + podpowiedź terminu (11.2026) ---------- */
.tk-leiste { margin-bottom: 10px; }
.tk-mon { margin-left: auto; }
.tk-mon .chip, .tk-tage .chip { display: inline-flex; align-items: center; gap: 6px; }
.tk-tage { margin-bottom: 14px; }
.tk-tagfarbe { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.tk-chip-n { font-size: 12.5px; opacity: .75; }
.chip[aria-pressed="true"] .tk-tagfarbe { box-shadow: 0 0 0 1.5px #fff; }
.tk-finden { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 14px 16px 16px; }
.tk-finden h2, .tk-h2 { font-size: 18px; margin: 0 0 4px; }
.tk-h2 { margin-bottom: 8px; }
.tk-h3 { font-size: 15px; margin: 18px 0 2px; }
.tk-info { margin: 0 0 4px; }
.tk-form-zeile { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 0 12px; }
.tk-lbl { display: block; font-size: 13px; color: var(--grafit); margin: 10px 0 4px; font-weight: 540; }
.tk-seg { display: flex; }
.tk-seg button { flex: 1 1 auto; white-space: nowrap; min-height: 40px; padding: 7px 8px; }
#tkLos { margin-top: 14px; width: 100%; }
.tk-ort { display: flex; gap: 8px; align-items: flex-start; margin: 16px 0 10px; padding-top: 14px; border-top: 1px solid var(--linie); }
.tk-ort > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tk-vs { border: 1px solid var(--linie2); border-radius: 10px; padding: 10px 12px; margin-top: 8px; background: var(--flaeche); cursor: pointer; }
.tk-vs:hover { border-color: var(--grafit); }
.tk-vs[aria-current="true"] { border-color: var(--aktion); box-shadow: inset 4px 0 0 var(--aktion); background: var(--aktion-hell); }
.tk-vs-kopf { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-weight: 640; }
.tk-vs-wann { display: inline-flex; align-items: center; gap: 6px; }
.tk-vs-mehr { font-size: 20px; font-weight: 760; margin: 2px 0; }
.tk-vs-mehr:not(.s1):not(.s2):not(.s3) { font-size: 15px; font-weight: 600; color: var(--aktion); }
.tk-vs-km { font-size: 14px; font-weight: 500; color: var(--grafit); }
.tk-vs-mehr.s1 { color: var(--gruen); }
.tk-vs-mehr.s2 { color: #7A5A00; }
.tk-vs-mehr.s3 { color: var(--rot); }
.tk-vs-wo { margin: 2px 0 4px; overflow-wrap: anywhere; }
.tk-schiebt { color: #6B4E00; background: var(--marker-weich); border-radius: 6px; padding: 3px 8px; margin-top: 5px; }
.tk-vs-akt { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.tk-zelle-eng { margin-left: 1px; color: #8A6100; font-weight: 800; }
.tk-vs-akt .btn[aria-pressed="true"] { background: var(--tinte); border-color: var(--tinte); color: #fff; }
.tk-gitter-box { overflow-x: auto; margin: 6px 0 8px; }
.tk-gitter { border-collapse: separate; border-spacing: 3px; font-size: 13px; width: 100%; table-layout: fixed; }
.tk-gitter th:first-child { width: 84px; }
.tk-gitter th { font-weight: 600; color: var(--grafit); text-align: center; white-space: nowrap; padding: 2px 3px; line-height: 1.25; }
.tk-gitter tbody th { text-align: left; padding-right: 8px; color: var(--tinte); }
.tk-zelle { display: block; width: 100%; min-width: 42px; min-height: 40px; border-radius: 8px; border: 1px solid transparent; font: inherit; font-size: 13.5px; font-weight: 740; cursor: pointer; padding: 0 4px; font-variant-numeric: tabular-nums; }
.tk-zelle.s1 { background: var(--gruen-hell); color: var(--gruen); }
.tk-zelle.s2 { background: var(--marker-weich); color: #6B4E00; }
.tk-zelle.s3 { background: var(--rot-hell); color: var(--rot); }
.tk-zelle.leer { background: var(--aktion-hell); color: var(--aktion); font-weight: 600; font-size: 12.5px; }
.tk-zelle.voll, .tk-zelle.weg { background: #EBEEEB; color: var(--grafit); font-weight: 500; font-size: 12.5px; cursor: default; }
.tk-zelle:not(:disabled):hover { border-color: var(--grafit); }
.tk-zelle[aria-pressed="true"] { outline: 2px solid var(--tinte); outline-offset: 1px; }
.tk-wtag { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; overflow: hidden; }
.tk-wtag + .tk-wtag { margin-top: -8px; }
.tk-wtag-kopf, .tk-wzeile { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 9px 12px; }
.tk-wtag-kopf { background: var(--papier); border-bottom: 1px solid var(--linie); }
.tk-wtag-pfeil { margin-left: auto; color: var(--grafit); font-size: 18px; }
.tk-wzeile { flex-wrap: wrap; gap: 2px 12px; border-top: 1px solid var(--linie); }
.tk-wtag-kopf + .tk-wzeile { border-top: 0; }
.tk-wtag-kopf:hover, .tk-wzeile:hover { background: #F0F4F0; }
.tk-wz-wer { display: inline-flex; align-items: center; min-width: 92px; }
.tk-wz-orte { flex-basis: 100%; overflow-wrap: anywhere; }
.tk-weg { padding: 8px 12px; color: var(--grafit); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.tk-diff { margin-bottom: 8px; }
.ez-pin.tk-pin-neu { background: var(--marker) !important; color: var(--tinte); border-color: var(--tinte); width: 34px; height: 34px; font-size: 18px; }
.ez-stop[data-stop="neu"] { border: 2px dashed var(--aktion); background: var(--aktion-hell); cursor: default; }
.tk-legende { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; color: var(--grafit); }
.tk-legende > span { display: inline-flex; align-items: center; gap: 5px; }
.tk-leg-stern { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--marker); border: 1.5px solid var(--tinte); color: var(--tinte); font-size: 11px; }
@media (max-width: 760px) {
  .tk-mon { margin-left: 0; }
  .tk-tage { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .tk-tage::-webkit-scrollbar { display: none; }
  .tk-tage .chip { flex: none; }
  .tk-zelle { min-height: 44px; min-width: 44px; }
  .tk-vs-akt .btn { min-height: 40px; flex: 1; }
}
