/* Team · Hybrid Concept B — presentation only over existing Team APIs. */
.teb-frame {
  --teb-hero-min-height: 9.75rem;
  --teb-panel-padding: 1.25rem;
  --teb-touch-target: 2.75rem;
  --teb-avatar-size: 2.75rem;
  --teb-icon-box: 2.5rem;
  --teb-type-hero: var(--mcb-type-management-hero);
  --teb-type-title: var(--mcb-type-panel-title);
  --teb-type-body: var(--mcb-type-control);
  --teb-type-meta: var(--mcb-type-meta);
  --teb-type-label: var(--mcb-type-label);
  --teb-leading-copy: var(--mcb-leading-management-copy);
  --teb-leading-tight: var(--mcb-leading-panel);
  --teb-tracking-label: var(--mcb-tracking-management-label);
  --teb-copy-max: 38rem;
}
.teb-layout { align-items: start; }
.teb-center { min-width: 0; }
.teb-shell .sr-only { position: absolute; width: .0625rem; height: .0625rem; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.teb-hero,
.teb-summary,
.teb-panel,
.teb-invite {
  border: var(--mcb-border-width) solid var(--border-subtle);
  border-radius: var(--r-card);
  background: color-mix(in srgb, var(--surface-1-solid) 88%, transparent);
  box-shadow: var(--panel-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.teb-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-5);
  min-height: var(--teb-hero-min-height);
  padding: var(--space-6);
  background: radial-gradient(70% 120% at 100% 0%, color-mix(in srgb, var(--icon-blue) 12%, transparent), transparent 72%), color-mix(in srgb, var(--surface-1-solid) 88%, transparent);
}
.teb-eyebrow,
.teb-panel-head > div > span,
.teb-access-card > span,
.teb-seat-card > span {
  color: var(--icon-blue);
  font-size: var(--teb-type-label);
  font-weight: 700;
  letter-spacing: var(--teb-tracking-label);
  text-transform: uppercase;
}
.teb-hero h1 { margin: var(--space-2) 0 0; font: 700 var(--teb-type-hero)/var(--mcb-leading-hero) "Manrope", var(--font-sans); letter-spacing: var(--mcb-tracking-hero); }
.teb-hero p { max-width: var(--teb-copy-max); margin: var(--space-2) 0 0; color: var(--text-secondary); font-size: var(--mcb-type-body); line-height: var(--teb-leading-copy); text-wrap: pretty; }
.teb-invite-open { flex: none; min-height: var(--teb-touch-target); }

.teb-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; }
.teb-summary > div { min-width: 0; padding: var(--space-4); }
.teb-summary > div + div { border-left: var(--mcb-border-width) solid var(--border-subtle); }
.teb-summary strong,
.teb-summary span,
.teb-summary small { display: block; }
.teb-summary strong { font: 700 var(--mcb-type-summary-value)/var(--mcb-leading-summary-value) "Manrope", var(--font-sans); }
.teb-summary span { margin-top: var(--space-2); font-size: var(--teb-type-body); font-weight: 700; }
.teb-summary small { margin-top: var(--space-1); color: var(--text-muted); font-size: var(--teb-type-label); line-height: var(--teb-leading-tight); }

