.team-shell {
  min-height: 100vh;
  padding: 86px 28px 48px;
  background: var(--surface-alt);
}
.team-container { width: min(100%, 1200px); margin: 0 auto; }
.team-hero {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 24px; margin-bottom: 24px;
}
.team-hero h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: 6px; }
.team-hero p { color: var(--muted); margin-bottom: 0; }
.team-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.role-badge { text-transform: capitalize; }
.team-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 18px; align-items: start; }
.team-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 22px; box-shadow: var(--shadow-sm);
}
.team-card h2 { font-size: 1.18rem; letter-spacing: 0; margin-bottom: 6px; }
.team-card > p { color: var(--muted); }
.invite-result {
  margin-top: 18px; border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; background: var(--surface-alt);
}
.invite-link-row { display: flex; gap: 8px; align-items: center; }
.invite-link-row .input { min-width: 0; }
.team-section { margin-top: 20px; }
.team-section-head {
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
  margin-bottom: 12px;
}
.team-section-head h2 { font-size: 1.12rem; letter-spacing: 0; margin: 0; }
.team-table-wrap {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  overflow: auto;
}
.team-table { min-width: 820px; }
.team-table td { vertical-align: middle; }
.team-role-select { width: 130px; min-height: 38px; padding: 7px 9px; }
.member-name { font-weight: 700; }
.member-email { color: var(--muted); font-size: .82rem; }
.permission-list { display: grid; gap: 10px; margin-top: 16px; }
.permission-row {
  display: grid; grid-template-columns: 92px 1fr; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.permission-row:last-child { border-bottom: 0; }
.permission-row strong { text-transform: capitalize; }
.accept-shell {
  min-height: 100vh; display: grid; place-items: center; padding: 28px;
  background: linear-gradient(180deg, var(--surface), var(--surface-alt));
}
.accept-card {
  width: min(100%, 620px); background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 34px; box-shadow: var(--shadow-md);
}
.accept-icon {
  width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-size: 1.5rem; font-weight: 800;
  margin-bottom: 22px;
}
.readonly-banner {
  padding: 8px 12px; border-radius: 8px; background: rgba(178,94,0,.12);
  color: var(--warning); font-weight: 700; font-size: .82rem;
}
@media (max-width: 850px) {
  .team-grid { grid-template-columns: 1fr; }
  .team-hero { display: block; }
  .team-controls { margin-top: 16px; }
}
@media (max-width: 600px) {
  .team-shell { padding: 78px 16px 34px; }
  .invite-link-row { display: grid; }
  .accept-card { padding: 26px 20px; }
}
