.team-page {
  padding-left: 68px;
}

.team-page .home-shell {
  max-width: 1680px;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1rem;
}

.team-page .home-main {
  padding-left: 0;
}

.team-page .home-main {
  gap: 1rem;
}

.team-main {
  display: grid;
  gap: 1rem;
}

.team-page .home-topbar {
  border-bottom: 1px solid #dbe3ef;
  background: rgba(247, 249, 252, 0.88);
  backdrop-filter: blur(18px);
}

.team-page .home-topbar-inner {
  max-width: 1680px;
  padding-inline: 1rem;
}

.team-hero {
  border-radius: 20px;
  border-bottom: 1px solid var(--hero-border);
}

.team-hero-layout {
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.95fr);
}

.team-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.72rem;
}

@media (max-width: 980px) {
  .team-page {
    padding-left: 0;
  }
}

.team-summary-card {
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  border-radius: 16px;
  padding: 0.88rem 0.9rem;
  box-shadow: 0 12px 24px rgba(18, 32, 54, 0.06);
}

.team-summary-card span {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.team-summary-card strong {
  display: block;
  margin-top: 0.34rem;
  font-size: 1.55rem;
  font-family: "Sora", sans-serif;
  color: var(--ink);
  line-height: 1.1;
}

.team-access-guard.hidden,
.invite-result-card.hidden {
  display: none;
}

.team-stage {
  display: grid;
  gap: 1rem;
}

.team-stage.hidden {
  display: none;
}

.team-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.05fr) minmax(280px, 0.95fr);
  gap: 1rem;
}

.team-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(168, 187, 216, 0.38);
  border-radius: 18px;
  box-shadow: 0 12px 24px rgba(18, 32, 54, 0.08);
  padding: 1rem;
}

.team-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.9rem;
}

.team-panel-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  font-weight: 800;
  color: #59749c;
}

.team-panel-head h3,
.access-panel h3 {
  margin: 0.28rem 0 0;
  font-size: 1.05rem;
  font-family: "Sora", sans-serif;
  color: #173250;
}

.team-head-note,
.access-panel p {
  color: #5c6f86;
  font-size: 0.88rem;
  line-height: 1.5;
}

.team-form {
  display: grid;
  gap: 0.8rem;
}

.team-field {
  display: grid;
  gap: 0.36rem;
  color: #27415f;
  font-size: 0.9rem;
  font-weight: 700;
}

.team-field input,
.team-field select {
  border: 1px solid rgba(145, 166, 199, 0.52);
  background: #f8fbff;
  border-radius: 12px;
  padding: 0.78rem 0.9rem;
  font: inherit;
  color: #173250;
}

.team-field input:focus,
.team-field select:focus {
  outline: none;
  border-color: rgba(60, 103, 176, 0.8);
  box-shadow: 0 0 0 3px rgba(89, 132, 215, 0.16);
}

.team-message {
  min-height: 1.3rem;
  margin: 0.8rem 0 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #6a1f30;
}

.team-message.is-success {
  color: #15623b;
}

