/* 내 팀 · 퇴사 신청 */

#myTeamPage.listing-page,
#resignRequestsPage.listing-page {
  z-index: 10100;
}

#myTeamPage.open,
#resignRequestsPage.open {
  align-items: center;
  justify-content: center;
  padding: 16px;
}

#myTeamPage .listing-backdrop,
#resignRequestsPage .listing-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

#myTeamPage .my-team-panel,
#resignRequestsPage .my-team-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(520px, calc(100vw - 32px));
  max-height: 85vh;
  min-height: 320px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.my-team-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 0 24px;
  background: #f8fafc;
}

.my-team-section {
  padding: 16px 16px 4px;
}

.my-team-section + .my-team-section {
  margin-top: 4px;
  padding-top: 18px;
  border-top: none;
}

.my-team-section__title {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.my-team-section__hint {
  margin: 0 0 12px;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 10px;
  box-shadow: inset 3px 0 0 #93c5fd;
}

.my-team-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.my-team-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: none;
}

.my-team-card__info,
.my-team-card__top {
  min-width: 0;
  grid-column: 1;
}

.my-team-card__titleRow {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
}

.my-team-card__title {
  min-width: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-team-card__badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1;
  background: #f1f5f9;
  color: #64748b;
}

.my-team-card__badge--self {
  background: #eff6ff;
  color: #2563eb;
}

.my-team-card__meta {
  margin: 3px 0 0;
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-team-card__controls,
.my-team-card__actions {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: none;
  flex-shrink: 0;
}

.my-team-meta {
  margin: 0;
  font-size: 14px;
  color: #334155;
  line-height: 1.5;
  text-align: center;
}

.my-team-meta__row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 0 0 4px;
}

.my-team-meta__label {
  color: #94a3b8;
  font-size: 12px;
}

/* 레거시 멤버 행 (다른 화면 호환) */
.my-team-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.my-team-member:last-child {
  border-bottom: none;
}

.my-team-member__info {
  min-width: 0;
  flex: 1;
}

.my-team-member__name {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.my-team-member__email {
  font-size: 12px;
  color: #94a3b8;
}

.my-team-member__badge {
  flex-shrink: 0;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
}

.my-team-member__badge--self {
  background: #eff6ff;
  color: #2563eb;
}

.my-team-member__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.my-team-resign-box {
  padding: 16px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  text-align: center;
}

.my-team-resign-box .my-team-actions {
  justify-content: center;
}

.my-team-resign-box__status {
  margin: 0 0 10px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}

.my-team-resign-box__status--pending {
  color: #b45309;
}

.my-team-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.my-team-btn {
  appearance: none;
  margin: 0;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  color: #334155;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.my-team-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.my-team-btn--primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.my-team-btn--primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.my-team-btn--danger {
  color: #dc2626;
  border-color: #fecaca;
  background: #fff;
}

.my-team-btn--danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

.my-team-btn--ghost-danger {
  color: #dc2626;
  border-color: transparent;
  background: transparent;
  padding: 8px 10px;
}

.my-team-btn--ghost-danger:hover {
  background: #fef2f2;
  border-color: #fecaca;
}

.my-team-btn--sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 8px;
  white-space: nowrap;
}

.my-team-btn--sm.my-team-btn--ghost-danger {
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 500;
}

.my-team-empty {
  margin: 0;
  padding: 8px 0;
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.5;
}

.my-team-empty--box {
  padding: 28px 16px;
  text-align: center;
  background: #fff;
  border: 1px dashed #e2e8f0;
  border-radius: 14px;
}

/* 구 클래스 호환 */
.my-team-req-card {
  padding: 14px;
  margin-bottom: 0;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.my-team-req-card__head {
  margin-bottom: 6px;
}

.my-team-req-card__name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.my-team-req-card__meta {
  font-size: 12px;
  color: #94a3b8;
}

.my-team-req-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* 마이페이지 인라인 */
.my-page-detail__form-mount .listing-panel--inline .my-team-content {
  background: #f8fafc;
  padding: 0 0 16px;
}

.my-page-detail__form-mount .listing-panel--inline .my-team-section {
  padding-left: 0;
  padding-right: 0;
}

@media (max-width: 900px) {
  #myTeamPage .listing-backdrop,
  #resignRequestsPage .listing-backdrop {
    display: block;
  }
}
