




.termine-shell{
display:flex; flex-direction:column; flex:1 1 auto; min-width:0; min-height:0;
width:100%; height:100%; background:var(--gh-bg); color:var(--gh-text); overflow:hidden;
}




.term-werkzeuge{ flex:0 0 auto; border-bottom:1px solid var(--gh-border-subtle); position:relative; z-index:30; }

#termine-overlay{ --suche-max-b:20rem; }
#term-head .wp-werkzeuge-primaer{ margin-left:auto; }


.term-zeit{ display:contents; }
#term-head .wp-werkzeugzeile--mobil > .term-zeit > *{ order:-1; flex:0 0 auto; }
#term-head .wp-werkzeugzeile--mobil > .wp-werkzeuge-suche{ flex:1 1 5rem; min-width:5rem; }

#term-head:not(.term-kopf--schmal) .wp-werkzeugzeile--mobil :is(.term-heute, .term-ansicht > .wp-btn){ padding-inline:var(--sp-2); }

#term-head.term-kopf--schmal .wp-werkzeugzeile--mobil{ flex-wrap:nowrap; }
#term-head.term-kopf--schmal .term-ansicht{ flex:1 1 auto; min-width:0; }
#term-head.term-kopf--schmal .term-ansicht > .wp-btn{ flex:1 1 auto; min-width:0; padding-inline:var(--sp-2); }
#term-body{ flex:1 1 auto; min-height:0; overflow:auto; padding:var(--sp-3); }



.term-month-block{ margin-bottom:var(--sp-6); }
.term-month-head{
position:sticky; top:calc(-1 * var(--sp-3)); z-index:5;
margin:0 0 var(--sp-2); padding:var(--sp-2) var(--sp-1);
font-size:var(--t-titel); font-weight:600; color:var(--gh-text);
background:var(--gh-bg); border-bottom:1px solid var(--gh-border-subtle);
}

.term-month-head:has(> .wp-zeitraum){ display:flex; justify-content:center; padding-inline:0; }
.term-month-grid{ display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); gap:var(--sp-1); }
.term-weekday-head{ text-align:center; font-size:var(--t-neben); font-weight:600; color:var(--gh-muted); padding:var(--sp-1) 0; }
.term-day-cell{
display:flex; flex-direction:column; gap:3px; min-width:0; min-height:80px;
padding:var(--sp-1) var(--sp-2); cursor:pointer;
background:var(--gh-card); border:0; border-radius:var(--r-md); box-shadow:var(--karten-schatten);
}

.term-day-cell.weekend{ background:var(--kachel-bg); }
.term-day-cell.other-month .term-day-num{ color:var(--gh-muted); font-weight:400; }
.term-day-cell.is-today{ border-color:var(--gh-accent); box-shadow:inset 0 0 0 1px var(--gh-accent), var(--karten-schatten); }