.teb-panel,
.teb-invite { min-width: 0; padding: var(--teb-panel-padding); }
.teb-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-4); }
.teb-panel-head h2 { margin: var(--space-1) 0 0; font: 700 var(--teb-type-title)/var(--teb-leading-tight) "Manrope", var(--font-sans); }
.teb-panel-head > small { color: var(--text-muted); font-size: var(--teb-type-meta); }
.teb-member-list,
.teb-pending-list { display: grid; gap: var(--space-2); margin-top: var(--space-4); }
.teb-member {
  display: grid;
  grid-template-columns: minmax(12rem, 1.05fr) minmax(20rem, 1.7fr) auto;
  gap: var(--space-4);
  align-items: center;
  min-width: 0;
  padding: var(--space-3);
  border: var(--mcb-border-width) solid var(--border-subtle);
  border-radius: var(--r-control);
  background: color-mix(in srgb, var(--surface-2) 28%, transparent);
}
.teb-member-person { display: grid; grid-template-columns: var(--teb-avatar-size) minmax(0, 1fr); gap: var(--space-3); align-items: center; min-width: 0; }
.teb-avatar { display: grid; width: var(--teb-avatar-size); height: var(--teb-avatar-size); place-items: center; border-radius: var(--mcb-radius-tab); background: color-mix(in srgb, var(--icon-blue) 12%, var(--surface-2)); color: var(--icon-blue); font-weight: 800; }
.teb-member-person b,
.teb-member-person small { display: block; min-width: 0; }
.teb-member-person b { overflow: hidden; font-size: var(--teb-type-body); text-overflow: ellipsis; white-space: nowrap; }
.teb-member-person small { margin-top: var(--space-1); color: var(--text-muted); font-size: var(--teb-type-label); }
.teb-member-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); min-width: 0; }
.teb-member-meta span { min-width: 0; }
.teb-member-meta small,
.teb-member-meta b { display: block; }
.teb-member-meta small { color: var(--text-muted); font-size: var(--teb-type-label); }
.teb-member-meta b { margin-top: var(--space-1); overflow: hidden; font-size: var(--teb-type-meta); text-overflow: ellipsis; white-space: nowrap; }
.teb-member-meta b.is-active { color: var(--success); }
.teb-member-meta b.is-suspended { color: var(--warning); }
.teb-member-actions { display: flex; justify-content: flex-end; gap: var(--space-2); align-items: center; min-width: 0; }
.teb-member-actions .field { min-width: 7.5rem; padding-block: var(--space-2); font-size: var(--teb-type-meta); }
.teb-member-actions .btn { min-height: var(--teb-touch-target); }
.teb-role { padding: var(--space-2) var(--space-3); border: var(--mcb-border-width) solid var(--border-subtle); border-radius: var(--r-chip); color: var(--text-secondary); font-size: var(--teb-type-meta); font-weight: 700; }

.teb-invite > p { max-width: var(--teb-copy-max); margin: var(--space-3) 0 0; color: var(--text-muted); font-size: var(--teb-type-body); line-height: var(--teb-leading-copy); }
.teb-invite form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(8rem, 11rem) auto; gap: var(--space-3); align-items: end; margin-top: var(--space-4); }
.teb-invite form label { display: grid; gap: var(--space-2); min-width: 0; color: var(--text-secondary); font-size: var(--teb-type-meta); font-weight: 700; }
.teb-invite form .field { width: 100%; min-width: 0; }
.teb-invite form .btn { min-height: var(--teb-touch-target); }
.teb-invite-result { margin-top: var(--space-4); padding: var(--space-4); border: var(--mcb-border-width) solid color-mix(in srgb, var(--success) 32%, var(--border-subtle)); border-radius: var(--r-control); background: color-mix(in srgb, var(--success) 6%, var(--surface-2)); }
.teb-invite-result strong,
.teb-invite-result small,
.teb-invite-result code { display: block; }
.teb-invite-result small { margin-top: var(--space-2); color: var(--text-secondary); line-height: var(--teb-leading-copy); }
.teb-invite-result code { margin-top: var(--space-2); padding: var(--space-2); overflow-wrap: anywhere; border-radius: var(--r-control); background: var(--bg-deep); color: var(--text-primary); user-select: all; }
.teb-invite-result > div { display: flex; gap: var(--space-2); margin-top: var(--space-3); }

