.team-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 16px; align-items: start; }
.team-surface { min-width: 0; padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.team-surface h2 { margin-bottom: 12px; }
.team-heading, .team-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 14px; }
.team-heading { justify-content: space-between; margin-bottom: 12px; }
.team-heading h2 { margin: 0; }
.team-list, .team-members { list-style: none; padding: 0; margin: 0; }
.team-list button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; padding: 9px 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; text-align: start; }
.team-list button:hover { background: var(--raised); }
.team-list button[aria-pressed="true"] { background: var(--accent-bg); border-color: var(--accent-line); }
.team-list span, .team-members small { color: var(--muted); font-size: 12px; }
.team-members strong, .team-list strong { overflow-wrap: anywhere; }
.team-invite, .team-invitation, .team-members form { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.team-invite label, .team-invitation label { flex: 1 1 180px; min-width: 0; }
.team-invitation { margin-top: 12px; }
.team-members li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.team-members li:first-child { margin-top: 14px; }
.team-members small { display: block; }
.team-editor-surface { margin-top: 16px; }
.team-editor { display: grid; gap: 16px; }
.team-editor > .field { max-width: 360px; }
.team-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.team-permissions { margin: 0; min-inline-size: 0; padding: 9px 0 0; border: 0; border-top: 1px solid var(--line); }
.team-permissions legend { padding-inline-end: 8px; font-weight: 650; font-size: 14px; }
.team-check-list { display: flex; flex-wrap: wrap; gap: 0 16px; }
.team-check { display: flex; align-items: center; gap: 9px; min-height: 32px; font-size: 14px; }
.team-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.team-actions { justify-content: end; }
.team-message, .team-error { margin-bottom: 10px; font-size: 14px; }
.team-message { color: var(--online); }
.team-error { color: var(--error); }
.team-dialog { width: min(500px, calc(100% - 24px)); }
.team-dialog .dialog-heading { margin-bottom: 12px; }
.team-dialog .team-actions { margin-top: 15px; }
#team-preview-exit { align-self: center; margin: 12px 0 0; }
@media (max-width: 720px) {
  .team-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 460px) {
  .team-grid { grid-template-columns: minmax(0, 1fr); }
  .team-permissions { padding-block: 6px 0; }
  .team-check { min-height: 42px; }
}
