/* —— Task manager & support tickets (JS injects tm-* markup; styles must live here) —— */
#tab-tasks,
#tab-tickets-manager,
#tab-tickets-start,
#tab-tickets-mine {
  min-height: min(70dvh, 28rem);
}
#tmRoot,
#stkRootManager,
#stkRootStart,
#stkRootMine {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  flex: 1 1 auto;
}
.tm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 0.75rem;
}
.tm-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}
.tm-tab {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.tm-tab:hover {
  color: var(--text);
  border-color: var(--border-strong);
}
.tm-tab.is-active {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--accent-muted);
}
.tm-create {
  flex-shrink: 0;
}
.tm-err {
  margin: 0 0 0.65rem;
}
.tm-layout {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.tm-list-pane {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
}
.tm-cards {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.tm-cards-empty {
  margin: 0.5rem 0;
  font-size: 0.75rem;
}
.tm-task-card,
.tm-series-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 0.85rem;
  align-items: start;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.tm-series-card {
  grid-template-columns: 1fr auto;
}
.tm-task-card:hover,
.tm-series-card:hover {
  border-color: var(--border-strong);
}
.tm-task-card.is-selected,
.tm-series-card.is-selected {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 1px var(--border-strong);
}
.tm-task-card__body,
.tm-series-card__main {
  min-width: 0;
}
.tm-task-card__ref {
  font-size: 0.6875rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.2rem;
  font-variant-numeric: tabular-nums;
}
.tm-task-card__title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.35;
}
.tm-task-card__inst {
  font-weight: 300;
}
.tm-series-card__meta {
  margin: 0.35rem 0 0;
  font-size: 0.6875rem;
  line-height: 1.45;
}
.tm-task-card__people {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.45rem;
}
.tm-task-card__lane {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.6875rem;
}
.tm-task-card__lane-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.62rem;
}
.tm-task-card__name {
  color: var(--text);
}
.tm-task-card__assigned,
.tm-task-card__due {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.65rem;
  color: var(--muted);
}
.tm-task-card__aside,
.tm-task-card__aside--series {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  min-width: 5.5rem;
}
.tm-status-chip {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}
.tm-status-chip--draft {
  border-color: #6b7280;
  color: #9ca3af;
}
.tm-status-chip--not_started {
  border-color: #78716c;
  color: #a8a29e;
}
.tm-status-chip--in_progress {
  border-color: rgba(125, 204, 176, 0.45);
  color: #7dccb0;
}
.tm-status-chip--done {
  border-color: rgba(96, 165, 250, 0.45);
  color: #93c5fd;
}
.tm-status-chip--ended {
  border-color: #57534e;
  color: #78716c;
}
.tm-status-chip--open,
.tm-status-chip--assigned {
  border-color: rgba(125, 204, 176, 0.45);
  color: #7dccb0;
}
.tm-draft-bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
}
.tm-draft-bulk__all {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.6875rem;
  cursor: pointer;
}
.tm-draft-bulk__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.tm-draft-pick {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  margin-right: 0.35rem;
}
.tm-draft-pick__cb {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.tm-draft-pick__box {
  width: 0.85rem;
  height: 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  display: inline-block;
  flex-shrink: 0;
}
.tm-draft-pick__cb:checked + .tm-draft-pick__box {
  background: var(--border-strong);
}

.tm-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
  font-size: 0.58rem;
  font-weight: 500;
  border: 1px solid var(--border);
}
.tm-avatar--xs {
  width: 1.35rem;
  height: 1.35rem;
  font-size: 0.5rem;
}
.tm-avatar--sm {
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.52rem;
}
.tm-avatar--chat {
  width: 1.65rem;
  height: 1.65rem;
  align-self: flex-start;
}
.tm-avatar--empty {
  background: var(--accent-muted);
  color: var(--muted);
}
.tm-avatar--fb {
  background: var(--accent-muted);
  color: var(--text);
}
.tm-avatar--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tm-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}
.tm-modal.hidden {
  display: none !important;
}
.tm-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 10, 0.55);
  backdrop-filter: blur(2px);
}
[data-theme="light"] .tm-modal__backdrop {
  background: rgba(60, 60, 58, 0.35);
}
.tm-modal__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26rem;
  max-height: min(90dvh, 880px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Solid panel — avoid portal --surface (semi-transparent / glassy) */
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.tm-modal__card--wide {
  max-width: min(56rem, 100%);
}
.tm-modal__card--task-detail {
  display: flex;
  flex-direction: column;
  padding: 0;
  max-height: min(92dvh, 920px);
}
.tm-modal__card--status {
  max-width: 22rem;
}
.tm-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.65rem;
}
.tm-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}
.tm-modal__actions--create {
  margin-top: 0.5rem;
}
.tm-form-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: min(72dvh, 620px);
  overflow-y: auto;
  padding-right: 0.2rem;
}
.tm-form-sec__title {
  margin: 0 0 0.5rem;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.tm-req {
  color: var(--danger);
}
.tm-field-hint {
  margin: 0.25rem 0 0;
  font-size: 0.65rem;
}
.tm-field-err {
  margin: 0.25rem 0 0;
  font-size: 0.65rem;
}
#tmModal label.tm-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  margin-bottom: 0;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text);
  cursor: pointer;
}
.tm-check__text {
  flex: 1;
  min-width: 0;
  line-height: 1.45;
}
#tmModal label.tm-check input[type='checkbox'] {
  width: auto;
  max-width: none;
  flex-shrink: 0;
  margin: 0;
  align-self: center;
}
.tm-pick-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.tm-pick-reveal {
  padding: 0.35rem 0.65rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 1px solid rgba(77, 121, 230, 0.45);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.tm-pick-reveal:hover {
  background: var(--accent-muted);
}
.tm-support-none {
  margin: 0;
  font-size: 0.75rem;
}
.tm-deadline-section {
  margin-top: 0.65rem;
}
.tm-deadline-add {
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 650;
  color: #fff;
  background: #dc2626;
  border: 1px solid #b91c1c;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.tm-deadline-add:hover:not(:disabled) {
  background: #b91c1c;
}
.tm-deadline-add:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.tm-deadline-expanded label {
  display: block;
  margin-top: 0.5rem;
}
.tm-deadline-remove {
  display: block;
  margin-top: 0.45rem;
  padding: 0;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tm-deadline-remove:hover {
  color: var(--text);
}
.tm-user-pick {
  position: relative;
}
.tm-user-pick__search {
  width: 100%;
}
.tm-user-pick__list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 5;
  max-height: 12rem;
  overflow-y: auto;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.tm-user-pick__list.hidden {
  display: none !important;
}
.tm-user-pick__item {
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  font-size: 0.75rem;
}
.tm-user-pick__item:hover {
  background: var(--accent-muted);
}
.tm-user-pick__name {
  display: block;
  color: var(--text);
}
.tm-user-pick__sub {
  display: block;
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 0.1rem;
}
.tm-pick-pill {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
}
.tm-pick-pill__x {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.15rem;
}
.tm-pick-pill__x:hover {
  color: var(--text);
}

.tm-detail-modal-header {
  display: flex;
  justify-content: flex-end;
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.tm-detail-body-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.tm-detail-modal-inner {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.85rem 1rem 1rem;
}
.tm-detail-busy {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background: rgba(10, 10, 11, 0.58);
}
[data-theme="light"] .tm-detail-busy {
  background: rgba(232, 232, 230, 0.78);
}
.tm-detail-busy.hidden {
  display: none !important;
}
.tm-detail-busy__spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--border-strong);
  border-top-color: var(--muted);
  border-radius: 50%;
  animation: app-main-loading-spin 0.65s linear infinite;
}
.tm-detail-busy__text {
  font-size: 0.6875rem;
  color: var(--muted);
}

.tm-detail-shell {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 32%);
  gap: 1rem;
  align-items: stretch;
}
@media (max-width: 820px) {
  .tm-detail-shell {
    grid-template-columns: 1fr;
  }
}
.tm-detail-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.35;
}
.tm-detail-title__inst {
  font-weight: 300;
}
.tm-detail-main__head {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.tm-detail-main__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.tm-detail-due-chip {
  font-size: 0.65rem;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
}
.tm-detail-due-chip__k {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 0.25rem;
}
.tm-detail-desc {
  margin: 0.65rem 0 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text);
}
.tm-detail-min {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
}
.tm-detail-min__row {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.45rem;
}
.tm-detail-min__row dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tm-detail-min__row dd {
  margin: 0;
  min-width: 0;
}
.tm-mini-user {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.tm-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}
.tm-detail-routing {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.tm-routing-h {
  margin: 0 0 0.45rem;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.tm-routing-label {
  display: block;
  margin: 0.45rem 0 0.2rem;
}
.tm-routing-select {
  width: 100%;
  max-width: 24rem;
}
.tm-routing-panel {
  margin-top: 0.5rem;
}
.tm-routing-fields {
  margin-top: 0.5rem;
}
.tm-routing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.tm-detail-chat {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  max-height: min(52dvh, 420px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
  min-width: 0;
}
.tm-chat-header {
  padding: 0.45rem 0.65rem;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.tm-chat-thread {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0.55rem 0.65rem;
  font-size: 0.72rem;
}
.tm-chat-row {
  margin-bottom: 0.65rem;
}
.tm-chat-row--msg {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
}
.tm-chat-bubble-wrap {
  min-width: 0;
  flex: 1;
}
.tm-chat-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.62rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.tm-chat-author {
  color: var(--text);
}
.tm-chat-bubble {
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
  line-height: 1.45;
}
.tm-chat-row--log .tm-chat-log {
  font-size: 0.65rem;
  color: var(--muted);
  line-height: 1.45;
}
.tm-chat-composer {
  border-top: 1px solid var(--border);
  padding: 0.5rem;
  flex-shrink: 0;
}
.tm-chat-composer__inner {
  display: flex;
  gap: 0.45rem;
  align-items: flex-end;
}
.tm-chat-input {
  flex: 1;
  min-height: 2.25rem;
  resize: vertical;
  max-height: 8rem;
}
.tm-chat-send {
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  padding: 0.4rem 0.75rem;
  font-size: 0.6875rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.tm-chat-send:hover {
  border-color: var(--text);
}
.tm-chat-composer--readonly {
  padding: 0.55rem 0.65rem;
}

.tm-btn-start {
  border-color: rgba(125, 204, 176, 0.45);
  color: #7dccb0;
}
.tm-btn-end-task,
.tm-btn-end-series {
  font-size: 0.65rem;
}
.tm-sm-btn {
  font-size: 0.65rem;
  padding: 0.3rem 0.55rem;
}

/* —— My team (profile grid + detail modal; markup from my-team.js) —— */
#tab-my-team {
  min-height: min(70dvh, 28rem);
}
#myTeamRoot {
  max-width: none;
}
.my-team-shell--blocks {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}
.my-team-section__title {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
}
.my-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
  gap: 0.65rem;
  align-items: stretch;
}
.my-team-grid--you {
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  max-width: 22rem;
}
.my-team-profile-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font: inherit;
  width: 100%;
  min-width: 0;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.my-team-profile-card:hover {
  border-color: var(--border-strong);
}
.my-team-profile-card:focus-visible {
  outline: 1px solid var(--border-strong);
  outline-offset: 2px;
}
.my-team-profile-card--active {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 1px var(--border-strong);
  background: var(--accent-muted);
}
.my-team-profile-card__avatar-wrap {
  width: 2.85rem;
  height: 2.85rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--accent-muted);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.my-team-preview__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.my-team-preview__ph {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1;
}
.my-team-profile-card__name {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
  word-break: break-word;
  width: 100%;
}
.my-team-profile-card__you {
  font-weight: 400;
}
.my-team-profile-card__empid {
  font-size: 0.64rem;
  line-height: 1.35;
}
.my-team-profile-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  align-items: center;
}
.my-team-profile-card__sub {
  font-size: 0.68rem;
  line-height: 1.45;
  width: 100%;
}
.my-team-staff-tag {
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.1rem 0.38rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  line-height: 1.2;
}
.my-team-staff-tag--field {
  color: #c4b5fd;
  border-color: rgba(196, 181, 253, 0.4);
  background: rgba(139, 92, 246, 0.12);
}
[data-theme="light"] .my-team-staff-tag--field {
  color: #5b21b6;
  border-color: rgba(91, 33, 182, 0.35);
  background: rgba(139, 92, 246, 0.1);
}
.my-team-staff-tag--office {
  color: #7dccb0;
  border-color: rgba(125, 204, 176, 0.38);
  background: rgba(125, 204, 176, 0.1);
}
.my-team-jd-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.1rem 0.32rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--pill-bg);
}
.my-team-jd-check {
  color: #7dccb0;
  font-size: 0.65rem;
}
.my-team-jd-label {
  font-size: 0.56rem;
}
.my-team-jd-inline {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text);
}
.my-team-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.55rem;
}
.my-team-detail-head {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.my-team-detail-head > .my-team-preview__avatar {
  width: 3.35rem;
  height: 3.35rem;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.my-team-detail-head > .my-team-preview__ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.35rem;
  height: 3.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--accent-muted);
  flex-shrink: 0;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--muted);
}
.my-team-detail__title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.25;
  word-break: break-word;
}
.my-team-detail-modal-card {
  max-width: min(30rem, 100%);
}
.my-team-detail-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-shrink: 0;
  padding-bottom: 0.65rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}