.term-day-num{
align-self:flex-start; min-width:var(--sp-6); padding:0 var(--sp-1); margin:0;
background:none; border:0; border-radius:var(--r-sm);
font:inherit; font-size:var(--t-neben); font-weight:600; color:var(--gh-text); text-align:left; cursor:pointer;
}
.term-tag-knopf:focus-visible{ outline:2px solid var(--gh-accent); outline-offset:1px; }
.term-day-cell.is-today .term-day-num{ color:var(--gh-accent); }
.term-context-strip{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.term-ctx-chip{
display:inline-flex; align-items:center; gap:2px; max-width:100%; min-width:0;
padding:0 var(--sp-1); border-radius:var(--r-sm); border:0;
font-size:var(--t-neben); font-weight:600; line-height:1.3;
overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
background:var(--gh-badge-neutral-bg); color:var(--gh-badge-neutral-fg);
}
.term-ctx-chip.feiertag{ padding-inline:0; background:transparent; color:var(--gh-warn); }




.term-ctx-chip.abwesenheit{ background:var(--farbe-offen-weich); color:var(--farbe-offen-text-weich); }
.term-ctx-chip.abwesenheit.art-urlaub{ background:var(--abw-weich-urlaub); color:var(--abw-text-urlaub); }
.term-ctx-chip.abwesenheit.art-krank{ background:var(--abw-weich-krank); color:var(--abw-text-krank); }
.term-ctx-chip.abwesenheit.art-sonder{ background:var(--abw-weich-sonder); color:var(--abw-text-sonder); }
.term-ctx-chip.abwesenheit.art-fortbildung{ background:var(--abw-weich-fortbildung); color:var(--abw-text-fortbildung); }
.term-ctx-chip.abwesenheit.art-ausgleich{ background:var(--abw-weich-ausgleich); color:var(--abw-text-ausgleich); }
.term-ctx-chip .wp-i{ flex:0 0 auto; width:1em; height:1em; }


.term-ctx-chip:is(.feiertag, .ferien){ display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; white-space:normal; overflow-wrap:anywhere; hyphens:auto; line-height:1.25; }
.term-ctx-more, .term-day-more{ font-size:var(--t-neben); color:var(--gh-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.term-day-more{ text-align:center; }
@media (hover:hover){
.term-day-cell:hover, .term-week-col:hover{ background:var(--kachel-hover); border-color:var(--gh-border); }
}


.term-pill{
display:flex; align-items:center; gap:var(--sp-1); min-width:0;
padding:1px var(--sp-1); border-radius:var(--r-xs);
background:var(--gh-badge-neutral-bg); color:var(--gh-badge-neutral-fg);
font-size:var(--t-neben); line-height:1.3; cursor:grab;
}
.term-pill-oeffnen{
display:flex; align-items:center; gap:var(--sp-1); flex:1 1 auto; min-width:0; padding:0; margin:0;
background:none; border:0; font:inherit; color:inherit; text-align:left; cursor:pointer;
}
.term-pill-oeffnen:focus-visible{ outline:2px solid var(--gh-accent); outline-offset:1px; border-radius:var(--r-xs); }
.term-pill.is-erledigt .term-pill-txt, .term-pill.is-abgesagt .term-pill-txt{ text-decoration:line-through; }
.term-pill-txt{ flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.term-pill-txt .wp-i{ width:1em; height:1em; vertical-align:-2px; }

.term-day-cell .term-pill-txt{ display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; white-space:normal; hyphens:auto; line-height:1.25; }

.term-kat-marke{ flex:0 0 auto; width:var(--sp-2); height:var(--sp-2); border-radius:2px; background:var(--kat, var(--gh-border-strong)); }
.term-pill-clock{
flex:0 0 auto; display:inline-flex; align-items:center; padding:0; border:0;
background:none; color:inherit; cursor:pointer; opacity:0;
}
.term-pill:hover .term-pill-clock, .term-pill-clock:focus-visible{ opacity:1; }

@media (hover:none){ .term-pill-clock{ display:none; } }







.term-week-block{ display:flex; flex-direction:column; gap:var(--sp-2); }
.term-week-head{ display:flex; align-items:center; justify-content:center; min-width:0; padding:var(--sp-1) 0; }
.term-week-grid{ display:grid; grid-template-columns:minmax(0, 1fr); gap:var(--sp-2); }
.term-week-col{
display:grid; grid-template-columns:9em minmax(0, max-content) minmax(0, 1fr); align-items:center; row-gap:var(--sp-1);
min-width:0; min-height:calc(var(--feld-h) + 2 * var(--sp-2)); padding:var(--sp-2) var(--sp-3); cursor:pointer;
background:var(--gh-card); border:0; border-radius:var(--r-lg); box-shadow:var(--karten-schatten);
}
.term-week-col.weekend{ background:var(--kachel-bg); }
.term-week-col.is-today{ border-color:var(--gh-accent); box-shadow:inset 0 0 0 1px var(--gh-accent), var(--karten-schatten); }

.term-week-colhead{
grid-column:1; grid-row:1; align-self:stretch; display:flex; flex-wrap:nowrap; align-items:center; gap:var(--sp-1);
margin:calc(-1 * var(--sp-2)) var(--sp-3) calc(-1 * var(--sp-2)) 0; padding:0 var(--sp-3) 0 0;
background:none; border:0; border-right:var(--rand-haar) solid var(--gh-border-subtle); border-radius:0;
font:inherit; text-align:left; cursor:pointer;
}
.term-week-wd{ font-size:var(--t-text); font-weight:600; color:var(--gh-muted); }
.term-week-dnum{ font-size:var(--t-text); font-weight:600; color:var(--gh-text); }
.term-week-col.is-today .term-week-wd, .term-week-col.is-today .term-week-dnum{ color:var(--gh-accent); }
.term-week-col > .term-context-strip{ grid-column:2; grid-row:1; flex-direction:row; flex-wrap:wrap; gap:var(--sp-1); margin-right:var(--sp-2); }
.term-week-pills{ grid-column:3; grid-row:1; display:flex; flex-wrap:wrap; align-items:center; gap:var(--sp-1); min-width:0; }
.term-week-col > :is(.term-context-strip, .term-week-pills) > *{ flex:0 1 auto; max-width:100%; }
.term-week-col .term-ctx-chip{ line-height:1.6; padding-inline:var(--sp-2); }
.term-week-pills .term-pill{ padding:var(--sp-1) var(--sp-2); border-radius:var(--r-sm); }

.term-week-col.weekend .term-pill{ background:var(--gh-card); }

:is(.term-day-cell, .term-week-col, .term-liste-group-head).is-feiertag{ background:var(--gh-warn-bg); }
:is(.term-day-cell, .term-week-col).is-feiertag .term-pill{ background:var(--gh-card); }

.term-week-empty{ font-size:var(--t-neben); color:var(--gh-muted); }


.term-liste-group{ margin-top:var(--sp-2);background:var(--gh-card);border-radius:var(--r-lg);box-shadow:var(--karten-schatten);overflow:hidden }
.term-liste-group-head{
display:flex; align-items:center; flex-wrap:wrap; gap:var(--sp-2);
padding:var(--sp-3); border-bottom:1px solid var(--gh-border-subtle);
font-size:var(--t-text); font-weight:600; color:var(--gh-text);
}
.term-liste-context{ display:inline-flex; align-items:center; gap:var(--sp-1); min-width:0; }
.term-liste-context .term-ctx-chip{ max-width:150px; }
.term-liste-context .term-ctx-chip.feiertag{ max-width:none; }
.term-liste-item{ padding:var(--sp-1) var(--sp-2); }
.term-liste-group > .term-liste-item:last-child{border-bottom:0}

.term-liste-item > .wp-zeile-symbol:empty{display:none}
.term-liste-item .wp-zeile-zeit{min-width:0;width:calc(44px * var(--wp-dichte));flex:0 0 calc(44px * var(--wp-dichte));font-size:var(--t-neben)}
.term-liste-item .wp-zeile-sub .term-kat-marke{display:inline-block;margin-right:var(--sp-1);vertical-align:.1em}
.term-liste-item:is(.is-erledigt, .is-abgesagt) .wp-zeile-titel{ text-decoration:line-through; color:var(--gh-muted); }
.term-liste-item.is-bestaetigt .wp-zeile-titel{ color:var(--gh-muted); }

.term-liste-weiter{ display:inline-flex; color:var(--gh-muted); }


.term-filter-felder{ display:flex; flex-direction:column; gap:var(--sp-3); padding:var(--sp-3) var(--sp-4); }
.term-filter-feld{ display:flex; flex-direction:column; gap:var(--sp-1); margin:0; font-size:var(--t-neben); font-weight:600; color:var(--gh-muted); }
.term-filter-feld select{
min-height:var(--feld-h); padding:0 var(--sp-2); font:inherit; font-size:var(--feld-fs); font-weight:400;
background:var(--gh-input-bg); color:var(--gh-text); border:1px solid var(--feld-rand); border-radius:var(--r-md);
}
.term-filter-haken{ display:flex; align-items:center; gap:var(--sp-2); min-height:var(--feld-h); font-size:var(--t-text); color:var(--gh-text); cursor:pointer; }
.term-filter-haken input{ flex:0 0 auto; width:var(--sp-5); height:var(--sp-5); margin:0; accent-color:var(--gh-accent); }
.term-filter-gruppe{ margin:0; padding:0; border:0; display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:0 var(--sp-3); }
.term-filter-gruppe > legend{ padding:0 0 var(--sp-1); font-size:var(--t-neben); font-weight:600; color:var(--gh-muted); }
.term-filter-blatt .wp-fusszeile{ position:sticky; bottom:0; padding:var(--sp-3) var(--sp-4); background:var(--gh-panel); border-top:1px solid var(--gh-border-subtle); }


.term-quicktime-pop{
position:fixed; z-index:5200; width:min(300px, calc(var(--teil-b, 100vw) - 2 * var(--sp-2))); max-width:calc(var(--teil-b, 100vw) - 2 * var(--sp-2)); max-height:calc(var(--teil-h, 100vh) * 0.7); overflow:auto;
padding:0 0 var(--sp-3); background:var(--gh-panel); color:var(--gh-text);
border:1px solid var(--gh-border); border-radius:var(--r-lg); box-shadow:var(--shadow-lg);
}
.term-quicktime-pop > :not(.wp-kopf){ margin-left:var(--sp-3); margin-right:var(--sp-3); }


.term-pop-section{ display:flex; flex-direction:column; padding:var(--sp-2) var(--sp-4); }
.term-pop-section + .term-pop-section{ border-top:1px solid var(--gh-border-subtle); }
.term-pop-section h5{ margin:0; padding:var(--sp-1) 0; font-size:var(--t-neben); font-weight:600; color:var(--gh-muted); }
.term-pop-aktionen{ display:flex; justify-content:flex-end; gap:var(--sp-2); padding:var(--sp-3) var(--sp-4); border-top:1px solid var(--gh-border-subtle); }

.term-context-row{
display:flex; align-items:center; gap:var(--sp-3); min-height:var(--zeile-h); padding:var(--sp-1) 0;
border-bottom:1px solid var(--tabelle-trenner);
}
.term-context-row:last-child{ border-bottom:0; }
.term-context-symbol{ display:inline-flex; flex:0 0 auto;  }


.term-context-row > div{ flex:1 1 auto; min-width:0; display:flex; align-items:center; justify-content:space-between; gap:var(--sp-2); }
.term-context-row b{ font-size:var(--t-text); font-weight:500; color:var(--gh-text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.term-context-row small{ flex:0 0 auto; font-size:var(--t-neben); color:var(--gh-muted); }
.term-quicktime-pop .tqt-row{ display:flex; gap:var(--sp-3); margin-top:var(--sp-2); margin-bottom:var(--sp-2); }
.term-quicktime-pop .tqt-row label{ display:flex; flex-direction:column; gap:var(--sp-1); font-size:var(--t-neben); color:var(--gh-muted); }
.term-quicktime-pop .tqt-hint{ margin-bottom:var(--sp-2); font-size:var(--t-neben); color:var(--gh-muted); }
.term-quicktime-pop .tqt-actions{ display:flex; gap:var(--sp-2); justify-content:flex-end; }





body:not(.monteur-mode) #term-edit-overlay .termin-dialog{ max-height:calc(var(--teil-h, 100vh) * 0.88); }
.tm-form{ display:flex; flex-direction:column; gap:var(--sp-3); container-type:inline-size; }
.tm-gruppe-hinweis{ margin-left:auto; font-size:var(--t-neben); font-weight:400; color:var(--gh-muted); }
#term-edit-overlay .tm-field{ min-width:0; }
#term-edit-overlay .tm-field[hidden]{ display:none; }


.tm-personen-liste{
position:fixed; z-index:var(--z-menu); height:19rem; padding:var(--sp-2);
background:var(--gh-card); border-radius:var(--r-md);
box-shadow:0 0 0 var(--rand-haar) var(--karten-linie), var(--popover-schatten);
}
.tm-personen-liste > #tm-mitarbeiter-pills{ flex:1 1 auto; min-height:0; max-height:none; }
.tm-serie-hint{
display:flex; align-items:center; gap:var(--sp-2); padding:var(--sp-2) var(--sp-3); border-radius:var(--r-md);
font-size:var(--t-neben); background:var(--gh-badge-neutral-bg); color:var(--gh-badge-neutral-fg);
}

.tm-lead-kopf{ display:flex; align-items:center; justify-content:space-between; gap:var(--sp-2); min-width:0; margin-bottom:var(--sp-1); }
.tm-lead-kopf > label{ margin:0; }
.tm-lead-kopf .tm-lead-oeffnen{ min-height:0; padding:0; font-size:var(--t-neben); }
.tm-pills-hinweis{ font-size:var(--t-neben); color:var(--gh-muted); }
.tm-pills-hinweis.is-fehler{ color:var(--gh-danger); }
.tm-hinweis{
display:flex; flex-direction:column; gap:var(--sp-1); margin-top:var(--sp-2); padding:var(--sp-2) var(--sp-3);
border-radius:var(--r-md); border:1px solid var(--gh-warn-border); background:var(--gh-warn-bg);
font-size:var(--t-neben); color:var(--gh-text);
}
.tm-hinweis[hidden]{ display:none; }
.tm-hinweis-zeile{ display:flex; align-items:center; gap:var(--sp-2); }
.tm-hinweis-zeile .wp-i{ flex:0 0 auto;  }


@media (max-width:600px){
#term-edit-overlay .wp-feldraster > [data-spur]{ grid-column:1 / -1; }
#term-edit-overlay .wp-feldraster > :is(.tm-paar, .wp-formfeld[data-spur="3"]){ grid-column:span 3; }
.term-month-grid, .term-week-grid{ grid-template-columns:minmax(0, 1fr); }
.term-weekday-head{ display:none; }
.term-day-cell{ position:relative; min-height:60px; }
.term-day-cell::before{
content:attr(data-wd); position:absolute; top:var(--sp-1); right:var(--sp-2);
font-size:var(--t-neben); font-weight:600; color:var(--gh-muted);
}


.term-week-col{ grid-template-columns:auto minmax(0, 1fr) auto; column-gap:var(--sp-2); min-height:0; padding:0 var(--sp-3) var(--sp-1); }
.term-week-colhead{ min-height:max(var(--tap), 44px); margin:0; padding:0; border-right:0; }
.term-week-wd{ color:var(--gh-text); }
.term-week-col > .term-context-strip{ margin-right:0; min-width:0; }
.term-week-pills{ grid-column:1 / -1; grid-row:2; flex-direction:column; align-items:stretch; padding-bottom:var(--sp-1); }
.term-week-pills:empty{ display:none; }
.term-week-pills:has(> .term-week-empty:only-child){ display:contents; }
.term-week-empty{ grid-column:3; grid-row:1; }
.term-week-pills .term-pill{ min-height:max(var(--tap), 44px); padding-block:0; }
}



body.monteur-mode.mobile-ui .term-liste-item,
body.monteur-mode.mobile-ui .term-filter-haken,
body.monteur-mode.mobile-ui .term-tag-knopf{ min-height:max(var(--tap), 44px); }
body.monteur-mode.mobile-ui .term-filter-feld select{ min-height:max(var(--tap), 44px); font-size:max(16px, var(--feld-fs)); }
body.monteur-mode.mobile-ui .term-liste-item .wp-zeile-titel{ white-space:normal; overflow-wrap:anywhere; }

body.monteur-mode.mobile-ui .term-liste-item:has(.term-liste-weiter) .wp-zeile-sub{ white-space:normal; }

body.monteur-mode.mobile-ui .term-week-pills .term-pill{ padding-block:0; }

@container (max-width:359px){
#term-edit-overlay .wp-feldraster:not(.wp-zeitspanne) > :is(.tm-paar, .wp-formfeld[data-spur="3"]){ grid-column:1 / -1; }
}
