/* Boss HQ demo: Team screen styles. */
.tm .tm-card {
  margin-bottom: 10px;
}
.tm-count {
  display: none;
}
.tm-note {
  margin: 10px 2px 0;
  max-width: 90ch;
}
.tm-foot {
  margin: 6px 2px 0;
}
.tm-person {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}
.tm-av {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--info-bg);
  color: var(--info-fg);
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.tm-av.big {
  width: 34px;
  height: 34px;
  font-size: 12px;
}
.tm .tbl th {
  white-space: normal;
}
.tm-c-person {
  width: 150px;
}
.tm-c-role {
  width: 230px;
  min-width: 230px;
}
.tm-c-admin {
  width: 80px;
}
.tm-c-rpt {
  width: 200px;
}
.tm-c-goal {
  width: 220px;
}
.tm .tbl td {
  vertical-align: top;
  padding-top: 12px;
}
.tm .tbl td.tm-c-person {
  padding-top: 14px;
}
.tm .tbl td.tm-c-admin,
.tm .tbl td.tm-c-goal {
  padding-top: 16px;
}
.tm-in,
.tm input.tm-in {
  min-width: 0;
  width: 100%;
}
.tm-ta {
  min-width: 0;
  width: 100%;
  resize: vertical;
  min-height: 66px;
  line-height: 1.4;
  font-size: 12.5px;
  transition: min-height 0.15s ease;
}
.tm-ta:focus {
  min-height: 92px;
}
.tm .tm-sel {
  min-width: 0;
  width: 100%;
  max-width: 190px;
}
.tm .tm-sel .sel-l {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 130px;
}
.tm-goal {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
  display: inline-block;
}
a.tm-goal {
  color: var(--link);
  cursor: pointer;
}
a.pill {
  cursor: pointer;
  text-decoration: none;
}
.tm tr.row-flash td {
  animation: tm-flash 2.4s ease-out;
}
.tm-mrow.row-flash {
  animation: tm-flash 2.4s ease-out;
}
@keyframes tm-flash {
  0%,
  35% {
    background: var(--info-bg);
  }
  100% {
    background: transparent;
  }
}
.tm-mob {
  display: none;
}
.tm-mrow {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--hair);
}
.tm-mrow:last-child {
  border-bottom: 0;
}
.tm-mbody {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tm-mname {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tm-tasks {
  align-self: flex-start;
  margin-top: 6px;
  padding: 6px 10px;
}

/* org chart */
.tm-scroll {
  overflow-x: auto;
  padding: 26px 14px 30px;
}
.tm-tree {
  position: relative;
  width: max-content;
  min-width: 100%;
}
.tm-svg {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  color: var(--muted);
  overflow: visible;
}
.tm-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  position: relative;
}
.tm-tree ul ul {
  margin-top: 40px;
}
.tm-tree li {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 12px;
  position: relative;
}
.tm-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 132px;
  padding: 11px 15px 9px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--hair);
  border-radius: 4px;
  text-align: center;
  font-family: var(--f);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
  z-index: 1;
}
.tm-box:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}
.tm-box.root {
  border-color: var(--accent);
  box-shadow: inset 0 2px 0 var(--accent);
}
.tm-box.me {
  background: var(--sunk);
}
.tm-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}
.tm-txt b {
  font-size: 12.5px;
  font-weight: 600;
}
.tm-role {
  font-size: 11px;
  color: var(--muted);
}
.tm-meta {
  font-size: 9.5px;
  color: var(--faint);
}
.tm-you {
  position: absolute;
  top: -8px;
  right: 6px;
  font-style: normal;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--accent);
  color: var(--on-accent);
}

@media (max-width: 768px) {
  .tm-desk {
    display: none;
  }
  .tm-mob {
    display: block;
  }
  .tm-count {
    display: inline;
  }
  .tm-scroll {
    padding: 16px 12px 20px;
  }
  .tm-svg {
    display: none;
  }
  .tm-tree {
    width: auto;
  }
  .tm-tree ul,
  .tm-tree li {
    display: block;
    padding: 0;
  }
  .tm-tree ul ul {
    margin: 6px 0 0 20px;
  }
  .tm-tree li {
    margin-top: 6px;
  }
  .tm-box {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 0 10px;
    align-items: center;
    text-align: left;
    width: 100%;
    min-width: 0;
  }
  .tm-txt {
    align-items: flex-start;
  }
  .tm-you {
    right: 8px;
  }
}

/* ---------- phone (m5) ---------- */
@media (max-width: 768px) {
  .tm .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .tm .tabs .tab {
    flex: none;
    min-height: 44px;
    white-space: nowrap;
  }
  .tm-mrow {
    cursor: pointer;
    padding: 14px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
  }
  .tm-mrow:active {
    background: var(--sunk);
  }
  .tm-mbody {
    flex: 1;
  }
  .tm-mbody > .small {
    overflow-wrap: anywhere;
  }
  .tm-tasks {
    min-height: 44px;
    min-width: 44px;
    padding: 0 14px;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  .tm-scroll {
    -webkit-overflow-scrolling: touch;
  }
  .tm-box {
    min-height: 52px;
    padding: 10px 12px;
  }
  .tm-txt b,
  .tm-role,
  .tm-meta {
    overflow-wrap: anywhere;
  }
  .tm-meta {
    font-size: 11px;
  }
  .tm-you {
    top: 6px;
  }
  .tm-det h4 {
    margin: 14px 0 4px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .tm-det p {
    margin: 0;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  .tm-det .tm-mname {
    gap: 12px;
    flex-wrap: nowrap;
  }
}