.invite-result-card {
  margin-top: 0.9rem;
  border-radius: 16px;
  border: 1px solid rgba(130, 167, 209, 0.42);
  background: linear-gradient(180deg, #f3f8ff, #ecf4ff);
  padding: 0.95rem;
}

.invite-result-card strong {
  display: block;
  margin-top: 0.32rem;
  font-size: 1rem;
  color: #183559;
}

.invite-result-card p {
  margin: 0.24rem 0 0.7rem;
  color: #4e6684;
}

.invite-link-field input {
  font-size: 0.84rem;
}

.team-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.role-guide-grid {
  display: grid;
  gap: 0.72rem;
}

.support-quick-invite {
  margin-top: 0.9rem;
  border-top: 1px solid rgba(178, 196, 222, 0.45);
  padding-top: 0.9rem;
}

.support-quick-invite strong {
  display: block;
  margin-top: 0.3rem;
  color: #173250;
  font-family: "Sora", sans-serif;
}

.support-quick-invite p:last-of-type {
  margin: 0.34rem 0 0.8rem;
  color: #5a6d85;
  line-height: 1.5;
  font-size: 0.9rem;
}

.support-invite-form {
  display: grid;
  gap: 0.7rem;
}

.role-guide-card {
  border: 1px solid rgba(171, 190, 219, 0.38);
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff, #f5f9ff);
  padding: 0.82rem 0.9rem;
}

.role-guide-card strong {
  color: #173250;
  font-family: "Sora", sans-serif;
}

.role-guide-card p {
  margin: 0.36rem 0 0;
  color: #5a6d85;
  line-height: 1.5;
  font-size: 0.9rem;
}

.team-list {
  display: grid;
  gap: 0.75rem;
}

.team-list-empty {
  border: 1px dashed rgba(162, 182, 210, 0.65);
  border-radius: 15px;
  padding: 1rem;
  text-align: center;
  color: #62768e;
  background: #fbfdff;
}

.team-card {
  display: grid;
  gap: 0.6rem;
  border: 1px solid rgba(173, 190, 214, 0.44);
  border-radius: 15px;
  background: #fbfdff;
  padding: 0.9rem 0.95rem;
}

.team-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
}

.team-card-name {
  margin: 0;
  font-size: 1rem;
  color: #173250;
  font-family: "Sora", sans-serif;
}

.team-card-email {
  margin: 0.24rem 0 0;
  color: #5a6d85;
  font-size: 0.9rem;
  word-break: break-word;
}

.team-role-chip,
.team-state-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.34rem 0.68rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.team-role-chip {
  background: rgba(53, 102, 189, 0.1);
  color: #27539a;
}

.team-state-chip {
  background: rgba(23, 119, 66, 0.1);
  color: #177743;
}

.team-state-chip.pending {
  background: rgba(186, 124, 15, 0.12);
  color: #8b5a0b;
}

.team-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  color: #6a7f99;
  font-size: 0.84rem;
}

.team-presence-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.18rem 0.56rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
}

.team-presence-badge.is-online {
  background: rgba(23, 119, 66, 0.1);
  border-color: rgba(23, 119, 66, 0.18);
  color: #177743;
}

.team-presence-badge.is-offline {
  background: rgba(92, 114, 145, 0.1);
  border-color: rgba(92, 114, 145, 0.16);
  color: #5b6f89;
}

.team-presence-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  flex: 0 0 8px;
}

.team-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.team-secondary-btn {
  border: 1px solid rgba(121, 151, 194, 0.42);
  background: #ffffff;
  color: #214778;
  border-radius: 10px;
  padding: 0.56rem 0.82rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.team-secondary-btn:hover {
  background: #f3f8ff;
}

.team-secondary-btn.danger {
  border-color: rgba(196, 94, 116, 0.34);
  color: #8f2841;
}

.invite-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(86, 132, 215, 0.16), transparent 34%),
    linear-gradient(180deg, #f4f7ff 0%, #f9fbff 48%, #edf3ff 100%);
}

.invite-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.invite-card {
  max-width: 560px;
  width: 100%;
}

.invite-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  font-weight: 800;
  color: #5570a6;
}

.invite-form {
  display: grid;
  gap: 0.85rem;
}

.invite-note-grid {
  margin-top: 1.1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
}

.invite-note-card {
  border: 1px solid rgba(175, 192, 220, 0.45);
  border-radius: 14px;
  padding: 0.88rem 0.95rem;
  background: #fbfdff;
}

.invite-note-card strong {
  color: #173250;
}

.invite-note-card p {
  margin: 0.34rem 0 0;
  color: #5a6d85;
  line-height: 1.5;
  font-size: 0.9rem;
}

.invite-actions {
  margin-top: 1.1rem;
}

@media (max-width: 980px) {
  .team-grid,
  .team-hero-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .team-summary-grid,
  .invite-note-grid {
    grid-template-columns: 1fr;
  }

  .team-panel,
  .invite-card {
    padding: 0.9rem;
  }

  .team-card-top {
    flex-direction: column;
  }
}
