/* Team nach Entwurf "Team.dc.html": Werte 1:1 aus den Inline-Styles des Entwurfs. */
.tm-page { display: flex; flex-direction: column; gap: 24px; }
.tm-page > .ph { margin-bottom: 0; }
@media (max-width: 767px) { .tm-page .ph .acts { flex: 0 0 auto; } .tm-page .ph .acts .btn.primary { flex: 0 0 auto; } }

/* Suche + Standort-Segment */
.tm-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tm-search { flex: 1 1 260px; max-width: 420px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); }
.tm-search:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.tm-search .ic { font-size: 17px; color: var(--text-3); }
.tm-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font: 400 15px/1.2 var(--sans); color: var(--ink); outline: none; -webkit-appearance: none; appearance: none; }
.tm-search input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.tm-search input::placeholder { color: var(--text-3); }
.seg.tm-seg { height: auto; }
.seg.tm-seg button { height: 36px; padding: 0 12px; }
@media (max-width: 767px) { .tm-search { max-width: none; flex-basis: 100%; } .seg.tm-seg { max-width: 100%; } }

/* Karten-Raster */
.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.tm-card { display: flex; flex-direction: column; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); text-align: left; cursor: pointer; min-width: 0; font: inherit; color: inherit; transition: border-color 150ms ease, background-color 150ms ease, transform 160ms var(--ease-out); }
.tm-card:active { transform: scale(0.985); }
@media (hover: hover) and (pointer: fine) { .tm-card:hover { border-color: #C9BBA5; background: #FFFDF9; } }
.tm-card.off { opacity: .55; }
.tm-card-h { display: flex; align-items: center; gap: 14px; width: 100%; }
.tm-card-h .grow { min-width: 0; }
.av.tm-av52 { width: 52px; height: 52px; font-size: 16px; font-weight: 700; color: var(--ink); }
.tm-name { display: block; font: 400 22px/1.15 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-role { display: block; font-size: 14px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-st { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #4A6630; }
.tm-st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tm-st.off { color: var(--text-3); }
.tm-st.wait { color: var(--accent-deep); }
.tm-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #EAE3D6; border-radius: 12px; overflow: hidden; width: 100%; }
.tm-kpis > span { background: #F7F3EC; padding: 10px 12px; min-width: 0; }
.tm-kpis .k { display: block; font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-kpis .v { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tm-kpis .v.neg, .tm-tile .v.neg { color: var(--bad); }
.tm-locs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); min-width: 0; }
.tm-locs .ic { font-size: 14px; color: var(--accent-deep); }
.tm-locs span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-empty { padding: 40px; text-align: center; color: var(--text-3); }

/* Dialoge (Person, Anlegen) */
.dlg.tm-person { max-width: 760px; }
@media (min-width: 768px) { .dlg.tm-person { max-height: 88vh; } }
.tm-dlg .dlg-h { gap: 16px; }
.av.tm-av60 { width: 60px; height: 60px; font-size: 19px; font-weight: 700; color: var(--ink); }
.av.tm-av60.off { opacity: .5; }
.tm-dname { font: 400 30px/1.05 var(--serif); overflow-wrap: anywhere; }
.tm-dmeta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; font-size: 14px; color: var(--text-2); align-items: center; }
.tm-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; background: #EEF3E8; color: #4A6630; font-size: 12px; font-weight: 700; }
.tm-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tm-pill.off { background: var(--surface-2); color: var(--text-2); }
.tm-pill.wait { background: var(--warn-soft); color: #8A5A2B; }
.tm-tabs { display: flex; gap: 4px; padding: 16px 24px 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tm-tabs::-webkit-scrollbar { display: none; }
.tm-tabs button { flex: none; height: 40px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: transparent; font: 500 14px/1 var(--sans); color: var(--text-2); cursor: pointer; white-space: nowrap; }
.tm-tabs button.on { border-bottom-color: var(--accent-deep); font-weight: 700; color: var(--ink); }
.tm-dlg .dlg-b { padding: 20px 24px; }
.tm-body { display: flex; flex-direction: column; gap: 16px; }
.tm-dlg .dlg-f { justify-content: flex-end; }
.tm-dirty { font-size: 13px; color: var(--accent-deep); font-weight: 600; }
@media (max-width: 767px) {
  .tm-tabs { padding: 12px 16px 0; }
  .tm-dlg .dlg-b { padding: 16px; }
  .tm-dname { font-size: 26px; }
  .tm-dlg .dlg-f .tm-dirty { flex: 1 1 100%; }
  .tm-dlg .dlg-f .tm-dirty:empty { display: none; }
}

/* Uebersicht */
.tm-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tm-tile { display: block; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 14px; cursor: pointer; font: inherit; color: inherit; min-width: 0; }
@media (hover: hover) and (pointer: fine) { .tm-tile:hover { border-color: #C9BBA5; } }
.tm-tile .k { display: block; font-size: 12px; color: var(--text-3); }
.tm-tile .v { display: block; font: 400 28px/1.1 var(--serif); white-space: nowrap; }
.tm-tile .go { display: block; font-size: 12px; color: var(--accent-deep); font-weight: 600; margin-top: 2px; }
@media (max-width: 520px) { .tm-tiles { gap: 8px; } .tm-tile { padding: 12px 10px; } .tm-tile .v { font-size: 22px; } }
.tm-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px 16px; }
.tm-box-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.tm-box-h > span { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.tm-link-btn { flex: none; border: 0; background: transparent; padding: 4px 0; font: 700 13px/1.2 var(--sans); color: var(--accent-deep); cursor: pointer; }
.tm-link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.tm-shift { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #EAE3D6; }
.tm-shift .d { width: 70px; flex: none; font-size: 14px; font-weight: 600; }
.tm-shift .t { flex: 1; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tm-shift .l { font-size: 13px; color: var(--text-3); text-align: right; }
.tm-shift.none { color: var(--text-3); font-size: 14px; }
.tm-alert { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); font-size: 14px; }
.tm-alert > .ic { font-size: 18px; color: var(--accent-deep); }
.tm-alert .tm-link-btn { font-size: 14px; }

/* Formulare im Dialog (Entwurf: Felder 42px, Radius 10) */
.tm-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tm-form.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tm-form.keep2 { gap: 12px; }
.tm-form .full { grid-column: 1 / -1; }
.tm-person .tm-form .input { height: 42px; border-radius: 10px; }
.tm-person .tm-form textarea.input { height: auto; }
@media (max-width: 767px) {
  .tm-form:not(.keep2) { grid-template-columns: minmax(0, 1fr); }
  .tm-form.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.tm-lbl { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.tm-hint { font-weight: 400; color: var(--text-3); font-size: 13px; }
.tm-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tm-opt { height: 42px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); font: 600 14px/1.1 var(--sans); color: var(--ink); cursor: pointer; padding: 0 8px; transition: border-color 150ms ease, background-color 150ms ease; }
.tm-opt.on { border-color: var(--accent-deep); background: var(--accent-soft); }
.tm-opt:disabled { opacity: .45; cursor: default; }
.tm-opt.on:disabled { opacity: .8; }
.tm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font: 600 14px/1 var(--sans); color: var(--ink); cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease; }
.tm-chip .ic { font-size: 15px; color: #A39886; }
.tm-chip.on { border-color: var(--accent-deep); background: var(--accent-soft); }
.tm-chip.on .ic { color: var(--accent-deep); }
.tm-chip:disabled { opacity: .6; cursor: default; }
.tm-note { font-size: 13px; color: var(--text-3); }

/* Zugang und Status */
.tm-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.tm-row > .ic { font-size: 20px; color: var(--accent-deep); }
.tm-row-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@media (max-width: 520px) { .tm-row { grid-template-columns: auto minmax(0, 1fr); } .tm-row-acts { grid-column: 2; justify-content: flex-start; } }
.tm-row b { display: block; font-weight: 600; }
.tm-row .grow > span { display: block; font-size: 13px; color: var(--text-3); }
.tm-row .btn.sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.tm-row.bad { border-color: #EFCFC5; background: #FCF3F0; }
.tm-row.bad > .ic, .tm-row.bad .tm-de { color: var(--bad); }
.tm-row.good { border-color: #C9D6B4; background: #EEF3E8; }
.tm-row.good > .ic, .tm-row.good .tm-de { color: #4A6630; }
.tm-row .tm-de { border-color: currentColor; font-weight: 700; }
.tm-row.bad .tm-de { border-color: #EFCFC5; }
.tm-row.good .tm-de { border-color: #C9D6B4; }
.tm-invite { display: flex; flex-direction: column; gap: 10px; }
.tm-docs { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 0 16px; margin-top: -6px; }
.tm-doc { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #EAE3D6; flex-wrap: wrap; }
.tm-doc:first-child { border-top: 0; }
.tm-doc > .ic { font-size: 18px; color: var(--text-3); }
.tm-doc .grow { min-width: 140px; }
.tm-doc b { display: block; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.tm-doc .grow > span { display: block; font-size: 12px; color: var(--text-3); }
.tm-ask { font-size: 13px; color: var(--bad); font-weight: 600; }

/* Einladung */
.tm-link { display: flex; gap: 8px; }
.tm-link .input { flex: 1; min-width: 0; font-size: 14px; }
.tm-small { font-size: 13px; color: var(--text-3); }
.tm-done { display: flex; align-items: center; gap: 14px; }
.tm-done b { display: block; font: 400 24px/1.15 var(--serif); }
.tm-done .grow > span { display: block; font-size: 14px; color: var(--text-2); margin-top: 2px; }