.teb-pending { display: grid; grid-template-columns: var(--teb-icon-box) minmax(0, 1fr) auto; gap: var(--inset-gap); align-items: center; min-width: 0; padding: var(--inset-padding); border: var(--mcb-border-width) solid var(--inset-border); border-radius: var(--inset-radius); background: var(--inset-surface); box-shadow: var(--inset-shadow); }
.teb-pending-icon { display: grid; width: var(--teb-icon-box); height: var(--teb-icon-box); place-items: center; border-radius: var(--mcb-radius-tab); background: color-mix(in srgb, var(--icon-violet) 9%, var(--surface-1)); color: var(--icon-violet); }
.teb-pending-icon .ui-icon { width: 1rem; height: 1rem; }
.teb-pending b,
.teb-pending small { display: block; min-width: 0; }
.teb-pending b { overflow-wrap: anywhere; font-size: var(--teb-type-body); }
.teb-pending small { margin-top: var(--space-1); color: var(--text-muted); font-size: var(--teb-type-label); }
.teb-pending .btn { min-height: var(--teb-touch-target); }
.teb-empty { display: grid; justify-items: center; padding: var(--space-8) var(--space-5); text-align: center; }
.teb-empty > .ui-icon { width: var(--teb-icon-box); height: var(--teb-icon-box); color: var(--icon-blue); }
.teb-empty strong { margin-top: var(--space-3); }
.teb-empty p { margin: var(--space-2) 0 0; color: var(--text-muted); font-size: var(--teb-type-body); }

.teb-access-card strong,
.teb-seat-card strong { display: block; margin-top: var(--space-2); overflow-wrap: anywhere; font: 700 var(--mcb-type-body)/var(--mcb-leading-panel) "Manrope", var(--font-sans); }
.teb-access-card small,
.teb-seat-card small { display: block; margin-top: var(--space-1); color: var(--text-muted); font-size: var(--teb-type-label); line-height: var(--teb-leading-copy); }
.teb-seat-card > span { color: var(--icon-violet); }
.teb-shell :is(.teb-invite-open, .teb-member-actions .btn, .teb-member-actions .field, .teb-invite .btn, .teb-invite .field, .teb-pending .btn, .mcb-eva-mark, .mcb-suggested button):focus-visible { outline: var(--mcb-focus-width) solid var(--focus-ring); outline-offset: var(--mcb-focus-width); }
html.reduce-transparency :is(.teb-hero, .teb-summary, .teb-panel, .teb-invite) { background: var(--surface-1-solid); backdrop-filter: none; -webkit-backdrop-filter: none; }

@media (max-width: 1180px) {
  .teb-member { grid-template-columns: minmax(12rem, 1fr) minmax(14rem, 1.25fr); }
  .teb-member-actions { grid-column: 2; justify-content: flex-start; }
  .teb-member-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .teb-frame { padding-top: var(--space-2); padding-bottom: calc(var(--space-10) * 2); }
  .teb-hero { min-height: 0; padding: var(--space-5) var(--space-4); }
  .teb-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .teb-summary > div + div { border-left: 0; }
  .teb-summary > div:nth-child(even) { border-left: var(--mcb-border-width) solid var(--border-subtle); }
  .teb-summary > div:nth-child(n + 3) { border-top: var(--mcb-border-width) solid var(--border-subtle); }
  .teb-panel,
  .teb-invite { padding: var(--space-4); }
  .teb-member { grid-template-columns: minmax(0, 1fr); }
  .teb-member-meta,
  .teb-member-actions { grid-column: 1; }
  .teb-invite form { grid-template-columns: minmax(0, 1fr); }
  .teb-invite form .btn { width: 100%; }
}
@media (max-width: 480px) {
  .teb-hero { display: grid; }
  .teb-invite-open { width: 100%; }
  .teb-member-meta { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .teb-member-actions { display: grid; }
  .teb-member-actions label,
  .teb-member-actions .field,
  .teb-member-actions .btn { width: 100%; }
  .teb-pending { grid-template-columns: var(--teb-icon-box) minmax(0, 1fr); }
  .teb-pending .btn { grid-column: 2; width: 100%; }
  .teb-invite-result > div { display: grid; }
  .teb-invite-result .btn { width: 100%; }
  .teb-shell .mcb-eva .eva-chat-btn { width: var(--teb-touch-target); height: var(--teb-touch-target); }
}