.my-team-detail-modal-body {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(72dvh, 560px);
}
#myTeamEditModal label[for='myTeamStaff'] {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: var(--muted);
}
#myTeamStaff {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text);
  font-size: 0.75rem;
}
.my-team-jd {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.my-team-jd-input {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text);
  padding: 0.4rem 0.5rem;
  font-size: 0.75rem;
}
.my-team-jd-input::placeholder {
  color: var(--muted);
  opacity: 0.85;
}
@media (max-width: 520px) {
  .my-team-grid {
    grid-template-columns: 1fr;
  }
  .my-team-grid--you {
    max-width: none;
  }
}

/* —— Notifications page (notifications.js → #notifRoot) —— */
#tab-notifications {
  min-height: min(70dvh, 28rem);
}
#notifRoot {
  max-width: none;
}
.notif-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
#notifList .notif-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.45rem 0.7rem;
  align-items: start;
  margin: 0;
  padding: 0.65rem 0.8rem;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
  transition: border-color 0.12s ease, background 0.12s ease;
}
#notifList .notif-row:hover {
  border-color: var(--border-strong);
  background: var(--accent-muted);
}
#notifList .notif-row:focus-visible {
  outline: 1px solid var(--border-strong);
  outline-offset: 2px;
}
.notif-row__pill {
  flex-shrink: 0;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.12rem 0.42rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--pill-bg);
  color: var(--muted);
  line-height: 1.25;
  margin-top: 0.06rem;
}
.notif-row__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.notif-row__title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.38;
  word-break: break-word;
}
.notif-row__body {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.45;
  word-break: break-word;
}
.notif-row__time {
  flex-shrink: 0;
  font-size: 0.62rem;
  color: var(--muted);
  white-space: nowrap;
  margin-top: 0.1rem;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 560px) {
  #notifList .notif-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.35rem 0.55rem;
  }
  .notif-row__pill {
    grid-column: 1;
    grid-row: 1;
    margin-top: 0;
    align-self: start;
  }
  .notif-row__time {
    grid-column: 2;
    grid-row: 1;
    margin-top: 0;
    align-self: start;
    white-space: normal;
    text-align: right;
    max-width: 9rem;
  }
  .notif-row__main {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
