/* Reiter Team (Verwaltung › Team, seit 02.11.2026). Nur tm-Klassen, Farben und Grundformen (knopf, schalter,
   eingabefeld, blatt) aus styles.css. Ruhig nach Moritz' Regel: weiße Karten, eine Zeile je Angabe, keine Zahlenleisten. */

.tm-seite {
  max-width: 760px;
}

.tm-seite .titelzeile {
  align-items: center;
}

.tm-neu {
  flex: none;
}

.tm-satz {
  font-variant-numeric: tabular-nums;
}

/* ---------- Liste ---------- */

.tm-liste {
  display: grid;
  gap: 10px;
}

.tm-person {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 78px;
  padding: 14px 14px 14px 16px;
  border: 0;
  border-radius: var(--radius-l);
  background: var(--flaeche);
  box-shadow: var(--schatten-1);
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition:
    transform 140ms var(--ease-out),
    box-shadow 180ms ease;
}

.tm-person:active {
  transform: scale(0.99);
}

@media (hover: hover) {
  .tm-person:hover {
    box-shadow: var(--schatten-2);
  }
}

.tm-person > svg {
  color: var(--tinte-3);
}

.tm-person.tm-deaktiviert .tm-avatar,
.tm-person.tm-deaktiviert .tm-name-text {
  opacity: 0.55;
}

.tm-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: none;
  background: var(--flaeche-3);
  color: var(--tinte-2);
  font-size: 15px;
  font-weight: 640;
  letter-spacing: 0.01em;
}

.tm-avatar[data-rolle='leitung'] {
  background: var(--nacht);
  color: oklch(0.85 0.1 195);
}

.tm-avatar[data-rolle='team'] {
  background: oklch(0.94 0.045 195);
  color: oklch(0.45 0.09 200);
}

.tm-avatar[data-rolle='training'] {
  background: oklch(0.955 0.05 85);
  color: oklch(0.52 0.11 70);
}

.tm-wer {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.tm-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.tm-name-text,
.tm-rolle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tm-du {
  flex: none;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--flaeche-3);
  color: var(--tinte-2);
  font-size: 12px;
  font-weight: 560;
}

.tm-rolle {
  color: var(--tinte-2);
  font-size: 14px;
}

/* Am Mac steht der Zugriff rechts, am Telefon in der Zeile der Rolle. */
.tm-rolle-zugriff {
  display: none;
}

.tm-zustand {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--tinte-3);
  font-size: 13.5px;
}

.tm-zustand::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tm-punkt, var(--linie));
}

.tm-zustand[data-art='an'] {
  --tm-punkt: var(--gruen);
}

.tm-zustand[data-art='einladung'] {
  --tm-punkt: var(--gelb);
}

.tm-zustand[data-art='abgelaufen'] {
  --tm-punkt: var(--rot);
}

.tm-zugriff {
  max-width: 13em;
  color: var(--tinte-2);
  font-size: 14px;
  font-weight: 540;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tm-platz {
  height: 78px;
  border-radius: var(--radius-l);
  background: var(--flaeche);
  box-shadow: var(--schatten-1);
  opacity: 0.6;
}

.tm-fehler {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 20px;
  border-radius: var(--radius-l);
  background: var(--flaeche);
  box-shadow: var(--schatten-1);
  color: var(--tinte-2);
}

/* Telefon: was die Person sieht, rückt in die Zeile der Rolle statt an den Rand. */
@media (max-width: 560px) {
  .tm-seite .grosstitel {
    font-size: 30px;
  }

  .tm-neu {
    padding: 0 16px;
  }

  .tm-person {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px 12px 14px 14px;
  }

  .tm-zugriff,
  .tm-rolle-satz {
    display: none;
  }

  .tm-rolle-zugriff {
    display: inline;
  }
}

/* ---------- Blatt einer Person ---------- */

.tm-blatt {
  min-width: 0;
}

.tm-blatt-kopf {
  display: grid;
  gap: 6px;
  margin: -6px 4px 4px;
  min-width: 0;
}

.tm-blatt-wer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  min-width: 0;
  color: var(--tinte-2);
  font-size: 14.5px;
}

.tm-mail {
  min-width: 0;
  overflow-wrap: anywhere;
}

.tm-blatt-zustand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
}

.tm-geraete {
  color: var(--tinte-3);
  font-size: 13.5px;
}

.tm-abschnitt {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 4px 8px;
}

