.team-shell {
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  gap: 24px;
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

.team-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.team-mobile-tabs {
  display: none;
}

.team-layout {
  display: grid;
  grid-auto-rows: max-content;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  min-height: 0;
  align-items: start;
}

.team-sidebar,
.team-content {
  display: grid;
  gap: 18px;
  min-width: 0;
  min-height: auto;
  align-content: start;
}

.team-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  padding: 24px;
  min-width: 0;
  min-height: auto;
  overflow: visible;
}

.team-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.team-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0;
}

.team-form {
  display: grid;
  gap: 12px;
}

.team-form .field {
  display: grid;
  gap: 8px;
}

.team-form input,
.team-form select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  font-size: 16px;
}

.team-form .btn, .team-row .btn { min-height: 44px; }
.team-hero > div { min-width: 0; }
.team-feedback { display: grid; gap: 8px; justify-items: end; max-width: 460px; }
.team-feedback .invite-status { overflow-wrap: anywhere; }
.team-feedback .btn { min-height: 44px; }
@media (max-width: 720px) {
  .team-feedback { max-width: none; justify-items: start; }
}
.team-form .btn { justify-content: center; }
.team-stats .status-item { background: transparent; border: 0; padding: 8px 0; }
.team-stats .status-value { font-size: 28px; font-variant-numeric: tabular-nums; }
.team-stats .status-label { font-size: 11px; letter-spacing: 0; text-transform: none; }

.team-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.team-invite.is-readonly {
  opacity: 0.74;
}

.team-list {
  display: grid;
  gap: 0;
  min-height: 0;
  overflow: visible;
  overscroll-behavior: contain;
}

.team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}

.team-row:last-child { border-bottom: 0; padding-bottom: 0; }
.team-row:first-child { padding-top: 0; }

.team-row__main,
.team-row__side {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.team-row__side {
  justify-items: end;
  text-align: right;
}

.team-row__title {
  font-size: 16px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.team-row__meta,
.team-row__time {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.team-empty {
  padding: 18px;
  border-radius: 12px;
  background: var(--panel);
  color: var(--muted);
  text-align: center;
}

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

@media (max-width: 720px) {
  .team-shell {
    grid-template-rows: auto auto auto;
    min-height: 0;
    gap: 6px;
  }

  .team-hero,
  .team-section-head {
    grid-template-columns: 1fr;
    display: grid;
    gap: 8px;
  }

  .team-hero .headline {
    margin-bottom: 3px;
    font-size: 24px;
  }

  .team-hero .sub,
  .team-section-head .section-sub {
    font-size: 12px;
    line-height: 1.35;
  }

  .team-mobile-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border-radius: 16px;
    background: var(--panel);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .team-mobile-tabs::-webkit-scrollbar {
    display: none;
  }

  .team-mobile-tab {
    min-width: 0;
    min-height: 44px;
    flex: 0 0 auto;
    padding: 10px 12px;
    text-align: left;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    white-space: normal;
  }

  .team-mobile-tab.is-active {
    background: var(--panel-strong);
    border-color: var(--border);
    color: var(--text);
    font-weight: 600;
  }

  .team-layout {
    align-content: start;
    align-items: start;
    gap: 0;
    margin-top: 0;
    overflow: visible;
    padding-bottom: 2px;
  }

  .team-sidebar,
  .team-content {
    display: contents;
  }

  [data-team-mobile-panel]:not(.is-active) {
    display: none;
  }

  [data-team-mobile-panel].is-active {
    align-self: start;
  }

  .team-card {
    padding: 18px;
    border-radius: 18px;
  }

  .team-section-head {
    margin-bottom: 10px;
  }

  .team-section-head .section-title {
    margin-bottom: 2px;
    font-size: 18px;
  }

  .team-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .team-stats .status-item {
    padding: 8px 0;
    border-radius: 8px;
  }

  .team-stats .status-label {
    margin-bottom: 3px;
    font-size: 11px;
    line-height: 1.15;
  }

  .team-stats .status-value {
    font-size: 24px;
    line-height: 1;
  }

  .team-form {
    gap: 9px;
  }

  .team-form .field {
    gap: 5px;
  }

  .team-form input,
  .team-form select {
    min-height: 48px;
    padding: 9px 10px;
    border-radius: 8px;
  }

  .team-form .btn {
    justify-content: center;
    min-height: 44px;
    padding: 9px 12px;
    border-radius: 8px;
  }

  .team-note {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.4;
  }

  .team-list {
    gap: 0;
  }

  .team-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 16px 0;
  }

  .team-row__side {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-items: start;
    gap: 6px;
    text-align: left;
  }

  .team-row__main {
    gap: 3px;
  }

  .team-row__title {
    font-size: 15px;
    line-height: 1.25;
  }

  .team-row__meta,
  .team-row__time {
    font-size: 12px;
    line-height: 1.35;
  }

  .team-row .pill {
    padding: 5px 8px;
    font-size: 11px;
  }

  .team-empty {
    padding: 14px;
    border-radius: 8px;
    font-size: 13px;
  }
}
