.spu-group-notifications {
  position: fixed;
  z-index: 1200;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 32px));
  max-height: min(70vh, 560px);
  overflow-y: auto;
  pointer-events: none;
}

.teams-notification {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, #a83232 40%, var(--border, #d8ddd9));
  border-radius: 12px;
  background: var(--surface, #fff);
  color: var(--text, #24211c);
  box-shadow: 0 12px 30px rgba(31, 28, 20, 0.18);
  overflow-wrap: anywhere;
  pointer-events: auto;
}

.teams-notification[data-tone='success'] {
  border-color: color-mix(in srgb, #176d59 45%, var(--border, #d8ddd9));
}

.teams-notification-close {
  align-self: start;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

html[data-theme-mode='dark'] .teams-notification {
  border-color: color-mix(in srgb, #ff8e8e 48%, var(--border, #39413d));
  background: color-mix(in srgb, #7e3030 18%, var(--surface, #17251f));
  color: var(--text, #edf5f0);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.38);
}

html[data-theme-mode='dark'] .teams-notification[data-tone='success'] {
  border-color: color-mix(in srgb, #79d8b2 48%, var(--border, #39413d));
  background: color-mix(in srgb, #176d59 18%, var(--surface, #17251f));
}

@media (max-width: 640px) {
  .spu-group-notifications {
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    width: auto;
    max-height: 60vh;
  }

  .teams-notification {
    grid-template-columns: minmax(0, 1fr);
  }

  .teams-notification-close {
    justify-self: end;
  }
}

.teams-workspace-browser,
.teams-selected-workspace {
  margin: 30px 0;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid rgba(23, 109, 89, 0.18);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface, #fff) 96%, transparent);
  box-shadow: 0 14px 40px rgba(31, 28, 20, 0.06);
}

.teams-workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.teams-workspace-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.teams-section-kicker,
.teams-detail-kicker {
  margin: 0 0 7px;
  color: #176d59;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.teams-workspace-header h2,
.teams-detail-content h3,
.teams-detail-content h4 {
  margin: 0;
}

.teams-workspace-header h2 {
  font-size: clamp(1.45rem, 3vw, 2.1rem);
}

.teams-workspace-note,
.teams-detail-note,
.teams-selected-meta {
  min-height: 1.3em;
  color: var(--muted, #64746c);
}

.teams-workspace-note,
.teams-detail-note {
  margin: 12px 0 0;
  font-size: 0.88rem;
}

.teams-workspace-note[data-tone='error'],
.teams-detail-note[data-tone='error'] {
  color: #a83232;
}

.teams-workspace-note[data-tone='success'],
.teams-detail-note[data-tone='success'] {
  color: #176d59;
}

.teams-workspace-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0 14px;
}

.teams-workspace-tools label,
.teams-inline-form label {
  display: grid;
  gap: 6px;
  color: var(--muted, #64746c);
  font-size: 0.86rem;
  font-weight: 700;
}

.teams-workspace-tools input,
.teams-workspace-tools select,
.teams-inline-form input,
.teams-inline-form select,
.teams-inline-form textarea,
.teams-detail-card select {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid rgba(23, 109, 89, 0.2);
  border-radius: 10px;
  color: var(--text, #24211c);
  background: var(--surface, #fff);
  font: inherit;
}

.teams-inline-form textarea {
  resize: vertical;
}

.teams-workspace-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(220px, auto);
  gap: 10px;
  max-height: 460px;
  overflow-y: auto;
  padding: 2px 4px 4px 0;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: auto;
  touch-action: pan-y;
}

.teams-workspace-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 220px;
  padding: 18px;
  border: 1px solid rgba(23, 109, 89, 0.16);
  border-radius: 16px;
  background: var(--surface, #fff);
}

.teams-workspace-type-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 24px;
  margin-top: 8px;
  padding: 4px 9px;
  border: 1px solid rgba(23, 109, 89, 0.2);
  border-radius: 999px;
  color: var(--muted, #64746c);
  background: var(--surface, #fff);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.teams-workspace-item.is-selected {
  border-color: #176d59;
  box-shadow: 0 0 0 2px rgba(23, 109, 89, 0.12);
}

.teams-workspace-item.is-archived {
  opacity: 0.78;
}

.teams-workspace-item h2 {
  margin: 12px 0 8px;
}

.teams-workspace-item p {
  min-height: 3.2em;
  margin: 0;
  color: var(--muted, #64746c);
  line-height: 1.45;
}

.teams-workspace-item small {
  display: block;
  margin-top: 14px;
  color: var(--muted, #64746c);
}

.teams-workspace-item-main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}

.teams-workspace-item-actions {
  align-items: stretch;
  justify-content: flex-end;
  margin-top: auto;
}

.teams-workspace-item-actions .btn {
  width: auto;
  flex: 1 1 auto;
}

.teams-workspace-item-actions,
.teams-detail-card-actions,
.teams-inline-form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.teams-workspace-lifecycle-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  width: 100%;
}

.teams-workspace-secondary-action,
.teams-workspace-danger-action {
  white-space: nowrap;
}

.teams-workspace-danger-action {
  border-color: #b54b4b;
  color: #9a2f2f;
}

.teams-inline-button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(23, 109, 89, 0.25);
  border-radius: 10px;
  color: #176d59;
  background: transparent;
  font: inherit;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

.teams-inline-button:hover,
.teams-inline-button:focus-visible {
  background: rgba(23, 109, 89, 0.1);
  outline: 0;
}

.teams-inline-button-primary {
  color: #fff;
  background: #176d59;
}

.teams-inline-button-primary:hover,
.teams-inline-button-primary:focus-visible {
  color: #fff;
  background: #105c4a;
}

.teams-inline-button-icon {
  width: 40px;
  padding: 7px;
  font-size: 1.1rem;
}

.teams-toggle-button {
  min-width: 40px;
  padding-inline: 10px;
  font-size: 1.35rem;
  line-height: 1;
}

.teams-toggle-symbol {
  display: inline-block !important;
  min-width: 1em;
  font-size: 1.35rem;
  line-height: 1;
  text-align: center;
}

.teams-native-auth-icon {
  display: inline-block;
  font-size: 1.1rem;
  line-height: 1;
}

.teams-inline-button.is-busy {
  cursor: wait;
  opacity: 0.65;
}

.teams-group-invitation-share {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(23, 109, 89, 0.2);
  border-radius: 12px;
  background: rgba(23, 109, 89, 0.06);
}

.teams-group-invitation-share input {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid rgba(23, 109, 89, 0.22);
  border-radius: 10px;
  color: var(--text, #24211c);
  background: var(--surface, #fff);
  font: inherit;
}

.teams-group-invitation-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.teams-group-invitation-share-actions button {
  white-space: nowrap;
}

.teams-inline-form .teams-group-invitation-email-option {
  display: flex !important;
  align-items: center;
  gap: 8px !important;
}

.teams-inline-form .teams-group-invitation-email-option input {
  width: auto !important;
  min-height: auto !important;
  flex: 0 0 auto;
}

.teams-workspace-create {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(23, 109, 89, 0.14);
}

.teams-workspace-create h3 {
  margin-bottom: 2px;
}

.teams-selected-workspace {
  scroll-margin-top: 18px;
}

.teams-selected-meta {
  margin: 7px 0 0;
}

.teams-workspace-subnav {
  display: flex;
  gap: 8px;
  margin: 22px 0 0;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-y;
}

.teams-workspace-subnav.is-tab-dragging {
  touch-action: pan-y;
}

.teams-subnav-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(23, 109, 89, 0.2);
  border-radius: 999px;
  color: #176d59;
  background: transparent;
  font: inherit;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

.teams-workspace-subnav.is-tab-dragging {
  user-select: none;
}

.teams-subnav-button.is-reorderable {
  cursor: grab;
  /* Short swipes remain native scroll gestures; long press promotes the
     stationary pointer to a captured drag in the runtime. */
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.teams-subnav-button.is-reorderable:active,
.teams-subnav-button.is-dragging {
  cursor: grabbing;
}

.teams-subnav-button.is-dragging {
  opacity: 0.58;
  outline: 2px solid rgba(23, 109, 89, 0.42);
  outline-offset: 2px;
}

.teams-workspace-subnav.is-saving {
  opacity: 0.72;
}

.teams-subnav-button.is-active {
  color: #fff;
  background: #176d59;
}

.teams-subnav-button.is-member-hidden:not(.is-active) {
  color: #4f5854;
  background: #e8eae9;
  border-color: #cbd0cd;
}

.teams-subnav-button.is-owner-only:not(.is-active) {
  color: #fff;
  background: #59625e;
  border-color: #4b5550;
}

.teams-subnav-button.is-license-locked,
.teams-subnav-button.is-entitlement-unavailable,
.teams-subnav-button.is-entitlement-checking {
  color: #687a75;
  background: #e8eeec;
  border-color: #c8d5d1;
  opacity: 0.76;
}

.teams-subnav-button.is-license-locked::after,
.teams-subnav-button.is-entitlement-unavailable::after {
  content: '⌑';
  margin-inline-start: 0.45em;
  font-size: 0.9em;
}

.teams-module-entitlement-message {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(23, 109, 89, 0.24);
  border-radius: 14px;
  background: rgba(23, 109, 89, 0.06);
}

.teams-module-entitlement-message h3,
.teams-module-entitlement-message p {
  margin: 0;
}

.spu-more-action-card.is-license-locked,
.spu-more-action-card.is-entitlement-unavailable,
#spu-native-bottomnav > button.is-license-locked,
#spu-native-bottomnav > button.is-entitlement-unavailable {
  color: #687a75;
  background: #e8eeec;
  border-color: #c8d5d1;
  opacity: 0.76;
}

.spu-more-action-card.is-license-locked::after,
.spu-more-action-card.is-entitlement-unavailable::after {
  content: '⌑';
  margin-inline-start: 0.4em;
}

html[data-theme-mode='dark']
  .teams-subnav-button.is-member-hidden:not(.is-active) {
  color: #d4ddd8;
  background: #343b38;
  border-color: #59645e;
}

html[data-theme-mode='dark']
  .teams-subnav-button.is-owner-only:not(.is-active) {
  color: #f1f5f3;
  background: #252b28;
  border-color: #66716b;
}

html[data-theme-mode='dark'] .teams-subnav-button.is-license-locked,
html[data-theme-mode='dark'] .teams-subnav-button.is-entitlement-unavailable,
html[data-theme-mode='dark'] .teams-subnav-button.is-entitlement-checking {
  color: #c2d1cb;
  background: #343b38;
  border-color: #59645e;
}

html[data-theme-mode='dark'] .spu-more-action-card.is-license-locked,
html[data-theme-mode='dark'] .spu-more-action-card.is-entitlement-unavailable,
html[data-theme-mode='dark'] #spu-native-bottomnav > button.is-license-locked,
html[data-theme-mode='dark']
  #spu-native-bottomnav
  > button.is-entitlement-unavailable {
  color: #c2d1cb;
  background: #343b38;
  border-color: #59645e;
}

.teams-detail-content {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  min-width: 0;
}

.teams-detail-intro {
  padding: 18px;
  border-radius: 16px;
  background: rgba(23, 109, 89, 0.08);
}

.teams-workspace-limits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 12px;
}

.teams-workspace-limits small {
  display: inline-block;
  margin-top: 0;
}

.teams-detail-intro h3 {
  margin-top: 3px;
  font-size: 1.35rem;
}

.teams-detail-intro p:not(.teams-detail-kicker) {
  margin: 9px 0;
  line-height: 1.55;
}

.teams-workspace-type-meta,
.teams-workspace-type-description {
  display: block;
  margin-top: 8px;
  color: var(--muted, #64746c);
}

.teams-workspace-type-section {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(23, 109, 89, 0.18);
  border-radius: 16px;
  background: var(--surface, #fff);
}

.teams-workspace-type-section h4,
.teams-workspace-type-section p {
  margin: 0;
}

.teams-workspace-type-current {
  color: var(--muted, #64746c);
}

.teams-workspace-type-warning {
  color: #8a4d00;
}

.teams-detail-section-title {
  font-size: 1.12rem;
}

.teams-detail-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.teams-detail-list {
  display: grid;
  gap: 10px;
}

.teams-detail-list.has-many {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: auto;
  touch-action: pan-y;
}

.teams-collapsible-body {
  display: grid;
  gap: 12px;
}

.teams-collapsible-body[hidden] {
  display: none;
}

.teams-special-operation {
  margin-top: 10px;
}

.teams-operation-role-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  gap: 8px;
  overflow-x: auto;
  min-inline-size: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(23, 109, 89, 0.16);
  border-radius: 10px;
}

.teams-operation-role-grid legend {
  grid-column: 1 / -1;
}

.teams-operation-role-grid label {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 104px;
  text-align: center;
}

.teams-operation-role-grid input[type='checkbox'] {
  width: 1.2em;
  min-height: 1.2em;
  margin: 0;
  padding: 0;
}

@media (max-width: 680px) {
  .teams-operation-role-grid {
    grid-template-columns: minmax(0, 1fr);
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .teams-operation-role-grid label {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    min-width: 0;
    text-align: start;
  }
}

.teams-workspace-module-form {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  padding: 12px;
}

.teams-workspace-module-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 8px 12px;
  min-width: 0;
}

.teams-workspace-module-option {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(23, 109, 89, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
}

.teams-workspace-module-option > label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text, #24211c);
  font-weight: 700;
}

.teams-workspace-module-option input[type='checkbox'] {
  flex: 0 0 auto;
  width: 1.2em;
  min-height: 1.2em;
  margin: 0;
  padding: 0;
}

.teams-workspace-module-option small {
  margin-inline-start: calc(1.2em + 8px);
}

.teams-workspace-module-form small {
  grid-column: 1 / -1;
}

.teams-workspace-module-form > button[type='submit'] {
  justify-self: start;
}

.teams-member-field-link {
  overflow-wrap: anywhere;
  color: var(--accent, #176d59);
}

.teams-history-page-note {
  color: var(--muted, #64746c);
  overflow-wrap: anywhere;
}

.teams-poll-option {
  display: grid;
  gap: 6px;
  width: 100%;
}

.teams-poll-voter-list {
  display: grid;
  gap: 3px;
  margin: 0 0 4px 14px;
  padding-left: 20px;
  color: var(--muted, #64746c);
  font-size: 0.9rem;
}

.teams-poll-voter {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
}

.teams-poll-voter small {
  color: var(--muted, #64746c);
}

.teams-poll-voter.is-superseded {
  opacity: 0.72;
}

.teams-poll-voter-empty {
  list-style: none;
  color: var(--muted, #64746c);
  font-style: italic;
}

.teams-detail-card {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid rgba(23, 109, 89, 0.16);
  border-radius: 14px;
  background: var(--surface, #fff);
}

.teams-detail-card-main,
.teams-detail-card-actions {
  min-width: 0;
}

.teams-detail-card small,
.teams-detail-card p {
  color: var(--muted, #64746c);
}

.teams-detail-card p {
  margin: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.teams-detail-card-actions {
  justify-content: flex-start;
}

.teams-chat-record-tools {
  display: grid;
  justify-items: end;
  gap: 8px;
  margin-inline-start: auto;
}

.teams-chat-message-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.teams-chat-message-meta {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.teams-chat-message-meta small {
  white-space: nowrap;
}

.teams-chat-message-pinned {
  border-color: rgba(23, 109, 89, 0.48);
  box-shadow: inset 4px 0 0 #176d59;
}

.teams-chat-pin-badge {
  flex: 0 1 auto;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  color: #176d59;
  background: rgba(23, 109, 89, 0.1);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.teams-chat-pin-dialog {
  width: min(620px, calc(100vw - 24px));
  max-width: 620px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  color: var(--text, #24211c);
  background: var(--surface, #fff);
  box-shadow: 0 24px 80px rgba(31, 28, 20, 0.22);
}

.teams-chat-pin-dialog::backdrop {
  background: rgba(15, 33, 28, 0.48);
  backdrop-filter: blur(4px);
}

.teams-chat-pin-dialog-content {
  display: grid;
  gap: 14px;
  max-height: min(90vh, 760px);
  overflow-y: auto;
  padding: clamp(18px, 4vw, 28px);
}

.teams-chat-pin-dialog-content h2,
.teams-chat-pin-dialog-content p {
  margin-block: 0;
}

.teams-chat-pin-duration-field {
  display: grid;
  gap: 6px;
  color: var(--muted, #64746c);
  font-size: 0.86rem;
  font-weight: 700;
}

.teams-chat-pin-duration-field select {
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid rgba(23, 109, 89, 0.2);
  border-radius: 10px;
  color: var(--text, #24211c);
  background: var(--surface, #fff);
  font: inherit;
}

.teams-chat-pin-choice-list {
  display: grid;
  gap: 8px;
  max-height: min(52vh, 460px);
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.teams-chat-pin-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(23, 109, 89, 0.14);
  border-radius: 12px;
  background: rgba(23, 109, 89, 0.035);
  cursor: pointer;
}

.teams-chat-pin-choice:has(input:focus-visible) {
  border-color: rgba(23, 109, 89, 0.45);
}

.teams-chat-pin-choice > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.teams-chat-pin-choice > span > span {
  overflow-wrap: anywhere;
}

.teams-chat-pin-choice small {
  color: var(--muted, #64746c);
}

.teams-chat-tools-toggle {
  min-width: 38px;
  padding-inline: 9px;
  font-size: 1rem;
}

.teams-chat-record-tools-panel {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.teams-record-editor-dialog {
  width: min(680px, calc(100vw - 32px));
  max-width: 680px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--surface, #fff);
  color: var(--text, #24211c);
}

.teams-record-editor-dialog::backdrop {
  background: rgba(15, 33, 28, 0.42);
}

.teams-record-editor-form {
  max-height: min(90vh, 760px);
  overflow-y: auto;
  background: var(--surface, #fff);
}

.teams-record-editor-form h2 {
  margin: 0;
  font-size: 1.25rem;
}

.teams-record-editor-field {
  display: grid;
  gap: 6px;
}

.teams-record-editor-field > span {
  color: var(--muted, #64746c);
  font-size: 0.86rem;
  font-weight: 700;
}

.teams-member-field-options-editor textarea {
  min-height: 112px;
  resize: vertical;
}

.teams-member-table-editor {
  display: grid;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
}

.teams-member-table-editor table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
}

.teams-member-table-editor th,
.teams-member-table-editor td {
  padding: 7px;
  border: 1px solid rgba(23, 109, 89, 0.16);
  text-align: start;
  vertical-align: top;
}

.teams-member-table-editor th {
  color: var(--muted, #64746c);
  background: rgba(23, 109, 89, 0.06);
  font-size: 0.82rem;
}

.teams-member-table-editor td > input {
  min-width: 120px;
  width: 100%;
}

.teams-member-table-row-action {
  width: 1%;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .teams-record-editor-dialog {
    width: calc(100vw - 20px);
  }

  .teams-record-editor-form .teams-inline-form-actions {
    position: sticky;
    bottom: -18px;
    padding-top: 10px;
    padding-bottom: 2px;
    background: var(--surface, #fff);
  }

  .teams-member-table-editor table {
    min-width: 620px;
  }
}

.teams-detail-card-actions select {
  width: auto;
  min-width: 150px;
}

.teams-inline-form {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(23, 109, 89, 0.14);
  border-radius: 16px;
  background: rgba(23, 109, 89, 0.045);
}

.teams-area-filter-form {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
  gap: 10px;
  padding: 12px;
}

.teams-area-filter-form .teams-inline-button {
  align-self: end;
}

.teams-attendance-responses {
  display: grid;
  gap: 6px;
  margin-top: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(23, 109, 89, 0.045);
}

.teams-attendance-response-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-inline-start: 20px;
}

.teams-attendance-response {
  overflow-wrap: anywhere;
}

.teams-inline-form h4 {
  font-size: 1rem;
}

.teams-inline-section {
  display: grid;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(23, 109, 89, 0.14);
}

.teams-finance-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.teams-overview-metrics,
.teams-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.teams-overview-metric,
.teams-overview-section,
.teams-overview-attention {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(23, 109, 89, 0.14);
  border-radius: 14px;
  background: var(--surface, #fff);
}

.teams-overview-metric {
  align-content: start;
  background: rgba(23, 109, 89, 0.045);
}

.teams-overview-metric strong {
  color: #176d59;
  font-size: 1.45rem;
}

.teams-overview-metric span,
.teams-overview-section h4,
.teams-overview-section h5 {
  margin: 0;
}

.teams-overview-section h4,
.teams-overview-attention h4 {
  color: var(--text, #24211c);
  font-size: 1.05rem;
}

.teams-overview-attention {
  margin-top: 14px;
  border-color: rgba(180, 116, 26, 0.28);
  background: rgba(180, 116, 26, 0.06);
}

.teams-overview-attention-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.teams-overview-list {
  display: grid;
  gap: 8px;
}

.teams-overview-item {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border-radius: 10px;
  background: rgba(23, 109, 89, 0.045);
}

.teams-overview-item,
.teams-overview-line {
  overflow-wrap: anywhere;
}

.teams-overview-section > .teams-inline-button {
  justify-self: start;
}

@media (max-width: 640px) {
  .teams-overview-metrics,
  .teams-overview-grid {
    grid-template-columns: 1fr;
  }

  .teams-area-filter-form {
    grid-template-columns: 1fr;
  }

  .teams-area-filter-form .teams-inline-button {
    width: 100%;
  }
}

.teams-finance-summary strong {
  padding: 12px 14px;
  border-radius: 12px;
  color: #176d59;
  background: rgba(23, 109, 89, 0.1);
}

.teams-finance-visibility-note {
  color: var(--muted, #64746c);
  line-height: 1.45;
}

.is-negative {
  color: #a83232;
}

.is-positive {
  color: #176d59;
}

.teams-role-matrix-dialog {
  width: min(960px, calc(100vw - 32px));
  max-width: 960px;
  max-height: min(760px, calc(100vh - 32px));
  padding: clamp(18px, 4vw, 30px);
  border: 1px solid rgba(23, 109, 89, 0.2);
  border-radius: 20px;
  color: var(--text, #24211c);
  background: var(--surface, #fff);
  box-shadow: 0 24px 80px rgba(31, 28, 20, 0.25);
}

.teams-role-matrix-dialog::backdrop {
  background: rgba(31, 28, 20, 0.46);
}

.teams-role-matrix-dialog h2 {
  margin: 0;
}

.teams-role-matrix-intro {
  color: var(--muted, #64746c);
  line-height: 1.5;
}

.teams-role-matrix {
  width: 100%;
  margin: 18px 0;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.teams-role-matrix-legend {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 12px;
  margin: 0 0 12px;
}

.teams-role-matrix-legend dt {
  font-weight: 700;
}

.teams-role-matrix-legend dd {
  margin: 0;
}

.teams-finance-category-row {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.teams-finance-category-row > :first-child {
  margin-right: auto;
}

.teams-role-matrix th,
.teams-role-matrix td {
  padding: 10px 9px;
  border-bottom: 1px solid rgba(23, 109, 89, 0.14);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.teams-role-matrix thead th {
  color: #176d59;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.teams-role-matrix td.is-empty {
  color: var(--muted, #64746c);
  text-align: center;
}

.teams-operation-card,
.teams-operation-subrecord,
.teams-operation-thread {
  display: grid;
  gap: 0.65rem;
}

.teams-operation-subrecord,
.teams-operation-thread {
  padding: 0.85rem;
  border: 1px solid rgba(23, 109, 89, 0.2);
  border-radius: 0.65rem;
  background: rgba(23, 109, 89, 0.04);
}

.teams-operation-status {
  width: fit-content;
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
  background: rgba(23, 109, 89, 0.1);
  white-space: nowrap;
}

.teams-operation-image-links,
.teams-operation-message-list {
  display: grid;
  gap: 0.45rem;
}

.teams-operation-image-links a {
  width: fit-content;
}

.teams-operation-publish-option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.teams-operation-publish-option input {
  flex: 0 0 auto;
  margin-top: 0.2rem;
}
.teams-sport-prominent-links {
  display: grid;
  gap: 12px;
}
.teams-sport-profile {
  display: grid;
  gap: 10px;
}
.teams-sport-profile-editor {
  margin-top: 2px;
}
.teams-sport-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0 0 4px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-y;
}
.teams-sport-tab {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(23, 109, 89, 0.2);
  border-radius: 999px;
  color: var(--accent, #176d59);
  background: transparent;
  font: inherit;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}
.teams-sport-tab:hover,
.teams-sport-tab:focus-visible,
.teams-sport-tab.is-active {
  color: #fff;
  background: var(--accent, #176d59);
  outline: 0;
}
[data-teams-sport-panel][hidden],
[data-spu-sport-panel][hidden] {
  display: none !important;
}
.teams-sport-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.teams-sport-link,
.teams-sport-season-link {
  color: var(--accent, #176d59);
  font-weight: 700;
  overflow-wrap: anywhere;
}
.teams-sport-link {
  display: inline-flex;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid rgba(23, 109, 89, 0.22);
  border-radius: 10px;
  background: rgba(23, 109, 89, 0.06);
}
.teams-sport-link-editor {
  margin-top: 4px;
}
.teams-sport-season-matrix {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-gutter: stable;
}
.teams-sport-season-matrix.has-many {
  max-height: min(60vh, 620px);
  overflow-y: auto;
}
.teams-sport-season-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}
.teams-sport-season-table th,
.teams-sport-season-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(23, 109, 89, 0.14);
  text-align: start;
  vertical-align: top;
}
.teams-sport-season-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted, #64746c);
  background: var(--surface, #fff);
  font-size: 0.86rem;
}
.teams-sport-season-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 3px 6px;
  border: 0;
  border-radius: 6px;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.teams-sport-season-sort:hover,
.teams-sport-season-sort:focus-visible {
  background: var(--accent-soft, #e6f1f3);
}
.teams-sport-season-table tbody th {
  min-width: 170px;
}
.teams-sport-season-table tbody th small {
  display: block;
  margin-top: 4px;
  color: var(--muted, #64746c);
  font-weight: 400;
}
.teams-sport-season-table .teams-detail-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.teams-sport-season-table td.teams-detail-card-actions,
table td.teams-detail-card-actions {
  position: relative;
  display: table-cell;
  width: 56px;
  min-width: 56px;
  text-align: right;
  vertical-align: top;
}
.teams-table-actions-menu {
  position: relative;
  display: inline-block;
  z-index: 5;
}
.teams-table-actions-menu[open] {
  z-index: 110;
}
.teams-table-actions-menu > summary {
  display: grid;
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  place-items: center;
  border: 1px solid rgba(23, 109, 89, 0.25);
  border-radius: 10px;
  color: var(--accent-strong, #176d59);
  background: var(--surface, #fff);
  cursor: pointer;
  font-size: 1.1rem;
  list-style: none;
}
.teams-table-actions-menu > summary::-webkit-details-marker {
  display: none;
}
.teams-table-actions-menu > summary:focus-visible {
  outline: 2px solid var(--accent-strong, #176d59);
  outline-offset: 2px;
}
.teams-table-actions-menu[open] > summary {
  background: var(--accent-soft, rgba(23, 109, 89, 0.12));
}
.teams-table-actions-menu > .teams-table-action-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: min(240px, calc(100vw - 42px));
  max-height: min(52vh, 320px);
  padding: 10px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(23, 109, 89, 0.24);
  border-radius: 12px;
  background: var(--surface, #fff);
  box-shadow: 0 12px 28px rgba(20, 45, 37, 0.2);
}
.teams-table-actions-menu > .teams-table-action-panel > .teams-inline-button {
  display: block;
  width: 100%;
  margin: 0;
  text-align: center;
}
.teams-table-actions-menu > .teams-table-action-panel > select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
}
.teams-table-row-menu-open {
  position: relative;
  z-index: 100;
}
.teams-group-record-table-scroll {
  max-width: 100%;
  max-height: min(62vh, 560px);
  overflow: auto;
  border: 1px solid var(--teams-nlr-border, #b9cfe0);
  border-radius: 12px;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}
.teams-group-record-table {
  min-width: 820px;
}
.teams-workspace-selection-table.teams-group-record-table tbody th {
  min-width: 11rem;
  white-space: normal;
  overflow-wrap: anywhere;
}
.teams-workspace-selection-table.teams-group-record-table
  tbody
  td:nth-child(2) {
  min-width: 8rem;
  white-space: nowrap;
}
.teams-workspace-selection-table.teams-group-record-table
  tbody
  td:nth-child(3) {
  min-width: 13rem;
  max-width: 24rem;
  white-space: normal;
  overflow-wrap: anywhere;
}
.teams-workspace-selection-table.teams-group-record-table
  td.teams-detail-card-actions {
  width: 54px;
  min-width: 54px;
  text-align: center;
}
.teams-group-member-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.teams-group-member-identity strong {
  overflow-wrap: anywhere;
}
.teams-group-member-email-conflict {
  color: #9b1c1c;
  font-weight: 800;
}
.teams-member-number-note {
  padding: 9px 12px;
  border: 1px solid var(--teams-nlr-border, #b9cfe0);
  border-radius: 10px;
  color: var(--teams-nlr-muted, #647b8e);
  background: color-mix(
    in srgb,
    var(--teams-nlr-accent, #176d8c) 7%,
    var(--teams-nlr-surface, #fff)
  );
}
.teams-group-record-table .teams-office-assignment-list {
  display: grid;
  gap: 5px;
  min-width: 13rem;
}
.teams-group-record-table .teams-office-assignment {
  display: grid;
  gap: 2px;
  padding-bottom: 5px;
  border-bottom: 1px solid
    color-mix(in srgb, var(--teams-nlr-border, #b9cfe0) 72%, transparent);
}
.teams-group-record-table .teams-office-assignment:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.teams-group-record-table .teams-office-assignment small {
  color: var(--teams-nlr-muted, #647b8e);
}
html[data-theme-mode='dark'] .teams-group-member-email-conflict {
  color: #ffaaaa;
}
html[data-theme-mode='dark'] .teams-sport-link {
  border-color: rgba(133, 212, 182, 0.24);
  background: rgba(91, 180, 153, 0.12);
}
html[data-theme-mode='dark'] .teams-sport-season-table thead th {
  background: var(--surface, #1d2522);
}

.teams-usage-filter-form {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  align-items: end;
}

.teams-usage-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.teams-usage-summary-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid rgba(23, 109, 89, 0.14);
  border-radius: 14px;
  background: rgba(23, 109, 89, 0.06);
}

.teams-usage-summary-card small {
  color: var(--muted, #64746c);
  font-size: 0.78rem;
  font-weight: 700;
}

.teams-usage-summary-card strong {
  overflow-wrap: anywhere;
  font-size: 1.15rem;
}

.teams-usage-table-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: auto;
  touch-action: pan-x pan-y;
}

.teams-usage-table-wrap.has-many {
  max-height: min(62vh, 620px);
  overflow-y: auto;
}

.teams-usage-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.teams-usage-table th,
.teams-usage-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(23, 109, 89, 0.12);
  text-align: left;
  vertical-align: top;
}

.teams-usage-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted, #64746c);
  background: var(--surface, #fff);
  font-size: 0.78rem;
  white-space: nowrap;
}

html[data-theme-mode='dark'] .teams-usage-summary-card {
  background: rgba(91, 180, 153, 0.12);
  border-color: rgba(133, 212, 182, 0.2);
}

html[data-theme-mode='dark'] .teams-usage-table th {
  background: var(--surface, #1d2522);
}

@media (max-width: 760px) {
  .teams-role-matrix-dialog {
    overflow: auto;
  }

  .teams-role-matrix {
    min-width: 720px;
  }
}

@media (max-width: 640px) {
  .teams-workspace-header {
    align-items: stretch;
    flex-direction: column;
  }

  .teams-workspace-header-actions {
    justify-content: flex-start;
  }

  .teams-workspace-item {
    min-height: 220px;
  }

  .teams-workspace-list {
    grid-template-columns: 1fr;
  }

  .teams-workspace-item-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .teams-workspace-item-actions .teams-inline-button-primary {
    flex: 1 1 auto;
  }

  .teams-workspace-lifecycle-actions {
    justify-content: stretch;
  }

  .teams-workspace-lifecycle-actions button {
    flex: 1 1 auto;
  }

  .teams-finance-category-row {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .teams-workspace-tools {
    grid-template-columns: 1fr;
  }
}

body.spu-near-native .teams-workspace-browser,
body.spu-near-native .teams-selected-workspace {
  margin: 18px 0;
  padding: 18px;
  border-radius: 20px;
}

body.spu-near-native .teams-workspace-list {
  max-height: 460px;
}

body.spu-near-native .teams-usage-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.spu-near-native .teams-usage-table-wrap.has-many {
  max-height: min(58vh, 560px);
}

@media (max-width: 640px) {
  .teams-usage-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .teams-usage-filter-form {
    grid-template-columns: 1fr;
  }
}

.teams-chat-reference-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.teams-chat-reference-button,
.teams-chat-reference-link {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.teams-chat-reference-summary {
  color: var(--muted, #64746c);
}

.teams-chat-references {
  display: grid;
  gap: 7px;
  margin-top: 4px;
  padding-top: 9px;
  border-top: 1px solid rgba(23, 109, 89, 0.12);
}

.teams-chat-reference-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.teams-chat-reference-link {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(23, 109, 89, 0.2);
  border-radius: 999px;
  color: #176d59;
  background: rgba(23, 109, 89, 0.06);
  font: inherit;
  cursor: pointer;
}

.teams-chat-reference-link:hover,
.teams-chat-reference-link:focus-visible {
  background: rgba(23, 109, 89, 0.14);
}

.teams-chat-reference-dialog,
.teams-chat-reference-picker-dialog {
  width: min(760px, calc(100vw - 24px));
  max-width: 760px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  color: var(--text, #24211c);
  background: var(--surface, #fff);
  box-shadow: 0 24px 80px rgba(31, 28, 20, 0.22);
}

.teams-chat-reference-dialog::backdrop,
.teams-chat-reference-picker-dialog::backdrop {
  background: rgba(15, 33, 28, 0.48);
  backdrop-filter: blur(4px);
}

.teams-chat-reference-dialog-content,
.teams-chat-reference-picker-content {
  display: grid;
  gap: 14px;
  max-height: min(90vh, 760px);
  overflow-y: auto;
  padding: clamp(18px, 4vw, 28px);
}

.teams-chat-reference-dialog-content h2,
.teams-chat-reference-picker-content h2 {
  margin: 0;
}

.teams-chat-reference-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.teams-chat-reference-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted, #64746c);
  font-size: 0.86rem;
  font-weight: 700;
}

.teams-chat-reference-filters input,
.teams-chat-reference-filters select {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid rgba(23, 109, 89, 0.2);
  border-radius: 10px;
  color: var(--text, #24211c);
  background: var(--surface, #fff);
  font: inherit;
}

.teams-chat-reference-picker-list {
  display: grid;
  gap: 8px;
  max-height: min(55vh, 520px);
  overflow-y: auto;
  padding: 2px 4px 4px 0;
  scrollbar-gutter: stable;
}

.teams-chat-reference-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(23, 109, 89, 0.14);
  border-radius: 12px;
  background: rgba(23, 109, 89, 0.035);
  cursor: pointer;
}

.teams-chat-reference-option:hover,
.teams-chat-reference-option:has(input:focus-visible) {
  border-color: rgba(23, 109, 89, 0.45);
}

.teams-chat-reference-option > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.teams-chat-reference-option small {
  color: var(--muted, #64746c);
  overflow-wrap: anywhere;
}

.teams-chat-reference-details {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 14px;
  margin: 0;
}

.teams-chat-reference-details dt {
  color: var(--muted, #64746c);
  font-weight: 700;
}

.teams-chat-reference-details dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.teams-chat-reference-links {
  display: grid;
  gap: 6px;
}

.teams-record-target {
  outline: 3px solid rgba(23, 109, 89, 0.55);
  outline-offset: 4px;
  animation: teams-record-target-pulse 2.4s ease-out;
}

@keyframes teams-record-target-pulse {
  0%,
  100% {
    outline-color: rgba(23, 109, 89, 0);
  }
  20% {
    outline-color: rgba(23, 109, 89, 0.7);
  }
}

html[data-theme-mode='dark'] .teams-chat-reference-dialog,
html[data-theme-mode='dark'] .teams-chat-reference-picker-dialog {
  color: var(--text, #edf5f0);
  background: var(--surface, #1d2522);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

html[data-theme-mode='dark'] .teams-chat-pin-dialog {
  color: var(--text, #edf5f0);
  background: var(--surface, #1d2522);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

html[data-theme-mode='dark'] .teams-chat-pin-badge,
html[data-theme-mode='dark'] .teams-chat-pin-choice {
  border-color: rgba(133, 212, 182, 0.22);
  background: rgba(91, 180, 153, 0.1);
}

html[data-theme-mode='dark'] .teams-chat-pin-badge {
  color: #9fe1c4;
}

html[data-theme-mode='dark'] .teams-chat-reference-link,
html[data-theme-mode='dark'] .teams-chat-reference-option {
  border-color: rgba(133, 212, 182, 0.22);
  background: rgba(91, 180, 153, 0.1);
}

@media (max-width: 640px) {
  .teams-chat-reference-filters {
    grid-template-columns: 1fr;
  }

  .teams-chat-reference-dialog,
  .teams-chat-reference-picker-dialog {
    width: calc(100vw - 16px);
  }

  .teams-chat-pin-dialog {
    width: calc(100vw - 16px);
  }

  .teams-chat-pin-badge {
    white-space: normal;
    text-align: end;
  }

  .teams-chat-reference-details {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .teams-chat-reference-details dd + dt {
    margin-top: 8px;
  }
}
.teams-pyramid-board-section,
.teams-pyramid-outside-section,
.teams-pyramid-challenges {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.teams-pyramid-board {
  display: grid;
  grid-template-columns: repeat(var(--pyramid-columns, 16), minmax(72px, 1fr));
  grid-auto-rows: minmax(76px, auto);
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px;
  border: 1px solid rgba(23, 109, 89, 0.14);
  border-radius: 14px;
  background: rgba(23, 109, 89, 0.04);
  scrollbar-width: thin;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  touch-action: pan-x pan-y;
}

.teams-pyramid-slot {
  display: grid;
  grid-column: var(--pyramid-grid-column, 1) / span 2;
  grid-row: var(--pyramid-row);
  align-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 76px;
  padding: 8px;
  border: 1px solid rgba(23, 109, 89, 0.2);
  border-radius: 12px;
  color: var(--text, #17352c);
  background: var(--surface, #fff);
  text-align: center;
}

.teams-pyramid-slot.is-empty {
  color: var(--muted, #64746c);
  border-style: dashed;
  background: rgba(23, 109, 89, 0.035);
}

.teams-pyramid-slot.is-row-1 {
  background: color-mix(in srgb, #e7bf63 24%, var(--surface, #fff));
}
.teams-pyramid-slot.is-row-2 {
  background: color-mix(in srgb, #b7c1cc 19%, var(--surface, #fff));
}
.teams-pyramid-slot.is-row-3 {
  background: color-mix(in srgb, #bd835b 17%, var(--surface, #fff));
}
.teams-pyramid-slot.is-row-4,
.teams-pyramid-slot.is-row-5 {
  background: var(--surface, #fff);
}
.teams-pyramid-slot.is-top {
  z-index: 1;
}
.teams-pyramid-slot-medal {
  display: inline-flex;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
}

.teams-pyramid-slot-position,
.teams-pyramid-slot-meta,
.teams-pyramid-outside-item small {
  color: var(--muted, #64746c);
}

.teams-pyramid-slot-content {
  min-width: 0;
  overflow-wrap: anywhere;
}

.teams-pyramid-outside-list,
.teams-pyramid-challenge-list {
  display: grid;
  gap: 8px;
  max-height: min(55vh, 560px);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: auto;
  touch-action: pan-y;
}

.teams-pyramid-protected-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.teams-pyramid-protected-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.teams-pyramid-protected-item > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.teams-pyramid-outside-item,
.teams-pyramid-challenge-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(23, 109, 89, 0.14);
  border-radius: 12px;
  background: rgba(23, 109, 89, 0.04);
}

.teams-pyramid-challenge-card p {
  margin: 0;
  overflow-wrap: anywhere;
}

.teams-pyramid-challenge-card .teams-detail-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

html[data-theme-mode='dark'] .teams-pyramid-board {
  border-color: rgba(133, 212, 182, 0.24);
  background: rgba(91, 180, 153, 0.08);
}

html[data-theme-mode='dark'] .teams-pyramid-slot {
  border-color: rgba(133, 212, 182, 0.24);
  background: var(--surface, #1d2522);
}

html[data-theme-mode='dark'] .teams-pyramid-slot.is-empty,
html[data-theme-mode='dark'] .teams-pyramid-outside-item,
html[data-theme-mode='dark'] .teams-pyramid-challenge-card {
  border-color: rgba(133, 212, 182, 0.18);
  background: rgba(91, 180, 153, 0.1);
}
html[data-theme-mode='dark'] .teams-pyramid-slot.is-row-1 {
  background: color-mix(in srgb, #d6b55c 20%, var(--surface, #1d2522));
}
html[data-theme-mode='dark'] .teams-pyramid-slot.is-row-2 {
  background: color-mix(in srgb, #aeb7c4 16%, var(--surface, #1d2522));
}
html[data-theme-mode='dark'] .teams-pyramid-slot.is-row-3 {
  background: color-mix(in srgb, #b77a50 16%, var(--surface, #1d2522));
}
html[data-theme-mode='dark'] .teams-pyramid-slot.is-row-4,
html[data-theme-mode='dark'] .teams-pyramid-slot.is-row-5 {
  background: var(--surface, #1d2522);
}

@media (max-width: 640px) {
  .teams-pyramid-board {
    grid-template-columns: repeat(
      var(--pyramid-columns, 16),
      minmax(64px, 1fr)
    );
    grid-auto-rows: minmax(68px, auto);
    gap: 6px;
    padding: 7px;
  }

  .teams-pyramid-slot {
    min-height: 68px;
    padding: 6px;
  }

  .teams-pyramid-slot.is-top {
    z-index: 1;
  }
}

.teams-usage-filter-form {
}

.gwf2-pyramid-test-launcher,
.gwf2-pyramid-test-section {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--accent, #176d59) 22%, transparent);
  border-radius: 12px;
  background: color-mix(
    in srgb,
    var(--accent, #176d59) 5%,
    var(--surface, #fff)
  );
}

.gwf2-pyramid-test-note {
  margin: 0;
  color: var(--muted, #64746c);
  overflow-wrap: anywhere;
}

.gwf2-pyramid-test-form,
.gwf2-pyramid-test-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.65rem;
}

.gwf2-pyramid-test-field {
  display: grid;
  min-width: min(230px, 100%);
  gap: 0.3rem;
  color: var(--muted, #64746c);
  font-size: 0.88rem;
  font-weight: 700;
}

.gwf2-pyramid-test-field input,
.gwf2-pyramid-test-field select {
  min-height: 38px;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border: 1px solid color-mix(in srgb, var(--accent, #176d59) 24%, transparent);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: var(--text, #24211c);
  font: inherit;
}

.gwf2-pyramid-test-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 0.45rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--accent, #176d59) 26%, transparent);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: var(--text, #24211c);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.gwf2-pyramid-test-button-primary {
  background: var(--accent, #176d59);
  color: #fff;
}

.gwf2-pyramid-test-button:disabled {
  cursor: progress;
  opacity: 0.6;
}

.gwf2-pyramid-test-board-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: auto;
  touch-action: pan-x pan-y;
}

.gwf2-pyramid-test-board {
  display: grid;
  grid-template-columns: repeat(var(--pyramid-columns, 1), minmax(76px, 1fr));
  grid-auto-rows: minmax(70px, auto);
  gap: 6px;
  width: max(100%, calc(var(--pyramid-columns, 1) * 82px));
  min-width: calc(var(--pyramid-columns, 1) * 82px);
  padding: 7px;
}

.gwf2-pyramid-test-slot {
  display: grid;
  grid-column: var(--pyramid-grid-column, 1) / span 2;
  grid-row: var(--pyramid-row);
  min-width: 0;
  min-height: 70px;
  align-content: center;
  gap: 0.2rem;
  padding: 0.45rem;
  border: 1px solid color-mix(in srgb, var(--accent, #176d59) 24%, transparent);
  border-radius: 9px;
  background: color-mix(
    in srgb,
    var(--accent, #176d59) 11%,
    var(--surface, #fff)
  );
  text-align: center;
}
.gwf2-pyramid-test-slot.is-row-1 {
  background: color-mix(in srgb, #e7bf63 24%, var(--surface, #fff));
}
.gwf2-pyramid-test-slot.is-row-2 {
  background: color-mix(in srgb, #b7c1cc 19%, var(--surface, #fff));
}
.gwf2-pyramid-test-slot.is-row-3 {
  background: color-mix(in srgb, #bd835b 17%, var(--surface, #fff));
}
.gwf2-pyramid-test-slot.is-row-4,
.gwf2-pyramid-test-slot.is-row-5 {
  background: var(--surface, #fff);
}
.gwf2-pyramid-test-slot.is-top {
  z-index: 1;
}
.gwf2-pyramid-test-medal {
  display: inline-flex;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
}

.gwf2-pyramid-test-slot strong,
.gwf2-pyramid-test-list-item,
.gwf2-pyramid-test-card strong {
  overflow-wrap: anywhere;
}

.gwf2-pyramid-test-scroll {
  display: grid;
  max-height: 28rem;
  gap: 0.45rem;
  overflow-y: auto;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: auto;
  touch-action: pan-y;
}

.gwf2-pyramid-test-list-item,
.gwf2-pyramid-test-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.6rem;
  border: 1px solid color-mix(in srgb, var(--accent, #176d59) 16%, transparent);
  border-radius: 8px;
  background: color-mix(
    in srgb,
    var(--accent, #176d59) 3%,
    var(--surface, #fff)
  );
}

.gwf2-pyramid-test-card small {
  color: var(--muted, #64746c);
}

html[data-theme-mode='dark'] .gwf2-pyramid-test-launcher,
html[data-theme-mode='dark'] .gwf2-pyramid-test-section {
  background: color-mix(in srgb, var(--surface, #17251f) 90%, #000);
}
html[data-theme-mode='dark'] .gwf2-pyramid-test-slot.is-row-1 {
  background: color-mix(in srgb, #d6b55c 20%, var(--surface, #17251f));
}
html[data-theme-mode='dark'] .gwf2-pyramid-test-slot.is-row-2 {
  background: color-mix(in srgb, #aeb7c4 16%, var(--surface, #17251f));
}
html[data-theme-mode='dark'] .gwf2-pyramid-test-slot.is-row-3 {
  background: color-mix(in srgb, #b77a50 16%, var(--surface, #17251f));
}
html[data-theme-mode='dark'] .gwf2-pyramid-test-slot.is-row-4,
html[data-theme-mode='dark'] .gwf2-pyramid-test-slot.is-row-5 {
  background: var(--surface, #17251f);
}

.teams-workspace-offices {
  margin-top: 14px;
}

.teams-office-card {
  gap: 8px;
}

.teams-office-assignment-list {
  display: grid;
  gap: 6px;
  padding: 8px 0 2px;
  border-top: 1px solid rgba(23, 109, 89, 0.14);
}

.teams-office-assignment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.teams-office-assignment small {
  white-space: nowrap;
}

.teams-member-office-summary {
  margin-top: 0.7rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(26, 111, 108, 0.22);
}

.teams-member-office-list {
  margin: 0.25rem 0 0.5rem;
  padding-left: 1.2rem;
}

.teams-office-create-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.teams-office-create-form h4,
.teams-office-create-form button {
  grid-column: 1 / -1;
}

@media (max-width: 680px) {
  .teams-office-assignment {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .teams-office-assignment small {
    grid-column: 1 / -1;
  }

  .teams-office-create-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .gwf2-pyramid-test-form,
  .gwf2-pyramid-test-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .gwf2-pyramid-test-field,
  .gwf2-pyramid-test-button {
    width: 100%;
  }

  .gwf2-pyramid-test-button {
    white-space: nowrap;
  }
}

/* Keep workspace headings and collapse actions on one top row. */
.teams-workspace-header {
  flex-wrap: nowrap;
}

.teams-workspace-header > :first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.teams-workspace-header-actions {
  flex: 0 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

.teams-workspace-header-actions > :is(button, a) {
  flex: 0 0 auto;
}

.teams-detail-section-heading {
  width: 100%;
  min-width: 0;
  align-items: flex-start;
  flex-wrap: nowrap;
}

.teams-detail-section-heading > .teams-detail-section-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.teams-detail-section-heading > button {
  flex: 0 0 auto;
  align-self: flex-start;
}

.teams-detail-section-heading > button:first-of-type {
  margin-left: auto;
}

@media (max-width: 640px) {
  .teams-workspace-header {
    flex-direction: row;
    align-items: flex-start;
  }

  .teams-workspace-header-actions {
    justify-content: flex-end;
    max-width: 100%;
  }
}

/* Teams browser actions use the same compact two-row contract as the shared
   group page: creation below, KI and collapse controls above, collapse right. */
.teams-workspace-browser .teams-workspace-header-actions {
  display: grid;
  grid-template-columns: auto auto;
  align-items: start;
  justify-content: end;
  gap: 8px;
  overflow: visible;
}

.teams-workspace-browser
  .teams-workspace-header-actions
  > [data-group-ai-fly-button] {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
}

.teams-workspace-browser
  .teams-workspace-header-actions
  > [data-teams-workspace-toggle] {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
}

.teams-workspace-browser
  .teams-workspace-header-actions
  > [data-teams-create-workspace] {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-self: end;
  width: max-content;
  max-width: 100%;
}

.teams-workspace-header > [data-group-ai-fly-button] {
  order: 1;
  flex: 0 0 auto;
}

.teams-workspace-header > [data-teams-selected-toggle],
.teams-workspace-header > [data-teams-demo-selected-toggle] {
  order: 2;
  flex: 0 0 auto;
  margin-left: 0;
}

/* NLR pilot: Sport follows the GUI-Studio Showcase standard layout. */
.teams-nlr-sport-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0 0 12px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid color-mix(in srgb, var(--accent, #176d8c) 24%, transparent);
  border-radius: 12px;
  background: color-mix(
    in srgb,
    var(--accent, #176d8c) 5%,
    var(--surface, #fff)
  );
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-y;
}
.teams-nlr-sport-tabs.is-tab-dragging {
  touch-action: pan-y;
  cursor: grabbing;
}
.teams-nlr-sport-tabs .teams-sport-tab.is-dragging {
  cursor: grabbing;
  opacity: 0.58;
  box-shadow: 0 0 0 2px
    color-mix(in srgb, var(--accent, #176d8c) 28%, transparent);
}
.teams-nlr-sport-tabs .teams-sport-tab {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid color-mix(in srgb, var(--accent, #176d8c) 24%, transparent);
  border-radius: 999px;
  background: var(--surface, #fff);
  color: var(--text, #163047);
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.teams-nlr-sport-tabs .teams-sport-tab.is-active {
  border-color: var(--accent, #176d8c);
  background: var(--accent, #176d8c);
  color: var(--accent-contrast, #fff);
}
.teams-nlr-sport-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent, #176d8c) 22%, transparent);
  border-radius: 14px;
  background: var(--surface, #fff);
  box-shadow: 0 3px 12px
    color-mix(in srgb, var(--text, #163047) 10%, transparent);
}
.teams-nlr-sport-panel > .teams-detail-section-title,
.teams-nlr-sport-panel > .teams-detail-section-heading > :is(h3, h4) {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}
.teams-nlr-sport-panel .teams-detail-section-heading,
.teams-nlr-sport-panel > .teams-detail-section-heading {
  align-items: flex-start;
  min-width: 0;
}
.teams-nlr-sport-panel .teams-inline-form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.teams-nlr-sport-panel table {
  min-width: 620px;
}
@media (max-width: 680px) {
  .teams-nlr-sport-panel {
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 12px;
  }
  .teams-nlr-sport-panel table {
    min-width: 560px;
  }
}

/* NLR Teams baseline: the workspace browser uses the same information-dense
   table contract as the GUI-Studio showcase.  Cards remain available only
   when the separately controlled presentation preference explicitly selects
   them. */
.teams-workspace-list:has(.teams-workspace-selection-table) {
  display: block;
  max-width: 100%;
  max-height: min(62vh, 560px);
  overflow: auto;
  padding: 2px 4px 4px 0;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.teams-workspace-selection-table {
  width: 100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--teams-nlr-text, #163047);
  background: var(--teams-nlr-surface, #fff);
}

.teams-workspace-selection-table th,
.teams-workspace-selection-table td {
  padding: 11px 13px;
  border-bottom: 1px solid
    color-mix(in srgb, var(--teams-nlr-border, #b9cfe0) 72%, transparent);
  text-align: left;
  vertical-align: top;
}

.teams-workspace-selection-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: color-mix(in srgb, var(--teams-nlr-text, #163047) 76%, transparent);
  background: var(--teams-nlr-surface, #fff);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.teams-workspace-selection-table tbody tr {
  position: relative;
  z-index: 0;
  transition: background-color 120ms ease;
}

.teams-workspace-selection-table tbody tr:hover,
.teams-workspace-selection-table tbody tr.is-selected {
  background: color-mix(
    in srgb,
    var(--teams-nlr-accent, #176d8c) 8%,
    transparent
  );
}

.teams-workspace-selection-table tbody tr.is-archived {
  opacity: 0.72;
}

.teams-workspace-selection-table tbody tr.teams-table-row-menu-open,
.teams-workspace-selection-table tbody tr.gwf2-table-row-menu-open {
  z-index: 100;
}

.teams-workspace-selection-table tbody th {
  min-width: 12rem;
  font-weight: 700;
}

.teams-workspace-selection-table tbody td:nth-child(2) {
  min-width: 8rem;
  white-space: nowrap;
}

.teams-workspace-selection-table tbody td:nth-child(3) {
  min-width: 13rem;
  max-width: 24rem;
  overflow-wrap: anywhere;
}

.teams-workspace-selection-table tbody td:nth-child(4),
.teams-workspace-selection-table tbody td:nth-child(5) {
  white-space: nowrap;
}

.teams-workspace-selection-table tbody td:nth-child(6) {
  min-width: 10rem;
  white-space: nowrap;
}

.teams-group-record-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.teams-group-record-table-scroll:has(
  > .teams-group-members-table tbody > tr:nth-child(9)
),
.teams-group-record-table-scroll:has(
  > .teams-group-offices-table tbody > tr:nth-child(9)
),
.teams-group-record-table-scroll:has(
  > .teams-group-invitations-table tbody > tr:nth-child(9)
) {
  max-height: min(65vh, 29rem);
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.teams-office-member-picker {
  width: 100%;
  min-width: 0;
}

.teams-office-member-picker > summary {
  display: block;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  cursor: pointer;
  list-style: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teams-office-member-picker > summary::-webkit-details-marker {
  display: none;
}

.teams-office-member-options {
  display: grid;
  gap: 4px;
  margin-top: 5px;
  padding: 4px;
  border: 1px solid var(--teams-nlr-border, #b9cfe0);
  border-radius: 9px;
  background: var(--teams-nlr-surface, #fff);
}

.teams-office-member-options.has-many {
  max-height: min(42vh, 19rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.teams-office-member-options > button {
  width: 100%;
  min-height: 34px;
  text-align: start;
}

.teams-workspace-selection-table td.teams-detail-card-actions {
  position: relative;
  width: 54px;
  min-width: 54px;
  text-align: right;
  white-space: nowrap;
}

.teams-gallery-contact-dialog {
  width: min(640px, calc(100vw - 28px));
  max-width: 640px;
  max-height: min(84vh, 760px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--teams-nlr-border, #b9cfe0);
  border-radius: 16px;
  color: var(--teams-nlr-text, #163047);
  background: var(--teams-nlr-surface, #fff);
  box-shadow: 0 20px 48px
    color-mix(in srgb, var(--teams-nlr-text, #163047) 22%, transparent);
}

.teams-gallery-contact-dialog::backdrop {
  background: color-mix(in srgb, #07131c 56%, transparent);
}

.teams-gallery-contact-dialog-content {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 4vw, 28px);
}

.teams-gallery-contact-dialog-content h2,
.teams-gallery-contact-dialog-content h3,
.teams-gallery-contact-dialog-content p {
  margin: 0;
}

.teams-gallery-contact-dialog-meta {
  display: grid;
  grid-template-columns: minmax(100px, 150px) minmax(0, 1fr);
  gap: 8px 14px;
  margin: 0;
}

.teams-gallery-contact-dialog-meta dt {
  color: color-mix(in srgb, var(--teams-nlr-text, #163047) 68%, transparent);
  font-weight: 700;
}

.teams-gallery-contact-dialog-meta dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.teams-gallery-contact-dialog-message {
  display: grid;
  gap: 8px;
}

.teams-gallery-contact-dialog-message p {
  max-height: min(48vh, 420px);
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--teams-nlr-border, #b9cfe0);
  border-radius: 12px;
  background: color-mix(in srgb, var(--teams-nlr-accent, #176d8c) 5%, #fff);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.teams-gallery-contact-dialog-content > button {
  justify-self: end;
}

.teams-gallery-contact-archive {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--teams-nlr-border, #b9cfe0);
  border-radius: 12px;
  background: var(--teams-nlr-surface-alt, #f4f8f8);
}

.teams-gallery-contact-archive > summary {
  cursor: pointer;
  font-weight: 700;
}

/* The shared table-menu runtime promotes an open panel to a viewport-fixed
   overlay so table overflow containers never clip the available actions. */
.teams-workspace-selection-table .teams-table-actions-menu,
.teams-workspace-selection-table .gwf2-table-actions-menu {
  position: relative;
  display: inline-block;
  z-index: 5;
}

.teams-workspace-selection-table
  :is(.teams-table-actions-menu, .gwf2-table-actions-menu)[open] {
  z-index: 110;
}

.teams-workspace-selection-table
  :is(.teams-table-actions-menu, .gwf2-table-actions-menu)
  > summary {
  display: grid;
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  place-items: center;
  border: 1px solid
    color-mix(
      in srgb,
      var(--teams-nlr-accent, #176d8c) 30%,
      var(--teams-nlr-border, #b9cfe0)
    );
  border-radius: 10px;
  color: var(--teams-nlr-accent, #176d8c);
  background: var(--teams-nlr-surface, #fff);
  cursor: pointer;
  font-size: 1.1rem;
  list-style: none;
}

.teams-workspace-selection-table
  :is(.teams-table-actions-menu, .gwf2-table-actions-menu)
  > summary::-webkit-details-marker {
  display: none;
}

.teams-workspace-selection-table
  :is(.teams-table-actions-menu, .gwf2-table-actions-menu)[open]
  > summary {
  background: color-mix(
    in srgb,
    var(--teams-nlr-accent, #176d8c) 12%,
    var(--teams-nlr-surface, #fff)
  );
}

.teams-workspace-selection-table
  :is(.teams-table-actions-menu, .gwf2-table-actions-menu)
  > :is(
    .teams-table-action-panel,
    .teams-detail-card-actions,
    .gwf2-table-action-panel
  ) {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: min(220px, calc(100vw - 32px));
  max-height: min(52vh, 320px);
  margin: 0;
  padding: 10px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid
    color-mix(
      in srgb,
      var(--teams-nlr-accent, #176d8c) 28%,
      var(--teams-nlr-border, #b9cfe0)
    );
  border-radius: 12px;
  background: var(--teams-nlr-surface, #fff);
  box-shadow: 0 12px 28px
    color-mix(in srgb, var(--teams-nlr-text, #163047) 20%, transparent);
}

.teams-workspace-selection-table
  :is(.teams-table-actions-menu, .gwf2-table-actions-menu)
  > :is(
    .teams-table-action-panel,
    .teams-detail-card-actions,
    .gwf2-table-action-panel
  )
  > :is(button, a) {
  width: 100%;
  max-width: none;
}

@media (max-width: 680px) {
  .teams-workspace-selection-table:not(.teams-group-record-table) {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .teams-workspace-selection-table.teams-group-record-table {
    min-width: 820px;
  }

  .teams-workspace-selection-table th,
  .teams-workspace-selection-table td {
    padding: 9px 10px;
  }
  .teams-workspace-selection-table:not(.teams-group-record-table)
    th:nth-child(3),
  .teams-workspace-selection-table:not(.teams-group-record-table)
    td:nth-child(3),
  .teams-workspace-selection-table:not(.teams-group-record-table)
    th:nth-child(5),
  .teams-workspace-selection-table:not(.teams-group-record-table)
    td:nth-child(5),
  .teams-workspace-selection-table:not(.teams-group-record-table)
    th:nth-child(6),
  .teams-workspace-selection-table:not(.teams-group-record-table)
    td:nth-child(6) {
    display: none;
  }
  .teams-workspace-selection-table:not(.teams-group-record-table) th,
  .teams-workspace-selection-table:not(.teams-group-record-table) td {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .teams-workspace-selection-table:not(.teams-group-record-table) tbody th,
  .teams-workspace-selection-table:not(.teams-group-record-table)
    td:nth-child(2),
  .teams-workspace-selection-table:not(.teams-group-record-table)
    td:nth-child(4) {
    min-width: 0;
  }
  .teams-workspace-selection-table:not(.teams-group-record-table)
    td.teams-detail-card-actions {
    width: 48px;
    min-width: 48px;
    padding-inline: 4px;
    text-align: center;
  }

  .teams-workspace-list:has(.teams-gallery-contact-requests-table) {
    max-height: none;
    overflow: visible;
    padding: 0;
  }

  .teams-workspace-selection-table.teams-gallery-contact-requests-table {
    display: block;
    width: 100%;
    min-width: 0;
    table-layout: auto;
    border-spacing: 0;
  }

  .teams-gallery-contact-requests-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .teams-gallery-contact-requests-table tbody {
    display: grid;
    gap: 8px;
  }

  .teams-gallery-contact-requests-table tbody tr {
    display: grid;
    grid-template-areas:
      'gallery actions'
      'date actions'
      'message message';
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 5px 10px;
    padding: 11px;
    border: 1px solid var(--teams-nlr-border, #b9cfe0);
    border-radius: 12px;
  }

  .teams-gallery-contact-requests-table tbody th:first-child,
  .teams-gallery-contact-requests-table tbody td {
    display: block;
    width: auto;
    min-width: 0;
    max-width: 100%;
    padding: 0;
    border: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .teams-gallery-contact-requests-table tbody th:first-child {
    grid-area: gallery;
    align-self: center;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .teams-gallery-contact-requests-table tbody td:nth-child(2) {
    grid-area: date;
    color: color-mix(in srgb, var(--teams-nlr-text, #163047) 68%, transparent);
    font-size: 0.88rem;
  }

  .teams-gallery-contact-requests-table tbody td:nth-child(2)::before {
    content: attr(data-label) ' · ';
    font-weight: 700;
  }

  .teams-gallery-contact-requests-table tbody td:nth-child(3),
  .teams-gallery-contact-requests-table tbody td:nth-child(5) {
    display: none;
  }

  .teams-gallery-contact-requests-table tbody td:nth-child(4) {
    grid-area: message;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: color-mix(in srgb, var(--teams-nlr-text, #163047) 78%, transparent);
    font-size: 0.9rem;
    text-overflow: ellipsis;
  }

  .teams-gallery-contact-requests-table tbody td:nth-child(4)::before {
    content: attr(data-label) ' · ';
    font-weight: 700;
  }

  .teams-workspace-selection-table.teams-gallery-contact-requests-table
    tbody
    td.teams-detail-card-actions {
    grid-area: actions;
    display: block;
    justify-self: end;
    align-self: start;
    width: 44px;
    min-width: 44px;
    padding: 0;
    text-align: right;
  }
}