.tm-abschnitt h3 {
  margin: 0;
  color: var(--tinte-3);
  font-size: 13px;
  font-weight: 620;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tm-zugriff-kurz {
  color: var(--tinte-2);
  font-size: 14px;
  font-weight: 560;
  text-align: right;
}

.tm-karte {
  border-radius: var(--radius-l);
  background: var(--flaeche);
  box-shadow: var(--schatten-1);
}

.tm-rolle-fest {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
}

.tm-rolle-fest span {
  color: var(--tinte-3);
  font-size: 14px;
}

.tm-rollen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tm-rollenwahl {
  display: grid;
  align-content: start;
  gap: 2px;
  min-height: 68px;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--radius-m);
  background: var(--flaeche);
  box-shadow: inset 0 0 0 1px var(--linie);
  color: var(--tinte);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition:
    box-shadow 160ms ease,
    background-color 160ms ease,
    transform 140ms var(--ease-out);
}

.tm-rollenwahl:active:not(:disabled) {
  transform: scale(0.98);
}

.tm-rollenwahl strong {
  font-size: 15.5px;
  font-weight: 620;
}

.tm-rollenwahl span {
  color: var(--tinte-3);
  font-size: 13.5px;
  line-height: 1.35;
}

.tm-rollenwahl[aria-checked='true'] {
  background: var(--marke-zart);
  box-shadow: inset 0 0 0 2px var(--marke-tief);
}

.tm-rollenwahl:disabled,
.tm-rollenwahl.laedt {
  cursor: default;
  opacity: 0.55;
}

.tm-notiz {
  margin: 0 4px 10px;
  color: var(--tinte-3);
  font-size: 14px;
  line-height: 1.45;
}

/* Trainees mit Settings buchen: wie viele sie gelegt haben (seit 04.11.2026) */
.tm-settings {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 4px 0;
  color: var(--tinte);
  font-size: 14.5px;
  font-weight: 600;
}

.tm-settings svg {
  flex: none;
  color: var(--marke-tief);
}

.tm-settings small {
  color: var(--tinte-3);
  font-size: 13.5px;
  font-weight: 500;
}

.tm-settings + .tm-notiz,
.tm-teile + .tm-notiz {
  margin-top: 10px;
}

.tm-gruppe + .tm-gruppe {
  margin-top: 14px;
}

.tm-gruppe h4 {
  margin: 0 4px 6px;
  color: var(--tinte-2);
  font-size: 14px;
  font-weight: 600;
}

.tm-teile {
  overflow: hidden;
  border-radius: var(--radius-l);
  background: var(--flaeche);
  box-shadow: var(--schatten-1);
}

.tm-teil {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 9px 14px 9px 16px;
  position: relative;
  cursor: pointer;
}

.tm-teil.tm-teil-fest {
  cursor: default;
}

.tm-teil + .tm-teil::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 16px;
  height: 1px;
  background: var(--linie-2);
}

.tm-teil-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.tm-teil-name {
  font-weight: 560;
}

.tm-teil-unter {
  color: var(--tinte-3);
  font-size: 13px;
  line-height: 1.35;
}

.tm-teil .schalter:disabled {
  opacity: 0.6;
}

.tm-fest {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--flaeche-3);
  color: var(--tinte-3);
  font-size: 13px;
  font-weight: 580;
}

.tm-fest[data-an] {
  background: var(--gruen-zart);
  color: var(--gruen);
}

.tm-aktionen {
  display: grid;
  overflow: hidden;
  border-radius: var(--radius-l);
  background: var(--flaeche);
  box-shadow: var(--schatten-1);
}

.tm-aktion {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 14px 0 16px;
  border: 0;
  background: none;
  color: var(--tinte);
  font: inherit;
  font-size: 15.5px;
  font-weight: 540;
  text-align: left;
  text-decoration: none;
  position: relative;
  cursor: pointer;
  transition: background-color 120ms ease;
}

.tm-aktion:active {
  background: var(--flaeche-3);
}

.tm-aktion + .tm-aktion::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 50px;
  height: 1px;
  background: var(--linie-2);
}

.tm-aktion > svg {
  color: var(--tinte-2);
}

.tm-aktion > svg:last-child:not(:first-child) {
  color: var(--tinte-3);
}

.tm-aktion.tm-gefahr,
.tm-aktion.tm-gefahr > svg {
  color: var(--rot);
}

.tm-aktion.laedt {
  opacity: 0.5;
  cursor: progress;
}

.tm-aktionen + .tm-notiz {
  margin-top: 10px;
}

/* ---------- Neue Person, Einladungslink ---------- */

.tm-formular .feld:last-of-type {
  margin-bottom: 4px;
}

.tm-link-zeile {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.tm-link {
  min-width: 0;
  padding: 12px 14px;
  border-radius: var(--radius-m);
  background: var(--flaeche);
  box-shadow: inset 0 0 0 1px var(--linie);
  color: var(--tinte);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 13.5px;
  line-height: 1.45;
  word-break: break-all;
  -webkit-user-select: all;
  user-select: all;
}

.tm-einladung .aktionen {
  margin-top: 18px;
}
